SPMNR05800_SJH.xjs 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Script type="xscript4.0"><![CDATA[
  3. /*
  4. IO조회(SMMNR05800.xfm - JScript )
  5. (SMMNR05800.xjs)
  6. - Version :
  7. 1) : Ver.1.00.01
  8. 2) : Ver.2.00.01
  9. */
  10. var arErrorCode = new HashArray();
  11. var xPathMemoInfo = ds_main_memoinfo_memolist;
  12. var xPathCondInfo = ds_main_cond;
  13. /**
  14. * @group :
  15. * @ver : 2008.07.02 -> 2016.07.26
  16. * @by : 양천덕 -> 김도형 (xp로 UPDATE)
  17. * @---------------------------------------------------
  18. * @type : function
  19. * @access : public
  20. * @desc : 화면 초기화
  21. * @param :
  22. * @return :
  23. * @---------------------------------------------------
  24. */
  25. function fInitialize(){
  26. //ipt_seardd.value = getCurrentDate();
  27. //if(checkOpener()){
  28. /**
  29. SPMNR05700_Param
  30. pid▦indd▦cretno▦wardcd▩ ==> 등록번호▦입원일자▦생성번호▦병동코드▩
  31. **/
  32. var sParamInfo = opener.frmf_getParameter("SPMNR05800_Param");
  33. //var sParamInfo = "pid▦indd▦cretno▦wardcd▦recdd▩18864191▦20080104▦800340900▦3050107000▦20080704▩"
  34. ds_main_cond.setColumn(0, "pid", lf_getArrayData(utlf_transNullToEmpty(sParamInfo),1,0, "▩", "▦"));
  35. ds_main_cond.setColumn(0, "orddd", lf_getArrayData(utlf_transNullToEmpty(sParamInfo),1,1, "▩", "▦"));
  36. ds_main_cond.setColumn(0, "cretno", lf_getArrayData(utlf_transNullToEmpty(sParamInfo),1,2, "▩", "▦"));
  37. ds_main_cond.setColumn(0, "wardcd", lf_getArrayData(utlf_transNullToEmpty(sParamInfo),1,3, "▩", "▦"));
  38. ds_main_cond.setColumn(0, "seardd", lf_getArrayData(utlf_transNullToEmpty(sParamInfo),1,4, "▩", "▦"));
  39. //}
  40. if(utlf_isNull(ds_main_cond.getColumn(0, "seardd")))
  41. {
  42. ipt_seardd.value = utlf_getCurrentDate();
  43. }
  44. opener.frmf_clearParameter("SPMNR05800_Param");
  45. fSearIOInfo();
  46. }
  47. /**
  48. * @group :
  49. * @ver : 2008.07.02 -> 2016.07.26
  50. * @by : 양천덕 -> 김도형 (xp로 UPDATE)
  51. * @---------------------------------------------------
  52. * @type : function
  53. * @access : public
  54. * @desc : IO정보 조회
  55. * @param :
  56. * @return :
  57. * @---------------------------------------------------
  58. */
  59. function fSearIOInfo(){
  60. ds_main_ioinfo_dietprcplist.clearData();
  61. ds_main_ioinfo_iolist.clearData();
  62. ds_main_memoinfo_memolist.clearData();
  63. ds_main_patinfo.clearData();
  64. opt_breakdietprcpnm.value ="";
  65. opt_lunchdietprcpnm.value ="";
  66. opt_dinnerdietprcpnm.value ="";
  67. ds_main_cond.setColumn(0, "seartodd", getDateCalc(ds_main_cond.getColumn(0, "seardd"), 1, "+"));
  68. dsf_makeValue(ds_send, "pid", "string", ds_main_cond.getColumn(0, "pid"));
  69. dsf_makeValue(ds_send, "cretno", "string", ds_main_cond.getColumn(0, "cretno"));
  70. dsf_makeValue(ds_send, "orddd", "string", ds_main_cond.getColumn(0, "orddd"));
  71. dsf_makeValue(ds_send, "seardd", "string", ds_main_cond.getColumn(0, "seardd"));
  72. dsf_makeValue(ds_send, "wardcd", "string", ds_main_cond.getColumn(0, "wardcd"));
  73. dsf_makeValue(ds_send, "seartodd", "string", ds_main_cond.getColumn(0, "seartodd"));
  74. dsf_makeValue(ds_send, "indd", "string", ds_main_cond.getColumn(0, "orddd"));
  75. dsf_makeValue(ds_send, "memoitemflag", "string", "08");
  76. dsf_makeValue(ds_send, "iochkyn", "string", ds_main_cond.getColumn(0, "iochkyn"));
  77. dsf_createDs("ds_main_ioinfo_iolist", [{col: "itemnm", type:"string", size:256}
  78. , {col: "setyn", type:"string", size:256}
  79. , {col: "lnkbizcd", type:"string", size:256}
  80. , {col: "dayrslt", type:"string", size:256}
  81. , {col: "evnrslt", type:"string", size:256}
  82. , {col: "ngtrslt", type:"string", size:256}
  83. , {col: "daycnt", type:"string", size:256}
  84. , {col: "evncnt", type:"string", size:256}
  85. , {col: "ngtcnt", type:"string", size:256}
  86. , {col: "total", type:"string", size:256}
  87. , {col: "lnkrecflag", type:"string", size:256}], true);
  88. //submit("TRMNR05801_SJH");
  89. var oParam = {};
  90. oParam.id = "TRMNR05801_SJH";
  91. oParam.service = "flowchartapp.FlowChartRecMngt";
  92. oParam.method = "reqGetIntakeOutputInfo";
  93. oParam.inds = "req=ds_send";
  94. oParam.outds = "ds_main_ioinfo_dietprcplist=dietprcplist ds_main_ioinfo_iolist=iolist ds_main_memoinfo_memolist=memolist ds_main_patinfo=patinfo";
  95. oParam.async = false;
  96. //oParam.callback = "cf_TRMNR05801_SJH";
  97. tranf_submit(oParam);
  98. if( !utlf_isNull(ds_main_memoinfo_memolist.getColumnInfo("seqno")) ){
  99. dsf_setTypeFormat(ds_main_memoinfo_memolist, "seqno:INT");
  100. }
  101. if( utlf_isNull(ds_main_ioinfo_iolist.getColumnInfo("d_lnkrecflag")) ){
  102. ds_main_ioinfo_iolist.addColumn("d_lnkrecflag", "string");
  103. }
  104. if( utlf_isNull(ds_main_ioinfo_iolist.getColumnInfo("e_lnkrecflag")) ){
  105. ds_main_ioinfo_iolist.addColumn("e_lnkrecflag", "string");
  106. }
  107. if( utlf_isNull(ds_main_ioinfo_iolist.getColumnInfo("n_lnkrecflag")) ){
  108. ds_main_ioinfo_iolist.addColumn("n_lnkrecflag", "string");
  109. }
  110. if( utlf_isNull(ds_main_ioinfo_iolist.getColumnInfo("subtotal")) ){
  111. ds_main_ioinfo_iolist.addColumn("subtotal", "string");
  112. }
  113. for(var i =0; i < ds_main_ioinfo_iolist.rowcount; i++ ){
  114. ds_main_ioinfo_iolist.setColumn(i, "d_lnkrecflag" , ds_main_ioinfo_iolist.getColumn(i, "lnkrecflag"));
  115. ds_main_ioinfo_iolist.setColumn(i, "e_lnkrecflag" , ds_main_ioinfo_iolist.getColumn(i, "lnkrecflag"));
  116. ds_main_ioinfo_iolist.setColumn(i, "n_lnkrecflag" , ds_main_ioinfo_iolist.getColumn(i, "lnkrecflag"));
  117. ds_main_ioinfo_iolist.setColumn(i, "subtotal" , Math.round(ds_main_ioinfo_iolist.getColumn(i, "total"), 2));
  118. }
  119. fSettingPatlnfo(); // 160331_환자정보 추가
  120. fSettingIOlnfo();
  121. //alert(cap_breakdietprcpnm.text);
  122. }
  123. /**
  124. * @group :
  125. * @ver : 2008.07.02
  126. * @by : 양천덕
  127. * @---------------------------------------------------
  128. * @type : function
  129. * @access : public
  130. * @desc : 조회 정보 Setting
  131. * @param :
  132. * @return :
  133. * @---------------------------------------------------
  134. */
  135. function fSettingIOlnfo(){
  136. grdf_initGridStyle(grd_ioinfo);
  137. var tRow = ds_main_ioinfo_iolist.rowcount;
  138. var OralSum = 0;
  139. var DrugSum = 0;
  140. var BloodSum = 0 ;
  141. var EtcSum = 0;
  142. var OutPutSum = 0;
  143. var IntakeTotalSum = 0;
  144. var OutputTotalSum = 0;
  145. var SpecSum = 0;
  146. var StartFlag = "";
  147. var sAddIntakeRow = "";
  148. var IntakeLastRow = -1;
  149. OralSum = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '01' && utlf_isNull(itemnm)"), "total");
  150. DrugSum = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '02' && utlf_isNull(itemnm)"), "total");
  151. BloodSum = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '03' && utlf_isNull(itemnm)"), "total");
  152. EtcSum = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '04' && utlf_isNull(itemnm)"), "total");
  153. OutPutSum = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '07' && utlf_isNull(itemnm)"), "total");
  154. var DayOralSum = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '01' && itemnm == '경구입력'"), "dayrslt");
  155. var EvnOralSum = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '01' && itemnm == '경구입력'"), "evnrslt");
  156. var NgtOralSum = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '01' && itemnm == '경구입력'"), "ngtrslt");
  157. var totalOralSum = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '01' && itemnm == '경구입력'"), "subtotal");
  158. var DaySum1 = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '01' && utlf_isNull(itemnm)"), "dayrslt");
  159. var DaySum2 = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '02' && utlf_isNull(itemnm)"), "dayrslt");
  160. var DaySum3 = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '03' && utlf_isNull(itemnm)"), "dayrslt");
  161. var DaySum4 = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '04' && utlf_isNull(itemnm)"), "dayrslt");
  162. var EvnSum1 = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '01' && utlf_isNull(itemnm)"), "evnrslt");
  163. var EvnSum2 = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '02' && utlf_isNull(itemnm)"), "evnrslt");
  164. var EvnSum3 = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '03' && utlf_isNull(itemnm)"), "evnrslt");
  165. var EvnSum4 = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '04' && utlf_isNull(itemnm)"), "evnrslt");
  166. var NgtSum1 = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '01' && utlf_isNull(itemnm)"), "ngtrslt");
  167. var NgtSum2 = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '02' && utlf_isNull(itemnm)"), "ngtrslt");
  168. var NgtSum3 = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '03' && utlf_isNull(itemnm)"), "ngtrslt");
  169. var NgtSum4 = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '04' && utlf_isNull(itemnm)"), "ngtrslt");
  170. var SubTotal1 = ds_main_ioinfo_iolist.getColumn(ds_main_ioinfo_iolist.findRowExpr("lnkbizcd == '01' && utlf_isNull(itemnm)"), "subtotal");
  171. if( utlf_isNull(DaySum1) )DaySum1=0;
  172. if( utlf_isNull(DaySum2) )DaySum2=0;
  173. if( utlf_isNull(DaySum3) )DaySum3=0;
  174. if( utlf_isNull(DaySum4) )DaySum4=0;
  175. if( utlf_isNull(EvnSum1) )EvnSum1=0;
  176. if( utlf_isNull(EvnSum2) )EvnSum2=0;
  177. if( utlf_isNull(EvnSum3) )EvnSum3=0;
  178. if( utlf_isNull(EvnSum4) )EvnSum4=0;
  179. if( utlf_isNull(NgtSum1) )NgtSum1=0;
  180. if( utlf_isNull(NgtSum2) )NgtSum2=0;
  181. if( utlf_isNull(NgtSum3) )NgtSum3=0;
  182. if( utlf_isNull(NgtSum4) )NgtSum4=0;
  183. for(var i=0; i < ds_main_ioinfo_iolist.rowcount; i++) {
  184. lnkbizcd = grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","lnkbizcd"));
  185. itemnm = grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","itemnm"));
  186. if(lnkbizcd == "01" && utlf_isNull(itemnm) ) {
  187. ds_main_ioinfo_iolist.setColumn(i, "dayrslt" , Math.round(parseFloat(DaySum1) + parseFloat(DayOralSum), 2));
  188. ds_main_ioinfo_iolist.setColumn(i, "evnrslt" , Math.round(parseFloat(EvnSum1) + parseFloat(EvnOralSum), 2));
  189. ds_main_ioinfo_iolist.setColumn(i, "ngtrslt" , Math.round(parseFloat(NgtSum1) + parseFloat(NgtOralSum), 2));
  190. ds_main_ioinfo_iolist.setColumn(i, "subtotal" , Math.round(parseFloat(SubTotal1) + parseFloat(totalOralSum), 2));
  191. ds_main_ioinfo_iolist.setColumn(i, "total" , Math.round(parseFloat(SubTotal1) + parseFloat(totalOralSum), 2));
  192. }
  193. }
  194. if(tRow > -1){
  195. var sExprBack = "EXPR(";
  196. var sExprColor = "EXPR(";
  197. var sExprSize = "EXPR(";
  198. for(var i = 0; i < ds_main_ioinfo_iolist.rowcount; i++){
  199. if(grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","setyn")) == "1"){
  200. IntakeLastRow = i;
  201. }
  202. var param = grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","lnkbizcd"));
  203. //수치가 0인 항목 삭제 및 항목명 입력
  204. if(param == "01"){
  205. if( utlf_isNull( grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","d_lnkrecflag")) ) && !utlf_isNull( grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","itemnm")) ) ){
  206. ds_main_ioinfo_iolist.setColumn(i, "d_lnkrecflag", grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","itemnm")));
  207. }
  208. if( utlf_isNull( grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","e_lnkrecflag")) ) && !utlf_isNull( grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","itemnm")) ) ){
  209. ds_main_ioinfo_iolist.setColumn(i, "e_lnkrecflag", grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","itemnm")));
  210. }
  211. if( utlf_isNull( grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","n_lnkrecflag")) ) && !utlf_isNull( grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","itemnm")) ) ){
  212. ds_main_ioinfo_iolist.setColumn(i, "n_lnkrecflag", grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","itemnm")));
  213. }
  214. }else{
  215. if( utlf_isNull( grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","d_lnkrecflag")) ) ){
  216. ds_main_ioinfo_iolist.setColumn(i, "d_lnkrecflag", utlf_transNullToEmpty(grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","itemnm")))+
  217. ( param == "03"
  218. && grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","daycnt")) != "0"
  219. && !utlf_isNull(grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","itemnm")))
  220. ? " ("+ utlf_transNullToEmpty(grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","daycnt"))) + ")" : "") );
  221. }else if( !utlf_isNull(grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","itemnm"))) ){
  222. ds_main_ioinfo_iolist.setColumn(i, "dayrslt", "");
  223. }
  224. if( utlf_isNull(grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","e_lnkrecflag"))) ){
  225. ds_main_ioinfo_iolist.setColumn(i, "e_lnkrecflag", utlf_transNullToEmpty(grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","itemnm")))+
  226. ( param == "03"
  227. && grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","evncnt")) != "0"
  228. && !utlf_isNull(grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","itemnm")))
  229. ? " ("+ utlf_transNullToEmpty(grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","evncnt"))) + ")" : "") );
  230. }else if( !utlf_isNull(grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","itemnm"))) ){
  231. ds_main_ioinfo_iolist.setColumn(i, "evnrslt", "");
  232. }
  233. if( utlf_isNull( grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","n_lnkrecflag")) ) ){
  234. ds_main_ioinfo_iolist.setColumn(i, "n_lnkrecflag", utlf_transNullToEmpty(grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","itemnm")))+
  235. ( param == "03"
  236. && grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","ngtcnt")) != "0"
  237. && !utlf_isNull(grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","itemnm")))
  238. ? " ("+ utlf_transNullToEmpty(grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","ngtcnt"))) + ")" : "") );
  239. }else if( !utlf_isNull(grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","itemnm"))) ){
  240. ds_main_ioinfo_iolist.setColumn(i, "ngtrslt", "");
  241. }
  242. }
  243. var fRow = ds_main_ioinfo_iolist.findRow("lnkbizcd", ds_main_ioinfo_iolist.getColumn(i, "lnkbizcd"));
  244. //구분별 합계 입력(Merge 작업을 하기위하여 머지할 행 데이터 일치시키기 위함)
  245. switch(param){
  246. case "01" :
  247. ds_main_ioinfo_iolist.setColumn(i, "total", " " + Math.round(OralSum, 2));
  248. break;
  249. case "02" :
  250. ds_main_ioinfo_iolist.setColumn(i, "total", " " + Math.round(DrugSum, 2));
  251. break;
  252. case "03" :
  253. ds_main_ioinfo_iolist.setColumn(i, "total", " " + Math.round(BloodSum, 2));
  254. break;
  255. case "04" :
  256. ds_main_ioinfo_iolist.setColumn(i, "total", " " + Math.round(EtcSum, 2));
  257. break;
  258. case "05" :
  259. ds_main_ioinfo_iolist.setColumn(i, "total", " " + Math.round(OutPutSum, 2));
  260. break;
  261. }
  262. //구분필드 색상 변경
  263. sExprBack += "currow == "+i+" && (self.col == "+(grd_ioinfo.getBindCellIndex("body","setyn")) +") ? '#ccccff' : ";
  264. sExprBack += "currow == "+i+" && (self.col == "+(grd_ioinfo.getBindCellIndex("body","lnkbizcd"))+") ? '#ccccff' : ";
  265. sExprSize += "currow == "+i+" && (self.col == "+(grd_ioinfo.getBindCellIndex("body","setyn")) +") ? 'Dotum,9,bold' : ";
  266. sExprSize += "currow == "+i+" && (self.col == "+(grd_ioinfo.getBindCellIndex("body","lnkbizcd")) +") ? 'Dotum,9,bold' : ";
  267. //SubTotal Row 색상 변경
  268. if( utlf_isNull(ds_main_ioinfo_iolist.getColumn(i, "itemnm")) ){
  269. for(var stcol = grd_ioinfo.getBindCellIndex("body","d_lnkrecflag") ; stcol <= grd_ioinfo.getBindCellIndex("body","subtotal"); stcol++){
  270. sExprBack += "currow == "+i+" && (self.col == "+stcol+") ? '#ffff99' : ";
  271. }
  272. }
  273. //Total Output Row 색상변경
  274. if( ds_main_ioinfo_iolist.getColumn(i, "lnkbizcd") == "07"){
  275. for(var tocol = grd_ioinfo.getBindCellIndex("body","setyn"); tocol <= grd_ioinfo.getBindCellIndex("body","total"); tocol++){
  276. sExprBack = sExprBack.replace("currow == "+i+" && (self.col == "+tocol+") ? '#ccccff' : ", "currow == "+i+" && (self.col == "+tocol+") ? '#ffff00' : ");
  277. sExprBack = sExprBack.replace("currow == "+i+" && (self.col == "+tocol+") ? '#ffff99' : ", "currow == "+i+" && (self.col == "+tocol+") ? '#ffff00' : ");
  278. sExprSize += "currow == "+i+" && (self.col == "+tocol+") ? 'Dotum,9,bold' : ";
  279. }
  280. }
  281. }
  282. //Intake 합계 Row 추가
  283. var intaketotalsetrow = -1;
  284. if(IntakeLastRow > -1){
  285. ds_main_ioinfo_iolist.insertRow(IntakeLastRow + 1);
  286. for(var itr = ds_main_ioinfo_iolist.rowcount-2; itr > IntakeLastRow; itr--){
  287. sExprBack = sExprBack.replace("currow == "+itr+"", "currow == "+(itr+1)+"");
  288. sExprSize = sExprSize.replace("currow == "+itr+"", "currow == "+(itr+1)+"");
  289. }
  290. intaketotalsetrow = IntakeLastRow + 1;
  291. }
  292. if(intaketotalsetrow > -1){
  293. ds_main_ioinfo_iolist.setColumn(intaketotalsetrow, "setyn" , "06");
  294. ds_main_ioinfo_iolist.setColumn(intaketotalsetrow, "lnkbizcd" , "06");
  295. ds_main_ioinfo_iolist.setColumn(intaketotalsetrow, "dayrslt" , Math.round(eval(DayOralSum) + eval(DaySum1) + eval(DaySum2) + eval(DaySum3)+ eval(DaySum4), 2));
  296. ds_main_ioinfo_iolist.setColumn(intaketotalsetrow, "evnrslt" , Math.round(eval(EvnOralSum) + eval(EvnSum1) + eval(EvnSum2) + eval(EvnSum3)+ eval(EvnSum4), 2));
  297. ds_main_ioinfo_iolist.setColumn(intaketotalsetrow, "ngtrslt" , Math.round(eval(NgtOralSum) + eval(NgtSum1) + eval(NgtSum2) + eval(NgtSum3)+ eval(NgtSum4), 2));
  298. for(var itcol = grd_ioinfo.getBindCellIndex("body","setyn"); itcol <= grd_ioinfo.getBindCellIndex("body","total"); itcol++){
  299. sExprBack = sExprBack.replace("currow == "+intaketotalsetrow+" && (self.col == "+itcol+") ? '#ccccff' : ", "currow == "+intaketotalsetrow+" && (self.col == "+itcol+") ? '#ffff00' : ");
  300. sExprBack += "currow == "+intaketotalsetrow+" && (self.col == "+itcol+") ? '#ffff00' : ";
  301. sExprSize += "currow == "+intaketotalsetrow+" && (self.col == "+itcol+") ? 'Dotum,9,bold' : ";
  302. }
  303. }
  304. // 비고 Row 추가및 계산 정보 입력
  305. var insertRow = -1 ;
  306. var specRow = -1;
  307. var outputtotalsetrow = ds_main_ioinfo_iolist.findRow("setyn", "07");
  308. if(intaketotalsetrow > -1 && outputtotalsetrow > -1){
  309. ds_main_ioinfo_iolist.insertRow(outputtotalsetrow + 1);
  310. for(var qlrhr = ds_main_ioinfo_iolist.rowcount-2; qlrhr > outputtotalsetrow; qlrhr--){
  311. sExprBack = sExprBack.replace("currow == "+qlrhr+"", "currow == "+(qlrhr+1)+"");
  312. sExprSize = sExprSize.replace("currow == "+qlrhr+"", "currow == "+(qlrhr+1)+"");
  313. }
  314. specRow = outputtotalsetrow+1;
  315. }
  316. if(specRow > -1 ){
  317. var d_spec = eval(ds_main_ioinfo_iolist.getColumn(intaketotalsetrow, "dayrslt")) - eval(ds_main_ioinfo_iolist.getColumn(outputtotalsetrow, "dayrslt"));
  318. var e_spec = eval(ds_main_ioinfo_iolist.getColumn(intaketotalsetrow, "evnrslt")) - eval(ds_main_ioinfo_iolist.getColumn(outputtotalsetrow, "evnrslt"));
  319. var n_spec = eval(ds_main_ioinfo_iolist.getColumn(intaketotalsetrow, "ngtrslt")) - eval(ds_main_ioinfo_iolist.getColumn(outputtotalsetrow, "ngtrslt"));
  320. var t_spec = eval(d_spec) + eval(e_spec) + eval(n_spec);
  321. d_spec = Math.round(d_spec * Math.pow(10, (-4)*(-1)-1)) / Math.pow(10, (-4)*(-1)-1);
  322. e_spec = Math.round(e_spec * Math.pow(10, (-4)*(-1)-1)) / Math.pow(10, (-4)*(-1)-1);
  323. n_spec = Math.round(n_spec * Math.pow(10, (-4)*(-1)-1)) / Math.pow(10, (-4)*(-1)-1);
  324. t_spec = Math.round(t_spec * Math.pow(10, (-4)*(-1)-1)) / Math.pow(10, (-4)*(-1)-1);
  325. ds_main_ioinfo_iolist.setColumn(specRow, "setyn" , "08");
  326. ds_main_ioinfo_iolist.setColumn(specRow, "lnkbizcd" , "08");
  327. if(d_spec > 0){
  328. ds_main_ioinfo_iolist.setColumn(specRow, "dayrslt", "+" + Math.round(d_spec, 2));
  329. sExprColor += "currow == "+specRow+" && (self.col == "+grd_ioinfo.getBindCellIndex("body","dayrslt")+") ? '#ff0000' : ";
  330. }else if(d_spec == 0){
  331. ds_main_ioinfo_iolist.setColumn(specRow, "dayrslt", Math.round(d_spec, 2));
  332. }else{
  333. ds_main_ioinfo_iolist.setColumn(specRow, "dayrslt", Math.round(d_spec, 2));
  334. sExprColor += "currow == "+specRow+" && (self.col == "+grd_ioinfo.getBindCellIndex("body","dayrslt")+") ? '#0000ff' : ";
  335. }
  336. if(e_spec > 0){
  337. ds_main_ioinfo_iolist.setColumn(specRow, "evnrslt", "+" + Math.round(e_spec, 2));
  338. sExprColor += "currow == "+specRow+" && (self.col == "+grd_ioinfo.getBindCellIndex("body","evnrslt")+") ? '#ff0000' : ";
  339. }else if(e_spec == 0){
  340. ds_main_ioinfo_iolist.setColumn(specRow, "evnrslt", Math.round(e_spec, 2));
  341. }else{
  342. ds_main_ioinfo_iolist.setColumn(specRow, "evnrslt", Math.round(e_spec, 2));
  343. sExprColor += "currow == "+specRow+" && (self.col == "+grd_ioinfo.getBindCellIndex("body","evnrslt")+") ? '#0000ff' : ";
  344. }
  345. if(n_spec > 0){
  346. ds_main_ioinfo_iolist.setColumn(specRow, "ngtrslt", "+" + Math.round(n_spec, 2));
  347. sExprColor += "currow == "+specRow+" && (self.col == "+grd_ioinfo.getBindCellIndex("body","ngtrslt")+") ? '#ff0000' : ";
  348. }else if(n_spec == 0){
  349. ds_main_ioinfo_iolist.setColumn(specRow, "ngtrslt", Math.round(n_spec, 2));
  350. }else{
  351. ds_main_ioinfo_iolist.setColumn(specRow, "ngtrslt", Math.round(n_spec, 2));
  352. sExprColor += "currow == "+specRow+" && (self.col == "+grd_ioinfo.getBindCellIndex("body","ngtrslt")+") ? '#0000ff' : ";
  353. }
  354. if(t_spec > 0){
  355. ds_main_ioinfo_iolist.setColumn(specRow, "subtotal", "+" + Math.round(t_spec, 2));
  356. ds_main_ioinfo_iolist.setColumn(specRow, "total", "+" + Math.round(t_spec, 2));
  357. //alert(ds_main_ioinfo_iolist.getColumn(specRow, "subtotal"))
  358. //alert(ds_main_ioinfo_iolist.getColumn(specRow, "total"))
  359. sExprColor += "currow == "+specRow+" && (self.col == "+(grd_ioinfo.getBindCellIndex("body","subtotal")) +") ? '#ff0000' : ";
  360. sExprColor += "currow == "+specRow+" && (self.col == "+(grd_ioinfo.getBindCellIndex("body","total")) +") ? '#ff0000' : ";
  361. }else if(t_spec == 0){
  362. ds_main_ioinfo_iolist.setColumn(specRow, "subtotal", Math.round(t_spec, 2));
  363. ds_main_ioinfo_iolist.setColumn(specRow, "total", Math.round(t_spec, 2));
  364. }else{
  365. ds_main_ioinfo_iolist.setColumn(specRow, "subtotal", Math.round(t_spec, 2));
  366. ds_main_ioinfo_iolist.setColumn(specRow, "total", Math.round(t_spec, 2));
  367. sExprColor += "currow == "+specRow+" && (self.col == "+(grd_ioinfo.getBindCellIndex("body","subtotal")) +") ? '#0000ff' : ";
  368. sExprColor += "currow == "+specRow+" && (self.col == "+(grd_ioinfo.getBindCellIndex("body","total")) +") ? '#0000ff' : ";
  369. }
  370. for(var qlrh = grd_ioinfo.getBindCellIndex("body","setyn"); qlrh <= grd_ioinfo.getBindCellIndex("body","total"); qlrh++){
  371. sExprBack = sExprBack.replace("currow == "+specRow+" && (self.col == "+qlrh+") ? '#ccccff' : ", "currow == "+specRow+" && (self.col == "+qlrh+") ? '#ffcc99' : ");
  372. sExprBack += "currow == "+specRow+" && (self.col == "+qlrh+") ? '#ffcc99' : ";
  373. sExprSize += "currow == "+specRow+" && (self.col == "+qlrh+") ? 'Dotum,9,bold' : ";
  374. }
  375. }
  376. sExprBack += "'')";
  377. sExprColor += "'')";
  378. for(var expnum = 0; expnum <grd_ioinfo.getCellCount("Body"); expnum++){
  379. grd_ioinfo.setCellProperty("Body", expnum, "background", sExprBack);
  380. grd_ioinfo.setCellProperty("Body", expnum, "background2", sExprBack);
  381. grd_ioinfo.setCellProperty("Body", expnum, "color", sExprColor);
  382. grd_ioinfo.setCellProperty("Body", expnum, "color2", sExprColor);
  383. }
  384. sExprSize += "'Dotum,9')";
  385. for(var expnum2 = 0; expnum2 <grd_ioinfo.getCellCount("Body"); expnum2++){
  386. grd_ioinfo.setCellProperty("Body", expnum2, "font", sExprSize);
  387. }
  388. //그리드 선택 제어 부분
  389. btn_close.setFocus();
  390. ds_main_ioinfo_iolist.rowposition = -1;
  391. grd_ioinfo.readonly = true;
  392. //그리드 머지 작업
  393. /*
  394. grd_ioinfo.mergecells = "bycolrec"; // byrestriccol byrestricrow
  395. grd_ioinfo.mergecol(0) = true;
  396. grd_ioinfo.mergecol(1) = true;
  397. grd_ioinfo.mergecol(2) = false;
  398. grd_ioinfo.mergecol(3) = false;
  399. grd_ioinfo.mergecol(4) = false;
  400. grd_ioinfo.mergecol(5) = false;
  401. grd_ioinfo.mergecol(6) = false;
  402. grd_ioinfo.mergecol(7) = false;
  403. grd_ioinfo.mergecol(8) = false;
  404. grd_ioinfo.mergecol(9) = true;
  405. */
  406. //Total Intake 합계 데이터 입력(Merge로 인하여 제일 하단에 추가)
  407. if(intaketotalsetrow > -1){
  408. ds_main_ioinfo_iolist.setColumn(intaketotalsetrow, "subtotal" , " " + Math.round(Math.round((eval(DaySum1) + eval(DaySum2) + eval(DaySum3)+ eval(DaySum4) + eval(EvnSum1) + eval(EvnSum2) + eval(EvnSum3)+ eval(EvnSum4) + eval(NgtSum1) + eval(NgtSum2) + eval(NgtSum3)+ eval(NgtSum4)) * Math.pow(10, (-4)*(-1)-1)) / Math.pow(10, (-4)*(-1)-1), 2));
  409. ds_main_ioinfo_iolist.setColumn(intaketotalsetrow, "total" , " " + Math.round(Math.round((eval(DaySum1) + eval(DaySum2) + eval(DaySum3)+ eval(DaySum4) + eval(EvnSum1) + eval(EvnSum2) + eval(EvnSum3)+ eval(EvnSum4) + eval(NgtSum1) + eval(NgtSum2) + eval(NgtSum3)+ eval(NgtSum4)) * Math.pow(10, (-4)*(-1)-1)) / Math.pow(10, (-4)*(-1)-1), 2));
  410. }
  411. }
  412. for(var i = 0; i < ds_main_ioinfo_iolist.rowcount; i ++){
  413. if( utlf_isNull(grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","dayrslt"))) ){
  414. ds_main_ioinfo_iolist.setColumn(i, "d_lnkrecflag", "");
  415. }
  416. if( utlf_isNull(grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","evnrslt"))) ){
  417. ds_main_ioinfo_iolist.setColumn(i, "e_lnkrecflag", "");
  418. }
  419. if( utlf_isNull(grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","ngtrslt"))) ){
  420. ds_main_ioinfo_iolist.setColumn(i, "n_lnkrecflag", "");
  421. }
  422. }
  423. //수치량이 존재하지 않는 Row 삭제
  424. for(var i = 0; i < ds_main_ioinfo_iolist.rowcount; i++){
  425. if( grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","dayrslt")) == "07"){
  426. //grd_ioinfo.mergerow(i) = true;
  427. }
  428. if(utlf_isNull(grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","dayrslt"))) &&
  429. utlf_isNull(grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","evnrslt"))) &&
  430. utlf_isNull(grd_ioinfo.getCellValue(i, grd_ioinfo.getBindCellIndex("body","ngtrslt"))) ){
  431. ds_main_ioinfo_iolist.deleteRow(i);
  432. i = i-1;
  433. }
  434. }
  435. var sExprdpValue = "EXPR(";
  436. var sExpredValue = "EXPR(";
  437. for(var exva = 0; exva < ds_main_ioinfo_iolist.rowcount; exva++){
  438. for(var cds = 0; cds < ds_temp_lnkrecinfo_lnkreclist.rowcount; cds++){
  439. if(ds_temp_lnkrecinfo_lnkreclist.getColumn(cds, "cd") == ds_main_ioinfo_iolist.getColumn(exva, "d_lnkrecflag")){
  440. sExprdpValue += "currow == "+exva+" && (self.col == "+(grd_ioinfo.getBindCellIndex("body","d_lnkrecflag")) +") ? 'combo' : ";
  441. sExpredValue += "currow == "+exva+" && (self.col == "+(grd_ioinfo.getBindCellIndex("body","d_lnkrecflag")) +") ? 'combo' : ";
  442. }
  443. if(ds_temp_lnkrecinfo_lnkreclist.getColumn(cds, "cd") == ds_main_ioinfo_iolist.getColumn(exva, "e_lnkrecflag")){
  444. sExprdpValue += "currow == "+exva+" && (self.col == "+(grd_ioinfo.getBindCellIndex("body","e_lnkrecflag")) +") ? 'combo' : ";
  445. sExpredValue += "currow == "+exva+" && (self.col == "+(grd_ioinfo.getBindCellIndex("body","e_lnkrecflag")) +") ? 'combo' : ";
  446. }
  447. if(ds_temp_lnkrecinfo_lnkreclist.getColumn(cds, "cd") == ds_main_ioinfo_iolist.getColumn(exva, "n_lnkrecflag")){
  448. sExprdpValue += "currow == "+exva+" && (self.col == "+(grd_ioinfo.getBindCellIndex("body","n_lnkrecflag")) +") ? 'combo' : ";
  449. sExpredValue += "currow == "+exva+" && (self.col == "+(grd_ioinfo.getBindCellIndex("body","n_lnkrecflag")) +") ? 'combo' : ";
  450. }
  451. }
  452. }
  453. sExprdpValue += "'normal')";
  454. sExpredValue += "'none')";
  455. grd_ioinfo.setCellProperty("Body", grd_ioinfo.getBindCellIndex("body","d_lnkrecflag"), "displaytype", sExprdpValue);
  456. grd_ioinfo.setCellProperty("Body", grd_ioinfo.getBindCellIndex("body","d_lnkrecflag"), "edittype", sExpredValue);
  457. grd_ioinfo.setCellProperty("Body", grd_ioinfo.getBindCellIndex("body","e_lnkrecflag"), "displaytype", sExprdpValue);
  458. grd_ioinfo.setCellProperty("Body", grd_ioinfo.getBindCellIndex("body","e_lnkrecflag"), "edittype", sExpredValue);
  459. grd_ioinfo.setCellProperty("Body", grd_ioinfo.getBindCellIndex("body","n_lnkrecflag"), "displaytype", sExprdpValue);
  460. grd_ioinfo.setCellProperty("Body", grd_ioinfo.getBindCellIndex("body","n_lnkrecflag"), "edittype", sExpredValue);
  461. }
  462. /**
  463. * @group :
  464. * @ver : 2009.07.01
  465. * @by : 김홍점
  466. * @---------------------------------------------------
  467. * @type : function
  468. * @access : public
  469. * @desc : 메모저장, 메모삭제
  470. * @param :PFlag : D - 메모삭제 , S - 저장
  471. * @return :
  472. * @---------------------------------------------------
  473. */
  474. function fMedrMomoSave(pFlag)
  475. {
  476. var saveHearder = "status▦memocnts▦pid▦memoitemflag▦seqno▦recdd_b▦rectm_b▦recdd▦rectm▦indd▦cretno▩";
  477. var saveData = "";
  478. var status = "";
  479. if ( utlf_isNull(ds_main_cond.getColumn(0, "pid")))
  480. {
  481. sysf_messageBox("해당 환자가 선택되지", "E007");
  482. return;
  483. }
  484. else
  485. {
  486. ds_send_savedata.clear();
  487. ds_send_savedata_memoinfo.clearData();
  488. dsf_makeValue(ds_send_savedata, "wardcd", "string", xPathCondInfo.getColumn(0, "wardcd"));
  489. dsf_makeValue(ds_send_savedata, "pid", "string", xPathCondInfo.getColumn(0, "pid"));
  490. dsf_makeValue(ds_send_savedata, "indd", "string", xPathCondInfo.getColumn(0, "orddd"));
  491. dsf_makeValue(ds_send_savedata, "cretno", "string",xPathCondInfo.getColumn(0, "cretno"));
  492. dsf_makeValue(ds_send_savedata, "orddd", "string", xPathCondInfo.getColumn(0, "seardd"));
  493. dsf_makeValue(ds_send_savedata, "seardd", "string", xPathCondInfo.getColumn(0, "seardd"));
  494. dsf_makeValue(ds_send_savedata, "memoitemflag", "string", "08");
  495. if( pFlag =="D")
  496. {
  497. saveData = "d" + "▦"
  498. + "" + "▦"
  499. + ds_main_cond.getColumn(0, "pid") + "▦"
  500. + "08" + "▦"
  501. + ds_main_memoinfo_memolist.getColumn(0, "seqno") + "▦"
  502. + ds_main_memoinfo_memolist.getColumn(0, "recdd_b") + "▦"
  503. + ds_main_memoinfo_memolist.getColumn(0, "rectm_b") + "▦"
  504. + ds_main_memoinfo_memolist.getColumn(0, "recdd_b") + "▦"
  505. + ds_main_memoinfo_memolist.getColumn(0, "rectm_b") + "▦"
  506. + ds_main_cond.getColumn(0, "orddd") + "▦"
  507. + ds_main_cond.getColumn(0, "cretno") + "▩";
  508. dsf_setCSVToDs("ds_send_savedata_memoinfo", saveHearder+saveData);
  509. //model.resetInstanceNode(xPathMemoInfo);
  510. //if(submit("TXMNR05801","false")){
  511. var oParam = {};
  512. oParam.id = "TXMNR05801";
  513. oParam.service = "wardcareapp.WardCardexMngt";
  514. oParam.method = "reqExeMemoInfo";
  515. oParam.inds = "reqdata=ds_send_savedata_memoinfo reqcond=ds_send_savedata";
  516. oParam.outds = "ds_main_memoinfo_memolist=medrmemoinfo";
  517. oParam.async = false;
  518. oParam.callback = "cf_TXMNR05801";
  519. tranf_submit(oParam);
  520. if(arErrorCode.pop("TXMNR05801") > -1)
  521. {
  522. sysf_messageBox("성공적으로", "I001");
  523. }
  524. }
  525. else
  526. {
  527. if ( utlf_isNull(ds_main_memoinfo_memolist.getColumn(0, "memocnts")))
  528. {
  529. sysf_messageBox("저장할 메모를", "C001");//" 입력하십시오."
  530. return;
  531. }
  532. ds_send_savedata_memoinfo.clearData();
  533. if(utlf_isNull(ds_main_memoinfo_memolist.getColumn(0, "status")))
  534. {
  535. status="i";
  536. saveData = status + "▦"
  537. + ds_main_memoinfo_memolist.getColumn(0, "memocnts") + "▦"
  538. + ds_main_cond.getColumn(0, "pid") + "▦"
  539. + "08" + "▦"
  540. + ds_main_memoinfo_memolist.getColumn(0, "seqno") + "▦"
  541. + ds_main_memoinfo_memolist.getColumn(0, "recdd_b") + "▦"
  542. + ds_main_memoinfo_memolist.getColumn(0, "rectm_b") + "▦"
  543. + ds_main_cond.getColumn(0, "seardd") + "▦"
  544. + "0000▦"
  545. + ds_main_cond.getColumn(0, "orddd") + "▦"
  546. + ds_main_cond.getColumn(0, "cretno") + "▩";
  547. }
  548. else
  549. {
  550. status="u";
  551. saveData = status + "▦"
  552. + ds_main_memoinfo_memolist.getColumn(0, "memocnts") + "▦"
  553. + ds_main_cond.getColumn(0, "pid") + "▦"
  554. + "08" + "▦"
  555. + ds_main_memoinfo_memolist.getColumn(0, "seqno") + "▦"
  556. + ds_main_memoinfo_memolist.getColumn(0, "recdd_b") + "▦"
  557. + ds_main_memoinfo_memolist.getColumn(0, "rectm_b") + "▦"
  558. + ds_main_memoinfo_memolist.getColumn(0, "recdd_b") + "▦"
  559. + ds_main_memoinfo_memolist.getColumn(0, "rectm_b") + "▦"
  560. + ds_main_cond.getColumn(0, "orddd") + "▦"
  561. + ds_main_cond.getColumn(0, "cretno") + "▩";
  562. }
  563. dsf_setCSVToDs("ds_send_savedata_memoinfo", saveHearder+saveData);
  564. var oParam = {};
  565. oParam.id = "TXMNR05801";
  566. oParam.service = "wardcareapp.WardCardexMngt";
  567. oParam.method = "reqExeMemoInfo";
  568. oParam.inds = "reqdata=ds_send_savedata_memoinfo reqcond=ds_send_savedata";
  569. oParam.outds = "ds_main_memoinfo_memolist=medrmemoinfo";
  570. oParam.async = false;
  571. oParam.callback = "cf_TXMNR05801";
  572. tranf_submit(oParam);
  573. if(arErrorCode.pop("TXMNR05801") > -1)
  574. {
  575. sysf_messageBox("성공적으로", "I001");
  576. }
  577. }
  578. }
  579. }
  580. function cf_TXMNR05801(sSvcId, nErrorCode, sErrorMsg) {
  581. arErrorCode.push(sSvcId, nErrorCode);
  582. }
  583. // 환자 기본정보 조회('16.03.31) - AYS
  584. function fSettingPatlnfo(){
  585. var sPatBaseInfo = utlf_transNullToEmpty(ds_main_patinfo.getColumn(0, "wardnm" )) + " " // 병동
  586. + utlf_transNullToEmpty(ds_main_patinfo.getColumn(0, "roomcd" )) + " " // 병실
  587. + utlf_transNullToEmpty(ds_main_patinfo.getColumn(0, "patnm" )) + "(" // 환자명
  588. + utlf_transNullToEmpty(ds_main_patinfo.getColumn(0, "pid" )) + ") " // 등록번호
  589. + utlf_transNullToEmpty(ds_main_patinfo.getColumn(0, "sexage" )) + " " // SA
  590. + utlf_transNullToEmpty(ds_main_patinfo.getColumn(0, "orddeptnm" )); // 진료과
  591. //alert("sPatBaseInfo : " + sPatBaseInfo);
  592. //model.makeValue(ds_main_patinfo, sPatBaseInfo);
  593. dsf_createDs("ds_main");
  594. dsf_makeValue(ds_main,"patinfo","string", sPatBaseInfo);
  595. }
  596. ]]></Script>