Gheffs

Patient Encounter

Aug 4th, 2021
818
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. @frappe.whitelist(allow_guest=True)
  3. def open_patient_encounter():
  4.     data = {
  5.     "doctype": "Patient Encounter",
  6.     "patient": "Geoffrey Karani",
  7.     "patient_name": "Geoffrey Karani",
  8.     "patient_sex": "Male",
  9.     "patient_age": "2 years",
  10.     # "primary_doctor": "HLC-PRAC-2021-00001",
  11.     "practitioner":"HLC-PRAC-2021-00001",
  12.     "weight_in_kilograms": "62",
  13.     "height_in_centimeters": "156",
  14.     "head_circumference_in_centimeters": "30",
  15.     "temperature": "37.0",
  16.     "heart_rate": "100",
  17.     "respiratory_rate": "100",
  18.     "percutaneous_oxygen_saturation": "100",
  19.     "blood_pressure": "120",
  20.     "blood_pressure_systolic": "120",
  21.     "blood_pressure_diastolic": "120",
  22.     "drug_allergy": "Malarial",
  23.     "food_allergy": "Ugali"
  24.     }
  25.  
  26.     patient_encounter = frappe.get_doc(data)
  27.     patient_encounter.insert(ignore_permissions=True)
  28.     frappe.db.commit()
RAW Paste Data