SMARH01100_HIE동의철회관리.xrw 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:my="http://www.comsquare.co.kr/example" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>HIE 동의철회관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <patientinfo/>
  11. <consenter>
  12. <name/>
  13. <relationship/>
  14. <reason/>
  15. </consenter>
  16. <cdainfo/>
  17. </main>
  18. <send>
  19. <searchpatient>
  20. <pid/>
  21. <instcd/>
  22. <formrecseq/>
  23. </searchpatient>
  24. <save>
  25. <name/>
  26. <ssn/>
  27. <reason>철회희망</reason>
  28. <withdrawhosplist/>
  29. <withdrawdeptlist/>
  30. <instcd/>
  31. <patid/>
  32. <formrecseq/>
  33. <relationship/>
  34. <guardianname/>
  35. <guardiantelcom/>
  36. <question1>Y</question1>
  37. <question2>Y</question2>
  38. <question3>Y</question3>
  39. <documenttype/>
  40. <policytype/>
  41. <elctsignkey/>
  42. <elctsigncnts/>
  43. </save>
  44. </send>
  45. <init>
  46. <ocrconsentinfo>
  47. <instcd/>
  48. <patid/>
  49. <indate/>
  50. <cretno/>
  51. <class/>
  52. <flag/>
  53. <cuser/>
  54. <formrecseq/>
  55. <tag1/>
  56. <tag2/>
  57. <tag3/>
  58. <tag4/>
  59. <tag5/>
  60. <tag6/>
  61. <tag7/>
  62. </ocrconsentinfo>
  63. <initinfo/>
  64. </init>
  65. <hidden>
  66. <pageflag>1</pageflag>
  67. <genderinfo>
  68. <list>
  69. <value>M</value>
  70. <label>남</label>
  71. </list>
  72. <list>
  73. <value>F</value>
  74. <label>여</label>
  75. </list>
  76. </genderinfo>
  77. <relationshipinfo>
  78. <list>
  79. <value>MYSELF</value>
  80. <label>본인</label>
  81. </list>
  82. <list>
  83. <value>FAMILY</value>
  84. <label>가족</label>
  85. </list>
  86. </relationshipinfo>
  87. <popup>
  88. <withdrawhosp/>
  89. <withdrawdept/>
  90. </popup>
  91. </hidden>
  92. </root>
  93. </instance>
  94. <submission id="TRARH01102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchpatient" resultref="/root/main/patientinfo"/>
  95. <submission id="TXARH01101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/main/cdainfo"/>
  96. <script type="javascript" ev:event="xforms-ready">
  97. <![CDATA[
  98. fInit();
  99. ]]>
  100. </script>
  101. </model>
  102. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  103. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  104. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  105. <script type="javascript">
  106. <![CDATA[
  107. function fInit(){
  108. if(!checkOpener()){
  109. messageBox("환자 수진정보가 없습니다.","E999");
  110. window.close();
  111. }
  112. model.toggle("case1");
  113. // 뷰어 초기화
  114. object1.Navigate("about:blank","" ,"_self", "", "");
  115. //기본정보조회
  116. //submit("TRARH01101");
  117. //동의철회용 수진정보
  118. model.setValue("/root/init/ocrconsentinfo/instcd", getUserInfo("dutplceinstcd"));
  119. model.setValue("/root/init/ocrconsentinfo/patid", opener.javascript.getParameter("SMARH01100_param_patid"));
  120. model.setValue("/root/init/ocrconsentinfo/indate", opener.javascript.getParameter("SMARH01100_param_indate"));
  121. model.setValue("/root/init/ocrconsentinfo/cretno", opener.javascript.getParameter("SMARH01100_param_cretno"));
  122. model.setValue("/root/init/ocrconsentinfo/class", opener.javascript.getParameter("SMARH01100_param_class"));
  123. model.setValue("/root/init/ocrconsentinfo/flag", opener.javascript.getParameter("SMARH01100_param_flag"));
  124. model.setValue("/root/init/ocrconsentinfo/cuser", getUserInfo("userid"));
  125. model.setValue("/root/init/ocrconsentinfo/formrecseq", opener.javascript.getParameter("SMARH01100_param_formrecseq"));
  126. model.setValue("/root/send/save/relationship", "MYSELF");
  127. fSetConsenterComponent(false);
  128. //정보 조회
  129. model.setValue("/root/send/searchpatient/pid",opener.javascript.getParameter("SMARH01100_param_patid"));
  130. fSearch();
  131. // 동의자 정보 세팅
  132. // fSetConsenter();
  133. model.refresh();
  134. }
  135. // 조회
  136. function fSearch(){
  137. model.setValue("/root/send/searchpatient/instcd", getUserInfo("dutplceinstcd"));
  138. model.setValue("/root/send/searchpatient/formrecseq", model.getValue("/root/init/ocrconsentinfo/formrecseq"));
  139. submit("TRARH01102");
  140. model.refresh();
  141. // 동의서 등록 상태에 따른 처리 로직
  142. var consentstatus = model.getValue("/root/main/patientinfo/consentlist/consentstatus");
  143. var pid = model.getValue("/root/send/searchpatient/pid");
  144. var hngnm = model.getValue("/root/main/patientinfo/patient/name");
  145. var telcom = model.getValue("/root/main/patientinfo/patient/telecomnumber");
  146. // 조회 이후에는 본인으로 초기값 세팅
  147. fSetConsenterComponent(false);
  148. if(consentstatus == "NOTREGISTERED"){
  149. cap_consentstatus.value = pid + " " + hngnm + " - HIE 동의정보 등록이 되지 않았습니다.";
  150. }else if(consentstatus == "1.2.410.100110.40.2.2.2.2"){
  151. cap_consentstatus.value = pid + " " + hngnm + " - HIE 일괄동의(전체) 하였습니다.";
  152. }else if(consentstatus == "1.2.410.100110.40.2.2.2.4"){
  153. cap_consentstatus.value = pid + " " + hngnm + " - HIE 동의철회(전체) 하였습니다.";
  154. }else if(consentstatus == "1.2.410.100110.40.2.2.2.5"){
  155. cap_consentstatus.value = pid + " " + hngnm + " - HIE 동의철회(부분) 하였습니다.";
  156. }
  157. var cdaxml = model.getValue("/root/main/patientinfo/cdalist/cdaxml");
  158. fHIEView(cdaxml);
  159. //model.refresh();
  160. }
  161. // 동의자정보 컴포넌트의 값세팅 및 활성화여부 적용
  162. function fSetConsenterComponent(flag){
  163. if(flag == false){
  164. //alert(model.getValue("/root/main/patientinfo/patient/name"));
  165. model.setValue("/root/send/save/guardianname", model.getValue("/root/main/patientinfo/patient/patientname"));
  166. model.setValue("/root/send/save/guardiantelcom", model.getValue("/root/main/patientinfo/patient/telecomnumber"));
  167. ipt_guardianname.disabled = true;
  168. ipt_guardiantelcom.disabled = true;
  169. ipt_guardianname2.disabled = true;
  170. ipt_guardiantelcom2.disabled = true;
  171. }else{
  172. model.setValue("/root/send/save/guardianname", "");
  173. model.setValue("/root/send/save/guardiantelcom", "");
  174. ipt_guardianname.disabled = false;
  175. ipt_guardiantelcom.disabled = false;
  176. ipt_guardianname2.disabled = false;
  177. ipt_guardiantelcom2.disabled = false;
  178. }
  179. //alert(model.getValue("/root/send/save/guardianname"));
  180. }
  181. // 동의서 및 철회서 뷰
  182. function fHIEView(cdaxml){
  183. var doc = object1.Document;
  184. var objDom = doc.body;
  185. objDom.innerHTML = cdaxml;
  186. window.activate();
  187. }
  188. function fGetABCForEventCode(){
  189. var pageflag = model.getValue("/root/hidden/pageflag");
  190. if(pageflag == "1"){
  191. return "A";
  192. }else if(pageflag == "2"){
  193. var policytype = model.getValue("/root/send/save/policytype");
  194. if(policytype == "ENTIRE_WITHDRAWAL"){
  195. return "B";
  196. }else if(policytype == "PARTIAL_WITHDRAWAL"){
  197. return "C";
  198. }
  199. }
  200. }
  201. // 동의, 철회서 작성(flag A:일괄동의, flag B:일괄철회, flag C:부분철회)
  202. function fPrintOcrConsent(flag) {
  203. if(flag != "A" && flag != "B" && flag != "C"){
  204. return "";
  205. }
  206. clearParameter("SSMRC03160_param_rtnocrtag");
  207. clearParameter("SSMRC03160_param_instcd");
  208. clearParameter("SSMRC03160_param_patid");
  209. clearParameter("SSMRC03160_param_indate");
  210. clearParameter("SSMRC03160_param_cretno");
  211. clearParameter("SSMRC03160_param_class");
  212. clearParameter("SSMRC03160_param_flag");
  213. clearParameter("SSMRC03160_param_cuser");
  214. clearParameter("SSMRC03160_param_tag1");
  215. clearParameter("SSMRC03160_param_tag2");
  216. clearParameter("SSMRC03160_param_tag3");
  217. clearParameter("SSMRC03160_param_tag4");
  218. clearParameter("SSMRC03160_param_tag5");
  219. clearParameter("SSMRC03160_param_tag6");
  220. clearParameter("SSMRC03160_param_tag7");
  221. // 공통 파라미터 세팅
  222. setParameter("SSMRC03160_param_instcd", model.getValue("/root/init/ocrconsentinfo/instcd"));
  223. setParameter("SSMRC03160_param_patid", model.getValue("/root/init/ocrconsentinfo/patid"));
  224. setParameter("SSMRC03160_param_indate", model.getValue("/root/init/ocrconsentinfo/indate"));
  225. setParameter("SSMRC03160_param_cretno", model.getValue("/root/init/ocrconsentinfo/cretno"));
  226. setParameter("SSMRC03160_param_class", model.getValue("/root/init/ocrconsentinfo/class"));
  227. setParameter("SSMRC03160_param_flag", model.getValue("/root/init/ocrconsentinfo/flag"));
  228. setParameter("SSMRC03160_param_cuser", model.getValue("/root/init/ocrconsentinfo/cuser"));
  229. setParameter("SSMRC03160_param_tag1", model.getValue("/root/send/save/guardianname")); // 환자 또는 법정대리인 성명
  230. setParameter("SSMRC03160_param_tag2", model.getValue("/root/send/save/guardiantelcom")); // 환자 또는 법정대리인 개인식별번호
  231. setParameter("SSMRC03160_param_tag3", model.getValue("/root/send/save/relationship")); // 동의 승인자와 환자와의 관계 유형(MYSELF : 본인, FAMILY : 가족, LEGAL_REPRESENTIVE : 법정대리인, ETC : 기타)
  232. setParameter("SSMRC03160_param_tag4", model.getValue("/root/send/save/reason")); // 동의 철회 사유
  233. // 전자동의서 모듈 호출
  234. if ( flag == "A" ) {
  235. setParameter("SSMRC03160_param_docucd", "1600018738");
  236. }
  237. else if(flag == "B" ) {
  238. setParameter("SSMRC03160_param_docucd", "1600018739");
  239. setParameter("SSMRC03160_param_tag5", "전체"); // 동의 철회 전체/부분 여부
  240. }
  241. else if(flag == "C" ) {
  242. setParameter("SSMRC03160_param_docucd", "1600018739");
  243. setParameter("SSMRC03160_param_tag5", "부분"); // 동의 철회 전체/부분 여부
  244. var withdrawhosplist = "";
  245. for(var i=1;i<=grd_withdrawhosp.rows;i++){
  246. var id = model.getValue("/root/main/patientinfo/withdrawhosplist["+(i)+"]/partwithdrawalorg");
  247. var name = model.getValue("/root/init/initinfo/hosplist[mdins_oid == '" + id + "']/mdins_nm");
  248. if(i == 1){
  249. withdrawhosplist = name;
  250. }else{
  251. withdrawhosplist = ","+name;
  252. }
  253. }
  254. var withdrawdeptlist = "";
  255. for(var i=1;i<=grd_withdrawdept.rows;i++){
  256. var id = model.getValue("/root/main/patientinfo/withdrawdeptlist["+(i)+"]/partwithdrawaldep");
  257. var name = model.getValue("/root/init/initinfo/deptlist[dept_cd == '" + id + "']/dept_nm");
  258. if(i == 1){
  259. withdrawdeptlist = name;
  260. }else{
  261. withdrawdeptlist = ","+name;
  262. }
  263. }
  264. setParameter("SSMRC03160_param_tag6", withdrawhosplist); // 철회병원 리스트
  265. setParameter("SSMRC03160_param_tag7", withdrawdeptlist); // 철회과 리스트
  266. }
  267. modal("SSMRC03160");
  268. return getParameter("SSMRC03160_param_rtnocrtag");
  269. }
  270. // 동의서 및 철회서 저장
  271. function fSave(){
  272. //사인패드 입력하는 부분은 추후 필요 시 구현키로 함
  273. //modal("SPARH01100");
  274. // 전자동의서 작성
  275. var ocrtag = fPrintOcrConsent(fGetABCForEventCode());
  276. if(isNull(ocrtag)){
  277. messageBox("취소되었습니다.","E999");
  278. return;
  279. }
  280. //model.setValue("/root/send/save/relationship",model.getValue("/root/main/consenter/relationship"));
  281. //model.setValue("/root/send/save/name",model.getValue("/root/main/consenter/name"));
  282. //model.setValue("/root/send/save/reason",model.getValue("/root/main/consenter/reason"));
  283. /*
  284. var withdrawhosplistNodes = instance1.selectNodes("/root/main/patientinfo/withdrawhosplist");
  285. if(withdrawhosplistNodes.length > 0)
  286. model.makeValue("/root/send/save/withdrawhosplist",getNodeListCSV(withdrawhosplistNodes));
  287. else
  288. model.removenode("/root/send/save/withdrawhosplist");
  289. var withdrawdeptlistNodes = instance1.selectNodes("/root/main/patientinfo/withdrawdeptlist");
  290. if(withdrawdeptlistNodes.length > 0)
  291. model.makeValue("/root/send/save/withdrawdeptlist",getNodeListCSV(withdrawdeptlistNodes));
  292. else
  293. model.removenode("/root/send/save/withdrawdeptlist");
  294. */
  295. model.setValue("/root/send/save/instcd",model.getValue("/root/init/ocrconsentinfo/instcd"));
  296. model.setValue("/root/send/save/patid",model.getValue("/root/init/ocrconsentinfo/patid"));
  297. model.setValue("/root/send/save/formrecseq",model.getValue("/root/init/ocrconsentinfo/formrecseq"));
  298. // 철회요청병원
  299. var withdrawhosplistNodes = instance1.selectNodes("/root/main/patientinfo/withdrawhosplist");
  300. if(withdrawhosplistNodes.length > 0)
  301. model.makeValue("/root/send/save/withdrawhosplist",getNodeListCSV(withdrawhosplistNodes));
  302. else
  303. model.removenode("/root/send/save/withdrawhosplist");
  304. // 철회요청진료과
  305. var withdrawdeptlistNodes = instance1.selectNodes("/root/main/patientinfo/withdrawdeptlist");
  306. if(withdrawdeptlistNodes.length > 0)
  307. model.makeValue("/root/send/save/withdrawdeptlist",getNodeListCSV(withdrawdeptlistNodes));
  308. else
  309. model.removenode("/root/send/save/withdrawdeptlist");
  310. submit("TXARH01101");
  311. fHIEView(model.getValue("/root/main/cdainfo/cdalist/cdaxml"));
  312. }
  313. ]]>
  314. </script>
  315. </xhtml:head>
  316. <xhtml:body pagewidth="1200" pageheight="900">
  317. <caption id="caption2" class="tit_1" style="left:0px; top:0px; width:297px; height:14px; ">HIE 동의철회관리</caption>
  318. <caption id="caption75" class="tit_2" style="left:5px; top:20px; width:196px; height:14px; ">환자정보(동의주체)</caption>
  319. <switch id="switch1" style="left:1px; top:228px; width:423px; height:662px; ">
  320. <case id="case1" style="left:0px; top:0px; width:100.00%; height:100.00%; ">
  321. <caption id="caption1" style="left:15px; top:135px; width:330px; height:20px; ">본인(법정대리인)은 [1]개인정보의 제공, 이용에 동의합니다.</caption>
  322. <select1 id="radio1" ref="/root/send/save/question1" appearance="full" cellspacing="50" cols="2" overflow="visible" style="left:256px; top:154px; width:150px; height:25px; text-align:center; vertical-align:middle; border-style:sunken; ">
  323. <choices>
  324. <item>
  325. <label>예</label>
  326. <value>Y</value>
  327. </item>
  328. <item>
  329. <label>아니오</label>
  330. <value>N</value>
  331. </item>
  332. </choices>
  333. </select1>
  334. <caption id="caption3" style="left:15px; top:195px; width:440px; height:28px; ">
  335. <![CDATA[본인(법정대리인)은 [2]고유식별 정보(주민등록번호)의 제공, 이용에 동의
  336. 합니다.]]>
  337. </caption>
  338. <caption id="caption4" style="left:15px; top:249px; width:372px; height:20px; ">본인(법정대리인)은 [3]민감(진료) 정보의 제공, 이용에 동의합니다.</caption>
  339. <select1 id="radio2" ref="/root/send/save/question2" appearance="full" cellspacing="50" cols="2" overflow="visible" style="left:256px; top:212px; width:150px; height:25px; text-align:center; vertical-align:middle; border-style:sunken; ">
  340. <choices>
  341. <item>
  342. <label>예</label>
  343. <value>Y</value>
  344. </item>
  345. <item>
  346. <label>아니오</label>
  347. <value>N</value>
  348. </item>
  349. </choices>
  350. </select1>
  351. <select1 id="radio3" ref="/root/send/save/question3" appearance="full" cellspacing="50" cols="2" overflow="visible" style="left:256px; top:268px; width:150px; height:25px; text-align:center; vertical-align:middle; border-style:sunken; ">
  352. <choices>
  353. <item>
  354. <label>예</label>
  355. <value>Y</value>
  356. </item>
  357. <item>
  358. <label>아니오</label>
  359. <value>N</value>
  360. </item>
  361. </choices>
  362. </select1>
  363. <group id="group2" style="left:5px; top:10px; width:410px; height:115px; background-color:#cce8ff; ">
  364. <caption id="caption5" class="cell_1" style="left:10px; top:30px; width:70px; height:23px; vertical-align:middle; ">관계</caption>
  365. <caption id="caption6" class="cell_1" style="left:10px; top:55px; width:70px; height:23px; vertical-align:middle; ">성명</caption>
  366. <select1 id="cmb_relationship" ref="/root/send/save/relationship" class="input_essential" appearance="minimal" style="left:85px; top:30px; width:285px; height:19px; ">
  367. <choices>
  368. <itemset nodeset="/root/hidden/relationshipinfo/list">
  369. <label ref="label"/>
  370. <value ref="value"/>
  371. </itemset>
  372. </choices>
  373. <script type="javascript" ev:event="xforms-value-changed">
  374. <![CDATA[
  375. //var relationship = cmb_relationship.value ;
  376. var relationship = model.getValue("/root/send/save/relationship");
  377. if(relationship == "MYSELF"){
  378. fSetConsenterComponent(false);
  379. }else{
  380. fSetConsenterComponent(true);
  381. }
  382. model.refresh();
  383. ]]>
  384. </script>
  385. </select1>
  386. <caption id="caption7" class="cell_1" style="left:10px; top:80px; width:70px; height:23px; vertical-align:middle; ">전화번호</caption>
  387. <input id="ipt_guardianname" ref="/root/send/save/guardianname" class="input_essential" navindex="2" style="left:85px; top:56px; width:285px; height:19px; "/>
  388. <input id="ipt_guardiantelcom" ref="/root/send/save/guardiantelcom" navindex="2" style="left:85px; top:80px; width:285px; height:19px; "/>
  389. <caption id="caption8" class="tit_2" style="left:10px; top:10px; width:196px; height:14px; ">동의자정보</caption>
  390. </group>
  391. </case>
  392. <case id="case2" selected="true">
  393. <group id="group3" style="left:5px; top:35px; width:410px; height:135px; background-color:#cce8ff; ">
  394. <caption id="caption9" class="cell_1" style="left:10px; top:30px; width:70px; height:23px; vertical-align:middle; ">관계</caption>
  395. <caption id="caption10" class="cell_1" style="left:10px; top:55px; width:70px; height:23px; vertical-align:middle; ">성명</caption>
  396. <select1 id="cmb_relationship2" ref="/root/send/save/relationship" class="input_essential" appearance="minimal" style="left:85px; top:30px; width:285px; height:19px; ">
  397. <choices>
  398. <itemset nodeset="/root/hidden/relationshipinfo/list">
  399. <label ref="label"/>
  400. <value ref="value"/>
  401. </itemset>
  402. </choices>
  403. <script type="javascript" ev:event="xforms-value-changed">
  404. <![CDATA[
  405. //var relationship = cmb_relationship.value ;
  406. var relationship = model.getValue("/root/send/save/relationship");
  407. if(relationship == "MYSELF"){
  408. fSetConsenterComponent(false);
  409. }else{
  410. fSetConsenterComponent(true);
  411. }
  412. model.refresh();
  413. ]]>
  414. </script>
  415. </select1>
  416. <caption id="caption12" class="cell_1" style="left:10px; top:80px; width:70px; height:23px; vertical-align:middle; ">전화번호</caption>
  417. <input id="ipt_guardianname2" ref="/root/send/save/guardianname" class="input_essential" navindex="2" imemode="hangul" style="left:85px; top:56px; width:285px; height:19px; "/>
  418. <input id="ipt_guardiantelcom2" ref="/root/send/save/guardiantelcom" navindex="2" style="left:85px; top:80px; width:285px; height:19px; "/>
  419. <caption id="caption13" class="tit_2" style="left:10px; top:10px; width:196px; height:14px; ">동의자정보</caption>
  420. <input id="input1" ref="/root/send/save/reason" class="input_essential" navindex="2" style="left:85px; top:105px; width:285px; height:19px; "/>
  421. <caption id="caption16" class="cell_1" style="left:10px; top:105px; width:70px; height:23px; vertical-align:middle; ">철회사유</caption>
  422. </group>
  423. <select1 id="radio4" ref="/root/send/save/policytype" appearance="full" cellspacing="50" cols="2" vcellspacing="5" overflow="visible" style="left:5px; top:5px; width:220px; height:25px; text-align:center; vertical-align:middle; border-color:#c0c0c0; border-style:solid; ">
  424. <choices>
  425. <item>
  426. <label>전체 철회서</label>
  427. <value>ENTIRE_WITHDRAWAL</value>
  428. </item>
  429. <item>
  430. <label>부분 철회서</label>
  431. <value>PARTIAL_WITHDRAWAL</value>
  432. </item>
  433. </choices>
  434. </select1>
  435. <group id="group5" style="left:5px; top:175px; width:410px; height:250px; ">
  436. <caption id="caption14" class="tit_2" style="left:10px; top:10px; width:196px; height:14px; ">철회 요청 병원</caption>
  437. <datagrid id="grd_withdrawhosp" nodeset="/root/main/patientinfo/withdrawhosplist" scroll="auto" caption="병원명^주소" colsep="^" colwidth="180, 178" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:25px; width:409px; height:220px; ">
  438. <col disabled="false" ref="partwithdrawalorg" type="combo">
  439. <choices>
  440. <itemset nodeset="/root/main/patientinfo/hosplist">
  441. <label ref="mdins_nm"/>
  442. <value ref="mdins_oid"/>
  443. </itemset>
  444. </choices>
  445. </col>
  446. <col disabled="true" ref="partwithdrawalorg" type="combo">
  447. <choices>
  448. <itemset nodeset="/root/main/patientinfo/hosplist">
  449. <label ref="mdins_addr"/>
  450. <value ref="mdins_oid"/>
  451. </itemset>
  452. </choices>
  453. </col>
  454. </datagrid>
  455. <button id="button1" class="btn2_letter2" style="left:315px; top:5px; width:42px; height:19px; ">
  456. <caption>추가</caption>
  457. <script type="javascript" ev:event="DOMActivate">
  458. <![CDATA[
  459. model.removeNodeset("/root/hidden/popup/withdrawhosp/list");
  460. clearParameter("SPARH00500_PARAM");
  461. modal("SPARH00500");
  462. var param = getParameter("SPARH00500_PARAM");
  463. if(isNull(param)){
  464. return;
  465. }
  466. setCSVToNode("/root/hidden/popup/withdrawhosp", param);
  467. var cnt = 0; // 추가된 개수 계산
  468. for(var i=1;i<=instance1.selectNodes("/root/hidden/popup/withdrawhosp/list").length;i++){
  469. var organizationoid = model.getValue("/root/hidden/popup/withdrawhosp/list["+(i)+"]/organizationoid");
  470. if(instance1.selectNodes("/root/main/patientinfo/withdrawhosplist[partwithdrawalorg='"+organizationoid+"']").length > 0){
  471. continue;
  472. }
  473. grd_withdrawhosp.addRow();
  474. var row = grd_withdrawhosp.row;
  475. model.setValue("/root/main/patientinfo/withdrawhosplist["+(row)+"]/partwithdrawalorg", organizationoid);
  476. cnt++;
  477. }
  478. // 추가된게 있으면
  479. //if(cnt > 0){
  480. // fAddConsent("C");
  481. //}
  482. model.refresh();
  483. ]]>
  484. </script>
  485. </button>
  486. <button id="button3" class="btn2_letter2" style="left:360px; top:5px; width:42px; height:19px; ">
  487. <caption>삭제</caption>
  488. <script type="javascript" ev:event="DOMActivate">
  489. <![CDATA[
  490. var row = grd_withdrawhosp.row;
  491. grd_withdrawhosp.deleteRow(row);
  492. model.refresh();
  493. ]]>
  494. </script>
  495. </button>
  496. </group>
  497. <group id="group6" style="left:5px; top:430px; width:410px; height:225px; ">
  498. <caption id="caption15" class="tit_2" style="left:10px; top:10px; width:196px; height:14px; ">철회 요청 진료과</caption>
  499. <datagrid id="grd_withdrawdept" nodeset="/root/main/patientinfo/withdrawdeptlist" caption="부서명" colsep="^" colwidth="246" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:27px; width:410px; height:195px; ">
  500. <col disabled="true" ref="partwithdrawaldep" type="combo">
  501. <choices>
  502. <itemset nodeset="/root/main/patientinfo/deptlist">
  503. <label ref="dept_nm"/>
  504. <value ref="dept_cd"/>
  505. </itemset>
  506. </choices>
  507. </col>
  508. </datagrid>
  509. <button id="button2" class="btn2_letter2" style="left:314px; top:5px; width:42px; height:19px; ">
  510. <caption>추가</caption>
  511. <script type="javascript" ev:event="DOMActivate">
  512. <![CDATA[
  513. clearParameter("SPARH00600_PARAM");
  514. modal("SPARH00600");
  515. var param = getParameter("SPARH00600_PARAM");
  516. if(isNull(param)){
  517. return;
  518. }
  519. model.removeNodeset("/root/hidden/popup/withdrawdept/list");
  520. setCSVToNode("/root/hidden/popup/withdrawdept", param);
  521. for(var i=1;i<=instance1.selectNodes("/root/hidden/popup/withdrawdept/list").length;i++){
  522. var departmentcode = model.getValue("/root/hidden/popup/withdrawdept/list["+(i)+"]/commoncode");
  523. grd_withdrawdept.addRow();
  524. var row = grd_withdrawdept.row;
  525. model.setValue("/root/main/patientinfo/withdrawdeptlist["+(row)+"]/partwithdrawaldep", departmentcode);
  526. }
  527. //fAddConsent("C");
  528. model.refresh();
  529. ]]>
  530. </script>
  531. </button>
  532. <button id="button4" class="btn2_letter2" style="left:359px; top:5px; width:42px; height:19px; ">
  533. <caption>삭제</caption>
  534. <script type="javascript" ev:event="DOMActivate">
  535. <![CDATA[
  536. var row = grd_withdrawdept.row;
  537. grd_withdrawdept.deleteRow(row);
  538. model.refresh();
  539. ]]>
  540. </script>
  541. </button>
  542. </group>
  543. </case>
  544. </switch>
  545. <group id="group1" disabled="true" style="left:0px; top:35px; width:425px; height:165px; ">
  546. <caption id="caption81" class="cell_1" style="left:2px; top:58px; width:135px; height:23px; vertical-align:middle; ">주민번호</caption>
  547. <caption id="caption82" class="cell_1" style="left:2px; top:8px; width:135px; height:23px; vertical-align:middle; ">등록번호</caption>
  548. <caption id="caption83" class="cell_1" style="left:271px; top:8px; width:65px; height:23px; vertical-align:middle; ">성별/나이</caption>
  549. <caption id="caption84" class="cell_1" style="left:271px; top:58px; width:65px; height:23px; vertical-align:middle; ">생년월일</caption>
  550. <input id="ipt_tel" ref="/root/main/patientinfo/patient/telecomnumber" class="input_default" navindex="6" maxlength="13" style="left:140px; top:85px; width:282px; height:19px; text-align:left; "/>
  551. <input id="ipt_pid" ref="/root/send/searchpatient/pid" accesskey="ctrl+keyCode(48)" navindex="1" imemode="disabled" maxlength="10" format="#" appearance="input" style="left:140px; top:10px; width:128px; height:19px; ">
  552. <script type="javascript" ev:event="onkeypress">
  553. <![CDATA[
  554. //무조건 재조회 할수 있도록 clear 후에 조회 호출 필요
  555. if (event.keyCode == "13"){
  556. var pid = ipt_pid.currentText;
  557. if(isNull(pid)){
  558. messageBox("등록번호는","I003");
  559. model.setFocus("ipt_pid");
  560. return;
  561. }
  562. model.setValue("/root/send/searchpatient/pid",pid);
  563. fSearch();
  564. model.refresh();
  565. }
  566. ]]>
  567. </script>
  568. </input>
  569. <input id="ipt_rrgstno" ref="/root/main/patientinfo/patient/ssnnumber" navindex="3" format="999999-9999999" style="left:140px; top:60px; width:128px; height:19px; "/>
  570. <caption id="caption85" class="cell_1" style="left:2px; top:83px; width:135px; height:23px; vertical-align:middle; ">전화번호</caption>
  571. <caption id="caption11" class="cell_1" style="left:2px; top:108px; width:135px; height:49px; vertical-align:middle; ">주소</caption>
  572. <input id="ipt_age" ref="/root/main/patientinfo/patient/age" class="input_default" style="left:397px; top:10px; width:25px; height:19px; ">
  573. <script type="javascript" ev:event="xforms-value-changed">
  574. <![CDATA[
  575. if (fAgeVeri() == false) return;
  576. ]]>
  577. </script>
  578. <script type="javascript" ev:event="onkeypress">
  579. <![CDATA[
  580. if (event.keyCode == "13"){
  581. //setInputNodeCurText();
  582. if (fAgeVeri() == false) return;
  583. }
  584. ]]>
  585. </script>
  586. </input>
  587. <input id="ipt_hngnm" ref="/root/main/patientinfo/patient/patientname" navindex="2" imemode="hangul" style="left:140px; top:35px; width:128px; height:19px; "/>
  588. <caption id="caption79" class="cell_1" style="left:2px; top:33px; width:135px; height:23px; vertical-align:middle; ">성명</caption>
  589. <input id="ipt_brthdd" ref="/root/main/patientinfo/patient/dateofbirth" class="input_default" navindex="5" format="yyyy-mm-dd" style="left:339px; top:60px; width:83px; height:19px; ">
  590. <script type="javascript" ev:event="xforms-value-changed">
  591. <![CDATA[
  592. if(fBrthddVeri(model.getValue("/root/main/ptbs/ptbs_brthdd"),ipt_brthdd) == false) return; //2010-01-18 김주희 DUR관련 생년월일체크
  593. ]]>
  594. </script>
  595. </input>
  596. <line id="line2" class="line_2" style="x1:2px; y1:105px; x2:422px; y2:105px; "/>
  597. <select1 id="cmb_sex" ref="/root/main/patientinfo/patient/gender" class="combo_default" appearance="minimal" style="left:339px; top:10px; width:55px; height:19px; ">
  598. <choices>
  599. <itemset nodeset="/root/hidden/genderinfo/list">
  600. <label ref="label"/>
  601. <value ref="value"/>
  602. </itemset>
  603. </choices>
  604. </select1>
  605. <textarea id="textarea1" ref="/root/main/patientinfo/patient/address" style="left:140px; top:107px; width:282px; height:53px; "/>
  606. <line id="line102" class="line_1" style="x1:2px; y1:3px; x2:422px; y2:3px; "/>
  607. <line id="line103" class="line_2" style="x1:2px; y1:32px; x2:422px; y2:32px; "/>
  608. <line id="line158" class="line_3" style="x1:2px; y1:162px; x2:422px; y2:162px; "/>
  609. <line id="line104" class="line_2" style="x1:2px; y1:57px; x2:422px; y2:57px; "/>
  610. <line id="line105" class="line_2" style="x1:2px; y1:82px; x2:422px; y2:82px; "/>
  611. </group>
  612. <button id="bbt_withdrawal" class="btn_sw" group="tab" selected="false" style="left:89px; top:205px; width:89px; height:22px; ">
  613. <caption>철회서작성</caption>
  614. <script type="javascript" ev:event="DOMActivate">
  615. <![CDATA[
  616. var consentstatus = model.getValue("/root/main/patientinfo/consentlist/consentstatus");
  617. var pid = model.getValue("/root/send/searchpatient/pid");
  618. var hngnm = model.getValue("/root/main/patientinfo/patient/name");
  619. // 동의 등록되지 않은 경우에는 리턴
  620. if(consentstatus == "NOTREGISTERED"){
  621. messageBox("동의서작성을 먼저 작성 후 ","I006");
  622. bbt_consent.selected = true;
  623. bbt_withdrawal.selected = false;
  624. return;
  625. }
  626. model.toggle("case2");
  627. model.setValue("/root/hidden/pageflag","2");
  628. model.refresh();
  629. ]]>
  630. </script>
  631. </button>
  632. <button id="bbt_consent" class="btn_sw" group="tab" selected="true" style="left:0px; top:205px; width:89px; height:22px; ">
  633. <caption>동의서작성</caption>
  634. <toggle case="case1" ev:event="DOMActivate"/>
  635. <script type="javascript" ev:event="onclick">
  636. <![CDATA[
  637. model.setValue("/root/hidden/pageflag","1");
  638. model.refresh();
  639. ]]>
  640. </script>
  641. </button>
  642. <button id="button8" class="btn4_letter2" style="left:1116px; top:7px; width:56px; height:22px; ">
  643. <caption>등록</caption>
  644. <script type="javascript" ev:event="DOMActivate">
  645. <![CDATA[
  646. var pageflag = model.getValue("/root/hidden/pageflag");
  647. var relationship = model.getValue("/root/send/save/relationship");
  648. if(isNull(relationship)){
  649. messageBox("동의자정보 관계는","I003");
  650. return;
  651. }
  652. var guardianname = model.getValue("/root/send/save/guardianname");
  653. if(isNull(guardianname)){
  654. messageBox("동의자정보 성명은","I003");
  655. return;
  656. }
  657. if(pageflag == "1"){ // 동의서 작성인 경우
  658. var question1 = model.getValue("/root/send/save/question1");
  659. var question2 = model.getValue("/root/send/save/question2");
  660. var question3 = model.getValue("/root/send/save/question3");
  661. if(question1 != "Y" || question2 != "Y" || question3 != "Y"){
  662. messageBox("동의하지 않은 항목이","I010");
  663. return;
  664. }
  665. model.setValue("/root/send/save/documenttype","1.2.410.100110.40.2.2.1.1");
  666. }else if(pageflag == "2"){ // 철회서 작성인 경우
  667. var policytype = model.getValue("/root/send/save/policytype");
  668. if(isNull(policytype)){
  669. messageBox("전체 철회서인지 부분 철회서인지 선택","I008");
  670. return;
  671. }
  672. var consentstatus = model.getValue("/root/main/patientinfo/consentlist/consentstatus");
  673. if(consentstatus == "1.2.410.100110.40.2.2.2.4"){ // 현재 전체 철회 상태라면
  674. messageBox("전체 철회 상태이므로 동의서 작성 후 부분철회 가능합니다.","E999");
  675. return;
  676. }
  677. var reason = model.getValue("/root/send/save/reason");
  678. if(isNull(reason)){
  679. messageBox("동의자정보 철회사유는","I003");
  680. return;
  681. }
  682. model.setValue("/root/send/save/documenttype","1.2.410.100110.40.2.2.1.2");
  683. }
  684. /*
  685. var consentgb = model.getValue("/root/hidden/consentgb");
  686. if(consentgb == "L"){ // 법정대리인 체크된 경우
  687. var name = model.getValue("/root/main/consenter/name");
  688. if(isNull(name)){
  689. messageBox("법정대리인 이름은 필수입니다.","E999");
  690. return;
  691. }
  692. var ssn = model.getValue("/root/main/consenter/ssn");
  693. if(isNull(ssn)){
  694. messageBox("법정대리인 주민번호는 필수입니다.","E999");
  695. return;
  696. }
  697. var relationship = model.getValue("/root/main/consenter/relationship");
  698. if(isNull(relationship)){
  699. messageBox("법정대리인 이름은 필수입니다.","E999");
  700. return;
  701. }
  702. }
  703. if(!fCheckExistsConsent("A") && !fCheckExistsConsent("B")){
  704. messageBox("동의철회내역이 존재하지 않습니다.","E999");
  705. return;
  706. }
  707. // 부분철회가 있을 경우 체크
  708. if(fCheckExistsConsent("C") || fCheckExistsConsent("B")){
  709. var reason = model.getValue("/root/main/consenter/reason");
  710. if(isNull(reason)){
  711. messageBox("철회 시 철회사유를 입력하셔야 합니다.","E999");
  712. return;
  713. }
  714. if(fCheckExistsConsent("C")) {
  715. if(grd_withdrawhosp.rows-1 <= 0 && grd_withdrawdept.rows-1 <= 0){
  716. messageBox("부분철회내역이 존재하지 않습니다.","E999");
  717. return;
  718. }
  719. }
  720. }
  721. */
  722. setAlertOn();
  723. fSave();
  724. //window.close();
  725. ]]>
  726. </script>
  727. </button>
  728. <group id="group4" style="left:430px; top:35px; width:765px; height:855px; background-color:#c0c0c0; ">
  729. <object id="object1" clsid="{8856f961-340a-11d0-a96b-00c04fd705a2}" AddressBar="false" MenuBar="false" StatusBar="false" Resizable="false" style="left:8px; top:33px; width:750px; height:817px; ">
  730. <script type="javascript" ev:event="TitleChange(Text)">
  731. <![CDATA[
  732. /*
  733. if( chk != Text ) {
  734. chk = Text;
  735. if( Text == "about:blank" ) {
  736. alert("2");
  737. var doc = object1.Document;
  738. var objDom = doc.body;
  739. objDom.innerHTML = model.getValue("/root/main/cdainfo/cdalist/cdaxml");
  740. window.activate();
  741. }
  742. }
  743. */
  744. ]]>
  745. </script>
  746. <script type="javascript" ev:event="NavigateComplete2(pDisp, URL)">
  747. <![CDATA[
  748. //fSearch();
  749. ]]>
  750. </script>
  751. </object>
  752. <caption id="cap_consentstatus" style="left:5px; top:2px; width:755px; height:30px; font-weight:bold; "/>
  753. </group>
  754. </xhtml:body>
  755. </xhtml:html>