Skip to content
pubscout

fhir_path

0.15.3, released 11 days ago by fhirfli.dev

Model-independent FHIRPath evaluation engine in Dart, port of the Java reference implementation.

WASM-ready
$ flutter pub add fhir_path
Source repository

What it does

Evaluates FHIRPath expressions against data models using the FhirNode reflection contract. It provides core parsing, lexing, and expression evaluation for healthcare interoperability standards.

AI-written summary of version 0.15.3, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to evaluate FHIRPath expressions across arbitrary FHIR data models
  • You are building a custom FHIR binding over a non-fhir_r* data model
  • You need to parse or validate FHIRPath expressions in Dart

Skip it when

  • You are writing a standard Flutter application and can use version-specific bindings like fhir_r4_path directly
  • You are not working with healthcare or FHIR interoperability data

Strengths

  • Zero coupling to any specific FHIR version
  • Direct port of the official Java reference FHIRPath engine
  • Supports validation and evaluation of expressions via FhirNode contract

Weaknesses

  • Requires a binding or custom implementation of worker contexts for version-specific types
  • Niche domain-specific utility with no general-purpose application

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
5

Add to pubspec.yaml and import the package or its bindings.

import 'package:fhir_r4_path/fhir_r4_path.dart';

final engine = await FHIRPathEngine.create(WorkerContext());
final expr = engine.parse('Patient.name.given');
final List<FhirNode> result = await engine.evaluate(patient, expr);

Alternatives

Packages that do the same job and could replace fhir_path.

  • sodium

    Dart bindings for the libsodium cryptographic library for Dart-VM and Web.

  • qr

    A pure‑Dart library for generating QR code data and image matrices.

  • big_decimal

    A bugless implementation of BigDecimal in Dart based on Java's BigDecimal.

  • jovial_misc

    A collection of small Dart utilities for data streams and I/O.

Works with

Packages commonly used together with fhir_path: ones it builds on, ones built on it, and its own family.