Skip to content

Commit

Permalink
[ERSSUP-81432]-[]-[Fetch Appointments for booking worklist OAS change…
Browse files Browse the repository at this point in the history
…s]-[DMW]
  • Loading branch information
nhsd-david-wass committed Nov 21, 2024
1 parent a0f1e7a commit d64879a
Show file tree
Hide file tree
Showing 13 changed files with 345 additions and 41 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"resourceType": "Parameters",
"meta": {
"profile": [
"https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-Parameters-1"
]
},
"parameter": [
{
"name": "listType",
"valueCodeableConcept": {
"coding": [
{
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralListSelector-1",
"code": "APPOINTMENTS_FOR_BOOKING"
}
]
}
},
{
"name": "bookingReason",
"valueCoding": {
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BookingReason-1",
"code": "TRIAGE_TO_BE_BOOKED"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
{
"meta": {
"profile": [
"https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-List-1"
]
},
"resourceType": "List",
"status": "current",
"mode": "snapshot",
"entry": [
{
"extension": [
{
"extension": [
{
"url": "patient",
"valueReference": {
"identifier": {
"system": "http://fhir.nhs.net/Id/nhs-number",
"value": "9462979626"
}
}
},
{
"url": "appointmentStart",
"valueDateTime": "2021-09-05T19:24:02.198Z"
},
{
"url": "eReferralPathwayStart",
"valueDateTime": "2021-09-03T14:24:06.483Z"
},
{
"url": "referrer",
"valueReference": {
"identifier": {
"system": "http://fhir.nhs.net/Id/sds-user-id",
"value": "021600556514"
}
}
},
{
"url": "priority",
"valueCodeableConcept": {
"coding": [
{
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1",
"code": "ROUTINE"
}
]
}
},
{
"url": "reason",
"valueCodeableConcept": {
"coding": [
{
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BookingReason-1",
"code": "TRIAGE_TO_BE_BOOKED"
}
]
}
},
{
"url": "service",
"valueReference": {
"identifier": {
"system": "http://fhir.nhs.net/Id/ers-service",
"value": "11012"
},
"display": "Excellent Cardiology Business Service 12"
}
},
{
"url": "specialty",
"valueCodeableConcept": {
"coding": [
{
"system": "_baseUrl_/STU3/CodeSystem/SPECIALTY",
"code": "CARDIOLOGY"
}
]
}
}
],
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AppointmentsForBooking-WorkListItem-1"
}
],
"item": {
"reference": "ReferralRequest/000000070001"
}
},
{
"extension": [
{
"extension": [
{
"url": "patient",
"valueReference": {
"identifier": {
"system": "http://fhir.nhs.net/Id/nhs-number",
"value": "9462979626"
}
}
},
{
"url": "appointmentStart",
"valueDateTime": "2021-09-05T19:24:02.198Z"
},
{
"url": "eReferralPathwayStart",
"valueDateTime": "2021-09-03T14:24:06.483Z"
},
{
"url": "referrer",
"valueReference": {
"identifier": {
"system": "http://fhir.nhs.net/Id/sds-user-id",
"value": "021600556514"
}
}
},
{
"url": "priority",
"valueCodeableConcept": {
"coding": [
{
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1",
"code": "ROUTINE"
}
]
}
},
{
"url": "reason",
"valueCodeableConcept": {
"coding": [
{
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BookingReason-1",
"code": "TRIAGE_TO_BE_BOOKED"
}
]
}
},
{
"url": "service",
"valueReference": {
"identifier": {
"system": "http://fhir.nhs.net/Id/ers-service",
"value": "11012"
},
"display": "Excellent Cardiology Business Service 12"
}
},
{
"url": "specialty",
"valueCodeableConcept": {
"coding": [
{
"system": "_baseUrl_/STU3/CodeSystem/SPECIALTY",
"code": "CARDIOLOGY"
}
]
}
}
],
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AppointmentsForBooking-WorkListItem-1"
}
],
"item": {
"reference": "ReferralRequest/000000070001"
}
}
]
}
9 changes: 5 additions & 4 deletions sandbox/src/routes/stu3/services/mockResponseProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ module.exports = {
const attachmentId = request.params.attachmentLogicalID

if (attachmentId) {

if (attachmentId.startsWith('att-')) {
return { responsePath: 'stu3/retrieveAttachment/responses/example_attachment.pdf', filename: 'example_attachment.pdf', responseCode: 200 }
}

if (attachmentId === 'c5d2d200-7613-4a69-9c5f-1bb68e04b8d8') {
return { responsePath: 'stu3/retrieveAttachment/responses/example_attachment.pdf', filename: 'example_attachment.pdf', responseCode: 200 }
}
Expand Down Expand Up @@ -276,7 +276,7 @@ module.exports = {

getExampleResponseForRetrieveAdviceAndGuidanceOverviewPdf: function () {
return { responsePath: 'stu3/retrieveAdviceAndGuidanceOverviewPdf/responses/000049146177_Advice_And_Guidance_20220610143044.pdf', filename: '000049146177_Advice_And_Guidance_20220610143044.pdf', responseCode: 200 }
},
},

getExampleResponseForRetrieveWorklist: function (request) {
var responseMap = {
Expand All @@ -287,7 +287,8 @@ module.exports = {
'src/mocks/stu3/retrieveWorklist/requests/MinimalRejectedTriageResponse.json': 'stu3/retrieveWorklist/responses/RejectedTriageResponse.json',
'src/mocks/stu3/retrieveWorklist/requests/MinimalAssessmentReturnedCancelledDna.json': 'stu3/retrieveWorklist/responses/AssessmentReturnedCancelledDna.json',
'src/mocks/stu3/retrieveWorklist/requests/MinimalAwaitingBooking.json': 'stu3/retrieveWorklist/responses/AwaitingBooking.json',
'src/mocks/stu3/retrieveWorklist/requests/MinimalLettersOutstanding.json': 'stu3/retrieveWorklist/responses/LettersOutstanding.json'
'src/mocks/stu3/retrieveWorklist/requests/MinimalLettersOutstanding.json': 'stu3/retrieveWorklist/responses/LettersOutstanding.json',
'src/mocks/stu3/retrieveWorklist/requests/AppointmentsForBookingWithReason.json': 'stu3/retrieveWorklist/responses/AppointmentsForBooking.json'
}

return mapExampleResponse(request, responseMap)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ properties:
| `Extension-eRS-AssessmentReturnedCancelledDna-WorklistItem` | `0..1` | Type of worklist items depends on the worklist type requested |
| `Extension-eRS-AwaitingBooking-WorklistItem` | `0..1` | Type of worklist items depends on the worklist type requested |
| `Extension-eRS-LettersOutstanding-WorklistItem` | `0..1` | Type of worklist items depends on the worklist type requested |
| `Extension-eRS-AppointmentsForBooking-WorklistItem` | `0..1` | Type of worklist items depends on the worklist type requested |
items:
anyOf:
- $ref: 'extensions/Extension-eRS-ReferralsforReview-WorkListItem.yaml'
Expand All @@ -153,4 +154,5 @@ properties:
- $ref: 'extensions/Extension-eRS-AssessmentReturnedCancelledDna-WorklistItem.yaml'
- $ref: 'extensions/Extension-eRS-AwaitingBooking-WorklistItem.yaml'
- $ref: 'extensions/Extension-eRS-LettersOutstanding-WorklistItem.yaml'
- $ref: 'extensions/Extension-eRS-AppointmentsForBooking-WorklistItem.yaml'

Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ properties:
| `location` | `0..1` | |
| `clinicianAssignedIndicator` | `0..1` | |
| `clinician` | `0..1` | |
| `bookingReason` | `0..*` | |
items:
anyOf:
- $ref: 'parameters/ListType.yaml'
Expand All @@ -46,3 +48,4 @@ properties:
- $ref: 'parameters/Location.yaml'
- $ref: 'parameters/ClinicianAssignedIndicator.yaml'
- $ref: 'parameters/Clinician.yaml'
- $ref: 'parameters/BookingReasons.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ requestBody:
summary: Letters Outstanding
value:
$ref: '../../examples/retrieveWorklist/requests/MinimalLettersOutstanding.json'
appointments-for-booking:
summary: Appointments For Booking
value:
$ref: '../../examples/retrieveWorklist/requests/AppointmentsForBookingWithReason.json'
responses:
'200':
$ref: '../responses/retrieveWorklist/200Response.yaml'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
title: 'Extension-eRS-AppointmentsForBooking-WorklistItem'
type: object
required:
- url
- extension
properties:
url:
type: string
enum:
- 'https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AppointmentsForBooking-WorkListItem-1'
example: 'https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AppointmentsForBooking-WorkListItem-1'
extension:
description: |
| Field | Cardinality | Notes |
| ------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------- |
| `patient` | `1..1` | The patient associated with the `ReferralRequest` |
| `appointmentStart` | `0..1` | The current appointment start time |
| `eReferralPathwayStart` | `1..1` | The start time of the referral pathway |
| `referrer` | `1..1` | The `Practitioner` who initially creates the `ReferralRequest` |
| `priority` | `1..1` | The priority associated with the `ReferralRequest` |
| `service` | `1..1` | The Service Name of the deferred-to Service associated with the Appointment Request. |
| `reason` | `1..1` | Reason that Appointment requires booking |
| `specialty` | `1..1` | The speciality of the current booking |
type: array
items:
anyOf:
- $ref: './worklists/Extension-WorklistItem-Patient.yaml'
- $ref: './worklists/Extension-WorklistItem-AppointmentStart.yaml'
- $ref: './worklists/Extension-WorklistItem-ReferralPathwayStart.yaml'
- $ref: './worklists/Extension-WorklistItem-Referrer.yaml'
- $ref: './worklists/Extension-WorklistItem-Priority.yaml'
- $ref: './worklists/Extension-WorklistItem-Service.yaml'
- $ref: './worklists/Extension-WorklistItem-BookingReason.yaml'
- $ref: './worklists/Extension-WorklistItem-Specialty.yaml'

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
title: reason
type: object
required:
- url
- valueCodeableConcept
properties:
url:
type: string
enum:
- reason
example: 'reason'
valueCodeableConcept:
type: object
required:
- coding
properties:
coding:
type: array
minItems: 1
maxItems: 1
items:
type: object
required:
- system
- code
properties:
system:
type: string
enum:
- https://fhir.nhs.uk/STU3/CodeSystem/eRS-BookingReason-1
example: 'https://fhir.nhs.uk/STU3/CodeSystem/eRS-BookingReason-1'
code:
type: string
enum:
- REBOOKING
- CANCELLED_APPOINTMENT_ADMIN_REBOOK
- CANCELLED_BY_PATIENT
- CANCELLED_BY_PROVIDER
- DEFERRED_TO_PROVIDER
- ONWARD_REFERRAL
- DNA
- TRIAGE_TO_BE_BOOKED
- TRIAGE_SEE_COMMENTS
- TRIAGE_ANG_CONVERTED_SEE_COMMENTS
example: 'TRIAGE_TO_BE_BOOKED'
Loading

0 comments on commit d64879a

Please sign in to comment.