SMMNR08200_기본간호신청.xrw 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659
  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. <cond>
  11. <wardcd/>
  12. <searchfromdd/>
  13. <searchtodd/>
  14. <userid/>
  15. <usernm/>
  16. <bspntcd/>
  17. <srchflag>T</srchflag>
  18. <saveflag/>
  19. </cond>
  20. <nursebasicinfo>
  21. <info/>
  22. </nursebasicinfo>
  23. <forminfo>
  24. <info>
  25. <roomcd/>
  26. <hngnm/>
  27. <sexage/>
  28. <pid/>
  29. <indd/>
  30. <cretno/>
  31. <instcd/>
  32. <seqno/>
  33. <orddeptcd/>
  34. <orddeptnm/>
  35. <diagcd/>
  36. <termengnm/>
  37. <termhngnm/>
  38. <timsval01/>
  39. <timsval02/>
  40. <timsval04/>
  41. <clsgrupkind/>
  42. <rgstdd/>
  43. <rgstno/>
  44. <rgsthistno/>
  45. <appdt/>
  46. <apprid/>
  47. <appdeptcd/>
  48. <appdeptnm/>
  49. <hrwshappstat/>
  50. <bathappstat/>
  51. <execdt/>
  52. <execrid/>
  53. <execdeptcd/>
  54. <execdeptnm/>
  55. <hrwshexecstat/>
  56. <bathexecstat/>
  57. <hrwshremcnts/>
  58. <bathremcnts/>
  59. <status/>
  60. </info>
  61. </forminfo>
  62. </main>
  63. <init>
  64. <wardcdgrup>
  65. <wardcd/>
  66. <wardnm/>
  67. </wardcdgrup>
  68. <dept>
  69. <deptcd/>
  70. <depthngnm/>
  71. </dept>
  72. <detlgrup>
  73. <!-- 중증 분류 -->
  74. <detlgruplist/>
  75. </detlgrup>
  76. <A0078list/>
  77. </init>
  78. <send/>
  79. <temp>
  80. <popupmenu>
  81. <item>
  82. <name>추가시행등록</name>
  83. <func>fInsExecInfo</func>
  84. </item>
  85. <item>
  86. <name>추가시행수정</name>
  87. <func>fSetExecInfo</func>
  88. </item>
  89. </popupmenu>
  90. </temp>
  91. </root>
  92. </instance>
  93. <script type="javascript" ev:event="xforms-ready">
  94. <![CDATA[
  95. fInitialize();
  96. ]]>
  97. </script>
  98. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  99. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  100. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  101. <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
  102. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  103. <script type="javascript">
  104. <![CDATA[
  105. var ref = "/root/main/nursebasicinfo/info";
  106. var saveFlag = "";
  107. function fInitialize(){
  108. var menuParam = getScreenMenuParameter();
  109. var openerParam = opener.javascript.getParameter("SMMNR08200_saveflag");
  110. if( isNull(menuParam) ) saveFlag = openerParam;
  111. else saveFlag = menuParam;
  112. //saveFlag = "E"; //@ test를 위해 고정값 설정 - 삭제할 것!!!!!!!!!!!!!!!
  113. //오늘 날짜로 초기화 하는 부분.(조회일자를 default로 오늘 날짜로 선택함)
  114. var currDate;
  115. currDate = getCurrentDate();
  116. var addDy;
  117. addDy = currDate.toDate().getAddDate(-1,"D");
  118. addDy = addDy.getDateFormat("YYYYMMDD");
  119. if( saveFlag == "E" ){
  120. //기본간호 mode
  121. //기본간호 수행모드
  122. document.title = "기본간호수행";
  123. cap_title.attribute("text") = "기본간호 수행";
  124. btn_app.visible = false;
  125. btn_exec.visible = true;
  126. btn_addexec.visible = true;
  127. grd_nursebasic.colDisabled (13) = true;
  128. grd_nursebasic.colDisabled (14) = true;
  129. addDy = currDate;
  130. }else{
  131. //병동간호 mode(신청)
  132. //기본간호 신청모드
  133. document.title = "기본간호신청";
  134. cap_title.attribute("text") = "기본간호 신청";
  135. btn_app.visible = true;
  136. btn_exec.visible = false;
  137. btn_addexec.visible = false;
  138. grd_nursebasic.colDisabled (16) = true;
  139. grd_nursebasic.colDisabled (17) = true;
  140. addDy = currDate.toDate().getAddDate(-1,"D");
  141. addDy = addDy.getDateFormat("YYYYMMDD");
  142. }
  143. //간호신청/수행 란은 merge되지 않도록 함
  144. for(i=12;i<=17;i++){
  145. grd_nursebasic.mergeCol(i) = false;
  146. }
  147. model.setValue("/root/main/cond/searchfromdd", addDy );
  148. model.setValue("/root/main/cond/searchtodd", getCurrentDate() );
  149. model.setValue("/root/main/cond/wardcd", getUserInfo("dutunitcd")); //로그인한 사원의부서 default //getUserInfo("dutplcecd")
  150. model.setValue("/root/main/cond/bspntcd", "01,02,03,04,05,06");
  151. //model.setValue("/root/main/cond/srchflag", "A"); //조회모드(A:신청모드, E:수행저장모드)
  152. model.setValue("/root/main/cond/userid", getUserId());
  153. model.setValue("/root/main/cond/usernm", getUserName());
  154. model.setValue("/root/main/cond/saveflag", ""); //저장모드 '메뉴파라메터'에 의해 결정(A:신청모드, E:수행저장모드)
  155. //병동 조회 ->
  156. if( !submit("TRMNW04003") ){ //병동, 진료과 조회 submit("TRMNW00101")
  157. messageBox( "병동 리스트 조회를", "E009"); //실패
  158. return;
  159. }
  160. var wardNodes = instance1.selectNodes("/root/init/wardcdgrup/wardcdgruplist");
  161. if( wardNodes.length > 0 ){
  162. model.makeValue("/root/init/wardcdgrup/wardcdgruplist[" + (wardNodes.length+1) + "]/wardnm", "전체병동");
  163. model.makeValue("/root/init/wardcdgrup/wardcdgruplist[" + (wardNodes.length+1) + "]/wardcd", "1000000000");
  164. }
  165. cmb_wardcd.refresh();
  166. //중증 분류 조회 ->
  167. model.makeValue("/root/send/cond/recflag", "1");
  168. model.makeValue("/root/send/cond/clsflag", "4");
  169. model.makeValue("/root/send/cond/fromdd", currDate);
  170. if( !submit("TRMNR00404") ){ //TRMNR08201
  171. messageBox( "중증분류 조회를", "E009"); //실패
  172. return;
  173. }
  174. //기간 내 환자 및 신청정보 조회 ->
  175. if ( !isNull(model.getValue("/root/main/cond/wardcd")) ){
  176. fGetBasicNursePatList();
  177. }
  178. }
  179. function fGetBasicNursePatList(){
  180. if( !isNull(model.getValue("/root/main/cond/wardcd")) ){
  181. if( !isRequiredControls("ipt_searchfromdd","ipt_searchtodd","cmb_wardcd") ){
  182. return;
  183. }
  184. /*
  185. if( getDateInterval( model.getValue("/root/main/cond/searchfromdd"), model.getValue("/root/main/cond/searchtodd") ) > '7' ){
  186. messageBox( "최대 조회기간은 1주일입니다.", "I007");//확인하십시오
  187. return;
  188. }
  189. */
  190. model.removenode("/root/send/cond");
  191. model.makeNode("/root/send/cond");
  192. model.copyNode("/root/send/cond", "/root/main/cond");
  193. /*
  194. model.makeValue("/root/send/searchfromdd",model.getValue("/root/main/cond/searchfromdd") );
  195. model.makeValue("/root/send/searchtodd",model.getValue("/root/main/cond/searchtodd") );
  196. model.makeValue("/root/send/wardcd",model.getValue("/root/main/cond/wardcd") );
  197. model.makeValue("/root/send/bspntcd",model.getValue("/root/main/cond/bspntcd") );
  198. model.makeValue("/root/send/srchflag",model.getValue("/root/main/cond/srchflag") );
  199. model.makeValue("/root/send/saveflag",model.getValue("/root/main/cond/saveflag") );
  200. */
  201. //submit("TRMNR04112");
  202. submit("TRMNR08202");
  203. //fGridColorChange();
  204. }
  205. }
  206. /* 사용안함 */
  207. function fGridColorChange(){
  208. var nodeList1 = instance1.selectNodes("/root/main/nursebasicinfo/info/timsval01");
  209. var nodeList2 = instance1.selectNodes("/root/main/nursebasicinfo/info/timsval02");
  210. var nodeList3 = instance1.selectNodes("/root/main/nursebasicinfo/info/timsval04");
  211. var row = grd_nursebasic.fixedRows;
  212. var color ="";
  213. var rowidx = 0;
  214. if ( nodeList1 != null && nodeList1.length > 0 ){
  215. for ( var idx = 0 ; idx < nodeList1.length ; idx++ ){
  216. rowidx = 0;
  217. rowidx = idx+row;
  218. if( nodeList1.item(idx).value >= '3' ){
  219. grd_nursebasic.cellStyle("background-color", rowidx, 6) = "#FFFF00";
  220. } else {
  221. grd_nursebasic.cellStyle("background-color", rowidx, 6) = "#f2f2f2";
  222. }
  223. }
  224. }
  225. if ( nodeList2 != null && nodeList2.length > 0 ){
  226. for ( var idx = 0 ; idx < nodeList2.length ; idx++ ){
  227. rowidx = 0;
  228. rowidx = idx+row;
  229. if( nodeList2.item(idx).value >= '3' ){
  230. grd_nursebasic.cellStyle("background-color", rowidx, 7) = "#FFFF00";
  231. } else {
  232. grd_nursebasic.cellStyle("background-color", rowidx, 7) = "#f2f2f2";
  233. }
  234. }
  235. }
  236. if ( nodeList3 != null && nodeList3.length > 0 ){
  237. for ( var idx = 0 ; idx < nodeList3.length ; idx++ ){
  238. rowidx = 0;
  239. rowidx = idx+row;
  240. if( nodeList3.item(idx).value >= '3' ){
  241. grd_nursebasic.cellStyle("background-color", rowidx, 8) = "#FFFF00";
  242. } else {
  243. grd_nursebasic.cellStyle("background-color", rowidx, 8) = "#f2f2f2";
  244. }
  245. }
  246. }
  247. model.refresh();
  248. }
  249. /* 신청, 수행 정보를 저장한다. */
  250. function fSaveInfo(flag, qestyn){
  251. if( isNull(qestyn) ) qestyn = "Y";
  252. if( qestyn == "Y" ){
  253. var saveDataNodes = instance1.selectNodes("/root/main/nursebasicinfo/info[status!='-']");
  254. if( saveDataNodes.length <= 0 ){
  255. messageBox( "저장할 데이터가", "I004"); //없습니다
  256. return;
  257. }
  258. }
  259. model.removeNodeset("root/send/nursebasicinfo");
  260. model.makeNode("root/send/nursebasicinfo");
  261. model.copyNode("root/send/nursebasicinfo", "/root/main/nursebasicinfo");
  262. model.setValue("/root/send/cond/saveflag", flag); //저장모드(A:신청모드, E:수행저장모드)
  263. if( submit("TXMNR08201", false) ){
  264. grd_nursebasic.clearStatus();
  265. grd_nursebasic.refresh();
  266. return true;
  267. }else{
  268. return false;
  269. }
  270. }
  271. function fInsExecInfo(){
  272. model.setValue("/root/main/forminfo/info/status", "I"); //추가시행에서 저장 시 신규등록임
  273. modal("SPMNR08300");
  274. }
  275. function fSetExecInfo(){
  276. model.setValue("/root/main/forminfo/info/status", "U"); //추가시행 수정
  277. modal("SPMNR08300");
  278. }
  279. ]]>
  280. </script>
  281. <submission id="TRMNR04112" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/nursebasicinfo"/>
  282. <!-- 병동 부서 조회 -->
  283. <!-- <submission id="TRMNW00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/init"/> -->
  284. <submission id="TRMNW04003" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/wardcdgrup"/>
  285. <!-- 분류구분 조회 -->
  286. <submission id="TRMNR00404" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/cond" resultref="/root/init/detlgrup"/>
  287. <!--<submission id="TRMNR08201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/cond" resultref="/root/init/pntgrup"/>-->
  288. <!-- 환자 리스트 조회 -->
  289. <submission id="TRMNR08202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/cond" resultref="/root/main/nursebasicinfo"/>
  290. <!-- 저장 -->
  291. <submission id="TXMNR08201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/nursebasicinfo"/>
  292. <script type="javascript" ev:event="xforms-model-construct-done">
  293. <![CDATA[
  294. grd_nursebasic.explorerbar = "sortshow";
  295. ]]>
  296. </script>
  297. </model>
  298. </xhtml:head>
  299. <xhtml:body guideline="1,1195;2,784;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  300. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  301. <caption id="cap_title" class="tit_1" style="left:0px; top:0px; width:257px; height:14px; ">기본간호 신청</caption>
  302. </group>
  303. <group id="group5" class="datagrid2" scroll="auto" style="left:0px; top:13px; width:1195px; height:771px; ">
  304. <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:35px; vertical-align:top; ">
  305. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1195px; height:35px; "/>
  306. <caption id="cap_searchtodd" class="search_name" style="left:211px; top:10px; width:89px; height:17px; ">조회일자 :</caption>
  307. <button id="button1" class="btn1_letter2" navindex="6" style="left:1041px; top:7px; width:56px; height:22px; ">
  308. <caption>조회</caption>
  309. <script type="javascript" ev:event="DOMActivate">
  310. <![CDATA[
  311. fGetBasicNursePatList();
  312. ]]>
  313. </script>
  314. </button>
  315. <line id="line13" class="line_4" style="x1:1020px; y1:7px; x2:1020px; y2:29px; "/>
  316. <button id="button3" class="btn1_letter4" style="left:1102px; top:7px; width:80px; height:22px; ">
  317. <caption>엑셀저장</caption>
  318. <script type="javascript" ev:event="DOMActivate">
  319. <![CDATA[
  320. var fileName = window.fileDialog("save", ",", false, "기본간호신청조회", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  321. if (fileName != "") grd_nursebasic.saveExcel(fileName, "기본간호신청조회", false, false, "", "", false);
  322. ]]>
  323. </script>
  324. </button>
  325. <input id="ipt_searchfromdd" ref="/root/main/cond/searchfromdd" class="input_s_essential" disabled="true" navindex="1" inputtype="date" style="left:300px; top:9px; width:90px; height:19px; "/>
  326. <caption id="caption1" class="search_name" style="left:695px; top:11px; width:74px; height:17px; ">분류군 :</caption>
  327. <caption id="cap_wardcd" class="search_name" style="left:515px; top:11px; width:65px; height:17px; ">병동 :</caption>
  328. <select1 id="cmb_wardcd" ref="/root/main/cond/wardcd" class="input_s_essential" navindex="3" appearance="minimal" style="left:580px; top:10px; width:95px; height:19px; ">
  329. <choices>
  330. <itemset nodeset="/root/init/wardcdgrup/wardcdgruplist">
  331. <label ref="wardnm"/>
  332. <value ref="wardcd"/>
  333. </itemset>
  334. </choices>
  335. <script type="javascript" ev:event="xforms-value-changed">
  336. <![CDATA[
  337. fGetBasicNursePatList();
  338. ]]>
  339. </script>
  340. </select1>
  341. <input id="ipt_searchtodd" ref="/root/main/cond/searchtodd" class="input_s_essential" disabled="true" navindex="2" inputtype="date" style="left:405px; top:9px; width:90px; height:19px; "/>
  342. <caption id="caption4" style="left:390px; top:10px; width:15px; height:15px; text-align:center; ">-</caption>
  343. <select id="checkbox1" ref="/root/main/cond/bspntcd" navindex="4" overflow="visible" appearance="full" cols="10" sep="," style="left:770px; top:10px; width:240px; height:20px; border-style:none; ">
  344. <choices>
  345. <itemset nodeset="/root/init/detlgrup/detlgruplist">
  346. <label ref="bspntnm"/>
  347. <value ref="bspntcd"/>
  348. </itemset>
  349. </choices>
  350. </select>
  351. <select1 id="radio1" ref="/root/main/cond/srchflag" navindex="5" appearance="full" cols="3" overflow="visible" style="left:5px; top:10px; width:190px; height:20px; border-style:none; ">
  352. <choices>
  353. <item>
  354. <label>대상자(전체)</label>
  355. <value>T</value>
  356. </item>
  357. <item>
  358. <label>신청</label>
  359. <value>A</value>
  360. </item>
  361. <item>
  362. <label>수행</label>
  363. <value>E</value>
  364. </item>
  365. </choices>
  366. <script type="javascript" ev:event="xforms-value-changed">
  367. <![CDATA[
  368. if( model.getValue("/root/main/cond/srchflag") == "T" ){
  369. ipt_searchfromdd.disabled = true;
  370. ipt_searchtodd.disabled = true;
  371. }else{
  372. ipt_searchfromdd.disabled = false;
  373. ipt_searchtodd.disabled = false;
  374. }
  375. fGetBasicNursePatList();
  376. ]]>
  377. </script>
  378. </select1>
  379. </group>
  380. <line id="line2" class="line_1" style="x1:0px; y1:75px; x2:1195px; y2:75px; "/>
  381. <datagrid id="grd_nursebasic" class="datagrid2" nodeset="/root/main/nursebasicinfo/info" caption="병실^성명^S/A^등록번호^입원일^HD^진료과^진단명^환자분류(중증도) 사정결과^환자분류(중증도) 사정결과^환자분류(중증도) 사정결과^환자분류(중증도) 사정결과^기본간호 신청^기본간호 신청^기본간호 신청^기본간호 수행^기본간호 수행^기본간호 수행^status^cretno^instcd^seqno^orddeptcd^diagcd^diaghngnm^rgstdd^rgstno^rgsthistno^apprid^appdeptcd^appdeptnm^execrid^execdeptcd^execdeptnm|병실^성명^S/A^등록번호^입원일^HD^진료과^진단명^분류결과^위생^영양^운동/활동^세발간호^목욕(전신)^신청일자^세발간호^목욕(전신)^수행일자^status^cretno^instcd^seqno^orddeptcd^diagcd^diaghngnm^rgstdd^rgstno^rgsthistno^apprid^appdeptcd^appdeptnm^execrid^execdeptcd^execdeptnm" colsep="^" colwidth="43, 50, 45, 60, 72, 43, 85, 135, 57, 38, 38, 62, 70, 70, 74, 70, 70, 74, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10" ellipsis="true" mergecells="byrestriccol" mergecellsfixedrows="byrowrec" rowheader="update" rowsep="|" tooltip="true" style="left:0px; top:80px; width:1195px; height:683px; ">
  382. <col ref="roomcd" style="text-align:center; "/>
  383. <col ref="hngnm" style="text-align:center; "/>
  384. <col ref="sexage" style="text-align:center; "/>
  385. <col ref="pid" style="text-align:center; "/>
  386. <col ref="indd" format="yyyy-mm-dd"/>
  387. <col ref="hd" style="text-align:right; "/>
  388. <col ref="orddeptnm"/>
  389. <col ref="diagengnm"/>
  390. <col ref="clsgrupkind" type="combo" style="text-align:center; ">
  391. <choices>
  392. <itemset nodeset="/root/init/detlgrup/detlgruplist">
  393. <label ref="bspntnm"/>
  394. <value ref="bspntcd"/>
  395. </itemset>
  396. </choices>
  397. </col>
  398. <col ref="timsval01" style="text-align:center; "/>
  399. <col ref="timsval02" style="text-align:center; "/>
  400. <col ref="timsval04" style="text-align:center; "/>
  401. <col ref="hrwshappstat" type="combo">
  402. <choices>
  403. <item>
  404. <label>Y</label>
  405. <value>Y</value>
  406. </item>
  407. <item>
  408. <label>N</label>
  409. <value>N</value>
  410. </item>
  411. </choices>
  412. </col>
  413. <col ref="bathappstat" type="combo">
  414. <choices>
  415. <item>
  416. <label>Y</label>
  417. <value>Y</value>
  418. </item>
  419. <item>
  420. <label>N</label>
  421. <value>N</value>
  422. </item>
  423. </choices>
  424. </col>
  425. <col ref="appdt" format="yyyy-mm-dd"/>
  426. <col ref="hrwshexecstat" type="combo">
  427. <choices>
  428. <item>
  429. <label>Y</label>
  430. <value>Y</value>
  431. </item>
  432. <item>
  433. <label>N</label>
  434. <value>N</value>
  435. </item>
  436. </choices>
  437. </col>
  438. <col ref="bathexecstat" type="combo">
  439. <choices>
  440. <item>
  441. <label>Y</label>
  442. <value>Y</value>
  443. </item>
  444. <item>
  445. <label>N</label>
  446. <value>N</value>
  447. </item>
  448. </choices>
  449. </col>
  450. <col ref="execdt" format="yyyy-mm-dd"/>
  451. <col ref="status" visibility="hidden"/>
  452. <col ref="cretno" visibility="hidden"/>
  453. <col ref="instcd" visibility="hidden"/>
  454. <col ref="seqno" visibility="hidden"/>
  455. <col ref="orddeptcd" visibility="hidden"/>
  456. <col ref="diagcd" visibility="hidden"/>
  457. <col ref="diaghngnm" visibility="hidden"/>
  458. <col ref="rgstdd" visibility="hidden"/>
  459. <col ref="rgstno" visibility="hidden"/>
  460. <col ref="rgsthistno" visibility="hidden"/>
  461. <col ref="apprid" visibility="hidden"/>
  462. <col ref="appdeptcd" visibility="hidden"/>
  463. <col ref="appdeptnm" visibility="hidden"/>
  464. <col ref="execrid" visibility="hidden"/>
  465. <col ref="execdeptcd" visibility="hidden"/>
  466. <col ref="execdeptnm" visibility="hidden"/>
  467. <script type="javascript" ev:event="xforms-value-changed">
  468. <![CDATA[
  469. var grdRow = grd_nursebasic.row;
  470. var iRow = grd_nursebasic.row - grd_nursebasic.fixedRows + 1;
  471. var iCol = grd_nursebasic.col; //12~13 신청, 14~15 수행
  472. var rowStatus = "";
  473. var chgStatus = "";
  474. if( iRow > 0 && iRow <= grd_nursebasic.rows ){
  475. var appDT = model.getValue(ref + "[" + iRow + "]/appdt");
  476. var execDT = model.getValue(ref + "[" + iRow + "]/execdt");
  477. var appHrStat = model.getValue(ref + "[" + iRow + "]/hrwshappstat");
  478. var appBtStat = model.getValue(ref + "[" + iRow + "]/bathappstat");
  479. var execHrStat = model.getValue(ref + "[" + iRow + "]/hrwshexecstat");
  480. var execBtStat = model.getValue(ref + "[" + iRow + "]/bathexecstat");
  481. rowStatus = model.getValue(ref + "[" + iRow + "]/status");
  482. //신청 변경
  483. if( iCol == grd_nursebasic.colRef("hrwshappstat") || iCol == grd_nursebasic.colRef("bathappstat") ){
  484. //이미 수행한 건이면 신청변경 불가
  485. if( execHrStat == "Y" || execBtStat == "Y" ){
  486. messageBox( "이미 수행하여 수정할 수", "I004"); //없습니다
  487. if( iCol == grd_nursebasic.colRef("hrwshappstat") ){
  488. if( appHrStat == "Y" ) model.setValue(ref + "[" + iRow + "]/hrwshappstat", "N");
  489. else if( appHrStat == "N" ) model.setValue(ref + "[" + iRow + "]/hrwshappstat", "Y");
  490. }else if( iCol == grd_nursebasic.colRef("bathappstat") ){
  491. if( appBtStat == "Y" ) model.setValue(ref + "[" + iRow + "]/bathappstat", "N");
  492. else if( appBtStat == "N" ) model.setValue(ref + "[" + iRow + "]/bathappstat", "Y");
  493. }
  494. chgStatus = "-";
  495. return;
  496. }
  497. if( appHrStat == "Y" && appBtStat == "Y" ){
  498. chgStatus = "I"; //appdt system time으로 update
  499. }
  500. else if( appHrStat == "N" && appBtStat == "N" ){
  501. if( rowStatus != "I" ) chgStatus = "D"; //appdt null 으로 update
  502. else chgStatus = "-"; //변경했다가 취소하는경우
  503. }
  504. else {
  505. if( isNull(appDT) ){
  506. chgStatus = "I"; //appdt system time으로 update
  507. }else{
  508. if( rowStatus != "I" ) chgStatus = "U"; //appdt update하지 않음
  509. }
  510. }
  511. }
  512. //수행 변경
  513. if( iCol == grd_nursebasic.colRef("hrwshexecstat") || iCol == grd_nursebasic.colRef("bathexecstat") ){
  514. if( execHrStat == "Y" && execBtStat == "Y" ){
  515. chgStatus = "I"; //appdt system time으로 update
  516. }
  517. else if( execHrStat == "N" && execBtStat == "N" ){
  518. if( rowStatus != "I" ) chgStatus = "D"; //appdt null 으로 update
  519. else chgStatus = "-"; //변경했다가 취소하는경우
  520. }else {
  521. if( isNull(execDT) ){
  522. chgStatus = "I"; //appdt system time으로 update
  523. }else{
  524. if( rowStatus != "I" ) chgStatus = "U"; //appdt update하지 않음
  525. }
  526. }
  527. }
  528. model.setValue(ref + "[" + iRow + "]/status", chgStatus);
  529. //if( isNull(appDT) ) grd_nursebasic.rowStatus(grdRow) = 1; //insert status
  530. //else{
  531. if( chgStatus == "I" ) grd_nursebasic.rowStatus(grdRow) = 1; //insert status
  532. else if( chgStatus == "U" ) grd_nursebasic.rowStatus(grdRow) = 2; //update status
  533. else if( chgStatus == "D" ) grd_nursebasic.rowStatus(grdRow) = 2; //update status
  534. else grd_nursebasic.rowStatus(grdRow) = 0; //delete status
  535. //}
  536. }
  537. ]]>
  538. </script>
  539. <script type="javascript" ev:event="ondblclick">
  540. <![CDATA[
  541. var grdRow = grd_nursebasic.row;
  542. var iRow = grd_nursebasic.row - grd_nursebasic.fixedRows + 1;
  543. var iCol = grd_nursebasic.col; //12~13 신청, 14~15 수행
  544. var appHrStat = model.getValue(ref + "[" + iRow + "]/hrwshappstat");
  545. var appBtStat = model.getValue(ref + "[" + iRow + "]/bathappstat");
  546. var execHrStat = model.getValue(ref + "[" + iRow + "]/hrwshexecstat");
  547. var execBtStat = model.getValue(ref + "[" + iRow + "]/bathexecstat");
  548. if( iRow > 0 && iRow <= grd_nursebasic.rows ){
  549. //신청 없이 수행한 것은 추가수행임. 추가수행 정보를 수정하기위해 화면 호출
  550. if( (appHrStat == "N" && execHrStat == "Y") || (appBtStat == "N" && execBtStat == "Y") ){
  551. model.setValue("/root/main/forminfo/info/status", "U"); //추가시행에서 저장 시 정보 수정임
  552. modal("SPMNR08300");
  553. }
  554. }
  555. ]]>
  556. </script>
  557. <script type="javascript" ev:event="onmousedown">
  558. <![CDATA[
  559. if(event.button == 3){
  560. if( saveFlag != "E" ) return;
  561. if(grd_nursebasic.isCell(event.target) && grd_nursebasic.mouseRow >= grd_nursebasic.fixedrows){
  562. setPopupMenu("grd_nursebasic", false, "/root/temp/popupmenu/item", "name", "func");
  563. }else{
  564. window.setPopupMenu(false);
  565. }
  566. }
  567. ]]>
  568. </script>
  569. <script type="javascript" ev:event="DOMFocusOut">
  570. <![CDATA[
  571. window.setPopupMenu(false);
  572. ]]>
  573. </script>
  574. <script type="javascript" ev:event="onaftersort">
  575. <![CDATA[
  576. grd_nursebasic.gridToInstance();
  577. ]]>
  578. </script>
  579. </datagrid>
  580. <line id="line1" class="line_3" style="x1:0px; y1:764px; x2:1195px; y2:764px; "/>
  581. <button id="btn_app" class="btn2_letter8" style="left:1086px; top:54px; width:108px; height:19px; ">
  582. <caption>기본간호신청저장</caption>
  583. <script type="javascript" ev:event="DOMActivate">
  584. <![CDATA[
  585. fSaveInfo("A");
  586. ]]>
  587. </script>
  588. </button>
  589. <button id="btn_exec" class="btn2_letter8" style="left:996px; top:54px; width:108px; height:19px; ">
  590. <caption>기본간호시행등록</caption>
  591. <script type="javascript" ev:event="DOMActivate">
  592. <![CDATA[
  593. fSaveInfo("E");
  594. ]]>
  595. </script>
  596. </button>
  597. <button id="btn_addexec" class="btn2_letter6" style="left:1107px; top:54px; width:86px; height:19px; ">
  598. <caption>추가시행등록</caption>
  599. <script type="javascript" ev:event="DOMActivate">
  600. <![CDATA[
  601. model.setValue("/root/main/forminfo/info/status", "I"); //추가시행에서 저장 시 신규등록임
  602. modal("SPMNR08300");
  603. ]]>
  604. </script>
  605. </button>
  606. </group>
  607. </xhtml:body>
  608. </xhtml:html>