2nd DSTU Draft For Comment

This page is part of the FHIR Specification (v0.4.0: DSTU 2 Draft). 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: R3 R2

6.22.6 Resource DataElement - Examples

Example Index:

Patient gender represented as an data elementXMLJSON
Prothrombin time for lab test master fileXMLJSON

6.22.6.1 Gender

XML

Patient gender represented as an data element (id = "gender")

Raw XML

<DataElement xmlns="http://hl7.org/fhir">
  <id value="gender"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><!-- Snipped for brevity --></div>
  </text>
  <contained>
    <ValueSet>
      <id value="2179414"/>
      <url value="2179414"/>
      <version value="1.0"/>
      <name value="Gender Code"/>
      <description value="All codes representing the gender of a person."/>
      <status value="active"/>
      <compose>
        <include>
          <system value="http://ncit.nci.nih.gov"/>
          <concept>
            <code value="C17998"/>
            <display value="Unknown"/>
          </concept><!--               &lt;definition value=&quot;Not known, not observed, not recorded, or refused.
           &quot;/&gt;   -->
          <concept>
            <code value="C20197"/>
            <display value="Male"/>
          </concept><!--               &lt;definition value=&quot;A person who belongs to the sex that normally
           produces sperm. The term is used to indicate biological sex distinctions, cultural gender
           role distinctions, or both.&quot;/&gt;   -->
          <concept>
            <code value="C16576"/>
            <display value="Female"/>
          </concept><!--               &lt;definition value=&quot;A person who belongs to the sex that normally
           produces ova. The term is used to indicate biological sex distinctions, or cultural gender
           role distinctions, or both.&quot;/&gt;   -->
          <concept>
            <code value="C38046"/>
            <display value="Not specified"/>
          </concept>
        </include>
      </compose>
    </ValueSet>
  </contained>
  <contained>
    <ValueSet><!--               &lt;definition value=&quot;Not specified&quot;/&gt;   -->
      <id value="2179414-permitted"/>
      <status value="active"/>
      <define>
        <system value="http://example.org/fhir/2179414"/>
        <caseSensitive value="true"/>
        <concept>
          <code value="0"/>
        </concept>
        <concept>
          <code value="1"/>
        </concept>
        <concept>
          <code value="2"/>
        </concept>
        <concept>
          <code value="3"/>
        </concept>
      </define>
    </ValueSet>
  </contained>
  <contained>
    <ConceptMap>
      <id value="2179414-cm"/>
      <status value="active"/>
      <sourceReference>
        <reference value="#2179414"/>
      </sourceReference>
      <targetReference>
        <reference value="#2179414-permitted"/>
      </targetReference>
      <element>
        <code value="C17998"/>
        <map>
          <code value="0"/>
          <equivalence value="equal"/>
        </map>
      </element>
      <element>
        <code value="C20197"/>
        <map>
          <code value="1"/>
          <equivalence value="equal"/>
        </map>
      </element>
      <element>
        <code value="C16576"/>
        <map>
          <code value="2"/>
          <equivalence value="equal"/>
        </map>
      </element>
      <element>
        <code value="C38046"/>
        <map>
          <code value="3"/>
          <equivalence value="equal"/>
        </map>
      </element>
    </ConceptMap>
  </contained>
  <extension url="http://hl7.org/fhir/ExtensionDefinition/minLength">
    <valueInteger value="1"/>
  </extension>
  <extension url="http://hl7.org/fhir/ExtensionDefinition/maxLength">
    <valueInteger value="13"/>
  </extension>
  <identifier>
    <value value="2179650"/>
  </identifier>
  <version value="1.0"/>
  <publisher value="DCP"/>
  <status value="active"/>
  <name value="Gender Code"/>
  <category>
    <coding>
      <system value="http://unknown/FBPP"/>
      <display value="FBPP Pooled Database"/>
    </coding>
    <coding>
      <system value="http://unknown/PhenX"/>
      <display value="Demographics"/>
    </coding>
    <coding>
      <system value="http://unknown/Eligibility Criteria"/>
      <display value="Pt. Administrative"/>
    </coding>
    <coding>
      <system value="http://unknown/UAMS Clinical Research"/>
      <display value="UAMS New CDEs"/>
    </coding>
    <coding>
      <system value="http://unknown/PhenX"/>
      <display value="Substance Abuse and "/>
    </coding>
    <coding>
      <system value="http://unknown/Category"/>
      <display value="CSAERS Adverse Event"/>
    </coding>
    <coding>
      <system value="http://unknown/PhenX"/>
      <display value="Core: Tier 1"/>
    </coding>
    <coding>
      <system value="http://unknown/Category"/>
      <display value="Case Report Forms"/>
    </coding>
    <coding>
      <system value="http://unknown/Category"/>
      <display value="CSAERS Review Set"/>
    </coding>
    <coding>
      <system value="http://unknown/Demonstration%20Applications"/>
      <display value="CIAF"/>
    </coding>
    <coding>
      <system value="http://unknown/NIDA%20CTN%20Usage"/>
      <display value="Clinical Research"/>
    </coding>
    <coding>
      <system value="http://unknown/NIDA%20CTN%20Usage"/>
      <display value="Electronic Health Re"/>
    </coding>
    <coding>
      <system value="http://unknown/Condition"/>
      <display value="Barretts Esophagus"/>
    </coding>
    <coding>
      <system value="http://unknown/Condition"/>
      <display value="Bladder Cancer"/>
    </coding>
    <coding>
      <system value="http://unknown/Condition"/>
      <display value="Oral Leukoplakia"/>
    </coding>
    <coding>
      <system value="http://unknown/Condition"/>
      <display value="Sulindac for Breast"/>
    </coding>
  </category>
  <question value="Gender"/>
  <definition value="The code representing the gender of a person."/>
  <type value="CodeableConcept"/>
  <binding>
    <isExtensible value="false"/>
    <conformance value="required"/>
    <valueSet><!--    
      &lt;extension url=&quot;http://hl7.org/fhir/ExtensionDefinition/iso-11179-permitted-value-valu
      eset&quot;&gt;
        &lt;valueReference&gt;
          &lt;reference value=&quot;#2179414-permitted&quot;/&gt;
        &lt;/valueReference&gt;
      &lt;/extension&gt;
      &lt;extension url=&quot;http://hl7.org/fhir/ExtensionDefinition/iso-11179-permitted-value-conc
      eptmap&quot;&gt;
        &lt;valueReference&gt;
          &lt;reference value=&quot;#2179414-cm&quot;/&gt;
        &lt;/valueReference&gt;
      &lt;/extension&gt;
         -->
      <reference value="#2179414"/>
    </valueSet>
  </binding>
