feat(code): Warn if findings studies do not match available
Since we add the studies that bring findings for the finding tables manually, this ensures that we spot any mistakes when entering them, or similar discrepancies on the other side of the raw data.
This commit is contained in:
parent
8cd6dc790d
commit
4e865ee2b5
1 changed files with 8 additions and 2 deletions
|
@ -19,9 +19,15 @@ def _combined_validities(
|
|||
return
|
||||
combined = 0.0
|
||||
for study in apply_to.split(";"):
|
||||
if study not in by_intervention["citation"].unique():
|
||||
print(
|
||||
f"WARNING: Findings table {study} study did not match any study in interventions dataframe!"
|
||||
)
|
||||
new = by_intervention.loc[by_intervention["citation"] == study, column]
|
||||
if len(new) > 0 and not math.isnan(new.iat[0]):
|
||||
combined += new.iat[0]
|
||||
if len(new) == 0 or math.isnan(new.iat[0]):
|
||||
continue
|
||||
combined += new.iat[0]
|
||||
|
||||
if combined:
|
||||
return _binned_strength(combined)
|
||||
return r"\-"
|
||||
|
|
Loading…
Reference in a new issue