SMMNC00100_알코올센터메인.xrw 82 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>알코올센터 메인</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <cond>
  11. <orddd/>
  12. <to_orddd/>
  13. <indschacptstat>1</indschacptstat>
  14. <mngtstat>1</mngtstat>
  15. <pid/>
  16. <patnm/>
  17. <sexage/>
  18. <orddeptnm/>
  19. <wardcd/>
  20. <prestimportid/>
  21. <userid/>
  22. <usernm/>
  23. <section/>
  24. </cond>
  25. <paminfo/>
  26. <patinfo>
  27. <patinfolist/>
  28. </patinfo>
  29. </main>
  30. <main_nm>
  31. <wardpatinfo>
  32. <wardpatlist>
  33. <spcffactyn/>
  34. <indschstat/>
  35. <pid/>
  36. <patnm/>
  37. <sexage/>
  38. <findd/>
  39. <hd/>
  40. <endschedd/>
  41. <dschdd/>
  42. <endflag/>
  43. <cnstcnt/>
  44. <replcnt/>
  45. <orddeptnm/>
  46. <medispclnm/>
  47. <insukind/>
  48. <endflagnm/>
  49. <outstatyn/>
  50. <indd/>
  51. <cretno/>
  52. <seqno/>
  53. <instcd/>
  54. </wardpatlist>
  55. </wardpatinfo>
  56. <popupmenu>
  57. <inwardpat>
  58. <item>
  59. <name>입실저장</name>
  60. <func>fSaveInRm</func>
  61. </item>
  62. </inwardpat>
  63. <outwardpat>
  64. <item>
  65. <name>종료상태저장</name>
  66. <func>fSaveOutRm</func>
  67. </item>
  68. </outwardpat>
  69. </popupmenu>
  70. </main_nm>
  71. <main_cnst>
  72. <cnstpatinfo>
  73. <cnstpatlist>
  74. <spcffactyn/>
  75. <pid/>
  76. <patnm/>
  77. <sexage/>
  78. <rgstdd/>
  79. <lastcnstdd/>
  80. <mngtflag/>
  81. <mngtenddd/>
  82. <insukind/>
  83. </cnstpatlist>
  84. <patcntinfo>
  85. <patcnt/>
  86. </patcntinfo>
  87. </cnstpatinfo>
  88. <patmngtinfo>
  89. <patmngtdetlinfo>
  90. <pid/>
  91. <patnm/>
  92. <sexage/>
  93. <rgstno/>
  94. <hometel/>
  95. <mpphontel/>
  96. <addr/>
  97. <rgstdd/>
  98. <mngtflag/>
  99. <mngtenddd/>
  100. <mngtrem/>
  101. <status/>
  102. <existyn/>
  103. <rgstflag/>
  104. </patmngtdetlinfo>
  105. <cnstddlist>
  106. <cnstdd/>
  107. <pid/>
  108. <rgstdd/>
  109. <recdd/>
  110. <rectm/>
  111. </cnstddlist>
  112. </patmngtinfo>
  113. <cnstinfo>
  114. <cnstdetlinfo>
  115. <cnstdd/>
  116. <cnstrid/>
  117. <cnstpath/>
  118. <relign/>
  119. <cnstkind/>
  120. <cnsttype/>
  121. <cnstcntsflag/>
  122. <cnstrem/>
  123. <visitrid/>
  124. <visitplce/>
  125. <visitrem/>
  126. <recdd/>
  127. <rectm/>
  128. <recrid/>
  129. <localcnst/>
  130. <areacnstfact/>
  131. </cnstdetlinfo>
  132. <cnstflagdetlinfo>
  133. <recdd/>
  134. <rectm/>
  135. <cnstclsflag/>
  136. <cnstseqno/>
  137. <cnstclscntscd/>
  138. </cnstflagdetlinfo>
  139. </cnstinfo>
  140. <popupmenu>
  141. <!--
  142. <patmngt>
  143. <item>
  144. <name>대상자삭제</name>
  145. <func>fDelPatMngtInfo</func>
  146. </item>
  147. </patmngt>
  148. -->
  149. <patcnst>
  150. <item>
  151. <name>기록삭제</name>
  152. <func>fDelPatCnstInfo</func>
  153. </item>
  154. </patcnst>
  155. </popupmenu>
  156. </main_cnst>
  157. <send>
  158. </send>
  159. <init>
  160. <userinfo>
  161. <userlist>
  162. <userid/>
  163. <usernm/>
  164. </userlist>
  165. </userinfo>
  166. <mlist/>
  167. <patmngtdetlinfo>
  168. <pid/>
  169. <patnm/>
  170. <sexage/>
  171. <rgstno/>
  172. <hometel/>
  173. <mpphontel/>
  174. <addr/>
  175. <rgstdd/>
  176. <mngtflag/>
  177. <mngtenddd/>
  178. <mngtrem/>
  179. <status/>
  180. <existyn/>
  181. <rgstflag/>
  182. </patmngtdetlinfo>
  183. </init>
  184. <hidden>
  185. </hidden>
  186. <code>
  187. </code>
  188. <source/>
  189. <temp/>
  190. </root>
  191. </instance>
  192. <script type="javascript" ev:event="xforms-ready">
  193. <![CDATA[
  194. fInitialize();
  195. ]]>
  196. </script>
  197. <script type="javascript">
  198. <![CDATA[
  199. /*** 20090519_SMY ***/
  200. function fInitialize() {
  201. model.setValue("/root/main/cond/prestimportid", getScreenMenuParameter());
  202. model.setValue("/root/main/cond/section", "ATC"); //order manage에서 정렬조건 파라미터로 사용
  203. //공통코드조회
  204. zbcfGetCodeList( new Array ( "M0536" //종료구분
  205. ,"M0537" //상담경위
  206. ,"M0538" //종교
  207. ,"M0539" //상담종류
  208. ,"M0540" //상담형태
  209. ,"M0541" //상담내용
  210. ,"M0542" //방문장소
  211. ,"M0549"
  212. )
  213. , new Array ( "/root/init/mlist" //종료구분
  214. ,"/root/init/mlist" //상담경위
  215. ,"/root/init/mlist" //종교
  216. ,"/root/init/mlist" //상담종류
  217. ,"/root/init/mlist" //상담형태
  218. ,"/root/init/mlist" //상담내용
  219. ,"/root/init/mlist" //방문장소
  220. ,"/root/init/mlist" //지역사회의뢰
  221. )
  222. );
  223. addComboItem("combo2", "없음", "", "above");//종교 없음 추가
  224. //종료구분 기본값 항목추가
  225. addComboInstance("/root/init/mlist", "cdid^cdnm", "-^", "M0536");
  226. //알코올의존치료센터 소속 사용자정보조회
  227. model.removeNodeset("/root/send");
  228. //model.makeValue("/root/send/wardcd", '2032100000'); //2032100000 : 알코올의존치료센터, 4050411000 : 알코올의존치료팀
  229. model.makeValue("/root/send/wardcd", getUserInfo("dutplcecd"));
  230. submit("TRMNC00101");
  231. model.removeNodeset("/root/main_nm/wardpatinfo/wardpatlist");
  232. model.removeNodeset("/root/main_cnst/cnstpatinfo/cnstpatlist");
  233. model.removeNodeset("/root/main_cnst/patmngtinfo/cnstddlist");
  234. //오늘 날짜로 초기화 하는 부분.(진료일자를 default로 오늘 날짜로 선택함)
  235. if(model.getValue("/root/main/cond/prestimportid") == "cm"){
  236. model.setValue("/root/main/cond/orddd", getCurrentDate().toDate().getAddDate(-1,"M").getDateFormat());
  237. model.setValue("/root/main/cond/to_orddd", getCurrentDate());
  238. }else{
  239. model.setValue("/root/main/cond/orddd", getCurrentDate());
  240. }
  241. //model.setValue("/root/main/cond/wardcd", '2032100000'); //2032100000 : 알코올의존치료센터, 4050411000 : 알코올의존치료팀
  242. model.setValue("/root/main/cond/wardcd", getUserInfo("dutplcecd")); //알코올의존치료센터부서코드
  243. model.setValue("/root/main/cond/indschacptstat", "1");
  244. fInqurySelectedPrgm();
  245. }
  246. function fInqurySelectedPrgm() {
  247. //일반상담 정보 초기화
  248. model.resetInstanceNode("/root/main_cnst/patmngtinfo/patmngtdetlinfo");
  249. model.removeNodeset("/root/main_cnst/patmngtinfo/cnstddlist");
  250. model.resetInstanceNode("/root/main_cnst/cnstinfo/cnstdetlinfo");
  251. switch(model.getValue("/root/main/cond/prestimportid")) {
  252. case "cm" :
  253. btn_cm.selected = true;
  254. sha_state.visible = false;
  255. cap_state.visible = false;
  256. cap_color.visible = false;
  257. cap_uncnfm.visible = false;
  258. //조회조건
  259. cap_from.visible = true;
  260. ipt_to_orddd.visible = true;
  261. cap_condstat.attribute("text") = "상태 : ";
  262. rdo_indschacptstat.visible = false;
  263. rdo_mngtstat.visible = true;
  264. rdo_mngtstat.attribute("left") = "110px";
  265. rdo_mngtstat.attribute("top") = "40px";
  266. model.toggle("case_cm");
  267. fGetCnstPatList();
  268. break;
  269. case "om" :
  270. cap_from.visible = false;
  271. ipt_to_orddd.visible = false;
  272. btn_om.selected = true;
  273. sha_state.visible = false;
  274. cap_state.visible = false;
  275. cap_uncnfm.visible = true;
  276. cap_color.visible = true;
  277. cap_color.attribute("left") = "15px";
  278. cap_uncnfm.attribute("left") = "35px";
  279. //조회조건
  280. cap_condstat.attribute("text") = "재원상태 : ";
  281. rdo_indschacptstat.visible = true;
  282. rdo_mngtstat.visible = false;
  283. model.toggle("case_om");
  284. fGetOMPatList();
  285. break;
  286. case "prn" :
  287. cap_from.visible = false;
  288. ipt_to_orddd.visible = false;
  289. btn_om.selected = true;
  290. sha_state.visible = false;
  291. cap_state.visible = false;
  292. cap_color.visible = false;
  293. cap_uncnfm.visible = false;
  294. //조회조건
  295. cap_condstat.attribute("text") = "재원상태 : ";
  296. rdo_indschacptstat.visible = true;
  297. rdo_mngtstat.visible = false;
  298. model.toggle("case_om");
  299. fSetPrnMode();
  300. fGetOMPatList();
  301. break;
  302. default :
  303. cap_from.visible = false;
  304. ipt_to_orddd.visible = false;
  305. btn_nm.selected = true;
  306. sha_state.visible = true;
  307. cap_state.visible = true;
  308. cap_color.visible = false;
  309. cap_uncnfm.visible = false;
  310. grd_wardpatlist.visible = true;
  311. //조회조건
  312. cap_condstat.attribute("text") = "재원상태 : ";
  313. rdo_indschacptstat.visible = true;
  314. rdo_mngtstat.visible = false;
  315. model.toggle("case_nm");
  316. fGetWardPatList();
  317. break;
  318. }
  319. }
  320. //상단환자정보세팅하기
  321. function fSetPatInfo(Flag) {
  322. var condparam = "";
  323. if(Flag == "I"){
  324. // 상단 세팅을 위한 파라미터(입원)
  325. condparam = Flag + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/pid")
  326. + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/indd")
  327. + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/cretno")
  328. + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/instcd")
  329. + "▦" + model.getValue("/root/main/cond/orddd");
  330. }else{
  331. // 상단 세팅을 위한 파라미터(외래)
  332. condparam = Flag + "▦" + model.getValue("/root/main_cnst/cnstpatinfo/cnstpatlist["+grd_cnstpatlist.row+"]/pid")
  333. + "▦" + model.getValue("/root/main_cnst/cnstpatinfo/cnstpatlist["+grd_cnstpatlist.row+"]/orddd")
  334. + "▦" + model.getValue("/root/main_cnst/cnstpatinfo/cnstpatlist["+grd_cnstpatlist.row+"]/cretno")
  335. + "▦" + model.getValue("/root/main_cnst/cnstpatinfo/cnstpatlist["+grd_cnstpatlist.row+"]/instcd")
  336. + "▦" + ""
  337. + "▦" + model.getValue("/root/main_cnst/cnstpatinfo/cnstpatlist["+grd_cnstpatlist.row+"]/orgorddd")
  338. }
  339. setParameter("condparam", condparam);
  340. //상단 세팅 화면 사이즈 작게 띄움
  341. modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
  342. }
  343. //알코올센터 메인 조회
  344. function fGetWardPatList() {
  345. model.removeNodeset("/root/send");
  346. model.makeValue("/root/send/wardcd", model.getValue("/root/main/cond/wardcd"));
  347. model.makeValue("/root/send/orddd", model.getValue("/root/main/cond/orddd"));
  348. model.makeValue("/root/send/indschacptstat", model.getValue("/root/main/cond/indschacptstat"));
  349. model.makeValue("/root/send/pid", model.getValue("/root/main/cond/pid"));
  350. if(submit("TRMNC00102")){
  351. for( var i=1; i <grd_wardpatlist.rows; i++ ) {
  352. var cnstcnt = model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + i + "]/cnstcnt");
  353. var replcnt = model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + i + "]/replcnt");
  354. if (cnstcnt == "0") {
  355. model.setValue("/root/main_nm/wardpatinfo/wardpatlist[" + i + "]/cnstcnt", "");
  356. }
  357. if (replcnt == "0") {
  358. model.setValue("/root/main_nm/wardpatinfo/wardpatlist[" + i + "]/replcnt", "");
  359. }
  360. }
  361. //종료상태 저장시에만 종료구분 콤보 활성화
  362. if (model.getValue("/root/main/cond/indschacptstat") == "3" || model.getValue("/root/main/cond/indschacptstat") == "4"){ //종료상태저장
  363. grd_wardpatlist.colDisabled(grd_wardpatlist.colRef("endflag")) = false;
  364. }else{
  365. grd_wardpatlist.colDisabled(grd_wardpatlist.colRef("endflag")) = true;
  366. }
  367. }
  368. grd_wardpatlist.refresh();
  369. }
  370. //입실저장
  371. function fSaveInRm(){
  372. if(model.getValue("/root/main/cond/orddd") != getCurrentDate()) {
  373. messageBox("당일 입원환자에 대해서만 입실저장이", "I006");
  374. return;
  375. }
  376. if(model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + grd_wardpatlist.row + "]/indschstat") != ""){
  377. messageBox("이미 입실저장된 환자입니다.", "I");
  378. return;
  379. }
  380. model.removeNodeset("/root/send");
  381. model.makeValue("/root/send/pid", model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + grd_wardpatlist.row + "]/pid"));
  382. model.makeValue("/root/send/indd", model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + grd_wardpatlist.row + "]/indd"));
  383. model.makeValue("/root/send/cretno", model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + grd_wardpatlist.row + "]/cretno"));
  384. model.makeValue("/root/send/instcd", model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + grd_wardpatlist.row + "]/instcd"));
  385. model.makeValue("/root/send/curdd", getCurrentDate());
  386. model.makeValue("/root/send/curtm", getCurrentTime().substr(0,4));
  387. model.makeValue("/root/send/status", "U");
  388. model.makeValue("/root/send/ordflag", "01");
  389. if(submit("TXMNC00103")){ //wardcare입실저장쿼리 사용
  390. var sMessage = "";
  391. sMessage = model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + grd_wardpatlist.row + "]/pid") + " "
  392. + model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + grd_wardpatlist.row + "]/patnm") + " "
  393. + model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + grd_wardpatlist.row + "]/sexage") + " "
  394. + "입실등록되었습니다." ;
  395. messageBox(sMessage, "I");
  396. fInqurySelectedPrgm();
  397. }
  398. }
  399. //종료상태저장
  400. function fSaveOutRm(){
  401. if (model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + grd_wardpatlist.row + "]/endflag") == ""){
  402. messageBox("종료상태가 선택되지 않았습니다.", "I");
  403. return;
  404. }
  405. model.removeNodeset("/root/send");
  406. model.makeValue("/root/send/pid", model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + grd_wardpatlist.row + "]/pid"));
  407. model.makeValue("/root/send/indd", model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + grd_wardpatlist.row + "]/indd"));
  408. model.makeValue("/root/send/cretno", model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + grd_wardpatlist.row + "]/cretno"));
  409. model.makeValue("/root/send/instcd", model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + grd_wardpatlist.row + "]/instcd"));
  410. model.makeValue("/root/send/endflag", model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + grd_wardpatlist.row + "]/endflag"));
  411. var status = "";
  412. if(model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + grd_wardpatlist.row + "]/outstatyn") == "Y"){
  413. status = "U";
  414. }else {
  415. status = "I";
  416. }
  417. model.makeValue("/root/send/status", status);
  418. if(submit("TXMNC00104")){
  419. var sMessage = "";
  420. sMessage = model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + grd_wardpatlist.row + "]/pid") + " "
  421. + model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + grd_wardpatlist.row + "]/patnm") + " "
  422. + model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + grd_wardpatlist.row + "]/sexage") + " "
  423. + "종료상태가 저장되었습니다." ;
  424. messageBox(sMessage, "I");
  425. fInqurySelectedPrgm();
  426. }
  427. }
  428. //상담기록 환자리스트 조회
  429. function fGetCnstPatList(){
  430. model.removeNodeset("/root/send");
  431. model.makeValue("/root/send/orddd", model.getValue("/root/main/cond/orddd"));
  432. model.makeValue("/root/send/to_orddd", model.getValue("/root/main/cond/to_orddd"));
  433. model.makeValue("/root/send/mngtstat", model.getValue("/root/main/cond/mngtstat"));
  434. model.makeValue("/root/send/pid", model.getValue("/root/main/cond/pid"));
  435. submit("TRMNC00103");
  436. }
  437. //상담환자상세내역, 상담일자 리스트 조회
  438. function fGetPatMngtInfo(){
  439. model.removeNodeset("/root/send");
  440. if(model.getValue("/root/main_cnst/cnstpatinfo/cnstpatlist[" + grd_cnstpatlist.row + "]/pid") =='기명상담'){
  441. model.makeValue("/root/send/pid", model.getValue("/root/main_cnst/cnstpatinfo/cnstpatlist[" + grd_cnstpatlist.row + "]/patnm"));
  442. } else{
  443. model.makeValue("/root/send/pid", model.getValue("/root/main_cnst/cnstpatinfo/cnstpatlist[" + grd_cnstpatlist.row + "]/pid"));
  444. }
  445. model.makeValue("/root/send/rgstdd", model.getValue("/root/main_cnst/cnstpatinfo/cnstpatlist[" + grd_cnstpatlist.row + "]/rgstdd"));
  446. submit("TRMNC00104");
  447. }
  448. //상담일자별 상담정보조회
  449. function fGetPatCnstInfo(){
  450. model.removeNodeset("/root/send");
  451. model.makeValue("/root/send/pid", model.getValue("/root/main_cnst/patmngtinfo/cnstddlist[" + grd_cnstddlist.row + "]/pid"));
  452. model.makeValue("/root/send/rgstdd", model.getValue("/root/main_cnst/patmngtinfo/cnstddlist[" + grd_cnstddlist.row + "]/rgstdd"));
  453. model.makeValue("/root/send/recdd", model.getValue("/root/main_cnst/patmngtinfo/cnstddlist[" + grd_cnstddlist.row + "]/recdd"));
  454. model.makeValue("/root/send/rectm", model.getValue("/root/main_cnst/patmngtinfo/cnstddlist[" + grd_cnstddlist.row + "]/rectm"));
  455. if(submit("TRMNC00105", false)){
  456. var cnstclsflag = "";
  457. var cnstclscntscd = "";
  458. var cnstpath = "";
  459. var cnstkind = "";
  460. var cnsttype = "";
  461. var cnstcntsflag = "";
  462. var visitplce = "";
  463. var areacnst ="";
  464. var areacnstfact= "";
  465. for(i = 1; i <= getNodesetCount("/root/main_cnst/cnstinfo/cnstflagdetlinfo"); i++) {
  466. cnstclsflag = model.getValue("/root/main_cnst/cnstinfo/cnstflagdetlinfo[" + i + "]/cnstclsflag");
  467. cnstclscntscd = model.getValue("/root/main_cnst/cnstinfo/cnstflagdetlinfo[" + i + "]/cnstclscntscd");
  468. //상담경위
  469. if(cnstclsflag == "A"){
  470. if(cnstpath == ""){
  471. cnstpath = cnstclscntscd;
  472. }else{
  473. cnstpath += "▦" + cnstclscntscd;
  474. }
  475. //상담종류
  476. }else if(cnstclsflag == "B"){
  477. if(cnstkind == ""){
  478. cnstkind = cnstclscntscd;
  479. }else{
  480. cnstkind += "▦" + cnstclscntscd;
  481. }
  482. //상담형태
  483. }else if(cnstclsflag == "C"){
  484. if(cnsttype == ""){
  485. cnsttype = cnstclscntscd;
  486. }else{
  487. cnsttype += "▦" + cnstclscntscd;
  488. }
  489. //상담내용
  490. }else if(cnstclsflag == "D"){
  491. if(cnstcntsflag == ""){
  492. cnstcntsflag = cnstclscntscd;
  493. }else{
  494. cnstcntsflag += "▦" + cnstclscntscd;
  495. }
  496. //방문장소
  497. }else if (cnstclsflag == "E"){
  498. if(visitplce == ""){
  499. visitplce = cnstclscntscd;
  500. }else{
  501. visitplce += "▦" + cnstclscntscd;
  502. }
  503. } else {
  504. //지역사회의뢰
  505. if(areacnst == ""){
  506. areacnst = cnstclscntscd;
  507. }else{
  508. areacnst += "▦" + cnstclscntscd;
  509. }
  510. areacnstfact = model.getValue("/root/main_cnst/cnstinfo/cnstflagdetlinfo[" + i + "]/areacnstfact");
  511. }
  512. }
  513. model.setValue("/root/main_cnst/cnstinfo/cnstdetlinfo/cnstpath", cnstpath);
  514. model.setValue("/root/main_cnst/cnstinfo/cnstdetlinfo/cnstkind", cnstkind);
  515. model.setValue("/root/main_cnst/cnstinfo/cnstdetlinfo/cnsttype", cnsttype);
  516. model.setValue("/root/main_cnst/cnstinfo/cnstdetlinfo/cnstcntsflag", cnstcntsflag);
  517. model.setValue("/root/main_cnst/cnstinfo/cnstdetlinfo/visitplce", visitplce);
  518. model.setValue("/root/main_cnst/cnstinfo/cnstdetlinfo/localcnst", areacnst);
  519. model.setValue("/root/main_cnst/cnstinfo/cnstdetlinfo/areacnstfact", areacnstfact);
  520. chk_local.dispatch("xforms-value-changed");
  521. model.refresh();
  522. }
  523. }
  524. //상담대상환자정보 저장, 수정
  525. function fSetPatMngtInfo(){
  526. var pid = model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/pid");
  527. var rgstdd = model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstdd");
  528. var rgstflag = model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstflag");
  529. var patcnt = model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/patcnt");//이용자
  530. var rgstplce = "";
  531. if (rgstflag == "A") {
  532. rgstplce = "익명상담";
  533. } else if (rgstflag == "I"){
  534. rgstplce = "인터넷상담";
  535. }
  536. /*
  537. for (i = 0; i < grd_cnstpatlist.rows; i++ ) {
  538. var cnstpid = model.getValue("/root/main_cnst/cnstpatinfo/cnstpatlist[" + i + "]/pid");
  539. var cnstrgstdd = model.getValue("/root/main_cnst/cnstpatinfo/cnstpatlist[" + i + "]/rgstdd");
  540. if (pid == cnstpid && rgstdd == cnstrgstdd) {
  541. messageBox(rgstdd + "일 " + rgstplce + "은 이미 등록되어 있습니다.\n 상담관리 리스트에서 선택하십시오", "I")
  542. return;
  543. }
  544. }
  545. */
  546. if(model.getValue("/root/main_cnst/cnstpatinfo/cnstpatlist/mngtflag") == "2" && model.getValue("/root/main_cnst/cnstpatinfo/cnstpatlist/mngtenddd") == ""){
  547. messageBox("관리종료일을 입력해주십시오.", "I");
  548. return;
  549. }
  550. model.removeNodeset("/root/send");
  551. model.makeNode("/root/send");
  552. model.makeValue("/root/send/status", model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/status"));
  553. if(model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstflag") == "G") { //기명상담일때
  554. model.makeValue("/root/send/pid", model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/patnm"));
  555. } else {
  556. model.makeValue("/root/send/pid", model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/pid"));
  557. }
  558. model.makeValue("/root/send/rgstdd", model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstdd"));
  559. model.makeValue("/root/send/mngtflag", model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtflag"));
  560. model.makeValue("/root/send/rgstflag", model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstflag"));
  561. model.makeValue("/root/send/patcnt", patcnt);//이용자
  562. if(model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtenddd") == ""){
  563. model.makeValue("/root/send/mngtenddd", '99991231');
  564. }else{
  565. model.makeValue("/root/send/mngtenddd", model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtenddd"));
  566. }
  567. model.makeValue("/root/send/mngtrem", model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtrem"));
  568. var status = "";
  569. if(model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/existyn") == "Y"){
  570. status = "U";
  571. }else {
  572. status = "I";
  573. }
  574. model.makeValue("/root/send/status", status);
  575. if(submit("TXMNC00101")){
  576. fInqurySelectedPrgm(); //일반상담리스트 조회
  577. }
  578. }
  579. /*
  580. //상담대상환자정보 삭제
  581. function fDelPatMngtInfo(){
  582. model.removeNodeset("/root/send");
  583. model.makeNode("/root/send");
  584. model.makeValue("/root/send/status", "D");
  585. model.makeValue("/root/send/pid", model.getValue("/root/main_cnst/cnstpatinfo/cnstpatlist[" + grd_cnstpatlist.row + "]/pid"));
  586. model.makeValue("/root/send/rgstdd", model.getValue("/root/main_cnst/cnstpatinfo/cnstpatlist[" + grd_cnstpatlist.row + "]/rgstdd"));
  587. if(submit("TXMNC00101")){
  588. model.resetInstanceNode("/root/main_cnst/patmngtinfo/patmngtdetlinfo");
  589. fInqurySelectedPrgm(); //일반상담리스트 조회
  590. }
  591. }
  592. */
  593. //상담기록정보 저장, 수정
  594. function fSetPatCnstInfo(){
  595. var pid = model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/pid")
  596. var existyn = model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/existyn")
  597. if (isNull(pid) || existyn != 'Y') {
  598. messageBox("환자관리에 등록된 환자가 아닙니다.", "I");
  599. return;
  600. }
  601. model.removeNodeset("/root/send");
  602. model.makeNode("/root/send");
  603. //저장상태
  604. var status = "";
  605. var recdd = "";
  606. var rectm = "";
  607. var recrid = "";
  608. if(model.getValue("/root/main_cnst/cnstinfo/cnstdetlinfo/recdd") == ""){
  609. status = "I";
  610. recdd = getCurrentDate();
  611. rectm = getCurrentTime().substr(0,6);
  612. recrid = getUserId();
  613. }else{
  614. status = "U";
  615. recdd = model.getValue("/root/main_cnst/cnstinfo/cnstdetlinfo/recdd");
  616. rectm = model.getValue("/root/main_cnst/cnstinfo/cnstdetlinfo/rectm");
  617. recrid = getUserId();
  618. }
  619. model.makeValue("/root/send/recdd", recdd);
  620. model.makeValue("/root/send/rectm", rectm);
  621. model.makeValue("/root/send/recrid", recrid);
  622. model.makeValue("/root/send/status", status);
  623. model.makeValue("/root/send/pid", model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/pid"));
  624. model.makeValue("/root/send/rgstdd", model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstdd"));
  625. model.makeValue("/root/send/cnstdd", model.getValue("/root/main_cnst/cnstinfo/cnstdetlinfo/cnstdd"));
  626. model.makeValue("/root/send/cnstrid", model.getValue("/root/main_cnst/cnstinfo/cnstdetlinfo/cnstrid"));
  627. model.makeValue("/root/send/relign", model.getValue("/root/main_cnst/cnstinfo/cnstdetlinfo/relign"));
  628. model.makeValue("/root/send/cnstrem", model.getValue("/root/main_cnst/cnstinfo/cnstdetlinfo/cnstrem"));
  629. model.makeValue("/root/send/visitrid", model.getValue("/root/main_cnst/cnstinfo/cnstdetlinfo/visitrid"));
  630. model.makeValue("/root/send/visitrem", model.getValue("/root/main_cnst/cnstinfo/cnstdetlinfo/visitrem"));
  631. //model.makeValue("/root/send/cnstpath", model.getValue("/root/main_cnst/cnstinfo/cnstdetlinfo/cnstpath"));
  632. //model.makeValue("/root/send/cnstkind", model.getValue("/root/main_cnst/cnstinfo/cnstdetlinfo/cnstkind"));
  633. //model.makeValue("/root/send/cnsttype", model.getValue("/root/main_cnst/cnstinfo/cnstdetlinfo/cnsttype"));
  634. //model.makeValue("/root/send/cnstcntsflag", model.getValue("/root/main_cnst/cnstinfo/cnstdetlinfo/cnstcntsflag"));
  635. //model.makeValue("/root/send/visitplce", model.getValue("/root/main_cnst/cnstinfo/cnstdetlinfo/visitplce"));
  636. //상담경위, 상담종류, 상담형태, 상담내용, 방문장소 다중선택 로직 변경_20090618
  637. var CnstClsHeader = "pid▦rgstdd▦recdd▦rectm▦cnstclsflag▦cnstseqno▦areacnstfact▦cnstclscntscd▩";
  638. var CnstClsData = "";
  639. //상담경위
  640. var cnstpathVal = chk_cnstpath.value;
  641. var cnstpathArrVal = cnstpathVal.split("▦");
  642. for(var i = 1; i <= chk_cnstpath.length; i++) {
  643. if(cnstpathArrVal[i-1] > "00"){
  644. CnstClsData += model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/pid") +"▦"
  645. + model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstdd") +"▦"
  646. + recdd +"▦"
  647. + rectm +"▦"
  648. + "A" +"▦"
  649. + "" +"▦"
  650. + "" +"▦"
  651. + cnstpathArrVal[i-1] +"▩";
  652. }
  653. }
  654. //상담종류
  655. var cnstkindVal = chk_cnstkind.value;
  656. var cnstkindArrVal = cnstkindVal.split("▦");
  657. for(var i = 1; i <= chk_cnstkind.length; i++) {
  658. if(cnstkindArrVal[i-1] > "00"){
  659. CnstClsData += model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/pid") +"▦"
  660. + model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstdd") +"▦"
  661. + recdd +"▦"
  662. + rectm +"▦"
  663. + "B" +"▦"
  664. + "" +"▦"
  665. + "" +"▦"
  666. + cnstkindArrVal[i-1] +"▩";
  667. }
  668. }
  669. //상담형태
  670. var cnsttypeVal = chk_cnsttype.value;
  671. var cnsttypeArrVal = cnsttypeVal.split("▦");
  672. for(var i = 1; i <= chk_cnsttype.length; i++) {
  673. if(cnsttypeArrVal[i-1] > "00"){
  674. CnstClsData += model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/pid") +"▦"
  675. + model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstdd") +"▦"
  676. + recdd +"▦"
  677. + rectm +"▦"
  678. + "C" +"▦"
  679. + "" +"▦"
  680. + "" +"▦"
  681. + cnsttypeArrVal[i-1] +"▩";
  682. }
  683. }
  684. //상담내용
  685. var cnstcntsflagVal = chk_cnstcntsflag.value;
  686. var cnstcntsflagArrVal = cnstcntsflagVal.split("▦");
  687. for(var i = 1; i <= chk_cnstcntsflag.length; i++) {
  688. if(cnstcntsflagArrVal[i-1] > "00"){
  689. CnstClsData += model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/pid") +"▦"
  690. + model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstdd") +"▦"
  691. + recdd +"▦"
  692. + rectm +"▦"
  693. + "D" +"▦"
  694. + "" +"▦"
  695. + "" +"▦"
  696. + cnstcntsflagArrVal[i-1] +"▩";
  697. }
  698. }
  699. //방문장소
  700. var visitplceVal = chk_visitplce.value;
  701. var visitplceArrVal = visitplceVal.split("▦");
  702. for(var i = 1; i <= chk_visitplce.length; i++) {
  703. if(visitplceArrVal[i-1] > "00"){
  704. CnstClsData += model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/pid") +"▦"
  705. + model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstdd") +"▦"
  706. + recdd +"▦"
  707. + rectm +"▦"
  708. + "E" +"▦"
  709. + "" +"▦"
  710. + "" +"▦"
  711. + visitplceArrVal[i-1] +"▩";
  712. }
  713. }
  714. //지역사회 의뢰
  715. var areaCnstVal = chk_local.value;
  716. var areCnstArrVal = areaCnstVal.split("▦");
  717. for(var i = 1; i <= chk_local.length; i++) {
  718. if(areCnstArrVal[i-1] > "00"){
  719. CnstClsData += model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/pid") +"▦"
  720. + model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstdd") +"▦"
  721. + recdd +"▦"
  722. + rectm +"▦"
  723. + "F" +"▦"
  724. + "" +"▦"
  725. + model.getValue("/root/main_cnst/cnstinfo/cnstdetlinfo/areacnstfact") +"▦"
  726. + areCnstArrVal[i-1] +"▩";
  727. }
  728. }
  729. model.makeValue("/root/send/cnstflag", CnstClsHeader+CnstClsData);
  730. if(submit("TXMNC00102")){
  731. fInqurySelectedPrgm(); //일반상담리스트 조회
  732. }
  733. }
  734. //상담기록정보 삭제
  735. function fDelPatCnstInfo(){
  736. var rtn = messageBox("상담기록을", "Q001");
  737. if (rtn == "6"){
  738. model.removeNodeset("/root/send");
  739. model.makeNode("/root/send");
  740. model.makeValue("/root/send/pid", model.getValue("/root/main_cnst/patmngtinfo/cnstddlist[" + grd_cnstddlist.row + "]/pid"));
  741. model.makeValue("/root/send/rgstdd", model.getValue("/root/main_cnst/patmngtinfo/cnstddlist[" + grd_cnstddlist.row + "]/rgstdd"));
  742. model.makeValue("/root/send/recdd", model.getValue("/root/main_cnst/patmngtinfo/cnstddlist[" + grd_cnstddlist.row + "]/recdd"));
  743. model.makeValue("/root/send/rectm", model.getValue("/root/main_cnst/patmngtinfo/cnstddlist[" + grd_cnstddlist.row + "]/rectm"));
  744. model.makeValue("/root/send/status", "D");
  745. if(submit("TXMNC00102")){
  746. fInqurySelectedPrgm(); //일반상담리스트 조회
  747. }
  748. }
  749. }
  750. function fShowPopupMenu(gridID, menuPath)
  751. {
  752. var gridObj = document.controls.item(gridID);
  753. if(event.button == 3) {
  754. if(gridObj.isCell(event.target) && gridObj.mouseRow >= gridObj.fixedrows){
  755. window.setPopupMenu(true, menuPath, "name", "func", false);
  756. }else{
  757. window.setPopupMenu(false);
  758. }
  759. }
  760. }
  761. ]]>
  762. </script>
  763. <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
  764. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  765. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  766. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  767. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  768. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  769. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  770. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  771. <submission id="TRMNC00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/userinfo"/>
  772. <submission id="TRMNC00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main_nm/wardpatinfo"/>
  773. <submission id="TRMNC00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main_cnst/cnstpatinfo"/>
  774. <submission id="TRMNC00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main_cnst/patmngtinfo"/>
  775. <submission id="TRMNC00105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main_cnst/cnstinfo"/>
  776. <submission id="TXMNC00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  777. <submission id="TXMNC00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send"/>
  778. <submission id="TXMNC00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send"/>
  779. <submission id="TXMNC00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send"/>
  780. <submission id="TRMNW00001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/code/codelist"/>
  781. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  782. <submission id="TXMNC00105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send"/>
  783. </model>
  784. </xhtml:head>
  785. <xhtml:body guideline="1,1195;1,1193;2,124;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  786. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  787. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">알코올센터 메인</caption>
  788. </group>
  789. <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:742px; ">
  790. <button id="btn_nm" class="btn_sw" group="tab" style="left:0px; top:84px; width:115px; height:22px; ">
  791. <caption>알코올센터 Main</caption>
  792. <script type="javascript" ev:event="onclick">
  793. <![CDATA[
  794. group5.visible = false;
  795. model.setValue("/root/main/cond/prestimportid", "nm");
  796. model.setValue("/root/main/cond/orddd", getCurrentDate());
  797. //조회조건 등록번호 초기화
  798. model.resetInstanceNode("/root/main/cond/pid");
  799. fInqurySelectedPrgm();
  800. ]]>
  801. </script>
  802. <toggle case="case_nm" ev:event="onclick"/>
  803. </button>
  804. <button id="btn_om" class="btn_sw" group="tab" style="left:115px; top:84px; width:122px; height:22px; ">
  805. <caption>Order Manage</caption>
  806. <script type="javascript" ev:event="onclick">
  807. <![CDATA[
  808. group5.visible = false;
  809. if(model.getValue("/root/main/cond/prestimportid") == "cm"){
  810. model.setValue("/root/main/cond/orddd", getCurrentDate());
  811. }
  812. //조회조건 등록번호 초기화
  813. model.resetInstanceNode("/root/main/cond/pid");
  814. model.setValue("/root/main/cond/prestimportid", "om");
  815. fInqurySelectedPrgm();
  816. ]]>
  817. </script>
  818. <toggle case="case_om" ev:event="onclick"/>
  819. </button>
  820. <button id="btn_cm" class="btn_sw" group="tab" style="left:237px; top:84px; width:122px; height:22px; ">
  821. <caption>상담관리</caption>
  822. <script type="javascript" ev:event="onclick">
  823. <![CDATA[
  824. group5.visible = true;
  825. delPatientInfos(); //화면상단정보 삭제
  826. setGlobalVariable("paminfo", ""); //원무정보 reset
  827. model.setValue("/root/main/cond/prestimportid", "cm");
  828. model.setValue("/root/main/cond/orddd", getCurrentDate().toDate().getAddDate(-1,"M").getDateFormat());
  829. model.setValue("/root/main/cond/to_orddd", getCurrentDate());
  830. model.setValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstdd", getCurrentDate()); //등록일
  831. //조회조건 등록번호 초기화
  832. model.resetInstanceNode("/root/main/cond/pid");
  833. fInqurySelectedPrgm();
  834. ]]>
  835. </script>
  836. <toggle case="case_cm" ev:event="onclick"/>
  837. </button>
  838. <switch id="swt_main" style="left:0px; top:105px; width:1195px; height:636px; border-color:#c7a3cf; border-style:solid; ">
  839. <case id="case_nm" selected="true" style="left:0px; top:0px; width:1195px; height:709px; ">
  840. <datagrid id="grd_wardpatlist" nodeset="/root/main_nm/wardpatinfo/wardpatlist" class="datagrid2" allowbigselection="false" allowselection="false" caption="특이^재원&#xA;상태^등록번호^환자명^S/A^입원일^교육&#xA;일수^종료예정일^퇴원일^종료구분^의&#xA;뢰^회&#xA;신^진료과^주치의^자격^종료구분명^endflagnm" colsep="^" colwidth="37, 33, 100, 75, 44, 100, 41, 100, 100, 75, 30, 30, 164, 75, 120, 0" ellipsis="true" explorerbar="sort" frozencols="12" mergecellsfixedrows="bycolrec" multitotal="false" rowheader="seq" rowheight="32" rowsep="|" tooltip="true" style="left:5px; top:8px; width:1183px; height:622px; ">
  841. <col ref="spcffactyn" style="text-align:center; "/>
  842. <col ref="indschstat" style="text-align:center; border-left-width:0; "/>
  843. <col ref="pid" style="text-align:center; "/>
  844. <col ref="patnm" style="text-align:center; "/>
  845. <col ref="sexage" style="text-align:center; "/>
  846. <col ref="findd" style="text-align:center; "/>
  847. <col ref="hd" style="text-align:center; "/>
  848. <col ref="endschedd" style="text-align:center; "/>
  849. <col ref="dschdd" style="text-align:center; "/>
  850. <col class="gridcombo" ref="endflag" type="combo" style="text-align:center; ">
  851. <choices>
  852. <itemset nodeset="/root/init/mlist/M0536">
  853. <label ref="cdnm"/>
  854. <value ref="cdid"/>
  855. </itemset>
  856. </choices>
  857. </col>
  858. <col ref="cnstcnt" style="text-align:center; "/>
  859. <col ref="replcnt" style="text-align:center; "/>
  860. <col ref="orddeptnm" style="text-align:center; "/>
  861. <col ref="medispclnm" style="text-align:center; "/>
  862. <col ref="insukind" style="text-align:center; "/>
  863. <col ref="endflagnm"/>
  864. <script type="javascript" ev:event="ondblclick">
  865. <![CDATA[
  866. if( isDataCell()) {
  867. //특이사항이 있을 경우 상단환자세팅을 하고 특이 정보를 띄움
  868. if (grd_wardpatlist.col == grd_wardpatlist.colRef("spcffactyn") && grd_wardpatlist.valueMatrix(grd_wardpatlist.row, grd_wardpatlist.colRef("spcffactyn")) == "★") {
  869. fSetPatInfo("I");
  870. model.makeNode("/root/source/srchcond");
  871. model.makeNode("/root/source/pid");
  872. model.setValue("/root/source/srchcond", 1);
  873. model.setValue("/root/source/pid", model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/pid"));
  874. modal("SMPMC01300", "1", "", "", "SMPMC01300", "/root/source", "/root/source");
  875. //이외는 상단환자세팅
  876. } else {
  877. fSetPatInfo("I");
  878. }
  879. }
  880. ]]>
  881. </script>
  882. <script type="javascript" ev:event="onmousedown">
  883. <![CDATA[
  884. if(model.getValue("/root/main/cond/indschacptstat") == "2"){ //입실저장
  885. fShowPopupMenu("grd_wardpatlist","/root/main_nm/popupmenu/inwardpat/item");
  886. }else if (model.getValue("/root/main/cond/indschacptstat") == "3" || model.getValue("/root/main/cond/indschacptstat") == "4"){ //종료상태저장
  887. fShowPopupMenu("grd_wardpatlist","/root/main_nm/popupmenu/outwardpat/item");
  888. }
  889. ]]>
  890. </script>
  891. <script type="javascript" ev:event="DOMFocusOut">
  892. <![CDATA[
  893. window.setPopupMenu(false);
  894. ]]>
  895. </script>
  896. <script type="javascript" ev:event="onaftersort">
  897. <![CDATA[
  898. grd_wardpatlist.gridToInstance();
  899. ]]>
  900. </script>
  901. </datagrid>
  902. <line id="line1" class="line_1" style="x1:5px; y1:3px; x2:1188px; y2:3px; "/>
  903. </case>
  904. <case id="case_om">
  905. <import id="import3" src="SMMNW00300_Order Manage.xrw" style="left:0px; top:0px; width:1190px; height:634px; "/>
  906. </case>
  907. <case id="case_cm">
  908. <datagrid id="grd_cnstpatlist" nodeset="/root/main_cnst/cnstpatinfo/cnstpatlist" class="datagrid2" allowbigselection="false" allowselection="false" caption="특이^등록번호^환자명^S/A^등록일^최종상담일^관리구분^관리종료일^자격^rgstflag^nrsetting^indd^cretno^seqno^instcd^atdoctid^rgstno" colsep="^" colwidth="48, 84, 95, 55, 84, 84, 75, 84, 95, 0" ellipsis="true" explorerbar="sort" frozencols="12" mergecellsfixedrows="bycolrec" multitotal="false" rowheader="seq" rowheight="32" rowsep="|" tooltip="true" style="left:5px; top:8px; width:657px; height:618px; ">
  909. <col ref="spcffactyn" style="text-align:center; "/>
  910. <col ref="pid" style="text-align:center; "/>
  911. <col ref="patnm" style="text-align:center; "/>
  912. <col ref="sexage" style="text-align:center; "/>
  913. <col ref="rgstdd" format="yyyy/mm/dd" style="text-align:center; "/>
  914. <col ref="lastcnstdd" format="yyyy/mm/dd" style="text-align:center; "/>
  915. <col ref="mngtflag" style="text-align:center; "/>
  916. <col ref="mngtenddd" format="yyyy/mm/dd" style="text-align:center; "/>
  917. <col ref="insukind" visibility="hidden" style="text-align:center; "/>
  918. <col ref="rgstflag" visibility="hidden"/>
  919. <script type="javascript" ev:event="ondblclick">
  920. <![CDATA[
  921. if( isDataCell() ) {
  922. model.resetInstanceNode("/root/main_cnst/cnstinfo/cnstdetlinfo");
  923. model.setValue("/root/main_cnst/cnstinfo/cnstdetlinfo/cnstdd", getCurrentDate()); //상담일자 셋팅
  924. model.setValue("/root/main_cnst/cnstinfo/cnstdetlinfo/cnstrid", getUserId());
  925. model.setValue("/root/main_cnst/cnstinfo/cnstdetlinfo/visitrid", getUserId());
  926. fGetPatMngtInfo();
  927. //관리구분에 따른 종료일 disable
  928. if(model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtflag") == "2"){
  929. ipt_mngtenddd.disabled = false;
  930. }else{
  931. ipt_mngtenddd.disabled = true;
  932. }
  933. ipt_mngtenddd.refresh();
  934. }
  935. var rgstflag = model.getValue("/root/main_cnst/cnstpatinfo/cnstpatlist[" + grd_cnstpatlist.row + "]/rgstflag");
  936. if (rgstflag != "H") {
  937. if (rgstflag == "A") {
  938. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/patnm", "익명상담");
  939. opt_valitrgtpid.disabled = true;
  940. } else if (rgstflag == "I") {
  941. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/patnm", "인터넷상담");
  942. opt_valitrgtpid.disabled = true;
  943. } else if (rgstflag == "G") {
  944. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/patnm", model.getValue("/root/main_cnst/cnstpatinfo/cnstpatlist[" + grd_cnstpatlist.row + "]/patnm"));
  945. opt_valitrgtpid.disabled = false;
  946. }
  947. //group4.disabled = true;
  948. combo5.disabled = true;
  949. ipt_mngtenddd.disabled = true;
  950. textarea2.disabled = true;
  951. rdo_rgstflag.disabled = true;
  952. } else {
  953. group4.disabled = false;
  954. rdo_rgstflag.disabled = false;
  955. opt_valitrgtpid.disabled = true;
  956. }
  957. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstflag", rgstflag);
  958. model.refresh();
  959. ]]>
  960. </script>
  961. <script type="javascript" ev:event="onmousedown">
  962. <![CDATA[
  963. fShowPopupMenu("grd_cnstpatlist","/root/main_cnst/popupmenu/patmngt/item");
  964. ]]>
  965. </script>
  966. <script type="javascript" ev:event="DOMFocusOut">
  967. <![CDATA[
  968. window.setPopupMenu(false);
  969. ]]>
  970. </script>
  971. <script type="javascript" ev:event="onaftersort">
  972. <![CDATA[
  973. grd_cnstpatlist.gridToInstance();
  974. ]]>
  975. </script>
  976. </datagrid>
  977. <line id="line2" class="line_1" style="x1:5px; y1:3px; x2:662px; y2:3px; "/>
  978. <button id="btn_bdinfo" class="btn5_letter2" style="left:1149px; top:2px; width:42px; height:19px; ">
  979. <caption>저장</caption>
  980. <script type="javascript" ev:event="DOMActivate">
  981. <![CDATA[
  982. fSetPatMngtInfo();
  983. ]]>
  984. </script>
  985. </button>
  986. <button id="button2" class="btn2_letter2" style="left:1108px; top:2px; width:42px; height:19px; ">
  987. <caption>채번</caption>
  988. <script type="javascript" ev:event="DOMActivate">
  989. <![CDATA[
  990. model.resetInstanceNode("/root/source");
  991. model.makeValue("/root/source/srchcond", '1');
  992. model.makeValue("/root/source/pid", model.getValue("/root/main/ptbs/ptbs_pid"));
  993. modal("SMPMC01400", "1", "100", "100" ,"SMPMC01400","","");
  994. var newPID = getParameter("SMPMC01400_PID");
  995. //상담환자상세내역, 상담일자 리스트 조회
  996. model.removeNodeset("/root/send");
  997. model.makeValue("/root/send/srchflag", "Y");
  998. model.makeValue("/root/send/pid", newPID);
  999. model.makeValue("/root/send/rgstdd", getCurrentDate());
  1000. if(submit("TRMNC00104")){
  1001. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstdd", getCurrentDate());
  1002. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtflag", "1");
  1003. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtenddd", "");
  1004. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtrem", "");
  1005. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/status", "I");
  1006. for(i = 1; i <= getNodesetCount("/root/main_cnst/cnstpatinfo/cnstpatlist/pid"); i++) {
  1007. if(model.getValue("/root/main_cnst/cnstpatinfo/cnstpatlist[" + i + "]/pid") == newPID){
  1008. grd_cnstpatlist.row = i;
  1009. grd_cnstpatlist.topRow = i;
  1010. }
  1011. }
  1012. }
  1013. model.refresh();
  1014. ]]>
  1015. </script>
  1016. </button>
  1017. <button id="btn_receipt" class="btn2_letter2" visibility="hidden" style="left:1026px; top:2px; width:42px; height:19px; ">
  1018. <caption>접수</caption>
  1019. <script type="javascript" ev:event="DOMActivate">
  1020. <![CDATA[
  1021. modal("SMPMO00100", "1", "", "", "SMPMO00100", "", "");
  1022. ]]>
  1023. </script>
  1024. </button>
  1025. <line id="line128" class="line_1" style="x1:672px; y1:22px; x2:1186px; y2:22px; "/>
  1026. <caption id="caption2" class="tit_2" style="left:665px; top:7px; width:74px; height:13px; ">환자관리</caption>
  1027. <select1 id="rdo_rgstflag" ref="/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstflag" appearance="full" cellspacing="0" cols="4" overflow="visible" style="left:767px; top:4px; width:293px; height:20px; border-style:none; ">
  1028. <choices>
  1029. <item>
  1030. <label>병원상담자</label>
  1031. <value>H</value>
  1032. </item>
  1033. <item>
  1034. <label>인터넷상담</label>
  1035. <value>I</value>
  1036. </item>
  1037. <item>
  1038. <label>익명상담</label>
  1039. <value>A</value>
  1040. </item>
  1041. <item>
  1042. <label>기명상담</label>
  1043. <value>G</value>
  1044. </item>
  1045. </choices>
  1046. <script type="javascript" ev:event="xforms-value-changed">
  1047. <![CDATA[
  1048. var rgstflag = model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstflag");
  1049. if (rgstflag == "H") {
  1050. group4.disabled = false;
  1051. opt_valitrgtpid.disabled = true;
  1052. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/pid", "");
  1053. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/patnm", "");
  1054. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstdd", getCurrentDate());
  1055. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtflag", "1");
  1056. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtenddd", "99991231");
  1057. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtrem", "");
  1058. } else {
  1059. if (rgstflag == "I") {
  1060. opt_valitrgtpid.disabled = true;
  1061. combo5.disabled = true;
  1062. ipt_mngtenddd.disabled = true;
  1063. textarea2.disabled = true;
  1064. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/pid", "Internet");
  1065. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/patnm", "인터넷상담");
  1066. } else if(rgstflag == "A") {
  1067. opt_valitrgtpid.disabled = true;
  1068. combo5.disabled = true;
  1069. ipt_mngtenddd.disabled = true;
  1070. textarea2.disabled = true;
  1071. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/pid", "Anon");
  1072. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/patnm", "익명상담");
  1073. } else if(rgstflag == "G") {
  1074. opt_valitrgtpid.disabled = false;
  1075. combo5.disabled = true;
  1076. ipt_mngtenddd.disabled = true;
  1077. textarea2.disabled = true;
  1078. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/pid", "Gnon");
  1079. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/patnm", model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/patnm"));
  1080. model.refresh();
  1081. }
  1082. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstdd", getCurrentDate());
  1083. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtflag", "2");
  1084. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtenddd", getCurrentDate());
  1085. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtrem", "");
  1086. }
  1087. model.refresh();
  1088. ]]>
  1089. </script>
  1090. </select1>
  1091. <line id="line8" class="line_2" style="x1:755px; y1:228px; x2:1184px; y2:228px; "/>
  1092. <line id="line9" class="line_2" style="x1:755px; y1:255px; x2:1184px; y2:255px; "/>
  1093. <line id="line10" class="line_2" style="x1:756px; y1:282px; x2:1185px; y2:282px; "/>
  1094. <line id="line11" class="line_2" style="x1:756px; y1:309px; x2:1185px; y2:309px; "/>
  1095. <input id="ipt_areacnst" ref="/root/main_cnst/cnstinfo/cnstdetlinfo/areacnstfact" disabled="true" style="left:950px; top:467px; width:235px; height:19px; "/>
  1096. <line id="line12" class="line_2" style="x1:755px; y1:463px; x2:1184px; y2:463px; "/>
  1097. <button id="button5" class="btn5_letter2" style="left:1144px; top:177px; width:42px; height:19px; ">
  1098. <caption>저장</caption>
  1099. <script type="javascript" ev:event="DOMActivate">
  1100. <![CDATA[
  1101. fSetPatCnstInfo();
  1102. ]]>
  1103. </script>
  1104. </button>
  1105. <caption id="caption10" class="cell_1" style="left:755px; top:257px; width:88px; height:24px; vertical-align:middle; ">종교</caption>
  1106. <caption id="caption21" class="cell_1" style="left:755px; top:519px; width:88px; height:24px; vertical-align:middle; ">방문장소</caption>
  1107. <line id="line14" class="line_2" style="x1:755px; y1:490px; x2:1184px; y2:490px; "/>
  1108. <caption id="caption22" class="cell_1" style="left:755px; top:547px; width:88px; height:81px; vertical-align:middle; ">비고</caption>
  1109. <select1 id="combo1" ref="/root/main_cnst/cnstinfo/cnstdetlinfo/cnstrid" class="combo_default" appearance="minimal" style="left:1046px; top:205px; width:120px; height:19px; ">
  1110. <choices>
  1111. <itemset nodeset="/root/init/userinfo/userlist">
  1112. <label ref="usernm"/>
  1113. <value ref="userid"/>
  1114. </itemset>
  1115. </choices>
  1116. </select1>
  1117. <caption id="caption11" class="cell_1" style="left:755px; top:203px; width:88px; height:24px; vertical-align:middle; ">상담일</caption>
  1118. <select id="chk_visitplce" ref="/root/main_cnst/cnstinfo/cnstdetlinfo/visitplce" overflow="visible" appearance="full" cellspacing="10" cols="3" sep="▦" style="left:845px; top:522px; width:245px; height:18px; border-style:none; ">
  1119. <choices>
  1120. <itemset nodeset="/root/init/mlist/M0542">
  1121. <label ref="cdnm"/>
  1122. <value ref="cdid"/>
  1123. </itemset>
  1124. </choices>
  1125. <script type="javascript" ev:event="xforms-value-changed">
  1126. <![CDATA[
  1127. ]]>
  1128. </script>
  1129. </select>
  1130. <select1 id="combo2" ref="/root/main_cnst/cnstinfo/cnstdetlinfo/relign" class="combo_default" appearance="minimal" style="left:845px; top:258px; width:120px; height:19px; ">
  1131. <choices>
  1132. <itemset nodeset="/root/init/mlist/M0538">
  1133. <label ref="cdnm"/>
  1134. <value ref="cdid"/>
  1135. </itemset>
  1136. </choices>
  1137. </select1>
  1138. <caption id="caption23" class="cell_1" style="left:755px; top:492px; width:88px; height:24px; vertical-align:middle; ">방문자</caption>
  1139. <line id="line15" class="line_2" style="x1:755px; y1:387px; x2:1184px; y2:387px; "/>
  1140. <select1 id="combo3" ref="/root/main_cnst/cnstinfo/cnstdetlinfo/visitrid" class="combo_default" appearance="minimal" style="left:845px; top:494px; width:120px; height:19px; ">
  1141. <choices>
  1142. <itemset nodeset="/root/init/userinfo/userlist">
  1143. <label ref="usernm"/>
  1144. <value ref="userid"/>
  1145. </itemset>
  1146. </choices>
  1147. </select1>
  1148. <line id="line16" class="line_2" style="x1:755px; y1:544px; x2:1184px; y2:544px; "/>
  1149. <select id="chk_cnstkind" ref="/root/main_cnst/cnstinfo/cnstdetlinfo/cnstkind" overflow="visible" appearance="full" cellspacing="10" cols="3" sep="▦" style="left:845px; top:287px; width:165px; height:18px; border-style:none; ">
  1150. <choices>
  1151. <itemset nodeset="/root/init/mlist/M0539">
  1152. <label ref="cdnm"/>
  1153. <value ref="cdid"/>
  1154. </itemset>
  1155. </choices>
  1156. <script type="javascript" ev:event="xforms-value-changed">
  1157. <![CDATA[
  1158. ]]>
  1159. </script>
  1160. </select>
  1161. <caption id="caption13" class="cell_1" style="left:755px; top:311px; width:88px; height:24px; vertical-align:middle; ">상담형태</caption>
  1162. <caption id="caption14" class="cell_1" style="left:967px; top:202px; width:77px; height:24px; vertical-align:middle; ">상담자</caption>
  1163. <caption id="caption15" class="cell_1" style="left:755px; top:465px; width:88px; height:24px; vertical-align:middle; ">지역사회 의뢰</caption>
  1164. <select id="chk_cnstpath" ref="/root/main_cnst/cnstinfo/cnstdetlinfo/cnstpath" overflow="visible" appearance="full" cellspacing="10" cols="3" sep="▦" style="left:845px; top:233px; width:160px; height:18px; border-style:none; ">
  1165. <choices>
  1166. <itemset nodeset="/root/init/mlist/M0537">
  1167. <label ref="cdnm"/>
  1168. <value ref="cdid"/>
  1169. </itemset>
  1170. </choices>
  1171. <script type="javascript" ev:event="xforms-value-changed">
  1172. <![CDATA[
  1173. ]]>
  1174. </script>
  1175. </select>
  1176. <line id="line29" class="line_1" style="x1:672px; y1:198px; x2:752px; y2:198px; "/>
  1177. <datagrid id="grd_cnstddlist" nodeset="/root/main_cnst/patmngtinfo/cnstddlist" class="datagrid2" allowselection="false" caption="상담일^처방적용일" colsep="^" colwidth="82" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" style="left:672px; top:203px; width:80px; height:426px; ">
  1178. <col ref="cnstdd" format="yyyy/mm/dd" style="text-align:center; "/>
  1179. <script type="javascript" ev:event="ondblclick">
  1180. <![CDATA[
  1181. if( isDataCell()) {
  1182. fGetPatCnstInfo();
  1183. }
  1184. ]]>
  1185. </script>
  1186. <script type="javascript" ev:event="onmousedown">
  1187. <![CDATA[
  1188. fShowPopupMenu("grd_cnstddlist","/root/main_cnst/popupmenu/patcnst/item");
  1189. ]]>
  1190. </script>
  1191. <script type="javascript" ev:event="DOMFocusOut">
  1192. <![CDATA[
  1193. window.setPopupMenu(false);
  1194. ]]>
  1195. </script>
  1196. </datagrid>
  1197. <line id="line18" class="line_2" style="x1:755px; y1:517px; x2:1184px; y2:517px; "/>
  1198. <line id="line19" class="line_1" style="x1:755px; y1:198px; x2:1186px; y2:198px; "/>
  1199. <caption id="caption16" class="cell_1" style="left:755px; top:338px; width:88px; height:48px; vertical-align:middle; ">상담내용</caption>
  1200. <input id="input17" ref="/root/main_cnst/cnstinfo/cnstdetlinfo/cnstdd" class="input" inputtype="date" style="left:845px; top:205px; width:120px; height:19px; "/>
  1201. <select id="chk_cnstcntsflag" ref="/root/main_cnst/cnstinfo/cnstdetlinfo/cnstcntsflag" overflow="visible" appearance="full" cellspacing="10" cols="3" sep="▦" vcellspacing="7" style="left:845px; top:339px; width:255px; height:43px; border-style:none; ">
  1202. <choices>
  1203. <itemset nodeset="/root/init/mlist/M0541">
  1204. <label ref="cdnm"/>
  1205. <value ref="cdid"/>
  1206. </itemset>
  1207. </choices>
  1208. <script type="javascript" ev:event="xforms-value-changed">
  1209. <![CDATA[
  1210. ]]>
  1211. </script>
  1212. </select>
  1213. <caption id="caption8" class="cell_1" style="left:755px; top:284px; width:88px; height:24px; vertical-align:middle; ">상담종류</caption>
  1214. <caption id="caption9" class="cell_1" style="left:755px; top:230px; width:88px; height:24px; vertical-align:middle; ">상담경위</caption>
  1215. <caption id="caption176" class="tit_2" style="left:673px; top:182px; width:89px; height:13px; ">기록정보</caption>
  1216. <textarea id="textarea3" ref="/root/main_cnst/cnstinfo/cnstdetlinfo/visitrem" class="input" scroll="autovscroll" maxlength="500" style="left:845px; top:547px; width:340px; height:81px; "/>
  1217. <textarea id="tar_trgteconspec" ref="/root/main_cnst/cnstinfo/cnstdetlinfo/cnstrem" class="input" scroll="autovscroll" maxlength="500" style="left:845px; top:389px; width:340px; height:73px; "/>
  1218. <select id="chk_cnsttype" ref="/root/main_cnst/cnstinfo/cnstdetlinfo/cnsttype" overflow="visible" appearance="full" cellspacing="10" cols="3" sep="▦" style="left:845px; top:313px; width:170px; height:18px; border-style:none; ">
  1219. <choices>
  1220. <itemset nodeset="/root/init/mlist/M0540">
  1221. <label ref="cdnm"/>
  1222. <value ref="cdid"/>
  1223. </itemset>
  1224. </choices>
  1225. <script type="javascript" ev:event="xforms-value-changed">
  1226. <![CDATA[
  1227. ]]>
  1228. </script>
  1229. </select>
  1230. <caption id="caption19" class="cell_1" style="left:755px; top:389px; width:88px; height:73px; vertical-align:middle; ">Remark</caption>
  1231. <line id="line7" class="line_2" style="x1:756px; y1:336px; x2:1185px; y2:336px; "/>
  1232. <line id="line17" class="line_3" style="x1:672px; y1:630px; x2:1187px; y2:630px; "/>
  1233. <group id="group4" style="left:672px; top:28px; width:515px; height:145px; ">
  1234. <output id="output4" ref="/root/main_cnst/patmngtinfo/patmngtdetlinfo/sexage" class="output_fix" appearance="output" style="left:408px; top:0px; width:106px; height:19px; text-align:center; "/>
  1235. <button id="button1" class="icon_search" disabled="false" style="left:160px; top:1px; width:16px; height:16px; ">
  1236. <caption/>
  1237. <script type="javascript" ev:event="DOMActivate">
  1238. <![CDATA[
  1239. modal("../../../pam/commonweb/xrw/SPPMC02500", "1","150", "150", "SPPMC02500", "/root/source", "/root/main/cond");
  1240. //상담환자상세내역, 상담일자 리스트 조회
  1241. model.removeNodeset("/root/send");
  1242. model.makeValue("/root/send/srchflag", "Y");
  1243. model.makeValue("/root/send/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  1244. model.makeValue("/root/send/rgstdd", getCurrentDate());
  1245. if(submit("TRMNC00104")){
  1246. if(model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/existyn") != "Y"){ //상담환자대상자로 등록되지 않은 경우
  1247. //환자번호 copy
  1248. var popupendflag = model.getValue("/root/main/popupendflag");
  1249. if (popupendflag == "ok"){
  1250. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  1251. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/patnm", model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  1252. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/sexage", model.getValue("/root/main/patinfo/patinfolist/sex") + "/" + model.getValue("/root/main/patinfo/patinfolist/age"));
  1253. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstno", model.getValue("/root/main/patinfo/patinfolist/rrgstno1") + "-" + model.getValue("/root/main/patinfo/patinfolist/rrgstno2"));
  1254. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/hometel", model.getValue("/root/main/patinfo/patinfolist/hometel"));
  1255. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mpphontel", model.getValue("/root/main/patinfo/patinfolist/mpphontel"));
  1256. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/addr", model.getValue("/root/main/patinfo/patinfolist/addr") + " " + model.getValue("/root/main/patinfo/patinfolist/detladdr"));
  1257. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstdd", getCurrentDate());
  1258. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtflag", "1");
  1259. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtenddd", "");
  1260. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtrem", "");
  1261. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/status", "I");
  1262. } else {
  1263. model.makeNode("/root/main_cnst/patmngtinfo/patmngtdetlinfo");
  1264. model.copyNode("/root/main_cnst/patmngtinfo/patmngtdetlinfo", "/root/init/patmngtdetlinfo");
  1265. }
  1266. }else{
  1267. var pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  1268. for(i = 1; i <= getNodesetCount("/root/main_cnst/cnstpatinfo/cnstpatlist/pid"); i++) {
  1269. if(model.getValue("/root/main_cnst/cnstpatinfo/cnstpatlist[" + i + "]/pid") == pid){
  1270. grd_cnstpatlist.row = i;
  1271. grd_cnstpatlist.topRow = i;
  1272. }
  1273. }
  1274. }
  1275. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstflag", "H");
  1276. model.refresh();
  1277. }
  1278. // model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstflag", "H");
  1279. setGlobalVariable("paminfo", ""); //원무정보 reset
  1280. ]]>
  1281. </script>
  1282. </button>
  1283. <caption id="caption1" class="cell_1" style="left:0px; top:23px; width:65px; height:21px; vertical-align:middle; ">주민번호</caption>
  1284. <line id="line13" class="line_3" style="x1:0px; y1:140px; x2:514px; y2:140px; "/>
  1285. <caption id="caption180" class="cell_1" style="left:0px; top:0px; width:65px; height:21px; vertical-align:middle; ">등록번호</caption>
  1286. <caption id="caption3" class="cell_1" style="left:351px; top:71px; width:55px; height:21px; vertical-align:middle; ">종료일</caption>
  1287. <caption id="caption4" class="cell_1" style="left:177px; top:23px; width:70px; height:21px; vertical-align:middle; ">집전화번호</caption>
  1288. <caption id="caption24" class="cell_1" style="left:351px; top:0px; width:55px; height:21px; vertical-align:middle; ">S/A</caption>
  1289. <caption id="caption5" class="cell_1" style="left:351px; top:23px; width:55px; height:21px; vertical-align:middle; ">휴대전화</caption>
  1290. <input id="opt_valitrgtpid" ref="/root/main_cnst/patmngtinfo/patmngtdetlinfo/patnm" disabled="true" style="left:249px; top:0px; width:100px; height:19px; text-align:center; "/>
  1291. <caption id="caption173" class="cell_1" style="left:0px; top:95px; width:65px; height:43px; vertical-align:middle; ">비고</caption>
  1292. <input id="input1" ref="/root/main_cnst/patmngtinfo/patmngtdetlinfo/mpphontel" class="output_fix" style="left:408px; top:24px; width:106px; height:19px; text-align:center; "/>
  1293. <select1 id="combo5" ref="/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtflag" class="combo_default" appearance="minimal" style="left:249px; top:72px; width:100px; height:19px; ">
  1294. <choices>
  1295. <item>
  1296. <label>관리중</label>
  1297. <value>1</value>
  1298. </item>
  1299. <item>
  1300. <label>관리종료</label>
  1301. <value>2</value>
  1302. </item>
  1303. </choices>
  1304. <script type="javascript" ev:event="xforms-value-changed">
  1305. <![CDATA[
  1306. if(model.getValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtflag") == "2"){
  1307. ipt_mngtenddd.disabled = false;
  1308. model.setValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtenddd", getCurrentDate());
  1309. }else{
  1310. ipt_mngtenddd.disabled = true;
  1311. model.setValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtenddd", "");
  1312. }
  1313. ipt_mngtenddd.refresh();
  1314. ]]>
  1315. </script>
  1316. </select1>
  1317. <line id="line3" class="line_2" style="x1:0px; y1:21px; x2:514px; y2:21px; "/>
  1318. <caption id="caption7" class="cell_1" style="left:0px; top:47px; width:65px; height:21px; vertical-align:middle; ">주소</caption>
  1319. <input id="input2" ref="/root/main_cnst/patmngtinfo/patmngtdetlinfo/hometel" class="output_fix" style="left:249px; top:24px; width:100px; height:19px; text-align:center; "/>
  1320. <caption id="caption175" class="cell_1" style="left:177px; top:0px; width:70px; height:21px; vertical-align:middle; ">환자명</caption>
  1321. <output id="opt_trgtpid" ref="/root/main_cnst/patmngtinfo/patmngtdetlinfo/pid" class="output_fix" appearance="output" style="left:66px; top:0px; width:87px; height:19px; text-align:center; "/>
  1322. <line id="line4" class="line_2" style="x1:0px; y1:45px; x2:514px; y2:45px; "/>
  1323. <input id="input3" ref="/root/main_cnst/patmngtinfo/patmngtdetlinfo/addr" class="output_fix" style="left:66px; top:48px; width:448px; height:19px; text-align:left; "/>
  1324. <caption id="caption17" class="cell_1" style="left:177px; top:70px; width:70px; height:21px; vertical-align:middle; ">관리구분</caption>
  1325. <textarea id="textarea2" ref="/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtrem" class="input" scroll="autovscroll" maxlength="500" style="left:66px; top:95px; width:448px; height:43px; "/>
  1326. <caption id="caption18" class="cell_1" style="left:0px; top:71px; width:65px; height:21px; vertical-align:middle; ">등록일</caption>
  1327. <line id="line5" class="line_2" style="x1:0px; y1:69px; x2:514px; y2:69px; "/>
  1328. <output id="output2" ref="/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstno" class="output_fix" appearance="output" style="left:66px; top:24px; width:109px; height:19px; text-align:center; "/>
  1329. <line id="line6" class="line_2" style="x1:0px; y1:93px; x2:514px; y2:93px; "/>
  1330. <input id="ipt_mngtenddd" ref="/root/main_cnst/patmngtinfo/patmngtdetlinfo/mngtenddd" class="input" disabled="true" inputtype="date" style="left:408px; top:72px; width:106px; height:19px; "/>
  1331. <output id="output3" ref="/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstdd" class="output_fix" format="yyyy/mm/dd" appearance="output" style="left:66px; top:72px; width:109px; height:19px; text-align:center; "/>
  1332. </group>
  1333. <button id="button3" class="btn2_letter2" style="left:1067px; top:2px; width:42px; height:19px; ">
  1334. <caption>신규</caption>
  1335. <script type="javascript" ev:event="DOMActivate">
  1336. <![CDATA[
  1337. model.resetInstanceNode("/root/main_cnst/patmngtinfo/patmngtdetlinfo");
  1338. rdo_rgstflag.disabled = false;
  1339. model.makeValue("/root/main_cnst/patmngtinfo/patmngtdetlinfo/rgstflag", "");
  1340. model.setValue("/root/main_cnst/cnstinfo/cnstdetlinfo/cnstcntsflag", getCurrentDate());
  1341. model.refresh();
  1342. ]]>
  1343. </script>
  1344. </button>
  1345. <select1 id="chk_local" ref="/root/main_cnst/cnstinfo/cnstdetlinfo/localcnst" visibility="hidden" appearance="full" cellspacing="10" cols="2" overflow="visible" style="left:970px; top:495px; width:100px; height:19px; border-style:none; ">
  1346. <choices>
  1347. <itemset nodeset="/root/init/mlist/M0549">
  1348. <label ref="cdnm"/>
  1349. <value ref="cdid"/>
  1350. </itemset>
  1351. </choices>
  1352. <script type="javascript" ev:event="xforms-value-changed">
  1353. <![CDATA[
  1354. var localcnst = model.getValue("/root/main_cnst/cnstinfo/cnstdetlinfo/localcnst");
  1355. if (!isNull(localcnst)) {
  1356. ipt_areacnst.disabled = false;
  1357. }else{
  1358. ipt_areacnst.disabled = true;
  1359. }
  1360. ]]>
  1361. </script>
  1362. </select1>
  1363. <select id="checkbox1" ref="/root/main_cnst/cnstinfo/cnstdetlinfo/localcnst" overflow="visible" appearance="full" cols="2" style="left:849px; top:468px; width:100px; height:20px; border-style:none; ">
  1364. <choices>
  1365. <itemset nodeset="/root/init/mlist/M0549">
  1366. <label ref="cdnm"/>
  1367. <value ref="cdid"/>
  1368. </itemset>
  1369. </choices>
  1370. <script type="javascript" ev:event="xforms-value-changed">
  1371. <![CDATA[
  1372. var localcnst = model.getValue("/root/main_cnst/cnstinfo/cnstdetlinfo/localcnst");
  1373. if (!isNull(localcnst)) {
  1374. ipt_areacnst.disabled = false;
  1375. }else{
  1376. ipt_areacnst.disabled = true;
  1377. model.setValue("/root/main_cnst/cnstinfo/cnstdetlinfo/areacnstfact","");
  1378. }
  1379. model.refresh();
  1380. ]]>
  1381. </script>
  1382. </select>
  1383. </case>
  1384. </switch>
  1385. <group id="group2" style="left:1px; top:10px; width:1194px; height:65px; vertical-align:top; ">
  1386. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:65px; background-color:#fffbf2; border-color:#ffd799; "/>
  1387. <button id="btn_ref" class="btn1_letter2" style="left:986px; top:23px; width:56px; height:22px; ">
  1388. <caption>조회</caption>
  1389. <script type="javascript" ev:event="DOMActivate">
  1390. <![CDATA[
  1391. fInqurySelectedPrgm();
  1392. ]]>
  1393. </script>
  1394. </button>
  1395. <caption id="caption12" class="search_name" style="left:15px; top:11px; width:90px; height:17px; ">업무일자 :</caption>
  1396. <input id="ipt_orddd" ref="/root/main/cond/orddd" class="input_s_essential" inputtype="date" style="left:110px; top:10px; width:105px; height:19px; ">
  1397. <script type="javascript" ev:event="xforms-value-changed">
  1398. <![CDATA[
  1399. fInqurySelectedPrgm();
  1400. ]]>
  1401. </script>
  1402. </input>
  1403. <select1 id="rdo_indschacptstat" ref="/root/main/cond/indschacptstat" class="radio_search" appearance="full" cellspacing="5" cols="4" overflow="visible" style="left:110px; top:40px; width:217px; height:18px; border-style:none; ">
  1404. <choices>
  1405. <item>
  1406. <label>재원</label>
  1407. <value>1</value>
  1408. </item>
  1409. <item>
  1410. <label>입원</label>
  1411. <value>2</value>
  1412. </item>
  1413. <item>
  1414. <label>퇴원진행</label>
  1415. <value>3</value>
  1416. </item>
  1417. <item>
  1418. <label>퇴원</label>
  1419. <value>4</value>
  1420. </item>
  1421. </choices>
  1422. <script type="javascript" ev:event="xforms-value-changed">
  1423. <![CDATA[
  1424. if(model.getValue("/root/main/cond/indschacptstat") == "3" || model.getValue("/root/main/cond/indschacptstat") =="4") {
  1425. button6.visible = true;
  1426. } else{
  1427. button6.visible = false;
  1428. }
  1429. fInqurySelectedPrgm();
  1430. ]]>
  1431. </script>
  1432. </select1>
  1433. <caption id="caption54" class="search_name" style="left:435px; top:40px; width:93px; height:17px; ">등록번호 :</caption>
  1434. <input id="input5" ref="/root/main/cond/pid" class="input_search" maxlength="10" style="left:527px; top:39px; width:90px; height:19px; ">
  1435. <script type="javascript" ev:event="onkeypress">
  1436. <![CDATA[
  1437. if(event.keycode == "13"){
  1438. model.setFocus("btn_ref");
  1439. delPatientInfos(); //화면상단정보 삭제
  1440. setGlobalVariable("paminfo", ""); //원무정보 reset
  1441. fInqurySelectedPrgm();
  1442. //model.setValue("/root/main/cond/patnm", model.getValue("/root/main_nm/wardpatinfo/wardpatlist[pid = '" + model.getValue("/root/main/cond/pid") + "']/patnm"));
  1443. //model.setValue("/root/main/cond/sexage", model.getValue("/root/main_nm/wardpatinfo/wardpatlist[pid = '" + model.getValue("/root/main/cond/pid") + "']/sexage"));
  1444. //model.setValue("/root/main/cond/orddeptnm", model.getValue("/root/main_nm/wardpatinfo/wardpatlist[pid = '" + model.getValue("/root/main/cond/pid") + "']/orddeptnm"));
  1445. //model.refresh();
  1446. }
  1447. ]]>
  1448. </script>
  1449. </input>
  1450. <line id="line25" class="line_4" style="x1:966px; y1:15px; x2:966px; y2:52px; border-color:#ffe4bb; border-left-style:solid; "/>
  1451. <button id="button4" class="icon_search" disabled="false" style="left:624px; top:41px; width:16px; height:16px; ">
  1452. <caption/>
  1453. <script type="javascript" ev:event="DOMActivate">
  1454. <![CDATA[
  1455. modal("../../../pam/commonweb/xrw/SPPMC02500", "1","150", "150", "SPPMC02500", "/root/source", "/root/main/cond");
  1456. //환자번호 copy
  1457. var popupendflag = model.getValue("/root/main/popupendflag");
  1458. if (popupendflag == "ok"){
  1459. model.setValue("/root/main/cond/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  1460. //model.setValue("/root/main/cond/patnm", model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  1461. //model.setValue("/root/main/cond/sexage", model.getValue("/root/main/patinfo/patinfolist/sex") + "/" + model.getValue("/root/main/patinfo/patinfolist/age"));
  1462. //model.setValue("/root/main/cond/orddeptnm", model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  1463. model.refresh();
  1464. }
  1465. delPatientInfos(); //화면상단정보 삭제
  1466. setGlobalVariable("paminfo", ""); //원무정보 reset
  1467. fInqurySelectedPrgm();
  1468. ]]>
  1469. </script>
  1470. </button>
  1471. <button id="btn_excel" class="btn1_letter2" style="left:1049px; top:23px; width:56px; height:22px; ">
  1472. <caption>엑셀</caption>
  1473. <script type="javascript" ev:event="DOMActivate">
  1474. <![CDATA[
  1475. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  1476. if (fileName != "") {
  1477. var selectindex = swt_main.selectedIndex;
  1478. switch(selectindex) {
  1479. case 0: // nm
  1480. grd_wardpatlist.saveExcel(fileName, "SheetName", true, true, "", "", true);
  1481. break;
  1482. case 1: // om
  1483. grd_omprcplist.saveExcel(fileName, "SheetName", true, true, "", "", true);
  1484. break;
  1485. case 2: // cm
  1486. grd_cnstpatlist.saveExcel(fileName, "SheetName", true, true, "", "", true);
  1487. break;
  1488. default :
  1489. messageBox("엑셀로 저장할 수 있는 리스트가 선택되지", "E007");
  1490. }
  1491. }
  1492. ]]>
  1493. </script>
  1494. </button>
  1495. <button id="btn_print" class="btn1_letter2" style="left:1112px; top:23px; width:56px; height:22px; ">
  1496. <caption>출력</caption>
  1497. <script type="javascript" ev:event="DOMActivate">
  1498. <![CDATA[
  1499. model.removeNodeset("/root/send");
  1500. model.makeNode("/root/send");
  1501. var flag = swt_main.selectedIndex; //nm:0, om:1, cm:2
  1502. if (flag == 0) { // nm
  1503. //send 재구성
  1504. model.makeNode("/root/send/ipatgroup");
  1505. model.makeNode("/root/send/ipatgroup/ipat");
  1506. model.makeValue("/root/send/ipatgroup/ipat/wardnm", getUserInfo("dutplcenm"));
  1507. model.makeValue("/root/send/ipatgroup/ipat/total", grd_wardpatlist.rows-1);
  1508. model.makeValue("/root/send/ipatgroup/ipat/orddd", model.getValue("/root/main/cond/orddd"));
  1509. var indschacptstat = model.getValue("/root/main/cond/indschacptstat");
  1510. switch(indschacptstat){
  1511. case "1":
  1512. model.makeValue("/root/send/ipatgroup/ipat/indschacptstat", "재원");
  1513. break;
  1514. case "2":
  1515. model.makeValue("/root/send/ipatgroup/ipat/indschacptstat", "입원");
  1516. break;
  1517. case "3":
  1518. model.makeValue("/root/send/ipatgroup/ipat/indschacptstat", "퇴원진행");
  1519. break;
  1520. case "4":
  1521. model.makeValue("/root/send/ipatgroup/ipat/indschacptstat", "퇴원");
  1522. break;
  1523. }
  1524. /*
  1525. for( var i=1; i <grd_wardpatlist.rows; i++ ) {
  1526. var endflag = model.getValue("/root/main_nm/wardpatinfo/wardpatlist[" + i + "]/endflag");
  1527. var endflagnm = "";
  1528. if(endflag == "1"){
  1529. endflagnm = "수료";
  1530. }else if(endflag == "2"){
  1531. endflagnm = "자퇴";
  1532. }else if(endflag == "3"){
  1533. endflagnm = "중퇴";
  1534. }else if(endflag == "4"){
  1535. endflagnm = "재수료";
  1536. }else{
  1537. endflagnm = "";
  1538. }
  1539. model.makeValue("/root/main_nm/wardpatinfo/wardpatlist[" + i + "]/endflagnm", endflagnm);
  1540. }
  1541. */
  1542. //list
  1543. model.makeNode("/root/send/ipatgroup/ipatlistinfo/ipatlist");
  1544. model.copyNode("/root/send/ipatgroup/ipatlistinfo", "/root/main_nm/wardpatinfo");
  1545. exeReportPreview("RPMNC00100", "XMLSTR");
  1546. } else if (flag == 1) { // om
  1547. if (model.getValue("/root/main_om/ominfo/prcpinfo/prcplist/flag") != "") {
  1548. model.makeNode("/root/send/ompatgroup");
  1549. model.makeNode("/root/send/ompatgroup/ompat");
  1550. model.copyNode("/root/send/ompatgroup/ompat", "/root/main_om/ominfo/ompatinfo/ompatlist[pid = '" + model.getValue("/root/main_om/cond/pid") + "']");
  1551. model.makeNode("/root/send/ompatgroup/cnfmprcpdd");
  1552. var cnfm_color = grd_prcpappddlist.allStyle("all", "background-color");
  1553. var uncnfm_color = grd_uncnfmprcpddlist.allStyle("all", "background-color");
  1554. var prcpheader = "";
  1555. var prcpdd = grd_omprcplist.labelMatrix((grd_omprcplist.rows-1), 24);
  1556. if (cnfm_color != "#ffffff") {
  1557. prcpheader = "처방적용일 : ";
  1558. } else if (uncnfm_color != "#ffffff") {
  1559. prcpheader = "미확인처방일 : ";
  1560. }
  1561. prcpdd = prcpheader.concat(prcpdd);
  1562. model.makeValue("/root/send/ompatgroup/cnfmprcpdd/cnfmprcpdd", prcpdd);
  1563. model.makeNode("/root/send/ompatgroup/prcplistinfo");
  1564. model.copyNode("/root/send/ompatgroup/prcplistinfo", "/root/main_om/ominfo/prcpinfo");
  1565. exeReportPreview("RPMNW00300", "XMLSTR");
  1566. } else {
  1567. messageBox("처방을 조회 후 출력하십시오", "I");
  1568. }
  1569. } else { // cm
  1570. model.makeNode("/root/send/cnstpatgroup");
  1571. model.makeNode("/root/send/cnstpatgroup/cnstpat");
  1572. model.makeValue("/root/send/cnstpatgroup/cnstpat/total", grd_cnstpatlist.rows-1);
  1573. model.makeValue("/root/send/cnstpatgroup/cnstpat/orddd", model.getValue("/root/main/cond/orddd"));
  1574. model.makeValue("/root/send/cnstpatgroup/cnstpat/to_orddd", model.getValue("/root/main/cond/to_orddd"));
  1575. //list
  1576. model.makeNode("/root/send/cnstpatgroup/cnstpatlistinfo/cnstpatlist");
  1577. model.copyNode("/root/send/cnstpatgroup/cnstpatlistinfo", "/root/main_cnst/cnstpatinfo");
  1578. exeReportPreview("RPMNC00101", "XMLSTR");
  1579. }
  1580. ]]>
  1581. </script>
  1582. </button>
  1583. <caption id="cap_condstat" class="search_name" style="left:15px; top:40px; width:90px; height:17px; ">재원상태 :</caption>
  1584. <select1 id="rdo_mngtstat" ref="/root/main/cond/mngtstat" class="radio_search" visibility="hidden" appearance="full" cellspacing="5" cols="3" overflow="visible" style="left:355px; top:15px; width:202px; height:18px; border-style:none; ">
  1585. <choices>
  1586. <item>
  1587. <label>관리중</label>
  1588. <value>1</value>
  1589. </item>
  1590. <item>
  1591. <label>관리종료</label>
  1592. <value>2</value>
  1593. </item>
  1594. <item>
  1595. <label>당일등록</label>
  1596. <value>3</value>
  1597. </item>
  1598. </choices>
  1599. <script type="javascript" ev:event="xforms-value-changed">
  1600. <![CDATA[
  1601. fInqurySelectedPrgm();
  1602. ]]>
  1603. </script>
  1604. </select1>
  1605. <output id="opt_sa" ref="/root/main/cond/sexage" class="output_search" visibility="hidden" style="left:737px; top:39px; width:50px; height:19px; "/>
  1606. <output id="opt_patnm" ref="/root/main/cond/patnm" class="output_search" visibility="hidden" style="left:644px; top:39px; width:90px; height:19px; "/>
  1607. <input id="ipt_to_orddd" ref="/root/main/cond/to_orddd" class="input_s_essential" visibility="hidden" inputtype="date" style="left:235px; top:10px; width:105px; height:19px; ">
  1608. <script type="javascript" ev:event="xforms-value-changed">
  1609. <![CDATA[
  1610. fInqurySelectedPrgm();
  1611. ]]>
  1612. </script>
  1613. </input>
  1614. <caption id="cap_from" visibility="hidden" style="left:219px; top:10px; width:15px; height:19px; ">~</caption>
  1615. <output id="opt_orddeptnm" ref="/root/main/cond/orddeptnm" class="output_search" visibility="hidden" style="left:790px; top:39px; width:100px; height:19px; "/>
  1616. </group>
  1617. <button id="button6" class="btn5_letter2" visibility="hidden" style="left:1117px; top:84px; width:42px; height:19px; ">
  1618. <caption>저장</caption>
  1619. <script type="javascript" ev:event="DOMActivate">
  1620. <![CDATA[
  1621. fSaveOutRm();
  1622. ]]>
  1623. </script>
  1624. </button>
  1625. </group>
  1626. <group id="grp_btn" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  1627. <shape id="sha_state" visibility="hidden" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:7px; top:3px; width:593px; height:20px; background-color:#fffbf2; border-color:#7cbbdd; "/>
  1628. <caption id="cap_state" visibility="hidden" style="left:12px; top:4px; width:588px; height:20px; ">상태 ⓐ:입원 ⓞ:외출/외박 ⓓ:퇴원예고 ⓒ:간호사퇴원정리완료 ⓘ:심사중 ⓕ:심사완료 (+):전실옴 (-):전실감</caption>
  1629. <caption id="cap_color" class="color_6" visibility="hidden" style="left:820px; top:5px; width:15px; height:15px; background-color:#ffcccc; "/>
  1630. <caption id="cap_uncnfm" visibility="hidden" style="left:840px; top:4px; width:38px; height:20px; ">미확인</caption>
  1631. <group id="group5" visibility="hidden" style="left:1024px; top:2px; width:165px; height:21px; ">
  1632. <caption id="caption26" class="cell_1" style="left:0px; top:1px; width:55px; height:20px; ">이용자 :</caption>
  1633. <button id="button8" class="btn5_letter2" style="left:121px; top:0px; width:42px; height:19px; ">
  1634. <caption>저장</caption>
  1635. <script type="javascript" ev:event="DOMActivate">
  1636. <![CDATA[
  1637. model.removeNodeset("/root/send");
  1638. model.makeNode("/root/send");
  1639. model.makeValue("/root/send/status", "I");
  1640. model.makeValue("/root/send/pid", "-");
  1641. model.makeValue("/root/send/rgstflag", "P");
  1642. model.makeValue("/root/send/rgstdd", model.getValue("/root/main/cond/to_orddd"));
  1643. model.makeValue("/root/send/patcnt", model.getValue("/root/main_cnst/cnstpatinfo/patcntinfo/patcnt"));
  1644. model.makeValue("/root/send/patcntyn", "Y"); //이용자수저장
  1645. if(submit("TXMNC00101")){
  1646. fInqurySelectedPrgm(); //일반상담리스트 조회
  1647. }
  1648. model.makeValue("/root/send/patcntyn", "N");
  1649. ]]>
  1650. </script>
  1651. </button>
  1652. <caption id="caption27" class="cell_1" style="left:95px; top:1px; width:20px; height:20px; ">명</caption>
  1653. <input id="input6" ref="/root/main_cnst/cnstpatinfo/patcntinfo/patcnt" maxlength="4" format="9999" style="left:55px; top:1px; width:40px; height:19px; "/>
  1654. </group>
  1655. </group>
  1656. </xhtml:body>
  1657. </xhtml:html>