SMMND00800.js 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772
  1. /*
  2. 복막투석실시관리(SMMND00800.xrw - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. */
  6. //**전역변수**//
  7. var sRecHistRow = "";
  8. var XmlInstNm = "pdinfospeclist/pdinfospec" + " " // 복막투석정보
  9. + "epospeclist/epospec" + " " // EPO 내역
  10. + "insulinspeclist/insulinspec" + " " // 인슐린 내역
  11. + "bizexecspeclist/bizexecspec"; // 업무실시 내역
  12. //20090902-kys=======================
  13. var zbcResultRef = "/root/hidden/zbc/resultref";
  14. var zbcM0132Ref = "/root/init/M0132list/M0132";
  15. function makeZbcResultRef(){ model.makeNode(zbcResultRef); }
  16. function removeZbcResultRef(){ model.removeNode(zbcResultRef); }
  17. function removeM0132ResultRef(){ model.removeNodeset(zbcM0132Ref); }
  18. //20090902-kys=============================
  19. /**
  20. * @group :
  21. * @ver : 2007.05.31
  22. * @by : 김진아
  23. * @---------------------------------------------------
  24. * @type : function
  25. * @access : public
  26. * @desc : 화면 초기화
  27. * @param :
  28. * @return :
  29. * @---------------------------------------------------
  30. */
  31. function fDone(){
  32. //**그리드 초기화**//
  33. model.removeNodeset("/root/main/pdmatnpatlist"); // 복막투석 유지환자 리스트
  34. model.removeNodeset("/root/main/rechistlist"); // 복막투석 실시등록 리스트
  35. //model.refresh();
  36. //**공통코드 가져오기**//
  37. zbcfGetCodeList( new Array ( "M0130" // APD종류
  38. , "M0131" // 복막투석액 회사명
  39. , "M0132" // 복막투석액
  40. )
  41. , new Array ( "/root/init/M0130list" // APD종류
  42. , "/root/init/M0131list" // 복막투석액 회사명
  43. , "/root/init/M0132list" // 복막투석액
  44. )
  45. );
  46. //** 상단환자 화면설정 **//
  47. var node = getGlobalVariable("paminfo");
  48. setCSVToNode("/root/temp/paminfo", node);
  49. if(getNodesetCount("/root/temp/paminfo") > 0) {
  50. var sSelPid = model.getValue("/root/temp/paminfo/list/pid"); // 등록번호
  51. model.setValue("/root/main/condition/pid", sSelPid);
  52. }
  53. fSrchPDMatnPatList(); // 복막투석 유지환자리스트 조회
  54. if(model.getValue("/root/main/condition/pid") != "") {
  55. var iRow = 1;
  56. fInit(); // 초기화
  57. var sSelPid = grd_pdmatnpatinfo.textmatrix(iRow, 1); // 등록번호
  58. var sMaintePatRgstDD = grd_pdmatnpatinfo.textmatrix(iRow, 4); // 유지환자 등록일자
  59. // 선택 행 셀 색상 지정
  60. grd_pdmatnpatinfo.cellstyle("background-color", iRow, 1, iRow, 4) = "#ffd9ff";
  61. fGetPatInfo(sSelPid, sMaintePatRgstDD); // 환자정보 설정
  62. fSrchPatHist(); // 복막투석 실시등록 리스트 조회
  63. }
  64. }
  65. /**
  66. * @group :
  67. * @ver : 2007.06.18
  68. * @by : 김진아
  69. * @---------------------------------------------------
  70. * @type : function
  71. * @access : public
  72. * @desc : 회사명별 투석액 콤보 설정
  73. * @param :
  74. * @return :
  75. * @---------------------------------------------------
  76. */
  77. function fGetDialLiqList(){
  78. /*zbcfGetKindCodeList(
  79. new Array("M0028"), //업무규칙
  80. new Array("M0132"), //코드군
  81. new Array("/root/init/M0132list"), //노드
  82. true, //minimum : true TRZBC00105
  83. new Array("cdid"), //sorting 항목
  84. new Array("asc")
  85. ); */
  86. //20090923-kys수정(회사별 투석액설정)
  87. var sSelCmpyCd = model.getValue("root/main/reclist/recinfo/recinfolists/cmpycd");
  88. fGetChildCodeList("M0132", "/root/init/M0132list", sSelCmpyCd);//20090902-kys
  89. cmb_dialliqdcd.refresh();
  90. }
  91. /**
  92. * @group :
  93. * @ver : 2007.06.08
  94. * @by : 김진아
  95. * @---------------------------------------------------
  96. * @type : function
  97. * @access : public
  98. * @desc : 복막투석 유지환지리스트 조회
  99. * @param :
  100. * @return :
  101. * @---------------------------------------------------
  102. */
  103. function fSrchPDMatnPatList(){
  104. model.removenode("/root/send");
  105. model.makeNode("/root/send");
  106. model.makeValue("/root/send/reqdata/pid",model.getValue("/root/main/condition/pid"));
  107. model.makeValue("/root/send/reqdata/dialflag", "P"); // 투석구분 (P:복막)
  108. //model.removeNodeset("/root/main/pdmatnpatlist/pdmatnpatinfo");
  109. model.removeNodeset("/root/main/pdmatnpatlist");
  110. submit("TRMND00801");
  111. if(model.getValue("/root/main/condition/pid") != "") {
  112. // grd_pdmatnpatinfo.cellstyle("background-color", 1, 1, 1, 3) = "#ffd9ff"; // 복막투석 유지환자리스트 셀 색상 지정
  113. for(var i=1; i<=grd_rechistinfo.rows; i++) {
  114. grd_rechistinfo.cellstyle("background-color", i, 1, i, 3) = "white"; // 복막투석 실시등록 리스트 셀 색상 초기화 (white)
  115. }
  116. //fGetPatInfo(model.getValue("/root/main/pdmatnpatlist/pdmatnpatinfo[1]/pid"), model.getValue("/root/main/pdmatnpatlist/pdmatnpatinfo[1]/maintepatrgstdd")); // 환자정보 설정
  117. //fSrchPatHist(); // 복막투석 실시등록 리스트 조회 // 환자별 도관기록 리스트 조회
  118. }
  119. }
  120. /**
  121. * @group :
  122. * @ver : 2015.07.22
  123. * @by : 권영애
  124. * @---------------------------------------------------
  125. * @type : function
  126. * @access : public
  127. * @desc : 복막투석적절도검사일과 결과 조회
  128. * @param :
  129. * @return :
  130. * @---------------------------------------------------
  131. */
  132. function fSrchPDKTVInfo(sSelPid){
  133. model.removenode("/root/send");
  134. model.makeNode("/root/send");
  135. model.makeValue("/root/send/reqdata/pid",sSelPid);
  136. model.makeValue("/root/send/reqdata/dialflag", "P"); // 투석구분 (P:복막)
  137. //model.removeNodeset("/root/main/pdmatnpatlist/pdmatnpatinfo");
  138. model.removeNodeset("/root/main/pdktvinfo");
  139. submit("TRMND00808");
  140. }
  141. /**
  142. * @group :
  143. * @ver : 2007.06.25
  144. * @by : 김진아
  145. * @---------------------------------------------------
  146. * @type : function
  147. * @access : public
  148. * @desc : 초기화
  149. * @param :
  150. * @return :
  151. * @---------------------------------------------------
  152. */
  153. function fInit(){
  154. // 초기화
  155. if(getNodesetCount("/root/main/reclist/recinfo/recinfolists")>0){
  156. fClearChildNode("/root/main/reclist/recinfo/recinfolists"); // 복막투석정보
  157. }
  158. if(getNodesetCount("/root/main/reclist/recinfo/pdinfospeclist")>0){
  159. fClearChildNode("/root/main/reclist/recinfo/pdinfospeclist/pdinfospec"); // 복막투석정보(XML)
  160. }
  161. if(getNodesetCount("/root/main/reclist/recinfo/epospeclist")>0){
  162. fClearChildNode("/root/main/reclist/recinfo/epospeclist/epospec"); // EPO내역
  163. }
  164. if(getNodesetCount("/root/main/reclist/recinfo/insulinspeclist")>0){
  165. fClearChildNode("/root/main/reclist/recinfo/insulinspeclist/insulinspec"); // 인슐린내역
  166. }
  167. if(getNodesetCount("/root/main/reclist/recinfo/bizexecspeclist")>0){
  168. fClearChildNode("/root/main/reclist/recinfo/bizexecspeclist/bizexecspec"); // 업무실시 내역
  169. }
  170. model.setValue("/root/main/condition/recfromdd", ""); // 조회기간 초기화
  171. model.setValue("/root/main/condition/rectodd", "");
  172. model.makeValue("/root/main/pdktvinfo/execdt",""); //20150723 적절도평가일자 초기화
  173. model.makeValue("/root/main/pdktvinfo/ktvrsltcnts",""); //20150723 적절도결과일자 초기화
  174. grp_pdrecinfo.disabled = true; // 복막투석실시기록 활성화
  175. btn_newrgst.disabled = false; // 신규등록버튼 활성화
  176. grp_optapd.visible = false;
  177. //기록자 정보 설정
  178. model.makeValue("/root/main/reclist/recinfo/recinfolists/recid", getUserId()); // 현재 로그인한 사용자 ID
  179. model.makeValue("/root/main/reclist/recinfo/recinfolists/recnm", getUserName()); // 현재 로그인한 사용자명
  180. // 유지환자 리스트 셀 색상 초기화 (white)
  181. for(var i=1; i<=grd_pdmatnpatinfo.rows; i++) {
  182. grd_pdmatnpatinfo.cellstyle("background-color", i, 1, i, 4) = "white";
  183. }
  184. model.refresh();
  185. }
  186. /**
  187. * @group :
  188. * @ver : 2007.06.08
  189. * @by : 김진아
  190. * @---------------------------------------------------
  191. * @type : function
  192. * @access : public
  193. * @desc : 선택 환자 정보 설정(복막투석 유지환자리스트 더블클릭 시)
  194. * @param :
  195. * @return :
  196. * @---------------------------------------------------
  197. */
  198. function fGetPatInfo(sSelPid, sMaintePatRgstDD){
  199. // 환자정보 설정
  200. model.makeValue("/root/main/reclist/recinfo/recinfolists/pid", sSelPid); // 선택환자 등록번호
  201. model.makeValue("/root/main/reclist/recinfo/recinfolists/maintepatrgstdd", sMaintePatRgstDD); // 선택환자 유지환자등록일자
  202. //2008-08-07 : 기록일자- default 지정
  203. model.setValue("/root/main/condition/rectodd", getCurrentDate());
  204. model.setValue("/root/main/condition/recfromdd", getDateCalc(getCurrentDate(), 365*2, '-'));
  205. //model.refresh();
  206. }
  207. /**
  208. * @group :
  209. * @ver : 2007.06.08
  210. * @by : 김진아
  211. * @---------------------------------------------------
  212. * @type : function
  213. * @access : public
  214. * @desc : 복막투석 간호기록 저장
  215. * @param : pFlag : 저장구분("T":임시저장, "C":인증저장)
  216. * @return :
  217. * @---------------------------------------------------
  218. */
  219. function fSavePDRecInfo(pFlag){
  220. if(model.getValue("/root/main/reclist/recinfo/recinfolists/recdd")=="" || model.getValue("/root/main/reclist/recinfo/recinfolists/rectm")==""){
  221. messageBox("기록일시를 입력하십시오.", "E");
  222. model.setFocus("ipt_recdd"); return;
  223. }
  224. //** 2011.05.25 권영애 **//
  225. if(pFlag == "C" && model.getValue("/root/main/reclist/recinfo/recinfolists/histstat") == "O") {
  226. messageBox("외래환자는 인증저장할 수 없습니다. 저장하세요", "E");
  227. return;
  228. }
  229. //** 동일기록일시에 복막투석 실시기록 존재여부 확인 **//
  230. if(model.getValue("/root/main/reclist/recinfo/recinfolists/status") == "i") {
  231. model.removenode("/root/send");
  232. model.makeNode ("/root/send");
  233. model.makeValue ("/root/send/reqdata/pid" , model.getValue("/root/main/reclist/recinfo/recinfolists/pid") );
  234. model.makeValue ("/root/send/reqdata/recdd", model.getValue("/root/main/reclist/recinfo/recinfolists/recdd"));
  235. model.makeValue ("/root/send/reqdata/rectm", model.getValue("/root/main/reclist/recinfo/recinfolists/rectm"));
  236. model.removeNodeset("/root/main/chklist");
  237. submit("TRMND00805");
  238. // 동일기록일자에 복막실시기록 존재 할 경우
  239. if(model.getValue("/root/main/chklist/chkinfo/pid") != "") {
  240. messageBox("동일일시에 복막투석 실시기록이 존재합니다.", "E");
  241. // 기록일시 설정
  242. model.makeValue("/root/main/reclist/recinfo/recinfolists/recdd", getCurrentDate()); // 기록일자
  243. model.makeValue("/root/main/reclist/recinfo/recinfolists/rectm", getCurrentTime().substr(0,4)); // 기록시간
  244. //fSrchPastPDInfo(); // 최근 복막투석 실시기록 조회
  245. model.refresh();
  246. return;
  247. }
  248. }
  249. //** 저장실행 **//
  250. XmlDataCheck(XmlInstNm);
  251. model.removenode("/root/send");
  252. model.makeNode ("/root/send/savedata");
  253. copyNodeType ("/root/send/savedata", "/root/main/reclist/recinfo/recinfolists");
  254. model.makeValue("/root/send/savedata/certflag", pFlag); // 인증여부( T : 임시저장, C : 인증저장)
  255. model.removeNodeset("/root/send/savedata/pdinfospeclist");
  256. sXml = instance1.selectNodesXml("/root/main/reclist/recinfo/pdinfospeclist/pdinfospec"); // 투석정보
  257. model.makeValue("/root/send/savedata/pdinfospeclist", sXml);
  258. model.removeNodeset("/root/send/savedata/epospeclist");
  259. sXml = instance1.selectNodesXml("/root/main/reclist/recinfo/epospeclist/epospec"); // epo 내역
  260. model.makeValue("/root/send/savedata/epospeclist", sXml);
  261. model.removeNodeset("/root/send/savedata/insulinspeclist");
  262. sXml = instance1.selectNodesXml("/root/main/reclist/recinfo/insulinspeclist/insulinspec"); // 인슐린 내역
  263. model.makeValue("/root/send/savedata/insulinspeclist", sXml);
  264. model.removeNodeset("/root/send/savedata/bizexecspeclist");
  265. sXml = instance1.selectNodesXml("/root/main/reclist/recinfo/bizexecspeclist/bizexecspec"); // 업무실시 내역
  266. model.makeValue("/root/send/savedata/bizexecspeclist", sXml);
  267. //** 복막투석실시관리 인증저장기능 삭제됨. 주석처리(2007-12-17) **//
  268. // 인증저장일 경우
  269. if(pFlag == "C"){
  270. if(Sign.signprocess() == true){ // 인증 로직 호출
  271. model.removeNodeset("/root/send/savedata/signinfo");
  272. model.makeValue("/root/send/savedata/signinfo/pid" , model.getValue("/root/main/reclist/recinfo/recinfolists/pid") ); // 등록번호
  273. model.makeValue("/root/send/savedata/signinfo/orddd" , model.getValue("/root/main/reclist/recinfo/recinfolists/orddd") ); // 진료일자
  274. model.makeValue("/root/send/savedata/signinfo/signno" , model.getValue("/root/main/reclist/recinfo/recinfolists/signno") ); // 서명번호
  275. model.makeValue("/root/send/savedata/signinfo/cretno" , model.getValue("/root/main/reclist/recinfo/recinfolists/cretno") ); // 생성번호
  276. model.makeValue("/root/send/savedata/signinfo/recdd" , model.getValue("/root/main/reclist/recinfo/recinfolists/recdd") ); // 실제 기록이 이루어진 기록일자(통합기록에서 보여짐)
  277. model.makeValue("/root/send/savedata/signinfo/rectm" , model.getValue("/root/main/reclist/recinfo/recinfolists/rectm") ); // 실제 기록이 이루어진 기록시간(통합기록에서 보여짐)
  278. model.makeValue("/root/send/savedata/signinfo/recsaveflag" , "Y" ); // 전자서명 인적정보 변경여부(기록일시 변경되는 경우: Y, 그외: N)
  279. model.makeValue("/root/send/savedata/signinfo/signflag" , "02"); // 서명자료구분(01 : 진료, 02 : 간호)
  280. model.makeValue("/root/send/savedata/signinfo/signgenrflag", model.getValue("/root/main/reclist/recinfo/recinfolists/histstat")); // 서명발생구분 (코드정의서 M0010 참조)
  281. model.makeValue("/root/send/savedata/signinfo/formcd" , "1100011162"); // 각 기록지별 서식코드
  282. model.makeValue("/root/send/savedata/signinfo/orddeptcd" , model.getValue("/root/main/reclist/recinfo/recinfolists/orddeptcd")); // 진료부서코드
  283. model.makeValue("/root/send/savedata/signinfo/orddrid" , model.getValue("/root/main/reclist/recinfo/recinfolists/orddrid") ); // 진료의사ID
  284. model.makeValue("/root/send/savedata/signinfo/signbfcnts" , Sign.signedInfos[1]); // 인증할 데이터 정보(미기록 노드 제거된 정보)
  285. model.makeValue("/root/send/savedata/signinfo/signaftcnts" , Sign.signedInfos[2]); // 공인인증 처리후 데이터
  286. }else{
  287. return false;
  288. }
  289. }
  290. submit("TXMND00801");
  291. //** 복막투석 실시등록 리스트 조회 **//
  292. fSrchPatHist(); // 복막투석 실시등록 리스트 조회
  293. var sRecdd = model.getValue("/root/main/reclist/recinfo/recinfolists/recdd");
  294. var sRectm = model.getValue("/root/main/reclist/recinfo/recinfolists/rectm");
  295. var sRecnm = model.getValue("/root/main/reclist/recinfo/recinfolists/recnm");
  296. var sPid = model.getValue("/root/main/reclist/recinfo/recinfolists/pid");
  297. var sSignno = model.getValue("/root/main/reclist/recinfo/recinfolists/signno");
  298. //** 복막투석 실시기록 조회 **//
  299. fSrchPDInfo(sRecHistRow); // 복막투석 실시기록 조회
  300. model.setValue("/root/main/reclist/recinfo/recinfolists/status" , "u");
  301. }
  302. /* ------------------------------------------------- */
  303. /* desc : 인증데이터 만들기 */
  304. /* param : pModel - Model */
  305. /* tNode - Target Node */
  306. /* sNode - Source Node */
  307. /* return : */
  308. /* -------------------------------------------------- */
  309. function fMake_SignData(){
  310. Sign.addnode("/root/main/reclist/recinfo"); //기록 관련 인스턴스 전체를 copy
  311. // 인스턴스 copy 후에 콤보나 체크박스 같은 경우 코드값은 명칭으로 변경
  312. var xRecinfoPath = Sign.XPATH_SIGNINFO+"/recinfo/recinfolists";
  313. // 투석종류
  314. model.makeValue(xRecinfoPath + "/dialkindflag", rdo_dialkindflag.label);
  315. // APD종류
  316. var sApdKindFlag = model.getValue(xRecinfoPath+"/apdkindflag");
  317. if(sApdKindFlag != ""){
  318. model.makeValue(xRecinfoPath+"/apdkindflag",model.getValue("/root/init/M0130list/M0130[cdid='"+sApdKindFlag+"']/cdnm"));
  319. }
  320. // 회사명
  321. var sCmpyCd = model.getValue(xRecinfoPath+"/cmpycd");
  322. if(sCmpyCd != ""){
  323. model.makeValue(xRecinfoPath+"/cmpycd",model.getValue("/root/init/M0131list/M0131[cdid='"+sCmpyCd+"']/cdnm"));
  324. }
  325. // 투석액
  326. var sDialLiqdCd = model.getValue(xRecinfoPath+"/dialliqdcd");
  327. if(sDialLiqdCd != ""){
  328. model.makeValue(xRecinfoPath+"/dialliqdcd",model.getValue("/root/init/M0132list/M0132[cdid='"+sDialLiqdCd+"']/cdnm"));
  329. }
  330. // Break Point
  331. var xBreakPointYnPath = Sign.XPATH_SIGNINFO + "/recinfo/pdinfospeclist/pdinfospec/breakpointyn";
  332. var sBreakPointYn = model.getValue(xBreakPointYnPath);
  333. switch(sBreakPointYn){
  334. case '1':
  335. model.makeValue(xBreakPointYnPath, "무"); break;
  336. case '2':
  337. model.makeValue(xBreakPointYnPath, "유"); break;
  338. }
  339. // 자가간호
  340. var sSelfCareYn = model.getValue(xRecinfoPath + "/selfcareyn");
  341. switch(sSelfCareYn){
  342. case '1':
  343. model.makeValue(xRecinfoPath + "/selfcareyn", "무"); break;
  344. case '2':
  345. model.makeValue(xRecinfoPath +"/selfcareyn", "유"); break;
  346. }
  347. // 헤파린
  348. var sHeparinYn = model.getValue(xRecinfoPath + "/heparinyn");
  349. switch(sHeparinYn){
  350. case '1':
  351. model.makeValue(xRecinfoPath + "/heparinyn", "무"); break;
  352. case '2':
  353. model.makeValue(xRecinfoPath + "/heparinyn", "유"); break;
  354. }
  355. // EPO
  356. var xEpoYnPath = Sign.XPATH_SIGNINFO + "/recinfo/epospeclist/epospec/epoyn";
  357. var sEpoYn = model.getValue(xEpoYnPath);
  358. switch(sEpoYn){
  359. case '1':
  360. model.makeValue(xEpoYnPath, "무"); break;
  361. case '2':
  362. model.makeValue(xEpoYnPath, "유"); break;
  363. }
  364. // 실시업무
  365. var xExecBizPath = Sign.XPATH_SIGNINFO + "/recinfo/bizexecspeclist/bizexecspec/execbiz";
  366. var sExecBiz = model.getValue(xExecBizPath);
  367. var sExecBizVal = sExecBiz.split(" ");
  368. var sExecBizStr = "";
  369. for(var i=0; i<sExecBizVal.length; i++){
  370. switch(sExecBizVal[i]){
  371. case '1':
  372. sExecBizStr = sExecBizStr + ",카테터 고정"; break;
  373. case '2':
  374. sExecBizStr = sExecBizStr + ",출구소독"; break;
  375. case '3':
  376. sExecBizStr = sExecBizStr + ",도관길들이기"; break;
  377. case '4':
  378. sExecBizStr = sExecBizStr + ",부종확인"; break;
  379. case '5':
  380. sExecBizStr = sExecBizStr + ",PET"; break;
  381. case '6':
  382. sExecBizStr = sExecBizStr + ",KT/V"; break;
  383. case '7':
  384. sExecBizStr = sExecBizStr + ",투석액 교환"; break;
  385. }
  386. }
  387. model.makeValue(xExecBizPath, sExecBizStr);
  388. // 교육내용
  389. var xEduCntsPath = Sign.XPATH_SIGNINFO + "/recinfo/bizexecspeclist/bizexecspec/educnts";
  390. var sEduCnts = model.getValue(xEduCntsPath);
  391. var sEduCntsVal = sEduCnts.split(" ");
  392. var sEduCntsStr = "";
  393. for(var i=0; i<sEduCntsVal.length; i++){
  394. switch(sEduCntsVal[i]){
  395. case '1':
  396. sEduCntsStr = sEduCntsStr + ",출구관리"; break;
  397. case '2':
  398. sEduCntsStr = sEduCntsStr + ",식이교육"; break;
  399. case '3':
  400. sEduCntsStr = sEduCntsStr + ",투약교육"; break;
  401. case '4':
  402. sEduCntsStr = sEduCntsStr + ",검사설명"; break;
  403. case '5':
  404. sEduCntsStr = sEduCntsStr + ",일상생활관리"; break;
  405. }
  406. }
  407. model.makeValue(xEduCntsPath, sEduCntsStr);
  408. }
  409. /**
  410. * @group :
  411. * @ver : 2007.06.08
  412. * @by : 김진아
  413. * @---------------------------------------------------
  414. * @type : function
  415. * @access : public
  416. * @desc : 복막투석 실시등록 리스트 조회 (복막투석 유지환자 리스트 더블 클릭 시)
  417. * @param :
  418. * @return :
  419. * @---------------------------------------------------
  420. */
  421. function fSrchPatHist(){
  422. // var iRow = grd_pdmatnpatinfo.row;
  423. var sSelPid = model.getValue("/root/main/reclist/recinfo/recinfolists/pid"); //grd_pdmatnpatinfo.textmatrix(iRow, 1);
  424. model.removenode("/root/send");
  425. model.makeNode("/root/send");
  426. model.makeValue("/root/send/reqdata/pid", sSelPid);
  427. model.makeValue("/root/send/reqdata/recfromdd", model.getValue("/root/main/condition/recfromdd"));
  428. model.makeValue("/root/send/reqdata/rectodd ", model.getValue("/root/main/condition/rectodd "));
  429. model.removeNodeset("/root/main/rechistlist/rechistinfo");
  430. submit("TRMND00802");
  431. }
  432. /**
  433. * @group :
  434. * @ver : 2007.06.11
  435. * @by : 김진아
  436. * @---------------------------------------------------
  437. * @type : function
  438. * @access : public
  439. * @desc : 최근 복막투석 실시기록 조회 (신규등록 버튼 클릭 시)
  440. * @param :
  441. * @return :
  442. * @---------------------------------------------------
  443. */
  444. function fSrchPastPDInfo(){
  445. if(model.getValue("/root/main/reclist/recinfo/recinfolists/pid") == "") {
  446. messageBox("복막투석 유지환자를 선택한 후", "I", "신규등록을 할 수 있습니다.");
  447. return;
  448. }
  449. var sRecdd = grd_rechistinfo.textmatrix(1, 1); // 기록일자 (복막투석 실시리스트)
  450. var sRectm = grd_rechistinfo.textmatrix(1, 2); // 기록시간
  451. var sRecnm = grd_rechistinfo.textmatrix(1, 3); // 기록자
  452. var sPid = grd_rechistinfo.textmatrix(1, 4); // 등록번호
  453. grp_pdrecinfo.disabled = "false"; // 복막투석실시기록 활성화
  454. model.removenode("/root/send");
  455. model.makeNode("/root/send");
  456. model.makeValue("/root/send/reqdata/recdd", sRecdd); // 기록일자
  457. model.makeValue("/root/send/reqdata/rectm", sRectm); // 기록시간
  458. model.makeValue("/root/send/reqdata/recnm", sRecnm); // 기록자
  459. model.makeValue("/root/send/reqdata/pid" , sPid ); // 등록번호
  460. // model.removeNodeset("/root/main/reclist/recinfo/recinfolists");
  461. model.removeNodeset("/root/main/xmlformatlist/epospeclist");
  462. model.removeNodeset("/root/main/xmlformatlist/insulinspeclist");
  463. submit("TRMND00803", false);
  464. // 조회 된 데이터 실인스턴스에 매핑
  465. var sTmpNode = "dialkindflag apdkindflag vol cycleval concenval cmpycd dialliqdcd selfcareyn heparinyn";
  466. sTmpNode = sTmpNode.split(" ");
  467. for(var i=0; i<sTmpNode.length; i++) {
  468. model.setValue("/root/main/reclist/recinfo/recinfolists/" + sTmpNode[i], model.getValue("/root/main/xmlformatlist/recinfolists/" + sTmpNode[i]));
  469. }
  470. copyNodeType("/root/main/reclist/recinfo/epospeclist/epospec", "/root/main/xmlformatlist/epospeclist/epospec");
  471. copyNodeType("/root/main/reclist/recinfo/insulinspeclist/insulinspec", "/root/main/xmlformatlist/insulinspeclist/insulinspec");
  472. // Default 설정
  473. if(model.getValue("/root/main/reclist/recinfo/recinfolists/dialkindflag") == ""){
  474. model.makeValue("/root/main/reclist/recinfo/recinfolists/dialkindflag", "1"); // 투석종류 Default 설정 (1 :CAPD)
  475. }
  476. if(model.getValue("/root/main/reclist/recinfo/recinfolists/selfcareyn") == ""){
  477. model.makeValue("/root/main/reclist/recinfo/recinfolists/selfcareyn", "1"); // 자가간호 Default 설정 (1 :무)
  478. }
  479. if(model.getValue("/root/main/reclist/recinfo/recinfolists/heparinyn") == ""){
  480. model.makeValue("/root/main/reclist/recinfo/recinfolists/heparinyn", "1"); // 헤파린 Default 설정 (1 :무)
  481. }
  482. if(model.getValue("/root/main/reclist/recinfo/epospeclist/epospec/epoyn") == ""){
  483. model.makeValue("/root/main/reclist/recinfo/epospeclist/epospec/epoyn", "1"); // EPO Default 설정 (1 :무)
  484. }
  485. if(model.getValue("/root/main/reclist/recinfo/recinfolists/dialkindflag") == "1"){ // 투석종류("1":CAPD 일 경우)
  486. cmb_apdkindflag.disabled = true;
  487. grp_optapd.visible = false;
  488. model.makeValue("/root/main/reclist/recinfo/recinfolists/apdkindflag", "");
  489. }else{
  490. cmb_apdkindflag.disabled = false;
  491. grp_optapd.visible = true;
  492. }
  493. if(model.getValue("/root/main/reclist/recinfo/epospeclist/epospec/epoyn") == "1"){ // EPO("1":무 일 경우)
  494. ipt_drugnm.disabled = true;
  495. ipt_vol.disabled = true;
  496. ipt_weektims.disabled = true;
  497. }
  498. // 기록일시 설정
  499. model.makeValue("/root/main/reclist/recinfo/recinfolists/recid", getUserId());
  500. model.makeValue("/root/main/reclist/recinfo/recinfolists/recnm", getUserName());
  501. model.makeValue("/root/main/reclist/recinfo/recinfolists/recdd", getCurrentDate()); // 기록일자
  502. model.makeValue("/root/main/reclist/recinfo/recinfolists/rectm", getCurrentTime().substr(0,4)); // 기록시간
  503. model.makeValue("/root/main/reclist/recinfo/recinfolists/status", "i"); // 상태값 설정 (insert)
  504. fClearChildNode("/root/main/reclist/recinfo/pdinfospeclist/pdinfospec"); // 복막투석정보 초기화
  505. fClearChildNode("/root/main/reclist/recinfo/bizexecspeclist/bizexecspec"); // 업무실시내역 등록 초기화
  506. //20090923-kys=======
  507. fGetDialLiqList();
  508. //20090923-kys==========
  509. model.refresh();
  510. }
  511. /**
  512. * @group :
  513. * @ver : 2007.06.11
  514. * @by : 김진아
  515. * @---------------------------------------------------
  516. * @type : function
  517. * @access : public
  518. * @desc : 복막투석 실시기록 조회 (복막투석 실시등록 리스트 더블 클릭 시)
  519. * @param :
  520. * @return :
  521. * @---------------------------------------------------
  522. */
  523. function fSrchPDInfo(sRecHistRow){
  524. var sRecdd = model.getValue("/root/main/rechistlist/rechistinfo["+sRecHistRow+"]/recdd"); // 기록일자
  525. var sRectm = model.getValue("/root/main/rechistlist/rechistinfo["+sRecHistRow+"]/rectm"); // 기록시간간
  526. var sRecnm = model.getValue("/root/main/rechistlist/rechistinfo["+sRecHistRow+"]/recnm"); // 기록자
  527. var sPid = model.getValue("/root/main/rechistlist/rechistinfo["+sRecHistRow+"]/pid"); // 등록번호
  528. if(sRecHistRow == 0) { // title 클릭 시
  529. messageBox("복막투석 실시등록 내역을 정확히", "C002", "");
  530. return;
  531. } else {
  532. model.removenode("/root/send");
  533. model.makeNode("/root/send");
  534. model.makeValue("/root/send/reqdata/recdd", sRecdd); // 기록일자
  535. model.makeValue("/root/send/reqdata/rectm", sRectm); // 기록시간
  536. model.makeValue("/root/send/reqdata/recnm", sRecnm); // 기록자
  537. model.makeValue("/root/send/reqdata/pid" , sPid); // 등록번호
  538. // model.removeNodeset("/root/main/reclist/recinfo/recinfolists");
  539. model.removeNodeset("/root/main/reclist/recinfo/pdinfospeclist");
  540. model.removeNodeset("/root/main/reclist/recinfo/epospeclist");
  541. model.removeNodeset("/root/main/reclist/recinfo/insulinspeclist");
  542. model.removeNodeset("/root/main/reclist/recinfo/bizexecspeclist");
  543. submit("TRMND00804");
  544. grp_pdrecinfo.disabled = false; // 복막투석실시기록 활성화
  545. if(model.getValue("/root/main/rechistlist/rechistinfo["+sRecHistRow+"]/signno") != ""){ // 인증저장된 기록의 경우 임시저장버튼 비활성화
  546. btn_tmpsave.disabled = true;
  547. }
  548. // 복막투석종류별 APD내역 그룹 활성화 여부 설정
  549. if(model.getValue("/root/main/reclist/recinfo/recinfolists/dialkindflag") == 1) { // CAPD
  550. grp_optapd.visible = false; // APD내역 그룹 비활성화
  551. cmb_apdkindflag.disabled = true; // APD세부정보 콤보 비활성화
  552. model.setValue("/root/main/reclist/recinfo/recinfolists/apdkindflag", "");
  553. } else { // APD
  554. grp_optapd.visible = true; // APD내역 그룹 활성화
  555. cmb_apdkindflag.disabled = false; // APD세부정보 콤보 활성화
  556. }
  557. if(model.getValue("/root/main/reclist/recinfo/epospeclist/epospec/epoyn") == "1"){
  558. ipt_drugnm.disabled = true;
  559. ipt_vol.disabled = true;
  560. ipt_weektims.disabled = true;
  561. }
  562. // 상태값 설정 (update)
  563. model.makeValue("/root/main/reclist/recinfo/recinfolists/status", "u");
  564. //20090923-kys=======
  565. fGetDialLiqList();
  566. //20090923-kys==========
  567. model.refresh();
  568. }
  569. }
  570. /* ------------------------------------------------- */
  571. /* desc : Instance NodeCopy 하기 (SMMNP007.js 참조) */
  572. /* param : pModel - Model */
  573. /* tNode - Target Node */
  574. /* sNode - Source Node */
  575. /* return : */
  576. /* -------------------------------------------------- */
  577. function InstanceNodeCopy(pModel, tNode, sNode) {
  578. pModel.copyNode(tNode, sNode );
  579. }
  580. /* ------------------------------------------------- */
  581. /* desc : Instance NodeCopy 하기(SMMNP007.js 참조) */
  582. /* param : pModel - Model */
  583. /* tNode - Target Node */
  584. /* sNode - Source Node */
  585. /* return : */
  586. /* -------------------------------------------------- */
  587. function XmlDataCheck(XmlInstNm) {
  588. XmlInstNm = XmlInstNm.split(" ");
  589. var tNode = "";
  590. var sNode = "";
  591. for (var i=0; i < XmlInstNm.length; i++){
  592. tNode = "/root/main/reclist/recinfo/" + XmlInstNm[i];
  593. if (instance1.selectSingleNode(tNode).childNodes.length < 1) {
  594. sNode = "/root/main/xmlformatlist/" + XmlInstNm[i];
  595. InstanceNodeCopy(model, tNode, sNode);
  596. }
  597. }
  598. }
  599. /**
  600. * @group :
  601. * @ver : 2007.07.25 // 수정일자 : 2007.09.21
  602. * @by : 최경용 // 수정자 : 김진아
  603. * @---------------------------------------------------
  604. * @type : function
  605. * @access : public
  606. * @desc : 참여자 정보 팝업 조회
  607. * @param : originalNode
  608. * @param : copyNode
  609. * @return : "true"/"false"
  610. * @---------------------------------------------------
  611. */
  612. function fClickUserBtn(userflag){
  613. var jobkindcd = "11";
  614. //var deptcd = "2010702070"; // 인공신장실Unit 부서코드:"2010702070"
  615. //하드코드수정-20090416
  616. var deptcd = model.getValue("/root/code/codeinfo/codelist/cdid");
  617. //alert("deptcd = " + deptcd);
  618. var titlenm = "인공신장실 간호사 리스트";
  619. setParameter("SPMNN02100_deptcd" , deptcd);
  620. setParameter("SPMNN02100_jobkindcd", jobkindcd);
  621. setParameter("SPMNN02100_titlenm" , titlenm);
  622. modal("SPMNN02100", 1);
  623. var userid = getParameter("SPMNN02100_userid");
  624. var usernm = getParameter("SPMNN02100_usernm");
  625. if(userid != ""){
  626. model.makeValue("/root/main/reclist/recinfo/recinfolists/recid", userid);
  627. model.makeValue("/root/main/reclist/recinfo/recinfolists/recnm", usernm);
  628. } else{
  629. model.makeValue("/root/main/reclist/recinfo/recinfolists/recid", "");
  630. model.makeValue("/root/main/reclist/recinfo/recinfolists/recnm", "");
  631. model.setFocus("ipt_recid");
  632. }
  633. setParameter("SPMNN02100_userid", "");
  634. setParameter("SPMNN02100_usernm", "");
  635. ipt_recid.refresh();
  636. ipt_recnm.refresh();
  637. }
  638. /**
  639. * @group :
  640. * @ver : 2009.09.23
  641. * @by : 김양수
  642. * @---------------------------------------------------
  643. * @type : function
  644. * @access : public
  645. * @desc : 투석액 조회(회사명선택시-콤보박스)
  646. * @param :
  647. * @param :
  648. * @return :
  649. * @---------------------------------------------------
  650. */
  651. function fGetChildCodeList(cd_grup_id_list, rslt_ref_list, supid){
  652. makeZbcResultRef();
  653. setParameter("cdgrupid", cd_grup_id_list);
  654. setParameter("supid", supid);
  655. var success = submit("TRMND00807", "false", getParameterPath(), zbcResultRef);
  656. var sourceNode = instance1.selectNodes(zbcResultRef+"/"+cd_grup_id_list+"/"+cd_grup_id_list);
  657. removeM0132ResultRef();
  658. for(i=0; i<sourceNode.length; i++){
  659. model.duplicate(rslt_ref_list, sourceNode.item(i));
  660. }
  661. removeZbcResultRef();
  662. clearParameter("cdgrupid");
  663. clearParameter("supid");
  664. }