<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="1c852171-5195-484b-be01-56fcc8b80275" />
  <meta>
    <versionId value="12" />
    <lastUpdated value="2022-07-13T12:24:19.7018519+00:00" />
    <profile value="https://fhir.cambio.se/StructureDefinition/ObservationGenitalStageMaleLite/v1" />
  </meta>
  <url value="https://fhir.cambio.se/StructureDefinition/ObservationGenitalStageMaleLite/v1" />
  <version value="1.0.0" />
  <name value="ObservationGenitalStageMaleLite" />
  <title value="ObservationGenitalStageMaleLite" />
  <status value="active" />
  <date value="2022-02-21T07:37:25.5804269Z" />
  <description value="This is a generic level use case profile to communicate the Male Genital Stage. This profile can be derived for more specific use case profile. This is used to record the visible stages (tanner stage) of puberty of a male patient." />
  <purpose value="The profile ObservationGenitalStageMale is used for communicating an entry of a genital stage of a male patient by sending a value in the element observation.value. The API can be used to read patient GenitalStage information from COSMIC." />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Pattern" />
  </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/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <mapping>
    <identity value="sct-attr" />
    <uri value="http://snomed.org/attributebinding" />
    <name value="SNOMED CT Attribute Binding" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Observation" />
  <baseDefinition value="https://fhir.cambio.se/StructureDefinition/ObservationGenitalStageMaleCore/v1" />
  <derivation value="constraint" />
  <differential>
    <element id="Observation.implicitRules">
      <path value="Observation.implicitRules" />
      <max value="0" />
    </element>
    <element id="Observation.language">
      <path value="Observation.language" />
      <max value="0" />
    </element>
    <element id="Observation.text">
      <path value="Observation.text" />
      <max value="0" />
    </element>
    <element id="Observation.contained">
      <path value="Observation.contained" />
      <max value="0" />
    </element>
    <element id="Observation.basedOn">
      <path value="Observation.basedOn" />
      <max value="0" />
    </element>
    <element id="Observation.partOf">
      <path value="Observation.partOf" />
      <max value="0" />
    </element>
    <element id="Observation.status">
      <path value="Observation.status" />
      <fixedCode value="preliminary | final | amended | entered-in-error" />
      <binding>
        <strength value="required" />
        <description value="The status of th result value. FHIR - Cambio preliminary -&gt; unsigned final -&gt; signed and completednonSignable entered in error -&gt; invalidated cancelled -&gt; removed amended -&gt; resigned" />
        <valueSet value="https://cambio.codes/fhir/vs/vital-sign-status/v1" />
      </binding>
    </element>
    <element id="Observation.category">
      <path value="Observation.category" />
      <max value="0" />
    </element>
    <element id="Observation.code.coding">
      <path value="Observation.code.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Observation.subject.identifier:personnummer">
      <path value="Observation.subject.identifier" />
      <sliceName value="personnummer" />
    </element>
    <element id="Observation.subject.identifier:personnummer.period">
      <path value="Observation.subject.identifier.period" />
      <constraint>
        <key value="per-1" />
        <severity value="error" />
        <human value="If present, start SHALL have a lower value than end" />
        <source value="http://hl7.org/fhir/StructureDefinition/ContactPoint" />
      </constraint>
    </element>
    <element id="Observation.subject.identifier:samordningsnummer">
      <path value="Observation.subject.identifier" />
      <sliceName value="samordningsnummer" />
    </element>
    <element id="Observation.subject.identifier:samordningsnummer.period">
      <path value="Observation.subject.identifier.period" />
      <constraint>
        <key value="per-1" />
        <severity value="error" />
        <human value="If present, start SHALL have a lower value than end" />
        <source value="http://hl7.org/fhir/StructureDefinition/ContactPoint" />
      </constraint>
    </element>
    <element id="Observation.focus">
      <path value="Observation.focus" />
      <max value="0" />
    </element>
    <element id="Observation.issued">
      <path value="Observation.issued" />
      <max value="0" />
    </element>
    <element id="Observation.performer">
      <path value="Observation.performer" />
      <min value="1" />
      <max value="2" />
    </element>
    <element id="Observation.value[x]">
      <path value="Observation.value[x]" />
      <constraint>
        <key value="qty-3" />
        <severity value="error" />
        <human value="If a code for the unit is present, the system SHALL also be present" />
        <expression value="code.empty() or system.exists()" />
        <xpath value="not(exists(f:code)) or exists(f:system)" />
        <source value="http://hl7.org/fhir/StructureDefinition/Quantity" />
      </constraint>
    </element>
    <element id="Observation.value[x].coding">
      <path value="Observation.value[x].coding" />
      <min value="1" />
    </element>
    <element id="Observation.value[x].coding.code">
      <path value="Observation.value[x].coding.code" />
      <binding>
        <strength value="required" />
        <valueSet value="https://fhir.cambio.se/ValueSet/TannerBoysGenitalDevelopmentStage/v1" />
      </binding>
    </element>
    <element id="Observation.dataAbsentReason.coding">
      <path value="Observation.dataAbsentReason.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Observation.dataAbsentReason.coding.system">
      <path value="Observation.dataAbsentReason.coding.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/data-absent-reason" />
    </element>
    <element id="Observation.dataAbsentReason.coding.code">
      <path value="Observation.dataAbsentReason.coding.code" />
      <min value="1" />
      <fixedCode value="unsupported" />
    </element>
    <element id="Observation.dataAbsentReason.text">
      <path value="Observation.dataAbsentReason.text" />
      <short value="Comment/note about the observation when the value is empty" />
    </element>
    <element id="Observation.interpretation">
      <path value="Observation.interpretation" />
      <max value="0" />
    </element>
    <element id="Observation.bodySite">
      <path value="Observation.bodySite" />
      <max value="0" />
    </element>
    <element id="Observation.method">
      <path value="Observation.method" />
      <max value="0" />
    </element>
    <element id="Observation.specimen">
      <path value="Observation.specimen" />
      <max value="0" />
    </element>
    <element id="Observation.device">
      <path value="Observation.device" />
      <max value="0" />
    </element>
    <element id="Observation.referenceRange">
      <path value="Observation.referenceRange" />
      <max value="0" />
    </element>
    <element id="Observation.referenceRange.low">
      <path value="Observation.referenceRange.low" />
      <constraint>
        <key value="qty-3" />
        <severity value="error" />
        <human value="If a code for the unit is present, the system SHALL also be present" />
        <source value="http://hl7.org/fhir/StructureDefinition/Quantity" />
      </constraint>
    </element>
    <element id="Observation.referenceRange.high">
      <path value="Observation.referenceRange.high" />
      <constraint>
        <key value="qty-3" />
        <severity value="error" />
        <human value="If a code for the unit is present, the system SHALL also be present" />
        <source value="http://hl7.org/fhir/StructureDefinition/Quantity" />
      </constraint>
    </element>
    <element id="Observation.hasMember">
      <path value="Observation.hasMember" />
      <max value="0" />
    </element>
    <element id="Observation.derivedFrom">
      <path value="Observation.derivedFrom" />
      <max value="0" />
    </element>
    <element id="Observation.component">
      <path value="Observation.component" />
      <max value="0" />
    </element>
    <element id="Observation.component.value[x]">
      <path value="Observation.component.value[x]" />
      <constraint>
        <key value="qty-3" />
        <severity value="error" />
        <human value="If a code for the unit is present, the system SHALL also be present" />
        <expression value="code.empty() or system.exists()" />
        <xpath value="not(exists(f:code)) or exists(f:system)" />
        <source value="http://hl7.org/fhir/StructureDefinition/Quantity" />
      </constraint>
    </element>
    <element id="Observation.component.referenceRange">
      <path value="Observation.component.referenceRange" />
      <contentReference value="http://hl7.org/fhir/StructureDefinition/Observation#Observation.referenceRange" />
    </element>
  </differential>
</StructureDefinition>