<?xml version="1.0" encoding="UTF-8"?>
<resourceDefinitions xmlns="http://www.hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.hl7.org/fhir definitions.xsd">
  <author>HL7</author>
  <resourceDefinition>
    <name>Conformance</name>
    <elementDefinitions>
      <elementDefinition>
        <name>Conformance</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>A conformance statement returned by request in an RESTful framework</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.id</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>id</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Globally unique Conformance Statement Id (Must be a UUID)</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.date</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>dateTime</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Date that the conformance statement is published</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.publisher</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>The organization that publishes this conformance statement</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.publisher.name</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Name of Organization</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.publisher.address</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Address</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Address of Organization</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.publisher.contact</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Contact</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Contacts for Organization</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.software</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>The software that is covered by this conformance statement</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.software.name</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Name software is known by</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.software.version</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Version covered by this statement</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.software.releaseDate</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>dateTime</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Date this version released</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.mode</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>code</type>
        </types>
        <conceptDomain>RestfulConformanceMode</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>client | server</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.profile</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>uri</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Additional other profiles that apply to this conformance statement.</definition>
        <requirements></requirements>
        <comments> Generally these profiles make  constraints on the bindings of concept domains / value sets</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.resource</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Constraint</type>
        </types>
        <conceptDomain>ResourceType</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>Resource Type with constraints</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.operation</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Conditional</conformance>
        <condition>A resource type is required if the event declaration has multiple focal resources</condition>
        <mustUnderstand>false</mustUnderstand>
        <definition></definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.operation.read</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>boolean</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>if supported</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.operation.vread</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>boolean</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>if supported</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.operation.update</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>boolean</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>if supported</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.operation.delete</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>boolean</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>if supported</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.operation.validate</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>boolean</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>if supported</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.operation.history</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>boolean</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>if supported</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.operation.transaction</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>only if supported</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.operation.transaction.name</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>code</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>transaction names supported</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.operation.search</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>only if supported</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.operation.search.param</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>search params supported</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.operation.create</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>if supported</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.operation.create.id</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>code</type>
        </types>
        <conceptDomain>ResourceIdSource</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>source of id: client | server | either</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.operation.updates</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>boolean</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>if supported</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.operation.updates.param</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>update filter params supported</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.operation.schema</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>boolean</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>if supported</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.extensions</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>See Extensions</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Conformance.text</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Narrative</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Text summary of conformance profile for human interpretation</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
    </elementDefinitions>
  </resourceDefinition>
  <resourceDefinition>
    <name>Document</name>
    <elementDefinitions>
      <elementDefinition>
        <name>Document</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>true</mustUnderstand>
        <definition>A documentation of clinical observations and services that are aggregated together into a single statement of clinical meaning that establishes it's own context. A clinical document is composed of a set of resources that include both human and computer readable portions. A human must attest to the accuracy of the human readable portion, and may authenticate and/or sign the entire whole</definition>
        <requirements>For document based framework</requirements>
        <rim></rim>
        <todo>Confidentiality? Language? Consent? Signatures</todo>
      </elementDefinition>
      <elementDefinition>
        <name>Document.id</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>id</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>the unique id of a clinical document</definition>
        <requirements>Each document needs a unique identifier so other documents and underlying infrastructure can reference it</requirements>
        <comments>must be globally unique. UUIDs are recommended</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.instant</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>instant</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>the document creation time, when the document first came into being. Where the CDA document is a transform from an original document in some other format, the ClinicalDocument.effectiveTime is the time the original document is created.</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.type</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>DocumentType</conceptDomain>
        <mustUnderstand>true</mustUnderstand>
        <definition>specifying the particular kind of document (e.g. History and Physical, Discharge Summary, Progress Note)</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.title</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>the title of the document</definition>
        <requirements></requirements>
        <comments>It's commonly the case that clinical documents do not have a title, and are collectively referred to by the display name of Document.type (e.g. a &quot;consultation&quot; or &quot;progress note&quot;). Where these display names are rendered to the clinician, or where the document has a unique title, the Document.title value should be used</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.setId</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Conditional</conformance>
        <condition>cannot have both setId and replaces</condition>
        <types>
          <type>id</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>Represents an identifier that is common across all document revisions</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.version</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>integer</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>used to version successive replacement documents</definition>
        <requirements></requirements>
        <comments>An integer value is recommended</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.replaces</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Conditional</conformance>
        <condition>cannot have both setId and replaces</condition>
        <types>
          <type>id</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>If this document replaces another</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.subject</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Resource(Patient|Group)</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>who the document is about</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.author</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>Author (contributed content to document)</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.author.time</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>dateTime</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>When authoring happened</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.author.party</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Resource(Person|Device)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>who/what authored the final document</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.attestor</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>a participant who has attested to the accuracy of the document</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.attestor.mode</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>code</type>
        </types>
        <conceptDomain>DocumentAuthenticationMode</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>The type of attestation the authenticator offers</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.attestor.time</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>dateTime</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>When document attested</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.attestor.party</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Resource(Person|Organisation)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>who attested the document</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.recipient</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Resource(Person|Organization)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>expected to receive a copy </definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.custodian</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Resource(Organization)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>org which maintains the document.</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.event</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Resource(Any)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>the main Act, such as a colonoscopy or an appendectomy, being documented</definition>
        <requirements></requirements>
        <comments>The event needs to be consistent with the type element, though can provide further information if desired</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.encounter</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Resource(Admission|InterestOfCare)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>context of the document</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.section</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>Document is broken into sections</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.section.type</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>DocumentSectionType</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>type of section (recommended)</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.section.instant</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>instant</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>the section creation time (sections are often re-used in several documents).</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.section.author</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>if section author different to document</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.section.author.time</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>dateTime</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>When authoring happened</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.section.author.party</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Resource(Person|Device)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>who/what authored the section</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.section.enterer</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Resource(Person|Device)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The person or device that performed the data entry leading to this section. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.section.subject</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Resource(Person|Group)</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>if section different to document</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.section.informant</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Resource(Person)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>provided information in section</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.section.content</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Conditional</conformance>
        <condition>a section must have content or one or more sections</condition>
        <types>
          <type>Resource(Any)</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>the actual content of the section</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.section.section</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Conditional</conformance>
        <condition>a section must have content or one or more sections</condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>nested Section</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.section.section.#</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>@Document.Section</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>contents as for a section</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.extensions</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>See Extensions</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Document.text</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Narrative</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition> </definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
    </elementDefinitions>
  </resourceDefinition>
  <resourceDefinition>
    <name>Message</name>
    <elementDefinitions>
      <elementDefinition>
        <name>Message</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>A message that contains FHIR resources</definition>
        <requirements>Many implementations are not prepared to use REST, and need a message based infrastructure</requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Message.id</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>id</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>Unique Id for this message</definition>
        <requirements>Each message needs a unique identifier so other messages and underlying infrastructure can reference it</requirements>
        <comments>must be unique within a channel, but should be globally unique. UUIDs are recommended</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Message.threadId</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>id</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Id of the thread - a series of messages that pertain to the same logical sequence, and are all identified by the same thread identifier</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Message.instant</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>instant</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>Instant the message was sent</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Message.event</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>code</type>
        </types>
        <conceptDomain>MessageEvent</conceptDomain>
        <mustUnderstand>true</mustUnderstand>
        <definition>Code that identifies the event this message represents, and connects it with the event definition in the FHIR specification</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Message.response</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>true</mustUnderstand>
        <definition>Information about the the message that this message is a response to - if it is a response</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Message.response.id</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>id</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>The id of the message that this a response to</definition>
        <requirements></requirements>
        <comments>this message must have the same threadId as the original message (including missing if the original message threadId was missing)</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Message.response.code</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>code</type>
        </types>
        <conceptDomain>ResponseCode</conceptDomain>
        <mustUnderstand>true</mustUnderstand>
        <definition>Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not</definition>
        <requirements></requirements>
        <comments>This is a generic response to the request message. Specific data for the response will be found in Message.data</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Message.response.duplicate</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>boolean</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>True if this is not the first response, because the request message has been received more than once</definition>
        <requirements></requirements>
        <comments>The request shouldn't be received more than once if reliable message delivery applies, but mostly it doesn't</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Message.source</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Resource(Device)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The source application from which this message originated</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Message.destination</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Resource(Device)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The destination application which the message is intended for</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Message.enterer</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Resource(Person|Device)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The person or device that performd the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions</definition>
        <requirements>Need to know for audit/traceback requirements</requirements>
        <comments>Usually only for the request, but can be used in a response</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Message.author</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Resource(Person|Device)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The logical author of the message - the person or device that decided it should happen. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions</definition>
        <requirements>Need to know for audit/traceback requirements</requirements>
        <comments>Usually only for the request, but can be used in a response</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Message.responsible</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Resource(Person|Organization)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The person or organization that accepts overall responsbility for the contents of the message. The implication is that the message event happened under the policies of the responsible party</definition>
        <requirements>Need to know for audit/traceback requirements</requirements>
        <comments>Usually only for the request, but can be used in a response</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Message.effective</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Interval(dateTime)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The effective time - the real world time of the even that the message represents. Usually this is just a starting time, but some message events also have an end time (do x for period y)</definition>
        <requirements>Need to know for understanding the content of the message</requirements>
        <comments>Usually only for the request, but can be used in a response</comments>
        <rim></rim>
        <todo>Grahame thinks this is not 80/20. Also, that it reall should be domain modeled, not tucked away here</todo>
      </elementDefinition>
      <elementDefinition>
        <name>Message.reason</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>EventReason</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>The cause of the event - a reason for why this message is being sent</definition>
        <requirements>Need to be able to track why resources are being changed and report in the audit log / history of the resource</requirements>
        <rim>ControlAct.reasonCode</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Message.data</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Conditional</conformance>
        <condition>Mandatory unless the message is a response, in which case the element is optional</condition>
        <types>
          <type>Resource(Any)</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>The actual data of the message - a reference to the focus class of the message. </definition>
        <requirements>Every message event is about actual data, a single resource, that is identified in the definition of the event, and perhaps some or all linked resources</requirements>
        <comments>The data is defined where the transaction type is defined. The transaction data is always aggregated with the transaction resource</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Message.extensions</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>See Extensions</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Message.text</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Narrative</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition> </definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
    </elementDefinitions>
  </resourceDefinition>
  <resourceDefinition>
    <name>Animal</name>
    <elementDefinitions>
      <elementDefinition>
        <name>Animal</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>An animal that has relevance to the care process -usually this is for animals that are patients.</definition>
        <requirements>Need to be able to track animals - vetinary medicine is an active user of HL7 standards</requirements>
        <comments>Animals differ because you need to track species and strain, and also different kind of relationships - owners</comments>
        <rim>NonPersonLivingSubject(classCode=ANM, determinerCode=INST)</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Animal.id</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>id</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Master Resource Id, always first in all resources</definition>
        <requirements></requirements>
        <rim></rim>
        <todo>.id(scope=OBJ)</todo>
      </elementDefinition>
      <elementDefinition>
        <name>Animal.identifier</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>HumanId</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>Identifier for the animal that is used to identify the person across multiple disparate systems and also for face to face identification of the person</definition>
        <requirements>Animals are known by a variety of ids. Some institutions maintain several, and most collect identifiers for exchange with other organizations concerning the animal</requirements>
        <rim>.scopes[Role](classCode=IDENT)</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Animal.name</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>HumanName</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>A name associated with the animal. The use code maiden does not apply.</definition>
        <requirements>Some animals have names, which are assigned by humans for human reasons, and follow human naming patterns</requirements>
        <rim>.name</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Animal.dob</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>dateTime</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>The birth date for the animal</definition>
        <requirements>Age of the animal drives many clinical processes.</requirements>
        <rim>.dateOfBirth</rim>
        <todo>RIM change to support human date (time only - but is this needed in this context?)</todo>
      </elementDefinition>
      <elementDefinition>
        <name>Animal.species</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>AnimalSpecies</conceptDomain>
        <mustUnderstand>true</mustUnderstand>
        <definition>Species for the animal</definition>
        <requirements>Need to know what kind of animal</requirements>
        <rim>.code</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Animal.strain</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>AnimalStrain</conceptDomain>
        <mustUnderstand>true</mustUnderstand>
        <definition>Strain for the animal</definition>
        <requirements>May need to know the specific kind within the species</requirements>
        <rim>.strainText</rim>
        <todo>Not sure why this is ED in the RIM.  Should probably change to SC.</todo>
      </elementDefinition>
      <elementDefinition>
        <name>Animal.gender</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>AnimalGender</conceptDomain>
        <mustUnderstand>true</mustUnderstand>
        <definition>Gender for the Animal</definition>
        <requirements>For managing the animal</requirements>
        <comments>Note that some animals have additional gender not encountered in humans?</comments>
        <rim>.administrativeGenderCode</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Animal.relatedEntity</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>Kin, owner, care giver etc</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Animal.relatedEntity.id</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>HumanId</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Identifier for the entity</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Animal.relatedEntity.role</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>AnimalRelationship</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>Type of relationship</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Animal.relatedEntity.name</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>HumanName</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Name of the related entity</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Animal.relatedEntity.address</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>Address</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>An address (usually human, but may be kin)</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Animal.relatedEntity.contact</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>Contact</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Contact details (usually for humans)</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Animal.extensions</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>See Extensions</definition>
        <requirements></requirements>
        <rim>[varies]</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Animal.text</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Narrative</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition> </definition>
        <requirements></requirements>
        <rim></rim>
        <todo>.text</todo>
      </elementDefinition>
    </elementDefinitions>
  </resourceDefinition>
  <resourceDefinition>
    <name>Agent</name>
    <elementDefinitions>
      <elementDefinition>
        <name>Agent</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>A person who represents an organisation, and is authorised to perform actions on it's behalf</definition>
        <requirements>Need to track doctors, staff, locums etc for both healthcare providers, funders, etc.</requirements>
        <rim>Role</rim>
        <v2>PRD (as one example)</v2>
      </elementDefinition>
      <elementDefinition>
        <name>Agent.id</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>id</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Master Resource Id, always first in all resources</definition>
        <requirements></requirements>
        <rim>.id(scope=OBJ)</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Agent.person</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Resource(Person)</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>The person who acts as the agent</definition>
        <requirements>Need to be able to track the person who represents the organisation separately</requirements>
        <rim></rim>
        <v2>PRD-2</v2>
      </elementDefinition>
      <elementDefinition>
        <name>Agent.organization</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Resource(Organization)</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>The organisation that is being represented</definition>
        <requirements>Need to be able to track the represented organisation separately</requirements>
        <rim></rim>
        <v2>PRD-10 (-> 14)</v2>
      </elementDefinition>
      <elementDefinition>
        <name>Agent.role</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>AgentRole</conceptDomain>
        <mustUnderstand>true</mustUnderstand>
        <definition>The way in which the person represents the organisation - what role do they have?</definition>
        <requirements>Need to know what authority the agent has - what can they do?</requirements>
        <comments>A person may have more than one role. At least one role is required - why have an agent who isn't actually an agent?</comments>
        <rim></rim>
        <v2>PRD-1</v2>
      </elementDefinition>
      <elementDefinition>
        <name>Agent.period</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Interval(date)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The time period during which the agent was/is authorised to represent the organisation.</definition>
        <requirements>Agencies are often for a limited period of time, and can be revoked. Even after the agencies is revoked, the fact that it existed must still be recorded</requirements>
        <rim></rim>
        <v2>PRD-8/9</v2>
      </elementDefinition>
      <elementDefinition>
        <name>Agent.identifier</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>HumanId</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>An identifier that applies to this person in this role</definition>
        <requirements>Often, specific identifies are assigned for the agent</requirements>
        <comments>The identifier changes when a new/different person steps into the same role</comments>
        <rim></rim>
        <v2>PRD-7</v2>
      </elementDefinition>
      <elementDefinition>
        <name>Agent.address</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>Address</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>A postal address for this person playing this role</definition>
        <requirements></requirements>
        <comments>i.e. the address is not their personal address. For many agents, this is the same as their work address</comments>
        <rim></rim>
        <v2>PRD-3</v2>
        <todo>What about place? (PRD-4)</todo>
      </elementDefinition>
      <elementDefinition>
        <name>Agent.contact</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>Contact</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>A contact detail address for this person playing this role</definition>
        <requirements></requirements>
        <comments>i.e. the contact is not their personal contact. For many agents, this is the same as their work contacts. Note that a person may choose to use a personal mobile phone (for instance) for their contact in a given role - in this case, the contact detail will be repeated in the agent resource</comments>
        <rim></rim>
        <v2>PRD-5</v2>
      </elementDefinition>
      <elementDefinition>
        <name>Agent.extensions</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>See Extensions</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Agent.text</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Narrative</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Text summary of the agent, for human interpretation</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
    </elementDefinitions>
  </resourceDefinition>
  <resourceDefinition>
    <name>MessageConformance</name>
    <elementDefinitions>
      <elementDefinition>
        <name>MessageConformance</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>A conformance statement about how an application uses FHIR messaging</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.id</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>id</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Globally unique Conformance Statement Id (Must be a UUID)</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.date</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>dateTime</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Date that the conformance statement is published</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.publisher</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>The organization that publishes this conformance statement</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.publisher.name</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Name of Organization</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.publisher.address</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Address</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Address of Organization</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.publisher.contact</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Contact</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Contacts for Organization</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.software</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>The software that is covered by this conformance statement</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.software.name</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Name software is known by</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.software.version</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Version covered by this statement</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.software.releaseDate</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>dateTime</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Date this version released</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.profile</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>uri</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Additional other profiles that apply to this conformance statement.</definition>
        <requirements></requirements>
        <comments> Generally these profiles make  constraints on the bindings of concept domains / value sets</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.event</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>An event supported by the application</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.event.code</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>code</type>
        </types>
        <conceptDomain>MessageEvent</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>The code for the event</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.event.resource</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Conditional</conformance>
        <condition>A resource type is required if the event declaration has multiple focal resources</condition>
        <types>
          <type>code</type>
        </types>
        <conceptDomain>ResourceType</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>The focal resource for the event</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.event.mode</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>code</type>
        </types>
        <conceptDomain>MessageConformanceEventMode</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>The mode of this event declaration - whether application is sender or receiver</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.event.request</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>Information about the request for this event</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.event.request.resource</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Constraint</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Constraint on a resource used in the event request</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.event.response</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>Information about the response for this event</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.event.response.resource</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Constraint</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Constraint on a resource used in the event response</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.extensions</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>See Extensions</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>MessageConformance.text</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Narrative</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition> </definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
    </elementDefinitions>
  </resourceDefinition>
  <resourceDefinition>
    <name>Organization</name>
    <elementDefinitions>
      <elementDefinition>
        <name>Organization</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>For any organization/institution/government department that has relevance to the care process</definition>
        <requirements></requirements>
        <rim>Organization(classCode=ORG, determinerCode=INST)</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.id</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>id</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Master Resource Id, always first in all resources</definition>
        <requirements></requirements>
        <rim>.id(scope=OBJ)</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.identifier</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>HumanId</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>Identifier for the organization that is used to identify the organization across multiple disparate systems</definition>
        <requirements>Organizations are known by a variety of ids. Some institutions maintain several, and most collect identifiers for exchange with other organizations concerning the organization.</requirements>
        <rim>.scopes[Role](classCode=IDENT)</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.name</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <mustUnderstand>true</mustUnderstand>
        <definition>A name associated with the organization</definition>
        <requirements>Need to use the name as the label of the organization</requirements>
        <comments>Don't use HumanName since that has many non-organization things in it</comments>
        <rim>.name</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.name.value</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>The actual name of the organization</definition>
        <requirements></requirements>
        <rim>.part[1](type=NULL,qualifier=NULL).value</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.name.period</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Interval(date)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The period that this name was in use by the organization</definition>
        <requirements>Organizations have a habit of renaming themselves, and the current and past names are required</requirements>
        <rim>.validTime</rim>
        <todo>This is 80%??</todo>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.address</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>Address</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>An address for the organization</definition>
        <requirements>May need to keep track of the organizations addresses for contacting, billing or reporting requirements</requirements>
        <comments>Organization may have multiple addresses with different uses or applicable periods. The use code home is not to be used</comments>
        <rim>.address</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.contact</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>Contact</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>A contact detail for the organization</definition>
        <requirements>Human contact for the organization</requirements>
        <comments>The use code home is not to be used. Note that these contacts are not the contact details of people who are employed by or represent the organization, but official contacts for the organization itself</comments>
        <rim>.telecom</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.code</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>OrganisationType</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>The kind of organization that this is</definition>
        <requirements>Need to be able to track the kind of organization that this is - different organization types have different uses</requirements>
        <comments>Organizations can be corporations, wards, sections, clinical teams, government departments, etc. Note that code is generally a classifier of the type of organization; in many applications, codes are used to identity a particular organization (say, ward) as opposed to another of the same type - these are identifiers, not codes</comments>
        <rim>.code</rim>
        <todo>Name code is too RIM-like.  Should be typeCode or type.</todo>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.industryCode</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>Industry</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>The industry that this organization is involved in</definition>
        <requirements>For some organization types, an industry code is required for statistical reporting requirements</requirements>
        <rim>.standardIndustryClassCode</rim>
        <todo>Is this really in the 80%??</todo>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.accreditation</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>The qualifications a person has, including format educational achievements, accreditations, and current certifications. All these qualifications may be used to determine what roles a person may play in a healthcare environment</definition>
        <requirements>For many persons in healthcare, it is necessary to track the qualifications a person has - formal.</requirements>
        <rim>.plays[Role](classCode='QUAL')</rim>
        <todo>Not sure if qualified &amp; accredited are the same.  Could potentially propose a new classCode</todo>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.accreditation.id</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Identifier</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The identifier of the accreditation</definition>
        <requirements>Allows a link back to a accreditation registry, if one exists</requirements>
        <rim>.identifier</rim>
        <todo>Not a humanId?</todo>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.accreditation.code</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>Accreditation</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>The type of the accreditation</definition>
        <requirements>commonly used to determine the roles an  organization may perform</requirements>
        <rim>.code</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.accreditation.institution</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Resource(Organization)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The organization that confered/confers the accreditation</definition>
        <requirements>May determine the significance of the qualification, and allows a link back to a qualification registry, if one exists</requirements>
        <rim>.scopedBy[Organization]</rim>
        <todo>Do we need jurisdiction as well?  (The jurisdiction is often more relevant than the accrediting org.)</todo>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.accreditation.period</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Interval(date)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The period for which the accreditation is held</definition>
        <requirements>Most accreditations are only conferred for a limited time period and must be re-acquired or forfeited</requirements>
        <rim>.effectiveTime[IVL&lt;TS>]</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.relatedOrganization</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>Other organizations who are related to this person. The relationship might be one of several types: sub- or super- orgnizations (i.e. ward in a hospital, owning corporation of a hospital) or partner organizations (i.e. the operating corporation for a hospital)</definition>
        <requirements>Need to be able to track many kinds of organizational relationships and use to determine roles and mediate workflows</requirements>
        <rim></rim>
        <todo>There's no reason why this wouldn't point to another resource.  Will map when updated accordingly.</todo>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.relatedOrganization.id</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>HumanId</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Identifier the related organization - may be a full link to an Organization resource, or some other kind of identifier</definition>
        <requirements>may have an identifier for the organization that can be used to source contact details</requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.relatedOrganization.code</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>OrganizationRelationship</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>Code that specifies how this organization is related to the subject. A code is required.</definition>
        <requirements>Need to know how the organization is related</requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.relatedOrganization.name</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>A name should be specified for the related organization</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.relatedOrganization.address</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>Address</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Postal addresses may be provided for the related organization</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.relatedOrganization.contact</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>Contact</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Contact details (phone, email etc) may be provided for the related organization</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.relatedOrganization.period</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Interval(date)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The period during which the organizations were related in this fashion</definition>
        <requirements>Organization relationships are changing all the time</requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.extensions</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>See Extensions</definition>
        <requirements></requirements>
        <rim>[varies]</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Organization.text</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>Narrative</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Text summary of organization, fall back for human interpretation</definition>
        <requirements></requirements>
        <rim></rim>
        <todo>.text</todo>
      </elementDefinition>
    </elementDefinitions>
  </resourceDefinition>
  <resourceDefinition>
    <name>Prescription</name>
    <elementDefinitions>
      <elementDefinition>
        <name>Prescription</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>Directions provided by a prescribing practitioner for a specific medication to be administered to an individual</definition>
        <requirements>Used to record details about the prescribed medication, administration schedule, dosage and dispensing.</requirements>
        <rim>SubstanceAdministration</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.id</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>id</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Master Resource Id, always first in all resources</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.identifier</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>HumanId</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>A identifier used in an external system and associated with this medication</definition>
        <requirements>Prescriptions are almost always assigned specific numerical identifiers</requirements>
        <rim>.id</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.status</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>code</type>
        </types>
        <conceptDomain>PrescriptionStatus</conceptDomain>
        <mustUnderstand>true</mustUnderstand>
        <definition>Actual status of the prescription</definition>
        <requirements></requirements>
        <rim>.statusCode</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.patient</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Resource(Patient)</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>The patient the prescription is prescribing medicine for</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.prescriber</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Resource(Agent)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The clinician or doctor prescribing the medication</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.prescribed</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>dateTime</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Date/time on which the prescription was written</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.dispense</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>Details of the dispense as requested by the prescriber</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.dispense.repeats</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>integer</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Requested number of repeats</definition>
        <requirements></requirements>
        <comments>Default is &quot;1&quot;</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.dispense.quantity</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Quantity</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Requested quantity per repeat</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.dispense.dispenser</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Resource(Agent|Organization)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Person to fullfil the requested dispense</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.medicine</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>The one single medicatine, vaccine or therapeutic good prescribed in this prescription.</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.medicine.productCode</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Conditional</conformance>
        <condition>Can only be left empty if it cannot be coded</condition>
        <types>
          <type>Coding</type>
        </types>
        <conceptDomain>MedicationKind</conceptDomain>
        <mustUnderstand>true</mustUnderstand>
        <definition>Coded representation of medicine</definition>
        <requirements></requirements>
        <rim></rim>
        <todo>Conformance should be &quot;Required&quot;, not &quot;Optional&quot;</todo>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.medicine.description</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Conditional</conformance>
        <condition>Mandatory when medication cannot be coded</condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Textual description of medicine, including strength and ingredients</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.medicine.activeIngredient</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>The substance in the medication formulation that is pharmaceutically active and is responsible for the medication's therapeutic effect</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.medicine.activeIngredient.productCode</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Coding</type>
        </types>
        <conceptDomain>MedicationKind</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>Coded representation of active ingredient</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.medicine.activeIngredient.quantity</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Ratio</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Quantity of active ingredient expressed in relation to the whole of the prepared medicine</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.medicine.inactiveIngredient</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>Ingredients in the medication that are not active</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.medicine.inactiveIngredient.productCode</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Coding</type>
        </types>
        <conceptDomain>MedicationKind</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>Coded representation of the inactive ingredient</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.medicine.inactiveIngredient.quantity</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Ratio</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Quantity of inactive ingredient expressed in relation to the whole of the prepared medicine</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.administrationRequest</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>Instructions for the use of the medication. Includes details about the timing schedule, dosis amounts and additional usage instructions.</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.administrationRequest.description</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Textual description of the use of the medication.</definition>
        <requirements></requirements>
        <comments>Can contain more details than the structured information under this element, but must be in accordance with it. May not contain information about the medicine itself.</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.administrationRequest.totalPeriodicDosis</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Ratio</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Total dose per day/week or other period when more specific information is missing or cannot be expressed using the timing specifications.</definition>
        <requirements>It should be possible, as a last resort, to specify e.g. a daily dosis, even if more specific details are unknown</requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.administrationRequest.start</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Conditional</conformance>
        <condition>Duration is given OR (Start is given AND (Duration OR End is given)) OR (Duration, Start and End are not given)</condition>
        <types>
          <type>dateTime</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>First moment on which medication should be taken</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.administrationRequest.end</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Conditional</conformance>
        <condition>Duration is given OR (Start is given AND (Duration OR End is given)) OR (Duration, Start and End are not given)</condition>
        <types>
          <type>dateTime</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Last moment on which medication should be taken</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.administrationRequest.duration</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Conditional</conformance>
        <condition>Duration is given OR (Start is given AND (Duration OR End is given)) OR (Duration, Start and End are not given)</condition>
        <types>
          <type>Quantity</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Total duration of administration</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.administrationRequest.numberOfAdministrations</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Conditional</conformance>
        <condition>Can be given instead of Duration, as specified above</condition>
        <types>
          <type>integer</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Maximum number of separate administrations before the instruction ends.</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.administrationRequest.dosageInstruction</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>Specification of dose and schedule for administration</definition>
        <requirements></requirements>
        <comments>The can be >1 dosage instruction to support administration of varying doses, resulting in 1 instruction per fixed dose.</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.administrationRequest.dosageInstruction.precondition</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>AdministrationPrecondition</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>Precondition for starting the administration specified in this instruction</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.administrationRequest.dosageInstruction.prn</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>code</type>
        </types>
        <conceptDomain>BooleanYesNo</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>Pro re nate, &quot;If necessary&quot;: Specifies whether administration depens on the state and symptoms of the patient</definition>
        <requirements></requirements>
        <comments>Default is &quot;false&quot;</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.administrationRequest.dosageInstruction.additionalInstruction</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>AdministrationInstruction</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>Additional details to guide administration. Especially relevant for medicine administered by patient</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.administrationRequest.dosageInstruction.route</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>AdministrationRoute</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>Route of administration (oral, nasal, intravenous)</definition>
        <requirements></requirements>
        <comments>Since the route of administration is generally determined by the choice of medication, it is not necessary to provide a value in route</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.administrationRequest.dosageInstruction.dose[x]</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Quantity</type>
          <type>Interval(Quantity)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Dose per administration, expressed in units of the (prepared) product</definition>
        <requirements></requirements>
        <comments>Dose may be an interval, &quot;2-3 tablets per 4 hours&quot;</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.administrationRequest.dosageInstruction.rate</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Quantity</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Flow-rate for IV</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.administrationRequest.dosageInstruction.schedule</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Schedule</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Schedule for administration. If multiple are given, they are considered to be active in parrallel</definition>
        <requirements></requirements>
        <comments>Will submit proposal to change Schedule type.</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.reason</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>PrescriptionReason</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>Diagnosis which is the reason for prescribing this medicine</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.extensions</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>See Extensions</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Prescription.text</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Narrative</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Text summary of the prescription, for human interpretation</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
    </elementDefinitions>
  </resourceDefinition>
  <resourceDefinition>
    <name>Profile</name>
    <elementDefinitions>
      <elementDefinition>
        <name>Profile</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>A Resource Profile - a statement of constraint on one or more Resources and/or Concept Domains</definition>
        <requirements></requirements>
        <comments>Often called a clinical template</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.id</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>id</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>Globally unique Profile Id (Must be a UUID)</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.name</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>A free text natural language name identifying the Template.</definition>
        <requirements></requirements>
        <comments>Not expected to be unique</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.author</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>Details of the author who accepts responsibility for publishing the profile</definition>
        <requirements></requirements>
        <comments>Usually an organisation, but may be an individual</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.author.name</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The name of the author</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.author.reference</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>uri</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Reference to the author to assist a user in finding and communicating with the author</definition>
        <requirements></requirements>
        <comments>may be a web site, an email address, a telephone number</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.intention</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>A free text natural language description of the intent and scope of the Template. The purpose is to provide the author’s initial intent for the Template in the language specified below.</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.code</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Coding</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>A set of terms from a controlled reference terminology that may be used to assist with indexing and searching of templates</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.description</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>A free text natural language description of the Template. Generally, this field should be used for things such as goals, variable lists, instructions for clinical use and interpretation, literature, examples from paper world, mapping from natural language to HL7 and the model itself, etc</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.evidence</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>uri</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>A description, reference or link to a published medical knowledge that was used in the definition of this Template</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.comments</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>A statement regarding when this Template should not be used, or may be used erroneously. To define roles where the Template should not be used, or should be used with care. This field is used to expand in detail on the iIntention</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.status</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>code</type>
        </types>
        <conceptDomain>ResourceProfileStatus</conceptDomain>
        <mustUnderstand>true</mustUnderstand>
        <definition>draft | testing | production | withdrawn | superceded</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.date</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>dateTime</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The date that the current value for publicationStatus was applied to the Template</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.endorser</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>A list of bodies who have reviewed the Template for clinical accuracy and relevance, and endorsed it for use.</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.endorser.name</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The name of the endorsing body</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.endorser.reference</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>uri</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Reference to the author to assist a user in finding and communicating with the endorsing body</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.changes</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Conditional</conformance>
        <condition>This field must be populated if the template is not the first version.</condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>A free text description describing the changes in this version of the profile as compared to the previous version. </definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.supercedes</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>uri</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>A template that is supercded by this template (maybe a  previous version)</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.profile</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>uri</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Additional other profiles that apply to this conformance statement.</definition>
        <requirements></requirements>
        <comments> Generally these profiles make  constraints on the bindings of concept domains / value sets</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.resource</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Constraint</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Resource Type with constraints</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.binding</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition></definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.binding.name</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The name of the concept domain that this profile is declaring a constraint on</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.binding.type</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>code</type>
        </types>
        <conceptDomain>ConceptBindingType</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>The form of the binding</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.binding.details</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Conditional</conformance>
        <condition>May be required depending on the value of binding.type</condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>extra details - see notes</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.binding.reference</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Conditional</conformance>
        <condition>May be required depending on the value of binding.type</condition>
        <types>
          <type>uri</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>source of binding content</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.binding.code</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Conditional</conformance>
        <condition>May be required depending on the value of binding.type</condition>
        <types>
          <type>Coding</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>enumerated codes that are the binding</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.extensions</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>See Extensions</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Profile.text</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Narrative</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Text summary of resource profile for human interpretation</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
    </elementDefinitions>
  </resourceDefinition>
  <resourceDefinition>
    <name>Patient</name>
    <elementDefinitions>
      <elementDefinition>
        <name>Patient</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>A patient is a person or animal that is receiving care</definition>
        <requirements>Tracking patient is the center of the healthcare process</requirements>
        <rim>Patient</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Patient.id</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>id</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Master Resource Id, always first in all resources</definition>
        <requirements></requirements>
        <rim></rim>
        <todo>.id(scope=OBJ)</todo>
      </elementDefinition>
      <elementDefinition>
        <name>Patient.link</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Resource(Patient)</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>A linked patient record is a record that concerns the same patient. Records are linked after it is realised that at least one was created in error.</definition>
        <requirements>Due to the clerical errors associated with the difficulties of identifying humans consistently, duplicate patient records are frequently created in error</requirements>
        <comments>More then two patient records may be linked. Note that there is a special transaction for linking patient records in the RESTful context, as record linking consistency must be maintained</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Patient.active</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>boolean</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>Whether the patient record is in use, or has been removed from active use</definition>
        <requirements>Need to be able to mark a patient record as not to be used because it was created in error</requirements>
        <comments>If a record is inactive, and linked to an active record, then future patient/person/record updates should occur on the other patient</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Patient.person</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Conditional</conformance>
        <condition>Either an animal or a person must be provided, but not both</condition>
        <types>
          <type>Resource(Person)</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>The person that this patient record is about</definition>
        <requirements>Need to link this patient record to a known and identifiable person (or animal)</requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Patient.animal</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Conditional</conformance>
        <condition>Either an animal or a person must be provided, but not both</condition>
        <types>
          <type>Resource(Animal)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The animal that this patient record is about</definition>
        <requirements>Need to link this patient record to a known and identifiable animal (or person)</requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Patient.provider</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Resource(Organization)</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>The provider for whom this is a patient record</definition>
        <requirements>Need to know who recognises this patient record</requirements>
        <rim></rim>
        <todo>But is thie same as institution above?</todo>
      </elementDefinition>
      <elementDefinition>
        <name>Patient.identifier</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>HumanId</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>An identifier that applies to this person as a patient</definition>
        <requirements>Patients are almos always assigned specific numerical identifiers</requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Patient.diet</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>PatientDiet</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>Dietary restrictions for the patient</definition>
        <requirements>Track patients reported dietary restrictions to help with catering requirements</requirements>
        <comments>not for specifying medical diets, but for casual dietary restrictions such as vegetarian, diary-free, nut-free, etc</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Patient.confidentiality</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>PatientConfidentiality</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>Confidentiality of the patient records</definition>
        <requirements>Need to be able to track which patient records are particularly sensitive</requirements>
        <comments>Confidentiality tracking also occurs at more detailed points in the medical record</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Patient.recordLocation</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>PaperRecordLocation</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>The location of the paper record for the patient, if there is one</definition>
        <requirements>Track old paper records where these are still in use</requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Patient.extensions</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>See Extensions</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Patient.text</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Narrative</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Text summary of person, for human interpretation</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
    </elementDefinitions>
  </resourceDefinition>
  <resourceDefinition>
    <name>Person</name>
    <elementDefinitions>
      <elementDefinition>
        <name>Person</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>A person who is involved in the healthcare process</definition>
        <requirements>Need to track persons across multiple roles</requirements>
        <rim>Person(classCode=PSN, determinerCode=INST)</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Person.id</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>id</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Master Resource Id, always first in all resources</definition>
        <requirements></requirements>
        <rim>.id(scope=OBJ)</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Person.identifier</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>HumanId</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>Identifier for the person that is used to identify the person across multiple disparate systems and also for face to face identification of the person</definition>
        <requirements>People are known by a variety of ids. Some institutions maintain several, and most collect identifiers for exchange with other organizations concerning the patient.</requirements>
        <rim>.plays:Role(classCode='IDENT').id</rim>
        <v2>PID-3</v2>
      </elementDefinition>
      <elementDefinition>
        <name>Person.name</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>HumanName</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>A name associated with the person</definition>
        <requirements>Need to be able to track the person by multiple names</requirements>
        <comments>Person may have multiple names with different uses or applicable periods</comments>
        <rim>.name</rim>
        <v2>PID-5, PID-9</v2>
      </elementDefinition>
      <elementDefinition>
        <name>Person.address</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>Address</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>An address for the person</definition>
        <requirements>May need to keep track of persons addresses for contacting, billing or reporting requirements and also to help with identification</requirements>
        <comments>Person may have multiple addresses with different uses or applicable periods</comments>
        <rim>.addr</rim>
        <v2>PID-11</v2>
      </elementDefinition>
      <elementDefinition>
        <name>Person.contact</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>Contact</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>A contact detail for the person</definition>
        <requirements>May need to have options for contacting the person urgently, and also to help with identification</requirements>
        <comments>Person may have multiple contacts with different uses or applicable periods</comments>
        <rim>.telecom</rim>
        <v2>PID-13, PID-14</v2>
      </elementDefinition>
      <elementDefinition>
        <name>Person.dob</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>dateTime</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>The birth date for the person</definition>
        <requirements>Age of person drives many clinical processes.</requirements>
        <comments>At least a estimated year should be provided as a guess if the real dob is unknown</comments>
        <rim>.birthTime</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Person.gender</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>AdministrativeGender</conceptDomain>
        <mustUnderstand>true</mustUnderstand>
        <definition>Administrative Gender</definition>
        <requirements>Patient Identification, and also for managing the patient</requirements>
        <rim>.administrativeGender</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Person.religion</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>Religion</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>The religious denomination to which a person professes affiliation</definition>
        <requirements>The religion of a person may influence ancilliary processes around the provision of healthcare, and may provide general advice with regard to diet, etc</requirements>
        <comments>Not all people have a formal religious affiliation</comments>
        <rim>.religiousAffiliationCode</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Person.race</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>Race</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>blah balh</definition>
        <requirements>This is added because many jurisdictions insisted on it</requirements>
        <comments>Some places do not use this!</comments>
        <rim>.raceCode</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Person.qualification</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>The qualifications a person has, including formal educational achievements, accreditations, and current certifications. All these qualifications may be used to determine what roles a person may play in a healthcare environment</definition>
        <requirements>For many persons in healthcare, it is necessary to track the qualifications a person has - formal.</requirements>
        <rim>.plays:Role(classCode='QUAL')</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Person.qualification.id</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Identifier</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The identifier of a qualification</definition>
        <requirements>Allows a link back to a qualification registry, if one exists</requirements>
        <rim>.identifier</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Person.qualification.code</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>Qualifications</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>The type of the qualification</definition>
        <requirements>commonly used to determine the roles a person may play</requirements>
        <rim>.code</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Person.qualification.institution</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Resource(Organization)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The organisation that confered/confers the qualification</definition>
        <requirements>May determine the significance of the qualification, and allows a link back to a qualification registry, if one exists</requirements>
        <rim>.scopedBy:Organization</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Person.qualification.period</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Interval(date)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The period for which a qualification is held</definition>
        <requirements>Some qualifications are only conferred for a limited time period and must be re-acquired or forfeited</requirements>
        <comments>Formal degrees may have a known start date, but no end date</comments>
        <rim>.effectiveTime:IVL_TS</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Person.language</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>A language spoken by the person, with proficiency</definition>
        <requirements>If a patient does not speak the local language, interpreters may be required, so languages spoken and profiency is an important things to keep track of both for patient and other persons of interest</requirements>
        <comments>If no language is specified, this *implies* that the default local language is spoken</comments>
        <rim>.LanguageCommunicationCode</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Person.language.code</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>code</type>
        </types>
        <conceptDomain>Language</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>A code that identifies the language</definition>
        <requirements></requirements>
        <comments>So just ISO 639-3?  Not allowing ENG-CA or something?</comments>
        <rim>.languageCode</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Person.language.use</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>code</type>
        </types>
        <conceptDomain>LanguageUse</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>A code the describes how well the language is spoken</definition>
        <requirements></requirements>
        <comments>No differentiation is made between spoken and written functionality here</comments>
        <rim>.proficiencyLanguageCode</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Person.relatedPerson</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>Other persons who are related to this person. The relationship might be one of several types: kin (familial or marital), financial or legal (such as guardian), biological (e.g. donor, donation-recipient) or casual (i.e. friend).</definition>
        <requirements>Need to be able to track next of kin, or other people who may need to contacted/consulting regarding the patient's healthcare status or who might otherwise influence their treatment</requirements>
        <rim>.plays:Role(classCode='REL')</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Person.relatedPerson.id</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>HumanId</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Identifier the related person - may be a full link to a Person resource, or some other kind of identifier</definition>
        <requirements>may have an identifier for the person that can be used to source contact details</requirements>
        <rim>.scopedBy:Person.identifier</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Person.relatedPerson.role</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>PersonRelationship</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>Code that specifies how this person is related to the subject. A code is required.</definition>
        <requirements>Need to know how the person is related</requirements>
        <rim>.code</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Person.relatedPerson.name</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>HumanName</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>A name should be specified for the related person</definition>
        <requirements></requirements>
        <rim>.scopedBy:Person.name</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Person.relatedPerson.contact</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>Contact</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Contact details (phone, email etc) should be provided for the person</definition>
        <requirements></requirements>
        <rim>.scopedBy:Person.telecom</rim>
      </elementDefinition>
      <elementDefinition>
        <name>Person.extensions</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>See Extensions</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>Person.text</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Narrative</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Text summary of person, for human interpretation</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
    </elementDefinitions>
  </resourceDefinition>
  <resourceDefinition>
    <name>LabReport</name>
    <elementDefinitions>
      <elementDefinition>
        <name>LabReport</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>The findings and interpretation of pathology tests performed on tissues and body fluids. This is typically done in a laboratory but may be done in other environments such as at the point of care</definition>
        <requirements>Use to record any pathology test result, including the result of a test on a specimen taken as part of a composite procedure or operation.</requirements>
        <comments>Not to be used for reporting on non-pathology test results e.g. diagnostic imaging, ECG or respiratory function tests. Not to be used to represent an entire cumulative report. This Pathology test result archetype represents only one of the result sets that is usually viewed as a vertical in a cumulative test report. A cumulative report is a view that is constructed from the results represented by multiple OBSERVATION archetypes. This archetype is suitable for representation of general pathology test results, but not intended to cover full synoptic reports. For these, additional resources are required to represent the data properly</comments>
        <rim>Observation[isNormalAct() and subsumesCode(&quot;ActClass#OBS&quot;, classCode) and moodCode=&quot;EVN&quot; and domainMember(&quot;LabObservationType&quot;, code)]</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.id</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>id</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Master Resource Id, always first in all resources</definition>
        <requirements></requirements>
        <rim>unique(./id[isNormalDatatype() and displayable=&quot;false&quot; and scope=&quot;OBJ&quot; and reliability=&quot;ISS&quot;])</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.status</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>code</type>
        </types>
        <conceptDomain>LabReportStatus</conceptDomain>
        <mustUnderstand>true</mustUnderstand>
        <definition>The status of the pathology test result as a whole</definition>
        <requirements>Labs routinely issue provisional/incomplete reports, or withdraw previously released reports</requirements>
        <rim>registered: ./statusCode[isNormalDatatype()]=&quot;new&quot;;

interim: ./statusCode[isNormalDatatype()]=&quot;active&quot;;

final: ./statusCode[isNormalDatatype()]=&quot;complete&quot; and not(./inboundRelationship[typeCode=&quot;SUBJ&quot; and isNormalActRelationship()]/source[subsumesCode(&quot;ActClass#CACT&quot;) and moodCode=&quot;EVN&quot; and domainMember(&quot;ReviseLabOrder&quot;, code) and isNormalAct()]);

amended: ./statusCode[isNormalDatatype()]=&quot;complete&quot; and ./inboundRelationship[typeCode=&quot;SUBJ&quot; and isNormalActRelationship()]/source[subsumesCode(&quot;ActClass#CACT&quot;) and moodCode=&quot;EVN&quot; and domainMember(&quot;ReviseLabOrder&quot;, code) and isNormalAct() and statusCode=&quot;completed&quot;];

cancelled: 
./statusCode[isNormalDatatype()]=&quot;aborted&quot;;

withdrawn: ./statusCode[isNormalDatatype()]=&quot;obsolete&quot;</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.issued</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>instant</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>The date and/or time that the result was issued from the source for the recorded ‘Test result status</definition>
        <requirements>Clinicians need to be able to check the date that the report was released</requirements>
        <comments>May be different from LabReport.updated, because that is the status of this record, not the report the record is about</comments>
        <rim>firstOf(unique(./participation[isHighest(priorityCode) and typeCode=&quot;VRF&quot; and isNormalParticipation()]/time[type=&quot;TS&quot;]), 
unique(./participation[isHighest(priorityCode) and typeCode=&quot;AUT&quot; and isNormalParticipation()]/time[type=&quot;TS&quot;]))</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.patient</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Resource(Patient)</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>The patient about who the report is about</definition>
        <requirements>Must know the patient context</requirements>
        <rim>unique(./participation[isHighest(priorityCode) and typeCode=&quot;SBJ&quot; and isNormalParticipation()]/role[classCode=&quot;PAT&quot;])</rim>
        <todo>need to check the wording -is it about, upon, for?</todo>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.admission</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Resource(Admission)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The admission that this diagnostic investigation is associated with</definition>
        <requirements>Some institutions track and file diagnostic reports under a specific admission</requirements>
        <rim>unique(./inboundRelationship[isHighest(priorityCode) and typeCode=&quot;SUBJ&quot; and isNormalActRelationship()]/source[subsumesCode(&quot;ActClass#ENC&quot;, code) and moodCode=&quot;EVN&quot; and isNormalAct()])</rim>
        <todo>Reckon this is not 80%</todo>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.laboratory</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Resource(Organization)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The laboratory service that issued the report</definition>
        <requirements>Need to know how to contact if there are queries about the results. Also may need to track the source of reports for secondary data analysis</requirements>
        <comments>This is not necessarily the source of the atomic reports - it's the lab that takes responsibility for the clinical report</comments>
        <rim>unique(./participation[isHighest(priorityCode) and typeCode=&quot;AUT&quot; and isNormalParticipation()]/role[subsumesCode(&quot;RoleClass#ASSIGN&quot;, classCode)]/scoper[subsumesCode(&quot;EntityClass#ORG&quot;, classCode) and determinerCode=&quot;INSTANCE&quot;])</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.reportId</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>id</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The local ID assigned to the report by the order filler, usually by the Laboratory Information System (LIS).</definition>
        <requirements>Need to know what identifier to use when making queries about this report from the source laboratory</requirements>
        <rim>unique(./id[displayable=&quot;true&quot; and scope=&quot;OBJ&quot;])</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.requestDetail</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>Details concerning a single pathology test requested.</definition>
        <requirements>Need to be able to track completion of requests based on reports issued, and also to report what diagnostic test swere requested (not always the same as what is delivered)</requirements>
        <comments>Note: Usually there is one test request for each result, however in some circumstances multiple test requests may be represented using a single Pathology test result resource</comments>
        <rim>unique(./outboundRelationship[typeCode=&quot;FLFS&quot; and isNormalActRelationship()]/target[subsumesCode(&quot;ActClass#OBS&quot;, classCode) and subsumes(&quot;ActMood#PRMS&quot;, moodCode) and isNormalAct()])</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.requestDetail.requestOrderId</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Identifier</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The local ID assigned to the order by the order requester.</definition>
        <requirements>Need to be able to track completion of requests based on reports issued</requirements>
        <comments>Equivalent to the Placer Order Identifier</comments>
        <rim>unique(./outboundRelationship[typeCode=&quot;FLFS&quot; and isNormalActRelationship()]/target[subsumesCode(&quot;ActClass#OBS&quot;, classCode) and subsumes(&quot;ActMood#RQO&quot;, moodCode) and isNormalAct()]/id[scope=&quot;OBJ&quot; and displayable=&quot;true&quot;])</rim>
        <todo>Reckon this is not 80%</todo>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.requestDetail.receiverOrderId</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Identifier</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>The local ID assigned to the test order by the order filler, usually by the Laboratory Information System (LIS).</definition>
        <requirements>Need to be able to track completion of requests based on reports issued</requirements>
        <comments>Usually equivalent to the DICOM Accession Number and the Filler Order Identifier.</comments>
        <rim>unique(./id[scope=&quot;OBJ&quot; and displayable=&quot;true&quot;])</rim>
        <todo>Reckon this is not 80%</todo>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.requestDetail.requestTest</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>LabRequests</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>Identification of pathology test requested,</definition>
        <requirements>Need to be able to report what diagnostic test swere requested (not always the same as what is delivered)</requirements>
        <comments>Useful where the test requested differs from the test actually performed.</comments>
        <rim>./code</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.requestDetail.requester</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Resource(Agent|Organization)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Details of the clinician or organisation requesting the laboratory test.</definition>
        <requirements>The requesting clinician may need to be contacted concerning the interpretation of the lab report</requirements>
        <rim>Agent: unique(./participation[isHighest(priorityCode) and typeCode=&quot;AUT&quot; and isNormalParticipation()]/role[subsumesCode(&quot;RoleClass#ASSIGN&quot;, classCode)]

Organization: unique(./participation[isHighest(priorityCode) and typeCode=&quot;AUT&quot; and isNormalParticipation()]/role[subsumesCode(&quot;RoleClass#ASSIGN&quot;, classCode)]/scoper[subsumesCode(&quot;EntityClass#ORG&quot;, classCode) and determinerCode=&quot;INSTANCE&quot; and code[isNormalDatatype]])
</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.requestDetail.clinicalInfo</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Resource(Any)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Details of the clinical information provided to the laboratory along with the original request</definition>
        <requirements>Knowing the clinical information may influence the interpretation of the result</requirements>
        <rim>./outboundRelationship[typeCode=&quot;PERT&quot; and isNormalActRelationship()]/target</rim>
        <todo>This isn't really *ANY* resource.  You can't send a drug or an Animal or a bunch of other things.  What you really want here are &quot;acts&quot;, and I suspect there's a constraint that the subject of the LabReport must have participated in them as subject or perhaps in some other way.</todo>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.reportName</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>LabReportNames</conceptDomain>
        <mustUnderstand>true</mustUnderstand>
        <definition>Identification of the pathology test performed, sometimes including specimen type.</definition>
        <requirements>Need to know what report this is, so clinicians can filter/find the reports they are looking for</requirements>
        <comments>A test result may be for a single analyte, or a group of items, including panel tests.</comments>
        <rim>./code</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.service</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>LabServices</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>The diagnostic service that performs the examination e.g. biochemistry, haematology.</definition>
        <requirements>Help clinicians filter/find the reports they are looking for</requirements>
        <rim>unique(./inboundRelationship[typeCode=&quot;COMP&quot; and isNormalActRelationship()]/source[subsumesCode(&quot;ActClass#LIST&quot;, classCode) and moodCode=&quot;EVN&quot; and inDomain(code,&quot;Lab Service&quot;) and isNormalAct()]/code</rim>
        <todo>I'm not sure this is in the 80%.</todo>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.diagnosticTime</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>dateTime</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>The diagnostically relevant time for this report</definition>
        <requirements>Need to know where in the patient history to file/present this report</requirements>
        <comments>The diagnostically relevant time can be derived from the specimen collection times, but the specimen information is not always available, and the exact relationship is not always automatic</comments>
        <rim>./effectiveTime[type=&quot;TS&quot;]</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.specimen</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>Resource(Specimen)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Details about the specimen if all individual test results are derived from the same specimen</definition>
        <requirements>Need to be able to report information about the collected specimens on which the report is based</requirements>
        <comments>If the specimen is sufficiently specified with a code in the Test result name, then this additional data may be redundant. If there are multiple specimens, these may be represented per 'Result group'</comments>
        <rim>unique(./participation[typeCode=&quot;SUBJ&quot; and isNormalParticipation()]/role[subsumesCode(&quot;RoleClass#SPEC&quot;, classCode)])</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.resultGroup</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <mustUnderstand>true</mustUnderstand>
        <definition>A group of results. Results may be grouped by specimen, or by some value in LabReport.resultGroup.name to describe what binds all the results together.</definition>
        <requirements>Need to be able to report groups of results, where the result grouping is arbitrary, but meaningful</requirements>
        <comments>Many (most) lab reports don't really have a meaningful group. In these cases, just create a single group with no specimen or name</comments>
        <rim>./outboundRelationship[typeCode=&quot;COMP&quot; and isNormalActRelationship()]/target[isNormalAct() and subsumesCode(&quot;ActClass#OBS&quot;, classCode) and moodCode=&quot;EVN&quot; and fromDomain(code, &quot;LabObservationBattery&quot;)]</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.resultGroup.name</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>LabResultGroupNames</conceptDomain>
        <mustUnderstand>true</mustUnderstand>
        <definition>A code or name that describes the group of results</definition>
        <requirements></requirements>
        <comments>For example, the antibody code for a goup of antibody related test, or the organism code for a group of isolate/sensitivities. Leave blank if there is no particular meaning associated with the group</comments>
        <rim>./code</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.resultGroup.specimen</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Resource(Specimen)</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Details about the individual specimen to which these ‘Result group’ test results refer, where testing of multiple specimens is required.</definition>
        <requirements>Need to be able to report information about the collected specimens on which the report is based</requirements>
        <rim>unique(./participation[typeCode=&quot;SBJ&quot; and isNormalParticipation()]/role[subsumesCode(&quot;RoleClass#SPEC&quot;, classCode)])</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.resultGroup.result</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <mustUnderstand>true</mustUnderstand>
        <definition>Specific detailed result, including both the value of the result item, and additional information that may be useful for clinical interpretation. Results include whatever specific data items pathology labs report as part of the clinical service; it is not confined to measurements.</definition>
        <requirements>Need to report results with information that assist with interpretation</requirements>
        <rim>./outboundRelationship[typeCode=&quot;COMP&quot; and isNormalActRelationship()]/target[subsumesCode(&quot;ActClass#OBS&quot;, classCode) and moodCode=&quot;EVN&quot; and isNormalAct() and fromDomain(code, &quot;LabObservationResult&quot;)]</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.resultGroup.result.name</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>LabResultNames</conceptDomain>
        <mustUnderstand>true</mustUnderstand>
        <definition>Identifies the meaning of the value</definition>
        <requirements>Need to know what the result is about</requirements>
        <comments>results are fundamentally a name - value pair with additional clarifying information</comments>
        <rim>./code</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.resultGroup.result.value[x]</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Quantity</type>
          <type>CodeableConcept</type>
          <type>Attachment</type>
          <type>Ratio</type>
          <type>Choice</type>
          <type>Interval(dateTime)</type>
          <type>string</type>
        </types>
        <conceptDomain>*unbound*</conceptDomain>
        <mustUnderstand>true</mustUnderstand>
        <definition>Actual value of the result. Most result values will be numerical measurements, but others may be coded concepts, free text, or multimedia images</definition>
        <requirements>Need a value for the result</requirements>
        <rim>./value</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.resultGroup.result.flag</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>code</type>
        </types>
        <conceptDomain>LabResultFlag</conceptDomain>
        <mustUnderstand>true</mustUnderstand>
        <definition>Flag indicating the abnormal status of the result</definition>
        <requirements></requirements>
        <rim>./interpretationCode</rim>
        <todo>The proposed set of codes are too narrow (and doesn't map well to v3.)</todo>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.resultGroup.result.status</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>code</type>
        </types>
        <conceptDomain>LabReportStatus</conceptDomain>
        <mustUnderstand>true</mustUnderstand>
        <definition>The status of the result value</definition>
        <requirements>Need to track the status of individual results - some results are finalised before the whole report is finalised</requirements>
        <rim>(as per LabReport.status)</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.resultGroup.result.comments</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>May include statements about significant, unexpected or unreliable. values, or information about the source of the value where this may be relevant to the interpretation of the result.</definition>
        <requirements>Need to be able to provide free text additional information</requirements>
        <rim>unique(./inboundRelationship[typeCode=&quot;SUBJ&quot; and isNormalActRelationship()]/source[subsumesCode(&quot;ActClass#OBS&quot;, classCode) and moodCode=&quot;EVN&quot; and mapsTo(code, &quot;LOINC#
48767-8&quot;) and isNormalAct()]/value[type=&quot;ST&quot;])</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.resultGroup.result.referenceRange</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <mustUnderstand>true</mustUnderstand>
        <definition>Guidance on how to interpret the value by comparison to a normal or recommended range</definition>
        <requirements>Need to be able to provide multiple reference ranges</requirements>
        <comments>Most results only have one reference range. Some non-numerical results don't have a reference range</comments>
        <rim>./outboundRelationship[typeCode=&quot;REFV&quot; and isNormalActRelationship()]/target[subsumesCode(&quot;ActClass#OBS&quot;, classCode) and moodCode=&quot;EVN&quot; and isCriterionInd=&quot;true&quot; and isNormalAct()]</rim>
        <todo>Are multiple reference ranges in the 80%?</todo>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.resultGroup.result.referenceRange.meaning</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>LabReferenceRanges</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>Code for the meaning of the reference range</definition>
        <requirements>Need to be able to say what kind of reference range this is - normal, recommended, therapeutic, or perhaps what state this reference range applies to (i.e. hormonal cycles)</requirements>
        <rim>./interpretationCode</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.resultGroup.result.referenceRange.range[x]</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Quantity</type>
          <type>Interval(Quantity)</type>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Actual value of the reference range.  May be a quantity (&lt;20mg/L), an interval (10-20 umol/L), or some text</definition>
        <requirements>Need to be able to report numerical or text reference ranges, and handle legacy data</requirements>
        <comments>Text reference ranges are typically used in endocrinology, or for legacy data with string reference ranges</comments>
        <rim>./value[type=(&quot;PQ&quot;, &quot;IVL_PQ&quot;, &quot;ST&quot;)]</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.conclusion</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Narrative</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>Concise and clinically contextualised narrative interpretation of the pathology test results.</definition>
        <requirements>Need to be able to provide a conclusion that is not lost amongst the basic result data</requirements>
        <comments>common reports don't have a conclusion, but some do</comments>
        <rim>unique(./inboundRelationship[typeCode=&quot;SPRT&quot; and isNormalActRelationship()]/source[subsumesCode(&quot;ActClass#OBS&quot;, classCode) and moodCode=&quot;EVN&quot; and mapsTo(code, &quot;LOINC#
48767-8&quot;) and isNormalAct()]/value[type=&quot;ST&quot;])</rim>
        <todo>Is this in the 80%?</todo>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.codedDiagnosis</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>CodeableConcept</type>
        </types>
        <conceptDomain>LabDiagnosisCodes</conceptDomain>
        <mustUnderstand>false</mustUnderstand>
        <definition>Codes for the conclusion</definition>
        <requirements></requirements>
        <rim>unique(./inboundRelationship[typeCode=&quot;SPRT&quot; and isNormalActRelationship()]/source[subsumesCode(&quot;ActClass#OBS&quot;, classCode) and moodCode=&quot;EVN&quot; and subsumesCode(code, &quot;LOINC#
54531-9&quot;) and isNormalAct()]/value[type=&quot;CD&quot;])</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.representation</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance></conformance>
        <condition></condition>
        <types>
          <type>Attachment</type>
        </types>
        <mustUnderstand>true</mustUnderstand>
        <definition>Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they must be semantically equivalent.</definition>
        <requirements>Laboratory needs to be able to provide it's own fully formatted report for clinical fidelity</requirements>
        <comments>Possible formats: text/html, text/plain, text/rtf, application/msword, application/pdf, application/rtf, application/vnd.oasis.opendocument.text, application/vnd.openxmlformats-officedocument.wordprocessingml.document</comments>
        <rim>./text[type=&quot;ED&quot;]</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.extensions</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>See Extensions</definition>
        <requirements></requirements>
        <rim>N/A</rim>
      </elementDefinition>
      <elementDefinition>
        <name>LabReport.text</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Narrative</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Text summary of report, for human interpretation</definition>
        <requirements></requirements>
        <rim>unique(./text[type=&quot;ST&quot;])</rim>
      </elementDefinition>
    </elementDefinitions>
  </resourceDefinition>
  <resourceDefinition>
    <name>DocumentConformance</name>
    <elementDefinitions>
      <elementDefinition>
        <name>DocumentConformance</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>A conformance statement about how one or more FHIR documents</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>DocumentConformance.id</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>id</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Globally unique Conformance Statement Id (Must be a UUID)</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>DocumentConformance.date</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>dateTime</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Date that this conformance statement is published</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>DocumentConformance.publisher</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>The organization that publishes this conformance statement</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>DocumentConformance.publisher.name</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Name of Organization</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>DocumentConformance.publisher.address</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Address</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Address of Organization</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>DocumentConformance.publisher.contact</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>Contact</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Contacts for Organization</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>DocumentConformance.software</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>The software that is covered by this conformance statement</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>DocumentConformance.software.name</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Name software is known by</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>DocumentConformance.software.version</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Version covered by this statement</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>DocumentConformance.software.releaseDate</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>dateTime</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Date this version released</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>DocumentConformance.profile</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>uri</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Additional other profiles that apply to this conformance statement.</definition>
        <requirements></requirements>
        <comments> Generally these profiles make  constraints on the bindings of concept domains / value sets</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>DocumentConformance.document</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>A document definition</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>DocumentConformance.document.name</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Name for this particular document profile</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>DocumentConformance.document.purpose</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <types>
          <type>string</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Human description of this particular profile</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>DocumentConformance.document.resource</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>unbounded</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Constraint</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Constraint on a resource used in the document</definition>
        <requirements></requirements>
        <comments>The first resource is the document resource</comments>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>DocumentConformance.extensions</name>
        <cardinality>
          <minOccurs>0</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Optional</conformance>
        <condition></condition>
        <mustUnderstand>false</mustUnderstand>
        <definition>See Extensions</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
      <elementDefinition>
        <name>DocumentConformance.text</name>
        <cardinality>
          <minOccurs>1</minOccurs>
          <maxOccurs>1</maxOccurs>
        </cardinality>
        <conformance>Mandatory</conformance>
        <condition></condition>
        <types>
          <type>Narrative</type>
        </types>
        <mustUnderstand>false</mustUnderstand>
        <definition>Text summary of conformance profile for human interpretation</definition>
        <requirements></requirements>
        <rim></rim>
      </elementDefinition>
    </elementDefinitions>
  </resourceDefinition>
  <conceptDomain>
    <name>MessageConformanceEventMode</name>
    <definition>The mode of a message conformance statement</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/message-conformance-event-mode</sid>
      <item>
        <code>sender</code>
        <definition>The application sends requests and receives responses</definition>
      </item>
      <item>
        <code>receiver</code>
        <definition>The application receives requests and sends responses</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>ResourceProfileStatus</name>
    <definition>The lifecycle status of a Resource Profile</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/resource-profile-status</sid>
      <item>
        <code>draft</code>
        <definition>This profile is still under development</definition>
      </item>
      <item>
        <code>testing</code>
        <definition>this profile was authored for testing purposes (or education/evaluation/evangelisation)</definition>
      </item>
      <item>
        <code>production</code>
        <definition>This profile is ready for use in production systems</definition>
      </item>
      <item>
        <code>withdrawn</code>
        <definition>This profile has been withdrawn</definition>
      </item>
      <item>
        <code>superceded</code>
        <definition>This profile was superceded by a more recent version</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>DataType</name>
    <definition>The type of an element - one of the FHIR data types</definition>
    <binding>Special</binding>
    <value>DataType</value>
  </conceptDomain>
  <conceptDomain>
    <name>MediaType</name>
    <definition>The mime type of an attachment</definition>
    <binding>External</binding>
    <description>BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)</description>
    <reference>http://www.rfc-editor.org/bcp/bcp13.txt</reference>
  </conceptDomain>
  <conceptDomain>
    <name>NarrativeStatus</name>
    <definition>The status of a resource narrative</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/narrative-status</sid>
      <item>
        <code>generated</code>
        <definition>The contents of the narrative are entirely generated from the structured data in the resource.</definition>
      </item>
      <item>
        <code>extensions</code>
        <definition>The contents of the narrative are entirely generated from the structured data in the resource, and some of the structured data is contained in extensions</definition>
      </item>
      <item>
        <code>additional</code>
        <definition>The contents of the narrative contain additional information not found in the structured data</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>AgentRole</name>
    <definition>The role a person plays representing an organization</definition>
    <binding>Unbound</binding>
  </conceptDomain>
  <conceptDomain>
    <name>PersonRelationship</name>
    <definition>The relationship a person has to the subject, including familial, marital, financial, legal, and casual relationships</definition>
    <binding>Unbound</binding>
  </conceptDomain>
  <conceptDomain>
    <name>AnimalSpecies</name>
    <definition>The species of an animal</definition>
    <binding>Unbound</binding>
  </conceptDomain>
  <conceptDomain>
    <name>IdentifierType</name>
    <definition>The type of human identifier</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/identifier-type</sid>
      <item>
        <code>account</code>
        <definition>Account number</definition>
        <comments>An identifier that is unique to an account.</comments>
      </item>
      <item>
        <code>credit</code>
        <definition>Credit Card Number</definition>
        <comments>A credit card number (or debit card).</comments>
      </item>
      <item>
        <code>microchip</code>
        <definition>Microchip Number</definition>
        <comments>implanted, for animals, or a worn RFID for humans</comments>
      </item>
      <item>
        <code>registry</code>
        <definition>A Registry Number</definition>
      </item>
      <item>
        <code>insurance</code>
        <definition>Insurance Scheme Member Number</definition>
        <comments>Identifies the person as a member of an insurance scheme.</comments>
      </item>
      <item>
        <code>national</code>
        <definition>National Healthcare Identifier</definition>
        <comments>May not only be used for healthcare.</comments>
      </item>
      <item>
        <code>ssn</code>
        <definition>National Social Security Number</definition>
      </item>
      <item>
        <code>state</code>
        <definition>State Healthcare Identifier</definition>
        <comments>May not only be used for healthcare.</comments>
      </item>
      <item>
        <code>patient</code>
        <definition>Patient identifier</definition>
        <comments>Frequently called MRN (medical record number) or UR (unit record number).</comments>
      </item>
      <item>
        <code>facility</code>
        <definition>Facility ID</definition>
      </item>
      <item>
        <code>provider</code>
        <definition>Provider number</definition>
        <comments>a number allocated to a person as a provider of healthcare resources.</comments>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>AnimalRelationship</name>
    <definition>The relationship of an animal to another entity (person, corporation, or other animal)</definition>
    <binding>Unbound</binding>
  </conceptDomain>
  <conceptDomain>
    <name>LabReportNames</name>
    <definition>codes for report names</definition>
    <binding>Preferred</binding>
    <source>LOINC</source>
  </conceptDomain>
  <conceptDomain>
    <name>PrescriptionStatus</name>
    <definition>The status of a prescription</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/prescription-status</sid>
      <item>
        <code>active</code>
        <definition>Patient is using the prescribed medicin</definition>
      </item>
      <item>
        <code>completed</code>
        <definition>Prescription is no longer current</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>PatientConfidentiality</name>
    <definition>The confidentiality of the records associated with this patient</definition>
    <binding>Unbound</binding>
  </conceptDomain>
  <conceptDomain>
    <name>AddressUse</name>
    <definition>The use of an address</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/address-use</sid>
      <item>
        <code>home</code>
        <definition>A communication address at a home.</definition>
      </item>
      <item>
        <code>work</code>
        <definition>An office address. First choice for business related contacts during business hours.</definition>
      </item>
      <item>
        <code>temp</code>
        <definition>A temporary address. The period can provide more detailed information.</definition>
      </item>
      <item>
        <code>old</code>
        <definition>This address is no longer in use (or was never correct, but retained for records)</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>NamePartType</name>
    <definition>Type of a part of a human name</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/name-part-type</sid>
      <item>
        <code>family</code>
        <definition>Family name, this is the name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.</definition>
      </item>
      <item>
        <code>given</code>
        <definition>Given name. NOTE Not to be called first name since given names do not always come first. .</definition>
      </item>
      <item>
        <code>title</code>
        <definition>Part of the name that is acquired as a title due to academic, legal, employment or nobility status etc. NOTE Title name parts include name parts that come after the name, such as qualifications.</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>ContactUse</name>
    <definition>How to use this address</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/contact-use</sid>
      <item>
        <code>home</code>
        <definition>A communication contact at a home; attempted contacts for business purposes might intrude privacy and chances are one will contact family or other household members instead of the person one wishes to call. Typically used with urgent cases, or if no other contacts are available.</definition>
      </item>
      <item>
        <code>work</code>
        <definition>An office contact. First choice for business related contacts during business hours.</definition>
      </item>
      <item>
        <code>temp</code>
        <definition>A temporary contact. The period can provide more detailed information.</definition>
      </item>
      <item>
        <code>old</code>
        <definition>This contact is no longer in use (or was never correct, but retained for records)</definition>
      </item>
      <item>
        <code>mobile</code>
        <definition>A telecommunication device that moves and stays with its owner. May have characteristics of all other use codes, suitable for urgent matters, not the first choice for routine business</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>NarrativeMapSource</name>
    <definition>Which is the source in a Narrative &lt;-> Data mapping</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/narrative-map-source</sid>
      <item>
        <code>text</code>
        <definition>The text is the original data</definition>
      </item>
      <item>
        <code>data</code>
        <definition>The data is the original data</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>BooleanYesNo</name>
    <definition>Either yes or no, true or false</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/boolean-yes-no</sid>
      <item>
        <code>yes</code>
        <definition>TRUE</definition>
      </item>
      <item>
        <code>no</code>
        <definition>FALSE</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>LabRequests</name>
    <definition>codes for requestable tests</definition>
    <binding>Unbound</binding>
  </conceptDomain>
  <conceptDomain>
    <name>AnimalGender</name>
    <definition>The gender of an animal</definition>
    <binding>Unbound</binding>
  </conceptDomain>
  <conceptDomain>
    <name>AnimalStrain</name>
    <definition>The strain of an animal</definition>
    <binding>Unbound</binding>
  </conceptDomain>
  <conceptDomain>
    <name>Religion</name>
    <definition>The denomination to which a person professes affiliation</definition>
    <binding>Unbound</binding>
  </conceptDomain>
  <conceptDomain>
    <name>PrescriptionReason</name>
    <definition>Medical reason for prescribing a medicine</definition>
    <binding>External</binding>
    <description>ICD-10, ICPC-1</description>
    <reference></reference>
  </conceptDomain>
  <conceptDomain>
    <name>Race</name>
    <definition>The race of the person</definition>
    <binding>Preferred</binding>
    <source>HL7 v2 table 0200</source>
  </conceptDomain>
  <conceptDomain>
    <name>ContactSystem</name>
    <definition>What kind of contact this is</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/contact-system</sid>
      <item>
        <code>phone</code>
        <definition>the value is a telephone number used for voice calls. Use of full international numbers starting with + is recommended to enable automatic dialing support but not required.</definition>
      </item>
      <item>
        <code>fax</code>
        <definition>the value is a fax machine. Use of full international numbers starting with + is recommended to enable automatic dialing support but not required.</definition>
      </item>
      <item>
        <code>email</code>
        <definition>the value is an email address</definition>
      </item>
      <item>
        <code>url</code>
        <definition>The value is a url. This is intended for various personal contacts including blogs, twitter, facebook etc. Do not use for email addresses</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>Accreditation</name>
    <definition>Accreditations an organization may be granted</definition>
    <binding>Unbound</binding>
  </conceptDomain>
  <conceptDomain>
    <name>DocumentSectionType</name>
    <definition>Type of a clinical document section</definition>
    <binding>Preferred</binding>
    <source>LOINC</source>
  </conceptDomain>
  <conceptDomain>
    <name>LabDiagnosisCodes</name>
    <definition>Codes for laboratory diagnoses</definition>
    <binding>Suggestion</binding>
    <source>SNOMED-CT</source>
  </conceptDomain>
  <conceptDomain>
    <name>LabReportStatus</name>
    <definition>The status of a report or result item</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/lab-report-status</sid>
      <item>
        <code>registered</code>
        <definition>The existence of the result is registered, but there is no result yet available</definition>
      </item>
      <item>
        <code>interim</code>
        <definition>This is an initial or interim result: data may be missing or verification not been performed</definition>
      </item>
      <item>
        <code>final</code>
        <definition>The result is complete and verified by the responsible pathologist</definition>
      </item>
      <item>
        <code>amended</code>
        <definition>The result has been modified subsequent to being Final, and is complete and verified by the responsible pathologist</definition>
      </item>
      <item>
        <code>cancelled</code>
        <definition>The result is unavailable because the test was not started or not completed (also sometimes called aborted)</definition>
      </item>
      <item>
        <code>withdrawn</code>
        <definition>The result has been withdrawn following previous Final release</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>AdministrationPrecondition</name>
    <definition>Precondition for administering medication</definition>
    <binding>External</binding>
    <description>NHG Table 25b</description>
    <reference></reference>
  </conceptDomain>
  <conceptDomain>
    <name>ConformanceType</name>
    <definition>The conformance value for an element</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/conformance-type</sid>
      <item>
        <code>Mandatory</code>
        <definition>The element is or must always be present without a dataAbsentReason</definition>
      </item>
      <item>
        <code>Conditional</code>
        <definition>The element may need to be present (with no dataAbsentReasons) depending on the condition</definition>
      </item>
      <item>
        <code>Optional</code>
        <definition>The element may or may not be present</definition>
      </item>
      <item>
        <code>Prohibited</code>
        <definition>The element can not present or will be rejected if received</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>AdministrationInstruction</name>
    <definition>Instructions for administering medication</definition>
    <binding>External</binding>
    <description>NHG Table 25b</description>
    <reference></reference>
  </conceptDomain>
  <conceptDomain>
    <name>DataAbsentReason</name>
    <definition>Used to specify why the normally expected content of the data element is missing</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/data-absent-reason</sid>
      <item>
        <code>unknown</code>
        <definition>The value is not known</definition>
      </item>
      <item>
        <code>asked</code>
        <definition>The source human does not know the value</definition>
      </item>
      <item>
        <code>temp</code>
        <definition>There is reason to expect (from the workflow) that the value may become known</definition>
      </item>
      <item>
        <code>notasked</code>
        <definition>The workflow didn't lead to this value being known</definition>
      </item>
      <item>
        <code>masked</code>
        <definition>The information is not available due to security, privacy or related reasons</definition>
        <comments>Using masked may be breach of security or confidentiality, but there are times when it's use is required to support alternate workflows for gaining access to denied information.</comments>
      </item>
      <item>
        <code>unsupported</code>
        <definition>The source system wasn't capable of supporting this element</definition>
      </item>
      <item>
        <code>astext</code>
        <definition>The content of the data is represented as text</definition>
      </item>
      <item>
        <code>error</code>
        <definition>Some system or workflow process error means that the information is not available</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>LabResultNames</name>
    <definition>codes for results</definition>
    <binding>Preferred</binding>
    <source>LOINC</source>
  </conceptDomain>
  <conceptDomain>
    <name>PaperRecordLocation</name>
    <definition>A physical location for a record. (Usually site specific)</definition>
    <binding>Unbound</binding>
  </conceptDomain>
  <conceptDomain>
    <name>DocumentAuthenticationMode</name>
    <definition>The way in which a person authenticated a document</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/document-authentication-mode</sid>
      <item>
        <code>personal</code>
        <definition>The person authenticated the document in their personal capacity</definition>
      </item>
      <item>
        <code>professional</code>
        <definition>The person authenticated the document in their professional capacity</definition>
      </item>
      <item>
        <code>legal</code>
        <definition>The person authenticated the document and accepted legal responsibility for it's content</definition>
      </item>
      <item>
        <code>official</code>
        <definition>The organization authenticated the document as consistent with their policies and procedures</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>Industry</name>
    <definition>Code for the type of industry</definition>
    <binding>Reference</binding>
    <source>HL7 v3 OrganizationIndustryClass value set</source>
  </conceptDomain>
  <conceptDomain>
    <name>ConceptBindingType</name>
    <definition>The type of a binding for a concept domain</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/concept-binding-type</sid>
      <item>
        <code>Unbound</code>
        <definition>The concept domain is not bound to anything</definition>
      </item>
      <item>
        <code>CodeList</code>
        <definition>The concept domain is bound to a list of supplied codes - only those codes are allowed</definition>
      </item>
      <item>
        <code>Reference</code>
        <definition>The concept domain references some external definition by a provided reference</definition>
      </item>
      <item>
        <code>Preferred</code>
        <definition>The concept domain references a set of preferred terms</definition>
      </item>
      <item>
        <code>Suggestion</code>
        <definition>This profile was superceded by a more recent version</definition>
      </item>
      <item>
        <code>External</code>
        <definition>The concept domain is defined by an external authority identified in the reference</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>PatientDiet</name>
    <definition>casual dietary restrictions associated with this patient</definition>
    <binding>Unbound</binding>
  </conceptDomain>
  <conceptDomain>
    <name>MedicationKind</name>
    <definition>The kind of medication, vaccine or therapeutic material</definition>
    <binding>External</binding>
    <description>G-Standaard (Netherlands), AMT (Australie)</description>
    <reference></reference>
  </conceptDomain>
  <conceptDomain>
    <name>AddressPartType</name>
    <definition>Type of address part</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/address-part-type</sid>
      <item>
        <code>part</code>
        <definition>Part of an address line (typically used with an extension that further defines the meaning of the part).</definition>
      </item>
      <item>
        <code>line</code>
        <definition>A line of an address (typically used for street names &amp; numbers, unit details, delivery hints etc) .</definition>
      </item>
      <item>
        <code>city</code>
        <definition>The name of the city, town, village, or other community or delivery centre.</definition>
      </item>
      <item>
        <code>state</code>
        <definition>sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).</definition>
      </item>
      <item>
        <code>country</code>
        <definition>Country. ISO 3166 3 letter codes can be used in place of a full country name.</definition>
      </item>
      <item>
        <code>zip</code>
        <definition>A postal code designating a region defined by the postal service.</definition>
      </item>
      <item>
        <code>dpid</code>
        <definition>A value that uniquely identifies the postal address. (often used in barcodes).</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>LabResultGroupNames</name>
    <definition>codes for result groups</definition>
    <binding>Preferred</binding>
    <source>LOINC</source>
  </conceptDomain>
  <conceptDomain>
    <name>LanguageUse</name>
    <definition>How well a person speaks a language</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/language-use</sid>
      <item>
        <code>none</code>
        <definition>The person does not speak the language at all</definition>
      </item>
      <item>
        <code>poor</code>
        <definition>The person has minimal functional capability in the language</definition>
      </item>
      <item>
        <code>useable</code>
        <definition>The person can use the language, but may not be full conversant, particularly with regards to health concepts</definition>
      </item>
      <item>
        <code>fluent</code>
        <definition>The person is fully capable of using the language</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>Qualifications</name>
    <definition>Formal qualifications, accreditations, and Certifications acquired by a person</definition>
    <binding>Unbound</binding>
  </conceptDomain>
  <conceptDomain>
    <name>MessageEvent</name>
    <definition>One of the message types defined in FHIR messaging</definition>
    <binding>Special</binding>
    <value>MessageEvent</value>
  </conceptDomain>
  <conceptDomain>
    <name>ResourceType</name>
    <definition>One of the resource types defined in FHIR messaging</definition>
    <binding>Special</binding>
    <value>ResourceType</value>
  </conceptDomain>
  <conceptDomain>
    <name>EventTiming</name>
    <definition>A real world event that a schedule is related to</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/event-timing</sid>
      <item>
        <code>HS</code>
        <definition>event occurs duration before the hour of sleep (or trying to)</definition>
      </item>
      <item>
        <code>WAKE</code>
        <definition>event occurs duration after waking</definition>
      </item>
      <item>
        <code>AC</code>
        <definition>event occurs duration before a meal (from the latin ante cibus)</definition>
      </item>
      <item>
        <code>ACM</code>
        <definition>event occurs duration before breakfast (from the latin ante cibus matutinus)</definition>
      </item>
      <item>
        <code>ACD</code>
        <definition>event occurs duration before lunch (from the latin ante cibus diurnus)</definition>
      </item>
      <item>
        <code>ACV</code>
        <definition>event occurs duration before dinner (from the latin ante cibus vespertinus)</definition>
      </item>
      <item>
        <code>PC</code>
        <definition>event occurs duration after a meal (from the latin post cibus)</definition>
      </item>
      <item>
        <code>PCM</code>
        <definition>event occurs duration after breakfast (from the latin post cibus matutinus)</definition>
      </item>
      <item>
        <code>PCD</code>
        <definition>event occurs duration after lunch (from the latin post cibus diurnus)</definition>
      </item>
      <item>
        <code>PCV</code>
        <definition>event occurs duration after dinner (from the latin post cibus vespertinus)</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>*unbound*</name>
    <definition></definition>
    <binding>Unbound</binding>
  </conceptDomain>
  <conceptDomain>
    <name>ResourceIdSource</name>
    <definition>The system responsible for the provision of a resource unique id</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/resource-id-source</sid>
      <item>
        <code>client</code>
        <definition>The client must provide a unique resource id</definition>
      </item>
      <item>
        <code>server</code>
        <definition>The server defines the id and will reject any client attempt to define it</definition>
      </item>
      <item>
        <code>either</code>
        <definition>The client can provide a unique resource id, or the server will define it instead</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>DocumentType</name>
    <definition>Type of a clinical document</definition>
    <binding>Preferred</binding>
    <source>LOINC</source>
  </conceptDomain>
  <conceptDomain>
    <name>NameUse</name>
    <definition>The use of a human name</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/name-use</sid>
      <item>
        <code>usual</code>
        <definition>Known as/conventional/the one you normally use</definition>
      </item>
      <item>
        <code>official</code>
        <definition>The formal name as registered in an official (government) registry, but which name might not be commonly used. May be called legal name.</definition>
      </item>
      <item>
        <code>temp</code>
        <definition>A temporary name. A name valid time can provide more detailed information. This may also be used for temporary names assigned at birth or in emergency situations.</definition>
      </item>
      <item>
        <code>anonymous</code>
        <definition>Anonymous assigned name, alias, or pseudonym (used to protect a person's identity for privacy reasons)</definition>
      </item>
      <item>
        <code>old</code>
        <definition>This name is no longer in use (or was never correct, but retained for records)</definition>
      </item>
      <item>
        <code>maiden</code>
        <definition>A name used prior to marriage. Marriage naming customs vary greatly around the world. This name use is for use by applications that collect and store maiden names. Though the concept of maiden name is often gender specific, the use of this term is not gender specific. The use of this term does not imply any particular history for a person‘s name, nor should the maiden name be determined algorithmically</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>ExtensionState</name>
    <definition>The state of an extension</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/extension-state</sid>
      <item>
        <code>must-understand</code>
        <definition>The extension contains information that qualifies or negates another element, and must be understood by an application processing the resource</definition>
      </item>
      <item>
        <code>superceded</code>
        <definition>The extension has been promoted into the main content of the resource, and the content is found at the reference. The extension continues to be defined for backward compatibility</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>LabResultFlag</name>
    <definition>codes for result flags</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/lab-result-flag</sid>
      <item>
        <code>-</code>
      </item>
      <item>
        <code>--</code>
      </item>
      <item>
        <code>---</code>
      </item>
      <item>
        <code>+</code>
      </item>
      <item>
        <code>++</code>
      </item>
      <item>
        <code>+++</code>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>OrganisationType</name>
    <definition>The type of an organisation</definition>
    <binding>Suggestion</binding>
    <source>SNOMED-CT, and the HL7 v3 Entity Code table</source>
  </conceptDomain>
  <conceptDomain>
    <name>QuantityStatus</name>
    <definition>how the Quantity should be understood and represented</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/quantity-status</sid>
      <item>
        <code>&lt;</code>
        <definition>The actual value is less than the given value</definition>
      </item>
      <item>
        <code>&lt;=</code>
        <definition>The actual value is less than or equal to the given value</definition>
      </item>
      <item>
        <code>>=</code>
        <definition>The actual value is greater than or equal to the given value</definition>
      </item>
      <item>
        <code>></code>
        <definition>The actual value is greater than the given value</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>ResponseCode</name>
    <definition>The kind of response to a message</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/response-code</sid>
      <item>
        <code>ok</code>
        <definition>The message was accepted and processed without error</definition>
      </item>
      <item>
        <code>error</code>
        <definition>Some internal unexpected error occured - wait and try again. Note - this is usually used for things like database unavailable, which may be expected to resolve, though human intervention may be required</definition>
      </item>
      <item>
        <code>rejection</code>
        <definition>The message was rejected because of some content in it. There is no point in re-sending without change. The response narrative must describe what the issue is</definition>
      </item>
      <item>
        <code>rules</code>
        <definition>The message was rejected because of some event-specific business rules, and it may be possible to modify the request and re-submit (as a different request). The response data must clarify what the change would be, as described by the event definition</definition>
      </item>
      <item>
        <code>undeliverable</code>
        <definition>A middleware agent was unable to deliver the message to it's supposed destination</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>AdministrationRoute</name>
    <definition>Route by which a medication is administered</definition>
    <binding>External</binding>
    <description>G-Standaard subtable 0007</description>
    <reference></reference>
  </conceptDomain>
  <conceptDomain>
    <name>LabServices</name>
    <definition>codes for laboratory services</definition>
    <binding>Reference</binding>
    <source>HL7 v2 table 0074</source>
  </conceptDomain>
  <conceptDomain>
    <name>RestfulConformanceMode</name>
    <definition>The mode of a restful conformance statement</definition>
    <binding>CodeList</binding>
    <list>
      <sid>urn:hl7-org:sid/fhir/restful-conformance-mode</sid>
      <item>
        <code>client</code>
        <definition>The application acts as a server for this resource</definition>
      </item>
      <item>
        <code>server</code>
        <definition>The application acts as a client for this resource</definition>
      </item>
    </list>
  </conceptDomain>
  <conceptDomain>
    <name>AdministrativeGender</name>
    <definition>The gender of a person used for administrative purposes</definition>
    <binding>Unbound</binding>
  </conceptDomain>
  <conceptDomain>
    <name>OrganizationRelationship</name>
    <definition>The relationship an organization has to the subject, including sub and super organizations, and other kind of relationships such as partner organisations</definition>
    <binding>Unbound</binding>
  </conceptDomain>
  <conceptDomain>
    <name>EventReason</name>
    <definition>The reason for an event occurring</definition>
    <binding>Unbound</binding>
  </conceptDomain>
  <conceptDomain>
    <name>Language</name>
    <definition>A human language</definition>
    <binding>External</binding>
    <description>ISO 639-3</description>
    <reference>http://www.sil.org/iso639-3/codes.asp</reference>
  </conceptDomain>
  <conceptDomain>
    <name>LabReferenceRanges</name>
    <definition>Code for the meaning of a reference range</definition>
    <binding>Unbound</binding>
  </conceptDomain>
</resourceDefinitions>

