<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="hspc-gravidity" />
  <url value="http://fhir.org/guides/hspc/StructureDefinition/hspc-gravidity" />
  <version value="1.0.0" />
  <name value="HSPC Gravidity Measurement" />
  <status value="draft" />
  <date value="2017-05-01" />
  <publisher value="HSPC" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://healthcaresoa.org" />
    </telecom>
  </contact>
  <fhirVersion value="3.0.0" />
  <mapping>
    <identity value="argonaut-dq-dstu2" />
    <uri value="http://unknown.org/Argonaut DQ DSTU2" />
    <name value="Argonaut DQ DSTU2" />
  </mapping>
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Mapping" />
  </mapping>
  <mapping>
    <identity value="sct-concept" />
    <uri value="http://snomed.info/conceptdomain" />
    <name value="SNOMED CT Concept Domain Binding" />
  </mapping>
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/w5" />
    <name value="W5 Mapping" />
  </mapping>
  <mapping>
    <identity value="sct-attr" />
    <uri value="http://snomed.info/sct" />
    <name value="SNOMED CT Attribute Binding" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Observation" />
  <baseDefinition value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-observationresults" />
  <derivation value="constraint" />
  <differential>
    <element id="Observation:hspcgravidity">
      <path value="Observation" />
      <sliceName value="hspcgravidity" />
      <short value="HSPC Gravidity" />
      <definition value="The HSPC Gravidity profile is based on the US Core Result Observation profile." />
      <alias value="Obs" />
      <constraint>
        <key value="us-core-2" />
        <severity value="error" />
        <human value="If there is no component or related element then either a value[x] or a data absent reason must be present" />
        <expression value="(component.empty() and related.empty()) implies (dataAbsentReason or value)" />
        <xpath value="exists(f:component) or exists(f:related) or exists(f:*[starts-with(local-name(.), 'value)]) or exists(f:dataAbsentReason)" />
      </constraint>
      <mustSupport value="false" />
      <isModifier value="false" />
      <mapping>
        <identity value="argonaut-dq-dstu2" />
        <map value="Observation" />
      </mapping>
    </element>
    <element id="Observation:hspcgravidity.code">
      <path value="Observation.code" />
      <short value="Laboratory Test Name" />
      <definition value="The test that was performed.  A LOINC **SHALL** be used if the concept is present in LOINC." />
      <comment value="The typical patterns for codes are:  1)  a LOINC code either as a  translation from a &quot;local&quot; code or as a primary code, or 2)  a local code only if no suitable LOINC exists,  or 3)  both the local and the LOINC translation.   Systems SHALL be capable of sending the local code if one exists.  When using LOINC , Use either the SHORTNAME or LONG_COMMON_NAME field for the display." />
      <alias value="Test Name" />
      <alias value="Observation Identifer" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <fixedCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="11996-6" />
          <display value="[#]Pregnancies" />
        </coding>
      </fixedCodeableConcept>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
      <mapping>
        <identity value="argonaut-dq-dstu2" />
        <map value="Observation.code" />
      </mapping>
    </element>
    <element id="Observation:hspcgravidity.performer">
      <path value="Observation.performer" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <profile value="http://fhir.org/guides/hspc/StructureDefinition/hspc-provpract" />
      </type>
      <type>
        <code value="Reference" />
        <profile value="http://fhir.org/guides/hspc/StructureDefinition/hspc-organization" />
      </type>
      <type>
        <code value="Reference" />
        <profile value="http://fhir.org/guides/hspc/StructureDefinition/hspc-patient" />
      </type>
      <type>
        <code value="Reference" />
        <profile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Observation:hspcgravidity.valueQuantity">
      <path value="Observation.valueQuantity" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Quantity" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Quantity" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Observation:hspcgravidity.valueQuantity.system">
      <path value="Observation.valueQuantity.system" />
      <type>
        <code value="uri" />
        <profile value="http://hl7.org/fhir/StructureDefinition/uri" />
      </type>
      <fixedUri value="http://unitsofmeasure.org" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Observation:hspcgravidity.valueQuantity.code">
      <path value="Observation.valueQuantity.code" />
      <type>
        <code value="code" />
        <profile value="http://hl7.org/fhir/StructureDefinition/code" />
      </type>
      <fixedCode value="{count}" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Observation:hspcgravidity.bodySite">
      <path value="Observation.bodySite" />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Observation:hspcgravidity.specimen">
      <path value="Observation.specimen" />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="Reference" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Observation:hspcgravidity.device">
      <path value="Observation.device" />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="Reference" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Observation:hspcgravidity.referenceRange">
      <path value="Observation.referenceRange" />
      <min value="0" />
      <max value="0" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Observation:hspcgravidity.related">
      <path value="Observation.related" />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="Reference" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Observation:hspcgravidity.component">
      <path value="Observation.component" />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="Reference" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
  </differential>
</StructureDefinition>