xiaochan пре 3 месеци
родитељ
комит
28d03d1dd2

+ 2 - 0
.env.production

@@ -10,6 +10,8 @@ VITE_DATA_BASE = 'http://172.16.32.167:9205'
 VITE_MAGIC_API_IFRAME = 'http://172.16.32.170:9207'
 VITE_CA_SCRIPT_ID = '2154eae0167611ef8717efceee160e36'
 
+VITE_EMR_OUT_PATIENT_DAY = 7
+
 VITE_HOSPITAL_NAME = '长沙泰和'
 VITE_SYSTEM_NAME = '工作集成平台'
 VITE_HOSPITAL_CODE = 'H43010500370'

+ 2 - 2
src/utils/setting.ts

@@ -4,7 +4,6 @@ type ImportMetaEnv = {
   readonly VITE_BASE_URL: string;
   readonly VITE_SOCKET_URL: string;
   readonly VITE_EMR_CONTROL_URL: string;
-
   readonly VITE_DATA_BASE: string;
   readonly VITE_MAGIC_API_IFRAME: string;
   readonly VITE_HOSPITAL_NAME: string;
@@ -12,9 +11,10 @@ type ImportMetaEnv = {
   readonly VITE_HOSPITAL_CODE: string;
   readonly VITE_UPLOAD_TEMPLATE_THUMB: string;
   readonly VITE_SOCKET_V2: string;
-
   // 电子病历医生签名的caid
   readonly VITE_CA_SCRIPT_ID: string;
+  // 电子病历出院超出几天后就不能编辑了
+  readonly VITE_EMR_OUT_PATIENT_DAY: string;
 };
 
 const env: ImportMetaEnv = isProduction

+ 6 - 3
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/Home.vue

@@ -96,6 +96,7 @@ import { cptSex } from "@/utils/computed";
 import { getOverView } from "@/api/inpatient/patient";
 import XEUtils from "xe-utils";
 import { xcMessage } from "@/utils/xiaochan-element-plus";
+import env from "@/utils/setting";
 
 const EmrLeaveHospitalPatient = defineAsyncComponent(
   () => import("@/components/zhu-yuan-yi-sheng/emr/EmrLeaveHospitalPatient.vue")
@@ -227,8 +228,11 @@ const queryDisPatient = async () => {
     patientInfo.value.disDate
   );
 
+  const outDay = XEUtils.toNumber(env.VITE_EMR_OUT_PATIENT_DAY);
+
   // 如果患者的出院时间大于 7 天就只能看病历和打印病历了
-  emrConfig.value.editor = (patientInfo.value!.dischargeDays as number) <= 7;
+  emrConfig.value.editor =
+    (patientInfo.value!.dischargeDays as number) <= outDay;
 
   // 如果超过了七天就去查看是否有申请编辑
   if (!emrConfig.value.editor) {
@@ -236,8 +240,7 @@ const queryDisPatient = async () => {
   }
 
   if (!emrConfig.value.editor) {
-    const message =
-      "患者出院超7天,无法编辑病历,如需编辑请点击【解锁限制】,待审核完成后刷新页面即可。";
+    const message = `患者出院超${outDay}天,无法编辑病历,如需编辑请点击【解锁限制】,待审核完成后刷新页面即可。`;
     const notification = ElNotification({
       message: (
         <div>