SPMNR02501_기록인증저장정보생성.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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/nursreclist";
  45. var savePath2= "/root/temp/signSaveData/saveDataList";
  46. var recrslt="";
  47. var prcpvol="";
  48. var recdd = "";
  49. var rectm="";
  50. var prcpnm2 = "";
  51. var pid = opener.javascript.getParameter("pid");
  52. var indd = opener.javascript.getParameter("indd");
  53. var cretno = opener.javascript.getParameter("cretno");
  54. var ordtype = opener.javascript.getParameter("ordtype");
  55. var orddeptcd = opener.javascript.getParameter("orddeptcd");
  56. var orddrid = opener.javascript.getParameter("orddrid");
  57. var orddd = opener.javascript.getParameter("orddd");
  58. if(ordtype == "I" || ordtype=="E" || ordtype=="D") {
  59. orddd="-";
  60. }
  61. if(ordtype == "O" || ordtype=="S") {
  62. indd ="-";
  63. }
  64. var cnt = 0;
  65. for (var i = 1; i <= getNodesetCount("/root/main/recinfo/nursreclist"); i++) {
  66. model.makeNode(savePath + "["+ i +"]");
  67. model.makeValue(savePath + "[" + i +"]/stmtspec", model.getValue(nrsRecPath+ "[" + i + "]/stmtspec") );
  68. model.makeValue(savePath + "[" + i + "]/status" , "U");
  69. model.makeValue(savePath + "[" + i + "]/attrinfo" , "");
  70. model.makeValue(savePath + "[" + i + "]/origincd" , model.getValue(nrsRecPath+ "[" + i + "]/origincd"));
  71. model.makeValue(savePath + "[" + i + "]/stmtcd" , model.getValue(nrsRecPath+ "[" + i + "]/stmtcd"));
  72. model.makeValue(savePath + "[" + i + "]/dnarflag" , model.getValue(nrsRecPath+ "[" + i + "]/dnarflag"));
  73. model.makeValue(savePath + "[" + i + "]/recoriginflag", model.getValue(nrsRecPath+ "[" + i + "]/recoriginflag"));
  74. model.makeValue(savePath + "[" + i + "]/recdtflag" , 'U');
  75. model.makeValue(savePath + "[" + i + "]/recdt" , model.getValue(nrsRecPath+ "[" + i + "]/recdd") + model.getValue(nrsRecPath+ "[" + i + "]/rectm"));
  76. model.makeValue(savePath + "[" + i + "]/pid" , model.getValue(nrsRecPath+ "[" + i + "]/pid"));
  77. model.makeValue(savePath + "[" + i + "]/indd" , model.getValue(nrsRecPath+ "[" + i + "]/indd"));
  78. model.makeValue(savePath + "[" + i + "]/cretno" , model.getValue(nrsRecPath+ "[" + i + "]/cretno"));
  79. model.makeValue(savePath + "[" + i + "]/instcd" , getUserInfo("dutplceinstcd"));
  80. model.makeValue(savePath + "[" + i + "]/ioflag" , ordtype);
  81. model.makeValue(savePath + "[" + i + "]/orddeptcd" , orddeptcd);
  82. model.makeValue(savePath + "[" + i + "]/recflag" , model.getValue(nrsRecPath+ "[" + i + "]/recflag"));
  83. model.makeValue(savePath + "[" + i + "]/reclnkkey" , model.getValue(nrsRecPath+ "[" + i + "]/reclnkkey"));
  84. model.makeValue(savePath + "[" + i + "]/diagstmtcd" , "");
  85. model.makeValue(savePath + "[" + i + "]/orddd" , model.getValue(nrsRecPath+ "[" + i + "]/outdd"));
  86. model.makeValue(savePath + "[" + i + "]/dnarnm" , "");
  87. model.makeValue(savePath + "[" + i + "]/usernm" , getUserInfo("usernm"));
  88. model.makeValue(savePath + "[" + i + "]/deptflagnm" , "[혈당]");
  89. cnt++;
  90. }
  91. for (var i = 1; i <= getNodesetCount("/root/main/recinfo/reclist"); i++) {
  92. recrslt = model.getValue(recPath + "[" + i + "]/recrslt");
  93. prcpvol = model.getValue(recPath + "[" + i + "]/prcpvol");
  94. recdd = model.getValue(recPath + "[" + i + "]/recdd");
  95. rectm = model.getValue(recPath + "[" + i + "]/rectm");
  96. prcpnm2= model.getValue(recPath + "[" + i + "]/prcpnm2");
  97. model.makeNode(savePath + "["+ cnt + i +"]");
  98. if(recrslt != '-' && trim(prcpnm2) != "" && trim(prcpvol) != ""){
  99. model.makeValue(savePath + "["+ cnt + i +"]/stmtspec", "혈당 검사 결과 " + recrslt + "mg/dl 측정되어 " + prcpnm2 + " " + prcpvol + "u주사 투여함." );
  100. }else if (recrslt != '-' && (trim(prcpnm2) == "" && trim(prcpvol) == "")){
  101. model.makeValue(savePath + "["+ cnt + i +"]/stmtspec", "혈당 검사 결과 " + recrslt + "mg/dl 측정됨." );
  102. }else if (recrslt == '-' && trim(prcpnm2) != "" && trim(prcpvol) != ""){
  103. model.makeValue(savePath + "["+ cnt + i +"]/stmtspec", prcpnm2 + " " + prcpvol + "u주사 투여함." );
  104. }
  105. model.makeValue(savePath + "[" + cnt + i + "]/status" , "I");
  106. model.makeValue(savePath + "[" + cnt + i + "]/attrinfo" , "");
  107. model.makeValue(savePath + "[" + cnt + i + "]/origincd" , "00000841");
  108. model.makeValue(savePath + "[" + cnt + i + "]/stmtcd" , "--------");
  109. model.makeValue(savePath + "[" + cnt + i + "]/dnarflag" , "3A");
  110. model.makeValue(savePath + "[" + cnt + i + "]/recoriginflag", "T");
  111. model.makeValue(savePath + "[" + cnt + i + "]/recdtflag" , "A");
  112. model.makeValue(savePath + "[" + cnt + i + "]/recdt" , recdd + rectm);
  113. model.makeValue(savePath + "[" + cnt + i + "]/pid" , pid);
  114. model.makeValue(savePath + "[" + cnt + i + "]/indd" , indd);
  115. model.makeValue(savePath + "[" + cnt + i + "]/cretno" , cretno);
  116. model.makeValue(savePath + "[" + cnt + i + "]/instcd" , getUserInfo("dutplceinstcd"));
  117. model.makeValue(savePath + "[" + cnt + i + "]/ioflag" , ordtype);
  118. model.makeValue(savePath + "[" + cnt + i + "]/orddeptcd" , orddeptcd);
  119. model.makeValue(savePath + "[" + cnt + i + "]/recflag" , "B");
  120. model.makeValue(savePath + "[" + cnt + i + "]/reclnkkey" , pid+","+(orddd == "-" ? indd : orddd )+","+cretno+","+getUserInfo("dutplceinstcd")+",B,015");
  121. model.makeValue(savePath + "[" + cnt + i + "]/diagstmtcd" , "");
  122. model.makeValue(savePath + "[" + cnt + i + "]/orddd" , "-");
  123. model.makeValue(savePath + "[" + cnt + i + "]/dnarnm" , "");
  124. model.makeValue(savePath + "[" + cnt + i + "]/usernm" , getUserInfo("usernm"));
  125. model.makeValue(savePath + "[" + cnt + i + "]/deptflagnm" , "[혈당]");
  126. }
  127. for (var i = 1; i <= getNodesetCount("/root/main/recinfo/reclist"); i++) {
  128. recrslt = model.getValue(recPath + "[" + i + "]/recrslt");
  129. prcpvol = model.getValue(recPath + "[" + i + "]/prcpvol");
  130. recdd = model.getValue(recPath + "[" + i + "]/recdd");
  131. rectm = model.getValue(recPath + "[" + i + "]/rectm");
  132. prcpnm2= model.getValue(recPath + "[" + i + "]/prcpnm2");
  133. model.makeNode(savePath2 + "["+ i +"]");
  134. if(recrslt != '-' && trim(prcpnm2) != "" && trim(prcpvol) != ""){
  135. model.makeValue(savePath2 + "["+ i +"]/stmtspec", "혈당 검사 결과 " + recrslt + "mg/dl 측정되어 " + prcpnm2 + " " + prcpvol + "u주사 투여함." );
  136. }else if (recrslt != '-' && (trim(prcpnm2) == "" && trim(prcpvol) == "")){
  137. model.makeValue(savePath2 + "["+ i +"]/stmtspec", "혈당 검사 결과 " + recrslt + "mg/dl 측정됨." );
  138. }else if (recrslt == '-' && trim(prcpnm2) != "" && trim(prcpvol) != ""){
  139. model.makeValue(savePath2 + "["+ i +"]/stmtspec", prcpnm2 + " " + prcpvol + "u주사 투여함." );
  140. }
  141. model.makeValue(savePath2 + "[" + i + "]/status" , "I");
  142. model.makeValue(savePath2 + "[" + i + "]/attrinfo" , "");
  143. model.makeValue(savePath2 + "[" + i + "]/origincd" , "00005858");
  144. model.makeValue(savePath2 + "[" + i + "]/stmtcd" , "--------");
  145. model.makeValue(savePath2 + "[" + i + "]/dnarflag" , "3A");
  146. model.makeValue(savePath2 + "[" + i + "]/recoriginflag", "T");
  147. model.makeValue(savePath2 + "[" + i + "]/recdtflag" , "U");
  148. model.makeValue(savePath2 + "[" + i + "]/recdt" , recdd + rectm);
  149. model.makeValue(savePath2 + "[" + i + "]/pid" , pid);
  150. model.makeValue(savePath2 + "[" + i + "]/indd" , indd);
  151. model.makeValue(savePath2 + "[" + i + "]/cretno" , cretno);
  152. model.makeValue(savePath2 + "[" + i + "]/instcd" , getUserInfo("dutplceinstcd"));
  153. model.makeValue(savePath2 + "[" + i + "]/ioflag" , ordtype);
  154. model.makeValue(savePath2 + "[" + i + "]/orddeptcd" , orddeptcd);
  155. model.makeValue(savePath2 + "[" + i + "]/recflag" , "B");
  156. model.makeValue(savePath2 + "[" + i + "]/reclnkkey" , pid+","+(orddd == "-" ? indd : orddd )+","+cretno+","+getUserInfo("dutplceinstcd")+",B,015");
  157. model.makeValue(savePath2 + "[" + i + "]/diagstmtcd" , "");
  158. model.makeValue(savePath2 + "[" + i + "]/orddd" , "-");
  159. model.makeValue(savePath2 + "[" + i + "]/dnarnm" , "");
  160. model.makeValue(savePath2 + "[" + i + "]/usernm" , getUserInfo("usernm"));
  161. model.makeValue(savePath2 + "[" + i + "]/deptflagnm" , "[혈당]");
  162. }
  163. var node = instance1.selectNodes(savePath2);
  164. var csv = getNodeListCSV(node);
  165. Sign.certchkflag = "N";
  166. if(Sign.signprocess() ){
  167. opener.javascript.setParameter("nodeinfo", csv);
  168. opener.javascript.setParameter("signbfcnts", Sign.signedInfos[1]);
  169. opener.javascript.setParameter("signaftcnts", Sign.signedInfos[2]);
  170. window.close();
  171. }
  172. ]]>
  173. </script>
  174. </model>
  175. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  176. <script type="javascript" src="../../../emr/carecomweb/js/ENRSignEngine.js"/>
  177. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  178. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  179. <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
  180. <script type="javascript">
  181. <![CDATA[
  182. function fMake_SignData() {
  183. Sign.addnode("/root/main/signSaveData");
  184. }
  185. ]]>
  186. </script>
  187. </xhtml:head>
  188. <xhtml:body pagewidth="0" pageheight="0" style="border-color:#c7a3cf; "/>
  189. </xhtml:html>