Monday, January 30, 2012

HOSPITAL MANAGEMENT SYSTEM


#include<stdio.h>
#include<conio.h>
#include<process.h>
void exitprg(void);
void map(void);
void vlb(void);
void pp(void);
void vrp(void);
void vs(void);
void pabi(void);
void main()
{
int ch;
clrscr();
printf("WELCOME TO HOSPITAL MANAGEMENT SYSTEM");
printf("\n\n[1] PATIENT PROFILES");
printf("\n\n[2] VIEW RECENT PATIENTS");
printf("\n\n[3] VIEW SURGEONS");
printf("\n\n[4] PROCESS A BILL INFORMATION:");
printf("\n\n[5] VIEW LAST BILLS:");
printf("\n\n[6] MAKE AN APPOINTMENT");
printf("\n\n[7] EXIT");
printf("\n\nEnter Your choice:");
scanf("%d",&ch);
if(ch>0&&ch<8)
{
switch(ch)
{
case 1:
pp();
break;
case 2:
vrp();
break;
case 3:
vs();
break;
case 4:
pabi();
break;
case 5:
vlb();
break;
case 6:
map();
break;
case 7:
exit(0);
break;
}
}
}
void pp()
{
FILE *fvp;
char name[150];
char fname[150];
char age[150];
char address[150];
char doc[150];
fvp=fopen("c:\\pro.txt","a");
clrscr();
printf("\n\nENTER NAME:");
scanf("%s",name);
printf("\n\nEnter Fathers Name:");
scanf("%s",fname);
printf("\n\nEnter age:");
scanf("%s",age);
printf("\n\nEnter Address:");
scanf("%s",address);
printf("\n\nDoctor:");
scanf("%s",doc);
fprintf(fvp,"\n%s\n%s\n%s\n%s\n%s\n Record Added",name,fname,age,address,doc);
fclose(fvp);
getch();
exitprg();
}
void vrp()
{
FILE *fp;
char c=' ';
clrscr();
fp=fopen("c:\\pro.txt","r+");
if(fp==NULL)
{
printf("\nContents Read :");
exit(1);
}
printf("\nContents Read:");
while(!feof(fp))
printf("%c",getc(fp));
printf("TO STOP PRESS'.':");
while(c!='.')
c=getche();
fputc(c,fp);
exitprg();
}
void vs()
{
clrscr();
printf("\n\nM.D Dr.Laxman M.D.S");
printf("\n\nDr.Nipun Jaswal B.D.S");
printf("\n\nDr.AmritPal Singh");
printf("\n\nDr.Jaswant Kumar");
printf("\n\nDr.Sahil Arora");
printf("\n\nDr.Sapna Rani");
printf("\n\nDr.Lovepreet Kaur");
printf("\n\nDr.Rahul Gaur");
printf("\n\nDr.Meesam ali ");
printf("\n\nDr.Deepika goyal");
printf("\n\nDr.Shashank Sharma");
printf("\n\nDr.Harjot Singh");
exitprg();
}
void pabi()
{
FILE *fop;
int a,b,c,d,e,f;
clrscr();
fop=fopen("c:\\bill.txt","a");
printf("\nEnter Operation Expenditure:");
scanf("%d",&a);
printf("\nEnter Medicine Expenditure:");
scanf("%d",&b);
printf("\nEnter Doctors Bill:");
scanf("%d",&c);
printf("\nTax @12.5");
d=a+b+c;
e=d*0.125;
f=d+e;
printf("\nTotal Expenditure(including Vat):%d",f);
fclose(fop);
exitprg();
}
void vlb()
{
FILE *fp;
char c=' ';
clrscr();
fp=fopen("c:\\bill.txt","r+");
if(fp==NULL)
{
printf("\nContents Read :");
exit(1);
}
printf("\nContents Read:");
while(!feof(fp))
printf("%c",getc(fp));
printf("TO STOP PRESS'.':");
while(c!='.')
{
c=getche();
fputc(c,fp);
exitprg();
}
}
void map()
{
char na,docna,day,time;
printf("\n\nEnter patients name:");
scanf("%c",&na);
printf("\n\nEnter Doctors name:");
scanf("%c",&docna);
printf("\n\nEnter Day,Time:");
scanf("%c%c",&day,&time);
printf("\n\nAPPOINTMENT FIXED");
exitprg();
}
void exitprg()
{
int alm;
printf("\n\nIf U Are Sure To Back Press '0'");
scanf("%d",&alm);
if(alm==0)
{
main();
}
if(alm>0)
{
exit(0);
}
}




1 comment:

  1. Looking for a hassle-free pathway to secure a seat at Vydehi Medical College? College Dhundo offers valuable insights on "Direct Admission In Vydehi Medical College Direct Admission In Vydehi Medical College Explore this informative resource to simplify your admission process and achieve your medical education goals.

    ReplyDelete