|
|
|
|
@ -10,7 +10,9 @@ import com.emr.dao.*;
|
|
|
|
|
import com.emr.entity.*;
|
|
|
|
|
import com.emr.service.Archive_MasterService;
|
|
|
|
|
import com.emr.service.Emr_Fault_DetailService;
|
|
|
|
|
import com.emr.util.ExceptionPrintUtil;
|
|
|
|
|
import com.emr.util.Msg;
|
|
|
|
|
import com.emr.util.OracleConnect;
|
|
|
|
|
import com.github.pagehelper.Page;
|
|
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
@ -198,14 +200,50 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
|
|
|
|
|
public List<Archive_Master_Vo> selectLastVerifyList(Archive_Master_Vo archiveMasterVo){
|
|
|
|
|
List<Archive_Master_Vo> list = archiveMasterMapper.selectByLast(archiveMasterVo);
|
|
|
|
|
if(null != list && !list.isEmpty()){
|
|
|
|
|
//记帐号集合
|
|
|
|
|
StringBuilder patientIdStr = new StringBuilder();
|
|
|
|
|
for (Archive_Master_Vo masterVo : list) {
|
|
|
|
|
//状态均为护士长已质控,取出一个对象,转换中文状态
|
|
|
|
|
Integer status = Integer.valueOf(masterVo.getArchivestate());
|
|
|
|
|
/*Integer status = Integer.valueOf(masterVo.getArchivestate());
|
|
|
|
|
if(status.equals(EnumVerify.DocState.HeadNurseCheck.getCode())){
|
|
|
|
|
masterVo.setStatus(EnumVerify.DocState.HeadNurseCheck.getName());
|
|
|
|
|
}else if(status.equals(EnumVerify.DocState.CallBacked.getCode())){
|
|
|
|
|
masterVo.setStatus(EnumVerify.DocState.CallBacked.getName());
|
|
|
|
|
}*/
|
|
|
|
|
//组织记帐号集合
|
|
|
|
|
if(StringUtils.isNotBlank(masterVo.getPatientId())) {
|
|
|
|
|
if (StringUtils.isNotBlank(patientIdStr)) {
|
|
|
|
|
patientIdStr.append(",'").append(masterVo.getPatientId()).append("'");
|
|
|
|
|
} else {
|
|
|
|
|
patientIdStr.append("'").append(masterVo.getPatientId()).append("'");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//赋值签收情况
|
|
|
|
|
//查询签收情况
|
|
|
|
|
String sql = "select fpat_no from v_jswzh_archive_bqreg where fpat_no in ("+patientIdStr.toString()+")" +
|
|
|
|
|
"and freg_date is not null";
|
|
|
|
|
try{
|
|
|
|
|
//执行查询
|
|
|
|
|
List<String> selectList = OracleConnect.selectList(sql);
|
|
|
|
|
for (Archive_Master_Vo masterVo : list) {
|
|
|
|
|
masterVo.setStatus("未签收");
|
|
|
|
|
//赋值
|
|
|
|
|
if(!CollectionUtils.isEmpty(selectList)){
|
|
|
|
|
String patientId = masterVo.getPatientId();
|
|
|
|
|
if(StringUtils.isNotBlank(patientId)) {
|
|
|
|
|
for (String str : selectList) {
|
|
|
|
|
if(str.equals(patientId)){
|
|
|
|
|
masterVo.setStatus("已签收");
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
ExceptionPrintUtil.printException(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return list;
|
|
|
|
|
@ -273,29 +311,29 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
|
|
|
|
|
List<Emr_Dictionary> dictionaries = dictionaryMapper.dicByTypeCode(dictionary);
|
|
|
|
|
//查询出院天数
|
|
|
|
|
List<Archive_Master_Vo> selectDays = archiveMasterMapper.selectDaysByMasterIds(list);
|
|
|
|
|
if(!CollectionUtils.isEmpty(dictionaries)){
|
|
|
|
|
for (Archive_Master_Vo vo:list) {
|
|
|
|
|
for (Archive_Master_Vo vo:list) {
|
|
|
|
|
if(!CollectionUtils.isEmpty(dictionaries)) {
|
|
|
|
|
//在院科室
|
|
|
|
|
String deptAdmissionTo = vo.getDeptAdmissionTo();
|
|
|
|
|
//出院科室
|
|
|
|
|
String deptName = vo.getDeptName();
|
|
|
|
|
//住院科室
|
|
|
|
|
for (Emr_Dictionary dictionaryTemp:dictionaries) {
|
|
|
|
|
for (Emr_Dictionary dictionaryTemp : dictionaries) {
|
|
|
|
|
String name = dictionaryTemp.getName();
|
|
|
|
|
if(StringUtils.isNotBlank(deptAdmissionTo) && deptAdmissionTo.equals(dictionaryTemp.getCode())){
|
|
|
|
|
if (StringUtils.isNotBlank(deptAdmissionTo) && deptAdmissionTo.equals(dictionaryTemp.getCode())) {
|
|
|
|
|
vo.setDeptAdmissionTo(name);
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.isNotBlank(deptName) && deptName.equals(dictionaryTemp.getCode())){
|
|
|
|
|
if (StringUtils.isNotBlank(deptName) && deptName.equals(dictionaryTemp.getCode())) {
|
|
|
|
|
vo.setDeptName(name);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//赋值出院天数
|
|
|
|
|
if(!CollectionUtils.isEmpty(selectDays)){
|
|
|
|
|
for(Archive_Master_Vo days : selectDays){
|
|
|
|
|
if(days.getId().equals(vo.getId())){
|
|
|
|
|
vo.setDays(days.getDays());
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//赋值出院天数
|
|
|
|
|
if(!CollectionUtils.isEmpty(selectDays)){
|
|
|
|
|
for(Archive_Master_Vo days : selectDays){
|
|
|
|
|
if(days.getId().equals(vo.getId())){
|
|
|
|
|
vo.setDays(days.getDays());
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|