SMMNH01500.js 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073
  1. /*****************************************************************************************************************************************************************************
  2. 호스피스기록지(SMMNH01500.xfm - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. ******************************************************************************************************************************************************************************/
  6. var xHospiceDetlPath = '/root/main/hospiceinfo/hospicedetl'; //호스피스 기본 인적사항 xPath
  7. var xPafaPath = '/root/main/hospicefamy/famylist'; //가족사항
  8. var xHiddenPath = '/root/hidden'; //hidden xPath
  9. var getParamCretdt = opener.javascript.getParameter("cretdd") + opener.javascript.getParameter("crettm");
  10. var saveChk = "";
  11. /**
  12. * @group :
  13. * @ver : 2007.05.21
  14. * @by : 하재륜
  15. * @---------------------------------------------------
  16. * @type : function
  17. * @access : public
  18. * @desc : 호스피스 기록지 조회
  19. * @param :
  20. * @param :
  21. * @return :
  22. * @---------------------------------------------------
  23. */
  24. function fSearch(){
  25. //조회하기 전 넘겨줄 기본 조건 값 세팅
  26. model.removenode("/root/send");
  27. model.makeValue("/root/send/pid",model.getValue("/root/hidden/pid"));
  28. model.makeValue("/root/send/cretdd",model.getValue("/root/hidden/cretdd"));
  29. model.makeValue("/root/send/crettm",model.getValue("/root/hidden/crettm"));
  30. model.makeValue("/root/send/reqdeptcd",model.getValue("/root/hidden/reqdeptcd"));
  31. model.makeValue("/root/send/reqdd",model.getValue("/root/hidden/reqdd"));
  32. model.makeValue("/root/send/refflag", "1");//상위 진단 조회
  33. submit("TRMNH02905", false);
  34. model.removenodeset(xHospiceDetlPath);
  35. grd_skinstatspec.rebuild();
  36. if(submit("TRMNH01501")){
  37. if( (model.getValue(xHospiceDetlPath + "/hngnm")) =="" ){
  38. if(checkOpener()){
  39. messageBox("등록된자료가 ","I004");
  40. window.close();
  41. }else{
  42. model.reset();
  43. model.refresh();
  44. messageBox("등록된자료가 ","I004");
  45. }
  46. }else{
  47. fSetData();
  48. }
  49. }else{
  50. messageBox('조희를', 'E009');
  51. }
  52. }
  53. function fSetData(){
  54. var cretdt = model.getValue("/root/main/hospiceinfo/hospicedetl/cretdd") + model.getValue("/root/main/hospiceinfo/hospicedetl/crettm");
  55. if (getNodesetCount("/root/main/hospiceinfo/recinfo") > 0 ){
  56. model.makeValue("/root/main/hospiceinfo/hospicedetl/bfrecddtm", model.getValue("/root/main/hospiceinfo/recinfo[cretdt = '" + cretdt + "']/recpkspec"));
  57. }
  58. cmb_bfrecddtm.refresh();
  59. var opt_rrgstno = model.getValue(xHospiceDetlPath + "/rrgstno");
  60. model.setValue(xHospiceDetlPath + "/rrgstno",opt_rrgstno.substring(0,8)+"******");//주민번호 세팅
  61. fSearchFamy();//가족사항 조회
  62. fSearchInpt();//입원내역조회
  63. fSearchMasv();//심리사회적평가 조회
  64. //진단명
  65. cmb_diagcd1.dispatch("xforms-value-changed");
  66. //입실일시 있을시 입실방법 , 입실시 동반자 활성화
  67. if ((ipt_inrmdd.value == '' )||(ipt_inrmdd.value == null )) {
  68. cmb_inrmmthdcd.disabled = true;
  69. cmb_inrmacompstcd.disabled = true;
  70. }else{
  71. cmb_inrmmthdcd.disabled = false;
  72. cmb_inrmacompstcd.disabled = false;
  73. }
  74. //의뢰사유 기타선택시 기타사유명입력칸활성화
  75. if (cmb_reqresnflag.value == "99"){
  76. ipt_reqresnetc.disabled = false;
  77. }else{
  78. ipt_reqresnetc.disabled = true;
  79. }
  80. //추천경유 기타 사유
  81. cmb_marystatcd.dispatch("xforms-value-changed");
  82. var reqdd = model.getValue(xHospiceDetlPath + "/reqdd");
  83. var waitdd = model.getValue(xHospiceDetlPath + "/waitdd");
  84. //관리현황 의뢰와 대기시만 활성화
  85. if (( reqdd >= "19000101")||( waitdd >="19000101")){
  86. cmb_mngtprescd.disabled = false;
  87. }else{
  88. cmb_mngtprescd.disabled = true;
  89. }
  90. //본원타원
  91. if (cmb_reqtypeflag.value=='01' ){//본원
  92. cmb_reqhospnm.visible = false;//타 병원 리스트
  93. cmb_reqdeptnm.visible = true;//본원 진료과 리스트
  94. model.removenode("/root/send");
  95. model.makeValue("/root/send/orddeptcd", model.getValue("/root/main/hospiceinfo/hospicedetl/reqtypespec"));
  96. submit("TRMNH02903");
  97. cmb_drlist.visible = true;//의사리스트
  98. opt_reqtypespec.visible = false;
  99. }else if (cmb_reqtypeflag.value=='02'){
  100. cmb_reqhospnm.visible = true;
  101. cmb_reqdeptnm.visible = false;//본원 진료과 리스트
  102. cmb_drlist.visible = false;//의사리스트
  103. opt_reqtypespec.visible = false;
  104. }else if (cmb_reqtypeflag.value=='03'){
  105. cmb_reqhospnm.visible = false;//타 병원 리스트
  106. cmb_reqdeptnm.visible = true;//본원 진료과 리스트
  107. model.removenode("/root/send");
  108. model.makeValue("/root/send/orddeptcd", model.getValue("/root/main/hospiceinfo/hospicedetl/reqhospnm"));
  109. submit("TRMNH02903");
  110. cmb_drlist.visible = true;//의사리스트
  111. opt_reqtypespec.visible = false;
  112. }
  113. //직업 기타선택시 기타사유명입력칸활성화
  114. cmb_jobcd.dispatch("xforms-value-changed");
  115. //결혼상태 기타 사유
  116. cmb_marystatcd.dispatch("xforms-value-changed");
  117. //추천경유 기타 사유
  118. cmb_recmpsgecd.dispatch("xforms-value-changed");
  119. //정서적상태
  120. chk_emotstatspec.dispatch("onclick");
  121. //임종돌봄
  122. chk_agonalcare.dispatch("onclick");
  123. //정신적돌봄
  124. chk_sptsympcare.dispatch("onclick");
  125. //가계도
  126. var genogrmnm = model.getValue(xHospiceDetlPath + "/genogrmnm");
  127. if( genogrmnm == ""){
  128. caption133.visible = false;
  129. }else{
  130. caption133.visible = true;
  131. }
  132. //사별가족 부분
  133. if((ipt_agonaldd.value == '' )||(ipt_agonaldd.value == null )) {
  134. cmb_agonalplcecd.disabled = true;
  135. }else {
  136. var agonalcd = model.getValue("/root/main/hospiceinfo/hospicedetl/agonaldd");
  137. var agonal49 = getAddDay(agonalcd,"49");
  138. var agonal365 = getAddDay(agonalcd,"365");
  139. model.setValue("/root/temp/hospicedetl/agonal49",agonal49);
  140. model.setValue("/root/temp/hospicedetl/agonal365",agonal365);
  141. cmb_agonalplcecd.disabled = false;
  142. }
  143. var cureprescondspec = model.getValue(xHospiceDetlPath + "/cureprescondspec");
  144. if ((isSearchString(cureprescondspec, "6")) ==true)
  145. ipt_cureprescondetcnm.disabled = false;
  146. else
  147. ipt_cureprescondetcnm.disabled = true;
  148. var ccspec = model.getValue(xHospiceDetlPath + "/ccspec");
  149. if(Number(model.getValue(xHospiceDetlPath + "/chstval") ) > 0 ){
  150. model.setValue("/root/temp/hospicedetl/chstval","C");
  151. ipt_chstval.disabled = false;
  152. }
  153. if(Number(model.getValue(xHospiceDetlPath + "/pelvval") ) > 0 ){
  154. model.setValue("/root/temp/hospicedetl/pelvval","P");
  155. ipt_pelvval.disabled = false;
  156. }
  157. if(Number(model.getValue(xHospiceDetlPath + "/regionvas") ) > 0 ){
  158. model.setValue("/root/temp/hospicedetl/regionvas","R");
  159. ipt_regionvas.disabled = false;
  160. }
  161. if(Number(model.getValue(xHospiceDetlPath + "/neckvas") ) > 0 ){
  162. model.setValue("/root/temp/hospicedetl/neckvas","N");
  163. ipt_neckvas.disabled = false;
  164. }
  165. if(Number(model.getValue(xHospiceDetlPath + "/waistvas") ) > 0 ){
  166. model.setValue("/root/temp/hospicedetl/waistvas","W");
  167. ipt_waistvas.disabled =false;
  168. }
  169. if(Number(model.getValue(xHospiceDetlPath + "/headval") ) > 0 ){
  170. model.setValue("/root/temp/hospicedetl/headval","H");
  171. ipt_headval.disabled = false;
  172. }
  173. if(Number(model.getValue(xHospiceDetlPath + "/etcval") ) > 0 ){
  174. model.setValue("/root/temp/hospicedetl/etcval","E");
  175. ipt_etcval.disabled = false;
  176. ipt_etcnm.disabled = false;
  177. }
  178. model.makeNode(xHospiceDetlPath + "/deptcd");
  179. model.makeNode(xHospiceDetlPath + "/docucode");
  180. model.makeNode(xHiddenPath + "/mapindd");
  181. model.setValue(xHiddenPath + '/mapindd', model.getValue(xHospiceDetlPath + '/mapindd'));
  182. model.refresh();
  183. }
  184. /**
  185. * @group :
  186. * @ver : 2007.05.24
  187. * @by : 하재륜
  188. * @---------------------------------------------------
  189. * @type : function
  190. * @access : public
  191. * @desc : 호스피스 환자가족 조회 (
  192. * @param :
  193. * @param :
  194. * @return :
  195. * @---------------------------------------------------
  196. */
  197. function fSearchFamy(){
  198. model.removenode("/root/send");
  199. model.makeValue("/root/send/pid",model.getValue(xHospiceDetlPath + "/pid"));
  200. model.removenodeset(xPafaPath);
  201. submit("TRMNH01503");
  202. }
  203. /**
  204. * @group :
  205. * @ver : 2007.05.28
  206. * @by : 하재륜
  207. * @---------------------------------------------------
  208. * @type : function
  209. * @access : public
  210. * @desc : 호스피스 입원내역 조회 (
  211. * @param : pid
  212. * @param :
  213. * @return :
  214. * @---------------------------------------------------
  215. */
  216. function fSearchInpt(){
  217. model.removenode("/root/send");
  218. model.makeValue("/root/send/pid",model.getValue(xHospiceDetlPath + "/pid"));
  219. model.makeValue("/root/send/cretdd",model.getValue(xHospiceDetlPath + "/cretdd"));
  220. model.removenodeset("/root/main/hospiceinpt/inptlist");
  221. submit("TRMNH01504");
  222. }
  223. /**
  224. * @group :
  225. * @ver : 2007.05.28
  226. * @by : 하재륜
  227. * @---------------------------------------------------
  228. * @type : function
  229. * @access : public
  230. * @desc : 심리사회적평가 조회 (
  231. * @param : pid
  232. * @param :
  233. * @return :
  234. * @---------------------------------------------------
  235. */
  236. function fSearchMasv(){
  237. model.removenode("/root/send");
  238. model.makeValue("/root/send/pid", model.getValue(xHospiceDetlPath + "/pid"));
  239. model.makeValue("/root/send/instcd",model.getValue(xHospiceDetlPath + "/instcd"));
  240. model.makeValue("/root/send/cretdd",model.getValue(xHospiceDetlPath + "/cretdd"));
  241. model.makeValue("/root/send/crettm",model.getValue(xHospiceDetlPath + "/crettm"));
  242. model.resetInstanceNode("/root/main/hospicemasv/masvdetl");
  243. submit("TRMNH01505");
  244. }
  245. /**
  246. * @group :
  247. * @ver : 2007.05.18
  248. * @by : 하재륜
  249. * @---------------------------------------------------
  250. * @type : function
  251. * @access : public
  252. * @desc : 호스피스 기록지 저장
  253. * @desc : 가계도 저장 로직 추가 2007.11.10 - dhkim
  254. * @param :
  255. * @param :
  256. * @return :
  257. * @---------------------------------------------------
  258. */
  259. function fSave(){
  260. //임종일이 입력되어 있으면 환자구분을 제외(O), 퇴원사유를 병원임종(01), 종결일자를 임종일로 저장한다.
  261. // var cretdd = model.getValue(xHospiceDetlPath + "/cretdd"); //69생성일자
  262. // var crettm = model.getValue(xHospiceDetlPath + "/crettm"); //70생성시간
  263. // var caretdt = cretdd + crettm;
  264. //
  265. // if( getParamCretdt != "" && getParamCretdt != caretdt ){
  266. // messageBox("입실시간이 같지않습니다.","E");
  267. // return;
  268. // }
  269. var agonaldd = model.getValue(xHospiceDetlPath + "/agonaldd");
  270. var wardcd = model.getValue(xHospiceDetlPath + '/wardcd');
  271. var status = model.getValue(xHospiceDetlPath + '/status');
  272. var intvdd = model.getValue(xHospiceDetlPath + '/intvdd');
  273. var waitdd = model.getValue(xHospiceDetlPath + '/waitdd');
  274. var inrmdd = model.getValue(xHospiceDetlPath + '/inrmdd');
  275. var enddd = model.getValue(xHospiceDetlPath + '/enddd');
  276. var exptresn = model.getValue(xHospiceDetlPath + '/exptresn');
  277. var waitenddd = model.getValue(xHospiceDetlPath + '/waitenddd');
  278. var waitendresn = model.getValue(xHospiceDetlPath + '/waitendresn');
  279. var dschdd = model.getValue(xHospiceDetlPath + '/dschdd');
  280. var dschresn = model.getValue(xHospiceDetlPath + '/dschresn');
  281. var agonalplcecd = model.getValue(xHospiceDetlPath + '/agonalplcecd');
  282. var hospicewardcd = model.getValue("/root/init/viewctrl/viewctrllist/viewctrlinfo/cdnm");
  283. if(agonaldd.length == 8){
  284. /*퇴실한 임종환자 저장 시 수정
  285. if(agonalplcecd == ''){
  286. messageBox("임종장소를 ","C001");
  287. return;
  288. }
  289. */
  290. if(status == "I"){
  291. model.setValue(xHospiceDetlPath + "/waitstat","P");
  292. model.setValue(xHospiceDetlPath + "/waitendresn","04");
  293. model.setValue(xHospiceDetlPath + "/waitenddd",agonaldd);
  294. }else { // status in "O","S"
  295. if(wardcd == hospicewardcd){ // 호스피스 병동
  296. model.setValue(xHospiceDetlPath + "/waitstat","L");
  297. model.setValue(xHospiceDetlPath + "/dschresn","02");
  298. model.setValue(xHospiceDetlPath + "/dschtype","02");
  299. model.setValue(xHospiceDetlPath + "/dschdd",agonaldd);
  300. }else { // 호스피스 병동이 아닌경우
  301. model.setValue(xHospiceDetlPath + "/waitstat","O");
  302. model.setValue(xHospiceDetlPath + "/exptresn","03");
  303. model.setValue(xHospiceDetlPath + "/enddd",agonaldd);
  304. }
  305. }
  306. }else{
  307. //입실일자 있으면 waitstat는 I(입실)
  308. if( inrmdd == "19000101" ){
  309. model.setValue(xHospiceDetlPath + "/inrmdd", "19000101");
  310. model.setValue(xHospiceDetlPath + "/inrmtm", "");
  311. }else if( inrmdd >= "19000101"){
  312. //실제입원되어 있는 환자중 호스피스 병동(병동코드 : '3050136000')이 아닐때 입실일자가 입력되면 경고메세지를 출력한다.
  313. if(wardcd == hospicewardcd){
  314. //model.setValue(xHospiceDetlPath + "/waitstat","I") ;
  315. }else{
  316. messageBox('호스피스병동에 입원한 환자가 아니므로 입실일을 입력', 'E001');
  317. model.setValue(xHospiceDetlPath + "/inrmdd", "19000101");
  318. model.setValue(xHospiceDetlPath + "/inrmtm", "");
  319. return ;
  320. }
  321. }
  322. //서비스종료일자 있으면 waitstat는 O(서비스종료)
  323. if( enddd == "19000101"){
  324. model.setValue(xHospiceDetlPath + "/exptresn","19000101");
  325. model.setValue(xHospiceDetlPath + "/exptresnetc","");
  326. }else if( enddd >= "19000101"){
  327. if( exptresn != "" ){
  328. if(exptresn == '03'){
  329. model.setValue(xHospiceDetlPath + "/agonaldd", enddd);
  330. }else{
  331. model.setValue(xHospiceDetlPath + "/agonaldd","");
  332. model.setValue(xHospiceDetlPath + "/agonalplcecd","");
  333. }
  334. // model.setValue(xHospiceDetlPath + "/waitstat","O");
  335. }
  336. if( exptresn == '' ){
  337. messageBox("서비스종료사유를 ","C001");
  338. return false;
  339. }
  340. }
  341. //대기종료일자 있으면 waitstat는 P(대기종료)
  342. if( waitenddd == "19000101" ){
  343. model.setValue(xHospiceDetlPath + "/waitendresn","19000101");
  344. model.setValue(xHospiceDetlPath + "/waitendresnetc","");
  345. }else if(waitenddd!=""){
  346. if(waitendresn!=""){
  347. if(waitendresn == '04'){
  348. model.setValue(xHospiceDetlPath + "/agonaldd", waitenddd);
  349. }else{
  350. model.setValue(xHospiceDetlPath + "/agonaldd","");
  351. model.setValue(xHospiceDetlPath + "/agonalplcecd","");
  352. }
  353. // model.setValue(xDetlPath + "/waitstat","P");
  354. }
  355. if(waitendresn == ''){
  356. messageBox("대기종료사유를 ","C001");
  357. return false;
  358. }
  359. }
  360. //퇴실일자 있으면 waitstat는 L(퇴실)
  361. if( dschdd == "19000101" ){
  362. model.setValue(xHospiceDetlPath + "/dschtype","");
  363. model.setValue(xHospiceDetlPath + "/dschresn","");
  364. model.setValue(xHospiceDetlPath + "/dschresnetc","");
  365. model.setValue(xHospiceDetlPath + "/dschlnk","");
  366. model.setValue(xHospiceDetlPath + "/dschlnketc","");
  367. }else if( dschdd >= "19000101" ){
  368. if(dschresn!=""){
  369. if(dschresn == '02'){
  370. model.setValue(xHospiceDetlPath + "/agonaldd", dschdd);
  371. }else{
  372. model.setValue(xHospiceDetlPath + "/agonaldd","");
  373. model.setValue(xHospiceDetlPath + "/agonalplcecd","");
  374. }
  375. // model.setValue(xHospiceDetlPath + "/waitstat","L");
  376. }
  377. if(dschresn == ''){
  378. messageBox("퇴실사유를 ","C001");
  379. return false;
  380. }
  381. }
  382. } //else 종료
  383. //피부상태
  384. model.removenode("/root/send/skinstatspec/skinstatlists");
  385. if(grd_skinstatspec.rows<2) grd_skinstatspec.addRow();
  386. var chstval = model.getValue(xHospiceDetlPath + "/chstval") ; //가슴값
  387. var pelvval = model.getValue(xHospiceDetlPath + "/pelvval") ; //골반값
  388. var regionvas = model.getValue(xHospiceDetlPath + "/regionvas"); //복부값
  389. var neckvas = model.getValue(xHospiceDetlPath + "/neckvas") ; //목값
  390. var waistvas = model.getValue(xHospiceDetlPath + "/waistvas") ; //허리값
  391. var headval = model.getValue(xHospiceDetlPath + "/headval") ; //머리값
  392. var etcval = model.getValue(xHospiceDetlPath + "/etcval") ; //기타값
  393. //널처리
  394. if(chstval == "")
  395. chstval = "0";
  396. if(pelvval == "")
  397. pelvval = "0";
  398. if(regionvas == "")
  399. regionvas = "0";
  400. if(neckvas == "")
  401. neckvas = "0";
  402. if(waistvas == "")
  403. waistvas = "0";
  404. if(headval == "")
  405. headval = "0";
  406. if(etcval == "")
  407. etcval = "0";
  408. //파리채 column 명 정의
  409. var sData = "pid" //01등록번호
  410. +"▦hngnm" //02이름
  411. +"▦sexage" //03S/A
  412. +"▦rrgstno" //04주민등록번호
  413. +"▦hosecnt" //05입원횟수
  414. +"▦inrmdd" //06입실일자
  415. +"▦inrmtm" //07입실시간
  416. +"▦inrmmthdcd" //08입실방법
  417. +"▦inrmacompstcd" //09입실시동반자
  418. +"▦reqdd" //10의뢰일
  419. +"▦reqindd" //11의뢰희망일
  420. +"▦intvdd" //12면담일
  421. +"▦waitdd" //13대기일자
  422. +"▦reqtypeflag" //14의뢰형태
  423. +"▦reqtypespec" //15의뢰과(주치의)
  424. +"▦atdoctid" //15주치의
  425. +"▦reqhospnm" //16의뢰병원
  426. +"▦reqresnflag" //17의뢰사유
  427. +"▦reqresnetc" //18의뢰사유기타
  428. +"▦recmpsgecd" //19추천경유
  429. +"▦itrdmoodcd" //20소개받았을때기분
  430. +"▦mngtprescd" //21관리현황
  431. +"▦endawaryn" //22말기인식환자
  432. +"▦proendawaryn" //23말기인식보호자
  433. +"▦cncrawaryn" //24암인식환자
  434. +"▦procncrawaryn" //25암인식보호자
  435. +"▦agonalhopeplcecd" //26임종희망장소
  436. +"▦icdrindd" //27입원일
  437. +"▦icdrroomcd" //28입실전병실
  438. +"▦religncd" //29종교
  439. +"▦baptnm" //30세레명
  440. +"▦parishchrchnm" //31본당
  441. +"▦baptismdd" //32영세일자
  442. +"▦emerbaptdd" //33대세일자
  443. +"▦sickdivser" //34병자성사
  444. +"▦jobcd" //35직업코드
  445. +"▦jobnm" //36직업
  446. +"▦edcugrdecd" //37교육정도
  447. +"▦marystatcd" //38결혼형태
  448. +"▦chldrncnt" //39자녀수
  449. +"▦termengnm" //40진단명
  450. +"▦diagcd1" //41diagcd1
  451. +"▦diagcd2" //42diagcd2
  452. +"▦attackdd" //43발병일
  453. +"▦agonaldd" //44임종일자
  454. +"▦agonalplcecd" //45임종장소
  455. +"▦separationfamyyn" //46사별가족방문여부
  456. +"▦memodoryn" //47추모식행사여부
  457. +"▦mmmassyn" //48월미사참석여부
  458. +"▦donatyn" //49시신기증여부
  459. +"▦cureprescondspec" //50치료현황
  460. +"▦cureprescondetcnm" //51치료현황(기타명)
  461. +"▦ccspec" //52C/C
  462. +"▦ccetcnm" //53C/C(기타명)
  463. +"▦chstval" //54가슴값
  464. +"▦pelvval" //55골반값
  465. +"▦regionvas" //56복부값
  466. +"▦neckvas" //57목값
  467. +"▦waistvas" //58허리값
  468. +"▦headval" //59머리값
  469. +"▦etcval" //60기타값
  470. +"▦etcnm" //61기타명
  471. +"▦skinstatyn" //62피부상태증상여부
  472. +"▦skinstatspec" //63피부상태
  473. +"▦emotstatspec" //64정서상태
  474. +"▦intesympspec" //65영적고통
  475. +"▦intereqspec" //66영적요구
  476. +"▦indd" //67입원일자
  477. +"▦cretno" //68생성번호
  478. +"▦cretdd" //69생성일자
  479. +"▦crettm" //70생성시간
  480. +"▦status" //72의뢰경로
  481. +"▦enddd" //73서비스종료일
  482. +"▦exptresn" //74서비스종료사유
  483. +"▦exptresnetc" //74_1서비스종료사유기타
  484. +"▦waitenddd" //75대기종료일
  485. +"▦waitendresn" //76대기종료사유
  486. +"▦waitendresnetc" //76_1대기종료사유기타
  487. +"▦dschdd" //77퇴실일
  488. +"▦dschtype" //78퇴실형태
  489. +"▦dschresn" //79퇴실사유
  490. +"▦dschresnetc" //79_1퇴실사유기타
  491. +"▦dschlnk" //79_2퇴실후연계
  492. +"▦dschlnketc" //79_3퇴실후연계기타
  493. +"▦recdd" //80등록일자
  494. +"▦rectm" //81등록시간
  495. +"▦mapindd" //82가계도등록일자
  496. +"▦deptcd" //83가계도등록부서
  497. +"▦docucode" //84가계도서식코드
  498. +"▦genogrmnm" //85가계도
  499. +"▦reqdeptcd" //86의뢰과
  500. +"▦famycnst" //87가족상담
  501. +"▦ecog" //88ECOG
  502. +"▦progrec" //89경과기록
  503. +"▦sptstatspec" //정신적상태
  504. +"▦soclecomysituat"//사회, 경제적상태
  505. +"▦emotstatdesc" //정서적상태 기타사유
  506. +"▦agonalcaredesc"//영적돌봄 상세사항
  507. +"▦agonalcare" //임종돌봄
  508. +"▦ccsympcare" //신체적증상 돌봄
  509. +"▦sptsympcare" //정신적 돌봄
  510. +"▦intesympcare" //영적돌봄
  511. +"▦soclecomycare" //사회 경제적돌봄
  512. +"▦sptsymp1" //정신적 돌봄(개별상담횟수)
  513. +"▦sptsymp2" //정신적 돌봄(가족상담횟수)
  514. +"▦recmpsgeetc" //추천경유기타
  515. +"▦cncrdiaghosp" //말기암 진단병원
  516. +"▦cncrdiagdd" //말기암진단일
  517. +"▦marystatdesc" //결혼상태(기타)상세사항
  518. +"▦pipeinsert" //관삽입
  519. +"▦soclecomysituatdesc" //사회, 경제적상태 기타사유
  520. +"▦famyheal" //환자와가족이원하는치료
  521. +"▦longplan" //장기목표
  522. +"▦shortplan" //단기목표
  523. +"▦signno" //인증번호
  524. +"▩";
  525. //피부상태 xml데이터
  526. var xSkinstatspec = instance1.selectSingleNode(xHospiceDetlPath + "/skinstatspec/skinstatlists").xml;
  527. var xMap = instance1.selectSingleNode(xHospiceDetlPath + '/genogrmnm') ;
  528. sData += model.getValue(xHospiceDetlPath + "/pid") //01등록번호
  529. +"▦" + model.getValue(xHospiceDetlPath + "/hngnm") //02이름
  530. +"▦" + model.getValue(xHospiceDetlPath + "/sexage") //03S/A
  531. +"▦" + model.getValue(xHospiceDetlPath + "/rrgstno") //04주민등록번호
  532. +"▦" + model.getValue(xHospiceDetlPath + "/hosecnt") //05입원횟수
  533. +"▦" + model.getValue(xHospiceDetlPath + "/inrmdd") //06입실일자
  534. +"▦" + model.getValue(xHospiceDetlPath + "/inrmtm") //07입실시간
  535. +"▦" + model.getValue(xHospiceDetlPath + "/inrmmthdcd") //08입실방법
  536. +"▦" + model.getValue(xHospiceDetlPath + "/inrmacompstcd") //09입실시동반자
  537. +"▦" + model.getValue(xHospiceDetlPath + "/reqdd") //10의뢰일
  538. +"▦" + model.getValue(xHospiceDetlPath + "/reqindd") //11의뢰희망일
  539. +"▦" + model.getValue(xHospiceDetlPath + "/intvdd") //12면담일
  540. +"▦" + model.getValue(xHospiceDetlPath + "/waitdd") //13대기일자
  541. +"▦" + model.getValue(xHospiceDetlPath + "/reqtypeflag") //14의뢰형태
  542. +"▦" + model.getValue(xHospiceDetlPath + "/reqtypespec") //15의뢰과(주치의)
  543. +"▦" + model.getValue(xHospiceDetlPath + "/atdoctid") //15주치의
  544. +"▦" + model.getValue(xHospiceDetlPath + "/reqhospnm") //16의뢰병원
  545. +"▦" + model.getValue(xHospiceDetlPath + "/reqresnflag") //17의뢰사유
  546. +"▦" + model.getValue(xHospiceDetlPath + "/reqresnetc") //18의뢰사유기타
  547. +"▦" + model.getValue(xHospiceDetlPath + "/recmpsgecd") //19추천경유
  548. +"▦" + model.getValue(xHospiceDetlPath + "/itrdmoodcd") //20소개받았을때기분
  549. +"▦" + model.getValue(xHospiceDetlPath + "/mngtprescd") //21관리현황
  550. +"▦" + model.getValue(xHospiceDetlPath + "/endawaryn") //22말기인식환자
  551. +"▦" + model.getValue(xHospiceDetlPath + "/proendawaryn") //23말기인식보호자
  552. +"▦" + model.getValue(xHospiceDetlPath + "/cncrawaryn") //24암인식환자
  553. +"▦" + model.getValue(xHospiceDetlPath + "/procncrawaryn") //25암인식보호자
  554. +"▦" + model.getValue(xHospiceDetlPath + "/agonalhopeplcecd") //26임종희망장소
  555. +"▦" + model.getValue(xHospiceDetlPath + "/icdrindd") //27입원일
  556. +"▦" + model.getValue(xHospiceDetlPath + "/icdrroomcd") //28입실전병실
  557. +"▦" + model.getValue(xHospiceDetlPath + "/religncd") //29종교
  558. +"▦" + model.getValue(xHospiceDetlPath + "/baptnm") //30세레명
  559. +"▦" + model.getValue(xHospiceDetlPath + "/parishchrchnm") //31본당
  560. +"▦" + model.getValue(xHospiceDetlPath + "/baptismdd") //32영세일자
  561. +"▦" + model.getValue(xHospiceDetlPath + "/emerbaptdd") //33대세일자
  562. +"▦" + model.getValue(xHospiceDetlPath + "/sickdivser") //34병자성사
  563. +"▦" + model.getValue(xHospiceDetlPath + "/jobcd") //35직업코드
  564. +"▦" + model.getValue(xHospiceDetlPath + "/jobnm") //36직업
  565. +"▦" + model.getValue(xHospiceDetlPath + "/edcugrdecd") //37교육정도
  566. +"▦" + model.getValue(xHospiceDetlPath + "/marystatcd") //38결혼형태
  567. +"▦" + model.getValue(xHospiceDetlPath + "/chldrncnt") //39자녀수
  568. +"▦" + model.getValue(xHospiceDetlPath + "/termengnm") //40진단명
  569. +"▦" + model.getValue(xHospiceDetlPath + "/diagcd1") //41diagcd1
  570. +"▦" + model.getValue(xHospiceDetlPath + "/diagcd2") //42diagcd2
  571. +"▦" + model.getValue(xHospiceDetlPath + "/attackdd") //43발병일
  572. +"▦" + model.getValue(xHospiceDetlPath + "/agonaldd") //44임종일자
  573. +"▦" + model.getValue(xHospiceDetlPath + "/agonalplcecd") //45임종장소
  574. +"▦" + model.getValue(xHospiceDetlPath + "/separationfamyyn") //46사별가족방문여부
  575. +"▦" + model.getValue(xHospiceDetlPath + "/memodoryn") //47추모식행사여부
  576. +"▦" + model.getValue(xHospiceDetlPath + "/mmmassyn") //48월미사참석여부
  577. +"▦" + model.getValue(xHospiceDetlPath + "/donatyn") //49시신기증여부
  578. +"▦" + model.getValue(xHospiceDetlPath + "/cureprescondspec") //50치료현황
  579. +"▦" + model.getValue(xHospiceDetlPath + "/cureprescondetcnm") //51치료현황(기타명)
  580. +"▦" + model.getValue(xHospiceDetlPath + "/ccspec") //52C/C
  581. +"▦" + model.getValue(xHospiceDetlPath + "/ccetcnm") //53C/C(기타명)
  582. +"▦" + chstval //54가슴값
  583. +"▦" + pelvval //55골반값
  584. +"▦" + regionvas //56복부값
  585. +"▦" + neckvas //57목값
  586. +"▦" + waistvas //58허리값
  587. +"▦" + headval //59머리값
  588. +"▦" + etcval //60기타값
  589. +"▦" + model.getValue(xHospiceDetlPath + "/etcnm") //61기타명
  590. +"▦" + model.getValue(xHospiceDetlPath + "/skinstatyn") //62피부상태증상여부
  591. +"▦" + xSkinstatspec //63피부상태
  592. +"▦" + model.getValue(xHospiceDetlPath + "/emotstatspec") //64정서상태
  593. +"▦" + model.getValue(xHospiceDetlPath + "/intesympspec") //65영적고통
  594. +"▦" + model.getValue(xHospiceDetlPath + "/intereqspec") //66영적요구
  595. +"▦" + model.getValue(xHospiceDetlPath + "/indd") //67입원일자
  596. +"▦" + model.getValue(xHospiceDetlPath + "/cretno") //68생성번호
  597. +"▦" + model.getValue(xHospiceDetlPath + "/cretdd") //69생성일자
  598. +"▦" + model.getValue(xHospiceDetlPath + "/crettm") //70생성시간
  599. +"▦" + model.getValue(xHospiceDetlPath + "/status") //72의뢰경로
  600. +"▦" + model.getValue(xHospiceDetlPath + "/enddd") //73서비스종료일
  601. +"▦" + model.getValue(xHospiceDetlPath + "/exptresn") //74서비스종료사유
  602. +"▦" + model.getValue(xHospiceDetlPath + "/exptresnetc") //74_1서비스종료사유
  603. +"▦" + model.getValue(xHospiceDetlPath + "/waitenddd") //75대기종료일
  604. +"▦" + model.getValue(xHospiceDetlPath + "/waitendresn") //76대기종료사유
  605. +"▦" + model.getValue(xHospiceDetlPath + "/waitendresnetc") //76_1대기종료사유기타
  606. +"▦" + model.getValue(xHospiceDetlPath + "/dschdd") //77퇴실일
  607. +"▦" + model.getValue(xHospiceDetlPath + "/dschtype") //78퇴실형태
  608. +"▦" + model.getValue(xHospiceDetlPath + "/dschresn") //79퇴실사유
  609. +"▦" + model.getValue(xHospiceDetlPath + "/dschresnetc") //79_1퇴실사유기타
  610. +"▦" + model.getValue(xHospiceDetlPath + "/dschlnk") //79_2퇴실후연계
  611. +"▦" + model.getValue(xHospiceDetlPath + "/dschlnketc") //79_3퇴실후연계기타
  612. +"▦" + model.getValue(xHospiceDetlPath + "/recdd") //80등록일자
  613. +"▦" + model.getValue(xHospiceDetlPath + "/rectm") //81등록시간
  614. +"▦" + model.getValue(xHospiceDetlPath + "/mapindd") //82가계도등록일자
  615. +"▦" + model.getValue(xHospiceDetlPath + "/deptcd") //83가계도등록부서
  616. +"▦" + model.getValue(xHospiceDetlPath + "/docucode") //84가계도서식코드
  617. +"▦" + model.getValue(xHospiceDetlPath + "/genogrmnm") //85가계도
  618. +"▦" + model.getValue(xHospiceDetlPath + "/reqdeptcd") //86의뢰과
  619. +"▦" + instance1.selectNodesXml(xHospiceDetlPath + "/famycnst/famylist") //87가족상담
  620. +"▦" + model.getValue(xHospiceDetlPath + "/ecog") //86의뢰과
  621. +"▦" + instance1.selectNodesXml(xHospiceDetlPath + "/progrec/progreclist") //87가족상담
  622. +"▦" + model.getValue(xHospiceDetlPath + "/sptstatspec") //정신적상태
  623. +"▦" + model.getValue(xHospiceDetlPath + "/soclecomysituat")//사회, 경제적상태
  624. +"▦" + model.getValue(xHospiceDetlPath + "/emotstatdesc") //정서적상태 기타사유
  625. +"▦" + model.getValue(xHospiceDetlPath + "/agonalcaredesc")//영적돌봄 상세사항
  626. +"▦" + model.getValue(xHospiceDetlPath + "/agonalcare") //임종돌봄
  627. +"▦" + model.getValue(xHospiceDetlPath + "/ccsympcare") //신체적증상 돌봄
  628. +"▦" + model.getValue(xHospiceDetlPath + "/sptsympcare") //정신적 돌봄
  629. +"▦" + model.getValue(xHospiceDetlPath + "/intesympcare") //영적돌봄
  630. +"▦" + model.getValue(xHospiceDetlPath + "/soclecomycare") //사회 경제적돌봄
  631. +"▦" + model.getValue(xHospiceDetlPath + "/sptsymp1") //정신적 돌봄(개별상담횟수)
  632. +"▦" + model.getValue(xHospiceDetlPath + "/sptsymp2") //정신적 돌봄(가족상담횟수)
  633. +"▦" + model.getValue(xHospiceDetlPath + "/recmpsgeetc") //추천경유기타
  634. +"▦" + model.getValue(xHospiceDetlPath + "/cncrdiaghosp") //말기암 진단병원
  635. +"▦" + model.getValue(xHospiceDetlPath + "/cncrdiagdd") //말기암진단일
  636. +"▦" + model.getValue(xHospiceDetlPath + "/marystatdesc") //결혼상태(기타)상세사항
  637. +"▦" + model.getValue(xHospiceDetlPath + "/pipeinsert") //관삽입
  638. +"▦" + model.getValue(xHospiceDetlPath + "/soclecomysituatdesc") //사회, 경제적상태 기타사유
  639. +"▦" + model.getValue(xHospiceDetlPath + "/famyheal") //환자와가족이원하는치료
  640. +"▦" + model.getValue(xHospiceDetlPath + "/longplan") //장기목표
  641. +"▦" + model.getValue(xHospiceDetlPath + "/shortplan") //단기목표
  642. +"▦" + model.getValue(xHospiceDetlPath + "/signno") //인증번호
  643. +"▩" ;
  644. //가족사항
  645. var sPafaData =
  646. "pid" //01 등록번호
  647. + "▦cretseqno" //02 생성일련번호
  648. + "▦instcd" //03 병원기관코드
  649. + "▦famyrel" //04 가족관계
  650. + "▦famyrelnm" //04 가족관계명
  651. + "▦zipcd1" //05 우편번호1
  652. + "▦zipcd2" //06 우편번호2
  653. + "▦zipcdseq" //07 우편번호 순서(일련번호)
  654. + "▦detladdr" //08 상세주소(하위주소)
  655. + "▦famynm" //09 가족이름
  656. + "▦marytypeflag" //10 결혼형태구분
  657. + "▦marytypeflagnm" //10 결혼형태구분
  658. + "▦cntctel" //11 전화번호
  659. + "▦maincarednor" //12 주간호제공자
  660. + "▦cmt" //13 비고
  661. + "▦separationfamyyn" //14 사별가족여부
  662. + "▦address" //15 주소
  663. + "▩" ;
  664. for (i=1;i < grd_famylist.rows; i++ ) {
  665. sPafaData +=
  666. model.getValue(xPafaPath + '[' + i + ']/pid') //01 등록번호
  667. + '▦' + model.getValue(xPafaPath + '[' + i + ']/cretseqno') //02 생성일련번호
  668. + '▦' + model.getValue(xPafaPath + '[' + i + ']/instcd') //03 병원기관코드
  669. + '▦' + model.getValue(xPafaPath + '[' + i + ']/famyrel') //04 가족관계
  670. + '▦' + model.getValue(xPafaPath + '[' + i + ']/famyrelnm') //04 가족관계명
  671. + '▦' + model.getValue(xPafaPath + '[' + i + ']/zipcd1') //05 우편번호1
  672. + '▦' + model.getValue(xPafaPath + '[' + i + ']/zipcd2') //06 우편번호2
  673. + '▦' + model.getValue(xPafaPath + '[' + i + ']/zipcdseq') //07 우편번호 순서(일련번호)
  674. + '▦' + model.getValue(xPafaPath + '[' + i + ']/detladdr') //08 상세주소(하위주소)
  675. + '▦' + model.getValue(xPafaPath + '[' + i + ']/famynm') //09 가족이름
  676. + '▦' + model.getValue(xPafaPath + '[' + i + ']/marytypeflag') //10 결혼형태구분
  677. + '▦' + model.getValue(xPafaPath + '[' + i + ']/marytypeflagnm') //10 결혼형태구분명
  678. + '▦' + model.getValue(xPafaPath + '[' + i + ']/cntctel') //11 전화번호
  679. + '▦' + model.getValue(xPafaPath + '[' + i + ']/maincarednor') //12 주간호제공자
  680. + '▦' + model.getValue(xPafaPath + '[' + i + ']/cmt') //13 비고
  681. + '▦' + model.getValue(xPafaPath + '[' + i + ']/separationfamyyn') //14 사별가족여부
  682. + '▦' + model.getValue(xPafaPath + '[' + i + ']/address') //15 주소
  683. + '▩';
  684. }
  685. model.removenode("/root/send");
  686. model.makeNode("/root/send");
  687. model.makeValue("/root/send/sData" ,sData );
  688. model.makeValue("/root/send/sPafaData" ,sPafaData );
  689. model.removeNode("/root/main/signSaveData");
  690. model.makeNode("/root/main/signSaveData");
  691. model.copyNode("/root/main/signSaveData", "/root/main/hospiceinfo/hospicedetl");
  692. //model.setValue("/root/main/signSaveData",);
  693. model.makeNode("/root/main/signSaveData/hospicefamylist");
  694. model.makeNode("/root/main/signSaveData/hospiceinpt");
  695. //model.copyNodesetType("/root/main/signSaveData/hospicefamylist", "/root/main/hospicefamy", "replace", model, model);
  696. copyNodeset("/root/main/signSaveData/hospicefamylist", "/root/main/hospicefamy/famylist");
  697. model.copyNode("/root/main/signSaveData/hospiceinpt", "/root/main/hospiceinpt");
  698. //model.makeValue("/root/main/signSaveData/famylist",sPafaData);
  699. if(saveChk != ""){
  700. if (!fSign()) return; //인증저장 로직 추가
  701. }
  702. submit("TXMNH01502");
  703. if(checkOpener()){
  704. messageBox("자료 저장이 ","I002");
  705. //window.close();
  706. if(saveChk != ""){
  707. fSearch(); //인증저장 후 signno 조회
  708. }
  709. }else{
  710. // model.reset();
  711. model.resetInstancenode("/root/main");
  712. model.resetInstancenode("/root/temp");
  713. model.refresh();
  714. }
  715. }
  716. /**
  717. * @group :
  718. * @ver : 2007.04.23
  719. * @by : 하재륜
  720. * @---------------------------------------------------
  721. * @type : function
  722. * @access : public
  723. * @desc : 화면 로드시
  724. * @param :
  725. * @return : 입력한날짜 + 날자
  726. * @---------------------------------------------------
  727. */
  728. function getAddDay(inputday,addend){
  729. var backDate ="";
  730. var rt = 0;
  731. var yyyy = inputday.substring(0,4) +"";
  732. var mm = inputday.substring(4,6) +"";
  733. var dd = inputday.substring(6,8) +"";
  734. var startDate = new Date(yyyy,(eval(mm)-1),dd);
  735. startDate.setTime(startDate.getTime()+(86400000*addend));
  736. NowYear = startDate.getYear();// 년
  737. NowMonth = startDate.getMonth()+1;// 월
  738. NowDay = startDate.getDate(); // 일
  739. backDate += NowYear ; //년도
  740. if (NowMonth < 10 )
  741. backDate += "0" + NowMonth ;
  742. else
  743. backDate += (startDate.getMonth() + 1);
  744. if (NowDay < 10 )
  745. backDate += "0" + NowDay ;
  746. else
  747. backDate += (startDate.getDate());
  748. return backDate ;
  749. }
  750. /**
  751. * @group :
  752. * @ver : 2007.11.01
  753. * @by : dhkim
  754. * @---------------------------------------------------
  755. * @type : function
  756. * @access : public
  757. * @desc : 호스피스 환자 가계도 팝업 호출해 가계도를 그려서 그 값을 리턴한다.
  758. * @param :
  759. * @param :
  760. * @return : xml instance
  761. * @---------------------------------------------------
  762. */
  763. function fGetFamyMap(){//GENOGRMNM
  764. var stMap = model.getValue(xHospiceDetlPath + '/genogrmnm'); //DB에 저장된 가계도 instance를 stMap변수에 담는다.
  765. setParameter("SPMMR04711_shape", stMap); //가계도 팝업을 호출하기 전 parameter를 정의한다.
  766. modal("SPMMR04700", 1,10, 10, "SPMMR04700" ,"/root/temp/strmeta", "/root/send"); //가계도 팝업 호출
  767. return getParameter("SPMMR04711_shape"); //팝업화면에서 가계도를 그린 후의 결과를 리턴
  768. }
  769. /**
  770. * @group :
  771. * @ver : 2007.11.01
  772. * @by : dhkim
  773. * @---------------------------------------------------
  774. * @type : function
  775. * @access : public
  776. * @desc : 입력 및 수정할 데이터를 저장할 instance에 set한다.
  777. * mapindd(recd에
  778. * @param :
  779. * @param :
  780. * @return :
  781. * @---------------------------------------------------
  782. */
  783. function fSetFamyMapValue(popMapRslt){
  784. var pid = model.getValue(xHospiceDetlPath + '/pid'); //db에서 조회해 온 환자등록번호
  785. var sysDate = getCurrentDate(); //현재 날짜
  786. var stDate = model.getValue(xHiddenPath + '/mapindd'); //DB에 저장된 날짜(hidden에서 가져옴)
  787. //팝업에서 확인버튼 누르면 instance에 담아 DB에 저장, 닫기버튼 누르면 적용 안됨.
  788. if(sysDate == stDate){//update
  789. model.setValue(xHospiceDetlPath + '/mapindd', stDate); //indd 등록일자
  790. }else{//insert
  791. model.setValue(xHospiceDetlPath + '/mapindd', sysDate); //indd 등록일자
  792. }
  793. model.setValue(xHospiceDetlPath + '/genogrmnm', popMapRslt); // genogrmnm : 가계도 실지 내용
  794. }
  795. /**
  796. * 호스피스 초기상담지를 출력한다.
  797. */
  798. function fPrint() {
  799. if(chk_baseyn.value == "Y") {
  800. model.makeValue("/root/main/hospiceinfo/hospicedetl/religncdnm", cmb_religncd.label);
  801. if(cmb_jobcd.value == "10") {
  802. model.makeValue("/root/main/hospiceinfo/hospicedetl/jobcdnm", ipt_jobnm.label);
  803. } else {
  804. model.makeValue("/root/main/hospiceinfo/hospicedetl/jobcdnm", cmb_jobcd.label);
  805. }
  806. model.makeValue("/root/main/hospiceinfo/hospicedetl/edcugrdecdnm", cmb_edcugrdecd.label);
  807. model.makeValue("/root/main/hospiceinfo/hospicedetl/marystatcdnm", cmb_marystatcd.label);
  808. model.makeValue("/root/main/hospiceinfo/hospicedetl/diagcd1nm", cmb_diagcd1.label);
  809. model.makeValue("/root/main/hospiceinfo/hospicedetl/diagcd2nm", cmb_diagcd2.label);
  810. }
  811. if(chk_famyyn.value == "Y") {
  812. for(var i = grd_famylist.fixedRows; i < grd_famylist.rows; i++) {
  813. model.makeValue(grd_famylist.nodeset + "[" + i + "]/famyrelnm", grd_famylist.labelMatrix(i, grd_famylist.colRef("famyrel")));
  814. model.makeValue(grd_famylist.nodeset + "[" + i + "]/marytypeflagnm", grd_famylist.labelMatrix(i, grd_famylist.colRef("marytypeflag")));
  815. }
  816. }
  817. if(chk_hospiceyn.value == "Y") {
  818. model.makeValue("/root/main/hospiceinfo/hospicedetl/reqtypeflagnm", combo12.label);
  819. model.makeValue("/root/main/hospiceinfo/hospicedetl/reqtypespecnm", cmb_reqdeptnm.label);
  820. model.makeValue("/root/main/hospiceinfo/hospicedetl/atdoctidnm", cmb_drlist.label);
  821. model.makeValue("/root/main/hospiceinfo/hospicedetl/reqresnflagnm", cmb_reqresnflag.label);
  822. model.makeValue("/root/main/hospiceinfo/hospicedetl/recmpsgecdnm", cmb_recmpsgecd.label);
  823. model.makeValue("/root/main/hospiceinfo/hospicedetl/itrdmoodcdnm", cmb_itrdmoodcd.label);
  824. model.makeValue("/root/main/hospiceinfo/hospicedetl/mngtprescdnm", cmb_mngtprescd.label);
  825. model.makeValue("/root/main/hospiceinfo/hospicedetl/agonalhopeplcecdnm", cmb_agonalhopeplcecd.label);
  826. }
  827. exeReportPreview("RPMNH01500", "XMLSTR");
  828. }
  829. /**
  830. * 이전기록일시를 조회한다.
  831. */
  832. function fChgRecHistInfo(cretdd, crettm){
  833. model.removenode("/root/send");
  834. model.makeNode("/root/send");
  835. model.makeValue("/root/send/pid", model.getValue("/root/main/hospiceinfo/hospicedetl/pid"));
  836. model.makeValue("/root/send/cretdd", cretdd);
  837. model.makeValue("/root/send/crettm", crettm);
  838. model.makeValue("/root/send/refflag", "1");
  839. if(submit("TRMNH01501")){
  840. if( (model.getValue(xHospiceDetlPath + "/hngnm")) =="" ){
  841. if(checkOpener()){
  842. messageBox("등록된자료가 ","I004");
  843. }else{
  844. model.reset();
  845. model.refresh();
  846. messageBox("등록된자료가 ","I004");
  847. }
  848. }else{
  849. fSetData();
  850. }
  851. }else{
  852. messageBox('조희를', 'E009');
  853. }
  854. }
  855. /**
  856. * 인증저장
  857. */
  858. function fCertiSave(){
  859. alert("인증저장");
  860. }
  861. function fMake_SignData(){
  862. fSetSignData();
  863. Sign.addnode("/root/main/signSaveData");
  864. //var xRecinfoPath = Sign.XPATH_SIGNINFO+"/hospiceinfo/hospicedetl";
  865. return;
  866. }
  867. /**
  868. * 인증저장.
  869. */
  870. function fSign(){
  871. Sign.certreload = false ; // 전자서명 호출시 인증저장 버튼을 누늘때마다 인증서가 뜨도록 처리
  872. //Sign.certchkflag = "Y";
  873. if(Sign.signprocess() == true){
  874. var sPid = model.getValue("/root/main/hospiceinfo/hospicedetl/pid");
  875. var sIndd = model.getValue("/root/main/hospiceinfo/hospicedetl/indd");
  876. var sCretNo = model.getValue("/root/main/hospiceinfo/hospicedetl/cretno");
  877. var sOrdDeptCd = model.getValue("/root/main/hospiceinfo/hospicedetl/reqtypespec");
  878. var sOrdDrId = model.getValue("/root/main/hospiceinfo/hospicedetl/atdoctid");
  879. //var sOrdDeptCd = "1111";
  880. //var sOrdDrId = "2222";
  881. // 전자인증 관련 환자 인적 정보를 보내줌.
  882. model.makeValue("/root/send/signdata/pid", sPid ); //등록번호
  883. model.makeValue("/root/send/signdata/orddd", sIndd); //입원일자
  884. model.makeValue("/root/send/signdata/signno", ""); //서명번호
  885. model.makeValue("/root/send/signdata/cretno", sCretNo); //생성번호
  886. model.makeValue("/root/send/signdata/recdd", getCurrentDate()); // 실제 기록이 이루어진 기록일자
  887. model.makeValue("/root/send/signdata/rectm", getCurrentTime()); //실제 기록이 이루어진 기록시간
  888. model.makeValue("/root/send/signdata/recsaveflag", "Y"); //전자서명 인적정보 변경여부(기록일시 변경되는 경우 : Y, 그외 : N)
  889. model.makeValue("/root/send/signdata/signflag", "02" ); //서명자료구분 (01 : 진료, 02 : 간호, 03 : LIS, 04 : 진료지원)
  890. model.makeValue("/root/send/signdata/signgenrflag", "I" ); //외래/입원구분(코드정의서 M0010 참조)
  891. model.makeValue("/root/send/signdata/formcd", "1600017856" ); //각 기록지별 서식코드
  892. model.makeValue("/root/send/signdata/orddeptcd", sOrdDeptCd); //진료부서코드
  893. model.makeValue("/root/send/signdata/orddrid", sOrdDrId ); //진료의사ID
  894. model.makeValue("/root/send/signdata/dispyn", "Y"); //기록뷰어에는 조회안되도록
  895. // 인증할 데이터 정보(미기록 노드 제거된 정보)
  896. // 미기록 노드 제거전 원본 노드 정보 : Sign.signedInfos[3]
  897. model.makeValue("/root/send/signdata/signbfcnts", Sign.signedInfos[1]);
  898. // 공인인증 처리후 데이터
  899. model.makeValue("/root/send/signdata/signaftcnts", Sign.signedInfos[2]);
  900. } else{
  901. return false;
  902. }
  903. model.makeValue("/root/send/signdata/screenid", getScreenID());
  904. return true;
  905. }
  906. /**
  907. * 인증저장 데이터 생성.
  908. */
  909. function fSetSignData(){
  910. //model.setValue("/root/temp/SignData/SignInfo/signSaveData/inrmmthdcd", cmb_inrmmthdcd.label);
  911. model.setValue("/root/main/signSaveData/inrmmthdcd", cmb_inrmmthdcd.label);
  912. model.setValue("/root/main/signSaveData/inrmacompstcd", cmb_inrmacompstcd.label);
  913. model.setValue("/root/main/signSaveData/religncd", cmb_religncd.label);
  914. model.setValue("/root/main/signSaveData/edcugrdecd", combo14.label);
  915. model.setValue("/root/main/signSaveData/jobcd", cmb_jobcd.label);
  916. model.setValue("/root/main/signSaveData/marystatcd", cmb_marystatcd.label);
  917. model.setValue("/root/main/signSaveData/diagcd1", cmb_diagcd1.label);
  918. model.setValue("/root/main/signSaveData/diagcd2", cmb_diagcd2.label);
  919. model.setValue("/root/main/signSaveData/attackdd", ipt_attackdd.label);
  920. model.setValue("/root/main/signSaveData/cncrdiagdd", ipt_cncrdiagdd.label);
  921. model.setValue("/root/main/signSaveData/reqtypeflag", combo12.label);
  922. model.setValue("/root/main/signSaveData/reqtypespec", cmb_reqdeptnm.label);
  923. model.setValue("/root/main/signSaveData/atdoctid", cmb_drlist.label);
  924. model.setValue("/root/main/signSaveData/reqresnflag", cmb_reqresnflag.label);
  925. model.setValue("/root/main/signSaveData/recmpsgecd", cmb_recmpsgecd.label);
  926. model.setValue("/root/main/signSaveData/itrdmoodcd", cmb_itrdmoodcd.label);
  927. model.setValue("/root/main/signSaveData/mngtprescd", cmb_mngtprescd.label);
  928. model.setValue("/root/main/signSaveData/endawaryn", cmb_endawaryn.label);
  929. model.setValue("/root/main/signSaveData/proendawaryn", cmb_proendawaryn.label);
  930. model.setValue("/root/main/signSaveData/cncrawaryn", cmb_cncrawaryn.label);
  931. model.setValue("/root/main/signSaveData/procncrawaryn", cmb_procncrawaryn.label);
  932. model.setValue("/root/main/signSaveData/agonalhopeplcecd", cmb_agonalhopeplcecd.label);
  933. }