....................
strcpy(doctor2,"Dr.James.Brown");
while(!feof(customer1) && Found==0)
{
fscanf(customer1,"%s %s %s %s %s %d %d %d %d %d",det.name,det.regis,det.pname,det.treatment,det.piont,&det.fees,&det.collect,&det.insure,&det.balance,&det.value);
if(strcmp(doctor2,det.name)==0)
{
Found=1;
count++;
fees = det.fees + fees;
collected = det.collect + collected;
printf("\n\t\t NAME:%s",det.pname);
printf("\n\t\t TREATMENT:%s",det.treatment);
}
}
if(Found)
{
printf("\n\t\t DOCTORS NAME:%s",doctor2);
printf("\n\t\t NUMBER OF PATIENTS:%d",count);
printf("\n\t\t TOTAL FEE CHARGED:$ %d",fees);
printf("\n\t\t AMOUNT PAID:$ %d",det.collect);
printf("\n\t\t FEES COLLECTED:$ %d",collected);
printf("\n");
}
else
if(!Found)
printf("\n\n\t\t THERES NO SUCH RECORD");
}
Sleep(1000);
printf("\n\n\t\t\t PRESS ENTER");
getch();
system("cls");
doctorrecord();
break;
Example of file
Dr.John.Whyte 1001 Donellie.Whyte Filling 04/06/10 12000 5000 0 -7000 6 Dr.John.Whyte 1002 James.Cameron Extraction 04/10/09 12000 6000 0 -6000 7 Dr.John.Whyte 1003 Kameron.Ellis Extraction 29/08/10 12000 12000 0 0 36


Sign In
Create Account


Back to top









