SMMMO04300M.js.soonsu 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. var sINPATLIST_PATH = "/root/main/inpatinfo/inpatlist";
  2. var sDSCHDCLRT_PATH = "/root/main/dschdclrt/dschdclrt";
  3. var sORDERBY = "";
  4. function fInitialize_SMMMO04300(){
  5. model.removeNodeset(sINPATLIST_PATH);
  6. model.setValue(instance1.selectSingleNode("root/main/cond/indd"), String(getCurrentDate()));
  7. model.setValue("/root/main/cond/orddeptcd", getUserInfo("dutplcecd"));
  8. model.setValue("/root/main/cond/subdeptcd", "-");
  9. model.setValue("/root/main/cond/medispclid", "-");
  10. model.setValue("/root/main/cond/atdoctid", "-");
  11. model.setValue("/root/main/cond/wardcd", "-");
  12. fReqInPatList();
  13. }
  14. function fReqInPatList(){
  15. model.makeValue("/root/main/cond/srchdd", model.getValue(instance1.selectSingleNode("root/main/cond/indd")));
  16. model.copyNode("/root/send/reqdata", "/root/main/cond");
  17. var offset = parseInt(model.getValue("root/page/curpage"));
  18. if(offset == 1)
  19. {
  20. offset = offset - 1;
  21. }
  22. else
  23. {
  24. offset = (offset - 1) * 10;
  25. }
  26. model.makeValue("/root/send/reqdata/offset", String(offset));
  27. model.makeValue("/root/send/reqdata/pagesize", model.getValue("root/page/pagesize"));
  28. if(submit("TRMOB00001")){
  29. model.copyNode(parent.instance1.selectSingleNode("root/temp/inpatlist"), instance1.selectSingleNode("root/init"));
  30. model.copyNode(parent.instance1.selectSingleNode("root/cond/inpatlist"), instance1.selectSingleNode("root/main/cond"));
  31. }
  32. var maxpage = parseInt(model.getValue("/root/main/inpatinfo/retcnt/maxcnt"));
  33. if(maxpage < 10)
  34. {
  35. model.setValue("/root/page/maxpage", "1");
  36. }
  37. else
  38. {
  39. maxpage = (maxpage / 10) - ((maxpage % 10) / 10) + 1;
  40. model.setValue("/root/page/maxpage", String(maxpage));
  41. }
  42. model.setValue("/root/main/cond/totcnt", model.getValue("/root/main/inpatinfo/retcnt/maxcnt"));
  43. model.refresh();
  44. }