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.
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);
}
}