1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429 |
- <?xml version="1.0" encoding="utf-8"?>
- <Script type="xscript4.0"><![CDATA[/**
- * MMR00703.js
- * SMMMR00703_응급기록JCI.xrw
- * 2015.01.22 이윤주
- */
- /**
- * @desc : [item코드목록]
- * "0000931001"//주호소
- * "0001173001"//현병력
- * "0000098001"//과거력
- * "0000969001"//통증
- * "0000079001"//계통문진
- * "0000570001"//신체검진
- * "0000553001"//신경학적검사
- * "0001019001"//추정진단
- * "0022826001"//care plan
- * "0013328001"//퇴원계획
- * [버튼목록]
- * "btn_imge_0001173001" //현병력 이미지버튼
- * "btn_etcrec_0001173001" //현병력 추가기록버튼
- * "btn_imge_0000098001" //과거력 이미지버튼
- * "btn_fmy_0000098001" //과거력 가계도버튼
- * "btn_etcrec_0000098001" //과거력 추가기록버튼
- * "btn_imge_0000079001" //계통문진 이미지버튼
- * "btn_etcrec_0000079001" //계통문진 추가기록버튼
- * "btn_imge_0000570001" //신체검진 이미지버튼
- * "btn_etcrec_0000570001" //신체검진 추가기록버튼
- * "btn_imge_0000553001" //신경학적검사 이미지버튼
- * "btn_etcrec_0000553001" //신경학적검사 추가기록버튼
- * "btn_etcrec_0001019001" //추정진단 추가기록버튼
- * "btn_dsch_0013328001" //퇴원계획 퇴원요구도버튼
- */
-
- var gItemCds = new Array(
- "0000931001"//주호소
- , "0000969001"//통증
- , "0001173001"//현병력
- , "0000098001"//과거력
- , "0000079001"//계통문진
- , "0000570001"//신체검진
- , "0000553001"//신경학적검사
- , "0001019001"//추정진단
- , "0022826001"//care plan
- , "0013328001"//퇴원계획
- );
-
- var gItemCdsTextArea = new Array(
- "0000931001"//주호소
- , "0001173001"//현병력
- , "0000098001"//과거력
- , "0000969001"//통증
- , "0000079001"//계통문진
- , "0000570001"//신체검진
- , "0000553001"//신경학적검사
- , "0001019001"//추정진단
- , "0022826001"//care plan
- , "0013328001"//퇴원계획
- );
- /**
- * @desc : 확장버튼(이미지,가계도,추가기록)을 기록여부에 따라 표시를 위한 버튼목록
- * @id :
- * @authur : 안치원
- * @history : 2009.09.09 신규 안치원 ACW_090909A
- */
- var gExtnBtnIds = new Array(
- "btn_imge_0001173001" //현병력 이미지버튼
- , "btn_etcrec_0001173001" //현병력 추가기록버튼
- , "btn_imge_0000098001" //과거력 이미지버튼
- , "btn_fmy_0000098001" //과거력 가계도버튼
- , "btn_etcrec_0000098001" //과거력 추가기록버튼
- , "btn_imge_0000079001" //계통문진 이미지버튼
- , "btn_etcrec_0000079001" //계통문진 추가기록버튼
- , "btn_imge_0000570001" //신체검진 이미지버튼
- , "btn_etcrec_0000570001" //신체검진 추가기록버튼
- , "btn_imge_0000553001" //신경학적검사 이미지버튼
- , "btn_etcrec_0000553001" //신경학적검사 추가기록버튼
- , "btn_etcrec_0001019001" //추정진단 추가기록버튼
- , "btn_dsch_0013328001" //퇴원계획 퇴원요구도버튼
- );
- var gLoadFormCnts = 0;
- // knuh_20110713_추가(신체검진의 triage 정보 조회시 2번 가져오는 부분을 체크하기 위함)
- var gImge = "";
- var gIbuttnyn = "";
- var lodedYn = false;
- /****************************************************************************************
- * Function : fFormReady()
- * Description : 화면 로딩후 초기화 작업 수행
- * retrun type :
- ****************************************************************************************/
- function fFormReady()
- {
-
- var sIntenNm = dsf_createDs("ds_inten", []);
- var oIntenDs = this.objects[sIntenNm];
-
- var sInjmechNm = dsf_createDs("ds_injmech", []);
- var oInjmechDs = this.objects[sInjmechNm];
-
- var sProcNm = dsf_createDs("ds_proc", []);
- var oProcDs = this.objects[sProcNm];
-
- lf_getHardCDList("N", 1009, null, oIntenDs);
- lf_getHardCDList("N", 1010, null, oInjmechDs);
- lf_getHardCDList("N", 1011, null, oProcDs);
-
- //트리아제 기록 연동데이터 조회(2009-05-21 박종훈)
- var sSendReqdataNm = dsf_createDsRow("ds_send_reqdata", [{col: "pid", type:"string", size:256, val:parent.fGetFormRec("pid")}
- , {col: "orddd", type:"string", size:256, val:parent.fGetFormRec("orddd")}
- , {col: "cretno", type:"string", size:256, val:parent.fGetFormRec("cretno")}
- , {col: "queryflag", type:"string", size:256, val: "K"}]);
-
- var sErtriageNm = dsf_createDs("ds_ertriage", [{col: "status", type:"string", size:256}]);
-
-
- var oParam = {};
- oParam.id = "TRMNE04403";
- oParam.service = "ercareapp.ERInRmOutRmMngt";
- oParam.method = "reqGetERTriagePatInfo";
- oParam.inds = "req="+sSendReqdataNm;
- oParam.outds = sErtriageNm+"=ertriage";
- oParam.async = true;
- oParam.progress = false;
- //oParam.callback = "cf_TRMNE04403";
- tranf_submit(oParam);
-
- 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_0000931001", "grup_base.tar_0013328001");
-
- //섹션별 버튼초기화
- InitBtnImge(gItemCds);
- InitBtnFmy(gItemCds);
- InitBtnDiag("0001019001");
- InitBtnEtcRec(gItemCds);
-
- //기본 첫번째 부분서식을 로딩해서 보여준다.
- // dispOnLoadComplete(COMN_FORM);//COMN_FORM : 1
- // lf_checkUnitForm(gItemCds); // 부분서식 로딩
- lf_AllLoadUnitFormExpand(gItemCds); // 전체 로드
- //폼레디 완료 후 MMRCommon.js의 initSection()에서 로딩되지 않은 부분서식 로딩한다.
- //loadUnitForm_MMR00701(gItemCds);
-
- //2010.01.21, hkjoo
- // initCmbExtnList(gItemCds);
-
- lf_setRecData(gItemCds);
- }
- /**
- * @desc : 기록데이터 조회
- * @id :
- * @event : xforms-ready
- * @return : void
- * @authur : 박종훈
- */
- function fLoadData()
- {
- lf_setRecData(gItemCds);
- // InitPgmFormData();
- // InitUnitFormData(gItemCds);
- }
- /**
- * @group :
- * @ver : 2008.06.13
- * @by : snoweye
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 부분서식 로딩
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fLoadUnitForm()
- {
- initSection(gItemCds);
- }
- /**
- * @group :
- * @ver : 2008.06.13
- * @by : snoweye
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 부분서식 로딩후 후처리
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fOnLoadComplete()
- {
- var curLoadFormCd = this.frmf_getParameter("loadformcd");
-
- var arrUnitformmast = objExt.findRows(ds_data_unitformmast, "formcd", curLoadFormCd);
- var fstLevlItemCd = "";
-
- for (var i=0; i<arrUnitformmast.length; i++) {
- var unitformload = ds_data_unitformmast.getColumn(arrUnitformmast[i], "loaded");
- if (unitformload != "true") {
- fstLevlItemCd = ds_data_unitformmast.getColumn(arrUnitformmast[i], "orgsupdegnitemcd");
- var ivwObj = ComnFormObj.components["ivw_" + fstLevlItemCd];
- if(!utlf_isNull(ivwObj))
- {
- var idx = ds_data_unitformmast.findRow("orgsupdegnitemcd", fstLevlItemCd );
- ds_data_unitformmast.setColumn(idx, "loaded", "true");
- // setFstLevlItemCdOnUnitForm(ivwObj, unitformmastDs.getColumn(i, "orgsupdegnitemno"));//부분서식의 아이템에 부분서식 상위코드를 세팅
- break;
- }
- }
- }
- //주호소 부분서식 로딩후 처리
- if(fstLevlItemCd == '0000931001')//주호소
- {
- fSetSizeFormCC();
- }
-
- //부분서식 로딩후 처리
- if(
- fstLevlItemCd == "0000931001" //주호소
- || fstLevlItemCd == "0022826001" //care plan
- || fstLevlItemCd == "0013328001" //퇴원계획
- )
- fSetSizeFormCC(fstLevlItemCd);
- gLoadFormCnts++;
- utlf_addLog("@@@@@ gItemCds.length : " + gItemCds.length + " gLoadFormCnts : " + gLoadFormCnts );
- if(gItemCds.length == gLoadFormCnts)
- {
- dispOnLoadComplete(UNIT_FORM);
-
- //서식 로딩 후 포커스 처리
- if (parent.fGetFormRec("status") == "C")
- {
- SetDefFocusMTX(gItemCds);
- }
-
- }
- }
- /**
- * @group :
- * @ver : 2008.11.28
- * @by : jonghun
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 동일 서식이 떠있을 경우 내부 인스턴스 로딩 후 디폴트 조회내용 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetDefData()
- {
-
- dispOnLoadComplete(UNIT_FORM);
-
- if (parent.fGetFormRec("status") == "C")
- {
- SetDefFocusMTX(gItemCds);
- }
-
- }
- /**
- * @desc : 서식 주호소 사이즈 조절
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetSizeFormCC(gItemCd_MMR00701)
- {
-
- //서식 주호소 화면 로딩
- if(gItemCd_MMR00701 == "0000931001")
- grup_base.ivw_0000931001.fInitPage(false, parseInt(grup_base.ivw_0000931001.position.height), parseInt(grup_base.ivw_0000931001.position.width));
-
- //Care Plan 화면 로딩
- else if(gItemCd_MMR00701 == "0022826001")//상용구팝업 hidden
- grup_base.ivw_0022826001.fInitPage(true, parseInt(grup_base.ivw_0022826001.position.height), parseInt(grup_base.ivw_0022826001.position.width));
-
- //퇴원계획화면 로딩
- else if(gItemCd_MMR00701 == "0013328001")//상용구팝업 visible
- grup_base.ivw_0013328001.fInitPage(false, parseInt(grup_base.ivw_0013328001.position.height), parseInt(grup_base.ivw_0013328001.position.width));
-
- }
- /**
- * @group :
- * @ver : 2009.12.04
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 부분서식 로딩
- * (0022826001) Care Plan,
- * (0013328001) 퇴원계획,
- * @param : gItemCds
- * @return :
- * @---------------------------------------------------
- */
- function loadUnitForm_MMR00701(itemCds){
-
- // var pageInfo = new PAGEINFO();
- // copyNodeset("/root/main", "/root/main", "replace", model, parent.model);
- // model.removeNodeset("/root/main/recinfo");
- //
- // makeRefByDegnitemno();
-
- for (var i = 0; i < itemCds.length; i++)
- {
- var nFindRow = ds_data_unitformmast.findRow("orgsupdegnitemcd", itemCds[i]);
- var formdegnseq = ds_data_unitformmast.getColumn(nFindRow, "formdegnseq");
- var unitformcd = ds_data_unitformmast.getColumn(nFindRow, "formcd");
- var ivwObj = ComnFormObj.components["ivw_" + itemCds[i]];
- var tarObj = ComnFormObj.components["tar_" + itemCds[i]];
-
- if( itemCds[i] == "0022826001" //care plan
- || itemCds[i] == "0013328001" //퇴원계획
- ){
-
- var unitformprogflag = ds_data_unitformmast.getColumn(nFindRow, "formprogflag");
-
- ivwObj.supdegnitemcd = itemCds[i];
- ivwObj.unitformcd = unitformcd;
-
-
- sysf_trace(unitformcd + " Loading 시작 : " + utlf_getCurrentTime());
- loadUnitForm(ivwObj, itemCds[i]);
- lf_getComponentID(formdegnseq, itemCds[i]);
- sysf_trace(unitformcd + " Loading 끝 : " + utlf_getCurrentTime());
-
- }
-
- }
-
- }
- /**
- * @desc : care plan ivw 확대
- * @
- * @param :
- * @return :
- * @authur : dhkim
- */
- function expandSection_MMR00701(obj){
- var ctrlID = obj.name;
- var itemcd = ctrlID.replace("lbl_", "");
- var bFold = itemcd == gMaxSectionID ? true : false;
- var ctrl = null;
- var unitformcd = "";
- var itemCds = gItemCds;
-
- for (var i = 0; i < itemCds.length; i++)
- {
-
- var secCtrl = ComnFormObj.components["lbl_" + itemCds[i]];
- var nFindRow = ds_data_unitformmast.findRow("orgsupdegnitemcd", itemCds[i]);
- var formdegnseq = ds_data_unitformmast.getColumn(nFindRow, "formdegnseq");
- unitformcd = ds_data_unitformmast.getColumn(nFindRow, "formcd");
-
- if(utlf_isNull(formdegnseq))
- ctrl = ComnFormObj.components["tar_" + itemCds[i]];
- else
- ctrl = ComnFormObj.components["ivw_" + itemCds[i]];
-
-
- //20100106 dhkim ivw 축소/확장
- if(itemcd == itemCds[i]){
- if(bFold){
-
- ctrl.position.height = gMaxSectionHei;
-
- if (unitformcd == "0900006875")//care plan 상용구 hidden
- {
- ctrl.fInitPage(true, parseInt(gMaxSectionHei), parseInt(ctrl.position.width));
- }else{
- ctrl.fInitPage(false, parseInt(gMaxSectionHei), parseInt(ctrl.position.width));
- }
-
- }else{
- ctrl.position.height = ctrl.orgheight;
-
- if (unitformcd == "0900006875")//care plan 상용구 hidden
- {
- ctrl.fInitPage(true, parseInt(secCtrl.orgheight), parseInt(ctrl.position.width));
- }else{
- ctrl.fInitPage(false, parseInt(secCtrl.orgheight), parseInt(ctrl.position.width));
- }
-
- }
- }
- }
- }
- /**
- * @group :
- * @ver : 2009.10.09
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function setInterfaceData()
- {
- var ifItemCds = new Array(
- "0000931001"//주호소
- , "0001173001"//현병력
- , "0000098001"//과거력
- , "0000969001"//통증
- , "0000079001"//계통문진
- , "0000570001"//신체검진
- , "0000553001"//신경학적검사
- , "0001019001"//추정진단
- , "0022826001"//care plan
- , "0013328001"//퇴원계획
- );
-
- copyNodeset(gPageInfo.recItemRef2, "/root/main/recifinfo/recitem", "replace", model, parent.model);
-
- setSrchData(gPageInfo.recItemRef2 , window);
- InitUnitFormData(ifItemCds);
-
- setButtonToggleAllByRecYn(window, gExtnBtnIds);
- }
- /**
- * @desc : 서식 데이터 Clear
- * @
- * @param :
- * @return :
- * @authur : 박종훈
- */
- function fClearComnFormData()
- {
- if (gMaxSectionID != "")
- {
- var MaxObj = document.controls("lbl_" + gMaxSectionID);
- MaxObj.dispatch("onclick");
- }
-
- ClearComnFormData(gItemCds);
- clearData();
-
- //포커스 처리
- SetDefFocusMTX(gItemCds);
- }
- /**
- * @desc : 기록 인스턴스 연결
- * @
- * @param :
- * @return :
- * @authur : 박종훈
- */
- function fSetRecItemValue(reciteminfo)
- {
- return SetCommMediFormValue(gItemCds, reciteminfo);
- }
- /****************************************************************************************
- * Function : fChkPreSave
- * Description : 저장전 체크 로직
- * (주호소, care plan, 퇴원계획)필수체크
- * "0000931001"//주호소
- * "0022826001"//Care Plan
- * "0013328001"//퇴원계획
- * retrun type :
- ****************************************************************************************/
- function fChkPreSave()
- {
-
- var rtnVal = grup_base.ivw_0000931001.fChkGrdPreSave();//주호소 필수체크
- if(rtnVal == true){
-
- //2010.01.15 안치원 - 통증기록 필수입력 체크
- if (utlf_isNull(grup_base.ivw_0000969001.url) == false) {
- // debugger;
- var isValid = true;
- var degnitemnm = null;
- var itemval_vas = new ITEMVAL();
-
- //통증
- var degnitemlevlcd = "0000969"; //0000969.
- var itemval_pain = grup_base.ivw_0000969001.getFormItemValue(degnitemlevlcd);
-
- if (itemval_pain.rectermcd == "0002277001") {
- //무
- //통증점수 제거
- itemval_vas.rectermcd = "INI";
- grup_base.ivw_0000969001.setFormItemValue("0001099", itemval_vas); //0000969.
- } else if (itemval_pain.rectermcd == "0003770001") {
- //유
- //통증 점수
- degnitemlevlcd = "0001099"; //0000969.
- itemval_vas = grup_base.ivw_0000969001.getFormItemValue(degnitemlevlcd);
- if (utlf_isNull(itemval_vas.rectermcd)) {
- degnitemnm = "통증 점수";
- isValid = false;
- }
-
- if (parseInt(itemval_vas.rectermnm) >= 1) {
- //사정도구
- degnitemlevlcd = "0013276"; //0000969.
- itemval_vas2 = grup_base.ivw_0000969001.getFormItemValue(degnitemlevlcd);
- if (itemval_vas2.rectermcd == "") {
- degnitemnm = "사정도구";
- isValid = false;
- }
-
- if (parseInt(itemval_vas.rectermnm) >= 4) {
- //중재
- degnitemlevlcd = "0013277"; //0000969.
- itemval_vas = grup_base.ivw_0000969001.getFormItemValue(degnitemlevlcd);
- if (utlf_isNull(itemval_vas.rectermcd)) {
- degnitemnm = "중재 종류";
- isValid = false;
- }
- }
- }
- } else if (itemval_pain.rectermcd == "0022237001") {
- //확인불가
- degnitemlevlcd = "0000969"; //0000969.
- itemval_vas = grup_base.ivw_0000969001.getFormItemValue(degnitemlevlcd);
- if (utlf_isNull(itemval_vas.reccnts)) {
- degnitemnm = "확인불가의 상세내역"
- isValid = false;
- }
- } else {
- isValid = false;
- }
-
- if (isValid == false) {
- if (utlf_isNull(degnitemnm)) {
- degnitemnm = grup_base.ivw_0000969001.ds_data_recitem.lookup("degnitemlevlcd", degnitemlevlcd, "degnitemnm");
- }
- sysf_messageBox("필수 입력항목(통증-" + degnitemnm + ")이 입력되지", "E007");
- return isValid;
- }
- }
-
- //care plan 필수체크
- var nFindRow = ds_data_formdegn.findRow("degnitemcd", "0022826001");
- var itemNm = ds_data_formdegn.getColumn(nFindRow, "itemnm");
- var rtnVal = true;
- if(rtnVal == false){
- return rtnVal;
- }else{
- nFindRow = ds_data_formdegn.findRow("degnitemcd", "0013328001");
- itemNm = ds_data_formdegn.getColumn(nFindRow, "itemnm");
- return grup_base.ivw_0013328001.fChkGrdPreSave(itemNm);
- }
- }else{
- return rtnVal;
- }
- }
- /****************************************************************************************
- * Function : fIsNullValue_MMR007001
- * Description : degnitemlevlcd 에 해당하는 recitem 정보 중 요청받은 field 를 반환한다.
- * retrun type :
- ****************************************************************************************/
- function fIsNullValue_MMR007001(degnitemlevlcd, field) {
- var itemval_vas = grup_base.ivw_0000969001.getFormItemValue(degnitemlevlcd);
- var val = "";
- if (field == "cd") {
- val = itemval_vas.rectermcd;
- } else if (field == "cnts") {
- val = itemval_vas.reccnts;
- }
-
- return utlf_isNull(val);
- }
- /**
- * @group :
- * @ver : 2008.09.02
- * @by : jonghun
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 추가기록창 팝업처리
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fEtcRec()
- {
- //setParameter("etc_rec", "추가 기타기록 테스트입니다...");
- modal("SPMMR06100");
-
- var recrtn = getParameter("etcrec_rtn");
-
- if (recrtn != "")
- {
- model.setValue("/root/main/recinfo/recitem[degnitemlevlcd='0000098.0008458']/reccnts", recrtn);
- setParameter("etc_rec", recrtn);
-
- }
-
- //alert(recrtn);
- }
- /**
- * @desc : 서식 진단명 사이즈 조절
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetSizeFormDiag()
- {
- grup_base.ivw_0001019001.fInitPage(false, parseInt(grup_base.ivw_0001019001.position.height), parseInt(grup_base.ivw_0001019001.position.width));
- }
- /****************************************************************************************
- * Function : fSetCC
- * Description : 주호소 트리아제 연동
- * retrun type :
- ****************************************************************************************/
- function fSetCC()
- {
- var attackdd = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "attackdd")); //발생일
- var attacktm = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "attacktm")); //발생시간
- var mainsympnm = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mainsympnm")); //주증상
- var mainsympcd = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mainsympcd")); //주증상코드
- var mainsympnm1 = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mainsympnm1")); //주증상1
- var mainsympcd1 = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mainsympcd1")); //주증상코드1
- var mainsympnm2 = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mainsympnm2")); //주증상2
- var mainsympcd2 = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mainsympcd2")); //주증상코드2
- var etcsymp = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "etcsymp")); //기타증상
-
- dsf_createDs("ds_ccrectmp", [{col: "rectermcd", type:"string", size:256}
- ,{col: "rectermnm", type:"string", size:256}
- ,{col: "reccnts", type:"string", size:256}
- ,{col: "reccnts2", type:"string", size:256}
- ,{col: "rectermflag", type:"string", size:256}]);
-
-
- if (!utlf_isNull(mainsympnm))
- {
- var nRow = ds_ccrectmp.addRow();
- ds_ccrectmp.setColumn(nRow, "rectermcd", mainsympcd);
- ds_ccrectmp.setColumn(nRow, "rectermnm", mainsympnm);
-
- if (!utlf_isNull(attackdd))
- {
- attackdd = attackdd.substr(0, 4) + "-" + attackdd.substr(4, 2) + "-" + attackdd.substr(6, 2);
- if (!utlf_isNull(attacktm))
- {
- attacktm = attacktm.substr(0, 2) + ":" + attacktm.substr(2, 2);
- }
-
- ds_ccrectmp.setColumn(nRow, "reccnts2", attackdd + " " + attacktm);
- }
- }
-
- if (!utlf_isNull(mainsympnm1))
- {
- var nRow = ds_ccrectmp.addRow();
- ds_ccrectmp.setColumn(nRow, "rectermcd", mainsympcd1);
- ds_ccrectmp.setColumn(nRow, "rectermnm", mainsympnm1);
- if (!utlf_isNull(attackdd))
- {
- ds_ccrectmp.setColumn(nRow, "reccnts2", attackdd + " " + attacktm);
-
- }
- }
-
- if (!utlf_isNull(mainsympnm2))
- {
- var nRow = ds_ccrectmp.addRow();
- ds_ccrectmp.setColumn(nRow, "rectermcd", mainsympcd2);
- ds_ccrectmp.setColumn(nRow, "rectermnm", mainsympnm2);
- if (!utlf_isNull(attackdd))
- {
- ds_ccrectmp.setColumn(nRow, "reccnts2", attackdd + " " + attacktm);
- }
- }
-
- if (!utlf_isNull(etcsymp))
- {
- var nRow = ds_ccrectmp.addRow();
- ds_ccrectmp.setColumn(nRow, "rectermcd", "-");
- ds_ccrectmp.setColumn(nRow, "rectermnm", etcsymp);
- if (!utlf_isNull(attackdd))
- {
- ds_ccrectmp.setColumn(nRow, "reccnts2", attackdd + " " + attacktm);
- }
- }
-
-
- if( ds_ccrectmp.rowcount > -1 ){
- var gridObj = ComnFormObj.ivw_0000931001.components["grd_diaglist"];
- var gridDs = ComnFormObj.ivw_0000931001.objects[gridObj.binddataset];
- gridDs.clearData();
- gridDs.copyData(ds_ccrectmp);
-
- ComnFormObj.ivw_0000931001.fAddrow();
- }
-
- var objDs = this.removeChild("ds_ccrectmp");
- delete objDs;
- objDs = null;
- /*
- model.removeNodeset("/root/ccrectmp/recitem");
- var attackdd = model.getValue("/root/interface/ertriage/ertriage/attackdd"); //발생일
- var attacktm = model.getValue("/root/interface/ertriage/ertriage/attacktm"); //발생시간
- var mainsympnm = model.getValue("/root/interface/ertriage/ertriage/mainsympnm"); //주증상
- var mainsympcd = model.getValue("/root/interface/ertriage/ertriage/mainsympcd"); //주증상코드
- var mainsympnm1 = model.getValue("/root/interface/ertriage/ertriage/mainsympnm1"); //주증상1
- var mainsympcd1 = model.getValue("/root/interface/ertriage/ertriage/mainsympcd1"); //주증상코드1
- var mainsympnm2 = model.getValue("/root/interface/ertriage/ertriage/mainsympnm2"); //주증상2
- var mainsympcd2 = model.getValue("/root/interface/ertriage/ertriage/mainsympcd2"); //주증상코드2
- var etcsymp = model.getValue("/root/interface/ertriage/ertriage/etcsymp"); //기타증상
- var i = 1;
- if (mainsympnm != "")
- {
- model.makeNode("/root/ccrectmp/recitem[" + i + "]");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/formcd");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/degnitemno");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000931001");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/rectermcd");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/reccnts");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "MTX");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "주호소");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "1");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/rectermnm");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/rowno");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/colno");
- i++;
- model.makeNode("/root/ccrectmp/recitem[" + i + "]");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "1");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000931001");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/rectermcd");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/reccnts");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GRD");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "주호소");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "2");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/rectermnm");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 0);
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", -1);
- i++;
- model.makeNode("/root/ccrectmp/recitem[" + i + "]");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "5");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000931001");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000931");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", mainsympcd);
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/reccnts");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "주호소");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", mainsympnm);
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 0);
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 0);
- i++;
- if (attackdd != "")
- {
- attackdd = attackdd.substr(0, 4) + "-" + attackdd.substr(4, 2) + "-" + attackdd.substr(6, 2);
- if (attacktm != "")
- {
- attacktm = attacktm.substr(0, 2) + ":" + attacktm.substr(2, 2);
- }
- model.makeNode("/root/ccrectmp/recitem[" + i + "]");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "10");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000299002");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000299");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", "");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
-
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/reccnts", attackdd + " " + attacktm);
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "발생일");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", "");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 0);
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 2);
- i++;
- }
- }
-
- if (mainsympnm1 != "")
- {
- model.makeNode("/root/ccrectmp/recitem[" + i + "]");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "5");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000931001");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000931");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", mainsympcd1);
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/reccnts");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "주호소");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", mainsympnm1);
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 1);
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 0);
- i++;
- if (attackdd != "")
- {
- model.makeNode("/root/ccrectmp/recitem[" + i + "]");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "10");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000299002");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000299");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", "");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
-
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/reccnts", attackdd + " " + attacktm);
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "발생일");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", "");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 1);
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 2);
- i++;
- }
- }
-
- if (mainsympnm2 != "")
- {
- model.makeNode("/root/ccrectmp/recitem[" + i + "]");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "5");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000931001");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000931");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", mainsympcd2);
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/reccnts");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "주호소");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", mainsympnm2);
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 2);
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 0);
- i++;
- if (attackdd != "")
- {
- model.makeNode("/root/ccrectmp/recitem[" + i + "]");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "10");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000299002");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000299");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", "");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
-
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/reccnts", attackdd + " " + attacktm);
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "발생일");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", "");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 2);
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 2);
- i++;
- }
- }
-
- if (etcsymp != "")
- {
- model.makeNode("/root/ccrectmp/recitem[" + i + "]");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "5");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000931001");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000931");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", "-");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/reccnts");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "주호소");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", etcsymp);
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 3);
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 0);
- i++;
- if (attackdd != "")
- {
- model.makeNode("/root/ccrectmp/recitem[" + i + "]");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "10");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000299002");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000299");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", "");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
-
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/reccnts", attackdd + " " + attacktm);
- model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "발생일");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", "");
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 3);
- model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 2);
- i++;
- }
- }
-
- var nodeList = model.instances(0).selectNodes("/root/ccrectmp/recitem");
- ivw_0000931001.window.javascript.clearData();
- if (nodeList.length > 0)
- {
- setSrchData("/root/ccrectmp/recitem", ivw_0000931001);
- ivw_0000931001.window.javascript.fAddrow();
- }
- */
- }
- /****************************************************************************************
- * Function : fSetErTriageRec
- * Description : 트리아제 연동
- * retrun type :
- ****************************************************************************************/
- function fSetErTriageRec(ivwObj, levlcd, ImgeYN)
- {
-
- //현병력
- if (ivwObj.name == "ivw_0001173001" && !utlf_isNull(ivwObj.url))
- {
-
- var nRow, degnitemkind, degnitemno, colId;
- //의도성
- var itemVal = new ITEMVAL();
- var intenflag = ds_ertriage.getColumn(0, "intenflag"); //의도성코드
- if (!utlf_isNull(intenflag) && intenflag != "-")
- {
- var intntermcd = ds_inten.lookup("hardcd", intenflag, "hardcdnm");
- itemVal.rectermcd = intntermcd;
- ivwObj.setFormItemValue("0001667", itemVal);
- }
-
- //손상기전
- var itemVal1 = new ITEMVAL();
- var injmechflag = ds_ertriage.getColumn(0, "injmechflag"); //손상기전코드
- if (!utlf_isNull(injmechflag) && injmechflag != "-")
- {
- var injmechcd = ds_injmech.lookup("hardcd", injmechflag, "hardcdnm");
- itemVal1.rectermcd = injmechcd;
- ivwObj.setFormItemValue("0020479", itemVal1);
- }
-
- //보호장구
- var itemVal2 = new ITEMVAL();
- var proceqmtflag = ds_ertriage.getColumn(0, "proceqmtflag"); //보호장구
- if (!utlf_isNull(proceqmtflag) && proceqmtflag != "-")
- {
- var arrProceqmtflag = proceqmtflag.split("|")
- if (arrProceqmtflag.length > 0)
- {
- var proceqmtcd = "";
- var proceqmtnm = "";
-
- var compproceqmtflag = "";
- var tmpProceqmtflag = "";
- var tmpProceqmtnm = "";
-
- for (var i = 0; i < arrProceqmtflag.length; i++)
- {
- tmpProceqmtcd = ds_prcp.lookup("hardcd", arrProceqmtflag[i], "hardcdnm");
-
- proceqmtcd += tmpProceqmtcd + " ";
- }
-
- itemVal2.rectermcd = proceqmtcd.substring(0, proceqmtcd.length - 1);
- ivwObj.setFormItemValue("0020478", itemVal2);
- }
- }
-
-
- //2010.05.10 김달현 추가
- //내원사유(M0120)
- var itemVal3 = new ITEMVAL();
- var chosresnflag = ds_ertriage.getColumn(0, "chosresnflag");
- var chosresncd, chosresnnm;
- if(chosresnflag == "1"){//질병
- chosresncd = "0003034001";
- }else if(chosresnflag == "2"){//질병외
- chosresncd = "0038976001";
- }else if(chosresnflag == "3"){//진료외방문
- chosresncd = "0038977001";
- }else if(chosresnflag == "9"){//미상
- chosresncd = "0017158001";
- }
- //chosresnnm = ivwObj.window.javascript.model.getValue("/root/main/forminfo/vallist[valcd='"+chosresncd+"']/valitemnm");
- if(!utlf_isNull(chosresnflag)){
-
- itemVal3.rectermcd = chosresncd;
- ivwObj.setFormItemValue("0019376", itemVal3);
-
- }
-
-
- //2010.05.10 김달현 추가
- //내원수단(M0119)
- var itemVal4 = new ITEMVAL();
- var choswayflag = ds_ertriage.getColumn(0, "choswayflag");
- var choswaycd, choswaynm;
- if(choswayflag == "1"){//119 구급차
- choswaycd = "0035600001";
- }else if(choswayflag == "2"){//병원구급차
- choswaycd = "0038986001";
- }else if(choswayflag == "3"){//기타구급차
- choswaycd = "0035601001";
- }else if(choswayflag == "4"){//경찰차 등 공공차량
- choswaycd = "0038978001";
- }else if(choswayflag == "5"){//항공이송
- choswaycd = "0038983001";
- }else if(choswayflag == "6"){//기타 자동차
- choswaycd = "0038984001";
- }else if(choswayflag == "7"){//도보
- choswaycd = "0002199001";
- }else if(choswayflag == "8"){//기타
- choswaycd = "0002141001";
- }else if(choswayflag == "9"){//미상
- choswaycd = "0017158001";
- }
- if(!utlf_isNull(choswayflag)){
- itemVal4.rectermcd = choswaycd;
- ivwObj.setFormItemValue("0000169", itemVal4);
- }
-
-
- //2010.05.10 김달현 추가
- //내원경로(M0118)
- var itemVal5 = new ITEMVAL();
- var chospathflag = ds_ertriage.getColumn(0, "chospathflag");
- var chospathcd, chospathnm;
- if(chospathflag == "1"){//직접내원
- chospathcd = "0000374001";
- }else if(chospathflag == "2"){//외부에서 전원
- chospathcd = "0038982001";
- }else if(chospathflag == "3"){//외래에서 의뢰
- chospathcd = "0038987001";
- }else if(chospathflag == "8"){//기타
- chospathcd = "0002141001";
- }else if(chospathflag == "9"){//미상
- chospathcd = "0017158001";
- }
- if(!utlf_isNull(chospathflag)){
- itemVal5.rectermcd = chospathcd;
- ivwObj.setFormItemValue("0023492", itemVal5);
- }
- }
-
- //신체검진
- if (ivwObj.name == "ivw_0000570001" && !utlf_isNull(ivwObj.url))
- {
- //분당맥박수
- var itemVal = new ITEMVAL();
- var mntpulsecnt = ds_ertriage.getColumn(0, "mntpulsecnt");
- itemVal.reccnts = mntpulsecnt;
- ivwObj.setFormItemValue("0000879.0001221.0000258", itemVal);
-
- //분당호흡수
- itemVal = new ITEMVAL();
- var mntbrethcnt = ds_ertriage.getColumn(0, "mntbrethcnt");
- itemVal.reccnts = mntbrethcnt;
- ivwObj.setFormItemValue("0000879.0001221.0000993", itemVal);
-
- //내원시체온
- itemVal = new ITEMVAL();
- var chosbdtp = ds_ertriage.getColumn(0, "chosbdtp");
- itemVal.reccnts = chosbdtp;
- ivwObj.setFormItemValue("0000879.0001221.0000992", itemVal);
-
- //수축기혈압
- itemVal = new ITEMVAL();
- var highbp = ds_ertriage.getColumn(0, "highbp");
- itemVal.reccnts = highbp;
- ivwObj.setFormItemValue("0000879.0001221.0001180.0000525", itemVal);
-
- //이완기혈압
- itemVal = new ITEMVAL();
- var lowbp = ds_ertriage.getColumn(0, "lowbp");
- itemVal.reccnts = lowbp;
- ivwObj.setFormItemValue("0000879.0001221.0001180.0000791", itemVal);
-
- //산소포화도
- itemVal = new ITEMVAL();
- var oxyconcen = ds_ertriage.getColumn(0, "oxyconcen");
- itemVal.reccnts = oxyconcen;
- ivwObj.setFormItemValue("0000879.0001221.0005957", itemVal);
-
- //2010.05.10 김달현 추가
- //의식(AVPU Scale)
- itemVal = new ITEMVAL();
- var cscsflag = ds_ertriage.getColumn(0, "cscsflag");
- var cscscd, cscsnm;
- if(cscsflag == "A"){//Alert
- cscscd = "0000544";
- }else if(cscsflag == "V"){//Verbal response
- cscscd = "0014272";
- }else if(cscsflag == "P"){//Painful response
- cscscd = "0015321";
- }else if(cscsflag == "U"){//Unresponsive
- cscscd = "0038958";
- }
-
- if(!utlf_isNull(cscscd)){
- itemVal.rectermcd = cscscd;
- ivwObj.setFormItemValue("0000900.0000898.0023476", itemVal);
- }
-
- }
- // knuh_20110708_추가_text박스인 경우는 내용으로 셋팅하기 위함.
- // 신체검진에서 가져와야 되는 항목 : 내원수단, 의식, VS(수축기혈압, 이완기혈압, 분당맥박수, 분당호흡수, 내원시 체온)
- else if (ivwObj.name == "ivw_0000570001" && utlf_isNull(ivwObj.url))
- {
- var pid = "";
- var choswayflagnm = ""; // 내원수단
- var cscsflagnm = ""; // 의식
- var highbp = ""; // 수축기혈압
- var lowbp = ""; // 이완기혈압
- var mntpulsecnt = ""; // 분당맥박수
- var mntbrethcnt = ""; // 분당호흡수
- var chosbdtp = ""; // 내원시 체온
-
- // triage 내용
- var reccnts_old = "";
- var reccnts = "";
-
- // triage 정보 2번 가져오는 부분 체크(신규일때 현병력 화면 크기 조절시)
- //alert(ImgeYN);
- if (ImgeYN == "Y")
- {
- var nFindRow = ds_data_recitem.findRow("fstlevlitemcd", "0000570001");
- reccnts_old = ds_data_recitem.getColumn(nFindRow, "reccnts");
-
- if (!utlf_isNull(reccnts_old))
- {
- reccnts_old = reccnts_old + "\n" + "\n";
- }
-
- pid = ds_ertriage.getColumn(0, "pid");
-
-
-
- if (utlf_isNull(pid))
- {
- //sysf_messageBox("Triage 기록이 작성되지", "E007");
-
- }
- else
- {
- choswayflagnm = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "choswayflagnm"));
- cscsflagnm = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "cscsflagnm"));
- highbp = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "highbp"));
- lowbp = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "lowbp"));
- mntpulsecnt = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mntpulsecnt"));
- mntbrethcnt = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mntbrethcnt"));
- chosbdtp = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "chosbdtp"));
-
- reccnts = reccnts_old +
- "내원수단 : " + choswayflagnm + "\n" +
- "의식 : " + cscsflagnm + "\n" +
- "수축기혈압 : " + highbp + "\n" +
- "이완기혈압 : " + lowbp + "\n" +
- "분당맥박수 : " + mntpulsecnt + "\n" +
- "분당호흡수 : " + mntbrethcnt + "\n" +
- "내원시 체온 : " + chosbdtp;
-
- //model.setValue("/root/main/recinfo/recitem[fstlevlitemcd='0000570001']/reccnts", reccnts);
- var tarObj = ComnFormObj.components["tar_0000570001"];
- var nRow = ds_data_recitem.findRowExpr("degnitemkind == 'MTX' && fstlevlitemcd == '0000570001' && degnitemlevlno == '1'");
- ds_data_recitem.setColumn(nRow, "reccnts", reccnts);
- tarObj.value = reccnts;
-
- }
-
- }
- }
-
- }
- /****************************************************************************************
- * Function : fPopEduDsch_SMMMR00701
- * Description : 퇴원요구도/교육요구도 jci 팝업 호출
- * retrun type :
- * Creator :
- ****************************************************************************************/
- function fPopEduDsch_SMMMR00701(){
-
- var pid = parent.fGetPamInfo("pid");
- var indd = parent.fGetPamInfo("indd");
- var cretno = parent.fGetPamInfo("cretno");
-
- this.frmf_setParameter("SPMRJ00300_pid", pid);
- this.frmf_setParameter("SPMRJ00300_orddd", indd);
- this.frmf_setParameter("SPMRJ00300_cretno", cretno);
-
- frmf_modal("SPMRJ00300", "SPMRJ00300", null, null, 1, 0, 0, null, null, null, null, null, "M");
- }
- /****************************************************************************************
- * Function : getSubmitID_MMR01300I
- * Description : MMR01300.js에서 submit직전에 submitID를 설정하기 위해서 호출한다.
- * retrun type :
- ****************************************************************************************/
- function getSubmitID_MMR01300I() {
- parent.fSetFormRec("addexecflag", "careplan");
-
- //2010.02.23 dhkim - 통합기록조회용 JCI구분자추가(fSetXsltFlag없애고 getSubmitID_MMR01300I로 이동)
- parent.fSetFormRec("xsltflag", "JCI2");
-
- return TX_SUBMIT_EXTN_FORM;
- }
- /****************************************************************************************
- * Function : initFormAtLast_MMR01100I
- * Description : MMR01100.js에서 서식load를 완료한 후에 호출한다.
- * retrun type :
- ****************************************************************************************/
- function initFormAtLast_MMR01100I() {
- try{
- //grup_base.ivw_0013328001.fAddrow();
-
- if (parent.fGetFormRec("status") == "C") {
-
- fSetTriageValue_MMR00701("A", true);
- fSetTriageValue_MMR00701("C", false);
- fSetTriageValue_MMR00701("B", false);
-
- gImge = "N";
- }
- lodedYn = true;
-
- }catch(e){
- sysf_catchTrace(e);
- }
-
- }
- /****************************************************************************************
- * Function : fSetTriageValue_MMR00701
- * Description : Triage 입력내용을 설정한다.
- * retrun type :
- ****************************************************************************************/
- function fSetTriageValue_MMR00701(flag, isSubmit, ibuttnyn) {
- if (utlf_isNull(isSubmit)) {
- isSubmit = true;
- }
-
- if (utlf_isNull(ibuttnyn))
- {
- if (gImge == "N")
- {
- ibuttnyn = "N";
- }
- else
- {
- ibuttnyn = "Y";
- }
- }
-
- var isSet = true;
- if (isSubmit) {
-
- ds_send_reqdata.clearData();
- ds_send_reqdata.addRow();
- ds_send_reqdata.setColumn(0, "pid", parent.fGetFormRec("pid"));
- ds_send_reqdata.setColumn(0, "orddd", parent.fGetFormRec("orddd"));
- ds_send_reqdata.setColumn(0, "cretno", parent.fGetFormRec("cretno"));
- ds_send_reqdata.setColumn(0, "queryflag", "K");
-
- var oParam = {};
- oParam.id = "TRMNE04403";
- oParam.service = "ercareapp.ERInRmOutRmMngt";
- oParam.method = "reqGetERTriagePatInfo";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_ertriage=ertriage";
- oParam.async = false;
- oParam.progress = false;
- oParam.callback = "cf_TRMNE04403";
- tranf_submit(oParam);
-
- if( arErrorCode.pop("TRMNE04403") > -1 ){
- isSet = true;
- }else{
- isSet = false;
- }
- }
-
- if (flag == "A") {
- //주호소
- if(isSet) {
- if( lodedYn == false ){
- this.setTimer(7030, 500);
- }else{
- fSetCC();
- }
- }
- } else if (flag == "B") {
- //현병력
- if(isSet) {
- if( lodedYn == false ){
- this.setTimer(7031, 500);
- }else{
- var iobj = ComnFormObj.components["ivw_0001173001"];
- fSetErTriageRec(iobj, "0001173");
- }
- }
- } else if (flag == "C") {
- //신체검진
- if(isSet) {
- if( lodedYn == false ){
- gIbuttnyn = ibuttnyn;
- this.setTimer(7032, 500);
- }else{
- var iobj = ComnFormObj.components["ivw_0000570001"];
- fSetErTriageRec(iobj, "0000570", ibuttnyn);
- }
- }
- }
- }
- function cf_TRMNE04403(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- ]]></Script>
|