mirror of
https://github.com/pcvolkmer/bzkf-rwdp-check.git
synced 2025-04-19 19:16:51 +00:00
feat: ignore non oBDS 2.x messages
This commit is contained in:
parent
f48a96e64d
commit
fb60cb5042
@ -62,6 +62,8 @@ pub enum SubCommand {
|
||||
year: String,
|
||||
#[arg(long, value_parser = value_is_date, help = "Ignoriere LKR-Exporte seit Datum")]
|
||||
ignore_exports_since: Option<String>,
|
||||
#[arg(long, help = "Ignoriere Meldungen, die nicht im oBDS 2.x Format sind")]
|
||||
ignore_non_obds_2: bool,
|
||||
#[arg(long, help = "Meldungen mit externer Diagnose einschließen")]
|
||||
include_extern: bool,
|
||||
#[arg(
|
||||
@ -103,6 +105,8 @@ pub enum SubCommand {
|
||||
year: String,
|
||||
#[arg(long, value_parser = value_is_date, help = "Ignoriere LKR-Exporte seit Datum")]
|
||||
ignore_exports_since: Option<String>,
|
||||
#[arg(long, help = "Ignoriere Meldungen, die nicht im oBDS 2.x Format sind")]
|
||||
ignore_non_obds_2: bool,
|
||||
#[arg(long, help = "Export mit Trennzeichen ';' für Excel")]
|
||||
xls_csv: bool,
|
||||
#[arg(long, help = "Meldungen mit externer Diagnose einschließen")]
|
||||
@ -142,6 +146,8 @@ pub enum SubCommand {
|
||||
year: String,
|
||||
#[arg(long, value_parser = value_is_date, help = "Ignoriere LKR-Exporte seit Datum")]
|
||||
ignore_exports_since: Option<String>,
|
||||
#[arg(long, help = "Ignoriere Meldungen, die nicht im oBDS 2.x Format sind")]
|
||||
ignore_non_obds_2: bool,
|
||||
#[arg(long, help = "Meldungen mit externer Diagnose einschließen")]
|
||||
include_extern: bool,
|
||||
#[arg(
|
||||
|
@ -55,6 +55,7 @@ impl DatabaseSource {
|
||||
&self,
|
||||
year: &str,
|
||||
ignore_exports_since: &str,
|
||||
ignore_non_obds_2: bool,
|
||||
include_extern: bool,
|
||||
include_histo_zyto: bool,
|
||||
schema_versions: bool,
|
||||
@ -62,6 +63,7 @@ impl DatabaseSource {
|
||||
let params = params! {
|
||||
"year" => year,
|
||||
"ignore_exports_since" => ignore_exports_since,
|
||||
"ignore_non_obds_2" => if ignore_non_obds_2 { 1 } else { 0 },
|
||||
"include_extern" => if include_extern { 1 } else { 0 },
|
||||
"include_histo_zyto" => if include_histo_zyto { 1 } else { 0 }
|
||||
};
|
||||
@ -97,6 +99,7 @@ impl DatabaseSource {
|
||||
&self,
|
||||
year: &str,
|
||||
ignore_exports_since: &str,
|
||||
ignore_non_obds_2: bool,
|
||||
use_pat_id: bool,
|
||||
include_extern: bool,
|
||||
include_histo_zyto: bool,
|
||||
@ -109,6 +112,7 @@ impl DatabaseSource {
|
||||
params! {
|
||||
"year" => year,
|
||||
"ignore_exports_since" => ignore_exports_since,
|
||||
"ignore_non_obds_2" => if ignore_non_obds_2 { 1 } else { 0 },
|
||||
"include_extern" => if include_extern { 1 } else { 0 },
|
||||
"include_histo_zyto" => if include_histo_zyto { 1 } else { 0 }
|
||||
},
|
||||
|
@ -129,6 +129,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
user,
|
||||
year,
|
||||
ignore_exports_since,
|
||||
ignore_non_obds_2,
|
||||
include_extern,
|
||||
include_histo_zyto,
|
||||
schema_versions,
|
||||
@ -148,6 +149,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
.check(
|
||||
&year,
|
||||
&ignore_exports_since.unwrap_or("9999-12-31".into()),
|
||||
ignore_non_obds_2,
|
||||
include_extern,
|
||||
include_histo_zyto,
|
||||
schema_versions,
|
||||
@ -169,6 +171,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
output,
|
||||
year,
|
||||
ignore_exports_since,
|
||||
ignore_non_obds_2,
|
||||
xls_csv,
|
||||
include_extern,
|
||||
include_histo_zyto,
|
||||
@ -188,6 +191,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
.export(
|
||||
&year,
|
||||
&ignore_exports_since.unwrap_or("9999-12-31".into()),
|
||||
ignore_non_obds_2,
|
||||
pat_id,
|
||||
include_extern,
|
||||
include_histo_zyto,
|
||||
@ -232,6 +236,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
file,
|
||||
year,
|
||||
ignore_exports_since,
|
||||
ignore_non_obds_2,
|
||||
include_extern,
|
||||
include_histo_zyto,
|
||||
} => {
|
||||
@ -250,6 +255,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
.export(
|
||||
&year,
|
||||
&ignore_exports_since.unwrap_or("9999-12-31".into()),
|
||||
ignore_non_obds_2,
|
||||
pat_id,
|
||||
include_extern,
|
||||
include_histo_zyto,
|
||||
|
@ -39,6 +39,7 @@ FROM (
|
||||
AND (lme.xml_daten LIKE '%<cTNM%' OR lme.xml_daten LIKE '%<pTNM%' OR lme.xml_daten LIKE '%<Menge_Histologie>%' OR lme.xml_daten LIKE '%<Menge_Weitere_Klassifikation>%')
|
||||
AND (lme.xml_daten NOT LIKE '%histologie_zytologie%' OR 1 = :include_histo_zyto)
|
||||
AND (EXTRACTVALUE(lme.xml_daten, '//Meldende_Stelle') NOT LIKE '%9999%' OR 1 <= :include_extern)
|
||||
AND (EXTRACTVALUE(lme.xml_daten, '//ADT_GEKID/@Schema_Version') LIKE '2.%' OR 1 = :ignore_non_obds_2)
|
||||
) o1
|
||||
LEFT OUTER JOIN (
|
||||
|
||||
|
@ -125,6 +125,7 @@ FROM (
|
||||
AND (lme.xml_daten LIKE '%<cTNM%' OR lme.xml_daten LIKE '%<pTNM%' OR lme.xml_daten LIKE '%<Menge_Histologie>%' OR lme.xml_daten LIKE '%<Menge_Weitere_Klassifikation>%')
|
||||
AND (lme.xml_daten NOT LIKE '%histologie_zytologie%' OR 1 = :include_histo_zyto)
|
||||
AND (EXTRACTVALUE(lme.xml_daten, '//Meldende_Stelle') NOT LIKE '%9999%' OR 1 <= :include_extern)
|
||||
AND (EXTRACTVALUE(lme.xml_daten, '//ADT_GEKID/@Schema_Version') LIKE '2.%' OR 1 = :ignore_non_obds_2)
|
||||
) o1
|
||||
LEFT OUTER JOIN (
|
||||
SELECT DISTINCT
|
||||
|
@ -125,6 +125,7 @@ FROM (
|
||||
AND (lme.xml_daten LIKE '%<cTNM%' OR lme.xml_daten LIKE '%<pTNM%' OR lme.xml_daten LIKE '%<Menge_Histologie>%' OR lme.xml_daten LIKE '%<Menge_Weitere_Klassifikation>%')
|
||||
AND (lme.xml_daten NOT LIKE '%histologie_zytologie%' OR 1 = :include_histo_zyto)
|
||||
AND (EXTRACTVALUE(lme.xml_daten, '//Meldende_Stelle') NOT LIKE '%9999%' OR 1 <= :include_extern)
|
||||
AND (EXTRACTVALUE(lme.xml_daten, '//ADT_GEKID/@Schema_Version') LIKE '2.%' OR 1 = :ignore_non_obds_2)
|
||||
) o1
|
||||
LEFT OUTER JOIN (
|
||||
SELECT DISTINCT
|
||||
|
Loading…
x
Reference in New Issue
Block a user