123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928 |
- var gItemCds = new Array("0000931001", "0001173001", "0000098001", "0000079001", "0000570001", "0000553001", "0001019001", "0000080001");
- var gItemCdsTextArea = new Array("0001173001", "0000098001", "0000079001", "0000570001", "0000553001", "0000080001");
- /**
- * @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_etcrec_0000080001");
- /**
- * @desc : 초기 화면 설정
- * @id :
- * @event : xforms-ready
- * @return : void
- * @authur : 박종훈
- */
- function fFormReady_old()
- {
- InitSetMaxSizeSection(gItemCds, 0, 683);
- InitBtnImge(gItemCds);
- InitBtnComn(gItemCds);
- }
- /**
- * @desc : 서식 불러오기, 부분 그리드서식 사이즈 초기화
- * @id :
- * @event : xforms-ready
- * @return : void
- * @authur : 박종훈
- */
- function fLoadForm_old()
- {
- var cboObj;
- for (var i = 0; i < gItemCds.length; i++)
- {
- cboObj = document.controls("cbo_" + gItemCds[i]);
- if (cboObj != null)
- SetUnitFormList(cboObj, gItemCds[i])
- }
- InitLoadSection(gItemCdsTextArea);
- InitSetUnitForm(new Array("0000931001", "0001019001"), false);
- }
- /**
- * @desc : 기록데이터 조회
- * @id :
- * @event : xforms-ready
- * @return : void
- * @authur : 박종훈
- */
- function fLoadData()
- {
- InitPgmFormData();
- InitUnitFormData(gItemCds);
- }
- /**
- * @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);
- }
- /**
- * @desc : 저장전 체크 로직
- * @id :
- * @event : xforms-ready
- * @return : void
- * @authur : 박종훈
- */
- function fChkPreSave()
- {
- return ivw_0000931001.window.javascript.fChkGrdPreSave();
- }
- /**
- * @desc : 서식 진단명 사이즈 조절
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetSizeFormDiag()
- {
- ivw_0001019001.window.javascript.fInitPage(false, parseInt(ivw_0001019001.attribute("height")), parseInt(ivw_0001019001.attribute("width")));
- }
- /**
- * @desc : 서식 주호소 사이즈 조절
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetSizeFormCC()
- {
- ivw_0000931001.window.javascript.fInitPage(false, parseInt(ivw_0000931001.attribute("height")), parseInt(ivw_0000931001.attribute("width")));
- }
- /*****************************************************************************
- 튜닝
- ******************************************************************************/
- var gLoadFormCnts = 0;
- /**
- * @group :
- * @ver : 2008.06.13
- * @by : snoweye
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 화면 로딩후 초기화 작업 수행
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fFormReady()
- {
- mmbfGetHardCodeInfoNm("/root/send/formhrdcd", "/root/mappingcd/inten", 1009); //의도성
- mmbfGetHardCodeInfoNm("/root/send/formhrdcd", "/root/mappingcd/injmech", 1010); //손상기전
- mmbfGetHardCodeInfoNm("/root/send/formhrdcd", "/root/mappingcd/proc", 1011); //보호장구
-
- //트리아제 기록 연동데이터 조회(2009-05-21 박종훈)
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/pid" , parent.window.javascript.fGetFormRec("pid"));
- model.makeValue("/root/send/reqdata/orddd", parent.window.javascript.fGetFormRec("orddd"));
- model.makeValue("/root/send/reqdata/cretno", parent.window.javascript.fGetFormRec("cretno"));
- model.makeValue("/root/send/reqdata/queryflag", "K");
-
- // submit("TRMNE04403");
-
- grup_base.attribute("border-style") = "none";
- setSectionSize(gItemCds, 0, 683);
- dispOnLoadComplete(COMN_FORM);
- InitBtnImge(gItemCds);
- InitBtnFmy(gItemCds);
- InitBtnDiag("0001019001");
- InitBtnEtcRec(gItemCds);
- //2010.01.21
- initCmbExtnList(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 = getParameter("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 == '0000931001')
- {
- fSetSizeFormCC();
- //주호소는 미리 셋팅
- // fSetCC();
- }
- //진단명 부분서식 로딩후 처리
- // 2009.12.16 추정진단 서식에는 그리드가 없으므로 일단 보류
- // if(fstLevlItemCd == '0001019001')
- // fSetSizeFormDiag();
- gLoadFormCnts++;
- if(gItemCds.length == gLoadFormCnts)
- {
- if (parent.window.javascript.fGetFormRec("status") == "C")
- {
- SetDefFocusMTX(gItemCds);
- }
-
- dispOnLoadComplete(UNIT_FORM);
- }
- }
- /**
- * @group :
- * @ver : 2008.11.28
- * @by : jonghun
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 동일 서식이 떠있을 경우 내부 인스턴스 로딩 후 디폴트 조회내용 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetDefData()
- {
- if (parent.window.javascript.fGetFormRec("status") == "C")
- {
- // //트리아제 기록 연동데이터 조회(2009-05-21 박종훈)
- // model.removeNodeset("/root/send/reqdata");
- // model.makeValue("/root/send/reqdata/pid" , parent.window.javascript.fGetFormRec("pid"));
- // model.makeValue("/root/send/reqdata/orddd", parent.window.javascript.fGetFormRec("orddd"));
- // model.makeValue("/root/send/reqdata/cretno", parent.window.javascript.fGetFormRec("cretno"));
- // model.makeValue("/root/send/reqdata/queryflag", "K");
- //
- // if(submit("TRMNE04403"))
- // {
- // //주호소는 미리 셋팅
- // fSetCC();
- // var iobj = document.controls("ivw_0001173001");
- // var iobj1 = document.controls("ivw_0000570001");
- // fSetErTriageRec(iobj, "0001173");
- // fSetErTriageRec(iobj1, "0000570");
- // }
-
- SetDefFocusMTX(gItemCds);
- }
-
- dispOnLoadComplete(UNIT_FORM);
- }
- /**
- * @group :
- * @ver : 2008.11.28
- * @by : jonghun
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 주호소 트리아제 연동
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetCC()
- {
- 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(ivwObj, levlcd)
- {
- // if (parent.window.javascript.fGetFormRec("status") != "C")
- // {
- // return;
- // }
-
- //현병력
- if (ivwObj.attribute("id") == "ivw_0001173001" && ivwObj.src != "")
- {
- //의도성
- var itemVal = new ITEMVAL();
- var intenflag = model.getValue("/root/interface/ertriage/ertriage/intenflag"); //의도성코드
- if (intenflag != "" && intenflag != "-")
- {
- var intntermcd = model.getValue("/root/mappingcd/inten/hardcd[hardcd = '" + intenflag + "']/hardcdnm");
- var intntermnm = ivwObj.model.getValue("/root/main/forminfo/vallist[grupcd = '0001775002' and valcd = '" + intntermcd + "']/valitemnm");
- itemVal.rectermcd = intntermcd;
- itemVal.rectermnm = intntermnm;
- if (levlcd != null)
- {
- ivwObj.window.javascript.setFormItemValue(levlcd + ".0001667", itemVal, true);
- }
- else
- {
- ivwObj.window.javascript.setFormItemValue("0001667", itemVal, true);
- }
- }
-
- //손상기전
- var itemVal1 = new ITEMVAL();
- var injmechflag = model.getValue("/root/interface/ertriage/ertriage/injmechflag"); //손상기전코드
- if (injmechflag != "" && injmechflag != "-")
- {
- var injmechcd = model.getValue("/root/mappingcd/injmech/hardcd[hardcd = '" + injmechflag + "']/hardcdnm");
- var injmechnm = ivwObj.model.getValue("/root/main/forminfo/vallist[grupcd = '0001776002' and valcd = '" + injmechcd + "']/valitemnm");
- itemVal1.rectermcd = injmechcd;
- itemVal1.rectermnm = injmechnm;
- if (levlcd != null)
- {
- ivwObj.window.javascript.setFormItemValue(levlcd + ".0020479", itemVal1, true);
- }
- else
- {
- ivwObj.window.javascript.setFormItemValue("0020479", itemVal1, true);
- }
- }
-
- //보호장구
- var itemVal2 = new ITEMVAL();
- var proceqmtflag = model.getValue("/root/interface/ertriage/ertriage/proceqmtflag"); //보호장구
- if (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 = model.getValue("/root/mappingcd/proc/hardcd[hardcd = '" + arrProceqmtflag[i] + "']/hardcdnm");
- tmpProceqmtnm = ivwObj.model.getValue("/root/main/forminfo/vallist[grupcd = '0001774002' and valcd = '" + tmpProceqmtcd + "']/valitemnm");
-
- proceqmtcd += tmpProceqmtcd + " ";
- proceqmtnm += tmpProceqmtnm + "▦";
- }
-
- itemVal2.rectermcd = proceqmtcd.substring(0, proceqmtcd.length - 1);
- itemVal2.rectermnm = proceqmtnm.substring(0, proceqmtnm.length - 1);
-
- if (levlcd != null)
- {
- ivwObj.window.javascript.setFormItemValue(levlcd + ".0020478", itemVal2, true);
- }
- else
- {
- ivwObj.window.javascript.setFormItemValue("0020478", itemVal2, true);
- }
- }
- }
-
- //2010.05.10 김달현 추가
- //내원사유(M0120)
- var itemVal3 = new ITEMVAL();
- var chosresnflag = model.getValue("/root/interface/ertriage/ertriage/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(chosresnflag != null && chosresnflag != ""){
- itemVal3.rectermcd = chosresncd;
- itemVal3.rectermnm = chosresnnm;
- if (levlcd != null)
- {
- ivwObj.window.javascript.setFormItemValue(levlcd + ".0019376", itemVal3, true);
- }
- else
- {
- ivwObj.window.javascript.setFormItemValue("0019376", itemVal3, true);
- }
- }
-
-
- //2010.05.10 김달현 추가
- //내원수단(M0119)
- var itemVal4 = new ITEMVAL();
- var choswayflag = model.getValue("/root/interface/ertriage/ertriage/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";
- }
- choswaynm = ivwObj.window.javascript.model.getValue("/root/main/forminfo/vallist[valcd='"+choswaycd+"']/valitemnm");
- if(choswayflag != null && choswayflag != ""){
- itemVal4.rectermcd = choswaycd;
- itemVal4.rectermnm = choswaynm;
- if (levlcd != null)
- {
- ivwObj.window.javascript.setFormItemValue(levlcd + ".0000169", itemVal4, true);
- }
- else
- {
- ivwObj.window.javascript.setFormItemValue("0000169", itemVal4, true);
- }
- }
-
-
- //2010.05.10 김달현 추가
- //내원경로(M0118)
- var itemVal5 = new ITEMVAL();
- var chospathflag = model.getValue("/root/interface/ertriage/ertriage/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";
- }
- chospathnm = ivwObj.window.javascript.model.getValue("/root/main/forminfo/vallist[valcd='"+chospathcd+"']/valitemnm");
-
- if(chospathflag != null && chospathflag != ""){
- itemVal5.rectermcd = chospathcd;
- itemVal5.rectermnm = chospathnm;
- if (levlcd != null)
- {
- ivwObj.window.javascript.setFormItemValue(levlcd + ".0023492", itemVal5, true);
- }
- else
- {
- ivwObj.window.javascript.setFormItemValue("0023492", itemVal5, true);
- }
- }
-
-
- }
-
-
- //신체검진
- if (ivwObj.attribute("id") == "ivw_0000570001" && ivwObj.src != "")
- {
- //분당맥박수
- var itemVal = new ITEMVAL();
- var mntpulsecnt = model.getValue("/root/interface/ertriage/ertriage/mntpulsecnt");
- itemVal.reccnts = mntpulsecnt;
- if (levlcd != null)
- {
- ivwObj.window.javascript.setFormItemValue(levlcd + ".0000879.0001221.0000258", itemVal, true);
- }
- else
- {
- ivwObj.window.javascript.setFormItemValue("0000879.0001221.0000258", itemVal, true);
- }
-
- //분당호흡수
- itemVal = new ITEMVAL();
- var mntbrethcnt = model.getValue("/root/interface/ertriage/ertriage/mntbrethcnt");
- itemVal.reccnts = mntbrethcnt;
- if (levlcd != null)
- {
- ivwObj.window.javascript.setFormItemValue(levlcd + ".0000879.0001221.0000993", itemVal, true);
- }
- else
- {
- ivwObj.window.javascript.setFormItemValue("0000879.0001221.0000993", itemVal, true);
- }
-
- //내원시체온
- itemVal = new ITEMVAL();
- var chosbdtp = model.getValue("/root/interface/ertriage/ertriage/chosbdtp");
- itemVal.reccnts = chosbdtp;
- if (levlcd != null)
- {
- ivwObj.window.javascript.setFormItemValue(levlcd + ".0000879.0001221.0000992", itemVal, true);
- }
- else
- {
- ivwObj.window.javascript.setFormItemValue("0000879.0001221.0000992", itemVal, true);
- }
-
- //수축기혈압
- itemVal = new ITEMVAL();
- var highbp = model.getValue("/root/interface/ertriage/ertriage/highbp");
- itemVal.reccnts = highbp;
- if (levlcd != null)
- {
- ivwObj.window.javascript.setFormItemValue(levlcd + ".0000879.0001221.0001180.0000525", itemVal, true);
- }
- else
- {
- ivwObj.window.javascript.setFormItemValue("0000879.0001221.0001180.0000525", itemVal, true);
- }
-
- //이완기혈압
- itemVal = new ITEMVAL();
- var lowbp = model.getValue("/root/interface/ertriage/ertriage/lowbp");
- itemVal.reccnts = lowbp;
- if (levlcd != null)
- {
- ivwObj.window.javascript.setFormItemValue(levlcd + ".0000879.0001221.0001180.0000791", itemVal, true);
- }
- else
- {
- ivwObj.window.javascript.setFormItemValue("0000879.0001221.0001180.0000791", itemVal, true);
- }
-
- //산소포화도
- itemVal = new ITEMVAL();
- var oxyconcen = model.getValue("/root/interface/ertriage/ertriage/oxyconcen");
- itemVal.reccnts = oxyconcen;
- if (levlcd != null)
- {
- ivwObj.window.javascript.setFormItemValue(levlcd + ".0000879.0001221.0005957", itemVal, true);
- }
- else
- {
- ivwObj.window.javascript.setFormItemValue("0000879.0001221.0005957", itemVal, true);
- }
-
- //2010.05.10 김달현 추가
- //의식(AVPU Scale)
- itemVal = new ITEMVAL();
- var cscsflag = model.getValue("/root/interface/ertriage/ertriage/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";
- }
- cscsnm = ivwObj.window.javascript.model.getValue("/root/main/forminfo/vallist[valcd='" + cscscd + "']/valitemnm");
-
- if(cscscd != null && cscscd != ""){
- itemVal.rectermcd = cscscd;
- itemVal.rectermnm = cscsnm;
- if(levlcd != null){
- ivwObj.window.javascript.setFormItemValue(levlcd + ".0000900.0000898.0023476", itemVal, true);
- }else{
- ivwObj.window.javascript.setFormItemValue("0000900.0000898.0023476", itemVal, true);
- }
- }
-
- }
- }
- /**
- * MMR01100.js에서 서식load를 완료한 후에 호출한다.
- * @return
- */
- function initFormAtLast_MMR01100I() {
- if (parent.window.javascript.fGetFormRec("status") == "C") {
- fSetTriageValue_MMR00700("A", true);
- fSetTriageValue_MMR00700("B", false);
- fSetTriageValue_MMR00700("C", false);
- }
- }
- /**
- * Triage 입력내용을 설정한다.
- * @param flag
- * <li>A : 주호소
- * <li>B : 신체검진
- * @return
- */
- function fSetTriageValue_MMR00700(flag, isSubmit) {
- if (isSubmit == null) {
- isSubmit = true;
- }
-
- var isSet = true;
- if (isSubmit) {
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/pid" , parent.window.javascript.fGetFormRec("pid"));
- model.makeValue("/root/send/reqdata/orddd", parent.window.javascript.fGetFormRec("orddd"));
- model.makeValue("/root/send/reqdata/cretno", parent.window.javascript.fGetFormRec("cretno"));
- model.makeValue("/root/send/reqdata/queryflag", "K");
-
- isSet = submit("TRMNE04403");
- }
-
- if (flag == "A") {
- //주호소
- if(isSet) {
- fSetCC();
- }
- } else if (flag == "B") {
- //현병력
- if(isSet) {
- var iobj = document.controls("ivw_0001173001");
- fSetErTriageRec(iobj, "0001173");
- }
- } else if (flag == "C") {
- //신체검진
- if(isSet) {
- var iobj = document.controls("ivw_0000570001");
- fSetErTriageRec(iobj, "0000570");
- }
- }
- }
|