varshakolanu commited on
Commit
3d53add
·
verified ·
1 Parent(s): 57119fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -8
app.py CHANGED
@@ -240,12 +240,12 @@ calendly_client = CalendlyClient(CALENDLY_API_TOKEN)
240
  # State to store patient phone number
241
  patient_phone_state = gr.State(value=None)
242
 
243
- def register_patient(name_first, name_last, dob, sex, height, weight, marital, phone, email,
244
- address_street1, address_street2, address_city, address_state, postal,
245
  med_yes_no, med_list, emergency_first, emergency_last, emergency_relation,
246
  emergency_number, language, consent_status):
247
- if not all([name_first, name_last, dob, sex, height, weight, marital, phone, email,
248
- address_street1, address_city, address_state, postal, language, consent_status]) or \
249
  (med_yes_no == "Yes" and not med_list):
250
  return "All fields are required.", gr.State(value=None)
251
  try:
@@ -253,14 +253,12 @@ def register_patient(name_first, name_last, dob, sex, height, weight, marital, p
253
  "First_Name__c": name_first,
254
  "Last_Name__c": name_last,
255
  "Date_of_Birth__c": dob,
256
- "Sex__c": sex,
257
  "Height__c": height,
258
  "Weight__c": weight,
259
  "Marital_Status__c": marital,
260
  "Phone__c": phone,
261
  "Email__c": email,
262
- "Address_Street1__c": address_street1,
263
- "Address_Street2__c": address_street2 or "",
264
  "City__c": address_city,
265
  "State__c": address_state,
266
  "Postal_Code__c": postal,
@@ -475,7 +473,7 @@ with gr.Blocks(theme=gr.themes.Soft(), title="AI-Powered Patient Follow-up Agent
475
  name_last = gr.Textbox(label="Last Name", placeholder="Last Name")
476
  with gr.Column():
477
  dob_input = gr.Textbox(label="Date of Birth", placeholder="MM-DD-YYYY")
478
- sex_input = gr.Dropdown(label="Gender", choices=["Please Select", "Male", "Female", "Other"], value="Please Select")
479
  with gr.Row():
480
  height_input = gr.Textbox(label="Height (inches)", placeholder="e.g., 65")
481
  weight_input = gr.Textbox(label="Weight (pounds)", placeholder="e.g., 150")
 
240
  # State to store patient phone number
241
  patient_phone_state = gr.State(value=None)
242
 
243
+ def register_patient(name_first, name_last, dob, Gender, height, weight, marital, phone, email,
244
+ address_city, address_state, postal,
245
  med_yes_no, med_list, emergency_first, emergency_last, emergency_relation,
246
  emergency_number, language, consent_status):
247
+ if not all([name_first, name_last, dob, Gender, height, weight, marital, phone, email,
248
+ address_city, address_state, postal, language, consent_status]) or \
249
  (med_yes_no == "Yes" and not med_list):
250
  return "All fields are required.", gr.State(value=None)
251
  try:
 
253
  "First_Name__c": name_first,
254
  "Last_Name__c": name_last,
255
  "Date_of_Birth__c": dob,
256
+ "Gender__c": Gender,
257
  "Height__c": height,
258
  "Weight__c": weight,
259
  "Marital_Status__c": marital,
260
  "Phone__c": phone,
261
  "Email__c": email,
 
 
262
  "City__c": address_city,
263
  "State__c": address_state,
264
  "Postal_Code__c": postal,
 
473
  name_last = gr.Textbox(label="Last Name", placeholder="Last Name")
474
  with gr.Column():
475
  dob_input = gr.Textbox(label="Date of Birth", placeholder="MM-DD-YYYY")
476
+ Gender_input = gr.Dropdown(label="Gender", choices=["Please Select", "Male", "Female", "Other"], value="Please Select")
477
  with gr.Row():
478
  height_input = gr.Textbox(label="Height (inches)", placeholder="e.g., 65")
479
  weight_input = gr.Textbox(label="Weight (pounds)", placeholder="e.g., 150")