SPAYA03500_환자관리내용조회.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SPAYA03500_환자관리내용조회.xrw
  4. * 설 명 : 환자관리내용조회
  5. * 작 성 자 : 김다영
  6. * 작 성 일 : 2007.12.03
  7. * 수정이력 :
  8. * 기 타 :
  9. -->
  10. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  11. <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">
  12. <xhtml:head>
  13. <xhtml:title>환자관리내용조회</xhtml:title>
  14. <model id="model1">
  15. <instance id="instance1">
  16. <root xmlns="">
  17. <main>
  18. <patinfomngtlist>
  19. <patinfomngtlistinfo>
  20. <chk/>
  21. <actdd/>
  22. <actflag/>
  23. <hngnm/>
  24. <roomcd/>
  25. <conslrnm/>
  26. <acttims/>
  27. <acttm/>
  28. <asescarereccnst/>
  29. <rem/>
  30. <seqno/>
  31. <status/>
  32. <conslrid/>
  33. <pid/>
  34. </patinfomngtlistinfo>
  35. <chk_add/>
  36. </patinfomngtlist>
  37. </main>
  38. <send>
  39. <reqdata>
  40. <actfromdd/>
  41. <acttodd/>
  42. <actflag/>
  43. <hngnm/>
  44. <status/>
  45. <conslrid/>
  46. </reqdata>
  47. <savedata/>
  48. </send>
  49. <init>
  50. <comcodelist>
  51. <patinfomngt_cmblist>
  52. </patinfomngt_cmblist>
  53. <conslrlist>
  54. <conslrlistinfo>
  55. <conslrid/>
  56. <conslrnm/>
  57. </conslrlistinfo>
  58. </conslrlist>
  59. </comcodelist>
  60. </init>
  61. <hidden/>
  62. </root>
  63. </instance>
  64. <submission id="TRZBC00101"/>
  65. <submission id="TRAYA03501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/patinfomngtlist"/>
  66. <submission id="TXAYA03501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root"/>
  67. <submission id="TRZBC00105" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  68. <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  69. <submission id="TRAYA00101" method="post" ref="/root/send/reqdata" resultref="/root/init/comcodelist/conslrlist"/>
  70. </model>
  71. <script type="javascript" ev:event="xforms-ready">
  72. <![CDATA[
  73. //활동년도 저장 체크박스 설정 ...
  74. grd_patinfomngt.fixedcellcheckbox(0, 1) = true;
  75. fInit();
  76. fGetActFlagList();
  77. ]]>
  78. </script>
  79. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  80. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  81. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  82. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  83. <script type="javascript">
  84. <![CDATA[
  85. /**========================================================================================================================================
  86. * 화면 오픈시
  87. =========================================================================================================================================*/
  88. function fInit() {
  89. //그리드 초기화
  90. model.removeNodeset("/root/main/patinfomngtlist/patinfomngtlistinfo");
  91. model.makeNode("/root/init/comcodelist/patinfomngt_cmblist");
  92. //cmb_actflag.choices.itemset.attribute("nodeset") = "/root/init/comcodelist/patinfomngt_cmblist";
  93. //활동일자를 현재 날짜기준으로 세팅
  94. var CurrentDate = getCurrentDate();
  95. model.setValue("/root/send/reqdata/actfromdd", CurrentDate);
  96. model.setValue("/root/send/reqdata/acttodd", CurrentDate);
  97. //원목자 조회
  98. model.makeValue("/root/send/reqdata/joblncd", "A");
  99. submit("TRAYA00101", false);
  100. addComboItem("cmb_conslrid", "전체", "", "above");
  101. model.removeNodeset("/root/main/patinfomngtlist/patinfomngtlistinfo");
  102. model.refresh();
  103. }
  104. /**========================================================================================================================================
  105. * 구분 콤보리스트
  106. =========================================================================================================================================*/
  107. function fGetActFlagList(){
  108. zbcfGetKindCodeList(
  109. new Array("A0012"), //업무규칙
  110. new Array("A0457"), //코드군
  111. new Array("/root/init/comcodelist/patinfomngt_cmblist"), //노드
  112. true, //minimum : true TRZBC00105
  113. new Array("cdid"), //sorting 항목
  114. new Array("asc")
  115. );
  116. addComboItem("cmb_actflag", "전체", "", "above");
  117. cmb_actflag.select(0);
  118. model.refresh();
  119. }
  120. /**========================================================================================================================================
  121. * 조회
  122. =========================================================================================================================================*/
  123. function fPatMngtList() {
  124. //submit("TRAYA03501");
  125. if (submit("TRAYA03501") == true)
  126. {
  127. //initGridStyle(grd_patinfomngt);
  128. grd_patinfomngt.fixedcellischeck(0, 1) = false;
  129. //grd_patinfomngt.fixedcellcheckbox(0,0) = false;
  130. //node 복사
  131. model.removeNodeset("/root/temp/patinfomngtlist");
  132. model.makeNode("/root/temp/patinfomngtlist");
  133. model.copyNode("/root/temp/patinfomngtlist","/root/main/patinfomngtlist");
  134. }
  135. else
  136. {
  137. messageBox("조회를", "E009");
  138. }
  139. model.refresh();
  140. }
  141. /**========================================================================================================================================
  142. * 저장및 수정,삭제
  143. =========================================================================================================================================*/
  144. function fSave(status)
  145. {
  146. var checkyn = "N";
  147. for (var i=0; i<grd_patinfomngt.rows; i++)
  148. {
  149. var chk = model.getValue("/root/main/patinfomngtlist/patinfomngtlistinfo[" + i + "]/chk");
  150. if (chk == "Y")
  151. {
  152. model.setValue("/root/main/patinfomngtlist/patinfomngtlistinfo[" + i + "]/status",status);
  153. checkyn = "Y";
  154. }
  155. }
  156. if (checkyn == "N")
  157. {
  158. messageBox("선택한 대상자가", "I004");
  159. return;
  160. }
  161. if (status == "u")
  162. {
  163. if (instance1.selectSingleNode("/root/main/patinfomngtlist").xml == instance1.selectSingleNode("/root/temp/patinfomngtlist").xml) {
  164. messageBox("변경된 데이터가 ","I004");
  165. return;
  166. }
  167. }
  168. var checkyn = "N";
  169. for (var i=0; i<grd_patinfomngt.rows; i++)
  170. {
  171. var chk = model.getValue("/root/main/patinfomngtlist/patinfomngtlistinfo[" + i + "]/chk");
  172. if (chk == "Y")
  173. {
  174. model.setValue("/root/main/patinfomngtlist/patinfomngtlistinfo[" + i + "]/status",status);
  175. checkyn = "Y";
  176. }
  177. }
  178. if (checkyn == "N")
  179. {
  180. messageBox("선택한 대상자가", "I004");
  181. return;
  182. }
  183. if (status == "d")
  184. {
  185. var btn = messageBox("선택한 대상자를", "Q001");
  186. for (var i=0; i<grd_patinfomngt.rows; i++)
  187. {
  188. var chk = model.getValue("/root/main/patinfomngtlist/patinfomngtlistinfo[" + i + "]/chk");
  189. if (chk == "Y")
  190. {
  191. model.setValue("/root/main/patinfomngtlist/patinfomngtlistinfo[" + i + "]/status", "d");
  192. checkyn = "Y";
  193. }
  194. }
  195. if (btn == '7')
  196. {
  197. return;
  198. }
  199. }
  200. model.resetInstanceNode("/root/send/savedata");
  201. model.setValue("/root/send/savedata", grd_patinfomngt.getUpdateDataAll("u"));
  202. //alert(grd_patinfomngt.getUpdateDataAll("u"));
  203. if (submit("TXAYA03501", false) == true)
  204. {
  205. grd_patinfomngt.clearStatus();
  206. fPatMngtList();
  207. messageBox("저장이 ","I002");
  208. }
  209. else
  210. {
  211. }
  212. /**========================================================================================================================================
  213. * 구분에서 봉성체 선택시 영적돌봄기록상담은 ReadOnly
  214. =========================================================================================================================================*/
  215. function fSetInfo()
  216. {
  217. var idx = grd_patinfomngt.row;
  218. //var asescarereccnst = model.getValue("/root/main/patinfomngtlist/patinfomngtlistinfo[" + idx + "]/asescarereccnst");
  219. if (cmb_actflag.value == "3")
  220. {
  221. grd_patinfomngt.isReadOnly(idx, 9) = true;
  222. }
  223. else
  224. {
  225. grd_patinfomngt.isReadOnly(idx,9) = false;
  226. }
  227. }
  228. }
  229. /**========================================================================================================================================
  230. * 구분에 따른 그리드 수정권한설정
  231. =========================================================================================================================================*/
  232. function fPatInfoEnterCell()
  233. {
  234. var idx = grd_patinfomngt.row;
  235. var idxEnterCell = model.getValue("/root/main/patinfomngtlist/patinfomngtlistinfo[" + idx + "]/actflag");
  236. /*
  237. 1 : 방문 - 횟수, 소요시간(분), 비고 수정가능
  238. 2 : 상담 - 횟수, 소요시간(분), 영적돌봄기록상담, 비고 수정가능
  239. 3 : 봉성체 -소요시간(분), 비고 수정가능
  240. */
  241. if ( idxEnterCell == '1') { //방문
  242. //grd_list.isReadOnly(grd_list.row, grd_list.colRef("rrgstno1")) = false;
  243. grd_patinfomngt.isReadOnly(idx, grd_patinfomngt.colRef("acttims")) = false;
  244. grd_patinfomngt.isReadOnly(idx, grd_patinfomngt.colRef("acttm")) = false;
  245. grd_patinfomngt.isReadOnly(idx, grd_patinfomngt.colRef("asescarereccnst")) = true;
  246. grd_patinfomngt.isReadOnly(idx, grd_patinfomngt.colRef("rem")) = false;
  247. if (grd_patinfomngt.colType(grd_patinfomngt.col) == "input")
  248. grd_patinfomngt.editCell();
  249. model.refresh();
  250. }else if (idxEnterCell == "3") { //봉성체
  251. grd_patinfomngt.isReadOnly(idx, grd_patinfomngt.colRef("acttims")) = true;
  252. grd_patinfomngt.isReadOnly(idx, grd_patinfomngt.colRef("acttm")) = false;
  253. grd_patinfomngt.isReadOnly(idx, grd_patinfomngt.colRef("asescarereccnst")) = true;
  254. grd_patinfomngt.isReadOnly(idx, grd_patinfomngt.colRef("rem")) = false;
  255. if (grd_patinfomngt.colType(grd_patinfomngt.col) == "input")
  256. grd_patinfomngt.editCell();
  257. model.refresh();
  258. } else if (idxEnterCell == "2"){ // 상담
  259. grd_patinfomngt.isReadOnly(idx, grd_patinfomngt.colRef("acttims")) = false;
  260. grd_patinfomngt.isReadOnly(idx, grd_patinfomngt.colRef("acttm")) = false;
  261. grd_patinfomngt.isReadOnly(idx, grd_patinfomngt.colRef("asescarereccnst")) = false;
  262. grd_patinfomngt.isReadOnly(idx, grd_patinfomngt.colRef("rem")) = false;
  263. if (grd_patinfomngt.colType(grd_patinfomngt.col) == "input")
  264. grd_patinfomngt.editCell();
  265. }
  266. model.refresh();
  267. }
  268. ]]>
  269. </script>
  270. </xhtml:head>
  271. <xhtml:body pagewidth="846" pageheight="570" guideline="1,823;2,543;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  272. <group id="group3" scroll="auto" style="left:0px; top:0px; width:823px; height:515px; ">
  273. <group id="group2" style="left:0px; top:0px; width:823px; height:65px; vertical-align:top; ">
  274. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:823px; height:60px; "/>
  275. <caption id="caption2" class="search_name" style="left:15px; top:10px; width:99px; height:17px; ">조회일자 :</caption>
  276. <button id="btn_search" class="btn1_letter2" style="left:740px; top:20px; width:56px; height:22px; ">
  277. <caption>조회</caption>
  278. <script type="javascript" ev:event="DOMActivate">
  279. <![CDATA[
  280. fPatMngtList();
  281. ]]>
  282. </script>
  283. </button>
  284. <select1 id="cmb_actflag" ref="/root/send/reqdata/actflag" class="combo_search" appearance="minimal" style="left:490px; top:10px; width:100px; height:19px; ">
  285. <choices>
  286. <itemset nodeset="/root/init/comcodelist/patinfomngt_cmblist/A0012A0457">
  287. <label ref="cdnm"/>
  288. <value ref="cdid"/>
  289. </itemset>
  290. </choices>
  291. </select1>
  292. <input id="ipt_actfromdd" ref="/root/send/reqdata/actfromdd" class="input_default" navindex="13" inputtype="date" style="left:115px; top:10px; width:90px; height:19px; "/>
  293. <input id="ipt_acttodd" ref="/root/send/reqdata/acttodd" class="input_default" navindex="13" inputtype="date" style="left:235px; top:10px; width:90px; height:19px; "/>
  294. <caption id="caption9" class="search_no_b" style="left:215px; top:10px; width:12px; height:17px; ">~</caption>
  295. <caption id="caption3" class="search_name" style="left:395px; top:10px; width:86px; height:17px; ">구 분 :</caption>
  296. <line id="line13" class="line_4" style="x1:719px; y1:10px; x2:719px; y2:53px; "/>
  297. <caption id="caption4" class="search_name" style="left:395px; top:35px; width:86px; height:17px; ">환 자 명 :</caption>
  298. <input id="input12" ref="/root/send/reqdata/hngnm" imemode="hangul" style="left:490px; top:35px; width:100px; height:19px; ">
  299. <script type="javascript" ev:event="onkeypress">
  300. <![CDATA[
  301. if(event.keyCode == "13") {
  302. }
  303. ]]>
  304. </script>
  305. </input>
  306. <select1 id="cmb_conslrid" ref="/root/send/reqdata/conslrid" class="combo_search" appearance="minimal" style="left:114px; top:35px; width:100px; height:19px; ">
  307. <choices>
  308. <itemset nodeset="/root/init/comcodelist/conslrlist/conslrlistinfo">
  309. <label ref="conslrnm"/>
  310. <value ref="conslrid"/>
  311. </itemset>
  312. </choices>
  313. </select1>
  314. <caption id="caption7" class="search_name" style="left:14px; top:35px; width:99px; height:17px; ">원 목 자 :</caption>
  315. </group>
  316. <caption id="caption1" class="tit_2" style="left:5px; top:75px; width:126px; height:13px; ">환자관리내용 조회</caption>
  317. <line id="line1" class="line_1" style="x1:0px; y1:90px; x2:823px; y2:90px; "/>
  318. <datagrid id="grd_patinfomngt" nodeset="/root/main/patinfomngtlist/patinfomngtlistinfo" autoresize="true" caption="^활동일자^활동구분^환자성명^병실^원목자^횟수^소요시간(분)^영적돌봄기록상담^비고^status^seqno^consirid" colsep="^" colwidth="36, 78, 65, 66, 61, 69, 34, 91, 116, 165, 2, 4, 1" dataheight="23" explorerbar="sortshowmove" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:0px; top:95px; width:823px; height:415px; ">
  319. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  320. <col ref="actdd" format="yyyy-mm-dd" style="text-align:center; "/>
  321. <col disabled="true" ref="actflag" type="combo" style="text-align:center; ">
  322. <choices>
  323. <itemset nodeset="/root/init/comcodelist/patinfomngt_cmblist/A0012A0457">
  324. <label ref="cdnm"/>
  325. <value ref="cdid"/>
  326. </itemset>
  327. </choices>
  328. </col>
  329. <col ref="hngnm" style="text-align:center; "/>
  330. <col ref="roomcd" style="text-align:center; "/>
  331. <col ref="conslrnm" style="text-align:center; "/>
  332. <col ref="acttims" type="input" format="#####" maxlength="5" style="text-align:center; "/>
  333. <col ref="acttm" type="input" format="#####" maxlength="5" style="text-align:center; "/>
  334. <col checkvalue="Y,N" ref="asescarereccnst" type="checkbox"/>
  335. <col ref="rem" type="input" maxlength="100"/>
  336. <col ref="status" visibility="hidden"/>
  337. <col ref="seqno" visibility="hidden"/>
  338. <col ref="conslrid" visibility="hidden"/>
  339. <script type="javascript" ev:event="onentercell">
  340. <![CDATA[
  341. fPatInfoEnterCell();
  342. ]]>
  343. </script>
  344. <script type="javascript" ev:event="onaftersort">
  345. <![CDATA[
  346. grd_patinfomngt.gridToInstance();
  347. ]]>
  348. </script>
  349. </datagrid>
  350. <button id="btn_save" class="btn5_letter2" style="left:775px; top:70px; width:42px; height:19px; ">
  351. <caption>삭제</caption>
  352. <script type="javascript" ev:event="DOMActivate">
  353. <![CDATA[
  354. var status = "d";
  355. fSave(status);
  356. model.refresh();
  357. ]]>
  358. </script>
  359. </button>
  360. <button id="btn_del" class="btn5_letter2" style="left:730px; top:70px; width:42px; height:19px; ">
  361. <caption>저장</caption>
  362. <script type="javascript" ev:event="DOMActivate">
  363. <![CDATA[
  364. var status = "u";
  365. fSave(status);
  366. model.refresh();
  367. ]]>
  368. </script>
  369. </button>
  370. </group>
  371. <group id="group1" scroll="auto" style="left:0px; top:516px; width:823px; height:27px; ">
  372. <button id="btn_cancel" class="btn4_letter2" style="left:761px; top:5px; width:56px; height:22px; ">
  373. <caption>닫기</caption>
  374. <close ev:event="DOMActivate"/>
  375. </button>
  376. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:823px; y2:0px; "/>
  377. </group>
  378. </xhtml:body>
  379. </xhtml:html>