This page is part of the FHIR Specification (v0.11: DSTU 1 Ballot 3). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2

Resource Roadmap - Examples 6.1.6

Example Index:

General List ExampleXMLJSON
Empty List ExampleXMLJSON

General 6.1.6.1

General List Example

General List Example (id = "example")

Raw XML

<List xmlns="http://hl7.org/fhir">
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
      <table>
        <thead>
          <tr>
            <th>Condition</th>
            <th>Severity</th>
            <th>Date</th>
            <th>Location</th>
            <th>Status</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>Burnt Ear</td>
            <td>Severe</td>
            <td>24-May 2012</td>
            <td>Left Ear</td>
            <td>deleted</td>
          </tr>
          <tr>
            <td>Asthma</td>
            <td>Mild</td>
            <td>21-Nov 2012</td>
            <td>--</td>
            <td>added</td>
          </tr>
        </tbody>
      </table>
    </div>
  </text>
  <!--   This list doesn't have a code. In actual fact, 
    it's a Condition list produced at the end of an encounter 
    to a regular primary care practitioner. But the only way
    to know this is to hunt down the place it is used 
    and find out   -->
  <source>
    <type value="Patient"/>
    <reference value="patient/@example"/>
  </source>
  <date value="2012-11-25T22:17:00+11:00"/>
  <ordered value="false"/>
  <mode value="changes"/>
  <entry>
    <flag>
      <text value="Deleted due to error"/>
    </flag>
    <deleted value="true"/>
    <item>
      <type value="Condition"/>
      <reference value="condition/@example"/>
    </item>
  </entry>
  <entry>
    <flag>
      <text value="Added"/>
    </flag>
    <item>
      <type value="Condition"/>
      <reference value="condition/@example2"/>
    </item>
  </entry>
</List>

JSON Equivalent

General List Example

{
  "List":{
    "text":{
      "status":{
        "value":"generated"
      },
      "div":"<div>\n      <table>\n        <thead>\n          <tr>\n            <th>Condition<\/th>\n            <th>Severity<\/th>\n            <th>Date<\/th>\n            <th>Location<\/th>\n            <th>Status<\/th>\n          <\/tr>\n        <\/thead>\n        <tbody>\n          <tr>\n            <td>Burnt Ear<\/td>\n            <td>Severe<\/td>\n            <td>24-May 2012<\/td>\n            <td>Left Ear<\/td>\n            <td>deleted<\/td>\n          <\/tr>\n          <tr>\n            <td>Asthma<\/td>\n            <td>Mild<\/td>\n            <td>21-Nov 2012<\/td>\n            <td>--<\/td>\n            <td>added<\/td>\n          <\/tr>\n        <\/tbody>\n      <\/table>\n    <\/div>"
    },
    "source":{
      "type":{
        "value":"Patient"
      },
      "reference":{
        "value":"patient/@example"
      }
    },
    "date":{
      "value":"2012-11-25T22:17:00+11:00"
    },
    "ordered":{
      "value":false
    },
    "mode":{
      "value":"changes"
    },
    "entry":[
      {
        "flag":[
          {
            "text":{
              "value":"Deleted due to error"
            }
          }
        ],
        "deleted":{
          "value":true
        },
        "item":{
          "type":{
            "value":"Condition"
          },
          "reference":{
            "value":"condition/@example"
          }
        }
      },
      {
        "flag":[
          {
            "text":{
              "value":"Added"
            }
          }
        ],
        "item":{
          "type":{
            "value":"Condition"
          },
          "reference":{
            "value":"condition/@example2"
          }
        }
      }
    ]
  }
}

Empty List 6.1.6.2

Empty List Example

Empty List Example (id = "example-empty")

Raw XML

<List xmlns="http://hl7.org/fhir">
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
      <p>The patient is not on any medications</p>
    </div>
  </text>
  <code>
    <coding>
      <system value="http://snomed.info/sct"/>
      <code value="182836005"/>
      <display value="Review of medication"/>
    </coding>
    <text value="Medication Review"/>
  </code>
  <source>
    <type value="Patient"/>
    <reference value="patient/@example"/>
  </source>
  <date value="2012-11-26T07:30:23+11:00"/>
  <mode value="snapshot"/>

  <emptyReason>
    <coding>
      <system value="http://hl7.org/fhir/special-values"/>
      <code value="nil known"/>
      <display value="Nil Known"/>
    </coding>
    <text value="The patient is not on any medications"/>
  </emptyReason>
</List>

JSON Equivalent

Empty List Example

{
  "List":{
    "text":{
      "status":{
        "value":"generated"
      },
      "div":"<div>\n      <p>The patient is not on any medications<\/p>\n    <\/div>"
    },
    "code":{
      "coding":[
        {
          "system":{
            "value":"http://snomed.info/sct"
          },
          "code":{
            "value":"182836005"
          },
          "display":{
            "value":"Review of medication"
          }
        }
      ],
      "text":{
        "value":"Medication Review"
      }
    },
    "source":{
      "type":{
        "value":"Patient"
      },
      "reference":{
        "value":"patient/@example"
      }
    },
    "date":{
      "value":"2012-11-26T07:30:23+11:00"
    },
    "mode":{
      "value":"snapshot"
    },
    "emptyReason":{
      "coding":[
        {
          "system":{
            "value":"http://hl7.org/fhir/special-values"
          },
          "code":{
            "value":"nil known"
          },
          "display":{
            "value":"Nil Known"
          }
        }
      ],
      "text":{
        "value":"The patient is not on any medications"
      }
    }
  }
}