Browse Source

入院登记实现医保电子凭证登记

hurugang 2 years ago
parent
commit
cb60c33895

+ 7 - 3
src/main/java/cn/hnthyy/thmz/entity/his/zd/MzZdYpYsh.java

@@ -114,7 +114,7 @@ public class MzZdYpYsh {
      */
     private String ynCode;
     /**
-     *自付标记  默认自付  无用
+     * 自付标记  默认自付  无用
      */
     private Integer paySelf;
     /**
@@ -126,7 +126,7 @@ public class MzZdYpYsh {
      */
     private String opOd;
     /**
-     *实际库存量
+     * 实际库存量
      */
     private BigDecimal stockAmount;
     /**
@@ -158,7 +158,7 @@ public class MzZdYpYsh {
      */
     private String ybFlag;
     /**
-     *  1:需要皮试
+     * 1:需要皮试
      */
     private String tryFlag;
     /**
@@ -220,5 +220,9 @@ public class MzZdYpYsh {
      * 药品自付比例 非数据库字段
      */
     private BigDecimal selfpayProp;
+    /**
+     * 药品医保编码
+     */
+    private String nationalCode;
 
 }

+ 5 - 5
src/main/java/cn/hnthyy/thmz/mapper/his/zd/MzZdYpYshMapper.java

@@ -20,13 +20,13 @@ public interface MzZdYpYshMapper {
             "<when test='pageSize!=null'>",
             " top ${pageSize} ",
             "</when>",
-            "code,serial,name,specification,charge_amount,manufactory,mini_unit,group_no,stock_amount_virtual,drug_win,yp_type=71 ",
+            "code,serial,name,specification,charge_amount,manufactory,mini_unit,group_no,stock_amount_virtual,drug_win,national_code,yp_type=71 ",
             "    FROM view_mz_zd_yp_ysh WITH(NOLOCK)  ",
             "where  stock_amount_virtual <![CDATA[>]]> 0 and (case when bill_code='TC' or group_no='00' then  '71' else group_no end)=#{groupNo}  ",
             "<when test='commonParams!=null'>",
             " and (py_code like #{commonParams} collate Chinese_PRC_CI_AS or d_code  like #{commonParams} collate Chinese_PRC_CI_AS or code like #{commonParams} collate Chinese_PRC_CI_AS or name like #{commonParams} collate Chinese_PRC_CI_AS or class_code like #{commonParams} collate Chinese_PRC_CI_AS ) ",
             "</when>",
-            "GROUP BY code,serial, name,specification,charge_amount,manufactory,mini_unit,group_no,stock_amount_virtual,drug_win order by stock_amount_virtual desc",
+            "GROUP BY code,serial, name,specification,charge_amount,manufactory,mini_unit,group_no,stock_amount_virtual,drug_win,national_code order by stock_amount_virtual desc",
             "</script>"})
     List<MzZdYpYsh> selectMzZdYpYshByCommonParamsAndGroupNo(@Param("commonParams") String commonParams, @Param("groupNo") String groupNo, @Param("pageSize") Integer pageSize);
 
