SPABO60400_전화상담.xrw 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  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>환자상담일지</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <hsctinfo>
  11. <patinfolist>
  12. <hngnm/>
  13. <rrgstno1/>
  14. <age/>
  15. <sex/>
  16. <pid/>
  17. <rrgstno2/>
  18. </patinfolist>
  19. </hsctinfo>
  20. <patinfo>
  21. <patinfolist>
  22. <pid/>
  23. <hngnm/>
  24. <rrgstno1/>
  25. <age/>
  26. <sex/>
  27. <pid/>
  28. <rrgstno2/>
  29. </patinfolist>
  30. </patinfo>
  31. <trnptdg/>
  32. <tellinfolist>
  33. <item>
  34. <cnstdd/>
  35. <cnstflag/>
  36. <qestcnts/>
  37. <answcnts/>
  38. <cnstseqno/>
  39. <instcd/>
  40. <cnstnm/>
  41. <pid/>
  42. </item>
  43. </tellinfolist>
  44. <rtn>
  45. <count/>
  46. </rtn>
  47. <popupendflag/>
  48. <tellcnstcnts>
  49. <cnstdd/>
  50. <cnstflag/>
  51. <qestcnts/>
  52. <answcnts/>
  53. </tellcnstcnts>
  54. </main>
  55. <send>
  56. <data>
  57. <reqcnstlist>
  58. <pid/>
  59. </reqcnstlist>
  60. <tellinfo>
  61. <cnstdd/>
  62. <cnstflag/>
  63. <qestcnts/>
  64. <answcnts/>
  65. <instcd/>
  66. <cnstseqno/>
  67. <pid/>
  68. <flag/>
  69. </tellinfo>
  70. </data>
  71. </send>
  72. <init>
  73. <cnstflagnm>
  74. </cnstflagnm>
  75. </init>
  76. <hidden/>
  77. <temp>
  78. <bmtpatientinfo/>
  79. <tempcodeinfo/>
  80. <tempcodeinfo2/>
  81. </temp>
  82. </root>
  83. </instance>
  84. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  85. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  86. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  87. <script type="javascript" src="../js/AEA0001.js"/>
  88. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  89. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  90. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  91. <script type="javascript" src="../../../ast/hsctweb/js/bmtcommon.js"/>
  92. <submission id="TRABO00001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data/reqcnstlist/pid" replace="instance" resultref="/root/main/hsctinfo"/>
  93. <submission id="TRABO60501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data/reqcnstlist" resultref="/root/main/patinfo"/>
  94. <submission id="TRABO60502" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data/reqcnstlist" resultref="/root/init/cmbinfo/trnptdginfo"/>
  95. <submission id="TRABO60401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data/reqcnstlist" replace="instance" resultref="/root/main/tellinfolist"/>
  96. <submission id="TRABO02103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/temp/tempcodeinfo"/>
  97. <script type="javascript" ev:event="xforms-ready">
  98. <![CDATA[
  99. //zbcfGetCodeList( new Array("A0548"), new Array("/root/init/cnstflagnm")); //상담내역 콤보 공통코드
  100. //BMT 코드성 데이터 조회.(기존의 공통코드로 사용했던것들을 BMT에서 관리하도록 수정 후)
  101. aboGetCodeList(new Array("A0548"), new Array("/root/init/cmbinfo/cnstflagnm"));
  102. // ipt_cnstdd.value =getCurrentDate();
  103. model.setValue("/root/main/tellcnstcnts/cnstdd", getCurrentDate());
  104. model.setFocus("ipt_pid");
  105. if ( checkOpener()) {
  106. var param = opener.javascript.getParameter("opener_parameter_id");
  107. if(param != "") // opener parameter value가 있는 경우
  108. {
  109. //parameter value를 이용하여 프로그램 수행
  110. condarray = param.split("▦");
  111. model.setValue("/root/main/hsctinfo/patinfolist/pid", condarray[0]);
  112. btn_sea.dispatch("DOMActivate");
  113. return;
  114. }
  115. }
  116. // Opener에서 받은 파라미터가 없으면 Top 정보를 참조한다.
  117. var paminfo = getGlobalVariable("paminfo"); //프로그램에 따라 원무정보(paminfo), 환자기본정보(patflag) get
  118. if ( paminfo != "" ) {
  119. model.removeNodeset("/root/temp/paminfo"); //여러개의 instance발생을 막기 위해 removeNodeset을 해줘야 함.
  120. model.makeNode("/root/temp/paminfo");
  121. setCSVToNode("/root/paminfo", paminfo);
  122. //상단 정보를 이용하여 프로그램 수행
  123. var pid = model.getValue("/root/temp/paminfo" + "/list/pid");
  124. model.setValue("/root/main/hsctinfo/patinfolist/pid", pid);
  125. } else { //top의 정보
  126. var paminfo = getGlobalVariable("paminfo");
  127. if ( paminfo != "" ) {
  128. setCSVToNode("/root/paminfo", paminfo);
  129. model.setValue("/root/main/hsctinfo/patinfolist/pid", model.getValue("/root/paminfo/list/pid"));
  130. return;
  131. }
  132. }
  133. //세션에 저장된 PID정보를 가져옴.
  134. var gv_pid = getGlobalVariable("gv_pid", "A");
  135. if(gv_pid != "") {
  136. model.setValue("/root/main/hsctinfo/patinfolist/pid", gv_pid);
  137. btn_sea.dispatch("DOMActivate");
  138. }
  139. model.setValue("/root/send/data/reqcnstlist/pid",model.getValue( "/root/main/hsctinfo/patinfolist/pid"));
  140. submit("TRABO00001")
  141. //타부서에서는 버튼 비활성화
  142. btn_save.disabled = !checkAuth("X");
  143. btn_del.disabled = !checkAuth("X");
  144. model.refresh();
  145. ]]>
  146. </script>
  147. <script type="javascript">
  148. <![CDATA[
  149. /* @group : 전화상담
  150. * @ver : 2008.07.28
  151. * @by : 김은지
  152. * @type : function
  153. * @access : public
  154. * @desc : 환자의 전화상담 내역을 조회
  155. * @param :
  156. */
  157. function fGetTellCnstlist(){
  158. model.resetInstanceNode("root/main/tellcnstcnts")
  159. model.resetInstanceNode("root/main/tellinfolist")
  160. model.setValue("/root/main/tellcnstcnts/cnstdd", getCurrentDate());
  161. model.refresh();
  162. if(model.getValue("/root/main/hsctinfo/patinfolist/pid") ==""){
  163. return;
  164. }
  165. submit("TRABO60401");
  166. }
  167. /* @group : 전화상담
  168. * @ver : 2008.07.28
  169. * @by : 김은지
  170. * @type : function
  171. * @access : public
  172. * @desc :
  173. * @param : 엔터키를 눌렀을 때 환자 조회가 되도록 함.
  174. */
  175. function fKeyEvent(){
  176. model.makeValue("/root/main/hsctinfo/patinfolist/pid", ipt_pid.currentText);
  177. if(event.keyCode == "13" ){
  178. btn_sea.dispatch("DOMActivate");
  179. }
  180. }
  181. /* @group : 전화상담
  182. * @ver : 2008.07.28
  183. * @by : 김은지
  184. * @type : function
  185. * @access : public
  186. * @desc :
  187. * @param : 그리드를 클릭하면 해당 내역의 전화 상담 내용을 보여준다
  188. */
  189. function fTellCnstCnts(){
  190. //선택한 row의 데이터를 복사
  191. model.setValue("/root/main/tellcnstcnts/qestcnts" ,model.getValue("/root/main/tellinfolist/item["+grd_tellinfolist.row+"]/qestcnts"));
  192. model.setValue("/root/main/tellcnstcnts/answcnts" ,model.getValue("/root/main/tellinfolist/item["+grd_tellinfolist.row+"]/answcnts"));
  193. model.setValue("/root/main/tellcnstcnts/cnstdd" ,model.getValue("/root/main/tellinfolist/item["+grd_tellinfolist.row+"]/cnstdd"));
  194. model.setValue("/root/main/tellcnstcnts/cnstflag" ,model.getValue("/root/main/tellinfolist/item["+grd_tellinfolist.row+"]/cnstflag"));
  195. //바뀐 값들을 컨트롤에 반영
  196. ipt_cnstdd.refresh();
  197. cmb_cnstflag.value = model.getValue("/root/main/tellcnstcnts/cnstflag");
  198. tar_qestcnts.refresh();
  199. tar_answcnts.refresh();
  200. }
  201. /* @group : 전화상담
  202. * @ver : 2008.07.28
  203. * @by : 김은지
  204. * @type : function
  205. * @access : public
  206. * @desc :
  207. * @param : 전화 상담 내용을 저장 또는 수정한다.
  208. */
  209. function fSaveData(){
  210. model.setValue("/root/send/data/tellinfo/cnstdd" ,model.getValue("/root/main/tellcnstcnts/cnstdd") );
  211. model.setValue("/root/send/data/tellinfo/cnstflag" ,model.getValue("/root/main/tellcnstcnts/cnstflag") );
  212. model.setValue("/root/send/data/tellinfo/qestcnts" ,model.getValue("/root/main/tellcnstcnts/qestcnts") );
  213. model.setValue("/root/send/data/tellinfo/answcnts" ,model.getValue("/root/main/tellcnstcnts/answcnts") );
  214. model.setValue("/root/send/data/tellinfo/instcd" ,model.getValue("/root/main/tellinfolist/item["+grd_tellinfolist.row+"]/instcd"));
  215. //cnstseqno가 존재하지 않으면 데이터 삽입
  216. if(model.getValue("/root/main/tellinfolist/item["+grd_tellinfolist.row+"]/cnstseqno") == "") {
  217. model.setValue("/root/send/data/tellinfo/pid" ,model.getValue("/root/main/hsctinfo/patinfolist/pid"));
  218. model.setValue("/root/send/data/tellinfo/flag" ,"I");
  219. }else if(model.getValue("/root/main/tellinfolist/item["+grd_tellinfolist.row+"]/cnstdd") != model.getValue("/root/main/tellcnstcnts/cnstdd")){
  220. model.setValue("/root/send/data/tellinfo/pid" ,model.getValue("/root/main/hsctinfo/patinfolist/pid"));
  221. model.setValue("/root/send/data/tellinfo/flag" ,"I");
  222. }else{
  223. //존재하면 수정
  224. model.setValue("/root/send/data/tellinfo/flag" , "U");
  225. model.setValue("/root/send/data/tellinfo/pid" ,model.getValue("/root/main/tellinfolist/item["+grd_tellinfolist.row+"]/pid"));
  226. model.setValue("/root/send/data/tellinfo/cnstseqno" ,model.getValue("/root/main/tellinfolist/item["+grd_tellinfolist.row+"]/cnstseqno"));
  227. }
  228. if( messageBox("상담 내용을 " , "Q002" ) == 6 ){
  229. submit("TXABO60401");
  230. model.resetInstanceNode("/root/main/tellcnstcmts");
  231. fGetTellCnstlist();
  232. }
  233. }
  234. /* @group : 전화상담
  235. * @ver : 2008.07.28
  236. * @by : 김은지
  237. * @type : function
  238. * @access : public
  239. * @desc :
  240. * @param : 전화 상담 내용을 삭제한다.
  241. */
  242. function fDelCnstCnts(){
  243. if( messageBox("상담 내용을" , "Q001" ) == 6 ){
  244. model.setValue("/root/send/data/tellinfo/flag", "D");
  245. model.setValue("/root/send/data/tellinfo/cnstseqno" ,model.getValue("/root/main/tellinfolist/item["+grd_tellinfolist.row+"]/cnstseqno"));
  246. model.setValue("/root/send/data/tellinfo/cnstdd" ,model.getValue("/root/main/tellinfolist/item["+grd_tellinfolist.row+"]/cnstdd"));
  247. model.setValue("/root/send/data/tellinfo/pid" ,model.getValue("/root/main/tellinfolist/item["+grd_tellinfolist.row+"]/pid"));
  248. model.setValue("/root/send/data/tellinfo/instcd" ,model.getValue("/root/main/tellinfolist/item["+grd_tellinfolist.row+"]/instcd"));
  249. submit("TXABO60401");
  250. model.resetInstanceNode("/root/main/tellcnstcmts");
  251. fGetTellCnstlist();
  252. }
  253. }
  254. ]]>
  255. </script>
  256. <submission id="TXABO60401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data/tellinfo" replace="instance" resultref="/root/main/tellinfolist"/>
  257. </model>
  258. </xhtml:head>
  259. <xhtml:body guideline="1,1194;2,784;2,287;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  260. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  261. <caption id="cpt_19" class="tit_1" style="left:0px; top:0px; width:125px; height:13px; ">환자상담일지</caption>
  262. </group>
  263. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  264. <caption id="caption2" class="tit_2" style="left:5px; top:240px; width:115px; height:13px; font-family:돋움; vertical-align:middle; ">전화상담이력</caption>
  265. <button id="btn_excsave" class="btn2_letter4" style="left:1130px; top:235px; width:64px; height:19px; ">
  266. <caption>엑셀저장</caption>
  267. <script type="javascript" ev:event="DOMActivate">
  268. <![CDATA[
  269. var fiilenm = "전화상담_(" + model.getValue("/root/send/data/reqcnstlist/pid") + ")" + getCurrentDate();
  270. var fileName = window.fileDialog("save", ",", false, fiilenm, "xls", "Excel Files(*.xls)|*.*|All Files (*.*)|*.xls");
  271. if (fileName != "")
  272. {
  273. grd_tellinfolist.saveExcel(fileName);
  274. }
  275. ]]>
  276. </script>
  277. </button>
  278. <line id="lin_1" class="line_1" style="x1:0px; y1:255px; x2:1194px; y2:255px; "/>
  279. <datagrid id="grd_tellinfolist" nodeset="/root/main/tellinfolist/item" caption="상담일^상담내역^질문^답변^상담자" colsep="^" colwidth="100, 120, 430, 430, 80" dataheight="23" defaultrows="0" extendlastcol="scroll" focuscolor="#b9e5fb" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:0px; top:260px; width:1194px; height:480px; text-align:center; ">
  280. <col ref="cnstdd" format="yyyy-mm-dd"/>
  281. <col explorerbar="sortshow" disabled="true" ref="cnstflag" type="combo">
  282. <choices>
  283. <itemset nodeset="/root/init/cmbinfo/cnstflagnm/A0548">
  284. <label ref="cdnm"/>
  285. <value ref="cdid"/>
  286. </itemset>
  287. </choices>
  288. </col>
  289. <col ref="qestcnts"/>
  290. <col ref="answcnts"/>
  291. <col ref="cnstnm"/>
  292. <script type="javascript" ev:event="onaftersort">
  293. <![CDATA[
  294. grd_tellinfolist.gridToInstance();
  295. ]]>
  296. </script>
  297. <script type="javascript" ev:event="onclick">
  298. <![CDATA[
  299. if(grd_tellinfolist.row > 0){ //그리드의 헤더는 제외
  300. fTellCnstCnts();
  301. }
  302. ]]>
  303. </script>
  304. </datagrid>
  305. <caption id="cpt_tellcnst" class="tit_2" style="left:5px; top:55px; width:115px; height:13px; font-family:돋움; vertical-align:middle; ">전화상담</caption>
  306. <line id="lin_2" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  307. <input id="ipt_cnstdd" ref="/root/main/tellcnstcnts/cnstdd" class="input_default" inputtype="date" style="left:123px; top:76px; width:120px; height:19px; "/>
  308. <textarea id="tar_qestcnts" ref="/root/main/tellcnstcnts/qestcnts" style="left:123px; top:100px; width:470px; height:129px; "/>
  309. <line id="lin_13" class="line_2" style="x1:0px; y1:97px; x2:1194px; y2:97px; "/>
  310. <select1 id="cmb_cnstflag" ref="/root/main/tellcnstcnts/cnstflag" class="combo_search" appearance="minimal" style="left:369px; top:76px; width:200px; height:19px; ">
  311. <choices>
  312. <itemset nodeset="/root/init/cmbinfo/cnstflagnm/A0548">
  313. <label ref="cdnm"/>
  314. <value ref="cdid"/>
  315. </itemset>
  316. </choices>
  317. </select1>
  318. <textarea id="tar_answcnts" ref="/root/main/tellcnstcnts/answcnts" style="left:719px; top:100px; width:475px; height:129px; "/>
  319. <caption id="cpt_question" class="cell_1" style="left:0px; top:99px; width:120px; height:131px; vertical-align:middle; ">질문</caption>
  320. <caption id="cpt_cnstcnts" class="cell_1" style="left:246px; top:75px; width:120px; height:23px; vertical-align:middle; ">상담내역</caption>
  321. <caption id="cpt_answer" class="cell_1" style="left:596px; top:99px; width:120px; height:131px; vertical-align:middle; ">답변</caption>
  322. <caption id="cpt_cnstdd" class="cell_1" style="left:0px; top:75px; width:120px; height:23px; vertical-align:middle; ">상담일</caption>
  323. <group id="grp_sea" style="left:0px; top:35px; width:1194px; height:40px; vertical-align:top; ">
  324. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  325. <line id="lin_10" class="line_4" style="x1:1108px; y1:7px; x2:1108px; y2:29px; "/>
  326. <output id="opt_birth" ref="/root/main/hsctinfo/patinfolist/rrgstno1" class="output_search" style="left:430px; top:10px; width:100px; height:19px; "/>
  327. <output id="opt_sex" ref="/root/main/hsctinfo/patinfolist/sex" class="output_search" style="left:566px; top:10px; width:40px; height:19px; "/>
  328. <button id="btn_srchpat" class="icon_search" style="left:207px; top:10px; width:16px; height:16px; ">
  329. <caption/>
  330. <script type="javascript" ev:event="DOMActivate">
  331. <![CDATA[
  332. abofGetPamPatientSearch("/root/main/hsctinfo/patinfolist", "/root/main/patinfo/patinfolist", "P");
  333. ]]>
  334. </script>
  335. </button>
  336. <output id="opt_age" ref="/root/main/hsctinfo/patinfolist/age" class="output_search" style="left:533px; top:10px; width:30px; height:19px; "/>
  337. <caption id="cpt_patinfo" class="search_name" style="left:238px; top:10px; width:86px; height:17px; ">환자정보 :</caption>
  338. <caption id="cpt_patnm" class="search_name" style="left:15px; top:10px; width:86px; height:17px; ">환자번호 :</caption>
  339. <input id="ipt_pid" ref="/root/main/hsctinfo/patinfolist/pid" class="input_essential" editable="true" inputtype="button" maxlength="10" style="left:104px; top:10px; width:100px; height:19px; ">
  340. <script type="javascript" ev:event="onkeypress">
  341. <![CDATA[
  342. fKeyEvent();
  343. ]]>
  344. </script>
  345. <script type="javascript" ev:event="onbuttonclick">
  346. <![CDATA[
  347. if ( abofGetBmtPatientSearch("/root/main/patinfo/patinfolist", "/root/temp/bmtpatientinfo", "P") ) {
  348. model.makeNode("/root/main/hsctinfo/patinfolist");
  349. model.copyNode("/root/main/hsctinfo/patinfolist", "/root/main/patinfo/patinfolist");
  350. btn_sea.dispatch("DOMActivate");
  351. ipt_cnstdd.value =getCurrentDate();
  352. }
  353. ]]>
  354. </script>
  355. </input>
  356. <output id="opt_patnm" ref="/root/main/hsctinfo/patinfolist/hngnm" class="output_search" style="left:327px; top:10px; width:100px; height:19px; "/>
  357. <button id="btn_sea" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  358. <caption>조회</caption>
  359. <script type="javascript" ev:event="DOMActivate">
  360. <![CDATA[
  361. model.resetInstanceNode("/root/main/tellinfolist/item");
  362. model.setValue("/root/send/data/reqcnstlist/pid", model.getValue("/root/main/hsctinfo/patinfolist/pid"));
  363. submit("TRABO00001"); //환자 정보 조회
  364. fGetTellCnstlist(); //전화 상담 이력 리스트를 조회
  365. ]]>
  366. </script>
  367. </button>
  368. </group>
  369. <line id="line3" class="line_3" style="x1:0px; y1:230px; x2:1194px; y2:230px; "/>
  370. </group>
  371. <group id="grp_btn" style="left:0px; top:19px; width:1195px; height:27px; ">
  372. <button id="btn_save" class="btn4_letter2" style="left:1008px; top:5px; width:56px; height:22px; ">
  373. <caption>저장</caption>
  374. <script type="javascript" ev:event="DOMActivate">
  375. <![CDATA[
  376. fSaveData();
  377. ]]>
  378. </script>
  379. </button>
  380. <button id="btn_del" class="btn4_letter2" style="left:1067px; top:5px; width:56px; height:22px; ">
  381. <caption>삭제</caption>
  382. <script type="javascript" ev:event="onclick">
  383. <![CDATA[
  384. fDelCnstCnts();
  385. ]]>
  386. </script>
  387. </button>
  388. <button id="btn_cle" class="btn4_letter3" style="left:1126px; top:5px; width:68px; height:22px; ">
  389. <caption>초기화</caption>
  390. <script type="javascript" ev:event="onclick">
  391. <![CDATA[
  392. model.reset();
  393. ]]>
  394. </script>
  395. </button>
  396. </group>
  397. </xhtml:body>
  398. </xhtml:html>