SMMND00700.js 67 KB

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