SMANC00150_영양검색결과조회.xrw 69 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>영양검색결과</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <srchrslt>
  11. <data>
  12. <check/>
  13. <h_patflag/>
  14. <h_prcpdd/>
  15. <h_cretno/>
  16. <h_prcpgenrflag/>
  17. <h_orddd/>
  18. <replyn/>
  19. <ward/>
  20. <room/>
  21. <h_wardroom/>
  22. <pid/>
  23. <hngnm/>
  24. <sex/>
  25. <age/>
  26. <h_diagcd/>
  27. <diagnm/>
  28. <orddept/>
  29. <orddrid/>
  30. <atdoct/>
  31. <dietnm/>
  32. <h_ht/>
  33. <h_wt/>
  34. <wlpnt/>
  35. <bmipnt/>
  36. <appnt/>
  37. <gipnt/>
  38. <stpnt/>
  39. <atpnt/>
  40. <dtpnt/>
  41. <agepnt/>
  42. <totalpnt/>
  43. <srchrslt/>
  44. <bfrslt/>
  45. <bfrsltdd/>
  46. <trf/>
  47. <insrslt/>
  48. <nutrmngtkind/>
  49. <execdd/>
  50. <indd/>
  51. </data>
  52. <count>
  53. <good/>
  54. <low/>
  55. <mid/>
  56. <high/>
  57. <non/>
  58. <total/>
  59. </count>
  60. </srchrslt>
  61. <pastsrchrslt>
  62. <data>
  63. <check/>
  64. <signyn/>
  65. <replyn/>
  66. <prcpdd/>
  67. <cretno/>
  68. <prcpgenrflag/>
  69. <orddept/>
  70. <orddrid/>
  71. <atdoct/>
  72. <dietnm/>
  73. <bfrslt/>
  74. <bfrsltdd/>
  75. <srchdd/>
  76. <patflag/>
  77. <orddd/>
  78. <indd/>
  79. <ward/>
  80. <room/>
  81. <h_wardroom/>
  82. <pid/>
  83. <hngnm/>
  84. <sex/>
  85. <age/>
  86. <diagnm/>
  87. <wlpnt/>
  88. <bmipnt/>
  89. <appnt/>
  90. <gipnt/>
  91. <stpnt/>
  92. <atpnt/>
  93. <dtpnt/>
  94. <agepnt/>
  95. <totalpnt/>
  96. <srchrslt/>
  97. <trf/>
  98. <insrslt/>
  99. <rem/>
  100. <h_signno/>
  101. </data>
  102. <count>
  103. <good/>
  104. <low/>
  105. <mid/>
  106. <high/>
  107. <non/>
  108. <total/>
  109. </count>
  110. </pastsrchrslt>
  111. <srchstats>
  112. <data>
  113. <srchdd/>
  114. <good1/>
  115. <low1/>
  116. <mid1/>
  117. <high1/>
  118. <non1/>
  119. <total1/>
  120. <good2/>
  121. <low2/>
  122. <mid2/>
  123. <high2/>
  124. <non2/>
  125. <total2/>
  126. </data>
  127. </srchstats>
  128. <nutrjudgbase>
  129. <data>
  130. <cd/>
  131. <dngrcd/>
  132. <min/>
  133. <max/>
  134. </data>
  135. </nutrjudgbase>
  136. </main>
  137. <send>
  138. <searchitem>
  139. <basedd/>
  140. <patflag/>
  141. <orddept/>
  142. <ward/>
  143. <dngrflag/>
  144. <optward/>
  145. </searchitem>
  146. <pastsearchitem>
  147. <fromdd/>
  148. <todd/>
  149. <patflag/>
  150. <ward/>
  151. <dngrflag/>
  152. </pastsearchitem>
  153. <statssearchitem>
  154. <fromdd/>
  155. <todd/>
  156. <patflag/>
  157. <orddept/>
  158. <ward/>
  159. <dngrflag/>
  160. </statssearchitem>
  161. <data>
  162. <list/>
  163. <pastlist/>
  164. <signdata/>
  165. <careplan>
  166. <listdata/>
  167. </careplan>
  168. </data>
  169. <popup>
  170. <flag/>
  171. <flag2/>
  172. <pid/>
  173. <hngnm/>
  174. <reqdd/>
  175. <reqpsn/>
  176. <orddrid/>
  177. <educreqcnts/>
  178. <h_cretno/>
  179. <h_orddeptcd/>
  180. <h_prcpgenrflag/>
  181. <h_orddd/>
  182. <h_formrecseq/>
  183. <execprcpuniqno/>
  184. <nutrmngtkind/>
  185. <execdd/>
  186. <srchdd/>
  187. </popup>
  188. </send>
  189. <temp>
  190. <count>
  191. <cnt/>
  192. </count>
  193. <patflagyn/>
  194. <nutrsrchrsltlist>
  195. <nutrsrchrslt/>
  196. </nutrsrchrsltlist>
  197. <singrslt>
  198. <signno/>
  199. <histno/>
  200. </singrslt>
  201. </temp>
  202. <init>
  203. <basecode>
  204. <dngr>
  205. <A0058>
  206. <cdid/>
  207. <cdnm/>
  208. </A0058>
  209. </dngr>
  210. <orddept>
  211. <dept>
  212. <deptcd/>
  213. <depthngnm/>
  214. </dept>
  215. </orddept>
  216. <ward>
  217. <dept>
  218. <deptcd/>
  219. <depthngnm/>
  220. </dept>
  221. </ward>
  222. <dngrcopy>
  223. <A0058>
  224. <cdid/>
  225. <cdnm/>
  226. </A0058>
  227. </dngrcopy>
  228. </basecode>
  229. </init>
  230. </root>
  231. </instance>
  232. <submission id="TRZBC00101"/>
  233. <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  234. <submission id="TRANC00102" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/main/nutrjudgbase"/>
  235. <submission id="TRANC00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/temp"/>
  236. <submission id="TXANC00151" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" resultref="/root/temp"/>
  237. <submission id="TRANC00157" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/statssearchitem" resultref="/root/main/srchstats"/>
  238. <script type="javascript" ev:event="xforms-ready">
  239. <![CDATA[
  240. finit();
  241. btn_search1.disabled = !checkAuth("R");
  242. btn_search2.disabled = !checkAuth("R");
  243. btn_search3.disabled = !checkAuth("R");
  244. btn_save.disabled = !checkAuth("X");
  245. btn_excel1.disabled = !checkAuth("P");
  246. btn_excel2.disabled = !checkAuth("P");
  247. btn_excel3.disabled = !checkAuth("P");
  248. grd_nutrsrch.fixedcellcheckbox(0,1) = true; //영양검색 탭화면 전체선택 체크박스 설정
  249. grd_pastnutrsrch.fixedcellcheckbox(0,1) = true; //영양검색결과 탭화면 전체선택 체크박스 설정
  250. ]]>
  251. </script>
  252. <script type="javascript">
  253. <![CDATA[
  254. var sColSep = "▦"; // 열 구분 값
  255. var sRowSep = "▩"; // 행 구분 값
  256. var rCSV2 = ""; // 서버로 전송할 서식인증 데이터 변수
  257. var rCSV3 = ""; // Care Plan 데이터 변수
  258. /*
  259. * 환자별 서식 데이터 인증후 테이블에 인증번호를 저장
  260. */
  261. function fCertSave() {
  262. rCSV2 = "m▦instcd▦pid▦orddd▦signno▦cretno▦recdd▦rectm▦recsaveflag▦signflag▦signgenrflag▦formcd▦orddeptcd▦orddrid▦histno▦signbfcnts▦signaftcnts▦patflag▦srchdd";
  263. rCSV3 = "m▦instcd▦careplanseq▦pid▦orddd▦cretno▦workflag▦problem▦careplan▦rgstdd▦rgsttm";
  264. var gridRows = grd_pastnutrsrch.rows; // 검색된 그리드 행의 수
  265. var gridFixedRows = grd_pastnutrsrch.fixedRows; // 고정된 그리드 행의 수
  266. var errMessage = "인증 실패 및 Care Plan 전송 실패 데이터 번호: "; // 에러 메시지
  267. var signErrYn = false; // 서식인증 에러 여부
  268. var signSucsCnt = 0; // 서식인증 건수
  269. var sendDataRowCnt = 1; // 전송할 데이터 행의 순번
  270. // 저장 데이터 초기화
  271. model.removeNodeset("/root/send/data/signdata");
  272. model.makeNode("/root/send/data/signdata");
  273. var isSelect = true;
  274. // 데이터 선택 유무 확인
  275. for(var i = gridFixedRows; i < gridRows; ++i) {
  276. if(grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("check")) == "true") {
  277. isSelect = false;
  278. }
  279. }
  280. if(isSelect) {
  281. alert("선택된 데이터가 없습니다.");
  282. return;
  283. }
  284. // 서식인증 데이터 생성
  285. for(var i = gridFixedRows; i < gridRows; ++i) {
  286. // 서식인증 데이터 초기화
  287. model.removeNodeset("/root/temp/nutrsrchrsltlist/nutrsrchrslt");
  288. model.makeNode("/root/temp/nutrsrchrsltlist/nutrsrchrslt");
  289. // 체크 된건중에서 서식인증이 안된 건만 처리
  290. if(grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("check")) == "true" && grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("signyn")) != "Y") {
  291. // 비고란에 데이터가 없는 건만 서식인증 데이터 세팅 && 검색결과가 '9' : '판정불가' 가 아닌건만 세팅
  292. if(grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("rem")) == "" && grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("srchrslt")) != "9") {
  293. // 전자서명 인증 여부
  294. if(model.getValue("/root/send/pastsearchitem/patflag") == "F") {
  295. model.makeValue("/root/temp/nutrsrchrsltlist/nutrsrchrslt/inityn" , "(초기)");
  296. } else {
  297. model.makeValue("/root/temp/nutrsrchrsltlist/nutrsrchrslt/inityn" , "");
  298. }
  299. model.makeValue("/root/temp/nutrsrchrsltlist/nutrsrchrslt/pid" , grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("pid")));
  300. model.makeValue("/root/temp/nutrsrchrsltlist/nutrsrchrslt/hngnm" , grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("hngnm")));
  301. model.makeValue("/root/temp/nutrsrchrsltlist/nutrsrchrslt/wlpnt" , grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("wlpnt")));
  302. model.makeValue("/root/temp/nutrsrchrsltlist/nutrsrchrslt/bmipnt" , grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("bmipnt")));
  303. model.makeValue("/root/temp/nutrsrchrsltlist/nutrsrchrslt/appnt" , grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("appnt")));
  304. model.makeValue("/root/temp/nutrsrchrsltlist/nutrsrchrslt/gipnt" , grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("gipnt")));
  305. model.makeValue("/root/temp/nutrsrchrsltlist/nutrsrchrslt/stpnt" , grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("stpnt")));
  306. model.makeValue("/root/temp/nutrsrchrsltlist/nutrsrchrslt/atpnt" , grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("atpnt")));
  307. model.makeValue("/root/temp/nutrsrchrsltlist/nutrsrchrslt/dtpnt" , grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("dtpnt")));
  308. model.makeValue("/root/temp/nutrsrchrsltlist/nutrsrchrslt/agepnt" , grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("agepnt")));
  309. model.makeValue("/root/temp/nutrsrchrsltlist/nutrsrchrslt/srchrslt", grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("srchrslt")));
  310. // 서식 인증 처리
  311. if(fExeMakeCertPrcs(sendDataRowCnt, i)) { // 서식인증 성공
  312. sendENRCAREPLANData(i); // care plan 전송 데이터 생성
  313. ++sendDataRowCnt; // sendData 데이터 노드 번호
  314. ++signSucsCnt; // 서식인증 건수
  315. } else { // 서식인증 실패
  316. signErrYn = true;
  317. // 에러 메시지 세팅
  318. if(i != (gridRows - 1)) {
  319. errMessage += (i-1) + ", ";
  320. } else {
  321. errMessage += (i-1);
  322. }
  323. } // end of if-else.
  324. }
  325. }
  326. } // end of for-loop.
  327. if(signSucsCnt > 0) {
  328. // Care Plan 데이터 저장
  329. if(submit("TXANC00357")) {
  330. // Care Plan 데이터 저장 성공!!
  331. } else {
  332. messageBox("서식 인증 저장 안됨!! Care Plan 전송 처리 오류!! 시스템 담당자에게 문의", "I008");
  333. return;
  334. }
  335. // 인증내용 저장
  336. if (submit("TXANC00153")) {
  337. btn_search2.dispatch("DOMActivate");
  338. messageBox("서식 인증 및 Care Plan 데이터 저장이", "I002");
  339. }
  340. } else if(signErrYn != true){
  341. messageBox("고지여부 'Y', 검색 결과에 '판정불가', 비고항목에 입력된 메모가 있으면 서식인증 진행", "E001");
  342. }
  343. // 에러 메시지 출력
  344. if(signErrYn) {
  345. messageBox(errMessage, "");
  346. }
  347. }
  348. /*
  349. * Care Plan 관련 ENR 데이터 전송
  350. */
  351. function sendENRCAREPLANData(i) {
  352. // 재검색, 신환 구분
  353. var patflag = model.getValue("/root/send/pastsearchitem/patflag");
  354. // 수행시간을 현재 시간으로 세팅
  355. var curDt = getCurrentDateTime().split(" ");
  356. // 그리드 헤더값 생성
  357. var m = "";
  358. var instcd = "";
  359. var careplanseq = "";
  360. var pid = "";
  361. var orddd = "";
  362. var cretno = "";
  363. var workflag = "";
  364. var problem = "";
  365. var careplan = "";
  366. var rgstdd = "";
  367. var rgsttm = "";
  368. var problem = "";
  369. var careplan = "";
  370. /*
  371. * Care Plan 데이터 구조
  372. * "m▦instcd▦careplanseq▦pid▦orddd▦cretno▦workflag▦problem▦careplan▦rgstdd▦rgsttm";
  373. */
  374. m = "i";
  375. instcd = getUserInfo("dutplceinstcd");
  376. careplanseq = "";
  377. pid = grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("pid"));
  378. orddd = grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("orddd"));
  379. cretno = grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("cretno"));
  380. workflag = "004"; // 004:영양
  381. if(grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("srchrslt")) == "2") { // 저위험군
  382. if(patflag == "F") { // 신환
  383. problem = "영양 검색 시행(저위험군)";
  384. careplan = "2주 후 영양 재검색";
  385. } else if(patflag == "I"){ // 재검색
  386. problem = "영양 검색 시행(저위험군)";
  387. careplan = "2주 후 영양 재검색";
  388. } else {
  389. problem = "";
  390. careplan = "";
  391. }
  392. } else if(grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("srchrslt")) == "3") { // 중위험군
  393. if(patflag == "F") { // 신환
  394. problem = "영양 검색 시행(중위험군)";
  395. careplan = "2주 후 영양 재검색";
  396. } else if(patflag == "I"){ // 재검색
  397. problem = "영양 검색 시행(중위험군)";
  398. careplan = "2주 후 영양 재검색";
  399. } else {
  400. problem = "";
  401. careplan = "";
  402. }
  403. } else if(grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("srchrslt")) == "4") { // 고위험군
  404. if(patflag == "F") { // 신환
  405. problem = "영양 검색 시행(고위험군)";
  406. careplan = "영양 상태 평가 및 관리";
  407. } else if(patflag == "I"){ // 재검색
  408. problem = "영양 검색 시행(고위험군)";
  409. careplan = "영양 상태 평가 및 관리";
  410. } else {
  411. problem = "";
  412. careplan = "";
  413. }
  414. } else {
  415. return false;
  416. }
  417. rgstdd = curDt[0];
  418. rgsttm = curDt[1];
  419. rCSV3 +=
  420. sRowSep +
  421. m + sColSep +
  422. instcd + sColSep + // 기관코드
  423. careplanseq + sColSep + // 케이플랜 데이터 시퀀스
  424. pid + sColSep + // 등록번호
  425. orddd + sColSep + // 입원/외래 일자
  426. cretno + sColSep + // 생성번호
  427. workflag + sColSep + // 작업구분(001:TREATMENT, 002:DISCHARGE, 003:NURSING CARE, 004:NUTRITION MANAGEMENT, 005:ACTIVITY/REHABILITATION, 999:OTHER CARE)
  428. problem + sColSep + // 문제
  429. careplan + sColSep + // 해결방안
  430. rgstdd + sColSep + // 등록일자
  431. rgsttm; // 등록시간
  432. // Care Plan 관련 전송 데이터 세팅
  433. model.makeValue("/root/send/data/careplan/listdata", rCSV3);
  434. return true;
  435. }
  436. /* **********************************
  437. * ENRSignEngine.js에서 함수를 호출함
  438. * ***********************************/
  439. function fMake_SignData(){
  440. //Sign.XPATH_MAINNODE = "/root/main";
  441. Sign.addnode("/root/temp/nutrsrchrsltlist"); // 인증경로로 copynode 함
  442. }
  443. /* @group : 결과 인증저장 Interface
  444. * @ver : 2009.12.07
  445. * @by : SMAER14000_심혈관센터기록관리.xrw 에서 복사해서 씀
  446. * @-----------------------------------
  447. * @type : function
  448. * @access : public
  449. * @desc : 결과 인증저장을 위한 Interface 데이터 셋팅 및 반영 Function
  450. */
  451. function fExeMakeCertPrcs(i, gridRow) {
  452. if (Sign.signprocess() == true) {
  453. // signno가 존재하면 기존 결과에 UPDATE가 되며, "0" 이라면 ADD(누적)되도록 데이터가 생성된다.
  454. var oldsignno = model.getValue("/root/temp/nutrsrchrsltlist/nutrsrchrslt/signno");
  455. var formcd = "";
  456. var recsaveflag = "";
  457. if(oldsignno == ""){
  458. var oldsignno = "0";
  459. }
  460. // 성인, 소아의 폼코드 구분
  461. if(grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("age")) >= 18) {
  462. formcd = "1000007288"; // 각 기록지별 성인서식코드 (심혈관시술시기록지 : (교육) 1000007124, (운영) 1000007288 )
  463. } else {
  464. formcd = "1000007289"; // 각 기록지별 소아서식코드 (심혈관시술시기록지 : (교육) 1000007125, (운영) 1000007289 )
  465. }
  466. // 전자서명 인적정보 변경여부
  467. if(grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("signyn")) == "Y") {
  468. recsaveflag = "Y"; // 전자서명 인적정보 변경여부(기록일시 변경되는 경우 : Y, 그외 : N)
  469. } else {
  470. recsaveflag = "N"; // 전자서명 인적정보 변경여부(기록일시 변경되는 경우 : Y, 그외 : N)
  471. }
  472. // "m▦instcd▦pid▦orddd▦signno▦cretno▦recdd▦rectm▦recsaveflag▦signflag▦signgenrflag▦formcd▦orddeptcd▦orddrid▦histno▦signbfcnts▦signaftcnts▦patflag▦srchdd";
  473. rCSV2 +=
  474. sRowSep +
  475. "i" + sColSep +
  476. getUserInfo("dutplceinstcd") + sColSep + // 기관코드
  477. grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("pid")) + sColSep + // 등록번호
  478. grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("orddd")) + sColSep + // 입원, 응급 : 입원일자, 외래 : 진료일자
  479. grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("h_signno")) + sColSep + // 서명번호
  480. grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("cretno")) + sColSep + // 생성번호
  481. getCurrentDate() + sColSep + // 실제기록이 이루어진 기록일자
  482. getCurrentTime() + sColSep + // 실제기록이 이루어진 기록시간
  483. recsaveflag + sColSep + // 전자서명 인적정보 변경여부(기록일시 변경되는 경우 : Y, 그외 : N)
  484. "04" + sColSep + // 서명자료구분(01 : 진료, 02 : 간호, 03:LIS, 04:진료지원, 20: 가정간호, 30:의료협력)
  485. grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("prcpgenrflag")) + sColSep + // 입원, 외래구분
  486. formcd + sColSep + // 각 기록지별 소아서식코드 (심혈관시술시기록지 : (운영) 0900006844)
  487. grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("orddept")) + sColSep + // 진료부서코드
  488. grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("orddrid")) + sColSep + // 진료의ID
  489. "0" + sColSep + // 서명이력번호
  490. Sign.signedInfos[1] + sColSep + // 인증할 데이터 정보(미기록 노드 제거된 정보), 미기록 노드 제거전 원본 노드 정보 : Sign.signedInfos[3]
  491. Sign.signedInfos[2] + sColSep + // 공인인증 처리 후 인증된 암호화된 데이터를 의미한다. (이것이 인증데이터)
  492. model.getValue("/root/send/pastsearchitem/patflag") + sColSep + // 환자구분
  493. grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("srchdd")); // 검색일자
  494. //alert("1" + Sign.signedInfos[1]);
  495. //alert("2" + Sign.signedInfos[2]);
  496. // 서버로 전송할 서식인증 데이터 임시 저장
  497. model.setValue("/root/send/data/signdata", rCSV2);
  498. return true;
  499. } else {
  500. return false;
  501. }
  502. }
  503. /*
  504. * Bind 에서 wl, bmi, ap, gi, st, at, dt, age 의 합계를 구하는 함수
  505. */
  506. function fsumTotalPNT() {
  507. var patflag = model.getValue("/root/send/pastsearchitem/patflag");
  508. var fixedRows = grd_pastnutrsrch.fixedRows;
  509. var gridRows = grd_pastnutrsrch.rows;
  510. var gridRow = grd_pastnutrsrch.row;
  511. var totalpnt = 0;
  512. var srchrslt = 2;
  513. var good = 0;
  514. var low = 0;
  515. var mid = 0;
  516. var high = 0;
  517. var non = 0;
  518. var total = 0;
  519. var isTotalPNT = false;
  520. if(grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("wlpnt")).isNumber()) {
  521. totalpnt += parseInt(grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("wlpnt")));
  522. isTotalPNT = true;
  523. }
  524. if(grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("bmipnt")).isNumber()) {
  525. totalpnt += parseInt(grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("bmipnt")));
  526. isTotalPNT = true;
  527. }
  528. if(grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("appnt")).isNumber()) {
  529. totalpnt += parseInt(grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("appnt")));
  530. isTotalPNT = true;
  531. }
  532. if(grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("gipnt")).isNumber()) {
  533. totalpnt += parseInt(grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("gipnt")));
  534. isTotalPNT = true;
  535. }
  536. if(grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("stpnt")).isNumber()) {
  537. totalpnt += parseInt(grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("stpnt")));
  538. isTotalPNT = true;
  539. }
  540. if(grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("atpnt")).isNumber()) {
  541. totalpnt += parseInt(grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("atpnt")));
  542. isTotalPNT = true;
  543. }
  544. if(grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("dtpnt")).isNumber()) {
  545. totalpnt += parseInt(grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("dtpnt")));
  546. isTotalPNT = true;
  547. }
  548. if(grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("agepnt")).isNumber()) {
  549. totalpnt += parseInt(grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("agepnt")));
  550. isTotalPNT = true;
  551. }
  552. // 그리드에 데이터가 존재 할경우만 처리
  553. if(gridRows > fixedRows) {
  554. if(0 <= totalpnt && totalpnt <=2) {
  555. srchrslt = 2; // 저위험도
  556. } else if(3 <= totalpnt && totalpnt <=5) {
  557. srchrslt = 3; // 중위험도
  558. } else if(6 <= totalpnt) {
  559. srchrslt = 4; // 고위험도
  560. } else {
  561. // 에러!!!
  562. }
  563. if(isTotalPNT) {
  564. grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("totalpnt")) = totalpnt; // 그리드 항목의 Total
  565. grd_pastnutrsrch.valueMatrix(gridRow, grd_pastnutrsrch.colRef("srchrslt")) = srchrslt; // 그리드 항목의 검색결과
  566. }
  567. for(var i = fixedRows; i < gridRows; ++i) {
  568. if(grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("srchrslt")).isNumber()) {
  569. srchrslt = parseInt(grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("srchrslt")));
  570. if(srchrslt == 1) {
  571. ++good; // 양호
  572. } else if(srchrslt == 2) {
  573. ++low; // 저위험도
  574. } else if(srchrslt == 3) {
  575. ++mid; // 중위험도
  576. } else if(srchrslt == 4) {
  577. ++high; // 고위험도
  578. } else {
  579. // 에러!!!
  580. ++non;
  581. }
  582. ++total;
  583. }
  584. } // end of for.
  585. if(total > 0) {
  586. model.makeValue("/root/main/pastsrchrslt/count/good", good);
  587. model.makeValue("/root/main/pastsrchrslt/count/low", low);
  588. model.makeValue("/root/main/pastsrchrslt/count/mid", mid);
  589. model.makeValue("/root/main/pastsrchrslt/count/high", high);
  590. model.makeValue("/root/main/pastsrchrslt/count/non", non);
  591. model.makeValue("/root/main/pastsrchrslt/count/total", total);
  592. }
  593. }
  594. model.refresh();
  595. }
  596. function finit() {
  597. // 화면open시 공통코드 setting
  598. //zbcfGetCodeList( new Array( "A0058", "P0149", "P0160" ), new Array( "/root/init/basecode/dngr", "/root/init/basecode/orddept", "/root/init/basecode/ward" ) );
  599. zbcfGetCodeList( new Array( "A0058" ), new Array( "/root/init/basecode/dngr" ) );
  600. model.copyNode("/root/init/basecode/dngrcopy", "/root/init/basecode/dngr");
  601. model.removenode("/root/init/basecode/dngrcopy/A0058[2]"); // 양호 삭제
  602. model.removenode("/root/init/basecode/dngrcopy/A0058[5]"); // 판정불가 삭제
  603. zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), 'orduseyn', 'D', '/root/init/basecode/orddept');
  604. astfAddCombo("/root/init/basecode/orddept","dept","deptcd,depthngnm",",");
  605. //zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), 'orduseyn', 'W', '/root/init/basecode/ward', 'depthngnm', 'asc', new Date().getDateFormat("YYYYMMDD"), "", 'after');
  606. zsdfGetWardDeptList(getUserInfo("dutplceinstcd"), '/root/init/basecode/ward', 'depthngnm', 'asc', new Date().getDateFormat("YYYYMMDD"), 'after');
  607. // model.resetInstanceNode("/root/main/data");
  608. model.resetInstanceNode("/root/send");
  609. model.removeNodeset("/root/main/srchrslt");
  610. model.removeNodeset("/root/main/pastsrchrslt");
  611. //model.setFocus("ipt_pid");
  612. model.setValue("/root/send/searchitem/basedd", getCurrentDate());
  613. model.setValue("/root/send/pastsearchitem/fromdd", getCurrentDate());
  614. model.setValue("/root/send/pastsearchitem/todd", getCurrentDate());
  615. model.setValue("/root/send/statssearchitem/fromdd", getCurrentDate());
  616. model.setValue("/root/send/statssearchitem/todd", getCurrentDate());
  617. model.setValue("/root/send/searchitem/patflag", "F");
  618. model.setValue("/root/send/pastsearchitem/patflag", "F");
  619. model.setValue("/root/send/pastsearchitem/dngrflag", "4");
  620. model.setValue("/root/send/statssearchitem/patflag", "H");
  621. chk_ward.attribute("visibility")="hidden";
  622. btn_pastnutrsrch.dispatch("DOMActivate"); //영양검색결과조회 탭화면 선택
  623. btn_pastnutrsrch.selected = true;
  624. submit("TRANC00102"); //영양판정기준표 조회
  625. }
  626. ]]>
  627. </script>
  628. <submission id="TRANC00151" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main/srchrslt"/>
  629. <submission id="TRANC00156" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/pastsearchitem" resultref="/root/main/pastsrchrslt"/>
  630. <submission id="TXANC00152" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" resultref="/root/temp"/>
  631. <bind id="fsumTotalPNT" ref="/root/main/pastsrchrslt/data/totalpnt" script="fsumTotalPNT();"/>
  632. <submission id="TXANC00153" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" resultref="/root/temp/singrslt"/>
  633. <submission id="TXANC00357" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data/careplan" resultref="/root/hidden/msglist"/>
  634. </model>
  635. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  636. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  637. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  638. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  639. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  640. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  641. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  642. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  643. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  644. <script type="javascript" src="../../../emr/carecomweb/js/ENRSignEngine.js"/>
  645. </xhtml:head>
  646. <xhtml:body guideline="1,1194;2,734;" style="margin-left:0; margin-top:0; margin-right:0; margin-bottom:0; ">
  647. <group id="grp_tle" style="left:0px; top:0px; width:1194px; height:13px; ">
  648. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:216px; height:14px; ">영양검색결과</caption>
  649. </group>
  650. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1194px; height:744px; ">
  651. <switch id="swt_nutrsrchrslt" style="left:0px; top:26px; width:1194px; height:718px; ">
  652. <case id="case1">
  653. <group id="grp_sea" style="left:5px; top:10px; width:1182px; height:35px; vertical-align:top; ">
  654. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1182px; height:35px; background-color:#fffbf2; "/>
  655. <button id="btn_search1" class="btn1_letter2" style="left:1106px; top:7px; width:56px; height:22px; ">
  656. <caption>조회</caption>
  657. <script type="javascript" ev:event="DOMActivate">
  658. <![CDATA[
  659. if (chk_ward.attribute("visibility")=="visible") {
  660. chk_ward.attribute("visibility")="hidden";
  661. }
  662. grd_nutrsrch.fixedcellischeck(0,1) = false; //영양검색 탭화면 전체선택 체크박스 초기화
  663. submit("TRANC00151");
  664. //신환(F) or 재검색(I) 구분값 setting
  665. var patflag = model.getValue("/root/send/searchitem/patflag");
  666. for ( i=1; i<grd_nutrsrch.rows-1; i++) {
  667. var irow = i + 1;
  668. model.setValue("/root/main/srchrslt/data[" + i + "]/h_patflag", patflag);
  669. }
  670. grd_nutrsrch.refresh();
  671. //조회조건중 병동 컬럼 clear
  672. model.resetInstanceNode("/root/send/searchitem/ward");
  673. model.resetInstanceNode("/root/send/searchitem/optward");
  674. opt_ward.refresh();
  675. chk_ward.refresh();
  676. ]]>
  677. </script>
  678. </button>
  679. <line id="line13" class="line_4" style="x1:1092px; y1:7px; x2:1092px; y2:29px; "/>
  680. <caption id="caption2" class="search_name" style="left:25px; top:9px; width:86px; height:17px; ">기준일자 :</caption>
  681. <input id="ipt_basedd" ref="/root/send/searchitem/basedd" class="input_s_essential" inputtype="date" style="left:112px; top:8px; width:93px; height:19px; "/>
  682. <button id="btn_beforedd" class="icon_pre" style="left:210px; top:10px; width:13px; height:15px; ">
  683. <caption/>
  684. <script type="javascript" ev:event="onclick">
  685. <![CDATA[
  686. var dd = model.getValue("/root/send/searchitem/basedd");
  687. dd = dd.toDate().getAddDate(-1, "D");
  688. dd = dd.getDateFormat();
  689. model.setValue("/root/send/searchitem/basedd", dd);
  690. model.refresh();
  691. ]]>
  692. </script>
  693. </button>
  694. <button id="btn_nextdd" class="icon_next" style="left:225px; top:10px; width:13px; height:15px; ">
  695. <caption/>
  696. <script type="javascript" ev:event="onclick">
  697. <![CDATA[
  698. var dd = model.getValue("/root/send/searchitem/basedd");
  699. dd = dd.toDate().getAddDate(1, "D");
  700. dd = dd.getDateFormat();
  701. model.setValue("/root/send/searchitem/basedd", dd);
  702. model.refresh();
  703. ]]>
  704. </script>
  705. </button>
  706. <caption id="caption9" class="search_name" style="left:665px; top:9px; width:73px; height:17px; ">진료과 :</caption>
  707. <select1 id="cmb_orddept1" ref="/root/send/searchitem/orddept" class="combo_search" appearance="minimal" style="left:740px; top:8px; width:100px; height:19px; ">
  708. <choices>
  709. <itemset nodeset="/root/init/basecode/orddept/dept">
  710. <label ref="depthngnm"/>
  711. <value ref="deptcd"/>
  712. </itemset>
  713. </choices>
  714. </select1>
  715. <caption id="caption14" class="search_name" style="left:875px; top:9px; width:60px; height:17px; ">병동 :</caption>
  716. <output id="opt_ward" ref="/root/send/searchitem/optward" class="output_search" style="left:935px; top:8px; width:140px; height:19px; ">
  717. <script type="javascript" ev:event="onclick">
  718. <![CDATA[
  719. if (chk_ward.attribute("visibility")=="hidden") {
  720. chk_ward.attribute("visibility")="visible";
  721. } else if (chk_ward.attribute("visibility")=="visible") {
  722. chk_ward.attribute("visibility")="hidden";
  723. }
  724. ]]>
  725. </script>
  726. </output>
  727. <select1 id="rdo_patflag1" ref="/root/send/searchitem/patflag" appearance="full" cellspacing="6" cols="2" overflow="visible" style="left:325px; top:9px; width:115px; height:20px; border-style:none; ">
  728. <choices>
  729. <item>
  730. <label>재검색</label>
  731. <value>I</value>
  732. </item>
  733. <item>
  734. <label>신환</label>
  735. <value>F</value>
  736. </item>
  737. </choices>
  738. <script type="javascript" ev:event="onclick">
  739. <![CDATA[
  740. model.resetInstanceNode("/root/send/searchitem/dngrflag");
  741. cmb_dngrflag1.refresh();
  742. ]]>
  743. </script>
  744. </select1>
  745. <caption id="caption4" class="search_name" style="left:265px; top:9px; width:73px; height:17px; ">구분 :</caption>
  746. <caption id="caption1" class="search_name" style="left:470px; top:9px; width:73px; height:17px; ">위험군 :</caption>
  747. <select1 id="cmb_dngrflag1" ref="/root/send/searchitem/dngrflag" class="combo_search" appearance="minimal" style="left:543px; top:8px; width:82px; height:19px; ">
  748. <choices>
  749. <itemset nodeset="/root/init/basecode/dngrcopy/A0058">
  750. <label ref="cdnm"/>
  751. <value ref="cdid"/>
  752. </itemset>
  753. </choices>
  754. </select1>
  755. </group>
  756. <button id="btn_excel1" class="btn2_letter2" style="left:1146px; top:50px; width:42px; height:19px; ">
  757. <caption>엑셀</caption>
  758. <script type="javascript" ev:event="DOMActivate">
  759. <![CDATA[
  760. var filename = window.fileDialog("save", ",", false, "NutrSrchRslt_list", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  761. if (filename != "") {
  762. grd_nutrsrch.saveExcel(filename, "grd_nutrsrch", true, false, "", "", "");
  763. }
  764. ]]>
  765. </script>
  766. </button>
  767. <button id="btn_nutrjudgbase" class="btn2_letter6" style="left:990px; top:50px; width:86px; height:19px; ">
  768. <caption>영양판정기준</caption>
  769. <script type="javascript" ev:event="onclick">
  770. <![CDATA[
  771. modal("SPANC00250", 0,520,280, "SPANC00250", "", "");
  772. ]]>
  773. </script>
  774. </button>
  775. <button id="btn_insbase" class="btn2_letter4" style="left:1079px; top:50px; width:64px; height:19px; ">
  776. <caption>INS기준</caption>
  777. <script type="javascript" ev:event="onclick">
  778. <![CDATA[
  779. //modal("SPANC00300", 0,100,150, "SPANC00300", "/root/main/nutrjudgbase/data", "/root/main/receivedata");
  780. window.load("SPANC00300_INS기준표.xrw","modal","code", "left:600px; top:50px; width:550px; height:380px;min:hidden;max:hidden;resize:true;");
  781. ]]>
  782. </script>
  783. </button>
  784. <line id="line38" class="line_1" style="x1:5px; y1:74px; x2:1188px; y2:74px; "/>
  785. <datagrid id="grd_nutrsrch" nodeset="/root/main/srchrslt/data" caption="^h_신환구분^h_처방일자^h_생성번호^h_처방상태^h_입원일자^회신여부^병동^병실^h_병동/병실^등록번호^환자명^성별^나이^h_진단코드^진단명^진료과^전문의ID^전문의^식사명^h_키^h_몸무게^WL^BMI^AP^GI^ST^AT^DT^AGE^Total^검색결과^이전결과^이전결과판정일^TRF^INS결과|^h_신환구분^h_처방일자^h_생성번호^h_처방상태^h_입원일자^회신여부^병동^병실^h_병동/병실^등록번호^환자명^성별^나이^h_진단코드^진단명^진료과^전문의ID^전문의^식사명^h_키^h_몸무게^WL^BMI^AP^GI^ST^AT^DT^AGE^Total^검색결과^이전결과^이전결과판정일^(mg/dl)^INS결과" colsep="^" colwidth="20, 10, 10, 10, 10, 10, 55, 100, 50, 10, 58, 70, 33, 33, 10, 190, 80, 10, 60, 160, 10, 10, 32, 34, 33, 39, 36, 31, 36, 43, 46, 62, 62, 66, 53, 57" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:5px; top:80px; width:1182px; height:600px; ">
  786. <col checkvalue="Y,N" ref="check" type="checkbox" style="left:479px; top:43px; width:20px; height:23px; "/>
  787. <col ref="h_patflag" visibility="hidden"/>
  788. <col ref="h_prcpdd" visibility="hidden"/>
  789. <col ref="h_cretno" visibility="hidden"/>
  790. <col ref="h_prcpgenrflag" visibility="hidden"/>
  791. <col ref="h_orddd" visibility="hidden"/>
  792. <col ref="replyn"/>
  793. <col disabled="true" ref="ward" type="combo">
  794. <choices>
  795. <itemset nodeset="/root/init/basecode/ward/dept">
  796. <label ref="depthngnm"/>
  797. <value ref="deptcd"/>
  798. </itemset>
  799. </choices>
  800. </col>
  801. <col ref="room"/>
  802. <col ref="h_wardroom" visibility="hidden"/>
  803. <col ref="pid"/>
  804. <col ref="hngnm"/>
  805. <col ref="sex"/>
  806. <col ref="age" style="left:358px; top:20px; width:36px; height:20px; "/>
  807. <col ref="h_diagcd" visibility="hidden"/>
  808. <col ref="diagnm"/>
  809. <col disabled="true" ref="orddept" type="combo">
  810. <choices>
  811. <itemset nodeset="/root/init/basecode/orddept/dept">
  812. <label ref="depthngnm"/>
  813. <value ref="deptcd"/>
  814. </itemset>
  815. </choices>
  816. </col>
  817. <col ref="orddrid" visibility="hidden"/>
  818. <col ref="atdoct"/>
  819. <col ref="dietnm"/>
  820. <col ref="h_ht" visibility="hidden"/>
  821. <col ref="h_wt" visibility="hidden"/>
  822. <col ref="wlpnt" style="text-align:center; "/>
  823. <col ref="bmipnt" style="text-align:center; "/>
  824. <col ref="appnt" style="text-align:center; "/>
  825. <col ref="gipnt" style="text-align:center; "/>
  826. <col ref="stpnt" style="text-align:center; "/>
  827. <col ref="atpnt" style="text-align:center; "/>
  828. <col ref="dtpnt" style="text-align:center; "/>
  829. <col ref="agepnt" style="text-align:center; "/>
  830. <col ref="totalpnt" style="text-align:center; "/>
  831. <col disabled="true" ref="srchrslt" type="combo">
  832. <choices>
  833. <itemset nodeset="/root/init/basecode/dngr/A0058">
  834. <label ref="cdnm"/>
  835. <value ref="cdid"/>
  836. </itemset>
  837. </choices>
  838. </col>
  839. <col disabled="true" ref="bfrslt" type="combo">
  840. <choices>
  841. <itemset nodeset="/root/init/basecode/dngr/A0058">
  842. <label ref="cdnm"/>
  843. <value ref="cdid"/>
  844. </itemset>
  845. </choices>
  846. </col>
  847. <col ref="bfrsltdd" format="yyyy-mm-dd"/>
  848. <col ref="trf" style="text-align:right; "/>
  849. <col ref="insrslt" style="text-align:center; "/>
  850. <script type="javascript" ev:event="ondblclick">
  851. <![CDATA[
  852. // if ( grd_nutrsrch.isCell(event.target) && grd_nutrsrch.row >= grd_nutrsrch.fixedRows ) {
  853. // // 'R'은 영양검색결과조회 화면임을 뜻하는 구분자임.
  854. // model.setValue("/root/send/popup/flag", "R");
  855. // model.setValue("/root/send/popup/flag2", model.getValue("/root/main/srchrslt/data["+(grd_nutrsrch.row-1)+"]/h_patflag"));
  856. // model.setValue("/root/send/popup/pid", model.getValue("/root/main/srchrslt/data["+(grd_nutrsrch.row-1)+"]/pid"));
  857. // model.setValue("/root/send/popup/hngnm", model.getValue("/root/main/srchrslt/data["+(grd_nutrsrch.row-1)+"]/hngnm"));
  858. // model.setValue("/root/send/popup/orddrid", model.getValue("/root/main/srchrslt/data["+(grd_nutrsrch.row-1)+"]/orddrid"));
  859. // model.setValue("/root/send/popup/reqpsn", model.getValue("/root/main/srchrslt/data["+(grd_nutrsrch.row-1)+"]/atdoct"));
  860. // //model.setValue("/root/send/popup/execprcpuniqno", model.getValue("/root/main/srchrslt/data["+(grd_nutrsrch.row-1)+"]/h_execprcpuniqno"));
  861. // model.setValue("/root/send/popup/h_cretno", model.getValue("/root/main/srchrslt/data["+(grd_nutrsrch.row-1)+"]/h_cretno"));
  862. // model.setValue("/root/send/popup/h_orddeptcd", model.getValue("/root/main/srchrslt/data["+(grd_nutrsrch.row-1)+"]/orddept"));
  863. // model.setValue("/root/send/popup/h_prcpgenrflag", model.getValue("/root/main/srchrslt/data["+(grd_nutrsrch.row-1)+"]/h_prcpgenrflag"));
  864. // model.setValue("/root/send/popup/h_orddd", model.getValue("/root/main/srchrslt/data["+(grd_nutrsrch.row-1)+"]/indd"));
  865. // model.setValue("/root/send/popup/srchdd", getCurrentDate());
  866. // if ( model.getValue("/root/main/srchrslt/data["+(grd_nutrsrch.row-1)+"]/bfrsltdd") == "" ) {
  867. // model.setValue("/root/send/popup/srchdd", getCurrentDate());
  868. // } else {
  869. // model.setValue("/root/send/popup/srchdd", model.getValue("/root/main/srchrslt/data["+(grd_nutrsrch.row-1)+"]/bfrsltdd"));
  870. // }
  871. //
  872. // open("SMANC00300", "","","", "SMANC00300", "/root/send/popup", "/root/main/receivedata");
  873. // }
  874. ]]>
  875. </script>
  876. <hint>
  877. <![CDATA[1. WL( 최근 3개월간 체중감소 ), 2. BMI( 성인:체중/키*키*0.0001, 소아:체중/소아기준표체중*100 ), 3. AP( 식욕상태 ),
  878. 4. GI( 소화기계 장애 ), 5. ST( 배변장애 ), 6. AT( 활동정도 ), 7. DT( 식사처방 ), 8. AGE( 나이 ),
  879. TOTAL( WL + BMI + AP + GI + ST + AT + DT + ATE 의 합계 )]]>
  880. </hint>
  881. </datagrid>
  882. <line id="line4" class="line_2" style="x1:5px; y1:685px; x2:1187px; y2:685px; "/>
  883. <output id="opt_srchrslt1" ref="/root/main/srchrslt/count/good" class="output_fix" style="left:119px; top:689px; width:126px; height:19px; text-align:center; "/>
  884. <output id="opt_srchrslt2" ref="/root/main/srchrslt/count/low" class="output_fix" style="left:310px; top:689px; width:125px; height:19px; text-align:center; "/>
  885. <output id="opt_srchrslt3" ref="/root/main/srchrslt/count/mid" class="output_fix" style="left:502px; top:689px; width:125px; height:19px; text-align:center; "/>
  886. <caption id="caption7" class="cell_1" style="left:5px; top:687px; width:61px; height:23px; vertical-align:middle; ">검색결과</caption>
  887. <caption id="caption8" class="cell_1" style="left:247px; top:687px; width:60px; height:23px; vertical-align:middle; ">저위험도</caption>
  888. <caption id="caption10" class="cell_1" style="left:68px; top:687px; width:48px; height:23px; text-align:center; vertical-align:middle; ">양호</caption>
  889. <caption id="caption11" class="cell_1" style="left:438px; top:687px; width:61px; height:23px; vertical-align:middle; ">중위험도</caption>
  890. <caption id="caption12" class="cell_1" style="left:630px; top:687px; width:61px; height:23px; vertical-align:middle; ">고위험도</caption>
  891. <output id="opt_srchrslt4" ref="/root/main/srchrslt/count/high" class="output_fix" style="left:693px; top:689px; width:120px; height:19px; text-align:center; "/>
  892. <output id="opt_srchrsltsum1" ref="/root/main/srchrslt/count/total" class="output_fix" style="left:1062px; top:689px; width:125px; height:19px; text-align:center; "/>
  893. <caption id="caption3" class="cell_1" style="left:1000px; top:687px; width:61px; height:23px; text-align:center; vertical-align:middle; ">계</caption>
  894. <line id="line5" class="line_3" style="x1:5px; y1:710px; x2:1187px; y2:710px; "/>
  895. <caption id="caption5" class="cell_1" style="left:815px; top:687px; width:61px; height:23px; vertical-align:middle; ">판정불가</caption>
  896. <output id="opt_srchrslt5" ref="/root/main/srchrslt/count/non" class="output_fix" style="left:878px; top:689px; width:120px; height:19px; text-align:center; "/>
  897. </case>
  898. <case id="case2" selected="true">
  899. <group id="group1" style="left:5px; top:10px; width:1182px; height:35px; vertical-align:top; ">
  900. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1182px; height:35px; background-color:#fffbf2; "/>
  901. <button id="btn_search2" class="btn1_letter2" style="left:1106px; top:7px; width:56px; height:22px; ">
  902. <caption>조회</caption>
  903. <script type="javascript" ev:event="DOMActivate">
  904. <![CDATA[
  905. var patflag = model.getValue("/root/send/pastsearchitem/patflag"); // 전체, 재검색, 신환 구분
  906. var fromdd = model.getValue("/root/send/pastsearchitem/fromdd");
  907. var todd = model.getValue("/root/send/pastsearchitem/todd");
  908. if ( getDateInterval(fromdd, todd) < 0 ) {
  909. messageBox("검색 시작일은 종료일보다 클 수", "I004");
  910. return;
  911. } else {
  912. var gridRows = grd_pastnutrsrch.rows;
  913. var fixedRows = grd_pastnutrsrch.fixedRows;
  914. for(var i = fixedRows; i < gridRows; ++i) {
  915. grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("wlpnt")) = "";
  916. grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("bmipnt")) = "";
  917. grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("appnt")) = "";
  918. grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("gipnt")) = "";
  919. grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("stpnt")) = "";
  920. grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("atpnt")) = "";
  921. grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("dtpnt")) = "";
  922. grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("agepnt")) = "";
  923. grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("totalpnt")) = "";
  924. }
  925. grd_pastnutrsrch.fixedcellischeck(0,1) = false; //영양검색결과 탭화면 전체선택 체크박스 초기화
  926. submit("TRANC00156");
  927. }
  928. var fixedRows = grd_pastnutrsrch.fixedRows;
  929. var gridRows = grd_pastnutrsrch.rows;
  930. var srchrslt = 2;
  931. var good = 0;
  932. var low = 0;
  933. var mid = 0;
  934. var high = 0;
  935. var non = 0;
  936. var total = 0;
  937. for(var i = fixedRows; i < gridRows; ++i) {
  938. if(grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("srchrslt")).isNumber()) {
  939. srchrslt = parseInt(grd_pastnutrsrch.valueMatrix(i, grd_pastnutrsrch.colRef("srchrslt")));
  940. if(srchrslt == 1) {
  941. ++good; // 양호
  942. } else if(srchrslt == 2) {
  943. ++low; // 저위험도
  944. } else if(srchrslt == 3) {
  945. ++mid; // 중위험도
  946. } else if(srchrslt == 4) {
  947. ++high; // 고위험도
  948. } else {
  949. // 에러!!!
  950. ++non;
  951. }
  952. ++total;
  953. }
  954. } // end of for.
  955. if(total > 0) {
  956. model.makeValue("/root/main/pastsrchrslt/count/good", good);
  957. model.makeValue("/root/main/pastsrchrslt/count/low", low);
  958. model.makeValue("/root/main/pastsrchrslt/count/mid", mid);
  959. model.makeValue("/root/main/pastsrchrslt/count/high", high);
  960. model.makeValue("/root/main/pastsrchrslt/count/non", non);
  961. model.makeValue("/root/main/pastsrchrslt/count/total", total);
  962. }
  963. // 재검색 여부를 확인 - 재검색 일경우 wl, bmi, ... age 항목이 수정되어야 됨.
  964. if(patflag == "I") {
  965. model.makeValue("/root/temp/patflagyn", "Y");
  966. } else {
  967. model.makeValue("/root/temp/patflagyn", "N");
  968. }
  969. model.refresh();
  970. ]]>
  971. </script>
  972. </button>
  973. <line id="line1" class="line_4" style="x1:1092px; y1:7px; x2:1092px; y2:29px; "/>
  974. <caption id="caption13" class="search_name" style="left:30px; top:9px; width:86px; height:17px; ">검색일자 :</caption>
  975. <input id="ipt_fromdd" ref="/root/send/pastsearchitem/fromdd" class="input_s_essential" inputtype="date" style="left:117px; top:8px; width:93px; height:19px; "/>
  976. <caption id="caption16" class="search_name" style="left:860px; top:9px; width:60px; height:17px; ">병동 :</caption>
  977. <select1 id="cmb_ward2" ref="/root/send/pastsearchitem/ward" class="combo_s_essential" appearance="minimal" style="left:920px; top:8px; width:150px; height:19px; ">
  978. <choices>
  979. <itemset nodeset="/root/init/basecode/ward/dept">
  980. <label ref="depthngnm"/>
  981. <value ref="deptcd"/>
  982. </itemset>
  983. </choices>
  984. </select1>
  985. <select1 id="rdo_patflag2" ref="/root/send/pastsearchitem/patflag" appearance="full" cellspacing="6" cols="3" overflow="visible" style="left:435px; top:9px; width:160px; height:20px; border-style:none; ">
  986. <choices>
  987. <item>
  988. <label>재검색</label>
  989. <value>I</value>
  990. </item>
  991. <item>
  992. <label>신환</label>
  993. <value>F</value>
  994. </item>
  995. </choices>
  996. </select1>
  997. <caption id="caption17" class="search_name" style="left:375px; top:9px; width:73px; height:17px; ">구분 :</caption>
  998. <caption id="caption18" class="search_no_b" style="left:215px; top:10px; width:12px; height:17px; ">~</caption>
  999. <input id="ipt_todd" ref="/root/send/pastsearchitem/todd" class="input_s_essential" inputtype="date" style="left:230px; top:8px; width:93px; height:19px; "/>
  1000. <caption id="caption19" class="search_name" style="left:645px; top:9px; width:73px; height:17px; ">위험군 :</caption>
  1001. <select1 id="cmb_dngrflag2" ref="/root/send/pastsearchitem/dngrflag" class="combo_search" appearance="minimal" style="left:718px; top:8px; width:82px; height:19px; ">
  1002. <choices>
  1003. <itemset nodeset="/root/init/basecode/dngrcopy/A0058">
  1004. <label ref="cdnm"/>
  1005. <value ref="cdid"/>
  1006. </itemset>
  1007. </choices>
  1008. </select1>
  1009. </group>
  1010. <button id="btn_excel2" class="btn2_letter2" style="left:1146px; top:50px; width:42px; height:19px; ">
  1011. <caption>엑셀</caption>
  1012. <script type="javascript" ev:event="DOMActivate">
  1013. <![CDATA[
  1014. var filename = window.fileDialog("save", ",", false, "PastNutrSrchRslt_list", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  1015. if (filename != "") {
  1016. grd_pastnutrsrch.saveExcel(filename, "grd_pastnutrsrch", true, false, "", "", "");
  1017. }
  1018. ]]>
  1019. </script>
  1020. </button>
  1021. <line id="line2" class="line_1" style="x1:5px; y1:74px; x2:1188px; y2:74px; "/>
  1022. <datagrid id="grd_pastnutrsrch" nodeset="/root/main/pastsrchrslt/data" caption="고지^고지여부^회신여부^검색일자^신환구분^입원일자^병동^병실^등록번호^환자명^성별^나이^진단명^진료과^전문의^식사명^WL^BMI^AP^GI^ST^AT^DT^AGE^Total^검색결과^이전결과^이전결과판정일^TRF^INS결과^비고^서명번호^입원, 외래구분^생성번호^전문의ID|고지^고지여부^회신여부^검색일자^신환구분^입원일자^병동^병실^등록번호^환자명^성별^나이^진단명^진료과^전문의^식사명^WL^BMI^AP^GI^ST^AT^DT^AGE^Total^검색결과^이전결과^이전결과판정일^(mg/dl)^INS결과^비고^서명번호^입원, 외래구분^생성번호^전문의ID" colsep="^" colwidth="46, 58, 55, 70, 55, 70, 100, 50, 75, 70, 32, 32, 190, 90, 70, 170, 29, 30, 28, 30, 31, 28, 30, 46, 47, 60, 60, 68, 55, 60, 120, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:5px; top:80px; width:1182px; height:600px; ">
  1023. <col ref="check" type="checkbox"/>
  1024. <col ref="signyn" style="text-align:center; "/>
  1025. <col ref="replyn"/>
  1026. <col ref="srchdd" format="yyyy-mm-dd"/>
  1027. <col disabled="true" ref="patflag" type="combo">
  1028. <choices>
  1029. <item>
  1030. <label>재검색</label>
  1031. <value>I</value>
  1032. </item>
  1033. <item>
  1034. <label>신환</label>
  1035. <value>F</value>
  1036. </item>
  1037. </choices>
  1038. </col>
  1039. <col ref="orddd" format="yyyy-mm-dd"/>
  1040. <col disabled="true" ref="ward" type="combo">
  1041. <choices>
  1042. <itemset nodeset="/root/init/basecode/ward/dept">
  1043. <label ref="depthngnm"/>
  1044. <value ref="deptcd"/>
  1045. </itemset>
  1046. </choices>
  1047. </col>
  1048. <col ref="room"/>
  1049. <col ref="pid"/>
  1050. <col ref="hngnm"/>
  1051. <col ref="sex"/>
  1052. <col ref="age" style="left:358px; top:20px; width:36px; height:20px; "/>
  1053. <col ref="diagnm"/>
  1054. <col disabled="true" ref="orddept" type="combo">
  1055. <choices>
  1056. <itemset nodeset="/root/init/basecode/orddept/dept">
  1057. <label ref="depthngnm"/>
  1058. <value ref="deptcd"/>
  1059. </itemset>
  1060. </choices>
  1061. </col>
  1062. <col ref="atdoct"/>
  1063. <col ref="dietnm"/>
  1064. <col disabled="true" ref="wlpnt" type="input" style="text-align:center; "/>
  1065. <col disabled="true" ref="bmipnt" type="input" style="text-align:center; "/>
  1066. <col disabled="true" ref="appnt" type="input" style="text-align:center; "/>
  1067. <col disabled="true" ref="gipnt" type="input" style="text-align:center; "/>
  1068. <col disabled="true" ref="stpnt" type="input" style="text-align:center; "/>
  1069. <col disabled="true" ref="atpnt" type="input" style="text-align:center; "/>
  1070. <col disabled="true" ref="dtpnt" type="input" style="text-align:center; "/>
  1071. <col disabled="true" ref="agepnt" type="input" style="text-align:center; "/>
  1072. <col disabled="true" ref="totalpnt" type="output" style="text-align:center; "/>
  1073. <col disabled="true" ref="srchrslt" type="combo">
  1074. <choices>
  1075. <itemset nodeset="/root/init/basecode/dngr/A0058">
  1076. <label ref="cdnm"/>
  1077. <value ref="cdid"/>
  1078. </itemset>
  1079. </choices>
  1080. </col>
  1081. <col disabled="true" ref="bfrslt" type="combo">
  1082. <choices>
  1083. <itemset nodeset="/root/init/basecode/dngr/A0058">
  1084. <label ref="cdnm"/>
  1085. <value ref="cdid"/>
  1086. </itemset>
  1087. </choices>
  1088. </col>
  1089. <col ref="bfrsltdd" format="yyyy-mm-dd"/>
  1090. <col ref="trf" style="text-align:right; "/>
  1091. <col ref="insrslt" style="text-align:center; "/>
  1092. <col ref="rem" type="input"/>
  1093. <col ref="h_signno" visibility="hidden"/>
  1094. <col ref="prcpgenrflag" visibility="hidden"/>
  1095. <col ref="cretno" visibility="hidden"/>
  1096. <col ref="orddrid" visibility="hidden"/>
  1097. <script type="javascript" ev:event="ondblclick">
  1098. <![CDATA[
  1099. if ( grd_pastnutrsrch.isCell(event.target) && grd_pastnutrsrch.row >= grd_pastnutrsrch.fixedRows ) {
  1100. // 'R'은 영양검색결과조회 화면임을 뜻하는 구분자임.
  1101. model.setValue("/root/send/popup/flag", "R");
  1102. model.setValue("/root/send/popup/flag2", model.getValue("/root/main/pastsrchrslt/data["+(grd_pastnutrsrch.row-1)+"]/patflag"));
  1103. model.setValue("/root/send/popup/pid", model.getValue("/root/main/pastsrchrslt/data["+(grd_pastnutrsrch.row-1)+"]/pid"));
  1104. model.setValue("/root/send/popup/hngnm", model.getValue("/root/main/pastsrchrslt/data["+(grd_pastnutrsrch.row-1)+"]/hngnm"));
  1105. model.setValue("/root/send/popup/orddrid", model.getValue("/root/main/pastsrchrslt/data["+(grd_pastnutrsrch.row-1)+"]/orddrid"));
  1106. model.setValue("/root/send/popup/reqpsn", model.getValue("/root/main/pastsrchrslt/data["+(grd_pastnutrsrch.row-1)+"]/atdoct"));
  1107. model.setValue("/root/send/popup/h_cretno", model.getValue("/root/main/pastsrchrslt/data["+(grd_pastnutrsrch.row-1)+"]/cretno"));
  1108. model.setValue("/root/send/popup/h_orddeptcd", model.getValue("/root/main/pastsrchrslt/data["+(grd_pastnutrsrch.row-1)+"]/orddept"));
  1109. model.setValue("/root/send/popup/h_prcpgenrflag", model.getValue("/root/main/pastsrchrslt/data["+(grd_pastnutrsrch.row-1)+"]/prcpgenrflag"));
  1110. model.setValue("/root/send/popup/h_orddd", model.getValue("/root/main/pastsrchrslt/data["+(grd_pastnutrsrch.row-1)+"]/orddd"));
  1111. model.setValue("/root/send/popup/srchdd", model.getValue("/root/main/pastsrchrslt/data["+(grd_pastnutrsrch.row-1)+"]/srchdd"));
  1112. open("SMANC00350", "","","", "SMANC00350", "/root/send/popup", "/root/main/receivedata");
  1113. }
  1114. ]]>
  1115. </script>
  1116. <script type="javascript" ev:event="onclick">
  1117. <![CDATA[
  1118. var patflag = model.getValue("/root/send/pastsearchitem/patflag"); // 신환, 재검색 구분
  1119. var patflagyn = model.getValue("/root/temp/patflagyn"); // 신환, 재검색 선택 여부( 'Y' 재검색, 'N' 신환 )
  1120. var fixedRows = grd_pastnutrsrch.fixedRows;
  1121. var gridRows = grd_pastnutrsrch.rows;
  1122. var totalpnt = 0;
  1123. if(patflag == "I" && patflagyn == "Y") {
  1124. for(var i = fixedRows; i < gridRows; ++i) {
  1125. grd_pastnutrsrch.cellAttribute("disabled", i, grd_pastnutrsrch.colRef("wlpnt")) = "false";
  1126. grd_pastnutrsrch.cellAttribute("disabled", i, grd_pastnutrsrch.colRef("bmipnt")) = "false";
  1127. grd_pastnutrsrch.cellAttribute("disabled", i, grd_pastnutrsrch.colRef("appnt")) = "false";
  1128. grd_pastnutrsrch.cellAttribute("disabled", i, grd_pastnutrsrch.colRef("gipnt")) = "false";
  1129. grd_pastnutrsrch.cellAttribute("disabled", i, grd_pastnutrsrch.colRef("stpnt")) = "false";
  1130. grd_pastnutrsrch.cellAttribute("disabled", i, grd_pastnutrsrch.colRef("atpnt")) = "false";
  1131. grd_pastnutrsrch.cellAttribute("disabled", i, grd_pastnutrsrch.colRef("dtpnt")) = "false";
  1132. grd_pastnutrsrch.cellAttribute("disabled", i, grd_pastnutrsrch.colRef("agepnt")) = "false";
  1133. }
  1134. } else {
  1135. for(var i = fixedRows; i < gridRows; ++i) {
  1136. grd_pastnutrsrch.cellAttribute("disabled", i, grd_pastnutrsrch.colRef("wlpnt")) = "true";
  1137. grd_pastnutrsrch.cellAttribute("disabled", i, grd_pastnutrsrch.colRef("bmipnt")) = "true";
  1138. grd_pastnutrsrch.cellAttribute("disabled", i, grd_pastnutrsrch.colRef("appnt")) = "true";
  1139. grd_pastnutrsrch.cellAttribute("disabled", i, grd_pastnutrsrch.colRef("gipnt")) = "true";
  1140. grd_pastnutrsrch.cellAttribute("disabled", i, grd_pastnutrsrch.colRef("stpnt")) = "true";
  1141. grd_pastnutrsrch.cellAttribute("disabled", i, grd_pastnutrsrch.colRef("atpnt")) = "true";
  1142. grd_pastnutrsrch.cellAttribute("disabled", i, grd_pastnutrsrch.colRef("dtpnt")) = "true";
  1143. grd_pastnutrsrch.cellAttribute("disabled", i, grd_pastnutrsrch.colRef("agepnt")) = "true";
  1144. grd_pastnutrsrch.cellAttribute("disabled", i, grd_pastnutrsrch.colRef("totalpnt")) = "true";
  1145. }
  1146. }
  1147. grd_pastnutrsrch.editCell();
  1148. grd_pastnutrsrch.refresh();
  1149. ]]>
  1150. </script>
  1151. <hint>
  1152. <![CDATA[1. WL( 최근 3개월간 체중감소 ), 2. BMI( 성인:체중/키*키*0.0001, 소아:체중/소아기준표체중*100 ), 3. AP( 식욕상태 ),
  1153. 4. GI( 소화기계 장애 ), 5. ST( 배변장애 ), 6. AT( 활동정도 ), 7. DT( 식사처방 ), 8. AGE( 나이 ),
  1154. TOTAL( WL + BMI + AP + GI + ST + AT + DT + ATE 의 합계 )]]>
  1155. </hint>
  1156. </datagrid>
  1157. <line id="line3" class="line_2" style="x1:5px; y1:685px; x2:1187px; y2:685px; "/>
  1158. <output id="opt_srchrslt6" ref="/root/main/pastsrchrslt/count/good" class="output_fix" style="left:118px; top:689px; width:125px; height:19px; text-align:center; "/>
  1159. <output id="opt_srchrslt7" ref="/root/main/pastsrchrslt/count/low" class="output_fix" style="left:308px; top:689px; width:125px; height:19px; text-align:center; "/>
  1160. <output id="opt_srchrslt8" ref="/root/main/pastsrchrslt/count/mid" class="output_fix" style="left:499px; top:689px; width:125px; height:19px; text-align:center; "/>
  1161. <caption id="caption20" class="cell_1" style="left:5px; top:687px; width:61px; height:23px; vertical-align:middle; ">검색결과</caption>
  1162. <caption id="caption21" class="cell_1" style="left:246px; top:687px; width:60px; height:23px; vertical-align:middle; ">저위험도</caption>
  1163. <caption id="caption22" class="cell_1" style="left:68px; top:687px; width:48px; height:23px; text-align:center; vertical-align:middle; ">양호</caption>
  1164. <caption id="caption23" class="cell_1" style="left:436px; top:687px; width:61px; height:23px; vertical-align:middle; ">중위험도</caption>
  1165. <caption id="caption24" class="cell_1" style="left:627px; top:687px; width:61px; height:23px; vertical-align:middle; ">고위험도</caption>
  1166. <output id="opt_srchrslt9" ref="/root/main/pastsrchrslt/count/high" class="output_fix" style="left:690px; top:689px; width:125px; height:19px; text-align:center; "/>
  1167. <output id="opt_srchrsltsum2" ref="/root/main/pastsrchrslt/count/total" class="output_fix" style="left:1070px; top:689px; width:117px; height:19px; text-align:center; "/>
  1168. <caption id="caption25" class="cell_1" style="left:1008px; top:687px; width:61px; height:23px; text-align:center; vertical-align:middle; ">계</caption>
  1169. <line id="line6" class="line_3" style="x1:5px; y1:710px; x2:1187px; y2:710px; "/>
  1170. <output id="opt_srchrslt10" ref="/root/main/pastsrchrslt/count/non" class="output_fix" style="left:880px; top:689px; width:125px; height:19px; text-align:center; "/>
  1171. <caption id="caption15" class="cell_1" style="left:817px; top:687px; width:61px; height:23px; vertical-align:middle; ">판정불가</caption>
  1172. </case>
  1173. <case id="case3">
  1174. <group id="group2" style="left:5px; top:10px; width:1182px; height:35px; vertical-align:top; ">
  1175. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1182px; height:35px; background-color:#fffbf2; "/>
  1176. <button id="btn_search3" class="btn1_letter2" style="left:1106px; top:7px; width:56px; height:22px; ">
  1177. <caption>조회</caption>
  1178. <script type="javascript" ev:event="DOMActivate">
  1179. <![CDATA[
  1180. var fromdd = model.getValue("/root/send/statssearchitem/fromdd");
  1181. var todd = model.getValue("/root/send/statssearchitem/todd");
  1182. //var ward = model.getValue("/root/send/searchitem/ward");
  1183. if ( getDateInterval(fromdd, todd) < 0 ) {
  1184. messageBox("검색 시작일은 종료일보다 클 수", "I004");
  1185. return;
  1186. } else {
  1187. if (submit("TRANC00157")) {
  1188. //조회후 그리드 하단에 합계 구하기
  1189. //grd_nutrsrchstats.subtotal("clear", -1, 4, "", "", "", "");
  1190. grd_nutrsrchstats.subtotalPosition = "below";
  1191. for (var i = 2; i <= 13; i ++){
  1192. grd_nutrsrchstats.subtotal("sum", -1, i, "#,###", "", 1, "합 계 ");
  1193. }
  1194. grd_nutrsrchstats.refresh();
  1195. }
  1196. }
  1197. ]]>
  1198. </script>
  1199. </button>
  1200. <line id="line7" class="line_4" style="x1:1092px; y1:7px; x2:1092px; y2:29px; "/>
  1201. <caption id="caption26" class="search_name" style="left:10px; top:9px; width:86px; height:17px; ">검색일자 :</caption>
  1202. <input id="ipt_fromdd3" ref="/root/send/statssearchitem/fromdd" class="input_s_essential" inputtype="date" style="left:97px; top:8px; width:93px; height:19px; "/>
  1203. <caption id="caption27" class="search_name" style="left:720px; top:9px; width:73px; height:17px; ">진료과 :</caption>
  1204. <select1 id="cmb_orddept3" ref="/root/send/statssearchitem/orddept" class="combo_search" appearance="minimal" style="left:795px; top:8px; width:95px; height:19px; ">
  1205. <choices>
  1206. <itemset nodeset="/root/init/basecode/orddept/dept">
  1207. <label ref="depthngnm"/>
  1208. <value ref="deptcd"/>
  1209. </itemset>
  1210. </choices>
  1211. </select1>
  1212. <caption id="caption28" class="search_name" style="left:910px; top:9px; width:60px; height:17px; ">병동 :</caption>
  1213. <select1 id="cmb_ward3" ref="/root/send/statssearchitem/ward" class="combo_s_essential" appearance="minimal" style="left:970px; top:8px; width:105px; height:19px; ">
  1214. <choices>
  1215. <itemset nodeset="/root/init/basecode/ward/dept">
  1216. <label ref="depthngnm"/>
  1217. <value ref="deptcd"/>
  1218. </itemset>
  1219. </choices>
  1220. </select1>
  1221. <select1 id="rdo_patflag3" ref="/root/send/statssearchitem/patflag" appearance="full" cellspacing="4" cols="3" overflow="visible" style="left:380px; top:9px; width:160px; height:20px; border-style:none; ">
  1222. <choices>
  1223. <item>
  1224. <label>전체</label>
  1225. <value>H</value>
  1226. </item>
  1227. <item>
  1228. <label>재검색</label>
  1229. <value>I</value>
  1230. </item>
  1231. <item>
  1232. <label>신환</label>
  1233. <value>F</value>
  1234. </item>
  1235. </choices>
  1236. </select1>
  1237. <caption id="caption29" class="search_name" style="left:320px; top:9px; width:73px; height:17px; ">구분 :</caption>
  1238. <caption id="caption30" class="search_no_b" style="left:195px; top:10px; width:12px; height:17px; ">~</caption>
  1239. <input id="ipt_todd3" ref="/root/send/statssearchitem/todd" class="input_s_essential" inputtype="date" style="left:210px; top:8px; width:93px; height:19px; "/>
  1240. <caption id="caption31" class="search_name" style="left:550px; top:9px; width:73px; height:17px; ">위험군 :</caption>
  1241. <select1 id="cmb_dngrflag3" ref="/root/send/statssearchitem/dngrflag" class="combo_search" appearance="minimal" style="left:623px; top:8px; width:75px; height:19px; ">
  1242. <choices>
  1243. <itemset nodeset="/root/init/basecode/dngr/A0058">
  1244. <label ref="cdnm"/>
  1245. <value ref="cdid"/>
  1246. </itemset>
  1247. </choices>
  1248. </select1>
  1249. </group>
  1250. <button id="btn_excel3" class="btn2_letter2" style="left:1146px; top:50px; width:42px; height:19px; ">
  1251. <caption>엑셀</caption>
  1252. <script type="javascript" ev:event="DOMActivate">
  1253. <![CDATA[
  1254. var filename = window.fileDialog("save", ",", false, "NutrSrchRsltStats_list", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  1255. if (filename != "") {
  1256. grd_nutrsrchstats.saveExcel(filename, "grd_nutrsrchstats", true, false, "", "", "");
  1257. }
  1258. ]]>
  1259. </script>
  1260. </button>
  1261. <line id="line8" class="line_1" style="x1:5px; y1:74px; x2:1188px; y2:74px; "/>
  1262. <datagrid id="grd_nutrsrchstats" nodeset="/root/main/srchstats/data" caption="검색일자^신환^신환^신환^신환^신환^신환^재검색^재검색^재검색^재검색^재검색^재검색|검색일자^양호^저위험도^중위헙도^고위험도^판정불가^합계^양호^저위험도^중위험도^고위험도^판정불가^합계" colsep="^" colwidth="100, 65, 65, 67, 72, 70, 88, 65, 65, 76, 71, 72, 77" dataheight="25" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:5px; top:80px; width:1182px; height:629px; text-align:center; ">
  1263. <col ref="srchdd" format="yyyy-mm-dd" style="left:20px; top:43px; width:100px; height:23px; "/>
  1264. <col ref="good1"/>
  1265. <col ref="low1"/>
  1266. <col ref="mid1"/>
  1267. <col ref="high1"/>
  1268. <col ref="non1"/>
  1269. <col ref="total1"/>
  1270. <col ref="good2"/>
  1271. <col ref="low2"/>
  1272. <col ref="mid2"/>
  1273. <col ref="high2"/>
  1274. <col ref="non2"/>
  1275. <col ref="total2"/>
  1276. </datagrid>
  1277. </case>
  1278. </switch>
  1279. <button id="btn_nutrsrch" class="btn_sw" group="tab" selected="true" style="left:0px; top:5px; width:89px; height:22px; ">
  1280. <caption>영양검색</caption>
  1281. <script type="javascript" ev:event="DOMActivate">
  1282. <![CDATA[
  1283. model.toggle("case1");
  1284. //btn_save.visible = true;
  1285. btn_save.disabled = false;
  1286. btn_signsave.disabled = true;
  1287. btn_signsave.visible = false;
  1288. ]]>
  1289. </script>
  1290. </button>
  1291. <button id="btn_pastnutrsrch" class="btn_sw" group="tab" selected="false" style="left:88px; top:5px; width:125px; height:22px; ">
  1292. <caption>영양검색결과조회</caption>
  1293. <script type="javascript" ev:event="DOMActivate">
  1294. <![CDATA[
  1295. if (chk_ward.attribute("visibility")=="visible") {
  1296. chk_ward.attribute("visibility")="hidden";
  1297. }
  1298. model.toggle("case2");
  1299. btn_save.disabled = false;
  1300. btn_signsave.disabled = false;
  1301. btn_signsave.visible = true;
  1302. ]]>
  1303. </script>
  1304. </button>
  1305. <button id="btn_nutrsrchstats" class="btn_sw" group="tab" selected="false" style="left:212px; top:5px; width:95px; height:22px; ">
  1306. <caption>영양검색통계</caption>
  1307. <script type="javascript" ev:event="DOMActivate">
  1308. <![CDATA[
  1309. if (chk_ward.attribute("visibility")=="visible") {
  1310. chk_ward.attribute("visibility")="hidden";
  1311. }
  1312. model.toggle("case3");
  1313. btn_save.disabled = true;
  1314. btn_signsave.disabled = true;
  1315. btn_signsave.visible = false;
  1316. ]]>
  1317. </script>
  1318. </button>
  1319. </group>
  1320. <group id="grp_btn" style="left:0px; top:757px; width:1194px; height:27px; ">
  1321. <button id="btn_prnt" class="btn6_letter2" visibility="hidden" style="left:0px; top:5px; width:56px; height:22px; ">
  1322. <caption>출력</caption>
  1323. </button>
  1324. <button id="btn_signsave" class="btn4_letter4" style="left:986px; top:5px; width:80px; height:22px; ">
  1325. <caption>인증저장</caption>
  1326. <script type="javascript" ev:event="DOMActivate">
  1327. <![CDATA[
  1328. if ( btn_pastnutrsrch.selected ) {
  1329. var patflag = model.getValue("/root/send/pastsearchitem/patflag"); // 신환, 재검색 구분
  1330. var patflagyn = model.getValue("/root/temp/patflagyn"); // 신환, 재검색 선택 여부( 'Y' 재검색, 'N' 신환 )
  1331. if(messageBox("인증 데이터를", "Q002") == "6") {
  1332. // 신환, 재검색 유무 확인후 저장
  1333. if(patflag == "F" && patflagyn == "N") {
  1334. fCertSave(); // 인증저장 호출
  1335. } else {
  1336. if ( getGridUpdateData(grd_pastnutrsrch) == "" ) {
  1337. messageBox("입력 또는 수정한 데이터가", "I004");
  1338. } else {
  1339. model.setValue("/root/send/data/pastlist", grd_pastnutrsrch.getUpdateData());
  1340. if (submit("TXANC00152")) {
  1341. fCertSave(); // 인증저장 호출
  1342. }
  1343. } // end of if-else.
  1344. }
  1345. }
  1346. }
  1347. ]]>
  1348. </script>
  1349. </button>
  1350. <button id="btn_reset" class="btn4_letter3" style="left:1067px; top:5px; width:68px; height:22px; ">
  1351. <caption>초기화</caption>
  1352. <script type="javascript" ev:event="DOMActivate">
  1353. <![CDATA[
  1354. finit();
  1355. ]]>
  1356. </script>
  1357. </button>
  1358. <button id="btn_save" class="btn4_letter2" style="left:1136px; top:5px; width:56px; height:22px; ">
  1359. <caption>저장</caption>
  1360. <script type="javascript" ev:event="DOMActivate">
  1361. <![CDATA[
  1362. //영양검색 탭화면 일때
  1363. if ( btn_nutrsrch.selected ) {
  1364. //하루에 기준일자를 달리하여 2회이상 재검색할 경우 데이터 중복을 피하기 위해 입원일자를 기준일의 7일전 날짜로 셋팅후 저장한다.
  1365. if ( model.getValue("/root/send/searchitem/patflag") == "I" ) {
  1366. var basedd = model.getValue("/root/send/searchitem/basedd");
  1367. basedd = basedd.toDate().getAddDate(-7, "D");
  1368. basedd = basedd.getDateFormat();
  1369. for ( i=1; i<grd_nutrsrch.rows-1; i++) {
  1370. model.setValue("/root/main/srchrslt/data[" + i + "]/h_orddd", basedd);
  1371. }
  1372. }
  1373. //저장할 데이터를 한건이라도 check했는지 체크
  1374. var nodeList = instance1.selectNodes("/root/main/srchrslt/data[check='Y']");
  1375. var rCSV = getNodeListCSV(nodeList);
  1376. if ( rCSV == null ) {
  1377. messageBox("저장할 데이터를", "C002");
  1378. return;
  1379. }
  1380. if ( messageBox("체크한 데이터를", "Q002") == 6 ) {
  1381. if (btn_nutrsrch.selected) {
  1382. //하루에 기준일자별로 재검색,신환 각 한번씩만 저장 가능
  1383. //오늘날짜에 기준일자에 해당하는 재검색 or 신환 데이터 존재여부를 체크해서 없으면 저장한다.
  1384. submit("TRANC00103");
  1385. var count = model.getValue("/root/temp/count/cnt");
  1386. if ( count > 0 ) {
  1387. var basedd = ipt_basedd.value;
  1388. var patflag = rdo_patflag1.label;
  1389. messageBox(basedd.substr(0,4)+"-"+basedd.substr(4,2)+"-"+basedd.substr(6,2)+" " + patflag + " 데이터를 이미 저장했습니다. 두번 저장", "E001");
  1390. return;
  1391. } else {
  1392. model.setValue("/root/send/data/list", rCSV);
  1393. if (submit("TXANC00151")) {
  1394. btn_search1.dispatch("DOMActivate");
  1395. model.resetInstanceNode("/root/send/data/list");
  1396. }
  1397. }
  1398. }
  1399. } else { return; }
  1400. }
  1401. //과거영양검색조회 탭화면 일때
  1402. else if ( btn_pastnutrsrch.selected ) {
  1403. if ( getGridUpdateData(grd_pastnutrsrch) == "" ) {
  1404. messageBox("입력 또는 수정한 데이터가", "I004");
  1405. } else {
  1406. if ( messageBox("", "Q002") == 6 ) {
  1407. model.setValue("/root/send/data/pastlist", grd_pastnutrsrch.getUpdateData());
  1408. if (submit("TXANC00152")) {
  1409. btn_search2.dispatch("DOMActivate");
  1410. }
  1411. } else { return; }
  1412. }
  1413. }
  1414. ]]>
  1415. </script>
  1416. </button>
  1417. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  1418. </group>
  1419. <select id="chk_ward" ref="/root/send/searchitem/ward" class="checkbox_search" overflow="visible" appearance="full" style="left:940px; top:78px; width:140px; height:15px; background-color:#e5eae9; ">
  1420. <choices>
  1421. <itemset nodeset="/root/init/basecode/ward/dept">
  1422. <label ref="depthngnm"/>
  1423. <value ref="deptcd"/>
  1424. </itemset>
  1425. </choices>
  1426. <script type="javascript" ev:event="onclick">
  1427. <![CDATA[
  1428. model.setValue("/root/send/searchitem/optward", chk_ward.label);
  1429. opt_ward.refresh();
  1430. ]]>
  1431. </script>
  1432. </select>
  1433. </xhtml:body>
  1434. </xhtml:html>