1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225 |
- <?xml version="1.0" encoding="utf-8"?>
- <Script type="xscript4.0"><![CDATA[/**
- * MMR00903.js
- * SMMMR00904_DSC기록JCI.xrw
- */
- var arrItemCds = new Array( "0007983001" //수술전진단명
- , "0000521001" //수술후진단명
- , "0000515001" //수술일
- , "0000980001" //집도의
- , "0007992001" //마취의
- , "0016684001"
- // , "0007004001" //수술방 //0016684.0007004
- // , "0005330001" //수술부위피부준비 //0016684.0005330
- , "0000248001"
- , "0000509001" //수술명
- , "0000512001" //수술소견및절차
- , "0001113001" //투약정보
- , "0008539001" //처치정보
- , "0022906001" //출혈정보
- , "0008331001" //조직표본검체
- , "0000323001" //배액관
- , "0036148001" //특이사항(RDO)
- , "0001115001" //특이사항
- , "0018614003" //DSC도착시간
- , "0018615002" //OR 도착시간
- , "0018616002" //DSC회복시간
- , "0018617002" //DSC퇴실시간
- );
- //부분서식의 부모아이템 배열
- var gItemCds = new Array(
- "0007983001" //수술전진단명
- , "0000521001" //수술후진단명
- , "0000509001" //수술명
- , "0000512001" //수술소견및절차
- , "0001113001" //투약정보
- , "0008539001" //처치정보
- , "0022906001" //출혈정보
- //, "0001115001" //특이사항
- );
- var gItemCdsTextArea = new Array("0000512001" //수술소견및절차
- ,"0001115001" //특이사항
- );
- var gItemCdsXRWArea = new Array(
- "0007983001" //수술전진단명
- , "0000521001" //수술후진단명
- , "0000509001" //수술명
- );
- var gItemCdsExpand = new Array(
- "0000509001" //수술명
- , "0000512001" //수술소견및절차
- , "0001113001" //투약정보
- , "0008539001" //처치정보
- , "0022906001" //출혈정보
- //, "0001115001" //특이사항
- );
- //부분서식의 개수만큼 일단 '0'으로 채운다.
- var iOpdate = grup_base.ipt_opdate.degnitemno;
- var cOdt = grup_base.cmb_odt.degnitemno;
- var cSdt = grup_base.cmb_sdt.degnitemno;
- var cOproom = grup_base.cmb_oproom.degnitemno;
- var iMcdnm = grup_base.ipt_mcdnm.degnitemlevlcd;
- var iScdnm = grup_base.ipt_scdnm.degnitemlevlcd;
- var cOdt1 = grup_base.cmb_odt.degnitemlevlcd;
- var oprsrvno = "";
- //2010.01.25 dhkim 마취과코드추가
- var anstdeptcd = "";
- /**
- * @desc : 확장버튼(이미지,가계도,추가기록)을 기록여부에 따라 표시를 위한 버튼목록
- * @id :
- * @authur : 안치원
- * @history : 2009.09.09 신규 안치원 ACW_090909A
- */
- var gExtnBtnIds = new Array("btn_imge_0000512001" //수술소견및절차 이미지버튼
- , "btn_etcrec_0000512001" //수술소견및절차 추가기록버튼
- );
- var lodedYn = false;
- /****************************************************************************************
- * Function : fClearComnFormData
- * Description : 서식 데이터 Clear, 인터페이스 입력값 조회 입력
- * retrun type :
- ****************************************************************************************/
- function fClearComnFormData()
- {
- if (!utlf_isNull(gMaxSectionID))
- {
- frmf_inputEnterKey( "ComnFormObj.lbl_"+gMaxSectionID, "onclick", new ClickEventInfo);
- }
-
- if( lodedYn == true )
- ClearComnFormData(gItemCds);
-
- fInitialize();
-
- //포커스 처리
- SetDefFocusIVW(gItemCdsTextArea);
- parent.fSetFormRec("extnflag", "opr");
- parent.fSetFormRec("oprsrvno", oprsrvno);
- }
- /****************************************************************************************
- * Function : fLoadData
- * Description : 기록데이터 조회
- * retrun type :
- ****************************************************************************************/
- function fLoadData()
- {
- fInitialize();
-
- lf_setRecData(arrItemCds);
-
- var sStatus = fGetFormRec("status");
- lf_setBasicInfo(sStatus);
-
- /*
- //Program 서식 데이터 조회반영
- InitPgmFormData();
- this.recRef2 = "/root/hidden/recinfo"
- //부분서식 데이터 조회 반영
- InitUnitFormData(gItemCds);
- */
-
- parent.gSubmitID = TX_SUBMIT_EXTN_FORM;
- parent.fSetFormRec("extnflag", "opr");
- }
- /****************************************************************************************
- * Function : fInitialize
- * Description : 화면 초기화
- * retrun type :
- * History :
- ****************************************************************************************/
- function fInitialize()
- {
- var operation = sysf_getGlobalVariable("operation").split("▩")[1];
-
- if(!utlf_isNull(operation)){
- oprsrvno = operation.split("▦")[0];
- perfdeptcd = operation.split("▦")[10];
- }
-
- if (parent.fGetFormRec("status") == "C")
- {
- parent.fSetFormRec("extnflag", "opr");
- parent.fSetFormRec("oprsrvno", oprsrvno);
- }
- gTermViewTopPos = 0;
- //gTermViewHei = 360;
- gTermViewHei = 286;
- gTermViewItems = gItemCdsXRWArea;
- }
- /**
- * @desc : 의사 조회에 따른 reccnts셋팅(tur)
- * @
- * @param :
- * @return :
- * @authur : 박종훈
- */
- function fChngDocts(degnitemno1, degnitemno2, degnitemno3)
- {
- //집도의
- var sDrid = model.getValue("/root/main/recinfo/recitem[degnitemno='" + degnitemno1 + "']/rectermcd");
- var sDrnm = model.getValue("/root/init/drlist" + degnitemno1 + "/usercombo[userid='" + sDrid + "']/usernm");
- if (sDrnm == "")
- {
- sDrnm = "";
- model.setValue("/root/main/recinfo/recitem[degnitemno='" + degnitemno1 + "']/rectermcd", "");
- }
-
- model.setValue("/root/main/recinfo/recitem[degnitemno='" + degnitemno1 + "']/rectermnm", sDrnm);
-
- //마취의
- var sanstDrid = model.getValue("/root/main/recinfo/recitem[degnitemno='" + degnitemno2 + "']/rectermcd");
- var sanstDrnm = model.getValue("/root/init/drlist" + degnitemno2 + "/usercombo[userid='" + sanstDrid + "']/usernm");
- if (sanstDrnm == "")
- {
- sanstDrnm = "";
- model.setValue("/root/main/recinfo/recitem[degnitemno='" + degnitemno2 + "']/rectermcd", "");
- }
-
- model.setValue("/root/main/recinfo/recitem[degnitemno='" + degnitemno2 + "']/rectermnm", sanstDrnm);
-
- //수술방
- var sRoomcd = model.getValue("/root/main/recinfo/recitem[degnitemno='" + degnitemno3 + "']/rectermcd");
- var sRoomnm = model.getValue("/root/init/oproom/oproomlist[oproomcd='"+sRoomcd+"']/oproomnm");
-
- if (sRoomnm == "")
- {
- sRoomnm = "";
- model.setValue("/root/main/recinfo/recitem[degnitemno='" + degnitemno3 + "']/rectermcd", "");
- }
-
- model.setValue("/root/main/recinfo/recitem[degnitemno='" + degnitemno3 + "']/rectermnm", sRoomnm);
-
- model.refresh();
- }
- /****************************************************************************************
- * Function : fChngDoct
- * Description : 의사 선택에 따른 reccnts셋팅(tur)
- * retrun type :
- * History :
- ****************************************************************************************/
- function fChngDoct(obj:Combo, e:ItemChangeEventInfo)
- {
- var sDrnm, sDrcd;
- var sDegnitemlevlcd = obj.degnitemlevlcd;
- var nFindRow = ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd);
- if(nFindRow == -1)
- {
- nFindRow = ds_data_recitem.addRow();
- var insRow = ds_temp_mainrecitem.findRow("degnitemlevlcd", sDegnitemlevlcd);
- ds_data_recitem.copyRow(nFindRow, ds_temp_mainrecitem, insRow);
- }
-
- sDrnm = e.posttext;
- sDrcd = e.postvalue;
-
- if( utlf_isNull(e.posttext) ){
- sDrnm = "";
- sDrcd = "";
- obj.value = "";
- }
- ds_data_recitem.setColumn(nFindRow, "rectermcd", sDrcd);
- ds_data_recitem.setColumn(nFindRow, "rectermnm", sDrnm);
-
- }
- /****************************************************************************************
- * Function : fChngOproom
- * Description : 수술실 선택에 따른 reccnts셋팅(tur)
- * retrun type :
- * History :
- ****************************************************************************************/
- function fChngOproom(obj:Combo, e:ItemChangeEventInfo)
- {
- var sRoomnm, sRoomcd;
- var sDegnitemlevlcd = obj.degnitemlevlcd;
- var nFindRow = ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd);
- if(nFindRow == -1)
- {
- nFindRow = ds_data_recitem.addRow();
- var insRow = ds_temp_mainrecitem.findRow("degnitemlevlcd", sDegnitemlevlcd);
- ds_data_recitem.copyRow(nFindRow, ds_temp_mainrecitem, insRow);
- }
-
- sRoomnm = e.posttext;
- sRoomcd = e.postvalue;
-
- if( utlf_isNull(e.posttext) ){
- sRoomnm = "";
- sRoomcd = "";
- obj.value = "";
- }
- ds_data_recitem.setColumn(nFindRow, "rectermcd", sRoomcd);
- ds_data_recitem.setColumn(nFindRow, "rectermnm", sRoomnm);
-
- }
- /****************************************************************************************
- * Function : fRadioYN
- * Description : 라디오버튼 선택에 따른 reccnts셋팅
- ****************************************************************************************/
- function fRadioYN(obj:Radio, e:ItemChangeEventInfo)
- {
- var sDegnitemlevlcd = obj.degnitemlevlcd;
- var nFindRow = ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd);
- if(nFindRow == -1)
- {
- nFindRow = ds_data_recitem.addRow();
- var insRow = ds_temp_mainrecitem.findRow("degnitemlevlcd", sDegnitemlevlcd);
- ds_data_recitem.copyRow(nFindRow, ds_temp_mainrecitem, insRow);
- }
-
- var sRectermnm = parent.ds_data_vallist.getColumn(parent.ds_data_vallist.findRow("valcd", e.postvalue), "valitemnm");
- if( utlf_isNull(sRectermnm) ) sRectermnm = e.posttext;
- ds_data_recitem.setColumn(nFindRow, "rectermcd", e.postvalue);
- ds_data_recitem.setColumn(nFindRow, "rectermnm", sRectermnm);
-
- }
- /**
- * @desc : 기록 인스턴스 연결
- * @
- * @param :
- * @return :
- * @authur : 박종훈
- */
- function fSetRecItemValue(reciteminfo)
- {
- return SetCommMediFormValue(gItemCds, reciteminfo);
- }
- /****************************************************************************************
- * Function : fSetSizeFormDiag
- * Description : 진단명 사이즈 조절(tur)
- * retrun type :
- ****************************************************************************************/
- function fSetSizeFormDiag()
- {
- grup_base.ivw_0007983001.fInitPage(false, parseInt(grup_base.ivw_0007983001.position.height), parseInt(grup_base.ivw_0007983001.position.width), "ivw_0007983001", "수술전 진단명");
- }
- /****************************************************************************************
- * Function : fSetSizeFormDiag1
- * Description : 수술후 진단명 사이즈 조절
- * retrun type :
- ****************************************************************************************/
- function fSetSizeFormDiag1()
- {
- grup_base.ivw_0000521001.fInitPage(false, parseInt(grup_base.ivw_0000521001.position.height), parseInt(grup_base.ivw_0000521001.position.width), "ivw_0000521001", "수술후 진단명(Free text)");
- }
- /****************************************************************************************
- * Function : fSetSizeFormOpr
- * Description : 서식 수술명 사이즈 조절(tur)
- * retrun type :
- ****************************************************************************************/
- function fSetSizeFormOpr()
- {
- grup_base.ivw_0000509001.fInitPage(false, parseInt(grup_base.ivw_0000509001.position.height), parseInt(grup_base.ivw_0000509001.position.width), "ivw_0000509001");
- }
- /*****************************************************************************
- 튜닝
- ******************************************************************************/
- var gLoadFormCnts = 0;
- /****************************************************************************************
- * Function : fFormReady()
- * Description : 화면 로딩후 초기화 작업 수행
- * retrun type :
- ****************************************************************************************/
- function fFormReady()
- {
- this.ComnFormObj = this.grup_base;
- dsf_createDsRow("ds_temp_mainrecitem",
- [{col:"formxrw", val:""}]);
- // 공통서식의 초기 recitem 정보. 기록 데이터 조합시 사용
- ds_temp_mainrecitem.assign(ds_data_recitem);
-
- lf_setSectionSize(gItemCds, "grup_base.tar_0000509001", "grup_base.tar_0001115001", 431);
- //20080702 박종훈 추가
- InitBtnImge(gItemCdsTextArea);
- // InitBtnComn(gItemCds);
- InitBtnEtcRec(gItemCdsTextArea);
- // dispOnLoadComplete(COMN_FORM);
- // lf_checkUnitForm(gItemCds); // 부분서식 로딩
- lf_AllLoadUnitFormExpand(gItemCds); // 전체 로드
-
- fInitialize();
-
- lf_initForm(); //fOnLoadComplete
-
- if (parent.fGetFormRec("status") == "C")
- {
- fViewOPfindingsCaption_SMMMR00901("0000512001");
- }
-
- //2010.01.21, hkjoo
- // initCmbExtnList(gItemCds);
-
- lf_setRecData(arrItemCds);
-
- initFormAtLast_MMR01100I();
- }
- /****************************************************************************************
- * Function : fLoadUnitForm()
- * Description : 부분서식 로딩
- * retrun type :
- ****************************************************************************************/
- function fLoadUnitForm()
- {
- initSection(gItemCds);
- }
- var diagcnt = 0;
- /****************************************************************************************
- * Function : fOnLoadComplete()
- * Description : 부분서식 로딩후 후처리
- * retrun type :
- ****************************************************************************************/
- function fOnLoadComplete()
- {
- var rtn = false;
- var curLoadFormCd = frmf_getParameter("loadformcd");
- frmf_setParameter("loadformcd", "");
-
- var nFindRow = ds_data_unitformmast.findRowExpr("formcd=='" + curLoadFormCd + "' && loaded != 'true'");
- var fstLevlItemCd = ds_data_unitformmast.getColumn(nFindRow, "orgsupdegnitemcd");
- var ivwObj = ComnFormObj.components["ivw_" + fstLevlItemCd];
- var unitformload = ds_data_unitformmast.getColumn(nFindRow, "loaded");
-
- if(!utlf_isNull(ivwObj) && unitformload != "true")
- {
- //setFstLevlItemCd(ivwObj, curLoadFormCd);
- var nRow = ds_data_unitformmast.findRow("formcd", curLoadFormCd);
- ds_data_unitformmast.setColumn(nRow, "loaded", "true");
- }
-
- //수술전진단명 부분서식 로딩후 처리
- if(fstLevlItemCd == '0007983001')
- {
- fSetSizeFormDiag();
- }
-
- //수술후진단명 부분서식 로딩후 처리
- if(fstLevlItemCd == '0000521001')
- {
- fSetSizeFormDiag1();
-
- if (parent.fGetFormRec("status") == "C")
- {
- }
- }
- //수술명 부분서식 로딩후 처리
- if(fstLevlItemCd == '0000509001')
- {
- fSetSizeFormOpr();
-
- if (parent.fGetFormRec("status") == "C")
- {
- fClearComnFormData();
-
- }
- }
- gLoadFormCnts++;
- utlf_addLog("@@@@@ gItemCds.length : " + gItemCds.length + " gLoadFormCnts : " + gLoadFormCnts );
- if(gItemCds.length == gLoadFormCnts)
- {
- //fSetSizeFormOpr();
- if (parent.fGetFormRec("status") == "C")
- {
-
- var node = sysf_getGlobalVariable("paminfo");
- if(!utlf_isNull(node))
- {
- var sPamDsNm = dsf_createDs("ds_main_paminfo", [{col:"pid", type:"string", size:256}]);
- var objPamDs:Dataset = new Dataset;
- objPamDs = this.objects[sPamDsNm];
-
- dsf_setCSVToDs("ds_main_paminfo", node);
-
- var ordtype = objPamDs.getColumn(0, "ioflag");
-
- if(ordtype != "D")
- {
- sysf_messageBox("해당환자는 DSC가 아닌", "I005");
- grup_base.enable = false;
- fBtnDisEnable(true);
- return;
- }
- else
- {
- if(utlf_isNull(oprsrvno))
- {
- sysf_messageBox("수술예약이 되지 않은 환자이거나 수술탭에서 선택하지 않은", "I005");
- grup_base.enable = false;
- fBtnDisEnable(true);
- return;
- } else {
- fBtnDisEnable(false);
- }
- }
- }
-
-
- parent.fSetFormRec("extnflag", "opr");
- parent.fSetFormRec("oprsrvno", oprsrvno);
-
- //서식 로딩 후 포커스 처리(2008-11-18 박종훈)
- SetDefFocusIVW(gItemCdsTextArea);
-
- }
- if(parent.fGetFormRec("status") == "U"){
-
- //jw.choe 주석처리
-
- /*
- //마취정보세팅
- 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();
-
- */
- //버튼세팅
- if(parent.fCheckSaveDept()){
- grup_base.enable = true;
- fBtnDisEnable(false);
- }
- else{
- sysf_messageBox("타과에서 작성된 DSC기록은 수정", "E001");
- grup_base.enable = false;
- fBtnDisEnable(true);
- }
- }
-
- dispOnLoadComplete(UNIT_FORM);
- }
- if(!rtn)
- {
- return "oprfalse";
- } else {
- }
- }
- /****************************************************************************************
- * Function : fGetDefData()
- * Description : 동일 서식이 떠있을 경우 내부 인스턴스 로딩 후 디폴트 조회내용 조회
- * retrun type :
- ****************************************************************************************/
- function fGetDefData()
- {
- fSetSizeFormOpr();
-
- operation = sysf_getGlobalVariable("operation").split("▩")[1];
-
- if(!utlf_isNull(operation)){
- oprsrvno = operation.split("▦")[0];
- perfdeptcd = operation.split("▦")[10];
- }
-
- if (parent.fGetFormRec("status") == "C")
- {
- var node = sysf_getGlobalVariable("paminfo");
-
- if(!utlf_isNull(node))
- {
- var sPamDsNm = dsf_createDs("ds_main_paminfo", [{col:"pid", type:"string", size:256}]);
- var objPamDs:Dataset = new Dataset;
- objPamDs = this.objects[sPamDsNm];
-
- dsf_setCSVToDs("ds_main_paminfo", node);
-
- var ordtype = objPamDs.getColumn(0, "ioflag");
-
- if(ordtype != "D")
- {
- sysf_messageBox("해당환자는 DSC가 아닌", "I005");
- grup_base.enable = false;
- fBtnDisEnable(true);
- return;
- }
- else
- {
- if(utlf_isNull(oprsrvno))
- {
- sysf_messageBox("수술예약이 되지 않은 환자이거나 수술탭에서 선택하지 않은", "I005");
- grup_base.enable = false;
- fBtnDisEnable(true);
- return;
- } else {
- fBtnDisEnable(false);
- }
- }
- }
-
- parent.fSetFormRec("extnflag", "opr");
- parent.fSetFormRec("oprsrvno", oprsrvno);
-
- //서식 로딩 후 포커스 처리(2008-11-18 박종훈)
- SetDefFocusIVW(gItemCdsTextArea);
- }
-
- dispOnLoadComplete(UNIT_FORM);
- }
- /****************************************************************************************
- * Function : fBtnDisEnable()
- * Description : 저장버튼 Disable
- * retrun type :
- ****************************************************************************************/
- function fBtnDisEnable(flag)
- {
- if(flag)
- {
- parent.fDisalbeSave(flag);
- }
- else
- {
- parent.fDisalbeSave(flag);
- }
- }
- /**
- * 20091211 dhkim
- * 수술소견 및 절차에 데이터가 없을때 캡션을 보여준다.
- */
- /****************************************************************************************
- * Function : fViewOPfindingsCaption_SMMMR00901()
- * Description : 20091211 dhkim
- * 수술소견 및 절차에 데이터가 없을때 캡션을 보여준다.
- * retrun type :
- ****************************************************************************************/
- function fViewOPfindingsCaption_SMMMR00901(itemcd){
-
- }
-
- /****************************************************************************************
- * Function : initFormAtLast_MMR01100I()
- * Description : MMR01100.js에서 서식load를 완료한 후에 호출한다.
- * retrun type :
- ****************************************************************************************/
- function initFormAtLast_MMR01100I() {
- //2010.01.25 dhkim 마취과코드 추가(간호공통기준자료테이블에서 가죠옴)
- var pCode = "'012'"; // 조회할 CdGrupID 코드정보(012:마취과)
- var pDate = utlf_getCurrentDate(); //조회기준일자
- fGetNursHardCdInfo_MMR00901(pCode, pDate);
- var nFindRow = ds_code_mmr00901.findRow("cdgrupid", "012");
- anstdeptcd = ds_code_mmr00901.getColumn(nFindRow, "cdid");
-
- var formcd = parent.fGetFormMast("formcd");
-
- //신규서식로딩의 경우만 수술기록정보 연동
- if (parent.fGetFormRec("status") == "C") {
-
- //2010.01.25 dhkim 집도의, 마취의 리스트 조회추가
- fGetRecIfData_MMR00901("opr;opnm;opdiag;dscinout;drlist;anstdrlist;oproomlist");
- } else {
-
- //2010.01.25 dhkim 집도의, 마취의, 수술방 리스트 조회추가
- fGetRecIfData_MMR00901("drlist;anstdrlist;oproomlist");
-
- }
- fInitAnstTypeCtrl_SMMMR00901();
-
- lodedYn = true; // 로드 시점 처리
- }
- /****************************************************************************************
- * Function : getSubmitID_MMR01300I
- * Description : MMR01300.js에서 submit직전에 submitID를 설정하기 위해서 호출한다.
- * retrun type :
- ****************************************************************************************/
- function getSubmitID_MMR01300I() {
-
- //2010.02.23 dhkim - 통합기록조회용 JCI구분자추가(fSetXsltFlag없애고 getSubmitID_MMR01300I로 이동)
- parent.fSetFormRec("xsltflag", "NEW2");
-
- return TX_SUBMIT_EXTN_FORM;
- }
- /****************************************************************************************
- * Function : fGetRecIfData_MMR00901
- * Description : 수술기록의 Data를 설정한다.
- * retrun type :
- * History : TRMMR01302 submission 호출로 통합
- ****************************************************************************************/
- function fGetRecIfData_MMR00901(infoflag) {
-
- ds_send_extninfo.clearData();
- var nRow = ds_send_extninfo.addRow();
- ds_send_extninfo.setColumn(nRow, "infoflag", infoflag);
-
- ds_send_extninfo.setColumn(nRow, "pid", parent.fGetFormRec("pid"));
- ds_send_extninfo.setColumn(nRow, "oprsrvno", parent.fGetFormRec("oprsrvno"));
-
- //2010.01.11 dhkim - dsc 입퇴실정보 조회위해 orddd, cretno 추가
- ds_send_extninfo.setColumn(nRow, "orddd", parent.fGetFormRec("orddd"));//dsc는 orddd로 들어감
- ds_send_extninfo.setColumn(nRow, "cretno", parent.fGetFormRec("cretno"));
- //2010.01.25 dhkim - 집도의,마취의, 수술방 리스트조회 콤보에 필요한 파라미터 추가
- if(utlf_isSearchString(infoflag, "drlist"))
- ds_send_extninfo.setColumn(nRow, "deptcd", sysf_getUserInfo("dutplcecd"));
-
- if(utlf_isSearchString(infoflag, "anstdrlist"))
- ds_send_extninfo.setColumn(nRow, "anstdeptcd", anstdeptcd);
-
- if(utlf_isSearchString(infoflag, "oproomlist"))
- ds_send_extninfo.setColumn(nRow, "opdd", parent.fGetFormRec("orddd"));
-
- dsf_setDefaultVal(ds_send_extninfo, "dschdd:99991231");
-
- var oParam = {};
- oParam.id = "TRMMR01302";
- oParam.service = "medirecapp.RecIf";
- oParam.method = "reqGetFormRecExtnInfo";
- oParam.inds = "req=ds_send_extninfo";
- oParam.outds = "ds_main_extninfo_resultinfo=resultinfo ds_main_extninfo_staffauthinfo=staffauthinfo ds_main_extninfo_oprinfo=oprinfo "
- + "ds_main_extninfo_oplistinfo=oplistinfo ds_main_extninfo_recitem=recitem ds_main_extninfo_drlistinfo=drlistinfo "
- + "ds_data_diagcdlist=diagcdlist ds_main_extninfo_selectoplist=selectoplist ds_main_extninfo_dscinoutinfo=dscinoutinfo "
- + "ds_main_extninfo_rectextinfo=rectextinfo ds_main_extninfo_anstdrlistinfo=anstdrlistinfo ds_main_extninfo_oproomlistinfo=oproomlistinfo "
- + "ds_main_extninfo_recseqinfo=recseqinfo ds_main_extninfo_etcinfo=etcinfo";
- oParam.async = false;
- oParam.callback = "cf_TRMMR01302";
- tranf_submit(oParam);
-
- if(arErrorCode.pop("TRMMR01302") > -1)
- {
-
- var execInfoFlag = ds_main_extninfo_resultinfo.getColumn(0, "infoflag");
-
-
- //2010.01.25 dhkim - 집도의,마취의,수술방 콤보 리스트 추가
- if (execInfoFlag.indexOf("anstdrlist;") != -1) {
- //extninfo에 조회해온 마취의 노드리스트 콤보리스트에 copy
- ds_init_cmb_sdt.clearData();
- ds_init_cmb_sdt.copyData(ds_main_extninfo_anstdrlistinfo);
-
- }
-
-
- if (execInfoFlag.indexOf("drlist;") != -1) {
- //extninfo에 조회해온 집도의 노드리스트 콤보리스트에 copy
- ds_init_cmb_odt.clearData();
- ds_init_cmb_odt.copyData(ds_main_extninfo_drlistinfo);
- }
-
-
- if (execInfoFlag.indexOf("oproomlist;") != -1) {
- //extninfo에 조회해온 수술방 노드리스트 콤보리스에 copy
- ds_init_cmb_oproom.clearData();
- ds_init_cmb_oproom.copyData(ds_main_extninfo_oproomlistinfo);
- }
-
-
- //2010.01.11 dhkim - 집도의, 마취의 콤보 노드리스트에 조회한 의사정보 없을경우 노드추가
- //집도의
- var perfdrnm = makeDrNames_MMR00901(new Array("perfdrnm"));
- var perfdrid = makeDrNames_MMR00901(new Array("perfdrid"));
-
- //2010.01.25 dhkim - 수정모드일 경우는 recinfo에서 조회
- if(parent.fGetFormRec("status") == "U"){
- var sDegnitemlevlcd = grup_base.cmb_odt.degnitemlevlcd;
- var nFindRow = parent.ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd);
-
- perfdrnm = parent.ds_data_recitem.getColumn(nFindRow, "rectermnm");
- perfdrid = parent.ds_data_recitem.getColumn(nFindRow, "rectermcd");
- //perfCnt = getNodesetCount("/root/main/extninfo/drlistinfo[userid='"+perfdrid+"']/userid");
- }
-
- var perfCnt = ds_main_extninfo_drlistinfo.getCaseCount("userid=='"+perfdrid+"'");
- if(perfCnt == 0){
- var nRow = ds_init_cmb_odt.addRow();
- ds_init_cmb_odt.setColumn(nRow, "userid", perfdrid);
- ds_init_cmb_odt.setColumn(nRow, "usernm", perfdrnm);
- }
-
-
- //마취의
- var anstdrnm = makeDrNames_MMR00901(new Array("anstdrnm"));
- var anstdrid = makeDrNames_MMR00901(new Array("anstdrid"));
-
- //2010.01.25 dhkim - 수정모드의 경우 recinfo에서 조회
- if(parent.fGetFormRec("status") == "U"){
- var sDegnitemlevlcd = grup_base.cmb_sdt.degnitemlevlcd;
- var nFindRow = parent.ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd);
- anstdrnm = parent.ds_data_recitem.getColumn(nFindRow, "rectermnm");
- anstdrid = parent.ds_data_recitem.getColumn(nFindRow, "rectermcd");
- }
-
- var anstdrCnt = ds_main_extninfo_anstdrlistinfo.getCaseCount("userid=='"+anstdrid+"'");
- if(anstdrCnt == 0){
- var nRow = ds_init_cmb_sdt.addRow();
- ds_init_cmb_sdt.setColumn(nRow, "userid", anstdrid);
- ds_init_cmb_sdt.setColumn(nRow, "usernm", anstdrnm);
- }
-
-
-
- if (execInfoFlag.indexOf("opr;") != -1) {
- var nFindRow = "";
- var sDegnitemlevlcd = "";
-
- //수술정보 설정
- //수술일자,진료일자
- var opcnfmdd = ds_main_extninfo_oprinfo.getColumn(0, "opcnfmdd");
- var opcnfmhm = ds_main_extninfo_oprinfo.getColumn(0, "opcnfmhm");
-
- grup_base.ipt_opdate.value = opcnfmdd;
- sDegnitemlevlcd = grup_base.ipt_opdate.degnitemlevlcd; //0000515
- nFindRow = ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd);
- ds_data_recitem.setColumn(nFindRow, "reccnts", opcnfmdd);
-
- //2010.01.11 dhkim - 진료일자,진료시간 세팅
- parent.fSetFormRec("formrecdd", opcnfmdd);
- parent.fSetFormRec("formrechm", opcnfmhm);
-
- //집도의 설정
- grup_base.cmb_odt.value = perfdrid;
- sDegnitemlevlcd = grup_base.cmb_odt.degnitemlevlcd;
- nFindRow = ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd); //0000980
- ds_data_recitem.setColumn(nFindRow, "rectermcd", perfdrid);
- ds_data_recitem.setColumn(nFindRow, "rectermnm", perfdrnm);
-
- //마취의 설정
- grup_base.cmb_sdt.value = anstdrid;
- sDegnitemlevlcd = grup_base.cmb_sdt.degnitemlevlcd;
- nFindRow = ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd); //0007992
- ds_data_recitem.setColumn(nFindRow, "rectermcd", anstdrid);
- ds_data_recitem.setColumn(nFindRow, "rectermnm", anstdrnm);
-
- //수술방 설정
- var oproomcd = ds_main_extninfo_oprinfo.getColumn(0, "oproomcd");
-
- // knuh_20110705_수정_최초로딩시 수술방명을 인스턴스에 셋팅을 못하여 저장시 빠짐
- nFindRow = ds_main_extninfo_oproomlistinfo.findRow("oproomcd", oproomcd);
- var oproomnm = ds_main_extninfo_oproomlistinfo.getColumn(nFindRow, "oproomnm");
-
- if(!utlf_isNull(oproomcd)){
- grup_base.cmb_oproom.value = oproomcd;
- sDegnitemlevlcd = grup_base.cmb_oproom.degnitemlevlcd;
- nFindRow = ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd); //0016684.0007004
- ds_data_recitem.setColumn(nFindRow, "rectermcd", oproomcd);
- ds_data_recitem.setColumn(nFindRow, "rectermnm", oproomnm);
- }
-
- //수술부위피부준비 설정
- var skinprepcc = ds_main_extninfo_oprinfo.getColumn(0, "skinprepcc");
- if(skinprepcc == "0001965001"){
- grup_base.radio1.value = skinprepcc;
- sDegnitemlevlcd = grup_base.radio1.degnitemlevlcd;
- nFindRow = ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd); //0016684.0005330
- ds_data_recitem.setColumn(nFindRow, "rectermnm", "Yes");
- ds_data_recitem.setColumn(nFindRow, "rectermcd", skinprepcc);
- }else if(skinprepcc == "0001347001"){
- grup_base.radio1.value = skinprepcc;
- sDegnitemlevlcd = grup_base.radio1.degnitemlevlcd;
- nFindRow = ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd); //0016684.0005330
- ds_data_recitem.setColumn(nFindRow, "rectermnm", "No");
- ds_data_recitem.setColumn(nFindRow, "rectermcd", skinprepcc);
- }
-
- //주마취 설정
- var sAnstmthdnm = ds_main_extninfo_oprinfo.getColumn(0, "anstmthdnm");
- var sAnstmthdcd = ds_main_extninfo_oprinfo.getColumn(0, "anstmthdcd");
- grup_base.ipt_mcdnm.value = sAnstmthdnm;
- sDegnitemlevlcd = grup_base.ipt_mcdnm.degnitemlevlcd;
- nFindRow = ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd); //0000248.0015528
- ds_data_recitem.setColumn(nFindRow, "rectermnm", sAnstmthdnm);
- ds_data_recitem.setColumn(nFindRow, "rectermcd", sAnstmthdcd);
-
- //부마취 설정
- var sAnstmthdcdsubnm = ds_main_extninfo_oprinfo.getColumn(0, "anstmthdcdsubnm");
- var sAnstmthdcdsub = ds_main_extninfo_oprinfo.getColumn(0, "anstmthdcdsub");
- grup_base.ipt_scdnm.value = sAnstmthdcdsubnm;
- sDegnitemlevlcd = grup_base.ipt_scdnm.degnitemlevlcd;
- nFindRow = ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd); //0000248.0008458
- ds_data_recitem.setColumn(nFindRow, "rectermnm", sAnstmthdcdsubnm);
- ds_data_recitem.setColumn(nFindRow, "rectermcd", sAnstmthdcdsub);
- }
-
-
- if (execInfoFlag.indexOf("opdiag;") != -1 && lodedYn == true) {
- //수술진단 설정
- // copyNodeset("/root/main/diaginfo/diagcdlist", "/root/main/extninfo/diagcdlist", "replace", ivw_0007983001.model, model);
- // copyNodeset("/root/main/diaginfo/diagcdlist", "/root/main/extninfo/diagcdlist", "replace", ivw_0000521001.model, model);
- grup_base.ivw_0007983001.fSetDiagNmInstance();
- grup_base.ivw_0000521001.fSetDiagNmInstance();
-
- }
-
-
- if (execInfoFlag.indexOf("opnm;") != -1 && lodedYn == true) {
- //수술명설정
- if( !grup_base.ivw_0000509001.isValidObject("ds_tmpop_selectoplist") )
- grup_base.ivw_0000509001.dsf_createDs("ds_tmpop_selectoplist");
-
- grup_base.ivw_0000509001.ds_tmpop_selectoplist.copyData(ds_main_extninfo_selectoplist);
- grup_base.ivw_0000509001.fAfterSrch();
- }
-
-
-
- //2010.01.10 dhkim dsc 입퇴실시간 정보 추가
- if (execInfoFlag.indexOf("dscinout;") != -1) {
- //dsc입퇴실시간
- var nRow = ds_main_extninfo_dscinoutinfo.rowposition;
- var nurin = utlf_transEmptyToNull(ds_main_extninfo_dscinoutinfo.getColumn(nRow, "nurin"));
- var nurout = utlf_transEmptyToNull(ds_main_extninfo_dscinoutinfo.getColumn(nRow, "nurout"));
- //수술 입퇴실시간
- var oprin = utlf_transEmptyToNull(ds_main_extninfo_dscinoutinfo.getColumn(nRow, "oprin"));
- var oprout = utlf_transEmptyToNull(ds_main_extninfo_dscinoutinfo.getColumn(nRow, "oprout"));
- grup_base.textarea6.value = nurin;
- sDegnitemlevlcd = grup_base.textarea6.degnitemlevlcd;
- nFindRow = ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd); //0018614
- ds_data_recitem.setColumn(nFindRow, "reccnts", nurin);//DSC 도착시간
-
- grup_base.textarea1.value = oprin;
- sDegnitemlevlcd = grup_base.textarea1.degnitemlevlcd;
- nFindRow = ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd); //0018615
- ds_data_recitem.setColumn(nFindRow, "reccnts", oprin);//OR 도착시간
-
- grup_base.textarea2.value = oprout;
- sDegnitemlevlcd = grup_base.textarea2.degnitemlevlcd;
- nFindRow = ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd); //0018616
- ds_data_recitem.setColumn(nFindRow, "reccnts", oprout);//DSC 회복시간
-
- grup_base.textarea3.value = nurout;
- sDegnitemlevlcd = grup_base.textarea3.degnitemlevlcd;
- nFindRow = ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd); //0018617
- ds_data_recitem.setColumn(nFindRow, "reccnts", nurout);//DSC 퇴실시간
- }
-
-
- var sStatus = fGetFormRec("status");
- lf_setBasicInfo(sStatus); //시술 정보 기록데이터 세팅
- }
- }
- function cf_TRMMR01302(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- if(nErrorCode < 0) return;
- dsf_setDefaultVal(ds_main_extninfo_recitem, "recitemno:'',degnitemno:'',supdegnitemno:''");
- dsf_setTypeFormat(ds_main_extninfo_recitem, "recitemno:INT^degnitemno:INT^supdegnitemno:INT");
- }
- /****************************************************************************************
- * Function : makeDrNames_MMR00901
- * Description : 의사명 노드리스트 세팅
- * retrun type :
- ****************************************************************************************/
- function makeDrNames_MMR00901(arr) {
- var buf = "";
- for (var i=0; i<arr.length; i++) {
- var nm = ds_main_extninfo_oprinfo.getColumn(0, arr[i]);
- if (utlf_isNull(nm)) {
- break;
- } else {
- buf += nm;
- if (i<arr.length-1 && !utlf_isNull(ds_main_extninfo_oprinfo.getColumn(0, arr[i+1]))) {
- buf += ", ";
- }
- }
- }
-
- return buf;
- }
- /****************************************************************************************
- * Function : fInitAnstTypeCtrl_SMMMR00901
- * Description : 수술연동관련 컨트롤 바인딩 초기화
- * 마취종류(주/부) 바인딩
- * retrun type :
- ****************************************************************************************/
- function fInitAnstTypeCtrl_SMMMR00901() {
-
- var anstmthdcd = "";
- var mcdnm = "";
- var anstmthdcdsub = "";
- var scdnm = "";
- var node = "";
-
- //주마취
- var nRow = ds_main_extninfo_oprinfo.rowposition;
- anstmthdcd = ds_main_extninfo_oprinfo.getColumn(nRow, "anstmthdcd");
- mcdnm = ds_main_extninfo_oprinfo.getColumn(nRow, "anstmthdnm");
-
- if(parent.fGetFormRec("status") == "U"){
- //jw.choe U일 경우 상위 parent.ds_data_recitem 을 바라본다.
- /*
- node = model.instance1.selectSingleNode(gPageInfo.recItemRef2+"[degnitemlevlcd='0000248.0015528']");
- if (node != null) {
- anstmthdcd = node.getXPathString("rectermcd");
- mcdnm = node.getXPathString("rectermnm");
- }
- */
- var sDegnitemlevlcd = grup_base.ipt_mcdnm.degnitemlevlcd; //0000248.0015528
- if( !utlf_isNull(parent.ds_data_recitem.lookup("degnitemlevlcd", sDegnitemlevlcd, "rectermcd")) ){
- var nFindRow = parent.ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd);
- anstmthdcd = parent.ds_data_recitem.getColumn(nFindRow, "rectermcd");
- mcdnm = parent.ds_data_recitem.getColumn(nFindRow, "rectermnm");
- }
- }
-
- //부마취
- anstmthdcdsub = ds_main_extninfo_oprinfo.getColumn(nRow, "anstmthdcdsub");
- scdnm = ds_main_extninfo_oprinfo.getColumn(nRow, "anstmthdcdsubnm");
- if(parent.fGetFormRec("status") == "U"){
- //jw.choe U일 경우 상위 parent.ds_data_recitem 을 바라본다.
- /*
- node = model.instance1.selectSingleNode(gPageInfo.recItemRef2+"[degnitemlevlcd='0000248.0008458']");
- if (node != null) {
- anstmthdcdsub = node.getXPathString("rectermcd");
- scdnm = node.getXPathString("rectermnm");
- }
- */
- var sDegnitemlevlcd = grup_base.ipt_scdnm.degnitemlevlcd; //0000248.0008458
- if( !utlf_isNull(parent.ds_data_recitem.lookup("degnitemlevlcd", sDegnitemlevlcd, "rectermcd")) ){
- var nFindRow = parent.ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd);
- anstmthdcdsub = parent.ds_data_recitem.getColumn(nFindRow, "rectermcd");
- scdnm = parent.ds_data_recitem.getColumn(nFindRow, "rectermnm");
- }
-
- }
-
- //2010.01.18 dhkim - 마취바인딩 무조건 rectermcd, rectermnm으로 변경
- if(utlf_isNull(anstmthdcd)){
- anstmthdcd = "-";
- }
-
- if(utlf_isNull(anstmthdcdsub)){
- anstmthdcdsub = "-";
- }
-
- //주마취
- grup_base.ipt_mcdnm.value = mcdnm;
- var sDegnitemlevlcd = grup_base.ipt_mcdnm.degnitemlevlcd;
- var nFindRow = ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd);
- ds_data_recitem.setColumn(nFindRow, "rectermcd", anstmthdcd);
- ds_data_recitem.setColumn(nFindRow, "rectermnm", mcdnm);
-
- //부마취
- grup_base.ipt_scdnm.value = scdnm;
- var sDegnitemlevlcd = grup_base.ipt_scdnm.degnitemlevlcd;
- var nFindRow = ds_data_recitem.findRow("degnitemlevlcd", sDegnitemlevlcd);
- ds_data_recitem.setColumn(nFindRow, "rectermcd", anstmthdcdsub);
- ds_data_recitem.setColumn(nFindRow, "rectermnm", scdnm);
-
-
- }
- /****************************************************************************************
- * Function : fGetNursHardCdInfo_MMR00901
- * Description : 마취과코드조회(간호공통테이블에서조회)
- * retrun type :
- ****************************************************************************************/
- function fGetNursHardCdInfo_MMR00901(pCode, pDate){
-
- var sSendDsNm = dsf_createDsRow("ds_send_mmr00901", [{col: "cdgrupid", type:"string", size:256, val:pCode}
- , {col: "srchdd", type:"string", size:256, val:pDate}]);
- var objSendDS:Dataset = new Dataset;
- objSendDS = this.objects[sSendDsNm];
-
- var sRtnDsNm = dsf_createDs("ds_code_mmr00901", [{col: "cdgrupid", type:"string", size:256}
- , {col: "cdid", type:"string", size:256}
- , {col: "cdnm", type:"string", size:256}
- , {col: "grupdetldesc", type:"string", size:256}
- , {col: "supcdid", type:"string", size:256}]);
- var objRtnDS:Dataset = new Dataset;
- objRtnDS = this.objects[sRtnDsNm];
-
- var oParam = {};
- oParam.id = "TRMMR00902";
- oParam.service = "wardcareapp.WardCareMngt";
- oParam.method = "reqGetNursHardCdInfo";
- oParam.inds = "req="+sSendDsNm;
- oParam.outds = sRtnDsNm+"=codelist";
- oParam.async = false;
- oParam.progress = false;
- oParam.callback = "cf_TRMMR00902";
- tranf_submit(oParam);
- }
-
- function cf_TRMMR00902(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- }
- /****************************************************************************************
- * Function : fChkPreSave
- * Description : 2010.01.25 dhkim - 추가) 저장전 체크 로직
- * retrun type :
- ****************************************************************************************/
- function fChkPreSave()
- {
- //특이사항 여부 관련 체크
- if (grup_base.radio3.value == "0001347001" && !utlf_isNull(grup_base.tar_0001115001.value)) {
- sysf_messageBox("특이사항 여부가 [N] 으로 체크되었지만 특이사항이 입력되었습니다","E");
- return false;
- }
- if (grup_base.radio3.value == "0001965001" && utlf_isNull(grup_base.tar_0001115001.value)) {
- sysf_messageBox("특이사항 여부가 [Y] 으로 체크되었지만 특이사항이 없습니다","E");
- return false;
- }
- }
- /****************************************************************************************
- * Function : lf_initForm
- * Description : fOnLoadComplete 완료 시 실행되는 부분
- * retrun type :
- ****************************************************************************************/
- function lf_initForm(){
- if (parent.fGetFormRec("status") == "C")
- {
- fClearComnFormData();
-
- }
- if (parent.fGetFormRec("status") == "C")
- {
-
- var node = sysf_getGlobalVariable("paminfo");
- if(!utlf_isNull(node))
- {
- var sPamDsNm = dsf_createDs("ds_main_paminfo", [{col:"pid", type:"string", size:256}]);
- var objPamDs:Dataset = new Dataset;
- objPamDs = this.objects[sPamDsNm];
-
- dsf_setCSVToDs("ds_main_paminfo", node);
-
- var ordtype = objPamDs.getColumn(0, "ioflag");
-
- if(ordtype != "D")
- {
- sysf_messageBox("해당환자는 DSC가 아닌", "I005");
- grup_base.enable = false;
- fBtnDisEnable(true);
- return;
- }
- else
- {
- if(utlf_isNull(oprsrvno))
- {
- sysf_messageBox("수술예약이 되지 않은 환자이거나 수술탭에서 선택하지 않은", "I005");
- grup_base.enable = false;
- fBtnDisEnable(true);
- return;
- } else {
- fBtnDisEnable(false);
- }
- }
- }
-
-
- parent.fSetFormRec("extnflag", "opr");
- parent.fSetFormRec("oprsrvno", oprsrvno);
-
- //서식 로딩 후 포커스 처리(2008-11-18 박종훈)
- SetDefFocusIVW(gItemCdsTextArea);
-
- }
- if(parent.fGetFormRec("status") == "U"){
-
- //jw.choe 주석처리
-
- /*
- //마취정보세팅
- 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();
-
- */
- //버튼세팅
- if(parent.fCheckSaveDept()){
- grup_base.enable = true;
- fBtnDisEnable(false);
- }
- else{
- sysf_messageBox("타과에서 작성된 DSC기록은 수정", "E001");
- grup_base.enable = false;
- fBtnDisEnable(true);
- }
- }
- }
- ]]></Script>
|