Question: Please answer the questions as soon as possible . I already done with question 1 . Thank you . Create two global structures named Details

 Please answer the questions as soon as possible . I already

done with question 1 . Thank you . Create two global structures

named Details and Patient. The first structure named Details contains the members:

dateAdmit (use string), illnessType, status (e.g, high risk, medium risk, normal) while

Please answer the questions as soon as possible . I already done with question 1 . Thank you .

Create two global structures named Details and Patient. The first structure named Details contains the members: dateAdmit (use string), illnessType, status (e.g, high risk, medium risk, normal) while the structure Patient contains the members: ID, name, wardNo and the structure Details (nested struct). Write a program that does the following: a. Declare an array of structure of size 4 that can store the information of 4 patients. b. A function that passes the structure as an argument and accepts information about the patient through user input. c. A function that sorts the information about the patient in descending order based on name. d. A function that writes the information about the patient into a text file (*.txt). Sample output: Enter ID of patient 123456 Enter name of patient.: Muhd. Aliff Rusydi Enter ward no of patient. 25A Enter date of admission 060122 Enter type of illness. Stroke Enter status: High isk Enter ID of patient345678 Enter name of patient. Siti Roslinda Saad Enden ward no of patient: 44B Enden date of admission: 311221 Enter type of 1.11ness Covid-19 Enter status: Medium nisk Enter ID of patient 411290 Enden name of patient Abu Khuzair Ali Enter ward no of patient: 210 Enter date of admission: 030122 Enter type of illness Diabetes Enter status: Medium risk Enter ID of patient. 561035 Enter name of patient Fateema Al-Walid Enter ward no of patient: 53B Enten date of admission: 261221 Enter type of illness. Athma Enter status: Normal ID Patient Name Ward No Date Admit Illness Status ---- 345678 123456 561035 411290 Siti Roslinda Saad Muhd. Aliff Rusydi Fateema Al-Walid Abu Khuzair Ali 44B 25A 53B 210 311221 0 60122 261221 030122 Covid-19 Stroke Athma Diabetes Medium risk High risk Normal Medium risk #include COUT AWN 3 struct Details { 4 string dateAdmit; string illnesType; 6 string status; 7 8 9 struct Patient { 10 int ID_num; 11 string name; 12 string ward_no; 13 Details detals; 14 15 16 17 Patient pati; 18 pati.ID_num= ptiNo; 19 pati.name= ptinamee; 20 pati.ward_no= ptlward; 21 pati. detals.dateAdmit= ptidate; 22 pati. detals.illnessType= ptlill; 23 pati.detals.status= ptistat; 24 25 26 Patient pat2; 27 pat2.ID_num= pt2No; 28 pat2.name= pt2namee; 29 pat2.ward_no= pt2ward; 30 pat2.detals.dateAdmit= pt2date; 31 pat2.detals. illnessType= pt2ill; 32 pat2.detals.status= pt2stat; 33 34 Patient pat 3; 35 pat3.ID_num= pt3No 36 pats.name= pt3namee; 37 pat3.ward_no= pt3ward; 38 pat3.detals.dateAdmit= pt3date; 39 pat3.detals. illnessType= pt3ill; 40 pat3.detals.status= pt3stat; 1 41 42 43 44 45 46 47 48 Patient pat4; pat4.ID_num= pt4No; pat4.name= pt4namee, pat4.ward_no- pt4ward; pat4.detals.dateAdmit- pt4date; pat4.detals.illnessType- pt4ili; pat4.detals.status- pt4stat

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!