Spaces:
Sleeping
Sleeping
neerajkalyank
commited on
Update billing.py
Browse files- billing.py +3 -3
billing.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
from test_selection import TEST_PRICES
|
2 |
|
3 |
def fetch_billing(patient_id, data):
|
4 |
if patient_id not in data:
|
@@ -7,14 +7,13 @@ def fetch_billing(patient_id, data):
|
|
7 |
patient_data = data[patient_id]
|
8 |
tests_with_prices = []
|
9 |
|
10 |
-
# Loop through the tests and get their prices from TEST_PRICES
|
11 |
for category, tests in TEST_PRICES.items():
|
12 |
for test in patient_data["tests"]:
|
13 |
if test in tests:
|
14 |
price = tests[test]
|
15 |
tests_with_prices.append(f"- {test}: ₹{price}")
|
16 |
|
17 |
-
test_list = "\n".join(tests_with_prices)
|
18 |
total_cost = patient_data["total_cost"]
|
19 |
|
20 |
billing_info = (
|
@@ -25,3 +24,4 @@ def fetch_billing(patient_id, data):
|
|
25 |
f"Total Bill: ₹{total_cost}"
|
26 |
)
|
27 |
return billing_info
|
|
|
|
1 |
+
from test_selection import TEST_PRICES
|
2 |
|
3 |
def fetch_billing(patient_id, data):
|
4 |
if patient_id not in data:
|
|
|
7 |
patient_data = data[patient_id]
|
8 |
tests_with_prices = []
|
9 |
|
|
|
10 |
for category, tests in TEST_PRICES.items():
|
11 |
for test in patient_data["tests"]:
|
12 |
if test in tests:
|
13 |
price = tests[test]
|
14 |
tests_with_prices.append(f"- {test}: ₹{price}")
|
15 |
|
16 |
+
test_list = "\n".join(tests_with_prices)
|
17 |
total_cost = patient_data["total_cost"]
|
18 |
|
19 |
billing_info = (
|
|
|
24 |
f"Total Bill: ₹{total_cost}"
|
25 |
)
|
26 |
return billing_info
|
27 |
+
|