Browse Source

首次病程录编辑功能进行中

xiezhiming 9 months ago
parent
commit
62d9acaf36
2 changed files with 126 additions and 19 deletions
  1. 1 0
      src/js/api.js
  2. 125 19
      src/js/qcScore.js

+ 1 - 0
src/js/api.js

@@ -246,6 +246,7 @@ const api = {
   getMedRecordContentOther: '/qc/medRecordOther/getMedRecordContentOther', //文书内容展示
 
   sendHomePageIng: "qc/data/sendHomePageIng",//病例首页修改
+  editFirstRecordInfos: "/str/FirstRecord/infos", //病例编辑功能接口
 
   doctorAverageStatistics: '/consoleByDoctor/doctorAverageStatistics', //各科室平均分列表
   doctorAverageStatisticsExport: '/consoleByDoctor/doctorAverageStatisticsExport', //各科室平均分列表导出

+ 125 - 19
src/js/qcScore.js

@@ -228,8 +228,8 @@ $(function () {
         const list2 = pageData.病案首页
         const diagList = JSON.parse(list2[0].出院诊断)
         const operaList = JSON.parse(list2[0].手术信息)
-        console.log("diagList", diagList)
-        console.log("operaList", operaList);
+        // console.log("diagList", diagList)
+        // console.log("operaList", operaList);
         global_diagList = diagList;
         global_operaList = operaList;
 
@@ -1093,7 +1093,7 @@ $(function () {
     return hml;
   }
 
-  //抽取变量
+  /**抽取变量*/
   function extractVars(org) {
     const regexp = /(【(.+?)】)/g;
     const arr = org.split(regexp);
@@ -1105,7 +1105,7 @@ $(function () {
     }
     return htl;
   }
-  //获取所有模板
+  /**获取所有模板*/
   function getAllModules() {
     const param = {
       hospitalId: getUrlArgObject("hid"),
@@ -1158,6 +1158,7 @@ $(function () {
       }
     });
   }
+  /**编辑状态*/
   var isEditing = {
     "病案首页": false,
     "入院记录": false,
@@ -1167,13 +1168,9 @@ $(function () {
     "会诊结果单": false,
     "出院小结": false
   }
-  // $().attr('contenteditable', isEditing);
-
   $("body").on("click", ".save", function () {
-
-    // global_activeTab
+    // 切换状态
     isEditing[global_activeTab] = !isEditing[global_activeTab]
-    // isEditing = !isEditing; // 切换状态
     if (isEditing[global_activeTab]) {
       console.log("编辑中");
       $(this).text('保存');
@@ -1191,18 +1188,112 @@ $(function () {
         case "入院记录":
           saveAdmissionRecordUpdate()
           $(this).text('编辑');
+          break
+        case "首次病程录":
+
           break
         default:
           $(this).text('编辑');
       }
-
-
     }
     $(`.content-item[code=${global_activeTab}]`).find('p, .embed-table .table-1 td, .opera-table td,.embed-table .table-2 td,.inner-table td').attr('contenteditable', isEditing[global_activeTab]);
   });
 
+  /**首次病程录更新*/
+  function firstRecordUpdate() {
+    /**病人住院ID*/
+    const behospitalCode = global_id
+    /**医院ID*/
+    const hospitalId = getUrlArgObject("hid")
+    /**姓名*/
+    const name = $('#anchor2019 p').text()
+    /**性别*/
+    const sex = $('anchor1954 p').text()
+    /**年龄*/
+    const age = $('#anchor1956 p').text().replace("岁", "")
+    /**科别*/
+    const deptName = $('anchor2032 p').text()
+    /**床号*/
+    const bedNo = $('anchor2030 p').text()
+    /**病历日期*/
+    const recordDate = $('anchor2027 p').text()
+    /** 标题 */
+    const recTitle = '';
+
+    /** 主诉 */
+    const chief = '';
+
+    /** 现病史 */
+    const present = '现病史';
+
+    /** 既往史 */
+    const pastHistory = '既往史';
+
+    /** 查体 */
+    const vital = '查体';
+
+    /** 辅检 */
+    const assistantExam = '辅检';
+
+    /** 病例特点 */
+    const caseCharacter = '病例特点';
+
+    /** 初步诊断 */
+    const tentativeDiagnosis = '初步诊断';
+
+    /** 诊断依据 */
+    const supplyDiagnosis = '诊断依据';
+
+    /** 鉴别诊断 */
+    const revisedDiagnosis = '鉴别诊断';
+
+    /** 诊疗计划(方案) */
+    const treatPlan = '诊疗计划(方案)';
+
+    /** 记录医生 */
+    const recDoctor = '记录医生';
+
+    /** 记录时间 */
+    const recDate = '记录时间';
+
+    /** 审核医生 */
+    const auditDoctor = '审核医生';
+
+    /** 审核时间 */
+    const auditDate = '审核时间';
+
+    /** 主诊医生 */
+    const chiefDoctor = '主诊医生';
+
+    /** 发热 */
+    const fever = '发热';
+
+    /** 咳嗽等呼吸道症状 */
+    const coughSymptom = '咳嗽等呼吸道症状';
+
+    /** 入院时使用的治疗性药物 */
+    const entryMedication = '入院时使用的治疗性药物';
+
+    /** 成瘾药物 */
+    const addiMedication = '成瘾药物';
+
+    /** 入院时间 */
+    const behospitalDate = '入院时间';
+
+
+  }
+
   /**保存入院记录数据更新*/
   function saveAdmissionRecordUpdate() {
+    /**入院记录编号*/
+    const homePageId = $(`.content-item[code=${global_activeTab}] .title`).text().match(/\d+/)[0]
+    /**医院ID*/
+    const hospitalId = getUrlArgObject("hid")
+    /**病人住院ID*/
+    const behospitalCode = getUrlArgObject("id")
+
+    /**病人年龄*/
+    const age = $('#anchor22325 p').text().replace("岁", "")
     return true
   }
 
@@ -1210,7 +1301,6 @@ $(function () {
   function saveOrUpdate() {
     /**病案首页编号*/
     const homePageId = $(`.content-item[code=${global_activeTab}] .title`).text().match(/\d+/)[0]
-
     /**医院ID*/
     const hospitalId = getUrlArgObject("hid")
     /**病人住院ID*/
@@ -1241,10 +1331,12 @@ $(function () {
     const ageUnit = "岁"
     /**国籍*/
     const nationality = $('#anchor22324 p').text()
+
+    let split_anchor2243 = $('#anchor2243 p').text().split(/[天月]/)
     /**新生儿出生月数*/
-    const newbornMonth = ""
+    const newbornMonth = split_anchor2243 ? split_anchor2243[0].trim() : ""
     /**新生儿出生天数*/
-    const newbornDay = ""
+    const newbornDay = split_anchor2243 ? split_anchor2243[1].trim() : ""
     /**新生儿出生体重*/
     const newbornWeight = $('#anchor2244 p').text().replace("克", "") || "-"
     /**新生儿入院体重*/
@@ -1692,28 +1784,42 @@ $(function () {
           "rescueSuccessNum": rescueSuccessNum,
           "isAutoLeavehospital": isAutoLeavehospital,
           "returnToType": returnToType,
+          "isPhysicalRestraint": isPhysicalRestraint,
+          "tbiBehospitalBeforeTime": tbiBehospitalBeforeTime,
+          "tbiBehospitalAfterTime": tbiBehospitalAfterTime,
+          "isFallBed": isFallBed,
+          "isNosocomialInfection": isNosocomialInfection,
+          "isIntoIcu": isIntoIcu,
+          "isComplications": isComplications,
+          "isPressureSore": isPressureSore,
+          "isBehospitalPressureSore": isBehospitalPressureSore,
+          "isUnplannedReoperation": isUnplannedReoperation,
+          "treatmentResults": treatmentResults,
+          "complicationsResults": complicationsResults,
+          "infectionSite": infectionSite,
+          "isBeInDanger": isBeInDanger,
           "leaveDiags": leaveDiags,
           "operations": operations
         }
       ]
     }
-    console.log("param:", param)
+    // console.log("param:", param)
 
     return new Promise((resolve, reject) => {
       post1(api.sendHomePageIng, param).then(res => {
         if (res.data.code == '0') {
           // window.parent.location.reload()
-          console.log("sendHomePageIngRes", res.data)
-          console.log("成功");
+          // console.log("sendHomePageIngRes", res.data)
+          // console.log("成功");
           resolve(true)
         } else {
           reject(false)
-          console.log("失败");
+          // console.log("失败");
         }
 
       }).catch((e) => {
         reject(false)
-        console.log("失败1");
+        // console.log("失败1");
       })
     });
   }