123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235 |
- /*
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- 예외환자관리 (SPMMO09500_예외환자 관리.xrw - JScript )
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- */
- var sPAT_INFO_PATH = "/root/init/patinfo";
- var sEXPT_INFO_PATH = "/root/main/info/exptpatinfo";
- var sEXPT_LIST_PATH = "/root/main/list/exptpatlist"
- var sCONDITION_PATH = "/root/main/cond";
- /**
- * @desc : 화면 초기화
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize(){
- mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddept", "O");
- mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist1", getUserInfo("dutplcecd"), "0330"); // 조회 조건 적용의사
- mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist2", getUserInfo("dutplcecd"), "0330"); // 조회 조건 적용의사
-
- addComboInstance("/root/init/orddept", "deptcd^depthngnm", "-^전체", "dept"); //부서 전체항목 추가
- addComboInstance("/root/init/userlist1", "userid^usernm", "-^전체", "usercombo"); //의사콤보 전체항목 추가
- addComboInstance("/root/init/userlist2", "userid^usernm", "-^전체", "usercombo"); //의사콤보 전체항목 추가
-
- zbcfGetCodeList(new Array("M0627" ), new Array("/root/init/M0627"));
-
- addComboInstance("/root/init/M0627", "cdid^cdnm", "ALL^전체", "M0627"); //예외분류 콤보 전체항목 추가
- model.setValue(sCONDITION_PATH + "/excpcls", "ALL");
- model.setValue(sCONDITION_PATH + "/srchflag", "");
- model.setValue(sCONDITION_PATH + "/deptcd", getUserInfo("dutplcecd"));
- model.setValue(sCONDITION_PATH + "/userid", getUserInfo("userid"));
-
- var sPid = getPatientInfo("pid");
- if(!isNull(sPid) ) {
- model.setValue(sCONDITION_PATH + "/pid", sPid);
-
- model.setValue(sPAT_INFO_PATH + "/pid", sPid);
- model.setValue(sPAT_INFO_PATH + "/hngnm", getPatientInfo("pname"));
- model.refreshpart(sPAT_INFO_PATH);
- }
-
- group_cond.refresh();
-
- fSearch();
- }
- /**
- * @desc : 예외환자 조회
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearch(){
- model.copyNode("/root/send/reqdata", sCONDITION_PATH);
- if(submit("TRMMO09502")){
- model.resetInstanceNode(sEXPT_INFO_PATH);
- model.refreshpart(sEXPT_LIST_PATH);
-
- group_info.refresh();
- group_list.refresh();
- }
- }
- /**
- * @desc : 예외환자정보 선택 - 상세 정보를 보여줌, 수정할 수 있도록 처리함
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSelectExptPatInfo(){
- model.resetInstanceNode(sEXPT_INFO_PATH);
-
- var currow = grd_exptpatlist.row;
- model.copyNode(sEXPT_INFO_PATH, sEXPT_LIST_PATH + "[" + currow + "]");
- model.makeValue(sEXPT_INFO_PATH + "/status" , "U");
-
- var sUserid = model.getValue(sEXPT_INFO_PATH + "/userid");
- cmb_orddept2.dispatch("xforms-value-changed");
- model.setValue(sEXPT_INFO_PATH + "/userid", sUserid);
-
- group_info.refresh();
- }
- /**
- * @desc : 신규작성 버튼 클릭
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fNewRgst(){
- model.resetInstanceNode(sEXPT_INFO_PATH);
-
- model.makeValue(sEXPT_INFO_PATH + "/status", "I");
- model.setValue(sEXPT_INFO_PATH + "/excpcls", "001");
- model.setValue(sEXPT_INFO_PATH + "/genrdd", getCurrentDate());
- model.setValue(sEXPT_INFO_PATH + "/genrno", "");
- model.setValue(sEXPT_INFO_PATH + "/histno", "0"); // 숫자 0
- model.setValue(sEXPT_INFO_PATH + "/histcd", "O"); // 문자 O
- model.setValue(sEXPT_INFO_PATH + "/excpcd", "999"); // 디폴트로 저장
- model.setValue(sEXPT_INFO_PATH + "/fromdd", getCurrentDate());
- model.setValue(sEXPT_INFO_PATH + "/todd", "99991231");
- model.setValue(sEXPT_INFO_PATH + "/histnm", "신규등록");
-
- model.removeNodeset("/root/init/userlist2");
- model.makeNode("/root/init/userlist2/usercombo");
- mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist2", getUserInfo("dutplcecd"), "0330");
- addComboInstance("/root/init/userlist2", "userid^usernm", "-^전체", "usercombo"); //의사콤보 전체항목 추가
-
- model.setValue(sEXPT_INFO_PATH + "/deptcd", getUserInfo("dutplcecd"));
- cmb_orddept2.dispatch("xforms-value-changed");
- model.setValue(sEXPT_INFO_PATH + "/userid", getUserInfo("userid"));
-
- model.setValue(sEXPT_INFO_PATH + "/pid", model.getValue(sPAT_INFO_PATH + "/pid"));
- model.setValue(sEXPT_INFO_PATH + "/hngnm", model.getValue(sPAT_INFO_PATH + "/hngnm"));
-
- group_info.refresh();
- }
- /**
- * @desc : 환자 조회
- * @
- * @param :
- * @return :
- * @author : 엄영만
- * @---------------------------------------------------
- */
- function fPatSrch(){
-
- var sCurrentDate = getCurrentDate();
-
- clearParameter("SPMMO017300_fromdd" );
- clearParameter("SPMMO017300_todd" );
- clearParameter("SPMMO017300_pid" );
- clearParameter("SPMMO017300_hngnm" );
- clearParameter("SPMMO017300_orddd" );
- clearParameter("SPMMO017300_orddeptcd" );
- clearParameter("SPMMO017300_orddrid" );
-
- setParameter("SPMMO017300_fromdd", sCurrentDate);
- setParameter("SPMMO017300_todd", sCurrentDate);
- setParameter("SPMMO017300_pid", model.getValue(sEXPT_INFO_PATH + "/pid"));
-
- modal("SPMMO173000");
- var sPid = getParameter("SPMMO017300_pid");
- var sHngnm = getParameter("SPMMO017300_hngnm");
- var sOrddd = getParameter("SPMMO017300_orddd");
- var sOrddeptcd = getParameter("SPMMO017300_orddeptcd");
- var sOrddrid = getParameter("SPMMO017300_orddrid");
-
- model.resetInstanceNode(sEXPT_INFO_PATH);
-
- if(!isNull(sHngnm)) {
- model.makeValue(sEXPT_INFO_PATH + "/status", "I");
- model.setValue(sEXPT_INFO_PATH + "/excpcls", "001");
- model.setValue(sEXPT_INFO_PATH + "/genrdd", sCurrentDate);
- model.setValue(sEXPT_INFO_PATH + "/genrno", "");
- model.setValue(sEXPT_INFO_PATH + "/pid", sPid);
- model.setValue(sEXPT_INFO_PATH + "/hngnm", sHngnm);
- model.setValue(sEXPT_INFO_PATH + "/histno", "0"); // 숫자 0
- model.setValue(sEXPT_INFO_PATH + "/histcd", "O"); // 문자 O
- model.setValue(sEXPT_INFO_PATH + "/excpcd", "999"); // 디폴트로 저장
- model.setValue(sEXPT_INFO_PATH + "/fromdd", sOrddd);
- model.setValue(sEXPT_INFO_PATH + "/todd", sCurrentDate);
- model.setValue(sEXPT_INFO_PATH + "/histnm", "신규등록");
-
- model.removeNodeset("/root/init/userlist2");
- model.makeNode("/root/init/userlist2/usercombo");
- mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist2", getUserInfo("dutplcecd"), "0330");
- addComboInstance("/root/init/userlist2", "userid^usernm", "-^전체", "usercombo"); //의사콤보 전체항목 추가
-
- model.setValue(sEXPT_INFO_PATH + "/deptcd", sOrddeptcd);
- cmb_orddept2.dispatch("xforms-value-changed");
- model.setValue(sEXPT_INFO_PATH + "/userid", sOrddrid);
- }
-
- group_info.refresh();
- }
- /**
- * @desc : 예외환자정보 저장
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSaveExptPatInfo(){
- var sStatus = model.getValue(sEXPT_INFO_PATH + "/status");
- if(sStatus != "I" && sStatus != "U" && sStatus != "D") {messageBox("처리할수 없는 작업 입니다. \n\n신규 작성 하시려면 신규작성 버튼 클릭후 저장 하세요.", "C999"); return; }
-
- var excpcls = model.getValue(sEXPT_INFO_PATH + "/excpcls");
- var sDutplcecd = getUserInfo("dutplcecd");
- var sUserId = getUserInfo("userid");
- if(excpcls == ""){
- messageBox("분류명을", "C001"); return;
- } else if (excpcls == "ALL") {
- messageBox("분류를 전체로 선택 하실수 없습니다.", "C999"); return;
- } else if ( (excpcls == "001")
- && (sDutplcecd == "4072000000" || sDutplcecd == "4070700000") ){ // 001: 산정특례
- messageBox("산정특례 분류는 심사실에서 등록/수정 할 수 없습니다.", "C999"); return;
- } else if ( (excpcls == "002" || excpcls == "003" || excpcls == "004" || excpcls == "005" || excpcls == "006")
- && (sDutplcecd != "4072000000" && sDutplcecd != "4070700000")
- && (sUserId != "EMR")){ // DUR(임부금기),DUR(최대용량금기),DUR(최대기간금기),DUR(병용금기),DUR(연령금기)
- messageBox("DUR 관련 분류는 심사실에서만 등록/수정 가능 합니다.", "C999"); return;
- } else if (excpcls == "007") {
- messageBox("임신부 분류는 등록/수정 할 수 없습니다.", "C999"); return;
- }
-
- var sPid = model.getValue(sEXPT_INFO_PATH + "/pid");
- if(sPid == ""){messageBox("등록번호를", "C001"); return;}
-
- var excptext = model.getValue(sEXPT_INFO_PATH + "/excptext");
- if(excpcls == "001" && excptext == ""){ messageBox("예외사유을", "C001"); return;}
-
- model.copyNode("/root/send/savedata", sEXPT_INFO_PATH);
-
- if(submit("TXMMO09501")){
- var rsltnode = model.instance1.selectNodes(sEXPT_LIST_PATH);
- if(rsltnode.length > 0){
- group_list.refresh();
- grd_exptpatlist.row = 1;
- fSelectExptPatInfo();
- }
- }
- }
|