SPADC02800_다학제간교육회신내용.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>다학제간 환자 교육정보 입력</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <educcntslists/>
  11. <recData>
  12. <cnstpsn1/>
  13. </recData>
  14. </main>
  15. <init>
  16. <J000000010/>
  17. <J000000011/>
  18. <J000000012/>
  19. <J000000013/>
  20. <list14/>
  21. <pinfo>
  22. <instcd/>
  23. <pid/>
  24. <orddd/>
  25. <cretno/>
  26. </pinfo>
  27. <opnerdatanstinfo>
  28. <nstflag/>
  29. <nodepath/>
  30. </opnerdatanstinfo>
  31. </init>
  32. <send>
  33. <instcd/>
  34. <pid/>
  35. <orddd/>
  36. <cretno/>
  37. </send>
  38. <hidden>
  39. <eduprepyn/>
  40. <eduwho/>
  41. <eduway/>
  42. <edurslt/>
  43. <edudd/>
  44. <edutm/>
  45. </hidden>
  46. </root>
  47. </instance>
  48. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  49. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  50. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  51. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  52. <script type="javascript" src="../../../emr/jcimngtweb/js/SMMRJ099.js"/>
  53. <script type="javascript" ev:event="xforms-ready">
  54. <![CDATA[
  55. fInit();
  56. ]]>
  57. </script>
  58. <submission id="TRMRJ09901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/hidden/temp"/>
  59. <submission id="TRMRJ00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main"/>
  60. <submission id="TXMRJ00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/listdata" resultref="/root/hidden/temp/msglist"/>
  61. </model>
  62. <script type="javascript">
  63. <![CDATA[
  64. function fInit() {
  65. fSelectCodeList();
  66. fSetEducTrgtMans() ;
  67. var vGridRows10 = datagrid10.rows;
  68. var vGridRows11 = datagrid11.rows;
  69. var vGridRows12 = datagrid12.rows;
  70. var vGridRows13 = datagrid13.rows;
  71. var vGridCheckValue10 = "";
  72. var vGridCheckValue11 = "";
  73. var vGridCheckValue12 = "";
  74. var vGridCheckValue13 = "";
  75. var etcCheckNum12 = 0;
  76. var etcCheckNum13 = 0;
  77. var nstflag = model.getValue("/root/init/opnerdatanstinfo/nstflag"); // 의뢰구분
  78. var NstNodepathMain = model.getValue("/root/init/opnerdatanstinfo/nodepath"); //opner Node Path - root/main/ennstinfo/
  79. // 수행시간을 현재 시간으로 세팅
  80. var curDt = getCurrentDateTime().split(" ");
  81. // 교육일자, 교육시간 세팅
  82. if(opener.model.getValue(NstNodepathMain + "enreduinfo/edudd") == "" ||
  83. opener.model.getValue(NstNodepathMain + "enreduinfo/edutm") == "" ||
  84. opener.model.getValue(NstNodepathMain + "enreduinfo/edudd") == "99991231" ||
  85. opener.model.getValue(NstNodepathMain + "enreduinfo/edutm") == "235959") {
  86. model.setValue("/root/hidden/edudd", curDt[0]);
  87. model.setValue("/root/hidden/edutm", curDt[1]);
  88. } else {
  89. model.setValue("/root/hidden/edudd", opener.model.getValue(NstNodepathMain + "enreduinfo/edudd"));
  90. model.setValue("/root/hidden/edutm", opener.model.getValue(NstNodepathMain + "enreduinfo/edutm"));
  91. }
  92. var eduprepyn = opener.model.getValue(NstNodepathMain + "enreduinfo/eduprepyn"); // 학습준비도
  93. var eduwho = opener.model.getValue(NstNodepathMain + "enreduinfo/eduwho"); // 교육대상자
  94. var eduway = opener.model.getValue(NstNodepathMain + "enreduinfo/eduway"); // 교육방법
  95. var edurslt = opener.model.getValue(NstNodepathMain + "enreduinfo/edurslt"); // 교육결과
  96. // 학습준비도 그리드 데이터 세팅
  97. var initCheck10 = "Y";
  98. for(i10=1; i10<vGridRows10; i10++)
  99. {
  100. if(datagrid10.valueMatrix(i10,1) == eduprepyn)
  101. {
  102. datagrid10.valueMatrix(i10,0) = "true";
  103. initCheck10 = "N";
  104. }
  105. }
  106. // 학습준비도 초기 값 세팅
  107. if(initCheck10 == "Y") {
  108. datagrid10.valueMatrix(1,0) = "true";
  109. }
  110. // 교육대상자 그리드 데이터 세팅
  111. var initCheck11 = "Y";
  112. eduwho = eduwho.split(", ");
  113. for(i11=1; i11<vGridRows11; i11++)
  114. {
  115. for(var i = 0; i < eduwho.length; ++i) {
  116. if(datagrid11.valueMatrix(i11,1) == eduwho[i])
  117. {
  118. datagrid11.valueMatrix(i11,0) = "true";
  119. initCheck11 = "N";
  120. }
  121. }
  122. }
  123. // 교육대상자 초기 값 세팅
  124. if(initCheck11 == "Y") {
  125. datagrid11.valueMatrix(1,0) = "true";
  126. }
  127. // 교육방법 그리드 데이터 세팅
  128. var initCheck12 = "Y";
  129. eduway = eduway.split(", ");
  130. for(i12=1; i12<vGridRows12; i12++)
  131. {
  132. for(var i = 0; i < eduway.length; ++i) {
  133. if(datagrid12.valueMatrix(i12,1) == eduway[i])
  134. {
  135. datagrid12.valueMatrix(i12,0) = "true";
  136. ++etcCheckNum12;
  137. initCheck12 = "N";
  138. }
  139. }
  140. // 기타 항목 체크1( 값이 '기타' 일 경우 )
  141. if(i12 == (vGridRows12-1) && datagrid12.valueMatrix(i12,1) == eduway[eduway.length-1]) {
  142. datagrid12.cellAttribute("disabled", i12, 1 ) = "false";
  143. datagrid12.cellstyle("background-color", i12, 1) = "#DDDDDD";
  144. initCheck12 = "N";
  145. }
  146. // 기타 항목 체크2( 값이 '기타' 가 아닐 경우 )
  147. if(i12 == (vGridRows12-1) && etcCheckNum12 != eduway.length) {
  148. if(eduway[eduway.length-1] != "") {
  149. datagrid12.valueMatrix(i12,0) = "true";
  150. datagrid12.valueMatrix(i12,1) = eduway[eduway.length-1];
  151. datagrid12.cellAttribute("disabled", (vGridRows12-1), 1 ) = "false";
  152. datagrid12.cellstyle("background-color", (vGridRows12-1), 1) = "#DDDDDD";
  153. initCheck12 = "N";
  154. }
  155. }
  156. }
  157. // 교육방법 초기 값 세팅
  158. if(initCheck12 == "Y") {
  159. datagrid12.valueMatrix(1,0) = "true";
  160. }
  161. // 교육결과 그리드 데이터 세팅
  162. var initCheck13 = "Y";
  163. edurslt = edurslt.split(", ");
  164. for(i13=1; i13<vGridRows13; i13++)
  165. {
  166. for(var i = 0; i < edurslt.length; ++i) {
  167. if(datagrid13.valueMatrix(i13,1) == edurslt[i])
  168. {
  169. datagrid13.valueMatrix(i13,0) = "true";
  170. ++etcCheckNum13;
  171. initCheck13 = "N";
  172. }
  173. }
  174. // 기타 항목 체크1( 값이 '기타' 일 경우 )
  175. if(i13 == (vGridRows13-1) && datagrid13.valueMatrix(i13,1) == edurslt[edurslt.length-1]) {
  176. datagrid13.cellAttribute("disabled", i13, 1 ) = "false";
  177. datagrid13.cellstyle("background-color", i13, 1) = "#DDDDDD";
  178. initCheck13 = "N";
  179. }
  180. // 기타 항목 체크2( 값이 '기타' 가 아닐 경우 )
  181. if(i13 == (vGridRows13-1) && etcCheckNum13 != edurslt.length) {
  182. if(edurslt[edurslt.length-1] != "") {
  183. datagrid13.valueMatrix(i13,0) = "true";
  184. datagrid13.valueMatrix(i13,1) = edurslt[edurslt.length-1];
  185. datagrid13.cellAttribute("disabled", (vGridRows13-1), 1 ) = "false";
  186. datagrid13.cellstyle("background-color", (vGridRows13-1), 1) = "#DDDDDD";
  187. initCheck13 = "N";
  188. }
  189. }
  190. }
  191. // 교육결과 초기 값 세팅
  192. if(initCheck13 == "Y") {
  193. datagrid13.valueMatrix(2,0) = "true";
  194. }
  195. model.refresh();
  196. }
  197. /*
  198. * 환자별영양관리 에서 넘겨받은 교육대상자 데이터 값체우기
  199. */
  200. function fSetEducTrgtMans() {
  201. var tmpCnstpsn1 = model.getValue("/root/main/recData/cnstpsn1");
  202. // 넘겨받은 데이터가 없으면 리턴
  203. if(tmpCnstpsn1 == "") {
  204. return;
  205. }
  206. var tmpString = tmpCnstpsn1.split("▦");
  207. for(var i = 0; i < tmpString.length; ++i) {
  208. datagrid11.valueMatrix(tmpString[i],0) = "true";
  209. }
  210. }
  211. function fSelectCodeList(){
  212. emrfGetCodeList(new Array("J000000010","J000000011","J000000012","J000000013"), new Array("/root/init/J000000010","/root/init/J000000011","/root/init/J000000012","/root/init/J000000013"));
  213. model.refresh();
  214. }
  215. function fCheckedGrd(grid){
  216. var currRow = grid.row
  217. var checkedYn = grid.valueMatrix(currRow,0);
  218. var checkedRowValue = grid.valueMatrix(currRow,2);
  219. var colDisabledCol = "";
  220. var colDisabledYN = "";
  221. var rowDefaultValue = "";
  222. if(checkedYn=="true"){
  223. colDisabledYN = "false";
  224. colDisabledCol = "#DDDDDD";
  225. rowDefaultValue = "";
  226. }else{
  227. colDisabledYN = "true";
  228. colDisabledCol = "#FFFFFF";
  229. rowDefaultValue = "직접입력(free text)";
  230. }
  231. if(checkedRowValue=="999"){
  232. grid.cellAttribute("disabled", currRow, 1 ) = colDisabledYN;
  233. grid.cellstyle("background-color", currRow, 1) = colDisabledCol;
  234. if (colDisabledYN=="true"){
  235. grid.valueMatrix(currRow, 1) = rowDefaultValue;
  236. }
  237. }
  238. }
  239. /*
  240. * 저장 버튼을 클릭하였을 경우 이벤트
  241. */
  242. function fOnClickSaveBtn(){
  243. if(!fAddOtherGrid()){
  244. return;
  245. }
  246. fClose();
  247. }
  248. function fAddOtherGrid(){
  249. var vGridRows10 = datagrid10.rows;
  250. var vGridRows11 = datagrid11.rows;
  251. var vGridRows12 = datagrid12.rows;
  252. var vGridRows13 = datagrid13.rows;
  253. var vGridCheckValue10 = "";
  254. var vGridCheckValue11 = "";
  255. var vGridCheckValue12 = "";
  256. var vGridCheckValue13 = "";
  257. var vGridCheckCnt10 = 0;
  258. var vGridCheckCnt11 = 0;
  259. var vGridCheckCnt12 = 0;
  260. var vGridCheckCnt13 = 0;
  261. var eduwho = "";
  262. for(i10=1; i10<vGridRows10; i10++)
  263. {
  264. if(datagrid10.valueMatrix(i10,0) =="true")
  265. {
  266. vGridCheckCnt10 = vGridCheckCnt10 + 1;
  267. vGridCheckValue10 = vGridCheckValue10+datagrid10.valueMatrix(i10,1);
  268. }
  269. }
  270. if(vGridCheckCnt10==0){
  271. alert("선택된 학습준비도 항목이 없습니다...! 1개이상 항목을 선택 후 진행해 주세요");
  272. return false;
  273. }
  274. for(i11=1; i11<vGridRows11; i11++)
  275. {
  276. if(datagrid11.valueMatrix(i11,0) =="true")
  277. {
  278. vGridCheckCnt11 = vGridCheckCnt11 + 1;
  279. if(vGridCheckValue11=="")
  280. {
  281. vGridCheckValue11 = vGridCheckValue11+datagrid11.valueMatrix(i11,1);
  282. eduwho = i11;
  283. }else
  284. {
  285. vGridCheckValue11 = vGridCheckValue11+", "+datagrid11.valueMatrix(i11,1);
  286. eduwho = eduwho + "▦" + i11;
  287. }
  288. }
  289. }
  290. if(vGridCheckCnt11==0){
  291. alert("선택된 교육대상자 항목이 없습니다...! 1개이상 항목을 선택 후 진행해 주세요");
  292. return false;
  293. }
  294. for(i12=1; i12<vGridRows12; i12++)
  295. {
  296. if(datagrid12.valueMatrix(i12,0) =="true")
  297. {
  298. vGridCheckCnt12 = vGridCheckCnt12 + 1;
  299. if(vGridCheckValue12=="")
  300. {
  301. vGridCheckValue12 = vGridCheckValue12+datagrid12.valueMatrix(i12,1);
  302. }else
  303. {
  304. vGridCheckValue12 = vGridCheckValue12+", "+datagrid12.valueMatrix(i12,1);
  305. }
  306. }
  307. }
  308. if(vGridCheckCnt12==0){
  309. alert("선택된 교육방법 항목이 없습니다...! 1개이상 항목을 선택 후 진행해 주세요");
  310. return false;
  311. }
  312. for(i13=1; i13<vGridRows13; i13++)
  313. {
  314. if(datagrid13.valueMatrix(i13,0) =="true")
  315. {
  316. vGridCheckCnt13 = vGridCheckCnt13 + 1;
  317. vGridCheckValue13 = vGridCheckValue13+datagrid13.valueMatrix(i13,1);
  318. }
  319. }
  320. if(vGridCheckCnt13==0){
  321. alert("선택된 교육결과 항목이 없습니다...! 1개이상 항목을 선택 후 진행해 주세요");
  322. return false;
  323. }
  324. if(model.getValue("/root/hidden/edudd") == "") {
  325. alert("'교육일자' 를 입력해주세요");
  326. return false;
  327. }
  328. if(model.getValue("/root/hidden/edutm") == "") {
  329. alert("'교육시간' 을 입력해주세요");
  330. return false;
  331. }
  332. var target = model.property("eventtarget"); // 이벤트가 발생한 그리드
  333. var targetRow = model.property("targetrow"); // 이벤트가 발생한 그리드 row 값
  334. var NstNodepathMain = model.getValue("/root/init/opnerdatanstinfo/nodepath"); //opner Node Path - root/main/ennstinfo/
  335. var cnts = opener.cmb_cnstcd.label; // 상용구선택
  336. var cnstcnts = opener.model.getValue(NstNodepathMain + "/nutreduinfo/dietedurslt"); // 상용구 아래 텍스트 박스 내용
  337. // 교육내용 = 상용구선택 + 상용구 아래 텍스트 박스 내용
  338. if(cnts != "" && cnstcnts != "") {
  339. cnts = cnts + ", " + cnstcnts;
  340. } else if(cnts != "") {
  341. cnts = cnts;
  342. } else if(cnstcnts != "") {
  343. cnts = cnstcnts;
  344. } else {
  345. cnts = "";
  346. }
  347. // 영양관리이력 데이터 세팅
  348. opener.model.setValue(NstNodepathMain + "enreduinfo/delyn" , "N"); // 삭제유무
  349. opener.model.setValue(NstNodepathMain + "enreduinfo/educd" , "004"); // 교육항목코드
  350. opener.model.setValue(NstNodepathMain + "enreduinfo/educnts" , cnts); // 교육내용
  351. opener.model.setValue(NstNodepathMain + "enreduinfo/eduprepyn" , vGridCheckValue10); // 학습준비도(Y/N)
  352. opener.model.setValue(NstNodepathMain + "enreduinfo/eduwho" , vGridCheckValue11); // 교육대상자(환자, 보호자, 기타)
  353. opener.model.setValue(NstNodepathMain + "enreduinfo/eduway" , vGridCheckValue12); // 교육방법
  354. opener.model.setValue(NstNodepathMain + "enreduinfo/edurslt" , vGridCheckValue13); // 교육결과
  355. opener.model.setValue(NstNodepathMain + "enreduinfo/edudd" , model.getValue("/root/hidden/edudd")); // 교육일자
  356. opener.model.setValue(NstNodepathMain + "enreduinfo/edutm" , model.getValue("/root/hidden/edutm")); // 교육시간
  357. return true;
  358. }
  359. function fClose(){
  360. window.close();
  361. }
  362. ]]>
  363. </script>
  364. </xhtml:head>
  365. <xhtml:body pagewidth="900" pageheight="220" guideline="1,1148;">
  366. <datagrid id="datagrid10" nodeset="/root/init/J000000010/J000000010" caption="선택^학습준비도" colsep="^" colwidth="40, 80" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" style="left:10px; top:30px; width:123px; height:75px; ">
  367. <col ref="selected" type="radio"/>
  368. <col ref="cdnm"/>
  369. </datagrid>
  370. <datagrid id="datagrid11" nodeset="/root/init/J000000011/J000000011" caption="선택^교육대상자" colsep="^" colwidth="40, 80, 0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" style="left:10px; top:105px; width:123px; height:100px; ">
  371. <col ref="selected" type="checkbox"/>
  372. <col disabled="true" ref="cdnm" type="input"/>
  373. <col ref="cdno" type="hidden"/>
  374. <script type="javascript" ev:event="xforms-value-changed">
  375. <![CDATA[
  376. ]]>
  377. </script>
  378. </datagrid>
  379. <datagrid id="datagrid12" nodeset="/root/init/J000000012/J000000012" caption="선택^교육방법" colsep="^" colwidth="40, 192, 0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" style="left:139px; top:29px; width:235px; height:176px; ">
  380. <col ref="selected" type="checkbox"/>
  381. <col disabled="true" ref="cdnm" type="input" style="left:40px; top:23px; width:150px; height:23px; "/>
  382. <col ref="cdno" type="hidden"/>
  383. <script type="javascript" ev:event="xforms-value-changed">
  384. <![CDATA[
  385. fCheckedGrd(datagrid12);
  386. ]]>
  387. </script>
  388. </datagrid>
  389. <datagrid id="datagrid13" nodeset="/root/init/J000000013/J000000013" caption="선택^교육결과" colsep="^" colwidth="40, 280, 0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" style="left:379px; top:29px; width:323px; height:176px; ">
  390. <col ref="selected" type="radio"/>
  391. <col disabled="true" ref="cdnm" type="input"/>
  392. <col ref="cdno" type="hidden"/>
  393. <script type="javascript" ev:event="xforms-value-changed">
  394. <![CDATA[
  395. fCheckedGrd(datagrid13);
  396. ]]>
  397. </script>
  398. </datagrid>
  399. <input id="ipt_edudd" ref="/root/hidden/edudd" inputtype="date" format="yyyy-mm-dd" style="left:790px; top:30px; width:90px; height:19px; "/>
  400. <caption id="caption2" style="left:705px; top:30px; width:85px; height:20px; font-weight:bold; ">* 교육일자 :</caption>
  401. <input id="ipt_edutm" ref="/root/hidden/edutm" format="hh:nn" type="input" style="left:790px; top:54px; width:65px; height:19px; "/>
  402. <caption id="caption3" style="left:705px; top:54px; width:85px; height:20px; font-weight:bold; ">* 교육시간 :</caption>
  403. <button id="btn_save" class="btn3_letter2" style="left:825px; top:185px; width:56px; height:22px; ">
  404. <caption>확인</caption>
  405. <script type="javascript" ev:event="DOMActivate">
  406. <![CDATA[
  407. fOnClickSaveBtn();
  408. ]]>
  409. </script>
  410. </button>
  411. <button id="button5" class="btn4_letter2" visibility="hidden" style="left:770px; top:160px; width:56px; height:22px; ">
  412. <caption>닫기</caption>
  413. <script type="javascript" ev:event="DOMActivate">
  414. <![CDATA[
  415. fClose();
  416. ]]>
  417. </script>
  418. </button>
  419. <caption id="caption17" ref="/root/main/patordinfo/patordinfo" class="tit_2" style="left:10px; top:5px; width:617px; height:14px; ">다학제간 환자 교육정보 입력</caption>
  420. <line id="line12" class="line_1" style="x1:10px; y1:20px; x2:702px; y2:20px; "/>
  421. <line id="line1" class="line_3" style="x1:10px; y1:210px; x2:702px; y2:210px; "/>
  422. </xhtml:body>
  423. </xhtml:html>