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
EvaluationResult- Universal result type for FHIRPath expression evaluationEvaluationError- Comprehensive error handling for evaluation failuresIntoEvaluationResult- Trait for converting types to evaluation results
§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§
- Type
Info Result - Type information result for FHIRPath type() function
Enums§
- Evaluation
Error - Comprehensive error type for FHIRPath evaluation failures.
- Evaluation
Result - Universal result type for FHIRPath expression evaluation.
Traits§
- Choice
Element - Trait for FHIR choice element types.
- Fhir
Resource Metadata - Trait for FHIR resource metadata.
- Into
Evaluation Result - Universal conversion trait for transforming values into FHIRPath evaluation results.
- Type
Info - 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.