def test_validate_no_resp_exam(self): self.options['resp_exam'] = NO self.options['resp_exam_other'] = None infant_fu_physical = InfantFuPhysicalForm(data=self.options) self.assertIn( 'You indicated that Respiratory exam was not normal. Provide answer to Q12.', infant_fu_physical.errors.get('__all__'))
def test_validate_no_neurologic_exam(self): self.options['neurologic_exam'] = NO self.options['neuro_exam_other'] = None infant_fu_physical = InfantFuPhysicalForm(data=self.options) self.assertIn( 'You indicated that Neurological exam was not normal. Provide answer to Q22.', infant_fu_physical.errors.get('__all__'))
def test_validate_no_heent_exam(self): self.options['heent_exam'] = NO self.options['heent_no_other'] = None infant_fu_physical = InfantFuPhysicalForm(data=self.options) self.assertIn( 'You indicated that HEENT exam was not normal. Provide answer to Q10.', infant_fu_physical.errors.get('__all__'))
def test_validate_no_general_activity(self): self.options['general_activity'] = None self.options['abnormal_activity'] = 'Fingers' infant_fu_physical = InfantFuPhysicalForm(data=self.options) self.assertIn( 'You indicated that there was NO abnormality in general activity, yet ' 'specified abnormality. Please correct', infant_fu_physical.errors.get('__all__'))
def test_validate_infant_report_datetime(self): self.options['report_datetime'] = (timezone.datetime.now() - relativedelta(years=1)).date() infant_fu_physical = InfantFuPhysicalForm(data=self.options) self.assertIn( u'Report date {} cannot be before infant DOB of {}'.format( self.options['report_datetime'], self.infant_visit.appointment.registered_subject.dob), infant_fu_physical.errors.get('__all__'))
def test_validate_infant_head_circumference(self): self.infant_fu.head_circumference = 18.01 self.infant_fu.save() self.options['head_circumference'] = 15.01 infant_fu_physical = InfantFuPhysicalForm(data=self.options) self.assertIn( u'You stated that the head circumference for the participant as {}, ' 'yet in visit {} you indicated that participant height was {}. Please correct.' .format(self.options['head_circumference'], '2010', 18.01), infant_fu_physical.errors.get('__all__'))
def test_validate_neurologic_exam(self): self.options['neuro_exam_other'] = 'Down Syndrome' infant_fu_physical = InfantFuPhysicalForm(data=self.options) self.assertIn( 'If Neurological Exam is normal, Do not answer the following Question (Q22).', infant_fu_physical.errors.get('__all__'))
def test_validate_skin_exam(self): self.options['skin_exam_other'] = 'Eczema' infant_fu_physical = InfantFuPhysicalForm(data=self.options) self.assertIn( 'If Skin Exam is normal, Do not answer the following Question (Q18).', infant_fu_physical.errors.get('__all__'))
def test_validate_abdominal_exam(self): self.options['abdominal_exam_other'] = 'Diarrohea' infant_fu_physical = InfantFuPhysicalForm(data=self.options) self.assertIn( 'If Abdominal Exam is normal, Do not answer the following Question (Q16).', infant_fu_physical.errors.get('__all__'))
def test_validate_cardiac_exam(self): self.options['cardiac_exam_other'] = 'Arythmia' infant_fu_physical = InfantFuPhysicalForm(data=self.options) self.assertIn( 'If Cardiac Exam is normal, Do not answer the following Question (Q14).', infant_fu_physical.errors.get('__all__'))
def test_validate_resp_exam(self): self.options['resp_exam_other'] = 'Breathing' infant_fu_physical = InfantFuPhysicalForm(data=self.options) self.assertIn( 'If Respiratory Exam is normal, Do not answer the following Question (Q12).', infant_fu_physical.errors.get('__all__'))
def test_validate_heent_exam(self): self.options['heent_no_other'] = 'Eyes' infant_fu_physical = InfantFuPhysicalForm(data=self.options) self.assertIn( 'If HEENT Exam is normal, Do not answer the following Question (Q10).', infant_fu_physical.errors.get('__all__'))
def test_validate_general_activity(self): self.options['general_activity'] = 'ABNORMAL' self.options['abnormal_activity'] = None infant_fu_physical = InfantFuPhysicalForm(data=self.options) self.assertIn('If abnormal, please specify.', infant_fu_physical.errors.get('__all__'))