Skip to content

Commit f772cbf

Browse files
[ERSSUP-81432]-[]-[Fetch Appointments for booking worklist OAS changes]-[DMW]
1 parent 95818ae commit f772cbf

File tree

13 files changed

+345
-41
lines changed

13 files changed

+345
-41
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"resourceType": "Parameters",
3+
"meta": {
4+
"profile": [
5+
"https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-Parameters-1"
6+
]
7+
},
8+
"parameter": [
9+
{
10+
"name": "listType",
11+
"valueCodeableConcept": {
12+
"coding": [
13+
{
14+
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralListSelector-1",
15+
"code": "APPOINTMENTS_FOR_BOOKING"
16+
}
17+
]
18+
}
19+
},
20+
{
21+
"name": "bookingReason",
22+
"valueCoding": {
23+
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BookingReason-1",
24+
"code": "TRIAGE_TO_BE_BOOKED"
25+
}
26+
}
27+
]
28+
}
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
{
2+
"meta": {
3+
"profile": [
4+
"https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-List-1"
5+
]
6+
},
7+
"resourceType": "List",
8+
"status": "current",
9+
"mode": "snapshot",
10+
"entry": [
11+
{
12+
"extension": [
13+
{
14+
"extension": [
15+
{
16+
"url": "patient",
17+
"valueReference": {
18+
"identifier": {
19+
"system": "http://fhir.nhs.net/Id/nhs-number",
20+
"value": "9462979626"
21+
}
22+
}
23+
},
24+
{
25+
"url": "appointmentStart",
26+
"valueDateTime": "2021-09-05T19:24:02.198Z"
27+
},
28+
{
29+
"url": "eReferralPathwayStart",
30+
"valueDateTime": "2021-09-03T14:24:06.483Z"
31+
},
32+
{
33+
"url": "referrer",
34+
"valueReference": {
35+
"identifier": {
36+
"system": "http://fhir.nhs.net/Id/sds-user-id",
37+
"value": "021600556514"
38+
}
39+
}
40+
},
41+
{
42+
"url": "priority",
43+
"valueCodeableConcept": {
44+
"coding": [
45+
{
46+
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1",
47+
"code": "ROUTINE"
48+
}
49+
]
50+
}
51+
},
52+
{
53+
"url": "reason",
54+
"valueCodeableConcept": {
55+
"coding": [
56+
{
57+
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BookingReason-1",
58+
"code": "TRIAGE_TO_BE_BOOKED"
59+
}
60+
]
61+
}
62+
},
63+
{
64+
"url": "service",
65+
"valueReference": {
66+
"identifier": {
67+
"system": "http://fhir.nhs.net/Id/ers-service",
68+
"value": "11012"
69+
},
70+
"display": "Excellent Cardiology Business Service 12"
71+
}
72+
},
73+
{
74+
"url": "specialty",
75+
"valueCodeableConcept": {
76+
"coding": [
77+
{
78+
"system": "_baseUrl_/STU3/CodeSystem/SPECIALTY",
79+
"code": "CARDIOLOGY"
80+
}
81+
]
82+
}
83+
}
84+
],
85+
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AppointmentsForBooking-WorkListItem-1"
86+
}
87+
],
88+
"item": {
89+
"reference": "ReferralRequest/000000070001"
90+
}
91+
},
92+
{
93+
"extension": [
94+
{
95+
"extension": [
96+
{
97+
"url": "patient",
98+
"valueReference": {
99+
"identifier": {
100+
"system": "http://fhir.nhs.net/Id/nhs-number",
101+
"value": "9462979626"
102+
}
103+
}
104+
},
105+
{
106+
"url": "appointmentStart",
107+
"valueDateTime": "2021-09-05T19:24:02.198Z"
108+
},
109+
{
110+
"url": "eReferralPathwayStart",
111+
"valueDateTime": "2021-09-03T14:24:06.483Z"
112+
},
113+
{
114+
"url": "referrer",
115+
"valueReference": {
116+
"identifier": {
117+
"system": "http://fhir.nhs.net/Id/sds-user-id",
118+
"value": "021600556514"
119+
}
120+
}
121+
},
122+
{
123+
"url": "priority",
124+
"valueCodeableConcept": {
125+
"coding": [
126+
{
127+
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1",
128+
"code": "ROUTINE"
129+
}
130+
]
131+
}
132+
},
133+
{
134+
"url": "reason",
135+
"valueCodeableConcept": {
136+
"coding": [
137+
{
138+
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BookingReason-1",
139+
"code": "TRIAGE_TO_BE_BOOKED"
140+
}
141+
]
142+
}
143+
},
144+
{
145+
"url": "service",
146+
"valueReference": {
147+
"identifier": {
148+
"system": "http://fhir.nhs.net/Id/ers-service",
149+
"value": "11012"
150+
},
151+
"display": "Excellent Cardiology Business Service 12"
152+
}
153+
},
154+
{
155+
"url": "specialty",
156+
"valueCodeableConcept": {
157+
"coding": [
158+
{
159+
"system": "_baseUrl_/STU3/CodeSystem/SPECIALTY",
160+
"code": "CARDIOLOGY"
161+
}
162+
]
163+
}
164+
}
165+
],
166+
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AppointmentsForBooking-WorkListItem-1"
167+
}
168+
],
169+
"item": {
170+
"reference": "ReferralRequest/000000070001"
171+
}
172+
}
173+
]
174+
}

