Reputation: 93
I need to implement FHIR API over our clinical repository. Since our data is stored from multiple sources, each clinical data/act is represented with a System+ID pair, where system generally represented by OID. e.g. Patient Identifier will be {1.4.7.9.9, MRN123}
The question is how to tackle such resources from client perspective.
My options are:
1. h_t_t_p://BaseUrl/1.4.7.9.9/Patient/MRN123/... - where h_t_t_p://BaseUrl/1.4.7.9.9 will be set as the base address and path, and all resources will be evaluated upon it.
2. h_t_t_p://BaseUrl/Patient/1.4.7.9.9+MRN123/... - concatenation of the System and ID. This approach is most undesired since the consumer generally doesnt aware to the systemId (in option 1 - we'll provide him the baseUrl to be used).
3. "Standard" URL schema h_t_t_p://BaseUrl/Patient/MRN123/... with the System as custom property in the header of the HTTP request.
Appreciate your thoughts and other options, if any, for tackling that issue
Thanks
Upvotes: 0
Views: 100
Reputation: 6793
Option 3 isn't conformant because it will result in colliding keys - the URL itself must be unique within the server.
Option 1 essentially requires a different FHIR end-point (with its own Conformance statement and the ability to handle queries, etc.) That seems like it would be a pain for both you and other implementers (all implementers talking to you would need to know all the base URLs to reach you, they'd have to search all the endpoints to find all patients, etc.)
So that leaves Option 2. I don't understand why that's undesired. As a general rule, resource ids are like database primary keys. No external system knows what they are until they search your system. Clients of FHIR systems can't rely on any particular scheme for resource ids - on many servers they're random guids. So searches are performed against the business identifiers - and in your case, I'd expect there to be an "identifier" element that contains the patient identifier too - even though it's also represented in mangled form as the "id". You can then search on [base]/Patient?identifier=MRN123, though there's a possibility of getting back multiple matches.
Side note: you can't use "+" in an identifier - so I'd suggest 1.4.7.9.9:MRN123.
Upvotes: 0