|
|
@@ -23,6 +23,7 @@ import { saveRisData } from '../../domain/patient/risSaveLogic';
|
|
|
import { columnConfigService } from '@/config/tableColumns';
|
|
|
import { ColumnConfig } from '@/config/tableColumns/types/columnConfig';
|
|
|
import { useMultiSelection } from '@/hooks/useMultiSelection';
|
|
|
+import AppendViewModal from '../exam/components/AppendViewModal';
|
|
|
|
|
|
const { useBreakpoint } = Grid;
|
|
|
|
|
|
@@ -31,6 +32,8 @@ const WorklistPage: React.FC = () => {
|
|
|
const [drawerVisible, setDrawerVisible] = useState(false);
|
|
|
const [columnConfig, setColumnConfig] = useState<ColumnConfig[]>([]); // 新增:列配置状态
|
|
|
const [selectedPatientForPortrait, setSelectedPatientForPortrait] = useState<Task | null>(null); // 照片显示用的选中患者
|
|
|
+ const [isAppendModalOpen, setIsAppendModalOpen] = useState(false); // 追加体位模态框状态
|
|
|
+ const [currentStudy, setCurrentStudy] = useState<any>(null); // 当前保存的study信息
|
|
|
|
|
|
// 启用RIS自动同步(在后台静默运行)
|
|
|
useRisAutoSync();
|
|
|
@@ -130,8 +133,12 @@ const WorklistPage: React.FC = () => {
|
|
|
|
|
|
// 判断是否为RIS数据
|
|
|
if (record.entry_id) {
|
|
|
- // RIS数据:触发保存到本地
|
|
|
- saveRisData(record.entry_id);
|
|
|
+ // RIS数据:触发保存到本地,保存成功后打开追加体位对话框
|
|
|
+ saveRisData(record.entry_id, (study) => {
|
|
|
+ console.log('[WorklistPage] RIS数据保存成功,Study ID:', study.study_id, '打开追加体位对话框');
|
|
|
+ setCurrentStudy(study);
|
|
|
+ setIsAppendModalOpen(true);
|
|
|
+ });
|
|
|
} else {
|
|
|
// 本地study数据:进入检查
|
|
|
worklistToExam(record);
|
|
|
@@ -228,6 +235,79 @@ const WorklistPage: React.FC = () => {
|
|
|
</Col>
|
|
|
</Row>
|
|
|
)}
|
|
|
+
|
|
|
+ {/* 追加体位模态框 */}
|
|
|
+ <AppendViewModal
|
|
|
+ open={isAppendModalOpen}
|
|
|
+ onCancel={() => {
|
|
|
+ setIsAppendModalOpen(false);
|
|
|
+ setCurrentStudy(null); // 关闭时清空study信息
|
|
|
+ }}
|
|
|
+ studyId={currentStudy?.study_id}
|
|
|
+ currentWork={currentStudy}
|
|
|
+ onSuccess={() => {
|
|
|
+ // 追加成功后进入检查
|
|
|
+ if (currentStudy) {
|
|
|
+ // 创建Task对象用于进入检查
|
|
|
+ const taskForExam: Task = {
|
|
|
+ StudyInstanceUID: currentStudy.study_instance_uid,
|
|
|
+ StudyID: currentStudy.study_id,
|
|
|
+ SpecificCharacterSet: currentStudy.specific_character_set,
|
|
|
+ AccessionNumber: currentStudy.accession_number,
|
|
|
+ PatientID: currentStudy.patient_id,
|
|
|
+ PatientName: currentStudy.patient_name,
|
|
|
+ DisplayPatientName: currentStudy.patient_name,
|
|
|
+ PatientSize: currentStudy.patient_size,
|
|
|
+ PatientAge: currentStudy.patient_age,
|
|
|
+ PatientSex: currentStudy.patient_sex,
|
|
|
+ AdmittingTime: currentStudy.admitting_time || '',
|
|
|
+ RegSource: currentStudy.reg_source,
|
|
|
+ StudyStatus: currentStudy.study_status,
|
|
|
+ RequestedProcedureID: '',
|
|
|
+ PerformedProtocolCodeValue: '',
|
|
|
+ PerformedProtocolCodeMeaning: '',
|
|
|
+ PerformedProcedureStepID: '',
|
|
|
+ StudyDescription: currentStudy.study_description,
|
|
|
+ StudyStartDatetime: currentStudy.study_start_datetime || '',
|
|
|
+ ScheduledProcedureStepStartDate: currentStudy.scheduled_procedure_step_start_date || '',
|
|
|
+ StudyLock: currentStudy.study_lock,
|
|
|
+ OperatorID: currentStudy.operator_name,
|
|
|
+ Modality: currentStudy.modality,
|
|
|
+ Views: [], // 会在worklistToExam中填充
|
|
|
+ Thickness: currentStudy.thickness,
|
|
|
+ PatientType: currentStudy.patient_type,
|
|
|
+ StudyType: currentStudy.study_type,
|
|
|
+ QRCode: '',
|
|
|
+ IsExported: currentStudy.is_exported,
|
|
|
+ IsEdited: currentStudy.is_edited,
|
|
|
+ WorkRef: '',
|
|
|
+ IsAppended: currentStudy.is_appended,
|
|
|
+ CreationTime: currentStudy.create_time,
|
|
|
+ MappedStatus: currentStudy.mapped_status,
|
|
|
+ IsDelete: false,
|
|
|
+ patient_dob: currentStudy.patient_dob,
|
|
|
+ ref_physician: currentStudy.ref_physician,
|
|
|
+ weight: currentStudy.weight,
|
|
|
+ length: currentStudy.length,
|
|
|
+ comment: currentStudy.comment,
|
|
|
+ // 宠物相关字段
|
|
|
+ owner_name: currentStudy.owner_name,
|
|
|
+ chip_number: currentStudy.chip_number,
|
|
|
+ variety: currentStudy.variety,
|
|
|
+ sex_neutered: currentStudy.sex_neutered,
|
|
|
+ is_anaesthesia: currentStudy.is_anaesthesia,
|
|
|
+ is_sedation: currentStudy.is_sedation,
|
|
|
+ pregnancy_status: currentStudy.pregnancy_status,
|
|
|
+ // 患者照片字段
|
|
|
+ portrait_status: currentStudy.portrait_status,
|
|
|
+ portrait_file: currentStudy.portrait_file,
|
|
|
+ };
|
|
|
+
|
|
|
+ console.log('[WorklistPage] 追加成功,进入检查:', taskForExam.StudyID);
|
|
|
+ worklistToExam(taskForExam);
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ />
|
|
|
</div>
|
|
|
);
|
|
|
};
|