FHIR Chat · FHIR .NET 1.0.0-beta1 · dotnet

Stream: dotnet

Topic: FHIR .NET 1.0.0-beta1


view this post on Zulip Ewout Kramer (Nov 20 2018 at 14:09):

Hi all, last week released a beta of the new 1.0.0 version of the FHIR .NET API.

The release incorporates many bug fixes and most notably a total rewrite of the parsing and serialization subsystem that we have worked on in the past 6 month or so. This means that you are now able to parse and serialize without needing the pre-compiled POCO's, which increases performance and allows you to work with unknown resources. In addition, the parser and serializer are now configurable pipelines, so you can integrate your own logic into the stack to for example mask out elements based on permissions. And much, much more.

I documented the new features here: http://docs.simplifier.net/fhirnetapi/parsing.html and in the release notes http://docs.simplifier.net/fhirnetapi/releasenotes.html.

There are several reasons I want to draw your attention to this beta before we go final:

  • We have tried to keep the public surface unchanged - but we are interested to know what kind of compilation issues you might find.
  • The parsers are much more strictly following the syntax specifications of FHIR for XML and Json - data that were "valid" according to the older versions of the library might now trigger parsing errors. We are interested in learning about the impact of these changes (there is a setting to re-enable the old behaviour).

Have a go at it and let us know what you think!

view this post on Zulip Ewout Kramer (Nov 20 2018 at 14:10):

Note: There's not yet an R4 1.0.0 release. We hope to support R4 in 1.1.0.

view this post on Zulip Brian Postlethwaite (Nov 20 2018 at 19:26):

(as R4 is still in its final changes before publishing)

view this post on Zulip Tom Uttaro (Nov 21 2018 at 19:00):

Hi, Tom Uttaro here, I am a new member (noobie to FHIR) I have the FHIR .NET API in Visual Studio and I have my ORACLE DB views in the project. I need to use Visual Studio and the FHIR .NET API together to map my data onto a CDA, and create a C# file representing all production layers from the mapping to call for a CDA (CCD). I have successfully used Visual Studio for other tasks such as running R against large databases, but I honestly don’t know where to begin in this context. To put it another way, my goal is to map my DB to CDA using the FHIR .NET API, and generate C# code representing the mapping and the call and creation of the CDA/CCD. I would hand the code off to our architects and network staff. We will embed a URL which calls for the CDA/CCD in our New York State Medicaid PSYCKES application. The only goal right now is for a user to be able to call for a CDA/CCD. I don’t need to create a full blown Restful app at this point. It is the beginning, but an important one for NYS. I need a very straightforward set of instructions, directions, or help. I would appreciate any assistance anyone can render to get me going with the mapping in Visual Studio and the export of generated C# code. Thank you.

view this post on Zulip Michele Mottini (Nov 21 2018 at 20:12):

You cannot use a FHIR library to create CDAs - they use a (completely) different standard

view this post on Zulip Michele Mottini (Nov 21 2018 at 20:13):

I don't know of any library to do that - we can do it in our system but entirely with home grown code

view this post on Zulip Yunwei Wang (Nov 21 2018 at 20:25):

I assume you already have all your database in DB. It is easier to create CDA directly than using any CDA-FHIR adaptor.

view this post on Zulip Tom Uttaro (Nov 22 2018 at 05:11):

Thank you, yes I understand. I will avoid the CDA standard specifically, the general content is what I am after. I believe that I can work directly and entirely in FHIR and accomplish the same goal. Can anyone help me with documentation or other resources for mapping the DB directly to FHIR using the FHIR .NET API in Visual Studio? Does anyone have experience with this? Thank you.

view this post on Zulip Michele Mottini (Nov 22 2018 at 14:01):

First pick a FHIR version you want to target - DSTU2, STU3 or upcoming R4 - there are different version of the library for each

view this post on Zulip Michele Mottini (Nov 22 2018 at 14:01):

Then the Hl7.Fhir.Model namespace contains classes corresponding to all FHIR resources and data types

view this post on Zulip Michele Mottini (Nov 22 2018 at 14:01):

So you create instances of those classes filling them with the data that comes from your DB

view this post on Zulip Michele Mottini (Nov 22 2018 at 14:03):

There are some data types that are used across multiple resources - like Identifier and CodeableConcept - so probably it is a good idea to write methods creating those from the corresponding structure in your DB

view this post on Zulip Michele Mottini (Nov 22 2018 at 14:04):

And then use those methods across all resources

view this post on Zulip Michele Mottini (Nov 22 2018 at 14:06):

(There is also a fork of the .NET library that supports multiple versions at the same time if that's what you need - https://www.nuget.org/packages/CareEvolution.Fhir.Core - but it is going to change considerably to support also R4)

view this post on Zulip Yunwei Wang (Nov 22 2018 at 19:04):

(deleted)

view this post on Zulip Yunwei Wang (Nov 22 2018 at 19:04):

@Tom Uttaro I use stored procedures to DB to return data that maps to FHIR model and use Dapper (https://www.nuget.org/packages/Dapper) as ERM layer .

view this post on Zulip Tom Uttaro (Nov 30 2018 at 16:54):

@Michele Mottini Thank you so much for this guidance, it is very helpful.

view this post on Zulip Yunwei Wang (Dec 07 2018 at 16:52):

When I check Nuget, only Serialization and ElementModel are in 1.0.0-beta1. Other packages are still at 0.96.1.

view this post on Zulip Ewout Kramer (Dec 10 2018 at 12:09):

Don't know, I think it's a UI issue in NuGet. If you actually click on the link of the package (e.g. go to https://www.nuget.org/packages/Hl7.Fhir.DSTU2/), you see that they in fact exist.

view this post on Zulip Ewout Kramer (Dec 10 2018 at 12:11):

Found it. It shows only non-beta packages normally. But since for Serialization and ElementModel there no non-beta package yet, it shows the beta versions in stead ;-)

view this post on Zulip Yunwei Wang (Dec 10 2018 at 15:45):

Oh. I got that. DSTU2/STU3 are in 1.0.0-b1 and R4 is still on 0.96.1.

view this post on Zulip Ewout Kramer (Dec 10 2018 at 17:49):

Ah, yes. We have no 1.0 for R4 yet. Neither will there be an 1.1 unfortunately. We are currently working on it - and there is probably an alpha for R4 when it is released. I expect full support to appear in 1.2, somewhere end of January.

view this post on Zulip Brian Postlethwaite (Dec 10 2018 at 21:12):

There is a mostly working branch of R4 on github, but no NuGet packages.

view this post on Zulip Ewout Kramer (Dec 10 2018 at 21:25):

Yes, there is an "almost" working branch, that will be in alpha soon. But that would still exclude snapshot generation and validation.

view this post on Zulip Ewout Kramer (Dec 10 2018 at 21:25):

this one: feature/upgrade-r4-with-stu3-changes

view this post on Zulip Brian Postlethwaite (Dec 10 2018 at 21:26):

When my changes are accepted into it :wink:


Last updated: Apr 12 2022 at 19:14 UTC