Skip to content

Commit

Permalink
Merge branch 'master' of github.com:NHSDigital/nrl-producer-api into …
Browse files Browse the repository at this point in the history
…feature/eema1-NRL-818-RaiseFaultForMissingNRLID
  • Loading branch information
eesa456 committed Sep 26, 2024
2 parents 49170cb + 5a4dd3c commit 174b7a2
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<RaiseFault async="false" continueOnError="false" enabled="true" name="RaiseFault.400MissingRequestIdHeader">
<FaultResponse>
<Set>
<Payload contentType="application/json">
{
"resourceType": "OperationOutcome",
"issue": [ {
"severity": "error",
"code": "invalid",
"details": {
"coding": [ {
"system": "https://fhir.nhs.uk/CodeSystem/Spine-ErrorOrWarningCode",
"code": "MISSING_OR_INVALID_HEADER",
"display": "There is a required header missing or invalid"
} ]
},
"diagnostics": "The X-Request-Id header is missing or invalid"
} ]
}
</Payload>
<StatusCode>400</StatusCode>
<ReasonPhrase>Bad Request</ReasonPhrase>
</Set>
</FaultResponse>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
</RaiseFault>
8 changes: 8 additions & 0 deletions proxies/live/apiproxy/proxies/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
<Condition>(proxy.pathsuffix MatchesPath "/_status") and ((request.verb = "GET") or (request.verb = "HEAD"))
</Condition>
</Flow>
<Flow name="Raise400ForMissingRequestIdHeader">
<Request>
<Step>
<Name>RaiseFault.400MissingRequestIdHeader</Name>
</Step>
</Request>
<Condition>request.verb != "OPTIONS" and (request.header.X-Request-Id = null or request.header.X-Request-Id = "")</Condition>
</Flow>
<Flow name="Raise400ForMissingODSHeader">
<Request>
<Step>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<RaiseFault async="false" continueOnError="false" enabled="true" name="RaiseFault.400MissingRequestIdHeader">
<FaultResponse>
<Set>
<Payload contentType="application/json">
{
"resourceType": "OperationOutcome",
"issue": [ {
"severity": "error",
"code": "invalid",
"details": {
"coding": [ {
"system": "https://fhir.nhs.uk/CodeSystem/Spine-ErrorOrWarningCode",
"code": "MISSING_OR_INVALID_HEADER",
"display": "There is a required header missing or invalid"
} ]
},
"diagnostics": "The X-Request-Id header is missing or invalid"
} ]
}
</Payload>
<StatusCode>400</StatusCode>
<ReasonPhrase>Bad Request</ReasonPhrase>
</Set>
</FaultResponse>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
</RaiseFault>
8 changes: 8 additions & 0 deletions proxies/sandbox/apiproxy/proxies/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
<Condition>(proxy.pathsuffix MatchesPath "/_status") and ((request.verb = "GET") or (request.verb = "HEAD"))
</Condition>
</Flow>
<Flow name="Raise400ForMissingRequestIdHeader">
<Request>
<Step>
<Name>RaiseFault.400MissingRequestIdHeader</Name>
</Step>
</Request>
<Condition>request.verb != "OPTIONS" and (request.header.X-Request-Id = null or request.header.X-Request-Id = "")</Condition>
</Flow>
<Flow name="Raise400ForMissingODSHeader">
<Request>
<Step>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const permissions = [];
"nrl.ods-code-extension": odsCodeExtension,
"nrl.pointer-types": nrlPointerTypes,
"nrl.permissions": permissions,
"nrl.app-id": "NRL-SANDBOX-APP",
};

