Преглед изворни кода

住院证新增字段及入院登记带出

ZZhuangFW пре 1 месец
родитељ
комит
40904f5efb

+ 16 - 0
src/main/java/cn/hnthyy/thmz/entity/his/mz/MzZyReq.java

@@ -126,4 +126,20 @@ public class MzZyReq {
      * 押金
      */
     private BigDecimal deposit;
+    /**
+     * 联系人姓名
+     */
+    private String contacterName;
+    /**
+     * 联系人关系
+     */
+    private String contacterRelationship;
+    /**
+     * 联系人电话
+     */
+    private String contacterPhone;
+    /**
+     * 联系人地址
+     */
+    private String contacterAddress;
 }

+ 3 - 3
src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzZyReqMapper.java

@@ -13,9 +13,9 @@ public interface MzZyReqMapper {
      * @return
      */
     @Insert("INSERT INTO mz_zy_req(patient_id,name,visit_date,doctor_code,dept_code,req_dept,req_ward,bed_no,icd_code,icd_text,confirm_id,confirm_date," +
-            "zy_serial_no,responce_type,admiss_status,req_status,small_dept,icd_code_new,icd_text_new,condition_code,route_of_admission,deposit) VALUES (#{patientId}, #{name}, #{visitDate}, #{doctorCode}, #{deptCode}," +
+            "zy_serial_no,responce_type,admiss_status,req_status,small_dept,icd_code_new,icd_text_new,condition_code,route_of_admission,deposit,contacter_name,contacter_relationship,contacter_phone,contacter_address) VALUES (#{patientId}, #{name}, #{visitDate}, #{doctorCode}, #{deptCode}," +
             " #{reqDept}, #{reqWard}, #{bedNo}, #{icdCode}, #{icdText}, #{confirmId}, #{confirmDate}, #{zySerialNo}, #{responceType}, #{admissStatus}, #{reqStatus}, #{smallDept}," +
-            " #{icdCodeNew}, #{icdTextNew},#{conditionCode}, #{routeOfAdmission},#{deposit})")
+            " #{icdCodeNew}, #{icdTextNew},#{conditionCode}, #{routeOfAdmission},#{deposit},#{contacterName},#{contacterRelationship},#{contacterPhone},#{contacterAddress})")
     int insert(MzZyReq mzZyReq);
 
     /**
@@ -121,7 +121,7 @@ public interface MzZyReqMapper {
      */
     @Select({"<script>" +
             " SELECT " +
-            " patient_id,name, visit_date,doctor_code,dept_code ,req_dept,req_ward,icd_text,admiss_status,req_status,confirm_date,icd_code_new,icd_text_new,condition_code,route_of_admission " +
+            " patient_id,name, visit_date,doctor_code,dept_code ,req_dept,req_ward,icd_text,admiss_status,req_status,confirm_date,icd_code_new,icd_text_new,condition_code,route_of_admission,contacter_relationship,contacter_relationship,contacter_name,contacter_address" +
             " FROM " +
             " mz_zy_req WITH(NOLOCK) " +
             " WHERE 1=1 " +

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

@@ -39,6 +39,7 @@ $(function () {
     initListDeptSelect();
     iniAdmissStatus();
     initZySelect();
+    initRelationSelect();
 });
 
 /**
@@ -61,6 +62,11 @@ function clearZyReq() {
     $("#icdCodeForm").val(null);
     $("#icdTextForm").val(null);
     $("#deposit").val(null);
+    $("#contacterName").val(null);
+    $("#contacterRelationship").selectpicker('val', null);
+    $("#contacterRelationship").selectpicker('refresh');
+    $("#contacterPhone").val(null);
+    $("#contacterAddress").val(null);
     initSmallDeptByDept();
 }
 
@@ -204,7 +210,11 @@ function saveData() {
        "routeOfAdmission":$("#routeOfAdmission").val(),
        "icdCode":$("#icdCodeForm").val(),
        "deposit":$("#deposit").val(),
-       "icdText":$("#icdTextForm").val()
+       "icdText":$("#icdTextForm").val(),
+       "contacterName":$("#contacterName").val(),
+       "contacterRelationship":$("#contacterRelationship").val(),
+       "contacterPhone":$("#contacterPhone").val(),
+       "contacterAddress":$("#contacterAddress").val()
    }
     $.ajax({
         type: "POST",
@@ -348,6 +358,33 @@ function getAllPatient() {
     });
 }
 
+/**
+ * 关系列表初始化
+ */
+function initRelationSelect() {
+    //医生列表
+    $.ajax({
+        type: "GET",
+        url: '/thmz/getRelation',
+        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;
+            }
+            var html = '';
+            $.each(res.data, function (commentIndex, comment) {
+                html += '<option value="' + comment.code + '">' + comment.name + '</option>';
+            });
+            $('#contacterRelationship').empty();
+            $('#contacterRelationship').html(html);
+            $('#contacterRelationship').selectpicker('destroy').selectpicker('refresh');
+        }
+    });
+}
+
+
 /**
  * 构建列表查询参数
  * @param params

+ 5 - 0
src/main/resources/static/js/zy/hospitalized.js

@@ -582,6 +582,11 @@ function queryMzZyReq(patientId) {
                 initSmallDeptByDept();
                 $("#smallWard").selectpicker('val', resZyz.data.smallDept);
                 $("#smallWard").selectpicker('refresh');
+                $("#contractName").val(resZyz.data.contacterName);
+                $("#relationship").selectpicker('val', resZyz.data.contacterRelationship);
+                $("#relationship").selectpicker('refresh');
+                $("#contractPhone").val(resZyz.data.contacterPhone);
+                $("#contractAddress").val(resZyz.data.contacterAddress);
             }else if(resZyz.code == 0 && resZyz.data ==null) {
                 warningMesageSimaple("没有住院证信息")
             }else {

+ 36 - 3
src/main/resources/templates/mz/add_mzzyreq.html

@@ -10,7 +10,7 @@
 <script src="/thmz/js/mz/add_mzzyreq.js"></script>
 <style>
     .my_label_3 {
-        width: 75px;
+        width: 85px;
         float: left;
         text-align: right;
         font-weight: 400;
@@ -133,7 +133,7 @@
                         <div style="width: 170px;float: left;">
                             <label class="my_label_3">总床位数:</label>
                             <div style="width: 85px;float: left;">
-                                <input id="totalBedNum" class="form-control col-md-7 col-xs-12"
+                                <input id="totalBedNum1" class="form-control col-md-7 col-xs-12"
                                        readonly type="text">
                             </div>
                         </div>
@@ -154,12 +154,45 @@
                             </div>
                         </div>
                     </div>
+                    <div class="item form-group">
+                        <div style="width: 170px;float: left;">
+                            <label class="my_label_3">联系人:</label>
+                            <div style="width: 85px;float: left;">
+                                <input id="contacterName" class="form-control col-md-7 col-xs-12"
+                                       >
+                            </div>
+                        </div>
+                        <div style="width: 170px;float: left;">
+                            <label class="my_label_3">联系人关系:</label>
+                            <div style="width: 85px;float: left;">
+                                <select class="form-control selectpicker show-tick"
+                                        id="contacterRelationship">
+                                </select>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="item form-group">
+                        <div style="width: 170px;float: left;">
+                            <label class="my_label_3">联系人电话:</label>
+                            <div style="width: 85px;float: left;">
+                                <input id="contacterPhone" class="form-control col-md-7 col-xs-12"
+                                >
+                            </div>
+                        </div>
+                        <div style="width: 250px;float: left;">
+                            <label class="my_label_3">联系人地址:</label>
+                            <div style="width: 150px;float: left;">
+                                <input id="contacterAddress" class="form-control col-md-9 col-xs-12"
+                                >
+                            </div>
+                        </div>
+                    </div>
                     <div class="item form-group">
                         <div style="width: 170px;float: left;">
                             <label class="my_label_3">押金:</label>
                             <div style="width: 85px;float: left;">
                                 <input id="deposit" class="form-control col-md-7 col-xs-12"
-                                        type="number">
+                                       type="number">
                             </div>
                         </div>
                     </div>