<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="bc-MaternalRecord" />
  <url value="http://nictiz.nl/fhir/StructureDefinition/bc-MaternalRecord" />
  <version value="1.3.3" />
  <name value="bc-MaternalRecord" />
  <title value="bc-MaternalRecord" />
  <status value="active" />
  <publisher value="Nictiz" />
  <contact>
    <name value="Nictiz" />
    <telecom>
      <system value="email" />
      <value value="geboortezorg@nictiz.nl" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="An EpisodeOfCare profile describing a maternal record (or pregnancy file) as defined by BabyConnect. &#xD;&#xA;Each pregnancy is a Condition. It is also represented as an EpisodeOfCare (maternal record) for each involved Organization. The maternal record defines care responsibility for a specific period of time and groups all data related to this period of care. The maternal record has a fixed type (.type = 364320009). Additional types may be provided to indicate a specific period of care. The maternal record includes references to a managing Organization and responsible Practitioner. &#xD;&#xA;&#xD;&#xA;The maternal record defines care responsibility for a specific period of time and groups all data related to this period of care:&#xD;&#xA;1. The maternal record groups all data related to one pregnancy for the managing Organization &#xD;&#xA;2. The groupIdentifier (.extension:groupIdentifier) is a unique identifier of the pregnancy which can be used to group all data related to one pregnancy across Organizations&#xD;&#xA;&#xD;&#xA;Relations between the pregnancy (Condition) and the maternal record (EpisodeOfCare):&#xD;&#xA;* Condition points to the EpisodeOfCare through a EpisodeOfCare.context.reference element. &#xD;&#xA;* EpisodeOfCare points to the Condition through a EpisodeOfCare.diagnosis.condition element.&#xD;&#xA;* Condition and EpisodeOfCare both point to the Patient with .subject.reference&#xD;&#xA;* Condition.clinicalStatus and EpisodeOfCare.status must be 'active' for ongoing pregnancies &#xD;&#xA;* Condition.clinicalStatus must be 'inactive' and EpisodeOfCare.status must be 'finished' for past pregnancies" />
  <copyright value="CC0" />
  <fhirVersion value="3.0.2" />
  <mapping>
    <identity value="hcim-concernfortransfer-v1.2-2015EN" />
    <uri value="https://zibs.nl/wiki/ConcernForTransfer-v1.2(2015EN)" />
    <name value="HCIM ConcernForTransfer-v1.2(2015EN)" />
  </mapping>
  <mapping>
    <identity value="hcim-basicelements-v1.0-2017EN" />
    <uri value="https://zibs.nl/wiki/BasicElements-v1.0(2017EN)" />
    <name value="HCIM BasicElements-v1.0(2017EN)" />
  </mapping>
  <mapping>
    <identity value="gebz-peri-v2.3" />
    <uri value="https://decor.nictiz.nl/art-decor/decor-datasets--peri20-?id=2.16.840.1.113883.2.4.3.11.60.90.77.1.6&amp;effectiveDate=2016-09-08T00%3A00%3A00&amp;conceptId=2.16.840.1.113883.2.4.3.11.60.90.77.2.6.40050&amp;conceptEffectiveDate=2016-09-08T00%3A00%3A00" />
    <name value="Geboortezorg Perinatologie 2.3" />
  </mapping>
  <mapping>
    <identity value="gebz-peri-v3.2" />
    <uri value="https://decor.nictiz.nl/art-decor/decor-datasets-\-peri20-?id=2.16.840.1.113883.2.4.3.11.60.90.77.1.6&amp;effectiveDate=2016-09-08T00%3A00%3A00&amp;conceptId=2.16.840.1.113883.2.4.3.11.60.90.77.2.6.4&amp;conceptEffectiveDate=2016-09-08T00%3A00%3A00" />
    <name value="Geboortezorg 3.2" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="EpisodeOfCare" />
  <baseDefinition value="http://fhir.nl/fhir/StructureDefinition/nl-core-episodeofcare" />
  <derivation value="constraint" />
  <differential>
    <element id="EpisodeOfCare">
      <path value="EpisodeOfCare" />
      <mapping>
        <identity value="gebz-peri-v2.3" />
        <map value="peri23-dataelement-4" />
        <comment value="Zorgverlening" />
      </mapping>
      <mapping>
        <identity value="gebz-peri-v3.2" />
        <map value="peri32-dataelement-3399" />
        <comment value="ZorgEpisode" />
      </mapping>
      <mapping>
        <identity value="gebz-peri-v3.2" />
        <map value="peri32-dataelement-25" />
        <comment value="Zwangerschapsgegevens" />
      </mapping>
      <mapping>
        <identity value="gebz-peri-v3.2" />
        <map value="peri32-dataelement-9823" />
        <comment value="Kraamweek" />
      </mapping>
    </element>
    <element id="EpisodeOfCare.extension:dateFirstEncounter">
      <path value="EpisodeOfCare.extension" />
      <sliceName value="dateFirstEncounter" />
    </element>
    <element id="EpisodeOfCare.extension:dateLastEncounter">
      <path value="EpisodeOfCare.extension" />
      <sliceName value="dateLastEncounter" />
    </element>
    <element id="EpisodeOfCare.extension:title">
      <path value="EpisodeOfCare.extension" />
      <sliceName value="title" />
      <mapping>
        <identity value="gebz-peri-v3.2" />
        <map value="peri32-dataelement-3404" />
        <comment value="ZorgEpisodeNaam" />
      </mapping>
    </element>
    <element id="EpisodeOfCare.extension:comment">
      <path value="EpisodeOfCare.extension" />
      <sliceName value="comment" />
      <type>
        <code value="Extension" />
        <profile value="http://nictiz.nl/fhir/StructureDefinition/Comment" />
      </type>
      <mapping>
        <identity value="gebz-peri-v3.2" />
        <map value="peri32-dataelement-3405" />
        <comment value="Toelichting" />
      </mapping>
    </element>
    <element id="EpisodeOfCare.extension:groupIdentifier">
      <path value="EpisodeOfCare.extension" />
      <sliceName value="groupIdentifier" />
      <short value="groupIdentifier" />
      <definition value="A groupIdentifier for the pregnancy across care providers. &#xD;&#xA;&#xD;&#xA;The formula that should be used to calculate the groupIdentifier is: [the age of the woman in days on the day of conception] div 14. &#xD;&#xA;For example, if the date of conception is 3-10-2011, the woman (born 9-4-1985) is aged 9673 days. The groupIdentifier of the pregnancy  will be 691. If the date of conception is unknown the last date of menstruation (date of menstruation minus 14 days) or the term date (term date minus 267 days) can be used to calculate the date of conception. &#xD;&#xA;&#xD;&#xA;Please note that this identification should be used in combination with a unique identification for the pregnant woman to relate all data of this pregnancy across health care providers. Please be aware that although this formula allows for some uncertainty in the date of conception, there is a small chance that the identifier deviates accross organizations when there is a difference in the estimated date of conception." />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://nictiz.nl/fhir/StructureDefinition/bc-episodeofcare-groupIdentifier" />
      </type>
    </element>
    <element id="EpisodeOfCare.extension:groupIdentifier.valueIdentifier:valueIdentifier">
      <path value="EpisodeOfCare.extension.valueIdentifier" />
      <sliceName value="valueIdentifier" />
      <mapping>
        <identity value="gebz-peri-v3.2" />
        <map value="peri32-dataelement-1698" />
        <comment value="Identificatie van de zwangerschap" />
      </mapping>
    </element>
    <element id="EpisodeOfCare.identifier">
      <path value="EpisodeOfCare.identifier" />
      <mapping>
        <identity value="gebz-peri-v3.2" />
        <map value="peri32-dataelement-3338" />
        <comment value="Identificatie zorgepisode" />
      </mapping>
      <mapping>
        <identity value="gebz-peri-v3.2" />
        <map value="peri32-dataelement-8873" />
        <comment value="Identificatie zorgepisode" />
      </mapping>
      <mapping>
        <identity value="gebz-peri-v3.2" />
        <map value="peri32-dataelement-4042" />
        <comment value="Dossiernummer" />
      </mapping>
    </element>
    <element id="EpisodeOfCare.status">
      <path value="EpisodeOfCare.status" />
      <mapping>
        <identity value="gebz-peri-v3.2" />
        <map value="peri32-dataelement-2164" />
        <comment value="StatusZorgepisode" />
      </mapping>
    </element>
    <element id="EpisodeOfCare.type.coding">
      <path value="EpisodeOfCare.type.coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="EpisodeOfCare.type.coding:maternalRecord">
      <path value="EpisodeOfCare.type.coding" />
      <sliceName value="maternalRecord" />
      <short value="Maternal record code" />
      <definition value="Use this code to indicate the overarching maternal record of an organization. For a specific period of perinatal care use the perinatal period code instead." />
      <min value="1" />
      <max value="1" />
      <patternCoding>
        <system value="http://snomed.info/sct" />
        <code value="364320009" />
      </patternCoding>
    </element>
    <element id="EpisodeOfCare.type.coding:perinatalPeriod">
      <path value="EpisodeOfCare.type.coding" />
      <sliceName value="perinatalPeriod" />
      <short value="Perinatal period code" />
      <definition value="Use this code to specify a perinatal period in which care responsibility was assumed. In case a perinatal period is given, the record will be part of an overarching maternal care record as specified in the partOf element." />
      <max value="1" />
      <binding>
        <strength value="required" />
        <description value="PeriodeZorgverlening" />
        <valueSetReference>
          <reference value="http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.11.94--20161201093828" />
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="gebz-peri-v2.3" />
        <map value="peri23-dataelement-20355" />
        <comment value="Eindverantwoordelijk in welke perinatale periode?" />
      </mapping>
    </element>
    <element id="EpisodeOfCare.diagnosis">
      <path value="EpisodeOfCare.diagnosis" />
      <max value="1" />
    </element>
    <element id="EpisodeOfCare.diagnosis.condition">
      <path value="EpisodeOfCare.diagnosis.condition" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/zib-Pregnancy" />
      </type>
      <mapping>
        <identity value="gebz-peri-v2.3" />
        <map value="peri23-dataelement-3" />
        <comment value="Zwangerschap" />
      </mapping>
      <mapping>
        <identity value="gebz-peri-v3.2" />
        <map value="peri32-dataelement-3402" />
        <comment value="FocusZorgEpisode" />
      </mapping>
    </element>
    <element id="EpisodeOfCare.patient">
      <path value="EpisodeOfCare.patient" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/bc-Woman" />
      </type>
      <mapping>
        <identity value="gebz-peri-v2.3" />
        <map value="peri23-dataelement-2" />
        <comment value="Vrouw" />
      </mapping>
    </element>
    <element id="EpisodeOfCare.period.start">
      <path value="EpisodeOfCare.period.start" />
      <mapping>
        <identity value="gebz-peri-v2.3" />
        <map value="peri23-dataelement-20290" />
        <comment value="Datum start zorgverantwoordelijkheid" />
      </mapping>
      <mapping>
        <identity value="gebz-peri-v3.2" />
        <map value="peri32-dataelement-3400" />
        <comment value="BeginDatum" />
      </mapping>
    </element>
    <element id="EpisodeOfCare.period.end">
      <path value="EpisodeOfCare.period.end" />
      <mapping>
        <identity value="gebz-peri-v2.3" />
        <map value="peri23-dataelement-20340" />
        <comment value="Datum einde zorgverantwoordelijkheid" />
      </mapping>
      <mapping>
        <identity value="gebz-peri-v3.2" />
        <map value="peri32-dataelement-3401" />
        <comment value="EindDatum" />
      </mapping>
    </element>
    <element id="EpisodeOfCare.careManager">
      <path value="EpisodeOfCare.careManager" />
      <mapping>
        <identity value="gebz-peri-v3.2" />
        <map value="peri32-dataelement-8822" />
        <comment value="ZorgEpisodeVerantwoordelijke" />
      </mapping>
      <mapping>
        <identity value="gebz-peri-v3.2" />
        <map value="peri32-dataelement-1699" />
        <comment value="Coordinerend zorgverlener" />
      </mapping>
    </element>
    <element id="EpisodeOfCare.team">
      <path value="EpisodeOfCare.team" />
      <mapping>
        <identity value="gebz-peri-v3.2" />
        <map value="peri32-dataelement-1679" />
        <comment value="Specialist" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>