Difference between revisions of "Java Script Object Notation (JSON)"

From Clinfowiki
Jump to: navigation, search
m (References: adding submitted by)
(Added Cerner)
 
(3 intermediate revisions by one user not shown)
Line 87: Line 87:
 
==FHIR==
 
==FHIR==
 
[[HL7]] has provided guidance [4] from the Implementable Technology Specifications Work Group[5] under [[FHIR]] (Fast Healthcare Interoperability Resources) for the use of JSON format. The also provide a sample file with many test cases to help test JSON parsers.[6]
 
[[HL7]] has provided guidance [4] from the Implementable Technology Specifications Work Group[5] under [[FHIR]] (Fast Healthcare Interoperability Resources) for the use of JSON format. The also provide a sample file with many test cases to help test JSON parsers.[6]
 +
 +
==EPIC==
 +
[[Epic]] has implemented a REST interface that returns a JSON object for retrieving a variety of information the  system contains[7]. The following example use the GET operation for retrieving the Patient information.
 +
 +
  URL:https://open-ic.epic.com/FHIR/api/FHIR/DSTU2/Patient/Tbt3KuCY0B5PSrJvCu2j-PlK.aiHsu2xUjUM8bWpetXoB
 +
 
 +
  {
 +
      "resourceType": "Patient",
 +
      "birthDate": "1985-08-01T00:00:00Z",
 +
      "active": true,
 +
      "deceasedBoolean": false,
 +
      "careProvider": [
 +
        {
 +
            "display": "Physician Family Medicine",
 +
            "reference": "https://open-ic.epic.com/FHIR/api/FHIR/DSTU2/Practitioner/T3Mz3KLBDVXXgaRoee3EKAAB"
 +
        }
 +
      ],
 +
      "name": [
 +
        {
 +
            "use": "usual",
 +
            "family": [
 +
                "Argonaut"
 +
            ],
 +
            "given": [
 +
                "Jason"
 +
            ]
 +
        }
 +
      ],
 +
      ...
 +
 +
==Cerner==
 +
[[Cerner]] also supports a REST interface that returns JSON objects for interacting with the [[EMR]][8]. The format and response is similar to the [[Epic]] example as both are implementing [[FHIR]] API version DSTU 2.
  
 
==References==
 
==References==
Line 95: Line 127:
 
# Implementable Technology Specifications [http://www.hl7.org/special/committees/xml/index.cfm]
 
# Implementable Technology Specifications [http://www.hl7.org/special/committees/xml/index.cfm]
 
# Sample File [http://hl7.org/fhir/json-edge-cases.json]
 
# Sample File [http://hl7.org/fhir/json-edge-cases.json]
 +
# Epic spec [https://open.epic.com/Clinical/FHIR?whereTo=patient]
 +
# Cerner spec [http://fhir.cerner.com/may2015/]
 +
  
 
Submitted by (Dale Cox)
 
Submitted by (Dale Cox)
 
[[Category:BMI512-FALL-15]]
 
[[Category:BMI512-FALL-15]]
 
[[Category:Terminology and Coding]]
 
[[Category:Terminology and Coding]]

Latest revision as of 18:24, 17 October 2015

Java Script Object Notation (JSON) is a lightweight, text-based, language-independent data interchange format. It was derived from the ECMAScript Programming Language Standard. [1][2]

Data Values

JSON is used to express data in a combination of 6 different ways, usually expressed in key/value pairs.

File:Value.gif [3]

string

A JSON string can be one or more words numbers and or symbols. There are special characters used to indicate line breaks and other formatting such as apostrophes.

An example string representation:

"stringKey":"BMI-512_Fall 2015"

number

A JSON number can be an integer or rational number.

An example number representation:

"numberKey":-1

object

A JSON Object is a group of JSON data values separated by a comma

An example object representation:

"objectKey":{"stringKey"="BMI-512_Fall 2015", "numberKey"=-1}

array

A JSON array is an ordered list of values.

An example array representation:

"arrayKey":["Freshman","Sophomore", "Junior", "Senior"]

true / false

A JSON true / false is used to express Boolean values.

An example true / false representation:

"falseKey":"false"

"trueKey":"true"

null

A JSON null represents no value present or unknown value.

An example null representation:

"nullKey":null

Example

The following Example illustrates how JSON can be used to express Patient Data.

  "Paitent":"{
     "ID":1234567,
     "Name":{
        "Prefix":"Mrs",
        "First":"Jane",
        "Last":"Doe",
        "Suffix":null,
        "PreferredName":
        "Janey"
     },
     "DOB":"1970-01-10T08:00:00.000Z",
     "Gender":"Female",
     "PhoneNumbers":[
        {"type":"Home","preferred":true,"number":"555-555-5555"},
        {"type":"Cell","preferred":false,"number":"555-555-5556"}
     ],
     "isSmoker":false
  }"

FHIR

HL7 has provided guidance [4] from the Implementable Technology Specifications Work Group[5] under FHIR (Fast Healthcare Interoperability Resources) for the use of JSON format. The also provide a sample file with many test cases to help test JSON parsers.[6]

EPIC

Epic has implemented a REST interface that returns a JSON object for retrieving a variety of information the system contains[7]. The following example use the GET operation for retrieving the Patient information.

  URL:https://open-ic.epic.com/FHIR/api/FHIR/DSTU2/Patient/Tbt3KuCY0B5PSrJvCu2j-PlK.aiHsu2xUjUM8bWpetXoB 
  
  {
     "resourceType": "Patient",
     "birthDate": "1985-08-01T00:00:00Z",
     "active": true,
     "deceasedBoolean": false,
      "careProvider": [
       {
           "display": "Physician Family Medicine",
           "reference": "https://open-ic.epic.com/FHIR/api/FHIR/DSTU2/Practitioner/T3Mz3KLBDVXXgaRoee3EKAAB"
       }
     ],
     "name": [
       {
           "use": "usual",
           "family": [
               "Argonaut"
           ],
           "given": [
               "Jason"
           ]
       }
     ],
     ...

Cerner

Cerner also supports a REST interface that returns JSON objects for interacting with the EMR[8]. The format and response is similar to the Epic example as both are implementing FHIR API version DSTU 2.

References

  1. RFC 7159 [1]
  2. ECMA-404 [2]
  3. Value Image [3]
  4. FHIR - JSON Representation of Resources [4]
  5. Implementable Technology Specifications [5]
  6. Sample File [6]
  7. Epic spec [7]
  8. Cerner spec [8]


Submitted by (Dale Cox)