Spaces:
Running
Running
neerajkalyank
commited on
Commit
•
f8e4f5e
1
Parent(s):
494486d
Create billing.py
Browse files- billing.py +8 -0
billing.py
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
def fetch_billing(patient_id, data):
|
2 |
+
if patient_id not in data:
|
3 |
+
return "Invalid Patient ID. Please check the ID."
|
4 |
+
|
5 |
+
patient_data = data[patient_id]
|
6 |
+
test_list = ', '.join(patient_data["tests"])
|
7 |
+
total_cost = patient_data["total_cost"]
|
8 |
+
return f"Patient: {patient_data['name']}\nTests: {test_list}\nTotal Bill: {total_cost}"
|