File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed
specification/examples/responses/GET_RelatedPerson/errors Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 9292RELATED__ERROR_IDENTIFIER_MISSING = f"{ RELATED_DIRECTORY } errors/invalid-identifier-missing.yaml"
9393RELATED__ERROR_IDENTIFIER_SYSTEM = f"{ RELATED_DIRECTORY } errors/invalid-identifier-system.yaml"
9494RELATED__ERROR_IDENTIFIER = f"{ RELATED_DIRECTORY } errors/invalid-identifier.yaml"
95+ RELATED__ERROR_PATIENT_IDENTIFIER = f"{ RELATED_DIRECTORY } errors/invalid-patient-identifier.yaml"
9596RELATED__EMPTY_RESPONSE = f"{ RELATED_DIRECTORY } empty_response.yaml"
9697RELATED__LIST_RELATIONSHIP = f"{ RELATED_DIRECTORY } list_relationship_9000000017.yaml"
9798RELATED__LIST_RELATIONSHIP_WITH_INCLUDE = f"{ RELATED_DIRECTORY } list_relationship_9000000017_include.yaml"
Original file line number Diff line number Diff line change 2020 RELATED__ERROR_IDENTIFIER_MISSING ,
2121 RELATED__ERROR_IDENTIFIER_SYSTEM ,
2222 RELATED_IDENTIFIERS ,
23+ RELATED__ERROR_PATIENT_IDENTIFIER ,
2324)
2425
2526FHIR_MIMETYPE = "application/fhir+json"
@@ -51,6 +52,9 @@ def check_for_get_related_person_errors(request: Request) -> Optional[tuple]:
5152 elif identifier and len (identifier_without_system ) != 10 :
5253 # invalid identifier
5354 return generate_response_from_example (RELATED__ERROR_IDENTIFIER , 400 )
55+ elif patient and len (patient_without_system ) != 10 :
56+ # invalid patient identifier
57+ return generate_response_from_example (RELATED__ERROR_PATIENT_IDENTIFIER , 400 )
5458 elif (
5559 isinstance (identifier , str )
5660 and "|" in identifier
Original file line number Diff line number Diff line change 1+ InvalidIdentifierPatientError :
2+ summary : Invalid Patient identifier
3+ description : Error raised due to an invalid Patient identifier request parameter being specified.
4+ value :
5+ issue :
6+ - code : invalid
7+ diagnostics : " Not a valid NHS Number provided for the 'patient:identifier' parameter"
8+ details :
9+ coding :
10+ - " system " : " https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode"
11+ version : " 1"
12+ code : " INVALID_PATIENT_IDENTIFIER_VALUE"
13+ display : " Provided value is invalid"
14+ severity : error
15+ resourceType : " OperationOutcome"
You can’t perform that action at this time.
0 commit comments