onaio / fhir-gateway-extension

This repo holds the OpenSRP permissions checker and data access checker
Other
0 stars 1 forks source link

Change identifier variable used in LocationHierarchy and PractitionerDetails endpoints #61

Closed lincmba closed 4 months ago

lincmba commented 4 months ago

In other fhir endpoints, the identifier variable used is _id however in LocationHierarchy and PractitionerDetails endpoints, the identifier variable used is identifier. This should be changed to _id to be consistent with other fhir endpoints

dubdabasoduba commented 4 months ago

@lincmba I think the PractitionerDetails endpoint will still use the identifier.

The endpoint is mostly called after logging in and at this time we only have the Practitioners Keycloak UUID. This UUID is stored on the Practitioner.Identifier in the FHIR resources.

At the point of login, we do not have a way to know the Practitioner.id hence the use of the identifier

dubdabasoduba commented 4 months ago

I agree with changing the LocationHierarchy endpoint to use the id but the PractitionerDetails might have to remain the same unless we refactor the whole implementation

ndegwamartin commented 4 months ago

Also to be specific the PractitionerDetail endpoint uses keycloak-uuid as the GET request parameter i.e.

/PractitionerDetail?keycloak-uuid=<some uuid>