|
@@ -23,12 +23,39 @@ public class ReviewTask implements ITask {
|
|
|
// TODO Auto-generated method stub
|
|
|
DataService dService = ServiceFactory.getService(DataService.class);
|
|
|
List<Record> records = Db.use("connected").find("select top 80 * from reportinfo where reviewdate >? order by reviewdate desc",parseStringToDate());
|
|
|
- for (Record record : records) {
|
|
|
+ for (Record recordns : records) {
|
|
|
try {
|
|
|
+ List<Record> record_accnum = Db.use("connected").find("select * from reportinfo where accessionNumber=?",
|
|
|
+ recordns.getStr("accessionNumber"));
|
|
|
+ Record record = null;
|
|
|
+ //所见
|
|
|
+ String desString = "";
|
|
|
+ //建议
|
|
|
+ String impString = "";
|
|
|
+ //项目
|
|
|
+ String proString = "";
|
|
|
+ if (record_accnum.size() == 1) {
|
|
|
+ record = record_accnum.get(0);
|
|
|
+ desString = desString + record.getStr("description");
|
|
|
+ impString = impString + record.getStr("impression");
|
|
|
+ proString = proString + record.getStr("project");
|
|
|
+ }else if (record_accnum.size() > 1) {
|
|
|
+ record = record_accnum.get(0);
|
|
|
+ for (Record countRecord : record_accnum) {
|
|
|
+ desString = desString + countRecord.getStr("description") + "\n\n";
|
|
|
+ impString = impString + countRecord.getStr("impression") + "\n\n";
|
|
|
+ proString = proString + countRecord.getStr("project") + ";";
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+// Record record = Db.use("connected").findFirst("select * from reportinfo where examNo=?",
|
|
|
+// jsonObject.getString("patient_num"));
|
|
|
|
|
|
- if (record.getStr("description") == null && record.getStr("impression") == null) {
|
|
|
+ if (desString == "" && impString == "") {
|
|
|
continue;
|
|
|
}
|
|
|
+
|
|
|
if (record.getStr("department").equals("健康体检科")) {
|
|
|
Date date = new Date();
|
|
|
long nowdate = date.getTime();
|
|
@@ -63,9 +90,9 @@ public class ReviewTask implements ITask {
|
|
|
// 确认时间
|
|
|
params.put("confirm_datetime", record.getStr("reviewdate"));
|
|
|
// 意见建议
|
|
|
- params.put("impression", record.getStr("impression"));
|
|
|
+ params.put("impression", impString);
|
|
|
// 影像所见
|
|
|
- params.put("description", record.getStr("description"));
|
|
|
+ params.put("description", desString);
|
|
|
// exams表
|
|
|
// 申请科室
|
|
|
params.put("application_department", record.getStr("department"));
|
|
@@ -95,7 +122,7 @@ public class ReviewTask implements ITask {
|
|
|
// 病人ID
|
|
|
params.put("his_patient_id", record.getStr("patientid") == null ? "" : record.getStr("patientid"));
|
|
|
// 检查方法
|
|
|
- params.put("exam_project", record.getStr("project"));
|
|
|
+ params.put("exam_project", proString);
|
|
|
ThreadPoolService tService = ServiceFactory.getService(ThreadPoolService.class);
|
|
|
tService.execute(() -> {
|
|
|
dService.saveReport(params);
|