diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 5d4d03d..20b8567 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -63,7 +63,7 @@ jobs: sudo apt-get install -y nodejs - name: Cache node modules - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.npm key: ${{ runner.os }}-build-cache-npm-packages-${{ hashFiles('**/package-lock.json') }} diff --git a/CapabilityStatement/apim-medicines-futures.json b/CapabilityStatement/apim-medicines-futures.json index 91723c0..28de214 100644 --- a/CapabilityStatement/apim-medicines-futures.json +++ b/CapabilityStatement/apim-medicines-futures.json @@ -87,7 +87,7 @@ "resource": [ { "type": "MedicationRequest", - "profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest-Contained", + "profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest", "interaction": [ { "extension": [ diff --git a/Claim/Claim-supplier.json b/Claim/Claim-supplier.json index db18f81..834b0ae 100644 --- a/Claim/Claim-supplier.json +++ b/Claim/Claim-supplier.json @@ -286,7 +286,7 @@ { "system": "http://snomed.info/sct", "code": "38781611000001106", - "display": "Telmisartan 20mg tablets (Ennogen Healthcare Ltd)" + "display": "Telmisartan 20mg tablets (Ennogen Healthcare International Ltd)" } ] }, diff --git a/MedicationRequest/Bundle-prescription-order-response.json b/MedicationRequest/Bundle-prescription-order-response.json index 2e838c2..34a409a 100644 --- a/MedicationRequest/Bundle-prescription-order-response.json +++ b/MedicationRequest/Bundle-prescription-order-response.json @@ -211,6 +211,14 @@ "resourceType": "MedicationRequest", "id": "0ef0236b-568a-4aff-a8fc-5b956402abc6", "extension": [ + { + "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionType", + "valueCoding": { + "system": "https://fhir.nhs.uk/CodeSystem/prescription-type", + "code": "0101", + "display": "Primary Care Prescriber – Medical Prescriber" + } + }, { "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionStatusHistory", "extension": [ @@ -241,6 +249,26 @@ "value": "0d4f8c2e-8153-45f9-b040-1e2858808808" } ], + "courseOfTherapyType": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-course-of-therapy", + "code": "acute", + "display": "Short course (acute) therapy" + } + ] + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category", + "code": "inpatient", + "display": "Inpatient" + } + ] + } + ], "status": "cancelled", "intent": "order", "medicationCodeableConcept": { @@ -260,10 +288,39 @@ "reference": "urn:uuid:ca7a1e5a-f955-46d8-b1d6-528a45a8c20f" }, "groupIdentifier": { + "extension": [ + { + "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionId", + "valueIdentifier": { + "system": "https://fhir.nhs.uk/Id/prescription", + "value": "ad945a29-85f8-439a-b590-6789719adc16" + } + } + ], "system": "https://fhir.nhs.uk/Id/prescription-order-number", "value": "47FD70-A99968-E517CT" }, + "dosageInstruction": [ + { + "text": "2 Puffs twice daily" + } + ], "dispenseRequest": { + "extension": [ + { + "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PerformerSiteType", + "valueCoding": { + "system": "https://fhir.nhs.uk/CodeSystem/dispensing-site-preference", + "code": "0004" + } + } + ], + "quantity": { + "value": 240, + "unit": "actuation(s)", + "system": "http://snomed.info/sct", + "code": "732981002" + }, "performer": { "identifier": { "system": "https://fhir.nhs.uk/Id/ods-organization-code", diff --git a/MedicationRequest/homecare-example-response.json b/MedicationRequest/homecare-example-response.json index 3ff738d..2d730c5 100644 --- a/MedicationRequest/homecare-example-response.json +++ b/MedicationRequest/homecare-example-response.json @@ -42,78 +42,203 @@ "fullUrl": "urn:uuid:a54219b8-f741-4c47-b662-e4f8dfa49ab6", "resource": { "resourceType": "MedicationRequest", + "id": "a54219b8-f741-4c47-b662-e4f8dfa49ab6", "extension": [ - { + { "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionStatusHistory", "extension": [ { "url": "status", - "valueCoding": { + "valueCoding": { "system": "https://fhir.nhs.uk/CodeSystem/medicationrequest-status-history", "code": "R-0002", "display": "Prescription/item was not cancelled – With dispenser" - } + } } ] - }, - { + }, + { "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-ResponsiblePractitioner", "valueReference": { "reference": "urn:uuid:a5acefc1-f8ca-4989-a5ac-34ae36741466", "display": "DR SAZ RAZ" } + }, + { + "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionType", + "valueCoding": { + "system": "https://fhir.nhs.uk/CodeSystem/prescription-type", + "code": "1201", + "display": "Outpatient Homecare Prescriber - Medical Prescriber" } + }, + { + "url": "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MedicationRepeatInformation", + "extension": [ + { + "url": "numberOfPrescriptionsIssued", + "valueUnsignedInt": 1 + }, + { + "url": "authorisationExpiryDate", + "valueDateTime": "2020-08-07" + } + ] + } ], "identifier": [ - { - "system": "https://fhir.nhs.uk/Id/prescription-order-item-number", - "value": "a54219b8-f741-4c47-b662-e4f8dfa49ab6" - } + { + "system": "https://fhir.nhs.uk/Id/prescription-order-item-number", + "value": "a54219b8-f741-4c47-b662-e4f8dfa49ab6" + } ], "status": "active", - "intent": "order", - "medicationCodeableConcept": { + "intent": "original-order", + "category": [ + { "coding": [ - { - "system": "http://snomed.info/sct", - "code": "15517911000001104", - "display": "Methotrexate 10mg/0.2ml solution for injection pre-filled syringes" - } + { + "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category", + "code": "outpatient", + "display": "Outpatient" + } ] + } + ], + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "15517911000001104", + "display": "Methotrexate 10mg/0.2ml solution for injection pre-filled syringes" + } + ] }, "subject": { - "reference": "urn:uuid:78d3c2eb-009e-4ec8-a358-b042954aa9b2", - "display": "ETTA CORY" + "reference": "urn:uuid:78d3c2eb-009e-4ec8-a358-b042954aa9b2" }, "authoredOn": "2020-07-13T12:00:00+00:00", "requester": { - "reference": "urn:uuid:56166769-c1c4-4d07-afa8-132b5dfca666", - "display": "DR RAZIA ALI" + "reference": "urn:uuid:56166769-c1c4-4d07-afa8-132b5dfca666" }, + "basedOn": [ + { + "reference": "https://elmpt-hospitals.nhs.uk/MedicationRequest/654321" + } + ], "groupIdentifier": { - "system": "https://fhir.nhs.uk/Id/prescription-order-number", - "value": "DC2C66-A1B2C3-23407B" + "extension": [ + { + "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionId", + "valueIdentifier": { + "system": "https://fhir.nhs.uk/Id/prescription", + "value": "ad945a29-85f8-439a-b590-6789719adc16" + } + } + ], + "system": "https://fhir.nhs.uk/Id/prescription-order-number", + "value": "DC2C66-A1B2C3-23407B" }, + "courseOfTherapyType": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-course-of-therapy", + "code": "continuous", + "display": "Continuous long term therapy" + } + ] + }, + "dosageInstruction": [ + { + "text": "10 milligram, Inject, Subcutaneous route, once weekly.", + "timing": { + "repeat": { + "frequency": 5, + "period": 1, + "periodUnit": "d", + "boundsDuration": { + "value": 10, + "unit": "day", + "system": "http://unitsofmeasure.org", + "code": "d" + } + } + }, + "method": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "422145002", + "display": "Inject" + } + ] + }, + "route": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "34206005", + "display": "Subcutaneous route" + } + ] + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 10, + "unit": "milligram", + "system": "http://unitsofmeasure.org", + "code": "mg" + } + } + ] + } + ], "dispenseRequest": { - "performer": { - "extension": [ - { - "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-DispensingPerformer", - "valueReference": { - "reference": "urn:uuid:25f3dd9f-5838-44a7-930e-c78ae3ecadd6", - "display": "LOTTIE POTTS" - } - } - ], - "identifier": { - "system": "https://fhir.nhs.uk/Id/ods-organization-code", - "value": "VNE51" - }, - "display": "The Simple Pharmacy" + "extension": [ + { + "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PerformerSiteType", + "valueCoding": { + "system": "https://fhir.nhs.uk/CodeSystem/dispensing-site-preference", + "code": "P2" + } + } + ], + "validityPeriod": { + "start": "2020-07-13T12:00:00+00:00", + "end": "2020-08-07T12:00:00+00:00" + }, + "numberOfRepeatsAllowed": 0, + "expectedSupplyDuration": { + "value": 7, + "unit": "day", + "system": "http://unitsofmeasure.org", + "code": "d" + }, + "performer": { + "extension": [ + { + "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-DispensingPerformer", + "valueReference": { + "reference": "urn:uuid:25f3dd9f-5838-44a7-930e-c78ae3ecadd6", + "display": "LOTTIE POTTS" + } + } + ], + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "VNE51" } + }, + "quantity": { + "value": 1, + "unit": "Injection", + "system": "http://snomed.info/sct", + "code": "3092611000001103" + } }, "substitution": { - "allowedBoolean": false + "allowedBoolean": false } } }, diff --git a/MedicationRequest/homecare-example-subsequent-response.json b/MedicationRequest/homecare-example-subsequent-response.json index 2e17789..3535b2a 100644 --- a/MedicationRequest/homecare-example-subsequent-response.json +++ b/MedicationRequest/homecare-example-subsequent-response.json @@ -42,6 +42,10 @@ "fullUrl": "urn:uuid:a54219b8-f741-4c47-b662-e4f8dfa49ab6", "resource": { "resourceType": "MedicationRequest", + "meta": { + "versionId": "2", + "lastUpdated": "2020-07-13T12:30:00+00:00" + }, "extension": [ { "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionStatusHistory", @@ -59,9 +63,29 @@ { "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-ResponsiblePractitioner", "valueReference": { - "reference": "urn:uuid:a5acefc1-f8ca-4989-a5ac-34ae36741466", - "display": "DR SAZ RAZ" + "reference": "urn:uuid:a5acefc1-f8ca-4989-a5ac-34ae36741466" + } + }, + { + "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionType", + "valueCoding": { + "system": "https://fhir.nhs.uk/CodeSystem/prescription-type", + "code": "1201", + "display": "Outpatient Homecare Prescriber - Medical Prescriber" } + }, + { + "url": "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MedicationRepeatInformation", + "extension": [ + { + "url": "numberOfPrescriptionsIssued", + "valueUnsignedInt": 1 + }, + { + "url": "authorisationExpiryDate", + "valueDateTime": "2020-08-07" + } + ] } ], "identifier": [ @@ -71,7 +95,27 @@ } ], "status": "cancelled", - "intent": "order", + "statusReason": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/medicationrequest-status-reason", + "code": "0001", + "display": "Prescribing Error" + } + ] + }, + "intent": "original-order", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category", + "code": "outpatient", + "display": "Outpatient" + } + ] + } + ], "medicationCodeableConcept": { "coding": [ { @@ -82,34 +126,138 @@ ] }, "subject": { - "reference": "urn:uuid:78d3c2eb-009e-4ec8-a358-b042954aa9b2", - "display": "ETTA CORY" + "reference": "urn:uuid:78d3c2eb-009e-4ec8-a358-b042954aa9b2" }, "authoredOn": "2020-07-13T12:00:00+00:00", "requester": { - "reference": "urn:uuid:56166769-c1c4-4d07-afa8-132b5dfca666", - "display": "DR RAZIA ALI" + "reference": "urn:uuid:56166769-c1c4-4d07-afa8-132b5dfca666" }, + "basedOn": [ + { + "reference": "https://elmpt-hospitals.nhs.uk/MedicationRequest/654321" + } + ], "groupIdentifier": { + "extension": [ + { + "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionId", + "valueIdentifier": { + "system": "https://fhir.nhs.uk/Id/prescription", + "value": "ad945a29-85f8-439a-b590-6789719adc16" + } + } + ], "system": "https://fhir.nhs.uk/Id/prescription-order-number", "value": "DC2C66-A1B2C3-23407B" }, + "courseOfTherapyType": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-course-of-therapy", + "code": "continuous", + "display": "Continuous long term therapy" + } + ] + }, + "dosageInstruction": [ + { + "text": "10 milligram, Inject, Subcutaneous route, once weekly", + "additionalInstruction": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "421769005", + "display": "Follow directions" + } + ] + } + ], + "patientInstruction": "As directed", + "timing": { + "repeat": { + "boundsDuration": { + "value": 10, + "unit": "day", + "system": "http://unitsofmeasure.org", + "code": "d" + }, + "frequency": 5, + "period": 1, + "periodUnit": "d" + } + }, + "route": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "34206005", + "display": "Subcutaneous route" + } + ] + }, + "method": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "422145002", + "display": "Inject" + } + ] + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 10, + "unit": "milligram", + "system": "http://unitsofmeasure.org", + "code": "mg" + } + } + ] + } + ], "dispenseRequest": { + "extension": [ + { + "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PerformerSiteType", + "valueCoding": { + "system": "https://fhir.nhs.uk/CodeSystem/dispensing-site-preference", + "code": "P2" + } + } + ], + "validityPeriod": { + "start": "2020-07-13T12:00:00+00:00", + "end": "2020-08-07T12:00:00+00:00" + }, + "numberOfRepeatsAllowed": 0, + "quantity": { + "value": 1, + "unit": "Injection", + "system": "http://snomed.info/sct", + "code": "3092611000001103" + }, + "expectedSupplyDuration": { + "value": 7, + "unit": "day", + "system": "http://unitsofmeasure.org", + "code": "d" + }, "performer": { - "extension": [ + "extension": [ { - "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-DispensingPerformer", - "valueReference": { - "reference": "urn:uuid:25f3dd9f-5838-44a7-930e-c78ae3ecadd6", - "display": "LOTTIE POTTS" + "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-DispensingPerformer", + "valueReference": { + "reference": "urn:uuid:25f3dd9f-5838-44a7-930e-c78ae3ecadd6", + "display": "LOTTIE POTTS" } } ], "identifier": { "system": "https://fhir.nhs.uk/Id/ods-organization-code", "value": "VNE51" - }, - "display": "The Simple Pharmacy" + } } }, "substitution": { diff --git a/MedicationRequest/outpatient-four-items-cancel-response-morphine.json b/MedicationRequest/outpatient-four-items-cancel-response-morphine.json index dd0e3c9..4c41722 100644 --- a/MedicationRequest/outpatient-four-items-cancel-response-morphine.json +++ b/MedicationRequest/outpatient-four-items-cancel-response-morphine.json @@ -51,11 +51,36 @@ } ] }, + { + "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionType", + "valueCoding": { + "system": "https://fhir.nhs.uk/CodeSystem/prescription-type", + "code": "1001", + "display": "Outpatient Community Prescriber - Medical Prescriber" + } + }, { "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-ResponsiblePractitioner", "valueReference": { "reference": "urn:uuid:56166769-c1c4-4d07-afa8-132b5dfca645" } + }, + { + "extension": [ + { + "url": "quantityWords", + "valueString": "twenty eight" + }, + { + "url": "schedule", + "valueCoding": { + "system": "https://fhir.nhs.uk/CodeSystem/medicationrequest-controlled-drug", + "code": "CD2", + "display": "Schedule 2" + } + } + ], + "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-ControlledDrug" } ], "identifier": [ @@ -64,10 +89,30 @@ "value": "A7B86F8D-1D7C-FC28-E050-D20AE3A215F0" } ], - "status": "active", + "status": "cancelled", + "statusReason": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/medicationrequest-status-reason", + "code": "0001", + "display": "Prescribing Error" + } + ] + }, "intent": "order", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category", + "code": "outpatient", + "display": "Outpatient" + } + ] + } + ], "medicationCodeableConcept": { - "coding": [ + "coding": [ { "system": "http://snomed.info/sct", "code": "36126511000001106", @@ -83,9 +128,48 @@ "reference": "urn:uuid:63aa76ee-4b0d-41d8-97d5-fe86a134736b" }, "groupIdentifier": { + "extension": [ + { + "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionId", + "valueIdentifier": { + "system": "https://fhir.nhs.uk/Id/prescription", + "value": "A7B86F8D-1CF8-FC28-E050-D20AE3A215F0" + } + } + ], "system": "https://fhir.nhs.uk/Id/prescription-order-number", "value": "3C2366-B81001-0A409U" }, + "courseOfTherapyType": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-course-of-therapy", + "code": "acute", + "display": "Short course (acute) therapy" + } + ] + }, + "dosageInstruction": [ + { + "text": "1 tablet, daily", + "timing": { + "repeat": { + "period": 1, + "periodUnit": "d" + } + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 1, + "unit": "tablet", + "system": "http://snomed.info/sct", + "code": "428673006" + } + } + ] + } + ], "dispenseRequest": { "extension": [ { diff --git a/MedicationRequest/outpatient-four-items-cancel-subsequent-response-morphine.json b/MedicationRequest/outpatient-four-items-cancel-subsequent-response-morphine.json index c4cf729..44da09b 100644 --- a/MedicationRequest/outpatient-four-items-cancel-subsequent-response-morphine.json +++ b/MedicationRequest/outpatient-four-items-cancel-subsequent-response-morphine.json @@ -47,6 +47,14 @@ } ] }, + { + "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionType", + "valueCoding": { + "system": "https://fhir.nhs.uk/CodeSystem/prescription-type", + "code": "1001", + "display": "Outpatient Community Prescriber - Medical Prescriber" + } + }, { "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-ResponsiblePractitioner", "valueReference": { @@ -61,8 +69,7 @@ }, { "url": "schedule", - "valueCoding": - { + "valueCoding": { "system": "https://fhir.nhs.uk/CodeSystem/medicationrequest-controlled-drug", "code": "CD2", "display": "Schedule 2" @@ -79,9 +86,29 @@ } ], "status": "cancelled", + "statusReason": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/medicationrequest-status-reason", + "code": "0001", + "display": "Prescribing Error" + } + ] + }, "intent": "order", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category", + "code": "outpatient", + "display": "Outpatient" + } + ] + } + ], "medicationCodeableConcept": { - "coding": [ + "coding": [ { "system": "http://snomed.info/sct", "code": "36126511000001106", @@ -97,9 +124,48 @@ "reference": "urn:uuid:63aa76ee-4b0d-41d8-97d5-fe86a134736b" }, "groupIdentifier": { + "extension": [ + { + "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionId", + "valueIdentifier": { + "system": "https://fhir.nhs.uk/Id/prescription", + "value": "A7B86F8D-1CF8-FC28-E050-D20AE3A215F0" + } + } + ], "system": "https://fhir.nhs.uk/Id/prescription-order-number", "value": "3C2366-B81001-0A409U" }, + "courseOfTherapyType": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-course-of-therapy", + "code": "acute", + "display": "Short course (acute) therapy" + } + ] + }, + "dosageInstruction": [ + { + "text": "1 tablet, daily", + "timing": { + "repeat": { + "period": 1, + "periodUnit": "d" + } + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 1, + "unit": "tablet", + "system": "http://snomed.info/sct", + "code": "428673006" + } + } + ] + } + ], "dispenseRequest": { "extension": [ { diff --git a/fhirpkg.lock.json b/fhirpkg.lock.json index 58cba73..d55700d 100644 --- a/fhirpkg.lock.json +++ b/fhirpkg.lock.json @@ -3,7 +3,7 @@ "dependencies": { "hl7.fhir.r4.core": "4.0.1", "fhir.r4.ukcore.stu3.currentbuild": "0.0.3-pre-release", - "uk.nhsdigital.r4.test": "2.8.14-prerelease" + "uk.nhsdigital.r4.test": "2.8.19-prerelease" }, "missing": {} } diff --git a/package.json b/package.json index 849aed8..4b2a3fb 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "dependencies": { "hl7.fhir.r4.core": "4.0.1", "fhir.r4.ukcore.stu3.currentbuild": "0.0.3-pre-release", - "uk.nhsdigital.r4.test": "2.8.14-prerelease" + "uk.nhsdigital.r4.test": "2.8.19-prerelease" }, "jurisdiction" : "urn:iso:std:iso:3166:-2:GB-ENG" }