Ficha: mostrar el VPH como estudio aparte
This commit is contained in:
@@ -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)) };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user