Hi all!
I am trying to write a simple reports to count the number of patients based on visit_type,Model:appointmentreport. We want to show total of patients for today, Total Patients with visit_type=='New health condition', Total Patients with visit_type=='Followup'
class AppointmentReportbm(ModelSQL, ModelView):
...
cmr_newpatients = fields.Function(fields.Integer('cmr_newpatients'),'get_cmr_newpatients')
@classmethod
def table_query(cls):
pool = Pool()
appointment = pool.get('gnuhealth.appointment').__table__()
party = pool.get('party.party').__table__()
patient = pool.get('gnuhealth.patient').__table__()
...
def get_cmr_newpatients(self, name):