FHIR IG analytics
| Package | nostalgic-ie.fhir.core |
| Resource Type | StructureDefinition |
| Id | StructureDefinition-ie-core-bundle-eprescription.json |
| FHIR Version | R4 |
| Source | https://simplifier.net/resolve?scope=nostalgic-ie.fhir.core@0.2.0&canonical=https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-bundle-eprescription |
| URL | https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-bundle-eprescription |
| Version | 0.2.0 |
| Status | draft |
| Name | IECoreBundleEPrescription |
| Title | IE Core Bundle (ePrescription) |
| Description | An Irish electronic prescription as exchanged: one patient (IECorePatientEPrescription), one or more prescription items (IECoreMedicationRequestEPrescription) sharing a group identifier, the prescriber, the prescriber's facility, the medicinal products, and the allergy statement (IECoreListAllergiesAtPrescribing). Prescription-level legal and safety rules (HIQA EP 1.4.2, 1.6.1, 2.10.1, 3.1) are enforced here because they span resources. |
| Type | Bundle |
| Kind | resource |
Resources that use this resource
| CapabilityStatement |
| nostalgic-ie.fhir.core#0.2.0 | ie-core-client | IE Core Client CapabilityStatement |
| nostalgic-ie.fhir.core#0.2.0 | ie-core-server | IE Core Server CapabilityStatement |
Resources that this resource uses
Narrative
No narrative content found in resource
Source1
{
"resourceType": "StructureDefinition",
"id": "ie-core-bundle-eprescription",
"url": "https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-bundle-eprescription",
"version": "0.2.0",
"name": "IECoreBundleEPrescription",
"title": "IE Core Bundle (ePrescription)",
"status": "draft",
"description": "An Irish electronic prescription as exchanged: one patient (IECorePatientEPrescription), one or more prescription items (IECoreMedicationRequestEPrescription) sharing a group identifier, the prescriber, the prescriber's facility, the medicinal products, and the allergy statement (IECoreListAllergiesAtPrescribing). Prescription-level legal and safety rules (HIQA EP 1.4.2, 1.6.1, 2.10.1, 3.1) are enforced here because they span resources.",
"fhirVersion": "4.0.1",
"kind": "resource",
"abstract": false,
"type": "Bundle",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Bundle",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "Bundle",
"path": "Bundle",
"constraint": [
{
"key": "ie-bnd-rx-1",
"severity": "error",
"human": "A multi-item prescription SHALL share one group identifier (system and value) across all its items (HIQA EP 3.1)",
"expression": "entry.resource.ofType(MedicationRequest).count() <= 1 or (entry.resource.ofType(MedicationRequest).all(groupIdentifier.exists()) and entry.resource.ofType(MedicationRequest).select(groupIdentifier.system + '|' + groupIdentifier.value).distinct().count() = 1)",
"source": "https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-bundle-eprescription"
},
{
"key": "ie-bnd-rx-2",
"severity": "error",
"human": "Every prescription item SHALL reference the allergy statement (a List coded LOINC 48765-2) in supportingInformation (HIQA EP 1.6.1 / 1.6.2)",
"expression": "entry.resource.ofType(MedicationRequest).all(supportingInformation.where(resolve() is List and resolve().code.coding.where(system = 'http://loinc.org' and code = '48765-2').exists()).exists())",
"source": "https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-bundle-eprescription"
},
{
"key": "ie-bnd-rx-3",
"severity": "error",
"human": "If the patient is under 12 years old at the date of prescribing, or the date of birth is not a full date, every prescription item SHALL record the patient's age (HIQA EP 1.4.2; a legal requirement)",
"expression": "entry.resource.ofType(MedicationRequest).all(extension('https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-patient-age-at-prescribing').exists() or ((%resource.entry.resource.ofType(Patient).first().birthDate.toString().length() = 10) and ((%resource.entry.resource.ofType(Patient).first().birthDate + 12 years).toString() <= authoredOn.toString().substring(0,10))))",
"source": "https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-bundle-eprescription"
},
{
"key": "ie-bnd-rx-4",
"severity": "error",
"human": "The prescriber (the requester, its practitioner, or its organisation) SHALL have a telephone number (HIQA EP 2.10 / 2.10.1, Mandatory)",
"expression": "entry.resource.ofType(MedicationRequest).all(requester.resolve().telecom.where(system = 'phone').exists() or requester.resolve().ofType(PractitionerRole).practitioner.resolve().telecom.where(system = 'phone').exists() or requester.resolve().ofType(PractitionerRole).organization.resolve().telecom.where(system = 'phone').exists())",
"source": "https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-bundle-eprescription"
},
{
"key": "ie-bnd-rx-5",
"severity": "error",
"human": "Every prescription item, the allergy statement and every allergy SHALL be about the one Patient in the Bundle (patient safety: the allergy statement must be the patient's own)",
"expression": "(entry.resource.ofType(MedicationRequest).subject.reference | entry.resource.ofType(List).subject.reference | entry.resource.ofType(AllergyIntolerance).patient.reference).all(($this = %resource.entry.where(resource is Patient).fullUrl) or ($this = ('Patient/' + %resource.entry.resource.ofType(Patient).id)))",
"source": "https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-bundle-eprescription"
},
{
"key": "ie-bnd-rx-6",
"severity": "error",
"human": "Every allergy listed in the allergy statement SHALL be included in the Bundle (HIQA EP 1.6.2)",
"expression": "entry.resource.ofType(List).entry.item.reference.all(($this in %resource.entry.fullUrl) or ($this.replace('AllergyIntolerance/', '') in %resource.entry.resource.ofType(AllergyIntolerance).id))",
"source": "https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-bundle-eprescription"
}
]
},
{
"id": "Bundle.identifier",
"path": "Bundle.identifier",
"comment": "Bundle identifier; typically the NePS electronic prescription (group) identifier (HIQA EP 3.1).",
"min": 1,
"mustSupport": true
},
{
"id": "Bundle.type",
"path": "Bundle.type",
"patternCode": "collection"
},
{
"id": "Bundle.timestamp",
"path": "Bundle.timestamp",
"min": 1,
"mustSupport": true
},
{
"id": "Bundle.entry",
"path": "Bundle.entry",
"slicing": {
"discriminator": [
{
"type": "type",
"path": "resource"
}
],
"rules": "open"
},
"min": 3,
"mustSupport": true
},
{
"id": "Bundle.entry.fullUrl",
"path": "Bundle.entry.fullUrl",
"min": 1
},
{
"id": "Bundle.entry.resource",
"path": "Bundle.entry.resource",
"min": 1
},
{
"id": "Bundle.entry:patient",
"path": "Bundle.entry",
"sliceName": "patient",
"min": 1,
"max": "1",
"mustSupport": true
},
{
"id": "Bundle.entry:patient.resource",
"path": "Bundle.entry.resource",
"type": [
{
"code": "Patient",
"profile": [
"https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-patient-eprescription"
]
}
]
},
{
"id": "Bundle.entry:prescriptionItem",
"path": "Bundle.entry",
"sliceName": "prescriptionItem",
"min": 1,
"max": "*",
"mustSupport": true
},
{
"id": "Bundle.entry:prescriptionItem.resource",
"path": "Bundle.entry.resource",
"type": [
{
"code": "MedicationRequest",
"profile": [
"https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-medicationrequest-eprescription"
]
}
]
},
{
"id": "Bundle.entry:allergyStatement",
"path": "Bundle.entry",
"sliceName": "allergyStatement",
"comment": "HIQA EP 1.6.1 / 1.6.2: exactly one allergy statement per prescription, either listing the allergies or giving the reason none are recorded.",
"min": 1,
"max": "1",
"mustSupport": true
},
{
"id": "Bundle.entry:allergyStatement.resource",
"path": "Bundle.entry.resource",
"type": [
{
"code": "List",
"profile": [
"https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-list-allergies-at-prescribing"
]
}
]
},
{
"id": "Bundle.entry:allergy",
"path": "Bundle.entry",
"sliceName": "allergy",
"min": 0,
"max": "*",
"mustSupport": true
},
{
"id": "Bundle.entry:allergy.resource",
"path": "Bundle.entry.resource",
"type": [
{
"code": "AllergyIntolerance",
"profile": [
"https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-allergyintolerance"
]
}
]
},
{
"id": "Bundle.entry:practitioner",
"path": "Bundle.entry",
"sliceName": "practitioner",
"min": 0,
"max": "*",
"mustSupport": true
},
{
"id": "Bundle.entry:practitioner.resource",
"path": "Bundle.entry.resource",
"type": [
{
"code": "Practitioner",
"profile": [
"https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-practitioner"
]
}
]
},
{
"id": "Bundle.entry:practitionerRole",
"path": "Bundle.entry",
"sliceName": "practitionerRole",
"min": 0,
"max": "*",
"mustSupport": true
},
{
"id": "Bundle.entry:practitionerRole.resource",
"path": "Bundle.entry.resource",
"type": [
{
"code": "PractitionerRole",
"profile": [
"https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-practitionerrole"
]
}
]
},
{
"id": "Bundle.entry:organization",
"path": "Bundle.entry",
"sliceName": "organization",
"min": 0,
"max": "*",
"mustSupport": true
},
{
"id": "Bundle.entry:organization.resource",
"path": "Bundle.entry.resource",
"type": [
{
"code": "Organization",
"profile": [
"https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-organization"
]
}
]
},
{
"id": "Bundle.entry:medication",
"path": "Bundle.entry",
"sliceName": "medication",
"min": 0,
"max": "*",
"mustSupport": true
},
{
"id": "Bundle.entry:medication.resource",
"path": "Bundle.entry.resource",
"type": [
{
"code": "Medication",
"profile": [
"https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-medication-eprescription"
]
}
]
},
{
"id": "Bundle.entry:signature",
"path": "Bundle.entry",
"sliceName": "signature",
"min": 0,
"max": "*",
"mustSupport": true
},
{
"id": "Bundle.entry:signature.resource",
"path": "Bundle.entry.resource",
"type": [
{
"code": "Provenance",
"profile": [
"https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-provenance-eprescription-signature"
]
}
]
}
]
}
}