pub struct ProcessedResult {
pub columns: Vec<String>,
pub rows: Vec<ProcessedRow>,
}Expand description
Complete result of ViewDefinition transformation containing columns and data rows.
This struct represents the tabular output from processing a ViewDefinition against a Bundle of FHIR resources. It contains both the column definitions and the actual data rows in a format ready for serialization to various output formats.
§Structure
columns: Ordered list of column names from the ViewDefinitionrows: Data rows where each row contains values in column order
§Examples
use helios_sof::{ProcessedResult, ProcessedRow};
use serde_json::Value;
let result = ProcessedResult {
columns: vec![
"patient_id".to_string(),
"family_name".to_string(),
"given_name".to_string(),
],
rows: vec![
ProcessedRow {
values: vec![
Some(Value::String("patient-1".to_string())),
Some(Value::String("Smith".to_string())),
Some(Value::String("John".to_string())),
]
},
ProcessedRow {
values: vec![
Some(Value::String("patient-2".to_string())),
Some(Value::String("Doe".to_string())),
None, // Missing given name
]
},
]
};
assert_eq!(result.columns.len(), 3);
assert_eq!(result.rows.len(), 2);Fields§
§columns: Vec<String>Ordered list of column names as defined in the ViewDefinition
rows: Vec<ProcessedRow>Data rows containing values for each column
Trait Implementations§
Source§impl Clone for ProcessedResult
impl Clone for ProcessedResult
Source§fn clone(&self) -> ProcessedResult
fn clone(&self) -> ProcessedResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProcessedResult
impl Debug for ProcessedResult
Source§impl<'de> Deserialize<'de> for ProcessedResult
impl<'de> Deserialize<'de> for ProcessedResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProcessedResult
impl RefUnwindSafe for ProcessedResult
impl Send for ProcessedResult
impl Sync for ProcessedResult
impl Unpin for ProcessedResult
impl UnwindSafe for ProcessedResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more