潮州人医根据身份证查询

master
linjj 3 years ago
parent f57440fc7c
commit 935d2ef16b

@ -127,8 +127,52 @@ public class FontShowRecordController {
return "font/recordList";
}
/**
* @description:
* @params:
* @return:
* @author linjj
* @date: 2023/7/31 8:53
*/
@RequestMapping(value = "showRecordList")
public String showRecordList(String inpatientNo, String idCard, Model model, HttpServletRequest request) {
try {
//根据病案号查看病案是否存在
if (StringUtils.isNotBlank(inpatientNo) || StringUtils.isNotBlank(idCard)) {
int commomMaster = commomMapper.selectAllMaster(inpatientNo, idCard);
int commom = commomMapper.isExistInpatientOrAdmissIdOridCard(inpatientNo, idCard, null, null);
if (commom == 0 && commomMaster==0) {
model.addAttribute("msg", "病案不存在!");
return "font/msg";
}
} else {
model.addAttribute("msg", "参数病案号与参数身份证号不能全部为空!");
return "font/msg";
}
//虚假登陆
//验证shiro(有shiro才此操作)
Power_User user = new Power_User();
user.setUserName("第三方");
user.setUserId(-999);
user.setRoleId(-999);
Set<String> menu = new TreeSet<>();
user.setMenus(menu);
UsernamePasswordToken userToken = new UsernamePasswordToken(user.getUserName(), "123456");
Subject subject = SecurityUtils.getSubject();
subject.login(userToken);
request.getSession().setAttribute("CURRENT_USER", user);
model.addAttribute("inpatientNo", inpatientNo);
model.addAttribute("idCard", idCard);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
return "font/recordList";
}
/**
*
*
* @param inpatientNo
* @param userName
* @param model
@ -178,6 +222,7 @@ public class FontShowRecordController {
/**
*
*
* @param page
* @param limit
* @param inpatientNo
@ -203,6 +248,7 @@ public class FontShowRecordController {
/**
* 访
*
* @param userName
* @param deptName
* @param request
@ -225,6 +271,7 @@ public class FontShowRecordController {
/**
*
*
* @param applyApprove
* @param patientIds
* @param request
@ -299,9 +346,14 @@ public class FontShowRecordController {
if (null != page && null != limit) {
PageHelper.startPage(page, limit);
}
PageInfo pageInfo;
try {
List<CommomVo> list = commomMapper.selectCommomByInpatientNo2(inpatientNo, idCard);
PageInfo pageInfo = new PageInfo<>(list);
pageInfo = new PageInfo<>(list);
if (list.size() == 0) {
List<CommomVo> commomVos = commomMapper.selectMasterByInpatientNo(inpatientNo, idCard);
pageInfo = new PageInfo<>(commomVos);
}
return JSON.toJSONString(pageInfo);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
@ -312,6 +364,7 @@ public class FontShowRecordController {
/**
*
*
* @param patientId
* @param inpatientNo
* @param admissTimes
@ -333,7 +386,9 @@ public class FontShowRecordController {
return null;
}
/**
/**
*
*
* @MethodName: showRecordFont
* @Description:
* @Param String patientId:patientId
@ -372,6 +427,7 @@ public class FontShowRecordController {
/**
*
*
* @param patientId
* @param model
* @param request
@ -630,7 +686,6 @@ public class FontShowRecordController {
}
@RequestMapping(value = "selectPrintPic", method = RequestMethod.POST)
@ResponseBody
public ResultUtil selectPrintPic(HttpServletResponse response, String patientId, String rootPaths, String names, String sources, HttpServletRequest request) throws Exception {
@ -704,6 +759,7 @@ public class FontShowRecordController {
/**
* pdfiframe
*
* @param patientId
* @param model
* @return
@ -733,6 +789,7 @@ public class FontShowRecordController {
/**
*
*
* @param patientId
* @param request
* @return
@ -814,6 +871,7 @@ public class FontShowRecordController {
/**
* pdf
*
* @param patientId
* @param scanPages
* @param sources
@ -846,6 +904,7 @@ public class FontShowRecordController {
/**
* PDF
*
* @param patientId
* @param scanPages
* @param sources

@ -367,10 +367,14 @@ public class CommomSearchController {
@RequestMapping("getRecord")
@ResponseBody
public String getRecord(String patientId, String flag) {
List<CommomVo> commomVos;
if (StringUtils.isNoneBlank(patientId)) {
try {
//根据patientId查询包含其他诊断的基本信息
List<CommomVo> commomVos = commomMapper.selectOtherDiagByPatientId(patientId, flag);
commomVos = commomMapper.selectOtherDiagByPatientId(patientId, flag);
if (commomVos.size()==0){
commomVos = commomMapper.selectMasterByPatientId(patientId);
}
return JSON.toJSONString(commomVos.get(0));
} catch (Exception e) {
ExceptionPrintUtil.printException(e);

@ -1322,6 +1322,7 @@ public class TemplateSearchController {
}
}
/**
/**
* @MethodName: getPatientIdsBySql
* @Description: patientIdPDF
@ -1340,10 +1341,7 @@ public class TemplateSearchController {
if (StringUtils.isNoneBlank(sql)) {
try {
StringBuilder json = new StringBuilder();
long start = System.currentTimeMillis();
List<CommomVo> list = commomMapper.selectAll(sql);
long end = System.currentTimeMillis();
//System.out.println("查询patiendId集合时间"+(end - start)/1000.0+"s");
if (null != list && !list.isEmpty()) {
for (CommomVo commomVo : list) {
json.append("'").append(commomVo.getPatientId()).append("',");

@ -98,6 +98,10 @@ public interface CommomMapper {
* */
List<CommomVo> selectCommomByInpatientNo2(@Param("inpatientNo")String inpatientNo,@Param("idCard")String idCard);
List<CommomVo> selectMasterByInpatientNo(@Param("inpatientNo")String inpatientNo,@Param("idCard")String idCard);
List<CommomVo> selectMasterByPatientId(@Param("patientId")String patientId);
/**
*
* @return
@ -132,4 +136,8 @@ public interface CommomMapper {
* @date: 2023/7/5 17:42
*/
List<String> selectPathLIst(@Param("patientId")String patientId);
int selectAllMaster(@Param("inpatientNo")String inpatientNo,@Param("idCard")String idCar);
}

