gsztlyptr commited on
Commit
0eb547d
·
verified ·
1 Parent(s): cfe1f12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -277,7 +277,7 @@ def labres(column_changer):
277
  lab_comment_4 = ""
278
  if column_changer == col_options[1]:
279
  avg_zscore = zscore_eval.get_group('KGYC')['ASC-US/ASC-H ratio(%)'].mean()
280
- lab_ascus_reference = 90.0 - avg_zscore #Végül 95%-os CI-vel alkottam meg a bdl és att zónákat
281
  lab_asch_reference = 10.0 + avg_zscore
282
  sd_dev = 5 #(95% CI esetén)
283
  goal_zone = (lab_ascus_reference - sd_dev, lab_ascus_reference + sd_dev)
@@ -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%. 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}%. "
@@ -464,7 +464,7 @@ def labres(column_changer):
464
  abs_results = df[df['people'] == 'KGYC']
465
  hrhpv_pop = abs_results['hrHPV Prevalence (%)'].iloc[len(abs_results)-1]
466
 
467
- 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 (Eastern Europe - 21%). A rate < 10% and > 30 could indicate problems with laboratory protocol or changes in population risk factors.*<br><br>"
468
 
469
  if 10 < hrhpv_pop < 30:
470
  lab_comment = f"Latest record of laboratory result is within laboratory goal zone {hrhpv_pop:.2f}%. "
@@ -606,7 +606,6 @@ def lab_management(year_slider, column_changer):
606
  elif column_changer == 'hrHPV/ASC-US rate (%)':
607
  ref_value = 36.6
608
  ref_hline = hv.HLine(y=ref_value).opts(color='black', alpha=1, line_width=2).opts(shared_axes=False, toolbar=None, default_tools=[])
609
- ref_text = hv.Text(2020, 36.6, f"{ref_value:.2f}").opts(text_align='left', text_color='black', text_font_size='10pt')
610
 
611
  line_plot = line_data.hvplot.line(x='year', y=column_changer, color='#5B91D1', line_dash ='dashed', line_width=2, height=600, title=column_changer, xlabel='Year', ylabel=column_changer, tools=[hover_cp]).opts(fontsize=pl_title, fontscale=f_scale_lab, shared_axes=False, toolbar=None, default_tools=[], ylim=(10, 90))
612
 
@@ -621,7 +620,7 @@ def lab_management(year_slider, column_changer):
621
  hpvascus_bg = (hpvascus_goal.opts(color='#ACFFA0', alpha=0.75) * hpvascus_bdln_1.opts(color='#6AB35F', alpha=0.75) * hpvascus_bdln_2.opts(color='#6AB35F', alpha=0.75)) * hpvascus_att_1.opts(color='#B34D93', alpha = 0.9) * hpvascus_att_2.opts(color='#B34D93', alpha = 0.9)
622
 
623
 
624
- return (hpvascus_bg * ref_hline * ref_text * line_plot * point).opts(toolbar='above', default_tools=[]).opts(shared_axes=False)
625
 
626
  elif column_changer == 'hrHPV Prevalence (%)':
627
  ref_value = 21
 
277
  lab_comment_4 = ""
278
  if column_changer == col_options[1]:
279
  avg_zscore = zscore_eval.get_group('KGYC')['ASC-US/ASC-H ratio(%)'].mean()
280
+ lab_ascus_reference = 90.0 - avg_zscore
281
  lab_asch_reference = 10.0 + avg_zscore
282
  sd_dev = 5 #(95% CI esetén)
283
  goal_zone = (lab_ascus_reference - sd_dev, lab_ascus_reference + sd_dev)
 
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}%. "
 
464
  abs_results = df[df['people'] == 'KGYC']
465
  hrhpv_pop = abs_results['hrHPV Prevalence (%)'].iloc[len(abs_results)-1]
466
 
467
+ descript = "**Description:** *The hrHPV Prevalence 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 (Eastern Europe - 21%). A rate < 10% and > 30% could indicate problems with laboratory protocol or changes in population risk factors.*<br><br>"
468
 
469
  if 10 < hrhpv_pop < 30:
470
  lab_comment = f"Latest record of laboratory result is within laboratory goal zone {hrhpv_pop:.2f}%. "
 
606
  elif column_changer == 'hrHPV/ASC-US rate (%)':
607
  ref_value = 36.6
608
  ref_hline = hv.HLine(y=ref_value).opts(color='black', alpha=1, line_width=2).opts(shared_axes=False, toolbar=None, default_tools=[])
 
609
 
610
  line_plot = line_data.hvplot.line(x='year', y=column_changer, color='#5B91D1', line_dash ='dashed', line_width=2, height=600, title=column_changer, xlabel='Year', ylabel=column_changer, tools=[hover_cp]).opts(fontsize=pl_title, fontscale=f_scale_lab, shared_axes=False, toolbar=None, default_tools=[], ylim=(10, 90))
611
 
 
620
  hpvascus_bg = (hpvascus_goal.opts(color='#ACFFA0', alpha=0.75) * hpvascus_bdln_1.opts(color='#6AB35F', alpha=0.75) * hpvascus_bdln_2.opts(color='#6AB35F', alpha=0.75)) * hpvascus_att_1.opts(color='#B34D93', alpha = 0.9) * hpvascus_att_2.opts(color='#B34D93', alpha = 0.9)
621
 
622
 
623
+ return (hpvascus_bg * ref_hline * line_plot * point).opts(toolbar='above', default_tools=[]).opts(shared_axes=False)
624
 
625
  elif column_changer == 'hrHPV Prevalence (%)':
626
  ref_value = 21