feat(fhir): publish the Wilson interval of a proportion's score

A proportion's measureScore now carries its 95 % Wilson interval in the ic-bajo and ic-alto extensions,
as proportions, the way durations carry their quartiles. Nothing is published without a denominator.
This commit is contained in:
2026-11-21 17:42:02 -06:00
parent c2b18d9969
commit 0c102d89f7
3 changed files with 34 additions and 8 deletions
+2 -2
View File
@@ -122,8 +122,8 @@ def _proportion_cells(definition, counts: Counts, excluded: int | None = None) -
*(_count(c, counts.numerator) for c in definition.numerator.codes)]}
if excluded is not None and getattr(definition, "exclusion", None):
cells["population"] += [_count(c, excluded) for c in definition.exclusion.codes]
if counts.proportion is not None:
cells["measureScore"] = {"value": counts.proportion}
if counts.score:
cells["measureScore"] = counts.score
return cells