Skip to content

Commit

Permalink
Update: [AEA-4005] - Update PSU Validation to allow 'Ready to Dispatc…
Browse files Browse the repository at this point in the history
…h' and 'Ready to Rispatch - Partial' status (#193)

## Summary

🎫 [AEA-4005](https://nhsd-jira.digital.nhs.uk/browse/AEA-4005) Update
PSU Validation to allow 'Ready to Dispatch' and 'Ready to Rispatch -
Partial' status

- Routine Change

### Details

A list of what the solution must do:  

- The solution must update the OAS file for the Patient Status Update
API specification to include the following additional values to the
permitted status updates in the Task.businessStatus (Prescription line
item tracking status):
  - Ready to Dispatch
  - Ready to Dispatch - Partial
- Provide updated examples to illustrate the updates to the
specification specified in the user story
- Accept a business status of 'Ready to Dispatch' in a POST to the PSU
api.
- Accept a business status of 'Ready to Dispatch - Partial' in a POST to
the PSU api.
  • Loading branch information
kris-szlapa authored May 2, 2024
1 parent 4b4c1fd commit d0f40cc
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 8 deletions.
3 changes: 3 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions packages/specification/eps-prescription-status-update-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,16 @@ paths:
schema:
$ref: "#/components/schemas/UpdatePrescriptionStatusBundle"
examples:
ready-for-dispatch:
summary: ready-for-dispatch
description: A request message contains tracking status `Ready for Dispatch`.
ready-to-dispatch:
summary: ready-to-dispatch
description: A request message contains tracking status `Ready to Dispatch`.
value:
$ref: examples/request-ready-for-dispatch.json
$ref: examples/request-ready-to-dispatch.json
ready-to-dispatch-partial:
summary: ready-to-dispatch-partial
description: A request message contains tracking status `Ready to Dispatch - Partial`.
value:
$ref: examples/request-ready-to-dispatch-partial.json
dispatched:
summary: dispatched
description: A request message contains tracking status `Dispatched``.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"resourceType": "Bundle",
"type": "transaction",
"entry": [
{
"fullUrl": "urn:uuid: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": "076E17-A83008-01F564"
}
}
],
"status": "in-progress",
"businessStatus": {
"coding": [
{
"system": "https://fhir.nhs.uk/CodeSystem/task-businessStatus-nppt",
"code": "Ready to Dispatch - Partial"
}
]
},
"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"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{
"identifier": {
"system": "https://fhir.nhs.uk/Id/prescription-order-number",
"value": "24F5DA-A83008-7EFE6Z"
"value": "2FB9A1-A83008-160701"
}
}
],
Expand All @@ -20,7 +20,7 @@
"coding": [
{
"system": "https://fhir.nhs.uk/CodeSystem/task-businessStatus-nppt",
"code": "Ready for Dispatch"
"code": "Ready to Dispatch"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ properties:
- Collected
- Dispatched
- Not Dispensed
- Ready for Dispatch
- Ready to Dispatch
- Ready to Dispatch - Partial
intent:
type: string
description: Order is the allowed value to indicate the update informs an actionable task.
Expand Down Expand Up @@ -125,4 +126,4 @@ properties:
valueInteger:
type: integer
minimum: 1
maximum: 6
maximum: 6
2 changes: 2 additions & 0 deletions packages/updatePrescriptionStatus/src/validation/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export const BUSINESS_STATUSES = [
"ready to collect",
"ready to collect - partial",
"collected",
"ready to dispatch",
"ready to dispatch - partial",
"dispatched",
"not dispensed"
]
Expand Down

0 comments on commit d0f40cc

Please sign in to comment.