{
  "resourceType": "StructureDefinition",
  "id": "fiphr-sd-insulindosing-r4",
  "meta": {
    "versionId": "10",
    "lastUpdated": "2023-03-02T05:07:12.801+00:00"
  },
  "url": "http://phr.kanta.fi/StructureDefinition/fiphr-sd-insulindosing-r4",
  "version": "1.0.0",
  "name": "FIPHRSDInsulinDosageR4",
  "title": "Finnish PHR Insulin Dosing Profile",
  "status": "active",
  "experimental": false,
  "date": "2023-03-02T05:07:11.0526852+00:00",
  "description": "Finnish PHR profile for Insulin Dosing",
  "purpose": "Finnish PHR profile for the administered insulin doses of a patient.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "MedicationAdministration",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationAdministration",
  "derivation": "constraint",
  "snapshot": {},
  "differential": {
    "element": [
      {
        "id": "MedicationAdministration",
        "path": "MedicationAdministration",
        "definition": "Finnish PHR profile describing the event of a patient consuming or otherwise being administered a medication."
      },
      {
        "id": "MedicationAdministration.meta",
        "path": "MedicationAdministration.meta",
        "min": 1
      },
      {
        "id": "MedicationAdministration.meta.profile",
        "path": "MedicationAdministration.meta.profile",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "MedicationAdministration.meta.profile:fiphrProfile",
        "path": "MedicationAdministration.meta.profile",
        "sliceName": "fiphrProfile",
        "min": 1,
        "max": "1",
        "fixedCanonical": "http://phr.kanta.fi/StructureDefinition/fiphr-sd-insulindosing-r4"
      },
      {
        "id": "MedicationAdministration.language",
        "path": "MedicationAdministration.language",
        "definition": "The base language in which the resource is  written.",
        "comment": "FinnishPHR: codes from the code system urn:ietf:bcp:47",
        "min": 1,
        "binding": {
          "strength": "required",
          "description": "A code of human language."
        }
      },
      {
        "id": "MedicationAdministration.text",
        "path": "MedicationAdministration.text",
        "min": 1
      },
      {
        "id": "MedicationAdministration.extension",
        "path": "MedicationAdministration.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 0
      },
      {
        "id": "MedicationAdministration.extension:creatingApplication",
        "path": "MedicationAdministration.extension",
        "sliceName": "creatingApplication",
        "min": 0,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://phr.kanta.fi/StructureDefinition/fiphr-ext-creatingapplication"
            ]
          }
        ]
      },
      {
        "id": "MedicationAdministration.identifier",
        "path": "MedicationAdministration.identifier",
        "short": "Business Identifier for the resource",
        "definition": "A unique identifier assigned to the resource. \r\nFinnish PHR: At least one of the identifiers SHALL be globally unique (e.g. an uuid as the value and 'urn:ietf:rfc:3986' as the system).",
        "min": 1
      },
      {
        "id": "MedicationAdministration.identifier.use",
        "path": "MedicationAdministration.identifier.use",
        "definition": "The purpose of this identifier. \r\nFinnish PHR: The code 'official' SHALL be only used if the given identifier value is truly globally unique (e.g. an uuid as the value and 'urn:ietf:rfc:3986' as the system)."
      },
      {
        "id": "MedicationAdministration.identifier.system",
        "path": "MedicationAdministration.identifier.system",
        "min": 1
      },
      {
        "id": "MedicationAdministration.identifier.value",
        "path": "MedicationAdministration.identifier.value",
        "definition": "The portion of the identifier typically relevant to the user and which is unique within the context of the system. \r\nFinnish PHR: At least one of the identifiers SHALL be truly globally unique (e.g. an uuid as the value and 'urn:ietf:rfc:3986' as the system).",
        "min": 1
      },
      {
        "id": "MedicationAdministration.identifier.assigner",
        "path": "MedicationAdministration.identifier.assigner",
        "max": "0"
      },
      {
        "id": "MedicationAdministration.instantiates",
        "path": "MedicationAdministration.instantiates",
        "max": "0"
      },
      {
        "id": "MedicationAdministration.partOf",
        "path": "MedicationAdministration.partOf",
        "max": "0"
      },
      {
        "id": "MedicationAdministration.status",
        "path": "MedicationAdministration.status",
        "short": "To show that the administration has been completed.",
        "definition": "Will be set to show that the administration has been completed.",
        "comment": "FInnishPHR:  Fixed value 'completed'. Only administrations that have been completed are supported in this profile.",
        "fixedCode": "completed"
      },
      {
        "id": "MedicationAdministration.statusReason",
        "path": "MedicationAdministration.statusReason",
        "max": "0"
      },
      {
        "id": "MedicationAdministration.category",
        "path": "MedicationAdministration.category",
        "max": "0"
      },
      {
        "id": "MedicationAdministration.medication[x]",
        "path": "MedicationAdministration.medication[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationAdministration.medication[x]:medicationCodeableConcept",
        "path": "MedicationAdministration.medication[x]",
        "sliceName": "medicationCodeableConcept",
        "short": "Finnish PHR: Identifies the medication that was administered",
        "definition": "FinnishPHR: Identifies the medication that was administered (code and/or name). The coding of the medication SHALL be either (or both) the VNR code of the medication or a specific code indicating whether the administered insulin was intermediate or fast acting.",
        "comment": "Finnish PHR: When the medication can be uniquely identified, the VNR code of the medication SHALL be given, and the brand name of the medication SHALL be given which SHALL match the name in the pharmaceutical database. A code indicating whether the administrated insulin was intermediate or fast acting may be given as well, and SHALL be given if a VNR code is unavailable.",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "strength": "extensible",
          "description": "Codes identifying substance or product administered.",
          "valueSet": "http://phr.kanta.fi/ValueSet/fiphr-vs-insulincode"
        }
      },
      {
        "id": "MedicationAdministration.medication[x]:medicationCodeableConcept.coding",
        "path": "MedicationAdministration.medication[x].coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        },
        "short": "In Finnish PHR either VNRCode or insulinCode SHALL be used. Other codes are optional.",
        "min": 1
      },
      {
        "id": "MedicationAdministration.medication[x]:medicationCodeableConcept.coding:VNRCode",
        "path": "MedicationAdministration.medication[x].coding",
        "sliceName": "VNRCode",
        "short": "Finnish PHR: VNR code of the medication",
        "definition": "Finnish PHR: VNR code of the medication",
        "comment": "Finnish PHR: When the medication can be uniquely identified, the VNR code of the medication SHALL be given as well as the brand name of the medication which SHALL match the name in the pharmaceutical database.",
        "max": "1"
      },
      {
        "id": "MedicationAdministration.medication[x]:medicationCodeableConcept.coding:VNRCode.system",
        "path": "MedicationAdministration.medication[x].coding.system",
        "short": "Finnish PHR: VNR code system",
        "definition": "Finnish PHR: VNR code system",
        "min": 1,
        "fixedUri": "urn:oid:1.2.246.537.6.55"
      },
      {
        "id": "MedicationAdministration.medication[x]:medicationCodeableConcept.coding:VNRCode.code",
        "path": "MedicationAdministration.medication[x].coding.code",
        "short": "Finnish PHR: VNR code defined by VNR code system",
        "definition": "Finnish PHR: VNR code defined by VNR code system",
        "min": 1
      },
      {
        "id": "MedicationAdministration.medication[x]:medicationCodeableConcept.coding:VNRCode.display",
        "path": "MedicationAdministration.medication[x].coding.display",
        "min": 1
      },
      {
        "id": "MedicationAdministration.medication[x]:medicationCodeableConcept.coding:insulinCode",
        "path": "MedicationAdministration.medication[x].coding",
        "sliceName": "insulinCode",
        "short": "Finnish PHR: A code indicating the type of insulin",
        "definition": "Finnish PHR: A code indicating whether the administered insulin was intermediate/long or fast acting.",
        "comment": "Finnish PHR: A code indicating whether the administered insulin was intermediate or fast acting may be given in addition to a VNR code, and SHALL be given if a VNR code is unavailable.",
        "max": "1"
      },
      {
        "id": "MedicationAdministration.medication[x]:medicationCodeableConcept.coding:insulinCode.system",
        "path": "MedicationAdministration.medication[x].coding.system",
        "short": "Finnish PHR: Code system for insulin codes",
        "definition": "Finnish PHR: Code system for insulin codes",
        "comment": ".",
        "min": 1,
        "fixedUri": "http://phr.kanta.fi/CodeSystem/fiphr-cs-insulincode"
      },
      {
        "id": "MedicationAdministration.medication[x]:medicationCodeableConcept.coding:insulinCode.code",
        "path": "MedicationAdministration.medication[x].coding.code",
        "short": "Finnish PHR: A code of the medication",
        "definition": "Finnish PHR: A code of the medication, indicating whether the administered insulin was intermediate/long or fast acting.",
        "comment": ".",
        "min": 1
      },
      {
        "id": "MedicationAdministration.medication[x]:medicationCodeableConcept.coding:insulinCode.display",
        "path": "MedicationAdministration.medication[x].coding.display",
        "min": 1
      },
      {
        "id": "MedicationAdministration.medication[x]:medicationCodeableConcept.text",
        "path": "MedicationAdministration.medication[x].text",
        "min": 1
      },
      {
        "id": "MedicationAdministration.subject",
        "path": "MedicationAdministration.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://phr.kanta.fi/StructureDefinition/fiphr-sd-patient"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "MedicationAdministration.subject.reference",
        "path": "MedicationAdministration.subject.reference",
        "min": 1
      },
      {
        "id": "MedicationAdministration.context",
        "path": "MedicationAdministration.context",
        "max": "0"
      },
      {
        "id": "MedicationAdministration.supportingInformation",
        "path": "MedicationAdministration.supportingInformation",
        "max": "0"
      },
      {
        "id": "MedicationAdministration.effective[x]",
        "path": "MedicationAdministration.effective[x]",
        "short": "Finnish PHR: Time of administration",
        "definition": "Finnish PHR: A specific time during which the administration took place. \r\nBoluses: use effectiveDateTime (and dosage.dose.value with no rate)\r\nExtended boluses: use effectivePeriod (and dosage.dose.value with no rate)\r\nBasal insulin records: use effectivePeriod (and dosage.rate to describe the amount of iU/hour being dosed as basal insulin)"
      },
      {
        "id": "MedicationAdministration.performer.actor",
        "path": "MedicationAdministration.performer.actor",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://phr.kanta.fi/StructureDefinition/fiphr-sd-patient"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "MedicationAdministration.performer.actor.reference",
        "path": "MedicationAdministration.performer.actor.reference",
        "min": 1
      },
      {
        "id": "MedicationAdministration.reasonCode",
        "path": "MedicationAdministration.reasonCode",
        "max": "0"
      },
      {
        "id": "MedicationAdministration.reasonReference",
        "path": "MedicationAdministration.reasonReference",
        "max": "0"
      },
      {
        "id": "MedicationAdministration.request",
        "path": "MedicationAdministration.request",
        "max": "0"
      },
      {
        "id": "MedicationAdministration.device",
        "path": "MedicationAdministration.device",
        "max": "0"
      },
      {
        "id": "MedicationAdministration.note.author[x]",
        "path": "MedicationAdministration.note.author[x]",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://phr.kanta.fi/StructureDefinition/fiphr-sd-patient"
            ],
            "aggregation": [
              "referenced"
            ]
          },
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "MedicationAdministration.dosage.site.coding",
        "path": "MedicationAdministration.dosage.site.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "MedicationAdministration.dosage.site.coding:fiphrCoding",
        "path": "MedicationAdministration.dosage.site.coding",
        "sliceName": "fiphrCoding",
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "required",
          "description": "A value set for the site location the medicine enters into or onto the body (Reference to the national AR/Lääkitys - Lääkkeenantopaikka code system.)",
          "valueSet": "http://phr.kanta.fi/ValueSet/fiphr-vs-dosagesite"
        }
      },
      {
        "id": "MedicationAdministration.dosage.site.coding:fiphrCoding.system",
        "path": "MedicationAdministration.dosage.site.coding.system",
        "min": 1,
        "fixedUri": "urn:oid:1.2.246.537.5.163"
      },
      {
        "id": "MedicationAdministration.dosage.site.coding:fiphrCoding.code",
        "path": "MedicationAdministration.dosage.site.coding.code",
        "min": 1
      },
      {
        "id": "MedicationAdministration.dosage.site.coding:fiphrCoding.display",
        "path": "MedicationAdministration.dosage.site.coding.display",
        "min": 1
      },
      {
        "id": "MedicationAdministration.eventHistory",
        "path": "MedicationAdministration.eventHistory",
        "max": "0"
      }
    ]
  }
}