Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

By using all the requirements statement that wrote below, write a c++ program that , design and implement a software that allows a user to

By using all the requirements statement that wrote below, write a c++ program that , design and implement a software that allows a user to register a patient, examine a patient or display all patients present in the queue at any given point of time.

requirements:

1. it should contain 5 source file named as OTPRregister.h , OTPRegister.cpp, patient.h, patient.cpp and mainpart.cpp

2.patient.h , the header file, and patient.cpp should contain the definition of member function of the CLASS patient.

3.OTPRegister.h,as a header file, and OTPRegsiter.cpp should contain the definition of member function of the CLASS OTPRegsiter. and the main.cpp function should contain the main function of C++.

in addition #include should be use in order to implement a queue of pointers of the class patient.The queue of pointer of the class patient must be declared as a member variable of the class OTPRegister as deque q;

4.Information defining a pateint should include the : name, health card number, condition and cervix dilation(0-10cm).

5.It is possible to display all the patients present in the queue. You should output the information present in Patient member variables to standard output in such a way that one line of output contains the data about one patient. The first line should display the information of the first patient (i.e. the patient in front of the queue), the second line should display the information of the second patient i.e. the patient behind the first patient and so on.

6.The condition of the patient should be : LABOUR, UNKNOWN and ADMIT

7.When a patient arrives at the registration desk, the attending nurse uses the software to register the patient by entering patient's name and health card number. For a newly arrived patient, her condition should be UNKNOWN by default. A patient in this condition is assumed to have cervix dilation of 0cm. As a result of registration, the patient gets added to the end of the queue

8.Examining a patient involves removing the first patient from the queue (i.e. the patient at the front of the queue) and performing an appropriate action depending on her condition as explained below. The examination may or may not result in the patient being added back to the end of the queue

9.If a patients condition is UNKNOWN, the patient is examined for cervix dilationby the nurse. The nurse enters the cervix dilation information to the system. a)If the patients cervix dilation is >= 4cm, her condition gets changed to ADMIT, a message is displayed showing the patients information, and finally she should be removed from the queue. b)If the patients cervix dilation is

10.If a patients condition is LABOUR, the patient is examined for cervix dilation by the nurse. The nurse enters the cervix dilation information to the system.a) If the patients cervix dilation is >= 4cm, her condition getschanged to ADMIT, a message is displayed showing the patients information, and finally she should be removed from the queue. b)If the patients cervix dilation is

11.There should be a textual menu interface that should allow the attending nurse at the registration desk to perform one of the operations register,examine, or display. The menu should also support a quit operation that should end the application.

and the output is :

image text in transcribed

[Register Patient] Enter Name: Padma Enter Health Card Number: 333 .. [Registering] There are currently 2 patient (s) in the list Please choose an option: 1. Register Patient 2. Examine Patient 3. Display Patients 4. Quit [Display Patients] Susan 222 1 LABOUR Padma 333 0 UNKNOWN There are currently 2 patient (s) in the list Please choose an option: 1. Register Patient 2. Examine Patient 3. Display Patients 4. Quit [Examine Patient] Name: Susan Health Card Number: 222 Enter Cervix Dilation: 3 .. [Going back to queue] There are currently 2 patient (s) in the list Please choose an option: 1. Register Patient 2. Examine Patient 3. Display Patients 4. Quit [Register Patient] Enter Name: Padma Enter Health Card Number: 333 .. [Registering] There are currently 2 patient (s) in the list Please choose an option: 1. Register Patient 2. Examine Patient 3. Display Patients 4. Quit [Display Patients] Susan 222 1 LABOUR Padma 333 0 UNKNOWN There are currently 2 patient (s) in the list Please choose an option: 1. Register Patient 2. Examine Patient 3. Display Patients 4. Quit [Examine Patient] Name: Susan Health Card Number: 222 Enter Cervix Dilation: 3 .. [Going back to queue] There are currently 2 patient (s) in the list Please choose an option: 1. Register Patient 2. Examine Patient 3. Display Patients 4. Quit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Temporal Databases Research And Practice Lncs 1399

Authors: Opher Etzion ,Sushil Jajodia ,Suryanarayana Sripada

1st Edition

3540645195, 978-3540645191

Students explore these related Databases questions