Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Clinic Management System: Efficient Patient and HMO Service Management, Study notes of Computer Programming

The clinic management system is a comprehensive software solution designed to streamline the operations of a healthcare clinic. It provides a robust platform for managing patient information, hmo (health maintenance organization) plan details, and the selection and application of hmo services. The system allows for the addition of new patients, retrieval of patient details, and the selection and application of hmo services based on the patient's plan and available balance. The system also calculates the discounted price for the selected service, updates the patient's hmo balance, and displays the remaining balance. The key features and functionalities of the clinic management system, making it a valuable tool for healthcare providers to enhance their patient care and administrative processes.

Typology: Study notes

2023/2024

Uploaded on 05/25/2024

jeongyeon-yoo-2
jeongyeon-yoo-2 🇵🇭

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
class ClinicManagementSystem:
HMO_NAMES = ["HMOPlanWCare", "HMOPlanXCare", "HMOPlanYCare", "HMOPlanZCare",
"HMOPlanACare"]
HMO_BALANCES = {
"HMOPlanWCare": 5000.0,
"HMOPlanXCare": 5000.0,
"HMOPlanYCare": 6000.0,
"HMOPlanZCare": 10000.0,
"HMOPlanACare": 15000.0
}
patients = {}
hmoServices = {
"HMOPlanWCare": {"Dental Cleaning": 1000.0, "Permanent Filling": 1200.0, "Tooth Extraction":
1000.0},
"HMOPlanXCare": {"X-ray": 2000.0, "MRI": 10000.0, "CT-Scan": 8000.0},
"HMOPlanYCare": {"Ear Infection Treatment": 2000.0, "Nasal Endoscopy": 4000.0, "Throat
Endoscopy": 4000.0},
"HMOPlanZCare": {"Prescription Eyeglasses": 5000.0, "Laser Treatment Glaucoma": 20000.0,
"Optical Coherence Tomography": 4500.0},
"HMOPlanACare": {"Liver Biopsy": 25000.0, "Colonoscopy": 20000.0, "Hemorrhoid Banding":
10000.0}
}
def add_patient(self):
id = str(ClinicManagementSystem.next_patient_id)
ClinicManagementSystem.next_patient_id += 1
print(f"Patient ID: {id}")
name = input("Enter Patient Name: ")
age = int(input("Enter Patient Age: "))
sex = input("Enter Patient Sex (M/F): ")
pf3
pf4
pf5

Partial preview of the text

Download Clinic Management System: Efficient Patient and HMO Service Management and more Study notes Computer Programming in PDF only on Docsity!

class ClinicManagementSystem: HMO_NAMES = ["HMOPlanWCare", "HMOPlanXCare", "HMOPlanYCare", "HMOPlanZCare", "HMOPlanACare"] HMO_BALANCES = { "HMOPlanWCare": 5000.0, "HMOPlanXCare": 5000.0, "HMOPlanYCare": 6000.0, "HMOPlanZCare": 10000.0, "HMOPlanACare": 15000. } patients = {} hmoServices = { "HMOPlanWCare": {"Dental Cleaning": 1000.0, "Permanent Filling": 1200.0, "Tooth Extraction": 1000.0}, "HMOPlanXCare": {"X-ray": 2000.0, "MRI": 10000.0, "CT-Scan": 8000.0}, "HMOPlanYCare": {"Ear Infection Treatment": 2000.0, "Nasal Endoscopy": 4000.0, "Throat Endoscopy": 4000.0}, "HMOPlanZCare": {"Prescription Eyeglasses": 5000.0, "Laser Treatment Glaucoma": 20000.0, "Optical Coherence Tomography": 4500.0}, "HMOPlanACare": {"Liver Biopsy": 25000.0, "Colonoscopy": 20000.0, "Hemorrhoid Banding": 10000.0} } def add_patient(self): id = str(ClinicManagementSystem.next_patient_id) ClinicManagementSystem.next_patient_id += 1 print(f"Patient ID: {id}") name = input("Enter Patient Name: ") age = int(input("Enter Patient Age: ")) sex = input("Enter Patient Sex (M/F): ")

marital_status = input("Enter Marital Status: ") hmo_dependent = input("Enter HMO Dependent (Y/N): ") hmo_relationship = input("Enter HMO Dependent Relationship: ") if hmo_dependent.upper() == 'Y' else 'N/A' print("Select HMO Plan:") for i, hmo_name in enumerate(ClinicManagementSystem.HMO_NAMES, 1): print(f"{i}. {hmo_name}") hmo_choice = int(input("Input your HMO Plan Care: ")) selected_hmo_name = ClinicManagementSystem.HMO_NAMES[hmo_choice - 1] hmo_balance = ClinicManagementSystem.HMO_BALANCES[selected_hmo_name] patient = { "id": id, "name": name, "age": age, "sex": sex, "marital_status": marital_status, "hmo_dependent": hmo_dependent, "hmo_relationship": hmo_relationship, "hmo_name": selected_hmo_name, "hmo_balance": hmo_balance } ClinicManagementSystem.patients[id] = patient print("Patient added successfully!") next_patient_id = 1 def init(self): self.run()

print(f"Patient ID: {patient['id']}\nName: {patient['name']}\nAge: {patient['age']}\nSex: {patient['sex']}\n" f"Marital Status: {patient['marital_status']}\nHMO Dependent: {patient['hmo_dependent']}\n" f"HMO Dependent Relationship: {patient['hmo_relationship']}\nHMO Name: {patient['hmo_name']}\n" f"HMO Balance: PHP{patient['hmo_balance']}") print("Available HMO Services and Prices:") services = ClinicManagementSystem.hmoServices[patient['hmo_name']] for i, (service, price) in enumerate(services.items(), 1): print(f"{i}. {service}: PHP{price}") else: print("Patient not found.") def selection_details(self): id = input("Enter Patient ID: ") patient = ClinicManagementSystem.patients.get(id) if patient: print("Select a Service to apply Health Insurance Coverage:") services = ClinicManagementSystem.hmoServices[patient['hmo_name']] service_names = list(services.keys()) for i, (service, price) in enumerate(services.items(), 1): print(f"{i}. {service}: PHP{price}") service_choice = int(input("Input your Service: ")) if 1 <= service_choice <= len(service_names): service_selected = service_names[service_choice - 1] service_price = services[service_selected] discount = self.get_discount(patient['hmo_name']) discounted_price = service_price * (1 - discount)

if discounted_price > patient['hmo_balance']: print("Error: Service price exceeds the Limit of HMO Balance.") else: patient['hmo_balance'] -= discounted_price print("HMO Balance updated successfully!") print(f"Discount applied: {round(discount * 100)}%") print(f"Service Price after HMO applied: PHP{discounted_price}") print(f"Remaining HMO Balance: PHP{patient['hmo_balance']}") else: print("Service not found.") else: print("Patient not found.") @staticmethod def get_discount(hmo_name): discounts = { "HMOPlanWCare": 0.05, "HMOPlanXCare": 0.05, "HMOPlanYCare": 0.06, "HMOPlanZCare": 0.10, "HMOPlanACare": 0. } return discounts.get(hmo_name, 0.0) if name == "main": ClinicManagementSystem()