|
|
@@ -33,7 +33,7 @@ const WorklistPage: React.FC = () => {
|
|
|
const [columnConfig, setColumnConfig] = useState<ColumnConfig[]>([]); // 新增:列配置状态
|
|
|
const [selectedPatientForPortrait, setSelectedPatientForPortrait] = useState<Task | null>(null); // 照片显示用的选中患者
|
|
|
const [isAppendModalOpen, setIsAppendModalOpen] = useState(false); // 追加体位模态框状态
|
|
|
- const [currentStudy, setCurrentStudy] = useState<any>(null); // 当前保存的study信息
|
|
|
+ const [currentStudy, setCurrentStudy] = useState<Task | null>(null); // 当前保存的study信息
|
|
|
|
|
|
// 启用RIS自动同步(在后台静默运行)
|
|
|
useRisAutoSync();
|
|
|
@@ -134,9 +134,9 @@ const WorklistPage: React.FC = () => {
|
|
|
// 判断是否为RIS数据
|
|
|
if (record.entry_id) {
|
|
|
// RIS数据:触发保存到本地,保存成功后打开追加体位对话框
|
|
|
- saveRisData(record.entry_id, (study) => {
|
|
|
- console.log('[WorklistPage] RIS数据保存成功,Study ID:', study.study_id, '打开追加体位对话框');
|
|
|
- setCurrentStudy(study);
|
|
|
+ saveRisData(record.entry_id, (task) => {
|
|
|
+ console.log('[WorklistPage] RIS数据保存成功,Study ID:', task.StudyID, '打开追加体位对话框');
|
|
|
+ setCurrentStudy(task);
|
|
|
setIsAppendModalOpen(true);
|
|
|
});
|
|
|
} else {
|
|
|
@@ -243,68 +243,14 @@ const WorklistPage: React.FC = () => {
|
|
|
setIsAppendModalOpen(false);
|
|
|
setCurrentStudy(null); // 关闭时清空study信息
|
|
|
}}
|
|
|
- studyId={currentStudy?.study_id}
|
|
|
+ studyId={currentStudy?.StudyID}
|
|
|
currentWork={currentStudy}
|
|
|
onSuccess={() => {
|
|
|
+ setIsAppendModalOpen(false);
|
|
|
// 追加成功后进入检查
|
|
|
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);
|
|
|
+ console.log('[WorklistPage] 追加成功,进入检查:', currentStudy.StudyID);
|
|
|
+ worklistToExam(currentStudy);
|
|
|
}
|
|
|
}}
|
|
|
/>
|