sandbox/src/routes/stu3/services/mockResponseProvider.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,11 @@ module.exports = {
169169
const attachmentId = request.params.attachmentLogicalID
170170

171171
if (attachmentId) {
172-
172+
173173
if (attachmentId.startsWith('att-')) {
174174
return { responsePath: 'stu3/retrieveAttachment/responses/example_attachment.pdf', filename: 'example_attachment.pdf', responseCode: 200 }
175175
}
176-
176+
177177
if (attachmentId === 'c5d2d200-7613-4a69-9c5f-1bb68e04b8d8') {
178178
return { responsePath: 'stu3/retrieveAttachment/responses/example_attachment.pdf', filename: 'example_attachment.pdf', responseCode: 200 }
179179
}
@@ -276,7 +276,7 @@ module.exports = {
276276

277277
getExampleResponseForRetrieveAdviceAndGuidanceOverviewPdf: function () {
278278
return { responsePath: 'stu3/retrieveAdviceAndGuidanceOverviewPdf/responses/000049146177_Advice_And_Guidance_20220610143044.pdf', filename: '000049146177_Advice_And_Guidance_20220610143044.pdf', responseCode: 200 }
279-
},
279+
},
280280

281281
getExampleResponseForRetrieveWorklist: function (request) {
282282
var responseMap = {
@@ -287,7 +287,8 @@ module.exports = {
287287
'src/mocks/stu3/retrieveWorklist/requests/MinimalRejectedTriageResponse.json': 'stu3/retrieveWorklist/responses/RejectedTriageResponse.json',
288288
'src/mocks/stu3/retrieveWorklist/requests/MinimalAssessmentReturnedCancelledDna.json': 'stu3/retrieveWorklist/responses/AssessmentReturnedCancelledDna.json',
289289
'src/mocks/stu3/retrieveWorklist/requests/MinimalAwaitingBooking.json': 'stu3/retrieveWorklist/responses/AwaitingBooking.json',
290-
'src/mocks/stu3/retrieveWorklist/requests/MinimalLettersOutstanding.json': 'stu3/retrieveWorklist/responses/LettersOutstanding.json'
290+
'src/mocks/stu3/retrieveWorklist/requests/MinimalLettersOutstanding.json': 'stu3/retrieveWorklist/responses/LettersOutstanding.json',
291+
'src/mocks/stu3/retrieveWorklist/requests/AppointmentsForBookingWithReason.json': 'stu3/retrieveWorklist/responses/AppointmentsForBooking.json'
291292
}
292293

293294
return mapExampleResponse(request, responseMap)

specification/components/stu3/schemas/eRS-FetchWorklist-List.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ properties:
144144
| `Extension-eRS-AssessmentReturnedCancelledDna-WorklistItem` | `0..1` | Type of worklist items depends on the worklist type requested |
145145
| `Extension-eRS-AwaitingBooking-WorklistItem` | `0..1` | Type of worklist items depends on the worklist type requested |
146146
| `Extension-eRS-LettersOutstanding-WorklistItem` | `0..1` | Type of worklist items depends on the worklist type requested |
147+
| `Extension-eRS-AppointmentsForBooking-WorklistItem` | `0..1` | Type of worklist items depends on the worklist type requested |
147148
items:
148149
anyOf:
149150
- $ref: 'extensions/Extension-eRS-ReferralsforReview-WorkListItem.yaml'
@@ -153,4 +154,5 @@ properties:
153154
- $ref: 'extensions/Extension-eRS-AssessmentReturnedCancelledDna-WorklistItem.yaml'
154155
- $ref: 'extensions/Extension-eRS-AwaitingBooking-WorklistItem.yaml'
155156
- $ref: 'extensions/Extension-eRS-LettersOutstanding-WorklistItem.yaml'
157+
- $ref: 'extensions/Extension-eRS-AppointmentsForBooking-WorklistItem.yaml'
156158

specification/components/stu3/schemas/eRS-FetchWorklist-Parameters.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ properties:
3737
| `location` | `0..1` | |
3838
| `clinicianAssignedIndicator` | `0..1` | |
3939
| `clinician` | `0..1` | |
40+
| `bookingReason` | `0..*` | |
41+
4042
items:
4143
anyOf:
4244
- $ref: 'parameters/ListType.yaml'
@@ -46,3 +48,4 @@ properties:
4648
- $ref: 'parameters/Location.yaml'
4749
- $ref: 'parameters/ClinicianAssignedIndicator.yaml'
4850
- $ref: 'parameters/Clinician.yaml'
51+
- $ref: 'parameters/BookingReasons.yaml'

specification/components/stu3/schemas/endpoints/a008-retrieve-worklist.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ requestBody:
160160
summary: Letters Outstanding
161161
value:
162162
$ref: '../../examples/retrieveWorklist/requests/MinimalLettersOutstanding.json'
163+
appointments-for-booking:
164+
summary: Appointments For Booking
165+
value:
166+
$ref: '../../examples/retrieveWorklist/requests/AppointmentsForBookingWithReason.json'
163167
responses:
164168
'200':
165169
$ref: '../responses/retrieveWorklist/200Response.yaml'
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
title: 'Extension-eRS-AppointmentsForBooking-WorklistItem'
2+
type: object
3+
required:
4+
- url
5+
- extension
6+
properties:
7+
url:
8+
type: string
9+
enum:
10+
- 'https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AppointmentsForBooking-WorkListItem-1'
11+
example: 'https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AppointmentsForBooking-WorkListItem-1'
12+
extension:
13+
description: |
14+
| Field | Cardinality | Notes |
15+
| ------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------- |
16+
| `patient` | `1..1` | The patient associated with the `ReferralRequest` |
17+
| `appointmentStart` | `0..1` | The current appointment start time |
18+
| `eReferralPathwayStart` | `1..1` | The start time of the referral pathway |
19+
| `referrer` | `1..1` | The `Practitioner` who initially creates the `ReferralRequest` |
20+
| `priority` | `1..1` | The priority associated with the `ReferralRequest` |
21+
| `service` | `1..1` | The Service Name of the deferred-to Service associated with the Appointment Request. |
22+
| `reason` | `1..1` | Reason that Appointment requires booking |
23+
| `specialty` | `1..1` | The speciality of the current booking |
24+
25+
type: array
26+
items:
27+
anyOf:
28+
- $ref: './worklists/Extension-WorklistItem-Patient.yaml'
29+
- $ref: './worklists/Extension-WorklistItem-AppointmentStart.yaml'
30+
- $ref: './worklists/Extension-WorklistItem-ReferralPathwayStart.yaml'
31+
- $ref: './worklists/Extension-WorklistItem-Referrer.yaml'
32+
- $ref: './worklists/Extension-WorklistItem-Priority.yaml'
33+
- $ref: './worklists/Extension-WorklistItem-Service.yaml'
34+
- $ref: './worklists/Extension-WorklistItem-BookingReason.yaml'
35+
- $ref: './worklists/Extension-WorklistItem-Specialty.yaml'
36+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
title: reason
2+
type: object
3+
required:
4+
- url
5+
- valueCodeableConcept
6+
properties:
7+
url:
8+
type: string
9+
enum:
10+
- reason
11+
example: 'reason'
12+
valueCodeableConcept:
13+
type: object
14+
required:
15+
- coding
16+
properties:
17+
coding:
18+
type: array
19+
minItems: 1
20+
maxItems: 1
21+
items:
22+
type: object
23+
required:
24+
- system
25+
- code
26+
properties:
27+
system:
28+
type: string
29+
enum:
30+
- https://fhir.nhs.uk/STU3/CodeSystem/eRS-BookingReason-1
31+
example: 'https://fhir.nhs.uk/STU3/CodeSystem/eRS-BookingReason-1'
32+
code:
33+
type: string
34+
enum:
35+
- REBOOKING
36+
- CANCELLED_APPOINTMENT_ADMIN_REBOOK
37+
- CANCELLED_BY_PATIENT
38+
- CANCELLED_BY_PROVIDER
39+
- DEFERRED_TO_PROVIDER
40+
- ONWARD_REFERRAL
41+
- DNA
42+
- TRIAGE_TO_BE_BOOKED
43+
- TRIAGE_SEE_COMMENTS
44+
- TRIAGE_ANG_CONVERTED_SEE_COMMENTS
45+
example: 'TRIAGE_TO_BE_BOOKED'

0 commit comments

Comments
 (0)