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
|
// DIABDIAG.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <string>
#include <fstream>
#include <limits>
using namespace std;
struct patient_info
{ string f_name,l_name;
int weight;
float heightt;
double BMI;
};
patient_info get_patient_info()
{ patient_info patient;
cout<< "\n\n==========================================="<< " WELCOME OUR VALUABLE PATIENT "<<"======================================\t\t\t\t\t\n"<< endl;
cout<< " Please fill all information we will ask you about, so we can help you easily:" <<"\t\t\t\t\t"<< endl;
cout<< " \t\t\t\t(follow the instructions )" <<"\t\t\t\t\t\n\n"<< endl;
cout<< " First Name : ";
cin >> patient.f_name;
cout<<"\n Last Name : ";
cin >> patient.l_name;
cout<< "\n Weight : ";
cin>> patient.weight;
cout<< "\n heightt(formating of write height is like 1.70 cm): ";
cin >> patient.heightt;
patient.BMI = patient.weight/(patient.heightt * patient.heightt);
cout<<"\n Your BMI is "<< patient.BMI<<endl;
return patient;
}
int main(int argc, char *argv[])
{ patient_info patient;
ifstream input;
float a1c;
int FPG;
int OGTT;
patient = get_patient_info();
input.open(argv[0]);
bool symptomatic=1;
bool choice1=1;
bool choice2=1;
cout<< " \n Do you have any symptomatic, if yes choose 1 or 0 for no" <<"\t\t\t\t\t"<< endl;
cout<<" Answer ";
cin>>symptomatic;
if (patient.BMI<=25)
{
cout<< "\n Please look for the list below, (if you have one or more of them choose 1 for yes or 0 for no): \n"<<endl;
cout<<" 1. height-risk race/ethnicity(e.g.,African American,Latino,Native Ameri-can,Asian American,Pacific Islander)\n"<<endl;
cout<<" 2. Women who have delivered a baby weighing > 9 lb. or were diagnosed with GDM \n"<<endl;
cout<<" 3. Women with polycystic ovarian syndrome \n"<<endl;
cout<<" 4. Prediabetes"<<" as defined by IFG, IGT or A1c on previous testing\n"<<endl;
cout<<" 5. Other clinical conditions associated with insulin resistance(e.g., severe obesity,acanthosis nigricans)\n"<<endl;
cout<<" 6. History of first-degree relative with T2DM\n"<<endl;
cout<<" Answer \n";
cin>>choice1;
if ( symptomatic==1 || choice1==1)
{
cout<<" \n Be ready for diagnostic test for T2DM (A1c, OGTT or FPG)\n"<<endl;
cout<<"\n Please fill all below values: \n";
cout<<"\n A1c (Normal percent is between 5.7-6.4) is ";
cin>>a1c;
cout<<"\n FPG (Normal FPG is between 100-125 mg/dL) is ";
cin>>FPG;
cout<<"\n OGTT (Normal OGTT is between 140-199 mg/dL) is \n";
cin>>OGTT;
if (a1c==5.7 && a1c>=6.4)
if(FPG==100 && FPG>=125)
if(OGTT==140 && OGTT>199)
{
cout<<"\n Treatment to prevent or delay the progression to T2DM "<<endl;
}
else
{
if (a1c>=6.5)
if (FPG>=126)
if (OGTT>=200){
cout<<"\n You have diagnosis of T2DM, and you need to see doctor to give you a right medicine\n"<<endl;
}
}
if (choice1==0)
{
cout<<" Do you have increased cardiovascular risk? (see list below, if you have one or more, "
<<"\n choose 1 for yes, 0 for no)\n"<<endl;
cout<<" 1. Established ASCVD \n"<<endl;
cout<<" 2. Hypertension (blood pressure ? 140/90 mmHg or on hypertension thera-py)\n"<<endl;
cout<<" 3. HDL cholesterol < 35 mg/dL \n"<<endl;
cout<<" 4. Triglyceride level > 250 mg/dL \n"<<endl;
cout<<" 5. LDL cholesterol > 70 and calculated 10-year cardiovascular event risk > 7.5% or on lipid-lowering therapy \n"<<endl;
cout<<" Answer ";
cin>> choice2;
if(choice2!=1)
{
cout<<"\n You are asympomatic patients with no risk factors,but you should not be screened for T2DM, regardless your age\n"<<endl;
}
else
{
cout<<"\n Be ready for diagnostic test for T2DM (A1c, OGTT or FPG)\n"<<endl;
cout<<"\n Please fill all below values: \n";
cout<<"\n A1c (Normal percent is between 5.7-6.4) is ";
cin>>a1c;
cout<<"\n FPG (Normal FPG is between 100-125 mg/dL) is ";
cin>>FPG;
cout<<"\n OGTT (Normal OGTT is between 140-199 mg/dL) is ";
cin>>OGTT;
if (a1c==5.7 && a1c>=6.4)
if(FPG==100 && FPG>=125)
if(OGTT==140 && OGTT>199)
{
cout<<"\n Treatment to prevent or delay the progression to T2DM "<<endl;
}
else
{
if (a1c>=6.5)
if (FPG>=126)
if (OGTT>=200){
cout<<"\n You have diagnosis of T2DM, and you need to see doctor to give you a right medicine\n"<<endl;
}
}
}
}
}
}
return 0;
}
|