{
  "resourceType": "StructureDefinition",
  "id": "hso-lib-DetectedIssue",
  "url": "https://hso.no/fhir/StructureDefinition/HsoLibDetectedIssue",
  "name": "HsoLibDetectedIssue",
  "status": "draft",
  "description": "HSØ implementation profile for Active Medications - Legemidler i Bruk (LiB).",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "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"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "DetectedIssue",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DetectedIssue",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "DetectedIssue.code",
        "path": "DetectedIssue.code",
        "short": "HSØ profile: DRG (Drug Interaction Alert) | ALGY (Reaction Alert) | DUPTHPY (Duplicate Therapy Alert)"
      },
      {
        "id": "DetectedIssue.patient",
        "path": "DetectedIssue.patient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Patient"
            ]
          }
        ]
      },
      {
        "id": "DetectedIssue.author",
        "path": "DetectedIssue.author",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Practitioner",
              "http://hl7.no/fhir/StructureDefinition/no-basis-PractitionerRole"
            ]
          }
        ]
      },
      {
        "id": "DetectedIssue.implicated",
        "path": "DetectedIssue.implicated",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://hso.no/fhir/StructureDefinition/HsoLibMedicationStatement",
              "https://hso.no/fhir/StructureDefinition/HsoLibMedicationRequest",
              "http://nhn.no/kj/fhir/StructureDefinition/KjAllergyIntolerance",
              "https://hso.no/fhir/StructureDefinition/HsoLibFestInteraction"
            ]
          }
        ]
      },
      {
        "id": "DetectedIssue.mitigation.extension",
        "path": "DetectedIssue.mitigation.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "DetectedIssue.mitigation.extension:note",
        "path": "DetectedIssue.mitigation.extension",
        "sliceName": "note",
        "definition": "Optional Extension Element - found in all resources.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://hso.no/fhir/StructureDefinition/HsoLibDetectedIssue-mitigationNote"
            ]
          }
        ]
      },
      {
        "id": "DetectedIssue.mitigation.action",
        "path": "DetectedIssue.mitigation.action",
        "mustSupport": true
      },
      {
        "id": "DetectedIssue.mitigation.action.coding.system",
        "path": "DetectedIssue.mitigation.action.coding.system",
        "fixedUri": "urn:oid:2.16.578.1.12.4.1.1.7535"
      },
      {
        "id": "DetectedIssue.mitigation.author",
        "path": "DetectedIssue.mitigation.author",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Practitioner",
              "http://hl7.no/fhir/StructureDefinition/no-basis-PractitionerRole"
            ]
          }
        ]
      }
    ]
  }
}