SPMNW04704_욕창발생보고및SMS전송.xrw 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  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>SMS 전송</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <paminfo>
  11. <wardcd/>
  12. <wardnm/>
  13. <pid/>
  14. <hngnm/>
  15. <sexage/>
  16. <orddeptnm/>
  17. <indd/>
  18. <diag/>
  19. <cretno/>
  20. </paminfo>
  21. <detlgrup>
  22. <detlgruplist>
  23. <genrdd/>
  24. <genrtm/>
  25. <genrplce/>
  26. <genrplceid/>
  27. <obspartnm/>
  28. <sizewidth/>
  29. <sizeheight/>
  30. <sizedepth/>
  31. <stage/>
  32. <reportdd/>
  33. <reporttm/>
  34. <reportnm/>
  35. <reportid/>
  36. <grupcd/>
  37. <obsrecseq/>
  38. <totpnt/>
  39. <bspntnm/>
  40. <pid/>
  41. <indd/>
  42. <cretno/>
  43. <genrplcewardcd/>
  44. <genrplcewardnm/>
  45. <obsrecrptseq/>
  46. </detlgruplist>
  47. </detlgrup>
  48. </main>
  49. <hidden>
  50. <codelist>
  51. <getVOStage>
  52. <cd/>
  53. <cdnm/>
  54. </getVOStage>
  55. </codelist>
  56. <smsinfo>
  57. <transchk>
  58. <smsflag>N</smsflag>
  59. </transchk>
  60. </smsinfo>
  61. </hidden>
  62. <send/>
  63. <init>
  64. <paminfo/>
  65. <detlgrup>
  66. <detlgruplist/>
  67. </detlgrup>
  68. <sriusgrup/>
  69. </init>
  70. <temp/>
  71. </root>
  72. </instance>
  73. <submission id="TRMNW04701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/codelist"/>
  74. <!-- 병동, 내환자 조회 submission -->
  75. <submission id="TRMNW04705" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init"/>
  76. <submission id="TXMNW04704" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/smsinfo"/>
  77. </model>
  78. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  79. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  80. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  81. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  82. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  83. <script type="javascript">
  84. <![CDATA[
  85. /* 욕창보고 및 SMS전송 화면 로직 (2011.04.20 Ahn) */
  86. var pamInfoPath = "/root/init/paminfo";
  87. var detlgrupPath = "/root/init/detlgrup/detlgruplist";
  88. var sriusgrupParh = "/root/init/sriusgrup";
  89. var mainPamInfoPath = "/root/main/paminfo";
  90. var mainDetlgrupPath = "/root/main/detlgrup/detlgruplist";
  91. function fInit(){
  92. //그리드에 들어갈 공통코드리스트 조회
  93. if(!submit("TRMNW04701")){
  94. messageBox('화면 초기화를', 'E009');
  95. return;
  96. }
  97. fSetData();
  98. }
  99. function fSetData(){
  100. var ScrId = opener.javascript.getParameter("ScreenId");
  101. if(ScrId == 'SMMNW04700'){ // 욕창관찰기록
  102. model.setValue(mainPamInfoPath + "/wardcd", model.getValue(pamInfoPath + "/wardcd")); // 등록부서
  103. model.setValue(mainPamInfoPath + "/wardnm", model.getValue(pamInfoPath + "/wardnm")); // 등록부서
  104. model.setValue(mainPamInfoPath + "/pid" , model.getValue(pamInfoPath + "/pid")); // 등록번호
  105. model.setValue(mainPamInfoPath + "/hngnm" , model.getValue(pamInfoPath + "/hngnm")); // 이름
  106. var sex = model.getValue(pamInfoPath + "/sex"); // 성별
  107. var age = model.getValue(pamInfoPath + "/age"); // 나이
  108. model.setValue(mainPamInfoPath + "/sexage", sex + "/" + age);
  109. model.setValue(mainPamInfoPath + "/orddeptnm", model.getValue(pamInfoPath + "/orddeptnm")); // 진료과
  110. model.setValue(mainPamInfoPath + "/indd" , model.getValue(pamInfoPath + "/indd")); // 입원일
  111. model.setValue(mainPamInfoPath + "/diag" , model.getValue(pamInfoPath + "/diag")); // 진단명
  112. model.setValue(mainDetlgrupPath + "/totpnt" , model.getValue(sriusgrupParh + "/totpnt")); // Braden 점수
  113. model.setValue(mainDetlgrupPath + "/bspntnm" , model.getValue(sriusgrupParh + "/clsgrupkind")); // 위험군
  114. model.setValue(mainDetlgrupPath + "/pid" , model.getValue(mainPamInfoPath + "/pid")); // 등록번호
  115. model.setValue(mainDetlgrupPath + "/indd" , model.getValue(mainPamInfoPath + "/indd")); // 입원일자
  116. model.setValue(mainDetlgrupPath + "/cretno" , model.getValue(pamInfoPath + "/cretno")); // 생성번호
  117. }
  118. else if(ScrId == 'SMMNW13800'){ // 욕창발생보고서
  119. model.setValue(mainPamInfoPath + "/wardcd", model.getValue(detlgrupPath + "/wardcd")); // 등록부서
  120. model.setValue(mainPamInfoPath + "/wardnm", model.getValue(detlgrupPath + "/wardnm")); // 등록부서
  121. model.setValue(mainPamInfoPath + "/pid" , model.getValue(detlgrupPath + "/pid")); // 등록번호
  122. model.setValue(mainPamInfoPath + "/hngnm" , model.getValue(detlgrupPath + "/hngnm")); // 이름
  123. var sex = model.getValue(detlgrupPath + "/sex"); // 성별
  124. var age = model.getValue(detlgrupPath + "/age"); // 나이
  125. model.setValue(mainPamInfoPath + "/sexage", sex + "/" + age);
  126. model.setValue(mainPamInfoPath + "/orddeptnm", model.getValue(detlgrupPath + "/orddeptnm")); // 진료과
  127. model.setValue(mainPamInfoPath + "/indd" , model.getValue(detlgrupPath + "/indd")); // 입원일
  128. model.setValue(mainPamInfoPath + "/diag" , model.getValue(detlgrupPath + "/diag")); // 진단명
  129. var pntrslt = model.getValue(detlgrupPath + "/pntrslt");
  130. var idx = 0;
  131. var totpnt = "";
  132. var bspntnm = "";
  133. for(i=0; i<pntrslt.length; i++){
  134. if("/" == pntrslt.charAt(i)){
  135. idx = i;
  136. break;
  137. }
  138. }
  139. totpnt = pntrslt.substring(0, idx);
  140. bspntnm = pntrslt.substring(idx+1, pntrslt.length);
  141. model.setValue(mainDetlgrupPath + "/totpnt" , totpnt); // Braden 점수
  142. model.setValue(mainDetlgrupPath + "/bspntnm" , bspntnm); // 위험군
  143. model.setValue(mainDetlgrupPath + "/pid" , model.getValue(detlgrupPath + "/pid")); // 등록번호
  144. model.setValue(mainDetlgrupPath + "/indd" , model.getValue(detlgrupPath + "/indd")); // 입원일자
  145. model.setValue(mainDetlgrupPath + "/cretno" , model.getValue(detlgrupPath + "/cretno")); // 생성번호
  146. }
  147. model.setValue(mainDetlgrupPath + "/genrdd" , model.getValue(detlgrupPath + "/genrdd")); // 발생일자
  148. model.setValue(mainDetlgrupPath + "/genrtm" , model.getValue(detlgrupPath + "/genrtm")); // 발생시간
  149. model.setValue(mainDetlgrupPath + "/genrplce", model.getValue(detlgrupPath + "/genrplce")); // 발생장소
  150. model.setValue(mainDetlgrupPath + "/genrplceid" , model.getValue(detlgrupPath + "/genrplceid")); // 발생장소id
  151. model.setValue(mainDetlgrupPath + "/genrplcewardcd" , model.getValue(detlgrupPath + "/genrplcewardcd")); // 발생장소원내코드
  152. model.setValue(mainDetlgrupPath + "/genrplcewardnm" , model.getValue(detlgrupPath + "/genrplcewardnm")); // 발생장소원내
  153. model.setValue(mainDetlgrupPath + "/obspartnm" , model.getValue(detlgrupPath + "/obspartnm")); // 발생부위
  154. model.setValue(mainDetlgrupPath + "/sizewidth" , model.getValue(detlgrupPath + "/sizewidth")); // 가로
  155. model.setValue(mainDetlgrupPath + "/sizeheight" , model.getValue(detlgrupPath + "/sizeheight")); // 세로
  156. model.setValue(mainDetlgrupPath + "/sizedepth" , model.getValue(detlgrupPath + "/sizedepth")); // 깊이
  157. var stageCd = model.getValue(detlgrupPath + "/stageid");
  158. model.makeValue(mainDetlgrupPath + "/stagenm" , model.getValue("/root/hidden/codelist/getVOStage[cd = '" + stageCd + "']/cdnm")); // 단계
  159. model.setValue(mainDetlgrupPath + "/stage" , model.getValue("/root/hidden/codelist/getVOStage[cd = '" + stageCd + "']/cd")); // 단계id
  160. model.setValue(mainDetlgrupPath + "/grupcd" , model.getValue(detlgrupPath + "/grupcd")); // 그룹코드
  161. model.setValue(mainDetlgrupPath + "/obsrecseq" , model.getValue(detlgrupPath + "/obsrecseq")); // 욕창관찰기록 seq
  162. model.setValue(mainDetlgrupPath + "/obsrecrptseq" , model.getValue(detlgrupPath + "/obsrecrptseq")); // 욕창관찰기록보고서 seq
  163. model.setValue(mainDetlgrupPath + "/reportdd" , getCurrentDate()); // 보고일에 현재날짜(디폴트);
  164. model.setValue(mainDetlgrupPath + "/reporttm" , getCurrentDateTime().substring(9,13));//보고시간 현재 시간
  165. model.setValue(mainDetlgrupPath + "/reportid" , getUserId()); // 접속한 사용자 id
  166. model.setValue(mainDetlgrupPath + "/reportnm" , getUserName()); // 접속한 사용자 이름
  167. model.refresh();
  168. }
  169. // 저장 및 SMS전송
  170. function fSaveNSMS(){
  171. if(fIsValid()){
  172. //저장여부 메세지박스
  173. if(messageBox("","Q002") != 6)
  174. return false;
  175. model.removenode("/root/send/savedata");
  176. model.makeNode("/root/send/savedata");
  177. model.copyNode("/root/send/savedata", "/root/main/detlgrup");
  178. // 환자명 추가
  179. model.makeValue("/root/send/savedata/patnm", model.getValue("/root/main/paminfo/hngnm"));
  180. // 병동코드 추가
  181. model.makeValue("/root/send/savedata/wardcd", model.getValue("/root/main/paminfo/wardcd"));
  182. model.makeValue("/root/send/savedata/wardnm", model.getValue("/root/main/paminfo/wardnm"));
  183. // model.makeValue("/root/send/savedata/pid", model.getValue("/root/cond/patientgrupInfo/patientgruplistInfo/pid"));
  184. if(submit("TXMNW04704")){
  185. messageBox("SMS 발송이 완료되었습니다.","I");
  186. // var smsYN = model.getValue("/root/hidden/smsinfo/transchk/smsflag");
  187. // if(smsYN == "Y") messageBox("보고서 저장 및 SMS 전송이","I002");
  188. // else messageBox("보고서 저장은 완료되었으나, SMS 전송은","E009");
  189. // SMS 전송 로직
  190. //if(submit("TXMNW04705")){
  191. // messageBox("SMS 전송이","I002");
  192. //}
  193. }
  194. }
  195. }
  196. function fIsValid(){
  197. var reporttm = model.getValue("/root/main/detlgrup/detlgruplist/reporttm");
  198. if (reporttm == ""){
  199. messageBox("보고 시간이 입력되지 않았습니다.","I");
  200. return false;
  201. }
  202. return true;
  203. }
  204. // SMS 전송
  205. function fSMSTnsfr(){
  206. }
  207. ]]>
  208. </script>
  209. <script type="javascript" ev:event="xforms-ready">
  210. <![CDATA[
  211. fInit();
  212. ]]>
  213. </script>
  214. </xhtml:head>
  215. <xhtml:body pagewidth="430" pageheight="350" guideline="1,-13;1,468;1,430;1,-45;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  216. <group id="grp_biz" scroll="auto" style="left:0px; top:0px; width:410px; height:330px; ">
  217. <output id="output4" ref="/root/main/paminfo/hngnm" class="output_fix" appearance="output" style="left:198px; top:52px; width:94px; height:19px; "/>
  218. <caption id="cap_sa" class="cell_1" style="left:297px; top:51px; width:61px; height:23px; vertical-align:middle; ">성별/나이</caption>
  219. <output id="output9" ref="/root/main/paminfo/pid" class="output_fix" appearance="output" style="left:62px; top:52px; width:93px; height:19px; "/>
  220. <line id="line23" class="line_2" style="x1:0px; y1:271px; x2:403px; y2:271px; "/>
  221. <caption id="caption33" class="cell_1" style="left:0px; top:195px; width:60px; height:23px; ">발생부위</caption>
  222. <caption id="cap_indd" class="cell_1" style="left:197px; top:75px; width:60px; height:23px; vertical-align:middle; ">입원일</caption>
  223. <caption id="cap_patnm" class="cell_1" style="left:160px; top:51px; width:36px; height:23px; vertical-align:middle; ">이름</caption>
  224. <caption id="cap_orddeptnm" class="cell_1" style="left:0px; top:75px; width:60px; height:23px; vertical-align:middle; ">진료과</caption>
  225. <caption id="cap_pid" class="cell_1" style="left:0px; top:51px; width:60px; height:23px; vertical-align:middle; ">등록번호</caption>
  226. <caption id="caption17" class="cell_1" style="left:0px; top:123px; width:210px; height:23px; ">욕창 위험 초기사정 Braden 점수/군</caption>
  227. <line id="line4" class="line_1" style="x1:0px; y1:22px; x2:406px; y2:22px; "/>
  228. <caption id="caption8" class="tit_2" style="left:2px; top:5px; width:184px; height:15px; ">SMS 전송</caption>
  229. <output id="output1" ref="/root/main/paminfo/indd" class="output_fix" format="yyyy-mm-dd" appearance="output" style="left:258px; top:77px; width:147px; height:19px; "/>
  230. <caption id="caption19" class="cell_1" style="left:0px; top:147px; width:60px; height:23px; ">발생일자</caption>
  231. <output id="output2" ref="/root/main/paminfo/orddeptnm" class="output_fix" appearance="output" style="left:62px; top:77px; width:133px; height:19px; "/>
  232. <output id="output3" ref="/root/main/paminfo/sexage" class="output_fix" appearance="output" style="left:360px; top:52px; width:45px; height:19px; "/>
  233. <line id="line1" class="line_1" style="x1:0px; y1:267px; x2:406px; y2:267px; "/>
  234. <caption id="caption1" class="cell_1" style="left:0px; top:272px; width:60px; height:23px; vertical-align:middle; ">전송일</caption>
  235. <caption id="caption4" class="cell_1" style="left:198px; top:272px; width:60px; height:23px; vertical-align:middle; ">전송자</caption>
  236. <button id="button1" class="btn2_letter5" style="left:285px; top:303px; width:75px; height:19px; ">
  237. <caption>SMS발송</caption>
  238. <script type="javascript" ev:event="DOMActivate">
  239. <![CDATA[
  240. //var recflag = opener.javascript.getParameter("recflag");
  241. fSaveNSMS();
  242. //model.close();
  243. //opener.model.refresh();
  244. ]]>
  245. </script>
  246. </button>
  247. <caption id="caption5" class="cell_1" style="left:0px; top:99px; width:60px; height:23px; vertical-align:middle; ">진단명</caption>
  248. <output id="output6" ref="/root/main/paminfo/diag" class="output_fix" appearance="output" style="left:62px; top:101px; width:343px; height:19px; "/>
  249. <caption id="caption3" class="cell_1" style="left:0px; top:219px; width:210px; height:23px; ">크기(cm) - 가로 x 세로 x 깊이</caption>
  250. <caption id="caption9" class="cell_1" style="left:0px; top:243px; width:60px; height:23px; ">단계</caption>
  251. <caption id="caption10" class="cell_1" style="left:0px; top:171px; width:60px; height:23px; ">발생장소</caption>
  252. <input id="ipt_indate" ref="/root/main/detlgrup/detlgruplist/reportdd" class="input_search" visibility="visible" inputtype="date" style="left:62px; top:274px; width:87px; height:19px; ">
  253. <hint>
  254. <![CDATA[날짜를 선택하세요]]>
  255. </hint>
  256. <script type="javascript" ev:event="xforms-value-changed">
  257. <![CDATA[
  258. if (ipt_indate.value > getCurrentDate()){
  259. messageBox("현재 일자 이후 날짜는 선택","E001");
  260. ipt_indate.value = getCurrentDate();
  261. return;
  262. }
  263. ]]>
  264. </script>
  265. </input>
  266. <input id="ipt_time" ref="/root/main/detlgrup/detlgruplist/reporttm" class="input_search" visibility="visible" format="hh:nn" validateformat="true" style="left:152px; top:274px; width:42px; height:19px; ">
  267. <hint>
  268. <![CDATA[시간을 입력하세요[ ex)23:11 ]]]>
  269. </hint>
  270. </input>
  271. <output id="output5" ref="/root/main/paminfo/wardnm" class="output_fix" appearance="output" style="left:62px; top:29px; width:343px; height:19px; "/>
  272. <caption id="caption2" class="cell_1" style="left:0px; top:27px; width:60px; height:23px; vertical-align:middle; ">등록부서</caption>
  273. <output id="output7" ref="/root/main/detlgrup/detlgruplist/totpnt" class="output_fix" appearance="output" style="left:211px; top:125px; width:47px; height:19px; "/>
  274. <output id="output8" ref="/root/main/detlgrup/detlgruplist/bspntnm" class="output_fix" appearance="output" style="left:260px; top:125px; width:145px; height:19px; "/>
  275. <output id="output10" ref="/root/main/detlgrup/detlgruplist/genrdd" class="output_fix" format="yyyy-mm-dd" appearance="output" style="left:61px; top:149px; width:344px; height:19px; "/>
  276. <output id="output11" ref="/root/main/detlgrup/detlgruplist/genrplce" class="output_fix" appearance="output" style="left:61px; top:173px; width:197px; height:19px; "/>
  277. <output id="output12" ref="/root/main/detlgrup/detlgruplist/obspartnm" class="output_fix" appearance="output" style="left:61px; top:197px; width:344px; height:19px; "/>
  278. <output id="output13" ref="/root/main/detlgrup/detlgruplist/sizewidth" class="output_fix" appearance="output" style="left:212px; top:221px; width:32px; height:19px; "/>
  279. <output id="output14" ref="/root/main/detlgrup/detlgruplist/sizeheight" class="output_fix" appearance="output" style="left:247px; top:221px; width:32px; height:19px; "/>
  280. <output id="output15" ref="/root/main/detlgrup/detlgruplist/sizedepth" class="output_fix" appearance="output" style="left:282px; top:221px; width:32px; height:19px; "/>
  281. <output id="output16" ref="/root/main/detlgrup/detlgruplist/stagenm" class="output_fix" appearance="output" style="left:61px; top:245px; width:344px; height:19px; "/>
  282. <output id="output17" ref="/root/main/detlgrup/detlgruplist/reportnm" class="output_fix" appearance="output" style="left:260px; top:274px; width:145px; height:21px; "/>
  283. <output id="output18" ref="/root/main/detlgrup/detlgruplist/reportid" class="output_fix" visibility="hidden" appearance="output" style="left:110px; top:300px; width:90px; height:19px; "/>
  284. <output id="output19" ref="/root/main/detlgrup/detlgruplist/genrtm" class="output_fix" visibility="hidden" format="hh:nn" appearance="output" style="left:90px; top:150px; width:75px; height:19px; "/>
  285. <output id="output20" ref="/root/main/detlgrup/detlgruplist/genrplceid" class="output_fix" visibility="hidden" appearance="output" style="left:90px; top:175px; width:75px; height:19px; "/>
  286. <output id="output21" ref="/root/main/detlgrup/detlgruplist/grupcd" class="output_fix" visibility="hidden" appearance="output" style="left:5px; top:300px; width:35px; height:19px; "/>
  287. <output id="output22" ref="/root/main/detlgrup/detlgruplist/obsrecseq" class="output_fix" visibility="hidden" appearance="output" style="left:45px; top:300px; width:55px; height:19px; "/>
  288. <button id="button2" class="btn2_letter2" style="left:363px; top:303px; width:42px; height:19px; ">
  289. <caption>닫기</caption>
  290. <script type="javascript" ev:event="DOMActivate">
  291. <![CDATA[
  292. model.close();
  293. ]]>
  294. </script>
  295. </button>
  296. <output id="output23" ref="/root/main/detlgrup/detlgruplist/stage" class="output_fix" visibility="hidden" appearance="output" style="left:90px; top:245px; width:75px; height:19px; "/>
  297. <output id="output25" ref="/root/main/detlgrup/detlgruplist/genrplcewardnm" class="output_fix" appearance="output" style="left:260px; top:173px; width:145px; height:19px; "/>
  298. <output id="output24" ref="/root/main/detlgrup/detlgruplist/genrplcewardcd" class="output_fix" visibility="hidden" appearance="output" style="left:340px; top:175px; width:65px; height:19px; "/>
  299. <output id="output26" ref="/root/main/detlgrup/detlgruplist/obsrecrptseq" class="output_fix" visibility="hidden" style="left:205px; top:300px; width:40px; height:19px; "/>
  300. </group>
  301. </xhtml:body>
  302. </xhtml:html>