-
Notifications
You must be signed in to change notification settings - Fork 4
/
Final Diabetes.cpp
2775 lines (2669 loc) · 83.1 KB
/
Final Diabetes.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#include<iostream>
#include<string>
#include<stdlib.h>
#include<fstream>
#include<windows.h>
#include<stdio.h>
#include<string.h>
#include<conio.h>
#include<unistd.h>
#include<time.h>
#include<iomanip>
using namespace std;
int wholecheck=0;
int counter1=0,counter;
fstream fin,fout,fturndoc,ftemp,fadmin,fcross,fsum;
class problems;
class Login;
class diabetes
{
int id;
char name[200];
int age;
float height;
float weight;
char sex;
long long int phn;
public:
friend class doctor;
friend class problems;
friend class Login;
friend class adminstration;
friend class patient;
void twist(); //after thinking a lot i decided;
void welcome();
void enterdata();
void doctorlist();
void test();
void totaltest();
void search();
void deldata();
void prereport();
void aboutme();
void admin();
void reply();
void setlock();
void queries();
int report();
int display(int,int);
void showqu();
void update();
void adminre();
void patientlogin();
void treatrecord();//left
}mainobj;
class Login
{
public:
friend class doctors;
friend class problems;
friend class diabetes;
void password();
}passo;
class doctor
{
public:
friend class diabetes;
int id;
int idofdoc;
struct date
{
int d,m,y;
}st;
}docp;
class problems
{
public:
friend class diabetes;
int id,vision,thirst,hunger,furine;//furine=urine frequency//
char bg[2];
int headche,fatigue;
char fam,weight;
char food;
float sugarlevel;
float blpressurenum,blpressuredem;
float bloodcount;
float glucoselevel;
float glucose1;
}objp;
class bill
{
friend class doctor;
friend class problems;
friend class Login;
friend class adminstration;
friend class patient;
public:
int id;
int billid;
int sum;
enum fee{Thakur=1000,Grover=1500,Chawla=1500,Joradan=2000,JazzyB=3000};
void total();
}bobj;
class patient
{
public:
friend class problems;
friend class diabetes;
friend class quick;
friend class doctor;
int buyid;
void updatemine();
void buy();
void medicare();
void diseaselevel();
void seem();
void complaints();
void docchange();
char comp[2000];
char send[2000];
}pa;
class adminstration
{
private:
int id; //patientid
int stid; //staffid
char name[30]; //staffname
char dname[30]; //doctorname 1st thought of in doctorlist but failed
int did; //doctor id
long long int phna;
char userid[30]; //staff user id
char password[30]; //password staff
public:
int medid; //medicine id
char medicines[300]; //medicine name
float medprice; //price
char re[200];
friend class problems;
friend class diabetes;
friend class doctor;
friend class paitent;
void stpassword();
void medi(); //medicine name provider along price
void calcbill(); //along with medicines and doctor fees if no medi then only that
void adddoc(); //junior doctors
void adminsi();
void count();
void duty();
void complains();
void msgs();
//class risk
//{
// public:
//};
}admino;
class discuss
{
public:
friend class diabetes;
friend class doctors;
friend class patient;
friend class problems;
friend class adminstration;
int id;
char name[20];
char reply[200000];
char input[200000];
}q;
class finalreport
{
public:
friend class diabetes;
friend class doctors;
friend class patient;
friend class problems;
int id; // to detect
char dbresult; //level
}freport;
class quick
{
char name[300];
int gid;
int age;
float sugar;
float weight;
float bodytemp;
int mchoice;
void buy();
public:
friend class diabetes;
friend class patient;
quick()
{
char ch;
system("cls");
char chwer[]={"\t\t\t\t\t\t\t\t WELCOME TO THE DIABETES HEALTH CARE\t\t\n\t\t\t\t\t\t\t\t\tWe judge we understand!\n"};
int l=strlen(chwer);
int kk;
for(kk=0;kk<l;kk++)
{
Sleep(10);
cout<<chwer[kk];
}
char chwer1[]={"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n\n"};
l=strlen(chwer1);
for(kk=0;kk<l;kk++)
{
Sleep(10);
cout<<chwer1[kk];
}
char chwer2[]={"\t\t\t\t\t\t\t\t ....Tusharamit Enterprise....\n\n"};
l=strlen(chwer2);
for(kk=0;kk<l;kk++)
{
Sleep(10);
cout<<chwer2[kk];
}
cout<<"\n\n Enter the name : ";
fflush(stdin);
gets(name);
srand((time(NULL)));
gid=rand()%1161400+200000;
cout<<"\n\n ID Generated : ";
cout<<gid;
cout<<"\n\n Enter Age : ";
cin>>age;
cout<<"\n\n Do you Symptons like becoming//having :\n\n 1>THIRSTY 2>Weight Loss 3>Fatigueness 4>Vision Problem 5>Frequent Urine 6>Increased Hunger ??\n\n";
cout<<" Enter Y for Yes : ";
cin>>ch;
if(ch=='y'||ch=='Y')
cout<<"\n\n You may have the chances of diabetes, as Because these are the key symptons of it!!";
else
cout<<"\n\n You may not have the diabetes but it is still not sure!!";
cout<<"\n\n Let the nurse take your blood sample ";
sleep(2);
cout<<"\n\n Please Wait Taking Blood Sample ";
sleep(2);
cout<<"\n\n Analyzing Blood Samples ";
sleep(2);
cout<<"\n\n Thanks for being paitent ";
sleep(2);
cout<<"\n\n TEST INITIALIZED : ";
cout<<"\n\n Enter the weight : ";
cin>>weight;
cout<<"\n\n Enter the glucometer readings : ";
cin>>sugar;
cout<<"\n\n Enter the body temperature : ";
cin>>bodytemp;
cout<<"\n\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n";
cout<<"\t\t\t\t\t\t\t\t\t Generating Report ";
cout<<"\n\n Analyzing Symtons ";
sleep(1);
cout<<"\n\n Analyzing Blood Sample ";
sleep(1);
cout<<"\n\n Analyzing Body temperature ";
sleep(1);
cout<<"\n\n Getting things done ";
sleep(2);
system("cls");
cout<<"\t\t\t\t\t\t\t\t WELCOME TO THE DIABETES HEALTH CARE\t\t\n\t\t\t\t\t\t\t\t\tWe judge we understand!\n";
cout<<"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n\n";
cout<<"\t\t\t\t\t\t\t\t ....Tusharamit Enterprise....\n\n";
cout<<"\t\t\t\t\t\t\t\t\t\tREPORT";
cout<<"\n\n Name : "<<name;
cout<<"\n\n Age : "<<age;
cout<<"\n\n Weight : "<<weight;
cout<<"\n\n Body Temp : "<<bodytemp;
cout<<"\n\n";
int blood;
srand(time(NULL));
blood=rand()%1+7;
if(blood==1)
{
cout<<" Blood Group : "<<" A+ ";
}
else if(blood==2)
{
cout<<" Blood Group : "<<" A-";
}
else if(blood==3)
{
cout<<" Blood Group : "<<" B+";
}
else if(blood==4)
{
cout<<" Blood Group : "<<" B-";
}
else if(blood==5)
{
cout<<" Blood Group : "<<" O+";
}
else if(blood==6)
{
cout<<" Blood Group : "<<" O-";
}
else if(blood==7)
{
cout<<" Blood Group : "<<" AB+";
}
else if(blood==8)
{
cout<<" Blood Group : "<<" AB-";
}
else
{
cout<<" Blood Group : "<<" O+";
}
float bloodcount;
srand(time(NULL));
bloodcount=rand()%4000+10000;
if(bloodcount<4500)
{
cout<<"\n\n Blood Count : Low -> "<<bloodcount;
}
else if(bloodcount>=4500 && bloodcount<10000)
{
cout<<"\n\n Blood Count : High -> "<<bloodcount;
}
float ha;
srand(time(NULL));
ha=rand()%10+9;
if(ha>=12 && ha<16)
cout<<"\n\n Hameogloblin level -> Normal : "<<ha<<" grams per deciliter";
if(ha<12)
cout<<"\n\n Hameogloblin level -> LOW : "<<ha<<" grams per deciliter";
if(ha>16)
cout<<"\n\n Hameogloblin level -> : "<<ha<<" grams per deciliter";
float cholestrol;
srand(time(NULL));
cholestrol=rand()%25+100;
if(cholestrol<=100)
cout<<"\n\n Cholesrtrol -> IDEAL -> "<<cholestrol<<" mg/dl";
else if(cholestrol>100 && cholestrol<=129)
cout<<"\n\n Cholestrol -> Close to Ideal -> "<<cholestrol<<" mg/dl";
else if(cholestrol>=130 && cholestrol<=159)
cout<<"\n\n Cholesrtrol -> Borderline -> "<<cholestrol<<" mg/dl";
else if(cholestrol>=160 && cholestrol<=189)
cout<<"\n\n Cholesrtrol -> High -> "<<cholestrol<<" mg/dl";
else if(cholestrol>=190 && cholestrol<=240)
cout<<"\n\n Cholesrtrol -> Highly Dangerous -> "<<cholestrol<<" mg/dl";
if(sugar>=5.00 && sugar<=7.5)
cout<<"\n\n Normal Sugar Level : ->No signs of Diabetes till now ";
else if(sugar>7.5 && sugar<8.5)
cout<<"\n\n High Sugar Level : Diabetes Level 1 :->May led to heart stroke ";
else if(sugar>=8.5)
cout<<"\n\n High Sugar Level : Diabetes Level 2 :->Can led to heart attack ";
else
cout<<"\n\n Low Sugar Level : ";
cout<<"\n\n This is on the basis of a simple test only please take appointment from doctor for much more and clear understanding and for complete treatment\n\n";
cout<<"\n\n Generating Medicine Suggestions ";
sleep(5);
if(sugar>7.5 && sugar<8.5)
{
system("cls");
cout<<"\t\t\t\t\t\t\t\t WELCOME TO THE DIABETES HEALTH CARE\t\t\n\t\t\t\t\t\t\t\t\tWe judge we understand!\n";
cout<<"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n\n";
cout<<"\t\t\t\t\t\t\t\t ....Tusharamit Enterprise....\n\n";
cout<<"\t\t\t\t\t\t\t\t\t\tMedicines";
cout<<"\n\n 1. NovoLog \n\n 2. Novolin \n\n 3. Humulin \n\n 4. Humalog \n\n 5. Apidra \n\n";
srand(time(NULL));
mchoice=rand()%4+1;
cout<<"\n\n YOU CAN TAKE ANY OF THESE BUT ITS BETTER IF YOU TAKE OPTION : "<<mchoice;
cout<<"\n\n Suggested Medicine : ";
if(mchoice==1)
cout<<"Novolog";
else if(mchoice==2)
cout<<"Novolin";
else if(mchoice==3)
cout<<"Humulin";
else if(mchoice==4)
cout<<"Humalog";
else if(mchoice==5)
cout<<"Apidra";
cout<<"\n\n Take 2 tablets Per day after meal";
cout<<" \n\n Before Buying We would like you to take full test ";
cout<<" If you want to buy you can buy Press Y ";
cout<<" Your Choice : ";
char ch2;
cin>>ch2;
if(ch2=='Y'||ch=='y')
buy();
else
mainobj.twist();
}
else if(sugar>=8.5)
{
system("cls");
cout<<"\t\t\t\t\t\t\t\t WELCOME TO THE DIABETES HEALTH CARE\t\t\n\t\t\t\t\t\t\t\t\tWe judge we understand!\n";
cout<<"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n\n";
cout<<"\t\t\t\t\t\t\t\t ....Tusharamit Enterprise....\n\n";
cout<<"\t\t\t\t\t\t\t\t\t\tMedicines";
cout<<"\n\n 1. Precose \n\n 2. Miglitol \n\n 3. Kazano \n\n 4. Glucovance \n\n 5. Actoplus \n\n";
srand(time(NULL));
mchoice=rand()%4+1;
cout<<"\n\n YOU CAN TAKE ANY OF THESE BUT ITS BETTER IF YOU TAKE OPTION : "<<mchoice;
cout<<"\n\n Suggested Medicine : ";
if(mchoice==1)
cout<<"Precose";
else if(mchoice==2)
cout<<"Miglitol";
else if(mchoice==3)
cout<<"Kazano";
else if(mchoice==4)
cout<<"Glucovance";
else if(mchoice==5)
cout<<"Actoplus";
cout<<"\n\n Take 2 tablets Per day after meal";
cout<<" \n\n Before Buying We would like you to take full test ";
cout<<" If you want to buy you can buy Press Y ";
cout<<" Your Choice : ";
char ch2;
cin>>ch2;
if(ch2=='Y'||ch=='y')
buy();
else
mainobj.twist();
}
else
{
cout<<" No Medicine Required But keep Good Health and Diet";
}
}
};
class diet
{
public:
diet()
{
system("cls");
char chwer[]={"\t\t\t\t\t\t\t\t WELCOME TO THE DIABETES HEALTH CARE\t\t\n\t\t\t\t\t\t\t\t\tWe judge we understand!\n"};
int l=strlen(chwer);
int kk;
for(kk=0;kk<l;kk++)
{
Sleep(10);
cout<<chwer[kk];
}
char chwer1[]={"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n\n"};
l=strlen(chwer1);
for(kk=0;kk<l;kk++)
{
Sleep(10);
cout<<chwer1[kk];
}
char chwer2[]={"\t\t\t\t\t\t\t\t ....Tusharamit Enterprise....\n\n"};
l=strlen(chwer2);
for(kk=0;kk<l;kk++)
{
Sleep(10);
cout<<chwer2[kk];
}
char name[300],ch;
cout<<"\n\n Enter Your Name Please : ";
fflush(stdin);
gets(name);
cout<<"\n\n Enter weather you have diabetes or not(Y/N) ? ";
cout<<"\n\n Your Choice : ";
cin>>ch;
if(ch=='Y'||ch=='y')
{
cout<<" Special Diet is to be followed !!";
cout<<"\n\n Here We Go";
sleep(1);cout<<"\n\n1\t\t";sleep(1);cout<<"2\t\t";sleep(1);cout<<"3\t\t";
system("cls");
char chwer[]={"\t\t\t\t\t\t\t\t WELCOME TO THE DIABETES HEALTH CARE\t\t\n\t\t\t\t\t\t\t\t\tWe judge we understand!\n"};
l=strlen(chwer);
int kk;
for(kk=0;kk<l;kk++)
{
Sleep(10);
cout<<chwer[kk];
}
char chwer1[]={"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n\n"};
l=strlen(chwer1);
for(kk=0;kk<l;kk++)
{
Sleep(10);
cout<<chwer1[kk];
}
char chwer2[]={"\t\t\t\t\t\t\t\t ....Tusharamit Enterprise....\n\n"};
l=strlen(chwer2);
for(kk=0;kk<l;kk++)
{
Sleep(10);
cout<<chwer2[kk];
}
cout<<"\n\n Healthy fats from nuts, olive oil, fish oils\n\n flax seeds, or avocados Fruits and vegetablesideally fresh\n\n the more colorful the better\n\n whole fruit rather than juices High-fiber cereals and breads made from whole grains or legumes Fish and shellfish\n\n organic chicken or turkey\n\n High-quality protein such as eggs, beans, low-fat dairy, and unsweetened yogurt";
cout<<"\n\n";
cout<<" Brown or wild rice, riced cauliflower\n\n Sweet potatoes, yams, cauliflower mash \n\n Whole-wheat pasta, spaghetti squash \n\n High-fiber, low-sugar cereal \n\n Steel-cut or rolled oats";
cout<<"\n\n";
}
else
{
cout<<"\n\n You can continue your normal diet : ";
}
sleep(8);
mainobj.twist();
}
};
void Login::password()
{
system("cls");
int i;
char alogin[8],apassword[13];
char login[]="tushar06";
char pass[]="tusharamit06";
char iot;
iot=getch();
system("cls");
char chwer[]={"\t\t\t\t\t\t\t\t WELCOME TO THE DIABETES HEALTH CARE\t\t\n\t\t\t\t\t\t\t\t\tWe judge we understand!\n"};
int l=strlen(chwer);
int kk;
for(kk=0;kk<l;kk++)
{
Sleep(10);
cout<<chwer[kk];
}
char chwer1[]={"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n\n"};
l=strlen(chwer1);
for(kk=0;kk<l;kk++)
{
Sleep(10);
cout<<chwer1[kk];
}
char chwer2[]={"\t\t\t\t\t\t\t\t ....Tusharamit Enterprise....\n\n"};
l=strlen(chwer2);
for(kk=0;kk<l;kk++)
{
Sleep(10);
cout<<chwer2[kk];
}
char take[]={"\n\n Enter Login_id: "};
int d1=strlen(take);
for(kk=0;kk<d1;kk++)
{
Sleep(15);
cout<<take[kk];
}
char a;
cin>>alogin;
if(strcmp(alogin,login)==0)
{
char take1[]={"\n\n Enter Password: "};
d1=strlen(take1);
for(kk=0;kk<=d1;kk++)
{
Sleep(15);
cout<<take1[kk];
}
for(i=0;i<13;i++)
{
a=getch();
if(a==13)
break;
else if(a==8)
{
if(i>0)
cout<<"\b \b";
i=i-2;
continue;
}
if(i<0)
i=0;
else
putchar('*');
apassword[i]=a;
}
apassword[i]='\0';
if(strcmp(apassword,pass)==0)
{
char re[]={"\n\n\n Login Successfull\n\n "};
int rp=strlen(re);
int u;
for(u=0;u<rp;u++)
{
Sleep(14);
cout<<re[u];
}
sleep(2);
wholecheck=1;
}
else
{
wholecheck=2;
cout<<"\n\n Incorrect password";
}
}
else
{
cout<<"\n\n Invalid Login_id\\Username\n\n";
}
}
void diabetes::twist()
{
system("cls");
int ch;
char chwer[]={"\t\t\t\t\t\t\t\t WELCOME TO THE DIABETES HEALTH CARE\t\t\n\t\t\t\t\t\t\t\t\tWe judge we understand!\n"};
int l=strlen(chwer);
int kk;
for(kk=0;kk<l;kk++)
{
Sleep(10);
cout<<chwer[kk];
}
char chwer1[]={"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n\n"};
l=strlen(chwer1);
for(kk=0;kk<l;kk++)
{
Sleep(10);
cout<<chwer1[kk];
}
char chwer2[]={"\t\t\t\t\t\t\t\t ....Tusharamit Enterprise....\n\n"};
l=strlen(chwer2);
for(kk=0;kk<l;kk++)
{
Sleep(10);
cout<<chwer2[kk];
}
cout<<"\t\t\t\t\t\t\t\t\tChoose the operation \n\n\n 1-> PATIENT \n\n 2-> ADMIN \n\n 3-> QUERIES \n\n 4-> QUERIES REPLY \n\n 5-> Quick Checkup\n\n 6-> Diet Planner \n\n 7-> Log Out\n\n 8-> Exit";
cout<<"\n\n Your Choice-> ";
cin>>ch;
switch(ch)
{
case 1:
welcome();
break;
case 2:
setlock();
if(counter1!=0)
admin();
else
cout<<"\n\n\n Access Denied!! Terminating ";
sleep(3);
twist();
break;
case 3:
queries();
break;
case 4:
showqu();
break;
case 5:
quick();
break;
case 6:
diet();
break;
case 7:
cout<<"\n Logging Out.....\n\n";
sleep(2);
passo.password();
break;
case 8:
cout<<"\n\n Exiting...\n\n";
sleep(2);
exit(0);
break;
default:
cout<<" You have entered wrong key \n\n";
break;
}
}
void diabetes:: welcome()
{
system("cls");
cout<<"\n";
int ch;
char check;
A:
char chwer[]={"\t\t\t\t\t\t\t\t WELCOME TO THE DIABETES HEALTH CARE\t\t\n\t\t\t\t\t\t\t\t\tWe judge we understand!\n"};
int l=strlen(chwer);
int kk;
for(kk=0;kk<l;kk++)
{
Sleep(10);
cout<<chwer[kk];
}
char chwer1[]={"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n\n"};
l=strlen(chwer1);
for(kk=0;kk<l;kk++)
{
Sleep(10);
cout<<chwer1[kk];
}
char chwer2[]={"\t\t\t\t\t\t\t\t ....Tusharamit Enterprise....\n\n"};
l=strlen(chwer2);
for(kk=0;kk<l;kk++)
{
Sleep(10);
cout<<chwer2[kk];
}
cout<<"\t\t\t\t\t\t\t\t CHOOSE THE OPTIONS FROM MENU\n\n 1: ENTER DATA\n\n 2: GET\\TAKE APPOINTMENT\n\n 3: LIST OF PAITENTS\n\n 4: TEST\n\n 5: Pre-Report\n\n 6: FINAL REPORT\n\n 7: PATIENT-LOGIN\n\n 8: ABOUT DEVELOPER OF THIS CODE\n\n 9: EXIT\n\n";
cout<<"\n YOUR CHOICE : ";
cin>>ch;
switch(ch)
{
case 1:
enterdata();
cout<<"\n Do You Want To Continue(y/n)\n";
cout<<" YOUR CHOICE: ";
cin>>check;
if(check=='y'||check=='Y')
{
system("cls");
goto A;
}
else
{
cout<<"\n\n\t\t\tThank You! Visit us Again\n";
break;
}
case 2:
doctorlist();
cout<<"\n Do You Want To Continue(y/n)\n";
cout<<" YOUR CHOICE: ";
cin>>check;
if(check=='y'||check=='Y')
{
system("cls");
goto A;
}
else
{
cout<<"\n\n\t\t\tThank You! Visit us Again\n";
break;
}
case 3:
display(10,20);
cout<<"\n Do You Want To Continue(y/n)\n";
cout<<" YOUR CHOICE: ";
cin>>check;
if(check=='y'||check=='Y')
{
system("cls");
goto A;
}
else
{
cout<<"\n\n\t\t\tThank You! Visit us Again\n";
break;
}
case 4:
test();
cout<<"\n Do You Want To Continue(y/n)\n";
cout<<" YOUR CHOICE: ";
cin>>check;
if(check=='y'||check=='Y')
{
system("cls");
goto A;
}
else
{
cout<<"\n\n\t\t\tThank You! Visit us Again\n";
break;
}
case 5:
prereport();
cout<<"\n Do You Want To Continue(y/n)\n";
cout<<" YOUR CHOICE: ";
cin>>check;
if(check=='y'||check=='Y')
{
system("cls");
goto A;
}
else
{
cout<<"\n\n\t\t\tThank You! Visit us Again\n";
break;
}
case 6:
report();
cout<<"\n Do You Want To Continue(y/n)\n";
cout<<" YOUR CHOICE: ";
cin>>check;
if(check=='y'||check=='Y')
{
system("cls");
goto A;
}
else
{
cout<<"\n\n\t\t\tThank You! Visit us Again\n";
break;
}
case 7:
patientlogin();
cout<<"\n Do You Want To Continue(y/n)\n";
cout<<" YOUR CHOICE: ";
cin>>check;
if(check=='y'||check=='Y')
{
system("cls");
goto A;
}
else
{
cout<<"\n\n\t\t\tThank You! Visit us Again\n";
break;
}
case 8:
aboutme();
cout<<"\n Do You Want To Continue(y/n)\n";
cout<<" YOUR CHOICE: ";
cin>>check;
if(check=='y'||check=='Y')
{
system("cls");
goto A;
}
else
{
cout<<"\n\n\t\t\tThank You! Visit us Again\n";
break;
}
case 9:
cout<<" Exiting.... \n\n ";
sleep(2);
twist();
exit(0);
}
}
main()
{
int i=3;
diabetes o;
d:
system("cls");
passo.password();
if(wholecheck==1)
{
mainobj.twist();
}
else if(wholecheck==2)
{
cout<<"\n\n Server Crashed due to heavy traffic or You Entered Incorrect Password\n";
cout<<"\n\n Try Again in few seconds\n\n";
char ch12[]={"\n\n Reloading in 5 seconds\n\n"};
int kk,l;
for(kk=0;kk<l;kk++)
{
Sleep(15);
cout<<ch12[kk];
}
char ch13[]={"\n\n Reloading in 4 seconds\n\n"};
l=strlen(ch13);
for(kk=0;kk<l;kk++)
{
Sleep(15);
cout<<ch13[kk];
}
char ch14[]={"\n\n Reloading in 3 seconds\n\n"};
l=strlen(ch14);
for(kk=0;kk<l;kk++)
{
Sleep(15);
cout<<ch14[kk];
}
char ch15[]={"\n\n Reloading in 2 seconds\n\n"};
l=strlen(ch15);
for(kk=0;kk<l;kk++)
{
Sleep(15);
cout<<ch15[kk];
}
char ch16[]={"\n\n Reloading in 1 seconds\n\n"};
l=strlen(ch16);
for(kk=0;kk<l;kk++)
{
Sleep(15);
cout<<ch16[kk];
}
if(i>=1)
{
goto d;
i--;
}
else
cout<<"\n\n Interface Locked due to many invalid tries\n\n";
}
}
void diabetes::enterdata()
{
int i,num=0;
fout.open("DIABETESDATA.txt",ios::app);
system("cls");
cout<<"\t\t\t\t\tWelcome!\n";
cout<<"\n\t\t\tPLEASE FILL ALL THE REQUIRED DATA\n";
cout<<"\n\n ";
cout<<" Enter The no. of paitents : ";
cin>>num;
cout<<"\n\n ";
for(i=0;i<num;i++)
{
system("cls");
cout<<"\t\t\t\t\t\t\t\t WELCOME TO THE DIABETES HEALTH CARE\t\t\n\t\t\t\t\t\t\t\t\tWe judge we understand!\n";
cout<<"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n\n";
cout<<"\t\t\t\t\t\t\t\t ....Tusharamit Enterprise....\n\n";
cout<<"_________________________________________________________________________________________________________________________________________________________________________\n\n\n";
cout<<"\n\n ";
cout<<" PLEASE ASK THE IDno. AND ENTER IT : ";
cin>>id;
cout<<"\n\n";
cout<<" 1 : ENTER NAME : ";
scanf("%s",name);
fflush(stdin);
cout<<"\n\n 2 : AGE : ";
cin>>age;
cout<<"\n\n 3 : SEX(M/F) : ";
cin>>sex;
cout<<"\n\n 4 : Height : ";
cin>>height;
cout<<"\n\n 5 : Weight : ";
cin>>weight;
cout<<"\n\n 6 : Phone number : ";
cin>>phn;
fout.write((char*)&mainobj,sizeof(mainobj));
}
fout.close();
}
int diabetes::display(int a,int b)
{
fin.open("DIABETESDATA.txt",ios::in);
system("cls");
cout<<"\t\t\t\tHere's the Data of all paitents\n\n\n";
cout<<"|\t ID\t | NAME | AGE | SEX | HEIGHT | WEIGHT |\n";
while(fin.read((char*)&mainobj,sizeof(mainobj)))
{
cout<<"|"<<setw(9)<<id<<setw(10)<<"|"<<setw(15)<<name<<setw(20)<<"|"<<setw(5)<<age<<setw(5)<<"|"<<setw(5)<<sex<<setw(5)<<"|"<<setw(7)<<height<<setw(7)<<"|"<<setw(7)<<weight<<setw(7)<<"\t|\n\n";
}
fin.close();
}
void diabetes::search()
{
system("cls");
fin.open("DIABETESDATA.txt",ios::in|ios::out);
int tempid,k=0;
char check;
cout<<"\t\t\t\tDiabetes Health Care\t\n";
cout<<"\n Enter the id no. of patient : ";
cin>>tempid;
while(fin.read((char*)&mainobj,sizeof(mainobj)))
{
if(tempid==mainobj.id)
{
k++;
break;
}
}
if(mainobj.id==tempid)
{
cout<<"|\t ID\t | NAME | AGE | SEX | HEIGHT | WEIGHT |\n";
cout<<"|"<<setw(9)<<id<<setw(10)<<"|"<<setw(15)<<name<<setw(20)<<"|"<<setw(5)<<age<<setw(5)<<"|"<<setw(5)<<sex<<setw(5)<<"|"<<setw(7)<<height<<setw(7)<<"|"<<setw(7)<<weight<<setw(7)<<"\t|\n\n";
cout<<"\n ";
}
else
{
cout<<" YOU HAVE ENTERED THE INVALID ID PLEASE TRY AGAIN \n";
}
fin.close();
}
void diabetes::test()
{
system("cls");
int dd,mm,yyyy;
cout<<"\t\t\t\tDIABETES HEALTH CARE!\n\n\n";
fin.open("DIABETESDATA.txt",ios::in|ios::out);
fout.open("problems.txt",ios::app);
fturndoc.open("Doctors1.txt",ios::in);