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))
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))
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)
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)
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)
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))
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))
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)
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))
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)
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))
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))
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)
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]