Exemple #1
0
 def count_results(self):
     try:
         total = fetch_summary(table = self.table, 
                                 cnds = {'national_id = %s': self.national_id, 'keyword = %s' : 'SMR'},
                                 cols = ['COUNT(*) AS total'], exts = {}
                                 )[0].total
         return total
     except Exception, e:
         pass
Exemple #2
0
 def fetch_deaths(cnds, cols, exts):
     return fetch_summary(Death._table, cnds, cols, exts)
Exemple #3
0
 def fetch_refusals(cnds, cols, exts):
     return fetch_summary(Refusal._table, cnds, cols, exts)
Exemple #4
0
 def fetch_riskresults(cnds, cols, exts):
     return fetch_summary(Riskresult._table, cnds, cols, exts)
Exemple #5
0
 def fetch_ancvisits(cnds, cols, exts):
     return fetch_summary(Ancvisit._table, cnds, cols, exts)
Exemple #6
0
 def fetch_nbcvisits(cnds, cols, exts):
     return fetch_summary(Nbcvisit._table, cnds, cols, exts)
Exemple #7
0
 def fetch_stock(cnds, cols, exts):
     return fetch_summary(Stock._table, cnds, cols, exts)
Exemple #8
0
 def fetch_ccms(cnds, cols, exts):
     return fetch_summary(CCM._table1, cnds, cols, exts)
Exemple #9
0
 def fetch_nutritions(cnds, cols, exts):
     return fetch_summary(Nutrition._table, cnds, cols, exts)
Exemple #10
0
 def fetch_enderrors(cnds, cols, exts):
     return fetch_summary(Enderror._table, cnds, cols, exts)
Exemple #11
0
 def fetch_departures(cnds, cols, exts):
     return fetch_summary(Departure._table, cnds, cols, exts)
Exemple #12
0
 def fetch_pregnancies(cnds, cols, exts):
     return fetch_summary(Pregnancy._table, cnds, cols, exts)
Exemple #13
0
 def fetch_births(cnds, cols, exts):
     return fetch_summary(Birth._table, cnds, cols, exts)
Exemple #14
0
 def get_ambulances_summary(cnds, cols, exts):
     return fetch_summary(Ambulance._table, cnds, cols, exts)
Exemple #15
0
 def fetch_childhealths(cnds, cols, exts):
     return fetch_summary(Childhealth._table, cnds, cols, exts)
Exemple #16
0
 def fetch_mothers(cnds, cols, exts):
     return fetch_summary(Mother._table, cnds, cols, exts)
Exemple #17
0
 def fetch_malaria(cnds, cols, exts):
     return fetch_summary(Malaria._table, cnds, cols, exts)
Exemple #18
0
 def fetch_cmrs(cnds, cols, exts):
     return fetch_summary(CCM._table2, cnds, cols, exts)
Exemple #19
0
 def fetch_downloads(cnds, cols, exts):
     return fetch_summary(Download._table, cnds, cols, exts)
Exemple #20
0
 def fetch_risks(cnds, cols, exts):
     return fetch_summary(Risk._table, cnds, cols, exts)
Exemple #21
0
 def fetch_redalerts(cnds, cols, exts):
     return fetch_summary(Redalert._table, cnds, cols, exts)