Please note: This guidance has been superseded by the Implementation guide for digitial medicines, which contains up-to-date information.
Identity validation errors
Provider systems MUST respond by returning one of the following OperationOutcome
error codes where FHIR resource identity error scenarios are encountered:
HTTP code | Issue type | Error code | Error message |
---|---|---|---|
400 |
value | INVALID_IDENTIFIER_SYSTEM |
Invalid identifier system |
400 |
value | INVALID_IDENTIFIER_VALUE |
Invalid identifier value |
400 |
value | INVALID_NHS_NUMBER |
NHS number invalid |
404 |
not-found | ORGANISATION_NOT_FOUND |
Organisation record not found |
404 |
not-found | PATIENT_NOT_FOUND |
Patient record not found |
404 |
not-found | PRACTITIONER_NOT_FOUND |
Practitioner record not found |
404 |
not-found | NO_RECORD_FOUND |
No record found |
Example: An invalid NHS Number was supplied
In this scenario an invalid NHS number value was supplied.
The JSON below represents an example response that could be returned.
{ "resourceType": "OperationOutcome", "meta": { "profile": [ "https://fhir.nhs.uk/STU3/StructureDefinition/Spine-OperationOutcome-1" ] }, "issue": [ { "severity": "error", "code": "value", "details": { "coding": [ { "system": "https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1", "code": "INVALID_NHS_NUMBER", "display": "Invalid NHS number" } ] } } ] }
Example: The patient could not be found
In this scenario a valid NHS number value was supplied; however, a local record did not exist for the patient in question.
The JSON below represents an example response that could be returned.
{ "resourceType": "OperationOutcome", "meta": { "profile": [ "https://fhir.nhs.uk/STU3/StructureDefinition/Spine-OperationOutcome-1" ] }, "issue": [ { "severity": "error", "code": "not-found", "details": { "coding": [ { "system": "https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1", "code": "PATIENT_NOT_FOUND", "display": "Patient not found" } ] } } ] }