def get_receipt_data_f(): data = request.get_json() data_big = data["default"]["BigData"] data["default"] = data_big ORAcceptance.send_receipt(data) return make_response(jsonify(data))
def cancel_receipt(): data = request.get_json() ora = ORAcceptance(config.acc_date) ora.cancel(acc_time=data["acc_time"], acc_id=data["acc_id"], pati_id=data["pati_id"]) return make_response(jsonify(data))
def get_or_acc_data(): ora = ORAcceptance(acc_date=config.acc_date) data = ora.list_all() return data
def get_receipt_data_f_test(): data = request.get_json() print(data) res = ORAcceptance.send_receipt_test(data) return make_response(jsonify(res))
from pprint import pprint from orcalib.or_acceptances import ORAcceptance from serve.data_cache import database from serve.data_cache.caching import ( delete_acceptance, insert_acceptance, select_acceptance, update_acceptance, ) from utils.diff import AccDiff ora = ORAcceptance(acc_date="2020-09-25") data = ora.list_all() acc_data = [] pati_data = [] for d in data["data"]: acc_d = { "Acceptance_Date": d["Acceptance_Date"], "Acceptance_ID": d["Acceptance_ID"], "Acceptance_Time": d["Acceptance_Time"], "Status": int(d["Status"]), "Patient_ID": d["Patient_Information"]["Patient_ID"], } acc_data.append(acc_d) pati_data.append({"Patient_ID": d["Patient_Information"]["Patient_ID"]}) pprint(acc_data) # print(acc_data) database.init() accdiff = AccDiff()