SPMNE02303_파랑새기록인증저장정보생성.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  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>Untitle</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <signSaveData>
  11. <saveDataList>
  12. <stmtspec/>
  13. <attrinfo/>
  14. <status/>
  15. <origincd/>
  16. <stmtcd>--------</stmtcd>
  17. <dnarflag>3A</dnarflag>
  18. <recoriginflag/>
  19. <recdtflag/>
  20. <recdt/>
  21. <pid/>
  22. <indd/>
  23. <cretno/>
  24. <instcd/>
  25. <ioflag/>
  26. <orddeptcd/>
  27. <recflag/>
  28. <reclnkkey/>
  29. <diagstmtcd/>
  30. <orddd/>
  31. <dnarnm/>
  32. <usernm/>
  33. <deptflagnm/>
  34. </saveDataList>
  35. </signSaveData>
  36. <recinfo/>
  37. </main>
  38. </root>
  39. </instance>
  40. <script type="javascript" ev:event="xforms-ready">
  41. <![CDATA[
  42. var savePath= "/root/main/signSaveData/saveDataList";
  43. var recPath="/root/main/recinfo/reclist";
  44. var nrsRecPath="/root/main/recinfo/nursingrecordlist";
  45. var savePath2= "/root/temp/signSaveData/saveDataList";
  46. var recrslt="";
  47. var prcpvol="";
  48. var recdd = "";
  49. var rectm="";
  50. var prcpnm2 = "";
  51. var recflag = "";
  52. var grupcd="";
  53. var pCode = "'003', 'U15'"; //'U15':영상의학과 추가. '003':항암주사실
  54. var pDate = getCurrentDate(); // 조회기준일자
  55. fGetNursHardCdInfo(pCode, pDate);
  56. var pid = model.property("pid");
  57. var indd = model.property("indd");
  58. var cretno = model.property("cretno");
  59. var ordtype = model.property("ordtype");
  60. var orddeptcd = model.property("orddeptcd");
  61. var orddrid = model.property("orddrid");
  62. var orddd = '-';
  63. var instcd = getUserInfo("dutplceinstcd");
  64. var spcldept = model.getValue("/root/code/codeinfo/codelist[cdgrupid='003' and cdid='" + getUserInfo("dutplcecd") + "']/cdid");
  65. if(ordtype == "I" || ordtype=="E" || ordtype=="D") {
  66. orddd="-";
  67. recflag = "E";
  68. if(instcd=="031") {
  69. if(ordtype=="E") {
  70. grupcd = "00005157";
  71. recflag = "E";
  72. } else if(ordtype == "D" && spcldept != "") {
  73. grupcd = "00002851";
  74. recflag="C";
  75. } else {
  76. grupcd = "00005862";
  77. recflag = "W";
  78. }
  79. } else {
  80. if(ordtype=="E") {
  81. grupcd = "00002043";
  82. recflag ="E";
  83. } else if(ordtype == "D") {
  84. grupcd = "00004307";
  85. recflag = "C";
  86. } else {
  87. grupcd = "00003846";
  88. recflag="W";
  89. }
  90. }
  91. }
  92. var cnt = 0;
  93. for (var i = 1; i <= getNodesetCount("/root/main/recinfo/nursingrecordlist"); i++) {
  94. model.makeNode(savePath + "["+ i +"]");
  95. model.makeValue(savePath + "[" + i +"]/stmtspec", model.getValue(nrsRecPath+ "[" + i + "]/stmtspec") );
  96. model.makeValue(savePath + "[" + i + "]/status" , "U");
  97. model.makeValue(savePath + "[" + i + "]/attrinfo" , "");
  98. model.makeValue(savePath + "[" + i + "]/origincd" , model.getValue(nrsRecPath+ "[" + i + "]/origincd"));
  99. model.makeValue(savePath + "[" + i + "]/stmtcd" , model.getValue(nrsRecPath+ "[" + i + "]/stmtcd"));
  100. model.makeValue(savePath + "[" + i + "]/dnarflag" , model.getValue(nrsRecPath+ "[" + i + "]/dnarflag"));
  101. model.makeValue(savePath + "[" + i + "]/recoriginflag", model.getValue(nrsRecPath+ "[" + i + "]/recoriginflag"));
  102. model.makeValue(savePath + "[" + i + "]/recdtflag" , 'U');
  103. model.makeValue(savePath + "[" + i + "]/recdt" , model.getValue(nrsRecPath+ "[" + i + "]/recdd") + model.getValue(nrsRecPath+ "[" + i + "]/rectm"));
  104. model.makeValue(savePath + "[" + i + "]/pid" , model.getValue(nrsRecPath+ "[" + i + "]/pid"));
  105. model.makeValue(savePath + "[" + i + "]/indd" , model.getValue(nrsRecPath+ "[" + i + "]/indd"));
  106. model.makeValue(savePath + "[" + i + "]/cretno" , model.getValue(nrsRecPath+ "[" + i + "]/cretno"));
  107. model.makeValue(savePath + "[" + i + "]/instcd" , getUserInfo("dutplceinstcd"));
  108. model.makeValue(savePath + "[" + i + "]/ioflag" , ordtype);
  109. model.makeValue(savePath + "[" + i + "]/orddeptcd" , orddeptcd);
  110. model.makeValue(savePath + "[" + i + "]/recflag" , model.getValue(nrsRecPath+ "[" + i + "]/recflag"));
  111. model.makeValue(savePath + "[" + i + "]/reclnkkey" , model.getValue(nrsRecPath+ "[" + i + "]/reclnkkey"));
  112. model.makeValue(savePath + "[" + i + "]/diagstmtcd" , "");
  113. model.makeValue(savePath + "[" + i + "]/orddd" , model.getValue(nrsRecPath+ "[" + i + "]/outdd"));
  114. model.makeValue(savePath + "[" + i + "]/dnarnm" , "");
  115. model.makeValue(savePath + "[" + i + "]/usernm" , getUserInfo("usernm"));
  116. model.makeValue(savePath + "[" + i + "]/deptflagnm" , "");
  117. cnt++;
  118. }
  119. var cdnm
  120. var drprcpetc7;
  121. var setnm ;
  122. var setcd;
  123. for (var i = 1; i <= getNodesetCount("/root/main/recinfo/reclist"); i++) {
  124. drprcpetc7 = model.getValue(recPath + "[" + i + "]/drprcpetc7");
  125. prcpnm = model.getValue(recPath + "[" + i + "]/prcpnm");
  126. recdd = model.getValue(recPath + "[" + i + "]/recdd");
  127. rectm = model.getValue(recPath + "[" + i + "]/rectm");
  128. setcd = model.getValue(recPath + "[" + i + "]/setcd");
  129. setnm = model.getValue("/root/code/codeinfo/codelist[cdgrupid='U15' and cdid='" + setcd + "']/cdnm");
  130. model.makeNode(savePath + "["+ (cnt + i) +"]");
  131. if(trim(prcpnm) != "" && trim(drprcpetc7) != ""){
  132. if(setcd == "05" || setcd == "06") {
  133. model.makeValue(savePath + "["+ (cnt + i) +"]/stmtspec", rectm.substr(0,2) + ":" + rectm.substr(2,2) + " [" + prcpnm + "][" + drprcpetc7 + "] 단위 투여함.");
  134. } else {
  135. model.makeValue(savePath + "["+ (cnt + i) +"]/stmtspec", rectm.substr(0,2) + ":" + rectm.substr(2,2) + " [" + setnm + "] 시행함.");
  136. }
  137. }
  138. model.makeValue(savePath + "[" + (cnt + i) + "]/status" , "I");
  139. model.makeValue(savePath + "[" + (cnt + i) + "]/attrinfo" , "");
  140. model.makeValue(savePath + "[" + (cnt + i) + "]/origincd" , "00000841");
  141. model.makeValue(savePath + "[" + (cnt + i) + "]/stmtcd" , "--------");
  142. model.makeValue(savePath + "[" + (cnt + i) + "]/dnarflag" , "3A");
  143. model.makeValue(savePath + "[" + (cnt + i) + "]/recoriginflag", "T");
  144. model.makeValue(savePath + "[" + (cnt + i) + "]/recdtflag" , "A");
  145. model.makeValue(savePath + "[" + (cnt + i) + "]/recdt" , recdd + rectm);
  146. model.makeValue(savePath + "[" + (cnt + i) + "]/pid" , pid);
  147. model.makeValue(savePath + "[" + (cnt + i) + "]/indd" , indd);
  148. model.makeValue(savePath + "[" + (cnt + i) + "]/cretno" , cretno);
  149. model.makeValue(savePath + "[" + (cnt + i) + "]/instcd" , getUserInfo("dutplceinstcd"));
  150. model.makeValue(savePath + "[" + (cnt + i) + "]/ioflag" , ordtype);
  151. model.makeValue(savePath + "[" + (cnt + i) + "]/orddeptcd" , orddeptcd);
  152. model.makeValue(savePath + "[" + (cnt + i) + "]/recflag" , recflag);
  153. model.makeValue(savePath + "[" + (cnt + i) + "]/reclnkkey" , pid+","+(orddd == "-" ? indd : orddd )+","+cretno+","+getUserInfo("dutplceinstcd"));
  154. model.makeValue(savePath + "[" + (cnt + i) + "]/diagstmtcd" , "");
  155. model.makeValue(savePath + "[" + (cnt + i) + "]/orddd" , "-");
  156. model.makeValue(savePath + "[" + (cnt + i) + "]/dnarnm" , "");
  157. model.makeValue(savePath + "[" + (cnt + i) + "]/usernm" , getUserInfo("usernm"));
  158. model.makeValue(savePath + "[" + (cnt + i) + "]/deptflagnm" , "");
  159. }
  160. for (var i = 1; i <= getNodesetCount("/root/main/recinfo/reclist"); i++) {
  161. drprcpetc7 = model.getValue(recPath + "[" + i + "]/drprcpetc7");
  162. prcpnm = model.getValue(recPath + "[" + i + "]/prcpnm");
  163. recdd = model.getValue(recPath + "[" + i + "]/recdd");
  164. rectm = model.getValue(recPath + "[" + i + "]/rectm");
  165. setcd = model.getValue(recPath + "[" + i + "]/setcd");
  166. setnm = model.getValue("/root/code/codeinfo/codelist[cdgrupid='U15' and cdid='" + setcd + "']/cdnm");
  167. model.makeNode(savePath2 + "["+ i +"]");
  168. if(trim(prcpnm) != "" && trim(drprcpetc7) != ""){
  169. if(setcd == "05" || setcd == "06") {
  170. model.makeValue(savePath2 + "["+ i +"]/stmtspec", rectm.substr(0,2) + ":" + rectm.substr(2,2) + " [" + prcpnm + "][" + drprcpetc7 + "] 단위 투여함.");
  171. } else {
  172. model.makeValue(savePath2 + "["+ i +"]/stmtspec", rectm.substr(0,2) + ":" + rectm.substr(2,2) + " [" + setnm + "] 시행함.");
  173. }
  174. }
  175. model.makeValue(savePath2 + "[" + i + "]/status" , "I");
  176. model.makeValue(savePath2 + "[" + i + "]/attrinfo" , "");
  177. model.makeValue(savePath2 + "[" + i + "]/origincd" , grupcd);
  178. model.makeValue(savePath2 + "[" + i + "]/stmtcd" , "--------");
  179. model.makeValue(savePath2 + "[" + i + "]/dnarflag" , "3A");
  180. model.makeValue(savePath2 + "[" + i + "]/recoriginflag", "T");
  181. model.makeValue(savePath2 + "[" + i + "]/recdtflag" , "U");
  182. model.makeValue(savePath2 + "[" + i + "]/recdt" , recdd + rectm);
  183. model.makeValue(savePath2 + "[" + i + "]/pid" , pid);
  184. model.makeValue(savePath2 + "[" + i + "]/indd" , indd);
  185. model.makeValue(savePath2 + "[" + i + "]/cretno" , cretno);
  186. model.makeValue(savePath2 + "[" + i + "]/instcd" , getUserInfo("dutplceinstcd"));
  187. model.makeValue(savePath2 + "[" + i + "]/ioflag" , ordtype);
  188. model.makeValue(savePath2 + "[" + i + "]/orddeptcd" , orddeptcd);
  189. model.makeValue(savePath2 + "[" + i + "]/recflag" , recflag);
  190. model.makeValue(savePath2 + "[" + i + "]/reclnkkey" , pid+","+(orddd == "-" ? indd : orddd )+","+cretno+","+getUserInfo("dutplceinstcd"));
  191. model.makeValue(savePath2 + "[" + i + "]/diagstmtcd" , "");
  192. model.makeValue(savePath2 + "[" + i + "]/orddd" , "-");
  193. model.makeValue(savePath2 + "[" + i + "]/dnarnm" , "");
  194. model.makeValue(savePath2 + "[" + i + "]/usernm" , getUserInfo("usernm"));
  195. model.makeValue(savePath2 + "[" + i + "]/deptflagnm" , "");
  196. }
  197. var node = instance1.selectNodes(savePath2);
  198. var csv = getNodeListCSV(node);
  199. Sign.certchkflag = "N";
  200. if(Sign.signprocess() ){
  201. model.makeValue("/root/main/sign", Sign.signedInfos);
  202. opener.javascript.setParameter("nodeinfo", csv);
  203. opener.javascript.setParameter("signbfcnts", Sign.signedInfos[1]);
  204. opener.javascript.setParameter("signaftcnts", Sign.signedInfos[2]);
  205. window.close();
  206. }
  207. ]]>
  208. </script>
  209. <submission id="TRMNW00001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/code/codelist"/>
  210. </model>
  211. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  212. <script type="javascript" src="../../../emr/carecomweb/js/ENRSignEngine.js"/>
  213. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  214. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  215. <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
  216. <script type="javascript">
  217. <![CDATA[
  218. function fMake_SignData() {
  219. Sign.addnode("/root/main/signSaveData");
  220. }
  221. ]]>
  222. </script>
  223. </xhtml:head>
  224. <xhtml:body pagewidth="0" pageheight="0" style="border-color:#c7a3cf; "/>
  225. </xhtml:html>