SMMNN02600_일반병실료산정.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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. <patinfo>
  11. <patlist>
  12. <pid/>
  13. <hngnm/>
  14. <indd/>
  15. <wardnm/>
  16. <roomcd/>
  17. <grdeflag/>
  18. <cretno/>
  19. <wardcd/>
  20. </patlist>
  21. </patinfo>
  22. <cond>
  23. <pid/>
  24. <hngnm/>
  25. <indd/>
  26. <wardnm/>
  27. <roomcd/>
  28. <grdeflag>G</grdeflag>
  29. <cretno/>
  30. <wardcd/>
  31. <grde/>
  32. <str/>
  33. </cond>
  34. <paminfo>
  35. </paminfo>
  36. </main>
  37. <send>
  38. <req/>
  39. </send>
  40. <init>
  41. </init>
  42. <hidden>
  43. <zsd>
  44. <resultref/>
  45. </zsd>
  46. </hidden>
  47. <code>
  48. <codeinfo>
  49. <codelist/>
  50. </codeinfo>
  51. </code>
  52. </root>
  53. </instance>
  54. <script type="javascript">
  55. <![CDATA[
  56. var sPath = "/root/main/paminfo";
  57. var gDeptcd;
  58. var gGrde1;
  59. var gGrde2;
  60. var gType1;
  61. var gType2;
  62. function fInitialize()
  63. {
  64. var pCode = "'T38', 'T39', 'T54'"; // 조회할 CdGrupID 코드정보 T38:신생아중환자실코드, T39:병상grade코드, T54: 병상type코드
  65. var pDate = getCurrentDate(); //조회기준일자
  66. fGetNursHardCdInfo(pCode, pDate);
  67. gDeptcd = model.getValue("/root/code/codeinfo/codelist[cdgrupid='T38']/cdid");
  68. gGrde1 = model.getValue("/root/code/codeinfo/codelist[cdgrupid='T39' and cdid='01']/cdnm");
  69. gGrde2 = model.getValue("/root/code/codeinfo/codelist[cdgrupid='T39' and cdid='02']/cdnm");
  70. gType1 = model.getValue("/root/code/codeinfo/codelist[cdgrupid='T54' and cdid='01']/cdnm");
  71. gType2 = model.getValue("/root/code/codeinfo/codelist[cdgrupid='T54' and cdid='02']/cdnm");
  72. // 환자정보 조회
  73. var sPamInfo = getGlobalVariable("paminfo");
  74. setCSVToNode(sPath,sPamInfo,"pamlist");
  75. pPath = sPath + "/pamlist";
  76. var pid;
  77. var hngnm;
  78. var indd;
  79. var cretno;
  80. var wardcd;
  81. var wardnm;
  82. var roomcd;
  83. if(sPamInfo != ""){
  84. pid = model.getValue(pPath + "/pid");
  85. hngnm = model.getValue(pPath + "/hngnm");
  86. indd = model.getValue(pPath + "/indd");
  87. cretno = model.getValue(pPath + "/cretno");
  88. wardnm = model.getValue(pPath + "/wardnm");
  89. roomcd = model.getValue(pPath + "/roomcd");
  90. wardcd = model.getValue(pPath + "/wardcd");
  91. //ipt_rsvdd.value = model.getValue("/root/main/paminfo/pamlist/indd");
  92. model.setValue(ipt_pid.attribute("ref"), pid);
  93. model.setValue(opt_hngnm.attribute("ref"), hngnm);
  94. model.setValue(ipt_indd.attribute("ref"), indd);
  95. model.setValue(ipt_cretno.attribute("ref"), cretno);
  96. model.setValue(ipt_wardcd.attribute("ref"), wardcd);
  97. model.setValue(ipt_wardnm.attribute("ref"), wardnm);
  98. model.setValue(ipt_roomcd.attribute("ref"), roomcd);
  99. ipt_pid.refresh();
  100. opt_hngnm.refresh();
  101. ipt_indd.refresh();
  102. ipt_cretno.refresh();
  103. ipt_wardcd.refresh()
  104. ipt_wardnm.refresh();
  105. ipt_roomcd.refresh();
  106. fSearch(); //환자및 사망정보 조회
  107. } else {
  108. model.setfocus("ipt_pid");
  109. }
  110. }
  111. function fSearch()
  112. {
  113. model.makeNode("/root/send/req");
  114. model.copynode("/root/send/req", "/root/main/cond");
  115. var pid;
  116. var hngnm;
  117. var indd;
  118. var cretno;
  119. var wardcd;
  120. var wardnm;
  121. var roomcd;
  122. var grde;
  123. var fromdd;
  124. var str = "";
  125. var grdenm;
  126. if (submit("TRMNN02601")) {
  127. iRow = grd_patlist.rows - grd_patlist.fixedRows;
  128. if(grd_patlist.rows > grd_patlist.fixedRows) {
  129. pid = grd_patlist.valueMatrix(iRow, grd_patlist.colRef("pid"));
  130. hngnm = grd_patlist.valueMatrix(iRow, grd_patlist.colRef("hngnm"));
  131. indd = grd_patlist.valueMatrix(iRow, grd_patlist.colRef("indd"));
  132. cretno = grd_patlist.valueMatrix(iRow, grd_patlist.colRef("cretno"));
  133. wardcd = grd_patlist.valueMatrix(iRow, grd_patlist.colRef("wardcd"));
  134. wardnm = grd_patlist.valueMatrix(iRow, grd_patlist.colRef("wardnm"));
  135. roomcd = grd_patlist.valueMatrix(iRow, grd_patlist.colRef("roomcd"));
  136. grde = grd_patlist.valueMatrix(iRow, grd_patlist.colRef("grde"));
  137. fromdd = grd_patlist.valueMatrix(iRow, grd_patlist.colRef("fromdd"));
  138. //ipt_rsvdd.value = model.getValue("/root/main/paminfo/pamlist/indd");
  139. model.setValue(ipt_pid.attribute("ref"), pid);
  140. model.setValue(opt_hngnm.attribute("ref"), hngnm);
  141. model.setValue(ipt_indd.attribute("ref"), indd);
  142. model.setValue(ipt_cretno.attribute("ref"), cretno);
  143. model.setValue(ipt_wardcd.attribute("ref"), wardcd);
  144. model.setValue(ipt_wardnm.attribute("ref"), wardnm);
  145. model.setValue(ipt_roomcd.attribute("ref"), roomcd);
  146. model.setValue(ipt_grde.attribute("ref"), grde);
  147. ipt_pid.refresh();
  148. opt_hngnm.refresh();
  149. ipt_indd.refresh();
  150. ipt_cretno.refresh();
  151. ipt_wardcd.refresh()
  152. ipt_wardnm.refresh();
  153. ipt_roomcd.refresh();
  154. ipt_grde.refresh();
  155. str = "";
  156. if(grde == "G") {
  157. grdenm = "일반병실료";
  158. } else {
  159. grdenm = "중환자병실료";
  160. }
  161. model.setValue(rdo_grdeflag.attribute("ref"), grde);
  162. rdo_grdeflag.refresh();
  163. if(wardcd == gDeptcd) {
  164. rdo_grdeflag.disabled = false;
  165. btn_save.disabled = false;
  166. str = " " + hngnm + " 환자분은 " + fromdd.substr(0,4) + "년 " + fromdd.substr(4,2) + "월 " + fromdd.substr(6,2) + "일부로 " + grdenm+ "가 적용";
  167. } else {
  168. rdo_grdeflag.disabled = true;
  169. btn_save.disabled = true;
  170. str = " " + hngnm + " 환자분은 " + "신생아 중환자실 환자가 아닙니다.";
  171. }
  172. model.setValue(cap_str.attribute("ref"), str);
  173. cap_str.refresh();
  174. } else {
  175. messageBox("재원중인 환자가 존재하지않습니다.", "E");
  176. rdo_grdeflag.disabled = true;
  177. btn_save.disabled = true;
  178. model.resetInstanceNode(ipt_pid.attribute("ref"));
  179. model.resetInstanceNode(opt_hngnm.attribute("ref"));
  180. model.resetInstanceNode(ipt_indd.attribute("ref"));
  181. model.resetInstanceNode(ipt_cretno.attribute("ref"));
  182. model.resetInstanceNode(ipt_wardnm.attribute("ref"));
  183. model.resetInstanceNode(ipt_roomcd.attribute("ref"));
  184. model.resetInstanceNode(ipt_grde.attribute("ref"));
  185. model.resetInstanceNode(cap_str.attribute("ref"));
  186. ipt_pid.refresh();
  187. opt_hngnm.refresh();
  188. ipt_indd.refresh();
  189. ipt_cretno.refresh();
  190. ipt_wardcd.refresh()
  191. ipt_wardnm.refresh();
  192. ipt_roomcd.refresh();
  193. ipt_grde.refresh();
  194. cap_str.refresh();
  195. return;
  196. }
  197. }
  198. model.refresh();
  199. }
  200. function fSave() {
  201. var grdeflag = model.getValue(rdo_grdeflag.attribute("ref"));
  202. var grde = model.getValue(ipt_grde.attribute("ref"));
  203. if(grdeflag == grde) {
  204. messageBox("현재 병실등급과 바꾸려는 병실등급이 동일합니다.", "I");
  205. return;
  206. }
  207. var rtn = messageBox("병실등급 변경을 하시겠습니까?", "Q");
  208. if(rtn == "6") {
  209. model.makeValue("/root/send/savedata/pid" , model.getValue(ipt_pid.attribute("ref")));
  210. model.makeValue("/root/send/savedata/indd" , model.getValue(ipt_indd.attribute("ref")));
  211. model.makeValue("/root/send/savedata/cretno" , model.getValue(ipt_cretno.attribute("ref")));
  212. model.makeValue("/root/send/savedata/grdeflag", model.getValue(rdo_grdeflag.attribute("ref")));
  213. //병실구분이 일반이면 일반병실등급, 그렇지 않으면 중환자실 병실등급.
  214. if(grdeflag == "G") {
  215. model.makeValue("/root/send/savedata/grde", gGrde1);
  216. model.makeValue("/root/send/savedata/type", gType1);
  217. } else {
  218. model.makeValue("/root/send/savedata/grde", gGrde2);
  219. model.makeValue("/root/send/savedata/type", gType2);
  220. }
  221. if(submit("TXMNN02601")) {
  222. messageBox("저장되었습니다.", "I");
  223. if(model.getValue("/root/main/cond/grdeflag") == "G"){
  224. model.makeValue("/root/main/cond/today", getCurrentDate());
  225. //exeReportPreview("RPMNN02600", "XMLSTR" , "" , "" , "true" , "", "", "", "", "true"); // OCR서식으로 변경
  226. group1.visible = true;
  227. }
  228. fSearch();
  229. }
  230. } else {
  231. }
  232. }
  233. function fPrint(elecflag){
  234. var left = event.screenX;
  235. var top = event.screenY;
  236. var pInstcd = getUserInfo("dutplceinstcd");
  237. var pPid = model.getValue("/root/main/cond/pid");
  238. var pIndd = model.getValue("/root/main/cond/indd");
  239. var pCretno = model.getValue("/root/main/cond/cretno");
  240. var pOrdtype = "I";
  241. var formcd = "1400014928";
  242. if (elecflag == "Y") {
  243. fElecPrint(pPid, pCretno, pIndd, pInstcd, formcd, "", "G") ;
  244. }else{
  245. setParameter("formcd",formcd);
  246. setParameter("pid", pPid);
  247. setParameter("orddd", pIndd);
  248. setParameter("cretno", pCretno);
  249. setParameter("ordtype", pOrdtype);
  250. open("SSMRF03700",1,left,top);
  251. }
  252. group1.visible = false;
  253. }
  254. ]]>
  255. </script>
  256. <script type="javascript" ev:event="xforms-ready">
  257. <![CDATA[
  258. fInitialize();
  259. ]]>
  260. </script>
  261. <submission id="TRMNN02601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" resultref="/root/main/patinfo"/>
  262. <submission id="TRMNW00001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/code/codelist"/>
  263. <submission id="TXMNN02601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/retinfo"/>
  264. </model>
  265. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  266. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  267. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  268. <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
  269. <script type="javascript" src="../../../emr/wardcareweb/js/SMMNW03.js"/>
  270. </xhtml:head>
  271. <xhtml:body pagewidth="318" pageheight="195" guideline="1,0;2,0;" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  272. <group id="group3" scroll="auto" style="left:0px; top:0px; width:301px; height:160px; ">
  273. <datagrid id="grd_patlist" nodeset="/root/main/patinfo/patlist" visibility="hidden" caption="caption1^caption2^caption3^caption4^caption5^caption6^caption7^caption8^caption9" colsep="^" colwidth="100, 100, 100, 100, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:55px; top:85px; width:175px; height:70px; ">
  274. <col ref="pid"/>
  275. <col ref="hngnm"/>
  276. <col ref="indd"/>
  277. <col ref="wardnm"/>
  278. <col ref="roomcd"/>
  279. <col ref="grde"/>
  280. <col ref="cretno"/>
  281. <col ref="wardcd"/>
  282. <col ref="fromdd"/>
  283. </datagrid>
  284. <caption id="cap_str" ref="/root/main/cond/str" style="left:5px; top:130px; width:290px; height:30px; font-family:돋움; font-size:14pxptptptpt; font-weight:bold; vertical-align:top; "/>
  285. <caption id="caption7" class="tit_2" style="left:8px; top:10px; width:144px; height:14px; ">신생아실 병실료 산정</caption>
  286. <line id="line1" class="line_2" style="x1:0px; y1:76px; x2:300px; y2:76px; "/>
  287. <line id="line2" class="line_2" style="x1:0px; y1:52px; x2:300px; y2:52px; "/>
  288. <line id="line5" class="line_1" style="x1:0px; y1:25px; x2:300px; y2:25px; "/>
  289. <input id="ipt_indd" ref="/root/main/cond/indd" class="input_search" disabled="true" navindex="2" format="yyyy-mm-dd" style="left:76px; top:55px; width:96px; height:19px; "/>
  290. <input id="ipt_pid" ref="/root/main/cond/pid" class="input_search" navindex="1" maxlength="10" style="left:76px; top:31px; width:96px; height:19px; ">
  291. <script type="javascript" ev:event="onkeypress">
  292. <![CDATA[
  293. if(event.keyCode == "13"){
  294. model.setvalue("/root/main/cond/pid", ipt_pid.currentText);
  295. fSearch(); //환자및 사망정보 조회
  296. }
  297. ]]>
  298. </script>
  299. </input>
  300. <output id="opt_hngnm" ref="/root/main/cond/hngnm" class="output_fix" style="left:175px; top:31px; width:123px; height:19px; "/>
  301. <caption id="caption1" class="cell_1" style="left:0px; top:54px; width:74px; height:23px; text-align:center; vertical-align:middle; ">입원일자</caption>
  302. <caption id="caption3" class="cell_1" style="left:0px; top:102px; width:74px; height:23px; text-align:center; vertical-align:middle; ">병실구분</caption>
  303. <select1 id="rdo_grdeflag" ref="/root/main/cond/grdeflag" appearance="full" cols="2" overflow="visible" style="left:77px; top:106px; width:223px; height:13px; border-style:none; ">
  304. <choices>
  305. <item>
  306. <label>일반병실료산정</label>
  307. <value>G</value>
  308. </item>
  309. <item>
  310. <label>중환자병실료산정</label>
  311. <value>S</value>
  312. </item>
  313. </choices>
  314. </select1>
  315. <caption id="caption15" class="cell_1" style="left:0px; top:30px; width:74px; height:23px; text-align:center; vertical-align:middle; ">등록번호</caption>
  316. <input id="ipt_wardnm" ref="/root/main/cond/wardnm" class="input_search" disabled="true" navindex="2" style="left:76px; top:79px; width:96px; height:19px; "/>
  317. <input id="ipt_roomcd" ref="/root/main/cond/roomcd" class="input_search" disabled="true" navindex="2" style="left:236px; top:79px; width:62px; height:19px; "/>
  318. <line id="line8" class="line_2" style="x1:0px; y1:100px; x2:300px; y2:100px; "/>
  319. <caption id="caption2" class="cell_1" style="left:0px; top:78px; width:74px; height:23px; text-align:center; vertical-align:middle; ">병동</caption>
  320. <caption id="caption6" class="cell_1" style="left:175px; top:78px; width:59px; height:23px; text-align:center; vertical-align:middle; ">병실</caption>
  321. <input id="ipt_wardcd" ref="/root/main/cond/wardcd" visibility="hidden" style="left:145px; top:125px; width:100px; height:19px; "/>
  322. <input id="ipt_cretno" ref="/root/main/cond/cretno" visibility="hidden" style="left:35px; top:125px; width:100px; height:19px; "/>
  323. <line id="line4" class="line_3" style="x1:0px; y1:124px; x2:300px; y2:124px; "/>
  324. <input id="ipt_grde" ref="/root/main/cond/grde" visibility="hidden" style="left:180px; top:55px; width:100px; height:20px; "/>
  325. </group>
  326. <group id="grp_btn" scroll="auto" style="left:0px; top:165px; width:301px; height:30px; ">
  327. <button id="button9" class="btn4_letter2" navindex="7" style="left:241px; top:5px; width:56px; height:22px; ">
  328. <caption>닫기</caption>
  329. <script type="javascript" ev:event="DOMActivate">
  330. <![CDATA[
  331. window.close();
  332. ]]>
  333. </script>
  334. </button>
  335. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:300px; y2:0px; "/>
  336. <button id="btn_save" class="btn4_letter2" disabled="true" navindex="5" style="left:183px; top:5px; width:56px; height:22px; ">
  337. <caption>저장</caption>
  338. <script type="javascript" ev:event="DOMActivate">
  339. <![CDATA[
  340. fSave();
  341. ]]>
  342. </script>
  343. </button>
  344. </group>
  345. <group id="group1" visibility="hidden" style="left:95px; top:110px; width:200px; height:80px; background-color:#ff99cc; ">
  346. <caption id="caption4" class="tit_2" style="left:0px; top:5px; width:198px; height:14px; font-family:굴림; ">일반 병실 입원료 안내 확인서</caption>
  347. <button id="button1" class="btn4_letter3" navindex="5" style="left:15px; top:40px; width:68px; height:22px; ">
  348. <caption>출력물</caption>
  349. <script type="javascript" ev:event="DOMActivate">
  350. <![CDATA[
  351. fPrint("N");
  352. ]]>
  353. </script>
  354. </button>
  355. <button id="button2" class="btn4_letter5" navindex="5" style="left:95px; top:40px; width:92px; height:22px; ">
  356. <caption>전자동의서</caption>
  357. <script type="javascript" ev:event="DOMActivate">
  358. <![CDATA[
  359. fPrint("Y");
  360. ]]>
  361. </script>
  362. </button>
  363. </group>
  364. </xhtml:body>
  365. </xhtml:html>