Browse Source

注册功能,切换患者类型与身体部位时,触发查询协议或者体位

dengdx 2 months ago
parent
commit
91e6a0f219
1 changed files with 14 additions and 0 deletions
  1. 14 0
      src/pages/patient/components/RegisterAvailableFilterBar.tsx

+ 14 - 0
src/pages/patient/components/RegisterAvailableFilterBar.tsx

@@ -86,6 +86,13 @@ const RegisterAvailableFilterBar: React.FC<Props> = ({
               const selectedBodyPart =
                 bodyParts.find((item) => item.body_part_id == val) || null;
               dispatch(setCurrentBodyPart(selectedBodyPart));
+              dispatch(
+                fetchViewsOrProtocols({
+                  selection: selected,
+                  patientType: currentPatientType?.patient_type_id ?? null,
+                  bodyPart: selectedBodyPart?.body_part_id ?? null,
+                })
+              );
             }}
             disabled={!currentPatientType}
           />
@@ -106,6 +113,13 @@ const RegisterAvailableFilterBar: React.FC<Props> = ({
                 (item) => item.patient_type_id === val
               );
               dispatch(setCurrentPatientType(selectedPatientType || null));
+              dispatch(
+                fetchViewsOrProtocols({
+                  selection: selected,
+                  patientType: selectedPatientType?.patient_type_id ?? null,
+                  bodyPart: currentBodyPart?.body_part_id ?? null,
+                })
+              );
             }}
           />
         </Col>