Explorar el Código

下医嘱校验项目年龄和性别

‘chenzhilei’ hace 1 mes
padre
commit
1e47129ff3

+ 30 - 1
src/components/zhu-yuan-yi-sheng/YzTag.vue

@@ -25,7 +25,8 @@ import {
   getDrgIntelligentGrouping,
   getEmrTemplateUrl,
 } from "@/api/zhu-yuan-yi-sheng/emr-patient";
-import router from "@/router";
+import {FYSystemUrl,CK_CODE} from "@/config/index";
+import  router from "@/router";
 import { isDev } from "@/utils/public";
 import { xcMessage } from "@/utils/xiaochan-element-plus";
 import sleep from "@/utils/sleep";
@@ -135,6 +136,34 @@ const pathList = ref([
     },
     disable: true,
   },
+  {
+    title: "妇幼上报",
+    func: () => {
+      if (props.patientInfo.inpatientNo && CK_CODE == props.patientInfo.admissDept) {
+        
+          let data = {
+            "healthNo":"",
+            "patientNo":props.patientInfo.inpatientNo,
+            "hospitalNo":"",
+            "outpatientNo":"",
+            "name":props.patientInfo.name,
+            "cardType":"01",
+            "cardNo":props.patientInfo.socialNo?props.patientInfo.socialNo:"",
+            "birthday":"",
+            "age":"",
+            "tel":props.patientInfo.homeTel?props.patientInfo.homeTel:"",
+            "workOrgan":"",
+            "lmp":""
+          }
+          const utf8Bytes = encodeURIComponent(JSON.stringify(data)).replace(/%([0-9A-F]{2})/g, (_, hex) => {
+              return String.fromCharCode(parseInt(hex, 16));
+          });
+          let url = FYSystemUrl + btoa(utf8Bytes);
+          window.open(url, "_blank");  
+      } 
+    },
+    disable: true,
+  },
 ]);
 const fileName = ref("v1.1.0");
 

+ 31 - 0
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-edit/YzEditor.vue

