Patch level :

Files correlati     :
Ricompilazione Demo : [ ]
Commento            : Stampa urgenze: corretto filtro per gruppo sanguigno


git-svn-id: svn://10.65.10.50/trunk@6498 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
cris 1998-04-06 13:19:29 +00:00
parent 25ae715a87
commit f02f2bf698

View File

@ -36,7 +36,6 @@ class TStampaUrgenze : public TPrintapp
TRelation* _rel;
TMask* _msk;
TUrgenze_form* _form_eti;
TRectype* _sangue;
TAssoc_array _categorie;
TString16 _tipodon;
long _giorni;
@ -59,7 +58,6 @@ public:
void filtra_sezioni();
void header_sezione(const TString16 codsez, const TString16 codsot);
TMask& app_mask() { return *_msk; }
TRectype& get_sangue() { return *_sangue; }
TStampaUrgenze() : _data_stampa(TODAY), _cognome_nome("",25), _dencom("",50) {}
};
@ -178,12 +176,6 @@ bool TStampaUrgenze::filter_func_urgenze(const TRelation* rel)
}
}
}
// filtro per tipizzazione
if (filtrato)
{
TRectype from = app().get_sangue();
filtrato = (sog.curr()==from);
}
// filtro su data donazione
if (filtrato)
{
@ -323,27 +315,28 @@ bool TStampaUrgenze::set_print(int)
if (catses.not_empty() && catses.ok())
_categorie.add((const char*) catses);
// filtro per tipizzazione
_sangue->zero();
TString filtro;
filtro << "TCS->S6 == \"I\"";
const TString16 gruppoab0 = _msk->get(F_GRUPPOAB0);
const TString16 rhantid = _msk->get(F_RHANTID);
const TString16 kell = _msk->get(F_KELL);
const TString16 fenotiporh = _msk->get(F_FENOTIPORH);
const TString16 du = _msk->get(F_DU);
if ((gruppoab0.ok()) && (gruppoab0.not_empty()))
_sangue->put(SOG_GRUPPOAB0, gruppoab0);
filtro << " && (" << SOG_GRUPPOAB0 << " == \"" << gruppoab0 << "\")";
if ((rhantid.ok()) && (rhantid.not_empty()))
_sangue->put(SOG_RHANTID, rhantid);
filtro << " && (" << SOG_RHANTID << " == \"" << rhantid << "\")";
if ((kell.ok()) && (kell.not_empty()))
_sangue->put(SOG_KELL, kell);
filtro << " && (" << SOG_KELL << " == \"" << kell << "\")";
if ((fenotiporh.ok()) && (fenotiporh.not_empty()))
_sangue->put(SOG_FENOTIPORH, fenotiporh);
filtro << " && (" << SOG_FENOTIPORH << " == \"" << fenotiporh << "\")";
if ((du.ok()) && (du.not_empty()))
_sangue->put(SOG_DU, du);
filtro << " && (" << SOG_DU << " == \"" << du << "\")";
_giorni = _msk->get_long(F_GIORNI);
_tipodon = _msk->get(F_TIPODON);
_unica = _msk->get_bool(F_UNICA);
// filtra solo idonei
current_cursor()->setfilter("TCS->S6 == \"I\"", TRUE);
current_cursor()->setfilter(filtro, TRUE);
// filtra per categorie, tipizzazione e data donazione
current_cursor()->set_filterfunction (filter_func_urgenze, TRUE);
reset_print();
@ -386,7 +379,6 @@ bool TStampaUrgenze::user_create()
_rel->add(LF_SEZIONI, "CODSEZ==CODSEZ|CODSOT==CODSOT");
add_cursor(new TCursor(_rel, "", 3));
_msk = new TMask("at4200a");
_sangue = new TRectype(LF_SOGGETTI);
TConfig config(CONFIG_STUDIO);
TString16 etformato = config.get("EtFormato");
@ -401,7 +393,6 @@ bool TStampaUrgenze::user_destroy()
delete _msk;
delete _rel;
delete _form_eti;
delete _sangue;
return TRUE;
}