Skip to content

Commit af02f02

Browse files
[ERSSUP-82767]-[]-[Initial OAS modelling form RM106]-[DMW]
1 parent 81ace8b commit af02f02

7 files changed

Lines changed: 172 additions & 5 deletions

File tree

sandbox/src/mocks/retrieveServiceRequests/responses/ServiceRequestsWithAppointmentAndTask.json

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,112 @@
304304
}
305305
}
306306
},
307+
{
308+
"fullUrl": "_baseUrl_/ServiceRequest/r.783014dd-c5d5-4f18-b326-739f56fa8c23",
309+
"search": {
310+
"mode": "match"
311+
},
312+
"resource": {
313+
"resourceType": "ServiceRequest",
314+
"id": "r.783014dd-c5d5-4f18-b326-739f56fa8c23",
315+
"meta": {
316+
"versionId": "1",
317+
"profile": ["https://fhir.nhs.uk/StructureDefinition/NHSDigital-ServiceRequest-PatientCare"]
318+
},
319+
"extension": [
320+
{
321+
"url": "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-ServiceRequest-State",
322+
"extension": [
323+
{
324+
"url": "state",
325+
"valueCoding": {
326+
"system": "https://fhir.nhs.uk/CodeSystem/eRS-ReferralState",
327+
"code": "CANCELLED"
328+
}
329+
},
330+
{
331+
"url": "reason",
332+
"valueCoding": {
333+
"system": "https://fhir.nhs.uk/CodeSystem/eRS-RequestCancellationReason",
334+
"code": "INTEND_PRIVATE"
335+
}
336+
},
337+
{
338+
"code": "statusChanged",
339+
"valueInstant": "2012-01-31T00:00:00.000Z"
340+
}
341+
]
342+
},
343+
{
344+
"url": "https://fhir.nhs.uk/StructureDefinition/Extension-ServiceRequest-Priority",
345+
"valueCoding": {
346+
"system": "https://fhir.nhs.uk/CodeSystem/eRS-Priority",
347+
"code": "TWO_WEEK_WAIT",
348+
"display": "2 Week Wait"
349+
}
350+
}
351+
],
352+
"contained": [
353+
{
354+
"resourceType": "PractitionerRole",
355+
"id": "PractitionerRole-R69-000000000101",
356+
"meta": {
357+
"profile": ["https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole-Minimal"]
358+
},
359+
"practitioner": {
360+
"identifier": {
361+
"system": "https://fhir.nhs.uk/Id/sds-user-id",
362+
"value": "000000000101"
363+
}
364+
},
365+
"organization": {
366+
"identifier": {
367+
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
368+
"value": "R69"
369+
}
370+
}
371+
}
372+
],
373+
"identifier": [
374+
{
375+
"system": "https://fhir.nhs.uk/Id/UBRN",
376+
"value": "111111111111"
377+
}
378+
],
379+
"status": "active",
380+
"intent": "order",
381+
"category": [
382+
{
383+
"coding": [
384+
{
385+
"system": "http://snomed.info/sct",
386+
"code": "3457005"
387+
}
388+
]
389+
}
390+
],
391+
"priority": "asap",
392+
"subject": {
393+
"identifier": {
394+
"system": "https://fhir.nhs.uk/Id/nhs-number",
395+
"value": "9912003888"
396+
}
397+
},
398+
"authoredOn": "2022-01-11T16:40:00+00:00",
399+
"requester": {
400+
"reference": "#PractitionerRole-R69-000000000101"
401+
},
402+
"performerType": {
403+
"coding": [
404+
{
405+
"system": "https://fhir.nhs.uk/CodeSystem/eRS-Specialty",
406+
"code": "DERMATOLOGY",
407+
"display": "Dermatology"
408+
}
409+
]
410+
}
411+
}
412+
},
307413
{
308414
"fullUrl": "_baseUrl_/Appointment/2c539951-0819-4ffb-ab77-b7cbdc5d9c9a",
309415
"search": {

specification/components/schemas/ServiceRequest.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ properties:
4747
$ref: identifiers/UBRN.yaml
4848
extension:
4949
type: array
50-
minItems: 3
50+
minItems: 2
5151
maxItems: 3
5252
nullable: false
5353
description: |
5454
5555
| Field | Cardinality | Notes |
5656
| ------------------------------------------ | ----------- | --------------------------------------------------------------------- |
57-
| `Extension-Portal-Link` | `1..1` | Deep Link into the specific landing page in MYR |
57+
| `Extension-Portal-Link` | `0..1` | Deep Link into the specific landing page in MYR |
5858
| `Extension-ServiceRequest-Priority` | `1..1` | Code for the priority of the referral set by the Referring Clinician |
5959
| `Extension-ServiceRequest-State` | `1..1` | Code for the ServiceRequest state |
6060
items:
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
type: object
2+
description: e-RS representation of the reason for the state of the ServiceRequest.
3+
required:
4+
- url
5+
- valueCoding
6+
properties:
7+
url:
8+
type: string
9+
enum:
10+
- 'reason'
11+
example: 'reason'
12+
valueCoding:
13+
type: object
14+
required:
15+
- system
16+
- code
17+
properties:
18+
system:
19+
type: string
20+
enum:
21+
- 'https://fhir.nhs.uk/CodeSystem/eRS-RequestCancellationReason'
22+
example: 'https://fhir.nhs.uk/CodeSystem/eRS-RequestCancellationReason'
23+
code:
24+
type: string
25+
enum:
26+
- INTEND_PRIVATE
27+
- PATIENT_REQUEST_CANCELLATION_OTHER
28+
- REFERRER_CANCELLATION
29+
- PATIENT_DIED
30+
- RAISED_IN_ERROR
31+
- TREATMENT_NO_LONGER_REQUIRED
32+
- BOOKED_OUTSIDE_CAB
33+
- PROVIDER_CANCELLATION
34+
- PATIENT_APPOINTMENT_CANCELLATION_OTHER
35+
- TRIAGE_ENDED
36+
- OUTPATIENT_SERVICE_NA
37+
- OUTPATIENT_CLINICIAN_NA
38+
- COMMUNITY_SERVICE_NA
39+
- STRAIGHT_TO_TEST
40+
- BOOKED_CLINICAL_NEED
41+
- COMPLEX_PATHWAY
42+
- NO_LONGER_REQUIRED
43+
- OTHER_OTHER
44+
- CANCELLED_DRAFT
45+
example: 'INTEND_PRIVATE'

specification/components/schemas/codings/ServiceRequest-State.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ properties:
3434
- CARL
3535
- ARBL
3636
- CARBL_OR_ARL
37+
- CANCELLED
3738
example: 'NOT_BOOKED'
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
title: representation of the date the service request state was set
2+
type: object
3+
required:
4+
- code
5+
- valueInstant
6+
properties:
7+
code:
8+
type: string
9+
enum:
10+
- statusChanged
11+
valueInstant:
12+
type: string
13+
format: date-time

specification/components/schemas/extensions/Extension-ServiceRequest-State.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ properties:
1313
extension:
1414
type: array
1515
minItems: 1
16-
maxItems: 1
16+
maxItems: 3
1717
items:
1818
anyOf:
19-
- $ref: '../codings/ServiceRequest-State.yaml'
19+
- $ref: '../codings/ServiceRequest-State.yaml'
20+
- $ref: '../codings/ServiceRequest-Cancellation-Reason.yaml'
21+
- $ref: '../codings/ServiceRequest-StatusChanged.yaml'

specification/components/schemas/responses/retrieveServiceRequests/200Response.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ content:
1515
multiple:
1616
summary: ServiceRequest search response containing multiple ServiceRequest resources with an associated Task or Appointment
1717
value:
18-
$ref: '../../../examples/retrieveServiceRequests/responses/ServiceRequestsWithAppointmentAndTask.json'
18+
$ref: '../../../examples/retrieveServiceRequests/responses/ServiceRequestsWithAppointmentAndTask.json'
1919
empty:
2020
summary: Empty ServiceRequest search response
2121
value:

0 commit comments

Comments
 (0)