Spaces:
Sleeping
Sleeping
neerajkalyank
commited on
Commit
•
a1bd855
1
Parent(s):
85bc4be
Update app.py
Browse files
app.py
CHANGED
@@ -19,12 +19,23 @@ def save_data(data):
|
|
19 |
|
20 |
# Patient Registration Tab
|
21 |
def registration_interface(name, father_name, age, phone, address, pincode):
|
22 |
-
|
|
|
23 |
data = load_data()
|
24 |
-
data[patient_id] = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
save_data(data)
|
26 |
return f"Patient Registered. Patient ID: {patient_id}"
|
27 |
|
|
|
28 |
# Tests Selection Tab
|
29 |
def test_interface(categories):
|
30 |
available_tests = get_tests_by_category(categories)
|
|
|
19 |
|
20 |
# Patient Registration Tab
|
21 |
def registration_interface(name, father_name, age, phone, address, pincode):
|
22 |
+
today = datetime.datetime.now()
|
23 |
+
patient_id = f"{today.year}{today.month:02d}{today.day:02d}{str(phone)[-5:]}"
|
24 |
data = load_data()
|
25 |
+
data[patient_id] = {
|
26 |
+
"name": name,
|
27 |
+
"father_name": father_name,
|
28 |
+
"age": age,
|
29 |
+
"phone": phone,
|
30 |
+
"address": address,
|
31 |
+
"pincode": pincode,
|
32 |
+
"tests": [],
|
33 |
+
"total_cost": 0
|
34 |
+
}
|
35 |
save_data(data)
|
36 |
return f"Patient Registered. Patient ID: {patient_id}"
|
37 |
|
38 |
+
|
39 |
# Tests Selection Tab
|
40 |
def test_interface(categories):
|
41 |
available_tests = get_tests_by_category(categories)
|