Crate helios_fhirpath_support

Crate helios_fhirpath_support 

Source
Expand description

§FHIRPath Support Types

This crate provides the foundational types and traits that serve as a bridge between the FHIRPath evaluator and the broader FHIR ecosystem. It defines the common data structures and conversion interfaces that enable seamless integration across all components of the FHIRPath implementation.

§Overview

The fhirpath_support crate acts as the universal communication layer that allows:

  • FHIRPath evaluator to work with unified result types
  • FHIR data structures to convert into FHIRPath-compatible formats
  • Code generation macros to produce FHIRPath-aware implementations
  • Type conversion system to handle data transformation

§Core Types

§Usage Example

use helios_fhirpath_support::{EvaluationResult, IntoEvaluationResult};

// Convert a string to an evaluation result
let text = "Hello, FHIR!".to_string();
let result = text.to_evaluation_result();
assert_eq!(result, EvaluationResult::String("Hello, FHIR!".to_string(), None));

// Work with collections
let numbers = vec![1, 2, 3];
let collection = numbers.to_evaluation_result();
assert_eq!(collection.count(), 3);

Structs§

TypeInfoResult
Type information result for FHIRPath type() function

Enums§

EvaluationError
Comprehensive error type for FHIRPath evaluation failures.
EvaluationResult
Universal result type for FHIRPath expression evaluation.

Traits§

ChoiceElement
Trait for FHIR choice element types.
FhirResourceMetadata
Trait for FHIR resource metadata.
IntoEvaluationResult
Universal conversion trait for transforming values into FHIRPath evaluation results.
TypeInfo
Trait for types that can provide their type information for FHIRPath.

Functions§

convert_value_to_evaluation_result
Convenience function for converting values to evaluation results.