Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
1.7 kB
2
Indexable
Never
class Patient:
    def __init__(self):
        self.name = ""
        self.age = 0
        self.hospital_number = ""

    def input_patient_details(self):
        self.name = input("Enter patient name: ")
        self.age = int(input("Enter patient age: "))
        self.hospital_number = input("Enter hospital number: ")

    def display_patient_details(self):
        print("Patient Name: ", self.name)
        print("Patient Age: ", self.age)
        print("Hospital Number: ", self.hospital_number)


class Inpatient(Patient):
    def __init__(self):
        super().__init__()
        self.department_name = ""
        self.admission_date = ""
        self.room_type = ""

    def input_inpatient_details(self):
        self.input_patient_details()
        self.department_name = input("Enter department name: ")
        self.admission_date = input("Enter admission date (dd/mm/yyyy): ")
        self.room_type = input("Enter room type (S/SP/G): ")

    def display_inpatient_details(self):
        self.display_patient_details()
        print("Department Name: ", self.department_name)
        print("Admission Date: ", self.admission_date)
        print("Room Type: ", self.room_type)


class Billing(Inpatient):
    def __init__(self):
        super().__init__()
        self.discharge_date = ""

    def input_billing_details(self):
        self.input_inpatient_details()
        self.discharge_date = input("Enter discharge date (dd/mm/yyyy): ")

    def display_billing_details(self):
        self.display_inpatient_details()
        print("Discharge Date: ", self.discharge_date)

    def calculate_total_amount(self):
        room_rent = 0
        consultancy_charges = 0
        if self
Leave a Comment