{
  "resourceType": "StructureDefinition",
  "id": "ncdhc-observation-illicit-drugs-gestation",
  "url": "http://hl7.org.au/fhir/ch/v1/StructureDefinition/ncdhc-observation-illicit-drugs-gestation",
  "version": "dv1.0.0",
  "name": "NCDHCIllicitDrugsUseGestationObservationProfile",
  "title": "NCDHC Illicit Drugs Use Gestation Observation",
  "status": "draft",
  "date": "2020-01-10",
  "publisher": "National Children's Digital Health Collaborative (NCDHC)",
  "description": "Illicit drug usage during gestation",
  "purpose": "To record Drug usage during gestation period",
  "copyright": "Copyright © 2019 Australian Digital Health Agency - All rights reserved. This content is licensed under a Creative Commons Attribution 4.0 International License. See https://creativecommons.org/licenses/by/4.0/.",
  "fhirVersion": "3.0.2",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org.au/fhir/ch/v1/StructureDefinition/ncdhc-observation-base",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation",
        "path": "Observation",
        "short": "NCDHC Illicit Drugs Use Gestation Observation"
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "short": "Drug usage during gestation period",
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "440664005"
            }
          ]
        },
        "mustSupport": true
      },
      {
        "id": "Observation.code.coding",
        "path": "Observation.code.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "code"
            },
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Observation.code.coding:IllicitDrugsUseGestationSNOMED-CT",
        "path": "Observation.code.coding",
        "sliceName": "IllicitDrugsUseGestationSNOMED-CT",
        "min": 1,
        "max": "1",
        "patternCoding": {
          "system": "http://snomed.info/sct",
          "code": "440664005"
        }
      },
      {
        "id": "Observation.code.coding:IllicitDrugsUseGestationSNOMED-CT.system",
        "path": "Observation.code.coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "short": "Reference to the Mother Patient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org.au/fhir/ch/v1/StructureDefinition/ncdhc-patient-expectant-mother"
          }
        ]
      },
      {
        "id": "Observation.effectiveDateTime:effectiveDateTime",
        "path": "Observation.effectiveDateTime",
        "sliceName": "effectiveDateTime",
        "short": "Date when Illicit drug usage during gestation was discussed"
      },
      {
        "id": "Observation.value[x]:valueCodeableConcept",
        "path": "Observation.valueCodeableConcept",
        "sliceName": "valueCodeableConcept",
        "short": "Illicit drug usage during gestation",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSetUri": "http://hl7.org.au/fhir/ch/v1/ValueSet/ncdhc-observation-Illicit-drugs-intake-status-1"
        }
      },
      {
        "id": "Observation.related",
        "path": "Observation.related",
        "short": "Gestation (weeks  /days)",
        "mustSupport": true
      },
      {
        "id": "Observation.related.type",
        "path": "Observation.related.type",
        "fixedCode": "has-member"
      },
      {
        "id": "Observation.related.target",
        "path": "Observation.related.target",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org.au/fhir/ch/v1/StructureDefinition/ncdhc-observation-estimated-gestation"
          }
        ]
      },
      {
        "id": "Observation.component",
        "path": "Observation.component",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "code"
            }
          ],
          "rules": "closed"
        }
      },
      {
        "id": "Observation.component:DrugType",
        "path": "Observation.component",
        "sliceName": "DrugType",
        "short": "Drug type",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Observation.component:DrugType.code",
        "path": "Observation.component.code",
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "307052004"
            }
          ]
        }
      },
      {
        "id": "Observation.component:DrugType.value[x]:valueCodeableConcept",
        "path": "Observation.component.valueCodeableConcept",
        "sliceName": "valueCodeableConcept",
        "short": "Illicit drug use",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "strength": "required",
          "valueSetReference": {
            "reference": "http://hl7.org.au/fhir/ch/v1/ValueSet/ncdhc-illicit-drug-type-1"
          }
        }
      },
      {
        "id": "Observation.component:DrugQuitDate",
        "path": "Observation.component",
        "sliceName": "DrugQuitDate",
        "short": "Illicit drug quit date",
        "mustSupport": true
      },
      {
        "id": "Observation.component:DrugQuitDate.code",
        "path": "Observation.component.code",
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "228329000"
            }
          ]
        }
      },
      {
        "id": "Observation.component:DrugQuitDate.value[x]:valueDateTime",
        "path": "Observation.component.valueDateTime",
        "sliceName": "valueDateTime",
        "type": [
          {
            "code": "dateTime"
          }
        ]
      },
      {
        "id": "Observation.component:FetalGestationalAge",
        "path": "Observation.component",
        "sliceName": "FetalGestationalAge",
        "max": "1"
      },
      {
        "id": "Observation.component:FetalGestationalAge.code",
        "path": "Observation.component.code",
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "57036006"
            }
          ]
        }
      },
      {
        "id": "Observation.component:FetalGestationalAge.value[x]:valueQuantity",
        "path": "Observation.component.valueQuantity",
        "sliceName": "valueQuantity",
        "short": "Gestational age in days",
        "type": [
          {
            "code": "Quantity"
          }
        ]
      },
      {
        "id": "Observation.component:FetalGestationalAge.value[x]:valueQuantity.value",
        "path": "Observation.component.valueQuantity.value",
        "min": 1
      },
      {
        "id": "Observation.component:FetalGestationalAge.value[x]:valueQuantity.unit",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.component.valueQuantity.unit",
        "min": 1
      },
      {
        "id": "Observation.component:FetalGestationalAge.value[x]:valueQuantity.system",
        "path": "Observation.component.valueQuantity.system",
        "min": 1,
        "fixedUri": "http://unitsofmeasure.org"
      },
      {
        "id": "Observation.component:FetalGestationalAge.value[x]:valueQuantity.code",
        "path": "Observation.component.valueQuantity.code",
        "fixedCode": "d"
      }
    ]
  }
}