123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247 |
- /*
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- 입원예약내역 (SPMMO14800_입원예약내역.xrw - JScript )
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- */
- var sINREQFRMINFO_PATH = "/root/main/inreqfrminfo/inreqfrminfo";
- var sINREQHISTLIST_PATH = "/root/main/inreqhistinfo/inreqhistlist";
- /**
- * @desc : 입원결정서 내역 조회
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fInitialize_SPMMO14800(){
- model.removeNodeset("/root/main/inreqhistinfo/inreqhistlist");
- zbcfGetCodeList(new Array("P0020", "P0378"), new Array("/root/init/inrsrvcnclresn", "/root/init/specroomyn"));
- mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddept", "D");
- model.setValue("/root/main/cond/year" , getCurrentDate().substr(0, 4)); //year
- model.setValue("/root/main/cond/month", getCurrentDate().substr(4, 2)); //month
-
- grd_calendar.dataheight = 31; // grid data height default set
- fReqInReqCalendar(); //달력조회
- }
- /**
- * @desc : 입원결정서 내역 조회
- * @
- * @param : pid - 등록번호
- * : inrsrvacptseqno- 입원예약번호
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fReqInReqHistList(pid, inrsrvacptdd, orddeptcd, inrsrvacptseqno){
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/pid" , pid);
- model.makeValue("/root/send/reqdata/inrsrvacptdd" , inrsrvacptdd);
- model.makeValue("/root/send/reqdata/orddeptcd" , orddeptcd);
- model.makeValue("/root/send/reqdata/inrsrvacptseqno" , inrsrvacptseqno);
- model.makeValue("/root/send/reqdata/queryflag", "nurse"); //간호 조회용 쿼리, 미래일자 입원결정서는 조회하지 않는다.
- if(submit("TRMMO00109")){
- fDispInReqHistInfo(1);
- }
- fReqInReqDiagOpList(); //입원결정서 진단,수술조회
- }
- /**
- * @desc : 입원내역 리스트 클릭시 -> 입원내역 정보 display
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fDispInReqHistInfo(currow){
- var orddeptcd = model.getValue(sINREQHISTLIST_PATH + "[" + currow + "]/orddeptcd");
- if(orddeptcd == ""){
- return;
- }
- mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist", orddeptcd, "0330");
- model.copyNode(sINREQFRMINFO_PATH, sINREQHISTLIST_PATH + "[" + currow + "]");
- model.refresh();
- }
- /**
- * @desc : 입원의뢰서 진단,수술 리스트 조회
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fReqInReqDiagOpList(){
- model.removeNodeset("/root/send/reqdata");
- var pid = model.getValue(sINREQFRMINFO_PATH + "/pid");
- var inhopedd = model.getValue(sINREQFRMINFO_PATH + "/inhopedd");
- var orddeptcd= model.getValue(sINREQFRMINFO_PATH + "/orddeptcd");
- var orddrid = model.getValue(sINREQFRMINFO_PATH + "/orddrid");
-
- if(pid == "" || inhopedd == "" || orddeptcd == "" || orddrid == ""){ //입원결정서가 없는 경우,
- return; //입원결정서 진단을 조회하지 않는다.
- }
- model.makeValue("/root/send/reqdata/pid" , pid);
- model.makeValue("/root/send/reqdata/orddd" , inhopedd); //입원희망일자
- model.makeValue("/root/send/reqdata/cretno" , 0);
- model.makeValue("/root/send/reqdata/orddeptcd", orddeptcd);
- model.makeValue("/root/send/reqdata/orddrid" , orddrid);
- if(submit("TRMMO00112")){
- }
- }
- /**
- * @desc : 입원의뢰서 달력 조회
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fReqInReqCalendar(){
- model.removeNodeset("/root/main/week/week");
- model.removeNodeset("/root/main/calendar/calendar");
- model.refresh();
- var year = model.getValue("/root/main/cond/year");
- var month = model.getValue("/root/main/cond/month");
- var orgyear = year;
- var orgmonth = month;
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/fromdd" , year + "-" + month + "-" + "01");
- if(month == 12){ //12월인 경우, 해를 넘겨서 계산한다.
- year++;
- month = "01";
- }else{
- month = eval(month) + 1;
- if(month < 10){month = "0".concat(month);}
- }
- model.makeValue("/root/send/reqdata/todd" , year + "-" + month + "-" + "01");
- model.makeValue("/root/send/reqdata/basedd" , ("" + orgyear + "").concat(orgmonth));
- model.makeValue("/root/send/reqdata/orddeptcd", model.getValue(sINREQFRMINFO_PATH + "/orddeptcd"));
- if(submit("TRMMO00110")){
- fMakeCalendar(); //조회 후 달력 값을 설정
- }
- }
- /**
- * @desc : 달력값 설정
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fMakeCalendar(){
- model.refresh();
- grd_calendar.addRow(false, true);
- var row = 0;
- var col = 0;
- var patsum = 0;
- var totcnt = getNodeSetCnt("/root/main/calendar/calendar");
- for(var i = 1; i <= totcnt ; i++){
- row = model.getValue("/root/main/calendar/calendar[" + i + "]/week");
- col = model.getValue("/root/main/calendar/calendar[" + i + "]/day") - 1;
- patsum = model.getValue("/root/main/calendar/calendar[" + i + "]/patsum");
- dutflag = model.getValue("/root/main/calendar/calendar[" + i + "]/dutflag");
- if(dutflag == 4){ //토
- grd_calendar.cellstyle("color", row, col) = "#0000FF";
-
- }else if(dutflag == 8){ //일
- grd_calendar.cellstyle("color", row, col) = "#FF0000";
-
- }else{ //휴일
- grd_calendar.cellstyle("color", row, col) = "#000000";
-
- }
- grd_calendar.valueMatrix(row, col) = i + "\n(" + patsum + ")";
- if(col == 6){
- grd_calendar.addRow(false, true);
-
- }
- }
- grd_calendar.rebuild();
- }
- /**
- * @desc : 달력 년도 변경 버튼 클릭
- * @
- * @param : pflag - bf 이전 해
- * - af 다음 해
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fClkBtnYear(pflag){
- model.removeNodeset("/root/main/week/week");
- var year = model.getValue("/root/main/cond/year");
-
- if(pflag == "bf"){
- model.setValue("/root/main/cond/year", --year);
- }else if(pflag == "af"){
- model.setValue("/root/main/cond/year", ++year);
- }
- model.refresh();
- fReqInReqCalendar();
- }
- /**
- * @desc : 당력 월 변경 버튼 클릭
- * @
- * @param : pflag - bf 이전 해
- * - af 다음 해
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fClkBtnMonth(pflag){
- model.removeNodeset("/root/main/week/week");
- var year = model.getValue("/root/main/cond/year");
- var month = model.getValue("/root/main/cond/month");
-
- if(pflag == "af"){
- month = eval(month) + 1;
- if(month == 13){
- year = eval(year) + 1;
- month = "01";
- }else if(month < 10){ //2자리가 아닌 경우, 앞자리에 0을 붙인다.
- month = "0".concat(month);
- }
-
- }else if(pflag == "bf"){
- month -= 1;
- if(month == 0){
- year -= 1;
- month = 12;
- }else if(month < 10){ //2자리가 아닌 경우, 앞자리에 0을 붙인다.
- month = "0".concat(month);
- }
- }
- model.setValue("/root/main/cond/year", year);
- model.setValue("/root/main/cond/month", month);
- model.refresh();
-
- fReqInReqCalendar();
- }
- function fReqPatInfo(pid){
- if(pid != ""){
- fReqInReqHistList(pid); //입원내역조회
-
- fReqInReqDiagOpList(); //입원결정서 진단,수술조회
- }
- }
|