fhir_path 0.5.0-1 fhir_path: ^0.5.0-1 copied to clipboard
FHIRPath implemented in pure Dart code using petiteparser.
FHIRPath #
- Checkout this page from HL7 for the full specification
Functionality #
How To Use #
- To use this library, all you need to do is call this function:
List walkFhirPath(
Resource? resource,
String pathExpression, [
Map<String, dynamic>? passed,
])
The resource is the main resource you're acting on. The pathExpression is the expression that will be evaluated and applied to the resource. If you need to pass in environmental variables, these are passed as the map. The passed Map's keys need to have a "%" in front of them, for instance:
{
'%pi': 3.1415,
'%birthday': '1776/07/04'
}
The passed resource WILL be added to this map as '%resource'
, so you don't need to add it, but be aware this it will be present.
ToDo (functionality not supported yet) #
- Polymorphic Items
- Non-escape sequences
- Quantities, toQuantity, convertsToQuantity
- trace
- iff
- date/time arithmetic
- unary operators
- Reflection
- Complicated, nested tests
Notes on Structure #
- When executing a FHIRParser class, any result will be a List
- After execution (which acts recursively and traverses down the tree) there will be only values in the Lists, no more FHIR parsers
- These values can be any of these types (most are from the FHIR base package, but also note the existence of FhirPathString & FhirPathQuantity):
- Boolean
- FhirPathString
- Integer
- Decimal
- Date
- DateTime
- Time
- Quantity: TBD