MMR00703.xjs 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Script type="xscript4.0"><![CDATA[/**
  3. * MMR00703.js
  4. * SMMMR00703_응급기록JCI.xrw
  5. * 2015.01.22 이윤주
  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(
  205. fstLevlItemCd == "0000931001" //주호소
  206. || fstLevlItemCd == "0022826001" //care plan
  207. || fstLevlItemCd == "0013328001" //퇴원계획
  208. )
  209. fSetSizeFormCC(fstLevlItemCd);
  210. gLoadFormCnts++;
  211. utlf_addLog("@@@@@ gItemCds.length : " + gItemCds.length + " gLoadFormCnts : " + gLoadFormCnts );
  212. if(gItemCds.length == gLoadFormCnts)
  213. {
  214. dispOnLoadComplete(UNIT_FORM);
  215. //서식 로딩 후 포커스 처리
  216. if (parent.fGetFormRec("status") == "C")
  217. {
  218. SetDefFocusMTX(gItemCds);
  219. }
  220. }
  221. }
  222. /**
  223. * @group :
  224. * @ver : 2008.11.28
  225. * @by : jonghun
  226. * @---------------------------------------------------
  227. * @type : function
  228. * @access : private
  229. * @desc : 동일 서식이 떠있을 경우 내부 인스턴스 로딩 후 디폴트 조회내용 조회
  230. * @param :
  231. * @return :
  232. * @---------------------------------------------------
  233. */
  234. function fGetDefData()
  235. {
  236. dispOnLoadComplete(UNIT_FORM);
  237. if (parent.fGetFormRec("status") == "C")
  238. {
  239. SetDefFocusMTX(gItemCds);
  240. }
  241. }
  242. /**
  243. * @desc : 서식 주호소 사이즈 조절
  244. * @
  245. * @param :
  246. * @return :
  247. * @---------------------------------------------------
  248. */
  249. function fSetSizeFormCC(gItemCd_MMR00701)
  250. {
  251. //서식 주호소 화면 로딩
  252. if(gItemCd_MMR00701 == "0000931001")
  253. grup_base.ivw_0000931001.fInitPage(false, parseInt(grup_base.ivw_0000931001.position.height), parseInt(grup_base.ivw_0000931001.position.width));
  254. //Care Plan 화면 로딩
  255. else if(gItemCd_MMR00701 == "0022826001")//상용구팝업 hidden
  256. grup_base.ivw_0022826001.fInitPage(true, parseInt(grup_base.ivw_0022826001.position.height), parseInt(grup_base.ivw_0022826001.position.width));
  257. //퇴원계획화면 로딩
  258. else if(gItemCd_MMR00701 == "0013328001")//상용구팝업 visible
  259. grup_base.ivw_0013328001.fInitPage(false, parseInt(grup_base.ivw_0013328001.position.height), parseInt(grup_base.ivw_0013328001.position.width));
  260. }
  261. /**
  262. * @group :
  263. * @ver : 2009.12.04
  264. * @by : dhkim
  265. * @---------------------------------------------------
  266. * @type : function
  267. * @access : private
  268. * @desc : 부분서식 로딩
  269. * (0022826001) Care Plan,
  270. * (0013328001) 퇴원계획,
  271. * @param : gItemCds
  272. * @return :
  273. * @---------------------------------------------------
  274. */
  275. function loadUnitForm_MMR00701(itemCds){
  276. // var pageInfo = new PAGEINFO();
  277. // copyNodeset("/root/main", "/root/main", "replace", model, parent.model);
  278. // model.removeNodeset("/root/main/recinfo");
  279. //
  280. // makeRefByDegnitemno();
  281. for (var i = 0; i < itemCds.length; i++)
  282. {
  283. var nFindRow = ds_data_unitformmast.findRow("orgsupdegnitemcd", itemCds[i]);
  284. var formdegnseq = ds_data_unitformmast.getColumn(nFindRow, "formdegnseq");
  285. var unitformcd = ds_data_unitformmast.getColumn(nFindRow, "formcd");
  286. var ivwObj = ComnFormObj.components["ivw_" + itemCds[i]];
  287. var tarObj = ComnFormObj.components["tar_" + itemCds[i]];
  288. if( itemCds[i] == "0022826001" //care plan
  289. || itemCds[i] == "0013328001" //퇴원계획
  290. ){
  291. var unitformprogflag = ds_data_unitformmast.getColumn(nFindRow, "formprogflag");
  292. ivwObj.supdegnitemcd = itemCds[i];
  293. ivwObj.unitformcd = unitformcd;
  294. sysf_trace(unitformcd + " Loading 시작 : " + utlf_getCurrentTime());
  295. loadUnitForm(ivwObj, itemCds[i]);
  296. lf_getComponentID(formdegnseq, itemCds[i]);
  297. sysf_trace(unitformcd + " Loading 끝 : " + utlf_getCurrentTime());
  298. }
  299. }
  300. }
  301. /**
  302. * @desc : care plan ivw 확대
  303. * @
  304. * @param :
  305. * @return :
  306. * @authur : dhkim
  307. */
  308. function expandSection_MMR00701(obj){
  309. var ctrlID = obj.name;
  310. var itemcd = ctrlID.replace("lbl_", "");
  311. var bFold = itemcd == gMaxSectionID ? true : false;
  312. var ctrl = null;
  313. var unitformcd = "";
  314. var itemCds = gItemCds;
  315. for (var i = 0; i < itemCds.length; i++)
  316. {
  317. var secCtrl = ComnFormObj.components["lbl_" + itemCds[i]];
  318. var nFindRow = ds_data_unitformmast.findRow("orgsupdegnitemcd", itemCds[i]);
  319. var formdegnseq = ds_data_unitformmast.getColumn(nFindRow, "formdegnseq");
  320. unitformcd = ds_data_unitformmast.getColumn(nFindRow, "formcd");
  321. if(utlf_isNull(formdegnseq))
  322. ctrl = ComnFormObj.components["tar_" + itemCds[i]];
  323. else
  324. ctrl = ComnFormObj.components["ivw_" + itemCds[i]];
  325. //20100106 dhkim ivw 축소/확장
  326. if(itemcd == itemCds[i]){
  327. if(bFold){
  328. ctrl.position.height = gMaxSectionHei;
  329. if (unitformcd == "0900006875")//care plan 상용구 hidden
  330. {
  331. ctrl.fInitPage(true, parseInt(gMaxSectionHei), parseInt(ctrl.position.width));
  332. }else{
  333. ctrl.fInitPage(false, parseInt(gMaxSectionHei), parseInt(ctrl.position.width));
  334. }
  335. }else{
  336. ctrl.position.height = ctrl.orgheight;
  337. if (unitformcd == "0900006875")//care plan 상용구 hidden
  338. {
  339. ctrl.fInitPage(true, parseInt(secCtrl.orgheight), parseInt(ctrl.position.width));
  340. }else{
  341. ctrl.fInitPage(false, parseInt(secCtrl.orgheight), parseInt(ctrl.position.width));
  342. }
  343. }
  344. }
  345. }
  346. }
  347. /**
  348. * @group :
  349. * @ver : 2009.10.09
  350. * @by :
  351. * @---------------------------------------------------
  352. * @type : function
  353. * @access : private
  354. * @desc :
  355. * @param :
  356. * @return :
  357. * @---------------------------------------------------
  358. */
  359. function setInterfaceData()
  360. {
  361. var ifItemCds = new Array(
  362. "0000931001"//주호소
  363. , "0001173001"//현병력
  364. , "0000098001"//과거력
  365. , "0000969001"//통증
  366. , "0000079001"//계통문진
  367. , "0000570001"//신체검진
  368. , "0000553001"//신경학적검사
  369. , "0001019001"//추정진단
  370. , "0022826001"//care plan
  371. , "0013328001"//퇴원계획
  372. );
  373. copyNodeset(gPageInfo.recItemRef2, "/root/main/recifinfo/recitem", "replace", model, parent.model);
  374. setSrchData(gPageInfo.recItemRef2 , window);
  375. InitUnitFormData(ifItemCds);
  376. setButtonToggleAllByRecYn(window, gExtnBtnIds);
  377. }
  378. /**
  379. * @desc : 서식 데이터 Clear
  380. * @
  381. * @param :
  382. * @return :
  383. * @authur : 박종훈
  384. */
  385. function fClearComnFormData()
  386. {
  387. if (gMaxSectionID != "")
  388. {
  389. var MaxObj = document.controls("lbl_" + gMaxSectionID);
  390. MaxObj.dispatch("onclick");
  391. }
  392. ClearComnFormData(gItemCds);
  393. clearData();
  394. //포커스 처리
  395. SetDefFocusMTX(gItemCds);
  396. }
  397. /**
  398. * @desc : 기록 인스턴스 연결
  399. * @
  400. * @param :
  401. * @return :
  402. * @authur : 박종훈
  403. */
  404. function fSetRecItemValue(reciteminfo)
  405. {
  406. return SetCommMediFormValue(gItemCds, reciteminfo);
  407. }
  408. /****************************************************************************************
  409. * Function : fChkPreSave
  410. * Description : 저장전 체크 로직
  411. * (주호소, care plan, 퇴원계획)필수체크
  412. * "0000931001"//주호소
  413. * "0022826001"//Care Plan
  414. * "0013328001"//퇴원계획
  415. * retrun type :
  416. ****************************************************************************************/
  417. function fChkPreSave()
  418. {
  419. var rtnVal = grup_base.ivw_0000931001.fChkGrdPreSave();//주호소 필수체크
  420. if(rtnVal == true){
  421. //2010.01.15 안치원 - 통증기록 필수입력 체크
  422. if (utlf_isNull(grup_base.ivw_0000969001.url) == false) {
  423. // debugger;
  424. var isValid = true;
  425. var degnitemnm = null;
  426. var itemval_vas = new ITEMVAL();
  427. //통증
  428. var degnitemlevlcd = "0000969"; //0000969.
  429. var itemval_pain = grup_base.ivw_0000969001.getFormItemValue(degnitemlevlcd);
  430. if (itemval_pain.rectermcd == "0002277001") {
  431. //무
  432. //통증점수 제거
  433. itemval_vas.rectermcd = "INI";
  434. grup_base.ivw_0000969001.setFormItemValue("0001099", itemval_vas); //0000969.
  435. } else if (itemval_pain.rectermcd == "0003770001") {
  436. //유
  437. //통증 점수
  438. degnitemlevlcd = "0001099"; //0000969.
  439. itemval_vas = grup_base.ivw_0000969001.getFormItemValue(degnitemlevlcd);
  440. if (utlf_isNull(itemval_vas.rectermcd)) {
  441. degnitemnm = "통증 점수";
  442. isValid = false;
  443. }
  444. if (parseInt(itemval_vas.rectermnm) >= 1) {
  445. //사정도구
  446. degnitemlevlcd = "0013276"; //0000969.
  447. itemval_vas2 = grup_base.ivw_0000969001.getFormItemValue(degnitemlevlcd);
  448. if (itemval_vas2.rectermcd == "") {
  449. degnitemnm = "사정도구";
  450. isValid = false;
  451. }
  452. if (parseInt(itemval_vas.rectermnm) >= 4) {
  453. //중재
  454. degnitemlevlcd = "0013277"; //0000969.
  455. itemval_vas = grup_base.ivw_0000969001.getFormItemValue(degnitemlevlcd);
  456. if (utlf_isNull(itemval_vas.rectermcd)) {
  457. degnitemnm = "중재 종류";
  458. isValid = false;
  459. }
  460. }
  461. }
  462. } else if (itemval_pain.rectermcd == "0022237001") {
  463. //확인불가
  464. degnitemlevlcd = "0000969"; //0000969.
  465. itemval_vas = grup_base.ivw_0000969001.getFormItemValue(degnitemlevlcd);
  466. if (utlf_isNull(itemval_vas.reccnts)) {
  467. degnitemnm = "확인불가의 상세내역"
  468. isValid = false;
  469. }
  470. } else {
  471. isValid = false;
  472. }
  473. if (isValid == false) {
  474. if (utlf_isNull(degnitemnm)) {
  475. degnitemnm = grup_base.ivw_0000969001.ds_data_recitem.lookup("degnitemlevlcd", degnitemlevlcd, "degnitemnm");
  476. }
  477. sysf_messageBox("필수 입력항목(통증-" + degnitemnm + ")이 입력되지", "E007");
  478. return isValid;
  479. }
  480. }
  481. //care plan 필수체크
  482. var nFindRow = ds_data_formdegn.findRow("degnitemcd", "0022826001");
  483. var itemNm = ds_data_formdegn.getColumn(nFindRow, "itemnm");
  484. var rtnVal = true;
  485. if(rtnVal == false){
  486. return rtnVal;
  487. }else{
  488. nFindRow = ds_data_formdegn.findRow("degnitemcd", "0013328001");
  489. itemNm = ds_data_formdegn.getColumn(nFindRow, "itemnm");
  490. return grup_base.ivw_0013328001.fChkGrdPreSave(itemNm);
  491. }
  492. }else{
  493. return rtnVal;
  494. }
  495. }
  496. /****************************************************************************************
  497. * Function : fIsNullValue_MMR007001
  498. * Description : degnitemlevlcd 에 해당하는 recitem 정보 중 요청받은 field 를 반환한다.
  499. * retrun type :
  500. ****************************************************************************************/
  501. function fIsNullValue_MMR007001(degnitemlevlcd, field) {
  502. var itemval_vas = grup_base.ivw_0000969001.getFormItemValue(degnitemlevlcd);
  503. var val = "";
  504. if (field == "cd") {
  505. val = itemval_vas.rectermcd;
  506. } else if (field == "cnts") {
  507. val = itemval_vas.reccnts;
  508. }
  509. return utlf_isNull(val);
  510. }
  511. /**
  512. * @group :
  513. * @ver : 2008.09.02
  514. * @by : jonghun
  515. * @---------------------------------------------------
  516. * @type : function
  517. * @access : private
  518. * @desc : 추가기록창 팝업처리
  519. * @param :
  520. * @return :
  521. * @---------------------------------------------------
  522. */
  523. function fEtcRec()
  524. {
  525. //setParameter("etc_rec", "추가 기타기록 테스트입니다...");
  526. modal("SPMMR06100");
  527. var recrtn = getParameter("etcrec_rtn");
  528. if (recrtn != "")
  529. {
  530. model.setValue("/root/main/recinfo/recitem[degnitemlevlcd='0000098.0008458']/reccnts", recrtn);
  531. setParameter("etc_rec", recrtn);
  532. }
  533. //alert(recrtn);
  534. }
  535. /**
  536. * @desc : 서식 진단명 사이즈 조절
  537. * @
  538. * @param :
  539. * @return :
  540. * @---------------------------------------------------
  541. */
  542. function fSetSizeFormDiag()
  543. {
  544. grup_base.ivw_0001019001.fInitPage(false, parseInt(grup_base.ivw_0001019001.position.height), parseInt(grup_base.ivw_0001019001.position.width));
  545. }
  546. /****************************************************************************************
  547. * Function : fSetCC
  548. * Description : 주호소 트리아제 연동
  549. * retrun type :
  550. ****************************************************************************************/
  551. function fSetCC()
  552. {
  553. var attackdd = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "attackdd")); //발생일
  554. var attacktm = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "attacktm")); //발생시간
  555. var mainsympnm = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mainsympnm")); //주증상
  556. var mainsympcd = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mainsympcd")); //주증상코드
  557. var mainsympnm1 = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mainsympnm1")); //주증상1
  558. var mainsympcd1 = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mainsympcd1")); //주증상코드1
  559. var mainsympnm2 = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mainsympnm2")); //주증상2
  560. var mainsympcd2 = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mainsympcd2")); //주증상코드2
  561. var etcsymp = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "etcsymp")); //기타증상
  562. dsf_createDs("ds_ccrectmp", [{col: "rectermcd", type:"string", size:256}
  563. ,{col: "rectermnm", type:"string", size:256}
  564. ,{col: "reccnts", type:"string", size:256}
  565. ,{col: "reccnts2", type:"string", size:256}
  566. ,{col: "rectermflag", type:"string", size:256}]);
  567. if (!utlf_isNull(mainsympnm))
  568. {
  569. var nRow = ds_ccrectmp.addRow();
  570. ds_ccrectmp.setColumn(nRow, "rectermcd", mainsympcd);
  571. ds_ccrectmp.setColumn(nRow, "rectermnm", mainsympnm);
  572. if (!utlf_isNull(attackdd))
  573. {
  574. attackdd = attackdd.substr(0, 4) + "-" + attackdd.substr(4, 2) + "-" + attackdd.substr(6, 2);
  575. if (!utlf_isNull(attacktm))
  576. {
  577. attacktm = attacktm.substr(0, 2) + ":" + attacktm.substr(2, 2);
  578. }
  579. ds_ccrectmp.setColumn(nRow, "reccnts2", attackdd + " " + attacktm);
  580. }
  581. }
  582. if (!utlf_isNull(mainsympnm1))
  583. {
  584. var nRow = ds_ccrectmp.addRow();
  585. ds_ccrectmp.setColumn(nRow, "rectermcd", mainsympcd1);
  586. ds_ccrectmp.setColumn(nRow, "rectermnm", mainsympnm1);
  587. if (!utlf_isNull(attackdd))
  588. {
  589. ds_ccrectmp.setColumn(nRow, "reccnts2", attackdd + " " + attacktm);
  590. }
  591. }
  592. if (!utlf_isNull(mainsympnm2))
  593. {
  594. var nRow = ds_ccrectmp.addRow();
  595. ds_ccrectmp.setColumn(nRow, "rectermcd", mainsympcd2);
  596. ds_ccrectmp.setColumn(nRow, "rectermnm", mainsympnm2);
  597. if (!utlf_isNull(attackdd))
  598. {
  599. ds_ccrectmp.setColumn(nRow, "reccnts2", attackdd + " " + attacktm);
  600. }
  601. }
  602. if (!utlf_isNull(etcsymp))
  603. {
  604. var nRow = ds_ccrectmp.addRow();
  605. ds_ccrectmp.setColumn(nRow, "rectermcd", "-");
  606. ds_ccrectmp.setColumn(nRow, "rectermnm", etcsymp);
  607. if (!utlf_isNull(attackdd))
  608. {
  609. ds_ccrectmp.setColumn(nRow, "reccnts2", attackdd + " " + attacktm);
  610. }
  611. }
  612. if( ds_ccrectmp.rowcount > -1 ){
  613. var gridObj = ComnFormObj.ivw_0000931001.components["grd_diaglist"];
  614. var gridDs = ComnFormObj.ivw_0000931001.objects[gridObj.binddataset];
  615. gridDs.clearData();
  616. gridDs.copyData(ds_ccrectmp);
  617. ComnFormObj.ivw_0000931001.fAddrow();
  618. }
  619. var objDs = this.removeChild("ds_ccrectmp");
  620. delete objDs;
  621. objDs = null;
  622. /*
  623. model.removeNodeset("/root/ccrectmp/recitem");
  624. var attackdd = model.getValue("/root/interface/ertriage/ertriage/attackdd"); //발생일
  625. var attacktm = model.getValue("/root/interface/ertriage/ertriage/attacktm"); //발생시간
  626. var mainsympnm = model.getValue("/root/interface/ertriage/ertriage/mainsympnm"); //주증상
  627. var mainsympcd = model.getValue("/root/interface/ertriage/ertriage/mainsympcd"); //주증상코드
  628. var mainsympnm1 = model.getValue("/root/interface/ertriage/ertriage/mainsympnm1"); //주증상1
  629. var mainsympcd1 = model.getValue("/root/interface/ertriage/ertriage/mainsympcd1"); //주증상코드1
  630. var mainsympnm2 = model.getValue("/root/interface/ertriage/ertriage/mainsympnm2"); //주증상2
  631. var mainsympcd2 = model.getValue("/root/interface/ertriage/ertriage/mainsympcd2"); //주증상코드2
  632. var etcsymp = model.getValue("/root/interface/ertriage/ertriage/etcsymp"); //기타증상
  633. var i = 1;
  634. if (mainsympnm != "")
  635. {
  636. model.makeNode("/root/ccrectmp/recitem[" + i + "]");
  637. model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
  638. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
  639. model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
  640. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formcd");
  641. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
  642. model.makeNode("/root/ccrectmp/recitem[" + i + "]/degnitemno");
  643. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000931001");
  644. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931");
  645. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rectermcd");
  646. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
  647. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
  648. model.makeNode("/root/ccrectmp/recitem[" + i + "]/reccnts");
  649. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
  650. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "MTX");
  651. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "주호소");
  652. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "1");
  653. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rectermnm");
  654. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rowno");
  655. model.makeNode("/root/ccrectmp/recitem[" + i + "]/colno");
  656. i++;
  657. model.makeNode("/root/ccrectmp/recitem[" + i + "]");
  658. model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
  659. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
  660. model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
  661. model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
  662. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
  663. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "1");
  664. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000931001");
  665. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931");
  666. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rectermcd");
  667. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
  668. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
  669. model.makeNode("/root/ccrectmp/recitem[" + i + "]/reccnts");
  670. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
  671. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GRD");
  672. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "주호소");
  673. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "2");
  674. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rectermnm");
  675. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 0);
  676. model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", -1);
  677. i++;
  678. model.makeNode("/root/ccrectmp/recitem[" + i + "]");
  679. model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
  680. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
  681. model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
  682. model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
  683. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
  684. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "5");
  685. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000931001");
  686. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000931");
  687. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", mainsympcd);
  688. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
  689. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
  690. model.makeNode("/root/ccrectmp/recitem[" + i + "]/reccnts");
  691. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
  692. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
  693. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "주호소");
  694. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
  695. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", mainsympnm);
  696. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 0);
  697. model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 0);
  698. i++;
  699. if (attackdd != "")
  700. {
  701. attackdd = attackdd.substr(0, 4) + "-" + attackdd.substr(4, 2) + "-" + attackdd.substr(6, 2);
  702. if (attacktm != "")
  703. {
  704. attacktm = attacktm.substr(0, 2) + ":" + attacktm.substr(2, 2);
  705. }
  706. model.makeNode("/root/ccrectmp/recitem[" + i + "]");
  707. model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
  708. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
  709. model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
  710. model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
  711. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
  712. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "10");
  713. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000299002");
  714. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000299");
  715. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", "");
  716. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
  717. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
  718. model.makeValue("/root/ccrectmp/recitem[" + i + "]/reccnts", attackdd + " " + attacktm);
  719. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
  720. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
  721. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "발생일");
  722. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
  723. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", "");
  724. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 0);
  725. model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 2);
  726. i++;
  727. }
  728. }
  729. if (mainsympnm1 != "")
  730. {
  731. model.makeNode("/root/ccrectmp/recitem[" + i + "]");
  732. model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
  733. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
  734. model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
  735. model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
  736. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
  737. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "5");
  738. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000931001");
  739. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000931");
  740. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", mainsympcd1);
  741. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
  742. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
  743. model.makeNode("/root/ccrectmp/recitem[" + i + "]/reccnts");
  744. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
  745. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
  746. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "주호소");
  747. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
  748. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", mainsympnm1);
  749. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 1);
  750. model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 0);
  751. i++;
  752. if (attackdd != "")
  753. {
  754. model.makeNode("/root/ccrectmp/recitem[" + i + "]");
  755. model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
  756. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
  757. model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
  758. model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
  759. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
  760. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "10");
  761. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000299002");
  762. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000299");
  763. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", "");
  764. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
  765. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
  766. model.makeValue("/root/ccrectmp/recitem[" + i + "]/reccnts", attackdd + " " + attacktm);
  767. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
  768. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
  769. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "발생일");
  770. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
  771. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", "");
  772. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 1);
  773. model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 2);
  774. i++;
  775. }
  776. }
  777. if (mainsympnm2 != "")
  778. {
  779. model.makeNode("/root/ccrectmp/recitem[" + i + "]");
  780. model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
  781. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
  782. model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
  783. model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
  784. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
  785. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "5");
  786. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000931001");
  787. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000931");
  788. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", mainsympcd2);
  789. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
  790. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
  791. model.makeNode("/root/ccrectmp/recitem[" + i + "]/reccnts");
  792. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
  793. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
  794. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "주호소");
  795. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
  796. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", mainsympnm2);
  797. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 2);
  798. model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 0);
  799. i++;
  800. if (attackdd != "")
  801. {
  802. model.makeNode("/root/ccrectmp/recitem[" + i + "]");
  803. model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
  804. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
  805. model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
  806. model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
  807. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
  808. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "10");
  809. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000299002");
  810. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000299");
  811. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", "");
  812. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
  813. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
  814. model.makeValue("/root/ccrectmp/recitem[" + i + "]/reccnts", attackdd + " " + attacktm);
  815. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
  816. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
  817. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "발생일");
  818. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
  819. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", "");
  820. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 2);
  821. model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 2);
  822. i++;
  823. }
  824. }
  825. if (etcsymp != "")
  826. {
  827. model.makeNode("/root/ccrectmp/recitem[" + i + "]");
  828. model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
  829. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
  830. model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
  831. model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
  832. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
  833. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "5");
  834. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000931001");
  835. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000931");
  836. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", "-");
  837. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
  838. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
  839. model.makeNode("/root/ccrectmp/recitem[" + i + "]/reccnts");
  840. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
  841. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
  842. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "주호소");
  843. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
  844. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", etcsymp);
  845. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 3);
  846. model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 0);
  847. i++;
  848. if (attackdd != "")
  849. {
  850. model.makeNode("/root/ccrectmp/recitem[" + i + "]");
  851. model.makeValue("/root/ccrectmp/recitem[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
  852. model.makeNode("/root/ccrectmp/recitem[" + i + "]/rechistseq");
  853. model.makeValue("/root/ccrectmp/recitem[" + i + "]/fstlevlitemcd", "0000931001");
  854. model.makeValue("/root/ccrectmp/recitem[" + i + "]/formcd", "0000000901");
  855. model.makeNode("/root/ccrectmp/recitem[" + i + "]/formdegnseq");
  856. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemno", "10");
  857. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemcd", "0000299002");
  858. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlcd", "0000931.0000931.0000299");
  859. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermcd", "");
  860. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recrefcd");
  861. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recitemnm");
  862. model.makeValue("/root/ccrectmp/recitem[" + i + "]/reccnts", attackdd + " " + attacktm);
  863. model.makeNode("/root/ccrectmp/recitem[" + i + "]/recimge");
  864. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemkind", "GSU");
  865. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemnm", "발생일");
  866. model.makeValue("/root/ccrectmp/recitem[" + i + "]/degnitemlevlno", "3");
  867. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rectermnm", "");
  868. model.makeValue("/root/ccrectmp/recitem[" + i + "]/rowno", 3);
  869. model.makeValue("/root/ccrectmp/recitem[" + i + "]/colno", 2);
  870. i++;
  871. }
  872. }
  873. var nodeList = model.instances(0).selectNodes("/root/ccrectmp/recitem");
  874. ivw_0000931001.window.javascript.clearData();
  875. if (nodeList.length > 0)
  876. {
  877. setSrchData("/root/ccrectmp/recitem", ivw_0000931001);
  878. ivw_0000931001.window.javascript.fAddrow();
  879. }
  880. */
  881. }
  882. /****************************************************************************************
  883. * Function : fSetErTriageRec
  884. * Description : 트리아제 연동
  885. * retrun type :
  886. ****************************************************************************************/
  887. function fSetErTriageRec(ivwObj, levlcd, ImgeYN)
  888. {
  889. //현병력
  890. if (ivwObj.name == "ivw_0001173001" && !utlf_isNull(ivwObj.url))
  891. {
  892. var nRow, degnitemkind, degnitemno, colId;
  893. //의도성
  894. var itemVal = new ITEMVAL();
  895. var intenflag = ds_ertriage.getColumn(0, "intenflag"); //의도성코드
  896. if (!utlf_isNull(intenflag) && intenflag != "-")
  897. {
  898. var intntermcd = ds_inten.lookup("hardcd", intenflag, "hardcdnm");
  899. itemVal.rectermcd = intntermcd;
  900. ivwObj.setFormItemValue("0001667", itemVal);
  901. }
  902. //손상기전
  903. var itemVal1 = new ITEMVAL();
  904. var injmechflag = ds_ertriage.getColumn(0, "injmechflag"); //손상기전코드
  905. if (!utlf_isNull(injmechflag) && injmechflag != "-")
  906. {
  907. var injmechcd = ds_injmech.lookup("hardcd", injmechflag, "hardcdnm");
  908. itemVal1.rectermcd = injmechcd;
  909. ivwObj.setFormItemValue("0020479", itemVal1);
  910. }
  911. //보호장구
  912. var itemVal2 = new ITEMVAL();
  913. var proceqmtflag = ds_ertriage.getColumn(0, "proceqmtflag"); //보호장구
  914. if (!utlf_isNull(proceqmtflag) && proceqmtflag != "-")
  915. {
  916. var arrProceqmtflag = proceqmtflag.split("|")
  917. if (arrProceqmtflag.length > 0)
  918. {
  919. var proceqmtcd = "";
  920. var proceqmtnm = "";
  921. var compproceqmtflag = "";
  922. var tmpProceqmtflag = "";
  923. var tmpProceqmtnm = "";
  924. for (var i = 0; i < arrProceqmtflag.length; i++)
  925. {
  926. tmpProceqmtcd = ds_prcp.lookup("hardcd", arrProceqmtflag[i], "hardcdnm");
  927. proceqmtcd += tmpProceqmtcd + " ";
  928. }
  929. itemVal2.rectermcd = proceqmtcd.substring(0, proceqmtcd.length - 1);
  930. ivwObj.setFormItemValue("0020478", itemVal2);
  931. }
  932. }
  933. //2010.05.10 김달현 추가
  934. //내원사유(M0120)
  935. var itemVal3 = new ITEMVAL();
  936. var chosresnflag = ds_ertriage.getColumn(0, "chosresnflag");
  937. var chosresncd, chosresnnm;
  938. if(chosresnflag == "1"){//질병
  939. chosresncd = "0003034001";
  940. }else if(chosresnflag == "2"){//질병외
  941. chosresncd = "0038976001";
  942. }else if(chosresnflag == "3"){//진료외방문
  943. chosresncd = "0038977001";
  944. }else if(chosresnflag == "9"){//미상
  945. chosresncd = "0017158001";
  946. }
  947. //chosresnnm = ivwObj.window.javascript.model.getValue("/root/main/forminfo/vallist[valcd='"+chosresncd+"']/valitemnm");
  948. if(!utlf_isNull(chosresnflag)){
  949. itemVal3.rectermcd = chosresncd;
  950. ivwObj.setFormItemValue("0019376", itemVal3);
  951. }
  952. //2010.05.10 김달현 추가
  953. //내원수단(M0119)
  954. var itemVal4 = new ITEMVAL();
  955. var choswayflag = ds_ertriage.getColumn(0, "choswayflag");
  956. var choswaycd, choswaynm;
  957. if(choswayflag == "1"){//119 구급차
  958. choswaycd = "0035600001";
  959. }else if(choswayflag == "2"){//병원구급차
  960. choswaycd = "0038986001";
  961. }else if(choswayflag == "3"){//기타구급차
  962. choswaycd = "0035601001";
  963. }else if(choswayflag == "4"){//경찰차 등 공공차량
  964. choswaycd = "0038978001";
  965. }else if(choswayflag == "5"){//항공이송
  966. choswaycd = "0038983001";
  967. }else if(choswayflag == "6"){//기타 자동차
  968. choswaycd = "0038984001";
  969. }else if(choswayflag == "7"){//도보
  970. choswaycd = "0002199001";
  971. }else if(choswayflag == "8"){//기타
  972. choswaycd = "0002141001";
  973. }else if(choswayflag == "9"){//미상
  974. choswaycd = "0017158001";
  975. }
  976. if(!utlf_isNull(choswayflag)){
  977. itemVal4.rectermcd = choswaycd;
  978. ivwObj.setFormItemValue("0000169", itemVal4);
  979. }
  980. //2010.05.10 김달현 추가
  981. //내원경로(M0118)
  982. var itemVal5 = new ITEMVAL();
  983. var chospathflag = ds_ertriage.getColumn(0, "chospathflag");
  984. var chospathcd, chospathnm;
  985. if(chospathflag == "1"){//직접내원
  986. chospathcd = "0000374001";
  987. }else if(chospathflag == "2"){//외부에서 전원
  988. chospathcd = "0038982001";
  989. }else if(chospathflag == "3"){//외래에서 의뢰
  990. chospathcd = "0038987001";
  991. }else if(chospathflag == "8"){//기타
  992. chospathcd = "0002141001";
  993. }else if(chospathflag == "9"){//미상
  994. chospathcd = "0017158001";
  995. }
  996. if(!utlf_isNull(chospathflag)){
  997. itemVal5.rectermcd = chospathcd;
  998. ivwObj.setFormItemValue("0023492", itemVal5);
  999. }
  1000. }
  1001. //신체검진
  1002. if (ivwObj.name == "ivw_0000570001" && !utlf_isNull(ivwObj.url))
  1003. {
  1004. //분당맥박수
  1005. var itemVal = new ITEMVAL();
  1006. var mntpulsecnt = ds_ertriage.getColumn(0, "mntpulsecnt");
  1007. itemVal.reccnts = mntpulsecnt;
  1008. ivwObj.setFormItemValue("0000879.0001221.0000258", itemVal);
  1009. //분당호흡수
  1010. itemVal = new ITEMVAL();
  1011. var mntbrethcnt = ds_ertriage.getColumn(0, "mntbrethcnt");
  1012. itemVal.reccnts = mntbrethcnt;
  1013. ivwObj.setFormItemValue("0000879.0001221.0000993", itemVal);
  1014. //내원시체온
  1015. itemVal = new ITEMVAL();
  1016. var chosbdtp = ds_ertriage.getColumn(0, "chosbdtp");
  1017. itemVal.reccnts = chosbdtp;
  1018. ivwObj.setFormItemValue("0000879.0001221.0000992", itemVal);
  1019. //수축기혈압
  1020. itemVal = new ITEMVAL();
  1021. var highbp = ds_ertriage.getColumn(0, "highbp");
  1022. itemVal.reccnts = highbp;
  1023. ivwObj.setFormItemValue("0000879.0001221.0001180.0000525", itemVal);
  1024. //이완기혈압
  1025. itemVal = new ITEMVAL();
  1026. var lowbp = ds_ertriage.getColumn(0, "lowbp");
  1027. itemVal.reccnts = lowbp;
  1028. ivwObj.setFormItemValue("0000879.0001221.0001180.0000791", itemVal);
  1029. //산소포화도
  1030. itemVal = new ITEMVAL();
  1031. var oxyconcen = ds_ertriage.getColumn(0, "oxyconcen");
  1032. itemVal.reccnts = oxyconcen;
  1033. ivwObj.setFormItemValue("0000879.0001221.0005957", itemVal);
  1034. //2010.05.10 김달현 추가
  1035. //의식(AVPU Scale)
  1036. itemVal = new ITEMVAL();
  1037. var cscsflag = ds_ertriage.getColumn(0, "cscsflag");
  1038. var cscscd, cscsnm;
  1039. if(cscsflag == "A"){//Alert
  1040. cscscd = "0000544";
  1041. }else if(cscsflag == "V"){//Verbal response
  1042. cscscd = "0014272";
  1043. }else if(cscsflag == "P"){//Painful response
  1044. cscscd = "0015321";
  1045. }else if(cscsflag == "U"){//Unresponsive
  1046. cscscd = "0038958";
  1047. }
  1048. if(!utlf_isNull(cscscd)){
  1049. itemVal.rectermcd = cscscd;
  1050. ivwObj.setFormItemValue("0000900.0000898.0023476", itemVal);
  1051. }
  1052. }
  1053. // knuh_20110708_추가_text박스인 경우는 내용으로 셋팅하기 위함.
  1054. // 신체검진에서 가져와야 되는 항목 : 내원수단, 의식, VS(수축기혈압, 이완기혈압, 분당맥박수, 분당호흡수, 내원시 체온)
  1055. else if (ivwObj.name == "ivw_0000570001" && utlf_isNull(ivwObj.url))
  1056. {
  1057. var pid = "";
  1058. var choswayflagnm = ""; // 내원수단
  1059. var cscsflagnm = ""; // 의식
  1060. var highbp = ""; // 수축기혈압
  1061. var lowbp = ""; // 이완기혈압
  1062. var mntpulsecnt = ""; // 분당맥박수
  1063. var mntbrethcnt = ""; // 분당호흡수
  1064. var chosbdtp = ""; // 내원시 체온
  1065. // triage 내용
  1066. var reccnts_old = "";
  1067. var reccnts = "";
  1068. // triage 정보 2번 가져오는 부분 체크(신규일때 현병력 화면 크기 조절시)
  1069. //alert(ImgeYN);
  1070. if (ImgeYN == "Y")
  1071. {
  1072. var nFindRow = ds_data_recitem.findRow("fstlevlitemcd", "0000570001");
  1073. reccnts_old = ds_data_recitem.getColumn(nFindRow, "reccnts");
  1074. if (!utlf_isNull(reccnts_old))
  1075. {
  1076. reccnts_old = reccnts_old + "\n" + "\n";
  1077. }
  1078. pid = ds_ertriage.getColumn(0, "pid");
  1079. if (utlf_isNull(pid))
  1080. {
  1081. //sysf_messageBox("Triage 기록이 작성되지", "E007");
  1082. }
  1083. else
  1084. {
  1085. choswayflagnm = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "choswayflagnm"));
  1086. cscsflagnm = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "cscsflagnm"));
  1087. highbp = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "highbp"));
  1088. lowbp = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "lowbp"));
  1089. mntpulsecnt = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mntpulsecnt"));
  1090. mntbrethcnt = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "mntbrethcnt"));
  1091. chosbdtp = utlf_transNullToEmpty(ds_ertriage.getColumn(0, "chosbdtp"));
  1092. reccnts = reccnts_old +
  1093. "내원수단 : " + choswayflagnm + "\n" +
  1094. "의식 : " + cscsflagnm + "\n" +
  1095. "수축기혈압 : " + highbp + "\n" +
  1096. "이완기혈압 : " + lowbp + "\n" +
  1097. "분당맥박수 : " + mntpulsecnt + "\n" +
  1098. "분당호흡수 : " + mntbrethcnt + "\n" +
  1099. "내원시 체온 : " + chosbdtp;
  1100. //model.setValue("/root/main/recinfo/recitem[fstlevlitemcd='0000570001']/reccnts", reccnts);
  1101. var tarObj = ComnFormObj.components["tar_0000570001"];
  1102. var nRow = ds_data_recitem.findRowExpr("degnitemkind == 'MTX' && fstlevlitemcd == '0000570001' && degnitemlevlno == '1'");
  1103. ds_data_recitem.setColumn(nRow, "reccnts", reccnts);
  1104. tarObj.value = reccnts;
  1105. }
  1106. }
  1107. }
  1108. }
  1109. /****************************************************************************************
  1110. * Function : fPopEduDsch_SMMMR00701
  1111. * Description : 퇴원요구도/교육요구도 jci 팝업 호출
  1112. * retrun type :
  1113. * Creator :
  1114. ****************************************************************************************/
  1115. function fPopEduDsch_SMMMR00701(){
  1116. var pid = parent.fGetPamInfo("pid");
  1117. var indd = parent.fGetPamInfo("indd");
  1118. var cretno = parent.fGetPamInfo("cretno");
  1119. this.frmf_setParameter("SPMRJ00300_pid", pid);
  1120. this.frmf_setParameter("SPMRJ00300_orddd", indd);
  1121. this.frmf_setParameter("SPMRJ00300_cretno", cretno);
  1122. frmf_modal("SPMRJ00300", "SPMRJ00300", null, null, 1, 0, 0, null, null, null, null, null, "M");
  1123. }
  1124. /****************************************************************************************
  1125. * Function : getSubmitID_MMR01300I
  1126. * Description : MMR01300.js에서 submit직전에 submitID를 설정하기 위해서 호출한다.
  1127. * retrun type :
  1128. ****************************************************************************************/
  1129. function getSubmitID_MMR01300I() {
  1130. parent.fSetFormRec("addexecflag", "careplan");
  1131. //2010.02.23 dhkim - 통합기록조회용 JCI구분자추가(fSetXsltFlag없애고 getSubmitID_MMR01300I로 이동)
  1132. parent.fSetFormRec("xsltflag", "JCI2");
  1133. return TX_SUBMIT_EXTN_FORM;
  1134. }
  1135. /****************************************************************************************
  1136. * Function : initFormAtLast_MMR01100I
  1137. * Description : MMR01100.js에서 서식load를 완료한 후에 호출한다.
  1138. * retrun type :
  1139. ****************************************************************************************/
  1140. function initFormAtLast_MMR01100I() {
  1141. try{
  1142. //grup_base.ivw_0013328001.fAddrow();
  1143. if (parent.fGetFormRec("status") == "C") {
  1144. fSetTriageValue_MMR00701("A", true);
  1145. fSetTriageValue_MMR00701("C", false);
  1146. fSetTriageValue_MMR00701("B", false);
  1147. gImge = "N";
  1148. }
  1149. lodedYn = true;
  1150. }catch(e){
  1151. sysf_catchTrace(e);
  1152. }
  1153. }
  1154. /****************************************************************************************
  1155. * Function : fSetTriageValue_MMR00701
  1156. * Description : Triage 입력내용을 설정한다.
  1157. * retrun type :
  1158. ****************************************************************************************/
  1159. function fSetTriageValue_MMR00701(flag, isSubmit, ibuttnyn) {
  1160. if (utlf_isNull(isSubmit)) {
  1161. isSubmit = true;
  1162. }
  1163. if (utlf_isNull(ibuttnyn))
  1164. {
  1165. if (gImge == "N")
  1166. {
  1167. ibuttnyn = "N";
  1168. }
  1169. else
  1170. {
  1171. ibuttnyn = "Y";
  1172. }
  1173. }
  1174. var isSet = true;
  1175. if (isSubmit) {
  1176. ds_send_reqdata.clearData();
  1177. ds_send_reqdata.addRow();
  1178. ds_send_reqdata.setColumn(0, "pid", parent.fGetFormRec("pid"));
  1179. ds_send_reqdata.setColumn(0, "orddd", parent.fGetFormRec("orddd"));
  1180. ds_send_reqdata.setColumn(0, "cretno", parent.fGetFormRec("cretno"));
  1181. ds_send_reqdata.setColumn(0, "queryflag", "K");
  1182. var oParam = {};
  1183. oParam.id = "TRMNE04403";
  1184. oParam.service = "ercareapp.ERInRmOutRmMngt";
  1185. oParam.method = "reqGetERTriagePatInfo";
  1186. oParam.inds = "req=ds_send_reqdata";
  1187. oParam.outds = "ds_ertriage=ertriage";
  1188. oParam.async = false;
  1189. oParam.progress = false;
  1190. oParam.callback = "cf_TRMNE04403";
  1191. tranf_submit(oParam);
  1192. if( arErrorCode.pop("TRMNE04403") > -1 ){
  1193. isSet = true;
  1194. }else{
  1195. isSet = false;
  1196. }
  1197. }
  1198. if (flag == "A") {
  1199. //주호소
  1200. if(isSet) {
  1201. if( lodedYn == false ){
  1202. this.setTimer(7030, 500);
  1203. }else{
  1204. fSetCC();
  1205. }
  1206. }
  1207. } else if (flag == "B") {
  1208. //현병력
  1209. if(isSet) {
  1210. if( lodedYn == false ){
  1211. this.setTimer(7031, 500);
  1212. }else{
  1213. var iobj = ComnFormObj.components["ivw_0001173001"];
  1214. fSetErTriageRec(iobj, "0001173");
  1215. }
  1216. }
  1217. } else if (flag == "C") {
  1218. //신체검진
  1219. if(isSet) {
  1220. if( lodedYn == false ){
  1221. gIbuttnyn = ibuttnyn;
  1222. this.setTimer(7032, 500);
  1223. }else{
  1224. var iobj = ComnFormObj.components["ivw_0000570001"];
  1225. fSetErTriageRec(iobj, "0000570", ibuttnyn);
  1226. }
  1227. }
  1228. }
  1229. }
  1230. function cf_TRMNE04403(sSvcId, nErrorCode, sErrorMsg) {
  1231. arErrorCode.push(sSvcId, nErrorCode);
  1232. }
  1233. ]]></Script>