Ver Fonte

study_type

sw há 1 mês atrás
pai
commit
b14073d84b

+ 2 - 2
src/pages/patient/components/register.form.tsx

@@ -292,7 +292,7 @@ const BasicInfoForm: React.FC<BasicInfoFormProps> = ({ style, form }) => {
           })}
         />
       </Form.Item>
-      <Form.Item
+      {/* <Form.Item
         label={
           <FormattedMessage
             id="register.patientType"
@@ -310,7 +310,7 @@ const BasicInfoForm: React.FC<BasicInfoFormProps> = ({ style, form }) => {
             defaultMessage: 'register.patientType.placeholder',
           })}
         />
-      </Form.Item>
+      </Form.Item> */}
       <Form.Item
         label={
           <FormattedMessage

+ 10 - 10
src/validation/patient/registerSchema.ts

@@ -9,7 +9,7 @@ import {
 import { RegisterInfo } from '@/API/patient/workActions';
 import { Rule } from 'antd/es/form';
 
-type IgnoredKeys = 'views' | 'study_type' | 'modality'; // 这些字段不在表单中填写
+type IgnoredKeys = 'views' | 'study_type' | 'modality' | 'patient_type'; // 这些字段不在表单中填写
 const registerInfoSchema: Record<
   keyof Omit<RegisterInfo, IgnoredKeys>,
   z.ZodTypeAny
@@ -28,7 +28,7 @@ const registerInfoSchema: Record<
   pregnancy_status: z.string().optional(),
   chip_number: z.string().optional(),
   variety: z.string().optional(),
-  patient_type: z.string().nonempty(),
+  // patient_type: z.string().nonempty(),
   ref_physician: z.string().optional(),
   operator_id: z.string().optional(),
   weight: z.number().optional(),
@@ -132,14 +132,14 @@ export const registerFormFields = {
     message: 'Variety is optional',
     trigger: ['onChange', 'onBlur'],
   },
-  patient_type: {
-    label: 'Patient Type',
-    required: true,
-    requiredLabel: '',
-    validation: zodToAntdRules(registerformSchema.shape.patient_type),
-    message: 'Patient Type is optional',
-    trigger: ['onChange', 'onBlur'],
-  },
+  // patient_type: {
+  //   label: 'Patient Type',
+  //   required: true,
+  //   requiredLabel: '',
+  //   validation: zodToAntdRules(registerformSchema.shape.patient_type),
+  //   message: 'Patient Type is optional',
+  //   trigger: ['onChange', 'onBlur'],
+  // },
   ref_physician: {
     label: 'Referring Physician',
     required: false,