123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274 |
- /*
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- Therapy일정관리 ( SMAEB02800_Therapy일정관리.xrw - JScript )
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- */
- var sTHERPLIST_PATH = "/root/main/therpinfo/therplist";
- /**
- * @desc : Therapy일정관리 초기화
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fInitialize_SMAEB02800(){
-
- //조회기간 시작일자는 현재, 종료일자는 7일 후로 설정한다.
- model.setValue("/root/init/today", getCurrentDate());
- model.setValue("/root/main/cond/fromdd", model.getValue("/root/init/today"));
- var todd = ((getCurrentDate()).toDate()).getAddDate(7);
- model.setValue("/root/main/cond/todd" , todd.getDateFormat());
-
- //콤보박스에 설정될 부서리스트 조회
- reqGetDeptList("/root/send/reqdata", "/root/init/deptlist", "", getUserInfo("dutplceinstcd"));
-
- //콤보박스에 설정된 병실리스트 조회
- reqGetRoomList("3050123000");
-
- //Therapy일정리스트 그리드 초기화
- model.removeNodeset(sTHERPLIST_PATH);
- model.refresh();
-
- }
- /**
- * @desc : Therapy 일정리스트 한줄 추가
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fAddRow(){
- //그리드 한줄 추가 후에 refresh, disabled상태 유지 모두 true
- grd_therapy.addRow();
- var iRow = grd_therapy.row;
- model.setValue(sTHERPLIST_PATH + "[" + iRow + "]/genrdd", model.getValue("/root/init/today"));
- //예약일자는 기본을 현재일자로 설정
- model.setValue(sTHERPLIST_PATH + "[" + iRow + "]/rsrvdd", model.getValue("/root/init/today"));
- grd_therapy.col = 4;
- grd_therapy.editCell();
- model.refresh();
- }
- /**
- * @desc : Therapy 일정 저장
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fSaveTherapyInfo(){
- if(fChkValidSaveData()==true){
- model.setValue("/root/send/savedata", grd_therapy.getUpdateData());
- submit("TXAEB02801");
- }
- }
- /**
- * @desc : Therapy 일정 조회
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fReqTherapyInfo(){
- model.copyNode("/root/send/reqdata", "/root/main/cond");
- submit("TRAEB02801");
- }
- /**
- * @desc : Therapy 일정 삭제
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fDelRow(){
- var iRow = grd_therapy.row;
- var iStatus = grd_therapy.rowStatus(iRow);
- if(iStatus == 1 || iStatus == 3){
- grd_therapy.deleteRow(iRow);
- }else{
- grd_therapy.rowStatus(iRow) = 4;
- }
- }
- /**
- * @desc : 환자정보 확인버튼 클릭
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fClkCfrmBtn(){
- var iRow = grd_patinfopopup.row;
- fSetPatInfo(iRow);
- group1.attribute("height") = 0;
- btn_add.disabled = false;
- btn_del.disabled = false;
- btn_save.disabled= false;
- btn_req.disabled = false;
- btn_getpatinfo.disabled = false;
- }
- /**
- * @desc : 환자정보 조회
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fReqPatInfo(paramflag, param, param2){
- var iRow = grd_therapy.row;
- if(reqPatInfo(paramflag, "otpt", param, param2) == true){ //환자정보 조회
- var iCnt = getNodeSetCnt("/root/init/patnm/patnm");
- if(iCnt > 1){ //조회결과가 두 줄 이상인 경우, grid를 화면에 보여준다.
- group1.attribute("top") = 116 + (23 * (grd_therapy.rows - 2));
- group1.attribute("height") = 170;
- btn_add.disabled = true;
- btn_del.disabled = true;
- btn_save.disabled= true;
- btn_req.disabled = true;
- btn_getpatinfo.disabled = true;
- }else{
- fSetPatInfo(1); //조회결과가 한 줄인 경우, grid를 보여주는 것 없이 바로 결과값을 setting
- }
- }else{
- model.setValue(sTHERPLIST_PATH + "[" + iRow + "]/pid" , "");
- model.setValue(sTHERPLIST_PATH + "[" + iRow + "]/hngnm", "");
- model.refresh();
- }
- }
- /**
- * @desc : 환자정보 설정
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fSetPatInfo(iRow){
- sPid = model.getValue("/root/init/patnm/patnm[" + iRow + "]/pid");
- sHngNM = model.getValue("/root/init/patnm/patnm[" + iRow + "]/hngnm");
- sDeptCD = model.getValue("/root/init/patnm/patnm[" + iRow + "]/deptcd");
- sDrID = model.getValue("/root/init/patnm/patnm[" + iRow + "]/drid");
- sDrNM = model.getValue("/root/init/patnm/patnm[" + iRow + "]/drnm");
-
- var iCurRow = grd_therapy.row;
- model.setValue("/root/main/therpinfo/therplist[" + iCurRow + "]/pid", sPid);
- model.setValue("/root/main/therpinfo/therplist[" + iCurRow + "]/hngnm", sHngNM);
- model.setValue("/root/main/therpinfo/therplist[" + iCurRow + "]/orddeptcd", sDeptCD);
- model.setValue("/root/main/therpinfo/therplist[" + iCurRow + "]/orddrid", sDrID);
- model.setValue("/root/main/therpinfo/therplist[" + iCurRow + "]/orddrnm", sDrNM);
- model.refresh();
- }
- /**
- * @desc : 환자정보 취소버튼 클릭
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fClkCnClBtn(){
- group1.attribute("height") = 0;
- btn_add.disabled = false;
- btn_del.disabled = false;
- btn_save.disabled= false;
- btn_req.disabled = false;
- btn_getpatinfo.disabled = false;
- }
- /**
- * @desc : 그리드 input button클릭
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fClkGrdInptBtn(){
-
- //model.setValue("/root/hidden/srchcond", "2");
- modal("SPPMC02500", "1", 100, 100, "SPPMC02500", "/root/hidden", "/root/send");
- var sPid = model.getValue("/root/main/patinfo/patinfolist/pid");
- var sHngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
- if(model.getValue("/root/main/popupendflag") != "cancel"){
- var iRow = grd_therapy.row;
- model.setValue(sTHERPLIST_PATH + "[" + iRow + "]/pid" , sPid);
- model.setValue(sTHERPLIST_PATH + "[" + iRow + "]/hngnm", sHngnm);
- }
- }
- /**
- * @desc : 그리드 input button클릭
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fClkGrdInptBtn(){
- model.setValue("/root/hidden/srchcond", "2");
- modal("SPPMC02500", "1", 100, 100, "SPPMC02500", "/root/hidden", "/root/send");
- var sPid = model.getValue("/root/main/patinfo/patinfolist/pid");
- var sHngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
- if(model.getValue("/root/main/popupendflag") != "cancel"){
- var iRow = grd_therapy.row;
- model.setValue(sTHERPLIST_PATH + "[" + iRow + "]/pid" , sPid);
- model.setValue(sTHERPLIST_PATH + "[" + iRow + "]/hngnm", sHngnm);
- }
- }
- /**
- * @desc : 저장데이터의 무결성검사
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fChkValidSaveData(){
- if(grd_therapy.rows < 2){
- messageBox("저장할 내역이", "I004");
- return;
- }
- var sDoseVal = model.getValue(sTHERPLIST_PATH + "[doseval='" + "" + "']/rsrvdd");
- var sRoomCD = model.getValue(sTHERPLIST_PATH + "[roomcd='" + "" + "']/rsrvdd");
- var sPid = model.getValue(sTHERPLIST_PATH + "[pid='" + "" + "']/rsrvdd");
- var sHngNM = model.getValue(sTHERPLIST_PATH + "[hngnm='" + "" + "']/rsrvdd");
- var sDeptCD = model.getValue(sTHERPLIST_PATH + "[orddeptcd='" + "" + "']/rsrvdd");
-
- if(sDoseVal != ""){
- messageBox("Dose 값을", "C001");
- return false;
- }else if(sRoomCD != ""){
- messageBox("병실을 ", "C002");
- return false;
- }else if(sPid != ""){
- messageBox("등록번호를 ", "C001");
- return false;
- }else if(sHngNM != ""){
- messageBox("환자명를 ", "C001");
- return false;
- }else if(sDeptCD != ""){
- messageBox("부서를 ", "C001");
- return false;
- }else{
- return true;
- }
-
- }
|