Ignixa.Specification 0.0.127

dotnet add package Ignixa.Specification --version 0.0.127
                    
NuGet\Install-Package Ignixa.Specification -Version 0.0.127
                    
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="Ignixa.Specification" Version="0.0.127" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ignixa.Specification" Version="0.0.127" />
                    
Directory.Packages.props
<PackageReference Include="Ignixa.Specification" />
                    
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 Ignixa.Specification --version 0.0.127
                    
#r "nuget: Ignixa.Specification, 0.0.127"
                    
#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 Ignixa.Specification@0.0.127
                    
#: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=Ignixa.Specification&version=0.0.127
                    
Install as a Cake Addin
#tool nuget:?package=Ignixa.Specification&version=0.0.127
                    
Install as a Cake Tool

Ignixa.Specification

FHIR specification data and structure providers for R4, R4B, R5, and STU3. Provides schema definitions, type information, and structural metadata for all FHIR versions.

Why Use This Package?

  • Multi-version support: R4, R4B, R5, and STU3 in a single package
  • Complete metadata: All StructureDefinitions, elements, types, and constraints
  • High performance: Generated code with zero runtime reflection
  • ISchema implementation: Works seamlessly with Ignixa.Abstractions

Installation

dotnet add package Ignixa.Specification

Quick Start

Loading a FHIR Schema

using Ignixa.Specification.Generated;
using Ignixa.Abstractions;

// Get the R4 schema provider
ISchema schema = new R4CoreSchemaProvider();

// Look up a type definition
ITypeExtended? patientType = schema.GetTypeByName("Patient");

if (patientType != null)
{
    Console.WriteLine($"Type: {patientType.Name}");
    Console.WriteLine($"Base: {patientType.BaseTypeName}");
    Console.WriteLine($"Abstract: {patientType.IsAbstract}");

    // Enumerate elements
    foreach (var element in patientType.Elements)
    {
        Console.WriteLine($"  {element.Name}: {element.DefaultTypeName} [{element.Min}..{element.Max}]");
    }
}

Working with Elements

using Ignixa.Specification.Generated;

var schema = new R4CoreSchemaProvider();
var patient = schema.GetTypeByName("Patient");

// Get a specific element
var nameElement = patient.Elements.FirstOrDefault(e => e.Name == "name");

Console.WriteLine($"Name: {nameElement?.Name}");
Console.WriteLine($"Type: {nameElement?.DefaultTypeName}");  // "HumanName"
Console.WriteLine($"Cardinality: {nameElement?.Min}..{nameElement?.Max}");  // "0..*"
Console.WriteLine($"Short: {nameElement?.Short}");  // "A name associated with the patient"

Checking Constraints

var schema = new R4CoreSchemaProvider();
var patient = schema.GetTypeByName("Patient");

// Get FHIRPath constraints
foreach (var constraint in patient.Constraints)
{
    Console.WriteLine($"{constraint.Key}: {constraint.Human}");
    Console.WriteLine($"  Expression: {constraint.Expression}");
    Console.WriteLine($"  Severity: {constraint.Severity}");
}

All Available Schemas

using Ignixa.Specification.Generated;

// FHIR R4 (v4.0.1)
var r4Schema = new R4CoreSchemaProvider();

// FHIR R4B (v4.3.0)
var r4bSchema = new R4BSchemaProvider();

// FHIR R5 (v5.0.0)
var r5Schema = new R5SchemaProvider();

// FHIR STU3 (v3.0.2)
var stu3Schema = new STU3SchemaProvider();

Common Use Cases

Validation

using Ignixa.Specification.Generated;
using Ignixa.Abstractions;

// Use with Ignixa.Validation
var schema = new R4CoreSchemaProvider();
var validator = new MyValidator(schema);

IElement element = GetPatientElement();
var result = validator.Validate(element);

Building FHIRPath Evaluators

using Ignixa.Specification.Generated;

var schema = new R4CoreSchemaProvider();

// Get type info for FHIRPath evaluation
var observationType = schema.GetTypeByName("Observation");
var valueElement = observationType.Elements.FirstOrDefault(e => e.Name.StartsWith("value"));

// valueElement.IsChoiceElement == true
// valueElement.Name == "value[x]"

Exploring the Type System

using Ignixa.Specification.Generated;

var schema = new R4CoreSchemaProvider();

// Get all resource types
var resourceType = schema.GetTypeByName("Resource");
var allResources = schema.GetAllTypes()
    .Where(t => t.BaseTypeName == "Resource" || t.BaseTypeName == "DomainResource");

foreach (var resource in allResources)
{
    Console.WriteLine(resource.Name);
}
// Output: Patient, Observation, Condition, etc.

// Get all primitive types
var primitives = schema.GetAllTypes()
    .Where(t => t.BaseTypeName == "PrimitiveType");

foreach (var primitive in primitives)
{
    Console.WriteLine(primitive.Name);
}
// Output: string, integer, boolean, date, dateTime, etc.

Version-Specific Features

R4 vs R4B vs R5 Differences

// R4: Patient.contact.organization is Reference(Organization)
var r4Schema = new R4CoreSchemaProvider();
var r4Patient = r4Schema.GetTypeByName("Patient");

// R4B: Added Patient.contact.period
var r4bSchema = new R4BSchemaProvider();
var r4bPatient = r4bSchema.GetTypeByName("Patient");

// R5: New resources and elements
var r5Schema = new R5SchemaProvider();
var subscriptionTopic = r5Schema.GetTypeByName("SubscriptionTopic");  // R5 only

Performance

  • Generated code: All schema data is pre-compiled, no runtime parsing
  • Lazy loading: Type definitions loaded on-demand
  • Cached lookups: Fast O(1) type name lookups

Integration with Other Packages

  • Ignixa.Abstractions: Implements ISchema and ITypeExtended
  • Ignixa.Validation: Uses schemas for structure validation
  • Ignixa.Search: Uses element metadata for search parameter definitions
  • Ignixa.FhirPath: Uses type info for expression evaluation

How It's Generated

This package is code-generated from official FHIR StructureDefinitions using the Ignixa code generator. To regenerate (for contributors):

cd codegen
./generate.ps1 -FhirVersion All  # Windows
./generate.sh all                # Linux/Mac

FHIR Specification Compliance

This package includes complete metadata from:

License

MIT License - see LICENSE file in repository root

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 (3)

Showing the top 3 NuGet packages that depend on Ignixa.Specification:

Package Downloads
Ignixa.Validation

FHIR resource validation with profile support

Ignixa.Search

FHIR search parameter indexing and query infrastructure

Ignixa.FhirFakes

A comprehensive FHIR test data generation library for modeling patient populations and medical histories.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.127 100 12/29/2025
0.0.109 298 12/18/2025
0.0.101 300 12/16/2025
0.0.96 438 12/10/2025
0.0.87 440 12/8/2025
0.0.70 319 12/7/2025
0.0.68 244 12/7/2025
0.0.62 246 12/6/2025
0.0.59 191 12/5/2025
0.0.58 218 12/5/2025
0.0.57 224 12/3/2025
0.0.56 689 12/3/2025
0.0.55 433 12/1/2025
0.0.54 435 11/30/2025
0.0.53 425 11/30/2025
0.0.51 141 11/29/2025
0.0.50 117 11/29/2025