fhir-ig-mdi-dotnet 2.1.1

dotnet add package fhir-ig-mdi-dotnet --version 2.1.1
                    
NuGet\Install-Package fhir-ig-mdi-dotnet -Version 2.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="fhir-ig-mdi-dotnet" Version="2.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="fhir-ig-mdi-dotnet" Version="2.1.1" />
                    
Directory.Packages.props
<PackageReference Include="fhir-ig-mdi-dotnet" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add fhir-ig-mdi-dotnet --version 2.1.1
                    
#r "nuget: fhir-ig-mdi-dotnet, 2.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package fhir-ig-mdi-dotnet@2.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=fhir-ig-mdi-dotnet&version=2.1.1
                    
Install as a Cake Addin
#tool nuget:?package=fhir-ig-mdi-dotnet&version=2.1.1
                    
Install as a Cake Tool

mdi-fhir-ig-dotnet

A .NET Library for Medicolegal Death Investigation (MDI) FHIR IG (Current version)

All profiles built on top of standard .NET FHIR classes (https://github.com/FirelyTeam/firely-net-sdk). Only referenced profiles of US PH, US Core, VRDR, and VRCL are implemented. Rest of profiles will be added as needed.

Development Note

Firely .net FHIR classes are used as a basis for FHIR objects. All profiles are implemented using C# extensions. Invidual profiles can be used to extend the basic FHIR objects. Whenever the profile extensions are used, the profile names are automatically added to the meta section of FHIR resources that are being implemeted. The class extensions that are used create the fixed elements as defined in the IG. However, any fixed values that are not required (with cardinality 0..) will not be created. Instead, the fixed values should be available as a static value or C# property.

Hl7.Fhir.R4 and Hl7.Fhir.Specification.R4 NuGet Packages are required.

How to use the FHIR IG .net Library

Pleaase refer to the example codes availablel in https://github.com/HISB-Libraries/fhir-ig-dotnet/tree/main/MdiExample. The name of extension is in most cases from the name of profile. For any specific values or structures defined in the IG, helper methods are available in either properties or class functions. Please refer to the source code of the profile to get the list of available helpers in https://github.com/HISB-Libraries/fhir-ig-dotnet/tree/main/GaTech.Chai.Mdi.

There are extensions that are applicable to multiple IG profile libraries. Thsse are implemented in Gatech.Chai.Share project. Please include this namespace to use those extensions.

First step of using this library is starting from the profile you are trying to use. If you are trying to create UsCore FHIR patient, then use the static Create() - note that all profile libraries have a static method called, "Create()". See below for a patient example.

Patient patient = PatientVr.Create();

patient.UsCorePatient().Ethnicity.Category = UsCorePatientEthnicity.EthnicityCoding.Encode("2186-5", "Not Hispanic or Latino");
patient.UsCorePatient().Ethnicity.ExtendedEthnicityCodes = new Coding[] { UsCorePatientEthnicity.EthnicityCoding.Encode("2186-5", "Not Hispanic or Latino") };
patient.UsCorePatient().Ethnicity.EthnicityText = "Not Hispanic or Latino";

This will create the Ethnicity in FHIR:
{
   "extension": [
     {
       "url": "ombCategory",
       "valueCoding": {
         "system": "urn:oid:2.16.840.1.113883.6.238",
         "code": "2186-5",
         "display": "Not Hispanic or Latino"
          }
     },
     {
       "url": "detailed",
       "valueCoding": {
         "system": "urn:oid:2.16.840.1.113883.6.238",
         "code": "2186-5",
         "display": "Not Hispanic or Latino"
       }
     },
     {
       "url": "text",
       "valueString": "Not Hispanic or Latino"
     }
   ],
   "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity"
},

The follwoing will create the Cause of Death Part 1 Observation.

Observation causeOfDeath1 = ObservationMdiCauseOfDeathPart1.Create(patient, practitioner, "Fentanyl toxicity", 1, "minutes to hours");
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on fhir-ig-mdi-dotnet:

Package Downloads
fhir-ig-nvdrs-dotnet

.NET Library for HL7 FHIR® Implementation Guide: Violent Death Reporting For MDI 2.0.0-ci-build STU 2

fhir-ig-vdor-dotnet

.NET Library for HL7 FHIR® Implementation Guide: Violent Death And Overdose Reporting For MDI 2.0.0-ci-build STU 2

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.1.1 149 6/19/2026
2.1.0 317 7/10/2025
2.0.5 346 8/12/2024
2.0.2 307 3/27/2024
2.0.1 283 3/26/2024
2.0.0 311 3/26/2024
1.1.0 393 10/24/2023
1.0.2 379 4/19/2023
1.0.1 533 12/8/2022
1.0.0 684 10/13/2022
0.1.0 675 4/14/2022