SMMNE02301.js 111 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323
  1. /*
  2. 심폐소생술(SMMNE02300.xfm - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. */
  6. xPathCardArrPatInfo = "/root/main/patinfo";
  7. xPathCardArrResusList = "/root/main/resusinfo/resuslist";
  8. /**
  9. * @group :
  10. * @ver : 2007.12.04
  11. * @by : 양천덕
  12. * @---------------------------------------------------
  13. * @type : function
  14. * @access : public
  15. * @desc : 심폐소생술 보고서 초기 설정 부분
  16. * @param :
  17. * @return :
  18. * @---------------------------------------------------
  19. */
  20. var ssflag = "3";
  21. function fInit(pFlag){
  22. //상단 환자 정보 가져오기
  23. var node = getGlobalVariable("paminfo");
  24. setCSVToNode("/root/main/paminfo", node);
  25. //현재 시간 세팅
  26. int_cardarrgenrdd.disabled = false;
  27. model.setValue(xPathCardArrPatInfo+"/cardarrgenrdd", getCurrentDate());
  28. model.setValue(xPathCardArrPatInfo+"/cardarrgenrtm", getCurrentTime());
  29. model.setValue(xPathCardArrPatInfo+"/cardarrgenrdt", getCurrentDate()+getCurrentTime() );
  30. model.removeNode("/root/main/pathistinfo/pathistlist");
  31. var sJobKindCD = getUserInfo("jobkindcd"); // 직급코드
  32. if(getUserInfo("dutplceinstcd") != '032' && getUserInfo("dutplceinstcd") != '031') {
  33. //경북대가 아니면
  34. if( sJobKindCD == "0330" || sJobKindCD == "0310"){
  35. ssflag = "1";
  36. }
  37. if( sJobKindCD == "1110" || sJobKindCD == "1140"){
  38. ssflag = "2";
  39. }
  40. } else if(getUserInfo("dutplceinstcd") == '032' || getUserInfo("dutplceinstcd") == '031') {
  41. //경북대이면 03%로 체크한다.
  42. if( sJobKindCD.substring(0, 2) == "03"){
  43. ssflag = "1";
  44. }
  45. if( sJobKindCD == "1140"){
  46. ssflag = "2";
  47. }
  48. }
  49. if( getUserInfo("userid") == "05141" ){
  50. ssflag = "2";
  51. }
  52. //의사, 간호사 직종 분류별 입력 창 제한 구분
  53. if(ssflag=="1" || ssflag=="2"){ //의사
  54. model.setValue("/root/main/patinfo/nursdocflag", "N");
  55. group2.disabled = false ;
  56. fDateSetting("Init");
  57. } else { //기타
  58. group2.disabled = true ;
  59. group6.disabled = true ;
  60. messageBox("심폐소생술보고서 작성 권한이 없습니다.","E");
  61. }
  62. if(pFlag == "1"){
  63. submit("TRMNE02313");
  64. model.setValue("/root/send/wardcd", getUserInfo("dutplcecd") );
  65. submit("TRMNW00101");
  66. int_cardarrdiscvpsnetc.disabled = true;
  67. int_resusteamarvbfresusetc.disabled = true;
  68. int_resusteamarvbfresusnurseetc.disabled = true;
  69. int_resusteamarvafresusetc.disabled = true;
  70. int_resusendresnetc.disabled = true;
  71. int_cardarrgenrplcehosout.disabled = true;
  72. int_hosparvbfresusetc.disabled = true;
  73. int_dethdd.disabled= true;
  74. int_dethtm.disabled= true;
  75. btn_dschdethtm.disabled= true;
  76. int_fstresusexecetc.disabled = true;
  77. int_cardarrgenrplceetcbigo.disabled = true;
  78. cmb_cardarrgenrplceward.disabled = true;
  79. rdo_cardarrgenrplcewardflag.disabled = true;
  80. cmb_cardarrgenrplcehosin.disabled = true;
  81. cmb_cardarrgenrplcehoscenter.disabled = true;
  82. cmb_cardarrgenrplcetestroom.disabled = true;
  83. chk_resusteamarvbfresus.disabled = true;
  84. chk_resusteamarvbfresusnurse.disabled = true;
  85. int_cardarrfinddd.disabled = true;
  86. int_cardarrfindtm.disabled = true;
  87. btn_cardarrfindclock.disabled = true;
  88. int_cardarrestmdd.disabled = true;
  89. int_cardarrestmtm.disabled = true;
  90. bool_cardarrestmflag.value = "Y";
  91. btn_cardarrestmclock.disabled = true;
  92. int_bluebirdalarmdd.disabled = true;
  93. int_bluebirdalarmtm.disabled = true;
  94. btn_bluebirdalarmclock.disabled = true;
  95. chk_hosparvbfresus.disabled = true;
  96. int_hosparvbfresusetc.disabled = true;
  97. }else{
  98. int_cardarrdiscvpsnetc.disabled = true;
  99. int_cardarrgenrplceetc.disabled = true;
  100. int_ercentresusetc.disabled = true;
  101. int_ambulancearvbfresusetc.disabled = true;
  102. int_ambulanceresusetc.disabled = true;
  103. int_resusendresnetc.disabled = true;
  104. }
  105. model.refresh();
  106. if(node != ""){
  107. model.setValue("/root/main/patinfo/pid", model.getValue("/root/main/paminfo/list/pid"));
  108. fSrchHistList("1");
  109. model.setValue("/root/main/patinfo/indd", model.getValue("/root/main/pathistinfo/patinfo/indd"));
  110. model.setValue("/root/main/patinfo/cretno", model.getValue("/root/main/pathistinfo/patinfo/cretno"));
  111. model.setValue("/root/main/patinfo/instcd", model.getValue("/root/main/pathistinfo/patinfo/instcd"));
  112. // 외래 O, 응급 E ,입원 I
  113. if( model.getValue("/root/main/pathistinfo/patinfo/ordtype" ) == "I" ){
  114. model.setValue("/root/main/patinfo/patinfoflag", "1");
  115. }else if( model.getValue("/root/main/pathistinfo/patinfo/ordtype" ) == "O" ){
  116. model.setValue("/root/main/patinfo/patinfoflag", "2");
  117. }else if( model.getValue("/root/main/pathistinfo/patinfo/ordtype" ) == "E" ){
  118. model.setValue("/root/main/patinfo/patinfoflag", "3");
  119. }
  120. if(model.getValue("/root/main/paminfo/list/ioflag") == "E") {
  121. model.makeValue("/root/main/patinfo/issdeptcd", model.getValue("/root/main/paminfo/list/erissdeptcd"));
  122. } else {
  123. model.makeValue("/root/main/patinfo/issdeptcd", model.getValue("/root/main/paminfo/list/wardcd"));
  124. }
  125. //주민등록 번호 셋팅
  126. var rrgstno = "";
  127. if(model.getValue("/root/main/paminfo/list/sex") == "M"){
  128. var rrgstno = model.getValue("/root/main/paminfo/list/rrgstno1") + " - " + "1******";
  129. }else if(model.getValue("/root/main/paminfo/list/sex") == "F"){
  130. var rrgstno = model.getValue("/root/main/paminfo/list/rrgstno1") + " - " + "2******";
  131. }else {
  132. var rrgstno = model.getValue("/root/main/paminfo/list/rrgstno1") + " - " + "*******";
  133. }
  134. model.setValue("/root/main/patinfo/rrgstno", rrgstno);
  135. model.makeValue("/root/main/patinfo/orddeptcd", model.getValue("/root/main/paminfo/list/orddeptcd"));
  136. cmb_dept.dispatch("xforms-value-changed");
  137. model.setValue("/root/main/patinfo/medispclid", model.getValue("/root/main/paminfo/list/medispclid"));
  138. model.makeValue("/root/main/patinfo/atdoctcd", model.getValue("/root/main/paminfo/list/atdoctid"));
  139. model.makeValue("/root/main/patinfo/orddrid", model.getValue("/root/main/paminfo/list/orddrnm"));
  140. model.makeValue("/root/main/patinfo/deptcd", model.getValue("/root/main/paminfo/list/orddeptcd"));
  141. model.makeValue("/root/main/patinfo/ordtype", model.getValue("/root/main/pathistinfo/patinfo/ordtype"));
  142. model.makeValue("/root/main/patinfo/wardcd", model.getValue("/root/main/paminfo/list/wardcd"));
  143. model.makeValue("/root/main/patinfo/wardnm", model.getValue("/root/main/paminfo/list/wardnm"));
  144. cmb_wardcd.dispatch("xforms-value-changed");
  145. model.makeValue("/root/main/patinfo/roomcd", model.getValue("/root/main/paminfo/list/roomcd"));
  146. model.makeValue("/root/main/patinfo/gender", model.getValue("/root/main/paminfo/list/sex"));
  147. model.makeValue("/root/main/patinfo/age", model.getValue("/root/main/paminfo/list/age"));
  148. //환자 정보 세팅
  149. model.setValue("/root/main/patinfo/patnm", model.getValue("/root/main/pathistinfo/patinfo/patnm" ));
  150. model.setValue("/root/main/patinfo/grdrage", model.getValue("/root/main/pathistinfo/patinfo/grdrage" ));
  151. model.setValue("/root/main/patinfo/cntctel", model.getValue("/root/main/pathistinfo/patinfo/cntctel" ));
  152. model.setValue("/root/main/patinfo/addr", model.getValue("/root/main/pathistinfo/patinfo/addr" ));
  153. var sIndd = model.getValue("/root/main/pathistinfo/patinfo/indd1" ).substr(0,4) + "-"
  154. + model.getValue("/root/main/pathistinfo/patinfo/indd1" ).substr(4,2) + "-"
  155. + model.getValue("/root/main/pathistinfo/patinfo/indd1" ).substr(6,2) ;
  156. var ininfo = "입원정보 : "
  157. + sIndd + " "
  158. + model.getValue("/root/main/pathistinfo/patinfo/orddeptcd" ) + " "
  159. + model.getValue("/root/main/pathistinfo/patinfo/medispclid" ) ;
  160. model.setValue("/root/main/patinfo/ininfo", ininfo );
  161. model.refresh();
  162. }
  163. // 2013.09.13 cyw 보고조회화면에서 보고서 화면으로 연동
  164. var openerid = opener.window.javascript.getParameter("SMMNE02301_openerid");
  165. if (openerid == "SMMNE02301") {
  166. var pid = opener.window.javascript.getParameter("SMMNE02301_pid");
  167. var patnm = opener.window.javascript.getParameter("SMMNE02301_patnm");
  168. var patinfoflag = opener.window.javascript.getParameter("SMMNE02301_patinfoflag");
  169. var cardarrgenrdt = opener.window.javascript.getParameter("SMMNE02301_cardarrgenrdt");
  170. if( patinfoflag == "4" || patinfoflag == "5" || patinfoflag == "6" ){
  171. if( pid != "" ){
  172. btn_nopid.visible = true;
  173. }
  174. }
  175. model.setValue( "/root/srchmax/popflag", "Y" );
  176. model.setValue( "/root/main/patinfo/pid", pid );
  177. model.setValue( "/root/main/patinfo/patnm", patnm );
  178. model.setValue( "/root/main/patinfo/patinfoflag", patinfoflag );
  179. model.setValue( "/root/main/patinfo/cardarrgenrdd", cardarrgenrdt.substring(0,8) );
  180. model.setValue( "/root/main/patinfo/cardarrgenrtm", cardarrgenrdt.substring(0,4) );
  181. grp_patinfogroup.disabled = false;
  182. fClearChildNode( "/root/main/resusinfo/resuslist" );
  183. model.setValue( "/root/main/patinfo/diagnm" , "" );
  184. model.setValue( "/root/main/patinfo/diagcd" , "" );
  185. fSrchPatListInput( "1" );
  186. for( var i = 1 ; i <= grd_pastlst.rows-grd_pastlst.fixedRows ; i++ ){
  187. if( model.getValue("/root/main/pathistinfo/pathistlist[" + i + "]/cardarrgenrdt") == cardarrgenrdt ){
  188. grd_pastlst.row = i ;
  189. grd_pastlst.dispatch("onclick");
  190. }
  191. }
  192. }
  193. model.refresh();
  194. }
  195. /**
  196. * @group :
  197. * @ver : 2007.07.07
  198. * @by : 양천덕
  199. * @---------------------------------------------------
  200. * @type : function
  201. * @access : public
  202. * @desc : 대상 환자에 대한 심폐소생술 보고서 수정, 삭제일 때만 사용.
  203. * @param :
  204. * @return :
  205. * @---------------------------------------------------
  206. */
  207. function fCardArrResusSave(pFlag, pFlag1, pStatus){
  208. var sRow = grd_pastlst.row;
  209. model.removeNode("/root/send");
  210. model.makeNode("/root/item/list");
  211. model.copyNode("/root/item/list", "/root/main/resusinfo");
  212. if(model.getValue("/root/main/patinfo/selectrow") == ""){
  213. if(pStatus == "U"){
  214. messageBox("수정할 데이터를 선택하지 않았습니다.","I");
  215. return;
  216. }
  217. if(pStatus == "D"){
  218. messageBox("삭제할 데이터를 선택하지 않았습니다.","I");
  219. return;
  220. }
  221. }
  222. var sDocHeader = "hosinhosoutflag▦pid▦patnm▦indd▦cretno▦histno▦cardarrgenrdt▦instcd";
  223. // 키값 설정부분
  224. var sCondData = pFlag +"▦"
  225. + model.getValue(xPathCardArrPatInfo+"/pid" ) +"▦"
  226. + model.getValue(xPathCardArrPatInfo+"/patnm") +"▦"
  227. + model.getValue(xPathCardArrPatInfo+"/indd" ) +"▦"
  228. + model.getValue(xPathCardArrPatInfo+"/cretno") +"▦"
  229. + model.getValue(xPathCardArrPatInfo+"/histno") +"▦"
  230. + model.getValue("/root/main/patinfo/cardarrgenrdt")+"▦"
  231. + getUserInfo("dutplceinstcd");
  232. model.makeValue("/root/send/cond", sDocHeader+"▩"+sCondData+"▩" );
  233. // if(pFlag1 == "D"){
  234. // 심폐소생술보고서 주치의 입력
  235. sDocHeader += "▦"
  236. + "status▦"
  237. + "cardarrcas▦"
  238. + "initrhythm▦"
  239. + "resusendresn▦"
  240. + "resusendresnetc▦"
  241. + "cardarrrslt▦"
  242. + "cardarrrsltetc▦"
  243. + "dschdethdd▦"
  244. + "dschdethtm▦"
  245. + "fstrgstid▦"
  246. + "fstrgstdt▦"
  247. + "patinfoflag▦"
  248. + "patinfoflagetc▦"
  249. + "cardarrfinddd▦"
  250. + "cardarrfindtm▦"
  251. + "dschneurologystat";
  252. // + "dschneurologystat▩";
  253. sCondData += "▦"
  254. + pStatus + "▦"
  255. + model.getValue(xPathCardArrResusList + "/cardarrcas") +"▦"
  256. + model.getValue(xPathCardArrResusList + "/initrhythm") +"▦"
  257. + model.getValue(xPathCardArrResusList + "/resusendresn") +"▦"
  258. + model.getValue(xPathCardArrResusList + "/resusendresnetc") +"▦"
  259. + model.getValue(xPathCardArrResusList + "/cardarrrslt") +"▦"
  260. + model.getValue(xPathCardArrResusList + "/cardarrrsltetc") +"▦"
  261. + model.getValue(xPathCardArrResusList + "/dschdethdd") +"▦"
  262. + model.getValue(xPathCardArrResusList + "/dschdethtm") +"▦"
  263. + model.getValue(xPathCardArrResusList + "/fstrgstid") +"▦"
  264. + model.getValue(xPathCardArrResusList + "/fstrgstdt") +"▦"
  265. + model.getValue("/root/main/patinfo/patinfoflag") +"▦"
  266. + model.getValue("/root/main/patinfo/patinfoflagetc") +"▦"
  267. + model.getValue(xPathCardArrResusList + "/cardarrfinddd") +"▦"
  268. + model.getValue(xPathCardArrResusList + "/cardarrfindtm") +"▦"
  269. + model.getValue(xPathCardArrResusList + "/dschneurologystat") ;
  270. // 심폐소생술보고서 간호사 입력
  271. sDocHeader += "▦"
  272. // + "status▦"
  273. + "cardarrgoalyn▦"
  274. + "cardarrdiscvpsn▦"
  275. + "cardarrdiscvpsnetc▦"
  276. + "cardarrgenrplceflag▦"
  277. + "cardarrgenrplcedept▦"
  278. + "cardarrgenrplceetc▦"
  279. + "resusteamarvbfresus▦"
  280. + "resusteamarvbfresusetc▦"
  281. + "resusteamfresus▦"
  282. + "resusteamfresusetc▦"
  283. + "ambulancearvbfresus▦"
  284. + "ambulancearvbfresusetc▦"
  285. + "ambulanceresus▦"
  286. + "ambulanceresusetc▦"
  287. + "ercentresus▦"
  288. + "ercentresusetc▦"
  289. + "cardarrestmdd▦"
  290. + "cardarrestmtm▦"
  291. + "resusteamcalldd▦"
  292. + "resusteamcalltm▦"
  293. + "resusteamarvdd▦"
  294. + "resusteamarvtm▦"
  295. + "initrhythmcnfmdd▦"
  296. + "initrhythmcnfmtm▦"
  297. + "resusfromdd▦"
  298. + "resusfromtm▦"
  299. + "resustodd▦"
  300. + "resustotm▦"
  301. + "resusteamarvbfresusflag▦"
  302. + "resusteamarvbfresustext▦"
  303. + "resusteamarvbfresusnurse▦"
  304. + "resusteamarvbfresusnurseetc▦"
  305. + "cardarrgenrtm▦"
  306. + "cardarryn▦"
  307. + "bluebirdalarmyn▦"
  308. + "bluebirdalarmdd▦"
  309. + "bluebirdalarmtm▦"
  310. + "cardarrgenrplceward▦"
  311. + "cardarrgenrplcewardflag▦"
  312. + "cardarrgenrplcehosin▦"
  313. + "cardarrgenrplcehoscenter▦"
  314. + "cardarrgenrplcetestroom▦"
  315. + "cardarrgenrplcehosout▦"
  316. + "hosparvbfresus▦"
  317. + "hosparvbfresusetc▦"
  318. + "atdoctcalldd▦"
  319. + "atdoctcalltm▦"
  320. + "atdoctarrdd▦"
  321. + "atdoctarrtm▦"
  322. + "defibrstartdd▦"
  323. + "defibrstarttm▦"
  324. + "defibrjul▦"
  325. + "defibrtims▦"
  326. + "resusteamarvafresus▦"
  327. + "resusteamarvafresusetc" ;
  328. var resusteamarvbfresus = "";
  329. var resusteamarvbfresusetc = "";
  330. var resusteamarvbfresusnurse = "";
  331. var resusteamarvbfresusnurseetc = "";
  332. resusteamarvbfresus = model.getValue(xPathCardArrResusList+"/resusteamarvbfresus"); //model.getValue("hidden/list/resusteamarvbfresus");
  333. resusteamarvbfresusetc = model.getValue(xPathCardArrResusList+"/resusteamarvbfresusetc");
  334. resusteamarvbfresusnurse = model.getValue(xPathCardArrResusList+"/resusteamarvbfresusnurse");
  335. resusteamarvbfresusnurseetc = model.getValue(xPathCardArrResusList+"/resusteamarvbfresusnurseetc");
  336. if(pFlag == "1"){ // 의사
  337. sCondData += "▦"
  338. // + pStatus + "▦"
  339. + model.getValue(xPathCardArrResusList+"/cardarrgoalyn") +"▦"
  340. + model.getValue(xPathCardArrResusList+"/cardarrdiscvpsn") +"▦"
  341. + model.getValue(xPathCardArrResusList+"/cardarrdiscvpsnetc") +"▦"
  342. + model.getValue(xPathCardArrResusList+"/cardarrgenrplceflag") +"▦"
  343. + model.getValue(xPathCardArrResusList+"/cardarrgenrplcedept") +"▦"
  344. + "▦"
  345. + resusteamarvbfresus +"▦"
  346. + resusteamarvbfresusetc +"▦"
  347. + model.getValue("hidden/list/resusteamfresus") +"▦"
  348. + model.getValue(xPathCardArrResusList+"/resusteamfresusetc") +"▦"
  349. + "▦"
  350. + "▦"
  351. + "▦"
  352. + "▦"
  353. + "▦"
  354. + "▦"
  355. + model.getValue(xPathCardArrResusList+"/cardarrestmdd") +"▦"
  356. + model.getValue(xPathCardArrResusList+"/cardarrestmtm") +"▦"
  357. + model.getValue(xPathCardArrResusList+"/resusteamcalldd") +"▦"
  358. + model.getValue(xPathCardArrResusList+"/resusteamcalltm") +"▦"
  359. + model.getValue(xPathCardArrResusList+"/resusteamarvdd") +"▦"
  360. + model.getValue(xPathCardArrResusList+"/resusteamarvtm") +"▦"
  361. + model.getValue(xPathCardArrResusList+"/initrhythmcnfmdd") +"▦"
  362. + model.getValue(xPathCardArrResusList+"/initrhythmcnfmtm") +"▦"
  363. + model.getValue(xPathCardArrResusList+"/resusfromdd") +"▦"
  364. + model.getValue(xPathCardArrResusList+"/resusfromtm") +"▦"
  365. + model.getValue(xPathCardArrResusList+"/resustodd") +"▦"
  366. + model.getValue(xPathCardArrResusList+"/resustotm") +"▦"
  367. + model.getValue(xPathCardArrResusList+"/resusteamarvbfresusflag") +"▦"
  368. + model.getValue(xPathCardArrResusList+"/resusteamarvbfresustext") +"▦"
  369. + resusteamarvbfresusnurse +"▦"
  370. + resusteamarvbfresusnurseetc +"▦"
  371. + model.getValue(xPathCardArrResusList+"/cardarrgenrtm") +"▦"
  372. + model.getValue(xPathCardArrResusList+"/cardarryn") +"▦"
  373. + model.getValue(xPathCardArrResusList+"/bluebirdalarmyn") +"▦"
  374. + model.getValue(xPathCardArrResusList+"/bluebirdalarmdd") +"▦"
  375. + model.getValue(xPathCardArrResusList+"/bluebirdalarmtm") +"▦"
  376. + model.getValue(xPathCardArrResusList+"/cardarrgenrplceward") +"▦"
  377. + model.getValue(xPathCardArrResusList+"/cardarrgenrplcewardflag") +"▦"
  378. + model.getValue(xPathCardArrResusList+"/cardarrgenrplcehosin") +"▦"
  379. + model.getValue(xPathCardArrResusList+"/cardarrgenrplcehoscenter") +"▦"
  380. + model.getValue(xPathCardArrResusList+"/cardarrgenrplcetestroom") +"▦"
  381. + model.getValue(xPathCardArrResusList+"/cardarrgenrplcehosout") +"▦"
  382. + model.getValue(xPathCardArrResusList+"/hosparvbfresus") +"▦"
  383. + model.getValue(xPathCardArrResusList+"/hosparvbfresusetc") +"▦"
  384. + model.getValue(xPathCardArrResusList+"/atdoctcalldd") +"▦"
  385. + model.getValue(xPathCardArrResusList+"/atdoctcalltm") +"▦"
  386. + model.getValue(xPathCardArrResusList+"/atdoctarrdd") +"▦"
  387. + model.getValue(xPathCardArrResusList+"/atdoctarrtm") +"▦"
  388. + model.getValue(xPathCardArrResusList+"/defibrstartdd") +"▦"
  389. + model.getValue(xPathCardArrResusList+"/defibrstarttm") +"▦"
  390. + model.getValue(xPathCardArrResusList+"/defibrjul") +"▦"
  391. + model.getValue(xPathCardArrResusList+"/defibrtims") +"▦"
  392. + model.getValue(xPathCardArrResusList+"/resusteamarvafresus") +"▦"
  393. + model.getValue(xPathCardArrResusList+"/resusteamarvafresusetc") ;
  394. }
  395. if(pFlag == "2"){
  396. // 사용자가 간호사일 경우(병원외)
  397. sCondData +="▦"
  398. // + pStatus + "▦"
  399. + model.getValue(xPathCardArrResusList+"/cardarrgoalyn") +"▦"
  400. + model.getValue(xPathCardArrResusList+"/cardarrdiscvpsn") +"▦"
  401. + model.getValue(xPathCardArrResusList+"/cardarrdiscvpsnetc") +"▦"
  402. + model.getValue("hidden/list/cardarrgenrplceflag") +"▦"
  403. + "▦"
  404. + model.getValue(xPathCardArrResusList+"/cardarrgenrplceetc") +"▦"
  405. + "▦"
  406. + "▦"
  407. + "▦"
  408. + "▦"
  409. + model.getValue("hidden/list/ambulancearvbfresus") +"▦"
  410. + model.getValue(xPathCardArrResusList+"/ambulancearvbfresusetc")+"▦"
  411. + model.getValue("hidden/list/ambulanceresus") +"▦"
  412. + model.getValue(xPathCardArrResusList+"/ambulanceresusetc") +"▦"
  413. + model.getValue("hidden/list/ercentresus") +"▦"
  414. + model.getValue(xPathCardArrResusList+"/ercentresusetc") +"▦"
  415. + model.getValue(xPathCardArrResusList+"/cardarrestmdd") +"▦"
  416. + model.getValue(xPathCardArrResusList+"/cardarrestmtm") +"▦"
  417. + model.getValue(xPathCardArrResusList+"/resusteamcalldd") +"▦"
  418. + model.getValue(xPathCardArrResusList+"/resusteamcalltm") +"▦"
  419. + model.getValue(xPathCardArrResusList+"/resusteamarvdd") +"▦"
  420. + model.getValue(xPathCardArrResusList+"/resusteamarvtm") +"▦"
  421. + model.getValue(xPathCardArrResusList+"/initrhythmcnfmdd") +"▦"
  422. + model.getValue(xPathCardArrResusList+"/initrhythmcnfmtm") +"▦"
  423. + model.getValue(xPathCardArrResusList+"/resusfromdd") +"▦"
  424. + model.getValue(xPathCardArrResusList+"/resusfromtm") +"▦"
  425. + model.getValue(xPathCardArrResusList+"/resustodd") +"▦"
  426. + model.getValue(xPathCardArrResusList+"/resustotm") +"▦"
  427. + "▦"
  428. + "▦"
  429. + "▦"
  430. + "▦"
  431. + "▦"
  432. + "▦"
  433. + "▦"
  434. + "▦"
  435. + "▦"
  436. + "▦"
  437. + "▦"
  438. + "▦"
  439. + "▦"
  440. + "▦"
  441. + "▦"
  442. + "▦"
  443. + "▦"
  444. + "▦"
  445. + "▦"
  446. + "▦"
  447. + "▦"
  448. + "▦"
  449. + "▦"
  450. + "▦";
  451. }
  452. sDocHeader +="▦"
  453. + "resusteamorddept▦"
  454. + "resusteamorddr▦"
  455. + "resusteamnum▦"
  456. + "patstatus▦"
  457. + "patstatusetc▦"
  458. + "curerslt▩";
  459. sCondData +="▦"
  460. + model.getValue(xPathCardArrResusList+"/resusteamorddept") +"▦"
  461. + model.getValue(xPathCardArrResusList+"/resusteamorddr") +"▦"
  462. + model.getValue(xPathCardArrResusList+"/resusteamnum") +"▦"
  463. + model.getValue(xPathCardArrResusList+"/patstatus") +"▦"
  464. + model.getValue(xPathCardArrResusList+"/patstatusetc") +"▦"
  465. + model.getValue(xPathCardArrResusList+"/curerslt") +"▩";
  466. // Hist 데이터 입력
  467. var DetailHeader = "pid▦indd▦cretno▦histno▦cardarrgenrdt▦instcd▩";
  468. var Detail_Cardarrgenrdt = model.getValue("/root/main/patinfo/cardarrgenrdt");
  469. // 키값 설정부분
  470. var DetailData = model.getValue(xPathCardArrPatInfo+"/pid" ) +"▦"
  471. + model.getValue(xPathCardArrPatInfo+"/indd" ) +"▦"
  472. + model.getValue(xPathCardArrPatInfo+"/cretno") +"▦"
  473. + model.getValue(xPathCardArrPatInfo+"/histno") +"▦"
  474. + Detail_Cardarrgenrdt +"▦"
  475. + model.getValue(xPathCardArrPatInfo+"/instcd") +"▩";
  476. model.makeValue("/root/send/recdetail", DetailHeader + DetailData );
  477. model.makeValue("/root/send/recdata", sDocHeader+sCondData );
  478. // }
  479. if(submit("TXMNE02302") == true){
  480. model.copynode("/root/main/resusinfo","/root/resusbase");
  481. model.setValue("/root/saveinfo/nurseinfo", "");
  482. model.setValue("/root/saveinfo/lastinfo", "");
  483. fSrchHistList(pFlag);
  484. fActionStatus(pFlag, pStatus, sRow);
  485. }
  486. model.removeNodeset("/root/item");
  487. model.refresh();
  488. }
  489. /**
  490. * @group :
  491. * @ver : 2007.07.07
  492. * @by : 양천덕
  493. * @---------------------------------------------------
  494. * @type : function
  495. * @access : public
  496. * @desc : 저장, 수정, 삭제 구분에 따른 Action 설정
  497. * @param :
  498. * @return :
  499. * @---------------------------------------------------
  500. */
  501. function fActionStatus(pFlag, pStatus, row){
  502. if(pStatus == "I"){
  503. grd_pastlst.row = getNodesetCount("/root/main/pathistinfo/pathistlist");
  504. fSelectHistData(pFlag);
  505. }else if(pStatus == "U"){
  506. grd_pastlst.row = row;
  507. fSelectHistData(pFlag);
  508. }else if(pStatus == "D"){
  509. model.setValue("/root/main/patinfo/selectrow", "");
  510. }
  511. }
  512. /**
  513. * @group :
  514. * @ver : 2007.07.07
  515. * @by : 양천덕
  516. * @---------------------------------------------------
  517. * @type : function
  518. * @access : public
  519. * @desc : 이력 데이터 선택 조회 부분
  520. * @param :
  521. * @return :
  522. * @---------------------------------------------------
  523. */
  524. function fSelectHistData(pFlag){
  525. model.setValue("/root/main/patinfo/indd", model.getValue("/root/main/pathistinfo/pathistlist["+grd_pastlst.row+"]/indd"));
  526. model.setValue("/root/main/patinfo/cretno", model.getValue("/root/main/pathistinfo/pathistlist["+grd_pastlst.row+"]/cretno"));
  527. model.setValue("/root/main/patinfo/instcd", model.getValue("/root/main/pathistinfo/pathistlist["+grd_pastlst.row+"]/instcd"));
  528. model.setValue("/root/main/patinfo/cardarrgenrdd", model.getValue("/root/main/pathistinfo/pathistlist["+grd_pastlst.row+"]/cardarrgenrdd"));
  529. model.setValue("/root/main/patinfo/cardarrgenrtm", model.getValue("/root/main/pathistinfo/pathistlist["+grd_pastlst.row+"]/cardarrgenrtm"));
  530. model.setValue("/root/main/patinfo/cardarrgenrdt", model.getValue("/root/main/pathistinfo/pathistlist["+grd_pastlst.row+"]/cardarrgenrdt"));
  531. model.setValue("/root/main/patinfo/histno", model.getValue("/root/main/pathistinfo/pathistlist["+grd_pastlst.row+"]/histno"));
  532. fCardArrResusSrch(pFlag);
  533. fInputBoxInit(pFlag);
  534. }
  535. /**
  536. * @group :
  537. * @ver : 2007.07.07
  538. * @by : 양천덕
  539. * @---------------------------------------------------
  540. * @type : function
  541. * @access : public
  542. * @desc : 현재 시간 설정 부분
  543. * @param :
  544. * @return :
  545. * @---------------------------------------------------
  546. */
  547. function fCurrentDate(){
  548. var d, s= "" ,t;
  549. d = new Date();
  550. if( d.getMinutes() > 10 ) {
  551. if(d.getHours() >= 10 ) {
  552. t = d.getHours() + "" + d.getMinutes();
  553. } else {
  554. t = "0" + d.getHours() + "" + d.getMinutes();
  555. }
  556. } else {
  557. if(d.getHours() >= 10 ) {
  558. t = d.getHours() + "0" + d.getMinutes();
  559. } else {
  560. t = "0" + d.getHours() + "0" + d.getMinutes();
  561. }
  562. }
  563. return t;
  564. }
  565. /**
  566. * @group :
  567. * @ver : 2007.07.07
  568. * @by : 양천덕
  569. * @---------------------------------------------------
  570. * @type : function
  571. * @access : public
  572. * @desc : 환자 이력 조회
  573. * @param :
  574. * @return :
  575. * @---------------------------------------------------
  576. */
  577. function fSrchHistList(pFlag){
  578. if( model.getValue(xPathCardArrPatInfo+"/patgubun") == ""){
  579. var pid = model.getValue(xPathCardArrPatInfo+"/pid" );
  580. if( isNaN(pid.substring(0,1)) ){
  581. model.setValue(xPathCardArrPatInfo+"/patgubun", "2");
  582. }else{
  583. model.setValue(xPathCardArrPatInfo+"/patgubun", "1");
  584. }
  585. }
  586. var sDocHeader = "hosinhosoutflag▦srchdate▦patgubun▦pid▩"
  587. var sCondData = pFlag +"▦"
  588. + model.getValue(xPathCardArrPatInfo+"/cardarrgenrdd") +"▦"
  589. + model.getValue(xPathCardArrPatInfo+"/patgubun" )+"▦"
  590. + model.getValue(xPathCardArrPatInfo+"/pid" )+"▩" ;
  591. model.removeNodeset("/root/send");
  592. model.makeValue("/root/send/cond", sDocHeader+sCondData );
  593. if( submit("TRMNE02310") == true ){
  594. }
  595. }
  596. /**
  597. * @group :
  598. * @ver : 2007.07.07
  599. * @by : 양천덕
  600. * @---------------------------------------------------
  601. * @type : function
  602. * @access : public
  603. * @desc : 심폐소생술이력 조회 부분
  604. * @param :
  605. * @return :
  606. * @---------------------------------------------------
  607. */
  608. function fCardArrResusSrch(pFlag){
  609. model.removeNode("/root/send");
  610. model.setValue("/root/saveinfo/nurseinfo" , "" );
  611. model.setValue("/root/saveinfo/lastinfo" , "" );
  612. var sDocHeader = "hosinhosoutflag▦pid▦indd▦cretno▦cardarrgenrdt▦histno▦instcd";
  613. // 키값 설정부분
  614. var sCondData = pFlag +"▦"
  615. + model.getValue(xPathCardArrPatInfo+"/pid" )+"▦"
  616. + model.getValue(xPathCardArrPatInfo+"/indd" )+"▦"
  617. + model.getValue(xPathCardArrPatInfo+"/cretno")+"▦"
  618. + model.getValue("/root/main/patinfo/cardarrgenrdt")+"▦"
  619. + model.getValue(xPathCardArrPatInfo+"/histno")+"▦"
  620. + model.getValue(xPathCardArrPatInfo+"/instcd");
  621. model.makeValue("/root/send/cond", sDocHeader+"▩"+sCondData+"▩" );
  622. // Hist 데이터 입력
  623. var DetailHeader = "pid▦indd▦cretno▦histno▦cardarrgenrdt▦instcd▩";
  624. var Detail_Cardarrgenrdt = model.getValue("/root/main/patinfo/cardarrgenrdt");
  625. // 키값 설정부분
  626. var DetailData = model.getValue(xPathCardArrPatInfo+"/pid" ) +"▦"
  627. + model.getValue(xPathCardArrPatInfo+"/indd" ) +"▦"
  628. + model.getValue(xPathCardArrPatInfo+"/cretno") +"▦"
  629. + model.getValue(xPathCardArrPatInfo+"/histno") +"▦"
  630. + Detail_Cardarrgenrdt +"▦"
  631. + model.getValue(xPathCardArrPatInfo+"/instcd") +"▩";
  632. model.makeValue("/root/send/recdetail", DetailHeader + DetailData );
  633. if( submit("TXMNE02302") ){
  634. var userid = getUserInfo("userid");
  635. // 최종저장이면 더이상 저장 불가능
  636. if( model.getValue("/root/main/resusinfo/resuslist/saveflag" ) == "Y" ){
  637. btn_lastsave.disabled = true;
  638. btn_nursesave.disabled = true;
  639. group2.disabled = true;
  640. group6.disabled = true;
  641. grp_patinfogroup.disabled = true;
  642. }else{
  643. btn_lastsave.disabled = false;
  644. btn_nursesave.disabled = false;
  645. group2.disabled = false;
  646. group6.disabled = false;
  647. grp_patinfogroup.disabled = false;
  648. }
  649. // 간호입력저장정보
  650. if( model.getValue("/root/main/resusinfo/resuslist/nursesaveid" ) != "" ){
  651. var nursesaveid = model.getValue("/root/main/resusinfo/resuslist/nursesaveid" );
  652. var nursesavenm = model.getValue("/root/main/resusinfo/resuslist/nursesavenm" );
  653. var nursesavedd = model.getValue("/root/main/resusinfo/resuslist/nursesavedd" ).substring(0,4) + "-" +
  654. model.getValue("/root/main/resusinfo/resuslist/nursesavedd" ).substring(4,6) + "-" +
  655. model.getValue("/root/main/resusinfo/resuslist/nursesavedd" ).substring(6,8) + " " +
  656. model.getValue("/root/main/resusinfo/resuslist/nursesavedd" ).substring(8,10) + ":" +
  657. model.getValue("/root/main/resusinfo/resuslist/nursesavedd" ).substring(10,12) + ":" +
  658. model.getValue("/root/main/resusinfo/resuslist/nursesavedd" ).substring(12,14) ;
  659. model.setValue("/root/saveinfo/nurseinfo" , nursesavedd + " " + nursesavenm + " ( " + nursesaveid + " )" );
  660. if( userid == nursesaveid ){
  661. btn_nursesave.disabled = false;
  662. }else{
  663. btn_nursesave.disabled = true;
  664. }
  665. }
  666. // 최종저장 정보
  667. if( model.getValue("/root/main/resusinfo/resuslist/lastsaveid" ) != "" ){
  668. var lastsaveid = model.getValue("/root/main/resusinfo/resuslist/lastsaveid" );
  669. var lastsavenm = model.getValue("/root/main/resusinfo/resuslist/lastsavenm" );
  670. var lastsavedd = model.getValue("/root/main/resusinfo/resuslist/lastsavedd" ).substring(0,4) + "-" +
  671. model.getValue("/root/main/resusinfo/resuslist/lastsavedd" ).substring(4,6) + "-" +
  672. model.getValue("/root/main/resusinfo/resuslist/lastsavedd" ).substring(6,8) + " " +
  673. model.getValue("/root/main/resusinfo/resuslist/lastsavedd" ).substring(8,10) + ":" +
  674. model.getValue("/root/main/resusinfo/resuslist/lastsavedd" ).substring(10,12) + ":" +
  675. model.getValue("/root/main/resusinfo/resuslist/lastsavedd" ).substring(12,14) ;
  676. model.setValue("/root/saveinfo/lastinfo", "【 최종저장완료 : " + lastsavedd + " " + lastsavenm + " ( " + lastsaveid + " ) 】" );
  677. output4.visible = true;
  678. btn_del.disabled = true;
  679. btn_lastsave.disabled = true;
  680. btn_nursesave.disabled = true;
  681. btn_sms.disabled = false;
  682. group2.disabled = true;
  683. group6.disabled = true;
  684. } else {
  685. btn_lastsave.disabled = false;
  686. btn_nursesave.disabled = false;
  687. btn_del.disabled = false;
  688. output4.visible = false;
  689. btn_sms.disabled = true;
  690. }
  691. // 발견자 기타
  692. if( model.getValue("/root/main/resusinfo/resuslist/cardarrdiscvpsn") == "09" ){
  693. int_cardarrdiscvpsnetc.disabled = false;
  694. }else{ int_cardarrdiscvpsnetc.disabled = true; }
  695. if(model.getValue("/root/main/resusinfo/resuslist/cardarrgenrplceflag") == "01"){ // 병 동
  696. cmb_cardarrgenrplceward.disabled = false; // 병동
  697. rdo_cardarrgenrplcewardflag.disabled = false; // 병실,병실외
  698. cmb_cardarrgenrplcehosin.disabled = true;
  699. cmb_cardarrgenrplcehoscenter.disabled = true;
  700. cmb_cardarrgenrplcetestroom.disabled = true;
  701. int_cardarrgenrplcehosout.disabled = true;
  702. int_cardarrgenrplceetcbigo.disabled = true;
  703. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehosin", "");
  704. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehoscenter", "");
  705. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcetestroom", "");
  706. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehosout", "");
  707. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplceetcbigo", "");
  708. }else if(model.getValue("/root/main/resusinfo/resuslist/cardarrgenrplceflag") == "02"){ // 외 래
  709. cmb_cardarrgenrplcehosin.disabled = false;
  710. cmb_cardarrgenrplceward.disabled = true;
  711. rdo_cardarrgenrplcewardflag.disabled = true;
  712. cmb_cardarrgenrplcehoscenter.disabled = true;
  713. cmb_cardarrgenrplcetestroom.disabled = true;
  714. int_cardarrgenrplcehosout.disabled = true;
  715. int_cardarrgenrplceetcbigo.disabled = true;
  716. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplceward", "");
  717. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcewardflag", "");
  718. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehoscenter", "");
  719. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcetestroom", "");
  720. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehosout", "");
  721. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplceetcbigo", "");
  722. }else if(model.getValue("/root/main/resusinfo/resuslist/cardarrgenrplceflag") == "03"){ // 진단/검사실
  723. cmb_cardarrgenrplcetestroom.disabled = false;
  724. cmb_cardarrgenrplcehosin.disabled = true;
  725. cmb_cardarrgenrplceward.disabled = true;
  726. rdo_cardarrgenrplcewardflag.disabled = true;
  727. cmb_cardarrgenrplcehoscenter.disabled = true;
  728. int_cardarrgenrplcehosout.disabled = true;
  729. int_cardarrgenrplceetcbigo.disabled = true;
  730. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplceward", "");
  731. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcewardflag", "");
  732. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehoscenter", "");
  733. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehosin", "");
  734. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehosout", "");
  735. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplceetcbigo", "");
  736. }else if(model.getValue("/root/main/resusinfo/resuslist/cardarrgenrplceflag") == "04"){ // 원외
  737. int_cardarrgenrplcehosout.disabled = false;
  738. cmb_cardarrgenrplcehosin.disabled = true;
  739. cmb_cardarrgenrplceward.disabled = true;
  740. rdo_cardarrgenrplcewardflag.disabled = true;
  741. cmb_cardarrgenrplcehoscenter.disabled = true;
  742. cmb_cardarrgenrplcetestroom.disabled = true;
  743. int_cardarrgenrplceetcbigo.disabled = true;
  744. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplceward", "");
  745. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcewardflag", "");
  746. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehoscenter", "");
  747. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehosin", "");
  748. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcetestroom", "");
  749. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplceetcbigo", "");
  750. }else if(model.getValue("/root/main/resusinfo/resuslist/cardarrgenrplceflag") == "05"){ //응급의료센터
  751. int_cardarrgenrplcehosout.disabled = true;
  752. cmb_cardarrgenrplcehosin.disabled = true;
  753. cmb_cardarrgenrplceward.disabled = true;
  754. rdo_cardarrgenrplcewardflag.disabled = true;
  755. cmb_cardarrgenrplcehoscenter.disabled = true;
  756. cmb_cardarrgenrplcetestroom.disabled = true;
  757. int_cardarrgenrplceetcbigo.disabled = true;
  758. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplceward", "");
  759. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcewardflag", "");
  760. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehoscenter", "");
  761. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehosin", "");
  762. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehosout", "");
  763. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcetestroom", "");
  764. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplceetcbigo", "");
  765. }else if(model.getValue("/root/main/resusinfo/resuslist/cardarrgenrplceflag") == "06"){ // 수술/회복실
  766. int_cardarrgenrplcehosout.disabled = true;
  767. cmb_cardarrgenrplcehosin.disabled = true;
  768. cmb_cardarrgenrplceward.disabled = true;
  769. rdo_cardarrgenrplcewardflag.disabled = true;
  770. cmb_cardarrgenrplcehoscenter.disabled = true;
  771. cmb_cardarrgenrplcetestroom.disabled = true;
  772. int_cardarrgenrplceetcbigo.disabled = true;
  773. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplceward", "");
  774. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcewardflag", "");
  775. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehoscenter", "");
  776. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehosin", "");
  777. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehosout", "");
  778. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcetestroom", "");
  779. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplceetcbigo", "");
  780. }else if(model.getValue("/root/main/resusinfo/resuslist/cardarrgenrplceflag") == "07"){ // 중환자실
  781. cmb_cardarrgenrplcehoscenter.disabled = false;
  782. int_cardarrgenrplcehosout.disabled = true;
  783. cmb_cardarrgenrplcehosin.disabled = true;
  784. cmb_cardarrgenrplceward.disabled = true;
  785. rdo_cardarrgenrplcewardflag.disabled = true;
  786. cmb_cardarrgenrplcetestroom.disabled = true;
  787. int_cardarrgenrplceetcbigo.disabled = true;
  788. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplceward", "");
  789. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcewardflag", "");
  790. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehosin", "");
  791. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehosout", "");
  792. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcetestroom", "");
  793. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplceetcbigo", "");
  794. }else if(model.getValue("/root/main/resusinfo/resuslist/cardarrgenrplceflag") == "08"){ // 기 타
  795. int_cardarrgenrplceetcbigo.disabled = false;
  796. int_cardarrgenrplcehosout.disabled = true;
  797. cmb_cardarrgenrplcehosin.disabled = true;
  798. cmb_cardarrgenrplceward.disabled = true;
  799. rdo_cardarrgenrplcewardflag.disabled = true;
  800. cmb_cardarrgenrplcehoscenter.disabled = true;
  801. cmb_cardarrgenrplcetestroom.disabled = true;
  802. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplceward", "");
  803. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcewardflag", "");
  804. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehoscenter", "");
  805. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehosin", "");
  806. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehosout", "");
  807. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcetestroom", "");
  808. }else{
  809. int_cardarrgenrplcehosout.disabled = true;
  810. cmb_cardarrgenrplcehosin.disabled = true;
  811. cmb_cardarrgenrplceward.disabled = true;
  812. rdo_cardarrgenrplcewardflag.disabled = true;
  813. cmb_cardarrgenrplcehoscenter.disabled = true;
  814. cmb_cardarrgenrplcetestroom.disabled = true;
  815. int_cardarrgenrplceetcbigo.disabled = true;
  816. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplceward", "");
  817. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcewardflag", "");
  818. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehoscenter", "");
  819. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehosin", "");
  820. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcehosout", "");
  821. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplcetestroom", "");
  822. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrplceetcbigo", "");
  823. }
  824. if(model.getValue("/root/main/resusinfo/resuslist/cardarrrslt") == "01"){
  825. int_dethdd.disabled= false;
  826. int_dethtm.disabled= false;
  827. btn_dschdethtm.disabled= false;
  828. } else {
  829. int_dethdd.disabled= true;
  830. int_dethtm.disabled= true;
  831. btn_dschdethtm.disabled= true;
  832. model.setValue("/root/main/resusinfo/resuslist/dschdethdd", "");
  833. model.setValue("/root/main/resusinfo/resuslist/dschdethtm", "");
  834. }
  835. if(model.getValue("/root/main/resusinfo/resuslist/gender" ) != "")
  836. model.setValue("/root/main/patinfo/gender" , model.getValue("/root/main/resusinfo/resuslist/gender" ));
  837. if(model.getValue("/root/main/resusinfo/resuslist/age" ) != "")
  838. model.setValue("/root/main/patinfo/age" , model.getValue("/root/main/resusinfo/resuslist/age" ));
  839. if(model.getValue("/root/main/resusinfo/resuslist/wardcd" ) != "")
  840. model.setValue("/root/main/patinfo/wardcd" , model.getValue("/root/main/resusinfo/resuslist/wardcd" ));
  841. if(model.getValue("/root/main/resusinfo/resuslist/orddeptcd" ) != ""){
  842. model.setValue("/root/main/patinfo/orddeptcd" , model.getValue("/root/main/resusinfo/resuslist/orddeptcd" ));
  843. cmb_dept.dispatch("xforms-value-changed");
  844. }
  845. if(model.getValue("/root/main/resusinfo/resuslist/atdoctcd" ) != "")
  846. model.setValue("/root/main/patinfo/atdoctcd" , model.getValue("/root/main/resusinfo/resuslist/atdoctcd" ));
  847. if(model.getValue("/root/main/resusinfo/resuslist/medispclid" ) != "")
  848. model.setValue("/root/main/patinfo/medispclid" , model.getValue("/root/main/resusinfo/resuslist/medispclid" ));
  849. if(model.getValue("/root/main/resusinfo/resuslist/roomcd" ) != "")
  850. model.setValue("/root/main/patinfo/roomcd" , model.getValue("/root/main/resusinfo/resuslist/roomcd" ));
  851. if(model.getValue("/root/main/resusinfo/resuslist/diagnm" ) != "")
  852. model.setValue("/root/main/patinfo/diagnm" , model.getValue("/root/main/resusinfo/resuslist/diagnm" ));
  853. if(model.getValue("/root/main/resusinfo/resuslist/diagcd" ) != "")
  854. model.setValue("/root/main/patinfo/diagcd" , model.getValue("/root/main/resusinfo/resuslist/diagcd" ));
  855. // 소생팀 도착 전 처치 - 담당의
  856. if( chk_resusteamarvbfresusflag.item(0).selected == true ){
  857. chk_resusteamarvbfresus.disabled = false;
  858. if( chk_resusteamarvbfresus.item(6).selected == true){
  859. int_resusteamarvbfresusetc.disabled = false;
  860. }else{
  861. int_resusteamarvbfresusetc.disabled = true;
  862. }
  863. }
  864. if( chk_resusteamarvbfresusflag.item(1).selected == true ){ // 간호사
  865. chk_resusteamarvbfresusnurse.disabled = false;
  866. if( chk_resusteamarvbfresusnurse.item(6).selected == true ){
  867. int_resusteamarvbfresusnurseetc.disabled = false;
  868. }else{
  869. int_resusteamarvbfresusnurseetc.disabled = true;
  870. }
  871. }
  872. if( chk_resusteamarvbfresusflag.item(2).selected == true ){ // 기타
  873. int_resusteamarvbfresustext.disabled = false;
  874. }
  875. if( model.getValue("/root/main/resusinfo/resuslist/resusteamarvbfresusflag") == "" ){
  876. chk_resusteamarvbfresus.disabled = true;
  877. int_resusteamarvbfresusetc.disabled = true;
  878. chk_resusteamarvbfresusnurse.disabled = true;
  879. int_resusteamarvbfresusnurseetc.disabled = true;
  880. int_resusteamarvbfresustext.disabled = false;
  881. }
  882. // 소생팀 도착 후 처치
  883. if( chk_resusteamarvafresus.item(6).selected == true ){
  884. int_resusteamarvafresusetc.disabled = false;
  885. }else{ int_resusteamarvafresusetc.disabled = true; }
  886. // 소생술 종료사유
  887. if( model.getValue("/root/main/resusinfo/resuslist/resusendresn" ) == "09" ){
  888. int_resusendresnetc.disabled = false;
  889. }else{ int_resusendresnetc.disabled = true; }
  890. // 대상자 구분
  891. if( model.getValue("/root/main/resusinfo/resuslist/patinfoflag") != "" ){
  892. model.setValue("/root/main/patinfo/patinfoflag", model.getValue("/root/main/resusinfo/resuslist/patinfoflag") );
  893. }
  894. // 심정지여부
  895. if( model.getValue("/root/main/resusinfo/resuslist/cardarryn") == "Y"){
  896. int_cardarrfinddd.disabled = false;
  897. int_cardarrfindtm.disabled = false;
  898. btn_cardarrfindclock.disabled = false;
  899. int_cardarrestmdd.disabled = false;
  900. int_cardarrestmtm.disabled = false;
  901. btn_cardarrestmclock.disabled = false;
  902. }else{
  903. int_cardarrfinddd.disabled = true;
  904. int_cardarrfindtm.disabled = true;
  905. btn_cardarrfindclock.disabled = true;
  906. int_cardarrestmdd.disabled = true;
  907. int_cardarrestmtm.disabled = true;
  908. btn_cardarrestmclock.disabled = true;
  909. }
  910. if( model.getValue("/root/main/resusinfo/resuslist/cardarrestmflag") == "Y" ){
  911. model.setValue("/root/main/resusinfo/resuslist/cardarrestmdd", "");
  912. model.setValue("/root/main/resusinfo/resuslist/cardarrestmtm", "");
  913. int_cardarrestmdd.disabled = true;
  914. int_cardarrestmtm.disabled = true;
  915. btn_cardarrestmclock.disabled = true;
  916. }else{
  917. int_cardarrestmdd.disabled = false;
  918. int_cardarrestmtm.disabled = false;
  919. btn_cardarrestmclock.disabled = false;
  920. }
  921. // 파랑새 발령 호출여부
  922. if( model.getValue("/root/main/resusinfo/resuslist/bluebirdalarmyn") == "Y"){
  923. int_bluebirdalarmdd.disabled = false;
  924. int_bluebirdalarmtm.disabled = false;
  925. btn_bluebirdalarmclock.disabled = false;
  926. }else{
  927. int_bluebirdalarmdd.disabled = true;
  928. int_bluebirdalarmtm.disabled = true;
  929. btn_bluebirdalarmclock.disabled = true;
  930. }
  931. // 병원도착전처치여부
  932. if( model.getValue("/root/main/resusinfo/resuslist/hosparvbfresusynflag") == "Y"){
  933. chk_hosparvbfresus.disabled = false;
  934. int_hosparvbfresusetc.disabled = false;
  935. }else{ // '해당없음', '무'일 경우에
  936. chk_hosparvbfresus.disabled = true;
  937. int_hosparvbfresusetc.disabled = true;
  938. }
  939. // 병원 도착전 처치
  940. if( chk_hosparvbfresus.item(6).selected == true ){
  941. int_hosparvbfresusetc.disabled = false;
  942. }else{ int_hosparvbfresusetc.disabled = true; }
  943. // 제세동 시작시간
  944. if( model.getValue("/root/main/resusinfo/resuslist/defibrflag") =="Y"){
  945. model.setValue("/root/main/resusinfo/resuslist/defibrstartdd", "" );
  946. model.setValue("/root/main/resusinfo/resuslist/defibrstarttm", "" );
  947. model.setValue("/root/main/resusinfo/resuslist/defibrjul", "" );
  948. model.setValue("/root/main/resusinfo/resuslist/defibrtims", "" );
  949. model.setValue("/root/main/resusinfo/resuslist/defibrjul2", "" );
  950. model.setValue("/root/main/resusinfo/resuslist/defibrtims2", "" );
  951. int_defibrstartdd.disabled = true;
  952. int_defibrstarttm.disabled = true;
  953. ipt_defibrjul.disabled = true;
  954. ipt_defibrtims.disabled = true;
  955. ipt_defibrjul2.disabled = true;
  956. ipt_defibrtims2.disabled = true;
  957. button5.disabled = true;
  958. }else{
  959. int_defibrstartdd.disabled = false;
  960. int_defibrstarttm.disabled = false;
  961. ipt_defibrjul.disabled = false;
  962. ipt_defibrtims.disabled = false;
  963. ipt_defibrjul2.disabled = false;
  964. ipt_defibrtims2.disabled = false;
  965. button5.disabled = false;
  966. }
  967. }
  968. model.refresh();
  969. }
  970. /**
  971. * @group :
  972. * @ver : 2007.07.07
  973. * @by : 양천덕
  974. * @---------------------------------------------------
  975. * @type : function
  976. * @access : public
  977. * @desc : 입력창 초기화 부분
  978. * @param :
  979. * @return :
  980. * @---------------------------------------------------
  981. */
  982. function fInputBoxInit(pFlag){
  983. }
  984. /**
  985. * @group :
  986. * @ver : 2007.07.07
  987. * @by : 양천덕
  988. * @---------------------------------------------------
  989. * @type : function
  990. * @access : public
  991. * @desc : 날짜 세팅 부분
  992. * @param :
  993. * @return :
  994. * @---------------------------------------------------
  995. */
  996. function fDateSetting(pFlag){
  997. if(pFlag == "Init"){
  998. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrdd", getCurrentDate());
  999. model.setValue("/root/main/resusinfo/resuslist/cardarrgenrtm", fCurrentDate());
  1000. }
  1001. }
  1002. /**
  1003. * @group :
  1004. * @ver : 2007.12.04
  1005. * @by : 양천덕
  1006. * @---------------------------------------------------
  1007. * @type : function
  1008. * @access : public
  1009. * @desc : 환자 정보 조회(환자번호)
  1010. * @param :
  1011. * @return :
  1012. * @---------------------------------------------------
  1013. */
  1014. function fSrchPatListInput(pFlag){
  1015. if( model.getValue("/root/srchmax/popflag") != "Y" ){
  1016. setInputNodeCurText(); // 현재 인풋값 노드 반영
  1017. }
  1018. fSrchHistList(pFlag);
  1019. if( getNodesetCount("/root/main/pathistinfo/patinfo") >= 1 ){
  1020. var rrgstno = model.getValue("/root/main/pathistinfo/patinfo/rrgstno1") + " - " + model.getValue("/root/main/pathistinfo/patinfo/rrgstno2");
  1021. model.setValue("/root/main/patinfo/indd", model.getValue("/root/main/pathistinfo/patinfo/indd" ) );
  1022. model.setValue("/root/main/patinfo/cretno", model.getValue("/root/main/pathistinfo/patinfo/cretno" ) );
  1023. model.setValue("/root/main/patinfo/instcd", model.getValue("/root/main/pathistinfo/patinfo/instcd" ) );
  1024. model.setValue("/root/main/patinfo/patnm", model.getValue("/root/main/pathistinfo/patinfo/patnm" ) );
  1025. model.setValue("/root/main/patinfo/gender", model.getValue("/root/main/pathistinfo/patinfo/gender" ) );
  1026. model.setValue("/root/main/patinfo/age", model.getValue("/root/main/pathistinfo/patinfo/age" ) );
  1027. model.setValue("/root/main/patinfo/cntctel", model.getValue("/root/main/pathistinfo/patinfo/cntctel" ) );
  1028. model.setValue("/root/main/patinfo/addr", model.getValue("/root/main/pathistinfo/patinfo/addr" ) );
  1029. model.makeValue("/root/main/patinfo/wardcd", model.getValue("/root/main/pathistinfo/patinfo/wardcd" ) );
  1030. model.makeValue("/root/main/patinfo/wardnm", model.getValue("/root/main/pathistinfo/patinfo/wardcdnm" ) );
  1031. cmb_wardcd.dispatch("xforms-value-changed");
  1032. cmb_roomcd.refresh();
  1033. model.makeValue("/root/main/patinfo/roomcd", model.getValue("/root/main/pathistinfo/patinfo/roomcd" ) );
  1034. model.makeValue("/root/main/patinfo/orddeptcd", model.getValue("/root/main/pathistinfo/patinfo/deptcd" ) );
  1035. cmb_dept.dispatch("xforms-value-changed");
  1036. cmb_dept.refresh();
  1037. model.makeValue("/root/main/patinfo/medispclid", model.getValue("/root/main/pathistinfo/patinfo/medispclid" ) );
  1038. model.makeValue("/root/main/patinfo/atdoctcd", model.getValue("/root/main/pathistinfo/patinfo/atdoctcd" ) );
  1039. model.makeValue("/root/main/patinfo/orddrid", model.getValue("/root/main/pathistinfo/patinfo/orddrid" ) );
  1040. model.makeValue("/root/main/patinfo/deptcd", model.getValue("/root/main/pathistinfo/patinfo/deptcd" ) );
  1041. model.makeValue("/root/main/patinfo/grdrage", model.getValue("/root/main/pathistinfo/patinfo/grdrage" ) );
  1042. model.makeValue("/root/main/patinfo/issdeptcd", model.getValue("/root/main/pathistinfo/patinfo/issdeptcd" ) );
  1043. var sIndd = model.getValue("/root/main/pathistinfo/patinfo/indd1" ).substr(0,4) + "-"
  1044. + model.getValue("/root/main/pathistinfo/patinfo/indd1" ).substr(4,2) + "-"
  1045. + model.getValue("/root/main/pathistinfo/patinfo/indd1" ).substr(6,2) ;
  1046. var ininfo = "입원정보 : "
  1047. + sIndd + " "
  1048. + model.getValue("/root/main/pathistinfo/patinfo/orddeptcd" ) + " "
  1049. + model.getValue("/root/main/pathistinfo/patinfo/medispclid" ) ;
  1050. model.setValue("/root/main/patinfo/ininfo", ininfo );
  1051. //model.setValue("/root/main/patinfo/indd1", model.getValue("/root/main/pathistinfo/patinfo/indd1") );
  1052. //model.setValue("/root/main/patinfo/orddeptcd", model.getValue("/root/main/pathistinfo/patinfo/orddeptcd") );
  1053. //model.setValue("/root/main/patinfo/medispclid", model.getValue("/root/main/pathistinfo/patinfo/medispclid") );
  1054. if(model.getValue("/root/main/patinfo/nursdocflag") == "N"){
  1055. fDateSetting("Init");
  1056. }else{
  1057. model.setValue("/root/main/patinfo/cardarrgenrdd", getCurrentDate());
  1058. int_cardarrgenrdd.disabled = false;
  1059. }
  1060. fClearChildNode("/root/main/resusinfo/resuslist");
  1061. fInputBoxInit(pFlag);
  1062. model.setValue(xPathCardArrPatInfo+"/rrgstno" , rrgstno);
  1063. if( model.getValue("/root/main/patinfo/cardarrgenrdd") == "" ){
  1064. model.setValue("/root/main/patinfo/cardarrgenrdd", model.getValue("/root/main/pathistinfo/pathistlist/cardarrgenrdd" ));
  1065. model.setValue("/root/main/patinfo/cardarrgenrtm", model.getValue("/root/main/pathistinfo/pathistlist/cardarrgenrtm" ));
  1066. model.setValue("/root/main/patinfo/cardarrgenrdt", model.getValue("/root/main/pathistinfo/pathistlist/cardarrgenrdt" ));
  1067. }
  1068. // 외래 O, 응급 E ,입원 I
  1069. if( model.getValue("/root/srchmax/popflag") != "Y" ){
  1070. if( model.getValue("/root/main/pathistinfo/patinfo/ordtype" ) == "I" ){
  1071. model.setValue("/root/main/patinfo/patinfoflag", "1");
  1072. }else if( model.getValue("/root/main/pathistinfo/patinfo/ordtype" ) == "O" ){
  1073. model.setValue("/root/main/patinfo/patinfoflag", "2");
  1074. model.setValue("/root/main/patinfo/wardnm", "");
  1075. }else if( model.getValue("/root/main/pathistinfo/patinfo/ordtype" ) == "E" ){
  1076. model.setValue("/root/main/patinfo/patinfoflag", "3");
  1077. model.setValue("/root/main/patinfo/wardnm", "");
  1078. }else if( model.getValue("/root/main/pathistinfo/patinfo/ordtype" ) == "4" ){
  1079. model.setValue("/root/main/patinfo/patinfoflag", "4");
  1080. }else if( model.getValue("/root/main/pathistinfo/patinfo/ordtype" ) == "5" ){
  1081. model.setValue("/root/main/patinfo/patinfoflag", "5");
  1082. }else if( model.getValue("/root/main/pathistinfo/patinfo/ordtype" ) == "6" ){
  1083. model.setValue("/root/main/patinfo/patinfoflag", "6");
  1084. }else{
  1085. model.setValue("/root/main/patinfo/patinfoflag", "");
  1086. model.setValue("/root/main/patinfo/wardnm", "");
  1087. }
  1088. }
  1089. model.refresh();
  1090. }else{
  1091. messageBox("조회 결과가 없습니다.","I");
  1092. fInitPatList();
  1093. fInputBoxInit(pFlag)
  1094. return;
  1095. }
  1096. }
  1097. /**
  1098. * @group :
  1099. * @ver : 2007.12.04
  1100. * @by : 양천덕
  1101. * @---------------------------------------------------
  1102. * @type : function
  1103. * @access : public
  1104. * @desc : 심폐소생술 보고서 환자정보 초기화
  1105. * @param :
  1106. * @return :
  1107. * @---------------------------------------------------
  1108. */
  1109. function fInitPatList(){
  1110. model.setValue("/root/main/patinfo/pid" , "");
  1111. model.setValue("/root/main/patinfo/rrgstno" , "");
  1112. model.setValue("/root/main/patinfo/indd" , "");
  1113. model.setValue("/root/main/patinfo/cretno" , "");
  1114. model.setValue("/root/main/patinfo/instcd" , "");
  1115. model.setValue("/root/main/patinfo/patnm" , "");
  1116. model.setValue("/root/main/patinfo/grdrage" , "");
  1117. model.setValue("/root/main/patinfo/cntctel" , "");
  1118. model.setValue("/root/main/patinfo/addr" , "");
  1119. model.setValue("/root/main/patinfo/ininfo" , "");
  1120. model.refresh();
  1121. }
  1122. /**
  1123. * @group :
  1124. * @ver : 2014.10.15
  1125. * @by : 최예원
  1126. * @---------------------------------------------------
  1127. * @type : function
  1128. * @access : public
  1129. * @desc : 작성자와 수정자가 같은지 비교
  1130. * @param :
  1131. * @return :
  1132. * @---------------------------------------------------
  1133. */
  1134. function fSaveChk(){
  1135. var userid = getUserInfo("userid");
  1136. var lastupdtrid = model.getValue("/root/main/pathistinfo/pathistlist[" + grd_pastlst.row +"]/lastupdtrid");
  1137. if( userid != lastupdtrid ){
  1138. messageBox("해당 데이터의 기록자만 수정/삭제 가능합니다.","E");
  1139. return false;
  1140. }else{
  1141. return true;
  1142. }
  1143. }
  1144. /**
  1145. * @group :
  1146. * @ver : 2014.10.15
  1147. * @by : 최예원
  1148. * @---------------------------------------------------
  1149. * @type : function
  1150. * @access : public
  1151. * @desc : 임시저장
  1152. * @param :
  1153. * @return :
  1154. * @---------------------------------------------------
  1155. */
  1156. function fPartCardArrResusSave(pFlag){
  1157. var pStatus = "";
  1158. var sRow = grd_pastlst.row;
  1159. if( fSaveBfChk() == false ){
  1160. return;
  1161. }
  1162. if( grd_pastlst.rows > 1 ){
  1163. if( model.getValue("/root/main/patinfo/selectrow") != "" || sRow >= 1 ){
  1164. pStatus = "U";
  1165. }else{
  1166. pStatus = "I";
  1167. }
  1168. }else{
  1169. pStatus = "I";
  1170. }
  1171. model.removeNode("/root/send");
  1172. model.makeNode("/root/item/list");
  1173. model.copyNode("/root/item/list", "/root/main/resusinfo");
  1174. var sDocHeader = "hosinhosoutflag▦pid▦patnm▦indd▦cretno▦histno▦gender▦age▦wardcd▦roomcd▦diagnm▦diagcd▦atdoctcd▦medispclid▦orddeptcd▦cardarrgenrdt▦instcd";
  1175. var cardarrgenrdt = "";
  1176. //cardarrgenrdt = model.getValue("/root/main/patinfo/cardarrgenrdd") + model.getValue("/root/main/patinfo/cardarrgenrtm");
  1177. cardarrgenrdt = model.getValue("/root/main/patinfo/cardarrgenrdt");
  1178. /*if( model.getValue("/root/main/patinfo/cardarrgenrdt") != "" && pStatus != "I"){
  1179. cardarrgenrdt = model.getValue("/root/main/patinfo/cardarrgenrdt");
  1180. }else{
  1181. cardarrgenrdt = model.getValue("/root/main/patinfo/cardarrgenrdd") + model.getValue("/root/main/patinfo/cardarrgenrtm");
  1182. }*/
  1183. var patinfoflag = model.getValue("/root/main/patinfo/patinfoflag");
  1184. if( pStatus == "I" && ( patinfoflag == "4" || patinfoflag == "5" || patinfoflag == "6" ) && model.getValue(xPathCardArrPatInfo+"/pid" ) == "" ){
  1185. fMakePid(patinfoflag);
  1186. }
  1187. //20160920칠곡 심정지 발생일시 수정
  1188. if( getUserInfo("dutplceinstcd") == "032" && pStatus == "I" ){
  1189. cardarrgenrdt = model.getValue("/root/main/resusinfo/resuslist/cardarrgenrdtchg");
  1190. }
  1191. // 키값 설정부분
  1192. var sCondData = "1" +"▦"
  1193. + model.getValue(xPathCardArrPatInfo+"/pid" ) +"▦"
  1194. + model.getValue(xPathCardArrPatInfo+"/patnm") +"▦"
  1195. + model.getValue(xPathCardArrPatInfo+"/indd" ) +"▦"
  1196. + model.getValue(xPathCardArrPatInfo+"/cretno") +"▦"
  1197. + model.getValue(xPathCardArrPatInfo+"/histno") +"▦"
  1198. + model.getValue(xPathCardArrPatInfo+"/gender") +"▦"
  1199. + model.getValue(xPathCardArrPatInfo+"/age") +"▦"
  1200. + model.getValue(xPathCardArrPatInfo+"/wardcd") +"▦"
  1201. + model.getValue(xPathCardArrPatInfo+"/roomcd") +"▦"
  1202. + model.getValue(xPathCardArrPatInfo+"/diagnm") +"▦"
  1203. + model.getValue(xPathCardArrPatInfo+"/diagcd") +"▦"
  1204. + model.getValue(xPathCardArrPatInfo+"/atdoctcd") +"▦"
  1205. + model.getValue(xPathCardArrPatInfo+"/medispclid") +"▦"
  1206. + model.getValue(xPathCardArrPatInfo+"/orddeptcd") +"▦"
  1207. + cardarrgenrdt +"▦"
  1208. + model.getValue(xPathCardArrPatInfo+"/instcd");
  1209. model.makeValue("/root/send/cond", sDocHeader+"▩"+sCondData+"▩" );
  1210. if( pFlag == "1" ){ // 간호입력
  1211. sDocHeader += "▦"
  1212. + "status▦"
  1213. + "pflag▦"
  1214. + "cardarrgoalyn▦"
  1215. + "cardarrdiscvpsn▦"
  1216. + "cardarrdiscvpsnetc▦"
  1217. + "cardarrgenrplceflag▦"
  1218. + "cardarrgenrplcedept▦"
  1219. + "cardarrgenrplceetc▦"
  1220. + "resusteamarvbfresus▦"
  1221. + "resusteamarvbfresusetc▦"
  1222. + "resusteamfresus▦"
  1223. + "resusteamfresusetc▦"
  1224. + "ambulancearvbfresus▦"
  1225. + "ambulancearvbfresusetc▦"
  1226. + "ambulanceresus▦"
  1227. + "ambulanceresusetc▦"
  1228. + "ercentresus▦"
  1229. + "ercentresusetc▦"
  1230. + "cardarrestmdd▦"
  1231. + "cardarrestmtm▦"
  1232. + "cardarrestmflag▦"
  1233. + "cardarrfinddd▦"
  1234. + "cardarrfindtm▦"
  1235. + "resusteamcalldd▦"
  1236. + "resusteamcalltm▦"
  1237. + "resusteamarvdd▦"
  1238. + "resusteamarvtm▦"
  1239. + "initrhythmcnfmdd▦"
  1240. + "initrhythmcnfmtm▦"
  1241. + "resusfromdd▦"
  1242. + "resusfromtm▦"
  1243. + "resustodd▦"
  1244. + "resustotm▦"
  1245. + "resusteamarvbfresusflag▦"
  1246. + "resusteamarvbfresustext▦"
  1247. + "resusteamarvbfresusnurse▦"
  1248. + "resusteamarvbfresusnurseetc▦"
  1249. + "cardarrgenrtm▦"
  1250. + "cardarrgenrdtchg▦"
  1251. + "cardarryn▦"
  1252. + "bluebirdalarmyn▦"
  1253. + "bluebirdalarmdd▦"
  1254. + "bluebirdalarmtm▦"
  1255. + "cardarrgenrplceward▦"
  1256. + "cardarrgenrplcewardflag▦"
  1257. + "cardarrgenrplcehosin▦"
  1258. + "cardarrgenrplcehoscenter▦"
  1259. + "cardarrgenrplcetestroom▦"
  1260. + "cardarrgenrplcehosout▦"
  1261. + "cardarrgenrplceetcbigo▦"
  1262. + "hosparvbfresus▦"
  1263. + "hosparvbfresusetc▦"
  1264. + "hosparvbfresusynflag▦"
  1265. + "atdoctcalldd▦"
  1266. + "atdoctcalltm▦"
  1267. + "atdoctarrdd▦"
  1268. + "atdoctarrtm▦"
  1269. + "fstresusexecflag▦"
  1270. + "fstresusexecetc▦"
  1271. + "initpatcscs▦"
  1272. + "initpatbreth▦"
  1273. + "initpatpulse▦"
  1274. + "defibrstartdd▦"
  1275. + "defibrstarttm▦"
  1276. + "defibrjul▦"
  1277. + "defibrtims▦"
  1278. + "defibrjul2▦"
  1279. + "defibrtims2▦"
  1280. + "resusteamarvafresus▦"
  1281. + "patinfoflag▦"
  1282. + "patinfoflagetc▦"
  1283. + "gender▦"
  1284. + "age▦"
  1285. + "wardcd▦"
  1286. + "roomcd▦"
  1287. + "diagnm▦"
  1288. + "diagcd▦"
  1289. + "atdoctcd▦"
  1290. + "medispclid▦"
  1291. + "orddeptcd▦"
  1292. + "resusteamarvafresusetc▦"
  1293. + "cardarrcas▦"
  1294. + "initrhythm▦"
  1295. + "resusendresn▦"
  1296. + "resusendresnetc▦"
  1297. + "cardarrrslt▦"
  1298. + "cardarrrsltetc▦"
  1299. + "dschdethdd▦"
  1300. + "dschdethtm▦"
  1301. + "dschneurologystat▦"
  1302. + "resusteamorddept▦"
  1303. + "resusteamorddr▦"
  1304. + "resusteamnum▦"
  1305. + "patstatus▦"
  1306. + "patstatusetc▦"
  1307. + "defibrflag▦"
  1308. + "curerslt▩";
  1309. var resusteamarvbfresus = "";
  1310. var resusteamarvbfresusetc = "";
  1311. var resusteamarvbfresusnurse = "";
  1312. var resusteamarvbfresusnurseetc = "";
  1313. resusteamarvbfresus = model.getValue(xPathCardArrResusList+"/resusteamarvbfresus"); //model.getValue("hidden/list/resusteamarvbfresus");
  1314. resusteamarvbfresusetc = model.getValue(xPathCardArrResusList+"/resusteamarvbfresusetc");
  1315. resusteamarvbfresusnurse = model.getValue(xPathCardArrResusList+"/resusteamarvbfresusnurse");
  1316. resusteamarvbfresusnurseetc = model.getValue(xPathCardArrResusList+"/resusteamarvbfresusnurseetc");
  1317. if( model.getValue("/root/main/resusinfo/resuslist/hosparvbfresusynflag") != "Y" ){
  1318. model.setValue(xPathCardArrResusList+"/hosparvbfresus", "" );
  1319. model.setValue(xPathCardArrResusList+"/hosparvbfresusetc", "" );
  1320. }
  1321. sCondData += "▦"
  1322. + pStatus + "▦"
  1323. + pFlag + "▦"
  1324. + model.getValue(xPathCardArrResusList+"/cardarrgoalyn") +"▦"
  1325. + model.getValue(xPathCardArrResusList+"/cardarrdiscvpsn") +"▦"
  1326. + model.getValue(xPathCardArrResusList+"/cardarrdiscvpsnetc") +"▦"
  1327. + model.getValue(xPathCardArrResusList+"/cardarrgenrplceflag") +"▦"
  1328. + model.getValue(xPathCardArrResusList+"/cardarrgenrplcedept") +"▦"
  1329. + "▦"
  1330. + resusteamarvbfresus +"▦"
  1331. + resusteamarvbfresusetc +"▦"
  1332. + model.getValue("hidden/list/resusteamfresus") +"▦"
  1333. + model.getValue(xPathCardArrResusList+"/resusteamfresusetc") +"▦"
  1334. + "▦"
  1335. + "▦"
  1336. + "▦"
  1337. + "▦"
  1338. + "▦"
  1339. + "▦"
  1340. + model.getValue(xPathCardArrResusList+"/cardarrestmdd") +"▦"
  1341. + model.getValue(xPathCardArrResusList+"/cardarrestmtm") +"▦"
  1342. + model.getValue(xPathCardArrResusList+"/cardarrestmflag") +"▦"
  1343. + model.getValue(xPathCardArrResusList+"/cardarrfinddd") +"▦"
  1344. + model.getValue(xPathCardArrResusList+"/cardarrfindtm") +"▦"
  1345. + model.getValue(xPathCardArrResusList+"/resusteamcalldd") +"▦"
  1346. + model.getValue(xPathCardArrResusList+"/resusteamcalltm") +"▦"
  1347. + model.getValue(xPathCardArrResusList+"/resusteamarvdd") +"▦"
  1348. + model.getValue(xPathCardArrResusList+"/resusteamarvtm") +"▦"
  1349. + model.getValue(xPathCardArrResusList+"/initrhythmcnfmdd") +"▦"
  1350. + model.getValue(xPathCardArrResusList+"/initrhythmcnfmtm") +"▦"
  1351. + model.getValue(xPathCardArrResusList+"/resusfromdd") +"▦"
  1352. + model.getValue(xPathCardArrResusList+"/resusfromtm") +"▦"
  1353. + model.getValue(xPathCardArrResusList+"/resustodd") +"▦"
  1354. + model.getValue(xPathCardArrResusList+"/resustotm") +"▦"
  1355. + model.getValue(xPathCardArrResusList+"/resusteamarvbfresusflag") +"▦"
  1356. + model.getValue(xPathCardArrResusList+"/resusteamarvbfresustext") +"▦"
  1357. + resusteamarvbfresusnurse +"▦"
  1358. + resusteamarvbfresusnurseetc +"▦"
  1359. + model.getValue(xPathCardArrResusList+"/cardarrgenrtm") +"▦"
  1360. + model.getValue(xPathCardArrResusList+"/cardarrgenrdtchg") +"▦"
  1361. + model.getValue(xPathCardArrResusList+"/cardarryn") +"▦"
  1362. + model.getValue(xPathCardArrResusList+"/bluebirdalarmyn") +"▦"
  1363. + model.getValue(xPathCardArrResusList+"/bluebirdalarmdd") +"▦"
  1364. + model.getValue(xPathCardArrResusList+"/bluebirdalarmtm") +"▦"
  1365. + model.getValue(xPathCardArrResusList+"/cardarrgenrplceward") +"▦"
  1366. + model.getValue(xPathCardArrResusList+"/cardarrgenrplcewardflag") +"▦"
  1367. + model.getValue(xPathCardArrResusList+"/cardarrgenrplcehosin") +"▦"
  1368. + model.getValue(xPathCardArrResusList+"/cardarrgenrplcehoscenter") +"▦"
  1369. + model.getValue(xPathCardArrResusList+"/cardarrgenrplcetestroom") +"▦"
  1370. + model.getValue(xPathCardArrResusList+"/cardarrgenrplcehosout") +"▦"
  1371. + model.getValue(xPathCardArrResusList+"/cardarrgenrplceetcbigo") +"▦"
  1372. + model.getValue(xPathCardArrResusList+"/hosparvbfresus") +"▦"
  1373. + model.getValue(xPathCardArrResusList+"/hosparvbfresusetc") +"▦"
  1374. + model.getValue(xPathCardArrResusList+"/hosparvbfresusynflag") +"▦"
  1375. + model.getValue(xPathCardArrResusList+"/atdoctcalldd") +"▦"
  1376. + model.getValue(xPathCardArrResusList+"/atdoctcalltm") +"▦"
  1377. + model.getValue(xPathCardArrResusList+"/atdoctarrdd") +"▦"
  1378. + model.getValue(xPathCardArrResusList+"/atdoctarrtm") +"▦"
  1379. + model.getValue(xPathCardArrResusList+"/fstresusexecflag") +"▦"
  1380. + model.getValue(xPathCardArrResusList+"/fstresusexecetc") +"▦"
  1381. + model.getValue(xPathCardArrResusList+"/initpatcscs") +"▦"
  1382. + model.getValue(xPathCardArrResusList+"/initpatbreth") +"▦"
  1383. + model.getValue(xPathCardArrResusList+"/initpatpulse") +"▦"
  1384. + model.getValue(xPathCardArrResusList+"/defibrstartdd") +"▦"
  1385. + model.getValue(xPathCardArrResusList+"/defibrstarttm") +"▦"
  1386. + model.getValue(xPathCardArrResusList+"/defibrjul") +"▦"
  1387. + model.getValue(xPathCardArrResusList+"/defibrtims") +"▦"
  1388. + model.getValue(xPathCardArrResusList+"/defibrjul2") +"▦"
  1389. + model.getValue(xPathCardArrResusList+"/defibrtims2") +"▦"
  1390. + model.getValue(xPathCardArrResusList+"/resusteamarvafresus") +"▦"
  1391. + model.getValue("/root/main/patinfo/patinfoflag") +"▦"
  1392. + model.getValue(xPathCardArrResusList+"/patinfoflagetc") +"▦"
  1393. + model.getValue("/root/main/patinfo/gender") +"▦"
  1394. + model.getValue("/root/main/patinfo/age") +"▦"
  1395. + model.getValue("/root/main/patinfo/wardcd") +"▦"
  1396. + model.getValue("/root/main/patinfo/roomcd") +"▦"
  1397. + model.getValue("/root/main/patinfo/diagnm") +"▦"
  1398. + model.getValue("/root/main/patinfo/diagcd") +"▦"
  1399. + model.getValue("/root/main/patinfo/atdoctcd") +"▦"
  1400. + model.getValue("/root/main/patinfo/medispclid") +"▦"
  1401. + model.getValue("/root/main/patinfo/orddeptcd") +"▦"
  1402. + model.getValue(xPathCardArrResusList + "/resusteamarvafresusetc") +"▦"
  1403. + model.getValue(xPathCardArrResusList + "/cardarrcas") +"▦"
  1404. + model.getValue(xPathCardArrResusList + "/initrhythm") +"▦"
  1405. + model.getValue(xPathCardArrResusList + "/resusendresn") +"▦"
  1406. + model.getValue(xPathCardArrResusList + "/resusendresnetc") +"▦"
  1407. + model.getValue(xPathCardArrResusList + "/cardarrrslt") +"▦"
  1408. + model.getValue(xPathCardArrResusList + "/cardarrrsltetc") +"▦"
  1409. + model.getValue(xPathCardArrResusList + "/dschdethdd") +"▦"
  1410. + model.getValue(xPathCardArrResusList + "/dschdethtm") +"▦"
  1411. + model.getValue(xPathCardArrResusList + "/dschneurologystat") +"▦"
  1412. + model.getValue(xPathCardArrResusList + "/resusteamorddept") +"▦"
  1413. + model.getValue(xPathCardArrResusList + "/resusteamorddr") +"▦"
  1414. + model.getValue(xPathCardArrResusList + "/resusteamnum") +"▦"
  1415. + model.getValue(xPathCardArrResusList + "/patstatus") +"▦"
  1416. + model.getValue(xPathCardArrResusList + "/patstatusetc") +"▦"
  1417. + model.getValue(xPathCardArrResusList + "/defibrflag") +"▦"
  1418. + model.getValue(xPathCardArrResusList + "/curerslt") +"▩";
  1419. }
  1420. model.makeValue("/root/send/recdata", sDocHeader+sCondData );
  1421. // Hist 데이터 입력
  1422. var DetailHeader = "pid▦indd▦cretno▦histno▦cardarrgenrdt▦instcd▩";
  1423. var Detail_Cardarrgenrdt = model.getValue("/root/main/patinfo/cardarrgenrdd") + model.getValue("/root/main/patinfo/cardarrgenrtm");
  1424. // 키값 설정부분
  1425. var DetailData = model.getValue(xPathCardArrPatInfo+"/pid" ) +"▦"
  1426. + model.getValue(xPathCardArrPatInfo+"/indd" ) +"▦"
  1427. + model.getValue(xPathCardArrPatInfo+"/cretno") +"▦"
  1428. + model.getValue(xPathCardArrPatInfo+"/histno") +"▦"
  1429. + Detail_Cardarrgenrdt +"▦"
  1430. + model.getValue(xPathCardArrPatInfo+"/instcd") +"▩";
  1431. model.makeValue("/root/send/recdetail", DetailHeader + DetailData );
  1432. if( submit("TXMNE02302") == true ){
  1433. model.copynode("/root/main/resusinfo", "/root/resusbase" );
  1434. model.setValue("/root/saveinfo/nurseinfo" , "" );
  1435. model.setValue("/root/saveinfo/lastinfo" , "" );
  1436. fSrchHistList("1");
  1437. fActionStatus("1", pStatus, sRow );
  1438. }
  1439. model.removeNodeset("/root/item");
  1440. model.refresh();
  1441. }
  1442. /**
  1443. * @group :
  1444. * @ver : 2014.10.15
  1445. * @by : 최예원
  1446. * @---------------------------------------------------
  1447. * @type : function
  1448. * @access : public
  1449. * @desc : 필수입력체크
  1450. * @param :
  1451. * @return :
  1452. * @---------------------------------------------------
  1453. */
  1454. function fSaveBfChk(){
  1455. if( model.getValue( xPathCardArrPatInfo +"/patinfoflag") == ""){
  1456. messageBox("대상자 구분 정보는 필수입력입니다.","E");
  1457. return false;
  1458. }
  1459. if( model.getValue( xPathCardArrPatInfo + "/pid" ) == "" && model.getValue( xPathCardArrPatInfo + "/patnm" ) == "" ){
  1460. messageBox("환자정보는 필수입력입니다.","E");
  1461. return false;
  1462. }
  1463. if ( (model.getValue("/root/main/resusinfo/resuslist/cardarrgenrdd") != "" && model.getValue("/root/main/resusinfo/resuslist/cardarrgenrtm") == "")
  1464. && (model.getValue("/root/main/resusinfo/resuslist/cardarrgenrdd") == "" && model.getValue("/root/main/resusinfo/resuslist/cardarrgenrtm") != "") ){
  1465. messageBox("발생일시의 날짜/시간을 모두 입력하십시요.","E");
  1466. return false;
  1467. }
  1468. if( model.getValue("/root/main/resusinfo/resuslist/cardarryn") == "" ){
  1469. messageBox("심정지 여부는 필수입력입니다.","E");
  1470. return false;
  1471. }else if (model.getValue("/root/main/resusinfo/resuslist/cardarryn") == "Y" && (model.getValue("/root/main/resusinfo/resuslist/cardarrfinddd") == "" || model.getValue("/root/main/resusinfo/resuslist/cardarrfindtm") == "") ){
  1472. messageBox("심정지 여부가 Y일 경우 심정지 발견시간은 필수입력입니다.","E");
  1473. return false;
  1474. }
  1475. if ( (model.getValue("/root/main/resusinfo/resuslist/cardarrestmdd") != "" && model.getValue("/root/main/resusinfo/resuslist/cardarrestmtm") == "")
  1476. && (model.getValue("/root/main/resusinfo/resuslist/cardarrestmdd") == "" && model.getValue("/root/main/resusinfo/resuslist/cardarrestmtm") != "")){
  1477. messageBox("심정지 추정시간의 날짜/시간을 모두 입력하십시요.","E");
  1478. return false;
  1479. }
  1480. if( model.getValue("/root/main/resusinfo/resuslist/bluebirdalarmyn") == "" ){
  1481. messageBox("파랑새 발령 호출여부는 필수입력입니다.","E");
  1482. return false;
  1483. }else if (model.getValue("/root/main/resusinfo/resuslist/bluebirdalarmyn") == "Y" && (model.getValue("/root/main/resusinfo/resuslist/bluebirdalarmdd") == "" || model.getValue("/root/main/resusinfo/resuslist/bluebirdalarmtm") == "") ){
  1484. messageBox("파랑새 발령 호출여부 Y일 경우 파랑새 발령 호출시간은 필수입력입니다.","E");
  1485. return false;
  1486. }
  1487. if( model.getValue("/root/main/resusinfo/resuslist/resusteamarvdd") == "" || model.getValue("/root/main/resusinfo/resuslist/resusteamarvtm") == "" ){
  1488. messageBox("CPR 도착시간은 필수입력입니다.","E");
  1489. return false;
  1490. }
  1491. if(model.getValue("/root/main/resusinfo/resuslist/cardarrgoalyn") == ""){
  1492. messageBox("목격여부는 필수입력입니다.","E");
  1493. return false;
  1494. }
  1495. if( model.getValue("/root/main/resusinfo/resuslist/cardarrdiscvpsn") == ""){
  1496. messageBox("발견자(목격자)는 필수입력입니다.","E");
  1497. return false;
  1498. }else if( model.getValue("/root/main/resusinfo/resuslist/cardarrdiscvpsn") == "09" && model.getValue("/root/main/resusinfo/resuslist/cardarrdiscvpsnetc") == "" ){
  1499. messageBox("발견자(목격자)가 기타일 경우 기타입력란은 필수입력입니다.","E");
  1500. return false;
  1501. }
  1502. if( model.getValue("/root/main/resusinfo/resuslist/cardarrgenrplceflag") == ""){
  1503. messageBox("발생장소는 필수입력입니다.","E");
  1504. return false;
  1505. }
  1506. if( model.getValue("/root/main/resusinfo/resuslist/resusteamarvbfresusflag") == ""){
  1507. messageBox("CPR팀 도착 전 처치는 필수입력입니다.","E");
  1508. return false;
  1509. }
  1510. if( model.getValue("/root/main/resusinfo/resuslist/fstresusexecflag") == ""){
  1511. messageBox(" 최초 소생술 시행자는 필수입력입니다.","E");
  1512. return false;
  1513. } else if ( model.getValue("/root/main/resusinfo/resuslist/fstresusexecflag") == "09" && model.getValue("/root/main/resusinfo/resuslist/fstresusexecetc") == ""){
  1514. messageBox(" 최초 소생술 시행자가 기타일 경우 기타입력란은 필수입력입니다.","E");
  1515. return false;
  1516. }
  1517. if ( (model.getValue("/root/main/resusinfo/resuslist/atdoctcalldd") != "" && model.getValue("/root/main/resusinfo/resuslist/atdoctcalltm") == "")
  1518. && (model.getValue("/root/main/resusinfo/resuslist/atdoctcalldd") == "" && model.getValue("/root/main/resusinfo/resuslist/atdoctcalltm") != "")){
  1519. messageBox("담당의(주치의) 호출시간의 날짜/시간을 모두 입력하십시요.","E");
  1520. return false;
  1521. }
  1522. if ( (model.getValue("/root/main/resusinfo/resuslist/atdoctarrdd") != "" && model.getValue("/root/main/resusinfo/resuslist/atdoctarrtm") == "")
  1523. && (model.getValue("/root/main/resusinfo/resuslist/atdoctarrdd") == "" && model.getValue("/root/main/resusinfo/resuslist/atdoctarrtm") != "")){
  1524. messageBox("담당의(주치의) 도착시간의 날짜/시간을 모두 입력하십시요.","E");
  1525. return false;
  1526. }
  1527. if ( (model.getValue("/root/main/resusinfo/resuslist/initrhythmcnfmdd") != "" && model.getValue("/root/main/resusinfo/resuslist/initrhythmcnfmtm") == "")
  1528. && (model.getValue("/root/main/resusinfo/resuslist/initrhythmcnfmdd") == "" && model.getValue("/root/main/resusinfo/resuslist/initrhythmcnfmtm") != "")){
  1529. messageBox("초기리듬 확인시간의 날짜/시간을 모두 입력하십시요.","E");
  1530. return false;
  1531. }
  1532. if ( (model.getValue("/root/main/resusinfo/resuslist/defibrstartdd") != "" && model.getValue("/root/main/resusinfo/resuslist/defibrstarttm") == "")
  1533. && (model.getValue("/root/main/resusinfo/resuslist/defibrstartdd") == "" && model.getValue("/root/main/resusinfo/resuslist/defibrstarttm") != "")){
  1534. messageBox("제세동 시작시간의 날짜/시간을 모두 입력하십시요.","E");
  1535. return false;
  1536. }
  1537. if ( (model.getValue("/root/main/resusinfo/resuslist/resusfromdd") != "" && model.getValue("/root/main/resusinfo/resuslist/resusfromtm") == "")
  1538. && (model.getValue("/root/main/resusinfo/resuslist/resusfromdd") == "" && model.getValue("/root/main/resusinfo/resuslist/resusfromtm") != "")){
  1539. messageBox("소생술 시작시간의 날짜/시간을 모두 입력하십시요.","E");
  1540. return false;
  1541. }
  1542. if ( (model.getValue("/root/main/resusinfo/resuslist/resustodd") != "" && model.getValue("/root/main/resusinfo/resuslist/resustotm") == "")
  1543. && (model.getValue("/root/main/resusinfo/resuslist/resustodd") == "" && model.getValue("/root/main/resusinfo/resuslist/resustotm") != "")){
  1544. messageBox("소생술 종료시간의 날짜/시간을 모두 입력하십시요.","E");
  1545. return false;
  1546. }
  1547. if( model.getValue("/root/main/resusinfo/resuslist/resusteamarvafresus") == ""){
  1548. messageBox("CPR팀 도착 후 처치는 필수입력입니다.","E");
  1549. return false;
  1550. }else if( model.getValue("/root/main/resusinfo/resuslist/resusteamarvafresus") == "09" && model.getValue("/root/main/resusinfo/resuslist/resusteamarvafresusetc") == "" ){
  1551. messageBox("CPR팀 도착 후 처치가 기타일 경우 기타입력란은 필수입력입니다.","E");
  1552. return false;
  1553. }
  1554. if( model.getValue("/root/main/resusinfo/resuslist/resusendresn") == ""){
  1555. messageBox("소생술 종료사유는 필수입력입니다.","E");
  1556. return false;
  1557. }else if( model.getValue("/root/main/resusinfo/resuslist/resusendresn") == "09" && model.getValue("/root/main/resusinfo/resuslist/resusendresnetc") == ""){
  1558. messageBox("소생술 종료사유가 기타일 경우 기타입력란은 필수입력입니다.","E");
  1559. return false;
  1560. }
  1561. if( model.getValue("/root/main/resusinfo/resuslist/cardarrrslt") == ""){
  1562. messageBox("소생술 결과는 필수입력입니다.","E");
  1563. return false;
  1564. } else if( model.getValue("/root/main/resusinfo/resuslist/cardarrrslt") == "01"
  1565. && (model.getValue("/root/main/resusinfo/resuslist/dschdethdd") == "" || model.getValue("/root/main/resusinfo/resuslist/dschdethtm") == "" )){
  1566. messageBox("자발순환회복못함(사망) 선택 시 사망일시는 필수입력입니다.","E");
  1567. return false;
  1568. }
  1569. if( model.getValue("/root/main/resusinfo/resuslist/curerslt") == ""){
  1570. messageBox("처치 및 결과(육하원칙에 의해)는 필수입력입니다.","E");
  1571. return false;
  1572. }
  1573. return true;
  1574. }
  1575. /**
  1576. * @group :
  1577. * @ver : 2014.10.15
  1578. * @by : 최예원
  1579. * @---------------------------------------------------
  1580. * @type : function
  1581. * @access : public
  1582. * @desc : 최종 인증저장
  1583. * @param :
  1584. * @return :
  1585. * @---------------------------------------------------
  1586. */
  1587. function fCardArrResusLastSave(pStatus){
  1588. var sRow = grd_pastlst.row;
  1589. model.removeNode("/root/send");
  1590. model.makeNode("/root/item/list");
  1591. model.copyNode("/root/item/list", "/root/main/resusinfo");
  1592. var sDocHeader = "hosinhosoutflag▦pid▦patnm▦indd▦cretno▦histno▦gender▦age▦wardcd▦roomcd▦diagnm▦diagcd▦atdoctcd▦medispclid▦orddeptcd▦cardarrgenrdt▦instcd▦lastsaveyn";
  1593. //최종저장시 저장 안되는 부분 수정
  1594. //cardarrgenrdt = model.getValue("/root/main/patinfo/cardarrgenrdd") + model.getValue("/root/main/patinfo/cardarrgenrtm");
  1595. cardarrgenrdt = model.getValue("/root/main/patinfo/cardarrgenrdt");
  1596. var patinfoflag = model.getValue("/root/main/patinfo/patinfoflag");
  1597. if( pStatus == "I" && ( patinfoflag == "4" || patinfoflag == "5" || patinfoflag == "6" ) && model.getValue(xPathCardArrPatInfo+"/pid" ) == "" ){
  1598. fMakePid(patinfoflag);
  1599. }
  1600. //20160920칠곡 심정지 발생일시 수정
  1601. if( getUserInfo("dutplceinstcd") == "032" && pStatus == "I" ){
  1602. cardarrgenrdt = model.getValue("/root/main/resusinfo/resuslist/cardarrgenrdtchg");
  1603. }
  1604. // 키값 설정부분
  1605. var sCondData = "1" +"▦"
  1606. + model.getValue(xPathCardArrPatInfo+"/pid" ) +"▦"
  1607. + model.getValue(xPathCardArrPatInfo+"/patnm") +"▦"
  1608. + model.getValue(xPathCardArrPatInfo+"/indd" ) +"▦"
  1609. + model.getValue(xPathCardArrPatInfo+"/cretno") +"▦"
  1610. + model.getValue(xPathCardArrPatInfo+"/histno") +"▦"
  1611. + model.getValue(xPathCardArrPatInfo+"/gender") +"▦"
  1612. + model.getValue(xPathCardArrPatInfo+"/age") +"▦"
  1613. + model.getValue(xPathCardArrPatInfo+"/wardcd") +"▦"
  1614. + model.getValue(xPathCardArrPatInfo+"/roomcd") +"▦"
  1615. + model.getValue(xPathCardArrPatInfo+"/diagnm") +"▦"
  1616. + model.getValue(xPathCardArrPatInfo+"/diagcd") +"▦"
  1617. + model.getValue(xPathCardArrPatInfo+"/atdoctcd") +"▦"
  1618. + model.getValue(xPathCardArrPatInfo+"/medispclid") +"▦"
  1619. + model.getValue(xPathCardArrPatInfo+"/orddeptcd") +"▦"
  1620. + cardarrgenrdt +"▦"
  1621. + model.getValue(xPathCardArrPatInfo+"/instcd") +"▦"
  1622. + "Y";
  1623. model.makeValue("/root/send/cond", sDocHeader+"▩"+sCondData+"▩" );
  1624. sDocHeader += "▦"
  1625. + "status▦"
  1626. + "pflag▦"
  1627. + "cardarrgoalyn▦"
  1628. + "cardarrdiscvpsn▦"
  1629. + "cardarrdiscvpsnetc▦"
  1630. + "cardarrgenrplceflag▦"
  1631. + "cardarrgenrplcedept▦"
  1632. + "cardarrgenrplceetc▦"
  1633. + "resusteamarvbfresus▦"
  1634. + "resusteamarvbfresusetc▦"
  1635. + "resusteamfresus▦"
  1636. + "resusteamfresusetc▦"
  1637. + "ambulancearvbfresus▦"
  1638. + "ambulancearvbfresusetc▦"
  1639. + "ambulanceresus▦"
  1640. + "ambulanceresusetc▦"
  1641. + "ercentresus▦"
  1642. + "ercentresusetc▦"
  1643. + "cardarrestmdd▦"
  1644. + "cardarrestmtm▦"
  1645. + "cardarrestmflag▦"
  1646. + "cardarrfinddd▦"
  1647. + "cardarrfindtm▦"
  1648. + "resusteamcalldd▦"
  1649. + "resusteamcalltm▦"
  1650. + "resusteamarvdd▦"
  1651. + "resusteamarvtm▦"
  1652. + "initrhythmcnfmdd▦"
  1653. + "initrhythmcnfmtm▦"
  1654. + "resusfromdd▦"
  1655. + "resusfromtm▦"
  1656. + "resustodd▦"
  1657. + "resustotm▦"
  1658. + "resusteamarvbfresusflag▦"
  1659. + "resusteamarvbfresustext▦"
  1660. + "resusteamarvbfresusnurse▦"
  1661. + "resusteamarvbfresusnurseetc▦"
  1662. + "cardarrgenrtm▦"
  1663. + "cardarrgenrdtchg▦"
  1664. + "cardarryn▦"
  1665. + "bluebirdalarmyn▦"
  1666. + "bluebirdalarmdd▦"
  1667. + "bluebirdalarmtm▦"
  1668. + "cardarrgenrplceward▦"
  1669. + "cardarrgenrplcewardflag▦"
  1670. + "cardarrgenrplcehosin▦"
  1671. + "cardarrgenrplcehoscenter▦"
  1672. + "cardarrgenrplcetestroom▦"
  1673. + "cardarrgenrplcehosout▦"
  1674. + "hosparvbfresus▦"
  1675. + "hosparvbfresusetc▦"
  1676. + "hosparvbfresusynflag▦"
  1677. + "atdoctcalldd▦"
  1678. + "atdoctcalltm▦"
  1679. + "atdoctarrdd▦"
  1680. + "atdoctarrtm▦"
  1681. + "defibrstartdd▦"
  1682. + "defibrstarttm▦"
  1683. + "defibrjul▦"
  1684. + "defibrtims▦"
  1685. + "defibrjul2▦"
  1686. + "defibrtims2▦"
  1687. + "resusteamarvafresus▦"
  1688. + "patinfoflag▦"
  1689. + "patinfoflagetc▦"
  1690. + "gender▦"
  1691. + "age▦"
  1692. + "wardcd▦"
  1693. + "roomcd▦"
  1694. + "diagnm▦"
  1695. + "diagcd▦"
  1696. + "atdoctcd▦"
  1697. + "medispclid▦"
  1698. + "orddeptcd▦"
  1699. + "resusteamarvafresusetc▦"
  1700. + "cardarrcas▦"
  1701. + "initrhythm▦"
  1702. + "resusendresn▦"
  1703. + "resusendresnetc▦"
  1704. + "cardarrrslt▦"
  1705. + "cardarrrsltetc▦"
  1706. + "dschdethdd▦"
  1707. + "dschdethtm▦"
  1708. + "dschneurologystat▦"
  1709. + "resusteamorddept▦"
  1710. + "resusteamorddr▦"
  1711. + "resusteamnum▦"
  1712. + "patstatus▦"
  1713. + "patstatusetc▦"
  1714. + "defibrflag▦"
  1715. + "curerslt▩";
  1716. var resusteamarvbfresus = "";
  1717. var resusteamarvbfresusetc = "";
  1718. var resusteamarvbfresusnurse = "";
  1719. var resusteamarvbfresusnurseetc = "";
  1720. resusteamarvbfresus = model.getValue(xPathCardArrResusList+"/resusteamarvbfresus"); //model.getValue("hidden/list/resusteamarvbfresus");
  1721. resusteamarvbfresusetc = model.getValue(xPathCardArrResusList+"/resusteamarvbfresusetc");
  1722. resusteamarvbfresusnurse = model.getValue(xPathCardArrResusList+"/resusteamarvbfresusnurse");
  1723. resusteamarvbfresusnurseetc = model.getValue(xPathCardArrResusList+"/resusteamarvbfresusnurseetc");
  1724. if( model.getValue("/root/main/resusinfo/resuslist/hosparvbfresusynflag") != "Y" ){
  1725. model.setValue(xPathCardArrResusList+"/hosparvbfresus", "" );
  1726. model.setValue(xPathCardArrResusList+"/hosparvbfresusetc", "" );
  1727. }
  1728. sCondData += "▦"
  1729. + pStatus + "▦"
  1730. + "1" + "▦"
  1731. + model.getValue(xPathCardArrResusList+"/cardarrgoalyn") +"▦"
  1732. + model.getValue(xPathCardArrResusList+"/cardarrdiscvpsn") +"▦"
  1733. + model.getValue(xPathCardArrResusList+"/cardarrdiscvpsnetc") +"▦"
  1734. + model.getValue(xPathCardArrResusList+"/cardarrgenrplceflag") +"▦"
  1735. + model.getValue(xPathCardArrResusList+"/cardarrgenrplcedept") +"▦"
  1736. + "▦"
  1737. + resusteamarvbfresus +"▦"
  1738. + resusteamarvbfresusetc +"▦"
  1739. + model.getValue("hidden/list/resusteamfresus") +"▦"
  1740. + model.getValue(xPathCardArrResusList+"/resusteamfresusetc") +"▦"
  1741. + "▦"
  1742. + "▦"
  1743. + "▦"
  1744. + "▦"
  1745. + "▦"
  1746. + "▦"
  1747. + model.getValue(xPathCardArrResusList+"/cardarrestmdd") +"▦"
  1748. + model.getValue(xPathCardArrResusList+"/cardarrestmtm") +"▦"
  1749. + model.getValue(xPathCardArrResusList+"/cardarrestmflag") +"▦"
  1750. + model.getValue(xPathCardArrResusList+"/cardarrfinddd") +"▦"
  1751. + model.getValue(xPathCardArrResusList+"/cardarrfindtm") +"▦"
  1752. + model.getValue(xPathCardArrResusList+"/resusteamcalldd") +"▦"
  1753. + model.getValue(xPathCardArrResusList+"/resusteamcalltm") +"▦"
  1754. + model.getValue(xPathCardArrResusList+"/resusteamarvdd") +"▦"
  1755. + model.getValue(xPathCardArrResusList+"/resusteamarvtm") +"▦"
  1756. + model.getValue(xPathCardArrResusList+"/initrhythmcnfmdd") +"▦"
  1757. + model.getValue(xPathCardArrResusList+"/initrhythmcnfmtm") +"▦"
  1758. + model.getValue(xPathCardArrResusList+"/resusfromdd") +"▦"
  1759. + model.getValue(xPathCardArrResusList+"/resusfromtm") +"▦"
  1760. + model.getValue(xPathCardArrResusList+"/resustodd") +"▦"
  1761. + model.getValue(xPathCardArrResusList+"/resustotm") +"▦"
  1762. + model.getValue(xPathCardArrResusList+"/resusteamarvbfresusflag") +"▦"
  1763. + model.getValue(xPathCardArrResusList+"/resusteamarvbfresustext") +"▦"
  1764. + resusteamarvbfresusnurse +"▦"
  1765. + resusteamarvbfresusnurseetc +"▦"
  1766. + model.getValue(xPathCardArrResusList+"/cardarrgenrtm") +"▦"
  1767. + model.getValue(xPathCardArrResusList+"/cardarrgenrdtchg") +"▦"
  1768. + model.getValue(xPathCardArrResusList+"/cardarryn") +"▦"
  1769. + model.getValue(xPathCardArrResusList+"/bluebirdalarmyn") +"▦"
  1770. + model.getValue(xPathCardArrResusList+"/bluebirdalarmdd") +"▦"
  1771. + model.getValue(xPathCardArrResusList+"/bluebirdalarmtm") +"▦"
  1772. + model.getValue(xPathCardArrResusList+"/cardarrgenrplceward") +"▦"
  1773. + model.getValue(xPathCardArrResusList+"/cardarrgenrplcewardflag") +"▦"
  1774. + model.getValue(xPathCardArrResusList+"/cardarrgenrplcehosin") +"▦"
  1775. + model.getValue(xPathCardArrResusList+"/cardarrgenrplcehoscenter") +"▦"
  1776. + model.getValue(xPathCardArrResusList+"/cardarrgenrplcetestroom") +"▦"
  1777. + model.getValue(xPathCardArrResusList+"/cardarrgenrplcehosout") +"▦"
  1778. + model.getValue(xPathCardArrResusList+"/hosparvbfresus") +"▦"
  1779. + model.getValue(xPathCardArrResusList+"/hosparvbfresusetc") +"▦"
  1780. + model.getValue(xPathCardArrResusList+"/hosparvbfresusynflag") +"▦"
  1781. + model.getValue(xPathCardArrResusList+"/atdoctcalldd") +"▦"
  1782. + model.getValue(xPathCardArrResusList+"/atdoctcalltm") +"▦"
  1783. + model.getValue(xPathCardArrResusList+"/atdoctarrdd") +"▦"
  1784. + model.getValue(xPathCardArrResusList+"/atdoctarrtm") +"▦"
  1785. + model.getValue(xPathCardArrResusList+"/defibrstartdd") +"▦"
  1786. + model.getValue(xPathCardArrResusList+"/defibrstarttm") +"▦"
  1787. + model.getValue(xPathCardArrResusList+"/defibrjul") +"▦"
  1788. + model.getValue(xPathCardArrResusList+"/defibrtims") +"▦"
  1789. + model.getValue(xPathCardArrResusList+"/defibrjul2") +"▦"
  1790. + model.getValue(xPathCardArrResusList+"/defibrtims2") +"▦"
  1791. + model.getValue(xPathCardArrResusList+"/resusteamarvafresus") +"▦"
  1792. + model.getValue("/root/main/patinfo/patinfoflag") +"▦"
  1793. + model.getValue(xPathCardArrResusList+"/patinfoflagetc") +"▦"
  1794. + model.getValue("/root/main/patinfo/gender") +"▦"
  1795. + model.getValue("/root/main/patinfo/age") +"▦"
  1796. + model.getValue("/root/main/patinfo/wardcd") +"▦"
  1797. + model.getValue("/root/main/patinfo/roomcd") +"▦"
  1798. + model.getValue("/root/main/patinfo/diagnm") +"▦"
  1799. + model.getValue("/root/main/patinfo/diagcd") +"▦"
  1800. + model.getValue("/root/main/patinfo/atdoctcd") +"▦"
  1801. + model.getValue("/root/main/patinfo/medispclid") +"▦"
  1802. + model.getValue("/root/main/patinfo/orddeptcd") +"▦"
  1803. + model.getValue(xPathCardArrResusList + "/resusteamarvafresusetc") +"▦"
  1804. + model.getValue(xPathCardArrResusList + "/cardarrcas") +"▦"
  1805. + model.getValue(xPathCardArrResusList + "/initrhythm") +"▦"
  1806. + model.getValue(xPathCardArrResusList + "/resusendresn") +"▦"
  1807. + model.getValue(xPathCardArrResusList + "/resusendresnetc") +"▦"
  1808. + model.getValue(xPathCardArrResusList + "/cardarrrslt") +"▦"
  1809. + model.getValue(xPathCardArrResusList + "/cardarrrsltetc") +"▦"
  1810. + model.getValue(xPathCardArrResusList + "/dschdethdd") +"▦"
  1811. + model.getValue(xPathCardArrResusList + "/dschdethtm") +"▦"
  1812. + model.getValue(xPathCardArrResusList + "/dschneurologystat") +"▦"
  1813. + model.getValue(xPathCardArrResusList + "/resusteamorddept") +"▦"
  1814. + model.getValue(xPathCardArrResusList + "/resusteamorddr") +"▦"
  1815. + model.getValue(xPathCardArrResusList + "/resusteamnum") +"▦"
  1816. + model.getValue(xPathCardArrResusList + "/patstatus") +"▦"
  1817. + model.getValue(xPathCardArrResusList + "/patstatusetc") +"▦"
  1818. + model.getValue(xPathCardArrResusList + "/defibrflag") +"▦"
  1819. + model.getValue(xPathCardArrResusList + "/curerslt") +"▩";
  1820. model.makeValue("/root/send/recdata", sDocHeader+sCondData );
  1821. // Hist 데이터 입력
  1822. var DetailHeader = "pid▦indd▦cretno▦histno▦cardarrgenrdt▦instcd▩";
  1823. var Detail_Cardarrgenrdt = model.getValue("/root/main/patinfo/cardarrgenrdd") + model.getValue("/root/main/patinfo/cardarrgenrtm");
  1824. // 키값 설정부분
  1825. var DetailData = model.getValue(xPathCardArrPatInfo+"/pid" ) +"▦"
  1826. + model.getValue(xPathCardArrPatInfo+"/indd" ) +"▦"
  1827. + model.getValue(xPathCardArrPatInfo+"/cretno") +"▦"
  1828. + model.getValue(xPathCardArrPatInfo+"/histno") +"▦"
  1829. + Detail_Cardarrgenrdt +"▦"
  1830. + model.getValue(xPathCardArrPatInfo+"/instcd") +"▩";
  1831. model.makeValue("/root/send/recdetail", DetailHeader + DetailData );
  1832. if( submit("TXMNE02302") ){
  1833. fSrchHistList("1");
  1834. fActionStatus("1", "U", sRow);
  1835. }
  1836. }
  1837. /**
  1838. * PID 만들기 ( 보호자, 방문객, 기타일 경우 PID가 존재하지 않기때문에 )
  1839. * 보호자 4 -- P + 00001 ( 일련번호 )
  1840. * 방문객 5 -- V + 00001
  1841. * 기 타 6 -- E + 00001
  1842. */
  1843. function fMakePid(patinfoflag){
  1844. var pid = model.getValue(xPathCardArrPatInfo + "/pid");
  1845. var patnm = model.getValue(xPathCardArrPatInfo + "/patnm");
  1846. model.setValue("/root/srchmax/patinfoflag" , patinfoflag );
  1847. if( patinfoflag == "4" ){ model.setValue("/root/srchmax/patinfoflagtxt", "P") };
  1848. if( patinfoflag == "5" ){ model.setValue("/root/srchmax/patinfoflagtxt", "V") };
  1849. if( patinfoflag == "6" ){ model.setValue("/root/srchmax/patinfoflagtxt", "E") };
  1850. if( submit("TRMNE02311") ){
  1851. model.setValue(xPathCardArrPatInfo+"/pid", model.getValue("/root/srchmax/patinfoflagtxt") + model.getValue("/root/temp/maxseq/item/pidseq"));
  1852. model.setValue(xPathCardArrPatInfo+"/indd" , "-" );
  1853. model.setValue(xPathCardArrPatInfo+"/cretno" , "1" );
  1854. model.setValue(xPathCardArrPatInfo+"/instcd" , getUserInfo("dutplceinstcd") );
  1855. }
  1856. }
  1857. function fGetCareComRoomList(pWard){
  1858. model.makeValue("/root/send/wardcd", pWard);
  1859. if(submit("TRMNR01003")){
  1860. }
  1861. }
  1862. // 출력
  1863. function fPrint(){
  1864. model.removenode("/root/print");
  1865. model.makeNode("/root/print/resusinfo");
  1866. model.makeNode("/root/print/patinfo");
  1867. model.copyNode("/root/print/resusinfo", "/root/main/resusinfo/resuslist");
  1868. model.copyNode("/root/print/patinfo", "/root/main/patinfo");
  1869. model.setValue("/root/print/patinfo/wardcd", cmb_wardcd.label );
  1870. model.setValue("/root/print/patinfo/roomcd", cmb_roomcd.label );
  1871. model.setValue("/root/print/patinfo/medispclid", cmb_medispclid.label );
  1872. model.setValue("/root/print/patinfo/atdoctcd", cmb_atdoctcd.label );
  1873. model.makeValue("/root/print/patinfo/cardarrgenrdate", model.getValue("/root/main/patinfo/cardarrgenrdd") );
  1874. fChkBoxItemSetting();
  1875. exeReportPreview("RPMNE02302","XMLSTR");
  1876. model.refresh();
  1877. }
  1878. function fChkBoxItemSetting(){
  1879. // 병원 도착전 처치
  1880. var text = model.getValue("/root/main/resusinfo/resuslist/hosparvbfresus");
  1881. var tmp1 = text.split(" ");
  1882. for( var i = 0; i < tmp1.length; i++ ){
  1883. if( tmp1[i] == "01" )
  1884. model.makeValue("/root/print/resusinfo/hosparvbfresusitem1", "1");
  1885. if( tmp1[i] == "02" )
  1886. model.makeValue("/root/print/resusinfo/hosparvbfresusitem2", "1");
  1887. if( tmp1[i] == "03" )
  1888. model.makeValue("/root/print/resusinfo/hosparvbfresusitem3", "1");
  1889. if( tmp1[i] == "04" )
  1890. model.makeValue("/root/print/resusinfo/hosparvbfresusitem4", "1");
  1891. if( tmp1[i] == "05" )
  1892. model.makeValue("/root/print/resusinfo/hosparvbfresusitem5", "1");
  1893. if( tmp1[i] == "06" )
  1894. model.makeValue("/root/print/resusinfo/hosparvbfresusitem6", "1");
  1895. if( tmp1[i] == "09" )
  1896. model.makeValue("/root/print/resusinfo/hosparvbfresusitem7", "1");
  1897. }
  1898. // 소생팀 도착전 처치 ( 담당의 )
  1899. text = model.getValue("/root/main/resusinfo/resuslist/resusteamarvbfresus");
  1900. var tmp2 = text.split(" ");
  1901. for( var i = 0; i < tmp2.length; i++ ){
  1902. if( tmp2[i] == "01" )
  1903. model.makeValue("/root/print/resusinfo/resusteamarvbfresusitem1", "1");
  1904. if( tmp2[i] == "02" )
  1905. model.makeValue("/root/print/resusinfo/resusteamarvbfresusitem2", "1");
  1906. if( tmp2[i] == "03" )
  1907. model.makeValue("/root/print/resusinfo/resusteamarvbfresusitem3", "1");
  1908. if( tmp2[i] == "04" )
  1909. model.makeValue("/root/print/resusinfo/resusteamarvbfresusitem4", "1");
  1910. if( tmp2[i] == "05" )
  1911. model.makeValue("/root/print/resusinfo/resusteamarvbfresusitem5", "1");
  1912. if( tmp2[i] == "06" )
  1913. model.makeValue("/root/print/resusinfo/resusteamarvbfresusitem6", "1");
  1914. if( tmp2[i] == "09" )
  1915. model.makeValue("/root/print/resusinfo/resusteamarvbfresusitem7", "1");
  1916. }
  1917. // 소생팀 도착전 처치 ( 간호사 )
  1918. text = model.getValue("/root/main/resusinfo/resuslist/resusteamarvbfresusnurse");
  1919. var tmp3 = text.split(" ");
  1920. for( var i = 0; i < tmp3.length; i++ ){
  1921. if( tmp3[i] == "01" )
  1922. model.makeValue("/root/print/resusinfo/resusteamarvbfresusnurseitem1", "1");
  1923. if( tmp3[i] == "02" )
  1924. model.makeValue("/root/print/resusinfo/resusteamarvbfresusnurseitem2", "1");
  1925. if( tmp3[i] == "03" )
  1926. model.makeValue("/root/print/resusinfo/resusteamarvbfresusnurseitem3", "1");
  1927. if( tmp3[i] == "04" )
  1928. model.makeValue("/root/print/resusinfo/resusteamarvbfresusnurseitem4", "1");
  1929. if( tmp3[i] == "05" )
  1930. model.makeValue("/root/print/resusinfo/resusteamarvbfresusnurseitem5", "1");
  1931. if( tmp3[i] == "06" )
  1932. model.makeValue("/root/print/resusinfo/resusteamarvbfresusnurseitem6", "1");
  1933. if( tmp3[i] == "09" )
  1934. model.makeValue("/root/print/resusinfo/resusteamarvbfresusnurseitem7", "1");
  1935. }
  1936. // 소생팀 도착후 처치
  1937. text = model.getValue("/root/main/resusinfo/resuslist/resusteamarvafresus");
  1938. var tmp4 = text.split(" ");
  1939. for( var i = 0; i < tmp4.length; i++ ){
  1940. if( tmp4[i] == "01" )
  1941. model.makeValue("/root/print/resusinfo/resusteamarvafresusitem1", "1");
  1942. if( tmp4[i] == "02" )
  1943. model.makeValue("/root/print/resusinfo/resusteamarvafresusitem2", "1");
  1944. if( tmp4[i] == "03" )
  1945. model.makeValue("/root/print/resusinfo/resusteamarvafresusitem3", "1");
  1946. if( tmp4[i] == "04" )
  1947. model.makeValue("/root/print/resusinfo/resusteamarvafresusitem4", "1");
  1948. if( tmp4[i] == "05" )
  1949. model.makeValue("/root/print/resusinfo/resusteamarvafresusitem5", "1");
  1950. if( tmp4[i] == "06" )
  1951. model.makeValue("/root/print/resusinfo/resusteamarvafresusitem6", "1");
  1952. if( tmp4[i] == "09" )
  1953. model.makeValue("/root/print/resusinfo/resusteamarvafresusitem7", "1");
  1954. }
  1955. // 병실, 병실외
  1956. text = model.getValue("/root/main/resusinfo/resuslist/cardarrgenrplcewardflag");
  1957. var tmp5 = text.split(" ");
  1958. for( var i = 0; i < tmp5.length; i++ ){
  1959. if( tmp5[i] == "1" )
  1960. model.makeValue("/root/print/resusinfo/cardarrgenrplcewardflagitem1", "1");
  1961. if( tmp5[i] == "2" )
  1962. model.makeValue("/root/print/resusinfo/cardarrgenrplcewardflagitem2", "1");
  1963. }
  1964. // 소생팀 도착전처치 - 담당의, 간호사
  1965. text = model.getValue("/root/main/resusinfo/resuslist/resusteamarvbfresusflag");
  1966. var tmp6 = text.split(" ");
  1967. for( var i = 0; i < tmp6.length; i++ ){
  1968. if( tmp6[i] == "1" )
  1969. model.makeValue("/root/print/resusinfo/resusteamarvbfresusflagitem1", "1");
  1970. if( tmp6[i] == "2" )
  1971. model.makeValue("/root/print/resusinfo/resusteamarvbfresusflagitem2", "1");
  1972. if( tmp6[i] == "9" )
  1973. model.makeValue("/root/print/resusinfo/resusteamarvbfresusflagitem3", "1");
  1974. }
  1975. // 발생장소
  1976. if( model.getValue("/root/main/resusinfo/resuslist/cardarrgenrplceflag") == "01" ) // 병동
  1977. model.makeValue("/root/print/resusinfo/cardarrgenrplcenm", cmb_cardarrgenrplceward.label );
  1978. if( model.getValue("/root/main/resusinfo/resuslist/cardarrgenrplceflag") == "02" ) // 외래
  1979. model.makeValue("/root/print/resusinfo/cardarrgenrplcenm", cmb_cardarrgenrplcehosin.label );
  1980. if( model.getValue("/root/main/resusinfo/resuslist/cardarrgenrplceflag") == "03" ) // 진단/검사실
  1981. model.makeValue("/root/print/resusinfo/cardarrgenrplcenm", cmb_cardarrgenrplcetestroom.label );
  1982. if( model.getValue("/root/main/resusinfo/resuslist/cardarrgenrplceflag") == "04" ) // 원외
  1983. model.makeValue("/root/print/resusinfo/cardarrgenrplcenm", int_cardarrgenrplcehosout.value );
  1984. if( model.getValue("/root/main/resusinfo/resuslist/cardarrgenrplceflag") == "05" ) // 응급실
  1985. model.makeValue("/root/print/resusinfo/cardarrgenrplcenm", "" );
  1986. if( model.getValue("/root/main/resusinfo/resuslist/cardarrgenrplceflag") == "06" ) // 수술/회복실
  1987. model.makeValue("/root/print/resusinfo/cardarrgenrplcenm", "" );
  1988. if( model.getValue("/root/main/resusinfo/resuslist/cardarrgenrplceflag") == "07" ) // 집중치료실
  1989. model.makeValue("/root/print/resusinfo/cardarrgenrplcenm", cmb_cardarrgenrplcehoscenter.value );
  1990. if( model.getValue("/root/main/resusinfo/resuslist/cardarrgenrplceflag") == "08" ) // 기 타
  1991. model.makeValue("/root/print/resusinfo/cardarrgenrplcenm", int_cardarrgenrplceetcbigo.value );
  1992. if( model.getValue("/root/main/patinfo/orddeptcd" ) != "")
  1993. model.makeValue("/root/print/resusinfo/orddeptnm", cmb_dept.label );
  1994. if( model.getValue("/root/main/resusinfo/resuslist/defibrjul2") != "")
  1995. model.makeValue("/root/print/resusinfo/defibrjultwo", model.getValue("/root/main/resusinfo/resuslist/defibrjul2") );
  1996. if( model.getValue("/root/main/resusinfo/resuslist/defibrtims2") != "")
  1997. model.makeValue("/root/print/resusinfo/defibrtimstwo", model.getValue("/root/main/resusinfo/resuslist/defibrtims2") );
  1998. model.refresh();
  1999. }
  2000. //SMS전송
  2001. function fSendSMS(){
  2002. model.removeNode("/root/send");
  2003. var sRow = grd_pastlst.row;
  2004. var sDocHeader = "hosinhosoutflag▦pid▦patnm▦indd▦cretno▦histno▦cardarrgenrdt▦instcd";
  2005. // 키값 설정부분
  2006. var sCondData = "1" +"▦"
  2007. + model.getValue(xPathCardArrPatInfo+"/pid" ) +"▦"
  2008. + model.getValue(xPathCardArrPatInfo+"/patnm") +"▦"
  2009. + model.getValue(xPathCardArrPatInfo+"/indd" ) +"▦"
  2010. + model.getValue(xPathCardArrPatInfo+"/cretno") +"▦"
  2011. + model.getValue(xPathCardArrPatInfo+"/histno") +"▦"
  2012. + model.getValue("/root/main/patinfo/cardarrgenrdt") +"▦"
  2013. + model.getValue(xPathCardArrPatInfo+"/instcd");
  2014. model.makeValue("/root/send/cond", sDocHeader+"▩"+sCondData+"▩" );
  2015. if( submit("TXMNE02310") ){
  2016. fSrchHistList("1");
  2017. }
  2018. }
  2019. function addSetDiag( diagInfo ){
  2020. var diagRow = diagInfo.split ( "▩" ).length;
  2021. if( diagRow > 3 ){
  2022. messageBox("진단은 하나만 선택해주십시오.","E999");
  2023. return;
  2024. }else{
  2025. model.makeNode( "/root/main/diaginfo" );
  2026. var icd10cd = getArrayData ( diagInfo, 1, 8, "▩", "▦" );
  2027. var diagcd = getArrayData ( diagInfo, 1, 9, "▩", "▦" );
  2028. var diagengnm = getArrayData ( diagInfo, 1, 2, "▩", "▦" );
  2029. var diaghngnm = getArrayData ( diagInfo, 1, 3, "▩", "▦" );
  2030. var spclinfo = getArrayData ( diagInfo, 1, 5, "▩", "▦" );
  2031. model.makeValue("/root/main/diaginfo/icd10cd" , icd10cd );
  2032. model.makeValue("/root/main/diaginfo/diagcd" , diagcd );
  2033. model.makeValue("/root/main/diaginfo/diagengnm" , diagengnm );
  2034. model.makeValue("/root/main/diaginfo/diaghngnm" , diaghngnm );
  2035. model.makeValue("/root/main/diaginfo/spclinfo" , spclinfo );
  2036. model.makeValue("/root/main/patinfo/diagcd" , diagcd );
  2037. model.makeValue("/root/main/patinfo/diagnm" , diaghngnm );
  2038. model.refresh();
  2039. }
  2040. }
  2041. function getArrayData (pData, pRow, pCol, pRowSep, pColSep ) {
  2042. var arrRow = pData.split(pRowSep);
  2043. if(arrRow.length <= pRow) return "";
  2044. var arrCol = arrRow[pRow].split(pColSep);
  2045. if(arrCol.length <= pCol) return "";
  2046. return arrCol[pCol];
  2047. }