Knowee
Questions
Features
Study Tools

A hospital wants to create a database regarding its indoor patients. The information to store includes(a) Name of patient(b)Date of admission(c)Disease(d)Date of dischargeUse the Date class created in previous program to store the date. The patient class comprises of The memberfunctions to enter the information and display the list of all patients in database using oops in c++

Question

A hospital wants to create a database regarding its indoor patients. The information to store includes(a) Name of patient(b)Date of admission(c)Disease(d)Date of dischargeUse the Date class created in previous program to store the date. The patient class comprises of The memberfunctions to enter the information and display the list of all patients in database using oops in c++

🧐 Not the exact question you are looking for?Go ask a question

Solution

Sure, here is a simple implementation of your request in C++:

#include<iostream>
#include<string>

using namespace std;

class Date {
public:
    int day, month, year;

    void enterDate() {
        cout << "Enter day: ";
        cin >> day;
        cout << "Enter month: ";
        cin >> month;
        cout << "Enter year: ";
        cin >> year;
    }

    void displayDate() {
        cout << day << "/" << month << "/" << year << endl;
    }
};

class Patient {
public:
    string name;
    Date dateOfAdmission;
    string disease;
    Date dateOfDischarge;

    void enterInfo() {
        cout << "Enter patient name: ";
        cin >> name;
        cout << "Enter date of admission: " << endl;
        dateOfAdmission.enterDate();
        cout << "Enter disease: ";
        cin >> disease;
        cout << "Enter date of discharge: " << endl;
        dateOfDischarge.enterDate();
    }

    void displayInfo() {
        cout << "Patient name: " << name << endl;
        cout << "Date of admission: ";
        dateOfAdmission.displayDate();
        cout << "Disease: " << disease << endl;
        cout << "Date of discharge: ";
        dateOfDischarge.displayDate();
    }
};

int main() {
    Patient patient;
    patient.enterInfo();
    patient.displayInfo();

    return 0;
}

This program creates two classes: Date and Patient. The Date class is used to store and display dates. The Patient class uses the Date class to store the dates of admission and discharge, and also stores the patient's name and disease. The main function creates a Patient object, asks the user to enter the patient's information, and then displays that information.

This problem has been solved

Similar Questions

Give the definition of four classes, Person, Doctor, Patient and Billing, whose objects are records for a clinic. Class Doctor will be derived from the class Person. A doctor have it’s specialty and  feesPatient will be derived from the class Person. A Patient record no_of_days_admitted and a Doctor object.A Billing object will contain a Patient object, Be sure your classes have a reasonable complement of constructors.First write a driver program to test all your member functions, and  creates at least two patients, at least two doctors, and at least two Billing recordsAt the time of Billing the Patient’s Doctor  name and Billing object’s doctor name equality should be checked.Total bill generated will be no of days the patient admitted * doctor's fees.

The hospital administration needs to track patient discharge details, including the discharge date. Write a query to retrieve the discharge details of patients, including patient ID, name, admission date, discharge date, and the assigned doctor.Table details are given below:

Thank you for your interest in our job opening. As a next step, we are expecting you to complete a short assignment. Kindly find the assignment details [PLEASE SUBMIT THE GITHUB REPOSITORY LINK , There should be proper readme to setup and run the software] Requirements : • Creation of an application to manage patients in a hospital • The hospital administrator has to add, remove, update and list the patients in the hospital . For example if a patient is admitted , the details need to be added. • If the patient’s status to covid negative status to be updated • If a patient is discharged ,the patient needs to be deleted . • If the administrator wants to see the status of patients s/he should be able to see the same . Expectation • Working application . • Web interface to input data • Data should be stored in database • Well documented code with readme • Github link of the working application . • The repo should have proper readme so that we can execute the same. • We expect the application to RESTFUL and implement CRUD operations. • You can choose Java/GOLANG for backend and javascript for front end.

develop ''Statement of Problem'' page based on Empirical Study on Application of Data Mining Techniques in Medical Records System (A Case Study of University College Hospital)

A class student has three data members: name, roll, marks of 5 subjects and member functions to assign streamson the basis of the table given belowStreamAverage markscomputer science96% and more91%-95%86% 90%electronicsmechanical81% 85%76% 80%electricalchemical71% 75%civilDeclare the class student and define the member functions using oops in c++

1/2

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.