From 088605a03cec4fbfa9fa26b05f6f28ac5060a668 Mon Sep 17 00:00:00 2001 From: cris Date: Fri, 28 Dec 2001 16:23:47 +0000 Subject: [PATCH] Patch level :avis 1.7 nopatch Files correlati :at0.exe at8.exe ctbo2at.ini Ricompilazione Demo : [ ] Commento :committate le modifiche per il programma acquisizione dati da CT (Bologna) e per avviso errori su donatori sospesi per ECG patologico (PR) git-svn-id: svn://10.65.10.50/trunk@9986 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- at/at0300.cpp | 20 +++++++++++++++++ at/at8400.cpp | 2 +- at/at8800.cpp | 60 +++++++++++++++++++++++++++++++++++++++++--------- at/ctbo2at.ini | 2 +- 4 files changed, 71 insertions(+), 13 deletions(-) diff --git a/at/at0300.cpp b/at/at0300.cpp index bab286dd4..9c9705459 100755 --- a/at/at0300.cpp +++ b/at/at0300.cpp @@ -393,6 +393,26 @@ bool TGiornalieroC::soggetti_notify(TSheet_field& s, int r, KEY k) return s.sheet_mask().field(F_S_CODICE).error_box("Il soggetto ha gia' un controllo in data %s", datacon.string()); else { + TLocalisamfile soggetti(LF_SOGGETTI); + soggetti.setkey(1); + soggetti.zero(); + soggetti.put(SOG_CODICE,codsog); + if (soggetti.read() == NOERR) + { + TString16 statosog = soggetti.get(SOG_STATO); + const char modstatosog = modstato_tcs(statosog); + if (modstatosog == 'S') + { + contsan.zero(); + contsan.put(CON_DATACON,soggetti.get(SOG_DATASTATO)); + contsan.put(CON_CODICE,codsog); + if (contsan.read() == NOERR) + { + TString16 motivo = contsan.get(CON_MOTIVO); + warning_box("Il soggetto e' sospeso, motivo: %s", (const char *) motivo); + } + } + } TString16 tipocon = row.get(3); if (tipocon.blank()) tipocon = s.mask().get(F_TIPOCON); diff --git a/at/at8400.cpp b/at/at8400.cpp index ec20081d4..09a902cb2 100755 --- a/at/at8400.cpp +++ b/at/at8400.cpp @@ -200,7 +200,7 @@ bool TReconstruction::menu(MENU_TAG m) recsog.put(SOG_NUMCONV,numzero); } recsog.put(SOG_DATAULTAGG, oggi); - recsog.put(SOG_UTENULTAGG, "CRISTINA"); + recsog.put(SOG_UTENULTAGG, "WINSIT"); recsog.rewrite(_rel->lfile()); } } diff --git a/at/at8800.cpp b/at/at8800.cpp index 546995bba..fe16334ab 100755 --- a/at/at8800.cpp +++ b/at/at8800.cpp @@ -17,6 +17,9 @@ #include "donaz.h" #include "idoneita.h" #include "soggetti.h" +#include "convoc.h" +#include "rconvoc.h" +#include "storico.h" #define ATFILENAME "pippo.txt" @@ -63,6 +66,8 @@ int TCtbo2at_file::autosave(TRelation& rel, const TRecord_text& rec) const TRectype& rel_rec = rel.curr(field.file()); TFieldtypes tipo_campo = rel_rec.type(field.name()); bool vuoto = valore.blank(); + if (valore[0] == '@') //se trovo il carattere @ -> azzero il campo + valore.cut(0); switch(tipo_campo) { case _datefld: @@ -145,7 +150,7 @@ inline TCtbo2at& app() { return (TCtbo2at&) main_app();} // creazione dell'applicazione bool TCtbo2at::create() { - open_files(LF_SOGGETTI, LF_DONAZ, LF_CONTSAN, LF_IDONEITA, 0); + open_files(LF_SOGGETTI, LF_DONAZ, LF_CONTSAN, LF_IDONEITA, LF_CONVOC, LF_RCONVOC, LF_STORICO, 0); _msk = new TMask("at8800a"); _msk->set(F_FILENAME,ATFILENAME); _trasfile = NULL; @@ -231,9 +236,12 @@ void TCtbo2at::calcola_categoria(TRectype& recsog) bool dimissione = ctd.get_bool("B0"); if (dimissione) { - recsog.put(SOG_CATDON,ctd.get("S6")); - if (ctd.get("S6").not_empty()) - catdon = ctd.get("S6"); + const TString& cat_coll = ctd.get("S6"); + if (cat_coll.not_empty()) + { + catdon = cat_coll; + recsog.put(SOG_CATDON, catdon); + } } if ((catdon == _catini1 || _catini1.empty()) && (totdon>=_numdon1) && _catfin1.not_empty()) { @@ -291,6 +299,8 @@ void TCtbo2at::transfer() _trasfile = new TCtbo2at_file(_msk->get(F_FILENAME), ctboini); inizializza_file(); + const long dimension = fsize(_msk->get(F_FILENAME)); + TProgind pi(dimension,"Acquisizione in corso..."); TRelation rel(LF_SOGGETTI); TRectype& sogg = rel.curr(); @@ -298,12 +308,37 @@ void TCtbo2at::transfer() TString8 str; // Stringa jolly di lavoro TRecord_text curr; while (_trasfile->read(curr) == NOERR) - { + { + pi.setstatus(_trasfile->read_file()->tellg()); + //controlla se il donatore é AVIS oppure un cane sciolto o, peggio ancora, un adepto della + //concorrenza!!!(ovviamente si va a stringhe fisse e non a tabelle! roba da avis.....) + str = curr.get(31); //donatore della concorrenza -> lo salta + str.trim(); + if (str == "ADVS") + continue; + if (str == "NOASS") //se il donatore é un cane sciolto -> va in sezione NI ed in categoria NI + { + curr.add("NI",0); + curr.add("@",1); + sogg.put(SOG_CATDON,"NI"); + } + str = curr.get(2); sogg.put(SOG_CODICE, str); - if (rel.read() != NOERR) - sogg.zero(); - + if (rel.read(_isequal) != NOERR) + sogg.zero(); + + //controlla se il donatore ha cambiato sezione spostandosi da Bologna in provincia; + //in questo caso gli deve cancellare il sottogruppo (veramente un procedimento da + //galera, ma se l'avis e winsit vogliono cosí.....) + str = curr.get(0); + str.trim(); + TString8 str1; + str1 = curr.get(1); + str1.trim(); + if (str != sogg.get(SOG_CODSEZ) && str != "01" && str1 == "") + curr.add("@",1); + _trasfile->autosave(rel, curr); //const long codsog = atol(curr.get(2)); const char* tipo[] = { "SI", "PL", "PI", "PP" }; @@ -316,11 +351,14 @@ void TCtbo2at::transfer() { datadon = TDate(str); str = curr.get(32); - if (str == "UROM ") + str.trim(); + //cambio codice del punto di prelievo per casi speciali (sarebbe necessaria una tabella, + //ma con l'AVIS é tempo sprecato....) + if (str == "UROM") str = "013"; else - if (str == "UROB ") + if (str == "UROB") str = "O.BE"; else - if (str == "IMOLA ") + if (str == "IMOLA") str = "70"; update |= test_donation(sogg, tipo[i], datadon, str); } diff --git a/at/ctbo2at.ini b/at/ctbo2at.ini index 3c98d932f..5a104ff06 100755 --- a/at/ctbo2at.ini +++ b/at/ctbo2at.ini @@ -151,7 +151,7 @@ NAME(16) = TELEFONO ABITAZIONE TYPE(16) = STRINGA FIELD(16) = 90->TELABI POSITION(16) = 187 -LENGTH(18) = 14 +LENGTH(16) = 14 NAME(17) = TELEFONO LAVORO TYPE(17) = STRINGA