CDCgov / phdi

https://cdcgov.github.io/dibbs-site/
Creative Commons Zero v1.0 Universal
28 stars 11 forks source link

Add error handling to check for valid patient resource in API #2030

Open m-goggins opened 5 days ago

m-goggins commented 5 days ago

Context: the api/query endpoint currently accepts a patient resource as the body of a POST request and parses patient demographics from the resource to make the query. We need to add some error handling to check whether the patient resource is a valid resource.

I haven't looked into whether there is an existing resource we could use or possibly check if the requestBody has the expected fhir/r4 elements that we parse in parsePatientDemographics.

Acceptance Criteria: