var sOUTPATLIST_PATH = "/root/main/outpatinfo/outpatlist"; var sORDERBY = ""; function fInitialize_SMMMO04600(){ model.removeNodeset(sOUTPATLIST_PATH); model.setValue(instance1.selectSingleNode("root/main/cond/orddd"), String(getCurrentDate())); model.setValue("/root/main/cond/orddeptcd", getUserInfo("dutplcecd")); model.setValue("/root/main/cond/orddrid", "-"); model.setValue("/root/main/cond/hngnm", "-"); model.setValue("/root/main/cond/pid", ""); model.setValue("/root/main/cond/elbulbodstat", "-"); fReqOutPatList(); } function fReqOutPatList(){ model.makeValue("/root/main/cond/srchdd", model.getValue(instance1.selectSingleNode("root/main/cond/orddd"))); model.copyNode("/root/send/reqdata", "/root/main/cond"); var offset = parseInt(model.getValue("root/page/curpage")); if(offset == 1) { offset = offset - 1; } else { offset = (offset - 1) * 10; } model.makeValue("/root/send/reqdata/offset", String(offset)); model.makeValue("/root/send/reqdata/pagesize", model.getValue("root/page/pagesize")); if(submit("TRMOB00060")){ model.copyNode(parent.instance1.selectSingleNode("root/temp/outpatlist"), instance1.selectSingleNode("root/init")); model.copyNode(parent.instance1.selectSingleNode("root/cond/outpatlist"), instance1.selectSingleNode("root/main/cond")); } var maxpage = parseInt(model.getValue("/root/main/outpatinfo/retcnt/maxcnt")); if(maxpage < 10) { model.setValue("/root/page/maxpage", "1"); } else { maxpage = (maxpage / 10) - ((maxpage % 10) / 10) + 1; model.setValue("/root/page/maxpage", String(maxpage)); } model.setValue("/root/main/cond/totcnt", model.getValue("/root/main/outpatinfo/retcnt/maxcnt")); model.refresh(); }