neerajkalyank commited on
Commit
b6c1aa5
1 Parent(s): 0306539

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -6
app.py CHANGED
@@ -47,14 +47,18 @@ with gr.Blocks() as app:
47
  gr.Markdown("# Sathkrutha LIMS - Patient Management and Billing App")
48
 
49
  with gr.Tab("Patient Registration"):
50
- name = gr.Textbox(label="Name")
51
- father_name = gr.Textbox(label="Father/Husband Name")
52
- age = gr.Number(label="Age")
53
- phone = gr.Textbox(label="Phone Number")
54
- address = gr.Textbox(label="Address")
55
- pincode = gr.Textbox(label="Pincode")
 
 
 
56
  register_button = gr.Button("Register Patient")
57
  registration_output = gr.Textbox(label="Registration Output")
 
58
  register_button.click(registration_interface, [name, father_name, age, phone, address, pincode], registration_output)
59
 
60
  with gr.Tab("Tests"):
@@ -76,4 +80,23 @@ with gr.Blocks() as app:
76
  billing_output = gr.Textbox(label="Billing Information")
77
  fetch_button.click(billing_interface, [patient_id_bill], billing_output)
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  app.launch()
 
47
  gr.Markdown("# Sathkrutha LIMS - Patient Management and Billing App")
48
 
49
  with gr.Tab("Patient Registration"):
50
+ with gr.Row():
51
+ name = gr.Textbox(label="Patient Name", placeholder="Enter patient name", max_chars=50, elem_id="name_field", lines=1)
52
+ father_name = gr.Textbox(label="Father/Husband Name", placeholder="Enter father or husband name", max_chars=50, elem_id="father_name_field", lines=1)
53
+ with gr.Row():
54
+ age = gr.Number(label="Age", value=None, minimum=0, maximum=99, elem_id="age_field", precision=0)
55
+ phone = gr.Number(label="Phone Number", value=None, elem_id="phone_field", precision=0)
56
+ with gr.Row():
57
+ address = gr.Textbox(label="Address", placeholder="Enter address", lines=2)
58
+ pincode = gr.Number(label="Pincode", value=None, elem_id="pincode_field", precision=0)
59
  register_button = gr.Button("Register Patient")
60
  registration_output = gr.Textbox(label="Registration Output")
61
+
62
  register_button.click(registration_interface, [name, father_name, age, phone, address, pincode], registration_output)
63
 
64
  with gr.Tab("Tests"):
 
80
  billing_output = gr.Textbox(label="Billing Information")
81
  fetch_button.click(billing_interface, [patient_id_bill], billing_output)
82
 
83
+ # Custom CSS to adjust field sizes
84
+ app.css = """
85
+ #name_field, #father_name_field {
86
+ max-width: 200px;
87
+ }
88
+
89
+ #age_field {
90
+ max-width: 80px;
91
+ }
92
+
93
+ #phone_field {
94
+ max-width: 150px;
95
+ }
96
+
97
+ #pincode_field {
98
+ max-width: 100px;
99
+ }
100
+ """
101
+
102
  app.launch()