|
@@ -36,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='03060001' order by createdAt desc limit 60");
|
|
|
+ "SELECT * FROM pacsonline.exams where exam_status=3 and institution_id='16100008' 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 reportinfo where accessionNumber=?",
|
|
|
- exams2.getAccessionNum());
|
|
|
+ exams2.getPatientNum());
|
|
|
if (record == null) {
|
|
|
continue;
|
|
|
}
|
|
@@ -75,13 +75,13 @@ public class DataTask implements ITask {
|
|
|
// 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.update();
|
|
|
// 传云医康 数据
|
|
|
Map<String, String> data = new HashMap<String, String>();
|
|
|
// 获取data数据
|
|
|
// 医院id
|
|
|
- data.put("hospital_id", "03060001");
|
|
|
+ data.put("hospital_id", "16100008");
|
|
|
// 影像所见
|
|
|
data.put("description", record.getStr("description"));
|
|
|
// 意见建议
|
|
@@ -104,7 +104,7 @@ public class DataTask implements ITask {
|
|
|
// 患者检查时年龄
|
|
|
data.put("patient_age", patientInfos.getAge()==null?"":patientInfos.getAge());
|
|
|
// 阴阳性 1阴性 2阳性
|
|
|
- data.put("report_result", record.getStr("result").equals("2")?"1":"2");
|
|
|
+ data.put("report_result", "");
|
|
|
// 报告时间 10位时间戳
|
|
|
data.put("report_datetime", returnSecondTimestamp(record.getStr("reportdate")));
|
|
|
// 报告医生id
|
|
@@ -254,7 +254,7 @@ public class DataTask implements ITask {
|
|
|
* @date: 2019/12/26 18:26
|
|
|
*/
|
|
|
public String returnSecondTimestamp(String data) throws ParseException {
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
return String.valueOf(sdf.parse(data).getTime() / 1000);
|
|
|
}
|
|
@@ -277,14 +277,14 @@ public class DataTask implements ITask {
|
|
|
}
|
|
|
name = name.replace(" ", "");
|
|
|
Doctors doctors = Doctors.dao.use("zskk").findFirst(
|
|
|
- "SELECT * FROM doctors where instr(?,realname) and institution_id='03060001' and realname <>''", name);
|
|
|
+ "SELECT * FROM doctors where instr(?,realname) and institution_id='16100008' and realname <>''", name);
|
|
|
if (doctors == null) {
|
|
|
Doctors newDoctors = new Doctors().use("zskk");
|
|
|
newDoctors.setId(creatId());
|
|
|
newDoctors.setUsername("none");
|
|
|
newDoctors.setRealname(name);
|
|
|
newDoctors.setPassword("123456");
|
|
|
- newDoctors.setInstitutionId("03060001");
|
|
|
+ newDoctors.setInstitutionId("16100008");
|
|
|
newDoctors.setCreatedAt(new Date());
|
|
|
newDoctors.setUpdatedAt(new Date());
|
|
|
newDoctors.save();
|
|
@@ -297,7 +297,7 @@ public class DataTask implements ITask {
|
|
|
if (dateStr == null) {
|
|
|
return new Date();
|
|
|
}
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
Date date = null;
|
|
|
try {
|
|
|
date = sdf.parse(dateStr);
|