diff --git a/netforce_clinic/actions/clinic_dialyzer_report.xml b/netforce_clinic/actions/clinic_dialyzer_report.xml deleted file mode 100644 index 9d4532c..0000000 --- a/netforce_clinic/actions/clinic_dialyzer_report.xml +++ /dev/null @@ -1,8 +0,0 @@ - - Dialyzer - report - report.dialyzer.drop - report_dialyzer_drop - dialyzer_drop - clinic_menu - diff --git a/netforce_clinic/layouts/clinic_menu.xml b/netforce_clinic/layouts/clinic_menu.xml index 9faba75..74810d1 100644 --- a/netforce_clinic/layouts/clinic_menu.xml +++ b/netforce_clinic/layouts/clinic_menu.xml @@ -28,6 +28,7 @@ + diff --git a/netforce_clinic/models/__init__.py b/netforce_clinic/models/__init__.py index bd10678..1865b93 100644 --- a/netforce_clinic/models/__init__.py +++ b/netforce_clinic/models/__init__.py @@ -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 diff --git a/netforce_clinic/models/nurse.py b/netforce_clinic/models/nurse.py index 780c10a..2ccf50f 100644 --- a/netforce_clinic/models/nurse.py +++ b/netforce_clinic/models/nurse.py @@ -69,5 +69,4 @@ class Nurse(Model): } _order="date desc,number desc" - Nurse.register() diff --git a/netforce_clinic/models/patient_schedule.py b/netforce_clinic/models/patient_schedule.py deleted file mode 100644 index aa80530..0000000 --- a/netforce_clinic/models/patient_schedule.py +++ /dev/null @@ -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() diff --git a/netforce_clinic/models/report_hd_summary.py b/netforce_clinic/models/report_hd_summary.py index 3cbfdb5..bcbf3d0 100644 --- a/netforce_clinic/models/report_hd_summary.py +++ b/netforce_clinic/models/report_hd_summary.py @@ -54,15 +54,23 @@ class ReportHDSummary(Model): dom=[] 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']) dom.append(['time_start','>=',time_start]) @@ -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, }, } diff --git a/netforce_clinic/models/schedule.py b/netforce_clinic/models/schedule.py deleted file mode 100644 index 8f1e3ba..0000000 --- a/netforce_clinic/models/schedule.py +++ /dev/null @@ -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()