</DataElement>

JSON

Patient gender represented as an data element

Raw JSON (Canonical)

{
  "resourceType": "DataElement",
  "id": "gender",
  "text": {
    "status": "generated",
    "div": "<div>!-- Snipped for Brevity --></div>"
  },
  "contained": [
    {
      "resourceType": "ValueSet",
      "id": "2179414",
      "url": "2179414",
      "version": "1.0",
      "name": "Gender Code",
      "description": "All codes representing the gender of a person.",
      "status": "active",
      "compose": {
        "include": [
          {
            "system": "http://ncit.nci.nih.gov",
            "concept": [
              {
                "code": "C17998",
                "display": "Unknown"
              },
              {
                "code": "C20197",
                "display": "Male"
              },
              {
                "code": "C16576",
                "display": "Female"
              },
              {
                "code": "C38046",
                "display": "Not specified"
              }
            ]
          }
        ]
      }
    },
    {
      "resourceType": "ValueSet",
      "id": "2179414-permitted",
      "status": "active",
      "define": {
        "system": "http://example.org/fhir/2179414",
        "caseSensitive": true,
        "concept": [
          {
            "code": "0"
          },
          {
            "code": "1"
          },
          {
            "code": "2"
          },
          {
            "code": "3"
          }
        ]
      }
    },
    {
      "resourceType": "ConceptMap",
      "id": "2179414-cm",
      "status": "active",
      "sourceReference": {
        "reference": "#2179414"
      },
      "targetReference": {
        "reference": "#2179414-permitted"
      },
      "element": [
        {
          "code": "C17998",
          "map": [
            {
              "code": "0",
              "equivalence": "equal"
            }
          ]
        },
        {
          "code": "C20197",
          "map": [
            {
              "code": "1",
              "equivalence": "equal"
            }
          ]
        },
        {
          "code": "C16576",
          "map": [
            {
              "code": "2",
              "equivalence": "equal"
            }
          ]
        },
        {
          "code": "C38046",
          "map": [
            {
              "code": "3",
              "equivalence": "equal"
            }
          ]
        }
      ]
    }
  ],
  "extension": [
    {
      "url": "http://hl7.org/fhir/ExtensionDefinition/minLength",
      "valueInteger": 1
    },
    {
      "url": "http://hl7.org/fhir/ExtensionDefinition/maxLength",
      "valueInteger": 13
    }
  ],
  "identifier": {
    "value": "2179650"
  },
  "version": "1.0",
  "publisher": "DCP",
  "status": "active",
  "name": "Gender Code",
  "category": [
    {
      "coding": [
        {
          "system": "http://unknown/FBPP",
          "display": "FBPP Pooled Database"
        },
        {
          "system": "http://unknown/PhenX",
          "display": "Demographics"
        },
        {
          "system": "http://unknown/Eligibility Criteria",
          "display": "Pt. Administrative"
        },
        {
          "system": "http://unknown/UAMS Clinical Research",
          "display": "UAMS New CDEs"
        },
        {
          "system": "http://unknown/PhenX",
          "display": "Substance Abuse and "
        },
        {
          "system": "http://unknown/Category",
          "display": "CSAERS Adverse Event"
        },
        {
          "system": "http://unknown/PhenX",
          "display": "Core: Tier 1"
        },
        {
          "system": "http://unknown/Category",
          "display": "Case Report Forms"
        },
        {
          "system": "http://unknown/Category",
          "display": "CSAERS Review Set"
        },
        {
          "system": "http://unknown/Demonstration%20Applications",
          "display": "CIAF"
        },
        {
          "system": "http://unknown/NIDA%20CTN%20Usage",
          "display": "Clinical Research"
        },
        {
          "system": "http://unknown/NIDA%20CTN%20Usage",
          "display": "Electronic Health Re"
        },
        {
          "system": "http://unknown/Condition",
          "display": "Barretts Esophagus"
        },
        {
          "system": "http://unknown/Condition",
          "display": "Bladder Cancer"
        },
        {
          "system": "http://unknown/Condition",
          "display": "Oral Leukoplakia"
        },
        {
          "system": "http://unknown/Condition",
          "display": "Sulindac for Breast"
        }
      ]
    }
  ],
  "question": "Gender",
  "definition": "The code representing the gender of a person.",
  "type": "CodeableConcept",
  "binding": {
    "isExtensible": false,
    "conformance": "required",
    "valueSet": {
      "reference": "#2179414"
    }
  }
}

Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.