Created
February 12, 2020 02:03
-
-
Save MattCordell/86f78572a770e61dff5402f19808f869 to your computer and use it in GitHub Desktop.
Sample code for testing FHIR server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using Hl7.Fhir.Model; | |
using Hl7.Fhir.Rest; | |
namespace ConsoleApp2 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine("Started"); | |
const string VonkServer = "https://vonk.fire.ly/R4"; | |
const string AEGISR4 = "http://wildfhir3.aegis.net/fhir3-2-0"; | |
const string HealthConnex3 = "http://sqlonfhir-stu3.azurewebsites.net/fhir"; | |
const string R3Server = "http://test.fhir.org/r3"; | |
//Some error or server down at time of running | |
const string DXCserver = "http://ohcconnect.myhealthpoc.com:9093/org1"; | |
const string R4Server = "http://test.fhir.org/r4"; | |
const string OridashiServer = "http://demo.oridashi.com.au:8305"; | |
const string NProgram = "http://nprogram.azurewebsites.net"; | |
const string Pyro = "https://r4.test.pyrohealth.net/fhir"; | |
const string HealthConnex2 = "http://sqlonfhir-dstu2.azurewebsites.net/fhir"; | |
var servers = new List<string>() { VonkServer, AEGISR4, HealthConnex3, R3Server, DXCserver }; | |
var patient = new Patient(); | |
patient.Id = Guid.NewGuid().ToString(); | |
foreach (var server in servers) | |
{ | |
var client = new FhirClient(server); | |
client.PreferredFormat = ResourceFormat.Json; | |
Console.WriteLine("Attempting to create a patient on {0}", server); | |
client.Create<Patient>(patient); | |
Console.WriteLine("Patient created"); | |
} | |
Console.WriteLine("Finished"); | |
Console.ReadKey(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Telstra Health's R4 server is at sqlonfhir-r4.azurewebsites.net/fhir
(and our dstu2 server has been turned off)