Requirements for determining a valid or invalid SDS:
If the Linkage query does NOT RETURN the RESULTS above then the SDS is considered to be unavailable. There should never be more than one Linkage returned from this query.
Caveats:
We don’t know 100% that this query works in the OHSU SDS, only that it should work based on the spec. We will proceed assuming that it will work. But, both Dave and Matt will work on a query for our respective environments
We need to update MELD to be able to support it/test it locally
If they query RETURN RESULTS, check that
Contains one resource, where resourceType === Linkage
Check the Linkage item array for a type === source
Note: Source will always refer to the local partition, which is what we are missing knowledge of, if not finding anything before we run this query
Check that for resource.reference and ensure it has a valid value for a patient id
If all of the above is true, then we can reasonably assume we have a valid SDS, and proceed to use the patient value in the reference property to overwrite our current patient id for the SDS
The Patient ID retrieved from the Linkage “source” type element should be used for any following FHIR GET or PUT requests to the SDS endpoint.
SDS spec: https://docs.google.com/document/d/1uqD4I8m7FOrcN2sr0HChr6mucIOUEoVYf5mEuI4kEcQ/edit?usp=sharing
Query for Linkage: https://sds-mccecare-dev.ohsu.edu/fhir/Linkage?item=Patient/eFTHaVbQzCEwOEE97maN2MC2jJi-r8nnkhRh.umMUlz03
Query for MELD SDS Sandbox (From Dave Carlson) https://gw.interop.community/eCareSharedData/open/Linkage?item=Patient/mcc-pat-pnoelle
Linkage content:
Requirements for determining a valid or invalid SDS: