{
  "resourceType": "StructureDefinition",
  "id": "1c852171-5195-484b-be01-56fcc8b80275",
  "meta": {
    "versionId": "12",
    "lastUpdated": "2022-07-13T12:24:19.7018519+00:00",
    "profile": [
      "https://fhir.cambio.se/StructureDefinition/ObservationGenitalStageMaleLite/v1"
    ]
  },
  "url": "https://fhir.cambio.se/StructureDefinition/ObservationGenitalStageMaleLite/v1",
  "version": "1.0.0",
  "name": "ObservationGenitalStageMaleLite",
  "title": "ObservationGenitalStageMaleLite",
  "status": "active",
  "date": "2022-02-21T07:37:25.5804269Z",
  "description": "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": "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": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "sct-concept",
      "uri": "http://snomed.info/conceptdomain",
      "name": "SNOMED CT Concept Domain Binding"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "sct-attr",
      "uri": "http://snomed.org/attributebinding",
      "name": "SNOMED CT Attribute Binding"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "https://fhir.cambio.se/StructureDefinition/ObservationGenitalStageMaleCore/v1",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation.implicitRules",
        "path": "Observation.implicitRules",
        "max": "0"
      },
      {
        "id": "Observation.language",
        "path": "Observation.language",
        "max": "0"
      },
      {
        "id": "Observation.text",
        "path": "Observation.text",
        "max": "0"
      },
      {
        "id": "Observation.contained",
        "path": "Observation.contained",
        "max": "0"
      },
      {
        "id": "Observation.basedOn",
        "path": "Observation.basedOn",
        "max": "0"
      },
      {
        "id": "Observation.partOf",
        "path": "Observation.partOf",
        "max": "0"
      },
      {
        "id": "Observation.status",
        "path": "Observation.status",
        "fixedCode": "preliminary | final | amended | entered-in-error",
        "binding": {
          "strength": "required",
          "description": "The status of th result value. FHIR - Cambio preliminary -> unsigned final -> signed and completednonSignable entered in error -> invalidated cancelled -> removed amended -> resigned",
          "valueSet": "https://cambio.codes/fhir/vs/vital-sign-status/v1"
        }
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "max": "0"
      },
      {
        "id": "Observation.code.coding",
        "path": "Observation.code.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Observation.subject.identifier:personnummer",
        "path": "Observation.subject.identifier",
        "sliceName": "personnummer"
      },
      {
        "id": "Observation.subject.identifier:personnummer.period",
        "path": "Observation.subject.identifier.period",
        "constraint": [
          {
            "key": "per-1",
            "severity": "error",
            "human": "If present, start SHALL have a lower value than end",
            "source": "http://hl7.org/fhir/StructureDefinition/ContactPoint"
          }
        ]
      },
      {
        "id": "Observation.subject.identifier:samordningsnummer",
        "path": "Observation.subject.identifier",
        "sliceName": "samordningsnummer"
      },
      {
        "id": "Observation.subject.identifier:samordningsnummer.period",
        "path": "Observation.subject.identifier.period",
        "constraint": [
          {
            "key": "per-1",
            "severity": "error",
            "human": "If present, start SHALL have a lower value than end",
            "source": "http://hl7.org/fhir/StructureDefinition/ContactPoint"
          }
        ]
      },
      {
        "id": "Observation.focus",
        "path": "Observation.focus",
        "max": "0"
      },
      {
        "id": "Observation.issued",
        "path": "Observation.issued",
        "max": "0"
      },
      {
        "id": "Observation.performer",
        "path": "Observation.performer",
        "min": 1,
        "max": "2"
      },
      {
        "id": "Observation.value[x]",
        "path": "Observation.value[x]",
        "constraint": [
          {
            "key": "qty-3",
            "severity": "error",
            "human": "If a code for the unit is present, the system SHALL also be present",
            "expression": "code.empty() or system.exists()",
            "xpath": "not(exists(f:code)) or exists(f:system)",
            "source": "http://hl7.org/fhir/StructureDefinition/Quantity"
          }
        ]
      },
      {
        "id": "Observation.value[x].coding",
        "path": "Observation.value[x].coding",
        "min": 1
      },
      {
        "id": "Observation.value[x].coding.code",
        "path": "Observation.value[x].coding.code",
        "binding": {
          "strength": "required",
          "valueSet": "https://fhir.cambio.se/ValueSet/TannerBoysGenitalDevelopmentStage/v1"
        }
      },
      {
        "id": "Observation.dataAbsentReason.coding",
        "path": "Observation.dataAbsentReason.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Observation.dataAbsentReason.coding.system",
        "path": "Observation.dataAbsentReason.coding.system",
        "min": 1,
        "fixedUri": "http://terminology.hl7.org/CodeSystem/data-absent-reason"
      },
      {
        "id": "Observation.dataAbsentReason.coding.code",
        "path": "Observation.dataAbsentReason.coding.code",
        "min": 1,
        "fixedCode": "unsupported"
      },
      {
        "id": "Observation.dataAbsentReason.text",
        "path": "Observation.dataAbsentReason.text",
        "short": "Comment/note about the observation when the value is empty"
      },
      {
        "id": "Observation.interpretation",
        "path": "Observation.interpretation",
        "max": "0"
      },
      {
        "id": "Observation.bodySite",
        "path": "Observation.bodySite",
        "max": "0"
      },
      {
        "id": "Observation.method",
        "path": "Observation.method",
        "max": "0"
      },
      {
        "id": "Observation.specimen",
        "path": "Observation.specimen",
        "max": "0"
      },
      {
        "id": "Observation.device",
        "path": "Observation.device",
        "max": "0"
      },
      {
        "id": "Observation.referenceRange",
        "path": "Observation.referenceRange",
        "max": "0"
      },
      {
        "id": "Observation.referenceRange.low",
        "path": "Observation.referenceRange.low",
        "constraint": [
          {
            "key": "qty-3",
            "severity": "error",
            "human": "If a code for the unit is present, the system SHALL also be present",
            "source": "http://hl7.org/fhir/StructureDefinition/Quantity"
          }
        ]
      },
      {
        "id": "Observation.referenceRange.high",
        "path": "Observation.referenceRange.high",
        "constraint": [
          {
            "key": "qty-3",
            "severity": "error",
            "human": "If a code for the unit is present, the system SHALL also be present",
            "source": "http://hl7.org/fhir/StructureDefinition/Quantity"
          }
        ]
      },
      {
        "id": "Observation.hasMember",
        "path": "Observation.hasMember",
        "max": "0"
      },
      {
        "id": "Observation.derivedFrom",
        "path": "Observation.derivedFrom",
        "max": "0"
      },
      {
        "id": "Observation.component",
        "path": "Observation.component",
        "max": "0"
      },
      {
        "id": "Observation.component.value[x]",
        "path": "Observation.component.value[x]",
        "constraint": [
          {
            "key": "qty-3",
            "severity": "error",
            "human": "If a code for the unit is present, the system SHALL also be present",
            "expression": "code.empty() or system.exists()",
            "xpath": "not(exists(f:code)) or exists(f:system)",
            "source": "http://hl7.org/fhir/StructureDefinition/Quantity"
          }
        ]
      },
      {
        "id": "Observation.component.referenceRange",
        "path": "Observation.component.referenceRange",
        "contentReference": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.referenceRange"
      }
    ]
  }
}