Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -438,7 +438,7 @@ def labres(column_changer):
|
|
| 438 |
abs_results = df[df['people'] == 'KGYC']
|
| 439 |
hrhpv_ascus = abs_results['hrHPV/ASC-US rate (%)'].iloc[len(abs_results)-1]
|
| 440 |
|
| 441 |
-
descript = "**Description:** *The hrHPV/ASC-US rate represents the high-risk HPV positive ASC-US cases among all ASC-US diagnoses. The literature reference value is 36,6
|
| 442 |
|
| 443 |
if 30 < hrhpv_ascus < 60:
|
| 444 |
lab_comment = f"Latest record of laboratory result is within laboratory goal zone {hrhpv_ascus:.2f}%. "
|
|
@@ -463,27 +463,27 @@ def labres(column_changer):
|
|
| 463 |
#hrHPV/ASC-US ratio (%)
|
| 464 |
elif column_changer == col_options[5]:
|
| 465 |
abs_results = df[df['people'] == 'KGYC']
|
| 466 |
-
|
| 467 |
|
| 468 |
-
descript = "**Description:** *The hrHPV
|
| 469 |
|
| 470 |
-
if
|
| 471 |
-
lab_comment = f"Latest record of laboratory result is within laboratory goal zone {
|
| 472 |
lab_comment_2 =""
|
| 473 |
-
elif
|
| 474 |
-
lab_comment = f"Latest record of laboratory result is in laboratory borderline zone. {
|
| 475 |
if (abs_results[column_changer].iloc[len(abs_results)-1] < abs_results[column_changer].iloc[len(abs_results)-2]):
|
| 476 |
-
lab_comment_2 = f"A decreasing trend can be observed since last year, a lower than
|
| 477 |
else:
|
| 478 |
lab_comment_2 =""
|
| 479 |
-
elif
|
| 480 |
-
lab_comment = f"Latest record of laboratory result is in laboratory borderline zone {
|
| 481 |
if (abs_results[column_changer].iloc[len(abs_results)-1] > abs_results[column_changer].iloc[len(abs_results)-2]):
|
| 482 |
-
lab_comment_2 = f"An increasing trend can be observed since last year, a higher than
|
| 483 |
else:
|
| 484 |
lab_comment_2 =""
|
| 485 |
-
elif (
|
| 486 |
-
lab_comment = f"Latest laboratory result value is {
|
| 487 |
lab_comment_2 = ""
|
| 488 |
|
| 489 |
lab_comment_6 = lab_comment_6 if 'lab_comment_6' in locals() else []
|
|
|
|
| 438 |
abs_results = df[df['people'] == 'KGYC']
|
| 439 |
hrhpv_ascus = abs_results['hrHPV/ASC-US rate (%)'].iloc[len(abs_results)-1]
|
| 440 |
|
| 441 |
+
descript = "**Description:** *The hrHPV/ASC-US rate represents the high-risk HPV positive ASC-US cases among all ASC-US diagnoses. The literature reference value is 36,6%. A rate < 30% and > 60% could indicate problems with laboratory protocol or changes in population risk factors.*<br><br>"
|
| 442 |
|
| 443 |
if 30 < hrhpv_ascus < 60:
|
| 444 |
lab_comment = f"Latest record of laboratory result is within laboratory goal zone {hrhpv_ascus:.2f}%. "
|
|
|
|
| 463 |
#hrHPV/ASC-US ratio (%)
|
| 464 |
elif column_changer == col_options[5]:
|
| 465 |
abs_results = df[df['people'] == 'KGYC']
|
| 466 |
+
hrhpv_pop = abs_results['hrHPV Prevalence (%)'].iloc[len(abs_results)-1]
|
| 467 |
|
| 468 |
+
descript = "**Description:** *The hrHPV Prevalence rate represents the high-risk HPV prevalence rate among the laboratory's population. The literature reference value varies between 11% and 29% based on the region and type of population screened. A rate < 10% and > 30 could indicate problems with laboratory protocol or changes in population risk factors.*<br><br>"
|
| 469 |
|
| 470 |
+
if 10 < hrhpv_pop < 30:
|
| 471 |
+
lab_comment = f"Latest record of laboratory result is within laboratory goal zone {hrhpv_pop:.2f}%. "
|
| 472 |
lab_comment_2 =""
|
| 473 |
+
elif 8 < hrhpv_ascus < 10:
|
| 474 |
+
lab_comment = f"Latest record of laboratory result is in laboratory borderline zone. {hrhpv_pop:.2f}%."
|
| 475 |
if (abs_results[column_changer].iloc[len(abs_results)-1] < abs_results[column_changer].iloc[len(abs_results)-2]):
|
| 476 |
+
lab_comment_2 = f"A decreasing trend can be observed since last year, a lower than 10% rate could indicate problems with laboratory protocol or changes in population risk factors."
|
| 477 |
else:
|
| 478 |
lab_comment_2 =""
|
| 479 |
+
elif 30 < hrhpv_ascus < 40:
|
| 480 |
+
lab_comment = f"Latest record of laboratory result is in laboratory borderline zone {hrhpv_pop:.2f}%."
|
| 481 |
if (abs_results[column_changer].iloc[len(abs_results)-1] > abs_results[column_changer].iloc[len(abs_results)-2]):
|
| 482 |
+
lab_comment_2 = f"An increasing trend can be observed since last year, a higher than 30% rate could indicate problems with laboratory protocol or changes in population risk factors."
|
| 483 |
else:
|
| 484 |
lab_comment_2 =""
|
| 485 |
+
elif (hrhpv_pop < 8) or (hrhpv_pop > 40):
|
| 486 |
+
lab_comment = f"Latest laboratory result value is {hrhpv_pop:.2f}%, performance follow up and global laboratory practice revision is advised."
|
| 487 |
lab_comment_2 = ""
|
| 488 |
|
| 489 |
lab_comment_6 = lab_comment_6 if 'lab_comment_6' in locals() else []
|