|
@@ -35,6 +35,53 @@ public class ViewController extends Controller {
|
|
List<Record> d = Db.use("connected").find(this.getPara("sqlstr"));
|
|
List<Record> d = Db.use("connected").find(this.getPara("sqlstr"));
|
|
this.renderJson(d);
|
|
this.renderJson(d);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ public void test() {
|
|
|
|
+ try {
|
|
|
|
+ List<Record> records = Db.use("connected").find("select * from View_PACS where CHECK_TYPE='US1'");
|
|
|
|
+ for (Record rd : records) {
|
|
|
|
+ Record recordfind =Db.use("local").findFirst("select * from View_PACS where HISID=? and PARTOFCHECK=? and LODGEDATE=?",rd.getStr("HISID"),rd.getStr("PARTOFCHECK"),rd.getStr("LODGEDATE"));
|
|
|
|
+ if(recordfind !=null)
|
|
|
|
+ {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ Record record =new Record();
|
|
|
|
+ record.set("HISID", rd.getStr("HISID")==null?"":rd.getStr("HISID"));
|
|
|
|
+ record.set("INPATIENTNO", rd.getStr("INPATIENTNO")==null?"":rd.getStr("INPATIENTNO"));
|
|
|
|
+ record.set("LODGENO", rd.getStr("LODGENO")==null?"":rd.getStr("LODGENO"));
|
|
|
|
+ record.set("NAME", rd.getStr("NAME")==null?"":rd.getStr("NAME"));
|
|
|
|
+ record.set("SEX", rd.getStr("SEX")==null?"":rd.getStr("SEX"));
|
|
|
|
+ record.set("BIRTHDATE", rd.getStr("BIRTHDATE")==null?"":rd.getStr("BIRTHDATE"));
|
|
|
|
+ record.set("LODGESECTION", rd.getStr("LODGESECTION")==null?"":rd.getStr("LODGESECTION"));
|
|
|
|
+ record.set("LODGEDOCTOR", rd.getStr("LODGEDOCTOR")==null?"":rd.getStr("LODGEDOCTOR"));
|
|
|
|
+ record.set("AGE", rd.getStr("AGE")==null?"":rd.getStr("AGE"));
|
|
|
|
+ record.set("CHECK_TYPE", rd.getStr("CHECK_TYPE")==null?"":rd.getStr("CHECK_TYPE"));
|
|
|
|
+ record.set("PARTOFCHECK", rd.getStr("PARTOFCHECK")==null?"":rd.getStr("PARTOFCHECK"));
|
|
|
|
+ record.set("DIRECTION", rd.getStr("DIRECTION")==null?"":rd.getStr("DIRECTION"));
|
|
|
|
+ record.set("ADDRESS", rd.getStr("ADDRESS")==null?"":rd.getStr("ADDRESS"));
|
|
|
|
+ record.set("RACE", rd.getStr("RACE")==null?"":rd.getStr("RACE"));
|
|
|
|
+ record.set("PROFESSION", rd.getStr("PROFESSION")==null?"":rd.getStr("PROFESSION"));
|
|
|
|
+ record.set("MARITALSTATUS", rd.getStr("MARITALSTATUS")==null?"":rd.getStr("MARITALSTATUS"));
|
|
|
|
+ record.set("TELEPHONE", "");
|
|
|
|
+ record.set("DEGREE", rd.getStr("DEGREE")==null?"":rd.getStr("DEGREE"));
|
|
|
|
+ record.set("LODGEDATE", rd.getStr("LODGEDATE")==null?"":rd.getStr("LODGEDATE"));
|
|
|
|
+ record.set("BEDNO", rd.getStr("BEDNO")==null?"":rd.getStr("BEDNO"));
|
|
|
|
+ record.set("TIMES", rd.getStr("TIMES")==null?"":rd.getStr("TIMES"));
|
|
|
|
+ record.set("zyh", rd.getStr("zyh")==null?"":rd.getStr("zyh"));
|
|
|
|
+ record.set("cwh", rd.getStr("cwh")==null?"":rd.getStr("cwh"));
|
|
|
|
+ Db.use("local").save("View_PACS", record);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ // TODO: handle exception
|
|
|
|
+ this.renderText(e.toString());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
public void testConn() {
|
|
public void testConn() {
|
|
try {
|
|
try {
|