123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910 |
- //부분서식의 부모아이템 배열
- var gItemCds = new Array("0007983001", "0000521001", "0000509001", "0000512001", "0000507001");
- var gItemCdsTextArea = new Array("0000512001", "0000507001");
- var gItemCdsXRWArea = new Array("0007983001", "0000521001", "0000509001");
- //부분서식의 개수만큼 일단 '0'으로 채운다.
- var gPageIdx = new Array(0, 0);
- var iSurg = ipt_surg.attribute("degnitemlevlcd");
- var iMcdnm = ipt_mcdnm.attribute("degnitemlevlcd");
- var iScdnm = ipt_scdnm.attribute("degnitemlevlcd");
- var cOdt1 = cmb_odt1.attribute("degnitemlevlcd");
- var cSdt1 = cmb_sdt1.attribute("degnitemlevlcd");
- //var operation = getGlobalVariable("operation").split("▩")[1];
- var instance = document.models(0).instances(0);
- var pageInfo = new PAGEINFO();
- var oprsrvno = ""; //수술예약번호
- var perfdeptcd = ""; //집도과
- /**
- * @desc : 확장버튼(이미지,가계도,추가기록)을 기록여부에 따라 표시를 위한 버튼목록
- * @id :
- * @authur : 안치원
- * @history : 2009.09.09 신규 안치원 ACW_090909A
- */
- var gExtnBtnIds = new Array("btn_imge_0000512001", "btn_etcrec_0000512001",
- "btn_imge_0000507001", "btn_etcrec_0000507001");
-
- /*
- if(operation != null && operation != ""){
- oprsrvno = operation.split("▦")[0];
- perfdeptcd = operation.split("▦")[10];
- }
- */
- /**
- * @desc : 초기 화면 설정
- * @id :
- * @event : xforms-ready
- * @return : void
- * @authur : 박종훈
- */
- function fFormReady_old()
- {
- grup_base.attribute("border-style") = "none";
- InitSetMaxSizeSection(gItemCdsTextArea, 335, 350);
- InitBtnImge(gItemCdsTextArea);
- InitBtnComn(gItemCdsTextArea);
- }
- /**
- * @desc : 서식 불러오기, 부분 그리드서식 사이즈 초기화
- * @id :
- * @event : xforms-ready
- * @return : void
- * @authur : 박종훈
- */
- function fLoadForm_old()
- {
- InitLoadSection(gItemCdsTextArea);
- InitSetUnitForm(gItemCdsXRWArea, false);
- parent.window.javascript.gSubmitID = TX_SUBMIT_EXTN_FORM;
- }
- /**
- * @desc : 서식 데이터 Clear, 인터페이스 입력값 조회 입력
- * @id :
- * @event : xforms-ready
- * @return : void
- * @authur : 박종훈
- */
- function fClearComnFormData()
- {
- if (gMaxSectionID != "")
- {
- var MaxObj = document.controls("lbl_" + gMaxSectionID);
- MaxObj.dispatch("onclick");
- }
-
- ClearComnFormData(gItemCds);
- fInitialize();
-
- if (parent.window.javascript.fGetFormRec("status") == "C")
- {
- var rtn = fGetdiagFormOprsrvno(oprsrvno, iMcdnm, iMcdnm, iScdnm, iScdnm); //수술예약번호로 진단명 조회
- //ivw_0000509001.window.javascript.fSrchOprlist(oprsrvno, cOdt1); //환자정보로 수술명, 집도의 조회
-
- fSrchOprPerfDrlist(oprsrvno, cOdt1); //환자정보로 수술명, 집도의 조회
-
- if(!rtn)
- {
- fBtnDisEnable(true);
- return "oprfalse";
- } else {
- model.refresh();
- }
- }
-
- //포커스 처리
- SetDefFocusIVW(gItemCdsTextArea);
- parent.window.javascript.fSetFormRec("extnflag", "opr");
- parent.window.javascript.fSetFormRec("oprsrvno", oprsrvno);
- }
- /**
- * @desc : 기록데이터 조회
- * @id :
- * @event : xforms-ready
- * @return : void
- * @authur : 박종훈
- */
- function fLoadData()
- {
- fInitialize();
- //Program 서식 데이터 조회반영
- InitPgmFormData();
- this.recRef2 = "/root/hidden/recinfo"
- //부분서식 데이터 조회 반영
- InitUnitFormData(gItemCds);
- parent.window.javascript.gSubmitID = TX_SUBMIT_EXTN_FORM;
- parent.window.javascript.fSetFormRec("extnflag", "opr");
- //parent.window.javascript.fSetFormRec("oprsrvno", oprsrvno);
- }
- /**
- * @desc : 화면 초기화
- * @
- * @param :
- * @return :
- * @authur : 박종훈
- */
- function fInitialize()
- {
- var operation = getGlobalVariable("operation").split("▩")[1];
-
- if(operation != null && operation != ""){
- oprsrvno = operation.split("▦")[0];
- perfdeptcd = operation.split("▦")[10];
- }
-
- if (parent.window.javascript.fGetFormRec("status") == "C")
- {
- parent.window.javascript.fSetFormRec("extnflag", "opr");
- parent.window.javascript.fSetFormRec("oprsrvno", oprsrvno);
-
- //수술예약번호 체크
- if(oprsrvno == "")
- {
- messageBox("수술예약이 되지 않은", "I005");
- grup_base.disabled = true;
- fBtnDisEnable(true);
- return;
- } else {
- fBtnDisEnable(false);
- }
-
- //집도과 체크
- if (perfdeptcd != getUserInfo("dutplcecd"))
- {
- messageBox("작성 권한이", "I004");
- grup_base.disabled = true;
- fBtnDisEnable(true);
- return;
- } else {
- fBtnDisEnable(false);
- }
- }
-
- var uInfo = getUserInfos();
- uInfo = uInfo.split("|");
- if (parent.window.javascript.fGetFormRec("status") == "C")
- {
- //초기조건 설정
- var opschedd = operation.split("▦")[7]; //수술예약일
- var opcnfmdd = operation.split("▦")[8]; //수술확정일
- var indxdd = getCurrentDate();
-
- if (opcnfmdd != "")
- {
- indxdd = opcnfmdd;
- }
- else if (opschedd != "")
- {
- indxdd = opschedd;
- }
- else
- {
- indxdd = getCurrentDate();
- }
-
- mmbfGetUserComboList("/root/init/reqdata", "/root/init/drlist" + cOdt1 , uInfo[8], "0330", "", "", indxdd);
- mmbfGetUserComboList("/root/init/reqdata", "/root/init/drlist" + cSdt1 , uInfo[8], "0330", "", "", indxdd);
- }
- else
- {
- var recdept = parent.window.javascript.fGetFormRec("formrecdeptcd");
- var recdd = parent.window.javascript.fGetFormRec("formrecdd");
-
- mmbfGetUserComboList("/root/init/reqdata", "/root/init/drlist" + cOdt1 , recdept, "0330", "", "", recdd);
- mmbfGetUserComboList("/root/init/reqdata", "/root/init/drlist" + cSdt1 , recdept, "0330", "", "", recdd);
- }
-
- // reqGetDrList("/root/init/reqdata", "/root/init/drlist" + cOdt1 +"/drlist", uInfo[8], ""); //집도의1
- // reqGetDrList("/root/init/reqdata", "/root/init/drlist" + cSdt1 +"/drlist", uInfo[8], ""); //보조의1
- ivw_0007983001.attribute("border-style") = "none";
- ivw_0000521001.attribute("border-style") = "none";
- ivw_0000509001.attribute("border-style") = "none";
- gTermViewTopPos = 29;
- gTermViewHei = 152;
- gTermViewItems = gItemCdsXRWArea;
-
- ipt_surg.attribute("disabled") = true;
- //fRadioYN();
- model.refresh();
- }
- /**
- * @desc : 의사 선택에 따른 reccnts셋팅
- * @
- * @param :
- * @return :
- * @authur : 박종훈
- */
- function fChngDoct(degnitemlevlcd)
- {
- var sDrid = model.getValue("/root/main/recinfo/recitem[degnitemlevlcd='" + degnitemlevlcd + "']/rectermcd");
- var sDrnm = model.getValue("/root/init/drlist"+degnitemlevlcd+"/usercombo[userid='"+sDrid+"']/usernm");
-
- if (sDrnm == "")
- {
- sDrnm = "";
- model.setValue("/root/main/recinfo/recitem[degnitemlevlcd='" + degnitemlevlcd + "']/rectermcd", "");
- }
-
- model.setValue("/root/main/recinfo/recitem[degnitemlevlcd='" + degnitemlevlcd + "']/rectermnm", sDrnm);
- model.refresh();
- }
- /**
- * @desc : 라디오버튼 선택에 따른 reccnts셋팅
- * @
- * @param :
- * @return :
- * @authur : 박종훈
- */
- function fRadioYN(degnitemlevlcd)
- {
- var sRdoCd = model.getValue("/root/main/recinfo/recitem[degnitemlevlcd='" + degnitemlevlcd + "']/rectermcd");
- var sRdoNm = model.getValue("/root/main/forminfo/vallist[valcd='" + sRdoCd + "']/valitemnm");
- model.setValue("/root/main/recinfo/recitem[degnitemlevlcd='" + degnitemlevlcd + "']/rectermnm", sRdoNm);
- }
- /**
- * @desc : 수술이력 팝업
- * @
- * @param :
- * @return :
- * @authur : 박종훈
- */
- function fPatientHist()
- {
- modal("SMMMO02500");
- }
- /**
- * @desc : 기록 인스턴스 연결
- * @
- * @param :
- * @return :
- * @authur : 박종훈
- */
- function fSetRecItemValue(reciteminfo)
- {
- return SetCommMediFormValue(gItemCds, reciteminfo);
- }
- /**
- * @desc : 확장서식 기록 초기 설정
- * @
- * @param :
- * @return :
- * @authur : 박종훈
- */
- function fExtnInitFormRec_old()
- {
- if (parent.window.javascript.fGetFormRec("status") == "C")
- {
- parent.window.javascript.gSubmitID = TX_SUBMIT_EXTN_FORM;
- parent.window.javascript.fSetFormRec("extnflag", "opr");
- parent.window.javascript.fSetFormRec("oprsrvno", oprsrvno);
- }
- }
- /**
- * @desc : 수술예약번호를 통한 진단명, 마취종류 조회
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetdiagFormOprsrvno(oprsrvno, iMcdnm, iMcdnm, iScdnm, iScdnm)
- {
- if(oprsrvno != ""){
- model.removeNodeset("/root/main/diaginfo/diagcdlist");
- model.makeValue("/root/send/oprsrvno", oprsrvno);
- //model.makeValue("/root/send/oprsrvno", "2007000009");
- submit("TRMRF04001", false);
- var anstmthdcd = model.getValue("/root/main/diaginfo/anstlist/anstmthdcd");
- var mcdnm = model.getValue("/root/main/diaginfo/anstlist/mcdnm");
- var anstmthdcdsub = model.getValue("/root/main/diaginfo/anstlist/anstmthdcdsub");
- var scdnm = model.getValue("/root/main/diaginfo/anstlist/scdnm");
- var pageInfo = new PAGEINFO();
- var iptMObj = document.controls("ipt_mcdnm");
- var iptSObj = document.controls("ipt_scdnm");
-
- if (anstmthdcd != "" && mcdnm != "")
- {
- //주마취
- model.setValue("/root/main/recinfo/recitem[degnitemlevlcd='" + iMcdnm + "']/rectermcd", anstmthdcd);
- model.setValue("/root/main/recinfo/recitem[degnitemlevlcd='" + iMcdnm + "']/rectermnm", mcdnm);
-
- iptMObj.attribute("ref") = pageInfo.recItemRef + "[degnitemlevlcd='" + iMcdnm + "']/rectermnm";
- }
- else
- {
- iptMObj.attribute("ref") = pageInfo.recItemRef + "[degnitemlevlcd='" + iMcdnm + "']/reccnts";
- }
-
- if (anstmthdcdsub != "" && scdnm != "")
- {
- //부마취
- model.setValue("/root/main/recinfo/recitem[degnitemlevlcd='" + iScdnm + "']/rectermcd", anstmthdcdsub);
- model.setValue("/root/main/recinfo/recitem[degnitemlevlcd='" + iScdnm + "']/rectermnm", scdnm);
-
- iptSObj.attribute("ref") = pageInfo.recItemRef + "[degnitemlevlcd='" + iScdnm + "']/rectermnm";
- }
- else
- {
- iptSObj.attribute("ref") = pageInfo.recItemRef + "[degnitemlevlcd='" + iScdnm + "']/reccnts";
- }
- copyNodeset("/root/main/diaginfo/diagcdlist", "/root/main/diaginfo/diagcdlist", "replace", ivw_0007983001.model, model);
- copyNodeset("/root/main/diaginfo/diagcdlist", "/root/main/diaginfo/diagcdlist", "replace", ivw_0000521001.model, model);
- model.refresh();
- ivw_0007983001.window.javascript.fSetDiagNmInstance();
- ivw_0000521001.window.javascript.fSetDiagNmInstance();
- return true;
- }else{
- //alert("해당환자는 수술환자가 아닙니다!");
- //grup_base.disabled = true;
- //parent.window.javascript.fBtnDisable();
- return false;
- }
- }
- /**
- * @desc : 수술명, 집도의 조회
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSrchOprPerfDrlist(oprsrvno, cOdt1)
- {
- model.removeNodeset("/root/tmpop/selectoplist");
- model.removeNodeset("/root/main/paminfo/list");
- var node = getGlobalVariable("paminfo");
- if(node != "" && node != null){
- setCSVToNode("/root/main/paminfo", node);
- model.makeValue("/root/send/pid", model.getValue("/root/main/paminfo/list/pid"));
- model.makeValue("/root/send/cretno", model.getValue("/root/main/paminfo/list/cretno"));
- if (model.getValue("/root/main/paminfo/list/ioflag") == "O")
- {
- model.makeValue("/root/send/orddd", model.getValue("/root/main/paminfo/list/orddd"));
- }
- else
- {
- model.makeValue("/root/send/orddd", model.getValue("/root/main/paminfo/list/indd"));
- }
- model.makeValue("/root/send/oprsrvno", oprsrvno);
- model.makeValue("/root/send/srchmode", "dr");
- //model.removeNodeset("/root/main/recinfo/recitem[degnitemno = '1']");
- if (submit("TRMRF04301"))
- {
- copyNodeset("/root/tmpop/selectoplist", "/root/tmpop/selectoplist", "replace", ivw_0000509001.model, model);
- ivw_0000509001.window.javascript.fAfterSrch();
- }
- if (submit("TRMRF04302"))
- {
- var perfdrid = model.getValue("/root/tmp/perfdr/perfdrid");
- var opfromdt = model.getValue("/root/tmp/perfdr/opfromdt");
-
-
- var opstdd = opfromdt.substring(0, 8);
- var opsttm = opfromdt.substring(8, 12);
-
- //2010.02.03 dhkim - 수술기록 없을때 현재일자세팅하지 않음
- /*
- if (opstdd == "" || opstdd.length < 8)
- {
- opstdd = getCurrentDate();
- }
- */
-
- if (opsttm == "" || opsttm.length < 4)
- {
- opsttm = getCurrentTime().substr(0, 4);
- }
-
- //var transopdd = opstdd.substr(0, 4) + "-" + opstdd.substr(4, 2) + "-" + opstdd.substr(6, 2)
- //2010.02.03 dhkim - 수술기록 있을때만 일자세팅
- if(opstdd != "" && opstdd.length == 8){
- parent.window.javascript.fSetFormRec("formrecdd" , opstdd);
- parent.window.javascript.fSetFormRec("formrechm" , opsttm);
- parent.ipt_formrecdd.refresh();
- parent.ipt_formrectm.refresh();
- }
-
-
- model.setValue("/root/main/recinfo/recitem[degnitemlevlcd='" + iSurg + "']/reccnts", opstdd); //수술일
- model.setValue("/root/main/recinfo/recitem[degnitemlevlcd='" + cOdt1 + "']/rectermcd", perfdrid);
- fChngDoct(cOdt1);
- }
- }
- }
- /**
- * @desc : 수술전 진단명 사이즈 조절
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetSizeFormDiag()
- {
- ivw_0007983001.window.javascript.fInitPage(false, parseInt(ivw_0007983001.attribute("height")), parseInt(ivw_0007983001.attribute("width")), "ivw_0007983001", "수술전 진단명(Free text))");
- //ivw_0000521001.window.javascript.fInitPage(false, parseInt(ivw_0000521001.attribute("height")), parseInt(ivw_0000521001.attribute("width")), "ivw_0000521001", "수술후 진단명");
- }
- /**
- * @desc : 수술후 진단명 사이즈 조절
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetSizeFormDiag1()
- {
- //ivw_0007983001.window.javascript.fInitPage(false, parseInt(ivw_0007983001.attribute("height")), parseInt(ivw_0007983001.attribute("width")), "ivw_0007983001", "수술전 진단명");
- ivw_0000521001.window.javascript.fInitPage(false, parseInt(ivw_0000521001.attribute("height")), parseInt(ivw_0000521001.attribute("width")), "ivw_0000521001", "수술후 진단명(Free text)");
- }
- /**
- * @desc : 서식 수술명 사이즈 조절
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetSizeFormOpr()
- {
- //fFormReady();
- ivw_0000509001.window.javascript.fInitPage(false, parseInt(ivw_0000509001.attribute("height")), parseInt(ivw_0000509001.attribute("width")), "ivw_0000509001");
- }
- /*****************************************************************************
- 튜닝
- ******************************************************************************/
- var gLoadFormCnts = 0;
- /**
- * @group :
- * @ver : 2008.06.13
- * @by : snoweye
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 화면 로딩후 초기화 작업 수행
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fFormReady()
- {
- grup_base.attribute("border-style") = "none";
- setSectionSize(gItemCds, 335, 350);
- //20080702 박종훈 추가
- //fInitialize();
- InitBtnImge(gItemCdsTextArea);
- InitBtnEtcRec(gItemCdsTextArea);
- InitBtnComn(gItemCdsTextArea);
- dispOnLoadComplete(COMN_FORM);
-
- // fCosignCheck();
-
- //2010.01.21
- initCmbExtnList(gItemCds);
- }
- /**
- * @group :
- * @ver : 2008.06.13
- * @by : snoweye
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 부분서식 로딩
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fLoadUnitForm()
- {
- initSection(gItemCds);
- }
- var diagcnt = 0;
- /**
- * @group :
- * @ver : 2008.06.13
- * @by : snoweye
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 부분서식 로딩후 후처리
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fOnLoadComplete()
- {
- var rtn = false;
- var curLoadFormCd = getParameter("loadformcd");
- setParameter("loadformcd", "");
- var fstLevlItemCd = model.getValue(gPageInfo.forminfoRef + "/unitformmast[formcd='" + curLoadFormCd + "' and loaded != 'true']/orgsupdegnitemcd");
- var ivwObj = document.controls("ivw_" + fstLevlItemCd);
- var unitformload = model.getValue(gPageInfo.forminfoRef + "/unitformmast[formcd='" + curLoadFormCd + "' and loaded != 'true']/loaded");
-
- //if(ivwObj != null)
- if(ivwObj != null && unitformload != "true")
- {
- //ivwObj.window.javascript.setFstLevlItemCd(fstLevlItemCd);
- setFstLevlItemCd(ivwObj, curLoadFormCd);
- model.setValue(gPageInfo.forminfoRef + "/unitformmast[formcd='" + curLoadFormCd + "']/loaded", "true");
- }
- //수술전진단명 부분서식 로딩후 처리
- if(fstLevlItemCd == '0007983001')
- {
- fSetSizeFormDiag();
- }
- //수술후진단명 부분서식 로딩후 처리
- if(fstLevlItemCd == '0000521001')
- {
- fSetSizeFormDiag1();
-
- if (parent.window.javascript.fGetFormRec("status") == "C")
- {
- //rtn = fGetdiagFormOprsrvno(oprsrvno, iMcdnm, iMcdnm, iScdnm, iScdnm); //수술예약번호로 진단명 조회
- }
- }
- //수술명 부분서식 로딩후 처리
- if(fstLevlItemCd == '0000509001')
- {
- fSetSizeFormOpr();
-
- if (parent.window.javascript.fGetFormRec("status") == "C")
- {
- //fSrchOprPerfDrlist(oprsrvno, cOdt1); //환자정보로 수술명, 집도의 조회
- fClearComnFormData();
- dispOnLoadComplete(UNIT_FORM);
- }
- else if (parent.window.javascript.fGetFormRec("status") == "U")
- {
- // fCosignCheck();
- }
- }
- gLoadFormCnts++;
- if(gItemCds.length == gLoadFormCnts)
- {
- if (parent.window.javascript.fGetFormRec("status") == "U")
- {
- var anstmthdcd = parent.model.getValue("/root/main/recinfo/recitem[degnitemlevlcd='" + iMcdnm + "']/rectermcd");
- var mcdnm = parent.model.getValue("/root/main/recinfo/recitem[degnitemlevlcd='" + iMcdnm + "']/rectermnm");
- var anstmthdcdsub = parent.model.getValue("/root/main/recinfo/recitem[degnitemlevlcd='" + iScdnm + "']/rectermcd");
- var scdnm = parent.model.getValue("/root/main/recinfo/recitem[degnitemlevlcd='" + iScdnm + "']/rectermnm");
- var iptMObj = document.controls("ipt_mcdnm");
- var iptSObj = document.controls("ipt_scdnm");
-
- if (anstmthdcd != "" && mcdnm != "")
- {
- iptMObj.attribute("ref") = pageInfo.recItemRef + "[degnitemlevlcd='" + iMcdnm + "']/rectermnm";
- }
- else
- {
- iptMObj.attribute("ref") = pageInfo.recItemRef + "[degnitemlevlcd='" + iMcdnm + "']/reccnts";
- }
-
- if (anstmthdcdsub != "" && scdnm != "")
- {
- iptSObj.attribute("ref") = pageInfo.recItemRef + "[degnitemlevlcd='" + iScdnm + "']/rectermnm";
- }
- else
- {
- iptSObj.attribute("ref") = pageInfo.recItemRef + "[degnitemlevlcd='" + iScdnm + "']/reccnts";
- }
-
- iptMObj.refresh();
- iptSObj.refresh();
- }
-
- dispOnLoadComplete(UNIT_FORM);
- //서식 로딩 후 포커스 처리(2008-11-18 박종훈)
- SetDefFocusIVW(gItemCdsTextArea);
- }
- // if(!rtn)
- // {
- // return "oprfalse";
- // } else {
- // model.refresh();
- // }
- }
- /**
- * @group :
- * @ver : 2008.11.28
- * @by : jonghun
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 동일 서식이 떠있을 경우 내부 인스턴스 로딩 후 디폴트 조회내용 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetDefData()
- {
- fSetSizeFormOpr();
-
- operation = getGlobalVariable("operation").split("▩")[1];
-
- if(operation != null && operation != ""){
- oprsrvno = operation.split("▦")[0];
- perfdeptcd = operation.split("▦")[10];
- }
-
- dispOnLoadComplete(UNIT_FORM);
-
- /*
- if (parent.window.javascript.fGetFormRec("status") == "C")
- {
- fSrchOprPerfDrlist(oprsrvno, cOdt1); //환자정보로 수술명, 집도의 조회
- parent.window.javascript.fSetFormRec("extnflag", "opr");
- parent.window.javascript.fSetFormRec("oprsrvno", oprsrvno);
-
- //서식 로딩 후 포커스 처리(2008-11-18 박종훈)
- SetDefFocusIVW(gItemCdsTextArea);
-
- //수술예약번호 체크
- if(oprsrvno == "")
- {
- messageBox("수술예약이 되지 않은", "I005");
- grup_base.disabled = true;
- fBtnDisEnable(true);
- return;
- } else {
- fBtnDisEnable(false);
- }
-
- //집도과 체크
- if (perfdeptcd != getUserInfo("dutplcecd"))
- {
- messageBox("작성 권한이", "I004");
- grup_base.disabled = true;
- fBtnDisEnable(true);
- return;
- } else {
- fBtnDisEnable(false);
- }
- }*/
- }
- /**
- * @desc : 저장버튼 Disable
- * @
- * @param :
- * @return :
- * @authur : 박종훈
- */
- function fBtnDisEnable(flag)
- {
- if(flag)
- {
- parent.window.javascript.fDisalbeSave(flag);
- }
- else
- {
- parent.window.javascript.fDisalbeSave(flag);
- }
- }
- /**
- * @group :
- * @ver : 2008.06.13
- * @by : jonghun
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 코사인버튼처리
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCosignCheck()
- {
- return;
-
- /*
- if (parent.window.javascript.fGetFormRec("status") == "U" && parent.window.javascript.fGetFormRec("espiyn") == "Y")
- {
- //코사인 권한 관련 처리(2008-11-27 박종훈)
- model.makeValue("/root/authsend/pid", parent.window.javascript.fGetFormRec("pid"));
- model.makeValue("/root/authsend/indd", parent.window.javascript.fGetFormRec("orddd"));
- model.makeValue("/root/authsend/cretno", parent.window.javascript.fGetFormRec("cretno"));
- model.makeValue("/root/authsend/formcd", parent.window.javascript.fGetFormRec("formcd"));
- model.makeValue("/root/authsend/srcformcd", parent.window.javascript.fGetFormRec("srcformcd"));
- model.makeValue("/root/authsend/formkind" , "opr");
- model.makeValue("/root/authsend/oprsrvno" , parent.window.javascript.fGetFormRec("oprsrvno"));
-
- if(submit("TRMMR00802"))
- {
- if(model.getValue("/root/staffcoyn/authyn") == "Y")
- {
- //인증저장버튼과 코사인버튼처리
- parent.window.btn_cosign.attribute("left") = parent.window.btn_signsave.attribute("left");
- parent.window.btn_signsave.visible = false;
- parent.window.btn_cosign.visible = true;
- //임시저장버튼과 기록반려버튼처리
- parent.window.btn_resend.attribute("left") = parent.window.btn_tmpsave.attribute("left");
- parent.window.btn_tmpsave.visible = false;
- parent.window.btn_resend.visible = true;
-
- //기타버튼 disable처리
- parent.window.btn_init.disabled = true;
- parent.window.btn_preview.disabled = true;
- parent.window.btn_signsaveasnew.disabled = true;
- parent.window.btn_del.disabled = true;
-
- if (parent.window.javascript.fGetFormRec("cosign") == "Y")
- {
- parent.window.btn_cosign.disabled = true;
- grup_base.disabled = true;
- }
- else
- {
- parent.window.btn_cosign.disabled = false;
- grup_base.disabled = false;
- }
- }
- else
- {
- //인증저장버튼과 코사인버튼처리
- parent.window.btn_signsave.visible = true;
- parent.window.btn_cosign.visible = false;
- //임시저장버튼과 기록반려버튼처리
- parent.window.btn_tmpsave.visible = true;
- parent.window.btn_resend.visible = false;
-
- //기타버튼 disable처리
- parent.window.btn_init.disabled = false;
- parent.window.btn_preview.disabled = false;
- parent.window.btn_signsaveasnew.disabled = false;
- parent.window.btn_del.disabled = false;
- }
- }
- }
- */
- }
- /**
- * MMR01300.js에서 submit직전에 submitID를 설정하기 위해서 호출한다.
- * @return
- */
- function getSubmitID_MMR01300I() {
- parent.window.javascript.fSetFormRec("extnflag", "opr");
-
- return TX_SUBMIT_EXTN_FORM;
- }
- /**
- * MMR01100.js에서 서식load를 완료한 후에 호출한다.
- * @return
- */
- function initFormAtLast_MMR01100I() {
-
- var flag = false;
- if (parent.window.javascript.fGetFormRec("status") == "C" ) {
- flag = true;
- model.makeValue("/root/send/extninfo/infoflag", "opr");
- model.makeValue("/root/send/extninfo/oprsrvno", parent.window.javascript.fGetFormRec("oprsrvno"));
-
- } else if (parent.window.javascript.fGetFormRec("status") == "U" ) {
- if (parent.window.javascript.fGetFormRec("espiyn") == "Y") {
- flag = true;
- model.makeValue("/root/send/extninfo/infoflag", "staffauth");
- model.makeValue("/root/send/extninfo/pid", parent.window.javascript.fGetFormRec("pid"));
- model.makeValue("/root/send/extninfo/formrecdd", parent.window.javascript.fGetFormRec("formrecdd"));
- model.makeValue("/root/send/extninfo/srcformcd", parent.window.javascript.fGetFormRec("srcformcd"));
- model.makeValue("/root/send/extninfo/formrecseq", parent.window.javascript.fGetFormRec("formrecseq"));
- }
- }
-
- if (flag && submit("TRMMR01302")) {
- if (model.getValue("/root/send/extninfo/infoflag").indexOf("staffauth") > -1) {
- fCosignCheck_SMMMR00600();
- }
- if (model.getValue("/root/send/extninfo/infoflag").indexOf("opr") > -1) {
- fSetOpInfo_SMMMR00600();
- }
- }
- }
- function fSetOpInfo_SMMMR00600() {
-
- }
- /**
- * @desc : staff-sign 버튼을 설정한다.
- * @
- * @param :
- * @return :
- * @authur : acwon 20091218
- */
- function fCosignCheck_SMMMR00600() {
- if (parent.window.javascript.fGetFormRec("formrecdeptcd") == getUserInfo("dutplcecd")) {
-
- if (parent.window.javascript.fGetFormRec("espiyn") == "Y") {
-
- var authyn = model.getValue("/root/main/extninfo/staffauthinfo/authyn");
- var cosign = parent.window.javascript.fGetFormRec("cosign");
-
- if (cosign == "Y") {
- if (parent.window.javascript.fGetFormRec("cosignid") == getUserId()) {
- if (parent.window.javascript.fGetFormRec("formrecuserid") == getUserId()) {
- //staff이 신규작성하여 sign된 경우 수정모드
- parent.window.javascript.initButtonLayer_MMR01100("staff_auth_n");
- } else {
- //전공의가 신규작성하여 staff이 sign한 경우 싸인모드
- parent.window.javascript.initButtonLayer_MMR01100("staff_auth_y");
- }
- } else {
- //staff sign이후이므로 staff이외에는 수정불가
- parent.window.javascript.initButtonLayer_MMR01100("no_auth");
- }
- } else {
- if (authyn == "Y") {
- //전공의 신규작성후에 staff이 수정모드로 열었으므로, 싸인모드
- parent.window.javascript.initButtonLayer_MMR01100("staff_auth_y");
- } else {
- //수정모드
- parent.window.javascript.initButtonLayer_MMR01100("staff_auth_n");
- }
- }
-
- } else {
- //수정모드
- parent.window.javascript.initButtonLayer_MMR01100("staff_auth_n");
- }
-
- } else {
- parent.window.javascript.initButtonLayer_MMR01100("no_auth");
- }
- }
|