Browse Source

feat(exam): add code and comments for animal system compatibility (not functional yet)

sw 8 hours ago
parent
commit
c33382dd7b
2 changed files with 31 additions and 0 deletions
  1. 29 0
      src/API/patient/viewActions.ts
  2. 2 0
      src/states/exam/bodyPositionListSlice.ts

+ 29 - 0
src/API/patient/viewActions.ts

@@ -42,6 +42,30 @@ export interface View {
       RatioFactorLength: number;
       RatioFactorLength: number;
       TargetEXI: number;
       TargetEXI: number;
     };
     };
+    // 动物???
+    Common: {
+      CollimatorCenter: string;
+      CollimatorFilter: string;
+      CollimatorNoChange: boolean;
+      CollimatorSize: string;
+      CollimatorSizeLength: string;
+      CollimatorSizeWidth: string;
+      ImageHorizontalFlip: string;
+      ImageInvert: boolean;
+      ImageLaterality: string;
+      ImageRotate: string;
+      LabelPosition: string;
+      RatioFactorLength: number;
+      RatioFactorSize: number;
+      RatioFactorThickness: number;
+      RatioFactorWeight: number;
+      StandPos: string;
+      TargetEXI: number;
+      UseMaskMapMatrix: boolean;
+      ViewID: string;
+      XIndex: number;
+      YIndex: number;
+    };
   };
   };
   sort: number;
   sort: number;
   is_enabled: boolean;
   is_enabled: boolean;
@@ -84,7 +108,12 @@ export const fetchViews = async (
 };
 };
 
 
 export const fetchViewDetail = async (id: string): Promise<View> => {
 export const fetchViewDetail = async (id: string): Promise<View> => {
+  console.log(`[viewActions] Fetching view detail for ID: ${id}`);
   const response = await axiosInstance.get(`/auth/protocol/view/${id}`);
   const response = await axiosInstance.get(`/auth/protocol/view/${id}`);
+  console.log(
+    `[viewActions] View detail response:`,
+    JSON.stringify(response.data, null, 3)
+  );
   return response.data.data;
   return response.data.data;
 };
 };
 
 

+ 2 - 0
src/states/exam/bodyPositionListSlice.ts

@@ -66,8 +66,10 @@ const transformWorksToBodyPositions = async (
           ...viewDetail,
           ...viewDetail,
           collimator_length:
           collimator_length:
             viewDetail.config_object.DX.CollimatorSizeLength || 0,
             viewDetail.config_object.DX.CollimatorSizeLength || 0,
+          // viewDetail.config_object.Common.CollimatorSizeLength || 0, 用于动物
           collimator_width:
           collimator_width:
             viewDetail.config_object.DX.CollimatorSizeWidth || 0,
             viewDetail.config_object.DX.CollimatorSizeWidth || 0,
+          // viewDetail.config_object.Common.CollimatorSizeWidth || 0, 用于动物
           sid: '', // todo 这里还缺少值的来源
           sid: '', // todo 这里还缺少值的来源
           patient_name: work.PatientName,
           patient_name: work.PatientName,
           patient_id: work.PatientID,
           patient_id: work.PatientID,