|
@@ -9,6 +9,7 @@ import com.zskk.model.Doctors;
|
|
|
import com.zskk.model.Exams;
|
|
|
import com.zskk.model.PatientInfos;
|
|
|
import com.zskk.model.Report;
|
|
|
+import com.zskk.model.Studies;
|
|
|
import com.zskk.service.ServiceFactory;
|
|
|
import com.zskk.service.ThreadPoolService;
|
|
|
import com.zskk.service.WeixinService;
|
|
@@ -35,12 +36,12 @@ public class DataTask implements ITask {
|
|
|
// TODO Auto-generated method stub
|
|
|
try {
|
|
|
List<Exams> exams = Exams.dao.use("zskk").find(
|
|
|
- "SELECT * FROM pacsonline.exams where exam_status=3 and institution_id='11200002' order by createdAt desc limit 50");
|
|
|
+ "SELECT * FROM pacsonline.exams where exam_status=3 and institution_id='11200002' order by createdAt desc limit 30");
|
|
|
for (Exams exams2 : exams) {
|
|
|
try {
|
|
|
- // Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
|
|
|
- Record record = Db.use("connected").findFirst("select * from zskk where accessionNumber=?",
|
|
|
- exams2.getPatientNum());
|
|
|
+ Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
|
|
|
+ Record record = Db.use("connected").findFirst("select * from View_reportinfo where studyuid=?",
|
|
|
+ studies.getStudyuid());
|
|
|
if (record == null) {
|
|
|
continue;
|
|
|
}
|
|
@@ -67,14 +68,15 @@ public class DataTask implements ITask {
|
|
|
patientInfos.setCardNum(record.getStr("idcard"));
|
|
|
patientInfos.update();
|
|
|
exams2.setExamStatus(9);
|
|
|
- String patString = record.getStr("patientid");
|
|
|
- Integer length = patString.length();
|
|
|
- patString = String.format("%0"+length+"d",Long.valueOf(patString));
|
|
|
- exams2.setHopitalizedNo(patString);
|
|
|
- exams2.setClinDoctors(record.getStr("clinicaldoctor"));
|
|
|
+// String patString = record.getStr("patientid");
|
|
|
+// Integer length = patString.length();
|
|
|
+// patString = String.format("%0"+length+"d",Long.valueOf(patString));
|
|
|
+ exams2.setHopitalizedNo("");
|
|
|
+// exams2.setClinDoctors(record.getStr("clinicaldoctor"));
|
|
|
exams2.setApplicationDepartment(record.getStr("department"));
|
|
|
exams2.setApplicationDoctor(record.getStr("clinicaldoctor"));
|
|
|
- exams2.setClinDiag(record.getStr("diagnosis"));
|
|
|
+// exams2.setClinDiag(record.getStr("diagnosis"));
|
|
|
+ exams2.setClinSymp("symptom");
|
|
|
exams2.update();
|
|
|
// 传云医康 数据
|
|
|
Map<String, String> data = new HashMap<String, String>();
|
|
@@ -93,7 +95,7 @@ public class DataTask implements ITask {
|
|
|
// 患者姓名
|
|
|
data.put("patient_name", record.getStr("patientname"));
|
|
|
// 患者性别
|
|
|
- data.put("patient_sex", record.getStr("patientsex").equals("女") ? "F" : "M");
|
|
|
+ data.put("patient_sex", patientInfos.getSex());
|
|
|
// 身份证号
|
|
|
data.put("card_num", patientInfos.getCardNum());
|
|
|
// 手机号
|
|
@@ -103,7 +105,7 @@ public class DataTask implements ITask {
|
|
|
// 患者检查时年龄
|
|
|
data.put("patient_age", patientInfos.getAge());
|
|
|
// 阴阳性 1阴性 2阳性
|
|
|
- data.put("report_result", "");
|
|
|
+ data.put("report_result", record.getStr("result").contains("阳")?"2":"1");
|
|
|
// 报告时间 10位时间戳
|
|
|
data.put("report_datetime", returnSecondTimestamp(record.getStr("reportdate")));
|
|
|
// 报告医生id
|
|
@@ -122,7 +124,7 @@ public class DataTask implements ITask {
|
|
|
data.put("confirm_doctor_id", record.getStr("reviewdoctor"));
|
|
|
// 确认医生姓名
|
|
|
data.put("confirm_doctor_name", record.getStr("reviewdoctor"));
|
|
|
- data.put("patient_no", patString);
|
|
|
+ data.put("patient_no", "");
|
|
|
|
|
|
|
|
|
ThreadPoolService tService = new com.zskk.service.ThreadPoolService();
|