SAMPL03100_임포트샘플.xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  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. <send>
  10. <ptno/>
  11. <dtbe/>
  12. <dten/>
  13. <iemr>
  14. <pid/>
  15. <orddeptcd/>
  16. <indd/>
  17. <docucd/>
  18. <ioflag/>
  19. </iemr>
  20. </send>
  21. <main>
  22. <patientinfo>
  23. <ptjn/>
  24. <ptsx/>
  25. <ptnm/>
  26. </patientinfo>
  27. <treatinfo>
  28. <oyrae>
  29. <clcd/>
  30. <clnm/>
  31. <indt/>
  32. <urcd/>
  33. <trty/>
  34. <pgto/>
  35. <datachojin/>
  36. </oyrae>
  37. <ibwon>
  38. <clcd/>
  39. <clnm/>
  40. <indt/>
  41. <fmcd/>
  42. <fmnm/>
  43. <trty/>
  44. <pgto/>
  45. </ibwon>
  46. <form>
  47. <clcd/>
  48. <clnm/>
  49. <indt/>
  50. <fmcd/>
  51. <fmnm/>
  52. <trty/>
  53. <pgto/>
  54. </form>
  55. </treatinfo>
  56. </main>
  57. </root>
  58. </instance>
  59. <script type="javascript" ev:event="xforms-ready">
  60. <![CDATA[
  61. var today = new Date();
  62. //var prevm = new Date(today - (1000 * 60 * 60 * 24 * 90)); // today의 90일전
  63. //model.setValue("/root/send/dtbe", convDate2String(prevm));
  64. model.setValue("/root/send/dten", convDate2String(today));
  65. model.refresh();
  66. model.setFocus("inputPtno");
  67. ]]>
  68. </script>
  69. <submission id="TRMPL03101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/patientinfo"/>
  70. <submission id="TRMPL03102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/treatinfo/oyrae"/>
  71. <submission id="TRMPL03103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/treatinfo/ibwon"/>
  72. <submission id="TRMPL03104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/treatinfo/form"/>
  73. </model>
  74. <script type="javascript">
  75. <![CDATA[
  76. // 입력한 Date 날짜를 String YYYYMMDD 로 반환한다.
  77. function convDate2String(value)
  78. {
  79. var year = value.getYear();
  80. var month = value.getMonth() + 1;
  81. var day = value.getDate();
  82. return "" + year +
  83. ((("" + month).length == 1) ? "0" + month : month) +
  84. ((("" + day).length == 1) ? "0" + day : day);
  85. }
  86. ]]>
  87. </script>
  88. <script type="javascript">
  89. <![CDATA[
  90. // tree를 구성한다.
  91. function makeTreeNode(label, value, depth, count)
  92. {
  93. model.makeNode("/root/main/item[" + count + "]/label");
  94. model.makeNode("/root/main/item[" + count + "]/value");
  95. model.makeNode("/root/main/item[" + count + "]/depth");
  96. model.setValue("/root/main/item[" + count + "]/label", label);
  97. model.setValue("/root/main/item[" + count + "]/value", value);
  98. model.setValue("/root/main/item[" + count + "]/depth", depth);
  99. }
  100. ]]>
  101. </script>
  102. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  103. </xhtml:head>
  104. <xhtml:body>
  105. <line id="line1" class="line_1" style="x1:0px; y1:25px; x2:1165px; y2:25px; "/>
  106. <line id="line2" class="line_2" style="x1:0px; y1:52px; x2:209px; y2:52px; "/>
  107. <line id="line3" class="line_2" style="x1:0px; y1:77px; x2:209px; y2:77px; "/>
  108. <line id="line4" class="line_2" style="x1:0px; y1:102px; x2:209px; y2:102px; "/>
  109. <line id="line5" class="line_3" style="x1:0px; y1:128px; x2:213px; y2:128px; "/>
  110. <caption id="caption1" class="tit_2" style="left:5px; top:10px; width:160px; height:13px; ">CMR_BitnixViewer_M</caption>
  111. <caption id="caption2" class="cell_1" style="left:0px; top:30px; width:103px; height:23px; text-align:right; vertical-align:middle; ">환자번호</caption>
  112. <caption id="caption3" class="cell_1" style="left:0px; top:55px; width:103px; height:23px; text-align:right; vertical-align:middle; ">이름</caption>
  113. <caption id="caption4" class="cell_1" style="left:0px; top:80px; width:103px; height:23px; text-align:right; vertical-align:middle; ">주민번호</caption>
  114. <caption id="caption5" class="cell_1" style="left:0px; top:105px; width:103px; height:23px; text-align:right; vertical-align:middle; ">성별</caption>
  115. <input id="inputPtno" ref="/root/send/ptno" class="input_s_essential" maxlength="10" inputMode="number" style="left:106px; top:31px; width:105px; height:19px; text-align:center; vertical-align:middle; ">
  116. <script type="javascript" ev:event="onkeypress">
  117. <![CDATA[
  118. if (event.keyCode == 13){
  119. model.setValue("root/send/ptno", inputPtno.currentText);
  120. // 정보를 초기화 한다.
  121. model.resetInstanceNode("/root/main/oyrae");
  122. model.resetInstanceNode("/root/main/ibwon");
  123. model.resetInstanceNode("/root/main/form");
  124. // 환자정보를 얻는다.
  125. submit("TRMPL03101");
  126. // 환자의 외래 내원력 정보를 얻는다.
  127. submit("TRMPL03102");
  128. // 환자의 입원 내원력 정보를 얻는다.
  129. submit("TRMPL03103");
  130. // 환자의 서식별 내원력 정보를 얻는다.
  131. submit("TRMPL03104");
  132. }
  133. ]]>
  134. </script>
  135. </input>
  136. <output id="outputPtnm" ref="/root/main/patientinfo/ptnm" style="left:106px; top:56px; width:105px; height:19px; text-align:center; vertical-align:middle; "/>
  137. <output id="outputPtjn" ref="/root/main/patientinfo/ptjn" style="left:106px; top:81px; width:105px; height:19px; text-align:center; vertical-align:middle; "/>
  138. <output id="outputPtsx" ref="/root/main/patientinfo/ptsx" style="left:106px; top:106px; width:105px; height:19px; text-align:center; vertical-align:middle; "/>
  139. <button id="button1" class="btn_sw" group="grpSearchMode" style="left:0px; top:209px; width:48px; height:22px; font-size:9pt; ">
  140. <caption>외래</caption>
  141. <toggle case="swSearchMode_case1" ev:event="onclick"/>
  142. <script type="javascript" ev:event="DOMActivate">
  143. <![CDATA[
  144. model.toggle("swSearchMode_case1");
  145. model.resetInstanceNode("/root/main/item");
  146. var srccount = 1;
  147. var destcount = 1;
  148. var tempindt = "";
  149. var tempclnm = "";
  150. var indt = "";
  151. while(model.getValue("/root/main/treatinfo/oyrae[" + srccount + "]/clnm") != null && model.getValue("/root/main/treatinfo/oyrae[" + srccount + "]/clnm") != ""){
  152. if (model.getValue("/root/main/treatinfo/oyrae[" + srccount + "]/clnm") != tempclnm){
  153. makeTreeNode(model.getValue("/root/main/treatinfo/oyrae[" + srccount + "]/clnm"), 0, 1, destcount);
  154. destcount++;
  155. tempindt = "";
  156. }
  157. if (model.getValue("/root/main/treatinfo/oyrae[" + srccount + "]/indt") != tempindt){
  158. indt = model.getValue("/root/main/treatinfo/oyrae[" + srccount + "]/indt");
  159. indt = indt.substr(0, 4) + "년" + indt.substr(4, 2) + "월" + indt.substr(6, 2) + "일" + " (" + model.getValue("/root/main/treatinfo/oyrae[" + srccount + "]/pgto") + ")";
  160. makeTreeNode(indt, srccount, 2, destcount);
  161. // makeTreeNode(model.getValue("/root/main/treatinfo/oyrae[" + srccount + "]/indt"), srccount, 2, destcount);
  162. destcount++;
  163. }
  164. tempindt = model.getValue("/root/main/treatinfo/oyrae[" + srccount + "]/clnm");
  165. tempclnm = model.getValue("/root/main/treatinfo/oyrae[" + srccount + "]/indt");
  166. srccount++;
  167. }
  168. treeviewOyRae.refresh();
  169. ]]>
  170. </script>
  171. </button>
  172. <button id="button2" class="btn_sw" group="grpSearchMode" style="left:48px; top:209px; width:48px; height:22px; font-size:9pt; ">
  173. <caption>입원</caption>
  174. <toggle case="swSearchMode_case2" ev:event="onclick"/>
  175. <script type="javascript" ev:event="DOMActivate">
  176. <![CDATA[
  177. model.toggle("swSearchMode_case2");
  178. model.resetInstanceNode("/root/main/item");
  179. var srccount = 1;
  180. var destcount = 1;
  181. var tempindt = "";
  182. var tempclnm = "";
  183. var tempfmnm = "";
  184. var indt = "";
  185. var fmnm = "";
  186. while(model.getValue("/root/main/treatinfo/ibwon[" + srccount + "]/indt") != null && model.getValue("/root/main/treatinfo/ibwon[" + srccount + "]/indt") != ""){
  187. if (model.getValue("/root/main/treatinfo/ibwon[" + srccount + "]/indt") != tempindt){
  188. indt = model.getValue("/root/main/treatinfo/ibwon[" + srccount + "]/indt");
  189. indt = indt.substr(0, 4) + "년" + indt.substr(4, 2) + "월" + indt.substr(6, 2) + "일"
  190. makeTreeNode(indt, 0, 1, destcount);
  191. // makeTreeNode(model.getValue("/root/main/treatinfo/ibwon[" + srccount + "]/indt"), 0, 1, destcount);
  192. destcount++;
  193. tempclnm = "";
  194. tempfmnm = "";
  195. }
  196. if (model.getValue("/root/main/treatinfo/ibwon[" + srccount + "]/clnm") != tempclnm){
  197. makeTreeNode(model.getValue("/root/main/treatinfo/ibwon[" + srccount + "]/clnm"), 0, 2, destcount);
  198. destcount++;
  199. tempfmnm = "";
  200. }
  201. if (model.getValue("/root/main/treatinfo/ibwon[" + srccount + "]/fmnm") != tempfmnm){
  202. makeTreeNode(model.getValue("/root/main/treatinfo/ibwon[" + srccount + "]/fmnm") + " (" + model.getValue("/root/main/treatinfo/ibwon[" + srccount + "]/pgto") + ")", srccount, 3, destcount);
  203. destcount++;
  204. }
  205. tempindt = model.getValue("/root/main/treatinfo/ibwon[" + srccount + "]/indt");
  206. tempclnm = model.getValue("/root/main/treatinfo/ibwon[" + srccount + "]/clnm");
  207. tempfmnm = model.getValue("/root/main/treatinfo/ibwon[" + srccount + "]/fmnm");
  208. srccount++;
  209. }
  210. treeviewIbWon.refresh();
  211. ]]>
  212. </script>
  213. </button>
  214. <button id="button3" class="btn_sw" group="grpSearchMode" style="left:96px; top:209px; width:48px; height:22px; ">
  215. <caption>서식별</caption>
  216. <toggle case="swSearchMode_case3" ev:event="onclick"/>
  217. <script type="javascript" ev:event="DOMActivate">
  218. <![CDATA[
  219. model.toggle("swSearchMode_case3");
  220. var srccount = 1;
  221. var destcount = 1;
  222. var tempindt = "";
  223. var tempclnm = "";
  224. var tempfmnm = "";
  225. var indt = "";
  226. model.resetInstanceNode("/root/main/item");
  227. while(model.getValue("/root/main/treatinfo/form[" + srccount + "]/fmnm") != null && model.getValue("/root/main/treatinfo/form[" + srccount + "]/fmnm") != ""){
  228. if (model.getValue("/root/main/treatinfo/form[" + srccount + "]/fmnm") != tempfmnm){
  229. makeTreeNode(model.getValue("/root/main/treatinfo/form[" + srccount + "]/fmnm"), 0, 1, destcount);
  230. destcount++;
  231. tempclnm = "";
  232. }
  233. if (model.getValue("/root/main/treatinfo/form[" + srccount + "]/indt") != tempclnm){
  234. indt = model.getValue("/root/main/treatinfo/form[" + srccount + "]/indt");
  235. indt = indt.substr(0, 4) + "년" + indt.substr(4, 2) + "월" + indt.substr(6, 2) + "일" + " (" + model.getValue("/root/main/treatinfo/form[" + srccount + "]/pgto") + ")";
  236. makeTreeNode(indt, srccount, 2, destcount);
  237. // makeTreeNode(model.getValue("/root/main/treatinfo/form[" + srccount + "]/indt"), srccount, 2, destcount);
  238. destcount++;
  239. }
  240. tempindt = model.getValue("/root/main/treatinfo/form[" + srccount + "]/indt");
  241. tempfmnm = model.getValue("/root/main/treatinfo/form[" + srccount + "]/fmnm");
  242. srccount++;
  243. }
  244. treeviewForm.refresh();
  245. ]]>
  246. </script>
  247. </button>
  248. <switch id="switch1" style="left:0px; top:230px; width:210px; height:500px; ">
  249. <case id="swSearchMode_case1" selected="true" style="left:0px; top:0px; width:208px; height:500px; ">
  250. <treeview id="treeviewOyRae" itemsettype="depth" depth="10" style="left:0px; top:0px; width:210px; height:480px; border-style:none; ">
  251. <itemset nodeset="/root/main/item">
  252. <label ref="label"/>
  253. <value ref="value"/>
  254. <depth ref="depth"/>
  255. </itemset>
  256. <script type="javascript" ev:event="onclick">
  257. <![CDATA[
  258. if (treeviewOyRae.value != 0){
  259. // var formTreeNode = instance1.selectSingleNode("/root/main/treatinfo/form[" + treeviewForm.value + "]").cloneNode(true);
  260. // var formSendNode = instance1.selectSingleNode("/root/send").cloneNode(true);
  261. // var sTemp = formSendNode;
  262. // model.duplicate(sTemp, formTreeNode);
  263. model.resetInstanceNode("/root/send/iemr");
  264. model.setValue("/root/send/iemr/pid", model.getValue("/root/send/ptno"));
  265. model.setValue("/root/send/iemr/orddeptcd", model.getValue("/root/main/treatinfo/oyrae[" + treeviewOyRae.value + "]/clcd"));
  266. model.setValue("/root/send/iemr/indd", model.getValue("/root/main/treatinfo/oyrae[" + treeviewOyRae.value + "]/indt"));
  267. // model.setValue("/root/send/iemr/fmcd", model.getValue("/root/main/treatinfo/oyrae[" + treeviewOyRae.value + "]/fmcd"));
  268. model.setValue("/root/send/iemr/ioflag", model.getValue("/root/main/treatinfo/oyrae[" + treeviewOyRae.value + "]/trty"));
  269. var iemrNode = instance1.selectSingleNode("/root/send/iemr").cloneNode(true);
  270. searchChart(iemrNode);
  271. downloadChart();
  272. setupChart("ChartView");
  273. }
  274. ]]>
  275. </script>
  276. </treeview>
  277. </case>
  278. <case id="swSearchMode_case2" style="left:0px; top:0px; width:208px; height:500px; ">
  279. <treeview id="treeviewIbWon" itemsettype="depth" depth="10" style="left:0px; top:0px; width:210px; height:480px; border-style:none; ">
  280. <itemset nodeset="/root/main/item">
  281. <label ref="label"/>
  282. <value ref="value"/>
  283. <depth ref="depth"/>
  284. </itemset>
  285. <script type="javascript" ev:event="onclick">
  286. <![CDATA[
  287. alert("1");
  288. alert(treeviewIbWon.value);
  289. if (treeviewIbWon.value != 0){
  290. // var ibwonTreeNode = instance1.selectSingleNode("/root/main/treatinfo/ibwon[" + treeviewIbWon.value + "]").cloneNode(true);
  291. // var ibwonSendNode = instance1.selectSingleNode("/root/send").cloneNode(true);
  292. // var iemrNode = ibwonSendNode;
  293. // model.duplicate(iemrNode, ibwonTreeNode);
  294. alert("1");
  295. model.resetInstanceNode("/root/send/iemr");
  296. model.setValue("/root/send/iemr/pid", model.getValue("/root/send/ptno"));
  297. model.setValue("/root/send/iemr/orddeptcd", model.getValue("/root/main/treatinfo/ibwon[" + treeviewIbWon.value + "]/clcd"));
  298. model.setValue("/root/send/iemr/indd", model.getValue("/root/main/treatinfo/ibwon[" + treeviewIbWon.value + "]/indt"));
  299. model.setValue("/root/send/iemr/docucd", model.getValue("/root/main/treatinfo/ibwon[" + treeviewIbWon.value + "]/fmcd"));
  300. model.setValue("/root/send/iemr/ioflag", model.getValue("/root/main/treatinfo/ibwon[" + treeviewIbWon.value + "]/trty"));
  301. var iemrNode = instance1.selectSingleNode("/root/send/iemr").cloneNode(true);
  302. alert("1");
  303. searchChart(iemrNode);
  304. downloadChart();
  305. setupChart("ChartView");
  306. }
  307. ]]>
  308. </script>
  309. </treeview>
  310. </case>
  311. <case id="swSearchMode_case3" style="left:0px; top:0px; width:208px; height:500px; ">
  312. <treeview id="treeviewForm" itemsettype="depth" depth="10" style="left:0px; top:0px; width:210px; height:480px; vertical-align:middle; border-style:none; ">
  313. <itemset nodeset="/root/main/item">
  314. <label ref="label"/>
  315. <value ref="value"/>
  316. <depth ref="depth"/>
  317. </itemset>
  318. <script type="javascript" ev:event="onclick">
  319. <![CDATA[
  320. if (treeviewForm.value != 0){
  321. // var formTreeNode = instance1.selectSingleNode("/root/main/treatinfo/form[" + treeviewForm.value + "]").cloneNode(true);
  322. // var formSendNode = instance1.selectSingleNode("/root/send").cloneNode(true);
  323. // var sTemp = formSendNode;
  324. // model.duplicate(sTemp, formTreeNode);
  325. model.resetInstanceNode("/root/send/iemr");
  326. model.setValue("/root/send/iemr/pid", model.getValue("/root/send/ptno"));
  327. model.setValue("/root/send/iemr/orddeptcd", model.getValue("/root/main/treatinfo/form[" + treeviewForm.value + "]/clcd"));
  328. model.setValue("/root/send/iemr/indd", model.getValue("/root/main/treatinfo/form[" + treeviewForm.value + "]/indt"));
  329. model.setValue("/root/send/iemr/docucd", model.getValue("/root/main/treatinfo/form[" + treeviewForm.value + "]/fmcd"));
  330. model.setValue("/root/send/iemr/ioflag", model.getValue("/root/main/treatinfo/form[" + treeviewForm.value + "]/trty"));
  331. var iemrNode = instance1.selectSingleNode("/root/send/iemr").cloneNode(true);
  332. searchChart(iemrNode);
  333. downloadChart();
  334. setupChart("ChartView");
  335. }
  336. ]]>
  337. </script>
  338. </treeview>
  339. </case>
  340. </switch>
  341. <import id="importIemr" overflow="hidden" src="C:\CMCProject\application\webapps\emr\imgemrweb\xrw\SSMRC03100.xrw" style="left:215px; top:30px; width:720px; height:700px; "/>
  342. <line id="line6" class="line_2" style="x1:0px; y1:152px; x2:209px; y2:152px; "/>
  343. <line id="line7" class="line_2" style="x1:0px; y1:177px; x2:209px; y2:177px; "/>
  344. <line id="line8" class="line_3" style="x1:0px; y1:203px; x2:213px; y2:203px; "/>
  345. <caption id="caption8" class="cell_1" style="left:0px; top:130px; width:103px; height:23px; text-align:right; vertical-align:middle; ">조회 시작</caption>
  346. <caption id="caption6" class="cell_1" style="left:0px; top:155px; width:103px; height:23px; text-align:right; vertical-align:middle; ">조회 끝</caption>
  347. <caption id="caption7" class="cell_1" style="left:0px; top:180px; width:103px; height:23px; text-align:right; vertical-align:middle; ">초진일자</caption>
  348. <input id="inputDateBegin" ref="/root/send/dtbe" class="input_default" style="left:106px; top:132px; width:105px; height:19px; vertical-align:middle; "/>
  349. <input id="inputDateEnd" ref="/root/send/dten" class="input_default" style="left:106px; top:157px; width:105px; height:19px; vertical-align:middle; "/>
  350. <output id="outputDateChoJin" ref="/root/main/treatinfo/oyrae/datachojin" style="left:106px; top:182px; width:105px; height:19px; vertical-align:middle; "/>
  351. <button id="btnPrint" style="left:215px; top:3px; width:65px; height:20px; text-align:center; vertical-align:middle; background-color:#cce8ff; ">
  352. <script type="javascript" ev:event="DOMActivate">
  353. <![CDATA[
  354. printChart(objThumbView.ShowIndex);
  355. ]]>
  356. </script>
  357. <caption>차트 출력</caption>
  358. </button>
  359. </xhtml:body>
  360. </xhtml:html>