Add DICOM UPP patient name matching

This commit is contained in:
Codex
2026-05-28 09:52:17 +08:00
parent 160790d38d
commit 026f6ce83c
4 changed files with 137 additions and 4 deletions

View File

@@ -145,6 +145,10 @@ function annotationLabels(row) {
return labels.length ? labels : dicomParts(row);
}
function patientNameMismatch(row) {
return row.pacs_present && row.stl_asset_present && row.patient_name_match === "different";
}
function setDbStatus(data) {
app.viewerUrl = data.viewer_url || app.viewerUrl;
const pill = $("dbStatus");
@@ -210,7 +214,14 @@ function renderList() {
<span>${escapeHtml(row.pacs_patient_name || row.upp_patient_name || "无姓名")} · ${escapeHtml(row.patient_id || row.patient_id_masked || "无ID")}</span>
<small>DICOM ${Number(row.pacs_series_count || 0)} 序列${stlCount ? ` · STL ${stlCount}` : ""}</small>
</div>
<i class="mini-badge ${escapeHtml(row.relation_status)}">${escapeHtml(statusLabel(row.relation_status))}</i>
<div class="card-status">
<i class="mini-badge ${escapeHtml(row.relation_status)}">${escapeHtml(statusLabel(row.relation_status))}</i>
${
patientNameMismatch(row)
? `<small class="name-check-warning" title="${escapeHtml(row.patient_name_match_note || "DICOM 与 UPP 患者姓名不一致")}">姓名需核对</small>`
: ""
}
</div>
</div>
<div class="card-tag-rail">
${row.algorithm_model ? `<em class="model-tag" title="${escapeHtml(row.algorithm_model)}">${escapeHtml(row.algorithm_model)}</em>` : ""}
@@ -316,10 +327,11 @@ function renderDetail(row) {
renderDl("stlDetails", [
["CT号", row.stl_ct_number],
["患者", row.upp_patient_name],
["STL状态", row.stl_present ? "存在" : "缺失"],
["重建模型", row.algorithm_model],
["UPP状态", row.upp_status],
["患者", row.upp_patient_name],
["姓名核对", row.patient_name_match === "different" ? row.patient_name_match_note : row.patient_name_match === "same" ? row.patient_name_match_note || "匹配" : ""],
["年龄/性别", [row.patient_age, row.upp_patient_sex].filter(Boolean).join(" / ")],
["检查时间", fmtDate(row.exam_date)],
["任务时间", fmtDate(row.task_created_at)],

View File

@@ -430,6 +430,27 @@ button {
gap: 7px;
}
.card-status {
display: grid;
justify-items: end;
gap: 5px;
}
.name-check-warning {
max-width: 84px;
padding: 2px 7px;
overflow: hidden;
border: 1px solid rgba(240, 181, 78, 0.58);
border-radius: 999px;
color: #ffe0a3;
background: rgba(240, 181, 78, 0.1);
font-size: 11px;
font-weight: 700;
line-height: 1.45;
text-overflow: ellipsis;
white-space: nowrap;
}
.mini-badge {
flex: 0 0 auto;
padding: 2px 7px;