def update_medical_team(examination_id, submission, auth_token): if settings.LOCAL: return ExaminationMocks.get_successful_medical_team_update_response() else: response = MedexRequest.put(auth_token, '%s/examinations/%s/medical_team' % (settings.API_URL, examination_id), submission) return response
def create_bereaved_discussion_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/bereaved_discussion' % (settings.API_URL, examination_id), submission)
def update_permission(permission, user_id, permission_id, auth_token): if settings.LOCAL: return PermissionMocks.get_successful_permission_update_response() else: return MedexRequest.put( auth_token, '%s/users/%s/permissions/%s' % (settings.API_URL, user_id, permission_id), permission)
def update_location_me_office(is_me_office, location_id, auth_token): if settings.LOCAL: return LocationsMocks.get_successful_location_update_response() else: return MedexRequest.put(auth_token, '%s/locations/%s/is_me_office' % (settings.API_URL, location_id), is_me_office)
def update_user_profile(user_id, profile_object, auth_token): if settings.LOCAL: return UserMocks.get_successful_user_update_profile_response() else: return MedexRequest.put(auth_token, '%s/users/%s/profile' % (settings.API_URL, user_id), profile_object)
def update_user(user_object, auth_token): if settings.LOCAL: return UserMocks.get_successful_user_update_response() else: return MedexRequest.put(auth_token, '%s/users' % settings.API_URL, user_object)
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 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 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 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))