123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 |
- /*
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- 입원의뢰서조회 ( SPMMO09000_입원예약조회.xrw - JScript )
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- */
- var sINREQHISTLIST_PATH = "/root/main/inreqhistinfo/inreqhistlist";
- var sINREQDIALIST_PATH = "/root/main/inreqdiaglist/inreqdiaglist";
- /**
- * @desc : 입원의뢰서조회 화면 초기화
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fInitialize_SPMMO09000(){
- model.removeNodeset(sINREQHISTLIST_PATH);
- model.removeNodeset(sINREQDIALIST_PATH);
-
- model.setValue("/root/main/cond/fromdd", getCurrentDate());
- var todd = (getCurrentDate().toDate()).getAddDate(30);
- model.setValue("/root/main/cond/todd", todd.getDateFormat());
- //param instance 구조 year▦month▦orddeptcd▦orddrid▦pid ex)2008▦08▦▦▦▦
- var param = opener.javascript.getParameter("SPMMO09000_param");
- if(param.length > 1){ //파라미터가 있는 경우
- param = param.split("▦");
- var year = param[0];
- var month = param[1];
- var orddeptcd= param[2];
- var orddrid = param[3];
- var pid = param[4];
- var assgward = "";
- if(year == ""){year = getCurrentDate().substr(0, 4);}
- if(month == ""){month = getCurrentDate().substr(4, 2);}
- if(orddeptcd == ""){orddeptcd = getUserInfo("dutplcecd");}
- if(orddrid == ""){orddrid = getUserInfo("userid");}
- if(assgward == ""){assgward = getUserInfo("dutplcecd");}
- }else{ //파라미터가 없는 경우
- var year = getCurrentDate().substr(0, 4);
- var month = getCurrentDate().substr(4, 2);
- var orddeptcd = getUserInfo("dutplcecd");
- var orddrid = getUserInfo("userid");
- var pid = getPatientInfo("pid");
- var hngnm = getPatientInfo("pname");
- var assgward = getUserInfo("dutplcecd");
- }
-
- //zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), "orduseyn", "D", "/root/init/orddept", "depthngnm"); //부서코드 콤보 조회
- //zsufGetUserInfoCombo(orddeptcd, "/root/init/userlist", "_D"); //사용자 콤보 조회
-
- mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddept", "A"); //진료과 콤보
- mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/warddept", "W"); //병동코드 콤보
- mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist" , getUserInfo("dutplcecd"), "0330", "", "M", "", "", "P"); //진료과 의사콤보 조회
-
- //2012/07/25 Start
- //zbcfGetCodeList(new Array("P0017"), new Array("/root/init/P0017")); //입원의뢰서 구분, 환자등급, 병실정보
- zbcfGetCodeList(new Array("P0017", "P0039", "M0700", "M0710"), new Array("/root/init/P0017", "/root/init/P0039", "/root/init/patgrade", "/root/init/bedkind")); //입원의뢰서 구분, 환자등급, 병실정보
- addComboInstance("/root/init/patgrade", "cdid^cdnm", "^", "M0700"); //환자등급
- //2012/07/25 End
- mmbfGetHardCodeInfoNm("/root/send/reqdata", "/root/init/erreglyn", 90); //입원장 입원구분
-
- model.setValue("/root/main/cond/year" , year); //year
- model.setValue("/root/main/cond/month" , month); //month
- model.setValue("/root/main/cond/orddeptcd", orddeptcd);
- model.setValue("/root/main/cond/orddrid" , orddrid);
- model.setValue("/root/main/cond/assgward" , assgward);
- model.setValue("/root/main/cond/pid" , pid);
- model.setValue("/root/main/cond/hngnm" , hngnm);
-
- //var dutplcecd = model.getValue("/root/main/cond/orddeptcd[orddeptcd='" + orddeptcd + "']");
- //var userid = model.getValue("/root/main/cond/orddrid[orddrid='" + orddrid + "']");
- addComboInstance("/root/init/orddept" , "deptcd^depthngnm", "-^전체", "dept"); //진료과 combo 전체항목 추가
- addComboInstance("/root/init/userlist", "userid^usernm" , "-^전체", "usercombo"); //진료의 combo 전체항목 추가
- addComboInstance("/root/init/warddept" , "deptcd^depthngnm", "-^전체", "dept"); //병동 combo 전체항목 추가
- addComboInstance("/root/init/erreglyn" , "hardcd^hardcdnm", "-^전체", "hardcd"); //입원경로 combo 전체항목 추가
- addComboInstance("/root/init/P0039" , "cdid^cdnm", "-^전체", "P0039"); //입원상태 combo 전체항목 추가
- addComboInstance("/root/init/bedkind" , "cdid^cdnm", "-^전체", "M0710"); //병실정보 combo 전체항목 추가
-
-
- if(cmb_orddept.label == "") {model.setValue("/root/main/cond/orddeptcd", "-");} //진료과가 없는 경우, 전체로 설정
- if(cmb_orddrid.label == "") {model.setValue("/root/main/cond/orddrid", "-");} //진료의가 없는 경우, 전체로 설정
- if(cmd_assgward.label == ""){model.setValue("/root/main/cond/assgward", "-");} //병동이 없는 경우, 전체로 설정
- if(cmd_erreglyn.label == ""){model.setValue("/root/main/cond/erreglyn", "-");} //입원경로 없는 경우, 전체로 설정
- if(cmd_inflag.label == "") {model.setValue("/root/main/cond/inflag", "-");} //입원상태 없는 경우, 전체로 설정
- if(cmd_bedkind.label == "") {model.setValue("/root/main/cond/bedkind", "-");} //병실정보 없는 경우, 전체로 설정
- model.refresh();
-
- var pid = getPatientInfo("pid");
- model.setValue("/root/main/cond/pid", pid);
-
- //20130605 화면 디폴트값 설정
- model.setValue("/root/main/cond/erreglyn","I");
- model.setValue("/root/main/cond/inflag","G");
- model.refresh();
-
- fReqInReqHist(); //입원의뢰서 조회
- }
- /**
- * @desc : 입원의뢰서 내역 조회
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fReqInReqHist(){
- model.removeNodeset("/root/send/reqdata");
- model.makeNode("/root/send/reqdata");
- model.copyNode("/root/send/reqdata", "/root/main/cond");
- if(submit("TRMMO09001")){
- }
- grd_inreqhistlist.autoResize = true;
- }
- /**
- * @desc : 입원의뢰서 진단수술 리스트
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fReqInReqDiagOpList(){
- var row = grd_inreqhistlist.row;
- var pid = model.getValue(sINREQHISTLIST_PATH + "[" + row + "]/pid");
- var orddd = model.getValue(sINREQHISTLIST_PATH + "[" + row + "]/inrsrvacptdd");
- var orddeptcd = model.getValue(sINREQHISTLIST_PATH + "[" + row + "]/orddeptcd");
- var orddrid = model.getValue(sINREQHISTLIST_PATH + "[" + row + "]/orddrid");
-
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/pid" , pid);
- model.makeValue("/root/send/reqdata/orddd" , orddd);
- model.makeValue("/root/send/reqdata/orddeptcd", orddeptcd);
- model.makeValue("/root/send/reqdata/orddrid" , orddrid);
- if(submit("TRMMO09002")){
- }
-
- grd_inreqdiaglist.autoResize = true;
- }
- /**
- * @desc : 입원의뢰서 그리드 클릭
- * @ : 진단명, 수술명 컬럼 클릭시 전체 진단 화면에 display
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fClkInReqGrid(){
- var height = 99; //그리드의 기본 높이
- var row = grd_inreqhistlist.row;
- var col = grd_inreqhistlist.col;
- for(var i = 0; i < row; i++){
- height += grd_inreqhistlist.rowheight(i);
- }
-
- if(height > 483){height = 483;} //펼쳐지는 진단내역 그리드의 y좌표가 483을 넘지 못하게 한다.
- if(col == grd_inreqhistlist.colref("termengnm") ||
- col == grd_inreqhistlist.colref("opengnm")){
- group1.attribute("top") = height;
- group1.visible = true;
- }
- model.refresh();
- }
- /**
- * @desc : 입원의뢰서 더블 클릭
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fDbClkInReqGrid(){
- var row = grd_inreqhistlist.row;
- var pid = model.getValue(sINREQHISTLIST_PATH + "[" + row + "]/pid");
-
- clearParameter("SPMMO00100_pid");
- setParameter("SPMMO00100_pid", pid);
-
- var curInReqObj = window.javascript.getOpenWindow("SPMMO00100"); //활성화된 입원의뢰서 화면 object loading
- if(curInReqObj == null){ //활성화된 입원의뢰서이 없는 경우, 신규화면을 오픈
- window.javascript.open("SPMMO00100", null, null, null, "SPMMO00100", "", "", "", false);
- } else { // 기존화면 재로딩
- curInReqObj.javascript.fInitialize_SPMMO00100();
- }
- }
- /**
- * @desc : 날짜 변경 버튼 클릭
- * @ :
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fClkBtnDateChng(){
-
- }
|