<?xml version="1.0" encoding="UTF-8"?>
<!-- 
  © HL7 (http://www.hl7.org)
  Generated on Mon, May 14, 2012 09:48+1000 for FHIR v0.01 
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.hl7.org/fhir" xmlns:xhtml="http://www.w3.org/1999/xhtml" targetNamespace="http://www.hl7.org/fhir" elementFormDefault="qualified">
  <xs:import namespace="http://www.w3.org/XML/1998/namespace"/>
  <xs:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="xhtml1-strict.xsd"/>
  <xs:simpleType name="sid-simple">
    <xs:restriction base="xs:string">
      <xs:pattern value="[A-Za-z]+:[^s]*"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="sid">
    <xs:simpleContent>
      <xs:extension base="sid-simple">
        <xs:attribute ref="xml:id"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:simpleType name="dateTime-simple">
    <xs:restriction base="xs:string">
      <xs:pattern value="[0-9]{4}(\-((0[1-9])|(1[0-2]))(\-((0[1-9])|([1-2][0-9])|(3[0-1]))(T(([0-1][0-9])|(2[0-3])):[0-5][0-9]:[0-5][0-9]((\+|-)(0[0-9]|1[0-4]):(0|3|4)(0|5)|Z)?)?)?)?"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="dateTime">
    <xs:simpleContent>
      <xs:extension base="dateTime-simple">
        <xs:attribute ref="xml:id"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="integer">
    <xs:simpleContent>
      <xs:extension base="xs:int">
        <xs:attribute ref="xml:id"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:simpleType name="code-simple">
    <xs:restriction base="xs:string">
      <xs:pattern value="[^\s]+([\s]+[^\s]+)*"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="code">
    <xs:simpleContent>
      <xs:extension base="code-simple">
        <xs:attribute ref="xml:id"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:simpleType name="date-simple">
    <xs:restriction base="xs:string">
      <xs:pattern value="[0-9]{4}(\-((0[1-9])|(1[0-2]))(\-((0[1-9])|([1-2][0-9])|(3[0-1])))?)?"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="date">
    <xs:simpleContent>
      <xs:extension base="date-simple">
        <xs:attribute ref="xml:id"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="decimal">
    <xs:simpleContent>
      <xs:extension base="xs:decimal">
        <xs:attribute ref="xml:id"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="uri">
    <xs:simpleContent>
      <xs:extension base="xs:anyURI">
        <xs:attribute ref="xml:id"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:simpleType name="id-simple">
    <xs:restriction base="xs:string">
      <xs:pattern value="[a-z0-9\-\.]{1,36}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="id">
    <xs:simpleContent>
      <xs:extension base="id-simple">
        <xs:attribute ref="xml:id"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="base64Binary">
    <xs:simpleContent>
      <xs:extension base="xs:base64Binary">
        <xs:attribute ref="xml:id"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:simpleType name="oid-simple">
    <xs:restriction base="xs:string">
      <xs:pattern value="([1-9][0-9]*)(\.[1-9][0-9]*)*"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="oid">
    <xs:simpleContent>
      <xs:extension base="oid-simple">
        <xs:attribute ref="xml:id"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="string">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute ref="xml:id"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="boolean">
    <xs:simpleContent>
      <xs:extension base="xs:boolean">
        <xs:attribute ref="xml:id"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:simpleType name="uuid-simple">
    <xs:restriction base="xs:string">
      <xs:pattern value="[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="uuid">
    <xs:simpleContent>
      <xs:extension base="uuid-simple">
        <xs:attribute ref="xml:id"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="instant">
    <xs:simpleContent>
      <xs:extension base="xs:dateTime">
        <xs:attribute ref="xml:id"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:simpleType name="DataAbsentReason">
    <xs:restriction base="xs:string">
      <xs:enumeration value="unknown">
        <xs:annotation>
          <xs:documentation>The value is not known</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="asked">
        <xs:annotation>
          <xs:documentation>The source human does not know the value</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="temp">
        <xs:annotation>
          <xs:documentation>There is reason to expect (from the workflow) that the value may become known</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="notasked">
        <xs:annotation>
          <xs:documentation>The workflow didn't lead to this value being known</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="masked">
        <xs:annotation>
          <xs:documentation>The information is not available due to security, privacy or related reasons</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="unsupported">
        <xs:annotation>
          <xs:documentation>The source system wasn't capable of supporting this element</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="astext">
        <xs:annotation>
          <xs:documentation>The content of the data is represented as text</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="error">
        <xs:annotation>
          <xs:documentation>Some system or workflow process error means that the information is not available</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:attributeGroup name="dataAbsentReason">
    <xs:attribute name="dataAbsentReason" type="DataAbsentReason">
      <xs:annotation>
        <xs:documentation>Specifies why the normally expected content of the data element is missing</xs:documentation>
     </xs:annotation>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:simpleType name="ResourceType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Conformance">
        <xs:annotation>
          <xs:documentation>A conformance statement returned by request in an RESTful framework</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Document">
        <xs:annotation>
          <xs:documentation>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</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Message">
        <xs:annotation>
          <xs:documentation>A message that contains FHIR resources</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Animal">
        <xs:annotation>
          <xs:documentation>An animal that has relevance to the care process -usually this is for animals that are patients.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Agent">
        <xs:annotation>
          <xs:documentation>A person who represents an organisation, and is authorised to perform actions on it's behalf</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MessageConformance">
        <xs:annotation>
          <xs:documentation>A conformance statement about how an application uses FHIR messaging</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Organization">
        <xs:annotation>
          <xs:documentation>For any organization/institution/government department that has relevance to the care process</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Prescription">
        <xs:annotation>
          <xs:documentation>Directions provided by a prescribing practitioner for a specific medication to be administered to an individual</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Profile">
        <xs:annotation>
          <xs:documentation>A Resource Profile - a statement of constraint on one or more Resources and/or Concept Domains</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="InterestOfCare">
        <xs:annotation>
          <xs:documentation>Yet to be defined</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Admission">
        <xs:annotation>
          <xs:documentation>Yet to be defined</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Specimen">
        <xs:annotation>
          <xs:documentation>Yet to be defined</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Device">
        <xs:annotation>
          <xs:documentation>Yet to be defined</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Patient">
        <xs:annotation>
          <xs:documentation>A patient is a person or animal that is receiving care</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Group">
        <xs:annotation>
          <xs:documentation>Yet to be defined</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Person">
        <xs:annotation>
          <xs:documentation>A person who is involved in the healthcare process</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LabReport">
        <xs:annotation>
          <xs:documentation>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</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DocumentConformance">
        <xs:annotation>
          <xs:documentation>A conformance statement about how one or more FHIR documents</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ResourceReference" block="extension">
    <xs:sequence>
      <xs:element name="type" type="ResourceType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>the mime type of the content</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="id" type="id-simple" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Id of the reference</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="version" type="id-simple" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Version specific Id of the reference</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="text" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Text summary for the reference</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:complexType name="Extension">
    <xs:sequence>
      <xs:element name="code" type="id-simple" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The code that identifies the meaning of the extension by reference to the definitions</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="definition" type="xs:anyURI" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Source of the definition for the code - a namespace or a URL</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ref" type="id-simple" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Internal reference to context of the extension - a pointer to an xml:id in the same resource</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="state" type="ExtensionState" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The state or the extension - whether readers must must understand, or whether it's superceded by being defined in the resource</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:choice minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Value of extension - any of the types defined in the data types</xs:documentation>
        </xs:annotation>
       <xs:element name="valueBoolean">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="boolean">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueInteger">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="integer">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueDecimal">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="decimal">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueBase64Binary">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="base64Binary">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueInstant">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="instant">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueString">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="string">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueUri">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="uri">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueCode">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="code">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueOid">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="oid">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueUuid">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="uuid">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueSid">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="sid">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueId">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="id">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueDate">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="date">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueDateTime">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="dateTime">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueAttachment">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Attachment">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueIdentifier">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Identifier">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueCodeableConcept">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="CodeableConcept">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueCoding">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Coding">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueChoice">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Choice">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueQuantity">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Quantity">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueInterval_Quantity">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Interval_Quantity">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueInterval_DateTime">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Interval_DateTime">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueInterval_Date">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Interval_Date">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueRatio">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Ratio">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueHumanId">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="HumanId">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueHumanName">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="HumanName">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueAddress">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Address">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueContact">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Contact">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueSchedule">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Schedule">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="valueResource">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="ResourceReference">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
      </xs:choice>
      <xs:element name="extension" type="Extension" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Nested Extensions - further extensions that are part of the extension</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="ExtensionState">
    <xs:restriction base="xs:string">
      <xs:enumeration value="must-understand">
        <xs:annotation>
          <xs:documentation>The extension contains information that qualifies or negates another element, and must be understood by an application processing the resource</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="superceded">
        <xs:annotation>
          <xs:documentation>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</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="Constraint">
    <xs:sequence>
      <xs:element name="type" type="code-simple" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The Type of the resource being described</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="profile" type="xs:anyURI" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Reference to a resource profile which includes the constraint statement that applies to this resource</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The name of this aggregation profile</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="purpose" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Human summary: why describe this resource?</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="element" type="Constraint.Element" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="Constraint.Element">
    <xs:sequence>
      <xs:element name="path" type="xs:string" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The path of the element (see the formal definitions)</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Name this constraint for re-use &amp; unrolling</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="purpose" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Human summary: why describe this element?</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="min" type="xs:int" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Minimum Cardinality</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="max" type="code-simple" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Maximum Cardinality (a number or *)</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="type" type="code-simple" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Type of the element</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="conformance" type="ConformanceType" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Mandatory|Conditional|Optional|Prohibited</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="condition" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Condition if conformance=Conditional</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="mustSupport" type="xs:boolean" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>If the element must be usable</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="mustUnderstand" type="xs:boolean" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>If the element must be understood</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="definition" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>More specific definition</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="mapping" type="Constraint.Mapping" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element name="resource" type="Constraint.Resource" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>If context includes aggregation and type=Resource()</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="valueSet" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Value set id (only if coded)</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="value" type="Constraint.Value" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:complexType name="Constraint.Resource">
    <xs:sequence>
      <xs:element name="aggregated" type="xs:boolean" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Whether this resource is aggregated</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="profile" type="xs:anyURI" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Reference to a Resource Profile</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:complexType name="Constraint.Mapping">
    <xs:sequence>
      <xs:element name="target" type="xs:string" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Which mapping this is (v2, CDA, openEHR, etc)</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="map" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Details of the mapping</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:complexType name="Constraint.Value">
    <xs:sequence>
      <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Reference to another element by element.name</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:choice minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Fixed value: [as defined for type]</xs:documentation>
        </xs:annotation>
       <xs:element name="boolean">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="boolean">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="integer">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="integer">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="decimal">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="decimal">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="base64Binary">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="base64Binary">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="instant">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="instant">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="string">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="string">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="uri">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="uri">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="code">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="code">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="oid">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="oid">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="uuid">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="uuid">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="sid">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="sid">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="id">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="id">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="date">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="date">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="dateTime">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="dateTime">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="Attachment">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Attachment">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="Identifier">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Identifier">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="CodeableConcept">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="CodeableConcept">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="Coding">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Coding">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="Choice">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Choice">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="Quantity">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Quantity">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="Interval_Quantity">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Interval_Quantity">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="Interval_DateTime">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Interval_DateTime">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="Interval_Date">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Interval_Date">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="Ratio">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Ratio">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="HumanId">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="HumanId">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="HumanName">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="HumanName">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="Address">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Address">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="Contact">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Contact">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="Schedule">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="Schedule">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="Resource">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="ResourceReference">
               <xs:attributeGroup ref="dataAbsentReason"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
      </xs:choice>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:simpleType name="ConformanceType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Mandatory">
        <xs:annotation>
          <xs:documentation>The element is or must always be present without a dataAbsentReason</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Conditional">
        <xs:annotation>
          <xs:documentation>The element may need to be present (with no dataAbsentReasons) depending on the condition</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Optional">
        <xs:annotation>
          <xs:documentation>The element may or may not be present</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Prohibited">
        <xs:annotation>
          <xs:documentation>The element can not present or will be rejected if received</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="Narrative">
    <xs:sequence>
      <xs:element name="status" type="NarrativeStatus" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The status of the narrative - whether it is entirely generated (from just the defined data or the extensions too), or whether a human authored it, and it may contain additional data</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element ref="xhtml:div" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The actual narrative content, a stripped down version of XHTML</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="image" type="Narrative.Image" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>An image referred to directly in the xhtml</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="map" type="Narrative.Map" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>A map from the narrative contents to the resource elements - an assertion that the text describes the some content as the data item describes</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="Narrative.Map">
    <xs:sequence>
      <xs:element name="text" type="id-simple" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The narrative end of the mapping</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="data" type="id-simple" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The resource element end of the mapping</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="source" type="NarrativeMapSource" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Which end of the mapping is the source</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:complexType name="Narrative.Image">
    <xs:sequence>
      <xs:element name="mimeType" type="code-simple" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>mime type of image</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="content" type="xs:base64Binary" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>base64 image data</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:simpleType name="NarrativeStatus">
    <xs:restriction base="xs:string">
      <xs:enumeration value="generated">
        <xs:annotation>
          <xs:documentation>The contents of the narrative are entirely generated from the structured data in the resource.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="extensions">
        <xs:annotation>
          <xs:documentation>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</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="additional">
        <xs:annotation>
          <xs:documentation>The contents of the narrative contain additional information not found in the structured data</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="NarrativeMapSource">
    <xs:restriction base="xs:string">
      <xs:enumeration value="text">
        <xs:annotation>
          <xs:documentation>The text is the original data</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="data">
        <xs:annotation>
          <xs:documentation>The data is the original data</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="Coding">
    <xs:sequence>
      <xs:element name="code" type="code-simple" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>A symbol in syntax defined by the system. The symbol may be a predefined code, or an expression in a syntax defined by the coding system</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="system" type="xs:anyURI" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The identification of the system that defines the meaning of the symbol in the code. Can be a simple list of enumerations, a list of codes with meanings, or all the way to a complex semantic web such as SNOMED-CT, whether classification, terminology, or ontology</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="display" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>A representation of the meaning of the code in the system, following the rules laid out by the system. </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:complexType name="Interval_Quantity">
    <xs:sequence>
      <xs:element name="low" type="Quantity" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The low value. The boundary is inclusive.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="high" type="Quantity" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The high value. The boundary is inclusive. See discussion in specification regarding how the high value boundary is interpreted for dates</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:complexType name="Interval_DateTime">
    <xs:sequence>
      <xs:element name="low" type="dateTime" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The low value. The boundary is inclusive.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="high" type="dateTime" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The high value. The boundary is inclusive. See discussion in specification regarding how the high value boundary is interpreted for dates</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:complexType name="Interval_Date">
    <xs:sequence>
      <xs:element name="low" type="date" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The low value. The boundary is inclusive.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="high" type="date" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The high value. The boundary is inclusive. See discussion in specification regarding how the high value boundary is interpreted for dates</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:complexType name="Quantity">
    <xs:sequence>
      <xs:element name="value" type="xs:decimal" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The value of the measured amount. The value includes an implicit precision in the presentation of the value</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="status" type="QuantityStatus" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>how the value should be understood and represented - whether the actual value is greater or less than the mesaure due to measurement issues</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="units" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>A human readable form of the units</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="code" type="code-simple" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>A computer processible form of the units in some unit representation system</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="system" type="xs:anyURI" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The identification of the system that provides the coded form of the unit</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:simpleType name="QuantityStatus">
    <xs:restriction base="xs:string">
      <xs:enumeration value="&lt;">
        <xs:annotation>
          <xs:documentation>The actual value is less than the given value</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="&lt;=">
        <xs:annotation>
          <xs:documentation>The actual value is less than or equal to the given value</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value=">=">
        <xs:annotation>
          <xs:documentation>The actual value is greater than or equal to the given value</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value=">">
        <xs:annotation>
          <xs:documentation>The actual value is greater than the given value</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="Choice">
    <xs:sequence>
      <xs:element name="code" type="code-simple" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The code or value that the user selected from the list of possible codes</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="value" type="Choice.Value" minOccurs="1" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>A list of possible values for the code</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="isOrdered" type="xs:boolean" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Whether the order of the values has an assigned meaning</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:complexType name="Choice.Value">
    <xs:sequence>
      <xs:element name="code" type="code-simple" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>A possible code or value that the user could have chosen</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="display" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>A set of words associated with the code to give it meaning, if any exist</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:complexType name="Attachment">
    <xs:sequence>
      <xs:element name="mimeType" type="code-simple" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="data" type="xs:base64Binary" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The actual data of the attachment - a sequence of bytes. In XML, represented using base64</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="url" type="xs:anyURI" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>An alternative location where the data can be accessed</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="hash" type="xs:base64Binary" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The calculated hash of the data using SHA-256. In XML, represented using base64</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="lang" type="code-simple" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The language that the attachment is in</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="title" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>A name to display in place of the data</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:complexType name="Ratio">
    <xs:sequence>
      <xs:element name="numerator" type="Quantity" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The numerator</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="denominator" type="Quantity" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The denominator</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:complexType name="CodeableConcept">
    <xs:sequence>
      <xs:element name="coding" type="Coding" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>A reference to a code defined by a terminology system </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="text" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>A human language representation of the concept as seen/selected/uttered by the user who entered the data, and/or which represents the intended meaning of the user or concept</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="primary" type="id-simple" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Indicates which of the codes in the codings was chosen by a user, if one was chosen directly</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:complexType name="Identifier">
    <xs:sequence>
      <xs:element name="system" type="xs:anyURI" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The actual data of the attachment</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:complexType name="Count">
    <xs:complexContent>
      <xs:restriction base="Quantity">
        <xs:sequence>
      <xs:element name="value" type="xs:decimal" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The value of the measured amount. The value includes an implicit precision in the presentation of the value</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="status" type="QuantityStatus" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>how the value should be understood and represented - whether the actual value is greater or less than the mesaure due to measurement issues</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="units" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>A human readable form of the units</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="code" type="code-simple" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>A computer processible form of the units in some unit representation system</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="system" type="xs:anyURI" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The identification of the system that provides the coded form of the unit</xs:documentation>
        </xs:annotation>
      </xs:element>
        </xs:sequence>
        <xs:attribute ref="xml:id"/>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Money">
    <xs:complexContent>
      <xs:restriction base="Quantity">
        <xs:sequence>
      <xs:element name="value" type="xs:decimal" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The value of the measured amount. The value includes an implicit precision in the presentation of the value</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="status" type="QuantityStatus" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>how the value should be understood and represented - whether the actual value is greater or less than the mesaure due to measurement issues</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="units" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>A human readable form of the units</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="code" type="code-simple" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>A computer processible form of the units in some unit representation system</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="system" type="xs:anyURI" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The identification of the system that provides the coded form of the unit</xs:documentation>
        </xs:annotation>
      </xs:element>
        </xs:sequence>
        <xs:attribute ref="xml:id"/>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Distance">
    <xs:complexContent>
      <xs:restriction base="Quantity">
        <xs:sequence>
      <xs:element name="value" type="xs:decimal" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The value of the measured amount. The value includes an implicit precision in the presentation of the value</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="status" type="QuantityStatus" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>how the value should be understood and represented - whether the actual value is greater or less than the mesaure due to measurement issues</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="units" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>A human readable form of the units</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="code" type="code-simple" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>A computer processible form of the units in some unit representation system</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="system" type="xs:anyURI" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The identification of the system that provides the coded form of the unit</xs:documentation>
        </xs:annotation>
      </xs:element>
        </xs:sequence>
        <xs:attribute ref="xml:id"/>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Duration">
    <xs:complexContent>
      <xs:restriction base="Quantity">
        <xs:sequence>
      <xs:element name="value" type="xs:decimal" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The value of the measured amount. The value includes an implicit precision in the presentation of the value</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="status" type="QuantityStatus" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>how the value should be understood and represented - whether the actual value is greater or less than the mesaure due to measurement issues</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="units" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>A human readable form of the units</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="code" type="code-simple" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>A computer processible form of the units in some unit representation system</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="system" type="xs:anyURI" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The identification of the system that provides the coded form of the unit</xs:documentation>
        </xs:annotation>
      </xs:element>
        </xs:sequence>
        <xs:attribute ref="xml:id"/>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Schedule">
    <xs:sequence>
      <xs:element name="event" type="Interval_DateTime" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>When the event occurs</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="repeat" type="Schedule.Repeat" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Only if there is none or one event</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:complexType name="Schedule.Repeat">
    <xs:sequence>
      <xs:element name="frequency" type="xs:int" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Event occurs frequency times per duration</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="when" type="EventTiming" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Event occurs duration from common life event</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="duration" type="Duration" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>repeating or event-related duration</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="count" type="xs:int" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>number of times to repeat</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="end" type="dateTime-simple" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>when to stop repeats</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:simpleType name="EventTiming">
    <xs:restriction base="xs:string">
      <xs:enumeration value="HS">
        <xs:annotation>
          <xs:documentation>event occurs duration before the hour of sleep (or trying to)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="WAKE">
        <xs:annotation>
          <xs:documentation>event occurs duration after waking</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AC">
        <xs:annotation>
          <xs:documentation>event occurs duration before a meal (from the latin ante cibus)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ACM">
        <xs:annotation>
          <xs:documentation>event occurs duration before breakfast (from the latin ante cibus matutinus)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ACD">
        <xs:annotation>
          <xs:documentation>event occurs duration before lunch (from the latin ante cibus diurnus)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ACV">
        <xs:annotation>
          <xs:documentation>event occurs duration before dinner (from the latin ante cibus vespertinus)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PC">
        <xs:annotation>
          <xs:documentation>event occurs duration after a meal (from the latin post cibus)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PCM">
        <xs:annotation>
          <xs:documentation>event occurs duration after breakfast (from the latin post cibus matutinus)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PCD">
        <xs:annotation>
          <xs:documentation>event occurs duration after lunch (from the latin post cibus diurnus)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PCV">
        <xs:annotation>
          <xs:documentation>event occurs duration after dinner (from the latin post cibus vespertinus)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="Contact">
    <xs:sequence>
      <xs:element name="system" type="ContactSystem" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>What kind of contact this is - what communications system is required to make use of the contact</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="value" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The actual contact details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="use" type="ContactUse" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>How to use this address</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="period" type="Interval_DateTime" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Time period when the contact was/is in use</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:simpleType name="ContactSystem">
    <xs:restriction base="xs:string">
      <xs:enumeration value="phone">
        <xs:annotation>
          <xs:documentation>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.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="fax">
        <xs:annotation>
          <xs:documentation>the value is a fax machine. Use of full international numbers starting with + is recommended to enable automatic dialing support but not required.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="email">
        <xs:annotation>
          <xs:documentation>the value is an email address</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="url">
        <xs:annotation>
          <xs:documentation>The value is a url. This is intended for various personal contacts including blogs, twitter, facebook etc. Do not use for email addresses</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="ContactUse">
    <xs:restriction base="xs:string">
      <xs:enumeration value="home">
        <xs:annotation>
          <xs:documentation>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.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="work">
        <xs:annotation>
          <xs:documentation>An office contact. First choice for business related contacts during business hours.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="temp">
        <xs:annotation>
          <xs:documentation>A temporary contact. The period can provide more detailed information.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="old">
        <xs:annotation>
          <xs:documentation>This contact is no longer in use (or was never correct, but retained for records)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="mobile">
        <xs:annotation>
          <xs:documentation>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</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="Address">
    <xs:sequence>
      <xs:element name="use" type="AddressUse" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The use of this address</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="text" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>a full text representation of the address</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="part" type="Address.Part" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>A part of an address</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="period" type="Interval_DateTime" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Time period when address was/is in use</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:complexType name="Address.Part">
    <xs:sequence>
      <xs:element name="type" type="AddressPartType" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Type of address part (see below)</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="value" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The content of the address part</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:simpleType name="AddressUse">
    <xs:restriction base="xs:string">
      <xs:enumeration value="home">
        <xs:annotation>
          <xs:documentation>A communication address at a home.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="work">
        <xs:annotation>
          <xs:documentation>An office address. First choice for business related contacts during business hours.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="temp">
        <xs:annotation>
          <xs:documentation>A temporary address. The period can provide more detailed information.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="old">
        <xs:annotation>
          <xs:documentation>This address is no longer in use (or was never correct, but retained for records)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="AddressPartType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="part">
        <xs:annotation>
          <xs:documentation>Part of an address line (typically used with an extension that further defines the meaning of the part).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="line">
        <xs:annotation>
          <xs:documentation>A line of an address (typically used for street names &amp; numbers, unit details, delivery hints etc) .</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="city">
        <xs:annotation>
          <xs:documentation>The name of the city, town, village, or other community or delivery centre.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="state">
        <xs:annotation>
          <xs:documentation>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).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="country">
        <xs:annotation>
          <xs:documentation>Country. ISO 3166 3 letter codes can be used in place of a full country name.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="zip">
        <xs:annotation>
          <xs:documentation>A postal code designating a region defined by the postal service.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="dpid">
        <xs:annotation>
          <xs:documentation>A value that uniquely identifies the postal address. (often used in barcodes).</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="HumanName">
    <xs:sequence>
      <xs:element name="use" type="NameUse" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The use of this name</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="text" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>a full text representation of the name</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="part" type="HumanName.Part" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>A part of a name</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="period" type="Interval_DateTime" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Time period when name was/is in use</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:complexType name="HumanName.Part">
    <xs:sequence>
      <xs:element name="type" type="NamePartType" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Type of name part</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="value" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The content of the name part</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:simpleType name="NameUse">
    <xs:restriction base="xs:string">
      <xs:enumeration value="usual">
        <xs:annotation>
          <xs:documentation>Known as/conventional/the one you normally use</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="official">
        <xs:annotation>
          <xs:documentation>The formal name as registered in an official (government) registry, but which name might not be commonly used. May be called legal name.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="temp">
        <xs:annotation>
          <xs:documentation>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.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="anonymous">
        <xs:annotation>
          <xs:documentation>Anonymous assigned name, alias, or pseudonym (used to protect a person's identity for privacy reasons)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="old">
        <xs:annotation>
          <xs:documentation>This name is no longer in use (or was never correct, but retained for records)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="maiden">
        <xs:annotation>
          <xs:documentation>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</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="NamePartType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="family">
        <xs:annotation>
          <xs:documentation>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.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="given">
        <xs:annotation>
          <xs:documentation>Given name. NOTE Not to be called first name since given names do not always come first. .</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="title">
        <xs:annotation>
          <xs:documentation>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.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="HumanId">
    <xs:sequence>
      <xs:element name="type" type="Coding" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The type of the identifier - to allow a particular identifier to be picked elsewhere</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="identifier" type="Identifier" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The Actual identifier</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="period" type="Interval_DateTime" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Time period during which identifier was valid for use</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="assigner" type="ResourceReference" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Organisation that issued/manages the identifier</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute ref="xml:id"/>
  </xs:complexType>
  <xs:complexType name="Extensions">
    <xs:sequence>
      <xs:element name="extension" type="Extension" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>An extension value</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:schema>
