1

We are developing a Mobile App in c# xamarin which needs to call AWS FHIR Patient API to retrieve the Patient Details. We have done a setup in AWS FHIR Works API and was successful in retrieving the data in Postman using servrurl,auth url, clientid and api key. But I would like to know the implementation of the same in .net c#. Can someone give some pointers or code sample on how this implementation is acheived.

1 Answers1

2

The Firely team have a great software development kit that includes a REST API client for interacting with HL7 data from a FHIR-compliant server. Here is the source code for their library, and here is a REST client example from their documentation.

John Glenn
  • 1,469
  • 8
  • 13
  • thanks John. As I mentioned, I have AWS FHIR WORKS Setup already and need to call patient API on the same – mahesh balasubramaniyan Jan 27 '22 at 06:01
  • @maheshbalasubramaniyan Firely is a client SDK that can be used with any compliant server. As far as I can tell, you should be able to use it to interact with AWS's service. – John Glenn Jan 27 '22 at 13:56
  • Hi John, Thanks again. I revisited the sdk documentation. I added the below Code as in the documentation in my c# project and getting the error in console. var client = new FhirClient("http://.execute-api.us-east-1.amazonaws.com/dev", FhirClientSettings.CreateDefault()); client.RequestHeaders.Add("Authorization","Bearer xxx"); client.RequestHeaders.Add("x-api-key", "yyy"); Patient pat_A = client.Read("Patient/b2c1ca50-b451-421e-92bd-5198bb244172"); – mahesh balasubramaniyan Feb 01 '22 at 19:30
  • Error: ExceptionSystem.InvalidOperationException: Root object has no type indication (resourceType) and therefore cannot be used to construct an FhirJsonNode. Alternatively, specify a nodeName using the parameter. – mahesh balasubramaniyan Feb 01 '22 at 19:31
  • @maheshbalasubramaniyan - Would you post this error as a separate question? Then, we can get the community involved in answering it. – John Glenn Feb 02 '22 at 04:05
  • Hi @John, I did. here is the [link](https://stackoverflow.com/questions/70946567/facing-error-in-c-sharp-applicationfirely-sdk-net?noredirect=1#comment125423850_70946567) – mahesh balasubramaniyan Feb 02 '22 at 04:25