SMAYA04200_영적돌봄기록.xrw 63 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693
  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. <patient>
  11. <pid/>
  12. <sex/>
  13. <age/>
  14. <hngnm/>
  15. <engnm/>
  16. <rrgstno1/>
  17. <rrgstno2/>
  18. <brthdd/>
  19. <hometel/>
  20. <mpphontel/>
  21. <zipcd1/>
  22. <zipcd2/>
  23. <zipcdseq/>
  24. <zipcdaddr/>
  25. <detladdr/>
  26. <religncd/>
  27. <vipyn/>
  28. <baptnm/>
  29. <chchnm/>
  30. </patient>
  31. <fthcnst>
  32. <patinfo>
  33. <pid/>
  34. <sex/>
  35. <age/>
  36. <hngnm/>
  37. <engnm/>
  38. <rrgstno1/>
  39. <rrgstno2/>
  40. <brthdd/>
  41. <hometel/>
  42. <mpphontel/>
  43. <zipcd1/>
  44. <zipcd2/>
  45. <zipcdseq/>
  46. <addr/>
  47. <detladdr/>
  48. <religncd/>
  49. <vipyn/>
  50. <baptnm/>
  51. <chchnm/>
  52. </patinfo>
  53. <inptinfo>
  54. <indd/>
  55. <wardnm/>
  56. <roomcd/>
  57. <orddeptnm/>
  58. <medispclnm/>
  59. <fsexamflag/>
  60. <diagnm/>
  61. <cretno/>
  62. <orddeptcd/>
  63. <medispclid/>
  64. <pid/>
  65. <nursreqdd/>
  66. <carefthactreqtype/>
  67. <reqqreqdd/>
  68. <reqdeptcd/>
  69. <cnstformrecseq/>
  70. <patmreqdd/>
  71. <actflag/>
  72. </inptinfo>
  73. <reclist>
  74. <indd/>
  75. <dschdd/>
  76. <diagnm/>
  77. <asesconslrnm/>
  78. <asesrecdd/>
  79. <reqkind/>
  80. <reqdd/>
  81. <repldd/>
  82. <enddd/>
  83. <endresnnm/>
  84. <pid/>
  85. <formrecseq/>
  86. <cretno/>
  87. <reqdeptcd/>
  88. <fsexamflag/>
  89. <formrecdeptcd/>
  90. <cnstformrecseq/>
  91. <carefthactreqtype/>
  92. <asesconslrid/>
  93. <diagformrecseq/>
  94. <planvaluformrecseq/>
  95. <arbtrformrecseq/>
  96. <endformrecseq/>
  97. <endresncd/>
  98. <status/>
  99. </reclist>
  100. </fthcnst>
  101. <paminfo>
  102. <list/>
  103. </paminfo>
  104. <patinfo>
  105. <patinfolist/>
  106. </patinfo>
  107. <popupendflag/>
  108. </main>
  109. <send>
  110. <search>
  111. <pid/>
  112. </search>
  113. <reqdata>
  114. <savedata>
  115. <formrecseq/>
  116. <pid/>
  117. <indd/>
  118. <cretno/>
  119. <reqdd/>
  120. <reqdeptcd/>
  121. <reqkind/>
  122. <fsexamflag/>
  123. <formrecdeptcd/>
  124. <cnstformrecseq/>
  125. <carefthactreqtype/>
  126. <asesconslrid/>
  127. <asesrecdd/>
  128. <diagformrecseq/>
  129. <planvaluformrecseq/>
  130. <arbtrformrecseq/>
  131. <endformrecseq/>
  132. <enddd/>
  133. <endresncd/>
  134. <endresnnm/>
  135. <status/>
  136. </savedata>
  137. </reqdata>
  138. <deldata/>
  139. <saveflag>
  140. <reqkind/>
  141. <status/>
  142. </saveflag>
  143. </send>
  144. <init>
  145. <comdata>
  146. <relign>
  147. <P0157/>
  148. </relign>
  149. <reqkind>
  150. <A0464/>
  151. </reqkind>
  152. <fsexamflag>
  153. <P0021/>
  154. </fsexamflag>
  155. </comdata>
  156. </init>
  157. <hidden/>
  158. <source>
  159. <srchcond/>
  160. <hngnm/>
  161. <rrgstno1/>
  162. <rrgstno2/>
  163. <autoflag/>
  164. </source>
  165. </root>
  166. </instance>
  167. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  168. <submission id="TRZBC00105" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  169. <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  170. <submission id="TRMRF02001" mediatype="application/x-www-form-urlencoded" method="post"/>
  171. <submission id="TRMMR01301" mediatype="application/x-www-form-urlencoded" method="post"/>
  172. <script type="javascript" ev:event="xforms-ready">
  173. <![CDATA[
  174. fFormSetting();
  175. fInit();
  176. ]]>
  177. </script>
  178. <submission id="TRAYA04201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/fthcnst"/>
  179. <submission id="TXAYA04201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/savedinfo"/>
  180. <submission id="TXAYA04202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/deldata" resultref="/root/main/savedinfo"/>
  181. </model>
  182. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  183. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  184. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  185. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  186. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  187. <script type="javascript" src="../../../com/departmentcodeweb/js/common.js"/>
  188. <script type="javascript" src="../../../emr/commonweb/js/EMRCommon.js"/>
  189. <script type="javascript" src="../../../emr/medirecweb/js/MMRCommon.js"/>
  190. <script type="javascript">
  191. <![CDATA[
  192. // form Load시 셋팅값
  193. function fFormSetting()
  194. {
  195. ivw_form.window.javascript.fInitPage(false, false, parseInt(ivw_form.attribute("height")), parseInt(ivw_form.attribute("width")));
  196. // 공통코드
  197. zbcfGetCodeList(new Array("P0157", "A0464", "P0021"), new Array("/root/init/comdata/relign", "/root/init/comdata/reqkind", "/root/init/comdata/fsexamflag"), true);
  198. // 빈서식
  199. //var formcd = "0000000499";
  200. //ivw_form.window.javascript.fLoadNewForm(formcd, false);
  201. switch1.selectedIndex = 0;
  202. model.removeNodeset("/root/main/fthcnst/reclist");
  203. }
  204. // 초기값 셋팅
  205. function fInit()
  206. {
  207. //alert(getUserInfo("usernm"));
  208. //상단 환자 정보 가져오기
  209. model.removeNodeset("/root/main/paminfo");
  210. model.makeNode("/root/main/paminfo");
  211. var node = getGlobalVariable("paminfo"); // 사용자 세션 정보 제공 함수
  212. setCSVToNode("/root/main/paminfo", node); ///root/main/paminfo 노드 경로에 paminfo정보 makevalue
  213. //상단 정보 있는지 유무 체크
  214. if(node != "")
  215. {
  216. model.resetInstanceNode("/root/send/search");
  217. // 환자정보, 진료내역, 의뢰내역
  218. model.setValue("/root/send/search/pid", model.getValue("/root/main/paminfo/list/pid"));
  219. fSearch();
  220. }
  221. model.refresh();
  222. }
  223. // 환자정보 PopUp
  224. function fPatPopUp()
  225. {
  226. modal("SPAYA05300", "1","150", "150", "SPAYA05300", "/root/source", "/root/send");
  227. if (model.getValue("/root/main/popupendflag") == "ok")
  228. {
  229. model.resetInstanceNode("/root/send/search");
  230. // 환자정보, 진료내역, 의뢰내역
  231. model.setValue("/root/send/search/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  232. // 조회
  233. fSearch();
  234. model.setFocus("ipt_pid");
  235. //model.refresh();
  236. }
  237. model.refresh();
  238. }
  239. // 조회
  240. function fSearch()
  241. {
  242. model.resetInstanceNode("/root/send/saveflag");
  243. // reqGetFthCnstInfo
  244. if (submit("TRAYA04201", false) == true)
  245. {
  246. model.copyNode("/root/main/patient", "/root/main/fthcnst/patinfo");
  247. model.resetInstanceNode("/root/send/saveflag");
  248. ivw_form.src = "../../../emr/medirecweb/xrw/SMMMR00000_Empty.xrw"; //빈서식 로딩
  249. var nodecnt = model.instances(0).selectNodes("/root/main/fthcnst/reclist").length; //영적돌봄이력
  250. var endyn = "N";
  251. for (var i = 1; i <= nodecnt; i++)
  252. {
  253. var enddd = model.getValue("/root/main/fthcnst/reclist[" + i + "]/enddd");
  254. if (enddd == "") //종결일자가 없으면 endyn Y로 셋팅
  255. {
  256. endyn = "Y";
  257. break;
  258. }
  259. }
  260. //alert('nodecnt:' + nodecnt);
  261. //alert('endyn : ' + endyn);
  262. //alert('enddd : ' + enddd);
  263. // 조회건이 없으면 신규 (영적돌봄이력이 없으면 status i로 저장)
  264. if (nodecnt == 0)
  265. {
  266. model.setValue("/root/send/saveflag/status", "i");
  267. // 의뢰유형 셋팅 1: 간호정보조사지, 2: 타과의뢰, 3:기타의뢰, 4:원목자선정 중 환자관리에서 넘겨받은 값으로 셋팅
  268. fReqKindSetting();
  269. }
  270. else
  271. {
  272. // 수정
  273. if (endyn == "Y")
  274. {
  275. model.setValue("/root/send/saveflag/status", "u");
  276. // 영적돌봄이력이 있으면서 종결되지 않은 건 status u로 셋팅
  277. //grd_list.select(1,1) = true;
  278. fReqKindSetting();
  279. // 의뢰유형 셋팅 1: 간호정보조사지, 2: 타과의뢰, 3:기타의뢰, 4:원목자선정 중 환자관리에서 넘겨받은 값으로 셋팅
  280. }
  281. else
  282. {
  283. // 신규
  284. // 영적돌봄이력이 있으면서 종결되었을 때 status i로 셋팅
  285. model.setValue("/root/send/saveflag/status", "i");
  286. fReqKindSetting();
  287. // 의뢰유형 셋팅 1: 간호정보조사지, 2: 타과의뢰, 3:기타의뢰, 4:원목자선정 중 환자관리에서 넘겨받은 값으로 셋팅
  288. }
  289. }
  290. /*
  291. ivw_form.src= "../../../emr/medirecweb/xrw/SSMMR01100_서식로더.xrw";
  292. ivw_form.window.javascript.fInitPage(false, false, parseInt(ivw_form.attribute("height")), parseInt(ivw_form.attribute("width")));
  293. var pid = model.getValue("/root/main/fthcnst/inptinfo/pid");
  294. var indd = model.getValue("/root/main/fthcnst/inptinfo/indd");
  295. var cretno = model.getValue("/root/main/fthcnst/inptinfo/cretno");
  296. var ioflag = "I";
  297. if (pid != "")
  298. {
  299. ivw_form.window.javascript.fSetPamInfo(pid, indd, cretno, ioflag);
  300. // 빈서식
  301. var formcd = "0000000499";
  302. ivw_form.window.javascript.fLoadNewForm(formcd);
  303. }
  304. */
  305. }
  306. }
  307. // 저장
  308. function fSave() // C: 신규, U : 수정, D :삭제 M : 기록일시 부제목만 변경
  309. {
  310. var status = model.getValue("/root/send/saveflag/status");
  311. var userid = getUserInfo("userid");
  312. var sPassData =
  313. "formrecseq" //사정기록번호
  314. + "▦pid" //등록번호
  315. + "▦indd" //입원일자
  316. + "▦cretno" //생성번호
  317. + "▦reqdd" //의뢰일자
  318. + "▦reqdeptcd" //의뢰부서
  319. + "▦reqkind" //의뢰유형
  320. + "▦fsexamflag" //초재진구분
  321. + "▦formrecdeptcd" //진료과코드
  322. + "▦cnstformrecseq" //컨설트기록번호
  323. + "▦carefthactreqtype" //간호정보지 원목유형
  324. + "▦asesconslrid" //영적사정원목자
  325. + "▦asesrecdd" //영적사정기록일
  326. + "▦diagfrmrecseq" //영적진단 기록번호
  327. + "▦planvaluformrecseq" //영적계획및 중재 기록번호
  328. + "▦arbtrformrecseq" //영적중결 기록번호
  329. + "▦endformrecseq" //영적종결 기록번호
  330. + "▦enddd" //종결일자
  331. + "▦endresncd" //종결사유코드
  332. + "▦endresnnm" //종결사유명
  333. + "▦stage" //단계
  334. + "▦status" //상태
  335. + "▩" ;
  336. var stage = switch1.selectedIndex; //영적 사정 탭
  337. //alert("11111"+ status);
  338. if(status == "u")
  339. {
  340. var lrow = grd_list.row; //클릭한 로우
  341. if (userid != model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/asesconslrid"))
  342. {
  343. messageBox("해당 환자의 영적돌봄담당자만 기록지처리를 할 수 있습니다" + "\n\r" + "담당자가", "E004" );
  344. return;
  345. }
  346. var enddd = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/enddd"); //클릭한 로우의 종결일자
  347. // // 종결인 경우 사정만 신규로 작성 가능
  348. //alert(enddd);
  349. // if (enddd != "")
  350. // {
  351. // if (stage != 0)
  352. // {
  353. // messageBox("종결된 기록지는 변경처리 할 수", "I004");
  354. // return;
  355. // }
  356. //
  357. // }
  358. var diagformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/diagformrecseq"); //영적진단 기록번호
  359. var planvaluformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/planvaluformrecseq"); //영적계획및 중재 기록번호
  360. var arbtrformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/arbtrformrecseq"); //영적중결 기록번호
  361. var endformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/endformrecseq"); //영적종결 기록번호
  362. // Iviewer 체크
  363. if ( !fCheckIviewer() ) return;
  364. //alert("체크성공");
  365. var endresncd = "";
  366. var endresnnm = "";
  367. // 서식상태 설정
  368. fDocuStatus();
  369. //model.setValue("/root/send/reqdata/formrec/status", "U");
  370. var status = "u";
  371. // 종결인 경우 사정만 신규로 작성 가능
  372. if (enddd != "")
  373. {
  374. if (stage == 0)
  375. {
  376. var btn = messageBox("", "S005");
  377. if (btn == '7')
  378. {
  379. //
  380. var endyn = "N";
  381. for (var i = 1; i <= getNodesetCount("/root/main/fthcnst/reclist") ; i++)
  382. {
  383. enddd = model.getValue("/root/main/fthcnst/reclist[" + i + "]/enddd");
  384. if (enddd == "")
  385. {
  386. endyn = "Y";
  387. }
  388. }
  389. // 종결안된 것이 있으면
  390. if (endyn == "Y")
  391. {
  392. messageBox("종결처리되지 않은 영적기록지가 있습니다. 신규기록지 작성을 할 수", "I004");
  393. model.refresh();
  394. return;
  395. }
  396. var userid = getUserInfo("userid");
  397. var formrecdeptcd = getUserInfo("dutplcecd");
  398. var formrecdeptnm = getUserInfo("dutplcenm");
  399. var formrecusernm = getUserInfo("usernm");
  400. var formrecdeptcd = getUserInfo("dutplcecd");
  401. var formrecdd = getCurrentDate();
  402. var times=getCurrentTime();
  403. var formrechm=times.substr(0,4);
  404. var pid = model.getValue("/root/main/fthcnst/inptinfo/pid");
  405. var indd = model.getValue("/root/main/fthcnst/inptinfo/indd");
  406. var cretno = model.getValue("/root/main/fthcnst/inptinfo/cretno");
  407. var orddeptcd=model.getValue("/root/main/fthcnst/inptinfo/orddeptcd");
  408. var formrecdeptcd = model.getValue("/root/main/fthcnst/inptinfo/orddeptcd");
  409. var orddrid=model.getValue("/root/main/fthcnst/inptinfo/medispclid");
  410. var ioflag = "I";
  411. ivw_form.window.javascript.fSetFormRec("status", "C");
  412. ivw_form.window.javascript.fSetFormRec("pid", pid);
  413. ivw_form.window.javascript.fSetFormRec("orddd", indd); //indd
  414. ivw_form.window.javascript.fSetFormRec("orddrid", orddrid);
  415. ivw_form.window.javascript.fSetFormRec("cretno", cretno);
  416. ivw_form.window.javascript.fSetFormRec("orddeptcd", formrecdeptcd);
  417. ivw_form.window.javascript.fSetFormRec("formrecdeptcd", formrecdeptcd); // 기록시점의 원무정보 진료과'; 서식 작성한 진료과 orddeptcd 로그인한 사람의 부서 DUTPLCECD
  418. ivw_form.window.javascript.fSetFormRec("formrecdeptnm", formrecdeptnm);
  419. ivw_form.window.javascript.fSetFormRec("formrecuserid", userid); //userid
  420. ivw_form.window.javascript.fSetFormRec("formrecusernm", formrecusernm);
  421. ivw_form.window.javascript.fSetFormRec("formrecdd", formrecdd); //기록시점의 날짜 현재
  422. ivw_form.window.javascript.fSetFormRec("formrechm", formrechm); // 몇시 몇분
  423. ivw_form.window.javascript.fSetFormRec("espiseq", 0);
  424. //ivw_form.window.javascript.fSetPamInfo(pid, indd, cretno, ioflag);
  425. if ( !fCheckIviewer() ) return;
  426. model.setValue("/root/send/reqdata/formrec/status", "C"); //신규
  427. status = "i";
  428. var diagformrecseq = "0"; //영적진단 기록번호
  429. var planvaluformrecseq = "0"; //영적계획및 중재 기록번호
  430. var arbtrformrecseq = "0"; //영적중결 기록번호
  431. var endformrecseq = "0"; //영적종결 기록번호
  432. var enddd = ""; //종결일자
  433. var endresncd = ""; //종결사유코드
  434. var endresnnm = ""; //종결사유명
  435. //alert(status);
  436. //의뢰유형 및 의뢰일자 셋팅
  437. model.resetInstanceNode("/root/send/saveflag/reqkind"); //그리드 클릭한 의뢰유형 값 초기화
  438. model.refresh();
  439. fReqKindSetting(); //의뢰 유형 셋팅 (그리드 클릭했을 땐 클릭한 그리드의 의뢰유형값이 저장되어 있으므로)
  440. var reqdd = "";
  441. var reqkind = model.getValue("/root/send/saveflag/reqkind");
  442. if (reqkind == "1")
  443. {
  444. if (model.getValue("/root/main/fthcnst/inptinfo/nursreqdd") == "")
  445. {
  446. messageBox("간호정보조사지 정보가", "I004");
  447. return;
  448. }
  449. reqdd = model.getValue("/root/main/fthcnst/inptinfo/nursreqdd");
  450. }
  451. else if (reqkind == "2")
  452. {
  453. if (model.getValue("/root/main/fthcnst/inptinfo/reqqreqdd") == "")
  454. {
  455. messageBox("타과의뢰 정보가", "I004");
  456. return;
  457. }
  458. reqdd = model.getValue("/root/main/fthcnst/inptinfo/reqqreqdd");
  459. }
  460. else if (reqkind == "3")
  461. {
  462. if (model.getValue("/root/main/fthcnst/inptinfo/patmreqdd") == "")
  463. {
  464. messageBox("기타의뢰 정보가", "I004");
  465. return;
  466. }
  467. reqdd= model.getValue("/root/main/fthcnst/inptinfo/patmreqdd");
  468. }
  469. else
  470. {
  471. if (model.getValue("/root/main/fthcnst/inptinfo/patmreqdd") == "")
  472. {
  473. messageBox("원목자선정 정보가", "I004");
  474. return;
  475. }
  476. reqdd= model.getValue("/root/main/fthcnst/inptinfo/patmreqdd");
  477. }
  478. }
  479. else if(btn == '2')
  480. {
  481. return;
  482. }
  483. // 수정일때
  484. var reqdd = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqdd") //의뢰일자
  485. var reqkind = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqkind") //의뢰유형
  486. }
  487. if (stage == "1"){
  488. var btn = messageBox("", "Q016");
  489. if(btn == '7'){
  490. return;
  491. }
  492. var reqdd = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqdd") //의뢰일자
  493. var reqkind = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqkind") //의뢰유형
  494. }
  495. if (stage == "2"){
  496. var btn = messageBox("", "Q016");
  497. if(btn == '7'){
  498. return;
  499. }
  500. var reqdd = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqdd") //의뢰일자
  501. var reqkind = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqkind") //의뢰유형
  502. }
  503. if (stage == "3"){
  504. var btn = messageBox("", "Q016");
  505. if(btn == '7'){
  506. return;
  507. }
  508. var reqdd = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqdd") //의뢰일자
  509. var reqkind = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqkind") //의뢰유형
  510. }
  511. if (stage == "4"){
  512. var btn = messageBox("", "Q016");
  513. if(btn == '7'){
  514. return;
  515. }
  516. var enddd = ivw_form.window.javascript.getFormItemValue("0013319");
  517. if (enddd.reccnts == "")
  518. {
  519. messageBox("종결일자를","C001");
  520. return;
  521. }
  522. var aa = enddd.reccnts;
  523. var enddd = aa.setReplaceWord("-", "");
  524. var endresn = ivw_form.window.javascript.getFormItemValue("0016904");
  525. endresncd = endresn.rectermcd;
  526. endresnnm = endresn.rectermnm;
  527. var reqdd = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqdd") //의뢰일자
  528. var reqkind = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqkind") //의뢰유형
  529. }
  530. var CurrentDate = getCurrentDate();
  531. sPassData = sPassData
  532. + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/formrecseq") //사정기록번호
  533. + "▦" + model.getValue("/root/main/fthcnst/inptinfo/pid") //등록번호
  534. + "▦" + model.getValue("/root/main/fthcnst/inptinfo/indd") //입원일자
  535. + "▦" + model.getValue("/root/main/fthcnst/inptinfo/cretno") //생성번호
  536. + "▦" + reqdd //의뢰일자
  537. + "▦" + model.getValue("/root/main/fthcnst/inptinfo/reqdeptcd") //의뢰부서
  538. + "▦" + reqkind //의뢰유형
  539. + "▦" + model.getValue("/root/main/fthcnst/inptinfo/fsexamflag") //초재진구분
  540. + "▦" + model.getValue("/root/main/fthcnst/inptinfo/orddeptcd") //진료과코드
  541. + "▦" + model.getValue("/root/main/fthcnst/inptinfo/cnstformrecseq") //컨설트기록번호
  542. + "▦" + model.getValue("/root/main/fthcnst/inptinfo/carefthactreqtype") //간호정보지 원목유형
  543. + "▦" + userid //영적사정원목자
  544. + "▦" + CurrentDate //영적사정기록일
  545. + "▦" + diagformrecseq //영적진단 기록번호
  546. + "▦" + planvaluformrecseq //영적계획및 중재 기록번호
  547. + "▦" + arbtrformrecseq //영적중결 기록번호
  548. + "▦" + endformrecseq //영적종결 기록번호
  549. + "▦" + enddd //종결일자
  550. + "▦" + endresncd //종결사유코드
  551. + "▦" + endresnnm //종결사유명
  552. + "▦" + stage //단계
  553. + "▦" + status //상태
  554. + "▩" ;
  555. model.removeNodeset("/root/send/reqdata/savedata");
  556. model.makeNode("/root/send/reqdata/savedata");
  557. model.setValue("/root/send/reqdata/savedata", sPassData);
  558. }
  559. // 수정이면서 종결 일자가 없는 것(정상적인 수정인 경우)
  560. else
  561. {
  562. if (stage == "4")
  563. {
  564. var enddd = ivw_form.window.javascript.getFormItemValue("0013319");
  565. if (enddd.reccnts == "")
  566. {
  567. messageBox("종결일자를","C001");
  568. return;
  569. }
  570. var aa = enddd.reccnts;
  571. var enddd = aa.setReplaceWord("-", "");
  572. var endresn = ivw_form.window.javascript.getFormItemValue("0016904");
  573. endresncd = endresn.rectermcd;
  574. endresnnm = endresn.rectermnm;
  575. }
  576. sPassData = sPassData
  577. + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/formrecseq") //사정기록번호
  578. + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/pid") //등록번호
  579. + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/indd") //입원일자
  580. + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/cretno") //생성번호
  581. + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqdd") //의뢰일자
  582. + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqdeptcd") //의뢰부서
  583. + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqkind") //의뢰유형
  584. + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/fsexamflag") //초재진구분
  585. + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/formrecdeptcd") //진료과코드
  586. + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/cnstformrecseq") //컨설트기록번호
  587. + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/carefthactreqtype") //간호정보지 원목유형
  588. + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/asesconslrid") //영적사정원목자
  589. + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/asesrecdd") //영적사정기록일
  590. + "▦" + diagformrecseq //영적진단 기록번호
  591. + "▦" + planvaluformrecseq //영적계획및 중재 기록번호
  592. + "▦" + arbtrformrecseq //영적중결 기록번호
  593. + "▦" + endformrecseq //영적종결 기록번호
  594. + "▦" + enddd //종결일자
  595. + "▦" + endresncd //종결사유코드
  596. + "▦" + endresnnm //종결사유명
  597. + "▦" + stage //단계
  598. + "▦" + status //상태
  599. + "▩" ;
  600. model.removeNodeset("/root/send/reqdata/savedata");
  601. model.makeNode("/root/send/reqdata/savedata");
  602. model.setValue("/root/send/reqdata/savedata", sPassData);
  603. }
  604. }
  605. else if(status == "" || status == "i")
  606. {
  607. if (switch1.selectedIndex != "0")
  608. {
  609. messageBox("신규 기록지는 영적사정기록지부터", "C001");
  610. return;
  611. }
  612. // 의뢰유형 체크 및 의뢰일자 셋팅
  613. // 1: 간호정보조사지, 2: 타과의뢰, 3:기타의뢰, 4:원목자선정
  614. var reqdd = "";
  615. var reqkind = model.getValue("/root/send/saveflag/reqkind");
  616. if (reqkind == "1")
  617. {
  618. if (model.getValue("/root/main/fthcnst/inptinfo/nursreqdd") == "")
  619. {
  620. messageBox("간호정보조사지 정보가", "I004");
  621. return;
  622. }
  623. reqdd = model.getValue("/root/main/fthcnst/inptinfo/nursreqdd");
  624. }
  625. else if (reqkind == "2")
  626. {
  627. if (model.getValue("/root/main/fthcnst/inptinfo/reqqreqdd") == "")
  628. {
  629. messageBox("타과의뢰 정보가", "I004");
  630. return;
  631. }
  632. reqdd = model.getValue("/root/main/fthcnst/inptinfo/reqqreqdd");
  633. }
  634. else if (reqkind == "3")
  635. {
  636. if (model.getValue("/root/main/fthcnst/inptinfo/patmreqdd") == "")
  637. {
  638. messageBox("기타의뢰 정보가", "I004");
  639. return;
  640. }
  641. reqdd= model.getValue("/root/main/fthcnst/inptinfo/patmreqdd");
  642. }
  643. else
  644. {
  645. if (model.getValue("/root/main/fthcnst/inptinfo/patmreqdd") == "")
  646. {
  647. messageBox("원목자선정 정보가", "I004");
  648. return;
  649. }
  650. reqdd= model.getValue("/root/main/fthcnst/inptinfo/patmreqdd");
  651. }
  652. //===========================================================================================================
  653. // 서식 데이터를 가져오기
  654. //===========================================================================================================
  655. if ( !fCheckIviewer() ) return;
  656. //===========================================================================================================
  657. model.setValue("/root/send/reqdata/formrec/status", "C"); //신규저장의미 status C
  658. var CurrentDate = getCurrentDate();
  659. // 저장
  660. model.resetInstanceNode("/root/send/reqdata/savedata");
  661. var pid = model.getValue("/root/main/fthcnst/inptinfo/pid");
  662. var indd = model.getValue("/root/main/fthcnst/inptinfo/indd");
  663. var cretno = model.getValue("/root/main/fthcnst/inptinfo/cretno");
  664. var reqdeptcd = model.getValue("/root/main/fthcnst/inptinfo/reqdeptcd");
  665. var fsexamflag = model.getValue("/root/main/fthcnst/inptinfo/fsexamflag");
  666. var formrecdeptcd = model.getValue("/root/main/fthcnst/inptinfo/orddeptcd");
  667. var cnstformrecseq = model.getValue("/root/main/fthcnst/inptinfo/cnstformrecseq");
  668. var carefthactreqtype = model.getValue("/root/main/fthcnst/inptinfo/carefthactreqtype");
  669. //var carefthactreqtype = "";
  670. var asesconslrid = userid;
  671. var asesrecdd = CurrentDate;
  672. var status = "i";
  673. var enddd = "";
  674. var endresncd = "";
  675. var endresnnm = "";
  676. if (stage == "4")
  677. {
  678. var enddd = ivw_form.window.javascript.getFormItemValue("0013319");
  679. if (enddd.reccnts == "")
  680. {
  681. messageBox("종결일자를","C001");
  682. return;
  683. }
  684. var aa = enddd.reccnts;
  685. var enddd = aa.setReplaceWord("-", "");
  686. var endresn = ivw_form.window.javascript.getFormItemValue("0016904");
  687. endresncd = endresn.rectermcd;
  688. endresnnm = endresn.rectermnm;
  689. }
  690. sPassData = sPassData
  691. + "0" //사정기록번호
  692. + "▦" + pid //등록번호
  693. + "▦" + indd //입원일자
  694. + "▦" + cretno //생성번호
  695. + "▦" + reqdd //의뢰일자
  696. + "▦" + reqdeptcd //의뢰부서
  697. + "▦" + reqkind //의뢰유형
  698. + "▦" + fsexamflag //초재진구분
  699. + "▦" + formrecdeptcd //진료과코드
  700. + "▦" + cnstformrecseq //컨설트기록번호
  701. + "▦" + carefthactreqtype //간호정보지 원목유형
  702. + "▦" + asesconslrid //영적사정원목자
  703. + "▦" + asesrecdd //영적사정기록일
  704. + "▦" + "0" //영적진단 기록번호
  705. + "▦" + "0" //영적계획및 중재 기록번호
  706. + "▦" + "0" //영적중결 기록번호
  707. + "▦" + "0" //영적종결 기록번호
  708. + "▦" + enddd //종결일자
  709. + "▦" + endresncd //종결사유코드
  710. + "▦" + endresnnm //종결사유명
  711. + "▦" + stage //단계
  712. + "▦" + status //상태
  713. + "▩" ;
  714. // alert(sPassData);
  715. model.removeNodeset("/root/send/reqdata/savedata");
  716. model.makeNode("/root/send/reqdata/savedata");
  717. model.setValue("/root/send/reqdata/savedata", sPassData);
  718. }
  719. //alert("YYYYYYYYY");
  720. //alert(model.getValue("/root/send/reqdata"));
  721. if (submit("TXAYA04201", false) == true)
  722. {
  723. //ivw_form.src = "../../../emr/medirecweb/xrw/SMMMR00000_Empty.xrw";
  724. messageBox("저장이", "I002");
  725. fSearch();
  726. }
  727. }
  728. // 저장시 필수체크 여부
  729. function fCheckPatmDate()
  730. {
  731. var status = model.getValue("/root/send/saveflag/status");
  732. var userid = getUserInfo("userid");
  733. if (model.getValue("/root/send/saveflag/reqkind") == "") {
  734. messageBox("의뢰유형을 ","C001");
  735. model.setFocus("rdo_reqkind");
  736. return false;
  737. }
  738. if (model.getValue("/root/main/patient/pid") == "") {
  739. messageBox("등록번호를 ","C001");
  740. model.setFocus("ipt_pid");
  741. return false;
  742. }
  743. if (ivw_form.src != "../../../emr/medirecweb/xrw/SSMMR01100_서식로더.xrw")
  744. {
  745. messageBox("저장할 기록지를 ","C002");
  746. return false;
  747. }
  748. return true;
  749. }
  750. // Iviewer 체크
  751. function fCheckIviewer()
  752. {
  753. //alert("successflag1111");
  754. var successflag = "";
  755. ivw_form.window.javascript.gSubmitSaveFlag = false;
  756. setParameter("chkdeptpresave", "N");
  757. successflag = ivw_form.window.javascript.fClickSave("N");
  758. //alert("successflag"+successflag);
  759. if(!successflag)
  760. {
  761. //messageBox("저장되지", "E007");
  762. return false;
  763. }
  764. model.removeNodeset("/root/send/reqdata/recitem");
  765. model.removeNodeset("/root/send/reqdata/formrec");
  766. //model.makeNode("/root/send/reqdata/recitem");
  767. model.makeNode("/root/send/reqdata/formrec");
  768. copyNodeset("/root/send/reqdata/formrec", "/root/send/saverecinfo/formrec" ,"replace" , model, ivw_form.model);
  769. model.makeValue("/root/send/reqdata/recitem", ivw_form.model.getValue("/root/send/saverecinfo/recitem"));
  770. return true;
  771. }
  772. // 서식 상태(신규, 수정)
  773. function fDocuStatus()
  774. {
  775. var lrow = grd_list.row;
  776. var formrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/formrecseq");
  777. var diagformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/diagformrecseq");
  778. var planvaluformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/planvaluformrecseq");
  779. var arbtrformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/arbtrformrecseq");
  780. var endformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/endformrecseq");
  781. var ind = switch1.selectedIndex; // 탭 클릭 순서
  782. if (ind == "0")
  783. {
  784. model.setValue("/root/send/reqdata/formrec/status", "U");
  785. }
  786. else if(ind == "1")
  787. {
  788. if (diagformrecseq != "" && diagformrecseq != "0")
  789. {
  790. model.setValue("/root/send/reqdata/formrec/status", "U");
  791. }
  792. else
  793. {
  794. model.setValue("/root/send/reqdata/formrec/status", "C");
  795. }
  796. }
  797. else if (ind == "2")
  798. {
  799. if (planvaluformrecseq != "" && planvaluformrecseq != "0")
  800. {
  801. model.setValue("/root/send/reqdata/formrec/status", "U");
  802. }
  803. else
  804. {
  805. model.setValue("/root/send/reqdata/formrec/status", "C");
  806. }
  807. }
  808. else if (ind == "3")
  809. {
  810. if (arbtrformrecseq != "" && arbtrformrecseq != "0")
  811. {
  812. model.setValue("/root/send/reqdata/formrec/status", "U");
  813. }
  814. else
  815. {
  816. model.setValue("/root/send/reqdata/formrec/status", "C");
  817. }
  818. }
  819. else if (ind == "4")
  820. {
  821. if (endformrecseq != "" && endformrecseq != "0")
  822. {
  823. model.setValue("/root/send/reqdata/formrec/status", "U");
  824. grd_list.row = 0;
  825. }
  826. else
  827. {
  828. model.setValue("/root/send/reqdata/formrec/status", "C");
  829. grd_list.row = 0;
  830. }
  831. }
  832. }
  833. // 삭제
  834. function fDelete()
  835. {
  836. if (grd_list.rows <= 1) return;
  837. if (grd_list.row < 1) return;
  838. lrow = grd_list.row;
  839. var lrow = grd_list.row;
  840. var userid = getUserInfo("userid");
  841. var enddd = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/enddd"); //종결일자
  842. if (enddd != "")
  843. {
  844. messageBox("종결된 기록지는 삭제할 수", "I004");
  845. return;
  846. }
  847. if (userid != model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/asesconslrid"))
  848. {
  849. messageBox("해당 환자의 영적돌봄담당자만 기록지 처리를 할 수 있습니다" + "\n\r" + "담당자가", "E004" );
  850. return;
  851. }
  852. var btn = messageBox("영적사정/영적진단/영적계획및평가/영적중재 기록이 있는 경우, 기록된 모든 영적사정기록지가 삭제처리 됩니다." + "\n\r" + "선택한 환자의 영적돌봄기록을", "Q001");
  853. if (btn == '6')
  854. {
  855. model.resetInstanceNode("/root/send/deldata");
  856. model.copyNode("/root/send/deldata", "/root/main/fthcnst/reclist[" + lrow + "]");
  857. model.setValue("/root/send/deldata/status", "d");
  858. if (submit("TXAYA04202", false) == true)
  859. {
  860. //ivw_form.src = "../../../emr/medirecweb/xrw/SMMMR00000_Empty.xrw";
  861. //model.resetInstanceNode("/root/send/saveflag/status");
  862. fSearch();
  863. }
  864. }
  865. }
  866. // 그리드 선택
  867. function fGridSelect()
  868. {
  869. //alert("bbb");
  870. var lrow = grd_list.row;
  871. //alert(lrow);
  872. //2008-11-09 영적돌봄기록이력 선택 없이 영적사정 버튼 선택시 미종결 기록 존재하면 메시지 호출
  873. if(lrow < 1){
  874. var endyn = "N";
  875. for (var i = 1; i <= getNodesetCount("/root/main/fthcnst/reclist") ; i++)
  876. {
  877. enddd = model.getValue("/root/main/fthcnst/reclist[" + i + "]/enddd");
  878. if (enddd == "")
  879. {
  880. endyn = "Y";
  881. }
  882. }
  883. // 종결안된 것이 있으면
  884. if (endyn == "Y")
  885. {
  886. messageBox("종결처리되지 않은 영적기록지가 있습니다. 신규기록지 작성을 할 수", "I004");
  887. model.refresh();
  888. return;
  889. }
  890. }
  891. ivw_form.src= "../../../emr/medirecweb/xrw/SSMMR01100_서식로더.xrw";
  892. ivw_form.window.javascript.fInitPage(false, false, parseInt(ivw_form.attribute("height")), parseInt(ivw_form.attribute("width")));
  893. model.makeValue("/root/send/saveflag/reqkind", model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqkind"));
  894. //alert("1="+model.getValue("/root/send/saveflag/status"));
  895. model.setValue("/root/send/saveflag/status", "u");
  896. var formrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/formrecseq");
  897. var diagformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/diagformrecseq");
  898. var planvaluformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/planvaluformrecseq");
  899. var arbtrformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/arbtrformrecseq");
  900. var endformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/endformrecseq");
  901. var pid = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/pid");
  902. var indd = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/indd");
  903. var cretno = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/cretno");
  904. var ioflag = "I";
  905. var ind = switch1.selectedIndex;
  906. //alert("formrecseq="+formrecseq);
  907. if (ind == "0")
  908. {
  909. ivw_form.window.javascript.fLoadRecForm(formrecseq, false);
  910. sStatusIndd = "U";
  911. }
  912. else if(ind == "1") //영적 사정클릭시
  913. {
  914. //alert(ind);
  915. //alert(diagformrecseq);
  916. //alert(diagformrecseq);
  917. if (diagformrecseq != "" && diagformrecseq != "0")
  918. {
  919. //alert(formrecseq);
  920. ivw_form.window.javascript.fLoadRecForm(diagformrecseq, false);
  921. sStatusIndd = "U"; //값이 존재 할 때 수정 플래그 U
  922. }
  923. else
  924. {
  925. ivw_form.window.javascript.fSetPamInfo(pid, indd, cretno, ioflag);
  926. // 빈서식
  927. var formcd = "0000001552";
  928. ivw_form.window.javascript.fLoadNewForm(formcd, false);
  929. sStatusIndd = "C";
  930. }
  931. }
  932. else if (ind == "2") //영적 진단 클릭시
  933. {
  934. if (planvaluformrecseq != "" && planvaluformrecseq != "0")
  935. {
  936. ivw_form.window.javascript.fLoadRecForm(planvaluformrecseq, false);
  937. sStatusIndd = "U";
  938. }
  939. else
  940. {
  941. ivw_form.window.javascript.fSetPamInfo(pid, indd, cretno, ioflag);
  942. // 빈서식
  943. var formcd = "0000000627";
  944. ivw_form.window.javascript.fLoadNewForm(formcd, false);
  945. sStatusIndd = "C";
  946. }
  947. }
  948. else if (ind == "3") //영적 계획 및 평가 클릭시
  949. {
  950. if (arbtrformrecseq != "" && arbtrformrecseq != "0")
  951. {
  952. ivw_form.window.javascript.fLoadRecForm(arbtrformrecseq, false);
  953. sStatusIndd = "U";
  954. }
  955. else
  956. {
  957. ivw_form.window.javascript.fSetPamInfo(pid, indd, cretno, ioflag);
  958. // 빈서식
  959. var formcd = "0000001550";
  960. ivw_form.window.javascript.fLoadNewForm(formcd, false);
  961. sStatusIndd = "C";
  962. }
  963. }
  964. else if (ind == "4") //영적 중재 클릭시
  965. {
  966. if (endformrecseq != "" && endformrecseq != "0")
  967. {
  968. ivw_form.window.javascript.fLoadRecForm(endformrecseq, false);
  969. sStatusIndd = "U";
  970. }
  971. else
  972. {
  973. ivw_form.window.javascript.fSetPamInfo(pid, indd, cretno, ioflag);
  974. sStatusIndd = "C";
  975. // 빈서식
  976. var formcd = "0000002908";
  977. ivw_form.window.javascript.fLoadNewForm(formcd, false);
  978. }
  979. }
  980. }
  981. // 해당서식 보여주기
  982. function fEMRView()
  983. {
  984. //if (grd_list.rows <= 1)
  985. //switch1.selectedIndex = 0;
  986. //return;
  987. var lrow = grd_list.row;
  988. var ind = switch1.selectedIndex;
  989. var status = model.getValue("/root/send/saveflag/status");
  990. //alert("2222"+status);
  991. if (status == "u")
  992. {
  993. fGridSelect();
  994. }
  995. else
  996. {
  997. if (ind != "0")
  998. {
  999. btn_form.selected = true;
  1000. switch1.selectedIndex = 0;
  1001. //return;
  1002. }
  1003. ivw_form.src= "../../../emr/medirecweb/xrw/SSMMR01100_서식로더.xrw";
  1004. ivw_form.window.javascript.fInitPage(false, false, parseInt(ivw_form.attribute("height")), parseInt(ivw_form.attribute("width")));
  1005. var endyn = "N";
  1006. for (var i = 1; i <= getNodesetCount("/root/main/fthcnst/reclist") ; i++)
  1007. {
  1008. enddd = model.getValue("/root/main/fthcnst/reclist[" + i + "]/enddd");
  1009. if (enddd == "")
  1010. {
  1011. endyn = "Y";
  1012. //break;
  1013. }
  1014. }
  1015. // 종결안된 것이 있으면
  1016. if (endyn == "Y")
  1017. //if (false)
  1018. {
  1019. messageBox("종결처리되지 않은 영적기록지가 있습니다. 신규기록지 작성을 할 수", "I004");
  1020. model.refresh();
  1021. return;
  1022. }
  1023. var lrow = grd_list.row;
  1024. var ind = switch1.selectedIndex;
  1025. //그리드선택안했을때
  1026. if (grd_list.rows <= 1)
  1027. {
  1028. if(endyn == "N")
  1029. {
  1030. // 빈서식
  1031. if (ind == "0")
  1032. {
  1033. ivw_form.window.javascript.fSetPamInfo(pid, indd, cretno, ioflag);
  1034. var formcd = "0000000499";
  1035. // 의뢰유형 셋팅
  1036. fReqKindSetting();
  1037. }
  1038. else
  1039. {
  1040. return;
  1041. }
  1042. }
  1043. }
  1044. //alert("dd");
  1045. var pid = model.getValue("/root/main/fthcnst/inptinfo/pid");
  1046. var indd = model.getValue("/root/main/fthcnst/inptinfo/indd");
  1047. var cretno = model.getValue("/root/main/fthcnst/inptinfo/cretno");
  1048. var ioflag = "I";
  1049. // 재원환자인 경우만 신규저장 가능
  1050. if (pid == "")
  1051. {
  1052. messageBox("재원환자가 아닌 경우 신규기록지를 작성 할 수", "I004");
  1053. return;
  1054. }
  1055. //alert("ee");
  1056. ivw_form.window.javascript.fSetPamInfo(pid, indd, cretno, ioflag);
  1057. //alert(ind);
  1058. // 빈서식
  1059. if (ind == "0")
  1060. {
  1061. var formcd = "0000000499";
  1062. // 의뢰유형 셋팅
  1063. fReqKindSetting();
  1064. //alert(formcd);
  1065. }
  1066. else if (ind == "1")
  1067. {
  1068. var formcd = "0000001552";
  1069. }
  1070. else if (ind == "2")
  1071. {
  1072. var formcd = "0000000627";
  1073. //alert(formcd);
  1074. }
  1075. else if (ind == "3")
  1076. {
  1077. var formcd = "0000001550";
  1078. //alert(formcd);
  1079. }
  1080. else if (ind == "4")
  1081. {
  1082. var formcd = "0000002908";
  1083. //alert(formcd);
  1084. }
  1085. //alert(formcd);
  1086. ivw_form.window.javascript.fLoadNewForm(formcd, false);
  1087. if (ind == "0")
  1088. {
  1089. //fITEMVAL();
  1090. //var temp = new ITEMVAL();
  1091. //temp.rectermcd = "";
  1092. //temp.rectermnm = "";
  1093. //temp.reccnts = indd;
  1094. //ivw_form.window.javascript.setFormItemValue("0000824", temp, false);
  1095. }
  1096. }
  1097. model.refresh();
  1098. }
  1099. // 의뢰유형 셋팅
  1100. function fReqKindSetting()
  1101. {
  1102. // 1: 간호정보조사지, 2: 타과의뢰, 3:기타의뢰, 4:원목자선정
  1103. var nursereqdd = model.getValue("/root/main/fthcnst/inptinfo/nursreqdd");
  1104. var reqqreqdd = model.getValue("/root/main/fthcnst/inptinfo/reqqreqdd");
  1105. var patmreqdd = model.getValue("/root/main/fthcnst/inptinfo/patmreqdd");
  1106. var actflag = model.getValue("/root/main/fthcnst/inptinfo/actflag");
  1107. if (reqqreqdd != "")
  1108. {
  1109. model.makeValue("/root/send/saveflag/reqkind", "2");
  1110. }
  1111. else
  1112. {
  1113. if (nursereqdd != "")
  1114. {
  1115. model.makeValue("/root/send/saveflag/reqkind", "1");
  1116. }
  1117. else
  1118. {
  1119. if (actflag == "4")
  1120. {
  1121. model.makeValue("/root/send/saveflag/reqkind", "3");
  1122. }
  1123. else
  1124. {
  1125. if (actflag == "5")
  1126. {
  1127. model.makeValue("/root/send/saveflag/reqkind", "4");
  1128. }
  1129. }
  1130. }
  1131. }
  1132. }
  1133. // 초기화
  1134. function fAllClear()
  1135. {
  1136. btn_form.selected = true;
  1137. switch1.selectedIndex = 0;
  1138. model.resetInstanceNode("/root/main/patient");
  1139. model.resetInstanceNode("/root/main/fthcnst/patinfo");
  1140. model.resetInstanceNode("/root/main/fthcnst/inptinfo");
  1141. model.resetInstanceNode("/root/send/saveflag");
  1142. model.resetInstanceNode("/root/send/reqdata");
  1143. model.removeNodeset("/root/main/fthcnst/reclist");
  1144. ivw_form.src = "../../../emr/medirecweb/xrw/SMMMR00000_Empty.xrw";
  1145. model.refresh();
  1146. }
  1147. //영적돌봄기록지 서식(영적사정)
  1148. var sStatusIndd = "C";
  1149. function fITEMVAL()
  1150. {
  1151. if (sStatusIndd == "C")
  1152. {
  1153. var itemVal = new ITEMVAL();
  1154. var tmp = model.getValue("/root/main/fthcnst/inptinfo/indd"); //freetext
  1155. itemVal.reccnts = tmp.toDate().getDateFormat("YYYY-MM-DD");
  1156. ivw_form.ivw_base.window.javascript.setFormItemValue ("0000824", itemVal, true);
  1157. }
  1158. }
  1159. ]]>
  1160. </script>
  1161. </xhtml:head>
  1162. <xhtml:body guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  1163. <script type="javascript" ev:event="onloadcomplete">
  1164. <![CDATA[
  1165. var ind = switch1.selectedIndex;
  1166. if(ind == 0)
  1167. {
  1168. fITEMVAL();
  1169. }
  1170. ]]>
  1171. </script>
  1172. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  1173. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:147px; height:14px; ">영적돌봄기록</caption>
  1174. </group>
  1175. <group id="group5" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  1176. <line id="line37" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  1177. </group>
  1178. <group id="group2" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  1179. <group id="group8" style="left:5px; top:240px; width:450px; height:115px; ">
  1180. <line id="line2" class="line_1" style="x1:0px; y1:25px; x2:448px; y2:25px; "/>
  1181. <caption id="caption4" class="tit_2" style="left:5px; top:10px; width:95px; height:13px; ">환자재원정보</caption>
  1182. <caption id="caption5" class="cell_1" style="left:-3px; top:34px; width:83px; height:23px; vertical-align:middle; ">입원일</caption>
  1183. <caption id="caption8" class="cell_1" style="left:190px; top:59px; width:78px; height:23px; vertical-align:middle; ">주치의</caption>
  1184. <caption id="caption9" class="cell_1" style="left:190px; top:34px; width:78px; height:23px; vertical-align:middle; ">병동(병실)</caption>
  1185. <line id="line5" class="line_3" style="x1:0px; y1:112px; x2:440px; y2:112px; "/>
  1186. <caption id="caption12" class="cell_1" style="left:-3px; top:59px; width:83px; height:23px; vertical-align:middle; ">진료과</caption>
  1187. <caption id="caption13" class="cell_1" style="left:-3px; top:84px; width:83px; height:23px; vertical-align:middle; ">초재진구분</caption>
  1188. <caption id="caption14" class="cell_1" style="left:190px; top:84px; width:78px; height:23px; vertical-align:middle; ">진단명</caption>
  1189. <output id="opt_indd" ref="/root/main/fthcnst/inptinfo/indd" class="output_fix" navindex="17" format="yyyy-mm-dd" appearance="output" style="left:85px; top:35px; width:100px; height:19px; text-align:center; "/>
  1190. <output id="opt_wardnm" ref="/root/main/fthcnst/inptinfo/wardnm" class="output_fix" navindex="17" appearance="output" style="left:275px; top:35px; width:85px; height:19px; text-align:center; "/>
  1191. <output id="opt_roomcd" ref="/root/main/fthcnst/inptinfo/roomcd" class="output_fix" navindex="17" appearance="output" style="left:365px; top:35px; width:80px; height:19px; text-align:center; "/>
  1192. <output id="opt_orddeptnm" ref="/root/main/fthcnst/inptinfo/orddeptnm" class="output_fix" navindex="17" appearance="output" style="left:85px; top:60px; width:100px; height:19px; "/>
  1193. <output id="opt_medispclnm" ref="/root/main/fthcnst/inptinfo/medispclnm" class="output_fix" navindex="17" appearance="output" style="left:275px; top:60px; width:170px; height:19px; "/>
  1194. <output id="opt_diagnm" ref="/root/main/fthcnst/inptinfo/diagnm" class="output_fix" navindex="17" appearance="output" style="left:275px; top:85px; width:170px; height:19px; "/>
  1195. <select1 id="cmb_fsexamflag" ref="/root/main/fthcnst/inptinfo/fsexamflag" class="combo_default" disabled="true" appearance="minimal" style="left:85px; top:85px; width:100px; height:19px; ">
  1196. <choices>
  1197. <itemset nodeset="/root/init/comdata/fsexamflag/P0021">
  1198. <label ref="cdnm"/>
  1199. <value ref="cdid"/>
  1200. </itemset>
  1201. </choices>
  1202. </select1>
  1203. </group>
  1204. <group id="group3" style="left:455px; top:0px; width:735px; height:740px; ">
  1205. <switch id="switch1" class="sw_box" style="left:0px; top:25px; width:720px; height:680px; border-style:solid; ">
  1206. <case id="case1" selected="true"/>
  1207. <case id="case2"/>
  1208. <case id="case3"/>
  1209. <case id="case4"/>
  1210. <case id="case5"/>
  1211. </switch>
  1212. <group id="group9" style="left:0px; top:708px; width:420px; height:25px; background-color:transparent; border-color:#c0c0c0; ">
  1213. <caption id="caption16" class="cell_1" style="left:5px; top:2px; width:65px; height:23px; vertical-align:middle; ">의뢰유형</caption>
  1214. <shape id="roundrect4" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:72px; top:4px; width:338px; height:21px; background-color:transparent; border-color:#7cbbdd; border-style:solid; "/>
  1215. <select1 id="rdo_reqkind" ref="/root/send/saveflag/reqkind" disabled="true" overflow="visible" appearance="full" cellspacing="6" cols="4" rows="1" style="left:80px; top:6px; width:325px; height:15px; border-style:none; ">
  1216. <choices>
  1217. <itemset nodeset="/root/init/comdata/reqkind/A0464">
  1218. <label ref="cdnm"/>
  1219. <value ref="cdid"/>
  1220. </itemset>
  1221. </choices>
  1222. </select1>
  1223. </group>
  1224. <button id="btn_delete" class="btn5_letter2" style="left:675px; top:710px; width:42px; height:19px; ">
  1225. <caption>삭제</caption>
  1226. <script type="javascript" ev:event="DOMActivate">
  1227. <![CDATA[
  1228. fDelete();
  1229. model.refresh();
  1230. ]]>
  1231. </script>
  1232. </button>
  1233. <iviewer id="ivw_form" src="../../../emr/medirecweb/xrw/SSMMR01100_서식로더.xrw" style="left:5px; top:35px; width:705px; height:665px; "/>
  1234. <button id="btn_form" class="btn_sw" group="tab" selected="true" style="left:0px; top:0px; width:69px; height:22px; ">
  1235. <caption>영적사정</caption>
  1236. <toggle case="case1" ev:event="onclick"/>
  1237. <script type="javascript" ev:event="DOMActivate">
  1238. <![CDATA[
  1239. fEMRView();
  1240. ]]>
  1241. </script>
  1242. </button>
  1243. <button id="btn_diag" class="btn_sw" group="tab" style="left:70px; top:0px; width:69px; height:22px; ">
  1244. <caption>영적진단</caption>
  1245. <!--<toggle case="case2" ev:event="onclick"/> -->
  1246. <script type="javascript" ev:event="DOMActivate">
  1247. <![CDATA[
  1248. switch1.selectedIndex = 1;
  1249. fEMRView();
  1250. ]]>
  1251. </script>
  1252. </button>
  1253. <button id="btn_plan" class="btn_sw" group="tab" style="left:140px; top:0px; width:114px; height:22px; ">
  1254. <caption>영적계획및평가</caption>
  1255. <!-- <toggle case="case3" ev:event="onclick"/>-->
  1256. <script type="javascript" ev:event="DOMActivate">
  1257. <![CDATA[
  1258. switch1.selectedIndex = 2;
  1259. fEMRView();
  1260. ]]>
  1261. </script>
  1262. </button>
  1263. <button id="btn_arbt" class="btn_sw" group="tab" style="left:255px; top:0px; width:89px; height:22px; ">
  1264. <caption>영적중재</caption>
  1265. <!-- <toggle case="case4" ev:event="onclick"/> -->
  1266. <script type="javascript" ev:event="DOMActivate">
  1267. <![CDATA[
  1268. switch1.selectedIndex = 3;
  1269. fEMRView();
  1270. ]]>
  1271. </script>
  1272. </button>
  1273. <button id="btn_end" class="btn_sw" group="tab" style="left:345px; top:0px; width:89px; height:22px; ">
  1274. <caption>종결</caption>
  1275. <!-- <toggle case="case5" ev:event="onclick"/>-->
  1276. <script type="javascript" ev:event="DOMActivate">
  1277. <![CDATA[
  1278. switch1.selectedIndex = 4;
  1279. fEMRView();
  1280. ]]>
  1281. </script>
  1282. </button>
  1283. <button id="btn_tempsave" class="btn5_letter2" style="left:630px; top:710px; width:42px; height:19px; ">
  1284. <caption>저장</caption>
  1285. <script type="javascript" ev:event="DOMActivate">
  1286. <![CDATA[
  1287. if ( !fCheckPatmDate() ) return; //필수 저장여부 체크
  1288. fSave();
  1289. //fInit();
  1290. //fSearch();
  1291. model.refresh();
  1292. //grd_list.row = 1;
  1293. ]]>
  1294. </script>
  1295. </button>
  1296. </group>
  1297. <group id="group4" style="left:5px; top:360px; width:450px; height:380px; ">
  1298. <caption id="caption3" class="tit_2" style="left:5px; top:10px; width:121px; height:14px; ">영적돌봄기록이력</caption>
  1299. <line id="line1" class="line_1" style="x1:0px; y1:25px; x2:448px; y2:25px; "/>
  1300. <button id="btn_grdsize" class="btn2_letter3" style="left:390px; top:4px; width:53px; height:19px; ">
  1301. <caption>펼치기</caption>
  1302. <script type="javascript" ev:event="DOMActivate">
  1303. <![CDATA[
  1304. if( btn_grdsize.attribute("text") == "펼치기"){
  1305. btn_grdsize.attribute("text") = "줄이기";
  1306. grd_list.attribute("width") = parseInt(grd_list.attribute("width")) + parseInt(switch1.attribute("width") ) ;
  1307. group4.attribute("width") = parseInt(group4.attribute("width")) + parseInt(switch1.attribute("width") ) ;
  1308. group3.attribute("height") = 350;
  1309. line1.attribute("x2") = grd_list.attribute("width");
  1310. switch1.refresh();
  1311. ivw_form.model.refresh();
  1312. }
  1313. else {
  1314. btn_grdsize.attribute("text") ="펼치기";
  1315. grd_list.attribute("width") = parseInt(grd_list.attribute("width")) - parseInt(switch1.attribute("width")) ;
  1316. group4.attribute("width") = parseInt(group4.attribute("width")) - parseInt(switch1.attribute("width") ) ;
  1317. group3.attribute("height") = 740;
  1318. line1.attribute("x2") = grd_list.attribute("width");
  1319. ivw_form.model.refresh();
  1320. model.refresh();
  1321. }
  1322. ]]>
  1323. </script>
  1324. </button>
  1325. <datagrid id="grd_list" nodeset="/root/main/fthcnst/reclist" autoresize="true" caption="입원일^퇴원일^진단명^영적사정기록자^영적사정기록일^의뢰유형^의뢰일자^회신일자^원목종결일자^원목종결사유" colsep="^" colwidth="80, 80, 150, 104, 100, 100, 80, 80, 80, 200" frozencols="1" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:30px; width:445px; height:345px; ">
  1326. <col ref="indd" format="yyyy-mm-dd" style="text-align:center; "/>
  1327. <col ref="dschdd" format="yyyy-mm-dd" style="text-align:center; "/>
  1328. <col ref="diagnm"/>
  1329. <col ref="asesconslrnm"/>
  1330. <col ref="asesrecdd" format="yyyy-mm-dd" style="text-align:center; "/>
  1331. <col disabled="true" ref="reqkind" type="combo">
  1332. <choices>
  1333. <itemset nodeset="/root/init/comdata/reqkind/A0464">
  1334. <label ref="cdnm"/>
  1335. <value ref="cdid"/>
  1336. </itemset>
  1337. </choices>
  1338. </col>
  1339. <col ref="reqdd" format="yyyy-mm-dd" style="text-align:center; "/>
  1340. <col ref="repldd" format="yyyy-mm-dd" style="text-align:center; "/>
  1341. <col ref="enddd" format="yyyy-mm-dd" style="text-align:center; "/>
  1342. <col ref="endresnnm"/>
  1343. <script type="javascript" ev:event="onclick">
  1344. <![CDATA[
  1345. if (grd_list.rows <= 1) return;
  1346. if (grd_list.row < 1) return;
  1347. if(grd_list.isCell(event.target) && grd_list.mouseRow >= grd_list.fixedrows)
  1348. {
  1349. //fBiztrgtClick();
  1350. }
  1351. else
  1352. {
  1353. return;
  1354. }
  1355. fGridSelect();
  1356. model.refresh();
  1357. ]]>
  1358. </script>
  1359. </datagrid>
  1360. </group>
  1361. <group id="group6" style="left:5px; top:5px; width:450px; height:235px; ">
  1362. <line id="line22" class="line_3" style="x1:1px; y1:230px; x2:441px; y2:230px; "/>
  1363. <output id="ipt_mpphontel" ref="/root/main/patient/mpphontel" class="output_fix" appearance="output" style="left:320px; top:105px; width:125px; height:19px; "/>
  1364. <caption id="caption10" class="tit_2" style="left:5px; top:10px; width:95px; height:13px; ">기본사항</caption>
  1365. <line id="line14" class="line_2" style="x1:0px; y1:102px; x2:440px; y2:102px; "/>
  1366. <line id="line3" class="line_2" style="x1:0px; y1:78px; x2:440px; y2:78px; "/>
  1367. <line id="line16" class="line_2" style="x1:0px; y1:53px; x2:440px; y2:53px; "/>
  1368. <line id="line4" class="line_1" style="x1:0px; y1:25px; x2:448px; y2:25px; "/>
  1369. <output id="opt_sex" ref="/root/main/patient/sex" class="output_fix" style="left:320px; top:30px; width:49px; height:19px; text-align:center; "/>
  1370. <output id="opt_age" ref="/root/main/patient/age" class="output_fix" style="left:370px; top:30px; width:75px; height:19px; text-align:center; "/>
  1371. <output id="ipt_hometel" ref="/root/main/patient/hometel" class="output_fix" appearance="output" style="left:103px; top:105px; width:135px; height:19px; "/>
  1372. <caption id="caption40" class="cell_1" style="left:0px; top:129px; width:100px; height:23px; ">우편번호/주소</caption>
  1373. <caption id="caption42" class="cell_1" style="left:245px; top:204px; width:70px; height:23px; ">성당정보</caption>
  1374. <caption id="caption43" class="cell_1" style="left:245px; top:179px; width:70px; height:21px; ">VIP여부</caption>
  1375. <caption id="caption21" class="cell_1" style="left:0px; top:30px; width:100px; height:23px; ">환자번호</caption>
  1376. <caption id="caption22" class="cell_1" style="left:0px; top:104px; width:100px; height:23px; ">전화[자택]</caption>
  1377. <caption id="caption56" class="cell_1" style="left:0px; top:204px; width:100px; height:23px; ">세례명</caption>
  1378. <caption id="caption34" class="cell_1" style="left:245px; top:105px; width:70px; height:23px; ">전화[휴대]</caption>
  1379. <caption id="caption23" class="cell_1" style="left:0px; top:55px; width:100px; height:23px; ">성명[한/영]</caption>
  1380. <caption id="caption57" class="cell_1" style="left:245px; top:30px; width:70px; height:23px; ">성별/나이</caption>
  1381. <caption id="caption35" class="cell_1" style="left:0px; top:80px; width:100px; height:23px; ">주민번호</caption>
  1382. <caption id="caption47" class="cell_1" style="left:245px; top:77px; width:70px; height:23px; ">생년월일</caption>
  1383. <caption id="caption37" class="cell_1" style="left:0px; top:179px; width:100px; height:23px; ">종교</caption>
  1384. <caption id="caption39" class="cell_1" style="left:0px; top:154px; width:100px; height:23px; ">상세(하위)주소</caption>
  1385. <button id="btn_pat" class="icon_search" navindex="5" style="left:220px; top:30px; width:16px; height:16px; ">
  1386. <caption/>
  1387. <script type="javascript" ev:event="DOMActivate">
  1388. <![CDATA[
  1389. model.resetInstanceNode("/root/source");
  1390. fPatPopUp();
  1391. ]]>
  1392. </script>
  1393. </button>
  1394. <input id="ipt_pid" ref="/root/main/patient/pid" class="input_s_essential" navindex="1" autonext="false" max="10" style="left:103px; top:31px; width:112px; height:19px; ">
  1395. <script type="javascript" ev:event="onkeypress">
  1396. <![CDATA[
  1397. if(event.keyCode == "13") {
  1398. model.resetInstanceNode("/root/send/search");
  1399. // 환자정보, 진료내역, 의뢰내역
  1400. model.setValue("/root/send/search/pid", ipt_pid.currentText);
  1401. // 조회
  1402. fSearch();
  1403. model.refresh();
  1404. //grd_list.row = 1;
  1405. }
  1406. ]]>
  1407. </script>
  1408. </input>
  1409. <input id="ipt_hngnm" ref="/root/main/patient/hngnm" class="input_s_essential" navindex="2" autonext="false" imemode="hangul" style="left:103px; top:56px; width:137px; height:19px; ">
  1410. <script type="javascript" ev:event="onkeydown">
  1411. <![CDATA[
  1412. if(event.keyCode == "13")
  1413. {
  1414. model.resetInstanceNode("/root/source");
  1415. model.setValue("/root/source/srchcond", "2");
  1416. model.setValue("/root/source/hngnm", ipt_hngnm.currentText);
  1417. model.setValue("/root/source/autoflag","Y")
  1418. fPatPopUp();
  1419. //inputEnterKey("btn_pat", "DOMActivate");
  1420. }
  1421. ]]>
  1422. </script>
  1423. </input>
  1424. <output id="opt_engnm" ref="/root/main/patient/engnm" class="output_fix" appearance="output" style="left:245px; top:56px; width:200px; height:19px; "/>
  1425. <input id="ipt_rrgstno1" ref="/root/main/patient/rrgstno1" class="input_s_essential" navindex="3" autonext="false" format="999999" style="left:103px; top:81px; width:62px; height:19px; text-align:center; ">
  1426. <script type="javascript" ev:event="onkeydown">
  1427. <![CDATA[
  1428. if(event.keyCode == "13")
  1429. {
  1430. model.resetInstanceNode("/root/source");
  1431. model.setValue("/root/source/srchcond", "3");
  1432. model.setValue("/root/source/rrgstno1", ipt_rrgstno1.currentText);
  1433. model.setValue("/root/source/rrgstno2", ipt_rrgstno2.currentText);
  1434. fPatPopUp();
  1435. //inputEnterKey("btn_search", "DOMActivate");
  1436. }
  1437. ]]>
  1438. </script>
  1439. </input>
  1440. <input id="ipt_rrgstno2" ref="/root/main/patient/rrgstno2" class="input_s_essential" navindex="4" autonext="false" format="9999999" style="left:170px; top:82px; width:70px; height:19px; text-align:center; ">
  1441. <script type="javascript" ev:event="onkeydown">
  1442. <![CDATA[
  1443. if(event.keyCode == "13")
  1444. {
  1445. if (ipt_rrgstno1.currentText != "")
  1446. {
  1447. model.resetInstanceNode("/root/source");
  1448. model.setValue("/root/source/srchcond", "3");
  1449. model.setValue("/root/source/rrgstno1", ipt_rrgstno1.currentText);
  1450. model.setValue("/root/source/rrgstno2", ipt_rrgstno2.currentText);
  1451. fPatPopUp();
  1452. //inputEnterKey("btn_search", "DOMActivate");
  1453. }
  1454. }
  1455. ]]>
  1456. </script>
  1457. </input>
  1458. <output id="ipt_brthdd" ref="/root/main/patient/brthdd" class="output_fix" format="yyyy-mm-dd" inputtype="date" appearance="output" style="left:320px; top:82px; width:125px; height:19px; text-align:center; "/>
  1459. <output id="opt_zipcdaddr" ref="/root/main/patient/zipcdaddr" class="output_fix" appearance="output" style="left:170px; top:130px; width:275px; height:19px; "/>
  1460. <output id="opt_detladdr" ref="/root/main/patient/detladdr" class="output_fix" appearance="output" style="left:103px; top:155px; width:342px; height:19px; "/>
  1461. <output id="opt_zipcd2" ref="/root/main/patient/zipcd2" class="output_fix" appearance="output" style="left:137px; top:130px; width:30px; height:19px; text-align:center; "/>
  1462. <output id="opt_zipcd1" ref="/root/main/patient/zipcd1" class="output_fix" appearance="output" style="left:103px; top:130px; width:30px; height:19px; text-align:center; "/>
  1463. <select1 id="cmb_religncd" ref="/root/main/patient/religncd" class="combo_default" disabled="true" appearance="minimal" style="left:103px; top:180px; width:137px; height:19px; ">
  1464. <choices>
  1465. <itemset nodeset="/root/init/comdata/relign/P0157">
  1466. <label ref="cdnm"/>
  1467. <value ref="cdid"/>
  1468. </itemset>
  1469. </choices>
  1470. </select1>
  1471. <select id="chk_vipyn" ref="/root/main/patient/vipyn" disabled="true" overflow="visible" appearance="full" style="left:320px; top:180px; width:41px; height:20px; border-style:none; ">
  1472. <choices>
  1473. <item>
  1474. <label>VIP</label>
  1475. <value>Y</value>
  1476. </item>
  1477. </choices>
  1478. </select>
  1479. <output id="opt_baptnm" ref="/root/main/patient/baptnm" class="output_fix" appearance="output" style="left:103px; top:205px; width:137px; height:19px; "/>
  1480. <output id="opt_chchnm" ref="/root/main/patient/chchnm" class="output_fix" appearance="output" style="left:320px; top:205px; width:125px; height:19px; "/>
  1481. <line id="line6" class="line_2" style="x1:0px; y1:127px; x2:440px; y2:127px; "/>
  1482. <line id="line7" class="line_2" style="x1:0px; y1:177px; x2:440px; y2:177px; "/>
  1483. <line id="line8" class="line_2" style="x1:0px; y1:202px; x2:440px; y2:202px; "/>
  1484. <line id="line9" class="line_2" style="x1:0px; y1:152px; x2:440px; y2:152px; "/>
  1485. <button id="btn_clear" class="btn4_letter3" style="left:375px; top:0px; width:68px; height:22px; ">
  1486. <caption>초기화</caption>
  1487. <script type="javascript" ev:event="DOMActivate">
  1488. <![CDATA[
  1489. fAllClear();
  1490. ]]>
  1491. </script>
  1492. </button>
  1493. </group>
  1494. </group>
  1495. </xhtml:body>
  1496. </xhtml:html>