SMMNH03500.js 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /**
  2. * @group :
  3. * @ver : 2007.11.06
  4. * @by : dhkim
  5. * @---------------------------------------------------
  6. * @type : function
  7. * @access : public
  8. * @desc : 호스피스 환자가족을 조회한다.
  9. * @param :
  10. * @param :
  11. * @return : xml instance
  12. * @---------------------------------------------------
  13. */
  14. var xHospiceInfoPath = '/root/main/hospiceinfo';
  15. function fSearch(){
  16. var pid, hngnm, sexage, rrgstno;
  17. if(checkOpener()) {
  18. pid = opener.javascript.getParameter("pid");
  19. hngnm = opener.javascript.getParameter("hngnm");
  20. sexage = opener.javascript.getParameter("sexage");
  21. rrgstno = opener.javascript.getParameter("rrgstno");
  22. indd = opener.javascript.getParameter("indd");
  23. cretno = opener.javascript.getParameter("cretno");
  24. }else{
  25. pid = model.getValue(xHospiceInfoPath + "/pid");
  26. hngnm = model.getValue(xHospiceInfoPath + "/hngnm");
  27. sexage = model.getValue(xHospiceInfoPath + "/sexage");
  28. rrgstno = model.getValue(xHospiceInfoPath + "/rrgstno");
  29. indd = model.getValue(xHospiceInfoPath + "/indd");
  30. cretno = model.getValue(xHospiceInfoPath + "/cretno");
  31. }
  32. model.setValue(xHospiceInfoPath + "/pid",pid);
  33. model.removenodeset("/root/main/hospicefamy");
  34. model.removenode("/root/send");
  35. model.makeValue("/root/send/pid",model.getValue(xHospiceInfoPath + "/pid"));
  36. submit("TRMNH03501");
  37. model.makeNode(xHospiceInfoPath + "/pid");
  38. model.makeNode(xHospiceInfoPath + "/hngnm");
  39. model.makeNode(xHospiceInfoPath + "/sexage");
  40. model.makeNode(xHospiceInfoPath + "/rrgstno");
  41. model.makeNode(xHospiceInfoPath + "/indd");
  42. model.makeNode(xHospiceInfoPath + "/cretno");
  43. model.setValue(xHospiceInfoPath + "/pid", pid);
  44. model.setValue(xHospiceInfoPath + "/hngnm", hngnm);
  45. model.setValue(xHospiceInfoPath + "/sexage", sexage);
  46. model.setValue(xHospiceInfoPath + "/rrgstno", rrgstno);
  47. model.setValue(xHospiceInfoPath + "/indd", indd);
  48. model.setValue(xHospiceInfoPath + "/cretno", cretno);
  49. model.refresh();
  50. }
  51. /**
  52. * @group :
  53. * @ver : 2007.11.06
  54. * @by : dhkim
  55. * @---------------------------------------------------
  56. * @type : function
  57. * @access : public
  58. * @desc : 호스피스 환자 가족을 저장한다.
  59. * @param :
  60. * @param :
  61. * @return : xml instance
  62. * @---------------------------------------------------
  63. */
  64. function fSave(){
  65. var sData = "pid" // 01 등록번호
  66. + "▩" ;
  67. sData += model.getValue(xHospiceInfoPath + "/pid" ) // 01 등록번호
  68. //가족사항
  69. var xPafaPath = "/root/main/hospicefamy/famylist";
  70. var sPafaData =
  71. "pid" //01등록번호
  72. + "▦cretseqno" //02생성일련번호
  73. + "▦instcd" //03병원기관코드
  74. + "▦famyrel" //04가족관계
  75. + "▦zipcd1" //05우편번호1
  76. + "▦zipcd2" //06우편번호2
  77. + "▦zipcdseq" //07우편번호 순서(일련번호)
  78. + "▦detladdr" //08상세주소(하위주소)
  79. + "▦famynm" //09가족이름
  80. + "▦marytypeflag" //10결혼형태구분
  81. + "▦cntctel" //11전화번호
  82. + "▦maincarednor" //12주간호제공자
  83. + "▦cmt" //13비고
  84. + "▦separationfamyyn" //14사별가족여부
  85. + "▦todt" //15종료일시
  86. + "▦address" //16주소
  87. + "▩" ;
  88. for (i=1;i < grd_famylist.rows; i++ ) {
  89. sPafaData +=
  90. model.getValue(xPafaPath + "["+ i + "]/pid" )//01등록번호
  91. + "▦" + model.getValue(xPafaPath + "["+ i + "]/cretseqno" )//02생성일련번호
  92. + "▦" + model.getValue(xPafaPath + "["+ i + "]/instcd" )//03병원기관코드
  93. + "▦" + model.getValue(xPafaPath + "["+ i + "]/famyrel" )//04가족관계
  94. + "▦" + model.getValue(xPafaPath + "["+ i + "]/zipcd1" )//05우편번호1
  95. + "▦" + model.getValue(xPafaPath + "["+ i + "]/zipcd2" )//06우편번호2
  96. + "▦" + model.getValue(xPafaPath + "["+ i + "]/zipcdseq" )//07우편번호 순서(일련번호)
  97. + "▦" + model.getValue(xPafaPath + "["+ i + "]/detladdr" )//08상세주소(하위주소)
  98. + "▦" + model.getValue(xPafaPath + "["+ i + "]/famynm" )//09가족이름
  99. + "▦" + model.getValue(xPafaPath + "["+ i + "]/marytypeflag" )//10결혼형태구분
  100. + "▦" + model.getValue(xPafaPath + "["+ i + "]/cntctel" )//11전화번호
  101. + "▦" + model.getValue(xPafaPath + "["+ i + "]/maincarednor" )//12주간호제공자
  102. + "▦" + model.getValue(xPafaPath + "["+ i + "]/cmt" )//13비고
  103. + "▦" + model.getValue(xPafaPath + "["+ i + "]/separationfamyyn" )//14사별가족여부
  104. + "▦" + model.getValue(xPafaPath + "["+ i + "]/todt" )//15종료일시
  105. + "▦" + model.getValue(xPafaPath + "["+ i + "]/address" )//16상위주소
  106. + "▩" ;
  107. }
  108. model.removenode("/root/send");
  109. model.makeNode("/root/send");
  110. model.makeValue("/root/send/sData" ,sData );
  111. model.makeValue("/root/send/sPafaData" ,sPafaData );
  112. submit("TRMNH03502");
  113. fSearch();
  114. }