Polish National Implementation of HL7 CDA (plcda-)

eZdrowie - Projekt P1

CDA Extensions Schema [Download XSD]

<xs:schema targetNamespace="http://www.csioz.gov.pl/xsd/extPL/r1" elementFormDefault="qualified">
  <xs:import namespace="urn:hl7-org:v3" schemaLocation="CDA.xsd"/>
  <xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
  <!-- Extended V3 data types -->
  <!-- adxp.postalCode -->
  <xs:complexType name="adxp.postalCode">
    <xs:complexContent>
      <xs:extension base="cda:adxp.postalCode">
        <xs:attribute name="postCity" type="cda:st" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <!-- ExtPL domain classes -->
  <!-- InfrastructureRoot -->
  <xs:complexType name="InfrastructureRoot">
    <xs:sequence>
      <xs:element name="realmCode" type="cda:CS" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element name="typeId" type="cda:II" minOccurs="0"/>
      <xs:element name="templateId" type="cda:II" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  <!-- Roles -->
  <!-- Qualification -->
  <xs:complexType name="Qualification">
    <xs:complexContent>
      <xs:extension base="extPL:InfrastructureRoot">
        <xs:sequence>
          <xs:element name="code" type="cda:CD" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="classCode" type="cda:RoleClass" use="required" fixed="QUAL"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <!-- PersonalRelationship -->
  <xs:complexType name="PersonalRelationship">
    <xs:complexContent>
      <xs:extension base="extPL:InfrastructureRoot">
        <xs:sequence>
          <xs:element name="code" type="cda:CD" minOccurs="1" maxOccurs="1"/>
          <xs:element name="person" type="extPL:RelatedPerson" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="classCode" type="cda:RoleClass" use="required" fixed="PRS"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <!-- Reimburser -->
  <xs:complexType name="Reimburser">
    <xs:complexContent>
      <xs:extension base="extPL:InfrastructureRoot">
        <xs:sequence>
          <xs:element name="id" type="cda:II" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="classCode" type="cda:RoleClass" use="required" fixed="UNDWRT"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <!-- Acts -->
  <!-- Document -->
  <xs:complexType name="Document">
    <xs:complexContent>
      <xs:extension base="extPL:InfrastructureRoot">
        <xs:sequence>
          <xs:element name="id" type="cda:II" minOccurs="1" maxOccurs="unbounded"/>
          <xs:element name="code" type="cda:CD" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="classCode" type="cda:ActClass" use="required" fixed="DOC"/>
        <xs:attribute name="moodCode" type="cda:ActMood" use="required" fixed="EVN"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <!-- CoveragePlan -->
  <xs:complexType name="CoveragePlan">
    <xs:complexContent>
      <xs:extension base="extPL:InfrastructureRoot">
        <xs:sequence>
          <xs:element name="code" type="cda:CD" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="classCode" type="cda:ActClass" use="required" fixed="COV"/>
        <xs:attribute name="moodCode" type="cda:ActMood" use="required" fixed="EVN"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <!-- CoverageEligibilityConfirmation -->
  <xs:complexType name="CoverageEligibilityConfirmation">
    <xs:complexContent>
      <xs:extension base="extPL:InfrastructureRoot">
        <xs:sequence>
          <xs:element name="id" type="cda:II" minOccurs="1" maxOccurs="1"/>
          <xs:element name="code" type="cda:CD" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="classCode" type="cda:ActClass" use="required" fixed="ACT"/>
        <xs:attribute name="moodCode" type="cda:ActMood" use="required" fixed="EVN"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <!-- Substitution -->
  <xs:complexType name="Substitution">
    <xs:complexContent>
      <xs:extension base="extPL:InfrastructureRoot">
        <xs:sequence>
          <xs:element name="code" type="cda:CD" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="classCode" type="cda:ActClass" use="required" fixed="SUBST"/>
        <xs:attribute name="moodCode" type="cda:ActMood" use="required"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <!-- ReimbursementRelatedContract -->
  <xs:complexType name="ReimbursementRelatedContract">
    <xs:complexContent>
      <xs:extension base="extPL:InfrastructureRoot">
        <xs:sequence>
          <xs:element name="id" type="cda:II" minOccurs="1" maxOccurs="1"/>
          <xs:element name="code" type="cda:CD" minOccurs="0" maxOccurs="1"/>
          <xs:element name="bounding" type="extPL:BoundingParticipation" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="classCode" type="cda:ActClass" use="required" fixed="CNTRCT"/>
        <xs:attribute name="moodCode" type="cda:ActMood" use="required" fixed="EVN"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <!-- ActRelationships -->
  <!-- PertinentInformation -->
  <xs:complexType name="PertinentInformation">
    <xs:complexContent>
      <xs:extension base="extPL:InfrastructureRoot">
        <xs:choice>
          <xs:element name="entitlementDocument" type="extPL:Document"/>
          <xs:element name="coveragePlan" type="extPL:CoveragePlan"/>
          <xs:element name="coverageEligibilityConfirmation" type="extPL:CoverageEligibilityConfirmation"/>
        </xs:choice>
        <xs:attribute name="typeCode" type="cda:ActRelationshipPertains" use="required" fixed="PERT"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <!-- Coverage -->
  <xs:complexType name="Coverage">
    <xs:complexContent>
      <xs:extension base="extPL:InfrastructureRoot">
        <xs:choice>
          <xs:element name="coveragePlan" type="extPL:CoveragePlan"/>
        </xs:choice>
        <xs:attribute name="typeCode" type="cda:ActRelationshipPertains" use="required" fixed="COVBY"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <!-- ActComponent -->
  <xs:complexType name="ActComponent">
    <xs:complexContent>
      <xs:extension base="extPL:InfrastructureRoot">
        <xs:choice>
          <xs:element name="substitution" type="extPL:Substitution"/>
        </xs:choice>
        <xs:attribute name="typeCode" type="cda:ActRelationshipHasComponent" use="required" fixed="COMP"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <!-- Entities -->
  <!-- RelatedPerson -->
  <xs:complexType name="RelatedPerson">
    <xs:complexContent>
      <xs:extension base="extPL:InfrastructureRoot">
        <xs:sequence>
          <xs:element name="name" type="cda:EN" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="classCode" type="cda:EntityClassLivingSubject" use="required" fixed="PSN"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <!-- Participations -->
  <!-- BoundedByParticipation -->
  <xs:complexType name="BoundedByParticipation">
    <xs:complexContent>
      <xs:extension base="extPL:InfrastructureRoot">
        <xs:sequence>
          <xs:element name="reimbursementRelatedContract" type="extPL:ReimbursementRelatedContract" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="typeCode" type="cda:cs" use="required" fixed="PART"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <!-- BoundingParticipation -->
  <xs:complexType name="BoundingParticipation">
    <xs:complexContent>
      <xs:extension base="extPL:InfrastructureRoot">
        <xs:sequence>
          <xs:element name="reimburser" type="extPL:Reimburser" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="typeCode" type="cda:cs" use="required" fixed="PART"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <!-- Extended CDA R-MIM classes -->
  <!-- ClinicalDocument -->
  <xs:complexType name="ClinicalDocument">
    <xs:complexContent>
      <xs:extension base="cda:POCD_MT000040.ClinicalDocument">
        <xs:sequence>
          <xs:element name="pertinentInformation" type="extPL:PertinentInformation" minOccurs="0" maxOccurs="unbounded"/>
          <xs:element ref="ds:Signature" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <!-- Patient -->
  <xs:complexType name="Patient">
    <xs:complexContent>
      <xs:extension base="cda:POCD_MT000040.Patient">
        <xs:sequence>
          <xs:element name="multipleBirthInd" type="cda:BL" minOccurs="0" maxOccurs="1"/>
          <xs:element name="multipleBirthOrderNumber" type="cda:INT" minOccurs="0" maxOccurs="1"/>
          <xs:element name="personalRelationship" type="extPL:PersonalRelationship" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <!-- Person -->
  <xs:complexType name="Person">
    <xs:complexContent>
      <xs:extension base="cda:POCD_MT000040.Person">
        <xs:sequence>
          <xs:element name="qualifiedEntity" type="extPL:Qualification" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <!-- Supply -->
  <xs:complexType name="Supply">
    <xs:complexContent>
      <xs:extension base="cda:POCD_MT000040.Supply">
        <xs:sequence>
          <xs:element name="component" type="extPL:ActComponent" minOccurs="0" maxOccurs="1"/>
          <xs:element name="coverage" type="extPL:Coverage" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <!-- AssignedEntity-->
  <xs:complexType name="AssignedEntity">
    <xs:complexContent>
      <xs:extension base="cda:POCD_MT000040.AssignedEntity">
        <xs:sequence>
          <xs:element name="boundedBy" type="extPL:BoundedByParticipation" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:schema>