浏览代码

增加接诊科室选择

hurugang 2 年之前
父节点
当前提交
158f6f9498

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

@@ -102,12 +102,13 @@ public class ClinicController {
      * @param patientId
      * @param serialNo
      * @param turnToConsultationId 会诊记录id
+     * @param deptNo 接诊科室
      * @param httpServletRequest
      * @return
      */
     @UserLoginToken
     @RequestMapping(value = "/saveClinic", method = {RequestMethod.GET})
-    public Map<String, Object> saveClinic(@RequestParam("patientId") String patientId, @RequestParam("serialNo") String serialNo, @RequestParam("turnToConsultationId") Long turnToConsultationId, HttpServletRequest httpServletRequest) {
+    public Map<String, Object> saveClinic(@RequestParam("patientId") String patientId, @RequestParam("serialNo") String serialNo, @RequestParam("turnToConsultationId") Long turnToConsultationId, @RequestParam("deptNo") String deptNo, HttpServletRequest httpServletRequest) {
         Map<String, Object> resultMap = new HashMap<>();
         try {
             if (StringUtils.isBlank(patientId)) {
@@ -132,7 +133,7 @@ public class ClinicController {
             }
             //未接诊的需要变更接诊状态
             if (serialNo != null && StringUtils.isNotBlank(serialNo)) {
-                int num = clinicService.inClinic(patientId, serialNo, turnToConsultationId, tokenUser);
+                int num = clinicService.inClinic(patientId, serialNo, turnToConsultationId,deptNo, tokenUser);
                 if (num > 0) {
                     haiCiAdapterService.notify(serialNo, 2);
                 }

+ 9 - 3
src/main/java/cn/hnthyy/thmz/controller/mz/MzChargeDetailController.java

@@ -1592,7 +1592,9 @@ public class MzChargeDetailController {
                     resultMap.put("message", "未查询到对应的会诊申请记录不存在");
                     return resultMap;
                 }
-                mzPrescriptionVo.setVisitDeptCode(turnToConsultation.getTargetDeptNo());
+                if(StringUtils.isBlank(mzPrescriptionVo.getVisitDeptCode())){
+                    mzPrescriptionVo.setVisitDeptCode(turnToConsultation.getTargetDeptNo());
+                }
                 mzPrescriptionVo.setSerialNo(null);
             } else {
                 //正常就诊
@@ -1609,7 +1611,9 @@ public class MzChargeDetailController {
                         resultMap.put("message", "未查询到历史就诊记录,clinicId=" + clnicId);
                         return resultMap;
                     }
-                    mzPrescriptionVo.setVisitDeptCode(clinic.getDeptCode());
+                    if(StringUtils.isBlank(mzPrescriptionVo.getVisitDeptCode())){
+                        mzPrescriptionVo.setVisitDeptCode(clinic.getDeptCode());
+                    }
                     mzPrescriptionVo.setSerialNo(null);
                 } else {
                     MzfzPatientOrder mzfzPatientOrder = mzfzPatientOrderService.queryBySerialNo(mzPrescriptionVo.getSerialNo());
@@ -1618,7 +1622,9 @@ public class MzChargeDetailController {
                         resultMap.put("message", "当前接诊患者的分诊记录不存在");
                         return resultMap;
                     }
-                    mzPrescriptionVo.setVisitDeptCode(mzfzPatientOrder.getDeptCode());
+                    if(StringUtils.isBlank(mzPrescriptionVo.getVisitDeptCode())){
+                        mzPrescriptionVo.setVisitDeptCode(mzfzPatientOrder.getDeptCode());
+                    }
                 }
             }
             if (!deptCodes.contains(mzPrescriptionVo.getVisitDeptCode())) {

+ 33 - 0
src/main/java/cn/hnthyy/thmz/controller/zd/UnitCodeController.java

@@ -460,4 +460,37 @@ public class UnitCodeController {
         }
     }
 
+
+
+    /**
+     * 获取当前医生的所属科室
+     * @param httpServletRequest
+     * @return
+     */
+    @UserLoginToken
+    @RequestMapping(value = "/getUnitCodeByCurrentUser", method = {RequestMethod.GET})
+    public Map<String, Object> getUnitCodeByCurrentUser(HttpServletRequest httpServletRequest) {
+        Map<String, Object> resultMap = new HashMap<>();
+       try {
+           User tokenUser = TokenUtil.getUser(httpServletRequest);
+           log.info("获取当前医生的所属科室");
+           List<String> deptCodes = userDeptRelationService.queryAllByUserIdCode(tokenUser.getUserIdCode());
+           if(deptCodes==null || deptCodes.size()==0){
+               resultMap.put("code", -1);
+               resultMap.put("message", "当前医生未设置所属科室");
+               return resultMap;
+           }
+           resultMap.put("code", 0);
+           resultMap.put("message", "查询科室信息成功");
+           resultMap.put("data",  zdUnitCodeService.queryZdUnitCodeByCodes(deptCodes));
+           return resultMap;
+       }catch (Exception e){
+           e.printStackTrace();
+           log.error("获取当前医生的所属科室失败,错误信息{}", e);
+           resultMap.put("code", -1);
+           resultMap.put("message", "获取当前医生的所属科室失败");
+           return resultMap;
+       }
+    }
+
 }

+ 15 - 10
src/main/java/cn/hnthyy/thmz/service/impl/thmz/ClinicServiceImpl.java

@@ -116,7 +116,7 @@ public class ClinicServiceImpl implements ClinicService {
 
     @Override
     @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, timeout = 36000, rollbackFor = Exception.class)
-    public int inClinic(String patientId, String serialNo,Long turnToConsultationId, User tokenUser) throws MzException {
+    public int inClinic(String patientId, String serialNo,Long turnToConsultationId,String deptNo, User tokenUser) throws MzException {
         MzfzPatientOrder mzfzPatientOrder = mzfzPatientOrderMapper.selectBySerialNo(serialNo);
         if (mzfzPatientOrder == null) {
             throw new MzException("当前接诊患者的分诊记录不存在");
@@ -152,17 +152,22 @@ public class ClinicServiceImpl implements ClinicService {
         updateMzfzPatientOrder.setSerialNo(Integer.valueOf(serialNo));
         updateMzfzPatientOrder.setStatusFlag(MzfzStatusEnum.IN_CLINIC.code);
         updateMzfzPatientOrder.setDoctorCode(tokenUser.getUserIdCode());
+        if(StringUtils.isNotBlank(deptNo)){
+            updateMzfzPatientOrder.setDeptCode(deptNo);
+        }
         if(Constants.JY_EXEC_CODE.equals(mzfzPatientOrder.getDeptCode())){
             //简易门诊将医生的科室设置到分诊记录
-            String requestDay=DateUtil.paseToString(DateUtil.getFirstSecond(),"yyyy-MM-dd");
-            List<String> ampms = mzZdWorkTimeService.getNotUsedWorkTimes(requestDay);
-            List<String> requestDepts=mzyRequestMapper.selectUnitCodeByRequestDayAndDoctor(requestDay,tokenUser.getUserIdCode(),ampms);
-            if(requestDepts!=null && requestDepts.size()>0){
-                updateMzfzPatientOrder.setDeptCode(requestDepts.get(0));
-            }else {
-                List<String> deptNos=userDeptRelationMapper.selectAllByUserIdCode(tokenUser.getUserIdCode());
-                if(deptNos!=null && deptNos.size()>0){
-                    updateMzfzPatientOrder.setDeptCode(deptNos.get(0));
+            if(StringUtils.isBlank(deptNo)){
+                String requestDay=DateUtil.paseToString(DateUtil.getFirstSecond(),"yyyy-MM-dd");
+                List<String> ampms = mzZdWorkTimeService.getNotUsedWorkTimes(requestDay);
+                List<String> requestDepts=mzyRequestMapper.selectUnitCodeByRequestDayAndDoctor(requestDay,tokenUser.getUserIdCode(),ampms);
+                if(requestDepts!=null && requestDepts.size()>0){
+                    updateMzfzPatientOrder.setDeptCode(requestDepts.get(0));
+                }else {
+                    List<String> deptNos=userDeptRelationMapper.selectAllByUserIdCode(tokenUser.getUserIdCode());
+                    if(deptNos!=null && deptNos.size()>0){
+                        updateMzfzPatientOrder.setDeptCode(deptNos.get(0));
+                    }
                 }
             }
         }

+ 2 - 1
src/main/java/cn/hnthyy/thmz/service/thmz/ClinicService.java

@@ -90,10 +90,11 @@ public interface ClinicService {
      * @param patientId 病人id
      * @param serialNo 分诊流水号
      * @param turnToConsultationId 会诊记录id
+     * @param deptNo 接诊科室
      * @param tokenUser 当前操作人
      * @return
      */
-    int inClinic(String patientId,String serialNo,Long turnToConsultationId, User tokenUser) throws MzException;
+    int inClinic(String patientId,String serialNo,Long turnToConsultationId,String deptNo, User tokenUser) throws MzException;
 
     /**
      * 取消接诊

+ 97 - 38
src/main/resources/static/js/mz/clinic.js

@@ -266,6 +266,7 @@ $(function () {
 
     initYshPart();
     initJyZdSample();
+    initClinicDeptNo();
     setTimeout(function () {
         getLodop();
     }, 800);
@@ -819,6 +820,12 @@ $(function () {
 
 });
 
+/**
+ * 打开科室选择页面
+ */
+function selectDeptModal() {
+    $("#selectDeptModal").modal("show");
+}
 
 /**
  * 打开配置页面
@@ -906,7 +913,7 @@ function groupIdChange() {
     //var last = parseInt($("#groupId > option:last").val());
     var groupId = $("#groupId").val();
     var keys = groupIdMap.keySet();
-    if (keys.indexOf(groupId)<0) {
+    if (keys.indexOf(groupId) < 0) {
         //是新增药品清空药品输入区域
         var updateFlag = $("#western_medicine_update_flag").val();
         var currentCode = $("#western_medicine_current_code").val();
@@ -1990,9 +1997,11 @@ function realClinicalReception(patientId, serialNo, reqType) {
     if (turnToConsultationIdInClick == null || turnToConsultationIdInClick == "null") {
         turnToConsultationIdInClick = 0;
     }
+    var userIdCode=localStorage.getItem("userIdCode");
+    var deptNo=localStorage.getItem(userIdCode);
     $.ajax({
         type: "GET",
-        url: '/thmz/saveClinic?patientId=' + patientId + "&serialNo=" + serialNo + "&turnToConsultationId=" + turnToConsultationIdInClick,
+        url: '/thmz/saveClinic?patientId=' + patientId + "&serialNo=" + serialNo + "&turnToConsultationId=" + turnToConsultationIdInClick+"&deptNo="+deptNo,
         contentType: "application/json;charset=UTF-8",
         dataType: "json",
         headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
@@ -3736,6 +3745,38 @@ function initJyZdSample() {
 }
 
 
+/**
+ * 初始化当前医生说书科室
+ */
+function initClinicDeptNo() {
+    $.ajax({
+        type: "GET",
+        url: '/thmz/getUnitCodeByCurrentUser',
+        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>';
+            });
+            $('#clinicDeptNo').empty();
+            $('#clinicDeptNo').html(html);
+            $('#clinicDeptNo').selectpicker('refresh');
+            var userIdCode=localStorage.getItem("userIdCode");
+            var deptNo=localStorage.getItem(userIdCode);
+            if(deptNo!=null && deptNo!=""){
+                $('#clinicDeptNo').selectpicker('val', deptNo);
+                $('#clinicDeptNo').selectpicker('refresh');
+            }
+        }
+    });
+}
+
+
 /**
  * 保存当前药品到右边处方区域
  * @param index 0 西药 1中药 2 诊疗和社备
@@ -3759,7 +3800,7 @@ function saveWesternMedicineWithCheck(calculateTotalAmountFlag, orderNoParmams)
     var updateFlag = $("#western_medicine_update_flag").val();
     if (updateFlag == "true" || updateFlag == true) {
         saveWesternMedicine(calculateTotalAmountFlag);
-    }else {
+    } else {
         //当前药房编码
         var currentGroupNo = $("#current_groupNo").val();
         if ($("#xyTab").find("li") == null || $("#xyTab").find("li").length == 0) {
@@ -3844,14 +3885,14 @@ function saveWesternMedicine(calculateTotalAmountFlag) {
     //药品名称
     var westernMedicineNamme = $("#western_medicine_name").val();
     var tableId = $("#xyTab li.active").find("a").attr("href");
-    if(tableId==undefined){
+    if (tableId == undefined) {
         refreshNavTabs(0, currentGroupNo, null);
         tableId = $("#xyTab li.active").find("a").attr("href");
     }
     var thisGroupNo = $(tableId).find("input.current_groupNo").val();
-    if(currentGroupNo!=thisGroupNo){
+    if (currentGroupNo != thisGroupNo) {
         //91 医材
-        var type="医材";
+        var type = "医材";
         if (currentGroupNo == '71') {
             type = "普通西成药"
         } else if (currentGroupNo == '111') {
@@ -3859,7 +3900,7 @@ function saveWesternMedicine(calculateTotalAmountFlag) {
         } else if (currentGroupNo == '131') {
             type = "精二药物"
         }
-        errorMesageSimaple("【"+westernMedicineNamme+"】是"+type+",无法保存到当前处方,请切换或者新增相应的处方进行保存。");
+        errorMesageSimaple("【" + westernMedicineNamme + "】是" + type + ",无法保存到当前处方,请切换或者新增相应的处方进行保存。");
         return;
     }
 
@@ -4863,17 +4904,17 @@ function removeYpOrProject(index, obj) {
             }
         }
     }
-    var temporaryItemsGroupId= $(obj).parent().find("input.temporary_items_groupId").val();
-    var temporaryItemsGroupIds=$(obj).parent().parent().find("input.temporary_items_groupId");
-    if(temporaryItemsGroupIds!=null && temporaryItemsGroupIds.length>0){
-        var count=0;
-        for(var i=0;i<temporaryItemsGroupIds.length;i++){
-            if(temporaryItemsGroupId==$(temporaryItemsGroupIds[i]).val()){
+    var temporaryItemsGroupId = $(obj).parent().find("input.temporary_items_groupId").val();
+    var temporaryItemsGroupIds = $(obj).parent().parent().find("input.temporary_items_groupId");
+    if (temporaryItemsGroupIds != null && temporaryItemsGroupIds.length > 0) {
+        var count = 0;
+        for (var i = 0; i < temporaryItemsGroupIds.length; i++) {
+            if (temporaryItemsGroupId == $(temporaryItemsGroupIds[i]).val()) {
                 count++;
             }
         }
         //当前删除的药品组号是最后一个的时候,清空缓存
-        if(count==1){
+        if (count == 1) {
             groupIdMap.remove(temporaryItemsGroupId);
             gropuIdAndOrderNoMap.remove(temporaryItemsGroupId);
         }
@@ -4898,7 +4939,7 @@ function removeYpOrProject(index, obj) {
             $("#current_zyClassType").val(null);
         }
     }
-    if(index==0){
+    if (index == 0) {
         resetGroupIdMap();
     }
 }
@@ -4907,19 +4948,19 @@ function removeYpOrProject(index, obj) {
  * 重置组号与用法、频率天数缓存关系
  */
 function resetGroupIdMap() {
-    var temporaryItemsGroupIds=$("#xyTabContent").find("input.temporary_items_groupId");
-    if(temporaryItemsGroupIds!=null && temporaryItemsGroupIds.length>0){
-        var list=[];
-        for(var i=0;i<temporaryItemsGroupIds.length;i++){
-                var groupId=$(temporaryItemsGroupIds[i]).val();
-                if(list.indexOf(groupId)<0){
-                    list.push(groupId);
-                }
+    var temporaryItemsGroupIds = $("#xyTabContent").find("input.temporary_items_groupId");
+    if (temporaryItemsGroupIds != null && temporaryItemsGroupIds.length > 0) {
+        var list = [];
+        for (var i = 0; i < temporaryItemsGroupIds.length; i++) {
+            var groupId = $(temporaryItemsGroupIds[i]).val();
+            if (list.indexOf(groupId) < 0) {
+                list.push(groupId);
+            }
         }
         var keys = groupIdMap.keySet();
-        for(var i=0;i<keys.length;i++){
-            var key=keys[i];
-            if(list.indexOf(key)<0){
+        for (var i = 0; i < keys.length; i++) {
+            var key = keys[i];
+            if (list.indexOf(key) < 0) {
                 groupIdMap.remove(key);
             }
         }
@@ -8075,6 +8116,7 @@ function getParamsForpPrescription(type) {
     }
     var jsonData = JSON.parse('' +
         '{"patientId": "",' +
+        '"visitDeptCode":"",' +
         '"firstOrNot":"",' +
         '"icdCode": "",' +
         '"icdText": null,' +
@@ -8113,6 +8155,9 @@ function getParamsForpPrescription(type) {
         '"readCardResult":"",' +
         '"readCardType":"01"}');
     jsonData.patientId = $("#patientId").text();
+    var userIdCode = localStorage.getItem("userIdCode");
+    var visitDeptCode = localStorage.getItem(userIdCode);
+    jsonData.firstOrNot = visitDeptCode;
     jsonData.firstOrNot = $("input[name='firstOrNot']:checked").val();
     jsonData.icdCode = icdCode;
     jsonData.serialNo = $("#mzfzSerialNoInClick").val();
@@ -9510,17 +9555,17 @@ function printPrescription(patientId, times, clnicId, payMark, printType) {
                             if (zlPrescription != null && zlPrescription.length > 0) {
                                 var html = "";
                                 for (var i = 0; i < zlPrescription.length; i++) {
-                                    var zlPrescriptionTemp=zlPrescription[i];
+                                    var zlPrescriptionTemp = zlPrescription[i];
                                     html += "<tr>";
-                                    html += "<td colspan='2'>"+zlPrescriptionTemp.index+"."+zlPrescriptionTemp.name+"</td>";
+                                    html += "<td colspan='2'>" + zlPrescriptionTemp.index + "." + zlPrescriptionTemp.name + "</td>";
                                     html += "<td style='text-align: right;padding-right: 15px;'>X</td>";
-                                    html += "<td>总量:"+zlPrescriptionTemp.quantity+"</td>";
+                                    html += "<td>总量:" + zlPrescriptionTemp.quantity + "</td>";
                                     html += "</tr>";
                                     html += "<tr>";
                                     html += "<td width='40%'></td>";
-                                    html += "<td width='20%'>单量:"+zlPrescriptionTemp.drugQuan+"</td>";
-                                    html += "<td width='20%'>频率:"+zlPrescriptionTemp.frequency+"</td>";
-                                    html += "<td width='20%'>天数:"+zlPrescriptionTemp.orderDays+"天</td>";
+                                    html += "<td width='20%'>单量:" + zlPrescriptionTemp.drugQuan + "</td>";
+                                    html += "<td width='20%'>频率:" + zlPrescriptionTemp.frequency + "</td>";
+                                    html += "<td width='20%'>天数:" + zlPrescriptionTemp.orderDays + "天</td>";
                                     html += "</tr>";
                                 }
                                 if (index > 0) {
@@ -10802,12 +10847,12 @@ function showMzBlRecordModal(patientId, times, type) {
                 $("#editObstericalHistory").val(mzBlRecord.obstericalHistory == null ? "" : mzBlRecord.obstericalHistory);
                 $("#editQtjc").val(mzBlRecord.emrPe == null ? "" : mzBlRecord.emrPe);
                 setSelectedAttr("editZd", mzBlRecord.icdCode, mzBlRecord.icdText);
-                var tentativeDiagnosis=mzBlRecord.tentativeDiagnosis == null ? "" : mzBlRecord.tentativeDiagnosis;
-                if((mzBlRecord.icdCode==null || mzBlRecord.icdCode=="") && mzBlRecord.icdText!=null && mzBlRecord.icdText!=""){
-                    if(tentativeDiagnosis==null || tentativeDiagnosis==""){
-                        tentativeDiagnosis=mzBlRecord.icdText;
-                    }else {
-                        tentativeDiagnosis=mzBlRecord.icdText+" "+tentativeDiagnosis;
+                var tentativeDiagnosis = mzBlRecord.tentativeDiagnosis == null ? "" : mzBlRecord.tentativeDiagnosis;
+                if ((mzBlRecord.icdCode == null || mzBlRecord.icdCode == "") && mzBlRecord.icdText != null && mzBlRecord.icdText != "") {
+                    if (tentativeDiagnosis == null || tentativeDiagnosis == "") {
+                        tentativeDiagnosis = mzBlRecord.icdText;
+                    } else {
+                        tentativeDiagnosis = mzBlRecord.icdText + " " + tentativeDiagnosis;
                     }
                 }
                 $("#edittentativeDiagnosis").val(tentativeDiagnosis);
@@ -11613,3 +11658,17 @@ function printSelfPayCommon(printType) {
         LODOP.PRINT_SETUP();
     }
 }
+
+
+/**
+ * 将科室缓存到内存中
+ */
+function saveDeptConfig() {
+    var clinicDeptNo = $("#clinicDeptNo").val();
+    if (clinicDeptNo != null && clinicDeptNo != "") {
+        var userIdCode = localStorage.getItem("userIdCode");
+        localStorage.setItem(userIdCode, clinicDeptNo);
+    }
+    $("#selectDeptModal").modal("hide");
+
+}

+ 96 - 30
src/main/resources/templates/mz/clinic.html

@@ -326,7 +326,7 @@
         <div style="height: calc(100% - 60px);overflow-y: auto;border-bottom: 1px solid #ddd;" id="scroll-wrap">
             <div class="col-md-12 col-sm-12 col-xs-12">
                 <div class="item form-group">
-                    <div class="col-md-8 col-sm-8 col-xs-12">
+                    <div class="col-md-4 col-sm-4 col-xs-12">
                         <p>
                             <input type="radio" class="flat" name="firstOrNot" id="first" value="0" checked=""
                                    required/>
@@ -339,10 +339,10 @@
                             }">&nbsp;复诊</span>
                         </p>
                     </div>
-                    <div class="col-md-4 col-sm-4 col-xs-12" style="text-align: right;">
+                    <div class="col-md-8 col-sm-8 col-xs-12" style="text-align: right;">
                         <!--<a onclick="printSelfPay()"-->
-                           <!--style="cursor: pointer;color: #2e69eb !important;font-size: 14px;"><i-->
-                                <!--class="fa fa-print">&nbsp;自费承诺书</i></a>-->
+                        <!--style="cursor: pointer;color: #2e69eb !important;font-size: 14px;"><i-->
+                        <!--class="fa fa-print">&nbsp;自费承诺书</i></a>-->
                         <a onclick="printNoThirdParty()"
                            style="cursor: pointer;color: #2e69eb !important;font-size: 14px;"><i
                                 class="fa fa-print">&nbsp;外伤无第三方责任承诺书</i></a>
@@ -351,6 +351,8 @@
                         <a style="cursor: pointer;font-size: 14px;color: #2e69eb!important;display: none"
                            onclick="consultation()" id="consultation">&nbsp;&nbsp;发起会诊</i></a>
                         <a style="cursor: pointer;font-size: 14px;color: #2e69eb!important;" onclick="clearWorkSpace()">&nbsp;&nbsp;清空工作台</i></a>
+                        <a style="cursor: pointer;font-size: 14px;color: #2e69eb!important;"
+                           onclick="selectDeptModal()">&nbsp;&nbsp;科室选择</i></a>
                         <a style="cursor: pointer;font-size: 14px;color: #2e69eb!important;"
                            onclick="configWorkspaceModal()">&nbsp;&nbsp;配置</i></a>
                     </div>
@@ -789,7 +791,8 @@
                                     <div style="width: 128px;float: left;line-height: 34px;">
                                         <label class="my_label_2">水量:</label>
                                         <div style="float: left;width: 69px">
-                                            <input type="number" class="form-control" id="cyJsl" placeholder="请输入" min="0"
+                                            <input type="number" class="form-control" id="cyJsl" placeholder="请输入"
+                                                   min="0"
                                                    value="400"/>
                                         </div>
                                         ml
@@ -798,7 +801,8 @@
                                     <div style="width: 128px;float: left;line-height: 34px;">
                                         <label class="my_label_2">煮取:</label>
                                         <div style="float: left;width: 69px">
-                                            <input type="number" class="form-control" id="cyZql" placeholder="请输入" min="0"
+                                            <input type="number" class="form-control" id="cyZql" placeholder="请输入"
+                                                   min="0"
                                                    value="200"/>
                                         </div>
                                         ml
@@ -809,7 +813,8 @@
                                     <div style="width: 128px;float: left;line-height: 34px;">
                                         <label class="my_label_2">日剂:</label>
                                         <div style="float: left;width: 69px">
-                                            <input type="number" class="form-control" id="cyMtjs" placeholder="日付数" min="0"
+                                            <input type="number" class="form-control" id="cyMtjs" placeholder="日付数"
+                                                   min="0"
                                                    value="1"/>
                                         </div>
@@ -829,7 +834,8 @@
                                         <div style="width: 83px;float: left;">
                                             <select class="form-control selectpicker show-tick zy_supplyType"
                                                     data-live-search="true"
-                                                    id="zy_supplyType_1" title="请选择" onchange="calculateTotalAmount(false)">
+                                                    id="zy_supplyType_1" title="请选择"
+                                                    onchange="calculateTotalAmount(false)">
                                             </select>
                                         </div>
                                     </div>
@@ -1290,7 +1296,8 @@
                             <label class="control-label col-md-4 col-sm-4 col-xs-12" for="rapidAcceptsProvinceCode">省份
                             </label>
                             <div class="col-md-8 col-sm-8 col-xs-12">
-                                <select class="form-control selectpicker show-tick" id="rapidAcceptsProvinceCode" title="请选择"
+                                <select class="form-control selectpicker show-tick" id="rapidAcceptsProvinceCode"
+                                        title="请选择"
                                         data-live-search="true" onchange="initCity(3,null)" disabled="disabled">
                                 </select>
                             </div>
@@ -1301,8 +1308,9 @@
                             <label class="control-label col-md-4 col-sm-4 col-xs-12" for="rapidAcceptsCityCode">市
                             </label>
                             <div class="col-md-8 col-sm-8 col-xs-12">
-                                <select class="form-control selectpicker show-tick"  id="rapidAcceptsCityCode"
-                                        data-live-search="true" onchange="initDistrict(3,null,null)" title="请选择" disabled="disabled">
+                                <select class="form-control selectpicker show-tick" id="rapidAcceptsCityCode"
+                                        data-live-search="true" onchange="initDistrict(3,null,null)" title="请选择"
+                                        disabled="disabled">
                                 </select>
                             </div>
                         </div>
@@ -1310,7 +1318,7 @@
                             <label class="control-label col-md-4 col-sm-4 col-xs-12" for="rapidAcceptsDistrictCode">区县
                             </label>
                             <div class="col-md-8 col-sm-8 col-xs-12">
-                                <select class="form-control selectpicker show-tick"  data-live-search="true" title="请选择"
+                                <select class="form-control selectpicker show-tick" data-live-search="true" title="请选择"
                                         id="rapidAcceptsDistrictCode" disabled="disabled">
                                 </select>
                             </div>
@@ -1463,7 +1471,7 @@
                             <div class="col-md-8 col-sm-8 col-xs-12">
                                 <div class="input-group demo2 input-group-own">
                                     <input id="editUserCardNo" class="form-control col-md-7 col-xs-12"
-                                           data-validate-length-range="1,8"
+                                           data-validate-length-range="1,10"
                                            placeholder="请输入" required="required" type="text">
                                     <span class="input-group-addon"><a href="#"><i
                                             class="fa fa-credit-card"></i></a></span>
@@ -1527,7 +1535,8 @@
                                         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="editUserProvinceCode" title="请选择"
+                                <select class="form-control selectpicker show-tick" required="required"
+                                        id="editUserProvinceCode" title="请选择"
                                         data-live-search="true" onchange="initCity(2,null)">
                                 </select>
                             </div>
@@ -1536,7 +1545,8 @@
                             <label class="control-label col-md-4 col-sm-4 col-xs-12" for="editCityCode">市
                             </label>
                             <div class="col-md-8 col-sm-8 col-xs-12">
-                                <select class="form-control selectpicker show-tick" required="required" id="editCityCode"
+                                <select class="form-control selectpicker show-tick" required="required"
+                                        id="editCityCode"
                                         data-live-search="true" onchange="initDistrict(2,null,null)" title="请选择">
                                 </select>
                             </div>
@@ -1549,7 +1559,8 @@
                                         class="required">*</span>
                             </label>
                             <div class="col-md-8 col-sm-8 col-xs-12">
-                                <select class="form-control selectpicker show-tick" required="required" data-live-search="true" title="请选择"
+                                <select class="form-control selectpicker show-tick" required="required"
+                                        data-live-search="true" title="请选择"
                                         id="editUserDistrictCode">
                                 </select>
                             </div>
@@ -1560,7 +1571,7 @@
                             <div class="col-md-10 col-sm-10 col-xs-12">
                                 <input id="editUserDetail" class="form-control col-md-7 col-xs-12"
                                        data-validate-length-range="0,40"
-                                       placeholder="请输入"  type="text">
+                                       placeholder="请输入" type="text">
                             </div>
                         </div>
                     </div>
@@ -2047,6 +2058,42 @@
 <!--提示弹窗结尾-->
 
 
+<!--科室选择弹窗开始-->
+<div class="modal fade bs-example-modal-sm in" tabindex="-1" role="dialog" aria-hidden="true" id="selectDeptModal"
+     style="top:20%;">
+    <div class="modal-dialog modal-sm">
+        <div class="modal-content" style="width: 550px;max-height: 550px;overflow-y: auto;">
+            <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">请选择需要接诊的科室</h4>
+            </div>
+            <div class="modal-body">
+                <form class="form-horizontal form-label-left" novalidate>
+                    <div class="item form-group">
+                        <div class="col-md-12 col-sm-12 col-xs-12"
+                             style="font-size: 14px;font-weight: 700;">
+                            <label class="control-label col-md-3 col-sm-3 col-xs-12" for="clinicDeptNo">接诊科室
+                            </label>
+                            <div class="col-md-8 col-sm-8 col-xs-12">
+                                <select class="form-control selectpicker show-tick" title="请选择"
+                                        id="clinicDeptNo">
+                                </select>
+                            </div>
+                        </div>
+                    </div>
+                </form>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-primary" onclick="saveDeptConfig()">确定</button>
+                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
+            </div>
+        </div>
+    </div>
+</div>
+<!--科室选择弹窗结尾-->
+
+
 <!--配置工作台弹窗开始-->
 <div class="modal fade bs-example-modal-sm in" tabindex="-1" role="dialog" aria-hidden="true" id="configWorkspaceModal"
      style="top:20%;">
@@ -2312,22 +2359,29 @@
         <table class="table table-striped table-bordered">
             <tbody>
             <tr height="20px">
-                <td style="font-size: 13px;">处方金额:<span style="width: 150px;display: inline-block;border-bottom: 1px solid grey;" id="cfAmountPrint"></span>
+                <td style="font-size: 13px;">处方金额:<span
+                        style="width: 150px;display: inline-block;border-bottom: 1px solid grey;"
+                        id="cfAmountPrint"></span>
                 </td>
                 <td style="font-size: 13px;padding-left: 60px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;医师:<span
-                        style="width: 150px;display: inline-block;border-bottom: 1px solid grey;" id="doctorPrescription"></span>
+                        style="width: 150px;display: inline-block;border-bottom: 1px solid grey;"
+                        id="doctorPrescription"></span>
                 </td>
             </tr>
             <tr height="20px">
-                <td style="font-size: 13px;">审核药师:<span style="width: 150px;display: inline-block;border-bottom: 1px solid grey;"></span>
+                <td style="font-size: 13px;">审核药师:<span
+                        style="width: 150px;display: inline-block;border-bottom: 1px solid grey;"></span>
                 </td>
-                <td style="font-size: 13px;padding-left: 60px;">核对药师:<span style="width: 150px;display: inline-block;border-bottom: 1px solid grey;"></span>
+                <td style="font-size: 13px;padding-left: 60px;">核对药师:<span
+                        style="width: 150px;display: inline-block;border-bottom: 1px solid grey;"></span>
                 </td>
             </tr>
             <tr height="20px">
-                <td style="font-size: 13px;">调配药师:<span style="width: 150px;display: inline-block;border-bottom: 1px solid grey;"></span>
+                <td style="font-size: 13px;">调配药师:<span
+                        style="width: 150px;display: inline-block;border-bottom: 1px solid grey;"></span>
                 </td>
-                <td style="font-size: 13px;padding-left: 60px;">发药药师:<span style="width: 150px;display: inline-block;border-bottom: 1px solid grey;"></span>
+                <td style="font-size: 13px;padding-left: 60px;">发药药师:<span
+                        style="width: 150px;display: inline-block;border-bottom: 1px solid grey;"></span>
                 </td>
             </tr>
             </tbody>
@@ -3521,7 +3575,8 @@
             <div style="text-align:center;font-weight: 700;font-size: 16px;">长沙泰和医院</div>
         </div>
         <div style="text-align:center;font-weight: 700;margin-top: 10px;font-size: 16px;">参保人员门诊统筹医保支付告知审核表</div>
-        <table class="table table-striped table-bordered" style="border-bottom: 1px solid black;font-size: 13px;width: 100%;padding-bottom: 10px;margin-top: 10px;">
+        <table class="table table-striped table-bordered"
+               style="border-bottom: 1px solid black;font-size: 13px;width: 100%;padding-bottom: 10px;margin-top: 10px;">
             <tbody>
             <tr>
                 <td style="text-align: left;padding-left: 15px">姓名:</td>
@@ -3553,13 +3608,24 @@
         </table>
     </div>
     <div id="self_pay_table_foot" style="width:920px;margin:0 auto;font-size: 13px;">
-        <table class="table table-striped table-bordered" style="border-bottom: 1px solid black;padding-bottom: 10px;width: 100%;">
+        <table class="table table-striped table-bordered"
+               style="border-bottom: 1px solid black;padding-bottom: 10px;width: 100%;">
             <tbody style="font-size: 13px;">
-                  <tr><td style="padding-left: 50px;">1.本人已知晓并同意使用以上医疗项目;</td></tr>
-                  <tr><td style="padding-left: 50px;">2.本人提供的证件资料属实,并愿意承担相应的法律责任。</td></tr>
-                  <tr><td style="text-align: right;padding-right: 150px">患者签字:</td></tr>
-                  <tr><td style="text-align: right;padding-right: 115px">已核实人证相符</td></tr>
-                  <tr><td style="text-align: right;padding-right: 150px">医生签字:</td></tr>
+            <tr>
+                <td style="padding-left: 50px;">1.本人已知晓并同意使用以上医疗项目;</td>
+            </tr>
+            <tr>
+                <td style="padding-left: 50px;">2.本人提供的证件资料属实,并愿意承担相应的法律责任。</td>
+            </tr>
+            <tr>
+                <td style="text-align: right;padding-right: 150px">患者签字:</td>
+            </tr>
+            <tr>
+                <td style="text-align: right;padding-right: 115px">已核实人证相符</td>
+            </tr>
+            <tr>
+                <td style="text-align: right;padding-right: 150px">医生签字:</td>
+            </tr>
             </tbody>
         </table>
         <table class="table table-striped table-bordered" style="margin-top: 10px;height: 50px;">