SPAHR00920.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. /**
  2. * PET-CT 의뢰 및 의뢰취소 데이터 저장
  3. * @return
  4. */
  5. function fSaveData_Bak(){
  6. var cnt = getNodesetCount("/root/main/petctlist[chkflag='true']");
  7. var kind = model.getValue("/root/main/petctlist[chkflag='true']/kind");
  8. var pkgcd = model.getValue("/root/main/petctlist[chkflag='true']/pkgcd");
  9. var rcptstatcd = model.getValue("/root/main/petctlist[chkflag='true']/rcptstatcd")
  10. if(parseInt(cnt)<1){
  11. messageBox("선택된 내역이 없습니다.", "E");
  12. return;
  13. }
  14. if(parseInt(cnt)>1){
  15. messageBox("복수건의 데이터가 선택되었습니다.", "E");
  16. return;
  17. }
  18. if(event.currentTarget=="btn_E"){
  19. if(kind=="F"){
  20. messageBox("의뢰취소 된 건을 재의뢰 하실 수는 없습니다.\n신규로 의뢰 부탁드립니다.", "E");
  21. return;
  22. }
  23. }else if(event.currentTarget=="btn_F"){
  24. if(kind=="F"){
  25. messageBox("이미 의뢰취소 된 건입니다.", "E");
  26. return;
  27. }
  28. if(kind=="S" || kind == "R"){
  29. messageBox("예약 또는 수납된 의뢰건은 의뢰취소가 불가능합니다.\n건진센터로 연락부탁드리겠습니다.", "E");
  30. return;
  31. }
  32. var rtn = messageBox("선택된 내역을 의뢰취소하시겠습니까?", "S001");
  33. if(rtn!="6"){
  34. return;
  35. }
  36. }
  37. if(isNull(pkgcd)){
  38. messageBox("패키지명이 선택되지 않았습니다.", "E");
  39. return;
  40. }
  41. if(isNull(model.getValue("/root/main/petctlist[chkflag='true']/pid"))){
  42. messageBox("환자번호가 입력되지 않았습니다.", "E");
  43. return;
  44. }else{
  45. model.makeValue("/root/send/reqdata/srchpid", model.getValue("/root/main/petctlist[chkflag='true']/pid"));
  46. model.makeValue("/root/send/reqdata/sess_posinstcd", getUserInfo("dutplceinstcd"));
  47. model.makeValue("/root/send/reqdata/srchinstcd", getUserInfo("dutplceinstcd"));
  48. model.makeValue("/root/send/reqdata/srchfromdd", getCurrentDate());
  49. model.makeValue("/root/send/reqdata/srchtodd", getCurrentDate());
  50. model.makeValue("/root/send/reqdata/etccd", "G14");
  51. model.makeValue("/root/send/reqdata/srchhealexamdetlflag", "C01");
  52. model.makeValue("/root/send/reqdata/srchmode", "1");
  53. model.makeValue("/root/send/reqdata/clscd", "G");
  54. model.makeValue("/root/send/reqdata/srchcond", "pid");
  55. if(submit("TRAHA00101")){ // 환자 정보 조회
  56. if(isNull(model.getValue("/root/temp/patinfo/item/pid"))){
  57. messageBox("환자 정보 검색에 실패하였습니다.", "E");
  58. return;
  59. }else{
  60. if(event.currentTarget=="btn_E"){ // 의뢰
  61. model.copyNode("/root/send/save", "/root/temp/patinfo/item");
  62. model.makeValue("/root/send/save/orddd", getCurrentDate());
  63. model.makeValue("/root/send/save/pid", model.getValue("/root/main/petctlist[chkflag='true']/pid"));
  64. model.makeValue("/root/send/save/instcd", getUserInfo("dutplceinstcd"));
  65. model.makeValue("/root/send/save/userid", getUserId());
  66. model.makeValue("/root/send/save/healexamflag", "C");
  67. model.makeValue("/root/send/save/healexamdetlflag", "C01");
  68. model.makeValue("/root/send/save/rsrvdd", getCurrentDate());
  69. model.makeValue("/root/send/save/hopedd", getCurrentDate());
  70. model.makeValue("/root/send/save/rsrvflag", "01");
  71. model.makeValue("/root/send/save/mode", "E");
  72. model.makeValue("/root/send/save/rsrvdetlflag", "C01");
  73. model.makeValue("/root/send/save/pkgcd", model.getValue("/root/main/petctlist[chkflag='true']/pkgcd"));
  74. model.makeValue("/root/send/save/tagno", "");
  75. model.makeValue("/root/send/save/disccd", "-");
  76. model.makeValue("/root/send/save/choiflag", "01");
  77. model.makeValue("/root/send/save/healexamplacecd", "S");
  78. model.makeValue("/root/send/save/pkguncocd", "V01");
  79. if(submit("TXAHA00012")){
  80. model.makeValue("/root/send/srchdata/pid", model.getValue("/root/main/petctlist[chkflag='true']/pid"));
  81. fSearch();
  82. }
  83. }else if(event.currentTarget=="btn_F"){ // 의뢰취소
  84. model.copyNode("/root/send/save", "/root/temp/patinfo/item");
  85. model.makeValue("/root/send/save/orddd", getCurrentDate());
  86. model.makeValue("/root/send/save/pid", model.getValue("/root/main/petctlist[chkflag='true']/pid"));
  87. model.makeValue("/root/send/save/instcd", getUserInfo("dutplceinstcd"));
  88. model.makeValue("/root/send/save/userid", getUserId());
  89. model.makeValue("/root/send/save/healexamflag", "C");
  90. model.makeValue("/root/send/save/healexamdetlflag", "C01");
  91. model.makeValue("/root/send/save/hopedd", getCurrentDate());
  92. model.makeValue("/root/send/save/rsrvflag", "01");
  93. model.makeValue("/root/send/save/mode", "F");
  94. model.makeValue("/root/send/save/rsrvdetlflag", "C01");
  95. model.makeValue("/root/send/save/pkgcd", model.getValue("/root/main/petctlist[chkflag='true']/pkgcd"));
  96. model.makeValue("/root/send/save/orddd", model.getValue("/root/main/petctlist[chkflag='true']/orddd"));
  97. model.makeValue("/root/send/save/cretno", model.getValue("/root/main/petctlist[chkflag='true']/cretno"));
  98. model.makeValue("/root/send/save/rsrvdd", model.getValue("/root/main/petctlist[chkflag='true']/grsrvdd"));
  99. model.makeValue("/root/send/save/rsrvno", model.getValue("/root/main/petctlist[chkflag='true']/grsrvno"));
  100. model.makeValue("/root/send/save/tagno", "");
  101. model.makeValue("/root/send/save/disccd", "-");
  102. model.makeValue("/root/send/save/choiflag", "01");
  103. model.makeValue("/root/send/save/healexamplacecd", "S");
  104. model.makeValue("/root/send/save/pkguncocd", "V01");
  105. if(submit("TXAHA00012")){
  106. model.makeValue("/root/send/srchdata/pid", model.getValue("/root/main/petctlist[chkflag='true']/pid"));
  107. fSearch();
  108. }
  109. }
  110. }
  111. }
  112. }
  113. }
  114. /**
  115. * 패키지명을 기준자료로 관리
  116. * @return
  117. */
  118. function fGetBaseInfo(){
  119. healGetCodeList(new Array("S910"), new Array("/root/init/pkglist"));
  120. }
  121. /**
  122. * PET-CT 의뢰 및 의뢰취소 데이터 저장
  123. * @return
  124. */
  125. function fSaveData(){
  126. var pid = model.getValue("/root/send/srchdata/pid");
  127. var pkgcd = model.getValue("/root/send/srchdata/pkgcd");
  128. var cnt = getNodesetCount("/root/main/petctlist[chkflag='true']");
  129. var kind = model.getValue("/root/main/petctlist[chkflag='true']/kind");
  130. var rcptstatcd = model.getValue("/root/main/petctlist[chkflag='true']/rcptstatcd")
  131. if(parseInt(cnt)>1){
  132. messageBox("복수건의 데이터가 선택되었습니다.", "E");
  133. return;
  134. }
  135. if(event.currentTarget=="btn_E"){
  136. if(kind=="F"){
  137. messageBox("의뢰취소 된 건을 재의뢰 하실 수는 없습니다.\n신규로 의뢰 부탁드립니다.", "E");
  138. return;
  139. }
  140. }else if(event.currentTarget=="btn_F"){
  141. if(parseInt(cnt)<1){
  142. messageBox("선택된 데이터가 없습니다.", "E");
  143. return;
  144. }
  145. if(kind=="F"){
  146. messageBox("이미 의뢰취소 된 건입니다.", "E");
  147. return;
  148. }
  149. if(kind=="S" || kind == "R"){
  150. messageBox("예약 및 수납된 의뢰건은 의뢰취소가 불가능합니다.\n건진센터로 연락부탁드리겠습니다.", "E");
  151. return;
  152. }
  153. var rtn = messageBox("선택된 내역을 의뢰취소하시겠습니까?", "S001");
  154. if(rtn!="6"){
  155. return;
  156. }
  157. }
  158. if(isNull(pkgcd)){
  159. messageBox("패키지명이 선택되지 않았습니다.", "E");
  160. return;
  161. }
  162. if(isNull(pid)){
  163. messageBox("환자번호가 입력되지 않았습니다.", "E");
  164. return;
  165. }else{
  166. model.makeValue("/root/send/reqdata/srchpid", pid);
  167. model.makeValue("/root/send/reqdata/sess_posinstcd", getUserInfo("dutplceinstcd"));
  168. model.makeValue("/root/send/reqdata/srchinstcd", getUserInfo("dutplceinstcd"));
  169. model.makeValue("/root/send/reqdata/srchfromdd", getCurrentDate());
  170. model.makeValue("/root/send/reqdata/srchtodd", getCurrentDate());
  171. model.makeValue("/root/send/reqdata/etccd", "G14");
  172. model.makeValue("/root/send/reqdata/srchhealexamdetlflag", "C01");
  173. model.makeValue("/root/send/reqdata/srchmode", "1");
  174. model.makeValue("/root/send/reqdata/clscd", "G");
  175. model.makeValue("/root/send/reqdata/srchcond", "pid");
  176. if(submit("TRAHA00101")){ // 환자 정보 조회
  177. if(isNull(model.getValue("/root/temp/patinfo/item/pid"))){
  178. messageBox("환자 정보 검색에 실패하였습니다.", "E");
  179. return;
  180. }else{
  181. if(event.currentTarget=="btn_E"){ // 의뢰
  182. model.copyNode("/root/send/save", "/root/temp/patinfo/item");
  183. model.makeValue("/root/send/save/orddd", getCurrentDate());
  184. model.makeValue("/root/send/save/pid", pid);
  185. model.makeValue("/root/send/save/instcd", getUserInfo("dutplceinstcd"));
  186. model.makeValue("/root/send/save/userid", getUserId());
  187. model.makeValue("/root/send/save/healexamflag", "C");
  188. model.makeValue("/root/send/save/healexamdetlflag", "C01");
  189. model.makeValue("/root/send/save/rsrvdd", getCurrentDate());
  190. model.makeValue("/root/send/save/hopedd", getCurrentDate());
  191. model.makeValue("/root/send/save/rsrvflag", "01");
  192. model.makeValue("/root/send/save/mode", "E");
  193. model.makeValue("/root/send/save/rsrvdetlflag", "C01");
  194. model.makeValue("/root/send/save/pkgcd", pkgcd);
  195. model.makeValue("/root/send/save/tagno", "");
  196. model.makeValue("/root/send/save/disccd", "-");
  197. model.makeValue("/root/send/save/choiflag", "01");
  198. model.makeValue("/root/send/save/healexamplacecd", "S");
  199. model.makeValue("/root/send/save/pkguncocd", "V01");
  200. if(submit("TXAHA00012")){
  201. fSearch();
  202. }
  203. }else if(event.currentTarget=="btn_F"){ // 의뢰취소
  204. model.copyNode("/root/send/save", "/root/temp/patinfo/item");
  205. model.makeValue("/root/send/save/orddd", getCurrentDate());
  206. model.makeValue("/root/send/save/pid", model.getValue("/root/main/petctlist[chkflag='true']/pid"));
  207. model.makeValue("/root/send/save/instcd", getUserInfo("dutplceinstcd"));
  208. model.makeValue("/root/send/save/userid", getUserId());
  209. model.makeValue("/root/send/save/healexamflag", "C");
  210. model.makeValue("/root/send/save/healexamdetlflag", "C01");
  211. model.makeValue("/root/send/save/hopedd", getCurrentDate());
  212. model.makeValue("/root/send/save/rsrvflag", "01");
  213. model.makeValue("/root/send/save/mode", "F");
  214. model.makeValue("/root/send/save/rsrvdetlflag", "C01");
  215. model.makeValue("/root/send/save/pkgcd", model.getValue("/root/main/petctlist[chkflag='true']/pkgcd"));
  216. model.makeValue("/root/send/save/orddd", model.getValue("/root/main/petctlist[chkflag='true']/orddd"));
  217. model.makeValue("/root/send/save/cretno", model.getValue("/root/main/petctlist[chkflag='true']/cretno"));
  218. model.makeValue("/root/send/save/rsrvdd", model.getValue("/root/main/petctlist[chkflag='true']/grsrvdd"));
  219. model.makeValue("/root/send/save/rsrvno", model.getValue("/root/main/petctlist[chkflag='true']/grsrvno"));
  220. model.makeValue("/root/send/save/tagno", "");
  221. model.makeValue("/root/send/save/disccd", "-");
  222. model.makeValue("/root/send/save/choiflag", "01");
  223. model.makeValue("/root/send/save/healexamplacecd", "S");
  224. model.makeValue("/root/send/save/pkguncocd", "V01");
  225. if(submit("TXAHA00012")){
  226. model.makeValue("/root/send/srchdata/pid", model.getValue("/root/main/petctlist[chkflag='true']/pid"));
  227. fSearch();
  228. }
  229. }
  230. }
  231. }
  232. }
  233. }
  234. /**
  235. * PET-CT환자 검색
  236. * @return
  237. */
  238. function fSearch(){
  239. var pid = model.getValue("/root/send/srchdata/pid");
  240. var pkgcd = model.getValue("/root/send/srchdata/pkgcd");
  241. if(isNull(pid)){
  242. messageBox("환자 번호가 입력되지 않았습니다.", "E");
  243. return;
  244. }
  245. submit("TRAHA00199");
  246. }