Spaces:
Sleeping
Sleeping
neerajkalyank
commited on
Commit
•
f633e04
1
Parent(s):
932ac06
Update test_selection.py
Browse files- test_selection.py +2 -3
test_selection.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
# Define costs for tests in each category
|
2 |
TEST_PRICES = {
|
3 |
"Haematology": {
|
4 |
"Haemoglobin estimation": 50,
|
@@ -43,7 +42,7 @@ TEST_PRICES = {
|
|
43 |
|
44 |
def get_tests_by_category(categories):
|
45 |
if not categories:
|
46 |
-
return []
|
47 |
|
48 |
available_tests = []
|
49 |
for category in categories:
|
@@ -59,7 +58,7 @@ def select_tests(patient_id, selected_tests, data):
|
|
59 |
total_cost = 0
|
60 |
tests_selected = []
|
61 |
for item in selected_tests:
|
62 |
-
test_name = item.split(" - ")[0]
|
63 |
for category, tests in TEST_PRICES.items():
|
64 |
if test_name in tests:
|
65 |
total_cost += tests[test_name]
|
|
|
|
|
1 |
TEST_PRICES = {
|
2 |
"Haematology": {
|
3 |
"Haemoglobin estimation": 50,
|
|
|
42 |
|
43 |
def get_tests_by_category(categories):
|
44 |
if not categories:
|
45 |
+
return []
|
46 |
|
47 |
available_tests = []
|
48 |
for category in categories:
|
|
|
58 |
total_cost = 0
|
59 |
tests_selected = []
|
60 |
for item in selected_tests:
|
61 |
+
test_name = item.split(" - ")[0]
|
62 |
for category, tests in TEST_PRICES.items():
|
63 |
if test_name in tests:
|
64 |
total_cost += tests[test_name]
|