Kaynağa Gözat

门诊医生工作台处方回调支持个性化定制

hurugang 3 yıl önce
ebeveyn
işleme
c93c6263b3

+ 5 - 0
src/main/java/cn/hnthyy/thmz/controller/mz/WorkspaceConfigController.java

@@ -74,6 +74,11 @@ public class WorkspaceConfigController {
                 resultMap.put("message", " 初步诊断配置参数为空");
                 return resultMap;
             }
+            if (workspaceConfig.getCheckboxFlag() == null) {
+                resultMap.put("code", -1);
+                resultMap.put("message", " 历史轨迹和处方模板默认勾选配置参数为空");
+                return resultMap;
+            }
             User tokenUser = TokenUtil.getUser(httpServletRequest);
             workspaceConfigService.save(workspaceConfig,tokenUser);
             resultMap.put("code", 0);

+ 5 - 0
src/main/java/cn/hnthyy/thmz/entity/thmz/WorkspaceConfig.java

@@ -65,6 +65,11 @@ public class WorkspaceConfig  implements Serializable {
 	 */
 	private Integer tentativeDiagnosisFlag;
 
+	/**
+	 *  历史轨迹和处方模板默认勾选  0 勾选 1 不勾选
+	 */
+	private Integer checkboxFlag;
+
 	/**
 	 * 创建人
 	 */

+ 7 - 4
src/main/java/cn/hnthyy/thmz/mapper/thmz/WorkspaceConfigMapper.java

@@ -10,8 +10,8 @@ public interface WorkspaceConfigMapper {
      * @return
      */
     @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
-    @Insert("insert into t_workspace_config(user_id_code,symptom_flag,emr_hpi_flag,emr_ps_flag,personal_history_flag,family_history_flag,obsterical_history_flag,pressure_left_flag,tentative_diagnosis_flag,create_id,create_date,update_id,update_date) " +
-            "values(#{userIdCode},#{symptomFlag},#{emrHpiFlag},#{emrPsFlag},#{personalHistoryFlag},#{familyHistoryFlag},#{obstericalHistoryFlag},#{pressureLeftFlag},#{tentativeDiagnosisFlag},#{createId},#{createDate},#{updateId},#{updateDate})")
+    @Insert("insert into t_workspace_config(user_id_code,symptom_flag,emr_hpi_flag,emr_ps_flag,personal_history_flag,family_history_flag,obsterical_history_flag,pressure_left_flag,tentative_diagnosis_flag,checkbox_flag,create_id,create_date,update_id,update_date) " +
+            "values(#{userIdCode},#{symptomFlag},#{emrHpiFlag},#{emrPsFlag},#{personalHistoryFlag},#{familyHistoryFlag},#{obstericalHistoryFlag},#{pressureLeftFlag},#{tentativeDiagnosisFlag},#{checkboxFlag},#{createId},#{createDate},#{updateId},#{updateDate})")
     int inset(WorkspaceConfig workspaceConfig);
 
     /**
@@ -19,7 +19,7 @@ public interface WorkspaceConfigMapper {
      * @param id
      * @return
      */
-    @Select("select id,user_id_code,symptom_flag,emr_hpi_flag,emr_ps_flag,personal_history_flag,family_history_flag,obsterical_history_flag,pressure_left_flag,tentative_diagnosis_flag,create_id,create_date,update_id,update_date from t_workspace_config where id = #{id}")
+    @Select("select id,user_id_code,symptom_flag,emr_hpi_flag,emr_ps_flag,personal_history_flag,family_history_flag,obsterical_history_flag,pressure_left_flag,tentative_diagnosis_flag,checkbox_flag,create_id,create_date,update_id,update_date from t_workspace_config where id = #{id}")
     WorkspaceConfig selectWorkspaceConfigById(@Param("id") Long id);
 
 
@@ -28,7 +28,7 @@ public interface WorkspaceConfigMapper {
      * @param userIdCode
      * @return
      */
-    @Select("select id,user_id_code,symptom_flag,emr_hpi_flag,emr_ps_flag,personal_history_flag,family_history_flag,obsterical_history_flag,pressure_left_flag,tentative_diagnosis_flag,create_id,create_date,update_id,update_date from t_workspace_config where user_id_code = #{userIdCode}")
+    @Select("select id,user_id_code,symptom_flag,emr_hpi_flag,emr_ps_flag,personal_history_flag,family_history_flag,obsterical_history_flag,pressure_left_flag,tentative_diagnosis_flag,checkbox_flag,create_id,create_date,update_id,update_date from t_workspace_config where user_id_code = #{userIdCode}")
     WorkspaceConfig selectWorkspaceConfigByUserIdCode(@Param("userIdCode") String userIdCode);
 
 
@@ -64,6 +64,9 @@ public interface WorkspaceConfigMapper {
             "<when test='tentativeDiagnosisFlag!=null'>",
             ",tentative_diagnosis_flag =#{tentativeDiagnosisFlag}",
             "</when>",
+            "<when test='checkboxFlag!=null'>",
+            ",checkbox_flag =#{checkboxFlag}",
+            "</when>",
             "</trim>",
             "</script>"})
     int updateConfigByKey(WorkspaceConfig workspaceConfig);

+ 2 - 2
src/main/java/cn/hnthyy/thmz/service/impl/thmz/TsmzServiceImpl.java

@@ -240,7 +240,7 @@ public class TsmzServiceImpl implements TsmzService {
             if (code == 0) {
                 String balc = mzPatientMiMapper.selectMztczfsf(patientId,-1,"310");
                 if (balc == null) {
-                    resultMap.put("code", -1);
+                    resultMap.put("code", -2);
                     resultMap.put("message", "该患者无门诊共济信息!");
                     return resultMap;
                 }
@@ -249,7 +249,7 @@ public class TsmzServiceImpl implements TsmzService {
                 resultMap.put("message", msg);
                 return resultMap;
             } else if (code == -1) {
-                resultMap.put("code", -1);
+                resultMap.put("code", -2);
                 resultMap.put("message", "该患者无门诊共济信息!");
                 return resultMap;
             } else {

+ 42 - 9
src/main/resources/static/js/mz/clinic.js

@@ -2300,10 +2300,16 @@ function fitZyReqContent(zyReqPrescription, contentId, titleId, checkBox) {
 function afterFitContent(contentId, zyReqHtml, titleId) {
     $("#" + contentId).html(zyReqHtml);
     $("#" + titleId).removeClass("hide").addClass("in");
-    $("#" + titleId).find("input[type='checkbox']").prop("checked", true);
-    $("#" + contentId).find("input[type='checkbox']").each(function (index, obj) {
-        $(obj).prop("checked", true);
-    });
+    //是否默认勾选处方回调
+    var checkboxFlag = localStorage.getItem("checkboxFlag");
+    if(checkboxFlag!=null &&(checkboxFlag=="0" || checkboxFlag==0)){
+        $("#" + titleId).find("input[type='checkbox']").prop("checked", true);
+        $("#" + contentId).find("input[type='checkbox']").each(function (index, obj) {
+            $(obj).prop("checked", true);
+        });
+    }else {
+        $("#" + titleId).find("input[type='checkbox']").prop("checked", false);
+    }
 }
 
 /**
@@ -2379,8 +2385,15 @@ function prescriptionJmblChosice(obj) {
  * @param id
  */
 function medicalModelModal(id) {
-    $("#conciseRecordsYlfw").prop("checked", true);
-    $("#prescriptionSubsidiaryYlfw").prop("checked", true);
+    //是否默认勾选处方回调
+    var checkboxFlag = localStorage.getItem("checkboxFlag");
+    if(checkboxFlag!=null &&(checkboxFlag=="0" || checkboxFlag==0)){
+        $("#conciseRecordsYlfw").prop("checked", true);
+        $("#prescriptionSubsidiaryYlfw").prop("checked", true);
+    }else {
+        $("#conciseRecordsYlfw").prop("checked", false);
+        $("#prescriptionSubsidiaryYlfw").prop("checked", false);
+    }
     $.ajax({
         type: "GET",
         url: '/thmz/getTemplateById?id=' + id,
@@ -7269,6 +7282,17 @@ function initWorkspaceConfigForCurrent() {
                         $("#tentativeDiagnosisFlagCheck").parent().parent().click();//当前不选中改为选中
                     }
                 }
+                if (res.data.checkboxFlag == 1) {
+                    if ($("#checkboxFlagCheck").parent().hasClass("checked")) {
+                        $("#checkboxFlagCheck").parent().parent().click();//当前选中改为不选中
+                    }
+                } else if (res.data.checkboxFlag == 0) {
+                    if (!$("#checkboxFlagCheck").parent().hasClass("checked")) {
+                        $("#checkboxFlagCheck").parent().parent().click();//当前不选中改为选中
+                    }
+                }
+                //设置是否默认勾选处方回调
+                localStorage.setItem("checkboxFlag",res.data.checkboxFlag);
             } else {
                 errorMesage(res);
             }
@@ -7289,6 +7313,7 @@ function saveWorkspaceConfig() {
     var obstericalHistoryFlag = $("#obstericalHistoryFlagCheck").parent().hasClass("checked") == true ? 0 : 1;
     var pressureLeftFlag = $("#pressureLeftFlagCheck").parent().hasClass("checked") == true ? 0 : 1;
     var tentativeDiagnosisFlag = $("#tentativeDiagnosisFlagCheck").parent().hasClass("checked") == true ? 0 : 1;
+    var checkboxFlag = $("#checkboxFlagCheck").parent().hasClass("checked") == true ? 0 : 1;
     $.ajax({
         type: "POST",
         url: '/thmz/saveWorkspaceConfig',
@@ -7302,7 +7327,8 @@ function saveWorkspaceConfig() {
             "familyHistoryFlag": familyHistoryFlag,
             "obstericalHistoryFlag": obstericalHistoryFlag,
             "pressureLeftFlag": pressureLeftFlag,
-            "tentativeDiagnosisFlag": tentativeDiagnosisFlag
+            "tentativeDiagnosisFlag": tentativeDiagnosisFlag,
+            "checkboxFlag": checkboxFlag
         }),
         headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
         success: function (res) {
@@ -8170,8 +8196,15 @@ function prescriptionDetailCommon(patientId, times, clnicId, payMark, type) {
         //退费时,查看的明细还是处方开立的情况
         payMark = 0;
     }
-    $("#conciseRecordsJzxq").prop("checked", true);
-    $("#prescriptionSubsidiaryJzxq").prop("checked", true);
+    //是否默认勾选处方回调
+    var checkboxFlag = localStorage.getItem("checkboxFlag");
+    if(checkboxFlag!=null &&(checkboxFlag=="0" || checkboxFlag==0)){
+        $("#conciseRecordsJzxq").prop("checked", true);
+        $("#prescriptionSubsidiaryJzxq").prop("checked", true);
+    }else {
+        $("#conciseRecordsJzxq").prop("checked", false);
+        $("#prescriptionSubsidiaryJzxq").prop("checked", false);
+    }
     $.ajax({
         type: "GET",
         url: '/thmz/getMzPrescriptionVo?patientId=' + patientId + '&times=' + times + '&MzBlRecordFlag=false&payMark=' + payMark + '&clnicId=' + clnicId,

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

@@ -1906,6 +1906,9 @@
                             <label style="padding-left: 0px;" class="col-md-3 col-sm-3 col-xs-3">
                                 <input type="checkbox" class="flat" id="tentativeDiagnosisFlagCheck">&nbsp;&nbsp;初步诊断
                             </label>
+                            <label style="padding-left: 0px;" class="col-md-3 col-sm-3 col-xs-3">
+                                <input type="checkbox" class="flat" id="checkboxFlagCheck">&nbsp;&nbsp;处方回调
+                            </label>
                         </div>
                     </div>
                 </form>