Stream: dotnet
Topic: Read by oid
Phil Bowen (Feb 25 2019 at 20:18):
Hello,
I am trying to perform a request for patient data by MRN. I am able to get the patient by PatientID using the format:
var viewPatient = client.Read<Patient>("Patient/12345");
And when I do, I do see the MRN in the identifiers collection, as well as an oid for the datatype. However, I am unable to find the correct format for making the request with that information. I have tried:
var viewPatient = client.Read<Patient>("Patient?identifier=urn:oid:1.2.3.4.5.6.7.8|12345");
and
var identity = ResourceIdentity.Build("Patient", "urn:oid:1.2.3.4.5.6.7.8|12345");
Hl7.Fhir.Model.Patient viewPatient = client.Read<Hl7.Fhir.Model.Patient>(identity);
based on calls that work correctly when requesting the personID. These return a "NotFound" error.
Am I using the correct format for the resourceidentity request?
Am I using the correct oid? Is it the value returned in my personID bundle or is it a standard value?
Thanks
Michele Mottini (Feb 25 2019 at 20:28):
You should use a search: client.Search<Patient>( new[] { "identifier=urn:oid:1.2.3.4.5.6.7.8|12345" } );
Phil Bowen (Feb 25 2019 at 20:32):
You should use a search:
client.Search<Patient>( new[] { "identifier=urn:oid:1.2.3.4.5.6.7.8|12345" } );
Yes, that works. I appreciate your help!
Last updated: Apr 12 2022 at 19:14 UTC