Add date column in input file for change in definitions
This commit is contained in:
@@ -191,6 +191,7 @@ fn main() -> anyhow::Result<()> {
|
|||||||
InputFile {
|
InputFile {
|
||||||
file_path: encounters,
|
file_path: encounters,
|
||||||
joins: vec![],
|
joins: vec![],
|
||||||
|
date_order_column: Some("StartDateTime".to_owned()),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
inputs.insert(
|
inputs.insert(
|
||||||
@@ -198,6 +199,7 @@ fn main() -> anyhow::Result<()> {
|
|||||||
InputFile {
|
InputFile {
|
||||||
file_path: services,
|
file_path: services,
|
||||||
joins: vec![],
|
joins: vec![],
|
||||||
|
date_order_column: Some("StartDateTime".to_owned()),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
inputs.insert(
|
inputs.insert(
|
||||||
@@ -205,6 +207,7 @@ fn main() -> anyhow::Result<()> {
|
|||||||
InputFile {
|
InputFile {
|
||||||
file_path: transfers,
|
file_path: transfers,
|
||||||
joins: vec![],
|
joins: vec![],
|
||||||
|
date_order_column: Some("StartDateTime".to_owned()),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
inputs.insert(
|
inputs.insert(
|
||||||
@@ -212,6 +215,7 @@ fn main() -> anyhow::Result<()> {
|
|||||||
InputFile {
|
InputFile {
|
||||||
file_path: procedures,
|
file_path: procedures,
|
||||||
joins: vec![],
|
joins: vec![],
|
||||||
|
date_order_column: Some("ProcedureDateTime".to_owned()),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
inputs.insert(
|
inputs.insert(
|
||||||
@@ -219,6 +223,7 @@ fn main() -> anyhow::Result<()> {
|
|||||||
InputFile {
|
InputFile {
|
||||||
file_path: diagnoses,
|
file_path: diagnoses,
|
||||||
joins: vec![],
|
joins: vec![],
|
||||||
|
date_order_column: None,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
inputs.insert(
|
inputs.insert(
|
||||||
@@ -226,6 +231,7 @@ fn main() -> anyhow::Result<()> {
|
|||||||
InputFile {
|
InputFile {
|
||||||
file_path: patients,
|
file_path: patients,
|
||||||
joins: vec![],
|
joins: vec![],
|
||||||
|
date_order_column: None,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
inputs.insert(
|
inputs.insert(
|
||||||
@@ -233,6 +239,7 @@ fn main() -> anyhow::Result<()> {
|
|||||||
InputFile {
|
InputFile {
|
||||||
file_path: revenues,
|
file_path: revenues,
|
||||||
joins: vec![],
|
joins: vec![],
|
||||||
|
date_order_column: None,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
coster_rs::create_products::create_products_polars(definitions, inputs, output)
|
coster_rs::create_products::create_products_polars(definitions, inputs, output)
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ struct Product {
|
|||||||
pub struct InputFile {
|
pub struct InputFile {
|
||||||
pub file_path: PathBuf,
|
pub file_path: PathBuf,
|
||||||
pub joins: Vec<FileJoin>,
|
pub joins: Vec<FileJoin>,
|
||||||
|
// 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<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn create_products_polars(
|
pub fn create_products_polars(
|
||||||
@@ -49,7 +51,6 @@ pub fn create_products_polars(
|
|||||||
for definition in definitions {
|
for definition in definitions {
|
||||||
build_polars(definition, &inputs, &output_path)?;
|
build_polars(definition, &inputs, &output_path)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user