This page is part of the FHIR Specification (v0.0.82: DSTU 1). 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

6.1.8 Resource List - Examples

Example Index:

General List ExampleXMLJSON
Empty List ExampleXMLJSON
Exaple Medication Change ListXMLJSON

6.1.8.1 General

XML

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>
    <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>
      <reference value="Condition/example"/>
    </item>
  </entry>
  <entry>
    <flag>
      <text value="Added"/>
    </flag>
    <item>
      <reference value="Condition/example2"/>
    </item>
  </entry>
</List>

JSON

General List Example

{
  "resourceType": "List",
  "text": {
    "status": "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": {
    "reference": "Patient/example"
  },
  "date": "2012-11-25T22:17:00+11:00",
  "ordered": false,
  "mode": "changes",
  "entry": [
    {
      "flag": [
        {
          "text": "Deleted due to error"
        }
      ],
      "deleted": true,
      "item": {
        "reference": "Condition/example"
      }
    },
    {
      "flag": [
        {
          "text": "Added"
        }
      ],
      "item": {
        "reference": "Condition/example2"
      }
    }
  ]
}

6.1.8.2 Empty List

XML

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>
    <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

Empty List Example

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

6.1.8.3 Med List

XML

Exaple Medication Change List (id = "med-list")

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>
    <reference value="Patient/example"/>
  </source>
  <date value="2013-11-20T23:10:23+11:00"/>
  <mode value="changes"/>
  <!--   
      in a real medications list, we'd actually have medication resources.
      but this an example to demonstrate a changes list, so we'll just use 
      display   -->
  <entry>
    <!--   patient was prescribed hydroxocobalamin. the flag marks this 
       as a prescription. Note that healthcare workers will now get into
       a long debate the exact implication of &quot;prescribed&quot;. That's why the
       spec doesn't fix the flag values   -->
    <flag>
      <coding>
        <system value="http://nehta.gov.au/codes/medications/changetype"/>
        <code value="02"/>
        <display value="Prescribed"/>
      </coding>
    </flag>
    <item> 
      <display value="hydroxocobalamin"/>
    </item>
  </entry>  
  <!--  
     on this one, we record that the patient was taken off morphine sulfate.
     because not every system knows the flags, and the ensure there's no confusion,
     if the flag implies that something was removed from the list, then the
     deleted element must also be set 
    -->  
  <entry>
    <flag>
      <coding>
        <system value="http://nehta.gov.au/codes/medications/changetype"/>
        <code value="02"/>
        <display value="Cancelled"/>
      </coding>
    </flag>
    <deleted value="true"/>
    <item> 
      <display value="Morphine Sulfate"/>
    </item>
  </entry>  
</List>

JSON

Exaple Medication Change List

{
  "resourceType": "List",
  "text": {
    "status": "generated",
    "div": "<div>\n      <p>The patient is not on any medications</p>\n    </div>"
  },
  "code": {
    "coding": [
      {
        "system": "http://snomed.info/sct",
        "code": "182836005",
        "display": "Review of medication"
      }
    ],
    "text": "Medication Review"
  },
  "source": {
    "reference": "Patient/example"
  },
  "date": "2013-11-20T23:10:23+11:00",
  "mode": "changes",
  "entry": [
    {
      "flag": [
        {
          "coding": [
            {
              "system": "http://nehta.gov.au/codes/medications/changetype",
              "code": "02",
              "display": "Prescribed"
            }
          ]
        }
      ],
      "item": {
        "display": "hydroxocobalamin"
      }
    },
    {
      "flag": [
        {
          "coding": [
            {
              "system": "http://nehta.gov.au/codes/medications/changetype",
              "code": "02",
              "display": "Cancelled"
            }
          ]
        }
      ],
      "deleted": true,
      "item": {
        "display": "Morphine Sulfate"
      }
    }
  ]
}

comments powered by Disqus