@@ -303,7 +307,7 @@
- } @else {
+ } @else if (!riskExclusion()) {
Sin evaluación de un modelo en producción.
}
diff --git a/src/app/paciente/paciente.ts b/src/app/paciente/paciente.ts
index f357a1c..80f4098 100644
--- a/src/app/paciente/paciente.ts
+++ b/src/app/paciente/paciente.ts
@@ -148,6 +148,16 @@ export class Paciente {
});
protected readonly cutoff = computed(() => this.corte() ?? new Date().toLocaleDateString('sv'));
protected readonly age = computed(() => ageAt(this.patient()?.birthDate, this.cutoff()));
+ protected readonly riskExclusion = computed(() => {
+ if (this.domain() !== 'cacu') return undefined;
+ const patient = this.patient();
+ const recorded = patient && ext(patient, 'first-hysterectomy-recorded')?.valueDate;
+ const sample = this.citologia()?.slice(0, 10);
+ const index = sample && sample < this.cutoff() ? sample : this.cutoff();
+ return recorded && recorded <= index
+ ? `Sin estimación de riesgo por antecedente de histerectomía registrado el ${recorded}.`
+ : undefined;
+ });
/** CaCu: the route of the cytology she was opened at, else of her latest, by the cut-off. */
protected readonly stages = computed(() => {
const cytologies = (this.data.value()?.reports ?? []).filter(
@@ -207,6 +217,7 @@ export class Paciente {
['Estatus de seguimiento', this.status()],
['Fecha de corte', this.cutoff()],
];
+ if (this.riskExclusion()) facts.push(['Evaluación de riesgo', this.riskExclusion()]);
const sheets = recordSheets(
facts,
this.stages() ?? [],
@@ -270,6 +281,7 @@ export class Paciente {
protected readonly antecedents = ANTECEDENTS;
/** One model's latest risk assessment per model. */
protected readonly models = computed(() => {
+ if (this.riskExclusion()) return [];
const latest = new Map();
for (const r of this.data.value()?.risks ?? []) {
const key = code(r.method) ?? '';