SMMMO08400.js 68 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425
  1. /*
  2. 혈액투석적절도관리(SMMMO08400.xrw - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. */
  6. //**전역변수**//
  7. var selRsrvdd = "";
  8. var selPid = "";
  9. var sXml = "";
  10. var selInstcd = "";
  11. var selHdcretno = ""; //추가-kys-20091222
  12. var selShiftflag = ""; //추가-kys-20100208
  13. var chkflag = "N"; //20110404_KNUH_Start
  14. var XmlInstNm = "aterlprelist/aterlprespec" + " " // AP
  15. + "veinprecntslist/veinprecntsspec" + " " // VP
  16. + "cruedrugspeclist" + " " // 처치 및 투약 내역
  17. + "nbpsinspspeclist" + " " // 임상검사 내역
  18. + "dialrecspeclist" + " " // 투석기록 내역
  19. + "dialvitalsigninspspeclist" ; // Vital Sign 내역
  20. /**
  21. * @group :
  22. * @ver : 2007.05.31
  23. * @by : 김진아
  24. * @---------------------------------------------------
  25. * @type : function
  26. * @access : public
  27. * @desc : 화면 초기화
  28. * @param :
  29. * @return :
  30. * @---------------------------------------------------
  31. */
  32. function fDone(){
  33. //**그리드 초기화**//
  34. model.removeNodeset("/root/main/rsrvpatlist" ); // 예약환자 리스트
  35. //model.removeNodeset("/root/main/spcffactlist"); // 특이사항 리스트
  36. model.removeNodeset("/root/main/reclist/recinfo/cruedrugspeclist/cruedrugspec"); // 처치 및 투약 리스트
  37. model.removeNodeset("/root/main/reclist/recinfo/nbpsinspspeclist/nbpsinspspec"); // 임상검사 리스트
  38. model.removeNodeset("/root/main/reclist/recinfo/dialrecspeclist/dialrecspec" ); // 투석기록 리스트
  39. model.removeNodeset("/root/main/reclist/recinfo/dialvitalsigninspspeclist/dialvitalsigninspspec"); // Vital Sign 리스트
  40. //**공통코드 가져오기**//
  41. zbcfGetCodeList( new Array ( "M0083" // 혈관종류
  42. , "M0127" // 혈액투석기종류
  43. , "M0128" // 혈액투석기
  44. , "M0129" // 투석장소
  45. , "M0345" // 혈액투석액
  46. , "M0260" // 간호진술문구분코드
  47. )
  48. , new Array ( "/root/init/M0083list" // 혈관종류
  49. , "/root/init/M0127list" // 혈액투석기종류
  50. , "/root/init/M0128list" // 혈액투석기
  51. , "/root/init/M0129list" // 투석장소
  52. , "/root/init/M0345list" // 혈액투석액
  53. , "/root/init/M0260list" // 간호진술문구분코드
  54. )
  55. );
  56. //** 상단환자 화면설정 **//
  57. var node = getGlobalVariable("paminfo");
  58. setCSVToNode("/root/temp/paminfo", node);
  59. if(getNodesetCount("/root/temp/paminfo/list") > 0) {
  60. model.setValue("/root/main/condition/pid", model.getValue("/root/temp/paminfo/list/pid")); // 등록번호
  61. } else {
  62. model.setValue("/root/main/condition/rsrvdd", getCurrentDate()); // 예약일자(default) 설정
  63. }
  64. fSrchRsrvPatList(); // 예약환자 리스트 조회
  65. if(getNodesetCount("/root/temp/paminfo/list") > 0) {
  66. fInitInfo(); // 화면 초기화
  67. //fGetSelPatInfo("2"); // 환자정보설정
  68. //fSetHngBaseInfo(); // 환자의 상단정보 설정
  69. //fPastDialRecInfo(); // 이전 혈액투석간호기록 조회
  70. //fSrchSpcfFactList(); // 특이사항 리스트 조회
  71. //fDialRecSpecList(); // 투석기록 리스트 조회
  72. }
  73. model.refresh();
  74. }
  75. /**
  76. * @group :
  77. * @ver : 2013.06.21
  78. * @by : 권영애
  79. * @---------------------------------------------------
  80. * @type : function
  81. * @access : public
  82. * @desc : 혈액투석적절도 관리 인증저장 정보
  83. * @param :
  84. * @return :
  85. * @---------------------------------------------------
  86. */
  87. function fSrchCoduitrecList(iRow){
  88. // 환자별 도관기록 리스트 셀 색상 초기화 (white)
  89. for(var i=1; i<=grd_coduitrecinfo.rows; i++) {
  90. grd_coduitrecinfo.cellstyle("background-color", i, 1, i, 4) = "white";
  91. }
  92. if(iRow==""){
  93. iRow=1;
  94. }
  95. model.removenode ("/root/send");
  96. model.makeNode ("/root/send");
  97. model.makeValue ("/root/send/reqdata/pid", model.getValue("/root/main/condition/srchpid"));
  98. model.makeValue ("/root/send/reqdata/dialflag", "K"); // 투석구분 ( "K":혈액투석적절도 )
  99. model.removeNodeset("/root/main/coduitreclist");
  100. // 20130603 막음
  101. // model.removeNodeset("/root/main/signinfo");
  102. submit("TRMND01302");
  103. // 인증저장 정보 설정
  104. /*
  105. model.makeValue("/root/main/hdmatnpatlist/hdmatnpatinfo["+iRow+"]/orddd" , model.getValue("/root/main/signinfo/orddd" ));
  106. model.makeValue("/root/main/hdmatnpatlist/hdmatnpatinfo["+iRow+"]/cretno" , model.getValue("/root/main/signinfo/cretno" ));
  107. model.makeValue("/root/main/hdmatnpatlist/hdmatnpatinfo["+iRow+"]/histstat" , model.getValue("/root/main/signinfo/histstat" ));
  108. model.makeValue("/root/main/hdmatnpatlist/hdmatnpatinfo["+iRow+"]/orddeptcd", model.getValue("/root/main/signinfo/orddeptcd"));
  109. model.makeValue("/root/main/hdmatnpatlist/hdmatnpatinfo["+iRow+"]/orddrid" , model.getValue("/root/main/signinfo/orddrid" ));
  110. grd_hdmatnpatinfo.refresh();
  111. */
  112. }
  113. /**
  114. * @group :
  115. * @ver : 2007.06.19
  116. * @by : 김진아
  117. * @---------------------------------------------------
  118. * @type : function
  119. * @access : public
  120. * @desc : 화면상단 정보설정
  121. * @param :
  122. * @return :
  123. * @---------------------------------------------------
  124. */
  125. function fSetHngBaseInfo(){
  126. var iRow = grd_rsrvpatinfo.row -1;
  127. // 상단 환자정보 parameter
  128. var sIoflag = model.getValue("/root/main/rsrvpatlist/rsrvpatinfo["+iRow+"]/ioflag");
  129. var sPid = model.getValue("/root/main/rsrvpatlist/rsrvpatinfo["+iRow+"]/pid");
  130. var sRsrvdd = model.getValue("/root/main/rsrvpatlist/rsrvpatinfo["+iRow+"]/rsrvdd");
  131. var sCretno = model.getValue("/root/main/rsrvpatlist/rsrvpatinfo["+iRow+"]/cretno");
  132. model.removenode ("/root/send");
  133. model.makeNode ("/root/send");
  134. model.makeValue ("/root/send/reqdata/pid" , sPid );
  135. model.makeValue ("/root/send/reqdata/ioflag", sIoflag);
  136. model.makeValue ("/root/send/reqdata/rsrvdd", sRsrvdd);
  137. model.makeValue ("/root/send/reqdata/cretno", sCretno);
  138. model.removeNodeset("/root/temp/gettoplist");
  139. submit("TRMND00707");
  140. var sCretno2 = model.getValue("/root/temp/gettoplist/gettopinfo/cretno" ); //생성번호
  141. var sSeqno = model.getValue("/root/temp/gettoplist/gettopinfo/seqno" ); //일련번호
  142. var sInstcd = model.getValue("/root/temp/gettoplist/gettopinfo/instcd" ); //기관코드
  143. var sIndd = model.getValue("/root/temp/gettoplist/gettopinfo/indd" ); //입원일자
  144. var sOrddd = model.getValue("/root/temp/gettoplist/gettopinfo/orddd" ); //진료일자
  145. var sAcptseqno = model.getValue("/root/temp/gettoplist/gettopinfo/acptseqno"); //등록일련번호
  146. var sOrgorddd = model.getValue("/root/temp/gettoplist/gettopinfo/orgorddd" ); //원진료일자
  147. var sParam;
  148. if(sIoflag == "O") { //외래환자일 경우(histstat : "O")
  149. sParam = (sIoflag + "▦" + sPid + "▦" + sOrddd + "▦" + sCretno2 + "▦" + sInstcd + "▦" + sAcptseqno + "▦" + sOrgorddd );
  150. } else { //입원/응급환자일 경우(histstat : "I", "E")
  151. //2008-10-27 실재 조회 일자는 예약일자 기준으로 조회해야 상단이 올라가므로 변경하였음.
  152. //sParam = (sIoflag + "▦" + sPid + "▦" + sIndd + "▦" + sCretno + "▦" + sInstcd + "▦" + sIndd + "▦");
  153. sParam = (sIoflag + "▦" + sPid + "▦" + sIndd + "▦" + sCretno2 + "▦" + sInstcd + "▦" + sRsrvdd + "▦");
  154. }
  155. setParameter("condparam", sParam);
  156. modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
  157. model.removeNode("/root/temp/paminfo");
  158. model.makeNode("/root/temp/paminfo");
  159. var node = getGlobalVariable("paminfo");
  160. setCSVToNode("/root/temp/paminfo", node);
  161. selPid = model.getValue("/root/temp/paminfo/list/pid"); // 선택환자 등록번호
  162. }
  163. /**
  164. * @group :
  165. * @ver : 2007.06.19
  166. * @by : 김진아
  167. * @---------------------------------------------------
  168. * @type : function
  169. * @access : public
  170. * @desc : 투석기록 팝업
  171. * @param :
  172. * @return :
  173. * @---------------------------------------------------
  174. */
  175. function fPopDialRec(){
  176. var ioflag = model.getValue("/root/main/reclist/recinfo/recinfolists/ioflag");
  177. var sPid = model.getValue("/root/main/patinfo/pid");
  178. var sRsrvdd = model.getValue("/root/main/patinfo/rsrvdd");
  179. var sDialfalg = model.getValue("/root/main/patinfo/dialflag");
  180. var sInstcd = model.getValue("/root/main/patinfo/instcd");
  181. parammsg = "recflag▦dutplaccd▦reclnkkey▩L▦014▦014,"+sPid+","+sRsrvdd+","+sDialfalg+","+sInstcd+"▩";
  182. setParameter("SMMNR03400_ParamBase", parammsg); // 파라미터 설정
  183. modal("SMMNR03400",1,"5","5"); // 간호일지I 화면 팝업
  184. fDialRecSpecList(); // 투석기록 리스트 조회
  185. }
  186. /**
  187. * @group :
  188. * @ver : 2007.06.03
  189. * @by : 김진아
  190. * @---------------------------------------------------
  191. * @type : function
  192. * @access : public
  193. * @desc : 투석기록 리스트 조회
  194. * @param :
  195. * @return :
  196. * @---------------------------------------------------
  197. */
  198. function fDialRecSpecList(){
  199. // 투석기록 버튼 활성화
  200. btn_dialrec.disabled = false;
  201. var sPid = model.getValue("/root/main/patinfo/pid");
  202. var sRsrvdd = model.getValue("/root/main/patinfo/rsrvdd");
  203. var sDialfalg = model.getValue("/root/main/patinfo/dialflag");
  204. var sInstcd = model.getValue("/root/main/patinfo/instcd");
  205. model.removeNode("/root/temp/paminfo");
  206. model.makeNode("/root/temp/paminfo");
  207. var node = getGlobalVariable("paminfo");
  208. setCSVToNode("/root/temp/paminfo", node);
  209. model.removenode("/root/send");
  210. model.makeNode("/root/send");
  211. model.makeValue("/root/send/reqdata/pid" , model.getValue("/root/temp/paminfo/list/pid" )); // 등록번호 - 필수
  212. model.makeValue("/root/send/reqdata/indd" , model.getValue("/root/temp/paminfo/list/indd" )); // 입원일자 (입원환자의 경우)
  213. model.makeValue("/root/send/reqdata/orddd" , model.getValue("/root/temp/paminfo/list/orddd" )); // 진료일자 (외래환자의 경우)
  214. model.makeValue("/root/send/reqdata/cretno" , model.getValue("/root/temp/paminfo/list/cretno")); // 생성번호 - 필수
  215. model.makeValue("/root/send/reqdata/ioflag" , model.getValue("/root/temp/paminfo/list/ioflag")); // I/O 구분 (I : 입원일자, O : 진료일자 필수 입력) - 필수
  216. model.makeValue("/root/send/reqdata/dnarflag" , "%" ); // dnar구분 (전체 : %) - 필수
  217. model.makeValue("/root/send/reqdata/sortseq" , "D" ); // 정렬순서 (오름차순 : A, 내림차순 : D) - 필수
  218. model.makeValue("/root/send/reqdata/recflag" , "L" ); // 기록구분 - 필수 (L: 인공신장실)
  219. model.makeValue("/root/send/reqdata/reclnkkey", "014,"+sPid+","+sRsrvdd+","+sDialfalg+","+sInstcd ); // 기록연계키 - 필수
  220. model.makeValue("/root/send/reqdata/instcd" , model.getValue("/root/temp/paminfo/list/instcd")); // 기관코드 - 필수
  221. model.makeValue("/root/send/reqdata/prestdt" , getCurrentDate()+getCurrentTime() ); // 현재일시(14자리) - 필수
  222. model.removeNodeset("/root/main/reclist/recinfo/dialrecspeclist/dialrecspec/dialrec");
  223. //** 투석기록 리스트 조회 **//
  224. submit("TRMND00703", false);
  225. //20100202-kys-소경화샘 요청-오름차순으로 변경후 젤 하위 행에 위치 옮겨지게 수정
  226. //grd_dialrecspec.refresh(); //그리드에 데이터가 매칭되기 전에 아래의 속성을 타는 경향이 있어 refresh함.
  227. //var sTotRows = grd_dialrecspec.rows - grd_dialrecspec.fixedRows;
  228. //grd_dialrecspec.bottomrow = sTotRows;
  229. }
  230. /**
  231. * @group :
  232. * @ver : 2007.05.31
  233. * @by : 김진아
  234. * @---------------------------------------------------
  235. * @type : function
  236. * @access : public
  237. * @desc : 예약환자 리스트 조회
  238. * @param :
  239. * @return :
  240. * @---------------------------------------------------
  241. */
  242. function fSrchRsrvPatList(){
  243. //** 초기화 **//
  244. var xPath = "/root/main/reclist/recinfo/recinfolists/";
  245. fInitInfo(); // 화면 초기화
  246. // 예약환자 리스트 셀 색상 초기화 (white)
  247. //for(var i=1; i<=grd_rsrvpatinfo.rows; i++) {
  248. // grd_rsrvpatinfo.cellstyle("background-color", i, 1, i, 5) = "white";
  249. //}
  250. model.removenode("/root/send");
  251. model.makeNode ("/root/send");
  252. model.makeValue("/root/send/reqdata/pid" ,model.getValue("/root/main/condition/pid"));
  253. model.makeValue("/root/send/reqdata/rsrvdd",model.getValue("/root/main/condition/rsrvdd"));
  254. //20090109 dhkim
  255. //내환자 추가
  256. model.makeValue("/root/send/reqdata/mypid",model.getValue("/root/main/condition/mypid"));
  257. model.removeNodeset("/root/main/rsrvpatlist");
  258. submit("TRMND00701", false);
  259. }
  260. /**
  261. * @group :
  262. * @ver : 2007.05.31
  263. * @by : 김진아
  264. * @---------------------------------------------------
  265. * @type : function
  266. * @access : public
  267. * @desc : 선택환자 등록번호, 예약일자 얻어옴
  268. * @param :
  269. * @return :
  270. * @---------------------------------------------------
  271. */
  272. function fGetSelPatInfo(iRow){
  273. selPid = grd_rsrvpatinfo.textmatrix(iRow, grd_rsrvpatinfo.colRef("pid")); // 선택한 환자의 등록번호
  274. selRsrvdd = grd_rsrvpatinfo.textmatrix(iRow, grd_rsrvpatinfo.colRef("rsrvdd")); // 선택한 환자의 예약일자(전역변수)
  275. selInstcd = grd_rsrvpatinfo.textmatrix(iRow, grd_rsrvpatinfo.colRef("instcd")); // 사용자의 근무지기관코드
  276. var sIoflag = grd_rsrvpatinfo.textmatrix(iRow, grd_rsrvpatinfo.colRef("ioflag")); // 선택한 환자의 입원외래구분
  277. selHdcretno = grd_rsrvpatinfo.textmatrix(iRow, grd_rsrvpatinfo.colRef("hdcretno")); // 선택한 환자의 hdcretno-kys-20091222
  278. selShiftflag = grd_rsrvpatinfo.textmatrix(iRow, grd_rsrvpatinfo.colRef("shiftflagnm")); // 선택한 환자의 shiftflag-kys-20100208
  279. // 예약환자 리스트 셀 색상 초기화 (white)
  280. for(var i=1; i<=grd_rsrvpatinfo.rows; i++) {
  281. grd_rsrvpatinfo.cellstyle("background-color", i, 1, i, 7) = "white"; //회차,shift구분추가로인한 인덱스변경 5->7-kys-20091222
  282. }
  283. // 선택 행 셀 색상 지정
  284. grd_rsrvpatinfo.cellstyle("background-color", iRow, 1, iRow, 7) = "#ffd9ff"; //회차,shift구분추가로인한 인덱스변경 5->7-kys-20091222
  285. // 선택한 환자의 등록번호 및 예약일자, 입원외래구분 지정
  286. model.removenode("root/temp/pid");
  287. model.makeValue("root/temp/pid", selPid);
  288. model.removenode("/root/main/reclist/recinfo/recinfolists/pid");
  289. model.makeValue("/root/main/reclist/recinfo/recinfolists/pid", selPid);
  290. model.removenode("/root/main/reclist/recinfo/recinfolists/rsrvdd");
  291. model.makeValue("/root/main/reclist/recinfo/recinfolists/rsrvdd", selRsrvdd);
  292. model.removenode("/root/main/reclist/recinfo/recinfolists/ioflag");
  293. model.makeValue("/root/main/reclist/recinfo/recinfolists/ioflag", sIoflag);
  294. model.removenode("/root/main/reclist/recinfo/recinfolists/hdcretno"); //추가-kys-20091222
  295. model.makeValue("/root/main/reclist/recinfo/recinfolists/hdcretno", selHdcretno);
  296. model.removenode("/root/temp/tmpselinfo/tmpshiftflag"); //기록삭제시 알림에 나타내기위해 추가-kys-20100208
  297. model.makeValue("/root/temp/tmpselinfo/tmpshiftflag", selShiftflag);
  298. model.removenode("/root/temp/tmpselinfo/tmptstvdd"); //기록삭제시 알림에 나타내기위해 추가-kys-20100208
  299. model.makeValue("/root/temp/tmpselinfo/tmptstvdd", selRsrvdd);
  300. model.makeValue("/root/main/reclist/recinfo/recinfolists/dialflag", "H"); //투석구분
  301. //2008-08-08 추가
  302. model.setValue("/root/main/patinfo/pid", selPid);
  303. model.setValue("/root/main/patinfo/rsrvdd", selRsrvdd);
  304. model.setValue("/root/main/patinfo/instcd", selInstcd);
  305. model.setValue("/root/main/patinfo/dialflag","H");
  306. // 특이사항 리스트 버튼 활성화
  307. btn_addrowspcffact.disabled = false;
  308. btn_delrowspcffact.disabled = false;
  309. btn_savespcffact.disabled = false;
  310. // 혈관내압측정비 리스트 버튼 활성화 2011.10.05 by kya
  311. btn_addrowbvip.disabled = false;
  312. btn_delrowbvip.disabled = false;
  313. btn_savebvip.disabled = false;
  314. model.refresh()
  315. }
  316. /**
  317. * @group :
  318. * @ver : 2007.06.01
  319. * @by : 김진아
  320. * @---------------------------------------------------
  321. * @type : function
  322. * @access : public
  323. * @desc : 특이사항 리스트 조회
  324. * @param :
  325. * @return :
  326. * @---------------------------------------------------
  327. */
  328. function fSrchSpcfFactList_original(){
  329. model.removenode("/root/send");
  330. model.makeNode ("/root/send");
  331. model.makeValue("/root/send/reqdata/pid", selPid);
  332. model.removeNodeset("/root/main/spcffactlist");
  333. submit("TRMND00702", false);
  334. }
  335. function fSrchSpcfFactList(vGrdObj){
  336. model.removenode("/root/send");
  337. model.makeNode ("/root/send");
  338. model.makeValue("/root/send/reqdata/pid", selPid);
  339. if ( vGrdObj == grd_spcffactinfo ){
  340. //model.removeNodeset("/root/main/spcffactlist");
  341. model.makeValue("/root/send/reqdata/itemflag", "02");
  342. submit("TRMND00702", false);
  343. //alert("3");
  344. } else {
  345. //model.removeNodeset("/root/main/bviplist");
  346. model.makeValue("/root/send/reqdata/itemflag", "09");
  347. //alert("4");
  348. submit("TRMND00711", false);
  349. //alert("5");
  350. }
  351. }
  352. /**
  353. * @group :
  354. * @ver : 2007.06.05
  355. * @by : 김진아
  356. * @---------------------------------------------------
  357. * @type : function
  358. * @access : public
  359. * @desc : 이전 혈액투석간호기록 정보 조회
  360. * @param :
  361. * @return :
  362. * @---------------------------------------------------
  363. */
  364. function fPastDialRecInfo(srchflag){
  365. var xPath = "/root/main/reclist/recinfo/recinfolists/"; // 투석기록정보 경로
  366. var xTmpPath = "/root/temp/recinfolists/"; // 투석기록정보 임시저장 경로
  367. // model.makeValue("/root/main/reclist/recinfo/recinfolists/pid", selPid);
  368. var currentDD = getCurrentDateTime();
  369. model.removenode("/root/send");
  370. model.makeNode ("/root/send");
  371. model.makeValue("/root/send/reqdata/pid" , selPid);
  372. model.makeValue("/root/send/reqdata/dialflag", "H");
  373. model.makeValue("/root/send/reqdata/rsrvdd" , model.getValue(xPath + "rsrvdd"));
  374. model.makeValue("/root/send/reqdata/hdcretno" , model.getValue(xPath + "hdcretno")); //추가-kys-20091222
  375. //alert("srchflag = " + srchflag);
  376. //** 신규등록시 **//
  377. if(srchflag == "New"){
  378. model.makeValue("/root/main/reclist/recinfo/recinfolists/hdcretno" , selHdcretno ); // 선택한환자의 hdcretno-kys-20091222
  379. model.makeValue("/root/main/reclist/recinfo/recinfolists/instcd" , getUserInfo("dutplceinstcd")); // 현재 로그인한 사용자의 기관코드
  380. model.makeValue("/root/main/reclist/recinfo/recinfolists/pid" , selPid ); // 등록번호
  381. model.makeValue("/root/main/reclist/recinfo/recinfolists/dialflag" , "H" ); // 투석구분(H:HD,P:PD)
  382. model.makeNode("/root/main/reclist/recinfo/recinfolists/signno"); // 인증번호
  383. model.makeValue("/root/send/reqdata/srchflag", "New");
  384. submit("TRMND00704", false);
  385. // model.copyNode("/root/main/reclist", "/root/temp/reclist");
  386. var sTmpNode = "dryweig hprnfst hprnmatn bfrcd durationflag angiokindcd angiokindnm dialliqd dialmach dialmachno dialmachnm dialplaccd hdkindflag idbdwtval dialmemcd"; //20100322-kys-ideal wt추가
  387. sTmpNode = sTmpNode.split(" ");
  388. //20110404_KNUH_Start 장비인터페이스부분 추가.
  389. //alert("chkflag = " + chkflag);
  390. if(chkflag == "Y") {
  391. //칠곡병원 장비 인터페이스 부분
  392. model.makeValue("/root/send/reqdata/rsrvdd", grd_rsrvpatinfo.valueMatrix(grd_rsrvpatinfo.row, grd_rsrvpatinfo.colRef("rsrvdd")));
  393. submit("TRMND00709"); //투석장비 인터페이스 부분
  394. submit("TRMND00710"); //Vital Sign 인터페이스 부분
  395. model.makeValue(ipt_dialfromdt.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/dialfromdd") );
  396. model.makeValue(ipt_dialfromtm.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/dialfromtm") );
  397. model.makeValue(ipt_recdt.attribute("ref") , getCurrentDate());
  398. model.makeValue(ipt_rectm.attribute("ref") , getCurrentTime().substr(0,4) );
  399. model.makeValue(ipt_recid.attribute("ref") , getUserInfo("userid") );
  400. model.makeValue(opt_recnm.attribute("ref") , getUserInfo("usernm") );
  401. model.makeValue(ipt_dialtodt.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/dialtodd") );
  402. model.makeValue(ipt_dialtotm.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/dialtotm") );
  403. model.makeValue(ipt_dryweig.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/dryweig") );
  404. model.makeValue(ipt_idbdwtval.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/idbdwtval") );
  405. model.makeValue(ipt_ufval.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/ufval") );
  406. model.makeValue(ipt_prebodyweig.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/prebodyweig") );
  407. model.makeValue(ipt_postbodyweig.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/postbodyweig") );
  408. model.makeValue(ipt_trgtweig.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/trgtweig") );
  409. model.makeValue(ipt_hprnfst.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/hprnfst") );
  410. model.makeValue(ipt_hprnmatn.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/hprnmatn") );
  411. model.makeValue(ipt_durationflag.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/durationflag") );
  412. model.makeValue(ipt_aterlpretm1.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/aterlpretm1") );
  413. model.makeValue(ipt_aterlpretm2.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/aterlpretm2") );
  414. model.makeValue(ipt_aterlpretm3.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/aterlpretm3") );
  415. model.makeValue(ipt_aterlpre1.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/aterlpre1") );
  416. model.makeValue(ipt_aterlpre2.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/aterlpre2") );
  417. model.makeValue(ipt_aterlpre3.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/aterlpre3") );
  418. model.makeValue(ipt_veinprecntstm1.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/veinprecntstm1") );
  419. model.makeValue(ipt_veinprecntstm2.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/veinprecntstm2") );
  420. model.makeValue(ipt_veinprecntstm3.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/veinprecntstm3") );
  421. model.makeValue(ipt_veinprecnts1.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/veinprecnts1") );
  422. model.makeValue(ipt_veinprecnts2.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/veinprecnts2") );
  423. model.makeValue(ipt_veinprecnts3.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/veinprecnts3") );
  424. model.makeNode(chk_porbleyn.attribute("ref"));
  425. model.makeNode(cmb_angiokindcd.attribute("ref"));
  426. model.makeNode(ipt_angiokindnm.attribute("ref"));
  427. model.makeValue(cmb_dialmach.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/dialmach") );
  428. model.makeValue(cmb_dialmachnm.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/dialmachnm") );
  429. model.makeValue(cmb_hdkindflag.attribute("ref") , model.getValue("/root/temp/dialinfo/dialinfolist/hdkindflag") );
  430. //** 시작간호사, 종료간호사 현재 로그인한 간호사로 Defalt 설정 **//
  431. model.makeValue(ipt_startnurseid.attribute("ref"), getUserId() );
  432. model.makeValue(opt_startnursenm.attribute("ref"), getUserName());
  433. model.makeValue(ipt_endnurseid.attribute("ref") , getUserId() );
  434. model.makeValue(opt_tonurgnm.attribute("ref") , getUserName());
  435. model.makeValue(opt_rsrvdd.attribute("ref") , selRsrvdd);
  436. model.makeNode(ipt_dialmachno.attribute("ref"));
  437. model.makeValue(ipt_bfrcd.attribute("ref") , "230" );
  438. model.makeValue(cmb_dialplaccd.attribute("ref"), "01");
  439. model.makeValue(cmb_dialliqd.attribute("ref"), "06");
  440. cmb_dialliqd.refresh();
  441. cmb_hdkindflag.refresh();
  442. cmb_dialplaccd.refresh();
  443. ipt_dialfromdt.refresh();
  444. ipt_dialfromtm.refresh();
  445. ipt_recdt.refresh();
  446. ipt_rectm.refresh();
  447. ipt_recid.refresh();
  448. opt_recnm.refresh();
  449. ipt_dialtodt.refresh();
  450. ipt_dialtotm.refresh();
  451. ipt_dryweig.refresh();
  452. ipt_idbdwtval.refresh();
  453. ipt_ufval.refresh();
  454. ipt_prebodyweig.refresh();
  455. ipt_postbodyweig.refresh();
  456. ipt_trgtweig.refresh();
  457. ipt_hprnfst.refresh();
  458. ipt_hprnmatn.refresh();
  459. ipt_bfrcd.refresh();
  460. ipt_durationflag.refresh();
  461. ipt_aterlpretm1.refresh();
  462. ipt_aterlpretm2.refresh();
  463. ipt_aterlpretm3.refresh();
  464. ipt_aterlpre1.refresh();
  465. ipt_aterlpre2.refresh();
  466. ipt_aterlpre3.refresh();
  467. ipt_veinprecntstm1.refresh();
  468. ipt_veinprecntstm2.refresh();
  469. ipt_veinprecntstm3.refresh();
  470. ipt_veinprecnts1.refresh();
  471. ipt_veinprecnts2.refresh();
  472. ipt_veinprecnts3.refresh();
  473. cmb_dialmach.refresh();
  474. cmb_dialmachnm.refresh();
  475. cmb_hdkindflag.refresh();
  476. ipt_startnurseid.refresh();
  477. opt_startnursenm.refresh();
  478. ipt_endnurseid.refresh();
  479. opt_tonurgnm.refresh();
  480. opt_rsrvdd.refresh();
  481. //alert(instance1.selectNodesXml("/root/main/reclist/recinfo/dialvitalsigninspspeclist/dialvitalsigninspspec"));
  482. model.makeNode("/root/main/reclist/recinfo/dialvitalsigninspspeclist/dialvitalsigninspspec");
  483. model.copyNode("/root/main/reclist/recinfo/dialvitalsigninspspeclist/dialvitalsigninspspec", "/root/temp/vitalinfo");
  484. grd_dialvitalsigninspspec.refresh();
  485. for(var i = grd_dialvitalsigninspspec.fixedRows; i < grd_dialvitalsigninspspec.rows; i++) {
  486. grd_dialvitalsigninspspec.rowStatus(i) = "1";
  487. }
  488. //20110404_KNUH_End
  489. } else {
  490. //인터페이스 안하는 경우
  491. for(var i=0; i<sTmpNode.length; i++) {
  492. model.makeValue(xPath + sTmpNode[i], model.getValue(xTmpPath + sTmpNode[i]));
  493. }
  494. if(model.getValue("/root/main/reclist/recinfo/recinfolists/dialplaccd") == ""){
  495. model.makeValue("/root/main/reclist/recinfo/recinfolists/dialplaccd", "01"); // 투석장소 ("01":인공신장실)
  496. }
  497. if(model.getValue("/root/main/reclist/recinfo/recinfolists/hdkindflag") == ""){
  498. model.makeValue("/root/main/reclist/recinfo/recinfolists/hdkindflag", "01"); // 투석구분 ("01":일반HD)
  499. }
  500. //** 그리드 초기화 **//
  501. model.removeNodeset("/root/main/reclist/recinfo/cruedrugspeclist/cruedrugspec"); // 처치 및 투약 초기화
  502. model.removeNodeset("/root/main/reclist/recinfo/nbpsinspspeclist/nbpsinspspec"); // 임상검사 초기화
  503. model.removeNodeset("/root/main/reclist/recinfo/dialvitalsigninspspeclist/dialvitalsigninspspec"); // Vital Sign 초기화
  504. // fClearChildNode("/root/main/reclist/recinfo/dialrecspeclist/dialrecspec" ); // 투석기록 초기화
  505. // model.removeNodeset("/root/main/reclist/recinfo/dialrecspeclist/dialrecspec" ); // 투석기록 초기화
  506. model.makeValue("/root/main/reclist/recinfo/recinfolists/rsrvdd" , selRsrvdd ); // 선택한 환자의 예약일자
  507. model.makeValue("/root/main/reclist/recinfo/recinfolists/recid" , getUserId() ); // 현재 로그인한 사용자 ID
  508. model.makeValue("/root/main/reclist/recinfo/recinfolists/recnm" , getUserName() ); // 현재 로그인한 사용자명
  509. model.makeValue("/root/main/reclist/recinfo/recinfolists/recdd" , currentDD.substr(0,8) ); // 기록일자
  510. model.makeValue("/root/main/reclist/recinfo/recinfolists/rectm" , currentDD.substr(9,4) ); // 기록시간
  511. model.makeValue("/root/main/reclist/recinfo/recinfolists/dialfromdd", currentDD.substr(0,8) ); // 투석시작일자
  512. model.makeValue("/root/main/reclist/recinfo/recinfolists/dialfromtm", currentDD.substr(9,4) ); // 투석시작시간
  513. model.makeValue("/root/main/reclist/recinfo/recinfolists/dialtodd" , currentDD.substr(0,8) ); // 투석종료일자
  514. model.makeValue("/root/main/reclist/recinfo/recinfolists/dialtotm" , currentDD.substr(9,4) ); // 투석종료시간
  515. model.makeValue("/root/main/reclist/recinfo/recinfolists/hdcretno" , selHdcretno ); // 선택한환자의 hdcretno-kys-20091222
  516. model.makeValue("/root/main/reclist/recinfo/recinfolists/instcd" , getUserInfo("dutplceinstcd")); // 현재 로그인한 사용자의 기관코드
  517. model.makeNode("/root/main/reclist/recinfo/recinfolists/signno"); // 인증번호
  518. model.makeValue("/root/main/reclist/recinfo/recinfolists/pid" , selPid ); // 등록번호
  519. model.makeValue("/root/main/reclist/recinfo/recinfolists/dialflag" , "H" ); // 투석구분(H:HD,P:PD)
  520. //기록자 정보 설정
  521. model.makeValue("/root/main/reclist/recinfo/recinfolists/recid" , getUserId() ); // 현재 로그인한 사용자 ID
  522. model.makeValue("/root/main/reclist/recinfo/recinfolists/recnm" , getUserName() ); // 현재 로그인한 사용자명
  523. model.makeValue("/root/main/reclist/recinfo/recinfolists/instcd", getUserInfo("dutplceinstcd")); // 현재 로그인한 사용자의 기관코드
  524. //** 시작간호사, 종료간호사 현재 로그인한 간호사로 Defalt 설정 **//
  525. model.makeValue("/root/main/reclist/recinfo/recinfolists/fromnurgid", getUserId() );
  526. model.makeValue("/root/main/reclist/recinfo/recinfolists/fromnurgnm", getUserName());
  527. model.makeValue("/root/main/reclist/recinfo/recinfolists/tonurgid" , getUserId() );
  528. model.makeValue("/root/main/reclist/recinfo/recinfolists/tonurgnm" , getUserName());
  529. //----------(20101225) 경북대
  530. //model.makeValue("/root/main/reclist/recinfo/recinfolists/etcremark", "" );
  531. //model.makeValue("/root/main/reclist/recinfo/recinfolists/etcremark", "" ;
  532. //----------(20101225) 경북대
  533. model.refresh();
  534. }
  535. } else {
  536. //** 기록조회시 **//
  537. model.removeNodeset("/root/main/reclist/recinfo");
  538. submit("TRMND00708", false);
  539. // 처치 및 투약, 임상검사 조회결과 없으면 그리드 초기화
  540. if(getNodesetCount("/root/main/reclist/recinfo/cruedrugspeclist/cruedrugspec")=="1" && model.getValue("/root/main/reclist/recinfo/cruedrugspeclist/cruedrugspec/cruedrug[1]/prcpcd")==""){
  541. model.removeNodeset("/root/main/reclist/recinfo/cruedrugspeclist/cruedrugspec"); // 처치 및 투약정보
  542. }
  543. if(getNodesetCount("/root/main/reclist/recinfo/nbpsinspspeclist/nbpsinspspec")=="1" && model.getValue("/root/main/reclist/recinfo/nbpsinspspeclist/nbpsinspspec/nbpsinsp[1]/prcpcd")==""){
  544. model.removeNodeset("/root/main/reclist/recinfo/nbpsinspspeclist/nbpsinspspec"); // 임상검사
  545. }
  546. if(model.getValue("/root/main/reclist/recinfo/recinfolists/duplchkyn") == "Y") { // 혈액투석간호기록 중복여부("Y":중복 / "N":중복안됨)
  547. grp_recinfo.disabled = false; // 혈액투석간호기록 그룹 활성화
  548. btn_new.disabled = true; // 신규등록버튼 비활성화
  549. //btn_dialrec.disabled = true;
  550. model.makeValue("/root/main/reclist/recinfo/recinfolists/status", "u"); // 상태값 설정 (update)
  551. } else if(model.getValue("/root/main/reclist/recinfo/recinfolists/duplchkyn") == "N") {
  552. grp_recinfo.disabled = true; // 혈액투석간호기록 그룹 비활성화
  553. btn_new.disabled = false; // 신규등록버튼 활성화
  554. //btn_dialrec.disabled = false;
  555. }
  556. var sSignNo = model.getValue("/root/main/reclist/recinfo/recinfolists/signno");
  557. if( sSignNo!= "" && sSignNo!=0){ // 인증저장 된 기록일 경우
  558. btn_tempsave.disabled = true;
  559. }
  560. // alert("2");
  561. model.refresh();
  562. }
  563. }
  564. /**
  565. * @group :
  566. * @ver : 2007.06.08
  567. * @by : 김진아
  568. * @---------------------------------------------------
  569. * @type : function
  570. * @access : public
  571. * @desc : 화면초기화
  572. * @param :
  573. * @return :
  574. * @---------------------------------------------------
  575. */
  576. function fInitInfo(){
  577. //** 초기화 **//
  578. var xPath = "/root/main/reclist/recinfo/recinfolists/"; // 투석기록정보 경로
  579. var sNode = "pid rsrvdd dialflag ioflag dialfromdd dialfromtm dialtodd dialtotm dryweig idbdwtval ufval prebodyweig postbodyweig trgtweig hprnfst hprnmatn bfrcd durationflag angiokindcd angiokindnm dialmachno dialliqd dialmach dialmachnm dialplaccd nigtflag fromnurgid fromnurgnm tonurgid tonurgnm hdkindflag duplchkyn status";
  580. sNode = sNode.split(" ");
  581. for(var i=0; i<sNode.length; i++) {
  582. model.makeValue(xPath + sNode[i], ""); // 투석기록정보
  583. }
  584. fClearChildNode("/root/main/reclist/recinfo/aterlprelist/aterlprespec" );
  585. fClearChildNode("/root/main/reclist/recinfo/veinprecntslist/veinprecntsspec");
  586. model.removeNodeset("/root/main/reclist/recinfo/dialvitalsigninspspeclist");
  587. model.removeNodeset("/root/main/reclist/recinfo/cruedrugspeclist" ); // 처치 및 투약정보
  588. model.removeNodeset("/root/main/reclist/recinfo/nbpsinspspeclist" ); // 임상검사
  589. model.removeNodeset("/root/main/reclist/recinfo/dialvitalsigninspspeclist"); // Vital Sign
  590. //model.removeNodeset("/root/main/spcffactlist" ); // 특이사항
  591. //model.removeNodeset("/root/main/bviplist" ); // 혈관내압측정비
  592. model.removeNodeset("/root/main/reclist/recinfo/dialrecspeclist" ); // 투석기록
  593. // 예약환자 리스트 셀 색상 초기화 (white)
  594. // 2008-08-08 삭제
  595. // for(var i=1; i<=grd_rsrvpatinfo.rows; i++) {
  596. // grd_rsrvpatinfo.cellstyle("background-color", i, 1, i, 5) = "white";
  597. // }
  598. grp_recinfo.disabled = true;
  599. btn_new.disabled = true;
  600. btn_dialrec.disabled = true;
  601. //model.refresh();
  602. }
  603. /**
  604. * @group :
  605. * @ver : 2007.10.30
  606. * @by : 김진아
  607. * @---------------------------------------------------
  608. * @type : function
  609. * @access : public
  610. * @desc : 투석기록초기화
  611. * @param :
  612. * @return :
  613. * @---------------------------------------------------
  614. */
  615. function fRecInitInfo(){
  616. var xPath = "/root/main/reclist/recinfo/recinfolists/"; // 투석기록정보 경로
  617. var sNode = "dialfromdd dialfromtm dialtodd dialtotm dryweig idbdwtval ufval prebodyweig postbodyweig trgtweig hprnfst hprnmatn bfrcd durationflag angiokindcd angiokindnm dialmachno dialliqd dialmach dialmachnm dialplaccd nigtflag fromnurgid fromnurgnm tonurgid tonurgnm hdkindflag duplchkyn status";
  618. sNode = sNode.split(" ");
  619. for(var i=0; i<sNode.length; i++) {
  620. model.makeValue(xPath + sNode[i], ""); // 투석기록정보
  621. }
  622. fClearChildNode("/root/main/reclist/recinfo/aterlprelist/aterlprespec" );
  623. fClearChildNode("/root/main/reclist/recinfo/veinprecntslist/veinprecntsspec");
  624. grp_recinfo.refresh();
  625. }
  626. /**
  627. * @group :
  628. * @ver : 2007.05.31
  629. * @vGrdObj : 그리드명
  630. * @by : 김진아
  631. * @---------------------------------------------------
  632. * @type : function
  633. * @access : public
  634. * @desc : 특이사항 리스트 행추가 화면 설정
  635. * @param :
  636. * @return :
  637. * @---------------------------------------------------
  638. */
  639. function fAddRowSpcfFact(vGrdObj){
  640. if (vGrdObj == null) return;
  641. vGrdObj.addItem(); // 그리드 행추가
  642. // alert(vGrdObj.rows);
  643. //kya 2011.10.04
  644. var list ="";
  645. var xPath ="";
  646. var itemflag ="";
  647. if(vGrdObj == grd_spcffactinfo ){
  648. xPath = "/root/main/spcffactlist/spcffactinfo";
  649. itemflag = "02"; //특이사항
  650. } else {
  651. xPath = "/root/main/bviplist/bvipinfo";
  652. itemflag = "09"; //혈관내압측정비
  653. }
  654. var sSelPid = selPid; //선택환자 등록번호
  655. var sRecId = model.getValue("/root/main/reclist/recinfo/recinfolists/recid"); // 기록자 아이디
  656. var iRow = vGrdObj.rows-1;
  657. model.makeValue( xPath +"[" + iRow + "]/pid" , sSelPid);
  658. model.makeValue( xPath +"[" + iRow + "]/recid", sRecId );
  659. if(iRow == 1){
  660. model.makeValue(xPath +list +"[" + iRow + "]/seqno", 1);
  661. } else{
  662. model.makeValue(xPath +"[" + iRow + "]/seqno", Number(model.getValue( xPath +"[" + (iRow-1) + "]/seqno"))+1);
  663. }
  664. model.makeValue(xPath +"[" + iRow + "]/recdd" , getCurrentDate() ); // 기록일자 지정(현재일자)
  665. model.makeValue(xPath +"[" + iRow + "]/rectm" , getCurrentTime().substr(0,4)); // 기록시간 지정(현재시간)
  666. model.makeValue(xPath +"[" + iRow + "]/status", "i" ); // 상태값 지정 (i)
  667. model.makeValue(xPath +"[" + iRow + "]/itemflag", itemflag ); // 상태값 지정 (i)
  668. }
  669. /**
  670. * @group :
  671. * @ver : 2007.05.31
  672. * @by : 김진아
  673. * @---------------------------------------------------
  674. * @type : function
  675. * @access : public
  676. * @desc : 특아사항 리스트 저장
  677. * @param :
  678. * @return :
  679. * @---------------------------------------------------
  680. */
  681. function fSaveSpcfFactList_original(){
  682. model.makeValue("/root/send/savedata",grd_spcffactinfo.getupdatedataAll("i"));
  683. submit("TXMND00701", false);
  684. // 특이사항 리스트 상태값 초기화
  685. for(var i=1; i<=grd_spcffactinfo.rows; i++) {
  686. grd_spcffactinfo.textmatrix(i, 1) = "";
  687. //model.makeValue("/root/main/spcffactlist/spcffactinfo[" + i + "]/status", "");
  688. }
  689. }
  690. /**
  691. * @group :
  692. * @ver : 2011.10.05
  693. * @by : 권영애
  694. * @---------------------------------------------------
  695. * @type : function
  696. * @access : public
  697. * @desc : 특아사항 리스트 저장
  698. * @param :
  699. * @return :
  700. * @---------------------------------------------------
  701. */
  702. function fSaveSpcfFactList(vGrdObj){
  703. model.makeValue("/root/send/savedata",vGrdObj.getupdatedataAll("i"));
  704. submit("TXMND00701", false);
  705. // 특이사항 리스트 상태값 초기화
  706. for(var i=1; i<=vGrdObj.rows; i++) {
  707. vGrdObj.textmatrix(i, 1) = "";
  708. //model.makeValue("/root/main/spcffactlist/spcffactinfo[" + i + "]/status", "");
  709. }
  710. }
  711. /**
  712. * @group :
  713. * @ver : 2007.05.31
  714. * @by : 김진아
  715. * @---------------------------------------------------
  716. * @type : function
  717. * @access : public
  718. * @desc : 특아사항 리스트 행삭제 화면 설정
  719. * @param :
  720. * @return :
  721. * @---------------------------------------------------
  722. **/
  723. function fDelRowSpcfFact_original(){
  724. var iRow = grd_spcffactinfo.row;
  725. var sStatus = grd_spcffactinfo.textmatrix(iRow, 1);
  726. //** 선택 행이 조회된 행(DB에 존재) 일때 (상태값 :s) **//
  727. if( sStatus != "i") {
  728. grd_spcffactinfo.textmatrix(iRow, 1) = "d"; // 상태값 지정 (d)
  729. if(messageBox("", "Q001", "") == 6) { // 메세지박스 ("삭제 하시겠습니까?") (return : yes=6, no=7)
  730. fSaveSpcfFactList(); //삭제저장
  731. fSrchSpcfFactList(); // 특이사항 리스트 조회
  732. } else {
  733. grd_spcffactinfo.textmatrix(iRow, 1) =sStatus; // 이전 상태값으로 복구
  734. return;
  735. }
  736. }
  737. //** 선택 행이 화면상에만 존재하는 행 일때 (상태값 :i) **//
  738. else if( sStatus == "i") {
  739. grd_spcffactinfo.deleteItem(iRow); // 그리드 행 삭제
  740. }
  741. }
  742. /**
  743. * @group :
  744. * @ver : 2011.10.05
  745. * @by : 권영애
  746. * @---------------------------------------------------
  747. * @type : function
  748. * @access : public
  749. * @desc : 특아사항 리스트 행삭제 화면 설정
  750. * @param :
  751. * @return :
  752. * @---------------------------------------------------
  753. */
  754. function fDelRowSpcfFact(vGrdObj){
  755. if (vGrdObj == null) return;
  756. var iRow = vGrdObj.row;
  757. var sStatus = vGrdObj.textmatrix(iRow, 1);
  758. //** 선택 행이 조회된 행(DB에 존재) 일때 (상태값 :s) **//
  759. if( sStatus != "i") {
  760. vGrdObj.textmatrix(iRow, 1) = "d"; // 상태값 지정 (d)
  761. if(messageBox("", "Q001", "") == 6) { // 메세지박스 ("삭제 하시겠습니까?") (return : yes=6, no=7)
  762. fSaveSpcfFactList(vGrdObj); //삭제저장
  763. fSrchSpcfFactList(vGrdObj); // 특이사항 리스트 조회
  764. } else {
  765. vGrdObj.textmatrix(iRow, 1) =sStatus; // 이전 상태값으로 복구
  766. return;
  767. }
  768. }
  769. //** 선택 행이 화면상에만 존재하는 행 일때 (상태값 :i) **//
  770. else if( sStatus == "i") {
  771. vGrdObj.deleteItem(iRow); // 그리드 행 삭제
  772. }
  773. }
  774. /**
  775. * @group :
  776. * @ver : 2007.06.01
  777. * @by : 김진아
  778. * @---------------------------------------------------
  779. * @type : function
  780. * @access : public
  781. * @desc : 특이사항 리스트 수정시 상태값 설정
  782. * @param :
  783. * @return :
  784. * @---------------------------------------------------
  785. */
  786. function fSetSpcfFactList_org(){
  787. var iRow = grd_spcffactinfo.row;
  788. if(grd_spcffactinfo.textmatrix(iRow, 1) == "s") { // 선택 행이 조회된 행(DB에 존재) 일때 (상태값 :s)
  789. grd_spcffactinfo.textmatrix(iRow, 1) = "u"; // 상태값 지정 (update)
  790. }
  791. }
  792. function fSetSpcfFactList(vGrdObj){
  793. var iRow = vGrdObj.row;
  794. if(vGrdObj.textmatrix(iRow, 1) == "s") { // 선택 행이 조회된 행(DB에 존재) 일때 (상태값 :s)
  795. vGrdObj.textmatrix(iRow, 1) = "u"; // 상태값 지정 (update)
  796. }
  797. }
  798. /**
  799. * @group :
  800. * @ver : 2007.06.04
  801. * @by : 김진아
  802. * @---------------------------------------------------
  803. * @type : function
  804. * @access : public
  805. * @desc : 혈액투석 간호기록 저장
  806. * @param : pFlag (T:임시저장, C:인증저장)
  807. * @return :
  808. * @---------------------------------------------------
  809. */
  810. function fSaveKTRecInfo(pFlag){
  811. if (model.getValue("/root/main/condition/srchpid") == "") {
  812. messageBox("등록번호 항목은", "I003");
  813. model.setFocus("ipt_srchpid");
  814. return;
  815. }
  816. if (model.getValue("/root/main/dialexaminfo/execdt") == "") {
  817. messageBox("검사일자 항목은", "I003");
  818. model.setFocus("ipt_execdt");
  819. return;
  820. }
  821. var retMsg = messageBox("저장하시겠습니까?", "S"); //yes=6, no=7
  822. if(retMsg == "6"){
  823. calAdequacy(); // 적절도 계산
  824. model.setValue("/root/main/dialexaminfo/srchpid", model.getValue("/root/main/condition/srchpid"));
  825. model.setValue("/root/main/dialexaminfo/calpcr", model.getValue("/root/main/caladequacy/calpcr"));
  826. model.setValue("/root/main/dialexaminfo/calurr", model.getValue("/root/main/caladequacy/calurr"));
  827. model.setValue("/root/main/dialexaminfo/calktv", model.getValue("/root/main/caladequacy/calktv"));
  828. model.makeValue("/root/main/dialexaminfo/calkrv", model.getValue("/root/main/caladequacy/calkrv"));
  829. model.makeValue("/root/main/dialexaminfo/calktv", model.getValue("/root/main/caladequacy/calktv"));
  830. model.makeValue("/root/main/dialexaminfo/calnpcr", model.getValue("/root/main/caladequacy/calnpcr"));
  831. model.makeValue("/root/main/dialexaminfo/calresiktv", model.getValue("/root/main/caladequacy/calresiktv"));
  832. model.setValue("/root/main/dialexaminfo/dialflag", "H"); // H = 혈액투석적절도
  833. model.makeValue("/root/main/dialexaminfo/certflag", pFlag);
  834. if(model.getValue("/root/main/dialexaminfo/dialseq") == ""){
  835. model.setValue("/root/main/dialexaminfo/dialseq", 0);
  836. }
  837. model.copyNode("/root/send/req/data1", "/root/main/dialexaminfo");
  838. var exec_date = model.getValue("/root/main/dialexaminfo/execdt");
  839. exec_date = exec_date.substr(0,4) + "-" + exec_date.substr(4,2) + "-" + exec_date.substr(6,2) + "-00.00.00.000000";
  840. model.setValue("/root/send/req/data1/execdt", exec_date);
  841. var sSignno = "";
  842. sSignno = model.getValue("/root/main/dialexamlist/info/signno");
  843. //갱신일경우
  844. // alert("sSignno = " + sSignno);
  845. // 인증저장일 경우
  846. if(pFlag == "C"){
  847. // 인증 로직 호출
  848. if(Sign.signprocess() == true){
  849. if (sSignno != "") {
  850. //alert("1");
  851. model.makeValue("/root/send/req/signdata/pid" , model.getValue("/root/main/dialexaminfo/pid")); // 등록번호
  852. model.makeValue("/root/send/req/signdata/orddd" , model.getValue("/root/main/dialexaminfo/orddd"));
  853. model.makeValue("/root/send/req/signdata/cretno" , model.getValue("/root/main/dialexaminfo/cretno")); // 생성번호
  854. model.makeValue("/root/send/req/signdata/signgenrflag", model.getValue("/root/main/dialexaminfo/info/ioflag")); // 서명발생구분 (코드정의서 M0010 참조)
  855. model.makeValue("/root/send/req/signdata/orddeptcd" , model.getValue("/root/main/dialexaminfo/info/orddeptcd")); // 진료부서코드
  856. model.makeValue("/root/send/req/signdata/orddrid" , model.getValue("/root/main/dialexaminfo/info/orddrid")); // 진료의사ID
  857. }else {
  858. //신규일경우
  859. //alert("2");
  860. var sIOFlag = model.getValue("/root/main/paminfo/list/ioflag" ); // I/O 구분
  861. model.makeValue("/root/send/req/signdata/pid", model.getValue("/root/main/paminfo/list/pid")); // 등록번호
  862. if(sIOFlag == "I" || sIOFlag == "E"){ // 진료일자
  863. model.makeValue("/root/send/req/signdata/orddd", model.getValue("/root/main/paminfo/list/indd"));
  864. }else if(sIOFlag == "O"){
  865. model.makeValue("/root/send/req/signdata/orddd", model.getValue("/root/main/paminfo/list/orddd"));
  866. }
  867. model.makeValue("/root/send/req/signdata/cretno" , model.getValue("/root/main/paminfo/list/cretno")); // 생성번호
  868. model.makeValue("/root/send/req/signdata/signgenrflag", sIOFlag); // 서명발생구분 (코드정의서 M0010 참조)
  869. model.makeValue("/root/send/req/signdata/orddeptcd" , model.getValue("/root/main/paminfo/list/orddeptcd")); // 진료부서코드
  870. model.makeValue("/root/send/req/signdata/orddrid" , model.getValue("/root/main/paminfo/list/orddrid")); // 진료의사ID
  871. }
  872. model.makeValue("/root/send/req/signdata/signno" , model.getValue("/root/main/dialexaminfo/signno")); // 서명번호
  873. model.makeValue("/root/send/req/signdata/recdd" , getCurrentDate()); // 실제 기록이 이루어진 기록일자(통합기록에서 보여짐)
  874. model.makeValue("/root/send/req/signdata/rectm" , getCurrentTime().substr(0,4)); // 실제 기록이 이루어진 기록시간(통합기록에서 보여짐)
  875. model.makeValue("/root/send/req/signdata/recsaveflag" , "Y"); // 전자서명 인적정보 변경여부(기록일시 변경되는 경우 : Y, 그외 : N)
  876. model.makeValue("/root/send/req/signdata/signflag" , "02"); // 서명자료구분(01 : 진료, 02 : 간호)
  877. model.makeValue("/root/send/req/signdata/formcd" , "1300014289"); // 각 기록지별 서식코드
  878. model.makeValue("/root/send/req/signdata/signbfcnts" , Sign.signedInfos[1]); // 인증할 데이터 정보(미기록 노드 제거된 정보)
  879. model.makeValue("/root/send/req/signdata/signaftcnts" , Sign.signedInfos[2]); // 공인인증 처리후 데이터
  880. }else{
  881. return false;
  882. }
  883. }
  884. //인증정보 저장 20130627 kya
  885. model.setValue("/root/send/req/data1/orddd",model.getValue("/root/send/req/signdata/orddd" ));
  886. model.setValue("/root/send/req/data1/cretno",model.getValue("/root/send/req/signdata/cretno" ));
  887. model.setValue("/root/send/req/data1/ioflag",model.getValue("/root/send/req/signdata/signgenrflag" ));
  888. model.setValue("/root/send/req/data1/orddeptcd",model.getValue("/root/send/req/signdata/orddeptcd" ));
  889. model.setValue("/root/send/req/data1/orddrid",model.getValue("/root/send/req/signdata/orddrid" ));
  890. if(submit("TXMMO08403", false)){
  891. doSearch("S"); // 이전 혈액투석적절도정보 조회
  892. }
  893. }
  894. }
  895. /* ------------------------------------------------- */
  896. /* desc : 인증데이터 만들기 */
  897. /* param : pModel - Model */
  898. /* tNode - Target Node */
  899. /* sNode - Source Node */
  900. /* return : */
  901. /* -------------------------------------------------- */
  902. function fMake_SignData(){
  903. Sign.addnode("/root/main/dialexaminfo");
  904. }
  905. /* ------------------------------------------------- */
  906. /* desc : Instance NodeCopy 하기(SMMNP007.js 참조) */
  907. /* param : pModel - Model */
  908. /* tNode - Target Node */
  909. /* sNode - Source Node */
  910. /* return : */
  911. /* -------------------------------------------------- */
  912. function XmlDataCheck(XmlInstNm) {
  913. XmlInstNm = XmlInstNm.split(" ");
  914. var tNode = "";
  915. var sNode = "";
  916. for (var i=0; i < XmlInstNm.length; i++){
  917. tNode = "/root/main/reclist/recinfo/" + XmlInstNm[i];
  918. if (instance1.selectSingleNode(tNode).childNodes.length < 1) {
  919. sNode = "/root/main/xmlformatlist/" + XmlInstNm[i];
  920. InstanceNodeCopy(model, tNode, sNode);
  921. }
  922. }
  923. }
  924. /* ------------------------------------------------- */
  925. /* desc : Instance NodeCopy 하기 (SMMNP007.js 참조) */
  926. /* param : pModel - Model */
  927. /* tNode - Target Node */
  928. /* sNode - Source Node */
  929. /* return : */
  930. /* -------------------------------------------------- */
  931. function InstanceNodeCopy(pModel, tNode, sNode) {
  932. pModel.copyNode(tNode, sNode );
  933. }
  934. /**
  935. * @group :
  936. * @ver : 2007.06.07
  937. * @by : 김진아
  938. * @---------------------------------------------------
  939. * @type : function
  940. * @access : public
  941. * @desc : 사용자팝업
  942. * @param :
  943. * @return :
  944. * @---------------------------------------------------
  945. */
  946. function fSrchNurs(userid){
  947. model.makeValue("/root/main/reclist/recinfo/recinfolists/userpopupinfo/param" , "_OneS"); // 한 사용자 선택 팝업을 띄울시 "팝업에 전달할 노드"/param 의 값 설정
  948. model.makeValue("/root/main/reclist/recinfo/recinfolists/userpopupinfo/flag" , "userid"); // 한 사용자 선택 팝업을 띄울시 "팝업에 전달할 노드"/flag 의 값 설정
  949. model.makeValue("/root/main/reclist/recinfo/recinfolists/userpopupinfo/searchitem" , userid); // 한 사용자 선택 팝업을 띄울시 "팝업에 전달할 노드"/searchitem 의 값 설정
  950. modal("../../userdeptinfoweb/xrw/SPZSU10103_사용자부서선택조회", 1, "200", "200", "SPZSU10103","/root/main/reclist/recinfo/recinfolists/userpopupinfo","/root/main/temp");
  951. var iParam = getParameter("SPZSU10103_");
  952. model.makeNode("/root/main/reclist/recinfo/recinfolists/onerowselect");
  953. setCSVToNode("/root/main/reclist/recinfo/recinfolists/onerowselect", iParam);
  954. clearParameter("SPZSU10103_");
  955. model.refresh();
  956. }
  957. /**
  958. * @group :
  959. * @ver : 2007.06.14
  960. * @by : 김진아
  961. * @---------------------------------------------------
  962. * @type : function
  963. * @access : public
  964. * @desc : 처치 및 투약 / 임상검사 처방정보조회
  965. * @param :
  966. * @return :
  967. * @---------------------------------------------------
  968. */
  969. function fSrchPrcp(prcpflag){
  970. model.removenode("/root/send");
  971. model.makeNode("/root/send");
  972. model.makeValue("/root/send/reqdata/pid" , model.getValue("/root/main/reclist/recinfo/recinfolists/pid") ); // 등록번호
  973. model.makeValue("/root/send/reqdata/rsrvdd" , model.getValue("/root/main/reclist/recinfo/recinfolists/rsrvdd")); // 예약일자
  974. model.makeValue("/root/send/reqdata/ioflag" , model.getValue("/root/main/reclist/recinfo/recinfolists/ioflag")); // 입원외래구분
  975. model.makeValue("/root/send/reqdata/prcpflag", prcpflag ); // 처방구분 ( cruedrug:처치 및 투약 / nbpsinsp:임상검사 )
  976. if(prcpflag == "cruedrug") { // 처치 및 투약
  977. model.removeNodeset("/root/main/reclist/recinfo/cruedrugspeclist");
  978. submit("TRMND00705");
  979. } else if(prcpflag == "nbpsinsp") { // 임상검사
  980. model.removeNodeset("/root/main/reclist/recinfo/nbpsinspspeclist");
  981. submit("TRMND00706");
  982. }
  983. }
  984. /**
  985. * @group :
  986. * @ver : 2007.07.25 // 수정일자 : 2007.09.21
  987. * @by : 최경용 // 수정자 : 김진아
  988. * @---------------------------------------------------
  989. * @type : function
  990. * @access : public
  991. * @desc : 참여자 정보 팝업 조회
  992. * @param : originalNode
  993. * @param : copyNode
  994. * @return : "true"/"false"
  995. * @---------------------------------------------------
  996. */
  997. function fClickUserBtn(setflag, userflag){
  998. var jobkindcd = "11";
  999. /* 20090330 서울성모병원 인공신장실부서코드변경으로 수정함(인공신장실Unit - > 인공신장실) */
  1000. //var deptcd = "2010702070"; // 인공신장실Unit 부서코드:"2010702070"
  1001. /*************************************************************/
  1002. //var deptcd = "2010702000"; // 인공신장실 부서코드:"2010702000"
  1003. //하드코드수정-20090416
  1004. var deptcd = model.getValue("/root/code/codeinfo/codelist/cdid");
  1005. //alert("deptcd = " + deptcd);
  1006. var titlenm = "인공신장실 간호사 리스트";
  1007. setParameter("SPMNN02100_deptcd" , deptcd);
  1008. setParameter("SPMNN02100_jobkindcd", jobkindcd);
  1009. setParameter("SPMNN02100_titlenm" , titlenm);
  1010. setParameter("SPMNN02100_userflag" , userflag);
  1011. modal("SPMNN02100", 1);
  1012. var userid = getParameter("SPMNN02100_userid");
  1013. var usernm = getParameter("SPMNN02100_usernm");
  1014. if(userid != ""){
  1015. if(setflag == "start"){ // 시작간호사
  1016. model.makeValue("/root/main/reclist/recinfo/recinfolists/fromnurgid", userid);
  1017. model.makeValue("/root/main/reclist/recinfo/recinfolists/fromnurgnm", usernm);
  1018. } else if(setflag == "to"){ // 종료간호사
  1019. model.makeValue("/root/main/reclist/recinfo/recinfolists/tonurgid", userid);
  1020. model.makeValue("/root/main/reclist/recinfo/recinfolists/tonurgnm", usernm);
  1021. } else if(setflag == "user"){ // 기록자
  1022. model.makeValue("/root/main/reclist/recinfo/recinfolists/recid", userid);
  1023. model.makeValue("/root/main/reclist/recinfo/recinfolists/recnm", usernm);
  1024. }
  1025. }
  1026. else{
  1027. if(setflag == "start"){ // 시작간호사
  1028. model.makeValue("/root/main/reclist/recinfo/recinfolists/fromnurgid", "");
  1029. model.makeValue("/root/main/reclist/recinfo/recinfolists/fromnurgnm", "");
  1030. model.setFocus("ipt_startnurseid");
  1031. } else if(setflag == "to"){ // 종료간호사
  1032. model.makeValue("/root/main/reclist/recinfo/recinfolists/tonurgid", "");
  1033. model.makeValue("/root/main/reclist/recinfo/recinfolists/tonurgnm", "");
  1034. model.setFocus("ipt_endnurseid");
  1035. } else if(setflag == "user"){ // 기록자
  1036. model.makeValue("/root/main/reclist/recinfo/recinfolists/recid", "");
  1037. model.makeValue("/root/main/reclist/recinfo/recinfolists/recnm", "");
  1038. model.setFocus("ipt_recid");
  1039. }
  1040. }
  1041. setParameter("SPMNN02100_userid", "");
  1042. setParameter("SPMNN02100_usernm", "");
  1043. model.refresh();
  1044. }
  1045. /**
  1046. * creat : 20090108
  1047. * author : dhkim
  1048. * desc : 내환자세팅된 간호사 load
  1049. */
  1050. function fLoadMyPatSetting(){
  1051. model.removenode('/root/send');
  1052. model.makeValue('/root/send/wardcd', getUserInfo('dutplcecd'));
  1053. model.refresh();
  1054. //submit 호출
  1055. if(!submit('TRMND03402')){
  1056. messageBox('조회를 실패하였습니다.', 'E999');
  1057. return;
  1058. }
  1059. }
  1060. /**
  1061. * @group :
  1062. * @ver : 2015.04.01
  1063. * @by : 권영애
  1064. * @---------------------------------------------------
  1065. * @type : function fDelKTRecInfo
  1066. * @access : public
  1067. * @desc : 혈액투석 적절도 삭제
  1068. * @param :
  1069. * @return :
  1070. * @---------------------------------------------------
  1071. */
  1072. function fDelKTRecInfo(pFlag){
  1073. var execdt = model.getValue("/root/main/dialexaminfo/execdt");
  1074. var recid = model.getValue("/root/main/dialexaminfo/recid");
  1075. var recnm = model.getValue("/root/main/dialexaminfo/recnm");
  1076. if(recid != getUserId() && 'AST' != getUserId() && 'EMR' != getUserId() ){
  1077. messageBox('기록을 입력한 등록자( ' + recnm + ' )만 해당 기록내역을 삭제하실 수 있습니다.' , 'E');
  1078. return ;
  1079. }
  1080. var msg = messageBox(execdt.substr(4,2) + "월 " + execdt .substr(6,2) + "일 " + " 혈액투석적절도 기록을 삭제하시겠습니까?", "S");
  1081. if(msg == 6){
  1082. model.makeValue("/root/main/dialexaminfo/state", "D"); // 상태값 설정 (delete)
  1083. model.copyNode("/root/send/req/data1", "/root/main/dialexaminfo");
  1084. model.makeValue("/root/send/savedata/certflag", pFlag); // 인증여부( T : 임시저장, C : 인증저장)
  1085. var exec_date = execdt.substr(0,4) + "-" + execdt.substr(4,2) + "-" + execdt.substr(6,2) + "-00.00.00.000000";
  1086. model.setValue("/root/send/req/data1/execdt", exec_date);
  1087. // 인증 로직 호출
  1088. if(Sign.signprocess() == true){
  1089. model.removeNodeset("/root/send/savedata/signinfo");
  1090. model.makeValue("/root/send/req/signdata/pid" , model.getValue("/root/main/dialexaminfo/srchpid"));
  1091. model.makeValue("/root/send/req/signdata/orddd" , model.getValue("/root/main/dialexaminfo/orddd"));
  1092. model.makeValue("/root/send/req/signdata/signno" , model.getValue("/root/main/dialexaminfo/signno")); // 서명번호
  1093. model.makeValue("/root/send/req/signdata/cretno" , model.getValue("/root/main/dialexaminfo/cretno")); // 생성번호
  1094. model.makeValue("/root/send/req/signdata/recdd" , getCurrentDate()); // 실제 기록이 이루어진 기록일자(통합기록에서 보여짐)
  1095. model.makeValue("/root/send/req/signdata/rectm" , getCurrentTime().substr(0,4)); // 실제 기록이 이루어진 기록시간(통합기록에서 보여짐)
  1096. model.makeValue("/root/send/req/signdata/recsaveflag" , "Y"); // 전자서명 인적정보 변경여부(기록일시 변경되는 경우 : Y, 그외 : N)
  1097. model.makeValue("/root/send/req/signdata/signflag" , "02"); // 서명자료구분(01 : 진료, 02 : 간호)
  1098. model.makeValue("/root/send/req/signdata/formcd" , "1300014289"); // 각 기록지별 서식코드
  1099. model.makeValue("/root/send/req/signdata/signbfcnts" , Sign.signedInfos[1]); // 인증할 데이터 정보(미기록 노드 제거된 정보)
  1100. model.makeValue("/root/send/req/signdata/signaftcnts" , Sign.signedInfos[2]); // 공인인증 처리후 데이터
  1101. }else{
  1102. return false;
  1103. }
  1104. //인증정보 저장 20130627 kya
  1105. model.setValue("/root/send/req/data1/orddd",model.getValue("/root/send/req/signdata/orddd" ));
  1106. model.setValue("/root/send/req/data1/cretno",model.getValue("/root/send/req/signdata/cretno" ));
  1107. model.setValue("/root/send/req/data1/ioflag",model.getValue("/root/send/req/signdata/signgenrflag" ));
  1108. model.setValue("/root/send/req/data1/orddeptcd",model.getValue("/root/send/req/signdata/orddeptcd" ));
  1109. model.setValue("/root/send/req/data1/orddrid",model.getValue("/root/send/req/signdata/orddrid" ));
  1110. if(submit("TXMMO08403", false)){
  1111. doSearch("D"); // 혈액투석적절도 조회
  1112. }
  1113. }
  1114. }
  1115. /**
  1116. * @group :
  1117. * @ver : 2010.01.25
  1118. * @by : 김양수
  1119. * @---------------------------------------------------
  1120. * @type : function
  1121. * @access : public
  1122. * @desc : 혈액투석 간호기록 삭제
  1123. * @param :
  1124. * @return :
  1125. * @---------------------------------------------------
  1126. */
  1127. function fDelHDRecInfo(pFlag){
  1128. //20100125 기록자만이 삭제를 할 수 있다.
  1129. var xPath = "/root/main/reclist/recinfo/recinfolists/";
  1130. var recid = model.getValue(xPath + "recid");
  1131. var recnm = model.getValue(xPath + "recnm");
  1132. var rsrvdd = model.getValue("/root/temp/tmpselinfo/tmptstvdd"); //20100208-kys
  1133. var shiftflag = model.getValue("/root/temp/tmpselinfo/tmpshiftflag"); //20100208-kys
  1134. if(recid != getUserId()){
  1135. messageBox('기록을 입력한 등록자( ' + recnm + ' )만 해당 기록내역을 삭제하실 수 있습니다.' , 'E');
  1136. return ;
  1137. }else{
  1138. var msg = messageBox(rsrvdd.substr(4,2) + "월 " + rsrvdd.substr(6,2) + "일 " + shiftflag + " shift 기록정보를 삭제하시겠습니까?", "S");
  1139. if(msg == 6){
  1140. //20100208-kys-Type2기록이 존재할 경우 알림 팝업 추가
  1141. if(getNodesetCount("/root/main/reclist/recinfo/dialrecspeclist/dialrecspec/dialrec") > 0) {
  1142. messageBox(rsrvdd.substr(4,2) + "월 " + rsrvdd.substr(6,2) + "일 " + shiftflag + " shift 투석기록이 존재합니다. 해당 기록은 간호일지 Type2에서 삭제하시기 바랍니다." , "I");
  1143. }
  1144. XmlDataCheck(XmlInstNm);
  1145. model.makeValue(xPath+"recdt" , model.getValue(xPath+"recdd") + model.getValue(xPath+"rectm") ); // 기록일시
  1146. model.makeValue(xPath+"dialfromdt", model.getValue(xPath+"dialfromdd") + model.getValue(xPath+"dialfromtm")); // 투석시작일시
  1147. model.makeValue(xPath+"dialtodt" , model.getValue(xPath+"dialtodd") + model.getValue(xPath+"dialtotm") ); // 투석종료일시
  1148. model.makeValue(xPath+"dialfromdt", model.getValue(xPath+"dialfromdd") + model.getValue(xPath+"dialfromtm"));
  1149. model.makeValue(xPath+"status", "d"); // 상태값 설정 (update)
  1150. model.removenode("/root/send");
  1151. model.makeNode ("/root/send/savedata");
  1152. copyNodeType("/root/send/savedata", "/root/main/reclist/recinfo/recinfolists");
  1153. model.makeValue("/root/send/savedata/certflag", pFlag); // 인증여부( T : 임시저장, C : 인증저장)
  1154. // 인증 로직 호출
  1155. if(Sign.signprocess() == true){
  1156. model.removeNodeset("/root/send/savedata/signinfo");
  1157. var sIOFlag = model.getValue("/root/temp/paminfo/list/ioflag" ); // I/O 구분
  1158. model.makeValue("/root/send/signdata/pid", model.getValue("/root/temp/paminfo/list/pid")); // 등록번호
  1159. if(sIOFlag == "I" || sIOFlag == "E"){ // 진료일자
  1160. model.makeValue("/root/send/signdata/orddd", model.getValue("/root/temp/paminfo/list/indd"));
  1161. }else if(sIOFlag == "O"){
  1162. model.makeValue("/root/send/signdata/orddd", model.getValue("/root/temp/paminfo/list/orddd"));
  1163. }
  1164. model.makeValue("/root/send/signdata/signno" , model.getValue("/root/main/reclist/recinfo/recinfolists/signno")); // 서명번호
  1165. model.makeValue("/root/send/signdata/cretno" , model.getValue("/root/temp/paminfo/list/cretno")); // 생성번호
  1166. model.makeValue("/root/send/signdata/recdd" , model.getValue("/root/main/reclist/recinfo/recinfolists/recdd")); // 실제 기록이 이루어진 기록일자(통합기록에서 보여짐)
  1167. model.makeValue("/root/send/signdata/rectm" , model.getValue("/root/main/reclist/recinfo/recinfolists/rectm")); // 실제 기록이 이루어진 기록시간(통합기록에서 보여짐)
  1168. model.makeValue("/root/send/signdata/recsaveflag" , "Y"); // 전자서명 인적정보 변경여부(기록일시 변경되는 경우 : Y, 그외 : N)
  1169. model.makeValue("/root/send/signdata/signflag" , "02"); // 서명자료구분(01 : 진료, 02 : 간호)
  1170. model.makeValue("/root/send/signdata/signgenrflag", sIOFlag); // 서명발생구분 (코드정의서 M0010 참조)
  1171. model.makeValue("/root/send/signdata/formcd" , "0000002496"); // 각 기록지별 서식코드
  1172. model.makeValue("/root/send/signdata/orddeptcd" , model.getValue("/root/temp/paminfo/list/orddeptcd")); // 진료부서코드
  1173. model.makeValue("/root/send/signdata/orddrid" , model.getValue("/root/temp/paminfo/list/medispclid")); // 진료의사ID
  1174. model.makeValue("/root/send/signdata/signbfcnts" , Sign.signedInfos[1]); // 인증할 데이터 정보(미기록 노드 제거된 정보)
  1175. model.makeValue("/root/send/signdata/signaftcnts" , Sign.signedInfos[2]); // 공인인증 처리후 데이터
  1176. }else{
  1177. return false;
  1178. }
  1179. if(submit("TXMND00702", false)){
  1180. fPastDialRecInfo(); // 이전 혈액투석간호기록 조회
  1181. }
  1182. }else{
  1183. return;
  1184. }
  1185. }
  1186. }
  1187. //----------(20101225) 경북대
  1188. // 기본값표시
  1189. function fnDefaultCol() {
  1190. // duration(hr) : 4
  1191. model.setValue("/root/main/reclist/recinfo/recinfolists/durationflag","4");
  1192. // 항응고요법초기/유지
  1193. model.setValue("/root/main/reclist/recinfo/recinfolists/hprnfst",1000);
  1194. model.setValue("/root/main/reclist/recinfo/recinfolists/hprnmatn",750);
  1195. // bfr
  1196. model.setValue("/root/main/reclist/recinfo/recinfolists/bfrcd","230");
  1197. // 투석장소
  1198. model.setValue("/root/main/reclist/recinfo/recinfolists/dialplaccd","01");
  1199. //투석구분 : 일반hd
  1200. model.setValue("/root/main/reclist/recinfo/recinfolists/hdkindflag","01");
  1201. // 투석액 : BCG액
  1202. model.setValue("/root/main/reclist/recinfo/recinfolists/dialliqd","06");
  1203. //투석막 2011.09.14 by kya
  1204. //FX60M
  1205. model.setValue("/root/main/reclist/recinfo/recinfolists/dialmemcd","04");
  1206. model.refresh();
  1207. }
  1208. // 필수항목표시
  1209. function fnessential() {
  1210. ipt_recdt.attribute("background-color") = fEssentialBackColor; //기록일시
  1211. ipt_rectm.attribute("background-color") = fEssentialBackColor; //
  1212. ipt_dialfromdt.attribute("background-color") = fEssentialBackColor; //투석시작
  1213. ipt_dialfromtm.attribute("background-color") = fEssentialBackColor; //
  1214. ipt_dialtodt.attribute("background-color") = fEssentialBackColor; //투석종료
  1215. ipt_dialtotm.attribute("background-color") = fEssentialBackColor; //
  1216. ipt_durationflag.attribute("background-color") = fEssentialBackColor; //DURATION
  1217. cmb_hdkindflag.attribute("background-color") = fEssentialBackColor; //투석구분
  1218. ipt_hprnfst.attribute("background-color") = fEssentialBackColor; //항응고용법
  1219. ipt_hprnmatn.attribute("background-color") = fEssentialBackColor; //DURATION
  1220. cmb_hdkindflag.attribute("background-color") = fEssentialBackColor; //투석구분
  1221. cmb_dialliqd.attribute("background-color") = fEssentialBackColor; //투석액
  1222. ipt_bfrcd.attribute("background-color") = fEssentialBackColor; //BFR
  1223. cmb_dialplaccd.attribute("background-color") = fEssentialBackColor; //투석장소
  1224. cmb_dialmemcd.attribute("background-color") = fEssentialBackColor; //투석막 2011.09.14
  1225. }
  1226. //----------(20101225) 경북대