From ee55c8875f26d0bce7e71d4e58ff198139e6ed34 Mon Sep 17 00:00:00 2001 From: jonathanwelch1-nhs <148754575+jonathanwelch1-nhs@users.noreply.github.com> Date: Fri, 12 Apr 2024 16:03:50 +0000 Subject: [PATCH] Docs: [AEA-3997] - update api spec with timestamp and ready to deliver (#116) ## Summary **Remove items from this list if they are not relevant. Remove this line once this has been done** - Routine Change ### Details Updated the PSU API spec with a new option and added more validation and exmaples to the timestamp for last updated --- .../eps-prescription-status-update-api.yaml | 5 ++ .../examples/request-ready-for-delivery.json | 54 +++++++++++++++++++ .../UpdatePrescriptionStatusTask.yaml | 3 +- 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 packages/specification/examples/request-ready-for-delivery.json diff --git a/packages/specification/eps-prescription-status-update-api.yaml b/packages/specification/eps-prescription-status-update-api.yaml index 0644dda78..9367a13e1 100755 --- a/packages/specification/eps-prescription-status-update-api.yaml +++ b/packages/specification/eps-prescription-status-update-api.yaml @@ -134,6 +134,11 @@ paths: schema: $ref: "#/components/schemas/UpdatePrescriptionStatusBundle" examples: + ready-for-delivery: + summary: ready-for-delivery + description: A request message contains tracking status `Ready for delivery`. + value: + $ref: examples/request-ready-for-delivery.json dispatched: summary: dispatched description: A request message contains tracking status `Dispatched``. diff --git a/packages/specification/examples/request-ready-for-delivery.json b/packages/specification/examples/request-ready-for-delivery.json new file mode 100644 index 000000000..0ae3661a0 --- /dev/null +++ b/packages/specification/examples/request-ready-for-delivery.json @@ -0,0 +1,54 @@ +{ + "resourceType": "Bundle", + "type": "transaction", + "entry": [ + { + "fullUrl": "http://example.org/fhir/Task/4d70678c-81e4-4ff4-8c67-17596fd0aa46", + "resource": { + "resourceType": "Task", + "id": "4d70678c-81e4-4ff4-8c67-17596fd0aa46", + "basedOn": [ + { + "identifier": { + "system": "https://fhir.nhs.uk/Id/prescription-order-number", + "value": "24F5DA-A83008-7EFE6Z" + } + } + ], + "status": "in-progress", + "businessStatus": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/task-businessStatus-nppt", + "code": "Ready for delivery" + } + ] + }, + "intent": "order", + "focus": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/prescription-order-item-number", + "value": "6989b7bd-8db6-428c-a593-4022e3044c00" + } + }, + "for": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9449304130" + } + }, + "lastModified": "2024-01-30T12:01:24Z", + "owner": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "C9Z1O" + } + } + }, + "request": { + "method": "POST", + "url": "Task" + } + } + ] +} diff --git a/packages/specification/schemas/resources/UpdatePrescriptionStatusTask.yaml b/packages/specification/schemas/resources/UpdatePrescriptionStatusTask.yaml index dacead52e..225b6a98b 100644 --- a/packages/specification/schemas/resources/UpdatePrescriptionStatusTask.yaml +++ b/packages/specification/schemas/resources/UpdatePrescriptionStatusTask.yaml @@ -53,6 +53,7 @@ properties: - Collected - Dispatched - Not Dispensed + - Ready for Delivery intent: type: string description: Order is the allowed value to indicate the update informs an actionable task. @@ -89,7 +90,7 @@ properties: example: "9449304130" lastModified: type: string - description: Only the latest last modified date will be displayed to users of the NHS App. This mechanism will be implemented to resolve updates received out of sequence. + description: Date and time, specified as UTC value, when the prescription item status was updated. Only the latest last modified date will be displayed to users of the NHS App. This mechanism will be implemented to resolve updates received out of sequence. format: date-time example: 2024-01-30T12:01:24Z owner: