Skip to content

Commit

Permalink
Merge pull request #381 from NHSDigital/feature/ERSSUP-62776
Browse files Browse the repository at this point in the history
ERSSUP-62776 Continuation of API design - Search for ServiceRequest endpoint
  • Loading branch information
francisco-videira-nhs authored Oct 10, 2022
2 parents f0f5cb7 + 6d9f59f commit e2e536a
Show file tree
Hide file tree
Showing 31 changed files with 641 additions and 327 deletions.
21 changes: 21 additions & 0 deletions sandbox/src/mocks/r4/NHSDigital-OperationOutcome-400.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"resourceType": "OperationOutcome",
"meta": {
"lastUpdated": "2022-03-01T10:00:00.42Z"
},
"issue": [
{
"severity": "error",
"code": "required",
"details": {
"coding": [
{
"system": "https://fhir.nhs.uk/CodeSystem/http-error-codes",
"code": "REC_BAD_REQUEST"
}
]
},
"diagnostics": "Example diagnostics message."
}
]
}
21 changes: 21 additions & 0 deletions sandbox/src/mocks/r4/NHSDigital-OperationOutcome-401.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"resourceType": "OperationOutcome",
"meta": {
"lastUpdated": "2022-03-01T10:00:00.42Z"
},
"issue": [
{
"severity": "error",
"code": "login",
"details": {
"coding": [
{
"system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode",
"code": "ACCESS_DENIED"
}
]
},
"diagnostics": "Example diagnostics message."
}
]
}
21 changes: 21 additions & 0 deletions sandbox/src/mocks/r4/NHSDigital-OperationOutcome-403.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"resourceType": "OperationOutcome",
"meta": {
"lastUpdated": "2022-03-01T10:00:00.42Z"
},
"issue": [
{
"severity": "error",
"code": "forbidden",
"details": {
"coding": [
{
"system": "https://fhir.nhs.uk/CodeSystem/http-error-codes",
"code": "REC_FORBIDDEN"
}
]
},
"diagnostics": "Example diagnostics message."
}
]
}
21 changes: 21 additions & 0 deletions sandbox/src/mocks/r4/NHSDigital-OperationOutcome-404.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"resourceType": "OperationOutcome",
"meta": {
"lastUpdated": "2022-03-01T10:00:00.42Z"
},
"issue": [
{
"severity": "error",
"code": "not-found",
"details": {
"coding": [
{
"system": "https://fhir.nhs.uk/CodeSystem/http-error-codes",
"code": "REC_NOT_FOUND"
}
]
},
"diagnostics": "Example diagnostics message."
}
]
}
21 changes: 21 additions & 0 deletions sandbox/src/mocks/r4/NHSDigital-OperationOutcome-406.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"resourceType": "OperationOutcome",
"meta": {
"lastUpdated": "2022-03-01T10:00:00.42Z"
},
"issue": [
{
"severity": "error",
"code": "not-supported",
"details": {
"coding": [
{
"system": "https://fhir.nhs.uk/CodeSystem/http-error-codes",
"code": "REC_NOT_ACCEPTABLE"
}
]
},
"diagnostics": "Example diagnostics message."
}
]
}
21 changes: 21 additions & 0 deletions sandbox/src/mocks/r4/NHSDigital-OperationOutcome-429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"resourceType": "OperationOutcome",
"meta": {
"lastUpdated": "2022-03-01T10:00:00.42Z"
},
"issue": [
{
"severity": "error",
"code": "throttled",
"details": {
"coding": [
{
"system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode",
"code": "TOO_MANY_REQUESTS"
}
]
},
"diagnostics": "Example diagnostics message."
}
]
}
21 changes: 21 additions & 0 deletions sandbox/src/mocks/r4/NHSDigital-OperationOutcome-500.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"resourceType": "OperationOutcome",
"meta": {
"lastUpdated": "2022-03-01T10:00:00.42Z"
},
"issue": [
{
"severity": "error",
"code": "exception",
"details": {
"coding": [
{
"system": "https://fhir.nhs.uk/CodeSystem/http-error-codes",
"code": "REC_SERVER_ERROR"
}
]
},
"diagnostics": "Example diagnostics message."
}
]
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"id": "123e4567-e89b-12d3-a456-426614174002",
"resourceType": "Bundle",
"meta": {
"lastUpdated": "2022-03-01T10:00:00.42Z"
},
"timestamp": "2022-04-06T15:42:00.42Z",
"link": [
{
"relation": "self",
"url": "_baseUrl_/R4/ServiceRequest?identifier=https://fhir.nhs.uk/Id/UBRN%7C000000070001"
}
],
"total": 1,
"type": "searchset",
"entry": [
{
"fullUrl": "_baseUrl_/R4/ServiceRequest/a.86b486e8-13fc-4623-8c25-3c0af85c649f",
"resource": {
"id": "a.86b486e8-13fc-4623-8c25-3c0af85c649f",
"meta": {
"versionId": "5"
},
"resourceType": "ServiceRequest",
"identifier": [
{
"system": "https://fhir.nhs.uk/Id/UBRN",
"value": "000000070001"
}
],
"status": "active",
"intent": "order",
"category": [
{
"coding": [
{
"system": "https://fhir.nhs.uk/CodeSystem/message-category-servicerequest",
"code": "request"
}
]
}
],
"code": {
"coding": [
{
"system": "https://fhir.nhs.uk/CodeSystem/servicerequest-code",
"code": "advice-and-guidance"
}
]
},
"subject": {
"identifier": {
"system": "https://fhir.nhs.uk/Id/nhs-number",
"value": "9912003888"
}
}
},
"search": {
"mode": "match"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "123e4567-e89b-12d3-a456-426614174002",
"resourceType": "Bundle",
"meta": {
"lastUpdated": "2022-03-01T10:00:00.42Z"
},
"timestamp": "2022-04-06T15:42:00.42Z",
"link": [
{
"relation": "self",
"url": "_baseUrl_/R4/ServiceRequest?identifier=https://fhir.nhs.uk/Id/UBRN%7C000000070003"
}
],
"total": 0,
"type": "searchset"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"id": "123e4567-e89b-12d3-a456-426614174002",
"resourceType": "Bundle",
"meta": {
"lastUpdated": "2022-03-01T10:00:00.42Z"
},
"timestamp": "2022-04-06T15:42:00.42Z",
"link": [
{
"relation": "self",
"url": "_baseUrl_/R4/ServiceRequest?identifier=https://fhir.nhs.uk/Id/UBRN%7C000000070000"
}
],
"total": 1,
"type": "searchset",
"entry": [
{
"fullUrl": "_baseUrl_/R4/ServiceRequest/r.832db7fa-ebdd-44b6-ab3b-8329c2d43149",
"resource": {
"id": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149",
"meta": {
"versionId": "5"
},
"resourceType": "ServiceRequest",
"identifier": [
{
"system": "https://fhir.nhs.uk/Id/UBRN",
"value": "000000070000"
}
],
"status": "active",
"intent": "order",
"category": [
{
"coding": [
{
"system": "https://fhir.nhs.uk/CodeSystem/message-category-servicerequest",
"code": "referral"
}
]
}
],
"subject": {
"identifier": {
"system": "https://fhir.nhs.uk/Id/nhs-number",
"value": "9912003888"
}
}
},
"search": {
"mode": "match"
}
}
]
}
Loading

0 comments on commit e2e536a

Please sign in to comment.