MMR00702.xjs 56 KB

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