.Net Client

771 views
Skip to first unread message

Jalaj Nautiyal

unread,
Nov 1, 2015, 3:41:22 PM11/1/15
to Cerner FHIR Developers
Hello All,
I am trying to build a C# client to access Cerner fhir API. Can anyone refer me a good resource to build client. I am new to programming. 

Dennis Patterson

unread,
Nov 2, 2015, 9:36:32 AM11/2/15
to Cerner FHIR Developers
Jalaj, have you seen the official C# client?  You might find it useful!

Dennis Patterson

unread,
Nov 3, 2015, 11:54:56 AM11/3/15
to Cerner FHIR Developers
Jalaj wrote:

Hello Dennis,
Thank you so much for replying me back. I have looked at the link that you shared with me. Now what i want to know is that does that code works with Cerner's sandbox API? That code does works good if we use furore API. My professor is insisting us on using only Cerner's sandbox API. We are really stuck.
Your suggestion will really matter a lot. Please do let me know.

Jalaj, we have existing consumers that are already using this FHIR client.  Note that the latest FHIR spec version is DSTU2 final, while our server currently supports the DSTU2 May Ballot version.  I believe the library is trying to support multiple versions, but just wanted to give you the heads up.  I'd still encourage you to try it, and if you find issues with the library (not our server), submit them as issues so that the library can improve.

tilo....@siemens.com

unread,
Dec 10, 2015, 9:53:27 AM12/10/15
to Cerner FHIR Developers
Jalaj,
 
using the official C# client (the GIT version, which I think is newer than the NuGet version), you can use the following simple code to access Cerner FHIR sandbox:

Tilo

 

class Program

{

static void Main(string[] args)

{

// Set up Proxy for outbound traffic (remove or change as needed)

WebProxy proxyObject = new WebProxy("http://yourcorporateproxy.com");

proxyObject.UseDefaultCredentials = true;

WebRequest.DefaultWebProxy = proxyObject;

// Set up FHIR Client for Cerner Sandbox

var fhirClient = new FhirClient("https://fhir-open.sandboxcernerpowerchart.com/may2015/d075cf8b-3261-481d-97e5-ba6c48d3b41f");

fhirClient.UseFormatParam = true;

fhirClient.PreferredFormat = ResourceFormat.Json;

// Read Patient #1

var currentPatient = fhirClient.Read<Patient>("Patient/1");

System.Console.WriteLine(currentPatient.Name);

System.Console.WriteLine(currentPatient.BirthDate);

System.Console.WriteLine(currentPatient.Gender);

System.Console.ReadLine();

// Try to write a patient (will not succeed)

// currentPatient.Name.Add(HumanName.ForFamily("McGovern").WithGiven("Astrid"));

// fhirClient.Update<Patient>(currentPatient);

}

}

Jalaj Nautiyal

unread,
Feb 16, 2016, 3:33:09 PM2/16/16
to Cerner FHIR Developers
That works. Thank you so much Sir.

jcop...@lifeengageservices.com

unread,
Oct 19, 2017, 10:59:42 AM10/19/17
to Cerner FHIR Developers
Where do I go to get the files I need for the FhirClient?  I am trying to write a sample console app as well in Visual Studio.
Thanks
JC

Michele Mottini

unread,
Oct 19, 2017, 11:05:59 AM10/19/17
to Cerner FHIR Developers

jcop...@lifeengageservices.com

unread,
Oct 19, 2017, 12:19:15 PM10/19/17
to Cerner FHIR Developers
thanks.  I'll check it out.

jcop...@lifeengageservices.com

unread,
Oct 19, 2017, 1:59:42 PM10/19/17
to Cerner FHIR Developers
On the line where you are doing the new FhirClient(https://fhir-open.sandboxcernerpowerchart.com/...).  The Guid, etc...is this particular to you and your company and if so how do I request one?
Thanks

Jenni Syed (Cerner)

unread,
Oct 19, 2017, 2:17:37 PM10/19/17
to Cerner FHIR Developers
The examples here are specific to the Cerner sandbox implementation of FHIR, and that is the service root URL for an old FHIR server of ours. 

Our server URLs can be found (in updated form) on fhir.cerner.com, along with all of the documentation about the resources we've implemented, authorization, and smart. Service urls themselves are specifically called out here: http://fhir.cerner.com/millennium/dstu2/#service-root-url

Regards,
Jenni

jcop...@lifeengageservices.com

unread,
Oct 19, 2017, 2:33:41 PM10/19/17
to Cerner FHIR Developers
ok, although I have web, .net, c# experience, this is all new to me so trying to figure out where to start from.  We (Southeast Health) will be going to Mellinium Nov1 and I am working on trying to find out what I can do through the API.  I went out to the Smart on FHIR app tutorial, etc but I assume that is for if I want to create an app and run it from your environment.  I am just wanting to write something in house via Visual Studio that I could pull data back, etc.  Maybe even store it local in my on SQL db, etc.  I seem to learn better by example.  Is there a small visual studio project or code that I could use to just demonstrate the concept other than trying to get the piece of code above to work?
Reply all
Reply to author
Forward
0 new messages