SMAHA04080_자료연계파일생성관리.xrw 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : 건진대상자자료연계
  4. * 설 명 : 건진대상자자료연계
  5. * 설 계 자 :
  6. * 작 성 자 : 임여원
  7. * 작 성 일 : 2009.05.29
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  12. <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">
  13. <xhtml:head>
  14. <xhtml:title>건진대상자자료연계</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <linkfiletrgtlst>
  20. <item>
  21. <sel/>
  22. <pid/>
  23. <hngnm/>
  24. <orddd/>
  25. <rrgstno/>
  26. <statflag/>
  27. <examnm/>
  28. <cncrcountryyn/>
  29. <trgtlinkflag/>
  30. <fstrsltlinkflag/>
  31. <scndrsltlinkflag/>
  32. <healexaminqrlinkflag/>
  33. <orallinkflag/>
  34. <oralinqrlinkflag/>
  35. <cancerlinkflag/>
  36. <cancerinqrlinkflag/>
  37. <medcancerlinkflag/>
  38. <rsrvdd/>
  39. <rsrvno/>
  40. <healexamflag/>
  41. <healexamdetlflag/>
  42. <appyear/>
  43. </item>
  44. </linkfiletrgtlst>
  45. <linkfilecmpylst>
  46. <item>
  47. <sel/>
  48. <appyear/>
  49. <cmpyid/>
  50. <cmpynm/>
  51. <insucorpbrchcd/>
  52. <insucorpbrchnm/>
  53. <civilaplflag/>
  54. <bizoffccd/>
  55. <bizoffcnm/>
  56. <cmpyno/>
  57. <cmpylinkflag/>
  58. </item>
  59. </linkfilecmpylst>
  60. <linkfile>
  61. <cmpy>
  62. <cmpyfile/>
  63. </cmpy>
  64. <trgt>
  65. <trgtfile/>
  66. <fstrsltfile/>
  67. <scndrsltfile/>
  68. <healexaminqrfile/>
  69. <oralfile/>
  70. <oralinqrfile/>
  71. <cancercountryfile/>
  72. <cancerfile/>
  73. <cancerinqrfile/>
  74. </trgt>
  75. </linkfile>
  76. </main>
  77. <send>
  78. <srchhealexamgubun/>
  79. <srchhealexamflag/>
  80. <srchhealexamdetlflag/>
  81. <srchappyear/>
  82. <srchfromdd/>
  83. <srchtodd/>
  84. <srchstatfg>H</srchstatfg>
  85. <srchpid/>
  86. <srchpnm/>
  87. <srchflag/>
  88. <srchflagstat/>
  89. <srchlinkfileflag/>
  90. <srchcmpyid/>
  91. <srchcmpynm/>
  92. <cret>
  93. <appyear/>
  94. <linkfileflag/>
  95. <cmpylink/>
  96. </cret>
  97. <save>
  98. <cmpystat/>
  99. <trgtstat/>
  100. </save>
  101. </send>
  102. <init>
  103. <baseinfo>
  104. <linkfilelst/>
  105. <linkflaglst/>
  106. <statlst/>
  107. <healexamgubun/>
  108. <yearlist/>
  109. </baseinfo>
  110. <datalink>
  111. <folderpath/>
  112. </datalink>
  113. </init>
  114. <hidden>
  115. <exestat/>
  116. </hidden>
  117. </root>
  118. </instance>
  119. <submission id="TRZBC00101"/>
  120. <submission id="TRAHA00001"/>
  121. <submission id="TRAHA00002"/>
  122. <submission id="TRAHA04080" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/linkfilecmpylst"/>
  123. <submission id="TRAHA04081" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/cret" replace="instance" resultref="/root/main/linkfile"/>
  124. <submission id="TRAHA04082" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/linkfiletrgtlst"/>
  125. <submission id="TRAHA04083" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/cret" replace="instance" resultref="/root/main/linkfile"/>
  126. <submission id="TXAHA04080" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" replace="instance" resultref="/root/hidden/exestat"/>
  127. <submission id="TXAHA00105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/drug" replace="instance" resultref="/root/hidden"/>
  128. <submission id="TRAHA03230" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchstduser" replace="instance" resultref="/root/temp/stduserInfo"/>
  129. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  130. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  131. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  132. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  133. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  134. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  135. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  136. <script type="javascript" src="../../../com/zipcodeweb/js/ZBP001.js"/>
  137. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  138. <script type="javascript" src="../../../ast/healthexamrsrvacptweb/js/AHA.js"/>
  139. <script type="javascript" src="../../../ast/healthexambaseweb/js/healcombolist.js"/>
  140. <script type="javascript" ev:event="xforms-ready">
  141. <![CDATA[
  142. fGetBasicCdList();
  143. fInit();
  144. btn_trgt.dispatch("DOMActivate");
  145. model.refresh();
  146. ]]>
  147. </script>
  148. </model>
  149. <script type="javascript">
  150. <![CDATA[
  151. m_vHealexamflag = "";
  152. m_vHealexamdetlflag = "";
  153. /****************************************************************************************************
  154. *** 기초코드조회
  155. **************************************************************************************************/
  156. function fGetBasicCdList() {
  157. zbcfGetCodeList( new Array("A0615","A0107", "A0088")
  158. , new Array("/root/init/baseinfo/linkflaglst" //자료연계상태구분
  159. ,"/root/init/baseinfo/statlst" //건진상태구분
  160. ,"/root/init/baseinfo/healexamgubun" //검진분류
  161. ) );
  162. healGetCodeListSubmit( new Array("G099", "S900"), new Array("/root/init/baseinfo/linkfilelst", "/root/init/baseinfo/yearlist"), false);
  163. model.removenode("/root/init/baseinfo/linkfilelst/G099[1]");
  164. addComboItem("combo4", "전체", "", "above");
  165. addComboItem("combo2", "전체", "", "above");
  166. model.refresh();
  167. }
  168. /****************************************************************************************************
  169. *** 화면 초기화
  170. **************************************************************************************************/
  171. function fInit() {
  172. rdo_linkfileflag.select(0);
  173. grd_linkcmpylst.fixedcellcheckbox(0, grd_linkcmpylst.colRef("sel")) = true;
  174. grd_linktrgtlst.fixedcellcheckbox(0, grd_linktrgtlst.colRef("sel")) = true;
  175. model.setValue("/root/init/datalink/folderpath", "C:\\NHICGG\\apps");
  176. var sFlag = getScreenMenuParameter();
  177. if(sFlag == "") {
  178. m_vHealexamflag = "G";
  179. m_vHealexamdetlflag = "G01";
  180. }else {
  181. m_vHealexamflag = sFlag.substr(0, 1);
  182. m_vHealexamdetlflag = sFlag;
  183. }
  184. model.setValue("/root/send/srchhealexamflag" , m_vHealexamflag);
  185. model.setValue("/root/send/srchhealexamdetlflag" , m_vHealexamdetlflag);
  186. var curDate = getCurrentDate().toDate();
  187. var curYear = curDate.getDateFormat('YYYY');
  188. model.setValue(cmb_appyear.attribute("ref") , curYear);
  189. model.setValue(ipt_fromdd.attribute("ref") , getCurrentDate());
  190. model.setValue(ipt_todd.attribute("ref") , getCurrentDate());
  191. // model.setValue(ipt_fromdd.attribute("ref") , "20130524");
  192. // model.setValue(ipt_todd.attribute("ref") , "20130524");
  193. /*
  194. * A 공단검진
  195. * B 직원검진
  196. * C 경대교직원
  197. * D 영유아검진
  198. * E 영유아구강검진
  199. * F 공단생애검진
  200. * G 단체검진
  201. */
  202. // model.setValue("/root/send/srchhealexamgubun" , "A");
  203. // combo1.refresh();
  204. //사용자별 기본정보 설정 - 건진분류, 진료과
  205. model.resetInstanceNode("/root/send/srchstduser");
  206. model.makeValue("/root/send/srchstduser/srchhealexamflag" , m_vHealexamflag);
  207. model.makeValue("/root/send/srchstduser/srchuserid" , getUserId());
  208. model.makeValue("/root/temp/stdUser/item" , "");
  209. submit("TRAHA03230");
  210. if(getNodesetCount("/root/temp/stduserInfo/item") < 1){
  211. // messageBox("설정된 기본정보가 없습니다. 사용자별 기본정보 설정을", "I007");
  212. model.setValue("/root/send/srchhealexamgubun", "A");
  213. }else{
  214. model.setValue("/root/send/srchhealexamgubun", model.getValue("root/temp/stduserInfo/item/healexamgubun"));
  215. }
  216. }
  217. /****************************************************************************************************
  218. *** 조회 컨트롤 보여주기 초기화
  219. **************************************************************************************************/
  220. function fViewSrchCntrl(vFlag) {
  221. var vCmpy = false;
  222. var vTrgt = false
  223. switch(vFlag) {
  224. case "0" : vTrgt = true;
  225. break;
  226. case "1" : vCmpy = true;
  227. break;
  228. default : break;
  229. }
  230. //대상자
  231. cap_term.visible = vTrgt;
  232. cap_pat.visible = vTrgt;
  233. ipt_fromdd.visible = vTrgt;
  234. ipt_todd.visible = vTrgt;
  235. ipt_pid.visible = vTrgt;
  236. ipt_pnm.visible = vTrgt;
  237. //사업체
  238. cap_cmpyid.visible = vCmpy;
  239. cap_cmpynm.visible = vCmpy;
  240. ipt_cmpyid.visible = vCmpy;
  241. ipt_cmpynm.visible = vCmpy;
  242. }
  243. /****************************************************************************************************
  244. *** 연계파일 생성활 사업체 리스트 조회
  245. **************************************************************************************************/
  246. function fGetLinkFileCmpyList() {
  247. submit("TRAHA04080");
  248. }
  249. /****************************************************************************************************
  250. *** 연계파일을 생성활 대상자를 조회
  251. **************************************************************************************************/
  252. function fGetLinkFileTrgtList() {
  253. submit("TRAHA04082");
  254. }
  255. /****************************************************************************************************
  256. *** 단체 연계파일을 생성한다.
  257. **************************************************************************************************/
  258. function fSetCmpyLinkFileCret(){
  259. var cmpyLink = "";
  260. grd_linkcmpylst.clearStatus();
  261. for(var i=1; i < grd_linkcmpylst.rows; i++ ){
  262. if("Y" == grd_linkcmpylst.valueMatrix(i , grd_linkcmpylst.colRef("sel"))){
  263. grd_linkcmpylst.addStatus(i ,"insert");
  264. }
  265. }
  266. cmpyLink = getGridUpdateData(grd_linkcmpylst);
  267. if(cmpyLink != ""){
  268. model.makeValue("/root/send/cret/cmpylink" , cmpyLink);
  269. model.makeValue("/root/send/cret/linkfileflag" , model.getValue("/root/send/srchlinkfileflag"));
  270. if(submit("TRAHA04081")){
  271. fCretLinkFile("C");
  272. messageBox("파일생성이","I002");
  273. }
  274. }else{
  275. messageBox("사업장을","C002");
  276. return;
  277. }
  278. }
  279. /****************************************************************************************************
  280. *** 단체 연계파일을 생성한다.
  281. **************************************************************************************************/
  282. function fSetTrgtLinkFileCret(){
  283. if(model.getValue("/root/send/srchlinkfileflag") == ""){
  284. messageBox("연계파일생성 구분을","C002");
  285. return;
  286. }
  287. if(model.getValue("/root/send/srchappyear") == ""){
  288. messageBox("연계파일생성 기준년도를","C002");
  289. return;
  290. }
  291. var trgtLink = "";
  292. grd_linktrgtlst.clearStatus();
  293. for(var i=1; i<grd_linktrgtlst.rows; i++){
  294. if("Y" == grd_linktrgtlst.valueMatrix(i, grd_linktrgtlst.colRef("sel"))){
  295. grd_linktrgtlst.addStatus(i ,"insert");
  296. grd_linktrgtlst.valueMatrix(i, grd_linktrgtlst.colRef("appyear")) = model.getValue("/root/send/srchappyear");
  297. grd_linktrgtlst.valueMatrix(i, grd_linktrgtlst.colRef("linkfileflag")) = model.getValue("/root/send/srchlinkfileflag");
  298. }
  299. }
  300. trgtLink = getGridUpdateData(grd_linktrgtlst);
  301. if(trgtLink != ""){
  302. model.makeValue("/root/send/cret/linkfileflag" , model.getValue("/root/send/srchlinkfileflag"));
  303. model.makeValue("/root/send/cret/trgtlink" , trgtLink);
  304. if(submit("TRAHA04083")){
  305. fCretLinkFile("T");
  306. messageBox("파일생성이","I002");
  307. btn_search.dispatch("DOMActivate");
  308. }
  309. }else{
  310. messageBox("건진대상자를 ","C002");
  311. return;
  312. }
  313. }
  314. /****************************************************************************************************
  315. *** 연계파일을 생성한다.
  316. **************************************************************************************************/
  317. function fCretLinkFile(vFlag){
  318. var cmpyFile, trgtFile, fstRsltFile, scndRsltFile, healexamInqrFile, oralFile, oralInqrFile, cancerFile, cancerInqrFile = "";
  319. var sel = model.getValue("/root/send/cret/linkfileflag");
  320. var node = instance1.selectNodes("/root/init/baseinfo/linkfilelst/G099[cdid='" + sel + "']");
  321. if(vFlag == "C") {
  322. if(sel == "01") {
  323. if(node.length > 0 && node != null) {
  324. cmpyFile = node.item(0).cmt.text + "_" + getCurrentDate() + ".dat";
  325. fMakeFile(cmpyFile, model.getValue("/root/main/linkfile/cmpy/cmpyfile"));
  326. }
  327. }
  328. }else if(vFlag == "T") {
  329. if(sel == "02") { // 대상자
  330. if(node.length > 0 && node != null) {
  331. trgtFile = node.item(0).cmt.text + "_" + getCurrentDate() + ".dat";
  332. fMakeFile(trgtFile, model.getValue("/root/main/linkfile/trgt/trgtfile"));
  333. }
  334. }else if(sel == "03") { // 1차 검진결과
  335. if(node.length > 0 && node != null) {
  336. fstRsltFile = node.item(0).cmt.text + "_" + getCurrentDate() + ".dat";
  337. fMakeFile(fstRsltFile,model.getValue("/root/main/linkfile/trgt/fstrsltfile"));
  338. }
  339. }else if(sel == "04") { // 2차 검진결과
  340. if(node.length > 0 && node != null) {
  341. scndRsltFile = node.item(0).cmt.text + "_" + getCurrentDate() + ".dat";
  342. fMakeFile(scndRsltFile,model.getValue("/root/main/linkfile/trgt/scndrsltfile"));
  343. }
  344. }else if(sel == "05") { // 건강검진문진표
  345. if(node.length > 0 && node != null) {
  346. healexamInqrFile = node.item(0).cmt.text + "_" + getCurrentDate() + ".dat";
  347. fMakeFile(healexamInqrFile,model.getValue("/root/main/linkfile/trgt/healexaminqrfile"));
  348. }
  349. }else if(sel == "06") { // 구강검진
  350. if(node.length > 0 && node != null) {
  351. oralFile = node.item(0).cmt.text + "_" + getCurrentDate() + ".dat";
  352. fMakeFile(oralFile,model.getValue("/root/main/linkfile/trgt/oralfile"));
  353. }
  354. }else if(sel == "07") { // 구강문진표
  355. if(node.length > 0 && node != null) {
  356. oralInqrFile = node.item(0).cmt.text + "_" + getCurrentDate() + ".dat";
  357. fMakeFile(oralInqrFile,model.getValue("/root/main/linkfile/trgt/oralinqrfile"));
  358. }
  359. }else if(sel == "08") { //암검진결과(국가암포함)
  360. if(node.length > 0 && node != null) {
  361. oralInqrFile = node.item(0).cmt.text + "_" + getCurrentDate() + ".dat";
  362. fMakeFile(oralInqrFile,model.getValue("/root/main/linkfile/trgt/cancercountryfile"));
  363. }
  364. }else if(sel == "09") { //의료급여암건진결과
  365. if(node.length > 0 && node != null) {
  366. oralInqrFile = node.item(0).cmt.text + "_" + getCurrentDate() + ".dat";
  367. fMakeFile(oralInqrFile,model.getValue("/root/main/linkfile/trgt/cancerfile"));
  368. }
  369. }else if(sel == "10") { //암 문진표
  370. if(node.length > 0 && node != null) {
  371. oralInqrFile = node.item(0).cmt.text + "_" + getCurrentDate() + ".dat";
  372. fMakeFile(oralInqrFile,model.getValue("/root/main/linkfile/trgt/cancerinqrfile"));
  373. }
  374. }
  375. }
  376. }
  377. /****************************************************************************************************
  378. *** 파일을 생성한다.
  379. **************************************************************************************************/
  380. function fMakeFile(vFileName, vFileCont){
  381. if(vFileName == null || vFileCont == "") return;
  382. if(vFileCont == null || vFileCont == "") return;
  383. var defaultFolder = model.getValue("/root/init/datalink/folderpath");
  384. var fso = new ActiveXObject("Scripting.FileSystemObject");
  385. var folderExist = false;
  386. var fileExist = true;
  387. var fileCnt = 0;
  388. //폴더가 존재하는 체크
  389. if(fso.FolderExists(defaultFolder)){
  390. folderExist = true;
  391. }else{
  392. folderExist = false;
  393. fso.CreateFolder(defaultFolder);
  394. }
  395. //파일 존재체크 안됨 - fso.FileExists 오류?
  396. // while(fileExist){
  397. // // 파일이 존재하는 체크
  398. // if(fso.FileExists(defaultFolder + "\\" + vFileName)) {
  399. // fileCnt++;
  400. // }else {
  401. // if(fileCnt > 0) {
  402. // vFileName = "(" + fileCnt + ")" + vFileName;
  403. // }
  404. // fileExist = false;
  405. // }
  406. // }
  407. filePath = defaultFolder + "\\" + vFileName;
  408. //파일 생성
  409. if(filePath != ""){
  410. try{
  411. fso.CreateTextFile(filePath, true, true);
  412. file = fso.OpenTextFile(filePath, 2, true, true);
  413. file.Write(vFileCont);
  414. }catch(err){
  415. alert(err.description);
  416. }finally{
  417. file.close();
  418. }
  419. }
  420. }
  421. /**************************************************************************************************
  422. *** 대상자의 자료연계상태를 저장한다.
  423. **************************************************************************************************/
  424. function fSaveTrgtLinkStat() {
  425. grd_linktrgtlst.clearStatus();
  426. for(var i=0; i < grd_linktrgtlst.rows; i++) {
  427. if("Y" == grd_linktrgtlst.valueMatrix(i , grd_linktrgtlst.colRef("sel"))) {
  428. grd_linktrgtlst.addStatus(i , "insert");
  429. }
  430. }
  431. var trgtStat = getGridUpdateData(grd_linktrgtlst);
  432. if(trgtStat == "") {
  433. messageBox("건진자를","C002");
  434. }else {
  435. model.makeValue("/root/send/save/trgtstat",trgtStat);
  436. if(submit("TXAHA04080")) {
  437. fGetLinkFileTrgtList();
  438. }
  439. }
  440. }
  441. function fSaveCmpyLinkStat() {
  442. grd_linkcmpylst.clearStatus();
  443. for(var i=0; i < grd_linkcmpylst.rows; i++) {
  444. if("Y" == grd_linkcmpylst.valueMatrix(i , grd_linkcmpylst.colRef("sel"))) {
  445. grd_linkcmpylst.addStatus(i , "insert");
  446. }
  447. }
  448. var cmpyStat = getGridUpdateData(grd_linkcmpylst);
  449. if(cmpyStat == "") {
  450. messageBox("건진자를","C002");
  451. }else {
  452. model.makeValue("/root/send/save/cmpystat",cmpyStat);
  453. if(submit("TXAHA04080")) {
  454. fGetLinkFileCmpyList();
  455. }
  456. }
  457. }
  458. ]]>
  459. </script>
  460. </xhtml:head>
  461. <xhtml:body>
  462. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  463. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:119px; height:14px; ">자료연계파일생성</caption>
  464. </group>
  465. <group id="grp_btn" style="left:0px; top:757px; width:1195px; height:27px; ">
  466. <button id="button1" class="btn3_letter8" style="left:5px; top:3px; width:125px; height:22px; ">
  467. <caption>연계파일생성경로</caption>
  468. <script type="javascript" ev:event="DOMActivate">
  469. <![CDATA[
  470. var fileName = window.folderDialog("자료연계파일 생성경로");
  471. model.setValue("/root/init/datalink/folderpath" , fileName);
  472. opt_folderpath.refresh();
  473. ]]>
  474. </script>
  475. </button>
  476. <output id="opt_folderpath" ref="/root/init/datalink/folderpath" style="left:134px; top:4px; width:450px; height:19px; font-weight:bold; "/>
  477. </group>
  478. <button id="btn_delete" class="btn4_letter2" style="left:1136px; top:760px; width:56px; height:22px; ">
  479. <caption>저장</caption>
  480. <script type="javascript" ev:event="DOMActivate">
  481. <![CDATA[
  482. model.resetInstanceNode("/root/send/save/trgtstat");
  483. model.resetInstanceNode("/root/send/save/cmpystat");
  484. if(case_cmpy.selected == true) {
  485. fSaveCmpyLinkStat();
  486. }else if(case_trgt.selected == true) {
  487. fSaveTrgtLinkStat();
  488. }
  489. ]]>
  490. </script>
  491. </button>
  492. <switch id="switch1" style="left:0px; top:110px; width:1195px; height:647px; ">
  493. <case id="case_trgt" selected="true" style="left:0px; top:0px; width:1193px; height:662px; ">
  494. <caption id="caption3" class="tit_2" style="left:5px; top:6px; width:186px; height:14px; ">대상자연계</caption>
  495. <line id="line7" class="line_1" style="x1:5px; y1:25px; x2:1188px; y2:25px; "/>
  496. <datagrid id="grd_linktrgtlst" nodeset="/root/main/linkfiletrgtlst/item" autoresize="true" caption="선택^적용년도^등록번호^성명^건진일자^주민번호^상태^검사내역^국가암대상^대상자^1차검진^2차검진^검진 문진표^구강 검진^구강 문진표^암검진^암 문진표^의료급여암^등록일자^예약등록번호^건진구분^건진상세구분^linkfileflag" colsep="^" colwidth="60, 0, 60, 65, 80, 100, 71, 230, 67, 80, 80, 80, 80, 80, 80, 80, 80, 80, 75, 100, 100, 100, 100" explorerbar="sortshowmove" forecolorfrozen="transparent" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:5px; top:30px; width:1182px; height:610px; ">
  497. <col checkvalue="Y,N" ref="sel" type="checkbox"/>
  498. <col ref="appyear"/>
  499. <col ref="pid" style="text-align:left; "/>
  500. <col ref="hngnm" style="text-align:left; "/>
  501. <col ref="orddd" format="yyyy-mm-dd" style="text-align:center; "/>
  502. <col ref="rrgstno" format="999999-9999999"/>
  503. <col disabled="true" ref="statflag" type="combo" style="text-align:left; ">
  504. <choices>
  505. <itemset nodeset="/root/init/baseinfo/statlst/A0107">
  506. <label ref="cdnm"/>
  507. <value ref="cdid"/>
  508. </itemset>
  509. </choices>
  510. </col>
  511. <col ref="examnm"/>
  512. <col checkvalue="Y,N" disabled="true" ref="cncrcountryyn" type="checkbox"/>
  513. <col disabled="true" ref="trgtlinkflag" type="combo">
  514. <choices>
  515. <itemset nodeset="/root/init/baseinfo/linkflaglst/A0615">
  516. <label ref="cdnm"/>
  517. <value ref="cdid"/>
  518. </itemset>
  519. </choices>
  520. </col>
  521. <col disabled="true" ref="fstrsltlinkflag" type="combo">
  522. <choices>
  523. <itemset nodeset="/root/init/baseinfo/linkflaglst/A0615">
  524. <label ref="cdnm"/>
  525. <value ref="cdid"/>
  526. </itemset>
  527. </choices>
  528. </col>
  529. <col disabled="true" ref="scndrsltlinkflag" type="combo" visibility="hidden">
  530. <choices>
  531. <itemset nodeset="/root/init/baseinfo/linkflaglst/A0615">
  532. <label ref="cdnm"/>
  533. <value ref="cdid"/>
  534. </itemset>
  535. </choices>
  536. </col>
  537. <col disabled="true" ref="healexaminqrlinkflag" type="combo">
  538. <choices>
  539. <itemset nodeset="/root/init/baseinfo/linkflaglst/A0615">
  540. <label ref="cdnm"/>
  541. <value ref="cdid"/>
  542. </itemset>
  543. </choices>
  544. </col>
  545. <col disabled="true" ref="orallinkflag" type="combo">
  546. <choices>
  547. <itemset nodeset="/root/init/baseinfo/linkflaglst/A0615">
  548. <label ref="cdnm"/>
  549. <value ref="cdid"/>
  550. </itemset>
  551. </choices>
  552. </col>
  553. <col disabled="true" ref="oralinqrlinkflag" type="combo">
  554. <choices>
  555. <itemset nodeset="/root/init/baseinfo/linkflaglst/A0615">
  556. <label ref="cdnm"/>
  557. <value ref="cdid"/>
  558. </itemset>
  559. </choices>
  560. </col>
  561. <col disabled="true" ref="cancerlinkflag" type="combo" visibility="hidden">
  562. <choices>
  563. <itemset nodeset="/root/init/baseinfo/linkflaglst/A0615">
  564. <label ref="cdnm"/>
  565. <value ref="cdid"/>
  566. </itemset>
  567. </choices>
  568. </col>
  569. <col disabled="true" ref="cancerinqrlinkflag" type="combo" visibility="hidden">
  570. <choices>
  571. <itemset nodeset="/root/init/baseinfo/linkflaglst/A0615">
  572. <label ref="cdnm"/>
  573. <value ref="cdid"/>
  574. </itemset>
  575. </choices>
  576. </col>
  577. <col disabled="true" ref="medcancerlinkflag" type="combo" visibility="hidden">
  578. <choices>
  579. <itemset nodeset="/root/init/baseinfo/linkflaglst/A0615">
  580. <label ref="cdnm"/>
  581. <value ref="cdid"/>
  582. </itemset>
  583. </choices>
  584. </col>
  585. <col ref="rsrvdd" visibility="hidden" format="yyyy-mm-dd"/>
  586. <col ref="rsrvno" visibility="hidden"/>
  587. <col ref="healexamflag" visibility="hidden"/>
  588. <col ref="healexamdetlflag" visibility="hidden"/>
  589. <col ref="linkfileflag" visibility="hidden"/>
  590. <script type="javascript" ev:event="onaftersort">
  591. <![CDATA[
  592. grd_linktrgtlst.gridToInstance();
  593. ]]>
  594. </script>
  595. <script type="javascript" ev:event="xforms-value-changed">
  596. <![CDATA[
  597. var changVal = grd_linktrgtlst.valueMatrix(grd_linktrgtlst.row,grd_linktrgtlst.col);
  598. for(var i=0 ; i<=grd_linktrgtlst.selectedRows; i++){
  599. grd_linktrgtlst.valueMatrix(grd_linktrgtlst.selectedRow(i), grd_linktrgtlst.col) = changVal;
  600. }
  601. ]]>
  602. </script>
  603. </datagrid>
  604. <button id="btn_linkfiletrgt" class="btn5_letter6" style="left:1102px; top:3px; width:86px; height:19px; ">
  605. <caption>연계파일생성</caption>
  606. <script type="javascript" ev:event="DOMActivate">
  607. <![CDATA[
  608. fSetTrgtLinkFileCret();
  609. ]]>
  610. </script>
  611. </button>
  612. <select1 id="cmb_appyear" ref="/root/send/srchappyear" appearance="minimal" style="left:1033px; top:3px; width:65px; height:19px; ">
  613. <choices>
  614. <itemset nodeset="/root/init/baseinfo/yearlist/S900">
  615. <label ref="cdnm"/>
  616. <value ref="cdid"/>
  617. </itemset>
  618. </choices>
  619. </select1>
  620. </case>
  621. <case id="case_cmpy">
  622. <caption id="caption1" class="tit_2" style="left:5px; top:6px; width:186px; height:14px; ">사업체연계</caption>
  623. <line id="line2" class="line_1" style="x1:5px; y1:25px; x2:1187px; y2:25px; "/>
  624. <datagrid id="grd_linkcmpylst" nodeset="/root/main/linkfilecmpylst/item" caption="선택^적용년도^사업장관리번호^사업장명^건강보험지사^건강보험지사명^민원실구분^영업소코드^영업소명^사업자등록번호^사업장" colsep="^" colwidth="70, 50, 100, 200, 100, 100, 100, 100, 150, 100, 90" explorerbar="sortshowmove" mergecellsfixedrows="bycolrec" rowsep="|" style="left:5px; top:30px; width:1182px; height:610px; ">
  625. <col checkvalue="Y,N" ref="sel" type="checkbox"/>
  626. <col disabled="true" ref="appyear" type="combo">
  627. <choices>
  628. <item>
  629. <label>2009년</label>
  630. <value>2009</value>
  631. </item>
  632. <item>
  633. <label>2010년</label>
  634. <value>2010</value>
  635. </item>
  636. <item>
  637. <label>2011년</label>
  638. <value>2011</value>
  639. </item>
  640. <item>
  641. <label>2012년</label>
  642. <value>2012</value>
  643. </item>
  644. <item>
  645. <label>2013년</label>
  646. <value>2013</value>
  647. </item>
  648. <item>
  649. <label>2014년</label>
  650. <value>2014</value>
  651. </item>
  652. </choices>
  653. </col>
  654. <col ref="cmpyid"/>
  655. <col ref="cmpynm"/>
  656. <col ref="insucorpbrchcd"/>
  657. <col ref="insucorpbrchnm"/>
  658. <col ref="civilaplflag"/>
  659. <col ref="bizoffccd"/>
  660. <col ref="bizoffcnm"/>
  661. <col ref="cmpyno"/>
  662. <col ref="cmpylinkflag" type="combo">
  663. <choices>
  664. <itemset nodeset="/root/init/baseinfo/linkflaglst/A0615">
  665. <label ref="cdnm"/>
  666. <value ref="cdid"/>
  667. </itemset>
  668. </choices>
  669. </col>
  670. <script type="javascript" ev:event="onaftersort">
  671. <![CDATA[
  672. grd_linkcmpylst.gridToInstance();
  673. ]]>
  674. </script>
  675. <script type="javascript" ev:event="xforms-value-changed">
  676. <![CDATA[
  677. var changVal = grd_linkcmpylst.valueMatrix(grd_linkcmpylst.row,grd_linkcmpylst.col);
  678. for( var i = 0 ; i <= grd_linkcmpylst.selectedRows ; i++){
  679. grd_linkcmpylst.valueMatrix(grd_linkcmpylst.selectedRow(i), grd_linkcmpylst.col) = changVal;
  680. }
  681. ]]>
  682. </script>
  683. </datagrid>
  684. <button id="btn_linkfilecmpy" class="btn5_letter6" style="left:1102px; top:5px; width:86px; height:19px; ">
  685. <caption>연계파일생성</caption>
  686. <script type="javascript" ev:event="DOMActivate">
  687. <![CDATA[
  688. fSetCmpyLinkFileCret();
  689. ]]>
  690. </script>
  691. </button>
  692. </case>
  693. </switch>
  694. <group id="group2" style="left:0px; top:19px; width:1194px; height:66px; vertical-align:top; ">
  695. <shape id="roundrect3" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:65px; background-color:#fffbf2; border-color:#ffd799; "/>
  696. <caption id="cap_pat" class="search_name" style="left:836px; top:8px; width:89px; height:17px; ">환자검색 :</caption>
  697. <button id="btn_search" class="btn1_letter2" style="left:1127px; top:22px; width:56px; height:22px; ">
  698. <caption>조회</caption>
  699. <script type="javascript" ev:event="DOMActivate">
  700. <![CDATA[
  701. if(case_trgt.selected == true) {
  702. fGetLinkFileTrgtList();
  703. }else if(case_cmpy.selected == true) {
  704. fGetLinkFileCmpyList();
  705. }
  706. ]]>
  707. </script>
  708. </button>
  709. <line id="line1" style="x1:1116px; y1:7px; x2:1116px; y2:60px; border-color:#ffe4bb; border-left-style:solid; "/>
  710. <caption id="cap_appyear" class="search_name" visibility="hidden" style="left:468px; top:40px; width:86px; height:17px; ">적용년도 :</caption>
  711. <caption id="cap_term" class="search_name" style="left:6px; top:8px; width:204px; height:17px; ">건진기간 : ~</caption>
  712. <input id="ipt_fromdd" ref="/root/send/srchfromdd" inputtype="date" style="left:95px; top:8px; width:85px; height:19px; "/>
  713. <input id="ipt_todd" ref="/root/send/srchtodd" inputtype="date" style="left:194px; top:8px; width:85px; height:19px; "/>
  714. <input id="ipt_pid" ref="/root/send/srchpid" style="left:923px; top:8px; width:67px; height:19px; "/>
  715. <input id="ipt_pnm" ref="/root/send/srchpnm" disabled="true" style="left:1013px; top:8px; width:87px; height:19px; "/>
  716. <button id="btn_searchpat" class="icon_search" style="left:993px; top:10px; width:16px; height:16px; ">
  717. <caption/>
  718. </button>
  719. <caption id="cap_cmpynm" class="search_name" visibility="hidden" style="left:913px; top:35px; width:89px; height:17px; ">사업장명 :</caption>
  720. <caption id="cap_cmpyid" class="search_name" visibility="hidden" style="left:713px; top:35px; width:99px; height:17px; ">사업장코드 :</caption>
  721. <input id="ipt_cmpyid" ref="/root/send/srchcmpyid" visibility="hidden" style="left:812px; top:35px; width:100px; height:19px; "/>
  722. <input id="ipt_cmpynm" ref="/root/send/srchcmpynm" visibility="hidden" style="left:1000px; top:35px; width:100px; height:19px; "/>
  723. <caption id="caption2" class="search_name" style="left:285px; top:9px; width:86px; height:17px; ">건진분류 :</caption>
  724. <select1 id="combo1" ref="/root/send/srchhealexamgubun" appearance="minimal" style="left:375px; top:8px; width:120px; height:19px; ">
  725. <choices>
  726. <itemset nodeset="/root/init/baseinfo/healexamgubun/A0088">
  727. <label ref="cdnm"/>
  728. <value ref="cdid"/>
  729. </itemset>
  730. </choices>
  731. <!--
  732. <script type="javascript" ev:event="xforms-select">
  733. <![CDATA[
  734. btn_search.dispatch("onclick");
  735. ]]>
  736. </script>
  737. -->
  738. </select1>
  739. <caption id="caption4" class="search_name" style="left:500px; top:9px; width:86px; height:17px; ">진행상태 :</caption>
  740. <select1 id="rdo_srchcond" ref="/root/send/srchstatfg" class="radio_search" appearance="full" cols="5" overflow="visible" style="left:585px; top:9px; width:255px; height:20px; border-style:none; ">
  741. <choices>
  742. <item>
  743. <label>전체</label>
  744. <value>A</value>
  745. </item>
  746. <item>
  747. <label>접수</label>
  748. <value>E</value>
  749. </item>
  750. <item>
  751. <label>결과</label>
  752. <value>G</value>
  753. </item>
  754. <item>
  755. <label>결과완료</label>
  756. <value>GY</value>
  757. </item>
  758. <item>
  759. <label>판정</label>
  760. <value>H</value>
  761. </item>
  762. </choices>
  763. <!--
  764. <script type="javascript" ev:event="xforms-select">
  765. <![CDATA[
  766. btn_search.dispatch("onclick");
  767. ]]>
  768. </script>
  769. -->
  770. </select1>
  771. <select1 id="combo2" ref="/root/send/srchflagstat" appearance="minimal" style="left:360px; top:40px; width:100px; height:19px; ">
  772. <choices>
  773. <itemset nodeset="/root/init/baseinfo/linkflaglst/A0615">
  774. <label ref="cdnm"/>
  775. <value ref="cdid"/>
  776. </itemset>
  777. </choices>
  778. </select1>
  779. <caption id="caption5" class="search_name" style="left:220px; top:40px; width:144px; height:17px; ">자료연계상태구분 :</caption>
  780. <caption id="caption7" class="search_name" style="left:6px; top:40px; width:86px; height:17px; ">생성구분 :</caption>
  781. <select1 id="combo4" ref="/root/send/srchflag" appearance="minimal" style="left:95px; top:40px; width:120px; height:19px; ">
  782. <choices>
  783. <itemset nodeset="/root/init/baseinfo/linkfilelst/G099">
  784. <label ref="cdnm"/>
  785. <value ref="cdid"/>
  786. </itemset>
  787. </choices>
  788. <!--
  789. <choices>
  790. <item>
  791. <label>대상자</label>
  792. <value>trgtlinkflag</value>
  793. </item>
  794. <item>
  795. <label>1차검진</label>
  796. <value>fstrsltlinkflag</value>
  797. </item>
  798. <item>
  799. <label>검진문진표</label>
  800. <value>healexaminqrlinkflag</value>
  801. </item>
  802. <item>
  803. <label>구강검진</label>
  804. <value>orallinkflag</value>
  805. </item>
  806. <item>
  807. <label>구강문진표</label>
  808. <value>oralinqrlinkflag</value>
  809. </item>
  810. </choices>
  811. -->
  812. </select1>
  813. </group>
  814. <button id="btn_trgt" class="btn_sw" visibility="visible" group="tab" style="left:0px; top:88px; width:79px; height:22px; ">
  815. <caption>대상자</caption>
  816. <script type="javascript" ev:event="DOMActivate">
  817. <![CDATA[
  818. model.toggle("case_trgt");
  819. btn_trgt.selected = true;
  820. fViewSrchCntrl("0");
  821. ]]>
  822. </script>
  823. </button>
  824. <button id="btn_cmpy" class="btn_sw" visibility="hidden" group="tab" style="left:595px; top:90px; width:79px; height:22px; ">
  825. <caption>사업체</caption>
  826. <script type="javascript" ev:event="DOMActivate">
  827. <![CDATA[
  828. model.toggle("case_cmpy");
  829. btn_cmpy.selected = true;
  830. fViewSrchCntrl("1");
  831. ]]>
  832. </script>
  833. </button>
  834. <select1 id="rdo_linkfileflag" ref="/root/send/srchlinkfileflag" appearance="full" cols="10" overflow="visible" style="left:570px; top:115px; width:100px; height:20px; border-style:none; ">
  835. <choices>
  836. <itemset nodeset="/root/init/baseinfo/linkfilelst/G099">
  837. <label ref="cdnm"/>
  838. <value ref="cdid"/>
  839. </itemset>
  840. </choices>
  841. </select1>
  842. <button id="button2" class="btn4_letter3" visibility="hidden" style="left:956px; top:760px; width:56px; height:22px; ">
  843. <caption>올리기</caption>
  844. <script type="javascript" ev:event="DOMActivate">
  845. <![CDATA[
  846. var fileName = window.fileDialog("open", ",", false, "", "txt", "Text Files(*.txt)|*.txt|All Files (*.*)|*.*");
  847. var fso,ts,tsr;
  848. var cnt = 1;
  849. fso = new ActiveXObject("Scripting.FileSystemObject");
  850. ts = fso.OpenTextFile(fileName);
  851. model.makeNode("/root/main/drug");
  852. //alert(readLine +"\r\n" + txt[0] +" " + txt[1]+ " " + txt[2] + " " + txt[3] + " " + txt[4] + " " + txt[5]);
  853. while(!ts.AtEndOfLine) {
  854. var readLine = ts.ReadLine();
  855. var txt = readLine.split(',');
  856. model.makeNode("/root/main/drug/druglst[" + cnt +"]");
  857. model.makeValue("/root/main/drug/druglst[" + cnt +"]/orddd", txt[0]);
  858. model.makeValue("/root/main/drug/druglst[" + cnt +"]/pid", txt[1]);
  859. model.makeValue("/root/main/drug/druglst[" + cnt +"]/cretno", txt[2]);
  860. model.makeValue("/root/main/drug/druglst[" + cnt +"]/instcd", txt[3]);
  861. model.makeValue("/root/main/drug/druglst[" + cnt +"]/orddeptcd", txt[4]);
  862. model.makeValue("/root/main/drug/druglst[" + cnt +"]/orddrid", txt[5]);
  863. cnt++;
  864. }
  865. ts.Close();
  866. ]]>
  867. </script>
  868. </button>
  869. <button id="button3" class="btn4_letter3" visibility="hidden" style="left:1030px; top:760px; width:68px; height:22px; ">
  870. <caption>보내기</caption>
  871. <script type="javascript" ev:event="DOMActivate">
  872. <![CDATA[
  873. model.makeNode("/root/send/drug");
  874. for(var i=1; i <= getNodesetCount("/root/main/drug/druglst"); i++) {
  875. copyNodesetType("/root/send/drug" , "/root/main/drug/druglst[" + i + "]" , "replace");
  876. submit("TXAHA00105");
  877. }
  878. ]]>
  879. </script>
  880. </button>
  881. </xhtml:body>
  882. </xhtml:html>