123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110 |
- /**
- * 파 일 명 : SMADT30600.js
- * 설 명 : 마약향정처방바코드전용관리 Javascriot
- * 설 계 자 : 공두경
- * 작 성 자 : 공두경
- * 수정이력 : 2007.08.10 / 최초작성 / 공두경
- */
- /**
- * 초기화
- */
- function fInit() {
- caption1.text="";
- grd_narclist.fixedcellcheckbox(0,1) = true;
- grd_sprelist.fixedcellcheckbox(0,1) = true;
- grd_outnarc.fixedcellcheckbox(0,1) = true;
- //구분 초기화(전체)
-
- model.setValue("/root/temp/srchinfo/narcflag", "M");
- model.setValue("/root/temp/srchinfo/srchdrugkind", "T");
- model.setValue("/root/temp/srchinfo/drugflag", "I");
- // fChkIOTotal();
- model.setValue("/root/temp/srchinfo/narcstat", "T");
- // rdo_cncl.disabled = true;
- model.setValue("/root/temp/srchinfo/cnclstat", "");
- // rdo_rtn.disabled = true;
- model.setValue("/root/temp/srchinfo/rtnstat", "");
- model.setValue("/root/temp/srchinfo/narctypeflag", "T");
- model.setValue("/root/temp/srchinfo/srchioflag", "I");
- fChgIOFlag();
-
- //토글초기화
- model.setValue("/root/temp/srchinfo/srchroot", "M");
- model.toggle("case1");
-
- //조회날짜 초기화
- model.setValue("/root/temp/srchinfo/fst_dd", getCurrentDate());
- model.setValue("/root/temp/srchinfo/last_dd", getCurrentDate());
-
- //병동 Combo 조회
- model.setValue("/root/send/srchcond/deptflag", "W");
- submit("TRADT30101");
- //astfAddCombo("/root/temp/srchcond", "ward", "wardcd,wardnm", ",");
-
- //로그인 사용자 셋팅
- var userid = getUserId();
- //model.setValue("/root/temp/srchinfo/srchid", userid);
- //fChgUserID();
-
- model.refresh();
- model.setFocus("input1");
- gTimer1 = window.setInterval("fClearUserID()",90000);
- }
- /**
- * 마약리스트 조회
- */
- function fGetNarcData() {
- grd_narclist.fixedcellischeck(0, 1) = false;
- grd_outnarc.fixedcellischeck(0, 1) = false;
- model.copyNode("/root/send/srchinfo","/root/temp/srchinfo");
- submit("TRADT30102");
- }
- /**
- * 바코드 변경시
- */
- function fChgBarcode() {
- var iRowNo = 0;
- var sBar = model.getValue("/root/temp/srchinfo/barcode");
- if(sBar.length >= 21){
- if(model.getValue("/root/temp/userinfo/userinfo/userid") == ""){
- messageBox("사용자ID가 없습니다. 사용자ID부터","C001");
- model.setValue("/root/temp/srchinfo/srchid","");
- model.setValue("/root/temp/srchinfo/barcode","");
- model.refresh();
- model.setFocus("input1");
- } else if(sBar.substr(0,1) != "M"){
- messageBox("바코드 정보가 다릅니다. 바코드를 다시","C001");
- model.setValue("/root/temp/srchinfo/barcode","");
- model.setFocus("input9");
- } else {
-
- //해당 바코드를 확인 처리 하기전 노드를 백업하여 기존에 이미 확인한 리스트들이 사라지지 않도록 한다.
- model.removenode("/root/temp/bknarclist");
- model.makeNode("/root/temp/bknarclist");
- model.copyNode("/root/temp/bknarclist", "/root/main/narclist");
-
- //바코드로 먼저 해당처방을 조회함
- fGetNarcData();
- //바코드로 Acting처리가 가능한 처방인지 체크함
- //바코드로 처리가능한 Acting : 조제완료, 불출, 잔량반납확인, 반환확인
- //바코드로 조회시 데이터는 한건만 조회됨.
- if(sBar.substr(2,1) == "O" || sBar.substr(2,1) == "E" || sBar.substr(2,1) == "D"){
- if(model.getValue("/root/temp/srchinfo/srchroot") == "M"){
- if(model.getValue("/root/main/narclist/narclist["+1+"]/narcstat")=="4"){
- //바코드로 취소는 불가능 조회만가능
- model.setValue("/root/main/narclist/narclist["+1+"]/sel","Y");
- fNarcActing("Drug");
-
- fSetNarcNodes("ADD");
- return;
- }
- }
- }
-
- fSetNarcNodes("ADD");
-
- model.setValue("/root/temp/srchinfo/barcode","");
- model.refresh();
- }
- } else {
- messageBox("바코드 정보가 다릅니다.\n다시","C001");
- model.setValue("/root/temp/srchinfo/barcode","");
- model.setFocus("input9");
- }
- model.refresh();
- }
- /**
- * 마약 Acting 버튼 클릭시
- */
-
- function Old_fNarcActing(sActing) {
- if(model.getValue("/root/temp/userinfo/userinfo/userid") == ""){
- messageBox("사용자ID가 없습니다. 사용자ID를 먼저","C001");
- model.setValue("/root/temp/srchinfo/srchid","");
- model.setFocus("input1");
- model.refresh();
- return;
- }
- var iActing_Cnt = 0;
- var sActing_nm = "";
- var sActingAfter = "";
- //액팅전 체크표시 cash
- fChkCash("before");
- model.removeNodeset("/root/send/narcinfo/narclist");
- for(var i = grd_narclist.fixedRows; i < grd_narclist.rows; i++){
- var sel = model.getValue("/root/main/narclist/narclist["+i+"]/sel");
- var sNarcStat = model.getValue("/root/main/narclist/narclist["+i+"]/narcstat");
- var sCnclStat = model.getValue("/root/main/narclist/narclist["+i+"]/cnclstat");
- var sRtnStat = model.getValue("/root/main/narclist/narclist["+i+"]/rtnstat");
- var sDrugFlag = model.getValue("/root/main/narclist/narclist["+i+"]/drugflag");
- var sReturnFlag = model.getValue("/root/main/narclist/narclist["+i+"]/returnflag");
- var sDrugKind = model.getValue("/root/main/narclist/narclist["+i+"]/drugkind");
- var sIOflag = model.getValue("/root/main/narclist/narclist["+i+"]/ioflag");
- var sPrcphistcd = model.getValue("/root/main/narclist/narclist["+i+"]/prcphistcd");
-
- if(sel == 'Y'){
- if(sActing == "Prcp"){
-
- //이선경 2008-07-23 start
- if(sCnclStat != ""){
- if(messageBox("반환된 처방입니다. 조제완료를", "Q002") == "7") {
- return;
- }
- }
- //이선경 2008-07-23 end
-
-
- if(sNarcStat == "2"){
- messageBox("마약처방전이 출력되지","E007");
- return;
- }
- if(parseInt(sNarcStat, 10) > 3){
- messageBox("이미 조제완료된 처방","E008");
- return;
- }
-
- if(sNarcStat == "3"){
- astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
- sActing_nm = "조제완료";
- iActing_Cnt++;
- } else {
- sActing_nm = "조제완료";
- }
-
- } else if(sActing == "PrcpCncl"){
-
- //이선경 2008-07-23 start
- if(sCnclStat != ""){
- if(messageBox("반환된 처방입니다. 조제취소를", "Q002") == "7") {
- return;
- }
- }
- //이선경 2008-07-23 end
-
- if(sNarcStat == "4"){
- astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
- iActing_Cnt++;
- }
-
- sActing_nm = "조제취소";
-
- } else if(sActing == "Drug"){
-
- //이선경 2008-07-23 start
- if(sCnclStat != ""){
- if(messageBox("반환된 처방입니다. 불출확인를", "Q002") == "7") {
- return;
- }
- }
- //이선경 2008-07-23 end
-
- if(sNarcStat == "4"){
- astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
- iActing_Cnt++;
- }
-
- sActing_nm = "불출";
-
- } else if(sActing == "DrugCncl"){
-
- //이선경 2008-07-23 start
- if(sCnclStat != ""){
- if(messageBox("반환된 처방입니다. 불출취소를", "Q002") == "7") {
- return;
- }
- }
- //이선경 2008-07-23 end
-
- if(sNarcStat == "5"){
- astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
- iActing_Cnt++;
- }
- sActing_nm = "불출취소";
-
- } else if(sActing == "Spre"){
- if(sRtnStat == "1"){
- astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
- iActing_Cnt++;
- if((sCnclStat == "1" || (sIOflag == "O" && (sDrugKind == "N" || sDrugKind == "Y") && sReturnFlag == "Y"))
- && model.getValue("/root/main/narclist/narclist["+i+"]/rtndt") != ""){
- var vb_prcpcd = model.getValue("/root/main/narclist/narclist["+i+"]/prcpcd");
- var vb_Chk = messageBox(vb_prcpcd+"마약에 대해 반환확인 데이터가 존재합니다.\n반환확인을 ", "Q004");
- if(vb_Chk == 6){
- model.makeValue("/root/send/narcinfo/narclist["+getNodesetCount("/root/send/narcinfo/narclist")+"]/acting_after", "Rtn");
- }
- }
- }
- sActing_nm = "잔량반납확인";
-
- } else if(sActing == "Rtn"){
- /*
- 1. 입원 약주사, 외래주사는 간호사가 반환신청을 함
- 2. 퇴원/외박/외출은 약국에서 반환을 수행(삭제, 간호에서 반환신청해야함)
- 3. 외래 원내 약/외용약은 약국에서 반환을 수행
- */
-
- //이선경 2008-07-23 start
- if(sCnclStat == "1" && sPrcphistcd == "E" && sDrugFlag !="L" && sDrugFlag != 'G'){
- messageBox("간호투약확인후 반환확인을 ", "C002");
- return;
- }
- //이선경 2008-07-23 end
-
- if(sCnclStat == "1"){
- astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
- iActing_Cnt++;
- /*} else if((sDrugFlag == "L" || sDrugFlag == "G") && (parseInt(sNarcStat,10) < 6 ) && sReturnFlag == "Y"){
- if(model.getValue("/root/main/narclist/narclist["+i+"]/rtnqty") != ""){
- astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
- iActing_Cnt++;
- } else {
- messageBox("반환량이 없습니다. 반환량을","C001");
- return;
- }*/
- if(sRtnStat == "1" && model.getValue("/root/main/narclist/narclist["+i+"]/rtndt") != ""){
- var vb_Chk = messageBox("잔량확인 데이터가 존재합니다.\n잔랑반납확인을 ", "Q004");
- if(vb_Chk == 6){
- model.makeValue("/root/send/narcinfo/narclist["+getNodesetCount("/root/send/narcinfo/narclist")+"]/acting_after", "Spre");
- }
- }
- } else if(sIOflag == "O" && (sDrugKind == "N" || sDrugKind == "Y") && sReturnFlag == "Y"){
- if(model.getValue("/root/main/narclist/narclist["+i+"]/rtnqty") == "" || model.getValue("/root/main/narclist/narclist["+i+"]/rtnqty") == "0"){
- messageBox("반환량이 없습니다. 반환량을","C001");
- return;
- }
- if(isNaN(model.getValue("/root/main/narclist/narclist["+i+"]/rtnqty"))){
- messageBox("반환량은 숫자로","C001");
- model.setValue("/root/main/narclist/narclist["+i+"]/rtnqty", "");
- return;
- }
- astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
- iActing_Cnt++;
- if(sRtnStat == "1" && model.getValue("/root/main/narclist/narclist["+i+"]/rtndt") != ""){
- var vb_prcpcd = model.getValue("/root/main/narclist/narclist["+i+"]/prcpcd");
- var vb_Chk = messageBox(vb_prcpcd+"마약에 대해 잔량확인 데이터가 존재합니다.\n잔랑반납확인을 ", "Q004");
- if(vb_Chk == 6){
- model.makeValue("/root/send/narcinfo/narclist["+getNodesetCount("/root/send/narcinfo/narclist")+"]/acting_after", "Spre");
- }
- }
- }
- sActing_nm = "반환확인";
- }
- }
- }
- if(iActing_Cnt == 0 && model.getValue("/root/temp/srchinfo/barcode") == ""){
- messageBox("선택된 데이터중에 "+sActing_nm+"할 데이터가 없거나 \n선택된 데이터가","I004");
- return;
- } else if(iActing_Cnt == 0 && model.getValue("/root/temp/srchinfo/barcode") != ""){
- messageBox("이미","I001");
- model.setValue("/root/temp/srchinfo/barcode","");
- model.setFocus("input9");
- model.refresh();
- return;
- }
-
- if(sActing == "Prcp" && model.getValue("/root/temp/srchinfo/srchioflag") == "I"){
- if ( model.getValue("/root/send/lblskip") != "Y" ){
- fNarcLBLPrint("Prnt");
- }
- }
- model.copyNode("/root/send/narcinfo/srchinfo","/root/temp/srchinfo");
- model.copyNode("/root/send/narcinfo/userinfo","/root/temp/userinfo/userinfo");
- model.makeValue("/root/send/narcinfo/srchinfo/acting", sActing);
- submit("TXADT30102"); //라벨 출력 횟수 저장
- submit("TXADT30101");
-
- //액팅전 체크표시 다시 표시
- grd_narclist.fixedcellischeck(0, 1) = false;
- grd_outnarc.fixedcellischeck(0, 1) = false;
- fChkCash("after");
-
- model.setValue("/root/temp/srchinfo/barcode","");
- model.setFocus("input9");
- model.refresh();
- }
- /**
- * 마약 Acting 버튼 클릭시 -- 2009-05-20 김귀남 변경
- */
- function fNarcActing(sActing) {
- if(model.getValue("/root/temp/userinfo/userinfo/userid") == ""){
- messageBox("사용자ID가 없습니다. 사용자ID를 먼저","C001");
- model.setValue("/root/temp/srchinfo/srchid","");
- model.setFocus("ipt_srchid");
- model.refresh();
- return;
- }
- var iActing_Cnt = 0; // 행위 구분을 위한 카운트값
- var sActing_nm = ""; // 해당 행위의 명칭
- var sActingAfter = "";
- var selCnt = 0;
- //액팅전 체크표시 cash
- fChkCash("before");
- model.removeNodeset("/root/send/narcinfo/narclist");
-
- // **** 체크박스 선택 값 카운트 Start ****
- for(var i = grd_narclist.fixedRows; i < grd_narclist.rows; i++){
- var sel = model.getValue("/root/main/narclist/narclist["+i+"]/sel");
- var sNarcStat = model.getValue("/root/main/narclist/narclist["+i+"]/narcstat");
- if(sel == "Y" && sNarcStat != "1") selCnt++; // 선택된 값(sel == "Y") 들 중 미신청 값은 제외
- }
-
- if(selCnt == 0) {
- messageBox("선택된 데이터가","I004");
- return;
- }
- // **** 체크박스 선택 값 카운트 End ****
- for(var i = grd_narclist.fixedRows; i < grd_narclist.rows; i++){
- var sel = model.getValue("/root/main/narclist/narclist["+i+"]/sel"); // 선택여부
- var sNarcStat = model.getValue("/root/main/narclist/narclist["+i+"]/narcstat"); // 불출상태
- var sCnclStat = model.getValue("/root/main/narclist/narclist["+i+"]/cnclstat"); // 반환상태
- var sRtnStat = model.getValue("/root/main/narclist/narclist["+i+"]/rtnstat"); // 반납상태
- var sDrugFlag = model.getValue("/root/main/narclist/narclist["+i+"]/drugflag"); // 마약/향정구분
- var sReturnFlag = model.getValue("/root/main/narclist/narclist["+i+"]/returnflag"); // 반납여부
- var sDrugKind = model.getValue("/root/main/narclist/narclist["+i+"]/drugkind"); // 발생구분
- var sIOflag = model.getValue("/root/main/narclist/narclist["+i+"]/ioflag"); // 입원/외래구분
- var sPrcphistcd = model.getValue("/root/main/narclist/narclist["+i+"]/prcphistcd"); // 처방상태
- var sPid = model.getValue("/root/main/narclist/narclist["+i+"]/pid"); // 환자번호
- var sPrcpcd = model.getValue("/root/main/narclist/narclist["+i+"]/prcpcd"); // 약품코드
- var sDrugno = model.getValue("/root/main/narclist/narclist["+i+"]/drugno"); // 약품코드
- var sMsg = "*투약번호 : "+sDrugno+" *환자번호 : "+ sPid+ " *약품코드 : "+ sPrcpcd + "\n";
- //=========================================== 제한조건 체크 Start ================================================//
- // 변수명 parameter 명칭 동작가능상태 //
- //------------------------------------------------------------------------------------------------------------//
- // sCnclStat 1. 7 : 반환종료 sCnclStat == "7" ( 진행불가 ) //
- //------------------------------------------------------------------------------------------------------------//
- // sActing - 1. Prcp : 조제확인 sNarcStat == "3" [출력완료] //
- // 2. PrcpCncl : 조제취소 sNarcStat == "4" [조제완료] //
- // 3. Drug : 불출확인 sNarcStat == "4" [조제완료] //
- // 4. DrugCncl : 불출취소 sNarcStat == "5" [불출] //
- // 5. Rtn : 반환확인 sCnclStat == "1" [반환신청] //
- // 6. RtnCncl : 반환취소 (2009-05-05 추가) sCnclStat == "2" [반환확인] //
- // 7. Spre : 잔량확인 sRtnStat == "1" [잔량신청] //
- // 8. SpreCncl : 잔량취소 (2009-05-05 추가) sRtnStat == "2" [잔량확인] //
- //============================================================================================================//
- if(sel == 'Y'){
- // *** 반환종료 *** 처방 메시지 처리 (진행불가) Start
- if(sCnclStat == "7" && (sNarcStat == "3" || sNarcStat == "4")){
- //메세지처리 반환종료 된 처방입니다.
- messageBox(sMsg+"반환 종료 되었습니다. 반환처방전을 출력","I008");
- return;
- } else if(sCnclStat == "7" && sNarcStat == "2"){
- //메세지처리 : 반환종료되었습니다.
- messageBox(sMsg+"반환","I002");
- return;
- }
- // *** 반환종료 *** 처방 메시지 처리 (진행불가) End
-
- if(sActing == "Prcp"){ // ***조제확인*** 출력완료 일 때만 기능 동작
- //이선경 2008-07-23 start
- /*
- if(sCnclStat != ""){
- if(messageBox("반환된 처방입니다. 조제완료를", "Q002") == "7") {
- return;
- }
- }
- */
- // 한영현/간호 ITC 협의사항 - 'D'인 처방도 정상적인 흐름으로 처리 후 다시 반환처리 - 2009.06.04 (목) 김귀남
- //이선경 2008-07-23 end
- if(sNarcStat == "2"){ // [불출신청] 상태일 때
- messageBox("마약처방전이 출력되지","E007");
- return;
- }
- if(parseInt(sNarcStat, 10) > 3){ // [출력완료] 상태 이상일 때
- messageBox("이미 조제완료된 처방","E008");
- return;
- }
- if(sNarcStat == "3"){ // [출력완료] 일 때만 기능 동작
- astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
- sActing_nm = "조제완료";
- iActing_Cnt++;
- } else { // 불출상태가 [미신청]일때
- sActing_nm = "조제완료";
- }
- } else if(sActing == "PrcpCncl"){ // ***조제취소***
- //이선경 2008-07-23 start
- if(sCnclStat != ""){
- if(messageBox("반환된 처방입니다. 조제취소를", "Q002") == "7") {
- return;
- }
- }
- //이선경 2008-07-23 end
- if(sNarcStat == "4"){ // [조제완료] 상태일 때
- astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
- iActing_Cnt++;
- }
- sActing_nm = "조제취소";
- } else if(sActing == "Drug"){ // ***불출확인***
- //이선경 2008-07-23 start
- /*
- if(sCnclStat != ""){
- if(messageBox("반환된 처방입니다. 불출확인를", "Q002") == "7") {
- return;
- }
- }
- */
- // 한영현/간호 ITC 협의사항 - 'D'인 처방도 정상적인 흐름으로 처리 후 다시 반환처리 - 2009.06.04 (목) 김귀남
- //이선경 2008-07-23 end
- if(sNarcStat == "4"){ // [조제완료] 상태일 때
- astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
- iActing_Cnt++;
- }
- sActing_nm = "불출";
- } else if(sActing == "DrugCncl"){ // ***불출취소***
- //이선경 2008-07-23 start
- if(sCnclStat != ""){
- if(messageBox("반환된 처방입니다. 불출취소를", "Q002") == "7") {
- return;
- }
- }
- //이선경 2008-07-23 end
- if(sNarcStat == "5"){ // [불출] 상태일 때
- astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
- iActing_Cnt++;
- }
- sActing_nm = "불출취소";
- } else if(sActing == "Spre"){ // ***잔량확인***
- if(sRtnStat == "1"){ // [잔량신청] 일 때
- astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
- iActing_Cnt++;
- // [반환신청] 이거나 [외래] 경구약 혹은 외용제이면서 처방상태(sReturnFlag)가 [D/C]일 경우
- // 반환일시가 존재할때.
- if((sCnclStat == "1" || (sIOflag == "O" && (sDrugKind == "N" || sDrugKind == "Y") && sReturnFlag == "Y"))
- && model.getValue("/root/main/narclist/narclist["+i+"]/rtndt") != ""){
- var vb_prcpcd = model.getValue("/root/main/narclist/narclist["+i+"]/prcpcd");
- var vb_Chk = messageBox(vb_prcpcd+"마약에 대해 반환확인 데이터가 존재합니다.\n반환확인을 ", "Q004");
- if(vb_Chk == 6){
- model.makeValue("/root/send/narcinfo/narclist["+getNodesetCount("/root/send/narcinfo/narclist")+"]/acting_after", "Rtn");
- }
- }
- }
- sActing_nm = "잔량반납확인";
- } else if(sActing == "SpreCncl"){ // ***잔량취소***
- if(sRtnStat == "2"){ // [잔량확인] 일 때
- astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
- iActing_Cnt++;
- }
- sActing_nm = "잔량취소";
- } else if(sActing == "Rtn"){ // ***반환확인***
- /*
- 1. 입원 약주사, 외래주사는 간호사가 반환신청을 함
- 2. 퇴원/외박/외출은 약국에서 반환을 수행(삭제, 간호에서 반환신청해야함)
- 3. 외래 원내 약/외용약은 약국에서 반환을 수행
- */
- //이선경 2008-07-23 start
- if( sIOflag !="O" && sCnclStat == "1" && sPrcphistcd == "E" && sDrugFlag !="L" && sDrugFlag != 'G'){
- //messageBox("간호투약확인후 반환확인을 ", "C002");
- //return;
- }
- //이선경 2008-07-23 end
- if(sCnclStat == "1"){ // [반환신청]상태일 때 (입원/외래 공통)
- astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
- iActing_Cnt++;
- /*} else if((sDrugFlag == "L" || sDrugFlag == "G") && (parseInt(sNarcStat,10) < 6 ) && sReturnFlag == "Y"){
- if(model.getValue("/root/main/narclist/narclist["+i+"]/rtnqty") != ""){
- astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
- iActing_Cnt++;
- } else {
- messageBox("반환량이 없습니다. 반환량을","C001");
- return;
- }*/
- if(model.getValue("/root/main/narclist/narclist["+i+"]/rtnqty") != ""){
- } else {
- messageBox("반환량이 없습니다. 반환량을","C001");
- return;
- }
- if(sRtnStat == "1" && model.getValue("/root/main/narclist/narclist["+i+"]/rtndt") != ""){
- var vb_Chk = messageBox("잔량확인 데이터가 존재합니다.\n잔랑반납확인을 ", "Q004");
- if(vb_Chk == 6){
- model.makeValue("/root/send/narcinfo/narclist["+getNodesetCount("/root/send/narcinfo/narclist")+"]/acting_after", "Spre");
- }
- }
- } else if(sIOflag == "O" && (sDrugKind == "N" || sDrugKind == "Y") && sReturnFlag == "Y"){ // [외래] 경구/외용약이면서 prcphistcd가 D,C 일 때
- if(model.getValue("/root/main/narclist/narclist["+i+"]/rtnqty") == "" ){
- messageBox("반환량이 없습니다. 반환량을","C001");
- return;
- }
- if(isNaN(model.getValue("/root/main/narclist/narclist["+i+"]/rtnqty"))){
- messageBox("반환량은 숫자로","C001");
- model.setValue("/root/main/narclist/narclist["+i+"]/rtnqty", "");
- return;
- }
- astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
- iActing_Cnt++;
- if(sRtnStat == "1" && model.getValue("/root/main/narclist/narclist["+i+"]/rtndt") != ""){
- var vb_prcpcd = model.getValue("/root/main/narclist/narclist["+i+"]/prcpcd");
- var vb_Chk = messageBox(vb_prcpcd+"마약에 대해 잔량확인 데이터가 존재합니다.\n잔랑반납확인을 ", "Q004");
- if(vb_Chk == 6){
- model.makeValue("/root/send/narcinfo/narclist["+getNodesetCount("/root/send/narcinfo/narclist")+"]/acting_after", "Spre");
- }
- }
- }
- sActing_nm = "반환확인";
- } else if(sActing == "RtnCncl"){ // ***반환취소***
- if(sCnclStat == "2"){ // [반환확인] 일 때
- astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
- iActing_Cnt++;
- }
- sActing_nm = "반환취소";
- }
- }
- }
- //=========================================== 제한조건 체크 Start ===========================================
- if(iActing_Cnt == 0 && model.getValue("/root/temp/srchinfo/barcode") == ""){
- messageBox("선택된 데이터중에 ["+sActing_nm+"]할 데이터가 없거나 \n선택된 데이터가","I004");
- return;
- } else if(iActing_Cnt == 0 && model.getValue("/root/temp/srchinfo/barcode") != ""){
- messageBox("이미","I001");
- model.setValue("/root/temp/srchinfo/barcode","");
- model.setFocus("input9");
- model.refresh();
- return;
- }
- if(sActing == "Prcp" && model.getValue("/root/temp/srchinfo/srchioflag") == "I" && model.getValue("/root/temp/srchinfo/drugflag") != "L"){
- if ( model.getValue("/root/send/lblskip") != "Y" ){
- fNarcLBLPrint("Prnt");
- }
- }
- model.copyNode("/root/send/narcinfo/srchinfo","/root/temp/srchinfo");
- model.copyNode("/root/send/narcinfo/userinfo","/root/temp/userinfo/userinfo");
- model.makeValue("/root/send/narcinfo/srchinfo/acting", sActing);
- if(sActing == "Prcp" && model.getValue("/root/temp/srchinfo/srchioflag") == "I" && model.getValue("/root/temp/srchinfo/drugflag") != "L"){
- if ( model.getValue("/root/send/lblskip") != "Y" ){
- submit("TXADT30102"); //라벨 출력 횟수 저장
- }
- }
- submit("TXADT30101");
- //액팅전 체크표시 다시 표시
- grd_narclist.fixedcellischeck(0, 1) = false;
- grd_outnarc.fixedcellischeck(0, 1) = false;
- fChkCash("after");
- model.setValue("/root/temp/srchinfo/barcode","");
- model.setFocus("input9");
- model.refresh();
- }
- /**
- * 마약처방전 출력
- */
- function fNarcPrint() {
- if(model.getValue("/root/temp/userinfo/userinfo/userid") == ""){
- messageBox("사용자ID가 없습니다. 사용자ID를 먼저","C001");
- model.setValue("/root/temp/srchinfo/barcode","");
- model.setFocus("input9");
- model.refresh();
- return;
- }
- //액팅전 체크표시 cash
- fChkCash("before");
-
- for(var i = grd_narclist.fixedRows; i < grd_narclist.rows; i++){
- var sel = model.getValue("/root/main/narclist/narclist["+i+"]/sel");
- var narcstat = model.getValue("/root/main/narclist/narclist["+i+"]/narcstat");
- var cnclstat = model.getValue("/root/main/narclist/narclist["+i+"]/cnclstat");
- var ioflag = model.getValue("/root/main/narclist/narclist["+i+"]/ioflag");
-
- /*이선경 2008-07-23 start
- if(sel == 'Y' && narcstat != "1"){
- *///이선경 2008-07-23 end
- if(sel == 'Y'){
- model.copyNode("/root/send/prntinfo","/root/main/narclist/narclist["+i+"]");
- model.makeValue("/root/send/prntinfo/prntid", model.getValue("/root/temp/userinfo/userinfo/userid"));
- if(cnclstat != ""){
- if(ioflag == "I"){
- if(cnclstat == "1" || cnclstat == "2"){
- model.makeValue("/root/send/prntinfo/prntflag", "D");
- } else {
- //메세지처리 간호에서 반환신청해야 합니다.
- messageBox("간호에서 반환신청 이후만 출력","I006");
- continue;
- }
- } else {
- if(cnclstat == "0"){
- //반환확인후 출력가능합니다.
- messageBox("반환확인후 출력","I006");
- continue;
- } else {
- model.makeValue("/root/send/prntinfo/prntflag", "D");
- }
- }
- } else {
- if(narcstat == "1"){
- //불출신청이 되어야 출력가능합니다.
- messageBox("불출신청 되야 출력","I006");
- continue;
- } else {
- model.makeValue("/root/send/prntinfo/prntflag", "O");
- }
- }
-
- submit("TRADT30103");
- if(model.getValue("/root/main/prntlist/patinfo/drugno") != ""){
- exeReportPreview("RFADT30100", "XMLSTR", "", "", "true","","","","","true");
- }
- }
- }
- fGetNarcData();
- //액팅전 체크표시 다시 표시
- fChkCash("after");
- }
- /**
- * 마약라벨 출력
- */
- function fNarcLBLPrint(chk) {
- var reprint="";
- for(var i = grd_narclist.fixedRows; i < grd_narclist.rows; i++){
- var sel = model.getValue("/root/main/narclist/narclist["+i+"]/sel");
- var sNarcStat = model.getValue("/root/main/narclist/narclist["+i+"]/narcstat");
- //model.removeNodeset("/root/send/narcinfo/narclist");
- if(sel == 'Y' && ((chk == "Prnt" && sNarcStat == "3") || (chk == "Reprnt" && parseInt(sNarcStat,10) > 3))){
-
- // Comm 설정
- CommAX.CommPort = "1"; // 출력 Port
- CommAX.Settings = "9600,n,8,1"; // Comm 설정
- var sSndMsg = ""; //라벨출력내용
-
- if ( model.getValue("/root/main/narclist/narclist["+i+"]/lblprnttims")>0 ){
- reprint ="(재)";
- }
-
- //astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
-
- if ( CommAX.PortOpen() == true) {
- //시작(X, Y)
- sSndMsg += astfStartFormat(0, 0);
- //라벨이름
- sSndMsg += astfPrintOut(50, 40, 10, "마 약","");
-
- //처방일자
- sSndMsg += astfPrintOut(245, 40, 34, fGetDateString(model.getValue("/root/main/narclist/narclist["+i+"]/prcpdd")),"");
- //환자번호
- sSndMsg += astfPrintOut(245, 75, 34, model.getValue("/root/main/narclist/narclist["+i+"]/pid"),"");
- //병실
- sSndMsg += astfPrintOut(35, 120, 3, model.getValue("/root/main/narclist/narclist["+i+"]/roomcd"),"");
- //환자이름+투약번호
- var sPid_Drugno = model.getValue("/root/main/narclist/narclist["+i+"]/patnm")
- + " (" + model.getValue("/root/main/narclist/narclist["+i+"]/drugno")+reprint + ")";
- sSndMsg += astfPrintOut(210, 120, 3, sPid_Drugno,"");
- //선그리기
- sSndMsg += astfGraphicBox(10, 155, 450, 0, 3);
-
- //마약코드
- sSndMsg += astfPrintOut(30, 170, 3, model.getValue("/root/main/narclist/narclist["+i+"]/prcpcd"),"");
- //일용량
- sSndMsg += astfPrintOut(250, 170, 4, model.getValue("/root/main/narclist/narclist["+i+"]/prcpvol")+model.getValue("/root/main/narclist/narclist["+i+"]/prcpvolunit"),"");
- //일수량
- sSndMsg += astfPrintOut(360, 170, 4, model.getValue("/root/main/narclist/narclist["+i+"]/dayprcpqty")+model.getValue("/root/main/narclist/narclist["+i+"]/prcpqtyunit"),"");
- //마약명칭
- sSndMsg += astfPrintOut(30, 210, 28, "("+model.getValue("/root/main/narclist/narclist["+i+"]/drugnm")+")","");
-
- // 바코드(21자리) : 마약구분(1)+입원/외래구분(1)+반납구분(1)+처방일자(8)+처방번호(10)
- var narcflag = model.getValue("/root/main/narclist/narclist["+i+"]/narcflag");
- var ioflag = model.getValue("/root/main/narclist/narclist["+i+"]/ioflag");
- var returnflag = model.getValue("/root/main/narclist/narclist["+i+"]/returnflag");
- if(returnflag ==""){
- returnflag = "O";
- } else {
- returnflag = "D";
- }
- var prcpdd = model.getValue("/root/main/narclist/narclist["+i+"]/prcpdd");
- var prcpno = model.getValue("/root/main/narclist/narclist["+i+"]/prcpno");
- var iLen = prcpno.length;
- for(var j=iLen; j<10; j++) {
- prcpno = "0" + prcpno;
- }
-
- var sResult = narcflag+ioflag+returnflag+prcpdd+prcpno;
- //바코드(변환)
- sSndMsg += astfBarCode_Code39(60, 245, "N", 50, sResult, "S");
-
- //처방입력일시
- sSndMsg += astfPrintOut(30, 310, 28, "처방입력일시 : "+fGetDateString(model.getValue("/root/main/narclist/narclist["+i+"]/rgstdt")),"");
-
-
- sSndMsg += astfEndFormat(0);
- CommAX.SendMessage(sSndMsg);
- sSndMsg = "";
-
- gTimer = window.setInterval("fStopTimer()",10000);
-
- CommAX.PortClose();
- model.refresh();
-
- }
- }
- }
- //submit("TXADT30102");
- }
- /**
- *
- */
- function fStopTimer() {
- window.clearinterval(gTimer);
- }
- function fGetDateString( s ){
- var dates = "";
- if(s.length >8){
- dates = s.substring(0,4) +"/" +s.substring(4,6)+"/" +s.substring(6,8)+" "+s.substring(8,10)+":"+s.substring(10,12)+":"+s.substring(12,14);
- } else {
- dates = s.substring(0,4) +"/" +s.substring(4,6)+"/" +s.substring(6,8);
- }
- return dates;
- }
- /**
- * 반환량입력시
- */
- function fIptRtnCnts() {
- var RtnCnts = model.getValue("/root/main/narclist/narclist["+grd_outnarc.row+"]/rtnqty");
- var RtnCnfmDt = model.getValue("/root/main/rtnlist/rtnlist["+grd_outnarc.row+"]/rtncnfmdt");
- if(RtnCnts != ""){
- //반납의뢰인 약품만 반납처리함
- if(RtnCnfmDt != ""){
- messageBox("반환완료된 약품","E008");
- return;
- }
- //반납량을 입력하지 않았을 경우
- if(RtnCnts == "0"){
- messageBox("반환량을","C001");
- model.setValue("/root/main/narclist/narclist["+grd_outnarc.row+"]/rtnqty", "");
- return;
- }
-
- if(isNaN(RtnCnts)){
- messageBox("반환량은 숫자로","C001");
- model.setValue("/root/main/narclist/narclist["+grd_outnarc.row+"]/rtnqty", "");
- return;
- }
- model.setValue("/root/main/narclist/narclist["+grd_outnarc.row+"]/sel", "Y");
- grd_outnarc.row++;
- grd_outnarc.isSelected(grd_outnarc.row) = true;
-
- model.refresh();
- }
- }
- /**
- * 병동/외래구분 체크시
- */
- function fChkIOFlag() {
- var chk = model.getValue("/root/temp/srchinfo/srchioflag");
- if(chk.length == 7){
- model.setValue("/root/temp/srchinfo/iototalflag", "T");
- } else {
- model.setValue("/root/temp/srchinfo/iototalflag", "");
- }
- model.refresh();
- }
- function fClearUserID(){
- if(model.getValue("/root/temp/userinfo/userinfo/userid") != ""){
- model.removeNodeset("/root/temp/srchinfo/srchid");
- model.makeNode("/root/temp/srchinfo/srchid");
- model.removeNodeset("/root/temp/userinfo/userinfo/userid");
- model.makeNode("/root/temp/userinfo/userinfo/userid");
-
- var sUserid = model.getValue("/root/temp/srchinfo/srchid");
- model.setValue("/root/temp/userinfo/userinfo/userid","");
-
-
- model.refresh();
- //if(sUserid.length == 8 || sUserid.length == 9 || sUserid.length == 10){
- model.setValue("/root/send/userinfo/userid", sUserid);
- submit("TRADT30104");
-
- model.removeNodeset("/root/temp/userinfo/userinfo");
- model.makeNode("/root/temp/userinfo/userinfo");
- model.removeNodeset("/root/temp/userinfo/userinfo/userid");
- model.makeValue("/root/temp/userinfo/userinfo/userid", "");
- model.removeNodeset("/root/temp/userinfo/userinfo/usernm");
- model.makeValue("/root/temp/userinfo/userinfo/usernm", "");
-
- //처방리스트들도 같이 삭제.
- model.removeNodeset("/root/main/narclist/narclist");
-
- model.setValue("/root/temp/srchinfo/srchid","");
- model.setValue("/root/temp/userinfo/userinfo/usernm", "");
- model.refresh();
- model.setFocus("input1");
-
- model.refresh();
- }
- }
- /**
- * userid 변경시
- */
- function fChgUserID() {
- var sUserid = model.getValue("/root/temp/srchinfo/srchid");
- model.setValue("/root/temp/userinfo/userinfo/userid","");
-
-
- model.refresh();
- //if(sUserid.length == 8 || sUserid.length == 9 || sUserid.length == 10){
- model.setValue("/root/send/userinfo/userid", sUserid);
- submit("TRADT30104");
- if(model.getValue("/root/temp/userinfo/userinfo/userid") == ""){
- messageBox("사용자ID 정보가 없습니다.\n다시","C001");
- model.removeNodeset("/root/temp/userinfo/userinfo");
- model.makeNode("/root/temp/userinfo/userinfo");
- model.removeNodeset("/root/temp/userinfo/userinfo/userid");
- model.makeValue("/root/temp/userinfo/userinfo/userid", "");
- model.removeNodeset("/root/temp/userinfo/userinfo/usernm");
- model.makeValue("/root/temp/userinfo/userinfo/usernm", "");
-
- model.setValue("/root/temp/srchinfo/srchid","");
- model.setValue("/root/temp/userinfo/userinfo/usernm", "");
- model.refresh();
- model.setFocus("input1");
- } else {
- model.setValue("/root/temp/srchinfo/srchid","");
-
- //처방리스트 리셋
- model.removeNodeset("/root/main/narclist/narclist");
-
- //model.setFocus("input1");
- model.refresh();
- model.setFocus("input9");
- }
- //} else {
- //messageBox("사용자ID 정보가 다릅니다.\n다시","C001");
- //model.setValue("/root/temp/srchinfo/srchid","");
- //model.setFocus("input1");
- //}
-
- model.refresh();
- }
- /**
- * 약제 담당자 id인지 체크
- **/
- function fChgUserIDPharm() {
- var sUserid = model.getValue("/root/temp/srchinfo/phamid");
- model.setValue("/root/send/userinfo/userid", sUserid);
-
- submit("TRADT30104");
-
- if(model.getValue("/root/temp/userinfo/userinfo/grupjoblncd") != "15"){
- messageBox("약제 담당자 ID가 아닙니다.\n다시","C001");
-
- model.setValue("/root/temp/srchinfo/phamid","");
- model.refresh();
- model.setFocus("input3");
- } else {
- model.setValue("/root/temp/srchinfo/phamid","");
- model.refresh();
- group4.visible = false;
-
- if ( gTimer1 != null ){
- window.clearinterval(gTimer1);
- }
- window.close() ;
- }
- }
- /**
- * 토글클릭시
- */
- function fClickToggle(chk) {
- if(chk == "1"){
- model.setValue("/root/temp/srchinfo/srchroot", "M");
- } else if(chk == "2"){
- model.setValue("/root/temp/srchinfo/srchroot", "R");
- }
- fChgSwitch();
- fGetNarcData();
-
- }
- /**
- * 입원외래구분 클릭시
- */
- function fChgIOFlag() {
- var ioflag = model.getValue("/root/temp/srchinfo/srchioflag");
- if(ioflag == "O"){
- model.setValue("/root/temp/srchinfo/drugflag", "");
- //rdo_drugflag.visible = false;
-
- } else if(ioflag == "I"){
- model.setValue("/root/temp/srchinfo/drugflag", "I");
- //rdo_drugflag.visible = true;
- }
- fChgSwitch();
-
- fGetNarcData();
- }
- /**
- * switch case변경
- */
- function fChgSwitch() {
- var srchroot = model.getValue("/root/temp/srchinfo/srchroot");
- var ioflag = model.getValue("/root/temp/srchinfo/srchioflag");
- var drugflag = model.getValue("/root/temp/srchinfo/drugflag");
- if(srchroot == "M"){
- if(ioflag == "O"){
- model.toggle("case3");
- } else {
- if(drugflag == "L"){
- model.toggle("case3");
- } else {
- model.toggle("case1");
- }
- }
- } else if(srchroot == "R"){
- model.toggle("case2");
- }
- model.refresh();
- }
- /**
- * 환자별 조회인지 체크
- */
- function fChkPatSearch(param_grid) {
- var pid = model.getValue("/root/temp/srchinfo/pid");
- if(pid != "" && param_grid.rows != 0){
- for(var i = param_grid.fixedRows; i < param_grid.rows; i++){
- if(model.getValue("/root/main/narclist/narclist["+i+"]/narcstat") != "1"){
- model.setValue("/root/main/narclist/narclist["+i+"]/sel", "Y");
- }
- }
- model.refresh();
- }
- }
- /**
- * 액팅후 체크표시 cach
- */
- function fChkCash(chk) {
- var pid = model.getValue("/root/temp/srchinfo/pid");
- var param_grid = "";
- if(switch1.selectedIndex == 0){
- param_grid = grd_narclist;
- } else {
- param_grid = grd_outnarc;
- }
-
- if(pid != "" && param_grid.rows != 0){
- if(chk == "before"){
- model.removeNodeset("/root/temp/chkcashinfo/narclist");
- for(var i = param_grid.fixedRows; i < param_grid.rows; i++){
- if(model.getValue("/root/main/narclist/narclist["+i+"]/sel") == "Y"){
- astfCopyNodeSet("/root/temp/chkcashinfo/narclist", "/root/main/narclist/narclist["+i+"]");
- }
- }
- } else if (chk == "after"){
- for(var a = 1; a <= getNodesetCount("/root/temp/chkcashinfo/narclist"); a++){
- var cash_prcpdd = model.getValue("/root/temp/chkcashinfo/narclist["+a+"]/prcpdd");
- var cash_prcpno = model.getValue("/root/temp/chkcashinfo/narclist["+a+"]/prcpno");
- for(var b = param_grid.fixedRows; b < param_grid.rows; b++){
- var search_prcpdd = model.getValue("/root/main/narclist/narclist["+b+"]/prcpdd");
- var search_prcpno = model.getValue("/root/main/narclist/narclist["+b+"]/prcpno");
- if(cash_prcpdd == search_prcpdd && cash_prcpno == search_prcpno){
- model.setValue("/root/main/narclist/narclist["+b+"]/sel", "Y");
- }
- }
- }
- } else {
-
- }
- model.refresh();
- }
- }
- /**
- * 백업해 두었던 노드들을 다시 추가 한다.
- */
- function fSetNarcNodes(pFlag) {
- var iDeleteNode = 0;
- var sChkYn = "";
- var iRowNo = 0;
-
- if(getNodesetCount("/root/temp/bknarclist/narclist") >= 1) {
- if(pFlag == "ADD") {
-
- model.removenode("/root/temp/bknarclist2");
- model.makeNode("/root/temp/bknarclist2");
- model.copyNode("/root/temp/bknarclist2", "/root/main/narclist");
-
- iRowNo = getNodesetCount("/root/main/narclist/narclist");
-
- for(var iRNo = 1 ; iRNo <= getNodesetCount("/root/temp/bknarclist/narclist") ; iRNo++) {
- sChkYn = "Y";
-
- //중복처방은 복사하지 않음.
- for(var iNo = 1 ; iNo <= getNodesetCount("/root/main/narclist/narclist") ; iNo++) {
- if((model.getValue("/root/main/narclist/narclist["+ iNo +"]/prcpdd") == model.getValue("/root/temp/bknarclist/narclist["+ iRNo +"]/prcpdd"))
- && (model.getValue("/root/main/narclist/narclist["+ iNo +"]/prcpno") == model.getValue("/root/temp/bknarclist/narclist["+ iRNo +"]/prcpno"))) {
- sChkYn = "N";
- break;
- }
- }
-
- if(sChkYn == "Y") {
- iRowNo++;
- model.makeNode("/root/temp/bknarclist2/narclist["+ iRowNo +"]");
- model.copyNode("/root/temp/bknarclist2/narclist["+ iRowNo +"]", "/root/temp/bknarclist/narclist["+ iRNo +"]");
- }
- }
- model.copyNode("/root/main/narclist", "/root/temp/bknarclist2");
- model.removenode("/root/temp/bknarclist2");
-
- } if(pFlag == "COPY") {
- model.copyNode("/root/main/narclist", "/root/temp/bknarclist");
- }
-
- }
- model.refresh();
-
- }
|