瀏覽代碼

增加显示过敏源

hsh 1 年之前
父節點
當前提交
eb977761ef

+ 19 - 1
src/main/java/cn/hnthyy/thmz/controller/mz/MzPharmacyController.java

@@ -14,12 +14,14 @@ import cn.hnthyy.thmz.entity.thmz.RadSendRecord;
 import cn.hnthyy.thmz.entity.thmz.User;
 import cn.hnthyy.thmz.enums.ConfirmFlagEnum;
 import cn.hnthyy.thmz.enums.SocketSenderTypeEnum;
+import cn.hnthyy.thmz.mapper.his.zd.ZdAllergenMapper;
 import cn.hnthyy.thmz.service.his.mz.*;
 import cn.hnthyy.thmz.service.his.yp.YpBaseYfService;
 import cn.hnthyy.thmz.service.his.yp.YpPdQueueService;
 import cn.hnthyy.thmz.service.his.yp.YpZdDictService;
 import cn.hnthyy.thmz.service.his.yp.YpZdManufactoryService;
 import cn.hnthyy.thmz.service.his.zd.MzYshZdFysmService;
+import cn.hnthyy.thmz.service.his.zd.ZdAllergenService;
 import cn.hnthyy.thmz.service.his.zd.ZdUnitCodeService;
 import cn.hnthyy.thmz.service.thmz.DispensingSocketService;
 import cn.hnthyy.thmz.service.thmz.DispensingWindowsService;
