SMMNI03100.js 68 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689
  1. /* ---------------------------------------------------------------------
  2. 항암관리간호기록
  3. - Version :
  4. 1) : Ver.1.00.01
  5. : Create By dhkim
  6. : 2009.10.12
  7. ---------------------------------------------------------------------- */
  8. //글로벌 변수 선언
  9. var suppdeptcd;//메뉴그룹 사용처(조회할 병동코드)
  10. var sORDERBYDTL = ""; //그리드 Header 선택시 정렬
  11. //초기화
  12. function fInit(){
  13. //상단정보
  14. var node = getGlobalVariable("paminfo");
  15. setCSVToNode("/root/temp/paminfo", node);
  16. //메뉴그룹 사용처(조회할 병동코드)
  17. suppdeptcd = aezfSetSuppDeptcd();
  18. //조회일자 setting
  19. model.setValue("/root/main/cond/fromdd", getCurrentDate());
  20. model.setValue("/root/main/cond/todd", getCurrentDate());
  21. //상단정보 존재시 개인별선택
  22. if(model.getValue("/root/temp/paminfo/list/pid") != "") {
  23. var pid = model.getValue("/root/temp/paminfo/list/pid");
  24. model.setValue("/root/main/cond/reqflag", "1"); //개인별
  25. model.setValue("/root/main/cond/pid", pid);
  26. }else{
  27. model.setValue("/root/main/cond/reqflag", "2"); //기간별
  28. ipt_pid.disabled = true;
  29. chk_flag.disabled=true;
  30. }
  31. model.refresh();
  32. //공통코드 로드
  33. zbcfGetCodeList(new Array("M0519", "M0520", "M0597"), new Array("/root/init/M0519list", "/root/init/M0520list", "/root/init/M0597list"), true);
  34. //대상자리스트 조회
  35. fTrgtmanList();
  36. }
  37. //대상자리스트 조회
  38. function fTrgtmanList() {
  39. //대상자정보및 항암치료정보 초기화
  40. model.removenode("/root/main/patspclcntinfo");
  41. model.removenode("/root/main/antirecinfo");
  42. if(fIsSearchValid()){
  43. model.removenode('/root/main/trgtmaninfolist');
  44. model.makeNode('/root/main/trgtmaninfolist');
  45. model.removenode('/root/send');
  46. model.makeNode('/root/send');
  47. model.copyNode("/root/send", "/root/main/cond"); //copyNode
  48. model.makeValue('/root/send/recflag', 'I');//I:대상자리스트조회, D:항암관리기록 조회
  49. //로그인한 사용자의 부서를 먼저 세팅(조회할병동코드)
  50. var userDeptcd = getUserInfo('dutplcecd');
  51. if(userDeptcd != suppdeptcd){
  52. userDeptcd = suppdeptcd;
  53. }
  54. model.makeValue('/root/send/wardcd', userDeptcd);
  55. model.makeValue("/root/send/orderby", model.getValue("/root/main/cond/orderby"));
  56. if(submit("TRMNI03101")){//submit
  57. if(grd_trgtmanlistinfo.rows > 1){
  58. //등록번호, 환자명, S/A merge
  59. grd_trgtmanlistinfo.mergeCol(grd_trgtmanlistinfo.colRef("pid")) = true;
  60. grd_trgtmanlistinfo.mergeCol(grd_trgtmanlistinfo.colRef("hngnm")) = true;
  61. grd_trgtmanlistinfo.mergeCol(grd_trgtmanlistinfo.colRef("sexage")) = true;
  62. grd_trgtmanlistinfo.mergeCol(grd_trgtmanlistinfo.colRef("orddeptnm")) = false;
  63. grd_trgtmanlistinfo.mergeCol(grd_trgtmanlistinfo.colRef("orddrnm")) = false;
  64. grd_trgtmanlistinfo.mergeCol(grd_trgtmanlistinfo.colRef("prtlnm")) = false;
  65. grd_trgtmanlistinfo.mergeCol(grd_trgtmanlistinfo.colRef("prtldg")) = false;
  66. grd_trgtmanlistinfo.mergeCol(grd_trgtmanlistinfo.colRef("recdt")) = false;
  67. grd_trgtmanlistinfo.mergeCol(grd_trgtmanlistinfo.colRef("recrnm")) = false;
  68. grd_trgtmanlistinfo.refresh();
  69. //2010.05.18 김달현 - 기록정보가 있는 경우 대상자리스트에서 사용자가 직접 선택하여 항암치료정보 조회하도록함
  70. /*
  71. //첫번째 열의 환자 기록정보 load
  72. grd_trgtmanlistinfo.row = 1;//첫번째열 default 선택상태
  73. var pid = model.getValue('/root/main/trgtmaninfolist/trgtmanlist[' + grd_trgtmanlistinfo.row + ']/pid');
  74. var indd = model.getValue('/root/main/trgtmaninfolist/trgtmanlist[' + grd_trgtmanlistinfo.row + ']/indd');
  75. var cretno = model.getValue('/root/main/trgtmaninfolist/trgtmanlist[' + grd_trgtmanlistinfo.row + ']/cretno');
  76. var recdt = model.getValue('/root/main/trgtmaninfolist/trgtmanlist[' + grd_trgtmanlistinfo.row + ']/recdt');
  77. fGetAntiRecInfo(pid, indd, cretno, recdt);
  78. */
  79. }else{//기록정보가 없을때
  80. var pid = model.getValue("/root/temp/paminfo/list/pid");
  81. var indd, cretno;
  82. //상단정보 있을시 && 조회조건에 상단 환자 세팅시
  83. if(pid != "" && pid == model.getValue('/root/main/cond/pid')){
  84. indd = model.getValue("/root/temp/paminfo/list/indd");
  85. cretno = model.getValue("/root/temp/paminfo/list/cretno");
  86. fGetAntiRecInfo(pid, indd, cretno);
  87. }
  88. }
  89. }
  90. model.refresh();
  91. }
  92. }
  93. //대상자 조회 조건 유효성체크
  94. function fIsSearchValid(){
  95. var reqflag = model.getValue('/root/main/cond/reqflag');
  96. var pid = model.getValue('/root/main/cond/pid');
  97. var pidflag = model.getValue('/root/main/cond/pidflag');
  98. var fromdd = model.getValue('/root/main/cond/fromdd');
  99. var todd = model.getValue('/root/main/cond/todd');
  100. //전체조회 아닐때
  101. if(pidflag != 'Y'){
  102. //날짜조건체크
  103. if(fromdd == ""){
  104. messageBox('조회 시작일자를 입력하세요.', 'I');
  105. return false;
  106. }
  107. if(todd == ""){
  108. messageBox('조회 종료일자를 입력하세요.', 'I');
  109. return false;
  110. }
  111. if(!isValidDateTime(fromdd, "YYYYMMDD")){
  112. messageBox('조회 시작일자를 날짜유형(YYYY-MM-DD)에 맞게 입력하세요.', 'I');
  113. return false;
  114. }
  115. if(!isValidDateTime(todd, "YYYYMMDD")){
  116. messageBox('조회 종료일자를 날짜유형(YYYY-MM-DD)에 맞게 입력하세요.', 'I');
  117. return false;
  118. }
  119. if(fromdd>todd){
  120. messageBox('시작일자를 종료일자 이전일자로 입력하세요.','I');
  121. return false;
  122. }
  123. }
  124. //조회구분이 개인별일때 등록번호 필수입력
  125. if(reqflag == "1" && pid == "") {
  126. if(pid == ""){
  127. messageBox("등록번호를 입력하세요.","I");
  128. model.setFocus("ipt_pid");
  129. return false;
  130. }
  131. }
  132. return true;
  133. }
  134. //20091016 dhkim
  135. //항암관리기록 대상자정보 및 항암치료정보 세팅
  136. function fGetAntiRecInfo(pid, indd, cretno, recdt){
  137. //상단정보 세팅 2010-06-04 회의에서 제외
  138. // fSetPatInfoAntiRec(pid, indd, cretno, "I");//ordtype : 임시로 I만 넘김.. 외래인경우도 상단 올려야 하는지 확인필요
  139. //항암기록조회
  140. model.removenode('/root/main/antirecinfo');
  141. //model.makeNode('/root/main/antirecinfo');
  142. model.removenode('/root/main/patspclcntinfo');
  143. //model.makeNode('/root/main/patspclcntinfo');
  144. model.removenode('/root/send');
  145. model.makeValue('/root/send/pid', pid);
  146. model.makeValue('/root/send/indd', indd);
  147. model.makeValue('/root/send/cretno', cretno);
  148. model.makeValue('/root/send/recdt', recdt);
  149. model.makeValue('/root/send/recflag', 'D');//I:대상자리스트조회, D:항암관리기록 조회
  150. //로그인한 사용자의 부서를 먼저 세팅(조회할병동코드)
  151. var userDeptcd = getUserInfo('dutplcecd');
  152. if(userDeptcd != suppdeptcd){
  153. userDeptcd = suppdeptcd;
  154. }
  155. model.makeValue('/root/send/wardcd', userDeptcd);
  156. if(submit('TRMNI03103')){
  157. //신규기록여부에 따라 기록일 색 변경(신규일때는 주황색으로 보여짐)
  158. var isnew = model.getValue('/root/main/antirecinfo/isnew');
  159. if(isnew == 'Y'){
  160. opt_recdt.attribute('color') = '#ff6600';//주황
  161. }else{
  162. opt_recdt.attribute('color') = '#4D4D4D';//검정
  163. }
  164. var antirecinfoCnt = getNodesetCount("/root/main/antirecinfo");
  165. if(antirecinfoCnt > 0){
  166. //항암치료정보 조회내역에 따라 텍스트 박스 활성화 및 비활성화 처리
  167. fSetIptBoxDisabled();
  168. }
  169. }
  170. model.refresh();
  171. }
  172. //20091031 dhkim
  173. //체크박스 선택시 코드 순서가 뒤짚히는 부분에 대해 코드순 정렬
  174. function fSortCheckboxData(chkData){
  175. var dataArr = chkData.split(' ');
  176. var dataStr = "";
  177. if(dataArr.length > 0){
  178. var tmp;
  179. for(var i = dataArr.length; i >= 0; i--){
  180. for(var j = 0; j < i; j++){
  181. if(dataArr[j] > dataArr[j+1]){
  182. tmp = dataArr[j];
  183. dataArr[j] = dataArr[j+1];
  184. dataArr[j+1] = tmp;
  185. }
  186. }
  187. }
  188. for(var i = 0; i < dataArr.length; i++){
  189. if(dataArr.length -1 == i){
  190. dataStr += dataArr[i];
  191. }else{
  192. dataStr += dataArr[i] + ' ';
  193. }
  194. }
  195. }
  196. return dataStr;
  197. }
  198. //20091103 dhkim
  199. //체크박스 코드값을 명칭으로 변경
  200. function fChangeChkboxCodeToName(chkboxCode){
  201. var chkboxArr = chkboxCode.split(' ');
  202. var chkNameStr = '';
  203. for(var i = 0; i < chkboxArr.length; i++){
  204. chkNameStr += model.getValue('/root/init/M0519list/M0519[cdid="' + chkboxArr[i] + '"]/cdnm') + ' ';
  205. }
  206. return chkNameStr;
  207. }
  208. //20091021 dhkim
  209. //항암치료정보 조회내역에 따라 텍스트 박스 활성화 및 비활성화 처리
  210. function fSetIptBoxDisabled(){
  211. //지난항암제투여후발생증상에 기타 체크시 text입력창(txt_bfsympetc) 활성화 및 값 초기화처리
  212. var bfsymp = model.getValue('/root/main/antirecinfo/bfsymp');
  213. //체크박스 체크내역 코드값 순서로 정렬(체크박스 데이터가 클릭 이벤트 발생할때마다 순서가 뒤바뀜)
  214. bfsymp = fSortCheckboxData(bfsymp);
  215. model.setValue('/root/main/antirecinfo/bfsymp', bfsymp);
  216. //체크박스 체크내역 코드값을 명칭으로 변경후 명칭노드에 저장
  217. var bfsympnm = fChangeChkboxCodeToName(bfsymp);
  218. model.setValue('/root/main/antirecinfo/bfsympnm', bfsympnm);
  219. if(isSearchString(bfsymp, "99") == true){
  220. txt_bfsympetc.disabled = false;
  221. }else{
  222. model.setValue('/root/main/antirecinfo/bfsympetc', '');
  223. txt_bfsympetc.disabled = true;
  224. }
  225. //간호기록 특이사항 체크시 text입력창(txt_carerecetc) 비활성화 및 값 초기화처리
  226. var carerecyn = model.getValue('/root/main/antirecinfo/carerecyn');
  227. if(carerecyn.length > 2){
  228. carerecyn = carerecyn.substring(carerecyn.length -1);
  229. }
  230. if(carerecyn == 'Y'){
  231. model.setValue('/root/main/antirecinfo/carerecetc', '');
  232. txt_carerecetc.disabled = true;
  233. }else{
  234. txt_carerecetc.disabled = false;
  235. }
  236. //이번항암제투여과민반응없음 체크시 과민증상(chk_prestsymp), 기타text입력창(txt_prestsympetc) 비활성화 및 값 초기화처리
  237. var prestsympyn = model.getValue('/root/main/antirecinfo/prestsympyn');
  238. if(prestsympyn.length > 2){
  239. prestsympyn = prestsympyn.substring(prestsympyn.length -1);
  240. }
  241. if(prestsympyn == 'Y'){
  242. model.setValue('/root/main/antirecinfo/prestsymp', '');
  243. model.setValue('/root/main/antirecinfo/prestsympetc', '');
  244. chk_prestsymp.disabled = true;
  245. txt_prestsympetc.disabled = true;
  246. }else{
  247. chk_prestsymp.disabled = false;
  248. txt_prestsympetc.disabled = false;
  249. }
  250. //이번항암제투여과민반응증상 기타 체크시 text입력창(txt_prestsympetc) 활성화 및 값 초기화처리
  251. var prestsymp = model.getValue('/root/main/antirecinfo/prestsymp');
  252. //체크박스 체크내역 코드값 순서로 정렬(체크박스 데이터가 클릭 이벤트 발생할때마다 순서가 뒤바뀜)
  253. prestsymp = fSortCheckboxData(prestsymp);
  254. model.setValue('/root/main/antirecinfo/prestsymp', prestsymp);
  255. //체크박스 체크내역 코드값을 명칭으로 변경후 명칭노드에 저장
  256. var prestsympnm = fChangeChkboxCodeToName(prestsymp);
  257. model.setValue('/root/main/antirecinfo/prestsympnm', prestsympnm);
  258. if(isSearchString(prestsymp, '99') == true){
  259. txt_prestsympetc.disabled = false;
  260. }else{
  261. model.setValue('/root/main/antirecinfo/prestsympetc', '');
  262. txt_prestsympetc.disabled = true;
  263. }
  264. //항암제중단여부에 Y선택시
  265. //중단사유(cmb_antstoprs), 기타입력text(ipt_antstoprsetc), 잔여항암제종류(ipt_antremvol), 처리내용(ipt_antremrec)
  266. //입력창 활성화 및 값 초기화처리
  267. var antstopyn = model.getValue('/root/main/antirecinfo/antstopyn');
  268. if(antstopyn == 'Y'){
  269. cmb_antstoprs.disabled = false;
  270. ipt_antremvol.disabled = false;
  271. ipt_antremrec.disabled = false;
  272. //중단사유(cmb_antstoprs)에 기타 입력시에만 기타입력text(ipt_antstoprsetc)활성화
  273. var antstoprs = model.getValue('/root/main/antirecinfo/antstoprs');
  274. if(isSearchString(antstoprs, '99') == true){
  275. ipt_antstopetc.disabled = false;
  276. }else{
  277. ipt_antstopetc.disabled = true;
  278. }
  279. }else{
  280. model.setValue('/root/main/antirecinfo/antstoprs', '');
  281. model.setValue('/root/main/antirecinfo/antstopetc', '');
  282. model.setValue('/root/main/antirecinfo/antremvol', '');
  283. model.setValue('/root/main/antirecinfo/antremrec', '');
  284. cmb_antstoprs.disabled = true;
  285. ipt_antstopetc.disabled = true;
  286. ipt_antremvol.disabled = true;
  287. ipt_antremrec.disabled = true;
  288. }
  289. model.refresh();
  290. }
  291. //20091020 dhkim
  292. //항암관리기록 대상자상단정보 세팅
  293. function fSetPatInfoAntiRec(pid, indd, cretno, ordtype) {
  294. var instcd = getUserInfo("dutplceinstcd");
  295. var orddd = indd;
  296. //현재상단정보와 같은 환자이면 리턴
  297. if(pid == model.getValue("/root/temp/paminfo/list/pid"))
  298. return;
  299. if(pid != '' && indd != '' && cretno != '' & ordtype != ''){
  300. model.removeNodeset("/root/temp/paminfo");
  301. model.makeNode("/root/temp/paminfo");
  302. //입원내역만 상단 올림 (임시.. 외래인경우도 상단 올려야 하는지 확인필요)
  303. condparam = ordtype + "▦" + pid + "▦" + indd + "▦" + cretno + "▦" + instcd+ "▦" + orddd;
  304. setParameter("condparam", condparam);
  305. modal("SPMMO08900", "", "", "", "SPMMO08900", "", "");
  306. var node = getGlobalVariable("paminfo");
  307. setCSVToNode("/root/temp/paminfo", node);
  308. }
  309. }
  310. /* --------------------------------------------------*/
  311. /* type : function */
  312. /* access : public */
  313. /* desc : 우편번호 팝업 호출 */
  314. /* param : zipFlag - 1:원무주소등록, 2:실제주소등록 */
  315. /* return : */
  316. /* --------------------------------------------------*/
  317. function fZipPopUpCall(zipFlag){
  318. var rcv_zipcdhead_path;
  319. var rcv_zipcdfoot_path;
  320. var rcv_seqno_path;
  321. var rcv_address_path;
  322. var term;
  323. //var term = model.getValue("/root/main/aidmembinfo/aidmembdetlinfo/addr");
  324. var condition = "combination";
  325. if(zipFlag == '1'){
  326. rcv_zipcdhead_path = '/root/main/patspclcntinfo/rgstzipcd1';
  327. rcv_zipcdfoot_path = '/root/main/patspclcntinfo/rgstzipcd2';
  328. rcv_seqno_path = '/root/main/patspclcntinfo/rgstzipcdseqno';
  329. rcv_address_path = '/root/main/patspclcntinfo/rgstheadaddr';
  330. }else if(zipFlag == '2'){
  331. rcv_zipcdhead_path = '/root/main/patspclcntinfo/realzipcd1';
  332. rcv_zipcdfoot_path = '/root/main/patspclcntinfo/realzipcd2';
  333. rcv_seqno_path = '/root/main/patspclcntinfo/realzipseq';
  334. rcv_address_path = '/root/main/patspclcntinfo/realheadaddr';
  335. }else{
  336. return;
  337. }
  338. term = model.getValue(rcv_address_path);
  339. antifOpenZipCodeList("combination", term, rcv_zipcdhead_path, rcv_zipcdfoot_path, rcv_seqno_path, rcv_address_path);
  340. if(zipFlag == '1'){
  341. model.setFocus("ipt_rgstaddr");
  342. }else if(zipFlag == '2'){
  343. model.setFocus("ipt_realaddr");
  344. }
  345. model.refresh();
  346. }
  347. //저장, 수정시 필수 항목 체크
  348. function fAntiCureinfoSave() {
  349. var pid = model.getValue('/root/main/antirecinfo/pid');
  350. if(pid == ''){
  351. messageBox('환자기록정보가 존재하지 않아 저장할 수 없습니다.', 'E');
  352. return false;
  353. }
  354. //현재기록일자가 최근기록일자보다 이전기록이면 저장불가
  355. var curRecDt = model.getValue('/root/main/antirecinfo/recdt');
  356. var bfRecDt = model.getValue('/root/main/antirecinfo/bfrecdt');
  357. if(curRecDt < bfRecDt){
  358. messageBox('현재 저장하실 기록내역보다 이후의 기록이 존재하므로 저장할 수', 'I004');
  359. return false;
  360. }
  361. var objContNm;
  362. //boxter, chemoport 기록여부 체크
  363. var boxter = model.getValue('/root/main/antirecinfo/boxter');
  364. var chemoport = model.getValue('/root/main/antirecinfo/chemoport');
  365. if(boxter == ''){
  366. messageBox('boxter를 선택하세요', 'E');
  367. objContNm = fControlFind("/root/main/antirecinfo/boxter");
  368. if(objContNm != "") {
  369. model.setFocus(objContNm);
  370. }
  371. return false;
  372. }
  373. if(chemoport == ''){
  374. messageBox('chemoport를 선택하세요', 'E');
  375. objContNm = fControlFind("/root/main/antirecinfo/chemoport");
  376. if(objContNm != "") {
  377. model.setFocus(objContNm);
  378. }
  379. return false;
  380. }
  381. /* 2010-07-02 수정
  382. + 항암관리기록_0629 관련 수정
  383. 특이사항은 필수 입력사항이 아닙니다. 특이사항 입력을 하지 않아도 저장이 되어야 합니다
  384. var remark = model.getValue('/root/main/patspclcntinfo/remark');
  385. if(remark == ''){
  386. messageBox('특이 사항(전달사항)을 입력하세요.', 'E');
  387. objContNm = fControlFind("/root/main/patspclcntinfo/remark");
  388. if(objContNm != "") {
  389. model.setFocus(objContNm);
  390. }
  391. return false;
  392. }
  393. */
  394. /* 2010-06-14 수정
  395. 항암치료 정보 작성없이 상단의 대상자 정보와 특이사항만 저장 후 인증저장해도 저장이 되어야 함
  396. //[지난항암제 투여후 집에서 발생된 증상]
  397. //기타체크시 입력박스체크
  398. var bfsymp = model.getValue('/root/main/antirecinfo/bfsymp');
  399. var bfsympetc = model.getValue('/root/main/antirecinfo/bfsympetc');
  400. if(isSearchString(bfsymp, "99") == true){
  401. if(bfsympetc == ''){
  402. messageBox('지난 항암제 투여 후 집에서 발생된 증상 사항을 입력하세요.', 'E');
  403. objContNm = fControlFind("/root/main/antirecinfo/bfsympetc");
  404. if(objContNm != "") {
  405. model.setFocus(objContNm);
  406. }
  407. return false;
  408. }
  409. }else{
  410. if(bfsympetc != ''){
  411. messageBox('지난 항암제 투여 후 집에서 발생된 증상 기타에 체크 하세요.', 'E');
  412. objContNm = fControlFind("/root/main/antirecinfo/bfsympetc");
  413. if(objContNm != "") {
  414. model.setFocus(objContNm);
  415. }
  416. return false;
  417. }
  418. }
  419. //[간호기록]
  420. //특이사항 체크시 입력박스체크
  421. var carerecyn = model.getValue('/root/main/antirecinfo/carerecyn');
  422. var carerecetc = model.getValue('/root/main/antirecinfo/carerecetc');
  423. if(carerecyn.length > 2){
  424. carerecyn = carerecyn.substring(carerecyn.length - 1);
  425. }
  426. if(carerecyn != 'Y'){//carerecyn==N
  427. if(carerecetc == ''){
  428. messageBox('간호기록 사항을 작성하세요.', 'E');
  429. objContNm = fControlFind("/root/main/antirecinfo/carerecetc");
  430. if(objContNm != "") {
  431. model.setFocus(objContNm);
  432. }
  433. return false;
  434. }
  435. }else{//carerecyn == Y
  436. if(carerecetc != ''){
  437. messageBox('간호기록 특이사항에 체크해제 하세요.', 'E');
  438. objContNm = fControlFind("/root/main/antirecinfo/carerecyn");
  439. if(objContNm != "") {
  440. model.setFocus(objContNm);
  441. }
  442. return false;
  443. }
  444. }
  445. model.setValue('/root/main/antirecinfo/carerecyn', carerecyn);
  446. //[이번항암제투여 중 과민반응]
  447. //1. 과민반응 없음 체크 해제시 증상 입력 체크
  448. //2. 기타체크시 입력박스체크
  449. var prestsympyn = model.getValue('/root/main/antirecinfo/prestsympyn');
  450. if(prestsympyn.length > 2){
  451. prestsympyn = prestsympyn.substring(prestsympyn.length - 1);
  452. }
  453. var prestsymp = model.getValue('/root/main/antirecinfo/prestsymp');
  454. var prestsympetc = model.getValue('/root/main/antirecinfo/prestsympetc');
  455. if(prestsympyn != 'Y'){
  456. if(prestsymp == ''){
  457. messageBox('이번 항암제 투여 중 과민반응 증상에 체크하세요.', 'E');
  458. objContNm = fControlFind("/root/main/antirecinfo/prestsymp");
  459. if(objContNm != "") {
  460. model.setFocus(objContNm);
  461. }
  462. return false;
  463. }
  464. if(isSearchString(prestsymp, "99") == true && prestsympetc == ''){
  465. messageBox('이번 항암제 투여 중 과민반응 입력필드에 기타사항을 입력하세요.', 'E');
  466. objContNm = fControlFind("/root/main/antirecinfo/prestsympetc");
  467. if(objContNm != "") {
  468. model.setFocus(objContNm);
  469. }
  470. return false;
  471. }
  472. }else{
  473. if(prestsymp != ''){
  474. messageBox('이번 항암제 투여 중 과민반응 증상에 체크해제 하세요.', 'E');
  475. objContNm = fControlFind("/root/main/antirecinfo/prestsymp");
  476. if(objContNm != "") {
  477. model.setFocus(objContNm);
  478. }
  479. return false;
  480. }else if(prestsympetc != ''){
  481. messageBox('이번 항암제 투여 중 과민반응 입력필드에 기타사항을 삭제하세요.', 'E');
  482. objContNm = fControlFind("/root/main/antirecinfo/prestsympetc");
  483. if(objContNm != "") {
  484. model.setFocus(objContNm);
  485. }
  486. return false;
  487. }
  488. }
  489. model.setValue('/root/main/antirecinfo/prestsympyn', prestsympyn);
  490. //[활력증상]
  491. //필수입력체크(혈압, 맥박, 호흡, 체온)
  492. var bp1 = model.getValue('/root/main/antirecinfo/bp1');
  493. var bp2 = model.getValue('/root/main/antirecinfo/bp2');//혈압
  494. var pulse = model.getValue('/root/main/antirecinfo/pulse');//맥박
  495. var breth = model.getValue('/root/main/antirecinfo/breth');//호흡
  496. var bdtp1 = model.getValue('/root/main/antirecinfo/bdtp1');
  497. var bdtp2 = model.getValue('/root/main/antirecinfo/bdtp2');//체온
  498. if(bp1 == ''){
  499. messageBox('혈압을 입력하세요.', 'E');
  500. objContNm = fControlFind("/root/main/antirecinfo/bp1");
  501. if(objContNm != "") {
  502. model.setFocus(objContNm);
  503. }
  504. return false;
  505. }
  506. if(bp2 == ''){
  507. messageBox('혈압을 입력하세요.', 'E');
  508. objContNm = fControlFind("/root/main/antirecinfo/bp2");
  509. if(objContNm != "") {
  510. model.setFocus(objContNm);
  511. }
  512. return false;
  513. }
  514. if(pulse == ''){
  515. messageBox('맥박을 입력하세요.', 'E');
  516. objContNm = fControlFind("/root/main/antirecinfo/pulse");
  517. if(objContNm != "") {
  518. model.setFocus(objContNm);
  519. }
  520. return false;
  521. }
  522. if(breth == ''){
  523. messageBox('호흡을 입력하세요.', 'E');
  524. objContNm = fControlFind("/root/main/antirecinfo/breth");
  525. if(objContNm != "") {
  526. model.setFocus(objContNm);
  527. }
  528. return false;
  529. }
  530. if(bdtp1 == ''){
  531. messageBox('체온을 입력하세요.', 'E');
  532. objContNm = fControlFind("/root/main/antirecinfo/bdtp1");
  533. if(objContNm != "") {
  534. model.setFocus(objContNm);
  535. }
  536. return false;
  537. }
  538. if(bdtp2 == ''){
  539. messageBox('체온을 입력하세요.', 'E');
  540. objContNm = fControlFind("/root/main/antirecinfo/bdtp2");
  541. if(objContNm != "") {
  542. model.setFocus(objContNm);
  543. }
  544. return false;
  545. }
  546. //[항암제중단]
  547. //중단여부에 따른 사유입력체크
  548. //사유입력에 기타 입력시 입력박스체크
  549. //잔여항암제종류 및 양 입력체크
  550. //처리내용 입력체크
  551. var antstopyn = model.getValue('/root/main/antirecinfo/antstopyn');
  552. var antstoprs = model.getValue('/root/main/antirecinfo/antstoprs');
  553. var antstopetc = model.getValue('/root/main/antirecinfo/antstopetc');
  554. var antremvol = model.getValue('/root/main/antirecinfo/antremvol');
  555. var antremrec = model.getValue('/root/main/antirecinfo/antremrec');
  556. if(antstopyn == 'N'){
  557. if(antstoprs != ''){
  558. messageBox('항암제중단 여부를 확인하세요.', 'E');
  559. objContNm = fControlFind("/root/main/antirecinfo/antstoprs");
  560. if(objContNm != "") {
  561. model.setFocus(objContNm);
  562. }
  563. return false;
  564. }
  565. if(antstopetc != ''){
  566. messageBox('항암제중단 여부를 확인하세요.', 'E');
  567. objContNm = fControlFind("/root/main/antirecinfo/antstopetc");
  568. if(objContNm != "") {
  569. model.setFocus(objContNm);
  570. }
  571. return false;
  572. }
  573. if(antremvol != ''){
  574. messageBox('항암제중단 여부를 확인하세요.', 'E');
  575. objContNm = fControlFind("/root/main/antirecinfo/antremvol");
  576. if(objContNm != "") {
  577. model.setFocus(objContNm);
  578. }
  579. return false;
  580. }
  581. if(antremrec != ''){
  582. messageBox('항암제중단 여부를 확인하세요.', 'E');
  583. objContNm = fControlFind("/root/main/antirecinfo/antremrec");
  584. if(objContNm != "") {
  585. model.setFocus(objContNm);
  586. }
  587. return false;
  588. }
  589. }else if(antstopyn == 'Y'){
  590. if(antstoprs == ''){
  591. messageBox('항암제중단 사유를 선택하세요.', 'E');
  592. objContNm = fControlFind("/root/main/antirecinfo/antstoprs");
  593. if(objContNm != "") {
  594. model.setFocus(objContNm);
  595. }
  596. return false;
  597. }
  598. if(isSearchString(antstoprs, "99") == true && antstopetc == ''){
  599. messageBox('항암제중단 내역의 기타사항을 입력하세요.', 'E');
  600. objContNm = fControlFind("/root/main/antirecinfo/antstopetc");
  601. if(objContNm != "") {
  602. model.setFocus(objContNm);
  603. }
  604. return false;
  605. }
  606. if(antremvol == ''){
  607. messageBox('항암제중단 내역의 잔여 항암제 종류 및 양을 입력하세요.', 'E');
  608. objContNm = fControlFind("/root/main/antirecinfo/antremvol");
  609. if(objContNm != "") {
  610. model.setFocus(objContNm);
  611. }
  612. return false;
  613. }
  614. if(antremrec == ''){
  615. messageBox('항암제중단 내역의 처리내용을 입력하세요.', 'E');
  616. objContNm = fControlFind("/root/main/antirecinfo/antremrec");
  617. if(objContNm != "") {
  618. model.setFocus(objContNm);
  619. }
  620. return false;
  621. }
  622. }else{
  623. messageBox('항암제중단여부를 입력하세요.', 'E');
  624. objContNm = fControlFind("/root/main/antirecinfo/antstopyn");
  625. if(objContNm != "") {
  626. model.setFocus(objContNm);
  627. }
  628. return false;
  629. }
  630. */
  631. return true;
  632. }
  633. //---------------------
  634. // control 찾기
  635. //---------------------
  636. function fControlFind(xPath) {
  637. var childObjCnt = document.controls.length;
  638. var childObj;
  639. for (var i=0; i < childObjCnt; i++) {
  640. childObj = document.controls.item(i);
  641. var ref = childObj.attribute("ref");
  642. if (ref == xPath) {
  643. return childObj.attribute("id");
  644. break;
  645. }
  646. }
  647. return "";
  648. }
  649. function fMake_SignData(){
  650. // Sign.addnode("/root/main/signSaveData");
  651. // ▶ 기록 관련 인스턴스 전체를 copy, 인증에 저장할 모든 Instance AddNode한다.
  652. Sign.addnode("/root/main/cond");
  653. Sign.addnode("/root/main/antirecinfo");
  654. Sign.addnode("/root/main/patspclcntinfo" );
  655. }
  656. //삭제유효여부체크
  657. function fIsDeleteValid(){
  658. //환자재원정보 체크
  659. if(fIsValidPatientSaveInfo("D") == false)
  660. return false;
  661. var userid = getUserInfo("userid");
  662. var recrid = model.getValue("/root/main/antirecinfo/recrid");
  663. var recrnm = model.getValue("/root/main/antirecinfo/recrnm");
  664. if(userid != recrid){
  665. messageBox("기록을 작성하신 '" + recrnm + "(" + recrid + ")'님이 해당기록을 삭제하실 수 있습니다.", "I");
  666. return false;
  667. }
  668. return true;
  669. }
  670. //환자재원정보 체크
  671. function fIsValidPatientSaveInfo(saveFlag){
  672. var pid = model.getValue('/root/main/antirecinfo/pid');
  673. var hngnm = model.getValue('/root/main/patspclcntinfo/hngnm');
  674. if(pid == null || pid == ""){
  675. //대상자리스트에 정보가 없는경우
  676. pid = model.getValue("/root/main/patspclcntinfo/pid");
  677. }
  678. //해당기록일자의 indd가 현재 환자정보의 indd보다 과거일자이면 저장불가
  679. model.removenode('/root/hidden');
  680. model.makeNode('/root/hidden');
  681. model.removenode('/root/send');
  682. model.makeValue('/root/send/pid', pid);
  683. //로그인한 사용자의 부서를 먼저 세팅(조회할병동코드)
  684. var userDeptcd = getUserInfo('dutplcecd');
  685. if(userDeptcd != suppdeptcd){
  686. userDeptcd = suppdeptcd;
  687. }
  688. var saveMsg = '저장';
  689. if(saveFlag == 'D'){
  690. saveMsg = '삭제';
  691. }
  692. model.makeValue('/root/send/wardcd', userDeptcd);
  693. if(submit('TRMNI03102')){
  694. var indd = model.getValue('/root/hidden/patininfo/indd');
  695. var cretno = model.getValue('/root/hidden/patininfo/cretno');
  696. var dschnotiyn = model.getValue('/root/hidden/patininfo/dschnotiyn');
  697. var dschjudgprcsstat = model.getValue('/root/hidden/patininfo/dschjudgprcsstat');
  698. var currecyn = model.getValue('/root/hidden/patininfo/currecyn');
  699. var prerecyn = model.getValue('/root/hidden/patininfo/prerecyn');
  700. var maxrecdt = model.getValue('/root/hidden/patininfo/maxrecdt');
  701. var recdt = model.getValue('/root/hidden/patininfo/recdt');
  702. var prerecdt = model.getValue('/root/main/antirecinfo/recdt');
  703. if(indd == '' || cretno == ''){
  704. messageBox('(' + hngnm + ') 환자는 현재 재원중이 아니므로 '+saveMsg+'할 수', 'I004');
  705. return false;
  706. }
  707. if(dschjudgprcsstat == 'B'){
  708. messageBox('(' + hngnm + ') 환자는 현재 심사중 상태이므로 '+saveMsg+'할 수','I004');
  709. return false;
  710. }
  711. if(dschjudgprcsstat == 'C' || dschjudgprcsstat == 'E'){
  712. messageBox('(' + hngnm + ') 환자는 현재 심사완료 상태이므로 '+saveMsg+'할 수','I004');
  713. return false;
  714. }
  715. if(dschnotiyn == 'Y'){
  716. messageBox('(' + hngnm + ') 환자는 현재 간호사퇴실정리완료 상태이므로 '+saveMsg+'할 수','I004');
  717. return false;
  718. }
  719. if(saveFlag != 'D'){
  720. //현재재원내역과 항암기록 수진키가 일치하지 않는 경우
  721. if(indd != model.getValue('/root/main/antirecinfo/indd') && cretno != model.getValue('/root/main/antirecinfo/cretno')){
  722. //현재 재원상태이고 해당일자기록이 있는 환자의 과거 기록 조회후 저장하려고 할때
  723. if(currecyn == 'Y'){
  724. var ret = messageBox('(' + hngnm + ') 환자의 ' + recdt.toDate().getDateFormat("YYYY-MM-DD") + '일자 기록내역이 존재합니다.\r\n'
  725. +'입력하신 ' + prerecdt.toDate().getDateFormat("YYYY-MM-DD") + '일자 기록을 ' + recdt.toDate().getDateFormat("YYYY-MM-DD") + '일자 기록으로 수정하시겠습니까?', 'Q');
  726. if(ret == 6){
  727. fSignCopySave("U");//과거기록수정내역을 기존내역에 수정저장
  728. }
  729. return false;
  730. }
  731. if(currecyn == 'N' && prerecyn == 'Y'){
  732. //현재 재원상태이고 해당일자기록이 없는 환자의 과거 기록 조회후 저장하려고 할때 메세지 리턴후 yes이면 이전기록 copy하여 신규저장
  733. var msg = '(' + hngnm + ') 환자의 ' + maxrecdt.toDate().getDateFormat("YYYY-MM-DD") + ' 일자 기록을 복사하여 '
  734. + getCurrentDate().toDate().getDateFormat("YYYY-MM-DD") + ' 일자로 신규기록 하시겠습니까?';
  735. var ret = messageBox(msg, 'Q');
  736. if(ret == 6){
  737. fSignCopySave("I");//복사하여 신규저장
  738. }
  739. return false;
  740. }else{
  741. messageBox('(' + hngnm + ') 환자의 현재 재원정보와 저장하려는 기록내역의 재원정보가 일치하지 않으므로 저장할 수', 'I004');
  742. return false;
  743. }
  744. }
  745. }else{
  746. //삭제의 경우 현재 수진일자와 일치하는 기록내역만 삭제하도록 함
  747. var recPid = model.getValue('/root/main/antirecinfo/pid');
  748. var recIndd = model.getValue('/root/main/antirecinfo/indd');
  749. var recCretno = model.getValue('/root/main/antirecinfo/cretno');
  750. if(pid != recPid || indd != recIndd || cretno != recCretno){
  751. messageBox('해당 기록은 ' + hngnm + '님의 현재 재원일자 ' + recdt.toDate().getDateFormat("YYYY-MM-DD") + '의 기록이 아니므로 삭제하실 수 없습니다.' , 'I');
  752. return false;
  753. }
  754. }
  755. }
  756. return true;
  757. }
  758. //과거기록을 복사하여 현재재원내역에 신규저장 : I
  759. //과거기록을 복사하여 현재재원내역에 수정저장 : U
  760. function fSignCopySave(saveflag){
  761. var pid = model.getValue('/root/main/antirecinfo/pid');
  762. var hngnm = model.getValue('/root/main/antirecinfo/hngnm');
  763. var recdt = model.getValue('/root/main/antirecinfo/recdt');
  764. var indd = model.getValue('/root/main/antirecinfo/indd');
  765. var cretno = model.getValue('/root/main/antirecinfo/cretno');
  766. var orddrid = model.getValue('/root/main/antirecinfo/orddrid');
  767. var orddeptcd = model.getValue('/root/main/antirecinfo/orddeptcd');
  768. var remark = model.getValue('/root/main/patspclcntinfo/remark');
  769. var fromdd = model.getValue('/root/main/cond/fromdd');
  770. var todd = model.getValue('/root/main/cond/todd');
  771. var pidflag = model.getValue('/root/main/cond/pidflag');
  772. var isnew = "";
  773. var savemsg = "";
  774. var signno = '';//인증번호
  775. var formcd = '0900006695';//항암간호기록서식코드
  776. //기록 신규,수정 저장
  777. if(fAntiCureinfoSave() == false)
  778. return; //필수입력체크
  779. if(saveflag == "I"){//신규저장
  780. isnew = "Y";
  781. recdt = getCurrentDate();
  782. indd = model.getValue("/root/hidden/patininfo/indd"); //현재원정보로 변경
  783. cretno = model.getValue("/root/hidden/patininfo/cretno"); //현재원정보로 변경
  784. }else if(saveflag == "U"){//수정저장
  785. isnew = "N";
  786. indd = model.getValue("/root/hidden/patininfo/indd"); //현재원정보로 변경
  787. cretno = model.getValue("/root/hidden/patininfo/cretno"); //현재원정보로 변경
  788. recdt = model.getValue("/root/hidden/patininfo/recdt"); //현재원내역의 기록날짜
  789. }
  790. //로그인한 사용자의 부서를 먼저 세팅(조회할병동코드)
  791. var userDeptcd = getUserInfo('dutplcecd');
  792. if(userDeptcd != suppdeptcd){
  793. userDeptcd = suppdeptcd;
  794. }
  795. //복사저장전 해당환자의 현재 프로토콜정보 및 환자기본정보를 조회하여 저장할 node를 새로 설정한다.
  796. model.removenode('/root/main/currentinfo');
  797. model.makenode('/root/main/currentinfo');
  798. model.removenode('/root/send');
  799. model.makeValue('/root/send/pid', pid);
  800. model.makeValue('/root/send/indd', indd);
  801. model.makeValue('/root/send/cretno', cretno);
  802. model.makeValue('/root/send/wardcd', userDeptcd);
  803. model.makeValue('/root/send/recdt', recdt);
  804. model.makeValue('/root/send/recflag', "D");
  805. if(!submit('TRMNI03104')){
  806. messageBox('복사저장을 위한 환자 현재 프로토콜 정보 조회를 실패하였습니다.', 'E');
  807. return;
  808. }else{
  809. //대상자정보(진료과, 주치의, 진단명, 전프로토콜) 노드 새로세팅
  810. model.setValue('/root/main/antirecinfo/orddeptnm', model.getValue('/root/main/currentinfo/antirecinfo/orddeptnm'));//진료과
  811. model.setValue('/root/main/antirecinfo/orddrnm', model.getValue('/root/main/currentinfo/antirecinfo/orddrnm'));//주치의
  812. model.setValue('/root/main/antirecinfo/sickclsnm', model.getValue('/root/main/currentinfo/antirecinfo/sickclsnm'));//진단명
  813. //항암치료정보(프로토콜정보만) 노드 새로세팅
  814. model.setValue('/root/main/antirecinfo/prtlnm', model.getValue('/root/main/currentinfo/antirecinfo/prtlnm'));//프로토콜명
  815. model.setValue('/root/main/antirecinfo/recdt', model.getValue('/root/main/currentinfo/antirecinfo/recdt'));//기록일자
  816. model.setValue('/root/main/antirecinfo/recrnm', model.getValue('/root/main/currentinfo/antirecinfo/recrnm'));//기록자
  817. model.setValue('/root/main/antirecinfo/recrid', model.getValue('/root/main/currentinfo/antirecinfo/recrid'));//recrid
  818. model.setValue('/root/main/antirecinfo/prtlstrdd', model.getValue('/root/main/currentinfo/antirecinfo/prtlstrdd'));//시작일자
  819. model.setValue('/root/main/antirecinfo/termnm', model.getValue('/root/main/currentinfo/antirecinfo/termnm'));//적용기간
  820. model.setValue('/root/main/antirecinfo/drugstage', model.getValue('/root/main/currentinfo/antirecinfo/drugstage'));//항암차수 line
  821. model.setValue('/root/main/antirecinfo/drugcycle', model.getValue('/root/main/currentinfo/antirecinfo/drugcycle'));//항암차수 cycle
  822. model.setValue('/root/main/antirecinfo/pid', model.getValue('/root/main/currentinfo/antirecinfo/pid'));//pid
  823. model.setValue('/root/main/antirecinfo/indd', model.getValue('/root/main/currentinfo/antirecinfo/indd'));//indd
  824. model.setValue('/root/main/antirecinfo/cretno', model.getValue('/root/main/currentinfo/antirecinfo/cretno'));//cretno
  825. model.setValue('/root/main/antirecinfo/cpgappno', model.getValue('/root/main/currentinfo/antirecinfo/cpgappno'));//cpgappno
  826. model.setValue('/root/main/antirecinfo/prtlcd', model.getValue('/root/main/currentinfo/antirecinfo/prtlcd'));//prtlcd
  827. model.setValue('/root/main/antirecinfo/prtlstrdd', model.getValue('/root/main/currentinfo/antirecinfo/prtlstrdd'));//prtlstrdd
  828. //model.setValue('/root/main/antirecinfo/termno', model.getValue('/root/main/currentinfo/antirecinfo/termno'));//termno
  829. model.setValue('/root/main/antirecinfo/prtldg', model.getValue('/root/main/currentinfo/antirecinfo/prtldg'));//prtldg
  830. //fstrgstrid, fstrgstdt, signno 새로세팅
  831. model.setValue('/root/main/antirecinfo/fstrgstrid', model.getValue('/root/main/currentinfo/antirecinfo/fstrgstrid'));//fstrgstrid
  832. model.setValue('/root/main/antirecinfo/fstrgstdt', model.getValue('/root/main/currentinfo/antirecinfo/fstrgstdt'));//fstrgstdt
  833. model.setValue('/root/main/antirecinfo/signno', model.getValue('/root/main/currentinfo/antirecinfo/signno'));//signno
  834. }
  835. signno = model.getValue('/root/main/antirecinfo/signno');
  836. model.removenode('/root/send');
  837. //조회조건
  838. var condData = "pid"
  839. + "▦" + "indd"
  840. + "▦" + "cretno"
  841. + "▦" + "recdt"
  842. + "▦" + "recflag"
  843. + "▦" + "fromdd"
  844. + "▦" + "todd"
  845. + "▦" + "pidflag"
  846. + "▦" + "isnew"
  847. + "▦" + "saveflag"
  848. + "▩";
  849. condData += pid
  850. + "▦" + indd
  851. + "▦" + cretno
  852. + "▦" + recdt
  853. + "▦" + "D"
  854. + "▦" + fromdd
  855. + "▦" + todd
  856. + "▦" + pidflag
  857. + "▦" + isnew
  858. + "▦" + saveflag
  859. + "▩";
  860. model.makeValue('/root/send/cond', condData);
  861. //항암기록정보
  862. model.makeNode('/root/send/antirecinfo');
  863. model.copyNode('/root/send/antirecinfo', '/root/main/antirecinfo');
  864. //특이사항
  865. var spclData = "pid"
  866. + "▦" + "remark"
  867. + "▦" + "rgstzipcd1"
  868. + "▦" + "rgstzipcd2"
  869. + "▦" + "rgstzipcdseqno"
  870. + "▦" + "rgstaddr"
  871. + "▦" + "realzipcd1"
  872. + "▦" + "realzipcd2"
  873. + "▦" + "realzipseq"
  874. + "▦" + "realaddr"
  875. + "▦" + "hometel"
  876. + "▦" + "mpphontel"
  877. + "▦" + "procerhometel"
  878. + "▦" + "procermpphontel"
  879. + "▩";
  880. spclData += pid
  881. + "▦" + remark
  882. + "▦" + model.getValue('/root/main/patspclcntinfo/rgstzipcd1')
  883. + "▦" + model.getValue('/root/main/patspclcntinfo/rgstzipcd2')
  884. + "▦" + model.getValue('/root/main/patspclcntinfo/rgstzipcdseqno')
  885. + "▦" + model.getValue('/root/main/patspclcntinfo/rgstaddr')
  886. + "▦" + model.getValue('/root/main/patspclcntinfo/realzipcd1')
  887. + "▦" + model.getValue('/root/main/patspclcntinfo/realzipcd2')
  888. + "▦" + model.getValue('/root/main/patspclcntinfo/realzipseq')
  889. + "▦" + model.getValue('/root/main/patspclcntinfo/realaddr')
  890. + "▦" + model.getValue('/root/main/patspclcntinfo/hometel')
  891. + "▦" + model.getValue('/root/main/patspclcntinfo/mpphontel')
  892. + "▦" + model.getValue('/root/main/patspclcntinfo/procerhometel')
  893. + "▦" + model.getValue('/root/main/patspclcntinfo/procermpphontel')
  894. + "▩";
  895. model.makeValue('/root/send/patspclcntinfo', spclData);
  896. //전자서명 호출시 인증저장 버튼을 누늘때마다 인증서가 뜨도록 처리
  897. Sign.certreload = true ;
  898. // 인증 로직 호출
  899. if(Sign.signprocess() == true){
  900. // ▶ 전자인증 관련 환자 인적 정보를 보내줌.
  901. var wSigninfo = "pid" +"▦" // 01 등록번호
  902. + "orddd" +"▦" // 02 입원일자(입원,응급)/진료일자(외래)
  903. + "cretno" +"▦" // 03 생성번호
  904. + "signno" +"▦" // 04 서명번호(인증번호)
  905. + "recdd" +"▦" // 05 실제 기록이 이루어진 기록일자
  906. + "rectm" +"▦" // 06 실제 기록이 이루어진 기록시간
  907. + "recsaveflag" +"▦" // 07 전자서명 인적정보 변경여부(기록일시 변경되는 경우 : Y, 그외 : N)
  908. + "signflag" +"▦" // 08 서명자료구분(01 : 진료, 02 : 간호, 03 : LIS, 04 : 진료지원)
  909. + "signgenrflag" +"▦" // 09 외래/입원/응급/DSC구분(코드정의서 M0010 참조)
  910. + "formcd" +"▦" // 10 각 기록지별 서식코드
  911. + "orddeptcd" +"▦" // 11 진료부서코드
  912. + "orddrid" +"▦" // 12 진료의사ID
  913. + "signbfcnts" +"▦" // 13 ▶ 인증할 데이터 정보(미기록 노드 제거된 정보)
  914. + "signaftcnts" +"▦" // 14 ▶ 공인인증 처리후 데이터
  915. + "screenid" +"▦" // 15 ▶ 화면아이디
  916. + "certflag" +"▩" // 16 ▶ 인증여부( T : 임시저장, C : 인증저장)
  917. + pid +"▦" // 01 등록번호
  918. + indd +"▦" // 02 입원일자(입원,응급)/진료일자(외래)
  919. + cretno +"▦" // 03 생성번호
  920. + signno +"▦" // 04 서명번호(인증번호)
  921. + getCurrentDate() +"▦" // 05 실제 기록이 이루어진 기록일자
  922. + getCurrentTime() +"▦" // 06 실제 기록이 이루어진 기록시간
  923. + "Y" +"▦" // 07 전자서명 인적정보 변경여부(기록일시 변경되는 경우 : Y, 그외 : N)
  924. + "02" +"▦" // 08 서명자료구분(01 : 진료, 02 : 간호, 03 : LIS, 04 : 진료지원)
  925. + "D" +"▦" // 09 외래/입원/응급/DSC구분(코드정의서 M0010 참조)
  926. + formcd +"▦" // 10 각 기록지별 서식코드 (emr.mrfmform)
  927. + orddeptcd +"▦" // 11 진료부서코드
  928. + orddrid +"▦" // 12 진료의사ID
  929. + Sign.signedInfos[1] +"▦" // 13 ▶ 인증할 데이터 정보(미기록 노드 제거된 정보)
  930. + Sign.signedInfos[2] +"▦" // 14 ▶ 공인인증 처리후 데이터
  931. + getScreenID() +"▦" // 15 ▶ 화면아이디
  932. + "C" +"▩"; // 16 ▶ 인증여부( T : 임시저장, C : 인증저장)
  933. model.makeValue("/root/send/signinfo" , wSigninfo);
  934. } else {
  935. return ;
  936. }
  937. if(submit('TXMNI03103')){
  938. messageBox('저장하였습니다.', 'I');
  939. fTrgtmanList();//대상자리스트 재조회
  940. }
  941. }
  942. //인증저장
  943. function fSignSave(saveflag) {
  944. var pid = model.getValue('/root/main/antirecinfo/pid');
  945. var hngnm = model.getValue('/root/main/antirecinfo/hngnm');
  946. var recdt = model.getValue('/root/main/antirecinfo/recdt');
  947. var indd = model.getValue('/root/main/antirecinfo/indd');
  948. var cretno = model.getValue('/root/main/antirecinfo/cretno');
  949. var orddrid = model.getValue('/root/main/antirecinfo/orddrid');
  950. var orddeptcd = model.getValue('/root/main/antirecinfo/orddeptcd');
  951. var remark = model.getValue('/root/main/patspclcntinfo/remark');
  952. var fromdd = model.getValue('/root/main/cond/fromdd');
  953. var todd = model.getValue('/root/main/cond/todd');
  954. var pidflag = model.getValue('/root/main/cond/pidflag');
  955. var isnew = model.getValue('/root/main/antirecinfo/isnew');
  956. var savemsg = "";
  957. var signno = '';//인증번호
  958. var formcd = '0900006695';//항암간호기록서식코드
  959. if(saveflag == 'D'){//기록삭제
  960. if(fIsValidPatientSaveInfo('D') == false)
  961. return; //환자재원정보체크
  962. if(fIsDeleteValid() == false)
  963. return; //삭제유효여부체크
  964. savemsg = " 삭제";
  965. signno = model.getValue('/root/main/antirecinfo/signno');
  966. }else{//기록 신규,수정 저장
  967. if(fIsValidPatientSaveInfo('S') == false)
  968. return; //환자재원정보체크
  969. if(fAntiCureinfoSave() == false)
  970. return; //필수입력체크
  971. //2010-07-05 간호기록에 내용 미입력시 특이사항 없음 자동처리.
  972. if(trim(model.getValue("/root/main/antirecinfo/carerecetc")).length == 0){
  973. chk_carerecyn.value="Y";
  974. fSetIptBoxDisabled();
  975. }
  976. //2010-07-05 이번 항암제투여 중 과민반응 미 선택시 과민반응없음 자동처리.
  977. if(trim(chk_prestsymp.value).length == 0){
  978. chk_prestsympyn.value="Y";
  979. fSetIptBoxDisabled();
  980. }
  981. if(isnew == 'Y'){
  982. savemsg = " 신규등록";
  983. saveflag = "I";
  984. }else{
  985. savemsg = " 수정";
  986. signno = model.getValue('/root/main/antirecinfo/signno');
  987. saveflag = "U";
  988. }
  989. }
  990. if(messageBox(''+hngnm+'환자의 ' + recdt.toDate().getDateFormat("YYYY-MM-DD") + '일자 항암기록을' + savemsg + '하시겠습니까?', 'Q') == 7)
  991. return;
  992. model.removenode('/root/send');
  993. //조회조건
  994. var condData = "pid"
  995. + "▦" + "indd"
  996. + "▦" + "cretno"
  997. + "▦" + "recdt"
  998. + "▦" + "recflag"
  999. + "▦" + "fromdd"
  1000. + "▦" + "todd"
  1001. + "▦" + "pidflag"
  1002. + "▦" + "isnew"
  1003. + "▦" + "saveflag"
  1004. + "▩";
  1005. condData += pid
  1006. + "▦" + indd
  1007. + "▦" + cretno
  1008. + "▦" + recdt
  1009. + "▦" + "D"
  1010. + "▦" + fromdd
  1011. + "▦" + todd
  1012. + "▦" + pidflag
  1013. + "▦" + isnew
  1014. + "▦" + saveflag
  1015. + "▩";
  1016. model.makeValue('/root/send/cond', condData);
  1017. //항암기록정보
  1018. //체온단위, 항암제중단사유 콤보 라벨값 노드 추가
  1019. model.makeValue("/root/main/antirecinfo/bdtp2nm", model.getValue("/root/init/M0520list/M0520[cdid='"+model.getValue("/root/main/antirecinfo/bdtp2")+"']/cdnm"));
  1020. model.makeValue("/root/main/antirecinfo/antstoprsnm", model.getValue("/root/init/M0597list/M0597[cdid='"+model.getValue("/root/main/antirecinfo/antstoprs")+"']/cdnm"));
  1021. model.makeNode('/root/send/antirecinfo');
  1022. model.copyNode('/root/send/antirecinfo', '/root/main/antirecinfo');
  1023. //특이사항
  1024. var spclData = "pid"
  1025. + "▦" + "remark"
  1026. + "▦" + "rgstzipcd1"
  1027. + "▦" + "rgstzipcd2"
  1028. + "▦" + "rgstzipcdseqno"
  1029. + "▦" + "rgstaddr"
  1030. + "▦" + "realzipcd1"
  1031. + "▦" + "realzipcd2"
  1032. + "▦" + "realzipseq"
  1033. + "▦" + "realaddr"
  1034. + "▦" + "hometel"
  1035. + "▦" + "mpphontel"
  1036. + "▦" + "procerhometel"
  1037. + "▦" + "procermpphontel"
  1038. + "▩";
  1039. spclData += pid
  1040. + "▦" + remark
  1041. + "▦" + model.getValue('/root/main/patspclcntinfo/rgstzipcd1')
  1042. + "▦" + model.getValue('/root/main/patspclcntinfo/rgstzipcd2')
  1043. + "▦" + model.getValue('/root/main/patspclcntinfo/rgstzipcdseqno')
  1044. + "▦" + model.getValue('/root/main/patspclcntinfo/rgstaddr')
  1045. + "▦" + model.getValue('/root/main/patspclcntinfo/realzipcd1')
  1046. + "▦" + model.getValue('/root/main/patspclcntinfo/realzipcd2')
  1047. + "▦" + model.getValue('/root/main/patspclcntinfo/realzipseq')
  1048. + "▦" + model.getValue('/root/main/patspclcntinfo/realaddr')
  1049. + "▦" + model.getValue('/root/main/patspclcntinfo/hometel')
  1050. + "▦" + model.getValue('/root/main/patspclcntinfo/mpphontel')
  1051. + "▦" + model.getValue('/root/main/patspclcntinfo/procerhometel')
  1052. + "▦" + model.getValue('/root/main/patspclcntinfo/procermpphontel')
  1053. + "▩";
  1054. model.makeValue('/root/send/patspclcntinfo', spclData);
  1055. //전자서명 호출시 인증저장 버튼을 누늘때마다 인증서가 뜨도록 처리
  1056. Sign.certreload = true ;
  1057. // 인증 로직 호출
  1058. if(Sign.signprocess() == true){
  1059. // alert(Sign.signedInfos[1]);
  1060. // ▶ 전자인증 관련 환자 인적 정보를 보내줌.
  1061. var wSigninfo = "pid" +"▦" // 01 등록번호
  1062. + "orddd" +"▦" // 02 입원일자(입원,응급)/진료일자(외래)
  1063. + "cretno" +"▦" // 03 생성번호
  1064. + "signno" +"▦" // 04 서명번호(인증번호)
  1065. + "recdd" +"▦" // 05 실제 기록이 이루어진 기록일자
  1066. + "rectm" +"▦" // 06 실제 기록이 이루어진 기록시간
  1067. + "recsaveflag" +"▦" // 07 전자서명 인적정보 변경여부(기록일시 변경되는 경우 : Y, 그외 : N)
  1068. + "signflag" +"▦" // 08 서명자료구분(01 : 진료, 02 : 간호, 03 : LIS, 04 : 진료지원)
  1069. + "signgenrflag" +"▦" // 09 외래/입원/응급/DSC구분(코드정의서 M0010 참조)
  1070. + "formcd" +"▦" // 10 각 기록지별 서식코드
  1071. + "orddeptcd" +"▦" // 11 진료부서코드
  1072. + "orddrid" +"▦" // 12 진료의사ID
  1073. + "signbfcnts" +"▦" // 13 ▶ 인증할 데이터 정보(미기록 노드 제거된 정보)
  1074. + "signaftcnts" +"▦" // 14 ▶ 공인인증 처리후 데이터
  1075. + "screenid" +"▦" // 15 ▶ 화면아이디
  1076. + "certflag" +"▩" // 16 ▶ 인증여부( T : 임시저장, C : 인증저장)
  1077. + pid +"▦" // 01 등록번호
  1078. + indd +"▦" // 02 입원일자(입원,응급)/진료일자(외래)
  1079. + cretno +"▦" // 03 생성번호
  1080. + signno +"▦" // 04 서명번호(인증번호)
  1081. + getCurrentDate() +"▦" // 05 실제 기록이 이루어진 기록일자
  1082. + getCurrentTime() +"▦" // 06 실제 기록이 이루어진 기록시간
  1083. + "Y" +"▦" // 07 전자서명 인적정보 변경여부(기록일시 변경되는 경우 : Y, 그외 : N)
  1084. + "02" +"▦" // 08 서명자료구분(01 : 진료, 02 : 간호, 03 : LIS, 04 : 진료지원)
  1085. + "D" +"▦" // 09 외래/입원/응급/DSC구분(코드정의서 M0010 참조)
  1086. + formcd +"▦" // 10 각 기록지별 서식코드 (emr.mrfmform)
  1087. + orddeptcd +"▦" // 11 진료부서코드
  1088. + orddrid +"▦" // 12 진료의사ID
  1089. + Sign.signedInfos[1] +"▦" // 13 ▶ 인증할 데이터 정보(미기록 노드 제거된 정보)
  1090. + Sign.signedInfos[2] +"▦" // 14 ▶ 공인인증 처리후 데이터
  1091. + getScreenID() +"▦" // 15 ▶ 화면아이디
  1092. + "C" +"▩"; // 16 ▶ 인증여부( T : 임시저장, C : 인증저장)
  1093. model.makeValue("/root/send/signinfo" , wSigninfo);
  1094. } else {
  1095. return ;
  1096. }
  1097. // alert(instance1.selectNodesXml('/root/send'));
  1098. if(submit('TXMNI03102')){
  1099. messageBox(savemsg + '하였습니다.', 'I');
  1100. fTrgtmanList();//대상자리스트 재조회
  1101. }
  1102. }
  1103. /**
  1104. * @desc : 환자등록번호 조회 팝업
  1105. * @
  1106. * @param : refPid - 환자번호 참고 node path
  1107. * refPnm - 환자명 참고 node path
  1108. * @return :
  1109. * @authur : 이은영 2008.03.18
  1110. * @---------------------------------------------------
  1111. */
  1112. function fGetPid(refPid )
  1113. {
  1114. model.removeNodeset("/root/main/patinfo/pathistlist");
  1115. model.makeNode("/root/main/patinfo/patinfolist");
  1116. //조회건수가 1건일 경우 팝업창을 바로 닫는다.
  1117. model.makeValue("/root/hidden/tmp/pidpopupinfo/checkfnexam", "1");
  1118. model.makeValue("/root/hidden/tmp/pidpopupinfo/autoflag", "Y");
  1119. model.makeValue("/root/hidden/tmp/pidpopupinfo/pid", "");
  1120. if( model.getValue("/root/hidden/tmp/pidpopupinfo/srchcond") == '' ){
  1121. model.makeValue("/root/hidden/tmp/pidpopupinfo/srchcond", '1');
  1122. }
  1123. modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/hidden/tmp/pidpopupinfo", "/root/send");
  1124. model.resetInstanceNode("/root/source");
  1125. //환자번호 copy
  1126. var popupendflag = model.getValue("/root/main/popupendflag");
  1127. if (popupendflag == "ok")
  1128. {
  1129. model.makeValue(refPid, model.getValue("/root/main/patinfo/patinfolist/pid"));
  1130. model.refresh();
  1131. fTrgtmanList();
  1132. }
  1133. }
  1134. //신규 저장을 위한 초기화
  1135. function fSaveInit(){
  1136. if("" != model.getValue("/root/main/antirecinfo/isnew")){
  1137. model.setValue("/root/main/antirecinfo/isnew", "Y");
  1138. model.setValue("/root/main/antirecinfo/recdt",getCurrentDate() +getCurrentTime());
  1139. opt_recdt.attribute('color') = '#ff6600';//주황
  1140. model.refreshpart("/root/main/antirecinfo/recdt");
  1141. model.setValue("/root/main/antirecinfo/recrnm", getUserName());
  1142. model.refreshpart("/root/main/antirecinfo/recrnm");
  1143. model.setValue("/root/main/antirecinfo/recrid", getUserId());
  1144. model.setValue("/root/main/antirecinfo/bfsymp",'');
  1145. model.setValue("/root/main/antirecinfo/bfsympnm",'');
  1146. model.setValue("/root/main/antirecinfo/bfsympetc",'');
  1147. txt_bfsympetc.disabled = true;
  1148. model.setValue("/root/main/antirecinfo/prestsympyn",'');
  1149. model.setValue("/root/main/antirecinfo/prestsymp",'');
  1150. model.setValue("/root/main/antirecinfo/prestsympnm",'');
  1151. model.setValue("/root/main/antirecinfo/prestsympetc",'');
  1152. txt_prestsympetc.disabled = true;
  1153. model.setValue("/root/main/antirecinfo/carerecyn",'');
  1154. model.setValue("/root/main/antirecinfo/carerecetc",'');
  1155. model.setValue("/root/main/antirecinfo/bp1",'');
  1156. model.setValue("/root/main/antirecinfo/bp2",'');
  1157. model.setValue("/root/main/antirecinfo/pulse",'');
  1158. model.setValue("/root/main/antirecinfo/breth",'');
  1159. model.setValue("/root/main/antirecinfo/bdtp1",'');
  1160. model.setValue("/root/main/antirecinfo/bdtp2",'');
  1161. model.setValue("/root/main/antirecinfo/antstopyn",'N');
  1162. cmb_antstoprs.disabled = true;
  1163. model.setValue("/root/main/antirecinfo/antstoprs",'');
  1164. model.setValue("/root/main/antirecinfo/antstopetc",'');
  1165. ipt_antstopetc.disabled = true;
  1166. model.setValue("/root/main/antirecinfo/antremvol",'');
  1167. ipt_antremvol.disabled = true;
  1168. model.setValue("/root/main/antirecinfo/antremrec",'');
  1169. ipt_antremrec.disabled = true;
  1170. model.setValue("/root/main/antirecinfo/signno",'');
  1171. model.setValue("/root/main/antirecinfo/bfrecdt",'');
  1172. model.setValue("/root/main/antirecinfo/fstrgstdt",'');
  1173. model.setValue("/root/main/antirecinfo/fstrgstrid",'');
  1174. model.refresh();
  1175. }
  1176. }
  1177. /* 일반저장 사용안한다고함
  1178. //저장
  1179. function fSave(){
  1180. if(fAntiCureinfoSave() == false)
  1181. return; //필수입력체크
  1182. var pid = model.getValue('/root/main/antirecinfo/pid');
  1183. var hngnm = model.getValue('/root/main/antirecinfo/hngnm');
  1184. var recdt = model.getValue('/root/main/antirecinfo/recdt');
  1185. var indd = model.getValue('/root/main/antirecinfo/indd');
  1186. var cretno = model.getValue('/root/main/antirecinfo/cretno');
  1187. var remark = model.getValue('/root/main/patspclcntinfo/remark');
  1188. var fromdd = model.getValue('/root/main/cond/fromdd');
  1189. var todd = model.getValue('/root/main/cond/todd');
  1190. var pidflag = model.getValue('/root/main/cond/pidflag');
  1191. var isnew = model.getValue('/root/main/antirecinfo/isnew');
  1192. var bfsymp = model.getValue('/root/main/antirecinfo/bfsymp');
  1193. var prestsymp = model.getValue('/root/main/antirecinfo/prestsymp');
  1194. // alert('지난항암제투여후 발생증상 == ' + bfsymp);
  1195. // alert('이번항암제투여후 발생증상 == ' + prestsymp);
  1196. var savemsg = "";
  1197. if(isnew == 'Y'){
  1198. savemsg = " 신규등록 하시겠습니까?";
  1199. }else{
  1200. savemsg = " 수정하시겠습니까?";
  1201. }
  1202. if(messageBox(''+hngnm+'환자의 ' + recdt.toDate().getDateFormat("YYYY-MM-DD") + '일자 항암기록을' + savemsg, 'Q') == 7)
  1203. return;
  1204. model.removenode('/root/send');
  1205. //조회조건
  1206. var condData = "pid"
  1207. + "▦" + "indd"
  1208. + "▦" + "cretno"
  1209. + "▦" + "recdt"
  1210. + "▦" + "recflag"
  1211. + "▦" + "fromdd"
  1212. + "▦" + "todd"
  1213. + "▦" + "pidflag"
  1214. + "▩";
  1215. condData += pid
  1216. + "▦" + indd
  1217. + "▦" + cretno
  1218. + "▦" + recdt
  1219. + "▦" + "D"
  1220. + "▦" + fromdd
  1221. + "▦" + todd
  1222. + "▦" + pidflag
  1223. + "▩";
  1224. model.makeValue('/root/send/cond', condData);
  1225. //항암기록정보
  1226. model.makeNode('/root/send/antirecinfo');
  1227. model.copyNode('/root/send/antirecinfo', '/root/main/antirecinfo');
  1228. //특이사항
  1229. var spclData = "pid"
  1230. + "▦" + "remark"
  1231. + "▦" + "rgstzipcd1"
  1232. + "▦" + "rgstzipcd2"
  1233. + "▦" + "rgstzipcdseqno"
  1234. + "▦" + "rgstaddr"
  1235. + "▦" + "realzipcd1"
  1236. + "▦" + "realzipcd2"
  1237. + "▦" + "realaddr"
  1238. + "▦" + "hometel"
  1239. + "▦" + "mpphontel"
  1240. + "▦" + "procerhometel"
  1241. + "▦" + "procermpphontel"
  1242. + "▩";
  1243. spclData += pid
  1244. + "▦" + remark
  1245. + "▦" + model.getValue('/root/main/patspclcntinfo/rgstzipcd1')
  1246. + "▦" + model.getValue('/root/main/patspclcntinfo/rgstzipcd2')
  1247. + "▦" + model.getValue('/root/main/patspclcntinfo/rgstzipcdseqno')
  1248. + "▦" + model.getValue('/root/main/patspclcntinfo/rgstaddr')
  1249. + "▦" + model.getValue('/root/main/patspclcntinfo/realzipcd1')
  1250. + "▦" + model.getValue('/root/main/patspclcntinfo/realzipcd2')
  1251. + "▦" + model.getValue('/root/main/patspclcntinfo/realaddr')
  1252. + "▦" + model.getValue('/root/main/patspclcntinfo/hometel')
  1253. + "▦" + model.getValue('/root/main/patspclcntinfo/mpphontel')
  1254. + "▦" + model.getValue('/root/main/patspclcntinfo/procerhometel')
  1255. + "▦" + model.getValue('/root/main/patspclcntinfo/procermpphontel')
  1256. + "▩";
  1257. model.makeValue('/root/send/patspclcntinfo', spclData);
  1258. // alert(instance1.selectNodesXml('/root/send'));
  1259. if(submit('TXMNI03101')){
  1260. fTrgtmanList();//대상자리스트 재조회
  1261. }
  1262. }
  1263. */
  1264. /*
  1265. //초기화 버튼 클릭시
  1266. function fReset(){
  1267. var btn = messageBox("초기화를 ", "Q004");
  1268. if (btn == '6') {
  1269. model.resetInstanceNode("/root/main/trgtmaninfolist2");
  1270. //초기값셋팅
  1271. tar_bfsymp.disabled = true;
  1272. tar_react.disabled = true;
  1273. cmb_anticncr.disabled = true;
  1274. ipt_anticncr.disabled = true;
  1275. ipt_anticncrvol.disabled = true;
  1276. ipt_anticncrtret.disabled = true;
  1277. model.setValue("/root/main/trgtmaninfolist2/anticureinfo/discontinuyn","1");
  1278. model.refresh();
  1279. } else if (btn == '7') {
  1280. return;
  1281. }
  1282. }//fReset END
  1283. // 대상자리스트 더블클릭시 대상자정보, 항암치료정보 mapping
  1284. function fSendParam_20091016() {
  1285. model.resetInstanceNode("/root/main/trgtmaninfolist2");
  1286. var listRow = grd_trgtmanlistinfo.row;
  1287. var listNodePath = "/root/main/trgtmaninfolist/trgtmanlist";
  1288. var infoNodePath = "/root/main/trgtmaninfolist2/trgtmaninfo";
  1289. var antiNodePath = "/root/main/trgtmaninfolist2/anticureinfo";
  1290. var usernm = getUserInfo("usernm"); //기록자
  1291. model.copyNode("/root/temp1/aaa", "/root/main/trgtmaninfolist/trgtmanlist["+listRow+"]"); //수정여부체크(대상자정보)
  1292. if(model.getValue("/root/main/trgtmaninfolist/trgtmanlist["+listRow+"]/pid") !="") {
  1293. model.makeValue(infoNodePath+"/recdt", model.getValue(listNodePath+"["+listRow+"]/recdt"));
  1294. model.makeValue(infoNodePath+"/pid", model.getValue(listNodePath+"["+listRow+"]/pid"));
  1295. model.makeValue(infoNodePath+"/hngnm", model.getValue(listNodePath+"["+listRow+"]/hngnm"));
  1296. model.makeValue(infoNodePath+"/sexage", model.getValue(listNodePath+"["+listRow+"]/sexage"));
  1297. model.makeValue(infoNodePath+"/rrgstno1", model.getValue(listNodePath+"["+listRow+"]/rrgstno1"));
  1298. model.makeValue(infoNodePath+"/orddeptnm", model.getValue(listNodePath+"["+listRow+"]/orddeptnm"));
  1299. model.makeValue(infoNodePath+"/orddrnm", model.getValue(listNodePath+"["+listRow+"]/orddrnm"));
  1300. model.makeValue(infoNodePath+"/sickclsnm", model.getValue(listNodePath+"["+listRow+"]/sickclsnm"));
  1301. model.makeValue(infoNodePath+"/infostatus", model.getValue(listNodePath+"["+listRow+"]/infostatus"));
  1302. model.makeValue(infoNodePath+"/cretno", model.getValue(listNodePath+"["+listRow+"]/cretno"));
  1303. model.makeValue(infoNodePath+"/indd", model.getValue(listNodePath+"["+listRow+"]/indd"));
  1304. model.makeValue(infoNodePath+"/recdt", model.getValue(listNodePath+"["+listRow+"]/recdt"));
  1305. model.makeValue(infoNodePath+"/rgstaddr", model.getValue(listNodePath+"["+listRow+"]/rgstaddr"));
  1306. model.makeValue(infoNodePath+"/realaddr", model.getValue(listNodePath+"["+listRow+"]/realaddr"));
  1307. model.makeValue(infoNodePath+"/hometel", model.getValue(listNodePath+"["+listRow+"]/hometel"));
  1308. model.makeValue(infoNodePath+"/mpphontel", model.getValue(listNodePath+"["+listRow+"]/mpphontel"));
  1309. model.makeValue(infoNodePath+"/procerhometel", model.getValue(listNodePath+"["+listRow+"]/procerhometel"));
  1310. model.makeValue(infoNodePath+"/procermpphontel", model.getValue(listNodePath+"["+listRow+"]/procermpphontel"));
  1311. model.makeValue(infoNodePath+"/boxter", model.getValue(listNodePath+"["+listRow+"]/boxter"));
  1312. model.makeValue(infoNodePath+"/chemoport", model.getValue(listNodePath+"["+listRow+"]/chemoport"));
  1313. model.makeValue(infoNodePath+"/anticncrprtlbfr", model.getValue(listNodePath+"["+1+"]/anticncrprtlbfr"));
  1314. if(model.getValue(infoNodePath+"/boxter") == ""
  1315. ||model.getValue(infoNodePath+"/chemoport") == "") {
  1316. model.setValue(infoNodePath+"/boxter","1");
  1317. model.setValue(infoNodePath+"/chemoport","1");
  1318. }
  1319. model.makeValue(antiNodePath+"/prtlnm", model.getValue(listNodePath+"["+listRow+"]/prtlnm"));
  1320. model.makeValue(antiNodePath+"/appdd", model.getValue(listNodePath+"["+listRow+"]/appdd"));
  1321. model.makeValue(antiNodePath+"/acptterm", model.getValue(listNodePath+"["+listRow+"]/acptterm"));
  1322. model.makeValue(antiNodePath+"/drugstage", model.getValue(listNodePath+"["+listRow+"]/drugstage"));
  1323. model.makeValue(antiNodePath+"/drugcycle", model.getValue(listNodePath+"["+listRow+"]/drugcycle"));
  1324. if(model.getValue(listNodePath+"["+listRow+"]/recdd") =="") {
  1325. model.makeValue(antiNodePath+"/recdd", getCurrentDate().substr(0,4)+"-"+getCurrentDate().substr(4,2)+
  1326. "-"+getCurrentDate().substr(6,2));
  1327. model.makeValue(antiNodePath+"/recuser", usernm);
  1328. }
  1329. else{
  1330. model.makeValue(antiNodePath+"/recdd", model.getValue(listNodePath+"["+listRow+"]/recdd"));
  1331. model.makeValue(antiNodePath+"/recuser", model.getValue(listNodePath+"["+listRow+"]/recuser"));
  1332. }
  1333. if(model.getValue(listNodePath+"["+listRow+"]/discontinuyn") == "Y") {
  1334. cmb_anticncr.disabled = false;
  1335. if(model.getValue(listNodePath+"["+listRow+"]/discontinucmb") =="99") {
  1336. ipt_anticncr.disabled = false;
  1337. ipt_anticncrvol.disabled =false;
  1338. ipt_anticncrtret.disabled =false;
  1339. }
  1340. }
  1341. else {
  1342. model.makeValue(antiNodePath+"/discontinuyn","N");
  1343. cmb_anticncr.disabled = true;
  1344. ipt_anticncr.disabled = true;
  1345. ipt_anticncrvol.disabled =true;
  1346. ipt_anticncrtret.disabled =true;
  1347. }
  1348. model.makeValue(antiNodePath+"/pid", model.getValue(listNodePath+"["+listRow+"]/pid"));
  1349. model.makeValue(antiNodePath+"/antistatus", model.getValue(listNodePath+"["+listRow+"]/antistatus"));
  1350. model.makeValue(antiNodePath+"/antirecdt", model.getValue(listNodePath+"["+listRow+"]/antirecdt"));
  1351. model.makeValue(antiNodePath+"/cpgappno", model.getValue(listNodePath+"["+listRow+"]/cpgappno"));
  1352. if(model.getValue(listNodePath+"["+listRow+"]/antistatus") == "U") {
  1353. model.makeValue(antiNodePath+"/bfsymp", model.getValue(listNodePath+"["+listRow+"]/bfsymp"));
  1354. if(isSearchString(model.getValue(antiNodePath+"/bfsymp"), "99") == true)
  1355. {
  1356. tar_bfsymp.disabled=false;
  1357. }
  1358. else
  1359. {
  1360. model.setValue(antiNodePath+"/bfsymprec","");
  1361. tar_bfsymp.disabled=true;
  1362. }
  1363. model.makeValue(antiNodePath+"/bfsymprec", model.getValue(listNodePath+"["+listRow+"]/bfsymprec"));
  1364. if(model.getValue(listNodePath+"["+listRow+"]/carerec") == "") {
  1365. model.makeValue(antiNodePath+"/carerecyn","Y");
  1366. tar_rec.disabled = true;
  1367. }
  1368. else{
  1369. model.makeValue(antiNodePath+"/carerec",model.getValue(listNodePath+"["+listRow+"]/carerec"));
  1370. tar_rec.disabled = false;
  1371. }
  1372. if(model.getValue(listNodePath+"["+listRow+"]/prestsymp") == "") {
  1373. model.makeValue(antiNodePath+"/rejtreact","Y");
  1374. chk_symp2.disabled = true;
  1375. tar_react.disabled = true;
  1376. }
  1377. else{
  1378. model.makeValue(antiNodePath+"/prestsymp",model.getValue(listNodePath+"["+listRow+"]/prestsymp"));
  1379. model.makeValue(antiNodePath+"/prestsymprec",model.getValue(listNodePath+"["+listRow+"]/prestsymprec"));
  1380. if(isSearchString(model.getValue(antiNodePath+"/prestsymp"), "99") == true) {
  1381. chk_symp2.disabled = false;
  1382. tar_react.disabled = false;
  1383. }
  1384. }
  1385. model.makeValue(antiNodePath+"/bp", model.getValue(listNodePath+"["+listRow+"]/bp"));
  1386. model.makeValue(antiNodePath+"/bp2", model.getValue(listNodePath+"["+listRow+"]/bp2"));
  1387. model.makeValue(antiNodePath+"/pulse", model.getValue(listNodePath+"["+listRow+"]/pulse"));
  1388. model.makeValue(antiNodePath+"/breth", model.getValue(listNodePath+"["+listRow+"]/breth"));
  1389. model.makeValue(antiNodePath+"/bdtp", model.getValue(listNodePath+"["+listRow+"]/bdtp"));
  1390. model.makeValue(antiNodePath+"/bdtp2", model.getValue(listNodePath+"["+listRow+"]/bdtp2"));
  1391. model.makeValue(antiNodePath+"/discontinuyn", model.getValue(listNodePath+"["+listRow+"]/discontinuyn"));
  1392. model.makeValue(antiNodePath+"/discontinucmb", model.getValue(listNodePath+"["+listRow+"]/discontinucmb"));
  1393. model.makeValue(antiNodePath+"/discontinurec", model.getValue(listNodePath+"["+listRow+"]/discontinurec"));
  1394. model.makeValue(antiNodePath+"/discontinuvol", model.getValue(listNodePath+"["+listRow+"]/discontinuvol"));
  1395. model.makeValue(antiNodePath+"/discontinutret", model.getValue(listNodePath+"["+listRow+"]/discontinutret"));
  1396. model.makeValue(antiNodePath+"/spcffact", model.getValue(listNodePath+"["+listRow+"]/spcffact"));
  1397. }
  1398. }
  1399. model.copyNode("/root/send/reqdata", "/root/main/cond"); //copyNode
  1400. model.makeValue("/root/send/reqdata/pid", model.getValue("/root/main/trgtmaninfolist/trgtmanlist["+listRow+"]/pid"));
  1401. submit("TRMNI03102"); //submit
  1402. model.refresh();
  1403. model.makeValue("/root/main/trgtmaninfolist2/trgtmaninfo/anticncrprtlbfr",model.getValue("/root/hidden1/anticncrprtlbfr/bfprtlnm"));
  1404. model.refresh();
  1405. }
  1406. // 대상자정보, 항암치료정보 mapping
  1407. function infoset() {
  1408. var listNodePath = "/root/main/trgtmaninfolist/trgtmanlist";
  1409. var infoNodePath = "/root/main/trgtmaninfolist2/trgtmaninfo";
  1410. var antiNodePath = "/root/main/trgtmaninfolist2/anticureinfo";
  1411. var usernm = getUserInfo("usernm"); //기록자
  1412. if(model.getValue("/root/send/reqdata/pid") != "") {
  1413. model.makeValue(infoNodePath+"/pid", model.getValue(listNodePath+"["+1+"]/pid"));
  1414. model.makeValue(infoNodePath+"/hngnm", model.getValue(listNodePath+"["+1+"]/hngnm"));
  1415. model.makeValue(infoNodePath+"/sexage", model.getValue(listNodePath+"["+1+"]/sexage"));
  1416. model.makeValue(infoNodePath+"/rrgstno1", model.getValue(listNodePath+"["+1+"]/rrgstno1"));
  1417. model.makeValue(infoNodePath+"/orddeptnm", model.getValue(listNodePath+"["+1+"]/orddeptnm"));
  1418. model.makeValue(infoNodePath+"/orddrnm", model.getValue(listNodePath+"["+1+"]/orddrnm"));
  1419. model.makeValue(infoNodePath+"/sickclsnm", model.getValue(listNodePath+"["+1+"]/sickclsnm"));
  1420. model.makeValue(infoNodePath+"/cretno", model.getValue(listNodePath+"["+1+"]/cretno"));
  1421. model.makeValue(infoNodePath+"/indd", model.getValue(listNodePath+"["+1+"]/indd"));
  1422. model.makeValue(infoNodePath+"/infostatus", model.getValue(listNodePath+"["+1+"]/infostatus"));
  1423. model.makeValue(infoNodePath+"/recdt", model.getValue(listNodePath+"["+1+"]/recdt"));
  1424. model.makeValue(infoNodePath+"/rgstaddr", model.getValue(listNodePath+"["+1+"]/rgstaddr"));
  1425. model.makeValue(infoNodePath+"/realaddr", model.getValue(listNodePath+"["+1+"]/realaddr"));
  1426. model.makeValue(infoNodePath+"/hometel", model.getValue(listNodePath+"["+1+"]/hometel"));
  1427. model.makeValue(infoNodePath+"/mpphontel", model.getValue(listNodePath+"["+1+"]/mpphontel"));
  1428. model.makeValue(infoNodePath+"/procerhometel", model.getValue(listNodePath+"["+1+"]/procerhometel"));
  1429. model.makeValue(infoNodePath+"/procermpphontel", model.getValue(listNodePath+"["+1+"]/procermpphontel"));
  1430. model.makeValue(infoNodePath+"/boxter", model.getValue(listNodePath+"["+1+"]/boxter"));
  1431. model.makeValue(infoNodePath+"/chemoport", model.getValue(listNodePath+"["+1+"]/chemoport"));
  1432. model.makeValue(infoNodePath+"/recdt", model.getValue(listNodePath+"["+1+"]/recdt"));
  1433. model.makeValue(infoNodePath+"/anticncrprtlbfr", model.getValue(listNodePath+"["+1+"]/anticncrprtlbfr"));
  1434. if(model.getValue(infoNodePath+"/boxter") == ""
  1435. ||model.getValue(infoNodePath+"/chemoport") == "") {
  1436. model.setValue(infoNodePath+"/boxter","1");
  1437. model.setValue(infoNodePath+"/chemoport","1");
  1438. }
  1439. model.makeValue(antiNodePath+"/prtlnm", model.getValue(listNodePath+"["+1+"]/prtlnm"));
  1440. model.makeValue(antiNodePath+"/appdd", model.getValue(listNodePath+"["+1+"]/appdd"));
  1441. model.makeValue(antiNodePath+"/acptterm", model.getValue(listNodePath+"["+1+"]/acptterm"));
  1442. model.makeValue(antiNodePath+"/drugstage", model.getValue(listNodePath+"["+1+"]/drugstage"));
  1443. model.makeValue(antiNodePath+"/drugcycle", model.getValue(listNodePath+"["+1+"]/drugcycle"));
  1444. model.makeValue(antiNodePath+"/recuser", model.getValue(listNodePath+"["+1+"]/recuser"));
  1445. model.makeValue(antiNodePath+"/cpgappno", model.getValue(listNodePath+"["+1+"]/cpgappno"));
  1446. model.makeValue(antiNodePath+"/pid", model.getValue(listNodePath+"["+1+"]/pid"));
  1447. model.makeValue(antiNodePath+"/indd", model.getValue(listNodePath+"["+1+"]/indd"));
  1448. model.makeValue(antiNodePath+"/cretno", model.getValue(listNodePath+"["+1+"]/cretno"));
  1449. model.makeValue(antiNodePath+"/antistatus", model.getValue(listNodePath+"["+1+"]/antistatus"));
  1450. model.makeValue(antiNodePath+"/antirecdt", model.getValue(listNodePath+"["+1+"]/antirecdt"));
  1451. if(model.getValue(listNodePath+"["+1+"]/recdd") =="") {
  1452. model.makeValue(antiNodePath+"/recdd", getCurrentDate().substr(0,4)+"-"+getCurrentDate().substr(4,2)+
  1453. "-"+getCurrentDate().substr(6,2));
  1454. model.makeValue(antiNodePath+"/recuser", usernm);
  1455. }
  1456. else{
  1457. model.makeValue(antiNodePath+"/recdd", model.getValue(listNodePath+"["+1+"]/recdd"));
  1458. model.makeValue(antiNodePath+"/recuser", model.getValue(listNodePath+"["+1+"]/recuser"));
  1459. }
  1460. if(model.getValue(antiNodePath+"/discontinuyn") == "") {
  1461. model.setValue(antiNodePath+"/discontinuyn","N");
  1462. }
  1463. model.makeValue(antiNodePath+"/recdt", model.getValue(listNodePath+"["+1+"]/recdt"));
  1464. }
  1465. model.refresh();
  1466. }
  1467. */