Decir que la paciente ya fue tratada y nombrar el grado de la citología de referencia
This commit is contained in:
@@ -5,7 +5,6 @@ import type { EligibilityState } from './eligibility';
|
||||
const SCENARIOS: Record<string, string[]> = {
|
||||
pre_colposcopy: ['pre_colposcopy', 'surveillance'],
|
||||
post_colposcopy: ['post_colposcopy'],
|
||||
post_treatment: ['post_treatment'],
|
||||
};
|
||||
|
||||
/** What the risk section says when she is not eligible in her clinical scenario, from its latest
|
||||
@@ -15,6 +14,8 @@ export function ineligibility(
|
||||
status: string,
|
||||
day: string,
|
||||
): string | undefined {
|
||||
// a treated patient has no risk estimate, whatever visit was indexed
|
||||
if (status === 'post_treatment') return 'No disponible por: paciente ya tratada.';
|
||||
if (state.kind !== 'evaluated') return undefined;
|
||||
for (const scenario of SCENARIOS[status] ?? []) {
|
||||
// visits come latest first
|
||||
@@ -27,8 +28,5 @@ export function ineligibility(
|
||||
: `No disponible por: ${latest.reasons.map((r) => r.text).join('; ')}.`;
|
||||
}
|
||||
}
|
||||
// after treatment the platform shows no risk for now, whether or not it indexed a visit
|
||||
return status === 'post_treatment'
|
||||
? 'No disponible por: Escenario que la plataforma no evalúa por ahora.'
|
||||
: undefined;
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user