-
Notifications
You must be signed in to change notification settings - Fork 0
/
Patients List by Omar Mehmood.cpp
147 lines (125 loc) · 4.27 KB
/
Patients List by Omar Mehmood.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
//Omar Mehmood 6/3/2021
#include <iostream>
#include <fstream>
using namespace std;
class patient
{
public:
string name;
string visitReason;
int age;
string gender;
int weight;
string address;
string allergies;
string surgery;
string insurance;
};
class orthrodontics
{
public:
string name;
string bracestype;
string colorofbraces;
int age;
string braces;
string bracesinsurance;
void askbraces() // Switched the askbraces function from class patient to class orthrodontics
{
string response;
response = "yes";
cout << "Do you have an appointment for your braces: ";
cin >> braces;
if (braces == response)
{
cout << "The Orthodontists assitant will be with you shortly";
}
if (braces != response)
{
cout << "Please press 1 to register as a new patient, or press 3 to register for braces or press 6 to exit!";
}
};
};
int choice , count = 0, patientcount = 0, bracescount, orthropatientCount = 0, othropatientNumber = 0;
string a;
patient newPatient[1000];
orthrodontics newOthroPatient[1000], brace;
int main ()
{
cout << "Welcome to New York Dental Care and Orthrodontics!";
do{
cout << "\n\nNew York Dental Care Options\n--------------------------------"
<< "\n1) Register new Patient\n\nOrthrodontic Options"
<< "\n--------------------------------\n2) Register new Orthodontic Patient"
<< "\n3) Current Braces Appointment"
<< "\n\nADMIN\n--------------------------------\n4) Print out current patients registered at facility\n5) Print out current registered Orthrodontic Patient\n"
<< "\nEnd Program\n--------------------------------\n6) Quit\n\nSELECTION: ";
cin >> choice;
if(choice == 1) //registers a new patient for New York Dental Care
{
count++;
cout << "Age: ";
cin >> newPatient[count].age;
cout << "Weight: ";
cin >> newPatient[count].weight;
cin.ignore();
cout << "What is your name: ";
getline (cin, newPatient[count].name);
cout << "Visit reason: ";
getline (cin, newPatient[count].visitReason);
cout << "Gender: ";
getline (cin, newPatient[count].gender);
cout << "Address: ";
getline (cin, newPatient[count].address);
cout << "Do you have any allergies towards any medicines (if so please state): ";
getline (cin, newPatient[count].allergies);
cout << "What type of insurance do you have: ";
getline (cin, newPatient[count].insurance);
}
if (choice == 2) //registers for Orthrodontics
{
orthropatientCount++;
cout << "Age: ";
cin >> newOthroPatient[orthropatientCount].age;
cin.ignore();
cout << "Name: ";
getline (cin, newOthroPatient[orthropatientCount].name);
cout << "Type of Braces(Metal, Plastic, Invisalign): ";
getline (cin, newOthroPatient[orthropatientCount].bracestype);
cout << "Color of braces: ";
getline (cin, newOthroPatient[orthropatientCount].colorofbraces);
cout << "What type of insurance do you have: ";
getline (cin, newOthroPatient[orthropatientCount].bracesinsurance);
}
if (choice == 3) brace.askbraces(); //asks user for current appointment
//ADMIN OPTIONS
if (choice == 4) //shows patient records for New York Dental Care
{
patientcount++;
for (int i = 1 ; i <= patientcount ; i++)
cout << "\n\nPatient " << i << "\n------------"
<< "\nName: " << newPatient[i].name
<< "\nVisit reason: " << newPatient[i].visitReason
<< "\nAge: " << newPatient[i].age
<< "\nGender: " << newPatient[i].gender
<< "\nWeight: " << newPatient[i].weight
<< "\nAddress: " << newPatient[i].address
<< "\nAllergies towards any medicines: " << newPatient[i].allergies
<< "\nInsurance: " << newPatient[i].insurance;
cout << "\n\n";
}
if (choice == 5) //shows Othrodontics patient records
{
othropatientNumber++;
for (int i = 1; i <= othropatientNumber ; i++)
cout << "\n\nOrthrodontic Patient " << i << "\n---------------------"
<< "\nName: " << newOthroPatient[i].name
<< "\nAge: " << newOthroPatient[i].age
<< "\nType of Braces: " << newOthroPatient[i].bracestype
<< "\nColor of braces: " << newOthroPatient[i].colorofbraces
<< "\nInsurance: " << newOthroPatient[i].bracesinsurance;
}
}while (choice != 6);
cout << "Thank you for registering at New York Dental Care and Orthrodontics";
return 0;
}