Selaa lähdekoodia

Merge branch 'dev-1.1.1' into dev-1.1.2

hurugang 3 vuotta sitten
vanhempi
commit
b18622aa6e

+ 2 - 2
src/main/java/cn/hnthyy/thmz/controller/api/MedicalViewApiController.java

@@ -1339,7 +1339,7 @@ public class MedicalViewApiController {
             zdUnitCodePageDto.setZdUnitCode(zdUnitCode);
             List<ZdUnitCode> zdUnitCodeList = zdUnitCodeService.queryZdUnitCode(zdUnitCodePageDto);
             if (zdUnitCodeList == null || zdUnitCodeList.size() == 0) {
-                resultMap.put("code", -1);
+                resultMap.put("resultCode", -1);
                 resultMap.put("message", "没有查询到符合条件的科室列表");
                 return resultMap;
             }
@@ -1358,7 +1358,7 @@ public class MedicalViewApiController {
             return resultMap;
         } catch (Exception e) {
             log.error("系统异常,请联系管理员,{}", e);
-            resultMap.put("code", -1);
+            resultMap.put("resultCode", -1);
             resultMap.put("message", "没有查询到符合条件的科室列表");
             return resultMap;
         }

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

@@ -4,6 +4,7 @@ import cn.hnthyy.thmz.Utils.DateUtil;
 import cn.hnthyy.thmz.Utils.TokenUtil;
 import cn.hnthyy.thmz.comment.UserLoginToken;
 import cn.hnthyy.thmz.common.Constants;
+import cn.hnthyy.thmz.entity.MzException;
 import cn.hnthyy.thmz.entity.his.mz.*;
 import cn.hnthyy.thmz.entity.his.zd.ZdUnitCode;
 import cn.hnthyy.thmz.entity.thmz.Clinic;
@@ -147,6 +148,11 @@ public class ClinicController {
             resultMap.put("message", "接诊成功");
             resultMap.put("data", mzPatientMi);
             return resultMap;
+        } catch (MzException e) {
+            resultMap.put("code", -1);
+            resultMap.put("message", e.getMessage());
+            log.error("接诊异常,错误信息{}", e);
+            return resultMap;
         } catch (Exception e) {
             e.printStackTrace();
             resultMap.put("code", -1);

+ 97 - 0
src/main/resources/static/js/common/icd_read_card.js

@@ -0,0 +1,97 @@
+//@ sourceURL=icd_read_card.js
+/**
+ * 根据身份证查询患者信息
+ * @param id 患者就诊ID回写区域ID
+ * @param idCard 身份证号码
+ * @param callback 回调方法
+ * @param hideModalId 如果不为空,隐藏该区域
+ */
+function queryUserInfoBySocialNoNotFillPatient(id,idCard,callback,hideModalId) {
+    if (idCard.length == 18) {
+        $.ajax({
+            type: "GET",
+            url: '/thmz/getBySocialNo?socialNo=' + idCard,
+            contentType: "application/json;charset=UTF-8",
+            dataType: "json",
+            headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
+            success: function (res) {
+                if (res == '401' || res == 401) {
+                    window.location.href = '/thmz/login/view'
+                    return;
+                }
+                if (res.code == 0) {
+                    if (res.data != null && res.data.length > 0) {
+                        //如果只有一条数据的时候,直接加载当前病人信息
+                        if(res.data.length==1){
+                            $("#"+id).val(res.data[0].patientId);
+                            if(id==="cardNo"){
+                                //医保电子凭证缴费
+                                $("#patientId").val(res.data[0].patientId);
+                            }
+                            callback();
+                        }else {
+                            fitPatientNotFillPatient(id,res,callback,hideModalId);
+                        }
+                    }else {
+                        errorMesageSimaple("没有找到对应的患者信息!");
+                    }
+                } else {
+                    errorMesage(res);
+                }
+            }
+        });
+    }
+}
+
+
+/**
+ * 查询患者信息列表,选中后无需加载患者明细
+ * @param id 患者就诊ID回写区域ID
+ * @param res
+ * @param callback 回调方法
+ * @param hideModalId 如果不为空,隐藏该区域
+ */
+function fitPatientNotFillPatient(id,res,callback,hideModalId) {
+    if (res.data.length > 0) {
+        if(hideModalId!=undefined && hideModalId!=null){
+            $("#"+hideModalId).modal("hide");
+        }
+        $("#patientModal").modal();
+        $("#patientTable").html(null);
+        for (var i = 0; i < res.data.length; i++) {
+            var gender = '未知';
+            if (res.data[i].sex == 1) {
+                gender = '男';
+            } else if (res.data[i].sex == 2) {
+                gender = '女';
+            }
+            var icCardNo = res.data[i].icCardNo;
+            if (icCardNo == null || icCardNo == "null") {
+                icCardNo = "";
+            }
+            var phoneNo = res.data[i].phoneNo;
+            if (phoneNo == null || phoneNo == "null") {
+                phoneNo = "";
+            }
+            var birthDay = format(res.data[i].birthDay, "yyyy-MM-dd");
+            if (birthDay == null || birthDay == "null") {
+                birthDay = "";
+            }
+            var socialNo = res.data[i].socialNo;
+            if (socialNo == null || socialNo == "null") {
+                socialNo = "";
+            }
+            $("<tr data-target='" + res.data[i].patientId + "'><td>" + res.data[i].patientId + "</td><td>" + res.data[i].name + "</td><td>" + gender + "</td><td>" + icCardNo + "</td><td>" + phoneNo + "</td><td>" + birthDay + "</td><td>" + socialNo + "</td></tr>").appendTo("#patientTable").bind('click', function () {
+                $("#patientModal").modal("hide");
+                if(hideModalId!=undefined && hideModalId!=null){
+                    $("#"+hideModalId).modal();
+                }
+                $("#"+id).val($(this).attr("data-target"));
+                if(id==="cardNo"){
+                    $("#patientId").val($(this).attr("data-target"));
+                }
+                callback();
+            });
+        }
+    }
+}

+ 1 - 0
src/main/resources/static/js/jBox/common.js

@@ -451,3 +451,4 @@ function fitPatient(res) {
     }
 }
 
+

+ 43 - 1
src/main/resources/static/js/mz/clinic.js

@@ -714,6 +714,12 @@ $(function () {
     $('#btn_print_setup').click(function () {
         printJyJcReport(2);
     });
+    /**
+     * 医保电子凭证读卡
+     */
+    $("#siReadCard").on("click", function (t) {
+        siReadCard();
+    });
 });
 
 
@@ -1131,6 +1137,8 @@ function clearRapidAcceptsModal() {
     $("#rapidAcceptsUserGender").selectpicker('val', 0);
     $("#rapidAcceptsUserGender").selectpicker('refresh');
     $("#rapidAcceptsUserPhoneNum").val(null);
+    $('#rapidAcceptsUserCertificateType').selectpicker('val', '01');
+    $('#rapidAcceptsUserCertificateType').selectpicker('refresh');
     $("#rapidAcceptsUserIdCard").val(null);
     $("#rapidAcceptsUserIdCard").attr("title", null);
     $("#rapidAcceptsUserPhoneNum").attr("title", null);
@@ -4164,6 +4172,8 @@ function queryUserInfoByCardNo() {
                         $("#rapidAcceptsUserGender").selectpicker('refresh');
                         $("#rapidAcceptsUserPhoneNum").val(res.data.phoneNo);
                         $("#rapidAcceptsUserIdCard").val(res.data.socialNo);
+                        $('#rapidAcceptsUserCertificateType').selectpicker('val', '01');
+                        $('#rapidAcceptsUserCertificateType').selectpicker('refresh');
                         $("#rapidAcceptsUserIdCard").attr("title", res.data.socialNo);
                         $("#rapidAcceptsUserPhoneNum").attr("title", res.data.phoneNo);
                         //查询分诊号
@@ -9057,9 +9067,10 @@ function initCertificateTypeSelect() {
             if (res.code == 0) {
                 res.data.forEach(function (item, index) {
                     var html = '<option value="' + item.code + '">' + item.name + '</option>';
-                    $('#certificateType').append(html);
+                    $('#rapidAcceptsUserCertificateType').append(html);
                     $('#editUserCertificateType').append(html);
                 });
+                $('#rapidAcceptsUserCertificateType').selectpicker('refresh');
                 $('#editUserCertificateType').selectpicker('refresh');
             } else {
                 errorMesage(res);
@@ -9479,3 +9490,34 @@ function setOtherEmrProcess() {
         $("#editMzBlRecordModal").modal();
     });
 }
+
+
+
+
+
+/**
+ * 医保电子凭证读卡
+ */
+function siReadCard() {
+    $.ajax({
+        type: "GET",
+        url: 'http://localhost:8321/readcard/entry?param=qrcode_01101',
+        contentType: "application/json;charset=UTF-8",
+        dataType: "json",
+        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
+        success: function (res) {
+            if (res == '401' || res == 401) {
+                window.location.href = '/thmz/login/view'
+                return;
+            }
+            //console.log(res);
+            if (res.code == 200) {
+                var data = JSON.parse(res.data);
+                queryUserInfoBySocialNoNotFillPatient('rapidAcceptsUserCardNo',""+data.data.idNo+"",queryUserInfoByCardNo,'rapidAcceptsModal');
+            } else {
+                errorMesage(res);
+            }
+        }
+    });
+    // window.open('ReadCard://'+prm, '_self')
+}

+ 1 - 1
src/main/resources/static/js/mz/registration.js

@@ -1657,7 +1657,7 @@ function siReadCard() {
                 $("#idCard").val(data.data.idNo);
                 $("#userName").val(data.data.userName);
                 queryUserInfoBySocialNo();
-                successMesage(res);
+                //successMesage(res);
             } else {
                 errorMesage(res);
             }

+ 38 - 1
src/main/resources/static/js/mz/toll_administration.js

@@ -48,6 +48,13 @@ $(function () {
         $("#patientId").val(patientIdFullForNucleicAcid);
         initFeeTable();
     }
+
+    /**
+     * 医保电子凭证读卡
+     */
+    $("#siReadCard").on("click", function (t) {
+        siReadCard();
+    });
 });
 
 /**
@@ -2587,4 +2594,34 @@ function clearEditPayMode() {
 //             }
 //         }
 //     });
-// }
+// }
+
+
+
+
+/**
+ * 医保电子凭证读卡
+ */
+function siReadCard() {
+    $.ajax({
+        type: "GET",
+        url: 'http://localhost:8321/readcard/entry?param=qrcode_01101',
+        contentType: "application/json;charset=UTF-8",
+        dataType: "json",
+        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
+        success: function (res) {
+            if (res == '401' || res == 401) {
+                window.location.href = '/thmz/login/view'
+                return;
+            }
+            //console.log(res);
+            if (res.code == 200) {
+                var data = JSON.parse(res.data);
+                queryUserInfoBySocialNoNotFillPatient('cardNo',""+data.data.idNo+"",initFeeTable,null);
+            } else {
+                errorMesage(res);
+            }
+        }
+    });
+    // window.open('ReadCard://'+prm, '_self')
+}

+ 62 - 3
src/main/resources/templates/mz/clinic.html

@@ -16,6 +16,7 @@
 <script src="/thmz/js/dependent/LodopFuncs.js"></script>
 <script src="/thmz/js/dependent/qrcode.min.js"></script>
 <script src="/thmz/js/dependent/JsBarcode.all.js"></script>
+<script src="/thmz/js/common/icd_read_card.js"></script>
 <script src="/thmz/js/mz/clinic.js"></script>
 <title>就诊</title>
 <!-- 打印的样式-->
@@ -1054,7 +1055,20 @@
                             </div>
                         </div>
                         <div class="col-md-6 col-sm-6 col-xs-12 item">
-                            <label class="control-label col-md-4 col-sm-4 col-xs-12" for="rapidAcceptsUserIdCard">身份证
+                            <label class="control-label col-md-4 col-sm-4 col-xs-12" for="rapidAcceptsUserCertificateType">证件类型
+                                <span
+                                        class="required">*</span>
+                            </label>
+                            <div class="col-md-8 col-sm-8 col-xs-12">
+                                <select class="form-control selectpicker show-tick" required="required"
+                                        id="rapidAcceptsUserCertificateType" disabled="disabled">
+                                </select>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="item form-group">
+                        <div class="col-md-6 col-sm-6 col-xs-12 item">
+                            <label class="control-label col-md-4 col-sm-4 col-xs-12" for="rapidAcceptsUserIdCard">证件号
                             </label>
                             <div class="col-md-8 col-sm-8 col-xs-12">
                                 <div class="input-group demo2 input-group-own">
@@ -1069,10 +1083,13 @@
                 </form>
             </div>
             <div class="modal-footer">
-                <div style="float: left;display: inline-block;"><a id="clearRegistration1"
+                <div style="float: left;display: inline-block;">
+                    <a id="clearRegistration1"
                                                                    style="cursor: pointer;font-size: 14px;color: #2e69eb!important;"
                                                                    onclick="clearRapidAccepts()"><i
-                        class="fa fa-trash">&nbsp;&nbsp;清空</i></a></div>
+                        class="fa fa-trash">&nbsp;&nbsp;清空</i></a>
+                    <a id="siReadCard" style="cursor: pointer;color: #2e69eb !important;font-size: 14px;margin-left: 20px;"><i class="fa fa-barcode">&nbsp;医保电子凭证读卡</i></a>
+                </div>
                 <button type="button" class="btn btn-default" data-dismiss="modal" onclick="clearRapidAccepts()">取消
                 </button>
                 <input type="hidden" id="mzfzSerialNo"/>
@@ -2733,6 +2750,48 @@
 </div>
 <!--待合并病历列表请弹框结尾-->
 
+
+<!--患者查询弹窗开始-->
+<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-hidden="true" id="patientModal">
+    <div class="modal-dialog modal-lg">
+        <div class="modal-content" style="width: 700px;margin-left: 200px;">
+            <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true" onclick="function f() {
+                  $('#rapidAcceptsModal').modal();
+                }">×</span>
+                </button>
+                <h4 class="modal-title modal-title-thmz">患者查询 <span style="font-size: 1px;margin-left: 20px;" >请选择本次需要接诊的患者信息</span>
+                </h4>
+            </div>
+            <div class="modal-body">
+                <form class="form-horizontal form-label-left" novalidate>
+                    <table class="table table-striped table-bordered">
+                        <thead>
+                        <tr>
+                            <th>患者ID</th>
+                            <th>患者姓名</th>
+                            <th>患者性别</th>
+                            <th>患者卡号</th>
+                            <th>电话号码</th>
+                            <th>出生年月</th>
+                            <th>患者身份证号码</th>
+                        </tr>
+                        </thead>
+                        <tbody id="patientTable">
+                        </tbody>
+                    </table>
+                </form>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-default" data-dismiss="modal" onclick="function f() {
+                  $('#rapidAcceptsModal').modal();
+                }">关闭</button>
+            </div>
+        </div>
+    </div>
+</div>
+<!--患者查询弹窗结尾-->
+
 <object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
     <embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0></embed>
 </object>

+ 41 - 1
src/main/resources/templates/mz/toll_administration.html

@@ -4,6 +4,7 @@
 <link rel="stylesheet" href="/thmz/css/toll_administration.css">
 <script src="/thmz/js/dependent/bootstrap-select.js"></script>
 <script src="/thmz/js/dependent/daterangepicker.js"></script>
+<script src="/thmz/js/common/icd_read_card.js"></script>
 <script src="/thmz/js/mz/toll_administration.js"></script>
 <script src="/thmz/js/dependent/LodopFuncs.js"></script>
 <title>收费管理</title>
@@ -58,7 +59,9 @@
                             </select>
                         </div>
                     </div>
-                    <div class="btn-group col-md-3 col-sm-3 col-xs-12"></div>
+                    <div class="btn-group col-md-3 col-sm-3 col-xs-12">
+                        <a id="siReadCard" style="cursor: pointer;color: #337AB7 !important;font-size: 14px;"><i class="fa fa-barcode">医保电子凭证读卡</i></a>
+                    </div>
                     <div class="form-group col-md-9 col-sm-9 col-xs-12">
                         <!--<div class="col-md-3 col-sm-3 col-xs-12"></div>-->
                         <label class="control-label col-md-1 col-sm-1 col-xs-12" for="serialNo">机制号
@@ -644,6 +647,43 @@
 <!--修改付款方式弹窗结尾-->
 
 
+<!--患者查询弹窗开始-->
+<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-hidden="true" id="patientModal">
+    <div class="modal-dialog modal-lg">
+        <div class="modal-content" style="width: 700px;margin-left: 200px;">
+            <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span>
+                </button>
+                <h4 class="modal-title modal-title-thmz">患者查询 <span style="font-size: 1px;margin-left: 20px;" >请选择本次需要接诊的患者信息</span>
+                </h4>
+            </div>
+            <div class="modal-body">
+                <form class="form-horizontal form-label-left" novalidate>
+                    <table class="table table-striped table-bordered">
+                        <thead>
+                        <tr>
+                            <th>患者ID</th>
+                            <th>患者姓名</th>
+                            <th>患者性别</th>
+                            <th>患者卡号</th>
+                            <th>电话号码</th>
+                            <th>出生年月</th>
+                            <th>患者身份证号码</th>
+                        </tr>
+                        </thead>
+                        <tbody id="patientTable">
+                        </tbody>
+                    </table>
+                </form>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
+            </div>
+        </div>
+    </div>
+</div>
+<!--患者查询弹窗结尾-->
+
 <object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
     <embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0></embed>
 </object>