def visit_record(): req = request.get_json() local = req['local'] domain = req['domain'] tmp = get_institution_name(local, domain) institution_name = tmp[0][0] return json.dumps(visited_record(institution_name))
def patient_visiting_record(): email = request.get_json() local = email['local'] domain = email['domain'] tmp = get_institution_name(local, domain) patient_name = tmp[0][0] return json.dumps(patient_visited_record(patient_name))
def glasses_search_descrip(): req = request.get_json() local = req['local'] domain = req['domain'] tmp = get_institution_name(local, domain) glasses_store_name = tmp[0][0] date = req['date'] patient_name = req['patient_name'] detail = glasses_search_description(patient_name, glasses_store_name, date) return json.dumps(detail)
def delete_reservation(): print("cancel") req = request.get_json() local = req['local'] domain = req['domain'] serial_number = req['serial_number'] tmp = get_institution_name(local, domain) hospital_name = tmp[0][0] cancel_reservation(hospital_name, serial_number) print("cancel") return json.dumps(reservation_list(hospital_name)) #취소하고 다시 reload
def reservation_patient(): req = request.get_json() local = req['local'] domain = req['domain'] tmp = get_institution_name(local, domain) print(tmp) if (tmp == []): print("xxxx") return tmp institution_name = tmp[0][0] return json.dumps(reservation_list(institution_name))
def patient_search_descrip(): # name = request.form.get('patient_name') req = request.get_json() local = req['local'] domain = req['domain'] tmp = get_institution_name(local, domain) name = tmp[0][0] print(name) detail = patient_search_description(name) print(detail) return json.dumps(patient_search_description(name))
def pharmacy_search_descrip(): req = request.get_json() local = req['local'] domain = req['domain'] date = req['date'] patient_name = req['patient_name'] serial_number = req['serial_number'] tmp = get_institution_name(local, domain) pharmacy_name = tmp[0][0] # 예약목록중에 처방받은 사람만 조회가능(예약리스트, 처방리스트) detail = pharmacy_search_description(patient_name, serial_number, date, pharmacy_name) return json.dumps(detail)
def pharmacy_description_finish(): req = request.get_json() local = req['local'] domain = req['domain'] id = req['number'] date = req['date'] contents = req['description_contents'] tmp = get_institution_name(local, domain) pharmacy_name = tmp[0][0] res = add_pharmacy_description(id, date, contents, pharmacy_name) if res == -1: return "no" # 처방에 성공하면 방문기록에 추가 tmp = get_patient_name(id) patient_name = tmp[0][0] visit_pharmacy(patient_name, pharmacy_name, date) return "ok"
def glasses_description(): req = request.get_json() date = req['date'] recommend_date = req['recommend_date'] patient_name = req['patient_name'] r_vision = req['r_vision'] l_vision = req['l_vision'] fixed_l_vision = req['fixed_l_vision'] fixed_r_vision = req['fixed_r_vision'] local = req['local'] domain = req['domain'] tmp = get_institution_name(local, domain) hospital_name = tmp[0][0] # 병원이 처방하면 방문기록에 추가 visit_hospital(patient_name, hospital_name, date) return json.dumps( add_glasses_description(date, recommend_date, patient_name, hospital_name, l_vision, r_vision, fixed_l_vision, fixed_r_vision))
def description(): req = request.get_json() hospital_date = req['hospital_date'] patient_name = req['patient_name'] serial_number = req['serial_number'] medicine_name = req['medicine_name'] amount_per_onetime = req['amount_per_onetime'] count_per_oneday = req['count_per_oneday'] how_long_day = req['how_long_day'] local = req['local'] domain = req['domain'] tmp = get_institution_name(local, domain) hospital_name = tmp[0][0] # 병원이 처방하면 방문기록에 추가 visit_hospital(patient_name, hospital_name, hospital_date) return json.dumps( add_description(hospital_date, patient_name, serial_number, hospital_name, medicine_name, amount_per_onetime, count_per_oneday, how_long_day))