Skip to content

Commit 35f660f

Browse files
[RAA-703] Further updates
1 parent f54d377 commit 35f660f

3 files changed

Lines changed: 26 additions & 60 deletions

File tree

sandbox/src/mocks/stu3/cancelReferral/responses/CancelledReferralOutpatientService.json

Lines changed: 13 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,21 @@
182182
},
183183
"language": "en",
184184
"resourceType": "Appointment",
185-
"status": "cancelled",
185+
"status": "proposed",
186+
"reason": [
187+
{
188+
"coding": [
189+
{
190+
"code": "ACCEPT_REFER_BOOK_LATER",
191+
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1",
192+
"display": "Accept Refer Book Later"
193+
}
194+
]
195+
}
196+
],
186197
"description": "e-Referral Appointment",
187198
"created": "2021-05-06T11:21:45.652Z",
199+
"comment": "Outcome",
188200
"incomingReferral": [
189201
{
190202
"reference": "ReferralRequest/000000070000/_history/4"
@@ -255,59 +267,6 @@
255267
}
256268
]
257269
}
258-
},
259-
{
260-
"name": "updatedAppointment",
261-
"resource": {
262-
"id": "70001",
263-
"meta": {
264-
"versionId": "1",
265-
"profile": [
266-
"https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1",
267-
"https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1"
268-
]
269-
},
270-
"language": "en",
271-
"resourceType": "Appointment",
272-
"status": "cancelled",
273-
"description": "e-Referral Appointment",
274-
"created": "2021-05-06T11:21:45.652Z",
275-
"reason": [
276-
{
277-
"coding": [{
278-
"system": "_baseUrl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON",
279-
"code": "PATIENT_APPOINTMENT_CANCELLATION_OTHER"
280-
}]
281-
}
282-
],
283-
"comment": "Intend Private Comment",
284-
"incomingReferral": [
285-
{
286-
"reference": "ReferralRequest/000000070000/_history/4"
287-
}
288-
],
289-
"participant": [
290-
{
291-
"actor": {
292-
"identifier": {
293-
"system": "http://fhir.nhs.net/Id/ers-service",
294-
"value": "11004"
295-
},
296-
"display": "Cardiology Business Service"
297-
},
298-
"status": "accepted"
299-
},
300-
{
301-
"actor": {
302-
"identifier": {
303-
"system": "http://fhir.nhs.net/Id/nhs-number",
304-
"value": "9912003888"
305-
}
306-
},
307-
"status": "accepted"
308-
}
309-
]
310-
}
311270
}
312271
]
313272
}

sandbox/src/routes/stu3/cancelReferral.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = [
1010
path: '/FHIR/STU3/ReferralRequest/{ubrn}/$ers.cancelReferral',
1111
handler: (request, h) => {
1212

13-
const allowedBusinessFunctions = ["REFERRING_CLINICIAN", "REFERRING_CLINICIAN_ADMIN"]
13+
const allowedBusinessFunctions = ["REFERRING_CLINICIAN", "REFERRING_CLINICIAN_ADMIN", "SERVICE_PROVIDER_CLINICIAN", "SERVICE_PROVIDER_CLINICIAN_ADMIN"]
1414

1515
const validationResult = validationUtils.validateBusinessFunction(request, h, allowedBusinessFunctions)
1616

specification/components/stu3/schemas/endpoints/a036-cancel-referral.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,15 @@ description: |
1414
1515
## Supported security patterns
1616
- Healthcare worker, user-restricted access
17+
- Application-restricted, unattended access
1718
1819
## Pre-requisites
20+
### Application-restricted, unattended access
21+
In order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.
22+
23+
To access this endpoint in application-restricted, unattended mode, you will be required to submit your use case for review. The only use case currently permitted is for non-clinical provider actions.
24+
25+
### Healthcare worker, user-restricted access
1926
In order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:
2027
- `REFERRING_CLINICIAN`
2128
- `REFERRING_CLINICIAN_ADMIN`
@@ -48,7 +55,7 @@ description: |
4855
4956
* `referrerUsage` must be `CANCEL_REFERRAL`, and
5057
51-
* `businessFunction` must be `REFERRING_CLINICIAN` or `REFERRING_CLINICIAN_ADMIN` *(depending which authenticated user will be performing the action), and
58+
* `businessFunction` must be `REFERRING_CLINICIAN` or `REFERRING_CLINICIAN_ADMIN` (depending which authenticated user will be performing the action), and
5259
5360
* `canCancelAppointment` could be true or false, and
5461
@@ -82,7 +89,7 @@ description: |
8289
8390
* `appointmentRequestCancellationReasonType` must be `PROVIDER` and `PATIENT`, and
8491
85-
* `canCancelAppointment` must be true, and
92+
* `canCancelAppointment` could be true or false, and
8693
8794
* `effectiveFrom` must be in the past, and
8895
@@ -104,7 +111,7 @@ description: |
104111
105112
You need to use [[HYPERLINK_A005]] to retrieve details of the referral in order to make this clinical decision.
106113
107-
## Important notes
114+
## Important note when retrieving attachments
108115
109116
In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download.
110117
The availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code.
@@ -115,9 +122,9 @@ description: |
115122
116123
When cancelling a referral as a Service Provider Clinician:
117124
118-
* If the referral is in the Triaged - Provider to action state, the cancellation reason must be an Appointment Request End Triage Reason type.
125+
* If the referral is in the **"Triaged - Provider to action"** state, the cancellation reason must be an **Appointment Request End Triage Reason** type.
119126
120-
* If the referral is not in that state, the cancellation reason must be a Provider Appointment Request Cancellation Reason or Patient Appointment Request Cancellation Reason type.
127+
* If the referral is **not** in that state, the cancellation reason must be a **Provider Appointment Request Cancellation Reason** or **Patient Appointment Request Cancellation Reason** type.
121128
122129
## Use case
123130
As an authenticated user

0 commit comments

Comments
 (0)