...
commit
d2fb2fd4db
|
@ -1,8 +0,0 @@
|
|||
<action>
|
||||
<field name="string">Dialyzer</field>
|
||||
<field name="view_cls">report</field>
|
||||
<field name="model">report.dialyzer.drop</field>
|
||||
<field name="report_template">report_dialyzer_drop</field>
|
||||
<field name="report_template_xls">dialyzer_drop</field>
|
||||
<field name="menu">clinic_menu</field>
|
||||
</action>
|
|
@ -28,6 +28,7 @@
|
|||
<item string="Settings">
|
||||
<item string="Cycles" action="clinic_cycle"/>
|
||||
<item string="Departments" action="clinic_department"/>
|
||||
<item string="Translate" action="clinic_translate"/>
|
||||
<item string="Clinic Settings" action="clinic_setting"/>
|
||||
</item>
|
||||
</menu>
|
||||
|
|
|
@ -8,12 +8,11 @@ from . import morbidity
|
|||
from . import nation
|
||||
from . import nurse
|
||||
from . import patient
|
||||
from . import patient_schedule
|
||||
from . import patient_cause_line
|
||||
from . import patient_comorbidity_line
|
||||
from . import patient_morbidity_line
|
||||
from . import race
|
||||
from . import schedule
|
||||
#from . import schedule
|
||||
from . import setting
|
||||
from . import visit
|
||||
from . import visit_line
|
||||
|
|
|
@ -69,5 +69,4 @@ class Nurse(Model):
|
|||
}
|
||||
_order="date desc,number desc"
|
||||
|
||||
|
||||
Nurse.register()
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
import time
|
||||
|
||||
from netforce.model import Model, fields
|
||||
|
||||
class PatientSchedule(Model):
|
||||
_name="clinic.patient.schedule"
|
||||
_string="Patient Schedule"
|
||||
_fields={
|
||||
"patient_id": fields.Many2One("clinic.patient","Patient",required=True,on_delete="cascade"),
|
||||
}
|
||||
|
||||
_defaults={
|
||||
}
|
||||
|
||||
PatientSchedule.register()
|
|
@ -55,13 +55,21 @@ class ReportHDSummary(Model):
|
|||
dom.append(['time_start','>=',time_start])
|
||||
dom.append(['time_stop','<=',time_stop])
|
||||
|
||||
patients=get_model("clinic.patient").search_browse(['type','=','All'])
|
||||
new_patients=len(patients)
|
||||
|
||||
patients_mg=get_model("clinic.patient").search_browse(['type','=','mg'])
|
||||
patients_sc=get_model("clinic.patient").search_browse(['type','=','sc'])
|
||||
patients_nhso=get_model("clinic.patient").search_browse(['type','=','nhso'])
|
||||
patients_pn=get_model("clinic.patient").search_browse(['type','=','personal'])
|
||||
dom=[]
|
||||
dom.append(['type','=','mg'])
|
||||
patients_mg=len(get_model("clinic.patient").search(dom))
|
||||
dom.append(['type','=','sc'])
|
||||
patients_sc=len(get_model("clinic.patient").search(dom))
|
||||
dom.append(['type','=','nhso'])
|
||||
patients_nhso=len(get_model("clinic.patient").search(dom))
|
||||
dom.append(['type','=','nhso'])
|
||||
patients_nhso=len(get_model("clinic.patient").search(dom))
|
||||
dom.append(['type','=','pn'])
|
||||
patients_pn=len(get_model("clinic.patient").search(dom))
|
||||
|
||||
patients=len(get_model("clinic.patient").search_browse(['type','=','All']))
|
||||
#new_patients=len(patients)
|
||||
|
||||
dom=[]
|
||||
dom.append(['state','=','completed'])
|
||||
|
@ -95,7 +103,7 @@ class ReportHDSummary(Model):
|
|||
'topic3':
|
||||
{
|
||||
'month': month_str,
|
||||
'amount': new_patients,
|
||||
'amount': patients,
|
||||
'date_from': time_start,
|
||||
'date_to': time_stop,
|
||||
},
|
||||
|
@ -116,30 +124,30 @@ class ReportHDSummary(Model):
|
|||
'topic6':
|
||||
{
|
||||
'month': '',
|
||||
'amount': len(patients_sc),
|
||||
'date_from': "",
|
||||
'date_to': "",
|
||||
'amount': patients_sc,
|
||||
'date_from': time_start,
|
||||
'date_to': time_stop,
|
||||
},
|
||||
'topic7':
|
||||
{
|
||||
'month':'',
|
||||
'amount': len(patients_mg),
|
||||
'date_from': "",
|
||||
'date_to': "",
|
||||
'amount': patients_mg,
|
||||
'date_from': time_start,
|
||||
'date_to': time_stop,
|
||||
},
|
||||
'topic8':
|
||||
{
|
||||
'month':'',
|
||||
'amount': len(patients_nhso),
|
||||
'date_from': "",
|
||||
'date_to': "",
|
||||
'amount': patients_nhso,
|
||||
'date_from': time_start,
|
||||
'date_to': time_stop,
|
||||
},
|
||||
'topic9':
|
||||
{
|
||||
'month': '',
|
||||
'amount': len(patients_pn),
|
||||
'date_from': "",
|
||||
'date_to': "",
|
||||
'amount': patients_pn,
|
||||
'date_from': time_start,
|
||||
'date_to': time_stop,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
from netforce.model import Model, fields
|
||||
|
||||
class Schedule(Model):
|
||||
_name="clinic.schedule"
|
||||
_string="Schedule"
|
||||
_fields={
|
||||
'name': fields.Char("Name"),
|
||||
'code': fields.Char("Code"),
|
||||
'patients': fields.Many2Many("clinic.patient","Patients"),
|
||||
}
|
||||
|
||||
|
||||
Schedule.register()
|
Loading…
Reference in New Issue