Skip to content

FHIRPath v0.2.0.pre6

Choose a tag to compare

@github-actions github-actions released this 08 Sep 05:12
· 11 commits to main since this release
5777d38

FHIRPath 0.2.0.pre6

Release status

  • Release channel: pre-release
  • Normative FHIRPath target: 2.0.0
  • Capability set: parser, immutable-ast, collection-evaluation, plain-model-navigation, primitive-values, arithmetic, comparison-and-equivalence, boolean-logic, union-membership-and-type-operators, collection-functions, focus-variables, external-constants, custom-functions, compiled-expression-reuse, fhir-r4-model, structured-errors, quantity-ucum, aggregate
  • Trial-use (STU3-subset) features: stu3-aggregate-functions
  • Supported Ruby CI matrix: Ruby 3.2 and Ruby 3.3
  • License: MIT

Supported behavior

  • require "fhirpath", version — test/fhirpath_test.rb
  • Parse, immutable AST, source spans — foundation/parser tests
  • Complete-input validation — parser regression tests
  • String, Boolean, integer, decimal literals — foundation/core compatibility tests
  • Scientific notation — core compatibility tests
  • Empty and comma-separated collections — parser/evaluator tests
  • Relational comparison — parity/core compatibility tests
  • Collection equality/equivalence — core compatibility tests and vectors
  • Finite JSON Float treated as Decimal — evaluator correctness tests; a finite Float (e.g. from JSON.parse) compares, equals, arithmetically combines, and satisfies is Decimal; NaN/Infinity are rejected as non-numeric
  • String & concatenation — core compatibility tests; empty operands are treated as ''
  • Empty-aware Boolean operators — foundation/core compatibility tests
  • Union, in, contains, is, as — core compatibility tests and vectors; union eliminates duplicates from both operands using = equality in first-seen order; in/contains require a singleton operand and follow the empty-collection rules; is/as test built-in primitive types by runtime value and, when a model provider resolves the value, also test the FHIR logical type recorded by navigation (e.g. Observation.value is Quantity), with as passing the value through unchanged on a match and yielding the empty collection on a mismatch
  • General-purpose aggregate() function — test/aggregate_functions_test.rb; enables custom aggregations via $this, $index, $total
  • Missing external constant provider — test/host_services_test.rb; raises UnknownConstantError with code :unknown_constant and performs no fallback I/O
  • Constant-provider failures and redaction — test/host_services_test.rb; raises generic HostError without retaining constant-provider exceptions as public causes or exposing their detail in diagnostics
  • Host callback configuration/reentrancy — test/host_services_test.rb; HostServices is immutable and each evaluation receives a fresh context
  • Custom registered functions — API/foundation tests
  • Compiled-expression reuse — API/foundation tests
  • Stable structured engine errors — API/foundation/parser tests
  • ofType() type filter — test/oftype_test.rb; filters collections by built-in (Integer, String, Decimal, Boolean, Date, DateTime, Time) and FHIR resource types recorded during navigation; logical-type is/as previously deferred this slice
  • Date/Time/DateTime literals (@...) — test/temporal_literals_test.rb; ISO 8601 with optional timezone (Z/±HH:MM)
  • today(), now(), time() — test/temporal_now_test.rb
  • Temporal component extractors (year, month, day, hour, minute, second, millisecond) — test/temporal_components_test.rb; millisecond() on DateTime reads sec_fraction * 1000
  • Temporal timezone (timezone(), timezoneOffset()) — test/temporal_components_test.rb
  • Temporal same-type comparison — test/temporal_comparison_test.rb; cross-type raises incompatible_comparison
  • FHIR primitive extension accessor (._<name>) — test/primitive_extensions_test.rb; returns the underlying {value, extension} container or empty per FHIRPath 2.0.0
  • Quantity/UCUM — test/quantity_test.rb and test/quantity_edge_cases_test.rb; immutable Decimal-backed quantities, case-sensitive dimensional conversion for the explicitly bounded dependency-free subset (m/cm/mm/km, g/kg/mg/Mg/ug/ng, L/mL/ML/uL, mol/mmol/umol, s/min/h, and products/quotients such as mmol/L); unsupported units are rejected rather than treated as dimensionless, incompatible calculations and mixed Quantity/scalar addition return empty, same-dimension Quantity division returns a Decimal ratio, derived-unit composition such as Quantity×Quantity or km/h remains deferred, and system/code metadata is preserved without changing unit equality
  • FHIR R4 model adapter (model: :r4) — test/r4_model_test.rb; dependency-free FHIRPath::FHIR::R4::ModelProvider
  • FHIR R4 Observation.value[x] logical navigation — R4 choice vectors; valueQuantity and valueString resolve through value, absent choice is empty
  • FHIR R4 logical-type is/as over resolved choice values — test/r4_type_operator_test.rb and R4 choice vectors; navigation records the resolved choice variant's FHIR logical type (Quantity, string, ...) and is/as test against it; empty-in/empty-out and PlainModel (no model metadata) behavior are covered; the type is recorded for collections produced directly by navigation (operators that rebuild collections, such as union, do not yet propagate it); resource-level type tests and ofType() remain deferred
  • FHIRPath 3.0 STU3 aggregate functions (sum, avg, max, min) — shipped by default as the first STU3-subset additions to the standard registry — a deliberate, documented exception (declared stu3-aggregate-functions in Capability.current.trial_use with fhirpath staying 2.0.0; see docs/api.md and docs/support-matrix.md); semantics follow the aggregate row above

Explicitly unsupported or deferred behavior

  • Temporal arithmetic with Quantity/Duration — calendar-duration and date/time arithmetic is not implemented; bounded numeric Quantity arithmetic is supported separately below
  • Advanced conversion/math/string/regex — not in standard registry
  • FHIR R5 model adapter — no R5 provider
  • Official HL7 shared test suite — importer is not yet bundled
  • Other FHIRPath 3.0 STU3 features — not enabled by default
  • Network I/O/global evaluator state — pure evaluation boundary

Host-dependent behavior

  • Broader FHIR choice elements and primitive extensions — first R4 slice only covers Observation.value[x]
  • resolve() and terminology — requires injected host services

Verification evidence

  • Compatibility vectors: 39 total (pass: 39, defect: 0, unsupported: 0, host-dependent: 0, not-run: 0).
  • Release gates: Ruby matrix, tests, RuboCop, package build, installed-gem smoke test, and coverage validation ran on the tagged source.
  • Artifact provenance: see SHA256SUMS.txt attached to this release.

Limitations

This is a pre-release compatibility slice, not a claim of complete FHIRPath
conformance. Review the release support matrix
and conformance workflow
before using it in production.