work-with-fhirpath

Evaluate FHIRPath expressions against FHIR resources via CLI and HTTP server.

51|19|Updated Jan 4, 2025
One-click install
npx skills add https://github.com/HeliosSoftware/hfs --skill work-with-fhirpath-heliossoftware
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: work-with-fhirpath
Source: https://github.com/HeliosSoftware/hfs/tree/main/.agents/skills/work-with-fhirpath
Command: npx skills add https://github.com/HeliosSoftware/hfs --skill work-with-fhirpath-heliossoftware

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working with FHIRPath in the Helios FHIR Server requires knowing the correct CLI flags, server endpoints, environment variables, and test locations, which are scattered across multiple crates and binaries. ## Core Features & Use Cases - CLI Expression Evaluation: Run FHIRPath expressions against JSON resources with context expressions, variables, stdin input, and FHIR version selection (R4, R4B, R5, R6). - HTTP Server: Start a fhirpath-lab-compatible evaluation server with version-specific endpoints, compression support, and configurable CORS, port, and body size limits. - Parser Debugging and Testing: Inspect parse debug trees and run official fhir-test-cases suites located under crates/fhirpath/tests/. - Use Case: A developer debugging why "Patient.name.given.first()" returns unexpected results can render the parse debug tree with fhirpath-cli, then test the expression against a sample Patient resource before touching server code. ## Quick Start Evaluate the FHIRPath expression "Patient.name.family" against my patient.json file using the fhirpath CLI and show me the result.

Frequently Asked Questions about work-with-fhirpath

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I evaluate a FHIRPath expression from the command line?▼

Run fhirpath-cli with the -e flag for the expression and -r for the resource file, for example cargo run --bin fhirpath-cli -- -e "Patient.name.family" -r patient.json. You can also pipe JSON via stdin using -r -.

How do I pass variables into a FHIRPath expression?▼

Use the --var flag with key=value syntax, such as --var threshold=5.0, then reference the variable in the expression with the % prefix like "value > %threshold".

Does the FHIRPath server support different FHIR versions?▼

Yes, the server exposes version-specific endpoints /r4, /r4b, /r5, and /r6, plus a root endpoint that auto-detects the FHIR version. The CLI also accepts a --fhir-version flag.

How do I debug a FHIRPath expression that parses incorrectly?▼

Use the --parse-debug-tree flag with fhirpath-cli to render the parse tree without needing a resource file. Test expressions independently with the CLI before debugging broader server behavior.

What request compression does the FHIRPath server accept?▼

The server decompresses request bodies with gzip, deflate, br, or zstd Content-Encoding, and returns 415 for unsupported encodings. Responses are compressed when the client sends Accept-Encoding.

Where are the FHIRPath test cases located?▼

Test cases live under crates/fhirpath/tests/ in the repository. Official FHIR test cases come from the external fhir-test-cases repository.