Write a program with the following features for a hospital management system: - There should be 4 options with sub-options in the main menu: o Exit o Show All Records  Return to Main Menu  Delete Record  Update Record o Search Patient  Return to Main Menu  Search by ID  Search by Name  Search by Surname o New Patient - Sub-options for the particular option must appear when the corresponding option is selected from the main menu. - Patients must be added to the system with Name, Surname, Birthday, E-mail and Department information. The ID number is assigned by the program automatically as one more than the last ID number in the file. - If there exists more than one patient with the same name/surname, search by name/surname process must put the information of each patient with the same name/surname, not just the first one it has found. - Patient information must be kept in a text file. - If any of these processes fail, an error notification must be returned for that specific process. A number of output examples of the program you need to write are given in the figures below.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

IT SHOULD BE DONE BY C LANGUAGE PLEASE NOT JAVA OR ELSE.

Write a program with the following features for a hospital management system:

- There should be 4 options with sub-options in the main menu:

o Exit

o Show All Records

Return to Main Menu

Delete Record

Update Record

o Search Patient

Return to Main Menu

Search by ID

Search by Name

Search by Surname

o New Patient

- Sub-options for the particular option must appear when the corresponding option is

selected from the main menu.

- Patients must be added to the system with Name, Surname, Birthday, E-mail and

Department information. The ID number is assigned by the program automatically as

one more than the last ID number in the file.

- If there exists more than one patient with the same name/surname, search by

name/surname process must put the information of each patient with the same

name/surname, not just the first one it has found.

- Patient information must be kept in a text file.

- If any of these processes fail, an error notification must be returned for that specific

process.

A number of output examples of the program you need to write are given in the figures below.

