Ficha: mostrar el VPH como estudio aparte

This commit is contained in:
2026-12-02 19:42:51 -06:00
parent 32b879edd2
commit 211f02edad
2 changed files with 17 additions and 4 deletions
+8
View File
@@ -46,3 +46,11 @@ export function group(facts: Fact[]) {
}
return { antecedents, results, findings };
}
const HPV_FIELDS = ['hpv', 'hpv_16', 'hpv_18'];
/** The cytology report's HPV results, apart from the cytology's own facts. */
export function hpvApart(facts: Fact[]) {
const isHpv = (f: Fact) => f.study === 'cervical_cytology' && HPV_FIELDS.includes(f.field);
return { hpv: facts.filter(isHpv), rest: facts.filter((f) => !isHpv(f)) };
}