@@ -76,7 +78,10 @@ public class MzPharmacyController {
 
     @Autowired
     private YpPdQueueService ypPdQueueService;
-
+    @Autowired
+    private PatientAllergenInfoService patientAllergenInfoService;
+    @Autowired
+    private ZdAllergenService zdAllergenService;
     /**
      * 查询处方信息
      *
@@ -462,6 +467,19 @@ public class MzPharmacyController {
                 cfxxList.get(0).setWarnDeptName(warnDeptName);
                 Employee employee = employeeService.queryByUserCode(cfxxList.get(0).getDoctorCode());
                 cfxxList.get(0).setEmployeeName(employee.getEmployeeName());
+
+                // 查询门诊病人处方过敏史
+                List<PatientAllergenInfo> patientAllergenInfoList = patientAllergenInfoService.queryPatientAllergenInfoByPatNo(cfxxList.get(0).getPatientId());
+                if(patientAllergenInfoList != null && !patientAllergenInfoList.isEmpty()) {
+                    for(PatientAllergenInfo patientAllergenInfo : patientAllergenInfoList) {
+                        if(patientAllergenInfo.getType() == 0L){
+                            patientAllergenInfo.setAllergenName(zdAllergenService.queryZdAllergenByCode(patientAllergenInfo.getAllergenCode()));
+                        } else if(patientAllergenInfo.getType() == 1L){
+                            patientAllergenInfo.setAllergenName(ypZdDictService.queryNameByCode(patientAllergenInfo.getAllergenCode()));
+                        }
+                    }
+                    resultMap.put("patientAllergenInfoList", patientAllergenInfoList);
+                }
             }
             for (MzSendMedicineVo mzSendMedicineVo : cfxxList) {
                 String drugUnitName = mzPharmacyService.getYpUnitName(mzSendMedicineVo.getDrugUnit());

+ 80 - 3
src/main/resources/static/js/mz/west_pharmacy_send.js

@@ -1172,7 +1172,6 @@ function cleanParams() {
  * 查询病人处方明细
  */
 var $table;
-
 function prescriptionDetail(realNo, orderNo, receiptNo, times, patientId, confirmFlag) {
     let isXy = groupNo === '71' ? true : false;
     if (confirmFlag == 5 || confirmFlag == 0) {
@@ -1189,6 +1188,7 @@ function prescriptionDetail(realNo, orderNo, receiptNo, times, patientId, confir
         patientId: patientId
     };
     $('#tb_table_right').bootstrapTable("destroy");
+    $('#tb_table_allergen').bootstrapTable("destroy");
     $table = $('#tb_table_right').bootstrapTable({
         url: '/thmz/getFyclPrescriptionDetail',         //请求后台的URL(*)
         method: 'POST',                      //请求方式(*)
@@ -1355,6 +1355,9 @@ function prescriptionDetail(realNo, orderNo, receiptNo, times, patientId, confir
                 $("#patientIdLabel").val(ress.data[0].patientId);
                 $("#realNoLabel").val(ress.data[0].realNo);
             }
+            if(ress.patientAllergenInfoList){
+                callAllergenInfo(ress.patientAllergenInfoList)
+            }
             if (ress.code == -1) {
                 if (ress.message != null && ress.message != '') {
                     new PNotify({
@@ -1641,8 +1644,82 @@ function callNumber(patientId, name) {
     });
 }
 
-
-
+// 添加门诊过敏史
+var $tableAllergen;
+function callAllergenInfo(allergenList){
+    $tableAllergen = $('#tb_table_allergen').bootstrapTable({
+        data:allergenList,
+        striped: true,                      //是否显示行间隔色
+        cache: false,                       //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
+        pagination: false,                   //是否显示分页(*)
+        sortable: false,                     //是否启用排序
+        sortOrder: "asc",                   //排序方式
+        sidePagination: "client",           //分页方式:client客户端分页,server服务端分页(*)
+        pageNumber: 1,                       //初始化加载第一页,默认第一页
+        pageSize: 10,                       //每页的记录行数(*)
+        pageList: [10, 25, 50, 100],        //可供选择的每页的行数(*)
+        search: false,                       //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大
+        strictSearch: true,
+        showColumns: false,                  //是否显示所有的列
+        showRefresh: false,                  //是否显示刷新按钮
+        minimumCountColumns: 2,             //最少允许的列数
+        clickToSelect: true,                //是否启用点击选中行
+        uniqueId: "ID",                     //每一行的唯一标识,一般为主键列
+        showToggle: false,                    //是否显示详细视图和列表视图的切换按钮
+        cardView: false,                    //是否显示详细视图
+        detailView: false,
+        //rowStyle:rowStyle,//通过自定义函数设置行样式
+        ajaxOptions: {
+            headers: {
+                'Accept': 'application/json',
+                'Authorization': 'Bearer ' + localStorage.getItem("token")
+            }
+        },
+        columns: [
+            {
+                field: 'patNo',
+                title: '门诊号',
+                align: "center",
+                valign: 'middle'
+            },{
+                field: 'allergenCode',
+                title: '过敏源编码',
+                align: "center",
+                valign: 'middle'
+            }, {
+                field: 'allergenName',
+                title: '过敏源',
+                align: "center",
+                valign: 'middle',
+            }
+        ],
+        responseHandler: function (res) {
+            if (res == '401' || res == 401) {
+                window.location.href = '/thmz/login/view'
+                return;
+            }
+            if (ress.code == -1) {
+                if (ress.message != null && ress.message != '') {
+                    new PNotify({
+                        title: '错误提示',
+                        text: ress.message,
+                        type: 'error',
+                        hide: true,
+                        styling: 'bootstrap3'
+                    });
+                }
+                return {
+                    "total": 0,//总页数
+                    "rows": {}   //数据
+                };
+            }
+            return {
+                "total": ress.data.length,//总页数
+                "rows": ress.data   //数据
+            };
+        }
+    });
+}
 
 
 

+ 3 - 0
src/main/resources/templates/mz/west_pharmacy_send.html

@@ -456,6 +456,9 @@
                                 </div>
                             </div>
                         </form>
+                        <table id="tb_table_allergen"
+                               style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;padding-bottom: 5px;">
+                        </table>
                         <div class="col-md-12 col-sm-12 col-xs-12" id="send_total_amount">
                             <div class="col-md-12 col-sm-12 col-xs-12" style="display: block;text-align: right;">
                                 处方总金额:<span id="sendTotalAmount" style="color: red;">0.00</span>