|
@@ -69,7 +69,7 @@ public class ViewController extends Controller {
|
|
|
.set("TESTLIST", jsonObject.getString("TESTLIST")==null?"":jsonObject.getString("TESTLIST"))
|
|
|
.set("NAME", jsonObject.getString("NAME"))
|
|
|
.set("SEX",jsonObject.getString("SEX").contains("M")?"男":"女")
|
|
|
- .set("BIRTHDAY", jsonObject.getString("BIRTHDAY")==null?"":jsonObject.getString("BIRTHDAY"))
|
|
|
+ .set("BIRTHDAY", jsonObject.getDate("BIRTHDAY")==null?"":jsonObject.getDate("BIRTHDAY"))
|
|
|
.set("ADDRESS", jsonObject.getString("ADDRESS"))
|
|
|
.set("TEL", jsonObject.getString("TEL"))
|
|
|
.set("ORG_CODE", "371728007")
|
|
@@ -85,29 +85,30 @@ public class ViewController extends Controller {
|
|
|
.set("FINDING", jsonObject.getString("FINDING"))
|
|
|
.set("CONCLUSION", jsonObject.getString("CONCLUSION"))
|
|
|
.set("FLAG_DIAGNOSTIC_ACCORDANCE", "1")
|
|
|
- .set("HAPPEN_TIME", jsonObject.getString("HAPPEN_TIME"))
|
|
|
- .set("SYSTEMTIME", jsonObject.getString("SYSTEMTIME"))
|
|
|
+ .set("HAPPEN_TIME", jsonObject.getDate("HAPPEN_TIME"))
|
|
|
+ .set("SYSTEMTIME", jsonObject.getDate("SYSTEMTIME"))
|
|
|
.set("HOSPITAL_CODE", "371728007")
|
|
|
- .set("UPDATE_TIME", jsonObject.getString("UPDATE_TIME"))
|
|
|
+ .set("UPDATE_TIME", jsonObject.getDate("UPDATE_TIME"))
|
|
|
.set("STATE", "0");
|
|
|
Db.use("crb").save("DC_PACS_REPORT", DC_PACS_REPORT);
|
|
|
this.renderJson(DC_PACS_REPORT);
|
|
|
}
|
|
|
- }
|
|
|
-// Record record2 = Db.use("crb").findFirst("select * from DC_PACS_XML where REPORT_ID=?", jsonObject.getString("REPORT_ID"));
|
|
|
-// if (record2 == null) {
|
|
|
-// Record DC_PACS_XML = new Record()
|
|
|
-// .set("REPORT_ID", jsonObject.getString("REPORT_ID"))
|
|
|
-// .set("PAT_FROM_TYPE", "门诊")
|
|
|
-// .set("PAT_NUM", jsonObject.getString("PAT_NUM")==null?"":jsonObject.getString("PAT_NUM"))
|
|
|
-// .set("ORG_CODE", "371728007")
|
|
|
-// .set("ORG_NAME", "东明县第二人民医院")
|
|
|
-// .set("REPORT_XML", jsonObject.getString("FINDING")+jsonObject.getString("CONCLUSION"))
|
|
|
-// .set("SYSTEMTIME", jsonObject.getString("SYSTEMTIME"));
|
|
|
-// Db.use("crb").save("study", DC_PACS_XML);
|
|
|
-// }
|
|
|
-//
|
|
|
-// }
|
|
|
+ Record record2 = Db.use("crb").findFirst("select * from DC_PACS_XML where REPORT_ID=?", jsonObject.getString("REPORT_ID"));
|
|
|
+ if (record2 == null) {
|
|
|
+ Record DC_PACS_XML = new Record()
|
|
|
+ .set("REPORT_ID", jsonObject.getString("REPORT_ID"))
|
|
|
+ .set("PAT_FROM_TYPE", "门诊")
|
|
|
+ .set("PAT_NUM", jsonObject.getString("PAT_NUM")==null?"":jsonObject.getString("PAT_NUM"))
|
|
|
+ .set("ORG_CODE", "371728007")
|
|
|
+ .set("ORG_NAME", "东明县第二人民医院")
|
|
|
+ .set("REPORT_XML", jsonObject.getString("FINDING")+jsonObject.getString("CONCLUSION"))
|
|
|
+ .set("SYSTEMTIME", jsonObject.getDate("SYSTEMTIME"));
|
|
|
+ Db.use("crb").save("study", DC_PACS_XML);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
// this.renderJson(jsonArray);
|
|
|
} catch (Exception e) {
|
|
|
// TODO: handle exception
|