FHIR Client Development with .NET

Preview:

Citation preview

HL7® FHIR ® .NET DEVELOPMENTBrian Postlethwaite

June 2016

® ©

Brian PostlethwaiteSenior Solutions ArchitectFHIR core team memberFHIR Management Group memberCo-chair HL7 International Patient Administration WorkgroupAuthor of ServD Standard endorsed by the Object Management GroupProviding FHIR guidance to HealthConnex and Telstra HealthContributor of the .net FHIR clientImplementator of reference server sqlonfhirHarley Rider

Based on Modern WEB technologies

Core Resource Model

Defined Wire Format (XML/json)

CRUD

Searching

Extensible

Profilable/Conformance

Natively Supports Distributed data

Supports REST, Messaging, Services, Documents

Shortest ever summary of FHIR

Standards development (HL7)

Software Vendors

Healthcare Providers

Profiling Organizations (IHE)

Open Source Projects/Products

Reference Implementations

Open Test Servers (24x7)

Connectathons

The FHIR Community

.NET 4.0 / .NET 4.5 / PCLXamarin

Fiddler / PostmanVisual Studio 2015NuGet / Package ManagementNotepad++ / fhir extensionWeb BrowserReference Server(s)Online Test Tools (for servers)

projectcrucible, touchstoneFiddlerhttps://nehta-au.github.io/

Platforms and Tools

Versioning

Marketing Version Spec Version

File Version NuGet Package Version

DSTU1 0.0.82 (.2943)

  0.11.5

DSTU2 1.0.2 (.7202)

0.90.5 0.90.5-alpha3

May 2016 Connectathon

1.4.0 (.8139)

0.90.5 0.90.5-alpha4

Continuous build 1.4.0 (.8522)

n/a n/a

STU3 Ballot Likely 1.5.0    STU3 Likely 1.6.0 n/a n/a

Versions

Pre-release vs stable

Code on Github

Newtonsoft.Json(highly recommend >= 8.0.3)

NuGET Packages

https://www.nuget.org/packages/Hl7.Fhir.DSTU2/0.90.5-alpha3

Projects

Branches

Contributors

Issues register

Documentation

Getting involved

GitHub

https://github.com/ewoutkramer/fhir-net-api

Models

Serializers / Parsers

REST Client

Basic Validation

Lots of debug visualizers and code comments

ModelInfo – Search Parameters

Core Structures – Support for Extensions

Why use the .NET client?

New Projects?

Legacy Projects?

Exporting Content?

Importing Content?

Where do I start?

Start Simple

Get to know fhir

Use a fiddler/browser on existing servers

Create some content

Export some content from your own system

Consume some content into your own system

Identify resources of interest to you

Where do I start?

https://github.com/ewoutkramer/fhir-net-api

http://hl7.org/fhir/DSTU2/overview-dev.html

DataTypes

Narrative & Display

Extensions (using and defining)

Must Understand & modifiers

References & ResourceIdentity

Contained Resources

Using the REST API

Create/Use Extension Methods

Best Practices

http://hl7.org/fhir/DSTU2/implementation.html#2.0.0.1

StringBuilder textContent = new StringBuilder();

textContent.AppendLine("<div xmlns=\"http://www.w3.org/1999/xhtml\">");

textContent.AppendFormat("<b>{0}</b>\r\n<hr/>\r\n", System.Web.HttpUtility.HtmlEncode(me.Name));

textContent.AppendFormatFHIRFields("version", "{0}", System.Web.HttpUtility.HtmlEncode(versionDetails));

textContent.AppendLine("</div>");

resource.Text = new Narrative();

resource.Text.Status = Narrative.NarrativeStatus.Generated;

resource.Text.Div = textContent.ToString();

Narrative

var pat = new Patient();

pat.Name.Add(new HumanName().WithGiven("Brian").AndFamily("Postlethwaite"));

var org = new Organization();

org.Id = Guid.NewGuid().ToString("n");

org.Name = "HL7 International";

pat.Contained.Add(org);

pat.ManagingOrganization = new ResourceReference()

{

Reference = "#" + org.Id,

Display = org.Name

};

Contained Resources

1. Assembly(s), platforms and projects2. GitHub branches3. NuGET Package(s)4. Don’t need code change to handle extensions/profiles

5. Already in use in production6. Supported and used by multiple vendors today7. Large and Growing community of contributors

8. Can be used server side too

.NET FHIR Client - recap

QUESTIONS?

Recommended