Commit aac46403 by luoqi

fix(web): 病历快读 P(计划)块顺序 → 治疗计划/本次治疗/处置/医生建议/医嘱

按业务要求调整 SOAP 计划段子块顺序:原 处置→本次治疗→治疗计划→医生建议→医嘱
改为 治疗计划→本次治疗→处置→医生建议→医嘱。纯 JSX 重排,无逻辑/数据变化。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
parent d4fbbd45
......@@ -287,36 +287,21 @@ function EmrSection({
{/* P */}
{(disposals.length > 0 || actualTx.length > 0 || plannedTx.length > 0 || recommendations.length > 0 || doctorAdvice) && (
<SoapBlock letter="P" tone="emerald" title="计划(Plan)">
{disposals.length > 0 && (
<div className="mb-2">
<div className="text-[11px] text-slate-500 mb-1">处置:</div>
<ul className="space-y-1">
{disposals.map((x, i) => (
<li key={i} className="text-[12px] text-slate-700 leading-relaxed whitespace-pre-line">
{x.toothPosition && (
<span className="inline-block px-1.5 py-0 mr-1.5 bg-slate-100 text-slate-700 rounded text-[10.5px] tabular-nums align-middle">
{formatToothPosition(x.toothPosition, 999)}
</span>
)}
{x.message}
</li>
))}
</ul>
</div>
)}
{actualTx.length > 0 && (
{/* 顺序:治疗计划 → 本次治疗 → 处置 → 医生建议 → 医嘱(业务要求)*/}
{plannedTx.length > 0 && (
<div className="mb-2">
<div className="text-[11px] text-slate-500 mb-1">本次治疗:</div>
<div className="text-[11px] text-slate-500 mb-1">治疗计划:</div>
<ul className="space-y-1">
{actualTx.map((tx) => {
{plannedTx.map((tx) => {
const tc = tx.content as Record<string, unknown>;
const subtype = String(tc.subtype ?? '');
const cat = String(tc.category ?? '');
// badge 显示字典翻译(periodontic → 牙周),沿用 key 样式(emerald)
const badgeText = cat ? treatmentCategoryNameZh(cat) : '治疗';
const tooth = String(tc.tooth_position ?? '');
return (
<li key={tx.id} className="text-[12px] text-slate-700 leading-relaxed">
<span className="px-1.5 py-px mr-1.5 bg-teal-50 text-teal-700 rounded text-[10.5px] font-medium">
<span className="px-1.5 py-px mr-1.5 bg-emerald-50 text-emerald-700 rounded text-[10.5px] font-medium">
{badgeText}
</span>
<span className="font-medium">{subtype}</span>
......@@ -327,20 +312,19 @@ function EmrSection({
</ul>
</div>
)}
{plannedTx.length > 0 && (
{actualTx.length > 0 && (
<div className="mb-2">
<div className="text-[11px] text-slate-500 mb-1">治疗计划:</div>
<div className="text-[11px] text-slate-500 mb-1">本次治疗:</div>
<ul className="space-y-1">
{plannedTx.map((tx) => {
{actualTx.map((tx) => {
const tc = tx.content as Record<string, unknown>;
const subtype = String(tc.subtype ?? '');
const cat = String(tc.category ?? '');
// badge 显示字典翻译(periodontic → 牙周),沿用 key 样式(emerald)
const badgeText = cat ? treatmentCategoryNameZh(cat) : '治疗';
const tooth = String(tc.tooth_position ?? '');
return (
<li key={tx.id} className="text-[12px] text-slate-700 leading-relaxed">
<span className="px-1.5 py-px mr-1.5 bg-emerald-50 text-emerald-700 rounded text-[10.5px] font-medium">
<span className="px-1.5 py-px mr-1.5 bg-teal-50 text-teal-700 rounded text-[10.5px] font-medium">
{badgeText}
</span>
<span className="font-medium">{subtype}</span>
......@@ -351,6 +335,23 @@ function EmrSection({
</ul>
</div>
)}
{disposals.length > 0 && (
<div className="mb-2">
<div className="text-[11px] text-slate-500 mb-1">处置:</div>
<ul className="space-y-1">
{disposals.map((x, i) => (
<li key={i} className="text-[12px] text-slate-700 leading-relaxed whitespace-pre-line">
{x.toothPosition && (
<span className="inline-block px-1.5 py-0 mr-1.5 bg-slate-100 text-slate-700 rounded text-[10.5px] tabular-nums align-middle">
{formatToothPosition(x.toothPosition, 999)}
</span>
)}
{x.message}
</li>
))}
</ul>
</div>
)}
{recommendations.length > 0 && (
<div className="mb-2">
<div className="text-[11px] text-slate-500 mb-1">医生建议:</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment