Example #1
0
def load_medical_team_by_id(examination_id, auth_token):
    if settings.LOCAL:
        return ExaminationMocks.get_successful_medical_team_load_response(examination_id)
    else:
        return MedexRequest.get(auth_token, '%s/examinations/%s/medical_team' % (settings.API_URL, examination_id))
Example #2
0
def load_patient_details_by_id(examination_id, auth_token):
    if settings.LOCAL:
        return ExaminationMocks.get_successful_patient_details_load_response()
    else:
        return MedexRequest.get(auth_token, '%s/examinations/%s/patient_details' % (settings.API_URL, examination_id))
Example #3
0
def update_patient_details(examination_id, submission, auth_token):
    if settings.LOCAL:
        return ExaminationMocks.get_successful_patient_details_update_response()
    else:
        return MedexRequest.put(auth_token, '%s/examinations/%s/patient_details' % (settings.API_URL, examination_id),
                                submission)
Example #4
0
def load_financial_report_locations(auth_token):
    if settings.LOCAL:
        return ReportMocks.get_successful_financial_report_locations_response()
    else:
        return MedexRequest.get(auth_token, '%s/report/finance_download_locations' % settings.API_URL)
Example #5
0
def load_examinations_index(params, auth_token):
    if settings.LOCAL:
        return ExaminationMocks.get_successful_case_index_response()
    else:
        return MedexRequest.get(auth_token, '%s/examinations' % settings.API_URL, params)
Example #6
0
def load_coroner_report(auth_token, examination_id):
    if settings.LOCAL:
        return ReportMocks.get_successful_coroner_report_response()
    else:
        return MedexRequest.get(auth_token,
                                '%s/report/%s/coronal_referral_download' % (settings.API_URL, examination_id))
Example #7
0
def void_case(auth_token, examination_id):
    if settings.LOCAL:
        return ExaminationMocks.get_successful_case_index_response()
    else:
        return MedexRequest.get(auth_token, '%s/examinations/%s/case_settings' % (settings.API_URL, examination_id))
Example #8
0
def update_outcomes_outstanding_items(auth_token, examination_id, submission):
    if settings.LOCAL:
        return ExaminationMocks.get_successful_outstanding_items_response()
    else:
        return MedexRequest.put(auth_token, '%s/examinations/%s/outstanding_case_items' % (settings.API_URL,
                                                                                           examination_id), submission)
Example #9
0
def close_case(auth_token, examination_id):
    if settings.LOCAL:
        return ExaminationMocks.get_successful_case_close_response()
    else:
        return MedexRequest.put(auth_token, '%s/examinations/%s/close_case' % (settings.API_URL, examination_id))
Example #10
0
def put_void_examination(examination_id, reason_object, auth_token):
    return MedexRequest.put(auth_token, '%s/examinations/%s/void_case' % (settings.API_URL, examination_id),
                            reason_object)
Example #11
0
def confirm_coroner_referral(auth_token, examination_id):
    if settings.LOCAL:
        return ExaminationMocks.get_successful_coroner_referral_response()
    else:
        return MedexRequest.put(auth_token, '%s/examinations/%s/coroner_referral' % (settings.API_URL, examination_id))
Example #12
0
def complete_case_scrutiny(auth_token, examination_id):
    if settings.LOCAL:
        return ExaminationMocks.get_successful_scrutiny_complete_response()
    else:
        return MedexRequest.put(auth_token, '%s/examinations/%s/confirmation_of_scrutiny' % (settings.API_URL,
                                                                                             examination_id))
Example #13
0
def create_medical_history_event(auth_token, examination_id, submission):
    if settings.LOCAL:
        return ExaminationMocks.get_successful_timeline_event_create_response()
    else:
        return MedexRequest.put(auth_token, '%s/examinations/%s/medical_history' % (settings.API_URL, examination_id),
                                submission)
Example #14
0
def get_medical_examiners_list(auth_token):
    if settings.LOCAL:
        return [convert_user(user) for user in UserMocks.get_me_user_list()]
    else:
        response_users = MedexRequest.get(auth_token, "%s/users/medical_examiners" % settings.API_URL).json()['users']
        return [convert_user(response_user) for response_user in response_users]