<jupyter_start><jupyter_text><jupyter_code>#Your A1C test result (also known as HbA1c or glycated hemoglobin) can be a good general gauge of your diabetes control, 
# because it provides an average blood glucose level over the past few months.

#Unlike daily blood glucose test results, which are reported as mg/dL, A1C is reported as a percentage. 
#This can make it difficult to understand the relationship between the two. For example, if you check blood 
#glucose 100 times in a month, and your average result is 190 mg/dL this would lead to an A1C of approximately 8.2%, 
#which is above the target of 7% or lower recommended by the American Diabetes Association (ADA) for many adults who are not pregnant. 
#For some people, a tighter goal of 6.5% may be appropriate, and for others, a less stringent goal such as 8% may be better.
#Here's how it works:

#Some blood sugar (or glucose) naturally attaches itself to A1C cells as they move through your bloodstream. When this happens, the cell is considered "glycated."
#Once a cell has been glycated, it stays that way. And since each A1C cell has a lifespan of about 4 months, your A1C sample will include cells that are a few days, 
#a few weeks and a few months old. As a result, the test covers a span of about 2 to 3 months.
#The more sugar in your blood, the higher the percentage of glycated A1C cells you'll have—that percentage is your A1C test result.

#The Hemoglobin A1c (HbA1c or simply A1c for short) test is a blood test used to measure the average blood glucose concentration in your body in the past 1-3 months. 
#For diabetics, this is the standard way of determining how well the diabetes is controlled. An A1c of less than 7% is considered good.
#If your A1c level is equal to or higher than 6.5%, you may be diagnosed as diabetic. If this is your result, book an appointment with your doctor immediately!

#Prediabetes group (5.7-6.4%) - Thats a red flag. You're at a high risk of diabetes, but there is still hope. 

#Glucose in mmol/L:
A1c = (2.59 + average_blood_glucose) / 1.59

#Glucose in mg/dL:
A1c = (46.7 + average_blood_glucose) / 28.7
A1c = (46.7 + 110)/28.7
print(A1c)

A1c = (2.57 + 110)/1.59
print(A1c)
A1c(%)       eAG (Everyday Average Glucose - MG/DL)
5            97  is an average of about   (76  - 120)
6            126 is an average between    (100 - 152)
7            154 is an average between    (123 - 185)
8            183 is an average between    (147 - 217)
9            212 is an average between    (170 - 249)
10           240 is an average between    (193 - 282)
11           269 is an average between    (217 - 314)
12           298 is an average between    (240 - 347)

eAG = 28.7 * A1c - 45.7 ~ 29 pts per 1%
DIASTOLIC              SYSTOLIC                       BLOOD PRESSURE LEVEL
========================================================================== 
Diastolic 40 - 45      Systolic 70 - 79 ==============> LOW
Diastolic 50 - 59      Systolic 80 - 89 ==============> LOW
Diastolic 60 - 69      Systolic 90 - 99 ==============> LOW

Diastolic 70 - 79      Systolic 100 - 109 ============> IDEAL
Diastolic 80 - 89      Systolic 110 - 119 ============> IDEAL

Diastolic 90 - 99      Systolic 120 - 129 ============> PRE-HIGH
Diastolic 100 - 109    Systolic 130 - 139 ============> PRE-HIGH
Diastolic 110 - 119    Systolic 140 - 149 ============> PRE-HIGH

Diastolic 120 - 129    Systolic 150 - 159 ============> HIGH
Diastolic 130 - 139    Systolic 160 - 169 ============> HIGH
Diastolic 140 - 149    Systolic 170 - 179 ============> HIGH
Diastolic 150 - 159    Systolic 180 - 189 ============> HIGH
Diastolic 160 - 169    Systolic 190 - 000 ============> HIGH<jupyter_output><empty_output>