|
|
|
@ -136,6 +136,7 @@ public class YingDeZyyReportManagerServiceImpl implements ReportManagerService {
|
|
|
|
|
private void cancelReport(String patientId, XmlUtil xmlUtil) {
|
|
|
|
|
String reportNo = null;
|
|
|
|
|
String bcjlType = null;
|
|
|
|
|
String bcjlDelete = null;
|
|
|
|
|
String reportName = null;
|
|
|
|
|
String reportSource = null;
|
|
|
|
|
Node reportNoNode = xmlUtil.getNode("/Request/Msg/REPORT_NO");
|
|
|
|
@ -147,6 +148,12 @@ public class YingDeZyyReportManagerServiceImpl implements ReportManagerService {
|
|
|
|
|
if (Func.isNotEmpty(bcjlTypeNode)) {
|
|
|
|
|
bcjlType = bcjlTypeNode.getTextContent();
|
|
|
|
|
}
|
|
|
|
|
Node bcjlDeleteNode = xmlUtil.getNode("/Request/Msg/BCJL_DELETE");
|
|
|
|
|
if (Func.isNotEmpty(bcjlDeleteNode)) {
|
|
|
|
|
bcjlDelete = bcjlDeleteNode.getTextContent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Node reportNameNode = xmlUtil.getNode("/Request/Msg/CATALOG_NAME");
|
|
|
|
|
if (Func.isNotEmpty(reportNameNode)) {
|
|
|
|
|
reportName = reportNameNode.getTextContent();
|
|
|
|
@ -171,12 +178,12 @@ public class YingDeZyyReportManagerServiceImpl implements ReportManagerService {
|
|
|
|
|
final String shubcjl = "2";
|
|
|
|
|
// 病程记录
|
|
|
|
|
if (bcjl.equals(bcjlType)) {
|
|
|
|
|
cancelBcjlEMRReport(patientId);
|
|
|
|
|
cancelBcjlEMRReport(patientId,bcjlDelete);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// 术后病程记录
|
|
|
|
|
if (shubcjl.equals(bcjlType)) {
|
|
|
|
|
cancelShuBcjlEMRReport(patientId);
|
|
|
|
|
cancelShuBcjlEMRReport(patientId,bcjlDelete);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// 体温单
|
|
|
|
@ -218,8 +225,7 @@ public class YingDeZyyReportManagerServiceImpl implements ReportManagerService {
|
|
|
|
|
List<Long> taskIds = tasks.stream().map(AfCollectTask::getId).collect(Collectors.toList());
|
|
|
|
|
scanAssortMapper.cancel(fileIds);
|
|
|
|
|
// 任务移动作废表,删除任务
|
|
|
|
|
collectTaskMapper.moveCancel(taskIds);
|
|
|
|
|
collectTaskMapper.del(taskIds);
|
|
|
|
|
moveTaskAndDel(taskIds);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void cancelHuiZhenEMRReport(String patientId, String reportName) {
|
|
|
|
@ -273,7 +279,7 @@ public class YingDeZyyReportManagerServiceImpl implements ReportManagerService {
|
|
|
|
|
*
|
|
|
|
|
* @param patientId 病案主键
|
|
|
|
|
*/
|
|
|
|
|
private void cancelBcjlEMRReport(String patientId) {
|
|
|
|
|
private void cancelBcjlEMRReport(String patientId,String delete) {
|
|
|
|
|
AfCollectTask task = new AfCollectTask();
|
|
|
|
|
task.setPatientId(patientId);
|
|
|
|
|
task.setC6("病程记录");
|
|
|
|
@ -285,7 +291,11 @@ public class YingDeZyyReportManagerServiceImpl implements ReportManagerService {
|
|
|
|
|
List<Long> fileIds = tasks.stream().map(AfCollectTask::getAfArchiveDetailId).collect(Collectors.toList());
|
|
|
|
|
List<Long> taskIds = tasks.stream().map(AfCollectTask::getId).collect(Collectors.toList());
|
|
|
|
|
scanAssortMapper.cancel(fileIds);
|
|
|
|
|
updateTaskForRecollect(taskIds);
|
|
|
|
|
if("1".equals(delete)){
|
|
|
|
|
moveTaskAndDel(taskIds);
|
|
|
|
|
}else {
|
|
|
|
|
updateTaskForRecollect(taskIds);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -294,7 +304,7 @@ public class YingDeZyyReportManagerServiceImpl implements ReportManagerService {
|
|
|
|
|
*
|
|
|
|
|
* @param patientId 病案主键
|
|
|
|
|
*/
|
|
|
|
|
private void cancelShuBcjlEMRReport(String patientId) {
|
|
|
|
|
private void cancelShuBcjlEMRReport(String patientId,String delete) {
|
|
|
|
|
AfCollectTask task = new AfCollectTask();
|
|
|
|
|
task.setPatientId(patientId);
|
|
|
|
|
task.setC6("术后病程记录");
|
|
|
|
@ -306,7 +316,11 @@ public class YingDeZyyReportManagerServiceImpl implements ReportManagerService {
|
|
|
|
|
List<Long> fileIds = tasks.stream().map(AfCollectTask::getAfArchiveDetailId).collect(Collectors.toList());
|
|
|
|
|
List<Long> taskIds = tasks.stream().map(AfCollectTask::getId).collect(Collectors.toList());
|
|
|
|
|
scanAssortMapper.cancel(fileIds);
|
|
|
|
|
updateTaskForRecollect(taskIds);
|
|
|
|
|
if("1".equals(delete)){
|
|
|
|
|
moveTaskAndDel(taskIds);
|
|
|
|
|
}else {
|
|
|
|
|
updateTaskForRecollect(taskIds);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -365,6 +379,14 @@ public class YingDeZyyReportManagerServiceImpl implements ReportManagerService {
|
|
|
|
|
return reportDeleteLog;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 更新任务信息,重新采集
|
|
|
|
|
*/
|
|
|
|
|
private void moveTaskAndDel(List<Long> taskIds) {
|
|
|
|
|
collectTaskMapper.moveCancel(taskIds);
|
|
|
|
|
collectTaskMapper.del(taskIds);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 更新任务信息,重新采集
|
|
|
|
|
*/
|
|
|
|
|