gen visit
parent
81ab2ff33d
commit
db29c0cc2c
|
@ -32,7 +32,7 @@ class MakeAPT(Model):
|
|||
for pc in get_model("clinic.patient.cycle").search_browse([]):
|
||||
patient=pc.patient_id
|
||||
dpt=pc.department_id
|
||||
key='%s-%s'%(patient.id,dpt.id)
|
||||
key=(patient.id,dpt.id)
|
||||
if not pts.get(key):
|
||||
pts[key]={
|
||||
'mon_cycle_id': None,
|
||||
|
@ -62,9 +62,11 @@ class MakeAPT(Model):
|
|||
|
||||
lines=[]
|
||||
for k, vals in pts.items():
|
||||
pt_id, dpt_id=k.split("-")
|
||||
vals['patient_id']=pt_id
|
||||
vals['department_id']=dpt_id
|
||||
pt_id, dpt_id=k
|
||||
if pt_id:
|
||||
vals['patient_id']=pt_id
|
||||
if dpt_id:
|
||||
vals['department_id']=dpt_id
|
||||
lines.append(('create',vals))
|
||||
|
||||
for line in obj.lines:
|
||||
|
|
|
@ -217,6 +217,8 @@ class VisitBoard(Model):
|
|||
has_duration=False
|
||||
if date_from != date_to:
|
||||
has_duration=True
|
||||
import pprint
|
||||
pprint.pprint(lines)
|
||||
data={
|
||||
'lines': lines,
|
||||
'date': utils.date2thai(date_from,format='ประจำวัน%(Td)s ที่ %(d)s %(Tm)s %(BY)s'),
|
||||
|
|
Loading…
Reference in New Issue