SPMMO02700_연속검사.xrw 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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. <tootfact>
  10. <tootfactlist>
  11. <status/>
  12. <clinccmtcnts/>
  13. <unit/>
  14. </tootfactlist>
  15. </tootfact>
  16. <reset>
  17. <tootfactlist>
  18. <status/>
  19. <clinccmtcnts/>
  20. <unit/>
  21. </tootfactlist>
  22. </reset>
  23. <intvl/>
  24. <unit/>
  25. </root>
  26. </instance>
  27. <script type="javascript" ev:event="xforms-model-construct-done">
  28. <![CDATA[
  29. model.removeNodeset ( "/root/tootfact/tootfactlist" );
  30. var clinccmtcnts = opener.model.getValue ( "/root/main/prcp/prcplist/drugrateqty" ) + "^" ;
  31. var len = clinccmtcnts.split(",").length;
  32. var intvl1 = "";
  33. var unit = "";
  34. var diagtestconttestintvlflag = opener.model.getValue ( "/root/main/prcp/prcplist/diagtestconttestintvlflag" );
  35. if ( diagtestconttestintvlflag == "1" ) {
  36. unit = "분";
  37. } else if ( diagtestconttestintvlflag == "2" ) {
  38. unit = "시간";
  39. } else if ( diagtestconttestintvlflag == "3" ) {
  40. unit = "횟수";
  41. } else if ( diagtestconttestintvlflag == "4" ) {
  42. unit = "일수";
  43. }
  44. model.setValue ( "/root/reset/tootfactlist/unit", unit );
  45. model.setValue ( "/root/unit", unit );
  46. for ( var i=0; i < len; i++ ) {
  47. intvl1 = getArrayData (clinccmtcnts, 0, i, "^", "," );
  48. if ( intvl1 == "-" ) {
  49. intvl1 = "";
  50. }
  51. model.setValue ( "/root/reset/tootfactlist/clinccmtcnts", intvl1 );
  52. appendChildPrcp ( "/root/reset/tootfactlist", "/root/tootfact", "main" );
  53. }
  54. model.refresh();
  55. ]]>
  56. </script>
  57. </model>
  58. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  59. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  60. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  61. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  62. </xhtml:head>
  63. <xhtml:body pagewidth="150" pageheight="345">
  64. <datagrid id="datagrid1" nodeset="/root/tootfact/tootfactlist" caption="삭제^연속검사^연속검사" colsep="^" colwidth="30, 60, 29" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" style="left:8px; top:27px; width:135px; height:290px; ">
  65. <col checkvalue="Y,N" ref="status" type="checkbox"/>
  66. <col imemode="disabled" ref="clinccmtcnts" type="input" format="#,###" style="text-align:right; "/>
  67. <col ref="unit"/>
  68. </datagrid>
  69. <line id="line7" class="line_1" style="x1:8px; y1:22px; x2:143px; y2:22px; "/>
  70. <button id="button37" class="btn2_letter2" style="left:56px; top:0px; width:42px; height:19px; ">
  71. <caption>추가</caption>
  72. <script type="javascript" ev:event="onclick">
  73. <![CDATA[
  74. /*
  75. var intvl = model.getValue ( "/root/intvl" );
  76. if ( isNull(intvl)) {
  77. model.alert ( "연속검사 간격이 존재하지 않습니다." );
  78. return;
  79. }*/
  80. model.setValue ( "/root/reset/tootfactlist/clinccmtcnts", "" );
  81. appendChildPrcp ( "/root/reset/tootfactlist", "/root/tootfact", "main" );
  82. model.refresh();
  83. ]]>
  84. </script>
  85. </button>
  86. <button id="button1" class="btn2_letter2" style="left:101px; top:0px; width:42px; height:19px; ">
  87. <caption>삭제</caption>
  88. <script type="javascript" ev:event="onclick">
  89. <![CDATA[
  90. srcLen = model.instances(0).selectNodes( "/root/tootfact/tootfactlist" ).length;
  91. for ( var i=srcLen; i > 0; i-- ) {
  92. if ( model.getValue ( "/root/tootfact/tootfactlist[" + i + "]/status" ) == "Y") {
  93. model.removenode ( "/root/tootfact/tootfactlist[" + i + "]" );
  94. }
  95. }
  96. model.refresh();
  97. ]]>
  98. </script>
  99. </button>
  100. <button id="button2" class="btn4_letter2" style="left:28px; top:320px; width:56px; height:22px; ">
  101. <caption>확인</caption>
  102. <script type="javascript" ev:event="onclick">
  103. <![CDATA[
  104. var tootfact = "";
  105. var clinccmtcnts = "";
  106. var vclinccmtcnts = "";
  107. srcLen = model.instances(0).selectNodes( "/root/tootfact/tootfactlist" ).length;
  108. if ( srcLen == 0 ) {
  109. model.alert ( "입력된 연속검사값이 없습니다." );
  110. return;
  111. }
  112. for ( var i=1; i <= srcLen; i++ ) {
  113. vclinccmtcnts = model.getValue ( "/root/tootfact/tootfactlist[" + i+ "]/clinccmtcnts" ) ;
  114. if ( vclinccmtcnts == "" || vclinccmtcnts =="-" ) {
  115. model.alert ( "입력된 연속검사값이 없습니다." );
  116. return;
  117. }
  118. tootfact = tootfact + model.getValue ( "/root/tootfact/tootfactlist[" + i + "]/clinccmtcnts" ) + model.getValue ( "/root/unit" )+ ",";
  119. clinccmtcnts = clinccmtcnts + model.getValue ( "/root/tootfact/tootfactlist[" + i+ "]/clinccmtcnts" ) + ",";
  120. }
  121. tootfact = tootfact.substring(0, tootfact.length-1);
  122. clinccmtcnts = clinccmtcnts.substring(0, clinccmtcnts.length-1);
  123. opener.model.setValue ( "/root/main/prcp/prcplist/diagtestconttestcdspec", tootfact );
  124. opener.model.setValue ( "/root/main/prcp/prcplist/drugrateqty", clinccmtcnts );
  125. opener.model.setValue ( "/root/main/prcp/prcplist/prcptims", srcLen );
  126. opener.model.refresh();
  127. model.close();
  128. ]]>
  129. </script>
  130. </button>
  131. <button id="button3" class="btn4_letter2" style="left:87px; top:320px; width:56px; height:22px; ">
  132. <caption>취소</caption>
  133. <script type="javascript" ev:event="onclick">
  134. <![CDATA[
  135. model.close();
  136. ]]>
  137. </script>
  138. </button>
  139. <input id="input1" ref="/root/intvl" imemode="disabled" format="#,###" style="left:8px; top:0px; width:45px; height:19px; ">
  140. <script type="javascript" ev:event="onkeyup">
  141. <![CDATA[
  142. inputEnterKey ( "button4", "DOMActivate" );
  143. ]]>
  144. </script>
  145. </input>
  146. <button id="button4" visibility="hidden" style="left:10px; top:320px; width:15px; height:20px; ">
  147. <caption/>
  148. <script type="javascript" ev:event="DOMActivate">
  149. <![CDATA[
  150. var prcptims = opener.model.getValue ( "/root/main/prcp/prcplist/prcptims" );
  151. var intvl = model.getValue ( "/root/intvl" );
  152. model.removeNodeset ( "/root/tootfact/tootfactlist" );
  153. for ( var i=0; i < prcptims; i++ ) {
  154. model.setValue ( "/root/reset/tootfactlist/clinccmtcnts", intvl * i );
  155. appendChildPrcp ( "/root/reset/tootfactlist", "/root/tootfact", "main" );
  156. }
  157. model.refresh();
  158. ]]>
  159. </script>
  160. </button>
  161. </xhtml:body>
  162. </xhtml:html>