Sajjad Ali Khan
Sajjad Ali Khan

Reputation: 1813

FHIR CLIENT - Connect to NPHIES FHIR - OBB Server

How to connect NPHIES FHIR OBB(Testing) Server inorder to submit eligibility/preauthorization/claims and soon.

Lot of companies built tools to work with FHIR SERVERS.

  1. Firely - .Net Framework / .Net Core - link
  2. HAPI- JAVA - link

Upvotes: 0

Views: 660

Answers (1)

Sajjad Ali Khan
Sajjad Ali Khan

Reputation: 1813

Those who were working with Firely - .NET SDK, click this link to view the documentation.

In order to send the request to NPHIES OBB SERVER, you need to pass Username, password and content-type

username: xxxxx 
password: yyyyy
content-type: application/fhir+json

Check the below code to send a request to NPHIES - OBB FHIR Server

using (var handler = new HttpClientEventHandler())
                {
                    handler.OnBeforeRequest += (sender, e) =>
                    {
                        e.RawRequest.Content.Headers.ContentType.CharSet = "";
                        e.RawRequest.Content.Headers.Remove("Content-Type"); // "{application/json; charset=utf-8}"
                        e.RawRequest.Content.Headers.Add("Content-Type", "application/fhir+json");
                        e.RawRequest.Content.Headers.Add("Username", xxxx);
                        e.RawRequest.Content.Headers.Add("Password", yyyy);
                    };

                    handler.OnAfterResponse += (sender, e) =>
                    {
                    };

                    using (FhirClient fhirClient = new FhirClient(
                          nphiesServerURL, new FhirClientSettings() { PreferredFormat = ResourceFormat.Json},handler))
                    {
                    
                    
                        Bundle responseBundle = fhirClient.Transaction(bundle);
                        
                        
                    }
                }

Upvotes: 0

Related Questions