MM
MM
#include<conio.h>
#include<string.h>
#include<stdlib.h>
#include<stdio.h>
struct doctor1
{
int id;
char name[20],Q[20],age[20],exp[20],city[20],special[20];
};
struct patient1
{
int id1;
char name[20],age[20],city[20],dis[20],room[20],sym[20],con[20],date[20],charg[20],bill[20];
};
void doctor_detail()
{
int i;
if(docid==0)
{
cout<<” \n\n\n OOPS!!!! “<<“\n\n”;
cout<<“Note:- No Record To Display Plz Go Back And Enter Some Entries…… “<<“\n”;
}
else{
cout<<“********************************************************************************”<<“\n”;
cout<<“\t \t \t Details Of All The Doctors In The Hospital \n”;
cout<<“********************************************************************************”<<“\n \n”;
for(i=0;i<docid;i++)
{
cout<<arr[i].id<<“\t \t”<<arr[i].special<<“\t \t \t”<<arr[i].Q<<“\t \t \t”<<arr[i].age<<“\n”;
}
cout<<” \n Press Any Button To choose another Option…. “;
}
getch();
}
void tot_no_of_doc()
{
system(“cls”);
int i=counter;
cout<<“Total Doctor’s in Hospital : “<<i<<“\n”;
cout<<” \n Press Any Button To choose another Option…. “;
getch();
}
};
getch();
}
else{
cout<<” \n\n No such ID in database “<<endl;
cout<<” \n Press Any KEY To choose another Option…. “;
}
getch();
int main()
{
system(“color B0”);
if(ch1==1)
{
xyz2:
system(“cls”);
cout<<“\n\n”;
cout<<” 1. Enter into Doctor’s DataBase “<<endl;
cout<<” 2. Enter into Patient’s DataBase “<<endl;
cout<<” 3. Generate Patient’s Report “<<endl;
cout<<” 4. Generate Patient’s Bill “<<endl;
cout<<” 5. EXIT “<<“\n”;
cout<<“Please Enter Your choice :”<<” “;
cin>>ch2;
while(repeat==true)
{
system(“cls”);
switch(ch2)
case 1:
{
cout<<“\n\n”;
cout<<” *** Welcome To Doctor’s DataBase *** “<<“\n \n \n\n”;
case 4:
d.tot_no_of_doc();
break;
case 5:
goto xyz2;
break;
default:
cout<<“invalid”;
}
break;
case 2:
cout<<“\n\n”;
cout<<” *** Welcome To Patient’s DataBase *** “<<“\n \n”;
case 3:
system(“cls”);
p.patient_detail();
break;
case 4:
p.tot_no_of_pat();
break;
case 5:
goto xyz2;
break;
default:
cout<<“invalid”;
break;
}
break;
case 3:
p.patient_report();
goto xyz2;
break;
case 4:
p.gen_pat_report();
goto xyz2;
break;
case 5:
goto xyz;
break;
}
}
}
else if(ch1==2)
{
return 0;
}
else
{
cout<<“Wrong Input”<<endl;
}
return 0;
}