病案室处理列别修改

master
ALW 3 years ago
parent 1d0909102e
commit 07a23c5d2e

@ -587,6 +587,11 @@
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
</dependency>
</dependencies>
<build>

@ -9,6 +9,7 @@ import com.emr.service.OverdueRemindService;
import com.emr.service.Zd_AssortService;
import com.emr.service.ipml.TBasicBrowseHistoryService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.HttpClientUtils;
import com.emr.util.Msg;
import com.emr.vo.OverdueRemindVO;
import org.apache.commons.lang3.StringUtils;
@ -43,6 +44,8 @@ public class FontController {
private String allAddortIds;
@Value("${POWER_URLHEAD}")
private String powerUrlHead;
@Value("${POWER_URLHEAD}")
private String POWER_URLHEAD;
@Autowired
private Archive_DetailService archiveDetailService;
@Autowired
@ -417,10 +420,9 @@ public class FontController {
*/
@ResponseBody
@RequestMapping(value = "sendMessageWith")
public void sendMessageWith(HttpServletRequest request, String title, String content) {
public void sendMessageWith(HttpServletRequest request, String title, String content,String typeFlag) {
try {
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
title="超期的病案通知";
OverdueRemindVO overdueRemindVO= new OverdueRemindVO();
DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
String date2="2021-01-01";
@ -442,19 +444,25 @@ public class FontController {
if (i ==0) {
//查询该主治医生有多少超期的病案未归档
String overdueNum = overdueRemindService.selectoverdueNumAndDoctorId(overdueRemindVO);
System.out.println("overdueNum:::" + overdueNum);
//调用接口
// 创建uri
// System.out.println("overdueNum:::" + overdueNum);
// //调用接口
// // 创建uri
content = "尊敬的医生!您有'" + overdueNum + "'条超期的病案未归档";
String url = powerUrlHead + "/font/sendMessage?"
+ "userId=" + userId
+ "&sysFlag=emr_medical_record"
+ "&title=" + title
+ "&content=" + content.replace(" ", "");
// 执行请求
System.out.println("content:::" + content);
System.out.println("url:::" + url);
HttpClients.createDefault().execute(new HttpGet(url));
// String url = powerUrlHead + "/font/sendMessage?"
// + "userId=" + userId
// + "&sysFlag=emr_medical_record"
// + "&title=" + title
// + "&content=" + content.replace(" ", "");
// // 执行请求
// System.out.println("content:::" + content);
// System.out.println("url:::" + url);
Map<String, String> map = new HashMap<>();
map.put("title", "超期的病案通知");
map.put("content", content);
map.put("sysFlag", "emr_medical_record");
map.put("userId", userId + "");
map.put("typeFlag", typeFlag);
HttpClientUtils.doGet(POWER_URLHEAD + "/font/sendMessage", map);
//保存到提醒日志
overdueRemindVO.setDOCTOR_IN_CHARGE(s);
System.out.println("s:::" + s);

@ -1,16 +1,27 @@
package com.emr.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.emr.entity.Archive_Master_Following;
import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.Power_User;
import javax.servlet.http.HttpServletRequest;
import com.emr.service.Archive_Master_FollowingService;
import com.emr.service.PowerUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
@Controller
@ -18,18 +29,59 @@ public class PowerUserController {
@Autowired
private PowerUserService powerUserService;
@Autowired
private Archive_Master_FollowingService archiveMasterFollowingService;
@RequestMapping("getPowerUserList")
@ResponseBody
public Object getPowerUserList(HttpServletRequest request,String type){
public Object getPowerUserList(HttpServletRequest request, String type) {
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String handleName = user.getUserPosition();//姓名
request.setAttribute("handleName",handleName);
request.setAttribute("handleName", handleName);
JSONArray powerUserList = powerUserService.getPowerUserList(type);
if(powerUserList == null){
if (powerUserList == null) {
return "ERROR";
}else{
} else {
return powerUserList;
}
}
}
@RequestMapping("getPowerUserList2")
@ResponseBody
public Object getPowerUserList2(HttpServletRequest request, String type) {
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String handleName = user.getUserPosition();//姓名
request.setAttribute("handleName", handleName);
StringBuffer sb = new StringBuffer();
StringBuffer sb1 = new StringBuffer();
JSONArray powerUserList = powerUserService.getPowerUserList(type);
for (int i = 0; powerUserList.size() > i; i++) {
JSONObject jsonObject = powerUserList.getJSONObject(i);
String roleName = jsonObject.getString("name");
if (sb.length() != 0) {
sb.append(",");
}
if (!roleName.equals("") && !roleName.equals(null)) {
sb.append("'" + roleName + "'");
}
String userName = jsonObject.getString("userName");
if (sb1.length() != 0) {
sb1.append(",");
}
if (!roleName.equals("")&& !roleName.equals(null)) {
sb1.append("'" + userName + "'");
}
}
String roleName = sb.toString() ;
String userName = sb1.toString() ;
List<Archive_Master_Following> nameList = archiveMasterFollowingService.getHandleName(roleName,userName);
if (nameList == null) {
return "ERROR";
} else {
return nameList;
}
}
}

@ -212,6 +212,7 @@ public class lastVerifyController {
archive_master_following.setHandleId(username);
archive_master_following.setHandleName(handleName);
archive_master_followingService.insertSelective(archive_master_following);
archiveMasterService.updateByClo2(archiveMaster);
}
if("LG".equals(lgFlag)) {
//留观号审核推送第三方

@ -183,10 +183,6 @@ public class signListController {
@ResponseBody
@RequestMapping(value = "/addSignListForce")
public String addSignListForce(HttpServletRequest request, HttpServletResponse response, Archive_Master_Vo archiveMasterVo) throws Exception {
boolean flag = FormTokenFlagUtil.isFlag(request);
if (!flag) {
return "请不要重复提交!";
}
response.setCharacterEncoding("utf-8");
request.setCharacterEncoding("utf-8");
String result = "";
@ -345,6 +341,7 @@ public class signListController {
archive_master_following.setHandleId(username);
archive_master_following.setHandleName(handleName);
archive_master_followingService.insertSelective(archive_master_following);
archiveMasterService.updateByClo2(archiveMaster);
}
} else {
bol = 2;

@ -1,6 +1,7 @@
package com.emr.dao;
import com.emr.entity.Archive_Master;
import com.emr.entity.Archive_Master_Following;
import com.emr.entity.Archive_Master_Vo;
import org.apache.ibatis.annotations.Param;
@ -113,6 +114,15 @@ public interface Archive_MasterMapper {
*/
int updateByClo(Archive_Master record);
/**
*
* @param record
* @return
*/
int updateByClo2(Archive_Master record);
/**
* id
* @param record
@ -155,6 +165,7 @@ public interface Archive_MasterMapper {
* */
List<Archive_Master> selectByObject(@Param(value = "patientId") String patientId,@Param(value = "visitId")String visitId);
/**
*
* @param master

@ -72,4 +72,5 @@ public interface Archive_Master_FollowingMapper {
List<Archive_Master_Following> selectFollowingByFollowingType(@Param("followingType")String followingType,@Param("masterIds")String masterIds);
List<Archive_Master_Following> getHandleName(@Param(value = "roleName") String roleName,@Param(value = "userName") String userName);
}

@ -2,6 +2,7 @@ package com.emr.dao;
import com.alibaba.fastjson.JSONArray;
import com.emr.entity.Archive_Master_Following;
import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.Zd_Assort;
import org.apache.ibatis.annotations.Param;
@ -38,6 +39,6 @@ public interface Zd_AssortMapper {
List<Archive_Master_Following>getHandleName(String patientIds);
}

@ -119,6 +119,14 @@ public interface Archive_MasterService {
*/
int updateByClo(Archive_Master record);
/**
*
* @param record
* @return
*/
int updateByClo2(Archive_Master record);
/**
* id
* @param record

@ -23,4 +23,6 @@ public interface Archive_Master_FollowingService {
* @return
*/
List<Archive_Master_Following> selLastByType(Archive_Master_Following archiveMasterFollowing);
List<Archive_Master_Following> getHandleName(String roleName,String userName);
}

@ -2,10 +2,14 @@ package com.emr.service;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.emr.entity.Archive_Master_Following;
import com.emr.entity.Archive_Master_Vo;
import java.util.List;
public interface PowerUserService {
JSONArray getPowerUserList(String type);
}

@ -418,6 +418,12 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
return archiveMasterMapper.updateByClo(record);
}
@Override
public int updateByClo2(Archive_Master record) {
return archiveMasterMapper.updateByClo2(record);
}
@Override
public int updateById(Archive_Master record) {
return archiveMasterMapper.updateById(record);

@ -43,4 +43,9 @@ public class Archive_Master_FollowingServiceImpl implements Archive_Master_Follo
}
@Override
public List<Archive_Master_Following> getHandleName(String roleName,String userName) {
return archive_master_followingMapper.getHandleName(roleName,userName);
}
}

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.emr.dao.Zd_AssortMapper;
import com.emr.entity.Archive_Master_Following;
import com.emr.entity.Archive_Master_Vo;
import com.emr.util.HttpClientUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@ -46,8 +47,7 @@ public class PowerUserServiceImpl implements PowerUserService {
return null;
}
@Override
public List<Archive_Master_Following> getHandleName(String patientIds) {
return zd_assortMapper.getHandleName(patientIds);
}
}

@ -1367,6 +1367,9 @@
bed_number=#{bedNumber,jdbcType=NVARCHAR}
where id = #{id,jdbcType=NVARCHAR}
</update>
<update id="updateByClo2" parameterType="com.emr.entity.Archive_Master">
update archive_master set send_time=null where id = #{id}
</update>
<select id="selectHandleDetail" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap2">
SELECT m.id
,m.patient_id

@ -207,4 +207,12 @@
<select id="selectFollowingByFollowingType" resultMap="BaseResultMap">
select distinct master_id,following_type from Archive_Master_Following where following_type= #{followingType} and master_id in (${masterIds})
</select>
<select id="getHandleName" resultMap="BaseResultMap">
select distinct handle_name,handle_id from Archive_Master_Following where handle_name in (${roleName}) and handle_id in (${userName})
and following_content in ('病案室审核(已归档)','病案室退回科主任') AND handle_name IS NOT NULL
</select>
</mapper>

@ -91,7 +91,9 @@
where 1=1 and back_flag in(5,6) and assort_id is not null and assort_id!=''
)a
on a.archive_detail_id=m.id
<where> 1=1 and ArchiveState not in('作废','已封存') and assort_id is not null and assort_id!=''
LEFT JOIN Archive_Master_Following q
on m.id=q.master_id
<where> 1=1 and ArchiveState not in('作废','已封存') and assort_id is not null and assort_id!='' and q.following_type=9
<if test="archiveDetailId != null and archiveDetailId != '' ">
and f.archive_detail_id = #{archiveDetailId,jdbcType=NVARCHAR}
</if>
@ -786,7 +788,9 @@
on a.master_id=m.id
LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where typeCode='dept_code' )) d
on m.dept_name=d.code
<where> 1=1 and m.ArchiveState not in('作废','已封存','') and m.ArchiveState is not null and m.Is_Valid!=1 and total_back_num>0
LEFT JOIN Archive_Master_Following f
on m.id=f.master_id
<where> 1=1 and m.ArchiveState not in('作废','已封存','') and m.ArchiveState is not null and m.Is_Valid!=1 and total_back_num>0 and f.following_type=9
<if test="inpNo != null and inpNo != ''">
and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%'
</if>
@ -853,7 +857,9 @@
from Archive_Master m where 1=1 and ArchiveState not in('作废','已封存','') and ArchiveState is not null and Is_Valid!=1
)m
on a.archive_detail_id=m.id
<where> 1=1 and ArchiveState not in('作废','已封存','','取消入院') and ArchiveState is not null
LEFT JOIN Archive_Master_Following q
on m.id=q.master_id
<where> 1=1 and ArchiveState not in('作废','已封存','','取消入院') and ArchiveState is not null and q.following_type=9
<if test="archiveDetailId != null and archiveDetailId != ''">
and a.archive_detail_id=#{archiveDetailId,jdbcType=NCHAR}
</if>

@ -38,9 +38,8 @@
</where>
ORDER BY assort_sort
</select>
<select id="getHandleName" resultType="com.emr.entity.Archive_Master_Following"
parameterType="java.lang.String">
select * from Archive_Master_Following where handle_name IN (${patientIds})
<select id="getHandleName" resultType="com.emr.entity.Archive_Master_Following" parameterType="java.lang.String">
select distinct * from Archive_Master_Following where handle_name IN (${roleName})
</select>

@ -37,6 +37,7 @@
};
ws.onclose = function () {
console.log("连接关闭");
};

@ -43,25 +43,8 @@
type:"post",
data:{"userId":val},
success:function (data) {
}
})
// $.ajaxSetup({
// contentType: "application/x-www-form-urlencoded;charset=utf-8",
// complete: function (XMLHttpRequest, textStatus) {
// },
// statusCode: {
// 404: function () {
// toastr.warning('数据获取/输入失败没有此服务。404');
// },
// 504: function () {
// toastr.warning('数据获取/输入失败服务器没有响应。504');
// },
// 500: function () {
// toastr.warning('服务器有误。500');
// }
// }
// });
if (${menuList == null}) {
// setTimeout(function () {

@ -1830,13 +1830,13 @@
function getUserList() {
//获取role为病案室、病案室管理的用户
$.ajax({
url:"${path}/getPowerUserList",
url:"${path}/getPowerUserList2",
type:"GET",
data:{"type":0},
success:function (data) {
if (data != null) {
for (var i = 0; i < data.length; i++) {
$("#handleName").append("<option value=" + data[i].userName + ">" + data[i].name + "</option>");
$("#handleName").append("<option value=" + data[i].handleId + ">" + data[i].handleName + "</option>");
}
}
$(".selectpicker").selectpicker('refresh');

@ -457,8 +457,8 @@
<%--<input type="text" class="input-sm form-control" id="idNo" placeholder="请输入身份证号">--%>
<%--</div>--%>
<div class="form-group divCss8">
<label for="visitId">经管员姓名:</label>
<input type="text" class="input-sm form-control" id="operateName1" placeholder="请输入经管员姓名">
<label for="visitId">送达人姓名:</label>
<input type="text" class="input-sm form-control" id="operateName1" placeholder="请输入送达人姓名">
</div>
<div class="form-group divCss8">
<label >患者姓名:</label>
@ -1354,7 +1354,7 @@
</form>
</div>
<div class="modal-footer">
<input id="operateName" type="text" placeholder="请输入操作人姓名"/>
<input id="operateName" type="text" placeholder="请输入送达人姓名"/>
<button type="button" class="btn btn-default btn-sm" data-dismiss="modal">返回</button>
<button type="button" class="btn btn-primary btn-sm" id="signBtn2">签收</button>
<button type="button" class="btn btn-warning btn-sm" id="signBtn3">取消签收</button>
@ -3315,7 +3315,7 @@
},
},
{
title: '经管员姓名',
title: '送达人姓名',
field: 'operateName',
align: 'center',
valign: 'middle',

Loading…
Cancel
Save