@@ -47,7 +47,7 @@ public interface MzZdYpYshMapper {
             "<when test='pageSize!=null'>",
             " top ${pageSize} ",
             "</when>",
-            " code=rtrim(a.charge_code),serial=rtrim(a.serial),name=rtrim(b.name),specification=b.specification,charge_amount=a.pack_retprice,manufactory=c.name,mini_unit=b.mini_unit,group_no=a.group_no,stock_amount_virtual=a.stock_amount_virtual,drug_win=1,yp_type=91  ",
+            " code=rtrim(a.charge_code),serial=rtrim(a.serial),name=rtrim(b.name),specification=b.specification,charge_amount=a.pack_retprice,manufactory=c.name,mini_unit=b.mini_unit,group_no=a.group_no,stock_amount_virtual=a.stock_amount_virtual,drug_win=1,national_code=b.national_code,yp_type=91  ",
             "    FROM yp_base_yf a WITH(NOLOCK)  LEFT JOIN yp_zd_dict b WITH(NOLOCK)  on a.charge_code = b.code and a.serial = b.serial  LEFT JOIN yp_zd_manufactory c on a.charge_code = c.code ",
             "where a.visible_flag_mz=0 and a.stock_amount_virtual <![CDATA[>]]> 0 and a.group_no ='91' ",
             "<when test='commonParams!=null'>",
@@ -70,7 +70,7 @@ public interface MzZdYpYshMapper {
             "<when test='pageSize!=null'>",
             " top ${pageSize} ",
             "</when>",
-            "  code=rtrim(code),serial,name,specification,charge_amount,manufactory=yb_comment,mini_unit,group_no,stock_amount_virtual,drug_win,yp_type=111  ",
+            "  code=rtrim(code),serial,name,specification,charge_amount,manufactory=yb_comment,mini_unit,group_no,stock_amount_virtual,drug_win,national_code,yp_type=111  ",
             "    FROM view_mz_zd_yp_dm WITH(NOLOCK)  ",
             "where stock_amount_virtual <![CDATA[>]]> 0 ",
             "<when test='commonParams!=null'>",
@@ -94,7 +94,7 @@ public interface MzZdYpYshMapper {
             "<when test='pageSize!=null'>",
             " top ${pageSize} ",
             "</when>",
-            "  code=rtrim(code),serial,name,specification,charge_amount,manufactory=yb_comment,mini_unit,group_no,stock_amount_virtual,drug_win,yp_type=131   ",
+            "  code=rtrim(code),serial,name,specification,charge_amount,manufactory=yb_comment,mini_unit,group_no,stock_amount_virtual,drug_win,national_code,yp_type=131   ",
             "    FROM view_mz_zd_yp_dm_j2 WITH(NOLOCK)   ",
             "where  stock_amount_virtual <![CDATA[>]]> 0 ",
             "<when test='commonParams!=null'>",

+ 1 - 1
src/main/java/cn/hnthyy/thmz/mapper/his/zd/ZdChargeItemMapper.java

@@ -334,7 +334,7 @@ public interface ZdChargeItemMapper {
             "<when test='pageSize!=null'>",
             " top ${pageSize} ",
             "</when>",
-            "  code=rtrim(code),name,specification=charge_unit,chargeAmount=charge_amount,manufactory=yb_comment,execUnit=exec_unit,groupNo='00' ,type=3,descriptions,selfpayProp=selfpay_prop,connotation  ",
+            "  code=rtrim(code),name,specification=charge_unit,chargeAmount=charge_amount,manufactory=yb_comment,execUnit=exec_unit,groupNo='00' ,type=3,descriptions,selfpayProp=selfpay_prop,connotation,nationalCode=national_code  ",
             "    FROM zd_charge_item WITH(NOLOCK)   ",
             "where del_flag=0 and  class_code in ('B','C', 'D', 'E', 'G', 'F','H','I','J') and isnull(group_no,'00') <![CDATA[<>]]> '91' ",
             "<when test='commonParams!=null'>",

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

@@ -6584,6 +6584,12 @@ function loadYpList(index, event) {
                 align: "center",
                 valign: 'middle',
                 //  sortable: true
+            }, {
+                field: 'nationalCode',
+                title: '医保编码',
+                align: "left",
+                valign: 'middle',
+                //  sortable: true
             }
         ],
         responseHandler: function (res) {
@@ -7082,6 +7088,12 @@ function loadZlItemList(event) {
                 align: "center",
                 valign: 'middle',
                 //  sortable: true
+            }, {
+                field: 'nationalCode',
+                title: '医保编码',
+                align: "center",
+                valign: 'left',
+                //  sortable: true
             }
         ],
         responseHandler: function (res) {

+ 41 - 1
src/main/resources/static/js/zy/hospitalized.js

@@ -31,6 +31,12 @@ $(function () {
     //数据校验
     init_validator();
 
+    /**
+     * 医保电子凭证读卡
+     */
+    $("#siReadCard").on("click", function (t) {
+        siReadCard();
+    });
 
     /**
      * 清空
@@ -1316,4 +1322,38 @@ function getIndex(id) {
         }
     }
     return index;
-}
+}
+
+
+
+/**
+ * 医保电子凭证读卡
+ */
+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);
+                // $('#certificateType').selectpicker('val', data.data.idType);
+                // $('#certificateType').selectpicker('refresh');
+                $("#idCard").val(data.data.idNo);
+                $("#userName").val(data.data.userName);
+                queryUserInfoBySocialNo();
+                //successMesage(res);
+            } else {
+                errorMesage(res);
+            }
+        }
+    });
+    // window.open('ReadCard://'+prm, '_self')
+}

+ 1 - 0
src/main/resources/templates/zy/hospitalized.html

@@ -55,6 +55,7 @@
                 </div>
                 <div class="col-md-9 col-sm-9 col-xs-12">
                     <div class="clearRegistrationDiv">
+                        <a id="siReadCard"><i class="fa fa-barcode">&nbsp;医保电子凭证读卡</i></a>
                         <a id="uploadIdCard"><i class="fa fa-arrow-up">&nbsp;上传身份证</i></a>
                         <a id="seeIdCard"><i class="fa fa-eye">&nbsp;查看身份证</i></a>
                         <a id="updateInpatientNo"><i class="fa fa-check-square-o">&nbsp;修改住院号</i></a>