Skip to content

Commit 4d57764

Browse files
Merge pull request #744 from NHSDigital/develop
ERSSUP-66627 - APIM-R 1.18 cut
2 parents 85920b9 + ac12359 commit 4d57764

27 files changed

+1243
-361
lines changed

poetry.lock

Lines changed: 274 additions & 169 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@ semver = "^2.9.0"
2929
gitpython = "^3.1.30"
3030
lxml = "^4.9.2"
3131
xmlformatter = "^0.2.4"
32-
pytest-check = "^2.1.2"
32+
pytest-check = "^2.1.4"
3333
requests = "^2.28.2"
3434
openapi-core = "0.14.2"
3535

3636

3737
[tool.poetry.dev-dependencies]
3838
flake8 = "^5.0.4"
39-
black = "^22.12"
39+
black = "^23.1"
4040
pip-licenses = "^4.0.3"
4141
jinja2 = "^3.1.2"
4242
pytest = "^6.1.2"
4343
pytest-asyncio = "^0.14.0"
44-
api-test-utils = {url = "https://github.com/NHSDigital/apim-test-utils/releases/download/v1.1.31-alpha/api_test_utils-1.1.31a0-py3-none-any.whl"}
44+
api-test-utils = {url = "https://github.com/NHSDigital/apim-test-utils/releases/download/v1.1.42-alpha/api_test_utils-1.1.42a0-py3-none-any.whl"}
4545

4646
[tool.poetry.scripts]
4747

sandbox/package-lock.json