@ -211,8 +211,6 @@ public class CommomService {
}
//脐血库显示pdf
public void showRecordContentBloodFont(String patientId, String scanPages, String sources, String flag, HttpServletResponse response, HttpServletRequest request) throws Exception {
if (StringUtils.isNotBlank(patientId)) {
@ -220,6 +218,7 @@ public class CommomService {
//查询
if (StringUtils.isNotBlank(flag)) {
CommomVo commomVo = commomMapper.selectByPrimaryKey(patientId);
if (commomVo != null) {
if (StringUtils.isNotBlank(commomVo.getFilePath())) {
//flag = home_addr取home_addr字段path_file取home_addr字段
String root1 = "";
@ -251,14 +250,15 @@ public class CommomService {
String mapKey = "admin" + "_" + patientId;
CACHE_MAP.put(mapKey, filePaths);
}
}
} else {
List<String> commomTrees = archiveDetailMapper.getPDFRATH(patientId, scanPages);
if (!commomTrees.isEmpty()) {
String mapKey = "admin" + "_" + patientId;
CACHE_MAP.put(mapKey, commomTrees);
}
}
}
}
}
@ -279,11 +279,9 @@ public class CommomService {
} else if ("file_path".equals(flag)) {
root1 = commomVo.getFilePath();
}
String root2 = commomVo.getNewPath();
//组织src
List<String> src = new LinkedList<>();
String[] scanPageArr = scanPages.split(",");
String[] sourceArr = sources.split(",");
for (int i = 0; i < scanPageArr.length; i++) {
String srcStr = "";
if (StringUtils.isNotBlank(scanPageArr[i])) {

@ -1,12 +1,12 @@
#power\u6743\u9650\u7CFB\u7EDF\u7684\u670D\u52A1\u5668\u5730\u5740\u5934
POWER_IP =localhost
POWER_URLHEAD = http://localhost:8081/power
POWER_IP =172.16.11.90
POWER_URLHEAD = http://172.16.11.90:8081/power
POWER_JSPHEAD = localhost
POWER_JSP = http://localhost:8081/power
POWER_JSPHEAD = 172.16.11.90
POWER_JSP = http://172.16.11.90:8081/power
#\u672C\u8EAB\u7CFB\u7EDF\u7684\u670D\u52A1\u5668\u5730\u5740\u5934
EMR_RECORD_JSP = http://localhost:8083/emr_record
EMR_RECORD_JSP = http://172.16.11.90:8081/emr_record
#webSocket\u670D\u52A1\u5668\u5730\u5740
@ -17,6 +17,8 @@ STR_SPLIT = *^:|,.
#\u65E5\u5FD7\u4FDD\u7559\u5929\u6570
log.days = 180
pdfWater = \u6F6E\u5DDE\u5E02\u4EBA\u6C11\u533B\u9662
#session\u8FC7\u671F\u65F6\u95F4ms
TOKEN_EXPIRE_TIME = 3600000
@ -40,3 +42,12 @@ applyApproveFlag =0
#//?????
initialization =0
#\u67E5\u8BE2\u5168\u6587\u68C0\u7D22\u7684\u5730\u5740
fullTextSearchUrl = http://172.16.11.90:57777/AppEngine3?wsdl
#fullTextSearchUrl = http://localhost:57777/AppEngine3?wsdl
#\u67E5\u8BE2\u5168\u6587\u68C0\u7D22\u7684\u65B9\u6CD5\u540D
fullTextSearchMethod = SearchFulltext
#\u5168\u6587\u68C0\u7D22\u5173\u952E\u5B57\u4FDD\u7559\u5929\u6570
fullTextDays = 90

@ -3,9 +3,9 @@ jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
#jdbc.username=sa
#jdbc.password=docus@702
jdbc.url=jdbc\:sqlserver\://localhost:1433;databaseName=qf_record
jdbc.url=jdbc\:sqlserver\://localhost:1433;databaseName=emr_record
jdbc.username=sa
jdbc.password=admin123
jdbc.password=docus@702
#dataSource2
jdbc.url2=jdbc\:sqlserver\://localhost:1433;databaseName=blgd_java

@ -1296,7 +1296,7 @@
<select id="selectCommomByInpatientNo2" resultMap="BaseResultMap">
select patient_id,inpatient_no,name,admiss_id,admiss_times,dis_date,dis_dept
from commomtable
<where>
<where> 1=1
<if test="inpatientNo != null and inpatientNo != ''">
AND inpatient_no like '%${inpatientNo}%'
</if>
@ -1306,6 +1306,28 @@
</where>
order by admiss_times desc
</select>
<select id="selectMasterByInpatientNo" resultType="com.emr.vo.commomSearch.CommomVo">
SELECT
m.id AS patient_id,
m.inp_no AS inpatient_no,
m.name,
m.visit_id AS admiss_times,
m.discharge_date_time AS dis_date,
emr_dictionary.name AS dis_dept
FROM
archive_master m
LEFT JOIN emr_dictionary ON m.dept_name = emr_dictionary.CODE
AND emr_dictionary.parent_id = 'dept_code'
<where>
<if test="inpatientNo != null and inpatientNo != ''">
AND inp_no like '%${inpatientNo}%'
</if>
<if test="idCard != null and idCard != ''">
AND id_no = #{idCard}
</if>
</where>
order by visit_id desc
</select>
<select id="selectCommomCount" resultType="java.lang.Integer">
SELECT
COUNT(1)
@ -1324,6 +1346,39 @@
LEFT JOIN t_scan_assort t on c.patient_id=t.patient_id
where t.is_del!=1 and c.patient_id=#{patientId}
</select>
<select id="selectAllMaster" resultType="java.lang.Integer">
SELECT
count(1)
FROM
archive_master
<where>
<if test="inpatientNo != null and inpatientNo != ''">
AND inp_no = #{inpatientNo}
</if>
<if test="idCard != null and idCard != ''">
AND id_no = #{idCard}
</if>
</where>
</select>
<select id="selectMasterByPatientId" resultType="com.emr.vo.commomSearch.CommomVo">
SELECT
m.id AS patient_id,
m.inp_no AS inpatient_no,
m.name,
m.visit_id AS admiss_times,
m.discharge_date_time AS dis_date,
emr_dictionary.name AS dis_dept
FROM
archive_master m
LEFT JOIN emr_dictionary ON m.dept_name = emr_dictionary.CODE
AND emr_dictionary.parent_id = 'dept_code'
<where>
<if test="patientId != null and patientId != ''">
m.id =#{patientId}
</if>
</where>
order by visit_id desc
</select>
<!--修改病案备注-->
<update id="updateRecordReMark" parameterType="com.emr.vo.commomSearch.CommomVo">
update commomtable

@ -1,6 +1,5 @@
//加载数据表格
$('#mytab').bootstrapTable({
height:7000,
toolbar: '#toolbar', //工具按钮用哪个容器
striped: true, //是否显示行间隔色
cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性*
@ -11,7 +10,6 @@ $('#mytab').bootstrapTable({
pageNumber: 1, //初始化加载第一页,默认第一页
pageSize: 10, //每页的记录行数(*
pageList: [10,15,20,30,50],//可供选择的每页的行数(*
height: 320, //行高如果没有设置height属性表格自动根据记录条数觉得表格高度
columns:[
{
title:'全选',
@ -50,22 +48,11 @@ $('#mytab').bootstrapTable({
{
title:'出院日期',
field:'disDate',
formatter: function (value) {
if(value != '' && value.length == 21) {
return value.substring(0, value.length - 2);
}
}
},
{
title:'出院科室',
field:'disDept',
},
{
title:'扫描状态',
formatter: function(){
return '已扫描'
}
},
{
title:'操作',
formatter: function(value,row){

@ -449,7 +449,7 @@ function search() {
if (null != admissTimes && "" != admissTimes) {
sql += " and admiss_times like '%" + admissTimes + "%'";
}
if (null != name && "" != name) {4
if (null != name && "" != name) {
sql += " and name like '%" + name + "%'";
}
$("#mytab").bootstrapTable('destroy');

@ -189,9 +189,6 @@ function freshTable(){
locale:'zh-CN',//中文支持,
url:path+'/template/cutomSearchTable',//排序方式
queryParams: function (params) {
debugger
console.log(params)
const param = {
selectSql:$("#englishFields").val(),
fromTableSql:$("#fromTableSql").val(),

Loading…
Cancel
Save