context.targetRequest.headers["NHSD-Connection-Metadata"] =
Expand Down
34 changes: 25 additions & 9 deletions specification/record-locator/producer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,18 @@ info:
There is a growing list of health and social care organisations authorised to share records using NRL, and presently
the pointers are classified into the following types:
* [Mental Health Crisis Plan](http://snomed.info/sct/736253002)
* [Mental health crisis plan](http://snomed.info/sct/736253002)
* [Royal College of Physicians NEWS2 (National Early Warning Score 2) chart](http://snomed.info/sct/1363501000000100)
* [ReSPECT (Recommended Summary Plan for Emergency Care and Treatment) form](http://snomed.info/sct/1382601000000107)
* [Contingency plan](http://snomed.info/sct/325691000000100)
* [End of life care plan](http://snomed.info/sct/736373009)
* [End of Life Care Coordination Summary](http://snomed.info/sct/861421000000109)
* [Emergency Health Care Plans](http://snomed.info/sct/887701000000100)
* [Lloyd George record folder](http://snomed.info/sct|16521000000101)
* [Emergency health care plan](http://snomed.info/sct/887701000000100)
* [Lloyd George record folder](http://snomed.info/sct/16521000000101)
* [Advanced care plan](http://snomed.info/sct/736366004)
* [Treatment escalation plan](http://snomed.info/sct/735324008)
* [Summary record]("http://snomed.info/sct|824321000000109")
* [Personalised Care and Support Plan]("http://snomed.info/sct|2181441000000107")
You can also retrieve booking and referral pointers however you can not currently do this by directly integrating with
the National Record Locator, you must instead onboard to the [Booking and Referral - FHIR API](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir)
Expand Down Expand Up @@ -94,7 +98,7 @@ info:
## Service level
This API is a bronze service, meaning it is operational and supported only during business hours (8am to 6pm), Monday to Friday excluding bank holidays.
This API is a gold service, meaning it is operational and supported 24 hours a day, 365 days a year.
For more details, see [service levels](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#service-levels).
Expand Down Expand Up @@ -2115,10 +2119,10 @@ components:
summary: None
value: ""
SNOMED_CODES_MENTAL_HEALTH_CRISIS_PLAN:
summary: Mental Health Crisis Plan
summary: Mental health crisis plan
value: http://snomed.info/sct|736253002
SNOMED_CODES_EMERGENCY_HEALTH_CARE_PLAN:
summary: Emergency Healthcare Plan
summary: Emergency health care plan
value: http://snomed.info/sct|887701000000100
SNOMED_CODES_END_OF_LIFE_CARE_COORDINATION_SUMMARY:
summary: End of Life Care Coordination Summary
Expand All @@ -2127,7 +2131,7 @@ components:
summary: ReSPECT form
value: http://snomed.info/sct|1382601000000107
SNOMED_CODES_NEWS2_CHART:
summary: Royal College of Physicians NEWS2
summary: Royal College of Physicians NEWS2 chart
value: http://snomed.info/sct|1363501000000100
SNOMED_CODES_CONTINGENCY_PLAN:
summary: Contingency plan
Expand All @@ -2138,6 +2142,18 @@ components:
SNOMED_CODES_LLOYD_GEORGE_RECORD_FOLDER:
summary: Lloyd George record folder
value: http://snomed.info/sct|16521000000101
SNOMED_CODES_ADVANCED_CARE_PLAN:
summary: Advanced care plan
value: http://snomed.info/sct|736366004
SNOMED_CODES_TREATMENT_ESCALATION_PLAN:
summary: Treatment escalation plan
value: http://snomed.info/sct|735324008
SNOMED_CODES_SUMMARY_RECORD:
summary: Summary record
value: http://snomed.info/sct|824321000000109
SNOME_CODES_PERSONALISED_CARE_AND_SUPPORT_PLAN:
summary: Personalised Care and Support Plan
value: http://snomed.info/sct|2181441000000107
invalid:
summary: Unknown
value: http://snomed.info/sct|410970009
Expand Down Expand Up @@ -2179,7 +2195,7 @@ components:
Mirrored back in a response header.
in: header
required: false
required: true
schema:
$ref: "#/components/schemas/RequestHeaderRequestId"
correlationId:
Expand Down Expand Up @@ -2232,4 +2248,4 @@ components:
pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
example: 60E0B220-8136-4CA5-AE46-1D97EF59D068
description: |
The X-Request-ID from the request header, if supplied, mirrored back.
The X-Request-ID from the request header mirrored back.

0 comments on commit 174b7a2

Please sign in to comment.