MMR00705.xjs 63 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Script type="xscript4.0"><![CDATA[/**
  3. * MMR00705.js
  4. * SMMMR00705_응급기록JCI.xrw
  5. * 2016.11.09 이윤주
  6. */
  7. /**
  8. * @desc : [item코드목록]
  9. * "0000931001"//주호소
  10. * "0001173001"//현병력
  11. * "0000098001"//과거력
  12. * "0000969001"//통증
  13. * "0000079001"//계통문진
  14. * "0000570001"//신체검진
  15. * "0000553001"//신경학적검사
  16. * "0001019001"//추정진단
  17. * "0022826001"//care plan
  18. * "0013328001"//퇴원계획
  19. * [버튼목록]
  20. * "btn_imge_0001173001" //현병력 이미지버튼
  21. * "btn_etcrec_0001173001" //현병력 추가기록버튼
  22. * "btn_imge_0000098001" //과거력 이미지버튼
  23. * "btn_fmy_0000098001" //과거력 가계도버튼
  24. * "btn_etcrec_0000098001" //과거력 추가기록버튼
  25. * "btn_imge_0000079001" //계통문진 이미지버튼
  26. * "btn_etcrec_0000079001" //계통문진 추가기록버튼
  27. * "btn_imge_0000570001" //신체검진 이미지버튼
  28. * "btn_etcrec_0000570001" //신체검진 추가기록버튼
  29. * "btn_imge_0000553001" //신경학적검사 이미지버튼
  30. * "btn_etcrec_0000553001" //신경학적검사 추가기록버튼
  31. * "btn_etcrec_0001019001" //추정진단 추가기록버튼
  32. * "btn_dsch_0013328001" //퇴원계획 퇴원요구도버튼
  33. */
  34. var gItemCds = new Array(
  35. "0000931001"//주호소
  36. , "0000969001"//통증
  37. , "0001173001"//현병력
  38. , "0000098001"//과거력
  39. , "0000079001"//계통문진
  40. , "0000570001"//신체검진
  41. , "0000553001"//신경학적검사
  42. , "0001019001"//추정진단
  43. , "0022826001"//care plan
  44. , "0013328001"//퇴원계획
  45. );
  46. var gItemCdsTextArea = new Array(
  47. "0000931001"//주호소
  48. , "0001173001"//현병력
  49. , "0000098001"//과거력
  50. , "0000969001"//통증
  51. , "0000079001"//계통문진
  52. , "0000570001"//신체검진
  53. , "0000553001"//신경학적검사
  54. , "0001019001"//추정진단
  55. , "0022826001"//care plan
  56. , "0013328001"//퇴원계획
  57. );
  58. /**
  59. * @desc : 확장버튼(이미지,가계도,추가기록)을 기록여부에 따라 표시를 위한 버튼목록
  60. * @id :
  61. * @authur : 안치원
  62. * @history : 2009.09.09 신규 안치원 ACW_090909A
  63. */
  64. var gExtnBtnIds = new Array(
  65. "btn_imge_0001173001" //현병력 이미지버튼
  66. , "btn_etcrec_0001173001" //현병력 추가기록버튼
  67. , "btn_imge_0000098001" //과거력 이미지버튼
  68. , "btn_fmy_0000098001" //과거력 가계도버튼
  69. , "btn_etcrec_0000098001" //과거력 추가기록버튼
  70. , "btn_imge_0000079001" //계통문진 이미지버튼
  71. , "btn_etcrec_0000079001" //계통문진 추가기록버튼
  72. , "btn_imge_0000570001" //신체검진 이미지버튼
  73. , "btn_etcrec_0000570001" //신체검진 추가기록버튼
  74. , "btn_imge_0000553001" //신경학적검사 이미지버튼
  75. , "btn_etcrec_0000553001" //신경학적검사 추가기록버튼
  76. , "btn_etcrec_0001019001" //추정진단 추가기록버튼
  77. , "btn_dsch_0013328001" //퇴원계획 퇴원요구도버튼
  78. );
  79. var gLoadFormCnts = 0;
  80. // knuh_20110713_추가(신체검진의 triage 정보 조회시 2번 가져오는 부분을 체크하기 위함)
  81. var gImge = "";
  82. var gIbuttnyn = "";
  83. var lodedYn = false;
  84. /****************************************************************************************
  85. * Function : fFormReady()
  86. * Description : 화면 로딩후 초기화 작업 수행
  87. * retrun type :
  88. ****************************************************************************************/
  89. function fFormReady()
  90. {
  91. var sIntenNm = dsf_createDs("ds_inten", []);
  92. var oIntenDs = this.objects[sIntenNm];
  93. var sInjmechNm = dsf_createDs("ds_injmech", []);
  94. var oInjmechDs = this.objects[sInjmechNm];
  95. var sProcNm = dsf_createDs("ds_proc", []);
  96. var oProcDs = this.objects[sProcNm];
  97. lf_getHardCDList("N", 1009, null, oIntenDs);
  98. lf_getHardCDList("N", 1010, null, oInjmechDs);
  99. lf_getHardCDList("N", 1011, null, oProcDs);
  100. //트리아제 기록 연동데이터 조회(2009-05-21 박종훈)
  101. var sSendReqdataNm = dsf_createDsRow("ds_send_reqdata", [{col: "pid", type:"string", size:256, val:parent.fGetFormRec("pid")}
  102. , {col: "orddd", type:"string", size:256, val:parent.fGetFormRec("orddd")}
  103. , {col: "cretno", type:"string", size:256, val:parent.fGetFormRec("cretno")}
  104. , {col: "queryflag", type:"string", size:256, val: "K"}]);
  105. var sErtriageNm = dsf_createDs("ds_ertriage", [{col: "status", type:"string", size:256}]);
  106. var oParam = {};
  107. oParam.id = "TRMNE04403";
  108. oParam.service = "ercareapp.ERInRmOutRmMngt";
  109. oParam.method = "reqGetERTriagePatInfo";
  110. oParam.inds = "req="+sSendReqdataNm;
  111. oParam.outds = sErtriageNm+"=ertriage";
  112. oParam.async = true;
  113. oParam.progress = false;
  114. //oParam.callback = "cf_TRMNE04403";
  115. tranf_submit(oParam);
  116. this.ComnFormObj = this.grup_base;
  117. dsf_createDsRow("ds_temp_mainrecitem",
  118. [{col:"formxrw", val:""}]);
  119. // 공통서식의 초기 recitem 정보. 기록 데이터 조합시 사용
  120. ds_temp_mainrecitem.assign(ds_data_recitem);
  121. //섹션사이즈초기화
  122. lf_setSectionSize(gItemCds, "grup_base.tar_0000931001", "grup_base.tar_0013328001");
  123. //섹션별 버튼초기화
  124. InitBtnImge(gItemCds);
  125. InitBtnFmy(gItemCds);
  126. InitBtnDiag("0001019001");
  127. InitBtnEtcRec(gItemCds);
  128. //기본 첫번째 부분서식을 로딩해서 보여준다.
  129. // dispOnLoadComplete(COMN_FORM);//COMN_FORM : 1
  130. // lf_checkUnitForm(gItemCds); // 부분서식 로딩
  131. lf_AllLoadUnitFormExpand(gItemCds); // 전체 로드
  132. //폼레디 완료 후 MMRCommon.js의 initSection()에서 로딩되지 않은 부분서식 로딩한다.
  133. //loadUnitForm_MMR00701(gItemCds);
  134. //2010.01.21, hkjoo
  135. // initCmbExtnList(gItemCds);
  136. lf_setRecData(gItemCds);
  137. }
  138. /**
  139. * @desc : 기록데이터 조회
  140. * @id :
  141. * @event : xforms-ready
  142. * @return : void
  143. * @authur : 박종훈
  144. */
  145. function fLoadData()
  146. {
  147. lf_setRecData(gItemCds);
  148. // InitPgmFormData();
  149. // InitUnitFormData(gItemCds);
  150. }
  151. /**
  152. * @group :
  153. * @ver : 2008.06.13
  154. * @by : snoweye
  155. * @---------------------------------------------------
  156. * @type : function
  157. * @access : private
  158. * @desc : 부분서식 로딩
  159. * @param :
  160. * @return :
  161. * @---------------------------------------------------
  162. */
  163. function fLoadUnitForm()
  164. {
  165. initSection(gItemCds);
  166. }
  167. /**
  168. * @group :
  169. * @ver : 2008.06.13
  170. * @by : snoweye
  171. * @---------------------------------------------------
  172. * @type : function
  173. * @access : private
  174. * @desc : 부분서식 로딩후 후처리
  175. * @param :
  176. * @return :
  177. * @---------------------------------------------------
  178. */
  179. function fOnLoadComplete()
  180. {
  181. var curLoadFormCd = this.frmf_getParameter("loadformcd");
  182. var arrUnitformmast = objExt.findRows(ds_data_unitformmast, "formcd", curLoadFormCd);
  183. var fstLevlItemCd = "";
  184. for (var i=0; i<arrUnitformmast.length; i++) {
  185. var unitformload = ds_data_unitformmast.getColumn(arrUnitformmast[i], "loaded");
  186. if (unitformload != "true") {
  187. fstLevlItemCd = ds_data_unitformmast.getColumn(arrUnitformmast[i], "orgsupdegnitemcd");
  188. var ivwObj = ComnFormObj.components["ivw_" + fstLevlItemCd];
  189. if(!utlf_isNull(ivwObj))
  190. {
  191. var idx = ds_data_unitformmast.findRow("orgsupdegnitemcd", fstLevlItemCd );
  192. ds_data_unitformmast.setColumn(idx, "loaded", "true");
  193. // setFstLevlItemCdOnUnitForm(ivwObj, unitformmastDs.getColumn(i, "orgsupdegnitemno"));//부분서식의 아이템에 부분서식 상위코드를 세팅
  194. break;
  195. }
  196. }
  197. }
  198. //주호소 부분서식 로딩후 처리
  199. if(fstLevlItemCd == '0000931001')//주호소
  200. {
  201. fSetSizeFormCC();
  202. }
  203. //부분서식 로딩후 처리
  204. if(fstLevlItemCd == "0000931001" //주호소
  205. )
  206. fSetSizeFormCC(fstLevlItemCd);
  207. gLoadFormCnts++;
  208. utlf_addLog("@@@@@ gItemCds.length : " + gItemCds.length + " gLoadFormCnts : " + gLoadFormCnts );
  209. if(gItemCds.length == gLoadFormCnts)
  210. {
  211. dispOnLoadComplete(UNIT_FORM);
  212. //서식 로딩 후 포커스 처리
  213. if (parent.fGetFormRec("status") == "C")
  214. {
  215. SetDefFocusMTX(gItemCds);
  216. }
  217. }
  218. }
  219. /**
  220. * @group :
  221. * @ver : 2008.11.28
  222. * @by : jonghun
  223. * @---------------------------------------------------
  224. * @type : function
  225. * @access : private
  226. * @desc : 동일 서식이 떠있을 경우 내부 인스턴스 로딩 후 디폴트 조회내용 조회
  227. * @param :
  228. * @return :
  229. * @---------------------------------------------------
  230. */
  231. function fGetDefData()
  232. {
  233. dispOnLoadComplete(UNIT_FORM);
  234. if (parent.fGetFormRec("status") == "C")
  235. {
  236. SetDefFocusMTX(gItemCds);
  237. }
  238. }
  239. /**
  240. * @desc : 서식 주호소 사이즈 조절
  241. * @
  242. * @param :
  243. * @return :
  244. * @---------------------------------------------------
  245. */
  246. function fSetSizeFormCC(gItemCd_MMR00701)
  247. {
  248. //서식 주호소 화면 로딩
  249. if(gItemCd_MMR00701 == "0000931001")
  250. grup_base.ivw_0000931001.fInitPage(false, parseInt(grup_base.ivw_0000931001.position.height), parseInt(grup_base.ivw_0000931001.position.width));
  251. //Care Plan 화면 로딩
  252. else if(gItemCd_MMR00701 == "0022826001")//상용구팝업 hidden
  253. grup_base.ivw_0022826001.fInitPage(true, parseInt(grup_base.ivw_0022826001.position.height), parseInt(grup_base.ivw_0022826001.position.width));
  254. //퇴원계획화면 로딩
  255. else if(gItemCd_MMR00701 == "0013328001")//상용구팝업 visible
  256. grup_base.ivw_0013328001.fInitPage(false, parseInt(grup_base.ivw_0013328001.position.height), parseInt(grup_base.ivw_0013328001.position.width));
  257. }
  258. /**
  259. * @group :
  260. * @ver : 2009.12.04
  261. * @by : dhkim
  262. * @---------------------------------------------------
  263. * @type : function
  264. * @access : private
  265. * @desc : 부분서식 로딩
  266. * (0022826001) Care Plan,
  267. * (0013328001) 퇴원계획,
  268. * @param : gItemCds
  269. * @return :
  270. * @---------------------------------------------------
  271. */
  272. function loadUnitForm_MMR00701(itemCds){
  273. // var pageInfo = new PAGEINFO();
  274. // copyNodeset("/root/main", "/root/main", "replace", model, parent.model);
  275. // model.removeNodeset("/root/main/recinfo");
  276. //
  277. // makeRefByDegnitemno();
  278. for (var i = 0; i < itemCds.length; i++)
  279. {
  280. var nFindRow = ds_data_unitformmast.findRow("orgsupdegnitemcd", itemCds[i]);
  281. var formdegnseq = ds_data_unitformmast.getColumn(nFindRow, "formdegnseq");
  282. var unitformcd = ds_data_unitformmast.getColumn(nFindRow, "formcd");
  283. var ivwObj = ComnFormObj.components["ivw_" + itemCds[i]];
  284. var tarObj = ComnFormObj.components["tar_" + itemCds[i]];
  285. if( itemCds[i] == "0013328001" //퇴원계획
  286. ){
  287. var unitformprogflag = ds_data_unitformmast.getColumn(nFindRow, "formprogflag");
  288. ivwObj.supdegnitemcd = itemCds[i];
  289. ivwObj.unitformcd = unitformcd;
  290. sysf_trace(unitformcd + " Loading 시작 : " + utlf_getCurrentTime());
  291. loadUnitForm(ivwObj, itemCds[i]);
  292. lf_getComponentID(formdegnseq, itemCds[i]);
  293. sysf_trace(unitformcd + " Loading 끝 : " + utlf_getCurrentTime());
  294. }
  295. }
  296. }
  297. /**
  298. * @desc : care plan ivw 확대
  299. * @
  300. * @param :
  301. * @return :
  302. * @authur : dhkim
  303. */
  304. function expandSection_MMR00701(obj){
  305. var ctrlID = obj.name;
  306. var itemcd = ctrlID.replace("lbl_", "");
  307. var bFold = itemcd == gMaxSectionID ? true : false;
  308. var ctrl = null;
  309. var unitformcd = "";
  310. var itemCds = gItemCds;
  311. for (var i = 0; i < itemCds.length; i++)
  312. {
  313. var secCtrl = ComnFormObj.components["lbl_" + itemCds[i]];
  314. var nFindRow = ds_data_unitformmast.findRow("orgsupdegnitemcd", itemCds[i]);
  315. var formdegnseq = ds_data_unitformmast.getColumn(nFindRow, "formdegnseq");
  316. unitformcd = ds_data_unitformmast.getColumn(nFindRow, "formcd");
  317. if(utlf_isNull(formdegnseq))
  318. ctrl = ComnFormObj.components["tar_" + itemCds[i]];
  319. else
  320. ctrl = ComnFormObj.components["ivw_" + itemCds[i]];
  321. //20100106 dhkim ivw 축소/확장
  322. if(itemcd == itemCds[i]){
  323. if(bFold){
  324. ctrl.position.height = gMaxSectionHei;
  325. if (unitformcd == "0900006875")//care plan 상용구 hidden
  326. {
  327. ctrl.fInitPage(true, parseInt(gMaxSectionHei), parseInt(ctrl.position.width));
  328. }else{
  329. //ctrl.fInitPage(false, parseInt(gMaxSectionHei), parseInt(ctrl.position.width));
  330. }
  331. }else{
  332. ctrl.position.height = ctrl.orgheight;
  333. if (unitformcd == "0900006875")//care plan 상용구 hidden
  334. {
  335. ctrl.fInitPage(true, parseInt(secCtrl.orgheight), parseInt(ctrl.position.width));
  336. }else{
  337. //ctrl.fInitPage(false, parseInt(secCtrl.orgheight), parseInt(ctrl.position.width));
  338. }
  339. }
  340. }
  341. }
  342. }
  343. /**
  344. * @group :
  345. * @ver : 2009.10.09
  346. * @by :
  347. * @---------------------------------------------------
  348. * @type : function
  349. * @access : private
  350. * @desc :
  351. * @param :
  352. * @return :
  353. * @---------------------------------------------------
  354. */
  355. function setInterfaceData()
  356. {
  357. var ifItemCds = new Array(
  358. "0000931001"//주호소
  359. , "0001173001"//현병력
  360. , "0000098001"//과거력
  361. , "0000969001"//통증
  362. , "0000079001"//계통문진
  363. , "0000570001"//신체검진
  364. , "0000553001"//신경학적검사
  365. , "0001019001"//추정진단
  366. , "0022826001"//care plan
  367. , "0013328001"//퇴원계획
  368. );
  369. copyNodeset(gPageInfo.recItemRef2, "/root/main/recifinfo/recitem", "replace", model, parent.model);
  370. setSrchData(gPageInfo.recItemRef2 , window);
  371. InitUnitFormData(ifItemCds);
  372. setButtonToggleAllByRecYn(window, gExtnBtnIds);
  373. }
  374. /**
  375. * @desc : 서식 데이터 Clear
  376. * @
  377. * @param :
  378. * @return :
  379. * @authur : 박종훈
  380. */
  381. function fClearComnFormData()
  382. {
  383. if (gMaxSectionID != "")
  384. {
  385. var MaxObj = document.controls("lbl_" + gMaxSectionID);
  386. MaxObj.dispatch("onclick");
  387. }
  388. ClearComnFormData(gItemCds);
  389. clearData();
  390. //포커스 처리
  391. SetDefFocusMTX(gItemCds);
  392. }
  393. /**
  394. * @desc : 기록 인스턴스 연결
  395. * @
  396. * @param :
  397. * @return :
  398. * @authur : 박종훈
  399. */
  400. function fSetRecItemValue(reciteminfo)
  401. {
  402. return SetCommMediFormValue(gItemCds, reciteminfo);
  403. }
  404. /****************************************************************************************
  405. * Function : fChkPreSave
  406. * Description : 저장전 체크 로직
  407. * (주호소, care plan, 퇴원계획)필수체크
  408. * "0000931001"//주호소
  409. * "0022826001"//Care Plan
  410. * "0013328001"//퇴원계획
  411. * retrun type :
  412. ****************************************************************************************/
  413. function fChkPreSave()
  414. {
  415. var rtnVal = grup_base.ivw_0000931001.fChkGrdPreSave();//주호소 필수체크
  416. if(rtnVal == true){
  417. //2010.01.15 안치원 - 통증기록 필수입력 체크
  418. if (utlf_isNull(grup_base.ivw_0000969001.url) == false) {
  419. // debugger;
  420. var isValid = true;
  421. var degnitemnm = null;
  422. var itemval_vas = new ITEMVAL();
  423. var itemval_vas1 = new ITEMVAL();
  424. var itemval_vas2 = new ITEMVAL();
  425. var itemval_vas3 = new ITEMVAL();
  426. var itemval_vas4 = new ITEMVAL();
  427. var itemval_ini = new ITEMVAL();
  428. //통증
  429. var degnitemlevlcd = "0000969"; //0000969.
  430. var itemval_pain = grup_base.ivw_0000969001.getFormItemValue(degnitemlevlcd);
  431. if (itemval_pain.rectermcd == "0002277001") {
  432. //무
  433. //통증점수 제거
  434. itemval_vas.rectermcd = "INI";
  435. grup_base.ivw_0000969001.setFormItemValue("0001099", itemval_vas); //0000969.
  436. } else if (itemval_pain.rectermcd == "0003770001") {
  437. //유
  438. //통증 점수
  439. itemval_vas1 = grup_base.ivw_0000969001.getFormItemValue("0012045.0013248"); //0000969.
  440. itemval_vas2 = grup_base.ivw_0000969001.getFormItemValue("0012045.0013249"); //0000969.
  441. itemval_vas3 = grup_base.ivw_0000969001.getFormItemValue("0012045.0013250"); //0000969.
  442. itemval_vas4 = grup_base.ivw_0000969001.getFormItemValue("0012045.0013251"); //0000969.
  443. if (utlf_isNull(itemval_vas1.rectermcd) && utlf_isNull(itemval_vas2.rectermcd) && utlf_isNull(itemval_vas3.rectermcd) && utlf_isNull(itemval_vas4.rectermcd)) {
  444. degnitemnm = "통증 점수";
  445. isValid = false;
  446. }
  447. if (parseInt(itemval_vas1.rectermnm) >= 4 || parseInt(itemval_vas2.rectermnm) >= 4 || parseInt(itemval_vas3.rectermnm) >= 4 || parseInt(itemval_vas4.rectermnm) >= 4) {
  448. //중재
  449. degnitemlevlcd = "0013277"; //0000969.
  450. itemval_vas = grup_base.ivw_0000969001.getFormItemValue(degnitemlevlcd);
  451. if (utlf_isNull(itemval_vas.rectermcd)) {
  452. degnitemnm = "중재 종류";
  453. isValid = false;
  454. }
  455. }
  456. } else if (itemval_pain.rectermcd == "0022237001") {
  457. //확인불가
  458. degnitemlevlcd = "0000969"; //0000969.
  459. itemval_vas = grup_base.ivw_0000969001.getFormItemValue(degnitemlevlcd);
  460. if (utlf_isNull(itemval_vas.reccnts)) {
  461. degnitemnm = "확인불가의 상세내역"
  462. isValid = false;
  463. }
  464. //통증점수 제거
  465. itemval_ini.rectermcd = "INI";
  466. grup_base.ivw_0000969001.setFormItemValue("0012045.0013248", itemval_ini); //0000969.
  467. itemval_ini.rectermcd = "INI";
  468. grup_base.ivw_0000969001.setFormItemValue("0012045.0013249", itemval_ini); //0000969.
  469. itemval_ini.rectermcd = "INI";
  470. grup_base.ivw_0000969001.setFormItemValue("0012045.0013250", itemval_ini); //0000969.
  471. itemval_ini.rectermcd = "INI";
  472. grup_base.ivw_0000969001.setFormItemValue("0012045.0013251", itemval_ini); //0000969.
  473. //중재항목 제거
  474. itemval_ini.rectermcd = "INI";
  475. grup_base.ivw_0000969001.setFormItemValue("0013277", itemval_ini); //0000969.
  476. } else {
  477. isValid = false;
  478. }
  479. itemval_vas1 = grup_base.ivw_0000969001.getFormItemValue("0012045.0013248"); //0000969.
  480. itemval_vas2 = grup_base.ivw_0000969001.getFormItemValue("0012045.0013249"); //0000969.
  481. itemval_vas3 = grup_base.ivw_0000969001.getFormItemValue("0012045.0013250"); //0000969.
  482. itemval_vas4 = grup_base.ivw_0000969001.getFormItemValue("0012045.0013251"); //0000969.
  483. if(!utlf_isNull(itemval_vas1.rectermcd) && !utlf_isNull(itemval_vas2.rectermcd) ) {
  484. sysf_messageBox("NRS,FPRS사정도구를 동시에 입력할 수 없습니다.다시 작성해 주시기 바랍니다", "E");
  485. itemval_ini.rectermcd = "INI";
  486. grup_base.ivw_0000969001.setFormItemValue("0012045.0013248", itemval_ini); //0000969.
  487. itemval_ini.rectermcd = "INI";
  488. grup_base.ivw_0000969001.setFormItemValue("0012045.0013249", itemval_ini); //0000969.
  489. itemval_ini.rectermcd = "INI";
  490. grup_base.ivw_0000969001.setFormItemValue("0012045.0013250", itemval_ini); //0000969.
  491. itemval_ini.rectermcd = "INI";
  492. grup_base.ivw_0000969001.setFormItemValue("0012045.0013251", itemval_ini); //0000969.
  493. // var bExistFunc = frmf_findFuncFromForm(grup_base.ivw_0000969001.url, "button1_onclick");
  494. // trace(grup_base.ivw_0000969001.name + " || " + bExistFunc);
  495. // if(bExistFunc){
  496. // eval("grup_base.ivw_0000969001.button1_onclick()");
  497. // }
  498. return false;
  499. }
  500. if(!utlf_isNull(itemval_vas1.rectermcd) && !utlf_isNull(itemval_vas3.rectermcd) ) {
  501. sysf_messageBox("NRS,FLACC 사정도구를 동시에 입력할 수 없습니다.다시 작성해 주시기 바랍니다", "E");
  502. itemval_ini.rectermcd = "INI";
  503. grup_base.ivw_0000969001.setFormItemValue("0012045.0013248", itemval_ini); //0000969.
  504. itemval_ini.rectermcd = "INI";
  505. grup_base.ivw_0000969001.setFormItemValue("0012045.0013249", itemval_ini); //0000969.
  506. itemval_ini.rectermcd = "INI";
  507. grup_base.ivw_0000969001.setFormItemValue("0012045.0013250", itemval_ini); //0000969.
  508. itemval_ini.rectermcd = "INI";
  509. grup_base.ivw_0000969001.setFormItemValue("0012045.0013251", itemval_ini); //0000969.
  510. return false;
  511. }
  512. if(!utlf_isNull(itemval_vas1.rectermcd) && !utlf_isNull(itemval_vas4.rectermcd) ) {
  513. sysf_messageBox("NRS,CNPS 사정도구를 동시에 입력할 수 없습니다.다시 작성해 주시기 바랍니다", "E");
  514. itemval_ini.rectermcd = "INI";
  515. grup_base.ivw_0000969001.setFormItemValue("0012045.0013248", itemval_ini); //0000969.
  516. itemval_ini.rectermcd = "INI";
  517. grup_base.ivw_0000969001.setFormItemValue("0012045.0013249", itemval_ini); //0000969.
  518. itemval_ini.rectermcd = "INI";
  519. grup_base.ivw_0000969001.setFormItemValue("0012045.0013250", itemval_ini); //0000969.
  520. itemval_ini.rectermcd = "INI";
  521. grup_base.ivw_0000969001.setFormItemValue("0012045.0013251", itemval_ini); //0000969.
  522. return false;
  523. }
  524. if(!utlf_isNull(itemval_vas2.rectermcd) && !utlf_isNull(itemval_vas3.rectermcd) ) {
  525. sysf_messageBox("FPRS,FLACC 사정도구를 동시에 입력할 수 없습니다.다시 작성해 주시기 바랍니다", "E");
  526. itemval_ini.rectermcd = "INI";
  527. grup_base.ivw_0000969001.setFormItemValue("0012045.0013248", itemval_ini); //0000969.
  528. itemval_ini.rectermcd = "INI";
  529. grup_base.ivw_0000969001.setFormItemValue("0012045.0013249", itemval_ini); //0000969.
  530. itemval_ini.rectermcd = "INI";
  531. grup_base.ivw_0000969001.setFormItemValue("0012045.0013250", itemval_ini); //0000969.
  532. itemval_ini.rectermcd = "INI";
  533. grup_base.ivw_0000969001.setFormItemValue("0012045.0013251", itemval_ini); //0000969.
  534. return false;
  535. }
  536. if(!utlf_isNull(itemval_vas2.rectermcd) && !utlf_isNull(itemval_vas4.rectermcd) ) {
  537. sysf_messageBox("FPRS,CNPS 사정도구를 동시에 입력할 수 없습니다.다시 작성해 주시기 바랍니다", "E");
  538. itemval_ini.rectermcd = "INI";
  539. grup_base.ivw_0000969001.setFormItemValue("0012045.0013248", itemval_ini); //0000969.
  540. itemval_ini.rectermcd = "INI";
  541. grup_base.ivw_0000969001.setFormItemValue("0012045.0013249", itemval_ini); //0000969.
  542. itemval_ini.rectermcd = "INI";
  543. grup_base.ivw_0000969001.setFormItemValue("0012045.0013250", itemval_ini); //0000969.
  544. itemval_ini.rectermcd = "INI";
  545. grup_base.ivw_0000969001.setFormItemValue("0012045.0013251", itemval_ini); //0000969.
  546. return false;
  547. }
  548. if(!utlf_isNull(itemval_vas3.rectermcd) && !utlf_isNull(itemval_vas4.rectermcd) ) {
  549. sysf_messageBox("FLACC,CNPS 사정도구를 동시에 입력할 수 없습니다.다시 작성해 주시기 바랍니다", "E");
  550. itemval_ini.rectermcd = "INI";
  551. grup_base.ivw_0000969001.setFormItemValue("0012045.0013248", itemval_ini); //0000969.
  552. itemval_ini.rectermcd = "INI";
  553. grup_base.ivw_0000969001.setFormItemValue("0012045.0013249", itemval_ini); //0000969.
  554. itemval_ini.rectermcd = "INI";
  555. grup_base.ivw_0000969001.setFormItemValue("0012045.0013250", itemval_ini); //0000969.
  556. itemval_ini.rectermcd = "INI";
  557. grup_base.ivw_0000969001.setFormItemValue("0012045.0013251", itemval_ini); //0000969.
  558. return false;
  559. }
  560. if (isValid == false) {
  561. if (utlf_isNull(degnitemnm)) {
  562. degnitemnm = grup_base.ivw_0000969001.ds_data_recitem.lookup("degnitemlevlcd", degnitemlevlcd, "degnitemnm");
  563. }
  564. sysf_messageBox("필수 입력항목(통증-" + degnitemnm + ")이 입력되지", "E007");
  565. return isValid;
  566. }
  567. }
  568. //care plan 필수체크
  569. /*
  570. var nFindRow = ds_data_formdegn.findRow("degnitemcd", "0022826001");
  571. var itemNm = ds_data_formdegn.getColumn(nFindRow, "itemnm");
  572. var rtnVal = true;
  573. if(rtnVal == false){
  574. return rtnVal;
  575. }else{
  576. nFindRow = ds_data_formdegn.findRow("degnitemcd", "0013328001");
  577. itemNm = ds_data_formdegn.getColumn(nFindRow, "itemnm");
  578. return grup_base.ivw_0013328001.fChkGrdPreSave(itemNm);
  579. }
  580. */
  581. }else{
  582. return rtnVal;
  583. }
  584. }
  585. /****************************************************************************************
  586. * Function : fIsNullValue_MMR007001
  587. * Description : degnitemlevlcd 에 해당하는 recitem 정보 중 요청받은 field 를 반환한다.
  588. * retrun type :
  589. ****************************************************************************************/
  590. function fIsNullValue_MMR007001(degnitemlevlcd, field) {
  591. var itemval_vas = grup_base.ivw_0000969001.getFormItemValue(degnitemlevlcd);
  592. var val = "";
  593. if (field == "cd") {
  594. val = itemval_vas.rectermcd;
  595. } else if (field == "cnts") {
  596. val = itemval_vas.reccnts;
  597. }
  598. return utlf_isNull(val);
  599. }
  600. /**
  601. * @group :
  602. * @ver : 2008.09.02
  603. * @by : jonghun
  604. * @---------------------------------------------------
  605. * @type : function
  606. * @access : private
  607. * @desc : 추가기록창 팝업처리
  608. * @param :
  609. * @return :
  610. * @---------------------------------------------------
  611. */
  612. function fEtcRec()
  613. {
  614. //setParameter("etc_rec", "추가 기타기록 테스트입니다...");
  615. modal("SPMMR06100");
  616. var recrtn = getParameter("etcrec_rtn");
  617. if (recrtn != "")
  618. {
  619. model.setValue("/root/main/recinfo/recitem[degnitemlevlcd='0000098.0008458']/reccnts", recrtn);
  620. setParameter("etc_rec", recrtn);
  621. }
  622. //alert(recrtn);
  623. }
  624. /**
  625. * @desc : 서식 진단명 사이즈 조절
  626. * @
  627. * @param :
  628. * @return :
  629. * @---------------------------------------------------
  630. */
  631. function fSetSizeFormDiag()
  632. {
  633. grup_base.ivw_0001019001.fInitPage(false, parseInt(grup_base.ivw_0001019001.position.height), parseInt(grup_base.ivw_0001019001.position.width));
  634. }
  635. /****************************************************************************************
  636. * Function : fSetCC
  637. * Description : 주호소 트리아제 연동
  638. * retrun type :
  639. ****************************************************************************************/
  640. function fSetCC()
  641. {
  642. var attackdd = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "attackdd")); //발생일
  643. var attacktm = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "attacktm")); //발생시간
  644. var mainsympnm = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mainsympnm")); //주증상
  645. var mainsympcd = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mainsympcd")); //주증상코드
  646. var mainsympnm1 = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mainsympnm1")); //주증상1
  647. var mainsympcd1 = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mainsympcd1")); //주증상코드1
  648. var mainsympnm2 = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mainsympnm2")); //주증상2
  649. var mainsympcd2 = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mainsympcd2")); //주증상코드2
  650. var etcsymp = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "etcsymp")); //기타증상
  651. dsf_createDs("ds_ccrectmp", [{col: "rectermcd", type:"string", size:256}
  652. ,{col: "rectermnm", type:"string", size:256}
  653. ,{col: "reccnts", type:"string", size:256}
  654. ,{col: "reccnts2", type:"string", size:256}
  655. ,{col: "rectermflag", type:"string", size:256}]);
  656. if (!utlf_isNull(mainsympnm))
  657. {
  658. var nRow = ds_ccrectmp.addRow();
  659. ds_ccrectmp.setColumn(nRow, "rectermcd", mainsympcd);
  660. ds_ccrectmp.setColumn(nRow, "rectermnm", mainsympnm);
  661. if (!utlf_isNull(attackdd))
  662. {
  663. attackdd = attackdd.substr(0, 4) + "-" + attackdd.substr(4, 2) + "-" + attackdd.substr(6, 2);
  664. if (!utlf_isNull(attacktm))
  665. {
  666. attacktm = attacktm.substr(0, 2) + ":" + attacktm.substr(2, 2);
  667. }
  668. ds_ccrectmp.setColumn(nRow, "reccnts2", attackdd + " " + attacktm);
  669. }
  670. }
  671. if (!utlf_isNull(mainsympnm1))
  672. {
  673. var nRow = ds_ccrectmp.addRow();
  674. ds_ccrectmp.setColumn(nRow, "rectermcd", mainsympcd1);
  675. ds_ccrectmp.setColumn(nRow, "rectermnm", mainsympnm1);
  676. if (!utlf_isNull(attackdd))
  677. {
  678. ds_ccrectmp.setColumn(nRow, "reccnts2", attackdd + " " + attacktm);
  679. }
  680. }
  681. if (!utlf_isNull(mainsympnm2))
  682. {
  683. var nRow = ds_ccrectmp.addRow();
  684. ds_ccrectmp.setColumn(nRow, "rectermcd", mainsympcd2);
  685. ds_ccrectmp.setColumn(nRow, "rectermnm", mainsympnm2);
  686. if (!utlf_isNull(attackdd))
  687. {
  688. ds_ccrectmp.setColumn(nRow, "reccnts2", attackdd + " " + attacktm);
  689. }
  690. }
  691. if (!utlf_isNull(etcsymp))
  692. {
  693. var nRow = ds_ccrectmp.addRow();
  694. ds_ccrectmp.setColumn(nRow, "rectermcd", "-");
  695. ds_ccrectmp.setColumn(nRow, "rectermnm", etcsymp);
  696. if (!utlf_isNull(attackdd))
  697. {
  698. ds_ccrectmp.setColumn(nRow, "reccnts2", attackdd + " " + attacktm);
  699. }
  700. }
  701. if( ds_ccrectmp.rowcount > -1 ){
  702. var gridObj = ComnFormObj.ivw_0000931001.components["grd_diaglist"];
  703. var gridDs = ComnFormObj.ivw_0000931001.objects[gridObj.binddataset];
  704. gridDs.clearData();
  705. gridDs.copyData(ds_ccrectmp);
  706. ComnFormObj.ivw_0000931001.fAddrow();
  707. }
  708. var objDs = this.removeChild("ds_ccrectmp");
  709. delete objDs;
  710. objDs = null;
  711. /*
  712. model.removeNodeset("/root/ccrectmp/recitem");
  713. var attackdd = model.getValue("/root/interface/ertriage/ertriage/attackdd"); //발생일
  714. var attacktm = model.getValue("/root/interface/ertriage/ertriage/attacktm"); //발생시간
  715. var mainsympnm = model.getValue("/root/interface/ertriage/ertriage/mainsympnm"); //주증상
  716. var mainsympcd = model.getValue("/root/interface/ertriage/ertriage/mainsympcd"); //주증상코드
  717. var mainsympnm1 = model.getValue("/root/interface/ertriage/ertriage/mainsympnm1"); //주증상1
  718. var mainsympcd1 = model.getValue("/root/interface/ertriage/ertriage/mainsympcd1"); //주증상코드1
  719. var mainsympnm2 = model.getValue("/root/interface/ertriage/ertriage/mainsympnm2"); //주증상2
  720. var mainsympcd2 = model.getValue("/root/interface/ertriage/ertriage/mainsympcd2"); //주증상코드2
  721. var etcsymp = model.getValue("/root/interface/ertriage/ertriage/etcsymp"); //기타증상
  722. var i = 1;
  723. if (mainsympnm != "")
  724. {
  725. model.makeNode("/root/ccrectmp/recitem[" + i + "]");
  726. model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
  727. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
  728. model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
  729. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formcd");
  730. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
  731. model.makeNode("/root/ccrectmp/recitem[" + i + "]/degnitemno");
  732. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000931001");
  733. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931");
  734. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rectermcd");
  735. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
  736. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
  737. model.makeNode("/root/ccrectmp/recitem[" + i + "]/reccnts");
  738. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
  739. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "MTX");
  740. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "주호소");
  741. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "1");
  742. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rectermnm");
  743. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rowno");
  744. model.makeNode("/root/ccrectmp/recitem[" + i + "]/colno");
  745. i++;
  746. model.makeNode("/root/ccrectmp/recitem[" + i + "]");
  747. model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
  748. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
  749. model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
  750. model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
  751. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
  752. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "1");
  753. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000931001");
  754. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931");
  755. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rectermcd");
  756. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
  757. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
  758. model.makeNode("/root/ccrectmp/recitem[" + i + "]/reccnts");
  759. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
  760. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GRD");
  761. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "주호소");
  762. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "2");
  763. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rectermnm");
  764. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 0);
  765. model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", -1);
  766. i++;
  767. model.makeNode("/root/ccrectmp/recitem[" + i + "]");
  768. model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
  769. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
  770. model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
  771. model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
  772. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
  773. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "5");
  774. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000931001");
  775. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000931");
  776. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", mainsympcd);
  777. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
  778. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
  779. model.makeNode("/root/ccrectmp/recitem[" + i + "]/reccnts");
  780. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
  781. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
  782. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "주호소");
  783. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
  784. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", mainsympnm);
  785. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 0);
  786. model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 0);
  787. i++;
  788. if (attackdd != "")
  789. {
  790. attackdd = attackdd.substr(0, 4) + "-" + attackdd.substr(4, 2) + "-" + attackdd.substr(6, 2);
  791. if (attacktm != "")
  792. {
  793. attacktm = attacktm.substr(0, 2) + ":" + attacktm.substr(2, 2);
  794. }
  795. model.makeNode("/root/ccrectmp/recitem[" + i + "]");
  796. model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
  797. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
  798. model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
  799. model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
  800. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
  801. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "10");
  802. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000299002");
  803. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000299");
  804. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", "");
  805. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
  806. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
  807. model.makeValue("/root/ccrectmp/recitem[" + i + "]/reccnts", attackdd + " " + attacktm);
  808. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
  809. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
  810. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "발생일");
  811. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
  812. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", "");
  813. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 0);
  814. model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 2);
  815. i++;
  816. }
  817. }
  818. if (mainsympnm1 != "")
  819. {
  820. model.makeNode("/root/ccrectmp/recitem[" + i + "]");
  821. model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
  822. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
  823. model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
  824. model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
  825. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
  826. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "5");
  827. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000931001");
  828. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000931");
  829. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", mainsympcd1);
  830. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
  831. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
  832. model.makeNode("/root/ccrectmp/recitem[" + i + "]/reccnts");
  833. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
  834. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
  835. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "주호소");
  836. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
  837. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", mainsympnm1);
  838. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 1);
  839. model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 0);
  840. i++;
  841. if (attackdd != "")
  842. {
  843. model.makeNode("/root/ccrectmp/recitem[" + i + "]");
  844. model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
  845. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
  846. model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
  847. model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
  848. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
  849. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "10");
  850. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000299002");
  851. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000299");
  852. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", "");
  853. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
  854. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
  855. model.makeValue("/root/ccrectmp/recitem[" + i + "]/reccnts", attackdd + " " + attacktm);
  856. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
  857. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
  858. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "발생일");
  859. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
  860. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", "");
  861. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 1);
  862. model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 2);
  863. i++;
  864. }
  865. }
  866. if (mainsympnm2 != "")
  867. {
  868. model.makeNode("/root/ccrectmp/recitem[" + i + "]");
  869. model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
  870. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
  871. model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
  872. model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
  873. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
  874. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "5");
  875. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000931001");
  876. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000931");
  877. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", mainsympcd2);
  878. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
  879. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
  880. model.makeNode("/root/ccrectmp/recitem[" + i + "]/reccnts");
  881. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
  882. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
  883. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "주호소");
  884. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
  885. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", mainsympnm2);
  886. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 2);
  887. model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 0);
  888. i++;
  889. if (attackdd != "")
  890. {
  891. model.makeNode("/root/ccrectmp/recitem[" + i + "]");
  892. model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
  893. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
  894. model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
  895. model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
  896. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
  897. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "10");
  898. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000299002");
  899. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000299");
  900. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", "");
  901. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
  902. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
  903. model.makeValue("/root/ccrectmp/recitem[" + i + "]/reccnts", attackdd + " " + attacktm);
  904. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
  905. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
  906. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "발생일");
  907. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
  908. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", "");
  909. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 2);
  910. model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 2);
  911. i++;
  912. }
  913. }
  914. if (etcsymp != "")
  915. {
  916. model.makeNode("/root/ccrectmp/recitem[" + i + "]");
  917. model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
  918. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
  919. model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
  920. model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
  921. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
  922. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "5");
  923. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000931001");
  924. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000931");
  925. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", "-");
  926. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
  927. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
  928. model.makeNode("/root/ccrectmp/recitem[" + i + "]/reccnts");
  929. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
  930. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
  931. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "주호소");
  932. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
  933. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", etcsymp);
  934. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 3);
  935. model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 0);
  936. i++;
  937. if (attackdd != "")
  938. {
  939. model.makeNode("/root/ccrectmp/recitem[" + i + "]");
  940. model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
  941. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
  942. model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
  943. model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
  944. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
  945. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "10");
  946. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000299002");
  947. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000299");
  948. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", "");
  949. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
  950. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
  951. model.makeValue("/root/ccrectmp/recitem[" + i + "]/reccnts", attackdd + " " + attacktm);
  952. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
  953. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
  954. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "발생일");
  955. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
  956. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", "");
  957. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 3);
  958. model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 2);
  959. i++;
  960. }
  961. }
  962. var nodeList = model.instances(0).selectNodes("/root/ccrectmp/recitem");
  963. ivw_0000931001.window.javascript.clearData();
  964. if (nodeList.length > 0)
  965. {
  966. setSrchData("/root/ccrectmp/recitem", ivw_0000931001);
  967. ivw_0000931001.window.javascript.fAddrow();
  968. }
  969. */
  970. }
  971. /****************************************************************************************
  972. * Function : fSetErTriageRec
  973. * Description : 트리아제 연동
  974. * retrun type :
  975. ****************************************************************************************/
  976. function fSetErTriageRec(ivwObj, levlcd, ImgeYN)
  977. {
  978. //현병력
  979. if (ivwObj.name == "ivw_0001173001" && !utlf_isNull(ivwObj.url))
  980. {
  981. //의도성
  982. var nRow, degnitemkind, degnitemno, colId;
  983. var itemVal = new ITEMVAL();
  984. var intenflag = ds_ertriage.getColumn(0, "intenflag"); //의도성코드
  985. if (!utlf_isNull(intenflag) && intenflag != "-")
  986. {
  987. var intntermcd = ds_inten.lookup("hardcd", intenflag, "hardcdnm");
  988. itemVal.rectermcd = intntermcd;
  989. ivwObj.setFormItemValue("0001667", itemVal);
  990. }
  991. //손상기전
  992. var itemVal1 = new ITEMVAL();
  993. var injmechflag = ds_ertriage.getColumn(0, "injmechflag"); //손상기전코드
  994. if (!utlf_isNull(injmechflag) && injmechflag != "-")
  995. {
  996. var injmechcd = ds_injmech.lookup("hardcd", injmechflag, "hardcdnm");
  997. itemVal1.rectermcd = injmechcd;
  998. ivwObj.setFormItemValue("0020479", itemVal1);
  999. }
  1000. //보호장구
  1001. var itemVal2 = new ITEMVAL();
  1002. var proceqmtflag = ds_ertriage.getColumn(0, "proceqmtflag"); //보호장구
  1003. if (!utlf_isNull(proceqmtflag) && proceqmtflag != "-")
  1004. {
  1005. var arrProceqmtflag = proceqmtflag.split("|")
  1006. if (arrProceqmtflag.length > 0)
  1007. {
  1008. var proceqmtcd = "";
  1009. var proceqmtnm = "";
  1010. var compproceqmtflag = "";
  1011. var tmpProceqmtflag = "";
  1012. var tmpProceqmtnm = "";
  1013. for (var i = 0; i < arrProceqmtflag.length; i++)
  1014. {
  1015. tmpProceqmtcd = ds_prcp.lookup("hardcd", arrProceqmtflag[i], "hardcdnm");
  1016. proceqmtcd += tmpProceqmtcd + " ";
  1017. }
  1018. itemVal2.rectermcd = proceqmtcd.substring(0, proceqmtcd.length - 1);
  1019. ivwObj.setFormItemValue("0020478", itemVal2);
  1020. }
  1021. }
  1022. //2010.05.10 김달현 추가
  1023. //내원사유(M0120)
  1024. var itemVal3 = new ITEMVAL();
  1025. var chosresnflag = ds_ertriage.getColumn(0, "chosresnflag");
  1026. var chosresncd, chosresnnm;
  1027. if(chosresnflag == "1"){//질병
  1028. chosresncd = "0003034001";
  1029. }else if(chosresnflag == "2"){//질병외
  1030. chosresncd = "0038976001";
  1031. }else if(chosresnflag == "3"){//진료외방문
  1032. chosresncd = "0038977001";
  1033. }else if(chosresnflag == "9"){//미상
  1034. chosresncd = "0017158001";
  1035. }
  1036. //chosresnnm = ivwObj.window.javascript.model.getValue("/root/main/forminfo/vallist[valcd='"+chosresncd+"']/valitemnm");
  1037. if(!utlf_isNull(chosresnflag)){
  1038. itemVal3.rectermcd = chosresncd;
  1039. ivwObj.setFormItemValue("0019376", itemVal3);
  1040. }
  1041. //2010.05.10 김달현 추가
  1042. //내원수단(M0119)
  1043. var itemVal4 = new ITEMVAL();
  1044. var choswayflag = ds_ertriage.getColumn(0, "choswayflag");
  1045. var choswaycd, choswaynm;
  1046. if(choswayflag == "1"){//119 구급차
  1047. choswaycd = "0035600001";
  1048. }else if(choswayflag == "2"){//병원구급차
  1049. choswaycd = "0038986001";
  1050. }else if(choswayflag == "3"){//기타구급차
  1051. choswaycd = "0035601001";
  1052. }else if(choswayflag == "4"){//경찰차 등 공공차량
  1053. choswaycd = "0038978001";
  1054. }else if(choswayflag == "5"){//항공이송
  1055. choswaycd = "0038983001";
  1056. }else if(choswayflag == "6"){//기타 자동차
  1057. choswaycd = "0038984001";
  1058. }else if(choswayflag == "7"){//도보
  1059. choswaycd = "0002199001";
  1060. }else if(choswayflag == "8"){//기타
  1061. choswaycd = "0002141001";
  1062. }else if(choswayflag == "9"){//미상
  1063. choswaycd = "0017158001";
  1064. }
  1065. if(!utlf_isNull(choswayflag)){
  1066. itemVal4.rectermcd = choswaycd;
  1067. ivwObj.setFormItemValue("0000169", itemVal4);
  1068. }
  1069. //2010.05.10 김달현 추가
  1070. //내원경로(M0118)
  1071. var itemVal5 = new ITEMVAL();
  1072. var chospathflag = ds_ertriage.getColumn(0, "chospathflag");
  1073. var chospathcd, chospathnm;
  1074. if(chospathflag == "1"){//직접내원
  1075. chospathcd = "0000374001";
  1076. }else if(chospathflag == "2"){//외부에서 전원
  1077. chospathcd = "0038982001";
  1078. }else if(chospathflag == "3"){//외래에서 의뢰
  1079. chospathcd = "0038987001";
  1080. }else if(chospathflag == "8"){//기타
  1081. chospathcd = "0002141001";
  1082. }else if(chospathflag == "9"){//미상
  1083. chospathcd = "0017158001";
  1084. }
  1085. if(!utlf_isNull(chospathflag)){
  1086. itemVal5.rectermcd = chospathcd;
  1087. ivwObj.setFormItemValue("0023492", itemVal5);
  1088. }
  1089. }
  1090. //신체검진
  1091. // if (ivwObj.name == "ivw_0000570001" && !utlf_isNull(ivwObj.url))
  1092. // {
  1093. //
  1094. // //분당맥박수
  1095. // var itemVal = new ITEMVAL();
  1096. // var mntpulsecnt = ds_ertriage.getColumn(0, "mntpulsecnt");
  1097. // itemVal.reccnts = mntpulsecnt;
  1098. // ivwObj.setFormItemValue("0000879.0001221.0000258", itemVal);
  1099. //
  1100. // //분당호흡수
  1101. // itemVal = new ITEMVAL();
  1102. // var mntbrethcnt = ds_ertriage.getColumn(0, "mntbrethcnt");
  1103. // itemVal.reccnts = mntbrethcnt;
  1104. // ivwObj.setFormItemValue("0000879.0001221.0000993", itemVal);
  1105. //
  1106. // //내원시체온
  1107. // itemVal = new ITEMVAL();
  1108. // var chosbdtp = ds_ertriage.getColumn(0, "chosbdtp");
  1109. // itemVal.reccnts = chosbdtp;
  1110. // ivwObj.setFormItemValue("0000879.0001221.0000992", itemVal);
  1111. //
  1112. // //수축기혈압
  1113. // itemVal = new ITEMVAL();
  1114. // var highbp = ds_ertriage.getColumn(0, "highbp");
  1115. // itemVal.reccnts = highbp;
  1116. // ivwObj.setFormItemValue("0000879.0001221.0001180.0000525", itemVal);
  1117. //
  1118. // //이완기혈압
  1119. // itemVal = new ITEMVAL();
  1120. // var lowbp = ds_ertriage.getColumn(0, "lowbp");
  1121. // itemVal.reccnts = lowbp;
  1122. // ivwObj.setFormItemValue("0000879.0001221.0001180.0000791", itemVal);
  1123. //
  1124. // //산소포화도
  1125. // itemVal = new ITEMVAL();
  1126. // var oxyconcen = ds_ertriage.getColumn(0, "oxyconcen");
  1127. // itemVal.reccnts = oxyconcen;
  1128. // ivwObj.setFormItemValue("0000879.0001221.0005957", itemVal);
  1129. //
  1130. // //2010.05.10 김달현 추가
  1131. // //의식(AVPU Scale)
  1132. // itemVal = new ITEMVAL();
  1133. // var cscsflag = ds_ertriage.getColumn(0, "cscsflag");
  1134. // var cscscd, cscsnm;
  1135. // if(cscsflag == "A"){//Alert
  1136. // cscscd = "0000544";
  1137. // }else if(cscsflag == "V"){//Verbal response
  1138. // cscscd = "0014272";
  1139. // }else if(cscsflag == "P"){//Painful response
  1140. // cscscd = "0015321";
  1141. // }else if(cscsflag == "U"){//Unresponsive
  1142. // cscscd = "0038958";
  1143. // }
  1144. //
  1145. // if(!utlf_isNull(cscscd)){
  1146. // itemVal.rectermcd = cscscd;
  1147. // ivwObj.setFormItemValue("0000900.0000898.0023476", itemVal);
  1148. // }
  1149. //
  1150. // }
  1151. // // knuh_20110708_추가_text박스인 경우는 내용으로 셋팅하기 위함.
  1152. // // 신체검진에서 가져와야 되는 항목 : 내원수단, 의식, VS(수축기혈압, 이완기혈압, 분당맥박수, 분당호흡수, 내원시 체온)
  1153. // //else if (ivwObj.name == "ivw_0000570001" && utlf_isNull(ivwObj.url))
  1154. if (ivwObj.name == "ivw_0000570001" )
  1155. {
  1156. var pid = "";
  1157. var choswayflagnm = ""; // 내원수단
  1158. var cscsflagnm = ""; // 의식
  1159. var highbp = ""; // 수축기혈압
  1160. var lowbp = ""; // 이완기혈압
  1161. var mntpulsecnt = ""; // 분당맥박수
  1162. var mntbrethcnt = ""; // 분당호흡수
  1163. var chosbdtp = ""; // 내원시 체온
  1164. var initvsdt = "";
  1165. // triage 내용
  1166. var reccnts_old = "";
  1167. var reccnts = "";
  1168. // triage 정보 2번 가져오는 부분 체크(신규일때 현병력 화면 크기 조절시)
  1169. sysf_trace("ImgeYN:"+ImgeYN);
  1170. if (ImgeYN == "Y")
  1171. {
  1172. var nFindRow = ds_data_recitem.findRow("fstlevlitemcd", "0000570001");
  1173. reccnts_old = ds_data_recitem.getColumn(nFindRow, "reccnts");
  1174. if (!utlf_isNull(reccnts_old))
  1175. {
  1176. reccnts_old = reccnts_old + "\n" + "\n";
  1177. }
  1178. pid = ds_ertriage.getColumn(0, "pid");
  1179. if (utlf_isNull(pid))
  1180. {
  1181. //sysf_messageBox("Triage 기록이 작성되지", "E007");
  1182. }
  1183. else
  1184. {
  1185. choswayflagnm = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "choswayflagnm"));
  1186. cscsflagnm = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "cscsflagnm"));
  1187. highbp = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "highbp"));
  1188. lowbp = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "lowbp"));
  1189. mntpulsecnt = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mntpulsecnt"));
  1190. mntbrethcnt = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mntbrethcnt"));
  1191. chosbdtp = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "chosbdtp"));
  1192. oxyconcen = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "oxyconcen"));
  1193. initvsdt = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "initvsdt"));
  1194. if (mntpulsecnt == "-1" ) mntpulsecnt = "측정하지 않음";
  1195. if (mntbrethcnt == "-1" ) mntbrethcnt = "측정하지 않음";
  1196. if (chosbdtp == "-1" ) chosbdtp = "측정하지 않음";
  1197. if (highbp == "-1" ) highbp = "측정하지 않음";
  1198. if (lowbp == "-1" ) lowbp = "측정하지 않음";
  1199. if (oxyconcen == "-1" ) oxyconcen = "측정하지 않음";
  1200. if (initvsdt == "") initvsdt = "측정시각 없음";
  1201. reccnts = reccnts_old +
  1202. "내원수단 : " + choswayflagnm + "\n" +
  1203. "의식 : " + cscsflagnm + "\n" +
  1204. "수축기혈압 : " + highbp + "\n" +
  1205. "이완기혈압 : " + lowbp + "\n" +
  1206. "분당맥박수 : " + mntpulsecnt + "\n" +
  1207. "분당호흡수 : " + mntbrethcnt + "\n" +
  1208. "내원시 체온 : " + chosbdtp + "\n" +
  1209. "산소포화도 : " + oxyconcen + "\n" +
  1210. "V/S 측정시각 : " + initvsdt;
  1211. if (utlf_isNull(ivwObj.url)) {
  1212. var tarObj = ComnFormObj.components["tar_0000570001"];
  1213. var nRow = ds_data_recitem.findRowExpr("degnitemkind == 'MTX' && fstlevlitemcd == '0000570001' && degnitemlevlno == '1'");
  1214. ds_data_recitem.setColumn(nRow, "reccnts", reccnts);
  1215. tarObj.value = reccnts;
  1216. }
  1217. else {
  1218. //응급실기록(성인)
  1219. var nRow = ivwObj.ds_data_recitem.findRowExpr("degnitemkind == 'MTX' && fstlevlitemcd == '0012040001' && degnitemlevlno == '1'");
  1220. var item = ivwObj.components["MTX_2"];
  1221. if ( item != null) {
  1222. item.value = reccnts;
  1223. }
  1224. //응급실기록(소아)
  1225. var nRow = ivwObj.ds_data_recitem.findRowExpr("degnitemkind == 'MTX' && fstlevlitemcd == '0012152001' && degnitemlevlno == '1'");
  1226. var item = ivwObj.components["MTX_34"];
  1227. if ( item != null) {
  1228. item.value = reccnts;
  1229. }
  1230. }
  1231. }
  1232. }
  1233. }
  1234. }
  1235. /****************************************************************************************
  1236. * Function : fPopEduDsch_SMMMR00701
  1237. * Description : 퇴원요구도/교육요구도 jci 팝업 호출
  1238. * retrun type :
  1239. * Creator :
  1240. ****************************************************************************************/
  1241. function fPopEduDsch_SMMMR00701(){
  1242. var pid = parent.fGetPamInfo("pid");
  1243. var indd = parent.fGetPamInfo("indd");
  1244. var cretno = parent.fGetPamInfo("cretno");
  1245. this.frmf_setParameter("SPMRJ00300_pid", pid);
  1246. this.frmf_setParameter("SPMRJ00300_orddd", indd);
  1247. this.frmf_setParameter("SPMRJ00300_cretno", cretno);
  1248. frmf_modal("SPMRJ00300", "SPMRJ00300", null, null, 1, 0, 0, null, null, null, null, null, "M");
  1249. }
  1250. /****************************************************************************************
  1251. * Function : getSubmitID_MMR01300I
  1252. * Description : MMR01300.js에서 submit직전에 submitID를 설정하기 위해서 호출한다.
  1253. * retrun type :
  1254. ****************************************************************************************/
  1255. function getSubmitID_MMR01300I() {
  1256. parent.fSetFormRec("addexecflag", "careplan");
  1257. //2010.02.23 dhkim - 통합기록조회용 JCI구분자추가(fSetXsltFlag없애고 getSubmitID_MMR01300I로 이동)
  1258. parent.fSetFormRec("xsltflag", "JCI3");
  1259. return TX_SUBMIT_EXTN_FORM;
  1260. }
  1261. /****************************************************************************************
  1262. * Function : initFormAtLast_MMR01100I
  1263. * Description : MMR01100.js에서 서식load를 완료한 후에 호출한다.
  1264. * retrun type :
  1265. ****************************************************************************************/
  1266. function initFormAtLast_MMR01100I() {
  1267. try{
  1268. //grup_base.ivw_0013328001.fAddrow();
  1269. if (parent.fGetFormRec("status") == "C") {
  1270. fSetTriageValue_MMR00701("A", true);
  1271. fSetTriageValue_MMR00701("C", false);
  1272. fSetTriageValue_MMR00701("B", false);
  1273. gImge = "N";
  1274. }
  1275. lodedYn = true;
  1276. }catch(e){
  1277. sysf_catchTrace(e);
  1278. }
  1279. }
  1280. /****************************************************************************************
  1281. * Function : fSetTriageValue_MMR00701
  1282. * Description : Triage 입력내용을 설정한다.
  1283. * retrun type :
  1284. ****************************************************************************************/
  1285. function fSetTriageValue_MMR00701(flag, isSubmit, ibuttnyn) {
  1286. if (utlf_isNull(isSubmit)) {
  1287. isSubmit = true;
  1288. }
  1289. if (utlf_isNull(ibuttnyn))
  1290. {
  1291. if (gImge == "N")
  1292. {
  1293. ibuttnyn = "N";
  1294. }
  1295. else
  1296. {
  1297. ibuttnyn = "Y";
  1298. }
  1299. }
  1300. var isSet = true;
  1301. if (isSubmit) {
  1302. ds_send_reqdata.clearData();
  1303. ds_send_reqdata.addRow();
  1304. ds_send_reqdata.setColumn(0, "pid", parent.fGetFormRec("pid"));
  1305. ds_send_reqdata.setColumn(0, "orddd", parent.fGetFormRec("orddd"));
  1306. ds_send_reqdata.setColumn(0, "cretno", parent.fGetFormRec("cretno"));
  1307. ds_send_reqdata.setColumn(0, "queryflag", "K");
  1308. var oParam = {};
  1309. oParam.id = "TRMNE04403";
  1310. oParam.service = "ercareapp.ERInRmOutRmMngt";
  1311. oParam.method = "reqGetERTriagePatInfo";
  1312. oParam.inds = "req=ds_send_reqdata";
  1313. oParam.outds = "ds_ertriage=ertriage";
  1314. oParam.async = false;
  1315. oParam.progress = false;
  1316. oParam.callback = "cf_TRMNE04403";
  1317. tranf_submit(oParam);
  1318. if( arErrorCode.pop("TRMNE04403") > -1 ){
  1319. isSet = true;
  1320. }else{
  1321. isSet = false;
  1322. }
  1323. }
  1324. if (flag == "A") {
  1325. //주호소
  1326. if(isSet) {
  1327. if( lodedYn == false ){
  1328. this.setTimer(7040, 500);
  1329. }else{
  1330. fSetCC();
  1331. }
  1332. }
  1333. } else if (flag == "B") {
  1334. //현병력
  1335. if(isSet) {
  1336. if( lodedYn == false ){
  1337. this.setTimer(7041, 500);
  1338. }else{
  1339. var iobj = ComnFormObj.components["ivw_0001173001"];
  1340. fSetErTriageRec(iobj, "0001173");
  1341. }
  1342. }
  1343. } else if (flag == "C") {
  1344. //신체검진
  1345. if(isSet) {
  1346. if( lodedYn == false ){
  1347. gIbuttnyn = ibuttnyn;
  1348. this.setTimer(7042, 500);
  1349. }else{
  1350. var iobj = ComnFormObj.components["ivw_0000570001"];
  1351. fSetErTriageRec(iobj, "0000570", ibuttnyn);
  1352. }
  1353. }
  1354. }
  1355. }
  1356. function cf_TRMNE04403(sSvcId, nErrorCode, sErrorMsg) {
  1357. arErrorCode.push(sSvcId, nErrorCode);
  1358. }
  1359. ]]></Script>