From cca9517b7c51c435c3a98f4d94bd593cac09c6d2 Mon Sep 17 00:00:00 2001 From: edgar Date: Wed, 2 Dec 2026 20:26:14 -0600 Subject: [PATCH] =?UTF-8?q?Conservar=20la=20exclusi=C3=B3n=20por=20histere?= =?UTF-8?q?ctom=C3=ADa=20cuando=20la=20API=20no=20la=20reporta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/paciente/paciente.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/app/paciente/paciente.ts b/src/app/paciente/paciente.ts index 7bdbddd..23fe2e5 100644 --- a/src/app/paciente/paciente.ts +++ b/src/app/paciente/paciente.ts @@ -158,18 +158,17 @@ export class Paciente { }); protected readonly cutoff = computed(() => this.corte() ?? new Date().toLocaleDateString('sv')); protected readonly age = computed(() => ageAt(this.patient()?.birthDate, this.cutoff())); - /** Why she has no risk estimate; nothing when she is eligible. Only while the backend gives - * no decision (failure, gold not updated) is the hysterectomy of her record held against it. */ + /** Why she has no risk estimate; nothing when she is eligible. The backend's reason first; the + * hysterectomy of her record is still held against her when the backend does not report it, + * as with evidence loaded without the day it was available. */ protected readonly riskExclusion = computed(() => { if (this.domain() !== 'cacu') return undefined; const patient = this.patient(); const sample = this.citologia()?.slice(0, 10); const index = sample && sample < this.cutoff() ? sample : this.cutoff(); - const state = this.eligibility(); - if (state.kind === 'evaluated' || state.kind === 'none') { - const status = (patient && ext(patient, 'follow-up-status')?.valueCoding?.code) ?? ''; - return ineligibility(state, status, index); - } + const status = (patient && ext(patient, 'follow-up-status')?.valueCoding?.code) ?? ''; + const reported = ineligibility(this.eligibility(), status, index); + if (reported) return reported; const recorded = patient && ext(patient, 'first-hysterectomy-recorded')?.valueDate; return recorded && recorded <= index ? `No disponible por: histerectomía registrada el ${recorded}.`