{
  "resourceType": "StructureDefinition",
  "id": "profile-DwObservationDrugUse",
  "meta": {
    "lastUpdated": "2024-04-25T16:48:31.8857761+00:00"
  },
  "url": "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwObservationDrugUse",
  "version": "2.0.0",
  "name": "DwObservationDrugUse",
  "status": "active",
  "date": "2026-05-29",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation.id",
        "path": "Observation.id",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Observation.meta.lastUpdated",
        "path": "Observation.meta.lastUpdated",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Observation.meta.source",
        "path": "Observation.meta.source",
        "mustSupport": true
      },
      {
        "id": "Observation.meta.security",
        "path": "Observation.meta.security",
        "mustSupport": true
      },
      {
        "id": "Observation.identifier",
        "path": "Observation.identifier",
        "mustSupport": true
      },
      {
        "id": "Observation.status",
        "path": "Observation.status",
        "comment": "Usage Note - Historical load do not send the deleted entries. For delta send all updated resource including deleted\r\nPSS -->FHIR\r\nNeeds Review, unfinished --> Final\r\nUpdated --> amended - only if delta is being send\r\ndeleted --> entered-in-error - only if delta is being sent\r\n\r\nConformance Rule - PSS status for active risk factors the status should be final. For updated risk factor the status should be updated to amended\r\n\r\nMA --> FHIR\r\nActive --> Final\r\ndeleted --> entered-in-error - only if delta is being sent",
        "mustSupport": true
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "mustSupport": true
      },
      {
        "id": "Observation.category.coding",
        "path": "Observation.category.coding",
        "binding": {
          "strength": "preferred",
          "valueSet": "http://hl7.org/fhir/ValueSet/observation-category"
        }
      },
      {
        "id": "Observation.category.coding.system",
        "path": "Observation.category.coding.system",
        "fixedUri": "http://terminology.hl7.org/CodeSystem/observation-category"
      },
      {
        "id": "Observation.category.coding.code",
        "path": "Observation.category.coding.code",
        "fixedCode": "social-history"
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "mustSupport": true
      },
      {
        "id": "Observation.code.coding",
        "path": "Observation.code.coding",
        "mustSupport": true,
        "binding": {
          "strength": "example",
          "valueSet": "http://hl7.org/fhir/ValueSet/observation-codes"
        }
      },
      {
        "id": "Observation.code.coding.system",
        "path": "Observation.code.coding.system",
        "fixedUri": "http://loinc.org",
        "mustSupport": true
      },
      {
        "id": "Observation.code.coding.code",
        "path": "Observation.code.coding.code",
        "fixedCode": "74204-9",
        "mustSupport": true
      },
      {
        "id": "Observation.code.coding.display",
        "path": "Observation.code.coding.display",
        "fixedString": "Drug Use",
        "mustSupport": true
      },
      {
        "id": "Observation.code.text",
        "path": "Observation.code.text",
        "comment": "CHR - Substance Abuse - Recreational Drugs\n\nPSS - Drug Risk"
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPatient"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.encounter",
        "path": "Observation.encounter",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwEncounter"
            ]
          }
        ]
      },
      {
        "id": "Observation.effective[x]",
        "path": "Observation.effective[x]",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Observation.performer",
        "path": "Observation.performer",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPractitioner",
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPractitionerRole",
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwOrganization",
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwCareTeam",
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPatient"
            ]
          }
        ]
      },
      {
        "id": "Observation.interpretation",
        "path": "Observation.interpretation",
        "max": "1"
      },
      {
        "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.hasMember",
        "path": "Observation.hasMember",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwObservationSocialHistory",
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwObservationDrugUseType",
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwObservationDrugUseFrequency"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.derivedFrom",
        "path": "Observation.derivedFrom",
        "max": "0"
      }
    ]
  }
}