<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="hspc-householdSize" />
  <url value="http://fhir.org/guides/hspc/StructureDefinition/hspc-householdSize" />
  <name value="HSPC Household Size Profile" />
  <status value="draft" />
  <date value="2017-05-11" />
  <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:hspchouseholdsize">
      <path value="Observation" />
      <sliceName value="hspchouseholdsize" />
      <short value="HSPC Household Size Profile" />
      <definition value="HSPC Household Size Profile is based on the US Core Result Observation profile." />
      <comment value="Client’s self-report of the numeric value of the total number of persons living in the household, including the client." />
      <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:hspchouseholdsize.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>
      <mustSupport value="false" />
      <isModifier value="false" />
    </element>
    <element id="Observation:hspchouseholdsize.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:hspchouseholdsize.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:hspchouseholdsize.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:hspchouseholdsize.valueQuantity.code">
      <path value="Observation.valueQuantity.code" />
      <type>
        <code value="code" />
      </type>
      <fixedCode value="{count}" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Observation:hspchouseholdsize.bodySite">
      <path value="Observation.bodySite" />
      <min value="0" />
      <max value="0" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Observation:hspchouseholdsize.method">
      <path value="Observation.method" />
      <min value="0" />
      <max value="0" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Observation:hspchouseholdsize.specimen">
      <path value="Observation.specimen" />
      <min value="0" />
      <max value="0" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Observation:hspchouseholdsize.device">
      <path value="Observation.device" />
      <short value="(Measurement) Device" />
      <definition value="The device used to generate the observation data." />
      <comment value="An extension should be used if further typing of the device is needed.  Devices used to support obtaining an observation can be represented using either an extension or through the Observation.related element." />
      <min value="0" />
      <max value="0" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Observation:hspchouseholdsize.referenceRange">
      <path value="Observation.referenceRange" />
      <short value="Provides guide for interpretation" />
      <definition value="Guidance on how to interpret the value by comparison to a normal or recommended range." />
      <comment value="Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties." />
      <requirements value="Knowing what values are considered &quot;normal&quot; can help evaluate the significance of a particular result. Need to be able to provide multiple reference ranges for different contexts." />
      <min value="0" />
      <max value="0" />
      <mustSupport value="false" />
      <isModifier value="false" />
      <isSummary value="false" />
    </element>
    <element id="Observation:hspchouseholdsize.related">
      <path value="Observation.related" />
      <short value="Resource related to this observation" />
      <definition value="A  reference to another resource (usually another Observation) whose relationship is defined by the relationship type code." />
      <comment value="For a discussion on the ways Observations can assembled in groups together see [Notes below](observation.html#4.20.4)." />
      <requirements value="Normally, an observation will have either a value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and a set of related observations or sometimes a QuestionnaireResponse from which the measure is derived." />
      <min value="0" />
      <max value="0" />
      <base>
        <path value="Observation.related" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="BackboneElement" />
      </type>
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="children().count() &gt; id.count()" />
        <xpath value="@value|f:*|h:div" />
        <source value="Element" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="Relationships established by OBX-4 usage" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="outBoundRelationship" />
      </mapping>
    </element>
    <element id="Observation:hspchouseholdsize.component">
      <path value="Observation.component" />
      <short value="Component results" />
      <definition value="Some observations have multiple component observations.  These component observations are expressed as separate code value pairs that share the same attributes.  Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations." />
      <comment value="For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below." />
      <requirements value="Component observations share the same attributes in the Observation resource as the primary observation and are always treated a part of a single observation (they are not separable).   However, the reference range for the primary observation value is not inherited by the component values and is required when appropriate for each component observation." />
      <min value="0" />
      <max value="0" />
      <base>
        <path value="Observation.component" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="BackboneElement" />
      </type>
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="children().count() &gt; id.count()" />
        <xpath value="@value|f:*|h:div" />
        <source value="Element" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="containment by OBX-4?" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="outBoundRelationship[typeCode=COMP]" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>