Records show the server's names for coded results; risk lists say empty only once loaded

This commit is contained in:
Roberto Treviño
2026-11-29 06:43:10 -06:00
parent d09e8c59ed
commit ac1d8fc4fa
4 changed files with 17 additions and 10 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ export function reading(report: MeasureReport | undefined): Reading | undefined
} }
/** Codes as the screens name them. */ /** Codes as the screens name them. */
const LABELS: Record<string, string> = { export const LABELS: Record<string, string> = {
NILM: 'Normal (NILM)', NILM: 'Normal (NILM)',
LSIL: 'LIEBG', LSIL: 'LIEBG',
HSIL: 'LIEAG', HSIL: 'LIEAG',
+5 -3
View File
@@ -154,9 +154,11 @@
<td class="num">{{ row.daysToDiagnosis ?? 'No disponible' }}</td> <td class="num">{{ row.daysToDiagnosis ?? 'No disponible' }}</td>
</tr> </tr>
} @empty { } @empty {
<tr> @if (page() && !loading()) {
<td colspan="10" class="muted">No hay registros para los filtros aplicados.</td> <tr>
</tr> <td colspan="10" class="muted">No hay registros para los filtros aplicados.</td>
</tr>
}
} }
</tbody> </tbody>
</table> </table>
+5 -3
View File
@@ -90,9 +90,11 @@
<td>{{ priority(row.priority) }}</td> <td>{{ priority(row.priority) }}</td>
</tr> </tr>
} @empty { } @empty {
<tr> @if (page() && !loading()) {
<td colspan="6" class="muted">No hay registros para los filtros aplicados.</td> <tr>
</tr> <td colspan="6" class="muted">No hay registros para los filtros aplicados.</td>
</tr>
}
} }
</tbody> </tbody>
</table> </table>
+6 -3
View File
@@ -20,7 +20,7 @@ import type { Domain } from '../api/models/domain';
import { code, EXT, ext, Fhir, label, resources } from '../fhir'; import { code, EXT, ext, Fhir, label, resources } from '../fhir';
import { scenarioFigure } from '../gobernanza/figures'; import { scenarioFigure } from '../gobernanza/figures';
import { CURP } from '../indicadores/follow-up'; import { CURP } from '../indicadores/follow-up';
import { name } from '../indicadores/measures'; import { LABELS, name } from '../indicadores/measures';
import { import {
BIOMARKER_NAMES, BIOMARKER_NAMES,
byDeviation, byDeviation,
@@ -36,8 +36,11 @@ import { Loading } from '../loading';
/** An Observation's value as the screens say it, whatever its type. */ /** An Observation's value as the screens say it, whatever its type. */
function shown(o: Observation): string { function shown(o: Observation): string {
if (o.valueBoolean !== undefined) return o.valueBoolean ? 'positivo' : 'negativo'; if (o.valueBoolean !== undefined) return o.valueBoolean ? 'positivo' : 'negativo';
if (o.valueCodeableConcept) if (o.valueCodeableConcept) {
return name(code(o.valueCodeableConcept) ?? '') || label(o.valueCodeableConcept); // The screens' own name for the code (BI-RADS 4C), else the server's display.
const c = code(o.valueCodeableConcept) ?? '';
return (c in LABELS ? name(c) : '') || label(o.valueCodeableConcept);
}
if (o.valueQuantity) return `${o.valueQuantity.value} ${o.valueQuantity.unit ?? ''}`.trim(); if (o.valueQuantity) return `${o.valueQuantity.value} ${o.valueQuantity.unit ?? ''}`.trim();
return o.valueString ?? o.valueDateTime ?? ''; return o.valueString ?? o.valueDateTime ?? '';
} }