brianpos.Fhir.Base.FhirPath.Validator 5.11.4-rc1

This is a prerelease version of brianpos.Fhir.Base.FhirPath.Validator.
dotnet add package brianpos.Fhir.Base.FhirPath.Validator --version 5.11.4-rc1
                    
NuGet\Install-Package brianpos.Fhir.Base.FhirPath.Validator -Version 5.11.4-rc1
                    
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="brianpos.Fhir.Base.FhirPath.Validator" Version="5.11.4-rc1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="brianpos.Fhir.Base.FhirPath.Validator" Version="5.11.4-rc1" />
                    
Directory.Packages.props
<PackageReference Include="brianpos.Fhir.Base.FhirPath.Validator" />
                    
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 brianpos.Fhir.Base.FhirPath.Validator --version 5.11.4-rc1
                    
#r "nuget: brianpos.Fhir.Base.FhirPath.Validator, 5.11.4-rc1"
                    
#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 brianpos.Fhir.Base.FhirPath.Validator@5.11.4-rc1
                    
#: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=brianpos.Fhir.Base.FhirPath.Validator&version=5.11.4-rc1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=brianpos.Fhir.Base.FhirPath.Validator&version=5.11.4-rc1&prerelease
                    
Install as a Cake Tool
FhirPath Static Analysis

Introduction

Many FHIR resources contain FhirPath expressions as string values that are to be use in a specific context, such as SearchParameters, StructureDefinitions, and Quesitonnaires.

The Firely SDK provides a FHIRPath engine for evaluating these expressions at runtime along with a parser/compiler.

This project provides a static analysis tool that can help ensure that a valid fhirpath expression (returned by the Firely parser) is valid for the context in which it is to be used.

For example it could check that a specific custom search parameter was valid against the Patient resource.

The library contains:

  • A visitor of the Firely Expression class returned by the FhirPath parser that can be used to verify the validity of the FhirPath expression.
  • Unit test verifying all the R4B/R5 search expressions provided by the Firely SDK
  • Unit test verifying all the R4B/R5 invariant expressions provided by the Hl7 SDK

Known Issues/incomplete funcitonality:

  • missing functions: intersect, exclude, single, iif
  • length() doesn't check that context is a string
  • toChars() returns a string not string[]
  • Math functions (argument checks)
    • log
    • power
    • round
  • Comparisons don't check for type conversions, or that the types are compatible/same
    • though does identify that the resulting type is boolean for downstream processing
  • Boolean logic operators should check that both sides are boolean type parameters
  • Math operators
  • Reflection
  • Checking types of parameters to functions (not just return types and object mdel prop names)

Note: Only reviewed up to section 6 in the specification

The library depends on several NuGet packages (notably):

  • Hl7.Fhir.Conformance - contains the FhirPath Engine, Introspection, and base models
  • The version specific assemblies also leverage the Hl7.Fhir.* packages

Getting Started

TODO: But best place to start is to look at the unit tests.

To date they are covering verifying the R4B and R5 Search Parameters.

Support

None officially. For questions and broader discussions, we use the .NET FHIR Implementers chat on Zulip.

Contributing

I am welcoming any contributors!

If you want to participate in this project, we're using [Git Flow][nvie] for our branch management, so please submit your commits using pull requests no on the develop branches mentioned above!

GIT branching strategy

History

This project was created to help verify the validity of the fhirpath expressions throughout the core HL7 specifications, however once working discovered that this could also be relevant for others to perform the same style of checks in running systems, such as servers wanting to check their own fhirpath expressions.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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 brianpos.Fhir.Base.FhirPath.Validator:

Package Downloads
brianpos.Fhir.R4B.StructuredDataCapture

This library contains a reference implementation of many of the extended SDC capabilities including QuestionnaireResponse validation and some of the extract techniques

brianpos.Fhir.R4.StructuredDataCapture

This library contains a reference implementation of many of the extended SDC capabilities including QuestionnaireResponse validation and some of the extract techniques

brianpos.Fhir.R5.StructuredDataCapture

This library contains a reference implementation of many of the extended SDC capabilities including QuestionnaireResponse validation and some of the extract techniques

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.11.4-rc1 187 3 months ago
5.11.3-rc1 2,283 5 months ago
5.11.1-rc4 142 7 months ago
5.11.1-rc2 77 8 months ago
5.11.1-rc1 126 8 months ago
5.10.3-rc1 207 10 months ago
5.10.2-rc2 72 10 months ago
5.10.2-rc1 845 9/18/2024
5.10.0-rc1 119 9/10/2024
5.9.0-rc1 213 7/25/2024
5.8.2-rc4 92 7/23/2024
5.8.2-rc3 89 7/22/2024
5.8.2-rc2 87 7/22/2024
5.8.2-rc1 79 7/22/2024
5.8.1-rc2 158 5/6/2024
5.8.1-rc1 95 5/6/2024
5.3.0-rc1 223 12/15/2023
5.3.0-beta9 93 12/15/2023
5.3.0-beta8 99 12/14/2023
5.3.0-beta7 97 11/30/2023
5.3.0-beta6 141 11/27/2023
5.3.0-beta5 112 11/20/2023
5.3.0-beta4 90 11/15/2023
5.3.0-beta3 85 11/11/2023
5.3.0-beta10 107 12/15/2023
5.3.0-beta1 142 10/9/2023
5.2.0-beta1 182 7/14/2023
5.2.0-alpha9 137 7/13/2023
5.2.0-alpha8 133 7/13/2023
5.2.0-alpha7 135 7/6/2023
5.2.0-alpha6 119 7/6/2023
5.2.0-alpha5 133 7/5/2023
5.2.0-alpha4 134 7/4/2023
5.2.0-alpha3 128 7/3/2023
5.2.0-alpha2 120 6/26/2023
5.2.0-alpha1 122 6/19/2023