示例#1
0
 def _get_interval_id(self, testing_purpose, follow_up_test_reason):
     if testing_purpose == 'diagnostic':
         interval_id = 0
     else:
         interval_id = purpose_of_testing.get(follow_up_test_reason, None)
     if interval_id is None:
         raise NikshayRequiredValueMissing(
             "Value missing for intervalID, purpose_of_testing: {testing_purpose}, "
             "follow_up_test_reason: {follow_up_test_reason}".format(
                 testing_purpose=testing_purpose,
                 follow_up_test_reason=follow_up_test_reason))
     return interval_id
 def _get_interval_id(self, test_case_properties, use_2b_app_structure):
     if use_2b_app_structure:
         testing_purpose = test_case_properties.get('rft_general')
         follow_up_test_reason = test_case_properties.get('rft_dstb_followup')
     else:
         testing_purpose = test_case_properties.get('purpose_of_testing')
         follow_up_test_reason = test_case_properties.get('follow_up_test_reason')
     if testing_purpose in ['diagnostic', 'diagnosis_dstb', 'diagnosis_drtb']:
         interval_id = 0
     else:
         interval_id = purpose_of_testing.get(follow_up_test_reason, None)
     if interval_id is None:
         raise NikshayRequiredValueMissing(
             "Value missing for intervalID, purpose_of_testing: {testing_purpose}, "
             "follow_up_test_reason: {follow_up_test_reason}".format(
                 testing_purpose=testing_purpose, follow_up_test_reason=follow_up_test_reason)
         )
     return interval_id