import { Observable } from 'rxjs'; export type EstadoEvaluacionCacu = 'preliminary' | 'final'; export type TipoCensuraCacu = 'prevalente' | 'incidente' | 'izquierda' | 'derecha' | 'derechaBasal' | 'no_informativo'; export interface CohorteRiesgoCacu { url: string; version: string; fecha_indice: string; tipo_censura: TipoCensuraCacu | null; c: number | null; l: number | null; r: number | null; pap_0: string | null; hpv_0: string | null; } export interface HorizonteRiesgoCacu { horizonte_anios: number; /** Transport values remain probabilities in [0, 1], never percentages. */ probabilidad: number; ic_bajo?: number | null; ic_alto?: number | null; estado: EstadoEvaluacionCacu; } export interface LoteRiesgoCacu { lote_id: number; modelo_nombre: string; modelo_version: string; evaluado_en: string; estado_lote: EstadoEvaluacionCacu; horizontes: HorizonteRiesgoCacu[]; } /** DEV-only contract from cacu_riesgo_paciente.md, 2026-10-28. */ export interface RiesgoPacienteCacu { simulado: true; cohorte: CohorteRiesgoCacu | null; riesgo: LoteRiesgoCacu | null; } /** `null` when the patient has no risk data. */ export interface PacienteRiesgoProvider { obtener(pacId: string): Observable; } export type PacienteRiesgoEstado = | { tipo: 'cargando' | 'no-disponible' | 'error' } | { tipo: 'disponible'; datos: RiesgoPacienteCacu };