123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945 |
- //부분서식의 부모아이템 배열
- var gItemCds = new Array("0007983001", "0000521001", "0000509001", "0000512001", "0000507001");
- var gItemCdsTextArea = new Array("0000512001", "0000507001");
- var gItemCdsXRWArea = new Array("0007983001", "0000521001", "0000509001");
- //부분서식의 개수만큼 일단 '0'으로 채운다.
- var gPageIdx = new Array(0, 0);
- var iSurg = ipt_surg.attribute("degnitemlevlcd");
- var operation = getGlobalVariable("operation").split("▩")[1];
- var instance = document.models(0).instances(0);
- var pageInfo = new PAGEINFO();
- var oprsrvno = ""; //수술예약번호
- var perfdeptcd = ""; //집도과
- if(operation != null && operation != ""){
- oprsrvno = operation.split("▦")[0];
- perfdeptcd = operation.split("▦")[10];
- }
- /**
- * @desc : 확장버튼(이미지,가계도,추가기록)을 기록여부에 따라 표시를 위한 버튼목록
- * @id :
- * @authur : 안치원
- * @history : 2009.09.09 신규 안치원 ACW_090909A
- */
- var gExtnBtnIds = new Array("btn_imge_0000512001", "btn_etcrec_0000512001",
- "btn_imge_0000507001", "btn_etcrec_0000507001");
- /**
- * @desc : 서식 데이터 Clear, 인터페이스 입력값 조회 입력
- * @id :
- * @event : xforms-ready
- * @return : void
- * @authur : 박종훈
- */
- function fClearComnFormData()
- {
- if (gMaxSectionID != "")
- {
- var MaxObj = document.controls("lbl_" + gMaxSectionID);
- MaxObj.dispatch("onclick");
- }
-
- ClearComnFormData(gItemCds);
- fInitialize();
-
- if (parent.window.javascript.fGetFormRec("status") == "C")
- {
- fSetOprInfo();
- }
-
- //포커스 처리
- SetDefFocusIVW(gItemCdsTextArea);
- //parent.window.javascript.fSetFormRec("extnflag", "opr");
- //parent.window.javascript.fSetFormRec("oprsrvno", oprsrvno);
- }
- /**
- * @desc : 기록데이터 조회
- * @id :
- * @event : xforms-ready
- * @return : void
- * @authur : 박종훈
- */
- function fLoadData()
- {
- fInitialize();
- //Program 서식 데이터 조회반영
- InitPgmFormData();
- this.recRef2 = "/root/hidden/recinfo"
- //부분서식 데이터 조회 반영
- InitUnitFormData(gItemCds);
- //parent.window.javascript.gSubmitID = TX_SUBMIT_EXTN_FORM;
- //parent.window.javascript.fSetFormRec("extnflag", "opr");
- //parent.window.javascript.fSetFormRec("oprsrvno", oprsrvno);
- }
- /**
- * @desc : 화면 초기화
- * @
- * @param :
- * @return :
- * @authur : 박종훈
- */
- function fInitialize()
- {
- ivw_0007983001.attribute("border-style") = "none";
- ivw_0000521001.attribute("border-style") = "none";
- ivw_0000509001.attribute("border-style") = "none";
- gTermViewTopPos = 29;
- gTermViewHei = 152;
- gTermViewItems = gItemCdsXRWArea;
- //fRadioYN();
- model.refresh();
- }
- /**
- * @desc : 수술이력 팝업
- * @
- * @param :
- * @return :
- * @authur : 박종훈
- */
- function fPatientHist()
- {
- modal("SMMMO02500");
- }
- /**
- * @desc : 기록 인스턴스 연결
- * @
- * @param :
- * @return :
- * @authur : 박종훈
- */
- function fSetRecItemValue(reciteminfo)
- {
- return SetCommMediFormValue(gItemCds, reciteminfo);
- }
- /**
- * @desc : 수술전 진단명 사이즈 조절
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetSizeFormDiag()
- {
- ivw_0007983001.window.javascript.fInitPage(false, parseInt(ivw_0007983001.attribute("height")), parseInt(ivw_0007983001.attribute("width")), "ivw_0007983001", "수술전 진단명(Free text)");
- //ivw_0000521001.window.javascript.fInitPage(false, parseInt(ivw_0000521001.attribute("height")), parseInt(ivw_0000521001.attribute("width")), "ivw_0000521001", "수술후 진단명");
- }
- /**
- * @desc : 수술후 진단명 사이즈 조절
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetSizeFormDiag1()
- {
- //ivw_0007983001.window.javascript.fInitPage(false, parseInt(ivw_0007983001.attribute("height")), parseInt(ivw_0007983001.attribute("width")), "ivw_0007983001", "수술전 진단명");
- ivw_0000521001.window.javascript.fInitPage(false, parseInt(ivw_0000521001.attribute("height")), parseInt(ivw_0000521001.attribute("width")), "ivw_0000521001", "수술후 진단명(Free text)");
- }
- /**
- * @desc : 서식 수술명 사이즈 조절
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetSizeFormOpr()
- {
- //fFormReady();
- ivw_0000509001.window.javascript.fInitPage(false, parseInt(ivw_0000509001.attribute("height")), parseInt(ivw_0000509001.attribute("width")), "ivw_0000509001");
- }
- /*****************************************************************************
- 튜닝
- ******************************************************************************/
- var gLoadFormCnts = 0;
- /**
- * @group :
- * @ver : 2008.06.13
- * @by : snoweye
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 화면 로딩후 초기화 작업 수행
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fFormReady()
- {
- grup_base.attribute("border-style") = "none";
- setSectionSize(gItemCds, 335, 350);
- //20080702 박종훈 추가
- fInitialize();
- InitBtnImge(gItemCdsTextArea);
- InitBtnEtcRec(gItemCdsTextArea);
- InitBtnComn(gItemCdsTextArea);
- dispOnLoadComplete(COMN_FORM);
-
- if (parent.window.javascript.fGetFormRec("status") == "C")
- {
- //parent.window.javascript.fSetFormRec("extnflag", "opr");
- parent.window.javascript.fSetFormRec("oprsrvno", oprsrvno);
- }
- }
- /**
- * @group :
- * @ver : 2008.06.13
- * @by : snoweye
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 부분서식 로딩
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fLoadUnitForm()
- {
- initSection(gItemCds);
- }
- var diagcnt = 0;
- /**
- * @group :
- * @ver : 2008.06.13
- * @by : snoweye
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 부분서식 로딩후 후처리
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fOnLoadComplete()
- {
- var rtn = false;
- var curLoadFormCd = getParameter("loadformcd");
- setParameter("loadformcd", "");
- var fstLevlItemCd = model.getValue(gPageInfo.forminfoRef + "/unitformmast[formcd='" + curLoadFormCd + "' and loaded != 'true']/orgsupdegnitemcd");
- var ivwObj = document.controls("ivw_" + fstLevlItemCd);
- var unitformload = model.getValue(gPageInfo.forminfoRef + "/unitformmast[formcd='" + curLoadFormCd + "' and loaded != 'true']/loaded");
-
- if(ivwObj != null && unitformload != "true")
- {
- //ivwObj.window.javascript.setFstLevlItemCd(fstLevlItemCd);
- setFstLevlItemCd(ivwObj, curLoadFormCd);
- model.setValue(gPageInfo.forminfoRef + "/unitformmast[formcd='" + curLoadFormCd + "']/loaded", "true");
- }
- //수술전진단명 부분서식 로딩후 처리
- if(fstLevlItemCd == '0007983001')
- {
- fSetSizeFormDiag();
- }
- //수술후진단명 부분서식 로딩후 처리
- if(fstLevlItemCd == '0000521001')
- {
- fSetSizeFormDiag1();
-
- if (parent.window.javascript.fGetFormRec("status") == "C")
- {
- //rtn = fGetdiagFormOprsrvno(oprsrvno, iMcdnm, iMcdnm, iScdnm, iScdnm); //수술예약번호로 진단명 조회
- }
- }
- //수술명 부분서식 로딩후 처리
- if(fstLevlItemCd == '0000509001')
- {
- fSetSizeFormOpr();
-
- if (parent.window.javascript.fGetFormRec("status") == "C")
- {
- //fSrchOprPerfDrlist(oprsrvno, cOdt1); //환자정보로 수술명, 집도의 조회
- //fClearComnFormData();
- }
- }
- gLoadFormCnts++;
- if(gItemCds.length == gLoadFormCnts)
- {
- fSetOprInfo();
- dispOnLoadComplete(UNIT_FORM);
-
- //서식 로딩 후 포커스 처리(2008-11-18 박종훈)
- SetDefFocusIVW(gItemCdsTextArea);
-
-
- }
- }
- /**
- * @group :
- * @ver : 2009.01.05
- * @by : jonghun
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 서식 로딩 완료 후 수술 예약번호 유무에 따라 서식 내용 셋팅
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetOprInfo()
- {
- 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);
-
- if (submit("TRMMR01002")) //수술 이력 조회
- {
- var nodeList = model.instances(0).selectNodes("/root/init/oprlist/oplist");
- ipt_surg.disabled = true;
- 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);
-
- if (submit("TRMMR01003")) //수술 예약번호에 따른 수술기록지 기록내용 조회
- {
- var nodeList1 = model.instances(0).selectNodes("/root/main/infstrec/recitem");
-
- //해당 수술건에 대한 수술기록 유무에 따른 분기
- if (nodeList1.length > 0)
- {
- fSetOprRecIf();
- }
- else
- {
- fDefInfo(); //수술기록이 없을경우 디폴트 정보 조회
- }
- }
- }
- 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);
-
- if (submit("TRMMR01003")) //수술 예약번호에 따른 수술기록지 기록내용 조회
- {
- var nodeList2 = model.instances(0).selectNodes("/root/main/infstrec/recitem");
-
- //해당 수술건에 대한 수술기록 유무에 따른 분기
- if (nodeList2.length > 0)
- {
- fSetOprRecIf();
- }
- else
- {
- fDefInfo(); //수술기록이 없을경우 디폴트 정보 조회
- }
- }
- }
-
- }
- //2010-01-04 오전 10:12:00 강지훈 수정 : 요청번호 4693
- else if(nodeList.length == 0 && oprsrvno == "") {
- ipt_surg.disabled = false;
- }
- else{
- combo1.select(combo1.length - 1);
- }
-
- addComboItem("combo1", " ", "", "ADD");
- combo1.refresh();
- }
- }
- }
- /**
- * @group :
- * @ver : 2009.01.05
- * @by : jonghun
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 수술기록 인터페이스 내용 셋팅
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetOprRecIf()
- {
- //수술일
- var opdd = model.getValue("/root/main/infstrec/recitem[degnitemlevlcd='0000515']/reccnts");
- if (opdd == "")
- {
- opdd = model.getValue("/root/init/oprlist/oplist[oprsrvno='" + model.getValue("/root/send/reqinfstrec/oprsrvno") + "']/opcnfmdd");
- //opdd = getCurrentDate();
- }
-
- //var transopdd = opdd.substr(0, 4) + "-" + opdd.substr(4, 2) + "-" + opdd.substr(6, 2)
- model.setValue(pageInfo.recItemRef + "[degnitemlevlcd=0000515]/reccnts", opdd);
- parent.window.javascript.fSetFormRec("formrecdd" , opdd);
- parent.ipt_formrecdd.refresh();
-
- //수술전진단
- var nodeList = model.instances(0).selectNodes("/root/main/infstrec/recitem[fstlevlitemcd='0007983001' and formcd = '0000000899']");
- if (nodeList.length > 0)
- {
- setSrchData("/root/main/infstrec/recitem[fstlevlitemcd='0007983001' and formcd = '0000000899']", ivw_0007983001);
- ivw_0007983001.window.javascript.fAddrow();
- }
-
- //수술후진단
- var nodeList = model.instances(0).selectNodes("/root/main/infstrec/recitem[fstlevlitemcd='0000521001' and formcd = '0000000899']");
- if (nodeList.length > 0)
- {
- setSrchData("/root/main/infstrec/recitem[fstlevlitemcd='0000521001' and formcd = '0000000899']", ivw_0000521001);
- ivw_0000521001.window.javascript.fAddrow();
- }
-
- //수술명
- var nodeList = model.instances(0).selectNodes("/root/main/infstrec/recitem[fstlevlitemcd='0000509001' and formcd = '0000000900']");
- if (nodeList.length > 0)
- {
- setSrchData("/root/main/infstrec/recitem[fstlevlitemcd='0000509001' and formcd = '0000000900']", ivw_0000509001);
- ivw_0000509001.window.javascript.fAddrow();
- }
-
- //집도의
- var mOpDrList = model.instances(0).selectNodes("/root/main/infstrec/recitem[fstlevlitemcd='0000980001']");
- var mOpdegnitemlevlcd = "";
- var mOprectermcd = "";
- var mOprectermnm = "";
- var mOpreccnts = "";
- var mOpdegnitemnm = "";
- var mOpdegnitemkind = "";
- var mOprecrslt = "";
-
- for(var i = 0; i < mOpDrList.length; i++)
- {
- mOpdegnitemlevlcd = mOpDrList.item(i).selectSingleNode("degnitemlevlcd").text;
- mOprectermcd = mOpDrList.item(i).selectSingleNode("rectermcd").text;
- mOprectermnm = mOpDrList.item(i).selectSingleNode("rectermnm").text;
- mOpreccnts = mOpDrList.item(i).selectSingleNode("reccnts").text;
- mOpdegnitemnm = mOpDrList.item(i).selectSingleNode("degnitemnm").text;
- mOpdegnitemkind = mOpDrList.item(i).selectSingleNode("degnitemkind").text;
-
- if (mOprectermnm != "" && mOprecrslt == "")
- {
- mOprecrslt += mOprectermnm;
- }
- else if(mOprectermnm != "")
- {
- mOprecrslt += ", " + mOprectermnm;
- }
- else if(mOpreccnts != "")
- {
- mOprecrslt += ", " + mOpreccnts;
- }
- }
- //집도의
- model.setValue(pageInfo.recItemRef + "[degnitemlevlcd=0000980]/reccnts", mOprecrslt);
-
- //보조의
- var sOpDrList = model.instances(0).selectNodes("/root/main/infstrec/recitem[fstlevlitemcd='0000341001']");
- var sOpdegnitemlevlcd = "";
- var sOprectermcd = "";
- var sOprectermnm = "";
- var sOpreccnts = "";
- var sOpdegnitemnm = "";
- var sOpdegnitemkind = "";
- var sOprecrslt = "";
-
- for(var i = 0; i < sOpDrList.length; i++)
- {
- sOpdegnitemlevlcd = sOpDrList.item(i).selectSingleNode("degnitemlevlcd").text;
- sOprectermcd = sOpDrList.item(i).selectSingleNode("rectermcd").text;
- sOprectermnm = sOpDrList.item(i).selectSingleNode("rectermnm").text;
- sOpreccnts = sOpDrList.item(i).selectSingleNode("reccnts").text;
- sOpdegnitemnm = sOpDrList.item(i).selectSingleNode("degnitemnm").text;
- sOpdegnitemkind = sOpDrList.item(i).selectSingleNode("degnitemkind").text;
-
- if (sOprectermnm != "" && sOprecrslt == "")
- {
- sOprecrslt += sOprectermnm;
- }
- else if(sOprectermnm != "")
- {
- sOprecrslt += ", " + sOprectermnm;
- }
- else if(sOpreccnts != "")
- {
- sOprecrslt += ", " + sOpreccnts;
- }
- }
- //보조의
- model.setValue(pageInfo.recItemRef + "[degnitemlevlcd=0000341]/reccnts", sOprecrslt);
-
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-
- //수술소견
- var OpFindNodeList = model.instances(0).selectNodes("/root/main/infstrec/recitem[fstlevlitemcd='0000512001']");
- var opFinddegnitemlevlcd = "";
- var opFindrectermcd = "";
- var opFindrectermnm = "";
- var opFindreccnts = "";
- var opFinddegnitemnm = "";
- var opFinddegnitemkind = "";
- var opFindrecrslt = "";
- var opFinddegnitemlevlno = "";
-
- for(var i = 0; i < OpFindNodeList.length; i++)
- {
- opFinddegnitemlevlcd = OpFindNodeList.item(i).selectSingleNode("degnitemlevlcd").text;
- opFindrectermcd = OpFindNodeList.item(i).selectSingleNode("rectermcd").text;
- opFindrectermnm = OpFindNodeList.item(i).selectSingleNode("rectermnm").text;
- opFindreccnts = OpFindNodeList.item(i).selectSingleNode("reccnts").text;
- opFinddegnitemnm = OpFindNodeList.item(i).selectSingleNode("degnitemnm").text;
- opFinddegnitemkind = OpFindNodeList.item(i).selectSingleNode("degnitemkind").text;
-
- if(opFinddegnitemkind == "IMG" || opFinddegnitemkind == "FDG")
- continue;
-
- opFinddegnitemlevlcd = opFinddegnitemlevlcd.split(".");
-
- //2010.06.25 김달현 - 수술기록의 OP Finding, OP Procedure가 디자인된 부분서식일 때 Brief OP Note 연동시 데이터 오류수정
- //degnitemlevlcd가 2일때만 degnitemnm이 설정되어 레벨이 넘어가면 degnitemnm이 조회되지 않아 변경함.
- opFinddegnitemlevlno = OpFindNodeList.item(i).selectSingleNode("degnitemlevlno").text;
- if(opFinddegnitemlevlno > 1){
-
- var blk = "";
- for(var j = 0; j < opFinddegnitemlevlcd.length; j++){
- blk += " ";
- }
-
- if(opFindrectermnm == "" && opFindreccnts == ""){
- opFindrecrslt += blk + opFinddegnitemnm + "\n";
- }
-
-
- if (opFindrectermnm != "" && opFindreccnts != "")
- {
- opFindrecrslt += blk + opFinddegnitemnm + " : " + opFindrectermnm + " ※ " + opFindreccnts + "\n";
- }
- else if (opFindrectermnm != "")
- {
- opFindrecrslt += blk + opFinddegnitemnm + " : " + opFindrectermnm + "\n";
- }
- else if (opFindreccnts != "")
- {
- if (opFinddegnitemnm != "")
- {
- opFindrecrslt += blk + opFinddegnitemnm + " " + opFindreccnts + "\n";
- }
- else
- {
- opFindrecrslt += blk + opFindreccnts + "\n";
- }
- }
-
- }else{
- opFindrecrslt = opFindreccnts + "\n";
- }
-
- /*
- if (opFinddegnitemlevlcd.length > 1)
- {
- if (opFinddegnitemlevlcd.length == 2)
- {
- opFindrecrslt += opFinddegnitemnm + "\n";
- }
-
- if (opFindrectermnm != "" && opFindreccnts != "")
- {
- opFindrecrslt += opFinddegnitemnm + " : " + opFindrectermnm + " ※ " + opFindreccnts + "\n";
- }
- else if (opFindrectermnm != "")
- {
- opFindrecrslt += opFinddegnitemnm + " : " + opFindrectermnm + "\n";
- }
- else if (opFindreccnts != "")
- {
- if (opFinddegnitemnm != "")
- {
- opFindrecrslt += opFinddegnitemnm + " " + opFindreccnts + "\n";
- }
- else
- {
- opFindrecrslt += opFindreccnts + "\n";
- }
- }
- }
- else
- {
- opFindrecrslt = opFindreccnts + "\n";
- }
- */
-
- }
-
- //수술소견
- model.setValue(pageInfo.recItemRef + "[degnitemlevlcd=0000512]/reccnts", opFindrecrslt);
-
- //수술과정
- var OpProcNodeList = model.instances(0).selectNodes("/root/main/infstrec/recitem[fstlevlitemcd='0000507001']");
- var opProcdegnitemlevlcd = "";
- var opProcrectermcd = "";
- var opProcrectermnm = "";
- var opProcreccnts = "";
- var opProcdegnitemnm = "";
- var opProcdegnitemkind = "";
- var opProcrecrslt = "";
- var opProcdegnitemlevlno = "";
-
- for(var i = 0; i < OpProcNodeList.length; i++)
- {
- opProcdegnitemlevlcd = OpProcNodeList.item(i).selectSingleNode("degnitemlevlcd").text;
- opProcrectermcd = OpProcNodeList.item(i).selectSingleNode("rectermcd").text;
- opProcrectermnm = OpProcNodeList.item(i).selectSingleNode("rectermnm").text;
- opProcreccnts = OpProcNodeList.item(i).selectSingleNode("reccnts").text;
- opProcdegnitemnm = OpProcNodeList.item(i).selectSingleNode("degnitemnm").text;
- opProcdegnitemkind = OpProcNodeList.item(i).selectSingleNode("degnitemkind").text;
-
- if(opProcdegnitemkind == "IMG" || opProcdegnitemkind == "FDG")
- continue;
-
- opProcdegnitemlevlcd = opProcdegnitemlevlcd.split(".");
-
- //2010.06.25 김달현 - 수술기록의 OP Finding, OP Procedure가 디자인된 부분서식일 때 Brief OP Note 연동시 데이터 오류수정
- //degnitemlevlcd가 2일때만 degnitemnm이 설정되어 레벨이 넘어가면 degnitemnm이 조회되지 않아 변경함.
- opProcdegnitemlevlno = OpProcNodeList.item(i).selectSingleNode("degnitemlevlno").text;
- if(opProcdegnitemlevlno > 1){
-
- var blk = "";
- for(var j = 0; j < opProcdegnitemlevlcd.length; j++){
- blk += " ";
- }
-
- if(opProcrectermnm == "" && opProcreccnts == ""){
- opProcrecrslt += blk + opProcdegnitemnm + "\n";
- }
-
-
- if (opProcrectermnm != "" && opProcreccnts != "")
- {
- opProcrecrslt += blk + opProcdegnitemnm + " : " + opProcrectermnm + " ※ " + opProcreccnts + "\n";
- }
- else if (opProcrectermnm != "")
- {
- opProcrecrslt += blk + opProcdegnitemnm + " : " + opProcrectermnm + "\n";
- }
- else if (opProcreccnts != "")
- {
- if (opProcdegnitemnm != "")
- {
- opProcrecrslt += blk + opProcdegnitemnm + " " + opProcreccnts + "\n";
- }
- else
- {
- opProcrecrslt += blk + opProcreccnts + "\n";
- }
- }
-
- }else{
- opProcrecrslt = opProcreccnts + "\n";
- }
-
- /*
- if (opProcdegnitemlevlcd.length > 1)
- {
- if (opProcdegnitemlevlcd.length == 2)
- {
- opProcrecrslt += opProcdegnitemnm + "\n";
- }
-
- if (opProcrectermnm != "" && opProcreccnts != "")
- {
- opProcrecrslt += opProcdegnitemnm + " : " + opProcrectermnm + " ※ " + opProcreccnts + "\n";
- }
- else if (opProcrectermnm != "")
- {
- opProcrecrslt += opProcdegnitemnm + " : " + opProcrectermnm + "\n";
- }
- else if (opProcreccnts != "")
- {
- if (opProcdegnitemnm != "")
- {
- opProcrecrslt += opProcdegnitemnm + " " + opProcreccnts + "\n";
- }
- else
- {
- opProcrecrslt += opProcreccnts + "\n";
- }
- }
- }
- else
- {
- opProcrecrslt = opProcreccnts + "\n";
- }
- */
-
- }
- //수술과정
- model.setValue(pageInfo.recItemRef + "[degnitemlevlcd=0000507]/reccnts", opProcrecrslt);
-
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2008.11.28
- * @by : jonghun
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 동일 서식이 떠있을 경우 내부 인스턴스 로딩 후 디폴트 조회내용 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetDefData()
- {
- fSetSizeFormOpr();
-
- operation = getGlobalVariable("operation").split("▩")[1];
-
- if(operation != null && operation != ""){
- oprsrvno = operation.split("▦")[0];
- perfdeptcd = operation.split("▦")[10];
- }
-
-
- if (parent.window.javascript.fGetFormRec("status") == "C")
- {
- /*
- fSrchOprPerfDrlist(oprsrvno, cOdt1); //환자정보로 수술명, 집도의 조회
- parent.window.javascript.fSetFormRec("extnflag", "opr");
- parent.window.javascript.fSetFormRec("oprsrvno", oprsrvno);
-
- //서식 로딩 후 포커스 처리(2008-11-18 박종훈)
- SetDefFocusIVW(gItemCdsTextArea);
-
- //수술예약번호 체크
- if(oprsrvno == "")
- {
- messageBox("수술예약이 되지 않은", "I005");
- grup_base.disabled = true;
- fBtnDisEnable(true);
- return;
- } else {
- fBtnDisEnable(false);
- }
-
- //집도과 체크
- if (perfdeptcd != getUserInfo("dutplcecd"))
- {
- messageBox("작성 권한이", "I004");
- grup_base.disabled = true;
- fBtnDisEnable(true);
- return;
- } else {
- fBtnDisEnable(false);
- }
- */
- }
-
- dispOnLoadComplete(UNIT_FORM);
- }
- /**
- * @group :
- * @ver : 2009.01.05
- * @by : jonghun
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 수술 이력 리스트 선택시
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fChngOpList()
- {
- if (model.getValue("/root/send/reqinfstrec/oprsrvno") != "" )
- {
- ipt_surg.disabled = true;
- if (gMaxSectionID != "")
- {
- var MaxObj = document.controls("lbl_" + gMaxSectionID);
- MaxObj.dispatch("onclick");
- }
-
- ClearComnFormData(gItemCds);
- fInitialize();
-
- parent.window.javascript.fSetFormRec("oprsrvno", model.getValue("/root/send/reqinfstrec/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"));
-
- if (submit("TRMMR01003")) //수술 예약번호에 따른 수술기록지 기록내용 조회
- {
- var nodeList = model.instances(0).selectNodes("/root/main/infstrec/recitem");
-
- //해당 수술건에 대한 수술기록 유무에 따른 분기
- if (nodeList.length > 0)
- {
- fSetOprRecIf();
- }
- else
- {
- fDefInfo(); //수술기록이 없을경우 디폴트 정보 조회
- }
- }
- }
- else if(model.getValue("/root/send/reqinfstrec/oprsrvno") == ""){ //2010-01-06 오전 9:39:29 강지훈 수정
- if (gMaxSectionID != "")
- {
- var MaxObj = document.controls("lbl_" + gMaxSectionID);
- MaxObj.dispatch("onclick");
- }
-
- ClearComnFormData(gItemCds);
- fInitialize();
- ipt_surg.value = "";
- ipt_surg.disabled = false;
- fDefInfo();
- }
- }
- /**
- * @group :
- * @ver : 2009.01.05
- * @by : jonghun
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 수술에 대한 기본 정보 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDefInfo()
- {
- var tmpoprsrvno = model.getValue("/root/send/reqinfstrec/oprsrvno");
-
- if(tmpoprsrvno != "")
- {
- //수술전 진단 조회 시작
- model.removeNodeset("/root/main/diaginfo/diagcdlist");
- model.makeValue("/root/send/oprsrvno", tmpoprsrvno);
-
- submit("TRMRF04001", false);
- copyNodeset("/root/main/diaginfo/diagcdlist", "/root/main/diaginfo/diagcdlist", "replace", ivw_0007983001.model, model);
- copyNodeset("/root/main/diaginfo/diagcdlist", "/root/main/diaginfo/diagcdlist", "replace", ivw_0000521001.model, model);
- model.refresh();
- ivw_0007983001.window.javascript.fSetDiagNmInstance();
- ivw_0000521001.window.javascript.fSetDiagNmInstance();
- //수술전 진단 조회 끝
-
- //수술명, 집도의, 수술시간 조회 시작
- model.removeNodeset("/root/tmpop/selectoplist");
- model.removeNodeset("/root/main/paminfo/list");
-
- var node = getGlobalVariable("paminfo");
-
- if(node != "" && node != null)
- {
- setCSVToNode("/root/main/paminfo", node);
-
- model.makeValue("/root/send/pid", model.getValue("/root/main/paminfo/list/pid"));
- model.makeValue("/root/send/cretno", model.getValue("/root/main/paminfo/list/cretno"));
-
- if (model.getValue("/root/main/paminfo/list/ioflag") == "O")
- {
- model.makeValue("/root/send/orddd", model.getValue("/root/main/paminfo/list/orddd"));
- }
- else
- {
- model.makeValue("/root/send/orddd", model.getValue("/root/main/paminfo/list/indd"));
- }
-
- model.makeValue("/root/send/oprsrvno", oprsrvno);
- model.makeValue("/root/send/srchmode", "dr");
-
- if (submit("TRMRF04301"))
- {
- copyNodeset("/root/tmpop/selectoplist", "/root/tmpop/selectoplist", "replace", ivw_0000509001.model, model);
- ivw_0000509001.window.javascript.fAfterSrch();
- }
-
- if (submit("TRMRF04302"))
- {
- var perfdrnm = model.getValue("/root/tmp/perfdr/perfdrnm");
- var opfromdt = model.getValue("/root/tmp/perfdr/opfromdt");
-
- var opstdd = opfromdt.substring(0, 8);
- var opsttm = opfromdt.substring(8, 12);
-
- if (opstdd == "" || opstdd.length < 8)
- {
- opstdd = model.getValue("/root/init/oprlist/oplist[oprsrvno='" + model.getValue("/root/send/reqinfstrec/oprsrvno") + "']/opcnfmdd");
- }
-
- if (opsttm == "" || opsttm.length < 4)
- {
- opsttm = getCurrentTime().substr(0, 4);
- }
-
- var transopdd = opstdd.substr(0, 4) + "-" + opstdd.substr(4, 2) + "-" + opstdd.substr(6, 2)
-
- parent.window.javascript.fSetFormRec("formrecdd" , opstdd);
- parent.window.javascript.fSetFormRec("formrechm" , opsttm);
-
- parent.ipt_formrecdd.refresh();
- parent.ipt_formrectm.refresh();
-
- //model.setValue("/root/main/recinfo/recitem[degnitemlevlcd='" + iSurg + "']/reccnts", transopdd); //수술일
- model.setValue("/root/main/recinfo/recitem[degnitemlevlcd='" + iSurg + "']/reccnts", opstdd); //수술일
- model.setValue(pageInfo.recItemRef + "[degnitemlevlcd=0000980]/reccnts", perfdrnm); //집도의
- model.refresh();
- }
-
- model.removeNodeset("/root/main/paminfo");
- }
- //수술명, 집도의, 수술시간 조회 끝
- }
- }
|