123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949 |
- <?xml version="1.0" encoding="utf-8"?>
- <Script type="xscript4.0"><![CDATA[ /**
- * MMR01102.js
- * SMMMR01102_PostOpNote.xrw
- * 20141125 이윤주
- * -> 시술기록 신규 로딩할때에 brief 기록이 있으면 디폴트로 brief기록을 조회해옴(asis는 시술간호정보를 로딩했음)
- */
- //부분서식의 부모아이템 배열
- //0000512001
- var arrItemCds = new Array("0000515001" //시술일
- , "0007983001" //시술전진단명
- , "0000521001" //시술후진단명
- , "0000509001" //시술(시술)명
- , "0012039001"
- );
- var gItemCds = new Array("0007983001", "0000521001", "0000509001", "0012039001");
- var gItemCdsTextArea = new Array("0012039001");
- var gItemCdsXRWArea = new Array("0007983001", "0000521001", "0000509001");
- //부분서식의 개수만큼 일단 '0'으로 채운다.
- var gPageIdx = new Array(0, 0);
- var iSurg = grup_base.ipt_surg.degnitemlevlcd;
- var oprsrvno = ""; //시술예약번호
- var perfdeptcd = ""; //집도과
- 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);
-
- //2010.01.20 dhkim -권한체크로 리턴값 추가
- if(!fInitialize()){
- return false;
- }
-
- if (parent.fGetFormRec("status") == "C")
- {
- var rtn = 'true';
- if(!rtn)
- {
- fBtnDisEnable(true);
- return "oprfalse";
- } else {
- }
- }
-
- //포커스 처리
- SetDefFocusIVW(gItemCdsTextArea);
- return true;
- }
- /****************************************************************************************
- * Function : fLoadData
- * Description : 기록데이터 조회
- * retrun type :
- ****************************************************************************************/
- function fLoadData()
- {
- //2010.01.20 dhkim -권한체크로 리턴값 추가
- if(!fInitialize()){
- return false;
- }
-
- 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");
-
- return true;//2010.01.21 dhkim - 리턴값 추가(blocking 메세지후 리턴)
- }
- /****************************************************************************************
- * Function : fInitialize
- * Description : 화면 초기화
- * retrun type : true / false
- * History : 2010.01.20 dhkim - 리턴값 추가
- ****************************************************************************************/
- function fInitialize()
- {
- //2010.01.18 dhkim - 작성권한 체크(시술예약번호, 집도과체크)->기존기능임
- var glv_Operation = utlf_transNullToEmpty(sysf_getGlobalVariable("operation"));
- var operation = glv_Operation.split("▩")[1];
-
- if(!utlf_isNull(operation)){
- oprsrvno = operation.split("▦")[0];
- perfdeptcd = operation.split("▦")[10];
- }
-
- if (parent.fGetFormRec("status") == "C")
- {
- if( grup_base.ivw_0007983001.isValidObject("ds_data_diagcdlist") ){
- grup_base.ivw_0007983001.ds_data_diagcdlist.clearData();
- }
- }
- //그리드 top, hei확장값 세팅
- gTermViewTopPos = 29;
- gTermViewHei = 152;
- gTermViewItems = gItemCdsXRWArea;
-
- grup_base.ipt_surg.enable = false;
- return true;
- }
- /****************************************************************************************
- * Function : fChngDoct
- * Description : 의사 선택에 따른 reccnts셋팅
- ****************************************************************************************/
- 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 : 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);
- }
-
- ds_data_recitem.setColumn(nFindRow, "rectermcd", e.postvalue);
- ds_data_recitem.setColumn(nFindRow, "rectermnm", e.posttext);
- }
- /****************************************************************************************
- * Function : fPatientHist
- * Description : 시술이력 팝업
- * retrun type :
- ****************************************************************************************/
- function fPatientHist()
- {
- frmf_modal("SMMMO02500", "SMMMO02500", null, null, null, null, null, null, null, null, null, null, "M");
- }
- /**
- * @desc : 기록 인스턴스 연결
- * @
- * @param :
- * @return :
- * @authur : 박종훈
- */
- function fSetRecItemValue(reciteminfo)
- {
- return SetCommMediFormValue(gItemCds, reciteminfo);
- }
- /**
- * @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);//TRMRF04001 : (oprd, anst) 시술진단조회, 마취주부
- 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");
-
- return true;
- }else{
- return false;
- }
- }
- /****************************************************************************************
- * Function : fSetSizeFormDiag
- * Description : 시술전 진단명 사이즈 조절
- * 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", "시술전 진단명(Free text)");
- }
- /****************************************************************************************
- * 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 : 서식 시술명 사이즈 조절
- * 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_0012039001", "grup_base.tar_0012039001");
- //20080702 박종훈 추가
- InitBtnImge(gItemCdsTextArea);
- InitBtnEtcRec(gItemCdsTextArea);
- // InitBtnComn(gItemCdsTextArea);
-
- // dispOnLoadComplete(COMN_FORM);
- // lf_checkUnitForm(gItemCds); // 부분서식 로딩
- lf_AllLoadUnitFormExpand(gItemCds); // 전체 로드
-
- //2010.01.25, hkjoo
- // initCmbExtnList(gItemCds);
-
- // fonloadcomplete
- if (parent.fGetFormRec("status") == "C")
- {
- if(!fClearComnFormData()){
- return false;
- }
- }
- else if (parent.fGetFormRec("status") == "U")
- {
- fCosignCheck();
- }
-
- 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")
- {
- if(!fClearComnFormData()){
- return false;
- }
- }
- else if (parent.fGetFormRec("status") == "U")
- {
- fCosignCheck();
- }
- }
- gLoadFormCnts++;
- utlf_addLog("@@@@@ gItemCds.length : " + gItemCds.length + " gLoadFormCnts : " + gLoadFormCnts );
- if(gItemCds.length == gLoadFormCnts)
- {
- if (parent.fGetFormRec("status") == "U")
- {
- }
-
- dispOnLoadComplete(UNIT_FORM);//COMN_FORM = 1, UNIT_FORM = 2, GENL_FORM = 3
- //서식 로딩 후 포커스 처리(2008-11-18 박종훈)
- SetDefFocusIVW(gItemCdsTextArea);
- }
- }
- /****************************************************************************************
- * 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];
- }
-
- dispOnLoadComplete(UNIT_FORM);//COMN_FORM = 1, UNIT_FORM = 2, GENL_FORM = 3
- }
- /****************************************************************************************
- * Function : fBtnDisEnable()
- * Description : 저장버튼 Disable
- * retrun type :
- ****************************************************************************************/
- function fBtnDisEnable(flag)
- {
- if(flag)
- {
- parent.fDisalbeSave(flag);
- }
- else
- {
- parent.fDisalbeSave(flag);
- }
- }
- /****************************************************************************************
- * Function : fCosignCheck()
- * Description : 코사인버튼처리
- * retrun type :
- * History : 2010.04.20 dhkim 스탭권한체크 서브미션 TRMMR01302로 변경(unpreplib호출로 통합)
- ****************************************************************************************/
- function fCosignCheck()
- {
- //2010.04.20 dhkim 스탭권한체크 서브미션 TRMMR01302로 변경(unpreplib호출로 통합)
- //이전의 TRMMR00802 호출부분은 주석처리함.
- if (parent.fGetFormRec("status") == "U" && parent.fGetFormRec("espiyn") == "Y")
- {
- ds_send_extninfo.clearData();
- var nRow = ds_send_extninfo.addRow();
- ds_send_extninfo.setColumn(nRow, "infoflag", "staffauth");
- ds_send_extninfo.setColumn(nRow, "formrecseq", parent.fGetFormRec("formrecseq"));
-
- 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 nRow = ds_main_extninfo_staffauthinfo.rowposition;
- var authyn = ds_main_extninfo_staffauthinfo.getColumn(nRow, "authyn");
- if(authyn == "Y")
- {
- //인증저장버튼과 코사인버튼처리
- parent.grup_btn.btn_cosign.position.left = parent.grup_btn.btn_signsave.position.left;
- parent.grup_btn.btn_signsave.visible = false;
- parent.grup_btn.btn_cosign.visible = true;
- //임시저장버튼과 기록반려버튼처리
- parent.grup_btn.btn_resend.position.left = parent.grup_btn.btn_tmpsave.position.left;
- parent.grup_btn.btn_tmpsave.visible = false;
- parent.grup_btn.btn_resend.visible = true;
-
- //기타버튼 disable처리
- parent.grup_btn.btn_init.enable = false;
- parent.grup_btn.btn_preview.enable = false;
- parent.grup_btn.btn_signsaveasnew.enable = false;
- parent.grup_btn.btn_del.enable = false;
-
- if (parent.fGetFormRec("cosign") == "Y")
- {
- parent.grup_btn.btn_cosign.enable = false;
- grup_base.enable = false;
- }
- else
- {
- parent.grup_btn.btn_cosign.enable = true;
- grup_base.enable = true;
- }
- }
- else
- {
- //인증저장버튼과 코사인버튼처리
- parent.grup_btn.btn_signsave.visible = true;
- parent.grup_btn.btn_cosign.visible = false;
- //임시저장버튼과 기록반려버튼처리
- parent.grup_btn.btn_tmpsave.visible = true;
- parent.grup_btn.btn_resend.visible = false;
-
- //기타버튼 disable처리
- parent.grup_btn.btn_init.enable = true;
- parent.grup_btn.btn_preview.enable = true;
- parent.grup_btn.btn_signsaveasnew.enable = true;
- parent.grup_btn.btn_del.enable = true;
- }
- }
- }
- }
- 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 : fDefInfo_MMR00601()
- * Description : 시술에 대한 기본 정보 조회
- * retrun type :
- ****************************************************************************************/
- function fDefInfo_MMR00601()
- {
- return;//2010.01..18 dhkim 사용안함
- }
- /****************************************************************************************
- * Function : fSetOprRecIf_MMR00601()
- * Description : 시술기록 인터페이스 내용 셋팅
- * retrun type :
- ****************************************************************************************/
- function fSetOprRecIf_MMR00601()
- {
- return; //2010.01.18 dhkim 사용안함
- }
- /**
- * @group :
- * @ver : 2009.01.05
- * @by : jonghun
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 서식 로딩 완료 후 시술 예약번호 유무에 따라 서식 내용 셋팅
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetOprInfo_MMR00601()
- {
- if (parent.window.javascript.fGetFormRec("status") == "C")
- {
- var dschdd = parent.window.javascript.fGetPamInfo("dschdd");
-
- if (dschdd == "" || dschdd == "-")
- {
- dschdd = "99991231";
- }
-
- model.makeValue("/root/send/oprinfo/pid", parent.window.javascript.fGetPamInfo("pid"));
- model.makeValue("/root/send/oprinfo/indd", parent.window.javascript.fGetPamInfo("indd"));
- model.makeValue("/root/send/oprinfo/dschdd", dschdd);
-
- //TRMMR01002 : (oprs, opcr)시술확정일자, 시술명, 과 -->콤보에 세팅
- if (submit("TRMMR01002")) //시술 이력 조회
- {
- var nodeList = model.instances(0).selectNodes("/root/init/oprlist/oplist");
-
- if (oprsrvno != "")
- {
- parent.window.javascript.fSetFormRec("oprsrvno", oprsrvno);
- model.makeValue("/root/send/reqinfstrec/pid", parent.window.javascript.fGetPamInfo("pid"));
- model.makeValue("/root/send/reqinfstrec/orddd", parent.window.javascript.fGetPamInfo("indd"));
- model.makeValue("/root/send/reqinfstrec/cretno", parent.window.javascript.fGetPamInfo("cretno"));
- model.makeValue("/root/send/reqinfstrec/oprsrvno", oprsrvno);
-
- //TRMMR01003 : (oprd, anst)시술진단조회,마취주부
- if (submit("TRMMR01003")) //시술 예약번호에 따른 시술기록지 기록내용 조회
- {
- var nodeList1 = model.instances(0).selectNodes("/root/main/infstrec/recitem");
-
- //해당 시술건에 대한 시술기록 유무에 따른 분기
- if (nodeList1.length > 0)
- {
- fSetOprRecIf_MMR00601();
- }
- else
- {
- fDefInfo_MMR00601(); //시술기록이 없을경우 디폴트 정보 조회
- }
- }
- }
- else if(nodeList.length == 1)
- {
- var opsrvno = model.getValue("/root/init/oprlist/oplist/oprsrvno");
-
- if (opsrvno != "" && opsrvno != "-")
- {
- parent.window.javascript.fSetFormRec("oprsrvno", opsrvno);
- model.makeValue("/root/send/reqinfstrec/pid", parent.window.javascript.fGetPamInfo("pid"));
- model.makeValue("/root/send/reqinfstrec/orddd", parent.window.javascript.fGetPamInfo("indd"));
- model.makeValue("/root/send/reqinfstrec/cretno", parent.window.javascript.fGetPamInfo("cretno"));
- model.makeValue("/root/send/reqinfstrec/oprsrvno", opsrvno);
-
- //TRMMR01003 : (oprd, anst)시술진단조회,마취주부
- if (submit("TRMMR01003")) //시술 예약번호에 따른 시술기록지 기록내용 조회
- {
- var nodeList2 = model.instances(0).selectNodes("/root/main/infstrec/recitem");
-
- //해당 시술건에 대한 시술기록 유무에 따른 분기
- if (nodeList2.length > 0)
- {
- fSetOprRecIf_MMR00601();
- }
- else
- {
- fDefInfo_MMR00601(); //시술기록이 없을경우 디폴트 정보 조회
- }
- }
- }
-
- }
- else
- {
- var curdd = getCurrentDate();
- model.setValue(pageInfo.recItemRef + "[degnitemlevlcd=0000515]/reccnts", curdd);
- }
- }
- }
- }
- /****************************************************************************************
- * Function : getSubmitID_MMR01300I
- * Description : MMR01300.js에서 submit직전에 submitID를 설정하기 위해서 호출한다.
- * retrun type :
- ****************************************************************************************/
- function getSubmitID_MMR01300I(flag) {
- //2010.02.23 dhkim - 통합기록조회용 JCI구분자추가(fSetXsltFlag없애고 getSubmitID_MMR01300I로 이동)
- parent.fSetFormRec("xsltflag", "JCI");
- //2010.03.12 안치원 - 수정없이 staff-sign할때 xsltflag가 들어가지 않는 오류수정
- if (utlf_isNull(flag)) {
- parent.fSetFormRec("extnflag", "opr");
- parent.fSetFormRec("addexecflag", "cosign");
-
- return TX_SUBMIT_EXTN_FORM;
- }
- }
-
- function fSetOpInfo_SMMMR00601() {
-
- }
- /****************************************************************************************
- * Function : fCosignCheck_SMMMR00601
- * Description : staff-sign 버튼을 설정한다.
- * retrun type :
- ****************************************************************************************/
- function fCosignCheck_SMMMR00601() {
-
- if (parent.fGetFormRec("formrecdeptcd") == sysf_getUserInfo("dutplcecd")) {
-
- if (parent.fGetFormRec("espiyn") == "Y") {
-
- var authyn = ds_main_extninfo_staffauthinfo.getColumn(0, "authyn");
- var cosign = parent.fGetFormRec("cosign");
-
- utlf_addLog("authyn :"+authyn + "cosign :"+cosign );
- utlf_addLog("authyn getFormrec:"+parent.fGetFormRec("authyn"));
-
- if (cosign == "Y") {
- if (parent.fGetFormRec("cosignid") == sysf_getUserId()) {
- if (parent.fGetFormRec("formrecuserid") == sysf_getUserId()) {
- //staff이 신규작성하여 sign된 경우 수정모드
- // [요청번호:20180712032] 입퇴원요약기록, 수술기록의 STAFF SIGN 관련건 수정모드 -> 싸인모드
- parent.initButtonLayer_MMR01100("staff_auth_y");
- } else {
- //전공의가 신규작성하여 staff이 sign한 경우 싸인모드
- parent.initButtonLayer_MMR01100("staff_auth_y");
- }
- } else {
- //staff sign이후이므로 staff이외에는 수정불가
- parent.initButtonLayer_MMR01100("no_auth");
- }
- } else {
- if (authyn == "Y") {
- //전공의 신규작성후에 staff이 수정모드로 열었으므로, 싸인모드
- parent.initButtonLayer_MMR01100("staff_auth_y");
- } else {
- //수정모드
- parent.initButtonLayer_MMR01100("staff_auth_n");
- }
- }
-
- } else {
- //수정모드
- parent.initButtonLayer_MMR01100("staff_auth_n");
- }
-
- } else {
- parent.initButtonLayer_MMR01100("no_auth");
- }
- }
-
- /**
- * @desc : 보조의combo노드에 none을 추가한다.
- * @
- * @param :
- * @return :
- * @authur : dhkim 20091228
- */
- function fMakeNodeSdt_MMR00601(nodeset){
-
- ///root/init/drlist0000341.0001830/usercombo
- var sdtNodeCnt = getNodesetCount(nodeset);
- if(sdtNodeCnt > 0){
- model.makeValue(nodeset+"["+sdtNodeCnt+"]/userid", "none");
- model.makeValue(nodeset+"["+sdtNodeCnt+"]/usernm", "없음");
- model.makeValue(nodeset+"["+sdtNodeCnt+"]/mpphonno", "");
- model.makeValue(nodeset+"["+sdtNodeCnt+"]/refseq", "C");
-
- }
-
- model.refresh();
-
-
- }
- /****************************************************************************************
- * Function : initFormAtLast_MMR01100I
- * Description : MMR01100.js에서 서식load를 완료한 후에 호출한다.
- * retrun type :
- ****************************************************************************************/
- function initFormAtLast_MMR01100I() {
-
- var formcd = parent.fGetFormMast("formcd");
-
- if (parent.fGetFormRec("status") == "C") {
-
- //20141211 이윤주
- if(!fGetRecIfData_MMR00601("recdata")){
- return false;
- }
-
- this.setTimer( 1102, 2000 );
- //if (grup_base.ivw_0007983001.ds_grid_grd_diaglist.getRowCount() == 0){
- // if(!fGetRecIfData_MMR00601("sisuldiag")){
- // return false;
- // }
- //}
-
- } else {
-
- ds_send_reqinfstrec.setColumn(0, "oprsrvno", parent.fGetFormRec("oprsrvno"));
- grup_base.cmb_oplist.enable = false;
-
- fCosignCheck_SMMMR00601();
- }
-
- return true;
- }
- /****************************************************************************************
- * Function : fChngOpList_MMR00601
- * Description : 시술리스트 콤보선택시 시술번호로 Brief OP Note를 찾아 설정한다.
- * 신규서식일때만 수행하도록 한다.
- * retrun type :
- ****************************************************************************************/
- function fChngOpList_MMR00601()
- {
- if (parent.fGetFormRec("status") == "C") {
- var v_oprsrvno = grup_base.cmb_oplist.value;//ds_send_reqinfstrec.getColumn(0, "oprsrvno");
- if (!utlf_isNull(v_oprsrvno)) {
- //model.removenodeset("/root/init/extninfo/oplistinfo[oprsrvno = '']");
- parent.fSetFormRec("oprsrvno", v_oprsrvno);
-
- //2010.01.21 dhkim - 리턴값 추가(blocking 메세지후 리턴)
- //2010.01.29 dhkim - 시술기록JCI Staff-Sign 막음.
- //2010.02.09 dhkim- 시술기록JCI Staff-Sign 주석해제.
- if(!fGetRecIfData_MMR00601("drlist;opr;recdata;staffauth")){
- return false;
- }
- fCosignCheck_SMMMR00601();
- }
- }
-
- return true;//2010.01.21 dhkim - 리턴값 추가(blocking 메세지후 리턴)
- }
- /****************************************************************************************
- * Function : fGetRecIfData_MMR00601
- * Description : 시술 후 기록의 Data를 설정한다.
- * retrun type :
- ****************************************************************************************/
- function fGetRecIfData_MMR00601(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, "orddd", parent.fGetFormRec("orddd"));
- ds_send_extninfo.setColumn(nRow, "cretno", parent.fGetFormRec("cretno"));
- ds_send_extninfo.setColumn(nRow, "fromsrcformcd", "1000000001"); //시술기록의 기본서식코드
- ds_send_extninfo.setColumn(nRow, "toformcd", parent.fGetFormMast("formcd"));
- ds_send_extninfo.setColumn(nRow, "srcformcd", parent.fGetFormRec("srcformcd"));
- ds_send_extninfo.setColumn(nRow, "formrecdd", parent.fGetFormRec("formrecdd"));
-
- ds_send_extninfo.setColumn(nRow, "indd", ds_send_extninfo.getColumn(0, "orddd"));
-
- ds_send_extninfo.setColumn(nRow, "standd", parent.fGetFormRec("formrecdd"));
- ds_send_extninfo.setColumn(nRow, "deptcd", parent.fGetFormRec("formrecdeptcd"));
- ds_send_extninfo.setColumn(nRow, "jobkindcd", "0330");
- ds_send_extninfo.setColumn(nRow, "orddeptcd", parent.fGetPamInfo("orddeptcd"));
-
- //2010.02.22 dhkim 추가
- ds_send_extninfo.setColumn(nRow, "formrecseq", parent.fGetFormRec("formrecseq"));
-
- dsf_setDefaultVal(ds_send_extninfo, "dschdd:99991231");
-
- lf_clearExtninfo();
-
- 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");
- utlf_addLog(" fGetRecIfData_MMR00601 execInfoFlag : " + execInfoFlag );
-
- //2010.01.15 dhkim - 시술전 진단명, 시술후 진단명 추가
- if (execInfoFlag.indexOf("sisuldiag;") != -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();
- }
-
- //2010.05.19 김달현 - recdata, opr, opdiag 분기순서변경
- //alert("execInfoFlag : " + execInfoFlag);
- if (execInfoFlag.indexOf("recdata;") != -1) {
- if( lodedYn == true ){
- ClearComnFormData(gItemCds);
- }
- /* jw.choe 임시 주석
- //Copy Of Brief OP Note
- copyNodeset(gPageInfo.recItemRef2, "/root/main/extninfo/recitem", "replace", model, model);
-
- //2010.01.21 dhkim - 리턴값 추가(blocking 메세지후 리턴)
- if(!fLoadData()){
- return false;
- }
- */
- fSetCopyRecData();
- }
- else
- {
- lodedYn = true; // 로드 시점 처리
- return false;
- }
- var sStatus = fGetFormRec("status");
- lf_setBasicInfo(sStatus); //시술 정보 기록데이터 세팅
-
- lodedYn = true; // 로드 시점 처리
-
- //2010.01.21 dhkim - 리턴값 추가(blocking 메세지후 리턴)
- return true;
- }
- }
- /****************************************************************************************
- * Function : fSetCopyRecData
- * Description : BriefOpNote 정보 연계
- * retrun type :
- ****************************************************************************************/
- function fSetCopyRecData()
- {
- utlf_addLog(" fGetFormRec(status) : " + fGetFormRec("status") + "\n\n" + ds_main_extninfo_recitem.saveXML() );
- if(fGetFormRec("status") == "C")
- {
- var fstlevlitemcd = "";
- var degnitemcd = "";
- var reccnts = "";
- var degnitemkind = "";
- var sRow = "";
- // 1계층 MTX값 세팅, 조회해온 기록값 rowcount 만큼 루프
- for(var i = 0; i < ds_main_extninfo_recitem.rowcount; i++)
- {
- fstlevlitemcd = ds_main_extninfo_recitem.getColumn(i, "fstlevlitemcd");
- degnitemcd = ds_main_extninfo_recitem.getColumn(i, "degnitemcd");
- reccnts = ds_main_extninfo_recitem.getColumn(i, "reccnts");
- degnitemkind = ds_main_extninfo_recitem.getColumn(i, "degnitemkind");
- // 최상위 아이템이고 1계층 MTX 값이 있으면 세팅
- // 부분서식은 각자 onload 시 기록데이터 세팅
- if( (fstlevlitemcd == degnitemcd) && !utlf_isNull(reccnts))
- {
- sRow = ds_data_recitem.findRowExpr("fstlevlitemcd == '"+ fstlevlitemcd +"' && degnitemcd == '"+ degnitemcd +"' && degnitemkind == 'MTX'");
- ds_data_recitem.setColumn(sRow, "reccnts", reccnts);
- var tarObj = ComnFormObj.components["tar_" + fstlevlitemcd];
- if(tarObj != null)
- tarObj.value = reccnts;
- }
-
- // Grid 설정
- if( degnitemkind == "DGN" || degnitemkind == "OPN" ){
- var grdObj = grup_base.components["ivw_" + fstlevlitemcd ];
- if( lodedYn == true && !utlf_isNull(grdObj) && !utlf_isNull(grdObj.url) ){
- grdObj.lf_setGridModify(fstlevlitemcd, "N");
- }
- }
- }
- }
- }
- ]]></Script>
|