Sample code to demonstrate various approach for validating FHIR resource
Options
- StructureDefinition FHIR profiles
Program → ValidateUsingFhirProfile()
validates Goals inData/careplan.json
using StructureDefination inProfiles
Directory
- Typed validation rules using FluentValidation
Program → ValidateUsingFluentValidation()
function initiateGoalValidator
which then internally validate measures usingMeasureValidators
dotnet restore
dotnet run
validator_cli.jar
can be downloaded from official FHIR validator. Local StructureDefinition profiles can be
validated using
java -jar validator_cli.jar Profiles/StructureDefinition-goal.json