Browse Source

生命提振自动加载

hurugang 2 năm trước cách đây
mục cha
commit
2d0ee1ed29

+ 3 - 0
src/main/java/cn/hnthyy/thmz/controller/mz/ClinicController.java

@@ -48,6 +48,8 @@ public class ClinicController {
     private ZdUnitCodeService zdUnitCodeService;
     @Autowired
     private EmployeeService employeeService;
+    @Autowired
+    private MzYshTzxxService mzYshTzxxService;
 //    @Autowired
 //    private MzyZdReqtypeService mzyZdReqtypeService;
     @Autowired
@@ -138,6 +140,7 @@ public class ClinicController {
             resultMap.put("code", 0);
             resultMap.put("message", "接诊成功");
             resultMap.put("data", mzPatientMi);
+            resultMap.put("mzYshTzxx", mzYshTzxxService.queryLastMzYshTzxx(patientId));
             return resultMap;
         } catch (MzException e) {
             resultMap.put("code", -1);

+ 2 - 2
src/main/java/cn/hnthyy/thmz/entity/his/mz/MzYshTzxx.java

@@ -49,12 +49,12 @@ public class MzYshTzxx  implements Serializable {
 	private String valueHx;
 
 	/**
-	 * 血压上线
+	 * 血压上
 	 */
 	private String valueSsy;
 
 	/**
-	 * 血压下线
+	 * 血压下
 	 */
 	private String valueSzy;
 

+ 14 - 0
src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzYshTzxxMapper.java

@@ -0,0 +1,14 @@
+package cn.hnthyy.thmz.mapper.his.mz;
+
+import cn.hnthyy.thmz.entity.his.mz.MzYshTzxx;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+public interface MzYshTzxxMapper {
+    /**
+     * 查询24小时内最新的一次体征信息
+     * @return
+     */
+    @Select("select top 1 * from mz_ysh_tzxx  where patient_id=#{patientId} and DateDiff(dd,visit_date,getDate()) =0 order by visit_date desc ")
+    MzYshTzxx selectLastMzYshTzxx(@Param("patientId") String patientId);
+}

+ 11 - 0
src/main/java/cn/hnthyy/thmz/service/his/mz/MzYshTzxxService.java

@@ -0,0 +1,11 @@
+package cn.hnthyy.thmz.service.his.mz;
+
+import cn.hnthyy.thmz.entity.his.mz.MzYshTzxx;
+
+public interface MzYshTzxxService {
+    /**
+     * 查询24小时内最新的一次体征信息
+     * @return
+     */
+    MzYshTzxx queryLastMzYshTzxx(String patientId);
+}

+ 18 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzChargeDetailServiceImpl.java

@@ -2663,6 +2663,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         }
         mzPrescriptionVo.setIcdText(icdText);
         mzPrescriptionVo.setMzBlRecord(mzBlRecord);
+        //setYshTzxx(patientId, mzBlRecord);
         if (MzBlRecordFlag) {
             //只需要构造病历信息,不需要设置用药和诊疗信息
             return mzPrescriptionVo;
@@ -2784,6 +2785,23 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         return mzPrescriptionVo;
     }
 
+//    /**
+//     * 设置体征信息
+//     * @param patientId
+//     * @param mzBlRecord
+//     */
+//    private void setYshTzxx(String patientId, MzBlRecord mzBlRecord) {
+//        MzYshTzxx mzYshTzxx=mzYshTzxxMapper.selectLastMzYshTzxx(patientId);
+//        if(mzYshTzxx!=null){
+//            mzBlRecord.setWeight(StringUtils.isBlank(mzYshTzxx.getValueTz())?null:Double.valueOf(mzYshTzxx.getValueTz()));
+//            mzBlRecord.setTemperature(StringUtils.isBlank(mzYshTzxx.getValueTw())?null:Double.valueOf(mzYshTzxx.getValueTw()));
+//            mzBlRecord.setSphygmus(StringUtils.isBlank(mzYshTzxx.getValueMb())?null:Integer.valueOf(mzYshTzxx.getValueMb()));
+//            mzBlRecord.setBreathe(StringUtils.isBlank(mzYshTzxx.getValueHx())?null:Integer.valueOf(mzYshTzxx.getValueHx()));
+//            mzBlRecord.setPressureHigh(StringUtils.isBlank(mzYshTzxx.getValueSsy())?null:Integer.valueOf(mzYshTzxx.getValueSsy()));
+//            mzBlRecord.setPressureFloor(StringUtils.isBlank(mzYshTzxx.getValueSzy())?null:Integer.valueOf(mzYshTzxx.getValueSzy()));
+//        }
+//    }
+
     @Override
     public int setPrintFlag(String patientId, Integer times, Integer orderNo) {
         return mzChargeDetailMapper.setPrintFlag(patientId, times, orderNo);

+ 19 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzYshTzxxServiceImpl.java

@@ -0,0 +1,19 @@
+package cn.hnthyy.thmz.service.impl.his.mz;
+
+import cn.hnthyy.thmz.entity.his.mz.MzYshTzxx;
+import cn.hnthyy.thmz.mapper.his.mz.MzYshTzxxMapper;
+import cn.hnthyy.thmz.service.his.mz.MzYshTzxxService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class MzYshTzxxServiceImpl implements MzYshTzxxService {
+    @SuppressWarnings("all")
+    @Autowired
+    private MzYshTzxxMapper mzYshTzxxMapper;
+
+    @Override
+    public MzYshTzxx queryLastMzYshTzxx(String patientId) {
+        return mzYshTzxxMapper.selectLastMzYshTzxx(patientId);
+    }
+}

+ 28 - 0
src/main/resources/static/js/mz/clinic.js

@@ -1920,6 +1920,33 @@ function fetchSpcSlwinfo() {
     });
 }
 
+/**
+ * 初诊的时候设置患者生命体征
+ * @param res
+ */
+function setMzSmtz(res) {
+    var mzYshTzxx = res.mzYshTzxx;
+    if (mzYshTzxx != null) {
+        if (mzYshTzxx.valueTz != null) {
+            $("#weight").val(mzYshTzxx.valueTz);
+        }
+        if (mzYshTzxx.valueTw != null) {
+            $("#temperature").val(mzYshTzxx.valueTw);
+        }
+        if (mzYshTzxx.valueMb != null) {
+            $("#sphygmus").val(mzYshTzxx.valueMb);
+        }
+        if (mzYshTzxx.valueHx != null) {
+            $("#breathe").val(mzYshTzxx.valueHx);
+        }
+        if (mzYshTzxx.valueSsy != null) {
+            $("#pressure_high").val(mzYshTzxx.valueSsy);
+        }
+        if (mzYshTzxx.valueSzy != null) {
+            $("#pressure_floor").val(mzYshTzxx.valueSzy);
+        }
+    }
+}
 
 /**
  * 真实的接诊方法
@@ -1947,6 +1974,7 @@ function realClinicalReception(patientId, serialNo, reqType) {
                 if (res.data != null) {
                     var mzPatientMi = res.data;
                     setMzPatientInfo(mzPatientMi);
+                    setMzSmtz(res);
                     $("#mzfzSerialNoInClick").val(serialNo);
                     $("#mzfzReqTypeNoInClick").val(reqType);
                     //有分诊流水号 且 不是简易门诊 或 会诊目标科室接诊