diff --git a/src/main.rs b/src/main.rs index 7711973..ca3daa6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -191,6 +191,7 @@ fn main() -> anyhow::Result<()> { InputFile { file_path: encounters, joins: vec![], + date_order_column: Some("StartDateTime".to_owned()), }, ); inputs.insert( @@ -198,6 +199,7 @@ fn main() -> anyhow::Result<()> { InputFile { file_path: services, joins: vec![], + date_order_column: Some("StartDateTime".to_owned()), }, ); inputs.insert( @@ -205,6 +207,7 @@ fn main() -> anyhow::Result<()> { InputFile { file_path: transfers, joins: vec![], + date_order_column: Some("StartDateTime".to_owned()), }, ); inputs.insert( @@ -212,6 +215,7 @@ fn main() -> anyhow::Result<()> { InputFile { file_path: procedures, joins: vec![], + date_order_column: Some("ProcedureDateTime".to_owned()), }, ); inputs.insert( @@ -219,6 +223,7 @@ fn main() -> anyhow::Result<()> { InputFile { file_path: diagnoses, joins: vec![], + date_order_column: None, }, ); inputs.insert( @@ -226,6 +231,7 @@ fn main() -> anyhow::Result<()> { InputFile { file_path: patients, joins: vec![], + date_order_column: None, }, ); inputs.insert( @@ -233,6 +239,7 @@ fn main() -> anyhow::Result<()> { InputFile { file_path: revenues, joins: vec![], + date_order_column: None, }, ); coster_rs::create_products::create_products_polars(definitions, inputs, output) diff --git a/src/products/create_products.rs b/src/products/create_products.rs index 95d3f36..337e236 100644 --- a/src/products/create_products.rs +++ b/src/products/create_products.rs @@ -37,6 +37,8 @@ struct Product { pub struct InputFile { pub file_path: PathBuf, pub joins: Vec, + // if not specified, then don't allow change in type builds, as there's no way to detect changes over time + pub date_order_column: Option, } pub fn create_products_polars( @@ -49,7 +51,6 @@ pub fn create_products_polars( for definition in definitions { build_polars(definition, &inputs, &output_path)?; } - Ok(()) }