Welcome to the Hospital Management System
e: Exit | 1: Show All Records | 2: Search Patient | 3: New Patient
Please select an option: 1
PATIENT RECORDS:
1
Dincel
dincele@hotmail.com.tr
Immunology
Emre
14/05/1989
3
Cansu
Kaya
31/08/1994
deneme01@gmail.com
Pathology
4
Ahmet
Gungor
02/12/1972
deneme03@deneme.com
Cardiology
15
Mahmut
Karadag
30/03/1987
test12345@gmail.com
Cardiology
6
Кaan
Каya
11/02/1983
kaya@deneme.com
Microbiology
e: Return to Main Menu | 1: Delete Record | 2: Update Record
Please select an option:
Figure 1: "Show All Records" option is selected.
30/03/1987
test12345@gmail.com
Mahmut
Karadag
Cardiology
kaya@deneme.com
Microbiology
Каan
Kaya
11/02/1983
Ali
Bitigen
21/12/1968
deneme@deneme.com
Internal_Medicine
e: Return to Main Menu | 1: Delete Record | 2: Update Record
Please select an option: 1
Patient Id: 7
Patient record is deleted...
9: Exit | 1: Show All Records | 2: Search Patient | 3: New Patient
Please select an option: 1
PATIENT RECORDS:
1
Emre
Dincel
14/05/1989
dinceleghotmail.com.tr
Immunology
Cansu
Кaya
31/08/1994
denemee1@gmai1.com
Pathology
4
Ahmet
Gungor
02/12/1972
denemee3edeneme.com
Cardiology
Mahmut
Karadag
30/03/1987
test12345@gmail.com
Cardiology
6
Кaan
Kaya
11/02/1983
kaya@deneme.com
Microbiology
e: Return to Main Menu | 1: Delete Record | 2: Update Record
Please select an option: 0
9: Exit | 1: Show All Records | 2: Search Patient | 3: New Patient
Please select an option:
Figure 2: Deleting a patient's record.
Transcribed Image Text:Welcome to the Hospital Management System e: Exit | 1: Show All Records | 2: Search Patient | 3: New Patient Please select an option: 1 PATIENT RECORDS: 1 Dincel dincele@hotmail.com.tr Immunology Emre 14/05/1989 3 Cansu Kaya 31/08/1994 deneme01@gmail.com Pathology 4 Ahmet Gungor 02/12/1972 deneme03@deneme.com Cardiology 15 Mahmut Karadag 30/03/1987 test12345@gmail.com Cardiology 6 Кaan Каya 11/02/1983 kaya@deneme.com Microbiology e: Return to Main Menu | 1: Delete Record | 2: Update Record Please select an option: Figure 1: "Show All Records" option is selected. 30/03/1987 test12345@gmail.com Mahmut Karadag Cardiology kaya@deneme.com Microbiology Каan Kaya 11/02/1983 Ali Bitigen 21/12/1968 deneme@deneme.com Internal_Medicine e: Return to Main Menu | 1: Delete Record | 2: Update Record Please select an option: 1 Patient Id: 7 Patient record is deleted... 9: Exit | 1: Show All Records | 2: Search Patient | 3: New Patient Please select an option: 1 PATIENT RECORDS: 1 Emre Dincel 14/05/1989 dinceleghotmail.com.tr Immunology Cansu Кaya 31/08/1994 denemee1@gmai1.com Pathology 4 Ahmet Gungor 02/12/1972 denemee3edeneme.com Cardiology Mahmut Karadag 30/03/1987 test12345@gmail.com Cardiology 6 Кaan Kaya 11/02/1983 kaya@deneme.com Microbiology e: Return to Main Menu | 1: Delete Record | 2: Update Record Please select an option: 0 9: Exit | 1: Show All Records | 2: Search Patient | 3: New Patient Please select an option: Figure 2: Deleting a patient's record.
Welcome to the Hospital Management System
e: Exit | 1: Show All Records | 2: Search Patient | 3: New Patient
Please select an option: 1
PATIENT RECORDS:
1
Dincel
dincele@hotmail.com.tr
Immunology
Emre
14/05/1989
3
Cansu
Kaya
31/08/1994
deneme01@gmail.com
Pathology
4
Ahmet
Gungor
02/12/1972
deneme03@deneme.com
Cardiology
15
Mahmut
Karadag
30/03/1987
test12345@gmail.com
Cardiology
6
Кaan
Каya
11/02/1983
kaya@deneme.com
Microbiology
e: Return to Main Menu | 1: Delete Record | 2: Update Record
Please select an option:
Figure 1: "Show All Records" option is selected.
30/03/1987
test12345@gmail.com
Mahmut
Karadag
Cardiology
kaya@deneme.com
Microbiology
Каan
Kaya
11/02/1983
Ali
Bitigen
21/12/1968
deneme@deneme.com
Internal_Medicine
e: Return to Main Menu | 1: Delete Record | 2: Update Record
Please select an option: 1
Patient Id: 7
Patient record is deleted...
9: Exit | 1: Show All Records | 2: Search Patient | 3: New Patient
Please select an option: 1
PATIENT RECORDS:
1
Emre
Dincel
14/05/1989
dinceleghotmail.com.tr
Immunology
Cansu
Кaya
31/08/1994
denemee1@gmai1.com
Pathology
4
Ahmet
Gungor
02/12/1972
denemee3edeneme.com
Cardiology
Mahmut
Karadag
30/03/1987
test12345@gmail.com
Cardiology
6
Кaan
Kaya
11/02/1983
kaya@deneme.com
Microbiology
e: Return to Main Menu | 1: Delete Record | 2: Update Record
Please select an option: 0
9: Exit | 1: Show All Records | 2: Search Patient | 3: New Patient
Please select an option:
Figure 2: Deleting a patient's record.
Transcribed Image Text:Welcome to the Hospital Management System e: Exit | 1: Show All Records | 2: Search Patient | 3: New Patient Please select an option: 1 PATIENT RECORDS: 1 Dincel dincele@hotmail.com.tr Immunology Emre 14/05/1989 3 Cansu Kaya 31/08/1994 deneme01@gmail.com Pathology 4 Ahmet Gungor 02/12/1972 deneme03@deneme.com Cardiology 15 Mahmut Karadag 30/03/1987 test12345@gmail.com Cardiology 6 Кaan Каya 11/02/1983 kaya@deneme.com Microbiology e: Return to Main Menu | 1: Delete Record | 2: Update Record Please select an option: Figure 1: "Show All Records" option is selected. 30/03/1987 test12345@gmail.com Mahmut Karadag Cardiology kaya@deneme.com Microbiology Каan Kaya 11/02/1983 Ali Bitigen 21/12/1968 deneme@deneme.com Internal_Medicine e: Return to Main Menu | 1: Delete Record | 2: Update Record Please select an option: 1 Patient Id: 7 Patient record is deleted... 9: Exit | 1: Show All Records | 2: Search Patient | 3: New Patient Please select an option: 1 PATIENT RECORDS: 1 Emre Dincel 14/05/1989 dinceleghotmail.com.tr Immunology Cansu Кaya 31/08/1994 denemee1@gmai1.com Pathology 4 Ahmet Gungor 02/12/1972 denemee3edeneme.com Cardiology Mahmut Karadag 30/03/1987 test12345@gmail.com Cardiology 6 Кaan Kaya 11/02/1983 kaya@deneme.com Microbiology e: Return to Main Menu | 1: Delete Record | 2: Update Record Please select an option: 0 9: Exit | 1: Show All Records | 2: Search Patient | 3: New Patient Please select an option: Figure 2: Deleting a patient's record.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Structure chart
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education