|
@@ -32,30 +32,29 @@ public class UpdateTask implements ITask {
|
|
|
|
|
|
JSONArray jsonArray = dService.getReport(params);
|
|
JSONArray jsonArray = dService.getReport(params);
|
|
for (Object object : jsonArray) {
|
|
for (Object object : jsonArray) {
|
|
-
|
|
|
|
JSONObject jsonObject = JSON.parseObject(object.toString());
|
|
JSONObject jsonObject = JSON.parseObject(object.toString());
|
|
Record recordfind = Db.use("local").findFirst("select * from report where studyuid=?", jsonObject.getString("studyuid"));;
|
|
Record recordfind = Db.use("local").findFirst("select * from report where studyuid=?", jsonObject.getString("studyuid"));;
|
|
if (recordfind != null) {
|
|
if (recordfind != null) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
Record record = new Record();
|
|
Record record = new Record();
|
|
- record.set("name", jsonObject.getString("name"));
|
|
|
|
- record.set("sex", jsonObject.getString("sex"));
|
|
|
|
- record.set("phone", jsonObject.getString("phone"));
|
|
|
|
- record.set("card_num", jsonObject.getString("card_num"));
|
|
|
|
- record.set("hopitalized_no", jsonObject.getString("hopitalized_no"));
|
|
|
|
- record.set("out_patient", jsonObject.getString("out_patient"));
|
|
|
|
- record.set("accession_num", jsonObject.getString("accession_num"));
|
|
|
|
- record.set("patient_num", jsonObject.getString("patient_num"));
|
|
|
|
- record.set("studyuid", jsonObject.getString("studyuid"));
|
|
|
|
- record.set("his_patient_id", jsonObject.getString("his_patient_id"));
|
|
|
|
- record.set("impression", jsonObject.getString("impression"));
|
|
|
|
- record.set("description", jsonObject.getString("description"));
|
|
|
|
- record.set("report_datetime", jsonObject.getString("report_datetime"));
|
|
|
|
- record.set("report_doctor_name", jsonObject.getString("report_doctor_name"));
|
|
|
|
- record.set("review_doctor_name", jsonObject.getString("review_doctor_name"));
|
|
|
|
- record.set("review_datetime", jsonObject.getString("review_datetime"));
|
|
|
|
- record.set("report_result", jsonObject.getString("report_result"));
|
|
|
|
|
|
+ record.set("name", jsonObject.getString("name")==null?"":jsonObject.getString("name"));
|
|
|
|
+ record.set("sex", jsonObject.getString("sex")==null?"":jsonObject.getString("sex"));
|
|
|
|
+ record.set("phone", jsonObject.getString("phone")==null?"":jsonObject.getString("phone"));
|
|
|
|
+ record.set("card_num", jsonObject.getString("card_num")==null?"":jsonObject.getString("card_num"));
|
|
|
|
+ record.set("hopitalized_no", jsonObject.getString("hopitalized_no")==null?"":jsonObject.getString("hopitalized_no"));
|
|
|
|
+ record.set("out_patient", jsonObject.getString("out_patient")==null?"":jsonObject.getString("out_patient"));
|
|
|
|
+ record.set("accession_num", jsonObject.getString("accession_num")==null?"":jsonObject.getString("accession_num"));
|
|
|
|
+ record.set("patient_num", jsonObject.getString("patient_num")==null?"":jsonObject.getString("patient_num"));
|
|
|
|
+ record.set("studyuid", jsonObject.getString("studyuid")==null?"":jsonObject.getString("studyuid"));
|
|
|
|
+ record.set("his_patient_id", jsonObject.getString("his_patient_id")==null?"":jsonObject.getString("his_patient_id"));
|
|
|
|
+ record.set("impression", jsonObject.getString("impression")==null?"":jsonObject.getString("impression"));
|
|
|
|
+ record.set("description", jsonObject.getString("description")==null?"":jsonObject.getString("description"));
|
|
|
|
+ record.set("report_datetime", jsonObject.getString("report_datetime")==null?"":jsonObject.getString("report_datetime"));
|
|
|
|
+ record.set("report_doctor_name", jsonObject.getString("report_doctor_name")==null?"":jsonObject.getString("report_doctor_name"));
|
|
|
|
+ record.set("review_doctor_name", jsonObject.getString("review_doctor_name")==null?"":jsonObject.getString("review_doctor_name"));
|
|
|
|
+ record.set("review_datetime", jsonObject.getString("review_datetime")==null?"":jsonObject.getString("review_datetime"));
|
|
|
|
+ record.set("report_result", jsonObject.getString("report_result")==null?"":jsonObject.getString("report_result"));
|
|
record.set("status", 1);
|
|
record.set("status", 1);
|
|
Db.use("local").save("report", record);
|
|
Db.use("local").save("report", record);
|
|
}
|
|
}
|