{
  "resourceType": "StructureDefinition",
  "id": "1cf32852-806b-4471-af28-97554cdfbace",
  "meta": {
    "lastUpdated": "2017-09-19T12:28:28.149+00:00"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "phx"
    }
  ],
  "url": "http://helse-nord.no/FHIR/profiles/Diagnostics.MedicationStatement/MedicationStatement",
  "version": "0.9",
  "name": "MedicationStatement",
  "title": "MedicationStatement HelseNord",
  "status": "draft",
  "date": "2017-12-01",
  "publisher": "Helse Nord IKT",
  "description": "MedicationStatement",
  "purpose": "Medication Statement",
  "fhirVersion": "3.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "MedicationStatement",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationStatement",
  "derivation": "constraint",
  "snapshot": {},
  "differential": {
    "element": [
      {
        "id": "MedicationStatement",
        "path": "MedicationStatement",
        "comment": "When interpreting a medicationStatement, the value of the status and NotTaken needed to be considered:\rMedicationStatement.status + MedicationStatement.wasNotTaken\rStatus=Active + NotTaken=T = Not currently taking\rStatus=Completed + NotTaken=T = Not taken in the past\rStatus=Intended + NotTaken=T = No intention of taking\rStatus=Active + NotTaken=F = Taking, but not as prescribed\rStatus=Active + NotTaken=F = Taking\rStatus=Intended +NotTaken= F = Will be taking (not started)\rStatus=Completed + NotTaken=F = Taken in past\rStatus=In Error + NotTaken=N/A = In Error.\r\n\r\nsdf-20 dummy comment."
      },
      {
        "id": "MedicationStatement.extension",
        "path": "MedicationStatement.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationStatement.extension:MedicationStatementDrugUse",
        "path": "MedicationStatement.extension",
        "sliceName": "MedicationStatementDrugUse",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://helse-nord.no/FHIR/profiles/Extension.MedicationStatementDrugUse"
          }
        ]
      },
      {
        "id": "MedicationStatement.identifier",
        "path": "MedicationStatement.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "system"
            }
          ],
          "description": "Slice to specifically hold DIPS internal identifier.",
          "rules": "open"
        }
      },
      {
        "id": "MedicationStatement.identifier:DIPSidentifier",
        "path": "MedicationStatement.identifier",
        "sliceName": "DIPSidentifier",
        "max": "1"
      },
      {
        "id": "MedicationStatement.basedOn",
        "path": "MedicationStatement.basedOn",
        "max": "0"
      },
      {
        "id": "MedicationStatement.partOf",
        "path": "MedicationStatement.partOf",
        "max": "0"
      },
      {
        "id": "MedicationStatement.context",
        "path": "MedicationStatement.context",
        "max": "0"
      },
      {
        "id": "MedicationStatement.category",
        "path": "MedicationStatement.category",
        "max": "0"
      },
      {
        "id": "MedicationStatement.medication[x]",
        "path": "MedicationStatement.medication[x]",
        "type": [
          {
            "code": "CodeableConcept"
          },
          {
            "code": "Reference",
            "targetProfile": "http://helse-nord.no/FHIR/profiles/Diagnostics.MedicationStatement/Medication",
            "aggregation": [
              "contained"
            ]
          }
        ],
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "MedicationCode"
            }
          ],
          "strength": "example",
          "valueSetUri": "http://hl7.org/fhir/ValueSet/medication-codes"
        }
      },
      {
        "id": "MedicationStatement.subject",
        "path": "MedicationStatement.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://helse-nord.no/FHIR/profiles/Clinical.Patient/Patient",
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.reasonCode",
        "path": "MedicationStatement.reasonCode",
        "max": "1"
      },
      {
        "id": "MedicationStatement.reasonCode.coding",
        "path": "MedicationStatement.reasonCode.coding",
        "max": "0"
      },
      {
        "id": "MedicationStatement.reasonReference",
        "path": "MedicationStatement.reasonReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Condition"
          }
        ]
      },
      {
        "id": "MedicationStatement.dosage.sequence",
        "path": "MedicationStatement.dosage.sequence",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage.additionalInstruction",
        "path": "MedicationStatement.dosage.additionalInstruction",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage.patientInstruction",
        "path": "MedicationStatement.dosage.patientInstruction",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage.maxDosePerAdministration:SimpleQuantity",
        "path": "MedicationStatement.dosage.maxDosePerAdministration",
        "sliceName": "SimpleQuantity",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage.maxDosePerLifetime:SimpleQuantity",
        "path": "MedicationStatement.dosage.maxDosePerLifetime",
        "sliceName": "SimpleQuantity",
        "max": "0"
      }
    ]
  }
}