Пример #1
0
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
Пример #2
0
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)
Пример #3
0
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)
Пример #4
0
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)
Пример #5
0
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)
Пример #6
0
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)
Пример #7
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)
Пример #8
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))
Пример #9
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)
Пример #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)
Пример #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))
Пример #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))