{
  "resourceType": "StructureDefinition",
  "meta": {
    "lastUpdated": "2017-08-25T13:05:37.145+00:00"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "phx"
    }
  ],
  "url": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-MedicationStatement-1",
  "version": "0.0.1",
  "name": "CareConnect-MedicationStatement-1",
  "status": "draft",
  "date": "2017-07-17T09:30:03.6179621+00:00",
  "publisher": "HL7 UK",
  "description": "This MedicationStatement Resource is a record of a medication that is being consumed by a patient.",
  "copyright": "Copyright © 2016 HL7 UK\r\n\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\r\n\r\nhttp://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\r\n\r\nHL7® FHIR® standard Copyright © 2011+ HL7\r\n\r\nThe HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at\r\n\r\nhttps://www.hl7.org/fhir/license.html",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "MedicationStatement",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationStatement",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "path": "MedicationStatement.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationStatement.extension:reasonEnded",
        "path": "MedicationStatement.extension",
        "sliceName": "reasonEnded",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-MedicationStatementReasonEnded-1"
          }
        ]
      },
      {
        "id": "MedicationStatement.extension:quantityDispensed",
        "path": "MedicationStatement.extension",
        "sliceName": "quantityDispensed",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-MedicationStatementQuantity-1"
          }
        ]
      },
      {
        "id": "MedicationStatement.extension:lastIssueDate",
        "path": "MedicationStatement.extension",
        "sliceName": "lastIssueDate",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-MedicationStatementLastIssueDate-1"
          }
        ]
      },
      {
        "id": "MedicationStatement.extension:repeatInformation",
        "path": "MedicationStatement.extension",
        "sliceName": "repeatInformation",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-MedicationRepeatInformation-1"
          }
        ]
      },
      {
        "id": "MedicationStatement.extension:flag",
        "path": "MedicationStatement.extension",
        "sliceName": "flag",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-MedicationFlag-1"
          }
        ]
      },
      {
        "id": "MedicationStatement.identifier.system",
        "path": "MedicationStatement.identifier.system",
        "min": 1
      },
      {
        "id": "MedicationStatement.identifier.value",
        "path": "MedicationStatement.identifier.value",
        "min": 1
      },
      {
        "id": "MedicationStatement.identifier.assigner",
        "path": "MedicationStatement.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Organization-1"
          }
        ]
      },
      {
        "id": "MedicationStatement.basedOn",
        "path": "MedicationStatement.basedOn",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-MedicationRequest-1"
          }
        ]
      },
      {
        "id": "MedicationStatement.partOf",
        "path": "MedicationStatement.partOf",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationAdministration"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationDispense"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Procedure-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Observation-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-MedicationStatement-1"
          }
        ]
      },
      {
        "id": "MedicationStatement.context",
        "path": "MedicationStatement.context",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Encounter-1"
          }
        ]
      },
      {
        "id": "MedicationStatement.medication[x]",
        "path": "MedicationStatement.medication[x]",
        "type": [
          {
            "code": "CodeableConcept"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Medication-1"
          }
        ],
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "MedicationCode"
            }
          ],
          "strength": "required",
          "description": "A code from the SNOMED Clinical Terminology UK coding system that describes a manufactured material (e.g. a pharmaceutical product or personal medical device).",
          "valueSetReference": {
            "reference": "https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-ManufacturedMaterialSnCT-1"
          }
        }
      },
      {
        "id": "MedicationStatement.informationSource",
        "path": "MedicationStatement.informationSource",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Organization-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Patient-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Practitioner-1"
          }
        ]
      },
      {
        "id": "MedicationStatement.subject",
        "path": "MedicationStatement.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Patient-1"
          }
        ]
      },
      {
        "id": "MedicationStatement.reasonNotTaken.coding",
        "path": "MedicationStatement.reasonNotTaken.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "MedicationStatement.reasonNotTaken.coding:snomedCT",
        "path": "MedicationStatement.reasonNotTaken.coding",
        "sliceName": "snomedCT",
        "max": "1"
      },
      {
        "path": "MedicationStatement.reasonNotTaken.coding.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationStatement.reasonNotTaken.coding:snomedCT.extension:snomedCTDescriptionID",
        "path": "MedicationStatement.reasonNotTaken.coding.extension",
        "sliceName": "snomedCTDescriptionID",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-coding-sctdescid"
          }
        ]
      },
      {
        "id": "MedicationStatement.reasonNotTaken.coding:snomedCT.system",
        "path": "MedicationStatement.reasonNotTaken.coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "MedicationStatement.reasonNotTaken.coding:snomedCT.version",
        "path": "MedicationStatement.reasonNotTaken.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationStatement.reasonNotTaken.coding:snomedCT.code",
        "path": "MedicationStatement.reasonNotTaken.coding.code",
        "min": 1
      },
      {
        "id": "MedicationStatement.reasonNotTaken.coding:snomedCT.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationStatement.reasonNotTaken.coding.display",
        "min": 1
      },
      {
        "id": "MedicationStatement.reasonReference",
        "path": "MedicationStatement.reasonReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Observation-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Condition-1"
          }
        ]
      },
      {
        "id": "MedicationStatement.note.author[x]",
        "path": "MedicationStatement.note.author[x]",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
          },
          {
            "code": "string"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Patient-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Practitioner-1"
          }
        ]
      },
      {
        "id": "MedicationStatement.dosage.text",
        "path": "MedicationStatement.dosage.text",
        "min": 1
      },
      {
        "id": "MedicationStatement.dosage.route.coding",
        "path": "MedicationStatement.dosage.route.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "MedicationStatement.dosage.route.coding:snomedCT",
        "path": "MedicationStatement.dosage.route.coding",
        "sliceName": "snomedCT",
        "max": "1",
        "binding": {
          "strength": "preferred",
          "description": "A code from the SNOMED Clinical Terminology UK coding system that describes the e-Prescribing route of administration.",
          "valueSetReference": {
            "reference": "https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-MedicationDosageRoute-1"
          }
        }
      },
      {
        "path": "MedicationStatement.dosage.route.coding.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationStatement.dosage.route.coding:snomedCT.extension:snomedCTDescriptionID",
        "path": "MedicationStatement.dosage.route.coding.extension",
        "sliceName": "snomedCTDescriptionID",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-coding-sctdescid"
          }
        ]
      },
      {
        "id": "MedicationStatement.dosage.route.coding:snomedCT.system",
        "path": "MedicationStatement.dosage.route.coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "MedicationStatement.dosage.route.coding:snomedCT.version",
        "path": "MedicationStatement.dosage.route.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage.route.coding:snomedCT.code",
        "path": "MedicationStatement.dosage.route.coding.code",
        "min": 1
      },
      {
        "id": "MedicationStatement.dosage.route.coding:snomedCT.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationStatement.dosage.route.coding.display",
        "min": 1
      },
      {
        "id": "MedicationStatement.dosage.method.coding",
        "path": "MedicationStatement.dosage.method.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "MedicationStatement.dosage.method.coding:snomedCT",
        "path": "MedicationStatement.dosage.method.coding",
        "sliceName": "snomedCT",
        "max": "1",
        "binding": {
          "strength": "preferred",
          "description": "A code from the SNOMED Clinical Terminology UK coding system that describes the e-Prescribing method.",
          "valueSetReference": {
            "reference": "https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-MedicationDosageMethod-1"
          }
        }
      },
      {
        "path": "MedicationStatement.dosage.method.coding.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationStatement.dosage.method.coding:snomedCT.extension:snomedCTDescriptionID",
        "path": "MedicationStatement.dosage.method.coding.extension",
        "sliceName": "snomedCTDescriptionID",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-coding-sctdescid"
          }
        ]
      },
      {
        "id": "MedicationStatement.dosage.method.coding:snomedCT.system",
        "path": "MedicationStatement.dosage.method.coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "MedicationStatement.dosage.method.coding:snomedCT.version",
        "path": "MedicationStatement.dosage.method.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage.method.coding:snomedCT.code",
        "path": "MedicationStatement.dosage.method.coding.code",
        "min": 1
      },
      {
        "id": "MedicationStatement.dosage.method.coding:snomedCT.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationStatement.dosage.method.coding.display",
        "min": 1
      }
    ]
  }
}