예제 #1
0
 def report(self):
     config = self.report_config
     if config.get('sf') == 'sf5':
         return DistrictFunctionalityReport(self.request, domain=self.domain)
     elif config.get('sf') == 'sf4':
         return BlockLevelAFReport(self.request, domain=self.domain)
     elif config.get('sf') == 'sf3':
         return BlockLevelMonthReport(self.request, domain=self.domain)
     elif config.get('sf') == 'sf2':
         return ASHAFacilitatorsReport(self.request, domain=self.domain)
     else:
         return ASHAFunctionalityChecklistReport(self.request, domain=self.domain)
예제 #2
0
 def test_asha_functionality_checklist_report(self, mock_run_query):
     mock = MagicMock()
     mock.couch_user = self.user
     mock.GET = {
         'lang': '',
         'sf': '',
         'startdate': '2018-01-01',
         'enddate': '2018-01-31',
         'hierarchy_af': '646eb23165f2f3ee9966b0512efc9494',
         'month': '01',
         'year': '2018',
         'hierarchy_district': 'kaushambi',
         'hierarchy_block': 'Chail',
     }
     asha_functionality_checklist_report = ASHAFunctionalityChecklistReport(request=mock, domain=DOMAIN)
     rows = asha_functionality_checklist_report.rows
     self.assertEqual(
         rows,
         [
             ['', 'Date when cheklist was filled', 'Total no. of ASHAs functional on each tasks'],
             [1, 'Newborn visits within first day of birth in case of home deliveries', 0],
             [2,
              'Set of home visits for newborn care as specified in the HBNC guidelines (six visits in case '
              'of Institutional delivery and seven in case of a home delivery)',
              0],
             [3, 'Attending VHNDs/Promoting immunization', 0], [4, 'Supporting institutional delivery', 0],
             [5, 'Management of childhood illness - especially diarrhea and pneumonia', 0],
             [6, 'Household visits with nutrition counseling', 0],
             [7, 'Fever cases seen/malaria slides made in malaria endemic area', 0],
             [8, 'Acting as DOTS provider', 0], [9, 'Holding or attending village/VHSNC meeting', 0],
             [10,
              'Successful referral of the IUD, female sterilization or male sterilization cases and/or '
              'providing OCPs/Condoms',
              0],
             ['', 'Total of number of tasks on which ASHA reported being functional', ''],
             ['', 'Total number of ASHAs who are functional on at least 60% of the tasks', 0],
             ['', 'Remark', '']
         ]
     )