接口页面新增入参住院次数

master
bigbananass 4 years ago
parent bf434c70e1
commit 328eea5d31

@ -52,13 +52,16 @@ public class FontController {
* idpdf
* */
@RequestMapping("showRecordByPatientId")
public String showRecordByPatientId(String assortIds, String patientId, Model model){
public String showRecordByPatientId(String assortIds,String patientId,String visitId, Model model){
if(StringUtils.isBlank(assortIds)){
return retrunErrorPage(model,"病案分类Id不能为空!");
}
if(StringUtils.isBlank(patientId)){
return retrunErrorPage(model,"记账号不能为空!");
}
if(StringUtils.isBlank(visitId)){
return retrunErrorPage(model,"住院次数不能为空!");
}
List<Archive_Master> list = new ArrayList<>();
//判断工号是否存在
try {
@ -74,11 +77,9 @@ public class FontController {
}
}
//判断记账号是否存在
Archive_Master master = new Archive_Master();
master.setPatientId(patientId);
list = archiveMasterService.selectByObject(master);
list = archiveMasterService.selectByObject(patientId,visitId);
if(null == list || list.isEmpty()){
return retrunErrorPage(model,"记账号不存在!");
return retrunErrorPage(model,"病历不存在!");
}
} catch (Exception e) {
ExceptionPrintUtil.printException(e);

@ -2,6 +2,7 @@ package com.emr.dao;
import com.emr.entity.Archive_Master;
import com.emr.entity.Archive_Master_Vo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -53,5 +54,5 @@ public interface Archive_MasterMapper {
/**
*
* */
List<Archive_Master> selectByObject(Archive_Master master);
List<Archive_Master> selectByObject(@Param(value = "patientId") String patientId,@Param(value = "visitId")String visitId);
}

@ -9,6 +9,7 @@ package com.emr.service;
import com.emr.entity.Archive_Master;
import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.OffsetLimitPage;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -202,7 +203,7 @@ public interface Archive_MasterService {
/**
*
* */
List<Archive_Master> selectByObject(Archive_Master master);
List<Archive_Master> selectByObject(String patientId,String visitId);
}

@ -359,8 +359,8 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
}
@Override
public List<Archive_Master> selectByObject(Archive_Master master) {
return archiveMasterMapper.selectByObject(master);
public List<Archive_Master> selectByObject(String patientId,String visitId) {
return archiveMasterMapper.selectByObject(patientId,visitId);
}
}

@ -102,11 +102,13 @@
<!--查询病案是否存在-->
<select id="selectByObject" resultMap="BaseResultMap">
select * from archive_master
<where>
where 1=1
<if test="patientId != null and patientId != ''">
and patient_id = #{patientId,jdbcType=NVARCHAR}
</if>
</where>
<if test="visitId != null and visitId != ''">
and visit_id = #{visitId,jdbcType=NVARCHAR}
</if>
</select>
<select id="selectByCol" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap">
select distinct m.id,m.patient_id,m.inp_no,m.visit_id,m.name,m.sex,f.name

Loading…
Cancel
Save