File size: 351 Bytes
f8e4f5e
 
 
 
 
 
 
56185fb
1
2
3
4
5
6
7
8
9
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}"