Spaces:
Sleeping
Sleeping
def fetch_billing(patient_id, data): | |
if patient_id not in data: | |
return "Invalid Patient ID. Please check the ID." | |
patient_data = data[patient_id] | |
test_list = ', '.join(patient_data["tests"]) | |
total_cost = patient_data["total_cost"] | |
return f"Patient: {patient_data['name']}\nTests: {test_list}\nTotal Bill: ₹{total_cost}" | |