|
@@ -36,11 +36,11 @@ public class DataTask implements ITask {
|
|
// TODO Auto-generated method stub
|
|
// TODO Auto-generated method stub
|
|
try {
|
|
try {
|
|
List<Exams> exams = Exams.dao.use("zskk").find(
|
|
List<Exams> exams = Exams.dao.use("zskk").find(
|
|
- "SELECT * FROM pacsonline.exams where exam_status=3 and institution_id='02400005' order by createdAt desc limit 30");
|
|
|
|
|
|
+ "SELECT * FROM pacsonline.exams where exam_status=3 and institution_id='06100003' order by createdAt desc limit 30");
|
|
for (Exams exams2 : exams) {
|
|
for (Exams exams2 : exams) {
|
|
try {
|
|
try {
|
|
// Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
|
|
// Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
|
|
- Record record = Db.use("connected").findFirst("select * from v_reportinfo where ACCESSIONNUMBER=?",
|
|
|
|
|
|
+ Record record = Db.use("connected").findFirst("select * from reportinfo where PATIENTNUMBER=?",
|
|
exams2.getAccessionNum());
|
|
exams2.getAccessionNum());
|
|
if (record == null) {
|
|
if (record == null) {
|
|
continue;
|
|
continue;
|
|
@@ -73,7 +73,7 @@ public class DataTask implements ITask {
|
|
// patString = String.format("%0"+length+"d",Long.valueOf(patString));
|
|
// patString = String.format("%0"+length+"d",Long.valueOf(patString));
|
|
// exams2.setHopitalizedNo(patString);
|
|
// exams2.setHopitalizedNo(patString);
|
|
// exams2.setClinDoctors(record.getStr("CLINICALDOCTOR"));
|
|
// exams2.setClinDoctors(record.getStr("CLINICALDOCTOR"));
|
|
-// exams2.setApplicationDepartment(record.getStr("DEPARTMENT"));
|
|
|
|
|
|
+ exams2.setApplicationDepartment(record.getStr("DEPARTMENT"));
|
|
exams2.setApplicationDoctor(record.getStr("CLINICALDOCTOR")==null?"":record.getStr("CLINICALDOCTOR"));
|
|
exams2.setApplicationDoctor(record.getStr("CLINICALDOCTOR")==null?"":record.getStr("CLINICALDOCTOR"));
|
|
// exams2.setClinDiag(record.getStr("diagnosis"));
|
|
// exams2.setClinDiag(record.getStr("diagnosis"));
|
|
exams2.update();
|
|
exams2.update();
|
|
@@ -81,7 +81,7 @@ public class DataTask implements ITask {
|
|
Map<String, String> data = new HashMap<String, String>();
|
|
Map<String, String> data = new HashMap<String, String>();
|
|
// 获取data数据
|
|
// 获取data数据
|
|
// 医院id
|
|
// 医院id
|
|
- data.put("hospital_id", "02400005");
|
|
|
|
|
|
+ data.put("hospital_id", "06100003");
|
|
// 影像所见
|
|
// 影像所见
|
|
data.put("description", record.getStr("DESCRIPTION"));
|
|
data.put("description", record.getStr("DESCRIPTION"));
|
|
// 意见建议
|
|
// 意见建议
|
|
@@ -104,7 +104,7 @@ public class DataTask implements ITask {
|
|
// 患者检查时年龄
|
|
// 患者检查时年龄
|
|
data.put("patient_age", "");
|
|
data.put("patient_age", "");
|
|
// 阴阳性 1阴性 2阳性
|
|
// 阴阳性 1阴性 2阳性
|
|
- data.put("report_result", "");
|
|
|
|
|
|
+ data.put("report_result", record.getStr("RESULT").contains("阳")?"2":"1");
|
|
// 报告时间 10位时间戳
|
|
// 报告时间 10位时间戳
|
|
data.put("report_datetime", returnSecondTimestamp(record.getStr("REPORTDATE")));
|
|
data.put("report_datetime", returnSecondTimestamp(record.getStr("REPORTDATE")));
|
|
// 报告医生id
|
|
// 报告医生id
|
|
@@ -255,6 +255,10 @@ public class DataTask implements ITask {
|
|
* @date: 2019/12/26 18:26
|
|
* @date: 2019/12/26 18:26
|
|
*/
|
|
*/
|
|
public String returnSecondTimestamp(String data) throws ParseException {
|
|
public String returnSecondTimestamp(String data) throws ParseException {
|
|
|
|
+ if (data == null || data.equals("")) {
|
|
|
|
+ Date aDate = new Date();
|
|
|
|
+ return String.valueOf(aDate.getTime() / 1000);
|
|
|
|
+ }
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
|
|
|
|
return String.valueOf(sdf.parse(data).getTime() / 1000);
|
|
return String.valueOf(sdf.parse(data).getTime() / 1000);
|
|
@@ -278,14 +282,14 @@ public class DataTask implements ITask {
|
|
}
|
|
}
|
|
name = name.replace(" ", "");
|
|
name = name.replace(" ", "");
|
|
Doctors doctors = Doctors.dao.use("zskk").findFirst(
|
|
Doctors doctors = Doctors.dao.use("zskk").findFirst(
|
|
- "SELECT * FROM doctors where instr(?,realname) and institution_id='02400005' and realname <>''", name);
|
|
|
|
|
|
+ "SELECT * FROM doctors where instr(?,realname) and institution_id='06100003' and realname <>''", name);
|
|
if (doctors == null) {
|
|
if (doctors == null) {
|
|
Doctors newDoctors = new Doctors().use("zskk");
|
|
Doctors newDoctors = new Doctors().use("zskk");
|
|
newDoctors.setId(creatId());
|
|
newDoctors.setId(creatId());
|
|
newDoctors.setUsername("none");
|
|
newDoctors.setUsername("none");
|
|
newDoctors.setRealname(name);
|
|
newDoctors.setRealname(name);
|
|
newDoctors.setPassword("123456");
|
|
newDoctors.setPassword("123456");
|
|
- newDoctors.setInstitutionId("02400005");
|
|
|
|
|
|
+ newDoctors.setInstitutionId("06100003");
|
|
newDoctors.setCreatedAt(new Date());
|
|
newDoctors.setCreatedAt(new Date());
|
|
newDoctors.setUpdatedAt(new Date());
|
|
newDoctors.setUpdatedAt(new Date());
|
|
newDoctors.save();
|
|
newDoctors.save();
|
|
@@ -295,7 +299,7 @@ public class DataTask implements ITask {
|
|
}
|
|
}
|
|
|
|
|
|
private Date parseStringToDate(String dateStr) {
|
|
private Date parseStringToDate(String dateStr) {
|
|
- if (dateStr == null) {
|
|
|
|
|
|
+ if (dateStr == null || dateStr.equals("")) {
|
|
return new Date();
|
|
return new Date();
|
|
}
|
|
}
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|