Revision 14c18455
Added by Mikaël Ates almost 13 years ago
| calebasse/facturation/list_acts.py | ||
|---|---|---|
|
try:
|
||
|
hcts = CmppHealthCareTreatment.objects.\
|
||
|
filter(patient=patient).order_by('-start_date')
|
||
|
len_acts_cared_trait = len(hct.act_set.all())
|
||
|
except:
|
||
|
pass
|
||
|
# acts are all billable and chronologically ordered
|
||
| ... | ... | |
|
count_hcd = count_hcd + 1
|
||
|
cared = True
|
||
|
# The one before the last may be not full.
|
||
|
if not cared and len(hcts) >1 and hcts[1] and hcts[1].start_date <= act.date and hcts[1].end_date >= act.date:
|
||
|
if not cared and len(hcts) > 1 and hcts[1] and hcts[1].start_date <= act.date and hcts[1].end_date >= act.date:
|
||
|
# Ce qui seraient prise en charge
|
||
|
# ne doit pas dépasser la limite de prise en charge du hc
|
||
|
if count_hct_1 < hcts[1].get_act_number() - hcts[1].get_nb_acts_cared():
|
||
| ... | ... | |
|
acts_treatment[act.patient] = [(act, hcts[1])]
|
||
|
count_hct_1 = count_hct_1 + 1
|
||
|
cared = True
|
||
|
if not cared and hcts[0] and hcts[0].start_date <= act.date and hcts[0].end_date >= act.date:
|
||
|
if not cared and len(hcts) > 0 and hcts[0] and hcts[0].start_date <= act.date and hcts[0].end_date >= act.date:
|
||
|
if count_hct_2 < hcts[0].get_act_number() - hcts[0].get_nb_acts_cared():
|
||
|
if act.patient in acts_treatment:
|
||
|
acts_treatment[act.patient]. \
|
||
Also available in: Unified diff
facturation: there might be patients with no treatment hc.