@@ -406,6 +406,9 @@ const searchClickFunc = async (row: SearchOrdersType): Promise<void> => {
     .setValue("execDept")
     .setValue("execDeptName")
     .setValue("drugSpecification")
+    .setValue("genderRestriction")
+    .setValue("maxAgeRestriction")
+    .setValue("minAgeRestriction")
     .setDefaultValueByName("newOrderFlag", 1)
     .setDefaultValueByName("statusFlag", "1");
 
@@ -460,6 +463,29 @@ const clearAndErrorMessage = (message: string) => {
   BizException(ExceptionEnum.MESSAGE_ERROR, message);
 };
 
+
+const checkYiZhuLimit = (yiZhuData: YzType,patientInfo: any) => {
+  var code = 0;
+    var age = patientInfo.age;
+    var sex = patientInfo.sex;
+    if (yiZhuData.genderRestriction && sex != yiZhuData.genderRestriction) {
+        let str = '项目'+yiZhuData.orderName+'要求性别为'+(yiZhuData.genderRestriction == '1'?'男':'女'+'请重新选择!');
+        BizException(ExceptionEnum.MESSAGE_ERROR,str);
+        code = 1;
+    }
+    if (yiZhuData.maxAgeRestriction && age > yiZhuData.maxAgeRestriction) {
+        let str = '项目'+yiZhuData.orderName+'要求年龄小于或等于'+(yiZhuData.maxAgeRestriction+'岁,请重新选择!');
+        BizException(ExceptionEnum.MESSAGE_ERROR,str);
+        code = 1;
+    }
+    if (yiZhuData.minAgeRestriction && age < yiZhuData.minAgeRestriction) {
+        let str = '项目'+yiZhuData.orderName+'要求年龄大于或等于'+(yiZhuData.maxAgeRestriction+'岁,请重新选择!');
+        BizException(ExceptionEnum.MESSAGE_ERROR,str);
+        code = 1;
+    }
+    return code;
+};
+
 const drugDefaultValue = async (
   isSearch: boolean,
   data: SearchOrdersType | YzType
@@ -892,6 +918,11 @@ const toAddAnOrder = async () => {
     setTheTemporaryVariableMedicalOrder();
     return true;
   }
+  // 进行患者年龄性别校验
+  if(checkYiZhuLimit(yiZhuData.value,props.patientInfo) == 1){
+    return true;
+  }
+
   let param = {
     inpatientNo: props.patientInfo.inpatientNo,
     admissTimes: props.patientInfo.admissTimes,

+ 4 - 1
src/config/index.js

@@ -1,3 +1,6 @@
 const showLogo = true // 是否显示Logo顶部模块
 const systemTitle = '工作集成平台' // 系统名称,用于显示在左上角模块,以及浏览器标题上使用,使用配置项
-export { systemTitle }
+const FYSystemUrl = 'http://58.33.165.250:20011/mchis-web/?token=321322199206140414&module=M102&data='
+// const CK_MZ_ClASS = '05'    //产科门诊类编码
+const CK_CODE = '1000509'  //产科编码
+export { systemTitle, FYSystemUrl,CK_CODE}

+ 18 - 0
src/views/dictionary/orderZdMaintain/compoents/orderitem/EditorDialog.vue

@@ -8,6 +8,7 @@ import XEUtils from "xe-utils";
 const props = defineProps<{
   data: YzOrderItemDTO;
   changeType: any[];
+  sexType: any[];
   ssType: any[];
   operations: any[];
 }>();
@@ -197,6 +198,23 @@ defineExpose<UseDialogType.Expose>({
           {{ tmpData.jyTypeName }}
         </el-form-item>
       </el-col>
+      <el-col :span="12">
+        <el-form-item label="适用性别:">
+          <el-select v-model="tmpData.genderRestriction" clearable>
+            <xc-el-option :data="sexType" />
+          </el-select>
+        </el-form-item>
+      </el-col>
+      <el-col :span="12">
+        <el-form-item label="适用最小年龄:">
+          <el-input-number v-model="tmpData.minAgeRestriction" :min="0" :max="100" />
+        </el-form-item>
+      </el-col>
+      <el-col :span="12">
+        <el-form-item label="适用最大年龄:">
+          <el-input-number v-model="tmpData.maxAgeRestriction" :min="0" :max="100" />
+        </el-form-item>
+      </el-col>
     </el-row>
   </el-form>
 </template>

+ 6 - 0
src/views/dictionary/orderZdMaintain/compoents/orderitem/OrderIten.vue

@@ -14,6 +14,11 @@ const operations = [
   { code: "s", name: "输血" },
 ];
 
+const sexType = [
+  { code: "1", name: "男" },
+  { code: "2", name: "女" }
+];
+
 const store = reactive({
   // 项目属性
   changeItemType: [],
@@ -101,6 +106,7 @@ function openEditorDialog(data) {
     params: {
       data: data,
       changeType: store.changeItemType,
+      sexType: sexType,
       ssType: store.ssType,
       operations,
     },

+ 15 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng.ts

@@ -79,6 +79,8 @@ export const huanZheXinXi: Ref<PatInfo> = ref({
   admissTimes: 0,
   inpatientNo: null,
   admissDate: "",
+  sex: null,
+  age: null,
 });
 
 export function clearPatInfo() {
@@ -97,6 +99,8 @@ export function clearPatInfo() {
     admissTimes: 0,
     inpatientNo: null,
     admissDate: "",
+    sex: null,
+    age: null,
   };
 }
 
@@ -266,6 +270,9 @@ export interface YzType {
 
   execDept: string;
   execDeptName: string;
+  genderRestriction: string;
+  maxAgeRestriction: string;
+  minAgeRestriction: string;
 }
 
 export interface SearchOrdersType {
@@ -393,6 +400,10 @@ export const yiZhuData = ref<YzType>({
   packSize: 0,
   execDept: "",
   execDeptName: "",
+
+  genderRestriction: "",
+  maxAgeRestriction: "",
+  minAgeRestriction: "",
 });
 
 export const yiZhuDataInit = (clearOrderNo: boolean = true): void => {
@@ -473,6 +484,10 @@ export const yiZhuDataInit = (clearOrderNo: boolean = true): void => {
     packSize: 0,
     execDept: "",
     execDeptName: "",
+
+    genderRestriction: "",
+    maxAgeRestriction: "",
+    minAgeRestriction: "",
   };
 };
 // 保存医嘱数据