Lines changed: 150 additions & 183 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sandbox/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"homepage": "https://github.com/NHSDigital/hello-world-api",
1313
"main": "app.js",
1414
"dependencies": {
15-
"@hapi/hapi": "^21.2.0",
15+
"@hapi/hapi": "^21.3.0",
1616
"@hapi/inert": "^7.0.0",
1717
"lodash": "^4.17.20"
1818
},
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"id": "123e4567-e89b-12d3-a456-426614174002",
3+
"resourceType": "Bundle",
4+
"meta": {
5+
"lastUpdated": "2022-03-01T10:00:00.42Z"
6+
},
7+
"timestamp": "2022-04-06T15:42:00.42Z",
8+
"link": [
9+
{
10+
"relation": "self",
11+
"url": "_baseUrl_/R4/ServiceRequest?identifier=https%3A%2F%2Ffhir.nhs.uk%2FId%2FUBRN%7C000000070001"
12+
}
13+
],
14+
"total": 1,
15+
"type": "searchset",
16+
"entry": [
17+
{
18+
"fullUrl": "_baseUrl_/R4/ServiceRequest/a.86b486e8-13fc-4623-8c25-3c0af85c649f",
19+
"resource": {
20+
"id": "a.86b486e8-13fc-4623-8c25-3c0af85c649f",
21+
"meta": {
22+
"versionId": "5"
23+
},
24+
"resourceType": "ServiceRequest",
25+
"identifier": [
26+
{
27+
"system": "https://fhir.nhs.uk/Id/UBRN",
28+
"value": "000000070001"
29+
}
30+
],
31+
"status": "active",
32+
"intent": "order",
33+
"category": [
34+
{
35+
"coding": [
36+
{
37+
"system": "https://fhir.nhs.uk/CodeSystem/message-category-servicerequest",
38+
"code": "request"
39+
}
40+
]
41+
}
42+
],
43+
"code": {
44+
"coding": [
45+
{
46+
"system": "https://fhir.nhs.uk/CodeSystem/servicerequest-code",
47+
"code": "advice-and-guidance"
48+
}
49+
]
50+
},
51+
"subject": {
52+
"identifier": {
53+
"system": "https://fhir.nhs.uk/Id/nhs-number",
54+
"value": "9912003888"
55+
}
56+
}
57+
},
58+
"search": {
59+
"mode": "match"
60+
}
61+
}
62+
]
63+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"id": "123e4567-e89b-12d3-a456-426614174002",
3+
"resourceType": "Bundle",
4+
"meta": {
5+
"lastUpdated": "2022-03-01T10:00:00.42Z"
6+
},
7+
"timestamp": "2022-04-06T15:42:00.42Z",
8+
"link": [
9+
{
10+
"relation": "self",
11+
"url": "_baseUrl_/R4/ServiceRequest?identifier=https%3A%2F%2Ffhir.nhs.uk%2FId%2FUBRN%7C000000070003"
12+
}
13+
],
14+
"total": 0,
15+
"type": "searchset"
16+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"id": "123e4567-e89b-12d3-a456-426614174002",
3+
"resourceType": "Bundle",
4+
"meta": {
5+
"lastUpdated": "2022-03-01T10:00:00.42Z"
6+
},
7+
"timestamp": "2022-04-06T15:42:00.42Z",
8+
"link": [
9+
{
10+
"relation": "self",
11+
"url": "_baseUrl_/R4/ServiceRequest?identifier=https%3A%2F%2Ffhir.nhs.uk%2FId%2FUBRN%7C000000070000"
12+
}
13+
],
14+
"total": 1,
15+
"type": "searchset",
16+
"entry": [
17+
{
18+
"fullUrl": "_baseUrl_/R4/ServiceRequest/r.832db7fa-ebdd-44b6-ab3b-8329c2d43149",
19+
"resource": {
20+
"id": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149",
21+
"meta": {
22+
"versionId": "5"
23+
},
24+
"resourceType": "ServiceRequest",
25+
"identifier": [
26+
{
27+
"system": "https://fhir.nhs.uk/Id/UBRN",
28+
"value": "000000070000"
29+
}
30+
],
31+
"status": "active",
32+
"intent": "order",
33+
"category": [
34+
{
35+
"coding": [
36+
{
37+
"system": "https://fhir.nhs.uk/CodeSystem/message-category-servicerequest",
38+
"code": "referral"
39+
}
40+
]
41+
}
42+
],
43+
"subject": {
44+
"identifier": {
45+
"system": "https://fhir.nhs.uk/Id/nhs-number",
46+
"value": "9912003888"
47+
}
48+
}
49+
},
50+
"search": {
51+
"mode": "match"
52+
}
53+
}
54+
]
55+
}
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
"id": "123e4567-e89b-12d3-a456-426614174002",
3+
"resourceType": "Bundle",
4+
"meta": {
5+
"lastUpdated": "2022-03-01T10:00:00.42Z"
6+
},
7+
"timestamp": "2022-04-06T15:42:00.42Z",
8+
"link": [
9+
{
10+
"relation": "self",
11+
"url": "_baseUrl_/R4/ServiceRequest?identifier=https%3A%2F%2Ffhir.nhs.uk%2FId%2FUBRN%7C000000070002"
12+
}
13+
],
14+
"total": 2,
15+
"type": "searchset",
16+
"entry": [
17+
{
18+
"fullUrl": "_baseUrl_/R4/ServiceRequest/r.832db7fa-ebdd-44b6-ab3b-8329c2d43149",
19+
"resource": {
20+
"id": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149",
21+
"meta": {
22+
"versionId": "5"
23+
},
24+
"resourceType": "ServiceRequest",
25+
"identifier": [
26+
{
27+
"system": "https://fhir.nhs.uk/Id/UBRN",
28+
"value": "000000070002"
29+
}
30+
],
31+
"status": "active",
32+
"intent": "order",
33+
"category": [
34+
{
35+
"coding": [
36+
{
37+
"system": "https://fhir.nhs.uk/CodeSystem/message-category-servicerequest",
38+
"code": "referral"
39+
}
40+
]
41+
}
42+
],
43+
"subject": {
44+
"identifier": {
45+
"system": "https://fhir.nhs.uk/Id/nhs-number",
46+
"value": "9912003888"
47+
}
48+
}
49+
},
50+
"search": {
51+
"mode": "match"
52+
}
53+
},
54+
{
55+
"fullUrl": "_baseUrl_/R4/ServiceRequest/a.832db7fa-ebdd-44b6-ab3b-8329c2d43149",
56+
"resource": {
57+
"id": "a.832db7fa-ebdd-44b6-ab3b-8329c2d43149",
58+
"meta": {
59+
"versionId": "5"
60+
},
61+
"resourceType": "ServiceRequest",
62+
"identifier": [
63+
{
64+
"system": "https://fhir.nhs.uk/Id/UBRN",
65+
"value": "000000070002"
66+
}
67+
],
68+
"status": "completed",
69+
"intent": "order",
70+
"category": [
71+
{
72+
"coding": [
73+
{
74+
"system": "https://fhir.nhs.uk/CodeSystem/message-category-servicerequest",
75+
"code": "request"
76+
}
77+
]
78+
}
79+
],
80+
"code": {
81+
"coding": [
82+
{
83+
"system": "https://fhir.nhs.uk/CodeSystem/servicerequest-code",
84+
"code": "advice-and-guidance"
85+
}
86+
]
87+
},
88+
"subject": {
89+
"identifier": {
90+
"system": "https://fhir.nhs.uk/Id/nhs-number",
91+
"value": "9912003888"
92+
}
93+
}
94+
},
95+
"search": {
96+
"mode": "match"
97+
}
98+
}
99+
]
100+
}

sandbox/src/mocks/stu3/retrieveReferralRequest/responses/WithAdditionalRequirements.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,19 @@
3737
"value": "R69"
3838
}
3939
},
40+
{
41+
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1",
42+
"extension": [
43+
{
44+
"url": "state",
45+
"valueCoding": {
46+
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1",
47+
"code": "BOOKED",
48+
"display": "Booked"
49+
}
50+
}
51+
]
52+
},
4053
{
4154
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1",
4255
"valueCoding": {

sandbox/src/routes/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const retrieveBusinessFunctions = require('./r4/retrieveBusinessFunctions')
4040
const retrieveOboUsers = require('./r4/retrieveOboUsers')
4141
const retrieveHealthcareService = require('./r4/retrieveHealthcareService')
4242
const searchForHealthcareServices = require('./r4/searchForHealthcareServices')
43+
const searchServiceRequest = require('./r4/searchServiceRequest')
4344

4445
const routes = [].concat(
4546
getStatus,
@@ -76,7 +77,8 @@ const routes = [].concat(
7677
cancelAppointmentActionLater,
7778
cancelReferral,
7879
retrieveAppointment,
79-
retrieveAdviceAndGuidanceOverviewPdf
80+
retrieveAdviceAndGuidanceOverviewPdf,
81+
searchServiceRequest
8082
)
8183

8284
module.exports = routes

0 commit comments

Comments
 (0)