|
@@ -35,46 +35,46 @@ 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=62100002 order by createdAt desc limit 50");
|
|
|
+ "SELECT * FROM pacsonline.exams where exam_status=3 and institution_id=62100002 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=?",
|
|
|
+ Record record = Db.use("connected").findFirst("select * from HH_Pacs_Reprot where 检查号=?",
|
|
|
exams2.getPatientNum());
|
|
|
if (record == null) {
|
|
|
continue;
|
|
|
}
|
|
|
Report report = new Report().use("zskk");
|
|
|
report.setId(creatId());
|
|
|
- report.setReportDatetime(parseStringToDate(record.getStr("reportdate")));
|
|
|
- if (record.getStr("impression") == null || record.getStr("DESCRIPTION") == null
|
|
|
- || record.getStr("impression").isBlank() || record.getStr("DESCRIPTION").isBlank()) {
|
|
|
+ report.setReportDatetime(parseStringToDate(record.getStr("报告日期")));
|
|
|
+ if (record.getStr("诊断及意见") == null || record.getStr("检查描述") == null
|
|
|
+ || record.getStr("诊断及意见").isBlank() || record.getStr("检查描述").isBlank()) {
|
|
|
continue;
|
|
|
}
|
|
|
- report.setImpression(record.getStr("impression"));
|
|
|
- report.setDescription(record.getStr("DESCRIPTION"));
|
|
|
+ report.setImpression(record.getStr("诊断及意见"));
|
|
|
+ report.setDescription(record.getStr("检查描述"));
|
|
|
report.setExamId(exams2.getId());
|
|
|
report.setCreatedAt(new Date());
|
|
|
- report.setReportDoctorId(getDoctorIdByName(record.getStr("reportdoctor")));
|
|
|
- report.setReviewDoctorId(getDoctorIdByName(record.getStr("reviewdoctor")));
|
|
|
- report.setReviewDatetime(parseStringToDate(record.getStr("reportdate")));
|
|
|
- report.setConfirmDoctorId(getDoctorIdByName(record.getStr("reviewdoctor")));
|
|
|
- report.setConfirmDatetime(parseStringToDate(record.getStr("reportdate")));
|
|
|
+ report.setReportDoctorId(getDoctorIdByName(record.getStr("报告医师")));
|
|
|
+ report.setReviewDoctorId(getDoctorIdByName(record.getStr("审核医师")));
|
|
|
+ report.setReviewDatetime(parseStringToDate(record.getStr("报告日期")));
|
|
|
+ report.setConfirmDoctorId(getDoctorIdByName(record.getStr("审核医师")));
|
|
|
+ report.setConfirmDatetime(parseStringToDate(record.getStr("报告日期")));
|
|
|
report.save();
|
|
|
PatientInfos patientInfos = PatientInfos.dao.use("zskk").findById(exams2.getPatientId());
|
|
|
- patientInfos.setName(record.getStr("patientname"));
|
|
|
- patientInfos.setPhone(record.getStr("phone"));
|
|
|
- patientInfos.setCardNum(record.getStr("idcard"));
|
|
|
+ patientInfos.setName(record.getStr("姓名"));
|
|
|
+// patientInfos.setPhone(record.getStr("phone"));
|
|
|
+// 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));
|
|
|
+ String patString = record.getStr("住院号");
|
|
|
+// Integer length = patString.length();
|
|
|
+// patString = String.format("%0"+length+"d",Long.valueOf(patString));
|
|
|
exams2.setHopitalizedNo(patString);
|
|
|
- exams2.setClinDoctors(record.getStr("clinicaldoctor"));
|
|
|
- exams2.setApplicationDepartment(record.getStr("department"));
|
|
|
- exams2.setApplicationDoctor(record.getStr("clinicaldoctor"));
|
|
|
- exams2.setClinDiag(record.getStr("diagnosis"));
|
|
|
+// exams2.setClinDoctors(record.getStr("clinicaldoctor"));
|
|
|
+ exams2.setApplicationDepartment(record.getStr("科别"));
|
|
|
+// exams2.setApplicationDoctor(record.getStr("clinicaldoctor"));
|
|
|
+// exams2.setClinDiag(record.getStr("diagnosis"));
|
|
|
exams2.update();
|
|
|
// 传云医康 数据
|
|
|
Map<String, String> data = new HashMap<String, String>();
|
|
@@ -82,18 +82,18 @@ public class DataTask implements ITask {
|
|
|
// 医院id
|
|
|
data.put("hospital_id", "62100002");
|
|
|
// 影像所见
|
|
|
- data.put("description", record.getStr("DESCRIPTION"));
|
|
|
+ data.put("description", record.getStr("检查描述"));
|
|
|
// 意见建议
|
|
|
- data.put("impression", record.getStr("impression"));
|
|
|
+ data.put("impression", record.getStr("诊断及意见"));
|
|
|
// 检查id
|
|
|
data.put("exam_id", exams2.getId());
|
|
|
data.put("study_id", exams2.getStudyId());
|
|
|
// 患者id
|
|
|
data.put("patient_id", exams2.getPatientId());
|
|
|
// 患者姓名
|
|
|
- data.put("patient_name", record.getStr("patientname"));
|
|
|
+ data.put("patient_name", record.getStr("姓名"));
|
|
|
// 患者性别
|
|
|
- data.put("patient_sex", record.getStr("patientsex").equals("女") ? "F" : "M");
|
|
|
+ data.put("patient_sex", patientInfos.getSex());
|
|
|
// 身份证号
|
|
|
data.put("card_num", patientInfos.getCardNum());
|
|
|
// 手机号
|
|
@@ -105,23 +105,23 @@ public class DataTask implements ITask {
|
|
|
// 阴阳性 1阴性 2阳性
|
|
|
data.put("report_result", "");
|
|
|
// 报告时间 10位时间戳
|
|
|
- data.put("report_datetime", returnSecondTimestamp(record.getStr("reportdate")));
|
|
|
+ data.put("report_datetime", returnSecondTimestamp(record.getStr("报告日期")));
|
|
|
// 报告医生id
|
|
|
- data.put("report_doctor_id", record.getStr("reportdoctor"));
|
|
|
+ data.put("report_doctor_id", record.getStr("报告医师"));
|
|
|
// 报告医生姓名
|
|
|
- data.put("report_doctor_name", record.getStr("reportdoctor"));
|
|
|
+ data.put("report_doctor_name", record.getStr("报告医师"));
|
|
|
// 审核时间
|
|
|
- data.put("review_datetime", returnSecondTimestamp(record.getStr("reportdate")));
|
|
|
+ data.put("review_datetime", returnSecondTimestamp(record.getStr("报告日期")));
|
|
|
// 审核医生id
|
|
|
- data.put("review_doctor_id", record.getStr("reviewdoctor"));
|
|
|
+ data.put("review_doctor_id", record.getStr("审核医师"));
|
|
|
// 审核姓名
|
|
|
- data.put("review_doctor_name", record.getStr("reviewdoctor"));
|
|
|
+ data.put("review_doctor_name", record.getStr("审核医师"));
|
|
|
// 确认时间
|
|
|
- data.put("confirm_datetime", returnSecondTimestamp(record.getStr("reportdate")));
|
|
|
+ data.put("confirm_datetime", returnSecondTimestamp(record.getStr("报告日期")));
|
|
|
// 确认医生id
|
|
|
- data.put("confirm_doctor_id", record.getStr("reviewdoctor"));
|
|
|
+ data.put("confirm_doctor_id", record.getStr("审核医师"));
|
|
|
// 确认医生姓名
|
|
|
- data.put("confirm_doctor_name", record.getStr("reviewdoctor"));
|
|
|
+ data.put("confirm_doctor_name", record.getStr("审核医师"));
|
|
|
data.put("patient_no", patString);
|
|
|
|
|
|
|
|
@@ -130,6 +130,7 @@ public class DataTask implements ITask {
|
|
|
String dadaString = JSON.toJSONString(data);
|
|
|
dadaString = dadaString.replace("\\r\\n", "");
|
|
|
dadaString = dadaString.replace("*", "X");
|
|
|
+ dadaString = dadaString.replace("<p>", "");
|
|
|
Map maps = (Map) JSON.parse(dadaString);
|
|
|
try {
|
|
|
post(null, maps);
|