SPMMO06900.js 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563
  1. /*
  2. - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
  3. 중증외상 등록정보 ( SPMMO06900_응급실중증외상등록.xrw - JScript )
  4. - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
  5. */
  6. var sERSTRM_PATH = "/root/main/strminfo";
  7. var vFlag = 1;
  8. var vFlag2 = true;
  9. var IsDaeSang = true;
  10. /**
  11. * @desc : 화면 초기화
  12. * @
  13. * @param :
  14. * @return :
  15. * @author : 오지훈
  16. * @---------------------------------------------------
  17. */
  18. function fInitialize_SPMMO06900(){
  19. window.height = "870";
  20. window.width = "930";
  21. //콤보 초기값
  22. fCmbInit();
  23. //중증외상 대상 환자인지 체크
  24. //fCheckScope();
  25. freqGetERStrmInfo();
  26. }
  27. /**
  28. * @desc : 콤보 초기값 셋팅
  29. * @
  30. * @param :
  31. * @return :
  32. * @author : 김소정
  33. * @---------------------------------------------------
  34. */
  35. function fCmbInit() {
  36. // 진료과
  37. var instcd = getUserInfo("dutplceinstcd");
  38. //var standard_yn = "orduseyn";
  39. // var standard_yn = "rcptuseyn";
  40. // var ord_deptflag = 'D';
  41. // var rslt_ref = "/root/init/dept";
  42. // var sort_method = "depthngnm";
  43. //zbcfGetDeptCodeList(instcd, standard_yn, ord_deptflag, rslt_ref, sort_method);
  44. // sort_field = "depthngnm";
  45. // zsdfGetInOutOrdDeptList(instcd, rslt_ref, sort_field, sort_method);
  46. // 공통코드 목록 가져오기
  47. zbcfGetCodeList(
  48. new Array("M0120",
  49. "M0121",
  50. "M0122",
  51. "M0573",
  52. "M0125",
  53. "M0118",
  54. "M0535",
  55. "M0576",
  56. "M0119",
  57. "M0571",
  58. "M0574",
  59. "M0584",
  60. "M0572",
  61. "M0577",
  62. "M0578",
  63. "M0579",
  64. "M0580",
  65. "M0117",
  66. "M0583",
  67. "M0535",
  68. "M0581",
  69. "M0582" ) ,
  70. new Array("/root/init/M0120list",
  71. "/root/init/M0121list",
  72. "/root/init/M0122list",
  73. "/root/init/M0573list",
  74. "/root/init/M0125list",
  75. "/root/init/M0118list",
  76. "/root/init/M0535list",
  77. "/root/init/M0576list",
  78. "/root/init/M0119list",
  79. "/root/init/M0571list",
  80. "/root/init/M0574list",
  81. "/root/init/M0584list",
  82. "/root/init/M0572list",
  83. "/root/init/M0577list",
  84. "/root/init/M0578list",
  85. "/root/init/M0579list",
  86. "/root/init/M0580list",
  87. "/root/init/M0117list",
  88. "/root/init/M0583list",
  89. "/root/init/M0535list",
  90. "/root/init/M0581list",
  91. "/root/init/M0582list" ));
  92. //추가
  93. addComboItem("cmb_taip", "-", "-", "above"); // 교통사고 손상당사자
  94. addComboItem("cmb_emrt", "-", "-", "above"); // 응급진료 결과
  95. addComboItem("cmb_dcrt", "-", "-", "above"); // 입원 후 결과
  96. addComboItem("cmb_gcse", "0점", "0", "above"); // GCS
  97. addComboItem("cmb_gcsv", "0점", "0", "above");
  98. addComboItem("cmb_gcsp", "0점", "0", "above");
  99. addComboItem("cmb_gcsm", "0점", "0", "above");
  100. model.refresh();
  101. }
  102. /**
  103. * @desc : 초기화
  104. * @
  105. * @param :
  106. * @return :
  107. * @author : 김소정
  108. * @---------------------------------------------------
  109. */
  110. function fInit() {
  111. cmb_taip.select(0);
  112. cmb_emrt.select(0);
  113. cmb_dcrt.select(0);
  114. cmb_gcse.select(0);
  115. cmb_gcsv.select(0);
  116. cmb_gcsp.select(0);
  117. cmb_gcsm.select(0);
  118. cmb_dgkd.select(0);
  119. cmb_arcf.select(0);
  120. cmb_arcs.select(0);
  121. cmb_taip.select(0);
  122. cmb_inrt.select(0);
  123. model.setValue("/root/main/strminfo/hscd", "-"); //요양기관번호
  124. model.setValue("/root/main/strminfo/sex", "-"); //성별
  125. model.setValue("/root/main/strminfo/dgkd", "-"); //내원사유(질병여부)
  126. model.setValue("/root/main/strminfo/arcf", "-"); //내원사유(의도성여부)
  127. model.setValue("/root/main/strminfo/arcs", "-"); //내원사유(손상기전)
  128. model.setValue("/root/main/strminfo/tsbt", "-"); //보호장구
  129. model.setValue("/root/main/strminfo/tscs", "-"); //보호장구
  130. model.setValue("/root/main/strminfo/tsfa", "-"); //보호장구
  131. model.setValue("/root/main/strminfo/tssa", "-"); //보호장구
  132. model.setValue("/root/main/strminfo/tshm", "-"); //보호장구
  133. model.setValue("/root/main/strminfo/tspt", "-"); //보호장구
  134. model.setValue("/root/main/strminfo/tsno", "-"); //보호장구
  135. model.setValue("/root/main/strminfo/tsur", "-"); //보호장구
  136. model.setValue("/root/main/strminfo/tsuk", "-"); //보호장구
  137. model.setValue("/root/main/strminfo/inrt", "-"); //내원경로
  138. model.setValue("/root/main/strminfo/fhcd", "-"); //전원보낸 의료기관명
  139. model.setValue("/root/main/strminfo/fhnm", "-"); //전원보낸 의료기관명(기타)
  140. model.setValue("/root/main/strminfo/intp", "-"); //의료기관종류
  141. model.setValue("/root/main/strminfo/fhrs", "-"); //전원 보낸 사유
  142. model.setValue("/root/main/strminfo/inmn", "-"); //내원수단
  143. model.setValue("/root/main/strminfo/dsid", "-"); //구급활동일지재난번호
  144. model.setValue("/root/main/strminfo/reid", "-"); //구급활동일지일련번호
  145. model.setValue("/root/main/strminfo/mnsy", "-"); //주증상코드
  146. model.setValue("/root/main/strminfo/dept", "-"); //주진료과
  147. model.setValue("/root/main/strminfo/otdt", "-"); //응급실 퇴실일시
  148. model.setValue("/root/main/strminfo/ottm", "-"); //응급실 퇴실일시
  149. model.setValue("/root/main/strminfo/emrt", "-"); //응급진료 결과
  150. model.setValue("/root/main/strminfo/ettx", "-"); //응급진료 결과(기타)
  151. model.setValue("/root/main/strminfo/img1", "N"); //영상검사
  152. model.setValue("/root/main/strminfo/img2", "N"); //영상검사
  153. model.setValue("/root/main/strminfo/img3", "N"); //영상검사
  154. model.setValue("/root/main/strminfo/img4", "N"); //영상검사
  155. model.setValue("/root/main/strminfo/img5", "N"); //영상검사
  156. model.setValue("/root/main/strminfo/img6", "N"); //영상검사
  157. model.setValue("/root/main/strminfo/img7", "N"); //영상검사
  158. model.setValue("/root/main/strminfo/img8", "N"); //영상검사
  159. model.setValue("/root/main/strminfo/img9", "N"); //영상검사
  160. model.setValue("/root/main/strminfo/dcdt", "-"); //퇴원일시
  161. model.setValue("/root/main/strminfo/dctm", "-"); //퇴원일시
  162. model.setValue("/root/main/strminfo/dcrt", "-"); //입원 후 결과
  163. model.setValue("/root/main/strminfo/resp", "-"); //의식수준
  164. model.setValue("/root/main/strminfo/hibp", "999"); //RTS
  165. model.setValue("/root/main/strminfo/puls", "999"); //RTS
  166. model.setValue("/root/main/strminfo/brth", "999"); //RTS
  167. model.setValue("/root/main/strminfo/bdht", "99.9"); //RTS
  168. model.setValue("/root/main/strminfo/rtsc", "0"); //RTS
  169. model.setValue("/root/main/strminfo/attt", "0"); //최종치료 소요시간
  170. model.setValue("/root/main/strminfo/aic1", "-"); //퇴실시 AIS
  171. model.setValue("/root/main/strminfo/ais1", "-");
  172. model.setValue("/root/main/strminfo/aic2", "-"); //퇴실시 AIS
  173. model.setValue("/root/main/strminfo/ais2", "-");
  174. model.setValue("/root/main/strminfo/aic3", "-"); //퇴실시 AIS
  175. model.setValue("/root/main/strminfo/ais3", "-");
  176. model.setValue("/root/main/strminfo/aic4", "-"); //퇴실시 AIS
  177. model.setValue("/root/main/strminfo/ais4", "-");
  178. model.setValue("/root/main/strminfo/aic5", "-"); //퇴실시 AIS
  179. model.setValue("/root/main/strminfo/ais5", "-");
  180. model.setValue("/root/main/strminfo/aic6", "-"); //퇴실시 AIS
  181. model.setValue("/root/main/strminfo/ais6", "-");
  182. model.setValue("/root/main/strminfo/tgos", "0"); //퇴원시 GOS 점수
  183. model.setValue("/root/main/strminfo/thcd", "-"); //전원보낼 의료기관명
  184. model.setValue("/root/main/strminfo/thnm", "-"); //전원보낼 의료기관명(기타)
  185. model.setValue("/root/main/strminfo/dctp", "-"); //전원보낼 의료기관코드
  186. model.setValue("/root/main/strminfo/thtm", "-"); //전원시 이송수단
  187. model.setValue("/root/main/strminfo/thp1", "-"); //전원시 동승인력
  188. model.setValue("/root/main/strminfo/thp2", "-"); //전원시 동승인력
  189. model.setValue("/root/main/strminfo/thp3", "-"); //전원시 동승인력
  190. model.setValue("/root/main/strminfo/thp4", "-"); //전원시 동승인력
  191. model.setValue("/root/main/strminfo/thdp", "-"); //전원병원 선정방법
  192. model.refresh();
  193. /* ipt_indt.disabled = true;
  194. ipt_intm.disabled = true;
  195. cmb_arcf.disabled = false; //내원사유(의도성여부)
  196. cmb_arcs.disabled = false; //내원사유(손상기전)
  197. */
  198. }
  199. /**
  200. * @desc : DATA 조회
  201. * @
  202. * @param :
  203. * @return :
  204. * @author : 김소정
  205. * @---------------------------------------------------
  206. */
  207. function freqGetERStrmInfo() {
  208. var pid = opener.javascript.getParameter("SPMMO06900_pid");
  209. var orddd = opener.javascript.getParameter("SPMMO06900_orddd");
  210. var cretno = opener.javascript.getParameter("SPMMO06900_cretno");
  211. model.setValue("/root/main/patinfo/pid", pid);
  212. model.setValue("/root/main/patinfo/orddd", orddd);
  213. model.setValue("/root/main/patinfo/cretno",cretno);
  214. model.copyNode("/root/send/reqdata", "/root/main/patinfo");
  215. model.removeNodeset("/root/main/strminfo");
  216. model.removeNodeset("/root/main/strmdiag");
  217. model.removeNodeset("/root/main/strmtrcd");
  218. model.removeNodeset("/root/main/strmopcd");
  219. model.removeNodeset("/root/main/strmdcdiag");
  220. submit("TRMMO06901");
  221. var node = instance1.selectSingleNode(sERSTRM_PATH);
  222. // var node = instance1.selectSingleNode("/root/main/strminfo");
  223. if(node == null){
  224. model.alert("환자 정보를 찾을 수 없습니다.\n\n응급환자정보를 다시 확인하시기 바랍니다.");
  225. return;
  226. // fMakeERStrmNode();
  227. // fInit();
  228. }
  229. else {
  230. model.setValue( "/root/main/strminfo/gwtransyn" , "N");
  231. if ( model.getValue("/root/main/strminfo/status") == "i") {
  232. model.setValue( "/root/main/strminfo/stat" , "C");
  233. }
  234. else if ( model.getValue("/root/main/strminfo/status") == "u"){
  235. var vStat = model.getValue("/root/main/strminfo/stat"); //T는 U와 값은 의미(등록 후 전송전에 미리 값이 T로 바뀌는 오류 잡기 위해 적용)
  236. if (vStat == "C") model.setValue( "/root/main/strminfo/stat" , "C");
  237. else if (vStat == "T" || vStat == "U") model.setValue( "/root/main/strminfo/stat" , "U");
  238. else if (vStat == "E") model.setValue( "/root/main/strminfo/stat" , "C");
  239. }
  240. }
  241. fSetDisabled();
  242. model.refresh();
  243. }
  244. /**
  245. * @desc : 조회 시 값 DATA 없을 경우 처리
  246. * @
  247. * @param :
  248. * @return :
  249. * @author : 김소정
  250. * @---------------------------------------------------
  251. */
  252. function fMakeERStrmNode(){
  253. model.makeNode("/root/main/strminfo/status");
  254. model.makeNode("/root/main/strminfo/idno");
  255. model.makeNode("/root/main/strminfo/hscd");
  256. model.makeNode("/root/main/strminfo/hsnm");
  257. model.makeNode("/root/main/strminfo/emcd");
  258. model.makeNode("/root/main/strminfo/brtd");
  259. model.makeNode("/root/main/strminfo/sex");
  260. model.makeNode("/root/main/strminfo/indt");
  261. model.makeNode("/root/main/strminfo/intm");
  262. model.makeNode("/root/main/strminfo/indtedit");
  263. model.makeNode("/root/main/strminfo/dgkd");
  264. model.makeNode("/root/main/strminfo/arcf");
  265. model.makeNode("/root/main/strminfo/arcs");
  266. model.makeNode("/root/main/strminfo/taip");
  267. model.makeNode("/root/main/strminfo/tsst");
  268. model.makeNode("/root/main/strminfo/tsbt");
  269. model.makeNode("/root/main/strminfo/tscs");
  270. model.makeNode("/root/main/strminfo/tsfa");
  271. model.makeNode("/root/main/strminfo/tssa");
  272. model.makeNode("/root/main/strminfo/tshm");
  273. model.makeNode("/root/main/strminfo/tspt");
  274. model.makeNode("/root/main/strminfo/tsno");
  275. model.makeNode("/root/main/strminfo/tsur");
  276. model.makeNode("/root/main/strminfo/tsuk");
  277. model.makeNode("/root/main/strminfo/inrt");
  278. model.makeNode("/root/main/strminfo/fhcd");
  279. model.makeNode("/root/main/strminfo/fhcdnm");
  280. model.makeNode("/root/main/strminfo/fhnm");
  281. model.makeNode("/root/main/strminfo/intp");
  282. model.makeNode("/root/main/strminfo/fhrs");
  283. model.makeNode("/root/main/strminfo/inmn");
  284. model.makeNode("/root/main/strminfo/dsid");
  285. model.makeNode("/root/main/strminfo/dsidetc");
  286. model.makeNode("/root/main/strminfo/reid");
  287. model.makeNode("/root/main/strminfo/reidetc");
  288. model.makeNode("/root/main/strminfo/akdt");
  289. model.makeNode("/root/main/strminfo/aktm");
  290. model.makeNode("/root/main/strminfo/aktmm");
  291. model.makeNode("/root/main/strminfo/aketc");
  292. model.makeNode("/root/main/strminfo/dept");
  293. model.makeNode("/root/main/strminfo/mnsy");
  294. model.makeNode("/root/main/strminfo/mnsye");
  295. model.makeNode("/root/main/strminfo/mssyh");
  296. model.makeNode("/root/main/strminfo/sym2");
  297. model.makeNode("/root/main/strminfo/sym2e");
  298. model.makeNode("/root/main/strminfo/sym2h");
  299. model.makeNode("/root/main/strminfo/sym3");
  300. model.makeNode("/root/main/strminfo/sym3e");
  301. model.makeNode("/root/main/strminfo/sym3h");
  302. model.makeNode("/root/main/strminfo/otdt");
  303. model.makeNode("/root/main/strminfo/ottm");
  304. model.makeNode("/root/main/strminfo/ottmm");
  305. model.makeNode("/root/main/strminfo/emrt");
  306. model.makeNode("/root/main/strminfo/ettx");
  307. model.makeNode("/root/main/strminfo/mimg");
  308. model.makeNode("/root/main/strminfo/img1");
  309. model.makeNode("/root/main/strminfo/img2");
  310. model.makeNode("/root/main/strminfo/img3");
  311. model.makeNode("/root/main/strminfo/img4");
  312. model.makeNode("/root/main/strminfo/img5");
  313. model.makeNode("/root/main/strminfo/img6");
  314. model.makeNode("/root/main/strminfo/img7");
  315. model.makeNode("/root/main/strminfo/img8");
  316. model.makeNode("/root/main/strminfo/img9");
  317. model.makeNode("/root/main/strminfo/atdt");
  318. model.makeNode("/root/main/strminfo/atdtetc");
  319. model.makeNode("/root/main/strminfo/attm");
  320. model.makeNode("/root/main/strminfo/attmm");
  321. model.makeNode("/root/main/strminfo/attmetc");
  322. model.makeNode("/root/main/strminfo/attt");
  323. model.makeNode("/root/main/strminfo/hchp");
  324. model.makeNode("/root/main/strminfo/dcdt");
  325. model.makeNode("/root/main/strminfo/dctm");
  326. model.makeNode("/root/main/strminfo/dctmm");
  327. model.makeNode("/root/main/strminfo/dcrt");
  328. model.makeNode("/root/main/strminfo/gcse");
  329. model.makeNode("/root/main/strminfo/gcsv");
  330. model.makeNode("/root/main/strminfo/gcsp");
  331. model.makeNode("/root/main/strminfo/gcsm");
  332. model.makeNode("/root/main/strminfo/gcst");
  333. model.makeNode("/root/main/strminfo/resp");
  334. model.makeNode("/root/main/strminfo/hibp");
  335. model.makeNode("/root/main/strminfo/hibpetc");
  336. model.makeNode("/root/main/strminfo/puls");
  337. model.makeNode("/root/main/strminfo/pulsetc");
  338. model.makeNode("/root/main/strminfo/brth");
  339. model.makeNode("/root/main/strminfo/brthetc");
  340. model.makeNode("/root/main/strminfo/bdht");
  341. model.makeNode("/root/main/strminfo/bdhtetc");
  342. model.makeNode("/root/main/strminfo/rtsc");
  343. model.makeNode("/root/main/strminfo/aic1");
  344. model.makeNode("/root/main/strminfo/ain1");
  345. model.makeNode("/root/main/strminfo/ais1");
  346. model.makeNode("/root/main/strminfo/aic2");
  347. model.makeNode("/root/main/strminfo/ain2");
  348. model.makeNode("/root/main/strminfo/ais2");
  349. model.makeNode("/root/main/strminfo/aic3");
  350. model.makeNode("/root/main/strminfo/ain3");
  351. model.makeNode("/root/main/strminfo/ais3");
  352. model.makeNode("/root/main/strminfo/aic4");
  353. model.makeNode("/root/main/strminfo/ain4");
  354. model.makeNode("/root/main/strminfo/ais4");
  355. model.makeNode("/root/main/strminfo/aic5");
  356. model.makeNode("/root/main/strminfo/ain5");
  357. model.makeNode("/root/main/strminfo/ais5");
  358. model.makeNode("/root/main/strminfo/aic6");
  359. model.makeNode("/root/main/strminfo/ain6");
  360. model.makeNode("/root/main/strminfo/ais6");
  361. model.makeNode("/root/main/strminfo/ciss");
  362. model.makeNode("/root/main/strminfo/tgos");
  363. model.makeNode("/root/main/strminfo/thcd");
  364. model.makeNode("/root/main/strminfo/thcdnm");
  365. model.makeNode("/root/main/strminfo/thnm");
  366. model.makeNode("/root/main/strminfo/dctp");
  367. model.makeNode("/root/main/strminfo/thtm");
  368. model.makeNode("/root/main/strminfo/mthp");
  369. model.makeNode("/root/main/strminfo/thp1");
  370. model.makeNode("/root/main/strminfo/thp2");
  371. model.makeNode("/root/main/strminfo/thp3");
  372. model.makeNode("/root/main/strminfo/thp4");
  373. model.makeNode("/root/main/strminfo/thdp");
  374. model.makeNode("/root/main/strminfo/gwtransyn");
  375. model.makeNode("/root/main/strminfo/stat");
  376. }
  377. /**
  378. * @desc : 활성화 여부 CHECK
  379. * @
  380. * @param :
  381. * @return :
  382. * @author : 김소정
  383. * @---------------------------------------------------
  384. */
  385. function fSetDisabled() {
  386. // 생년월일(brtd)
  387. // kimsj 100104 GCS 점수 CHECK
  388. var vBrtd = model.getValue("/root/main/strminfo/age");
  389. if (vBrtd > 4) {
  390. cmb_gcsv.disabled = false; //GOS(언어)
  391. cmb_gcsp.disabled = true; //GOS(소아언어)
  392. model.setValue("/root/main/strminfo/gcsp", "0");
  393. model.setAttribute("GCSv", model.getValue("/root/main/strminfo/gcsv")); // 언어GCS
  394. }
  395. else if (vBrtd <= 4) {
  396. cmb_gcsv.disabled = true; //GOS(언어)
  397. cmb_gcsp.disabled = false; //GOS(소아언어)
  398. model.setValue("/root/main/strminfo/gcsv", "0");
  399. model.setAttribute("GCSv", model.getValue("/root/main/strminfo/gcsp")); // 소아언어GCS
  400. }
  401. model.setAttribute("GCSe", model.getValue("/root/main/strminfo/gcse")); // 눈GCS
  402. model.setAttribute("GCSm", model.getValue("/root/main/strminfo/gcsm")); // 운동GCS
  403. // 내원경로(inrt)
  404. var vInrt = model.getValue("/root/main/strminfo/inrt");
  405. if( vInrt == "2" ) { //외부에서 전원
  406. ipt_fhcd.disabled = false;
  407. btn_fhcdinfo.disabled = false;
  408. rdo_fhrs.disabled = false;
  409. }
  410. else {
  411. ipt_fhcd.disabled = true;
  412. btn_fhcdinfo.disabled = true;
  413. rdo_fhrs.disabled = true;
  414. model.setValue("/root/main/strminfo/fhcd", "-"); //전원보낸 의료기관코드
  415. model.setValue("/root/main/strminfo/fhcdnm", "-"); //전원보낸 의료기관명
  416. model.setValue("/root/main/strminfo/fhnm", "-"); //전원보낸 의료기관명(기타)
  417. model.setValue("/root/main/strminfo/intp", "-"); //의료기관종류
  418. model.setValue("/root/main/strminfo/fhrs", "-"); //전원 보낸 사유
  419. }
  420. //의료기관 종류(intp)
  421. var vIntp = model.getValue("/root/main/strminfo/intp");
  422. if (vIntp == "9") {
  423. caption28.visible = true;
  424. ipt_fhnm.visible = true;
  425. }
  426. else {
  427. caption28.visible = false;
  428. ipt_fhnm.visible = false;
  429. model.setValue("/root/main/strminfo/fhnm", "-"); //전원보낸 의료기관명(기타)
  430. }
  431. //응급진료 결과(emrt) - 기타
  432. var vEmrt = model.getValue("/root/main/strminfo/emrt");
  433. if ( vEmrt == "18" || vEmrt == "28" || vEmrt == "38" || vEmrt == "48" || vEmrt == "88" ) {
  434. caption45.visible = true;
  435. ipt_ettx.visible = true;
  436. }
  437. else {
  438. caption45.visible = false;
  439. ipt_ettx.visible = false;
  440. }
  441. //입원 -> 퇴원시 GOS점수
  442. if (vEmrt.substr(0,1) == "3") {
  443. rdo_tgos.disabled = false;
  444. }
  445. else {
  446. rdo_tgos.disabled = true;
  447. model.setValue("/root/main/strminfo/tgos", "0"); //퇴원시 GOS 점수
  448. }
  449. var vDcrt = model.getValue("/root/main/strminfo/dcrt");
  450. //응급진료 결과(emrt) : 전원 / 입원후 결과(dcrt) : 전원 -> 바.그룹
  451. if (vEmrt.substr(0,1) == "2" || vDcrt == "3" ) {
  452. grp_info6.disabled = false;
  453. cmb_dctp.disabled = true;
  454. }
  455. else {
  456. grp_info6.disabled = true;
  457. model.setValue("/root/main/strminfo/thcd", "-"); //전원보낼 의료기관코드
  458. model.setValue("/root/main/strminfo/thcdnm", "-"); //전원보낼 의료기관명
  459. model.setValue("/root/main/strminfo/thnm", "-"); //전원보낼 의료기관명(기타)
  460. model.setValue("/root/main/strminfo/thtm", "-"); //전원시 이송수단
  461. model.setValue("/root/main/strminfo/thp1", "-"); //전원시 동승인력
  462. model.setValue("/root/main/strminfo/thp2", "-"); //전원시 동승인력
  463. model.setValue("/root/main/strminfo/thp3", "-"); //전원시 동승인력
  464. model.setValue("/root/main/strminfo/thp4", "-"); //전원시 동승인력
  465. model.setValue("/root/main/strminfo/thdp", "-"); //전원병원 선정방법
  466. }
  467. //전원보낼 의료기관 종류(dctp)
  468. vDctp = model.getValue("/root/main/strminfo/dctp");
  469. if ( vDctp == "9" ) {
  470. caption32.visible = true;
  471. ipt_thnm.visible = true;
  472. }
  473. else {
  474. caption32.visible = false;
  475. ipt_thnm.visible = false;
  476. model.setValue("/root/main/strminfo/thnm", "-"); //전원보낼 의료기관명(기타)
  477. }
  478. //측정불가 및 미상항목 CHECK_20110318_SMY
  479. fsetEtc();
  480. }
  481. /**
  482. * @desc : 측정불가 및 미상항목 CHECK_20110318_SMY
  483. * @
  484. * @param :
  485. * @return :
  486. * @author : 성미연
  487. * @---------------------------------------------------
  488. */
  489. function fsetEtc() {
  490. //수상일시
  491. if(model.getValue("/root/main/strminfo/akdt") == "11111111"){
  492. model.setValue("/root/main/strminfo/aketc", "Y");
  493. ipt_akdt.disabled = true;
  494. ipt_aktm.disabled = true;
  495. }
  496. //외상팀 최종치료 결정일시
  497. if(model.getValue("/root/main/strminfo/atdt") == "99999999"){
  498. model.setValue("/root/main/strminfo/atdtetc", "Y");
  499. ipt_atdt.disabled = true;
  500. }
  501. if(model.getValue("/root/main/strminfo/attm") == "9999"){
  502. model.setValue("/root/main/strminfo/attmetc", "Y");
  503. ipt_attm.disabled = true;
  504. }
  505. //수축기 혈압
  506. if(model.getValue("/root/main/strminfo/hibp") == "-1"){
  507. model.setValue("/root/main/strminfo/hibpetc", "-1");
  508. ipt_hibp.disabled = true;
  509. }
  510. //맥박
  511. if(model.getValue("/root/main/strminfo/puls") == "-1"){
  512. model.setValue("/root/main/strminfo/pulsetc", "-1");
  513. ipt_puls.disabled = true;
  514. }
  515. //호흡
  516. if(model.getValue("/root/main/strminfo/brth") == "-1"){
  517. model.setValue("/root/main/strminfo/brthetc", "-1");
  518. ipt_brth.disabled = true;
  519. }
  520. //체온
  521. if(model.getValue("/root/main/strminfo/bdht") == "-1"){
  522. model.setValue("/root/main/strminfo/bdhtetc", "-1");
  523. ipt_bdht.disabled = true;
  524. }
  525. model.refresh();
  526. }
  527. /**
  528. * @desc : 전원 시 동승인력 CHECK BOX
  529. * @
  530. * @param :
  531. * @return :
  532. * @author : 김소정
  533. * @---------------------------------------------------
  534. */
  535. function fChkMTHP(vChkValue, vChkID) {
  536. model.setValue(vChkValue, "Y");
  537. //기타 선택
  538. if (vChkID == "chk_thp4") {
  539. model.setValue("/root/main/strminfo/thp1", "-");
  540. model.setValue("/root/main/strminfo/thp2", "-");
  541. model.setValue("/root/main/strminfo/thp3", "-");
  542. }
  543. //그 외 선택
  544. else {
  545. model.setValue("/root/main/strminfo/thp4", "-");
  546. }
  547. model.refresh();
  548. }
  549. /**
  550. * @desc : 영상검사 종류 CHECK BOX
  551. * @
  552. * @param :
  553. * @return :
  554. * @author : 김소정
  555. * @---------------------------------------------------
  556. */
  557. function fChkMIMG(vChkValue, vChkID) {
  558. model.setValue(vChkValue, "Y");
  559. //실시안함, 확인불가
  560. if (vChkID == "chk_img8" || vChkID == "chk_img9") {
  561. model.setValue("/root/main/strminfo/img1", "N");
  562. model.setValue("/root/main/strminfo/img2", "N");
  563. model.setValue("/root/main/strminfo/img3", "N");
  564. model.setValue("/root/main/strminfo/img4", "N");
  565. model.setValue("/root/main/strminfo/img5", "N");
  566. model.setValue("/root/main/strminfo/img6", "N");
  567. model.setValue("/root/main/strminfo/img7", "N");
  568. if (vChkID == "chk_img8") model.setValue("/root/main/strminfo/img9", "N");
  569. else if (vChkID == "chk_img9") model.setValue("/root/main/strminfo/img8", "N");
  570. }
  571. //그 외 선택
  572. else {
  573. model.setValue("/root/main/strminfo/img8", "N");
  574. model.setValue("/root/main/strminfo/img9", "N");
  575. }
  576. model.refresh();
  577. }
  578. /**
  579. * @desc : 교통사고 보호장구 Checkbox 값 선택
  580. * @
  581. * @param :
  582. * @return :
  583. * @author : 김소정
  584. * @---------------------------------------------------
  585. */
  586. function fChkTSST(vChkValue, vChkID) {
  587. model.setValue(vChkValue, "Y");
  588. //전혀 착용 안함, 비해당, 미상 선택
  589. if (vChkID == "chk_tsno" || vChkID == "chk_tsur" || vChkID == "chk_tsuk") {
  590. model.setValue("/root/main/strminfo/tsbt", "-");
  591. model.setValue("/root/main/strminfo/tscs", "-");
  592. model.setValue("/root/main/strminfo/tsfa", "-");
  593. model.setValue("/root/main/strminfo/tssa", "-");
  594. model.setValue("/root/main/strminfo/tshm", "-");
  595. model.setValue("/root/main/strminfo/tspt", "-");
  596. if ( vChkID == "chk_tsno" ) {
  597. model.setValue("/root/main/strminfo/tsur", "-");
  598. model.setValue("/root/main/strminfo/tsuk", "-");
  599. }
  600. else if ( vChkID == "chk_tsur" ) {
  601. model.setValue("/root/main/strminfo/tsno", "-");
  602. model.setValue("/root/main/strminfo/tsuk", "-");
  603. }
  604. else if ( vChkID == "chk_tsuk" ) {
  605. model.setValue("/root/main/strminfo/tsno", "-");
  606. model.setValue("/root/main/strminfo/tsur", "-");
  607. }
  608. }
  609. //그 외 선택
  610. else {
  611. model.setValue("/root/main/strminfo/tsno", "-");
  612. model.setValue("/root/main/strminfo/tsur", "-");
  613. model.setValue("/root/main/strminfo/tsuk", "-");
  614. }
  615. model.refresh();
  616. }
  617. /**
  618. * @desc : 임시저장버튼 클릭
  619. * @
  620. * @param :
  621. * @return :
  622. * @author : 오지훈
  623. * @---------------------------------------------------
  624. */
  625. function fTmpSaveData() {
  626. if (model.getValue("/root/main/strminfo/status") != "") {
  627. model.copyNode("/root/send/savedata", "/root/main/strminfo");
  628. model.makeValue("/root/send/savedata/histcd", "T");
  629. if (submit("TXMMO06901", false) == true)
  630. {
  631. messageBox("임시저장이", "I002");
  632. freqGetERStrmInfo();
  633. }
  634. } else {
  635. model.alert("저장할 내용을 확인하시기 바랍니다.");
  636. }
  637. }
  638. /**
  639. * @desc : 저장버튼 클릭
  640. * @
  641. * @param :
  642. * @return :
  643. * @author : 오지훈
  644. * @---------------------------------------------------
  645. */
  646. function fSaveData() {
  647. fSaveChk();
  648. if(vFlag =="1") {
  649. fsetDefualt();
  650. model.copyNode("/root/send/savedata", "/root/main/strminfo");
  651. model.makeValue("/root/send/savedata/histcd", "O");
  652. if (submit("TXMMO06901", false) == true)
  653. {
  654. messageBox("저장이", "I002");
  655. freqGetERStrmInfo();
  656. }
  657. // } else {
  658. // model.alert("저장할 내용을 확인하시기 바랍니다."); //내용 MSG로 통합예정
  659. }
  660. }
  661. /**
  662. * @desc : 저장시 체크
  663. * @
  664. * @param :
  665. * @return :
  666. * @author : 오지훈
  667. * @---------------------------------------------------
  668. */
  669. function fSaveChk(){
  670. vFlag = 1;
  671. fCheckScope();
  672. //중증외상 대상범위를 벗어남
  673. if(!IsDaeSang){
  674. // model.alert("중증외상 대상이 아닙니다.\n\n정상 등록 되었습니다.\n\n수고하셨습니다.!!");
  675. vFlag = 0;
  676. // fClose();
  677. return;
  678. }
  679. vRTS = model.getValue("/root/main/strminfo/rtsc"); //RTS 자동생성 점수
  680. vISS = model.getValue("/root/main/strminfo/ciss"); //ISS 자동생성 점수
  681. if(!vFlag2){
  682. model.alert("등록 대상 환자가 아닙니다.");
  683. return;
  684. }
  685. else if(vRTS == "" || vISS == "" || vISS == "0"){
  686. model.alert("ISS 또는 RTS 값을 먼저 체크하여 대상 환자인지 확인하십시요.\n\n(대상: RTS <= 7점 이거나 ISS >= 15점)");
  687. if(vRTS == "") model.setFocus("ipt_hibp");
  688. else model.setFocus("ipt_aic1");
  689. vFlag = 0;
  690. }
  691. else{
  692. /* 입력항목 null여부 체크 */
  693. //내원경로 - 외부에서 전원 시 전원 보낸 의료기관명
  694. if(model.getValue("/root/main/strminfo/inrt") == "2"){
  695. if( model.getValue("/root/main/strminfo/intp") != "9" && (model.getValue("/root/main/strminfo/fhcd") == "" || model.getValue("/root/main/strminfo/fhcd") == "-")){
  696. model.alert("전원 보낸 의료기관명을 선택하세요.");
  697. model.setFocus("ipt_fhcd");
  698. vFlag = 0;
  699. }else if(model.getValue("/root/main/strminfo/fhrs") == "" || model.getValue("/root/main/strminfo/fhrs") == "-"){
  700. model.alert("전원 보낸 사유를 선택하세요.");
  701. model.setFocus("rdo_fhrs");
  702. vFlag = 0;
  703. }
  704. //if(!vFlag) return;
  705. }
  706. //내원사유(질병여부)
  707. if(model.getValue("/root/main/strminfo/dgkd")=="" || model.getValue("/root/main/strminfo/dgkd")=="-"){
  708. model.alert("내원사유(질병여부)를 선택하세요.");
  709. model.setFocus("cmb_dgkd");
  710. vFlag = 0;
  711. }
  712. //내원사유(의도성여부)
  713. else if(model.getValue("/root/main/strminfo/arcf")=="" || model.getValue("/root/main/strminfo/arcf")=="-"){
  714. model.alert("내원사유(의도성여부)를 선택하세요.");
  715. model.setFocus("cmb_arcf");
  716. vFlag = 0;
  717. }
  718. //내원사유(손상기전)
  719. else if(model.getValue("/root/main/strminfo/arcs")=="" || model.getValue("/root/main/strminfo/arcs")=="-"){
  720. model.alert("내원사유(손상기전)를 선택하세요.");
  721. model.setFocus("cmb_arcs");
  722. vFlag = 0;
  723. }
  724. //교통사고 손상당사자 - 교통사고이면서 손상당사자 NULL
  725. else if(model.getValue("/root/main/strminfo/arcs").substr(0,1)=="0" &&
  726. (model.getValue("/root//main/strminfo/taip")=="" || model.getValue("/root/main/strminfo/taip")=="-")){
  727. model.alert("교통사고 손상당사자를 선택하세요.");
  728. model.setFocus("cmb_taip");
  729. vFlag = 0;
  730. }
  731. //보호장구 착용
  732. else if(model.getValue("/root/main/strminfo/arcs").substr(0,1)=="0" &&
  733. ((model.getValue("/root/main/strminfo/tsbt") =="-" || model.getValue("/root/main/strminfo/tsbt") =="") &&
  734. (model.getValue("/root/main/strminfo/tscs") =="-" || model.getValue("/root/main/strminfo/tscs") =="") &&
  735. (model.getValue("/root/main/strminfo/tsfa") =="-" || model.getValue("/root/main/strminfo/tsfa") =="") &&
  736. (model.getValue("/root/main/strminfo/tssa") =="-" || model.getValue("/root/main/strminfo/tssa") =="") &&
  737. (model.getValue("/root/main/strminfo/tshm") =="-" || model.getValue("/root/main/strminfo/tshm") =="") &&
  738. (model.getValue("/root/main/strminfo/tspt") =="-" || model.getValue("/root/main/strminfo/tspt") =="") &&
  739. (model.getValue("/root/main/strminfo/tsno") =="-" || model.getValue("/root/main/strminfo/tsno") =="") &&
  740. (model.getValue("/root/main/strminfo/tsur") =="-" || model.getValue("/root/main/strminfo/tsur") =="") &&
  741. (model.getValue("/root/main/strminfo/tsuk") =="-" || model.getValue("/root/main/strminfo/tsuk") =="" ))){
  742. model.alert("보호장구 착용을 체크하세요.");
  743. model.setFocus("chk_tsst");
  744. vFlag = 0;
  745. }
  746. //내원경로
  747. else if(model.getValue("/root/main/strminfo/inrt")=="" || model.getValue("/root/main/strminfo/inrt")=="-"){
  748. model.alert("내원경로를 선택하세요.");
  749. model.setFocus("cmb_inrt");
  750. vFlag = 0;
  751. }
  752. //전원보낸의료기관명 체크
  753. else if(model.getValue("/root/main/strminfo/inrt") =="2" &&
  754. model.getValue("/root/main/strminfo/intp") != "9" &&
  755. model.getValue("/root/main/strminfo/intp") != "8" &&
  756. (model.getValue("/root/main/strminfo/fhcd")=="" || model.getValue("/root/main/strminfo/fhcd")=="-")){
  757. model.alert("전원보낸의료기관명을 선택하세요.");
  758. model.setFocus("ipt_fhnm");
  759. vFlag = 0;
  760. }
  761. //전원보낸의료기관명(기타) 체크
  762. else if(model.getValue("/root/main/strminfo/inrt")=="2" && model.getValue("/root/main/strminfo/intp")=="9"){
  763. if(model.getValue("/root/main/strminfo/fhnm") == "" || model.getValue("/root/main/strminfo/fhnm") == "-"){
  764. model.alert("기타 의료기관명을 입력하세요.");
  765. model.setFocus("ipt_fhnm");
  766. vFlag = 0;
  767. }
  768. }
  769. //내원수단
  770. else if(model.getValue("/root/main/strminfo/inmn")=="" || model.getValue("/root/main/strminfo/inmn")=="-"){
  771. model.alert("내원수단를 선택하세요.");
  772. model.setFocus("cmb_inmn");
  773. vFlag = 0;
  774. }
  775. //구급활동일지재난번호
  776. else if(model.getValue("/root/main/strminfo/inmn")=="1" &&
  777. (model.getValue("/root/main/strminfo/dsid")=="" || model.getValue("/root/main/strminfo/dsid")=="-")){
  778. model.alert("구급활동일지재난번호를 입력하세요.");
  779. model.setFocus("ipt_dsid");
  780. vFlag = 0;
  781. }
  782. //구급활동일지일련번호
  783. else if(model.getValue("/root/main/strminfo/inmn")=="1" &&
  784. (model.getValue("/root/main/strminfo/reid")=="" || model.getValue("/root/main/strminfo/reid")=="-")){
  785. model.alert("구급활동일지일련번호를 입력하세요.");
  786. model.setFocus("ipt_reid");
  787. vFlag = 0;
  788. }
  789. //수상일시
  790. else if((model.getValue("/root/main/strminfo/aketc") != "Y") && !isValidDateTime(model.getValue("/root/main/strminfo/aktm"), "hhmm") ){
  791. model.alert("수상일시 시간이 잘못 입력되었습니다.(시:0~23, 분:0~59)");
  792. model.setFocus("ipt_aktm");
  793. vFlag = 0;
  794. }
  795. //주증상
  796. //주 진료과
  797. else if(model.getValue("/root/main/strminfo/dept")=="" || model.getValue("/root/main/strminfo/dept")=="-"){
  798. model.alert("주 진료과를 선택하세요.");
  799. model.setFocus("cmb_dept");
  800. vFlag = 0;
  801. }
  802. //퇴실시간
  803. else if(model.getValue("/root/main/strminfo/otdt") == ""){
  804. model.alert("응급실 퇴실일자를 선택하세요.");
  805. model.setFocus("ipt_otdt");
  806. vFlag = 0;
  807. }
  808. else if(model.getValue("/root/main/strminfo/ottm") == "" ){
  809. model.alert("응급실 퇴실일시를 입력하세요.");
  810. model.setFocus("ipt_ottm");
  811. vFlag = 0;
  812. }else if( !isValidDateTime(model.getValue("/root/main/strminfo/ottm"), "hhmm") ){
  813. model.alert("응급실 퇴실일시 시간이 잘못 입력되었습니다.(시:0~23, 분:0~59)");
  814. model.setFocus("ipt_ottm");
  815. vFlag = 0;
  816. }
  817. //영상검사
  818. else if((model.getValue("/root/main/strminfo/img1") =="-" || model.getValue("/root/main/strminfo/img1") =="") &&
  819. (model.getValue("/root/main/strminfo/img2") =="-" || model.getValue("/root/main/strminfo/img2") =="") &&
  820. (model.getValue("/root/main/strminfo/img3") =="-" || model.getValue("/root/main/strminfo/img3") =="") &&
  821. (model.getValue("/root/main/strminfo/img4") =="-" || model.getValue("/root/main/strminfo/img4") =="") &&
  822. (model.getValue("/root/main/strminfo/img5") =="-" || model.getValue("/root/main/strminfo/img5") =="") &&
  823. (model.getValue("/root/main/strminfo/img6") =="-" || model.getValue("/root/main/strminfo/img6") =="") &&
  824. (model.getValue("/root/main/strminfo/img7") =="-" || model.getValue("/root/main/strminfo/img7") =="") &&
  825. (model.getValue("/root/main/strminfo/img8") =="-" || model.getValue("/root/main/strminfo/img8") =="") &&
  826. (model.getValue("/root/main/strminfo/img9") =="-" || model.getValue("/root/main/strminfo/img9") =="" )) {
  827. model.alert("영상검사 종류를 체크하세요.");
  828. vFlag = 0;
  829. }
  830. //외상팀 최종치료 결정일자
  831. else if(model.getValue("/root/main/strminfo/atdtetc") != "Y" && model.getValue("/root/main/strminfo/atdt") == ""){
  832. model.alert("외상팀 최종치료 결정일자를 선택하세요.");
  833. model.setFocus("ipt_atdt");
  834. vFlag = 0;
  835. }
  836. else if(model.getValue("/root/main/strminfo/attmetc") != "Y" && model.getValue("/root/main/strminfo/attm") == "" ){
  837. model.alert("외상팀 최종치료 결정 시간를 입력하세요.");
  838. model.setFocus("ipt_attm");
  839. vFlag = 0;
  840. }else if(model.getValue("/root/main/strminfo/attmetc") != "Y" && !isValidDateTime(model.getValue("/root/main/strminfo/attm"), "hhmm")){
  841. model.alert("외상팀 최종치료 결정 시간이 잘못 입력되었습니다.(시:0~23, 분:0~59)");
  842. model.setFocus("ipt_attm");
  843. vFlag = 0;
  844. }
  845. //병원 안 치료의 가장 높은 수준 체크
  846. else if(model.getValue("/root/main/strminfo/hchp") == ""){
  847. model.alert("병원 안 치료의 가장 높은 수준을 선택하세요.");
  848. vFlag = 0;
  849. }
  850. // //응급진료결과 '입원'인 경우 체크 (서울성모 요청 - 주석)
  851. // else if(model.getValue("/root/main/strminfo/emrt").substr(0,1) == "3"){
  852. // //퇴원일자
  853. // if(model.getValue("/root/main/strminfo/dcdt") == ""){
  854. // model.alert("퇴원일자를 선택하세요.");
  855. // model.setFocus("ipt_dcdt");
  856. // vFlag = 0;
  857. // }
  858. // else if(model.getValue("/root/main/strminfo/dctm") == ""){
  859. // model.alert("퇴원 시간를 입력하세요.");
  860. // model.setFocus("ipt_dctm");
  861. // vFlag = 0;
  862. // }else if( !isValidDateTime(model.getValue("/root/main/strminfo/dctm"), "hhmm") ){
  863. // model.alert("퇴원 시간이 잘못 입력되었습니다.(시:0~23, 분:0~59)");
  864. // model.setFocus("ipt_dctm");
  865. // vFlag = 0;
  866. // }
  867. // //입원후 결과
  868. // else if(model.getValue("/root/main/strminfo/dcrt")=="" || model.getValue("/root/main/strminfo/dcrt")=="-"){
  869. // model.alert("입원 후 결과를 선택하세요.");
  870. // model.setFocus("cmb_dcrt");
  871. // vFlag = 0;
  872. // }
  873. //
  874. // //입원 후 시술 및 수술코드
  875. // //퇴원시 최종 진단명
  876. //
  877. // //퇴원시 GOS 점수
  878. // else if(model.getValue("/root/main/strminfo/tgos")=="" || model.getValue("/root/main/strminfo/tgos")=="-"){
  879. // model.alert("퇴원 시 GOS 점수를 선택하세요.");
  880. // vFlag = 0;
  881. // }
  882. // }
  883. //GCS
  884. else if(model.getValue("/root/main/strminfo/gcse") == ""){
  885. model.alert("GCS 측정(눈)을 선택하세요.");
  886. model.setFocus("cmb_gcse");
  887. vFlag = 0;
  888. }
  889. else if(model.getValue("/root/main/strminfo/gcsm") == ""){
  890. model.alert("GCS 측정(운동)을 선택하세요.");
  891. model.setFocus("cmb_gcsm");
  892. vFlag = 0;
  893. }
  894. else if(model.getValue("/root/main/strminfo/age") > 4 && model.getValue("/root/main/strminfo/gcsv") == ""){
  895. model.alert("GCS 측정(언어)을 선택하세요.");
  896. model.setFocus("cmb_gcsv");
  897. vFlag = 0;
  898. }else if(model.getValue("/root/main/strminfo/age") <= 4 && model.getValue("/root/main/strminfo/gcsp") == ""){
  899. model.alert("GCS 측정(소아 언어)을 선택하세요.");
  900. model.setFocus("cmb_gcsp");
  901. vFlag = 0;
  902. }
  903. //내원시 의식수준
  904. else if(model.getValue("/root/main/strminfo/resp")=="" || model.getValue("/root/main/strminfo/resp")=="-"){
  905. model.alert("내원 시 의식수준를 선택하세요.");
  906. model.setFocus("cmb_resp");
  907. vFlag = 0;
  908. }
  909. /*
  910. //kimsj DOA환자의 경우 0값이 들어가도록 되어있음 (제한조건 해제)
  911. //수축기 혈압
  912. else if(model.getValue("/root/main/strminfo/hibp")=="" || model.getValue("/root/main/strminfo/hibp")=="0"){
  913. model.alert("수축기 혈압을 입력하세요.(측정불가인 경우 '-1'로 입력)");
  914. model.setFocus("ipt_hibp");
  915. vFlag = 0;
  916. }
  917. //맥박
  918. else if(model.getValue("/root/main/strminfo/puls")=="" || model.getValue("/root/main/strminfo/puls")=="0"){
  919. model.alert("맥박을 입력하세요.(측정불가인 경우 '-1'로 입력)");
  920. model.setFocus("ipt_puls");
  921. vFlag = 0;
  922. }
  923. //호흡
  924. else if(model.getValue("/root/main/strminfo/brth")=="" || model.getValue("/root/main/strminfo/brth")=="0"){
  925. model.alert("호흡을 입력하세요.(측정불가인 경우 '-1'로 입력)");
  926. model.setFocus("ipt_brth");
  927. vFlag = 0;
  928. }
  929. //체온
  930. else if(model.getValue("/root/main/strminfo/bdht")=="" || model.getValue("/root/main/strminfo/bdht")=="0"){
  931. model.alert("체온을 입력하세요.(측정불가인 경우 '-1'로 입력)");
  932. model.setFocus("ipt_bdht");
  933. vFlag = 0;
  934. }
  935. */
  936. //전원인 경우 // '모름' 체크시에도 제외 2012.01.05 김지선
  937. else if(model.getValue("/root/main/strminfo/emrt").substr(0,1) == "2"){
  938. if( model.getValue("/root/main/strminfo/dctp") != "9" &&
  939. model.getValue("/root/main/strminfo/dctp") != "8" &&
  940. (model.getValue("/root/main/strminfo/thcd") == "" || model.getValue("/root/main/strminfo/thcd") == "-")){
  941. model.alert("전원 보낼 병원명을 선택하세요.");
  942. model.setFocus("ipt_thcd");
  943. vFlag = 0;
  944. }
  945. //전원보낼의료기관명(기타) 체크
  946. else if(model.getValue("/root/main/strminfo/dctp")=="9"){
  947. if(model.getValue("/root/main/strminfo/thnm") == "" || model.getValue("/root/main/strminfo/thnm") == "-"){
  948. model.alert("기타 의료기관명을 입력하세요.");
  949. model.setFocus("ipt_thnm");
  950. vFlag = 0;
  951. }
  952. }
  953. else if(model.getValue("/root/main/strminfo/thtm") == "" || model.getValue("/root/main/strminfo/thtm") == "-"){
  954. model.alert("이송 수단을 선택하세요.");
  955. model.setFocus("rdo_thtm");
  956. vFlag = 0;
  957. }else if(model.getValue("/root/main/strminfo/thp1") == "-" && model.getValue("/root/main/strminfo/thp2") == "-" &&
  958. model.getValue("/root/main/strminfo/thp3") == "-" && model.getValue("/root/main/strminfo/thp4") == "-" ){
  959. model.alert("동승인력을 선택하세요.");
  960. vFlag = 0;
  961. }else if(model.getValue("/root/main/strminfo/thdp") == "" || model.getValue("/root/main/strminfo/thdp") == "-"){
  962. model.alert("전원병원 선정방법을 선택하세요.");
  963. model.setFocus("rdo_thdp");
  964. vFlag = 0;
  965. }
  966. }
  967. }
  968. /*
  969. if(!fDGKD()){
  970. model.alert("내원사유(질병여부) 가 '질병 외' 인 경우만 등록 대상입니다.");
  971. vFlag = 0;
  972. }
  973. */
  974. }
  975. /**
  976. * @desc : 저장시 NULL값 -> DEFAULT값 변경
  977. * @
  978. * @param :
  979. * @return :
  980. * @author : 김소정
  981. * @---------------------------------------------------
  982. */
  983. function fsetDefualt() {
  984. // 내원경로(inrt)
  985. var vInrt = model.getValue("/root/main/strminfo/inrt");
  986. if( vInrt == "2" ) { //외부에서 전원
  987. if( model.getValue("/root/main/strminfo/intp")=="9" ) model.setValue("/root/main/strminfo/fhcd", "-");
  988. else model.setValue("/root/main/strminfo/fhnm", "-"); //기타
  989. }
  990. //영상검사
  991. if( model.getValue("/root/main/strminfo/img1") == "" ) model.setValue("/root/main/strminfo/img1", "N");
  992. if( model.getValue("/root/main/strminfo/img2") == "" ) model.setValue("/root/main/strminfo/img2", "N");
  993. if( model.getValue("/root/main/strminfo/img3") == "" ) model.setValue("/root/main/strminfo/img3", "N");
  994. if( model.getValue("/root/main/strminfo/img4") == "" ) model.setValue("/root/main/strminfo/img4", "N");
  995. if( model.getValue("/root/main/strminfo/img5") == "" ) model.setValue("/root/main/strminfo/img5", "N");
  996. if( model.getValue("/root/main/strminfo/img6") == "" ) model.setValue("/root/main/strminfo/img6", "N");
  997. if( model.getValue("/root/main/strminfo/img7") == "" ) model.setValue("/root/main/strminfo/img7", "N");
  998. if( model.getValue("/root/main/strminfo/img8") == "" ) model.setValue("/root/main/strminfo/img8", "N");
  999. if( model.getValue("/root/main/strminfo/img9") == "" ) model.setValue("/root/main/strminfo/img9", "N");
  1000. //퇴실 시 AIS(코드, 점수)
  1001. if( (model.getValue("/root/main/strminfo/aic1") == "") || (model.getValue("/root/main/strminfo/ais1") == "") ) {
  1002. model.setValue("/root/main/strminfo/aic1", "-"); model.setValue("/root/main/strminfo/ais1", "0");
  1003. }
  1004. if( (model.getValue("/root/main/strminfo/aic2") == "") || (model.getValue("/root/main/strminfo/ais2") == "") ) {
  1005. model.setValue("/root/main/strminfo/aic2", "-"); model.setValue("/root/main/strminfo/ais2", "0");
  1006. }
  1007. if( (model.getValue("/root/main/strminfo/aic3") == "") || (model.getValue("/root/main/strminfo/ais3") == "") ) {
  1008. model.setValue("/root/main/strminfo/aic3", "-"); model.setValue("/root/main/strminfo/ais3", "0");
  1009. }
  1010. if( (model.getValue("/root/main/strminfo/aic4") == "") || (model.getValue("/root/main/strminfo/ais4") == "") ) {
  1011. model.setValue("/root/main/strminfo/aic4", "-"); model.setValue("/root/main/strminfo/ais4", "0");
  1012. }
  1013. if( (model.getValue("/root/main/strminfo/aic5") == "") || (model.getValue("/root/main/strminfo/ais5") == "") ) {
  1014. model.setValue("/root/main/strminfo/aic5", "-"); model.setValue("/root/main/strminfo/ais5", "0");
  1015. }
  1016. if( (model.getValue("/root/main/strminfo/aic6") == "") || (model.getValue("/root/main/strminfo/ais6") == "") ) {
  1017. model.setValue("/root/main/strminfo/aic6", "-"); model.setValue("/root/main/strminfo/ais6", "0");
  1018. }
  1019. fISSScore();
  1020. //전원 보낼
  1021. if(model.getValue("/root/main/strminfo/emrt").substr(0,1) == "2" || model.getValue("/root/main/strminfo/dcrt") == "3"){ //전원
  1022. if( model.getValue("/root/main/strminfo/dctp") == "9" ) model.setValue("/root/main/strminfo/thcd", "-");
  1023. else model.setValue("/root/main/strminfo/thnm", "-");
  1024. if(model.getValue("/root/main/strminfo/thp1") == "" || model.getValue("/root/main/strminfo/thp1") == "-") model.setValue("/root/main/strminfo/thp1", "N");
  1025. if(model.getValue("/root/main/strminfo/thp2") == "" || model.getValue("/root/main/strminfo/thp2") == "-") model.setValue("/root/main/strminfo/thp2", "N");
  1026. if(model.getValue("/root/main/strminfo/thp3") == "" || model.getValue("/root/main/strminfo/thp3") == "-") model.setValue("/root/main/strminfo/thp3", "N");
  1027. if(model.getValue("/root/main/strminfo/thp4") == "" || model.getValue("/root/main/strminfo/thp4") == "-") model.setValue("/root/main/strminfo/thp4", "N");
  1028. }
  1029. }
  1030. /**
  1031. * @desc : 중증외상 대상여부(대상범위: RTS <=7 또는 ISS >=15)
  1032. * @
  1033. * @param :
  1034. * @return :
  1035. * @author : 오지훈
  1036. * @---------------------------------------------------
  1037. */
  1038. function fOeSangYeoBu(){
  1039. iRTS = eval(model.getValue("/root/main/strminfo/rtsc"));
  1040. iISS = eval(model.getValue("/root/main/strminfo/ciss"));
  1041. if(iRTS == "undefined" || iISS == "undefined" || iISS == 0){
  1042. IsDaeSang = true;
  1043. }else{
  1044. if(iRTS > 7 && iISS < 15){
  1045. model.alert("RTS 및 ISS 점수에 의해 중증외상 등록대상이 아닙니다.\n\n저장 후 종료하시기 바랍니다.");
  1046. IsDaeSang = false;
  1047. }else{
  1048. IsDaeSang = true;
  1049. }
  1050. }
  1051. }
  1052. /**
  1053. * @desc : 외상팀 최종치료 소요시간 계산
  1054. * @
  1055. * @param :
  1056. * @return :
  1057. * @author : 오지훈
  1058. * @---------------------------------------------------
  1059. */
  1060. function fATTTCalculate(){
  1061. //내원일시
  1062. var vIndt = model.getValue("/root/main/strminfo/indt");
  1063. var vIntm = model.getValue("/root/main/strminfo/intm");
  1064. //최총치료결정일시
  1065. var vAtdt = model.getValue("/root/main/strminfo/atdt");
  1066. var vAttm = model.getValue("/root/main/strminfo/attm");
  1067. //퇴원일시
  1068. var vDcdt = model.getValue("/root/main/strminfo/dcdt");
  1069. var vDctm = model.getValue("/root/main/strminfo/dctm");
  1070. if(vAtdt == "" || vAtdt == "99999999" || vAttm == "" || vAttm == "9999" ) { //결정일시 미상일 경우 계산X
  1071. model.setValue("/root/main/strminfo/attt", "0");
  1072. return;
  1073. }
  1074. if (vDcdt == "" || vDcdt == "-" || vDctm == "" || vDctm == "-") {
  1075. }
  1076. else { //퇴원일자 있을 경우
  1077. var sTermDd = getDateInterval(vAtdt, vDcdt); //getDateInterval(fromDate, endDate);
  1078. var sTermMn = ( (eval(sTermDd)*24 + eval(vDctm.substr(0,2)))*60 + eval(vDctm.substr(2,2)) ) - ( eval(vAttm.substr(0, 2))*60 + eval(vAttm.substr(2,2)) ) ;
  1079. if(sTermMn < 0) {
  1080. model.alert("외상팀 최종치료 결정일시가 퇴원일시 이전이어야 합니다. 확인하여 주십시요!");
  1081. model.setValue("/root/main/strminfo/attm","");
  1082. model.setValue("/root/main/strminfo/attt","");
  1083. model.refresh();
  1084. return;
  1085. }
  1086. }
  1087. if( !isValidDateTime(model.getValue("/root/main/strminfo/attm"), "hhmm")){
  1088. model.alert("외상팀 최종치료 결정 시간이 잘못 입력되었습니다.(시:0~23, 분:0~59)");
  1089. model.setValue("/root/main/strminfo/attm", "");
  1090. model.setFocus("ipt_attm");
  1091. model.refresh();
  1092. }
  1093. else{
  1094. var sTermDate = getDateInterval(vIndt, vAtdt); //getDateInterval(fromDate, endDate);
  1095. var sTermMin = ( (eval(sTermDate)*24 + eval(vAttm.substr(0,2)))*60 + eval(vAttm.substr(2,2)) ) - ( eval(vIntm.substr(0, 2))*60 + eval(vIntm.substr(2,2)) ) ;
  1096. if(sTermMin<0) {
  1097. model.alert("외상팀 최종치료 결정일시가 내원일시 이후이어야 합니다. 확인하여 주십시요!");
  1098. model.setValue("/root/main/strminfo/attm","");
  1099. model.setValue("/root/main/strminfo/attt","");
  1100. model.refresh();
  1101. return;
  1102. }
  1103. model.setValue("/root/main/strminfo/attt",sTermMin);
  1104. model.refresh();
  1105. }
  1106. }
  1107. /**
  1108. * @desc : ISS점수(개정외상점수) 계산
  1109. * @
  1110. * @param :
  1111. * @return :
  1112. * @author : 오지훈
  1113. * @---------------------------------------------------
  1114. */
  1115. function fISSScore(){
  1116. var badnum = 0;
  1117. var iss = 0;
  1118. var issA = 0;
  1119. var issB = 0;
  1120. var issC = 0;
  1121. var ais = new Array(6);
  1122. ais[0] = model.getValue("/root/main/strminfo/ais1"); //head
  1123. ais[1] = model.getValue("/root/main/strminfo/ais2"); //face
  1124. ais[2] = model.getValue("/root/main/strminfo/ais3"); //ches
  1125. ais[3] = model.getValue("/root/main/strminfo/ais4"); //abdo
  1126. ais[4] = model.getValue("/root/main/strminfo/ais5"); //limb
  1127. ais[5] = model.getValue("/root/main/strminfo/ais6"); //skin
  1128. for (j=0; j<6; j++) {
  1129. if ((ais[j]<0) || (ais[j]>6)) {
  1130. model.alert('AIS 범위(0 - 6)');
  1131. model.setValue("/root/main/strminfo/ais"+(j+1)+"","");
  1132. model.refresh();
  1133. badnum = -1;
  1134. }
  1135. }
  1136. aissort = ais.sort(isGreater);
  1137. issA = aissort[3]*aissort[3];
  1138. issB = aissort[4]*aissort[4];
  1139. issC = aissort[5]*aissort[5];
  1140. if (badnum == 0) {
  1141. if (issC == 36) iss = 75;
  1142. else iss = issA + issB + issC;
  1143. }
  1144. else iss = 0;
  1145. model.setValue("/root/main/strminfo/ciss", iss);
  1146. model.refresh();
  1147. //외상 대상여부
  1148. fOeSangYeoBu();
  1149. }
  1150. /**
  1151. * @desc : GCS 총점 계산
  1152. * @
  1153. * @param :
  1154. * @return :
  1155. * @author : 오지훈
  1156. * @---------------------------------------------------
  1157. */
  1158. function fTotalGCS(){
  1159. if(model.getValue("/root/main/strminfo/gcse") == "" ||
  1160. (model.getValue("/root/main/strminfo/gcsv") == "" && model.getValue("/root/main/strminfo/gcsp") == "") ||
  1161. model.getValue("/root/main/strminfo/gcsm") == ""){
  1162. }else{
  1163. var vGCSe = model.getAttribute("GCSe");
  1164. var vGCSv = model.getAttribute("GCSv");
  1165. var vGCSm = model.getAttribute("GCSm");
  1166. if(vGCSe == "9"){
  1167. vGCSe = "4";
  1168. model.alert("GCS 측정(눈)이 불가함으로, 최대값을 적용하여 점수를 계산합니다.");
  1169. }
  1170. if(vGCSv == "9"){
  1171. vGCSv = "5";
  1172. model.alert("GCS 측정(언어)이 불가함으로, 최대값을 적용하여 점수를 계산합니다.");
  1173. }
  1174. if(vGCSm == "9"){
  1175. vGCSm = "6";
  1176. model.alert("GCS 측정(운동)이 불가함으로, 최대값을 적용하여 점수를 계산합니다.");
  1177. }
  1178. var vGCS = eval(vGCSe) + eval(vGCSv) + eval(vGCSm);
  1179. model.setValue("/root/main/strminfo/gcst", vGCS);
  1180. fRTSCalculate();
  1181. }
  1182. }
  1183. /**
  1184. * @desc : RTS 점수 계산
  1185. * @
  1186. * @param :
  1187. * @return :
  1188. * @author : 오지훈
  1189. * @---------------------------------------------------
  1190. */
  1191. function fRTSCalculate(){
  1192. var vGCS = eval(model.getValue("/root/main/strminfo/gcst"));
  1193. var vSBP = eval(model.getValue("/root/main/strminfo/hibp"));
  1194. var vRR = eval(model.getValue("/root/main/strminfo/brth"));
  1195. var iGCS = 0;
  1196. var iSBP = 0;
  1197. var iRR = 0;
  1198. var vRTS = 0;
  1199. if(vGCS == "undefined"){
  1200. }else{
  1201. if(vGCS >=13){
  1202. iGCS = 4;
  1203. }else if(vGCS >=9){
  1204. iGCS = 3;
  1205. }else if(vGCS >=6){
  1206. iGCS = 2;
  1207. }else if(vGCS >=4){
  1208. iGCS = 1;
  1209. }else{
  1210. iGCS = 0;
  1211. }
  1212. vSBP = eval(vSBP); //수축기 혈압
  1213. if(vSBP == -1 || vSBP == 999){
  1214. model.alert("수축기혈압이 측정불가 이므로, 최대값을 적용하여 RTS를 계산합니다.");
  1215. iSBP = 4;
  1216. }else if(vSBP > 89){
  1217. iSBP = 4;
  1218. }else if(vSBP >= 76){
  1219. iSBP = 3;
  1220. }else if(vSBP >= 50){
  1221. iSBP = 2;
  1222. }else if(vSBP >= 1){
  1223. iSBP = 1;
  1224. }else{
  1225. iSBP = 0;
  1226. }
  1227. vRR = eval(vRR); //분당호흡수
  1228. if(vRR == -1 || vRR == 999){
  1229. model.alert("호흡이 측정불가 이므로, 최대값을 적용하여 RTS를 계산합니다.");
  1230. iRR = 4;
  1231. }else if(vRR > 29){
  1232. iRR = 3;
  1233. }else if(vRR >= 10){
  1234. iRR = 4;
  1235. }else if(vRR >= 6){
  1236. iRR = 2;
  1237. }else if(vRR >= 1){
  1238. iRR = 1;
  1239. }else{
  1240. iRR = 0;
  1241. }
  1242. vRTS = 0.9368 * iGCS + 0.7326 * iSBP + 0.2908 * iRR;
  1243. model.setValue("/root/main/strminfo/rtsc", vRTS);
  1244. model.refresh();
  1245. //등록대상 체크
  1246. fOeSangYeoBu();
  1247. }
  1248. }
  1249. /**
  1250. * @desc : 중증외상의 범위 체크
  1251. * @
  1252. * @param :
  1253. * @return :
  1254. * @author : 오지훈
  1255. * @---------------------------------------------------
  1256. */
  1257. function fCheckScope(){
  1258. //내원사유가 '질병외' 인지 체크
  1259. if(model.getValue("/root/main/strminfo/dgkd") != "2"){
  1260. model.alert("내원사유가 질병외 가 아니므로 대상이 아닙니다.\n\n저장 후 종료하시기 바랍니다.");
  1261. IsDaeSang = false;
  1262. return;
  1263. }
  1264. else{
  1265. if(model.getvalue("/root/main/strminfo/aketc") == "Y"){
  1266. model.alert("발병 후 24이내 내원한 환자가 아니므로 등록대상이 아닙니다.\n\n저장 후 종료하시기 바랍니다.");
  1267. IsDaeSang = false;
  1268. vFlag2 = false;
  1269. return;
  1270. }
  1271. if(model.getValue("/root/main/strminfo/akdt") !="" && model.getValue("/root/main/strminfo/aktm") != "" ){
  1272. //내원일시 - 발병일시(수상일시) <= 24 시간
  1273. vInHsptDate = model.getValue("/root/main/strminfo/indt") + model.getValue("/root/main/strminfo/intm");
  1274. vInjuryDate = model.getValue("/root/main/strminfo/akdt") + model.getValue("/root/main/strminfo/aktm");
  1275. var vTermDate = getDateInterval(vInHsptDate,vInjuryDate);
  1276. if(vTermDate < 0 || vTermDate > 1){
  1277. model.alert("발병 후 24이내 내원한 환자가 아니므로 대상이 아닙니다.\n\n저장 후 종료하시기 바랍니다.");
  1278. IsDaeSang = false;
  1279. vFlag2 = false;
  1280. return;
  1281. }else {
  1282. IsDaeSang = true;
  1283. }
  1284. }
  1285. }
  1286. //if(vFlag2){
  1287. if( (model.getValue("/root/main/strminfo/rtsc") > "7") && (model.getValue("/root/main/strminfo/ciss") < "15") ) {
  1288. model.alert("ISS 또는 RTS 값을 먼저 체크하여 대상 환자인지 확인하십시요.\n\n(대상: RTS <= 7점 이거나 ISS >= 15점)");
  1289. model.setFocus("ipt_hibp");
  1290. return;
  1291. }
  1292. }
  1293. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1294. /**
  1295. * @desc : 응급Triage환자 기본정보 조회(primary key를 이용해서 조회한다.)
  1296. * @
  1297. * @param :
  1298. * @return :
  1299. * @author : 오지훈
  1300. * @---------------------------------------------------
  1301. */
  1302. function fReqERTriagePatInfoPrimaryKey(param){
  1303. var condparam = param.split("▦");
  1304. model.removeNodeset("/root/send/reqdata");
  1305. model.makeValue("/root/send/reqdata/pid" , condparam[0]);
  1306. model.makeValue("/root/send/reqdata/orddd" , condparam[1]);
  1307. model.makeValue("/root/send/reqdata/cretno" , condparam[2]);
  1308. model.makeValue("/root/send/reqdata/queryflag", "K"); //쿼리구분 K : 기본키를 이용해 조회한다.
  1309. submit("TRMMO06103");
  1310. var node = instance1.selectSingleNode(sERTRIAGE_PATH)
  1311. if(node == null){
  1312. fMakeERTriageNode(); //조회 결과가 없는 경우 node를 생성한다.
  1313. model.setValue(sERTRIAGE_PATH + "/status" , "i");
  1314. var condparam = param.split("▦");
  1315. model.setValue(sERTRIAGE_PATH + "/pid" , condparam[0]);
  1316. model.setValue(sERTRIAGE_PATH + "/orddd" , condparam[1]);
  1317. model.setValue(sERTRIAGE_PATH + "/cretno" , condparam[2]);
  1318. model.setValue(sERTRIAGE_PATH + "/sex" , condparam[3]);
  1319. model.setValue(sERTRIAGE_PATH + "/age" , condparam[4]);
  1320. model.setValue(sERTRIAGE_PATH + "/cntctel", condparam[5]);
  1321. model.setValue(sERTRIAGE_PATH + "/patnm" , condparam[6]);
  1322. model.setValue(sERTRIAGE_PATH + "/cscsflag", "-"); //의식
  1323. model.setValue(sERTRIAGE_PATH + "/choswayflag", "-"); //내원수단
  1324. model.setValue(sERTRIAGE_PATH + "/painflag", "-"); //통증
  1325. model.setValue(sERTRIAGE_PATH + "/chosresnflag", "-"); //내원사유
  1326. model.setValue(sERTRIAGE_PATH + "/intenflag", "-"); //의도성여부
  1327. model.setValue(sERTRIAGE_PATH + "/injmechflag", "-"); //손상기전
  1328. model.setValue(sERTRIAGE_PATH + "/chospathflag", "-"); //내원경로
  1329. }else{
  1330. //조회 결과가 있는 경우, status를 update로 설정한다.
  1331. model.setValue(sERTRIAGE_PATH + "/status" , "");
  1332. model.copyNode("/root/temp/ertriage", "/root/main/ertriage/ertriage");
  1333. }
  1334. }
  1335. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1336. function isGreater(a,b) {
  1337. if (Math.abs(a) < Math.abs(b)) return -1;
  1338. else
  1339. if (Math.abs(b) == Math.abs(a)) return 0;
  1340. return true;
  1341. }
  1342. /**
  1343. * @desc : 닫기버튼 클릭
  1344. * @
  1345. * @param :
  1346. * @return :
  1347. * @author : 김소정
  1348. * @---------------------------------------------------
  1349. */
  1350. function fClose() {
  1351. opener.javascript.btn_search.dispatch("DOMActivate");
  1352. model.close();
  1353. }
  1354. /////////////////////////////////////////////////////////////
  1355. //날짜 유효검사 사용예> isValidDateTime("20030229", "YYYYMMDD")
  1356. // * isValidDateTime("11:61", "hh:mm");
  1357. ////////////////////////////////////////////////////////////
  1358. //function freqGetERStrmInfo() {
  1359. //
  1360. // var patflagcsv = getGlobalVariable("patflag");
  1361. // var paminfocsv = getGlobalVariable("paminfo");
  1362. //
  1363. // model.removeNodeset("/root/patflag/list");
  1364. // setCSVToNode("/root/patflag", patflagcsv);
  1365. // var ioflag = model.getValue("/root/patflag/list/prcpgenrflag");
  1366. //
  1367. // if(patflagcsv.length > 1 && paminfocsv.length > 1 && ioflag == "E"){ //상단정보가 있고, 환자정보가 응급인 경우
  1368. //
  1369. // model.removeNodeset("/root/paminfo/list");
  1370. // setCSVToNode("/root/paminfo", paminfocsv);
  1371. //
  1372. // model.setValue("/root/main/patinfo/pid", model.getValue("/root/paminfo/list/pid"));
  1373. // model.setValue("/root/main/patinfo/orddd",model.getValue("/root/paminfo/list/indd"));
  1374. // model.setValue("/root/main/patinfo/cretno",model.getValue("/root/paminfo/list/cretno"));
  1375. // model.setValue("/root/main/patinfo/histcd", "O");
  1376. // model.setValue("/root/main/patinfo/gwtransyn", "N");
  1377. // model.makeValue("/root/send/reqdata/pid", model.getValue("/root/paminfo/list/pid"));
  1378. // model.makeValue("/root/send/reqdata/orddd", model.getValue("/root/paminfo/list/indd"));
  1379. // model.makeValue("/root/send/reqdata/cretno", model.getValue("/root/paminfo/list/cretno"));
  1380. //
  1381. // submit("TRMMO06901");
  1382. //// var node = instance1.selectSingleNode(sERSTRM_PATH);
  1383. // var node = instance1.selectSingleNode("/root/main/strminfo");
  1384. // if(node == null){
  1385. // fMakeERStrmNode();
  1386. // model.setValue( "/root/main/patinfo/status" , "i");
  1387. // fInit();
  1388. // }
  1389. // else {
  1390. // model.setValue( "/root/main/patinfo/status" , "u");
  1391. // }
  1392. // }
  1393. // model.refresh();
  1394. //}
  1395. //function fCheckScope(){
  1396. ////내원사유가 '질병외' 인지 체크
  1397. // if(model.getValue("/root/main/strminfo/dgkd") != "2"){
  1398. // model.alert("내원사유가 질병외 가 아니므로 대상이 아닙니다.\n\n저장 후 종료하시기 바랍니다.");
  1399. // IsDaeSang = false;
  1400. // }
  1401. // else{
  1402. // if(model.getvalue("/root/main/strminfo/aketc") == "Y"){
  1403. // model.alert("발병 후 24이내 내원한 환자가 아니므로 등록대상이 아닙니다.\n\n저장 후 종료하시기 바랍니다.");
  1404. // IsDaeSang = false;
  1405. // vFlag2 = false;
  1406. // }
  1407. //
  1408. // if(model.getValue("/root/main/strminfo/akdt") !="" && model.getValue("/root/main/strminfo/aktm") != "" ){
  1409. //
  1410. // //내원일시 - 발병일시(수상일시) <= 24 시간
  1411. // vInHsptDate = model.getValue("/root/main/strminfo/indt") + model.getValue("/root/main/strminfo/intm");
  1412. // vInjuryDate = model.getValue("/root/main/strminfo/akdt") + model.getValue("/root/main/strminfo/aktm");
  1413. //
  1414. //
  1415. // var vTermDate = getDateInterval(vInHsptDate,vInjuryDate);
  1416. //
  1417. // if(vTermDate < 0 || vTermDate > 1){
  1418. // model.alert("발병 후 24이내 내원한 환자가 아니므로 대상이 아닙니다.\n\n저장 후 종료하시기 바랍니다.");
  1419. // IsDaeSang = false;
  1420. // vFlag2 = false;
  1421. // }else {
  1422. // IsDaeSang = true;
  1423. // }
  1424. // }
  1425. // }
  1426. // if(!vFlag2){
  1427. // model.alert("ISS 또는 RTS 값을 먼저 체크하여 대상 환자인지 확인하십시요.\n\n(대상: RTS <= 7점 이거나 ISS >= 15점)");
  1428. // model.setFocus("ipt_hibp");
  1429. // }
  1430. //}
  1431. //function fChkChanged(vChkGrID, vChkYN, vChkID) {
  1432. // if ( vChkGrID == "mimg") {
  1433. // if (vChkID == "img8" || vChkID == "img9") {
  1434. //
  1435. // }
  1436. // else {
  1437. // if (vChkYN == "Y") return "Y";
  1438. // else return "N";
  1439. // }
  1440. // }else if ( vChkGrID == "tsst" ) {
  1441. // if (vChkID == "" || vChkID == "" || vChkID == "") {
  1442. //
  1443. // }
  1444. // else {
  1445. // if(vChkYN == "Y") return "Y";
  1446. // else return "-";
  1447. // }
  1448. // }
  1449. //}