Ignixa.Specification
0.0.127
dotnet add package Ignixa.Specification --version 0.0.127
NuGet\Install-Package Ignixa.Specification -Version 0.0.127
<PackageReference Include="Ignixa.Specification" Version="0.0.127" />
<PackageVersion Include="Ignixa.Specification" Version="0.0.127" />
<PackageReference Include="Ignixa.Specification" />
paket add Ignixa.Specification --version 0.0.127
#r "nuget: Ignixa.Specification, 0.0.127"
#:package Ignixa.Specification@0.0.127
#addin nuget:?package=Ignixa.Specification&version=0.0.127
#tool nuget:?package=Ignixa.Specification&version=0.0.127
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
ISchemaandITypeExtended - 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 | Versions 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. |
-
net9.0
- Ignixa.Abstractions (>= 0.0.127)
- Ignixa.Serialization (>= 0.0.127)
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 |