pub trait ViewDefinitionColumnTrait {
// Required methods
fn name(&self) -> Option<&str>;
fn path(&self) -> Option<&str>;
fn collection(&self) -> Option<bool>;
}Expand description
Trait for abstracting ViewDefinitionColumn across FHIR versions.
This trait provides version-agnostic access to column definitions, which specify how to extract data from FHIR resources and map it to output table columns. Columns are the fundamental building blocks of ViewDefinition output structure.
§Key Properties
- Name: The output column name in the result table
- Path: The FHIRPath expression to extract the value
- Collection: Whether this column contains array/collection values
§Examples
use helios_sof::traits::ViewDefinitionColumnTrait;
fn describe_column<T: ViewDefinitionColumnTrait>(col: &T) {
if let Some(name) = col.name() {
print!("Column '{}'", name);
if let Some(path) = col.path() {
print!(" from path '{}'", path);
}
if col.collection() == Some(true) {
print!(" (collection)");
}
println!();
}
}Required Methods§
Sourcefn collection(&self) -> Option<bool>
fn collection(&self) -> Option<bool>
Returns whether this column should contain collection/array values