{
  "resourceType": "StructureDefinition",
  "meta": {
    "lastUpdated": "2017-12-18T14:47:58.633+00:00"
  },
  "url": "http://trilliumbridge.eu/fhir/StructureDefinition/medication-uv-trillium2",
  "name": "medication-uv-trillium2",
  "status": "draft",
  "date": "2017-11-27T10:19:21.923+00:00",
  "publisher": "Trillium II",
  "contact": [
    {
      "name": "François Macary - PHAST"
    }
  ],
  "description": "This profile represents the contraints applied to the Medication resource by the Trillium II project, which specifies an international patient summary based on the FHIR standard STU3",
  "purpose": "This profile constrains the representation of a medication, part of the list of current medications in the international patient summary as specified by the Trillium II project.",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Medication",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Medication",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Medication.code",
        "path": "Medication.code",
        "min": 1
      },
      {
        "id": "Medication.code.coding",
        "path": "Medication.code.coding",
        "label": "product identifier and or name",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "description": "One slice per system of representation of medications",
          "rules": "open"
        },
        "short": "Product identifier and or name",
        "max": "1",
        "mustSupport": false
      },
      {
        "id": "Medication.code.coding:snomed",
        "path": "Medication.code.coding",
        "sliceName": "snomed",
        "max": "1",
        "binding": {
          "strength": "extensible",
          "description": "SNOMED CT drug products",
          "valueSetReference": {
            "reference": "http://trilliumbridge.eu/fhir/ValueSet/snomed-ct-drug-products-uv_trillium2"
          }
        }
      },
      {
        "id": "Medication.code.coding:snomed.system",
        "path": "Medication.code.coding.system",
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "Medication.code.coding:inn",
        "path": "Medication.code.coding",
        "sliceName": "inn",
        "max": "1"
      },
      {
        "id": "Medication.code.coding:inn.system",
        "path": "Medication.code.coding.system",
        "min": 1,
        "type": [
          {
            "code": "uri",
            "profile": "http://who/inn"
          }
        ],
        "fixedUri": "http://www/who/inn"
      },
      {
        "id": "Medication.code.coding:inn.userSelected",
        "path": "Medication.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Medication.code.coding:branded",
        "path": "Medication.code.coding",
        "sliceName": "branded"
      },
      {
        "id": "Medication.code.coding:branded.system",
        "path": "Medication.code.coding.system",
        "definition": "The identification of the code system that defines the jurisdictional catalog of branded medication products",
        "min": 1
      },
      {
        "id": "Medication.code.coding:branded.userSelected",
        "path": "Medication.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Medication.code.coding:phpidL1",
        "path": "Medication.code.coding",
        "sliceName": "phpidL1"
      },
      {
        "id": "Medication.code.coding:phpidL1.system",
        "path": "Medication.code.coding.system",
        "min": 1,
        "type": [
          {
            "code": "uri",
            "profile": "http://idmp/phpid-l1"
          }
        ]
      },
      {
        "id": "Medication.code.coding:phpidL1.userSelected",
        "path": "Medication.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Medication.code.coding:phpideL2",
        "path": "Medication.code.coding",
        "sliceName": "phpideL2"
      },
      {
        "id": "Medication.code.coding:phpideL2.system",
        "path": "Medication.code.coding.system",
        "min": 1,
        "type": [
          {
            "code": "uri",
            "profile": "http://idmp/phpidi-l2"
          }
        ]
      },
      {
        "id": "Medication.code.coding:phpideL2.userSelected",
        "path": "Medication.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Medication.code.coding:phpidL3",
        "path": "Medication.code.coding",
        "sliceName": "phpidL3"
      },
      {
        "id": "Medication.code.coding:phpidL3.system",
        "path": "Medication.code.coding.system",
        "min": 1,
        "type": [
          {
            "code": "uri",
            "profile": "http://idmp/phpid-l3"
          }
        ]
      },
      {
        "id": "Medication.code.coding:phpidL3.userSelected",
        "path": "Medication.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Medication.code.coding:phpidL4",
        "path": "Medication.code.coding",
        "sliceName": "phpidL4"
      },
      {
        "id": "Medication.code.coding:phpidL4.system",
        "path": "Medication.code.coding.system",
        "type": [
          {
            "code": "uri",
            "profile": "http://idmp/phpid-l4"
          }
        ]
      },
      {
        "id": "Medication.code.coding:phpidL4.userSelected",
        "path": "Medication.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Medication.code.coding:ATC",
        "path": "Medication.code.coding",
        "sliceName": "ATC",
        "max": "1",
        "binding": {
          "strength": "required",
          "valueSetUri": "http://trilliumbridge.eu/fhir/ValueSet/atc-class-uv-trillium2"
        }
      },
      {
        "id": "Medication.code.coding:ATC.system",
        "path": "Medication.code.coding.system",
        "fixedUri": "http://www.whocc.no/atc"
      },
      {
        "id": "Medication.code.coding:ATC.userSelected",
        "path": "Medication.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Medication.status",
        "path": "Medication.status",
        "max": "0"
      },
      {
        "id": "Medication.isBrand",
        "path": "Medication.isBrand",
        "max": "0"
      },
      {
        "id": "Medication.isOverTheCounter",
        "path": "Medication.isOverTheCounter",
        "max": "0"
      },
      {
        "id": "Medication.manufacturer",
        "path": "Medication.manufacturer",
        "max": "0"
      },
      {
        "id": "Medication.form.coding.userSelected",
        "path": "Medication.form.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.item[x]:itemCodeableConcept",
        "path": "Medication.ingredient.itemCodeableConcept",
        "sliceName": "itemCodeableConcept",
        "short": "The substance contained",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "strength": "preferred",
          "description": "medicine active substances",
          "valueSetUri": "http://trilliumbridge.eu/fhir/ValueSet/medicine-active-substances-uv-trillium2"
        }
      },
      {
        "id": "Medication.ingredient.item[x]:itemCodeableConcept.coding.userSelected",
        "path": "Medication.ingredient.itemCodeableConcept.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Medication.package",
        "path": "Medication.package",
        "max": "0"
      },
      {
        "id": "Medication.image",
        "path": "Medication.image",
        "max": "0"
      }
    ]
  }
}