Skip to content

Implement Long FHIRPath type #2484

@johngrimes

Description

@johngrimes

Spec link: https://build.fhir.org/ig/HL7/FHIRPath/#long

This change implements Long literals and also adds the Long type to our model.

Implement the Long FHIRPath type as defined in the specification to enable:

  • Long literals: Support parsing of long values with 'L' suffix (e.g., 45L, -5L)
  • Type system integration: Long as a first-class FHIRPath type alongside Integer, Decimal, etc.
  • Range compliance: Support the full Long range (-2^63 to 2^63-1) as specified
  • FHIR integer64: Map the FHIR integer64 type to Long in FHIRPath expressions
  • Existing functions: Ensure Long values work correctly with currently implemented math, comparison, and logical functions
  • Operator support: Support Long in arithmetic (+, -, *, /, mod), comparison (=, !=, <, >, <=, >=), and other relevant operators
  • Type coercion: Handle Long operands in mixed-type expressions according to FHIRPath precedence rules
  • Implicit conversion: Long → Integer

Out of Scope

Metadata

Metadata

Assignees

Labels

fhirpathRelated to fhirpath reference implementation

Type

No type

Projects

Status

Planned

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions