123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230 |
- <?xml version="1.0" encoding="utf-8"?>
- <Script type="xscript4.0"><![CDATA[/**
- * MMR00903.js
- * SMMMR00903_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 opinfo = sysf_getGlobalVariable("operation");
-
-
- if (!utlf_isNull(opinfo)) {
- 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", "JCI");
-
- 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>
|