1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176 |
- <?xml version="1.0" encoding="utf-8"?>
- <Script type="xscript4.0"><![CDATA[/**
- * 파 일 명 : SMADT10200.js
- * 설 명 : 병동 처방전/라벨 출력, 병동 마감 Javascript
- * 설 계 자 : 공두경
- * 작 성 자 : 공두경
- * 수정이력 : 2006.6.28 / 수정작성 / 공두경
- */
- //조회조건에 맞는 데이터가 있는지를 chk
- var chk_drugno = 0;
- var chk_wardcd = 0;
- var chk_pid = 0;
- var chk_prnt_count = 0;
- var chk_sum_count = 0;
- var chk_count = 0;
- var gTimer = 0;
- var gTimer2 = 0;
- var gT1 = null;
- var sleepTime = 1000;
- var chk_cnt = 0;
- var gCurrPrtObj = null; //현재 출력 IViewer
- /****************************************************************************************
- * Argument : N/A
- * Description : 초기화
- ****************************************************************************************/
- function fInit() {
- if (utlf_isNull(ds_hidden_prcpsrch.getColumn(0,"prcpdd"))) {
- // 날짜 초기화
- ds_hidden_srchinfo.setColumn(0,"prcpdd",utlf_getCurrentDate());
- }
- //처방구분 초기화
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "A");
- var oParam = {};
- oParam.id = "TRADT10211";
- oParam.service = "pharmacyprescriptionapp.DrugPrint";
- oParam.method = "reqGetPrcpFlagList";
- oParam.inds = "req=ds_send_suminfo";
- oParam.outds = "ds_init_prcpflaglist_prcpflag=flaglist";
- oParam.async = false;
- //oParam.callback = "cf_TRADT10211";
- tranf_submit(oParam);
-
- var menuparam = frmf_getMenuParam();
- var menuitemcd = sysf_getGlobalVariable("menuitemcd");
- var screenid = frmf_getScreenID();
- var dutplceinstcd = sysf_getUserInfo("dutplceinstcd");
- if(utlf_isNull(dutplceinstcd)){
- dutplceinstcd = "031";
- }
-
-
- //trace("menuitemcd :"+menuitemcd);
-
- //인티맘
- /*
- if ( dutplceinstcd == '031') { //인티팜처방전
- if (menuparam != "P" ) { //인티팜처방전
-
- var aRow = ds_init_prcpflaglist_prcpflag.addRow();
-
- ds_init_prcpflaglist_prcpflag.setColumn(aRow,"flagid","IN");
- ds_init_prcpflaglist_prcpflag.setColumn(aRow,"flagnm","비인티팜");
-
- var aRow = ds_init_prcpflaglist_prcpflag.addRow();
-
- ds_init_prcpflaglist_prcpflag.setColumn(aRow,"flagid","9");
- ds_init_prcpflaglist_prcpflag.setColumn(aRow,"flagnm","코로나생활지원");
-
- var aRow = ds_init_prcpflaglist_prcpflag.addRow();
-
- ds_init_prcpflaglist_prcpflag.setColumn(aRow,"flagid","8");
- ds_init_prcpflaglist_prcpflag.setColumn(aRow,"flagnm","경북대생활관");
-
- }
- } else {
- var aRow = ds_init_prcpflaglist_prcpflag.addRow();
-
- ds_init_prcpflaglist_prcpflag.setColumn(aRow,"flagid","7");
- ds_init_prcpflaglist_prcpflag.setColumn(aRow,"flagnm","7생활치료센터");
- }
- */
- //약주사구분 초기화
- ds_hidden_srchinfo.setColumn(0,"drugkind", "T");
- //라벨 체크 초기화
- ds_hidden_srchinfo.setColumn(0,"lblyn", "L");
- fChkLBL_YN();
-
- //처방전 체크 초기화
- ds_hidden_srchinfo.setColumn(0,"mpsflag", "P");
- //기타조회구분 초기화
- ds_hidden_srchinfo.setColumn(0,"etcflag", "T");
-
- cbx_etcdescflag.enable = false;
-
- //마감시 instcd 적용을 위해 instcd 초기화
- var dutplceinstcd = sysf_getUserInfo("dutplceinstcd");
- if(utlf_isNull(dutplceinstcd)){
- dutplceinstcd = "031";
- }
- ds_hidden_srchinfo.setColumn(0,"instcd", dutplceinstcd);
-
- //병동 Combo 조회
- ds_send_deptinfo.setColumn(0,"deptflag", "W");
-
- var oParam = {};
- oParam.id = "TRADT10203";
- oParam.service = "pharmacyprescriptionapp.DrugPrint";
- oParam.method = "reqGetDeptList";
- oParam.inds = "req=ds_send_deptinfo";
- oParam.outds = "ds_hidden_deptlist_ward=ward";
- oParam.async = false;
- oParam.callback = "cf_TRADT10203";
- tranf_submit(oParam);
-
- dsf_addDsItem(ds_hidden_deptlist_ward,"wardcd","wardnm","전체","T");
-
- //자동출력구분 초기화
- btn_autoprnt_start.enable = true;
- btn_autoprnt_end.enable = false;
-
- //20100412 황세원 수정 병실컬럼
- var oParam = {};
- oParam.id = "TRADT10213";
- oParam.service = "pharmacyprescriptionapp.DrugPrint";
- oParam.method = "reqGetRoomFlag";
- oParam.inds = "";
- oParam.outds = "ds_init_roomyn=roomyn";
- oParam.async = false;
- //oParam.callback = "cf_TRADT10213";
- tranf_submit(oParam);
-
- if(ds_init_roomyn.getColumn(0,"roomyn")=="Y") {
- dsf_makeValue(ds_hidden_srchinfo,"atc3","string","Y");
- grd_patlist.setFormatColProperty(5,"size",70);
- } else {
- dsf_makeValue(ds_hidden_srchinfo,"atc3","string","N");
- grd_patlist.setFormatColProperty(5,"size",0);
- }
-
- //마감시간구분
- var oParam = {};
- oParam.id = "TRADT10212";
- oParam.service = "pharmacyprescriptionapp.DrugPrint";
- oParam.method = "reqGetSumtmFlagList2";
- oParam.inds = "req=ds_send_sumlistinfo";
- oParam.outds = "ds_init_sumtmflaglist_flaglist1=flaglist1 ds_init_sumtmflaglist_flaglist2=flaglist2 ds_init_sumtmflaglist_flaglist3=flaglist3";
- oParam.async = false;
- //oParam.callback = "cf_TRADT10212";
- tranf_submit(oParam);
-
- cmb_sumtmflag1.index = 0;
- cmb_sumtmflag2.index = 0;
- cmb_sumtmflag3.index = 0;
-
- //처방전 감사화면에서 팝업으로 열때 데이터 조회
- if(!utlf_isNull(ds_hidden_popupinfo.getColumn(0,"drugno"))) {
- ds_hidden_srchinfo.setColumn(0,"prcpdd" , ds_hidden_popupinfo.getColumn(0,"prcpdd"));
- ds_hidden_srchinfo.setColumn(0,"fst_drugno" , ds_hidden_popupinfo.getColumn(0,"drugno"));
- ds_hidden_srchinfo.setColumn(0,"pid" , ds_hidden_popupinfo.getColumn(0,"pid"));
- fInSumList();
- }
-
- //바코드프린터설정 초기화
- ds_send.setColumn(0,"scrnid", frmf_getScreenID());
-
- var oParam = {};
- oParam.id = "TRLLC90101";
- oParam.service = "diagtestapplib.LisCommon";
- oParam.method = "reqGetSetUpInfo";
- oParam.inds = "scrnid=ds_send";
- oParam.outds = "ds_main_barcdprntsetup=getSetUpInfo";
- oParam.async = false;
- // oParam.callback = "cf_TRLLC90101";
- tranf_submit(oParam);
- var prntsetupinfo = ds_main_barcdprntsetup.getColumn(0,"prntsetupinfo"); //프린터설정 XML형식
- lf_convertXmlToDs(prntsetupinfo); //XML데이터로 프리터설정 관련 DS생성
-
- var comm = ds_data_comm02.getColumn(0,"comm");
- var prntkind = ds_data_setupinfo.getColumn(0,"prntkind");
-
- if(comm == "2") {
- ds_data_comm02.setColumn(0,"comm", "1");
- }
-
- if(prntkind == "1") {
- ds_data_setupinfo.setColumn(0,"prntkind", "5");
- }
-
- //추가마감시 admission과 병동응급을 함께 마감할지 여부 조회 , ATC순으로 정렬 체크 여부
- //20100405 이선경 추가 : 정제 작은라벨(리스트형식) 출력시 ptp 함께 출력할지 여부
- var oParam = {};
- oParam.id = "TRADT10207";
- oParam.service = "pharmacyprescriptionapp.DrugPrint";
- oParam.method = "reqGetSumPrcpFlagYn";
- oParam.inds = "req=ds_send_suminfo";
- oParam.outds = "ds_init_sumprcpflagyn_flagyn=item";
- oParam.async = false;
- //oParam.callback = "cf_TRADT10207";
- tranf_submit(oParam);
-
- if(ds_init_sumprcpflagyn_flagyn.getColumn(0,"orderbyatc") == "Y") {
- ds_hidden_srchinfo.setColumn(0,"orderbyatc", "Y");
- }
-
- // 출고부서 조회, 설정 2009.09.07 pymi
- var oParam = {};
- oParam.id = "TRADT01106";
- oParam.service = "pharmacyprescriptionapp.DrugPrint";
- oParam.method = "reqGetMisDeptlist";
- oParam.inds = "";
- oParam.outds = "ds_init_misdeptlist_deptlist=deptlist";
- oParam.async = false;
- //oParam.callback = "cf_TRADT01106";
- tranf_submit(oParam);
-
- if(dutplceinstcd == "032" || dutplceinstcd == "031") {
- combo1.index = 0;
- } else {
- combo1.index = 0;
- }
-
- chk_cnt++;
- ds_temp.setColumn(0,"stocdeptcd", ds_hidden_srchinfo.getColumn(0,"stocdeptcd"));
-
- // 2010.03.22 pymi
- var oParam = {};
- oParam.id = "TRADT01107";
- oParam.service = "pharmacyprescriptionapp.DrugPrint";
- oParam.method = "reqGetLblFlag5";
- oParam.inds = "";
- oParam.outds = "ds_init_lbllists=lbllists";
- oParam.async = false;
- //oParam.callback = "cf_TRADT01107";
- tranf_submit(oParam);
-
- ds_hidden_srchinfo.setColumn(0,"lbl5", ds_init_lbllists.getColumn(0,"lbl5"));
- }
- function cf_TRADT10203(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- ds_hidden_deptlist_ward.updateColID("deptcd","wardcd");
- ds_hidden_deptlist_ward.updateColID("deptnm","wardnm");
- }
- /****************************************************************************************
- * Argument : N/A
- * Description : 라벨 변경시 처리
- ****************************************************************************************/
- function fChkLBL_YN() {
- var chk = ds_hidden_srchinfo.getColumn(0,"lblyn");
- var sLbl_Drug = "D|DT|DX|DE|DH";
- var sLbl_Inj = "I|IO|IX|IE|IH|IS"; // 20120628_일반수액도 추가(퇴원의 경우)
-
-
- if(!utlf_isNull(chk)){
- ds_hidden_srchinfo.setColumn(0,"lbl_drug" , sLbl_Drug);
- ds_hidden_srchinfo.setColumn(0,"lbl_inj" , sLbl_Inj);
- ds_hidden_srchinfo.setColumn(0,"drugall" , "Y");
- ds_hidden_srchinfo.setColumn(0,"injall" , "Y");
- } else {
- ds_hidden_srchinfo.setColumn(0,"lbl_drug" , "");
- ds_hidden_srchinfo.setColumn(0,"lbl_inj" , "");
- ds_hidden_srchinfo.setColumn(0,"drugall" , "");
- ds_hidden_srchinfo.setColumn(0,"injall" , "");
- }
- //라벨 출력 형식 옵션
- var oParam = {};
- oParam.id = "TRADT10208";
- oParam.service = "pharmacyprescriptionapp.DrugPrint";
- oParam.method = "reqGetLblType";
- oParam.inds = "req=ds_send_suminfo";
- oParam.outds = "ds_init_lbltype_item=item ds_init_lbltype_item2=item2";
- oParam.async = false;
- //oParam.callback = "cf_TRADT10208";
- tranf_submit(oParam);
-
- if(ds_init_lbltype_item2.getColumn(0,"lbltype") == "Y") {
- checkbox10.visible = true;
- checkbox3.visible = true;
- } else {
- checkbox10.visible = false;
- checkbox3.visible = false;
- }
- }
- /****************************************************************************************
- * Argument : N/A
- * Description : 마감리스트 조회
- ****************************************************************************************/
- function fInSumList() {
- ds_main_sumlist.clearData();
- chk_ward.visible = false;
-
- if(utlf_isNull(ds_hidden_srchinfo.getColumn(0,"prcpflag"))) {
- sysf_messageBox("처방구분을", "C001")
- return;
- }
-
- if(ds_hidden_srchinfo.getColumn(0,"prcpflag").indexOf("Z") >= 0 && ds_hidden_srchinfo.getColumn(0,"prcpflag").length > 1){
- sysf_messageBox("처방구분 '정규약(508응급병동)'을 중복 선택할 수 없습니다.", "C");
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "");
- rdo_prcp.setCheckAll(false,false);
- rdo_prcp2.setCheckAll(false,false);
- return;
- }
-
- prcpflag = ds_hidden_srchinfo.getColumn(0,"prcpflag");
- ds_send_suminfo.setColumn(0,"prcpflag", prcpflag);
- ds_send_sumlistinfo.copyData(ds_hidden_srchinfo);
- dsf_makeValue(ds_send_sumlistinfo,"version","string","new");
-
- //20100301 이선경 수정 : 자동라벨출력시 라벨그룹별로 마감대상 조회되도록
- if(ds_hidden_srchinfo.getColumn(0,"autolblyn") == "Y") {
- var lblstr = ds_hidden_srchinfo.getColumn(0,"autolblflag");
- var lblstr2 = lblstr.setReplaceWord("AD", "D|DX|DH|DP");
- lblstr2 = lblstr2.setReplaceWord("AI", "I|IO|IX|IH|IS"); // 20120628_일반수액도 추가(퇴원의 경우)
- dsf_makeValue(ds_send_sumlistinfo,"autolblflag","string",lblstr2);
- }
-
- var oParam = {};
- oParam.id = "TRADT10201";
- oParam.service = "pharmacyprescriptionapp.DrugPrint";
- oParam.method = "reqGetInSumList";
- oParam.inds = "req=ds_send_sumlistinfo";
- oParam.outds = "ds_main_sumlist=sumlist";
- oParam.async = false;
- oParam.callback = "cf_TRADT10201";
- tranf_submit(oParam);
-
- // grd_sumlist.isSelected(grd_sumlist.fixedRows) = true;
- // grd_sumlist.row = grd_sumlist.fixedRows;
- if(ds_main_sumlist.rowcount > 0){ //20100210 이선경 주석 : 마감일자를 체크해서 조회하도록 함
- ds_main_sumlist.setColumn(0,"sel", "Y");
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
- } else {
- ds_main_patlist.clearData();
- }
- }
- function cf_TRADT10201(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- ds_main_sumlist.addColumn("sel","string");
- }
- /****************************************************************************************
- * Argument : N/A
- * Description : 병동 마감
- ****************************************************************************************/
- function fHosInSum(chk, auto) {
- var prcpflag = "";
- var prcpdd = ds_hidden_srchinfo.getColumn(0,"prcpdd");
- var instcd = ds_hidden_srchinfo.getColumn(0,"instcd");
- var pid = ds_hidden_srchinfo.getColumn(0,"pid");
- var drugkind = ds_hidden_srchinfo.getColumn(0,"drugkind");
- var onlyantis = ds_hidden_srchinfo.getColumn(0,"onlyantis");
- var prcpflagnm = String(rdo_prcp.getLableData()).replace(","," ");
- var chkret = 0;
- var fromddflag = "";
- var fromdd = "";
- var fromtm = "";
- var toddflag = "";
- var todd = "";
- var totm = "";
- var sumdt = utlf_getCurrentDateTime().replace(" ", "");
-
- prcpflag = ds_hidden_srchinfo.getColumn(0,"prcpflag");
-
- if(chk == "Y") {
- if(prcpflag == "R") {//정규마감구분
- fromddflag = ds_hidden_srchinfo.getColumn(0,"fromddflag1");
- fromtm = ds_hidden_srchinfo.getColumn(0,"fromtm1");
- toddflag = ds_hidden_srchinfo.getColumn(0,"toddflag1");
- totm = ds_hidden_srchinfo.getColumn(0,"totm1");
- } else if(prcpflag == "Z") {//정규약(508응급병동)
- fromddflag = ds_hidden_srchinfo.getColumn(0,"fromddflag1");
- fromtm = ds_hidden_srchinfo.getColumn(0,"fromtm1");
- toddflag = ds_hidden_srchinfo.getColumn(0,"toddflag1");
- totm = ds_hidden_srchinfo.getColumn(0,"totm1");
- } else if(prcpflag == "A") {//추가마감구분
- fromddflag = ds_hidden_srchinfo.getColumn(0,"fromddflag2");
- fromtm = ds_hidden_srchinfo.getColumn(0,"fromtm2");
- toddflag = ds_hidden_srchinfo.getColumn(0,"toddflag2");
- totm = ds_hidden_srchinfo.getColumn(0,"totm2");
- } else if(prcpflag == "K") {// 응급실마감구분
- fromddflag = ds_hidden_srchinfo.getColumn(0,"fromddflag3");
- fromtm = ds_hidden_srchinfo.getColumn(0,"fromtm3");
- toddflag = ds_hidden_srchinfo.getColumn(0,"toddflag3");
- totm = ds_hidden_srchinfo.getColumn(0,"totm3");
- }
-
- if ( prcpflag =="R" || prcpflag =="Z" || prcpflag =="A" || prcpflag == "K"){
- if( utlf_isNull(fromddflag) || utlf_isNull(fromtm) || utlf_isNull(toddflag) || utlf_isNull(totm) || fromtm.length != 4 || totm.length != 4) {
- sysf_messageBox("마감구분이 잘못", "E005");
- return;
- } else {
- if(fromddflag == "0") {
- fromdd = ((prcpdd.toDate("YYYYMMDD")).getAddDate(-1,"D")).getDateFormat("YYYYMMDD") ;
- } else {
- fromdd = prcpdd ;
- }
-
- if(toddflag == "0") {
- todd = ((prcpdd.toDate("YYYYMMDD")).getAddDate(-1,"D")).getDateFormat("YYYYMMDD") ;
- } else {
- todd = prcpdd ;
- }
-
- fromtm = fromtm + "00";
- totm = totm + "59";
- }
- } else {
- fromdd = "" ;
- todd = "" ;
- fromtm = "";
- totm = "";
- }
-
- chkret = 6 ; //sysf_messageBox(prcpflagnm + "마감을", "Q004");
- } else {
- if (prcpflag == "Z" && chk == "N" && auto == "auto") {
- fromdd = ((prcpdd.toDate("YYYYMMDD")).getAddDate(-1,"D")).getDateFormat("YYYYMMDD");
- fromtm = "030000";
- todd = prcpdd;
- totm = "235959";
- //멀티데이 처방 출력시 업무 알아봐야 함
- }
-
- chkret = 6;
- }
-
- if(chkret == 6){
-
- if(ds_hidden_srchinfo.getColumn(0,"prcpflag") != "C2") {
- if(chk == "Y") {
- ds_send_suminfo.setColumn(0,"fromdd", fromdd);
- ds_send_suminfo.setColumn(0,"fromtm", fromtm);
- ds_send_suminfo.setColumn(0,"todd", todd);
- ds_send_suminfo.setColumn(0,"totm", totm);
- } else {
- if (prcpflag == "Z") {
- ds_send_suminfo.setColumn(0,"fromdd", fromdd);
- ds_send_suminfo.setColumn(0,"fromtm", fromtm);
- ds_send_suminfo.setColumn(0,"todd", todd);
- ds_send_suminfo.setColumn(0,"totm", totm);
- } else {
- ds_send_suminfo.setColumn(0,"fromdd", "");
- ds_send_suminfo.setColumn(0,"fromtm", "");
- ds_send_suminfo.setColumn(0,"todd", "");
- ds_send_suminfo.setColumn(0,"totm", "");
- }
- }
-
- ds_send_suminfo.setColumn(0,"sumdt", sumdt);
- ds_send_suminfo.setColumn(0,"prcpdd", prcpdd);
- ds_send_suminfo.setColumn(0,"prcpflag", prcpflag);
- ds_send_suminfo.setColumn(0,"instcd", instcd);
- ds_send_suminfo.setColumn(0,"pid", pid);
- ds_send_suminfo.setColumn(0,"sumdrugkind", drugkind);
- ds_send_suminfo.setColumn(0,"onlyantis", onlyantis);
- ds_send_suminfo.setColumn(0,"mstocdeptcd", ds_hidden_srchinfo.getColumn(0,"stocdeptcd")); // 2009.09.11 pymi
- ds_send_suminfo.setColumn(0,"ioflag", "I");
-
- dsf_makeValue(ds_send_suminfo,"multiyn","string",ds_hidden_srchinfo.getColumn(0,"multiyn")); //multi day 처방 포함 여부
- dsf_makeValue(ds_send_suminfo,"dinjyn","string",ds_hidden_srchinfo.getColumn(0,"dinjyn")); // 20121120_항암주사실 제외 여부
-
- var dinjonlyyn = ds_hidden_srchinfo.getColumn(0,"dinjonlyyn"); // 20121120_항암주사실만 여부
-
- if(prcpflag == "A" || prcpflag == "R") { //20110102 이선경 수정 : 경북대병원 병동별로 마감호출( 약번호 순서 : 병동, 파우더, 등록번호)
- if(dinjonlyyn == "Y") {
- dsf_makeValue(ds_send_suminfo,"wardcd","string", "3120900000"); // 20121121_항암주사실만 체크 시 항암주사실만 마감 되도록 수정
- call_TXADT10201();
- } else {
- for(var i = 1 ; i < ds_hidden_deptlist_ward.rowcount ; i++) { //전체 제외
- dsf_makeValue(ds_send_suminfo,"wardcd","string",ds_hidden_deptlist_ward.getColumn(i,"wardcd"));
- call_TXADT10201();
- }
- }
- } else if(prcpflag == "K") { // 20120519_laboru
- call_TXADT10201();
- } else {
- call_TXADT10201();
- }
-
- if (ds_hidden_srchinfo.getColumn(0,"prcpflag")=="L" || ds_hidden_srchinfo.getColumn(0,"prcpflag")=="G" ) {
- ds_send_suminfo.setColumn(0,"prcpdd", prcpdd);
- ds_send_suminfo.setColumn(0,"prcpflag", prcpflag);
- ds_send_suminfo.setColumn(0,"instcd", instcd);
- ds_send_suminfo.setColumn(0,"pid", pid);
- ds_send_suminfo.setColumn(0,"ioflag", "O");
-
- for(var i = 0 ; i < 5; i++) {
- call_TXADT10201();
- }
- }
- if(prcpflag =="J") {
- call_TXADT10201();
- }
- }
-
- //20100818 이선경 : 임상연구 일반약 80000번대로 마감
- dsf_makeValue(ds_send_srchinfo,"srchprcpdd","string", ds_hidden_srchinfo.getColumn(0,"prcpdd"));
- dsf_makeValue(ds_send_srchinfo,"crsumflag","string", "N");
- dsf_makeValue(ds_send_srchinfo,"orgdrugflag","string", ds_hidden_srchinfo.getColumn(0,"prcpflag"));
- dsf_makeValue(ds_send_srchinfo,"sumdt","string", sumdt);
-
- var drugkind = ds_hidden_srchinfo.getColumn(0,"drugkind");
- if(ds_hidden_srchinfo.getColumn(0,"prcpflag") != "C2") {
- if(ds_hidden_srchinfo.getColumn(0,"prcpflag") != "L" && ds_hidden_srchinfo.getColumn(0,"prcpflag") !="G") {
- if(drugkind == "T") {
- //주사 마감
- dsf_makeValue(ds_send_srchinfo,"crdrugkind","string", "M");
- call_TXADC10902();
- //약 마감
- dsf_makeValue(ds_send_srchinfo,"crdrugkind","string", "D");
- call_TXADC10902();
- } else if(drugkind == "D") {
- //약 마감
- dsf_makeValue(ds_send_srchinfo,"crdrugkind","string", "D");
- call_TXADC10902();
- } else if(drugkind == "M") {
- //주사 마감
- dsf_makeValue(ds_send_srchinfo,"crdrugkind","string", "M");
- call_TXADC10902();
- }
- } else {
- dsf_makeValue(ds_send_srchinfo,"crdrugkind","string", "");
- call_TXADC10902();
- }
- }
- //20100831 이선경 추가 : 임상연구 일반약 외래주사 마감 기능 추가
- if((auto != "auto" && utlf_isSearchString(ds_hidden_srchinfo.getColumn(0,"prcpflag"), "C2"))|| (auto == "auto" && utlf_isSearchString(ds_hidden_srchinfo.getColumn(0,"autoprntflag"), "C2")) ) {
- dsf_makeValue(ds_send_srchinfo,"srchprcpdd","string", ds_hidden_srchinfo.getColumn(0,"prcpdd"));
- dsf_makeValue(ds_send_srchinfo,"crsumflag","string", "I");
- dsf_makeValue(ds_send_srchinfo,"hosinhosout","string", "I"); //원내
- //외래임상약 마감하는 것과 동일 소스임 (수정시 주의)
- dsf_makeValue(ds_send_srchinfo,"prcpdd","string", ds_send_srchinfo.getColumn(0,"srchprcpdd"));
- var oParam = {};
- oParam.id = "TXADC10901";
- oParam.service = "pharmacyprescriptionapp.DrugAccept";
- oParam.method = "reqExeOutCrSum";
- oParam.inds = "req=ds_send_srchinfo";
- oParam.outds = "ds_temp_ret=result";
- oParam.async = false;
- //oParam.callback = "cf_TXADC10901";
- tranf_submit(oParam);
- }
- }
- }
- function call_TXADT10201() {
- dsf_setDefaultVal(ds_send_suminfo, "ioflag:I");
-
- var oParam = {};
- oParam.id = "TXADT10201";
- oParam.service = "pharmacyprescriptionapp.DrugAccept";
- oParam.method = "reqExeInSum";
- oParam.inds = "req=ds_send_suminfo";
- oParam.outds = "ds_main_sumrslt=result";
- oParam.async = false;
- //oParam.callback = "cf_TXADT10201";
- tranf_submit(oParam);
- }
- function call_TXADC10902() {
- dsf_createDsRow("ds_req", [
- {col:"prcpdd", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchprcpdd")}
- ]);
- var oParam = {};
- oParam.id = "TXADC10902";
- oParam.service = "pharmacyprescriptionapp.DrugAccept";
- oParam.method = "reqExeInCrSum";
- oParam.inds = "req=ds_req";
- oParam.outds = "ds_temp_ret=result";
- oParam.async = false;
- //oParam.callback = "cf_TXADC10902";
- tranf_submit(oParam);
- }
- /****************************************************************************************
- * Argument : N/A
- * Description : 마감리스트 더블클릭시 출력할 환자리스트 조회
- ****************************************************************************************/
- function fPrntPatList() {
- ds_main_patlist.clearData();
- ds_send_patlistinfo.clear();
- //20100210 이선경 수정 : 마감일자 멀티체크 조회 가능하도록 함
- var strsumdt = "";
- for(var i = 0 ; i < ds_main_sumlist.rowcount ; i++) {
- if(ds_main_sumlist.getColumn(i,"sel") == "Y") {
- if(ds_send_patlistinfo.rowcount < 1) {
- dsf_copyColInfo(ds_send_patlistinfo,ds_main_sumlist);
- ds_send_patlistinfo.addRow();
- }
-
- ds_send_patlistinfo.copyRow(0,ds_main_sumlist,i);
- dsf_makeValue(ds_send_patlistinfo,"prcpdd" , "string", ds_hidden_srchinfo.getColumn(0,"prcpdd"));
- dsf_makeValue(ds_send_patlistinfo,"fst_drugno" , "string", ds_hidden_srchinfo.getColumn(0,"fst_drugno"));
- dsf_makeValue(ds_send_patlistinfo,"last_drugno" , "string", ds_hidden_srchinfo.getColumn(0,"last_drugno"));
- dsf_makeValue(ds_send_patlistinfo,"wardcd" , "string", ds_hidden_srchinfo.getColumn(0,"wardcd"));
- dsf_makeValue(ds_send_patlistinfo,"pid" , "string", ds_hidden_srchinfo.getColumn(0,"pid"));
- dsf_makeValue(ds_send_patlistinfo,"autoprntflag", "string", ds_hidden_srchinfo.getColumn(0,"autoprntflag"));
- dsf_makeValue(ds_send_patlistinfo,"etcdescflag" , "string", ds_hidden_srchinfo.getColumn(0,"etcdescflag"));
- dsf_makeValue(ds_send_patlistinfo,"prntkind" , "string", ds_hidden_srchinfo.getColumn(0,"prntkind"));
- dsf_makeValue(ds_send_patlistinfo,"autolblyn" , "string", ds_hidden_srchinfo.getColumn(0,"autolblyn"));
- dsf_makeValue(ds_send_patlistinfo,"prcpflag" , "string", ds_hidden_srchinfo.getColumn(0,"prcpflag"));
- dsf_makeValue(ds_send_patlistinfo,"orderbyatc" , "string", ds_hidden_srchinfo.getColumn(0,"orderbyatc"));
- dsf_makeValue(ds_send_patlistinfo,"instcd" , "string", ds_hidden_srchinfo.getColumn(0,"instcd"));
- dsf_makeValue(ds_send_patlistinfo,"atc3" , "string", ds_hidden_srchinfo.getColumn(0,"atc3"));
- dsf_makeValue(ds_send_patlistinfo,"autoyn" , "string", ds_hidden_srchinfo.getColumn(0,"autoyn"));
- dsf_makeValue(ds_send_patlistinfo,"version" , "string", "new");
-
- strsumdt = strsumdt + " " + ds_main_sumlist.getColumn(i,"sumdt");
- }
- }
-
- dsf_makeValue(ds_send_patlistinfo,"sumdt" ,"string", strsumdt);
- // 20121121_항암주사실 여부
- dsf_makeValue(ds_send_patlistinfo,"dinjyn" ,"string", ds_hidden_srchinfo.getColumn(0,"dinjyn"));
- dsf_makeValue(ds_send_patlistinfo,"dinjonlyyn" ,"string", ds_hidden_srchinfo.getColumn(0,"dinjonlyyn"));
- if(!utlf_isNull(strsumdt)) {
- var oParam = {};
- oParam.id = "TRADT10202";
- oParam.service = "pharmacyprescriptionapp.DrugPrint";
- oParam.method = "reqGetInPatList";
- oParam.inds = "req=ds_send_patlistinfo";
- oParam.outds = "ds_main_patlist=patlist";
- oParam.async = false;
- oParam.callback = "cf_TRADT10202";
- tranf_submit(oParam);
- }
-
- if(!utlf_isNull(ds_hidden_srchinfo.getColumn(0,"fst_drugno")) && ds_main_patlist.rowcount > 0) {
- ds_main_patlist.setColumn(0,"sel", "Y");
- }
- }
- function cf_TRADT10202(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- ds_main_patlist.addColumn("sel","string");
- }
- /****************************************************************************************
- * Argument : autoflag : M(수동출력), A(자동출력)
- * : prntflag : mps(처방전자동출력), lbl(라벨자동출력)
- * Description : 처방전/라벨 출력
- ****************************************************************************************/
- function fPrcpMPSPrint( autoflag, prntflag ) {
- //투약번호로 출력
- var oRptViewer = "";
- var sDrugNo = ds_hidden_srchinfo.getColumn(0,"fst_drugno");
- sleepTime = ds_hidden.getColumn(0,"sleeptime") * 1000;
- chk_prnt_count = 0;
-
- //수동출력
- var chk_mpsflag = ds_hidden_srchinfo.getColumn(0,"mpsflag");
- var chk_lblyn = ds_hidden_srchinfo.getColumn(0,"lblyn");
- var chk_patlbl = ds_hidden_srchinfo.getColumn(0,"namecard");
-
- //자동출력
- var chk_autokindflag = ds_hidden_srchinfo.getColumn(0,"autokind");
- var chk_autolblyn = ds_hidden_srchinfo.getColumn(0,"autolblsize");
- //처방전 출력 데이터 조회
- if(autoflag =="M") {//수동출력
- var cnt = 0;
- for(var i = 0; i < ds_main_patlist.rowcount; i++) {
- if(ds_main_patlist.getColumn(i,"sel") == "Y"){
- cnt++ ;
- }
- }
-
- if( cnt == 0){
- sysf_messageBox("처방전을 출력할 환자리스트가 없거나 선택된 환자가", "I004");
- }
- }
-
- for(var i = 0; i < ds_main_patlist.rowcount; i++){
- if(ds_main_patlist.getColumn(i,"sel") == "Y"){
- ds_send_prcpinfo.clear();
- dsf_copyColInfo(ds_send_prcpinfo,ds_main_patlist);
- var nRow = ds_send_prcpinfo.addRow();
- ds_send_prcpinfo.copyRow(nRow,ds_main_patlist,i);
-
- if(autoflag == "M"){
- //20100315 이선경 수정 : prcpflag의 멀티체크가 가능하기때문에 patlist 조회된 환자 각각의 drugflag 값을 보내도록
- dsf_makeValue(ds_send_prcpinfo,"prcpflag","string", ds_send_prcpinfo.getColumn(0,"drugflag"));
- dsf_makeValue(ds_send_prcpinfo,"reprintyn","string", ds_hidden_srchinfo.getColumn(0,"reprintyn"));
- } else if(autoflag == "A") {
- //20100414 이선경 수정 : patlist 조회된 환자 각각의 drugflag 값을 보내도록
- dsf_makeValue(ds_send_prcpinfo,"prcpflag","string", ds_send_prcpinfo.getColumn(0,"drugflag"));
- }
-
- dsf_makeValue(ds_send_prcpinfo,"prntflag","string", ds_hidden_srchinfo.getColumn(0,"prntflag"));
- dsf_makeValue(ds_send_prcpinfo,"ioflag","string", "I");
-
- var drugno = ds_send_prcpinfo.getColumn(0,"drugno");
- var wardcd = ds_send_prcpinfo.getColumn(0,"wardcd");
- var pid = ds_send_prcpinfo.getColumn(0,"pid");
- //trace("병동처방전 출력 순서 // rowno : "+i+" / drugno : "+drugno+" / wardcd : "+wardcd+" / pid : "+pid);
- if(autoflag =="M" ) {//수동출력
- if (!utlf_isNull(chk_mpsflag)){
- //처방전 출력
- fHosInMPSPrint();
- }
-
- if(!utlf_isNull(chk_lblyn)) {
- //라벨수동출력
- //trace("병동 라벨 수동 출력 순서 // rowno : "+i+" / drugno : "+drugno+" / wardcd : "+wardcd+" / pid : "+pid);
- fPrcpLBLPrint("M");
- }
-
- if (!utlf_isNull(chk_patlbl)) {
- //네임카드 출력
- oRptViewer += "report_"+i+"|";
- fPatLblPrint("report_"+i);
- }
- } else if(autoflag == "A"){ //자동출력
- if (prntflag == "mps" ){
- //처방전 출력
- fHosInMPSPrint();
- }
- if(prntflag == "lbl") {
- //라벨자동출력
- trace("병동 라벨 자동 출력 순서 // rowno : "+i+" / drugno : "+drugno+" / wardcd : "+wardcd+" / pid : "+pid);
- fPrcpLBLPrint("A");
- }
- }
-
- // if (ds_hidden_srchinfo.getColumn(0,"autoyn") != "Y") {
- // //출력상태 표시
- // for ( var j = 0 ; j < grd_patlist.cols -1; j++){
- // grd_patlist.cellStyle("background-color", i, j) = "#cfffcf";
- // //grd_patlist.cellStyle("font-weight", i, j) = "bold";
- // }
- // grd_patlist.refresh();
- // }
- dsf_makeValue(ds_main_patlist,"prntynnow","string","Y",i); //출력이 이뤄진 항목 표시
- }
-
- ds_send_atcinfo.setColumn(0,"drugdd", ds_hidden_srchinfo.getColumn(0,"prcpdd"));
- if ( ds_hidden_srchinfo.getColumn(0,"prcpflag") == "L" ) {
- ds_send_atcinfo.setColumn(0,"drugflag", "L");
- } else if ( ds_hidden_srchinfo.getColumn(0,"prcpflag") == "E" ) {
- ds_send_atcinfo.setColumn(0,"drugflag", "E");
- } else {
- ds_send_atcinfo.setColumn(0,"drugflag", "I");
- }
-
- if ( ds_hidden_srchinfo.getColumn(0,"autoatcyn") == "Y" ) {
- ds_send_atcinfo.setColumn(0,"instcd", ds_hidden_srchinfo.getColumn(0,"instcd"));
- //ATC Data 전송(배치호출)
- call_TXADT10202();
- }
- }
-
- //cleaniViewer(oRptViewer);
- }
- function call_TXADT10202() {
- var oParam = {};
- oParam.id = "TXADT10202";
- oParam.service = "pharmacyprescriptionapp.DrugAccept";
- oParam.method = "reqExeDrugATC";
- oParam.inds = "req=ds_send_atcinfo";
- oParam.outds = "ds_temp_ret=result";
- oParam.async = false;
- //oParam.callback = "cf_TXADT10202";
- tranf_submit(oParam);
- }
- /****************************************************************************************
- * Argument : flag
- * Description : 라벨출력
- ****************************************************************************************/
- function fPrcpLBLPrint(flag) {
- var lblitem = null; //라벨구분
- var lblstr = "";
- var lblsize = ""; //라벨출력크기
- var lblgrupAD = "N"; //정제라벨 체크여부
- var lblgrupDT = "N"; //PTP라벨 체크여부
-
- if(flag == "A") {//자동출력
- lblstr = utlf_transNullToEmpty(ds_hidden_srchinfo.getColumn(0,"autolblflag"));
- lblitem = utlf_transNullToEmpty(ds_hidden_srchinfo.getColumn(0,"autolblflag")).split("|");
- lblsize = utlf_transNullToEmpty(ds_hidden_srchinfo.getColumn(0,"autolblsize"));
-
- if(lblstr.indexOf("AD") >= 0){
- lblgrupAD = "Y";
- }
- if(lblstr.indexOf("DT") >= 0){
- lblgrupDT = "Y";
- }
- } else if(flag == "M") {//수동출력
- lblstr = ds_hidden_srchinfo.getColumn(0,"manllblflag");
- lblitem = utlf_transNullToEmpty(ds_hidden_srchinfo.getColumn(0,"manllblflag")).split("|");
- lblsize = ds_hidden_srchinfo.getColumn(0,"lblsizeflag");
-
- if(lblstr.indexOf("AD") >= 0){
- lblgrupAD = "Y";
- }
- if(lblstr.indexOf("DT") >= 0){
- lblgrupDT = "Y";
- }
- }
-
- // 20101221_laboru_라벨 출력은 팝업으로 함.
- // ds_hidden_srchinfo.setColumn(0,"flagtmp", flag);
- dsf_makeValue(ds_hidden_srchinfo,"flagtmp", "string", flag);
- dsf_makeValue(ds_send_prcpinfo,"etcdescflag", "string", ds_hidden_srchinfo.getColumn(0,"etcdescflag"));
- dsf_makeValue(ds_send_prcpinfo,"lblkind", "string", ds_hidden_srchinfo.getColumn(0,"lblkind"));
- dsf_makeValue(ds_send_prcpinfo,"lbltype", "string", ds_init_lbltype_item.getColumn(0,"lbltype"));
- dsf_makeValue(ds_send_prcpinfo,"drugkind", "string", ds_hidden_srchinfo.getColumn(0,"drugkind"));
- dsf_makeValue(ds_send_prcpinfo,"autoyn", "string", ds_hidden_srchinfo.getColumn(0,"autoyn"));
-
- //dsf_makeValue(ds_send_prcpinfo,"prcpliflag", "string", ds_hidden_srchinfo.getColumn(0,"prcpflag")); // 20120621_제한항생제 승인 처방 라벨 출력위해
- //2016.12.25 Shaun 제한항생제 체크.
- if (ds_hidden_srchinfo.getColumn(0,"prcpflag").indexOf("B") >=0 ){
- //sysf_trace("라벨출력 : " + ds_hidden_srchinfo.getColumn(0,"prcpflag").indexOf("B"));
- dsf_makeValue(ds_send_prcpinfo,"prcpliflag", "string", "B");
- }
-
- dsf_makeValue(ds_send_prcpinfo,"version", "string", "new");
-
- if(ds_send_suminfo.getColumn(0,"intiflag") == "N") {
- dsf_makeValue(ds_send_prcpinfo,"intiflag", "string", "Y"); // 20120417_laboru_인티팜 여부 추가
- }
- // 20101222_laboru_경북대병원_경대 본원 라벨(큰라벨 2)
- if(lblsize == "L" || lblsize == "L1" ) {//자동출력에 큰라벨 출력이면 환자별로 한꺼번에 뽑아야 라벨총장수와 페이지 번호 찍음
- var lblstr2 = lblstr.setReplaceWord("AD", "D|DX|DH|DP");
- lblstr2 = lblstr2.setReplaceWord("AI", "I|IO|IX|IH|IS"); // 20120628_일반수액도 추가(퇴원의 경우)
-
- dsf_makeValue(ds_send_prcpinfo,"lblflag", "string", lblstr2);
- dsf_makeValue(ds_send_prcpinfo,"lblsizeflag", "string", "L");
- // 20101221_laboru_라벨 출력은 팝업으로 함.
- // modal("SPADT62302", 1, 0, 0, "SPADT62302", "/root", "/root", "left:0px; top:0px; width:0px; height:0px; sysmenu:hidden; min:hidden; max:hidden; caption:hidden;", "false", "x");
- lf_openRexLabel();
- } else if(lblsize == "S") {
- dsf_makeValue(ds_send_prcpinfo,"lblsizeflag", "string", "S");
- for (var i = 0; i < lblitem.length; i++) {
- //20101221_laboru_lblitem 을 팝업창으로 넘기기.
- // ds_hidden_srchinfo.setColumn(0,"tmplblitem", lblitem[i]);
- dsf_makeValue(ds_hidden_srchinfo,"tmplblitem","string",lblitem[i]);
- //정제
- if (lblitem[i]=="AD"){
- //20100405 이선경 추가 : 라벨그룹의 PTP가 체크되어 있고 정제 작은라벨(리스트형식) 출력시 ptp 함께 출력하는 옵션일때 PTP함께 출력
- if(lblgrupDT == "Y" && ds_init_sumprcpflagyn_flagyn.getColumn(0,"lbl6yn") == "Y") {
- dsf_makeValue(ds_send_prcpinfo,"lblflag", "string", "D|DX|DH|DP|DT");
- } else {
- dsf_makeValue(ds_send_prcpinfo,"lblflag", "string", "D|DX|DH|DP");
- }
- // 20101221_laboru_라벨 출력은 팝업으로 함.
- // modal("SPADT62302", 1, 0, 0, "SPADT62302", "/root", "/root", "left:0px; top:0px; width:0px; height:0px; sysmenu:hidden; min:hidden; max:hidden; caption:hidden;", "false", "x");
- lf_openRexLabel();
- }
- //주사
- if (lblitem[i]=="AI"){
- dsf_makeValue(ds_send_prcpinfo,"lblflag", "string", "I|IO|IX|IH|IS"); // 20120628_일반수액도 추가(퇴원의 경우)
- // 20101221_laboru_라벨 출력은 팝업으로 함.
- // modal("SPADT62302", 1, 0, 0, "SPADT62302", "/root", "/root", "left:0px; top:0px; width:0px; height:0px; sysmenu:hidden; min:hidden; max:hidden; caption:hidden;", "false", "x");
- lf_openRexLabel();
- }
- //PTP
- if (lblitem[i]=="DT"){
- dsf_makeValue(ds_send_prcpinfo,"lblflag", "string", "DT");
- //20100405 이선경 추가 : 라벨그룹의 정제가 체크되어 있고 정제 작은라벨(리스트형식) 출력시 ptp 함께 출력하는 옵션일때 출력안함
- if(lblgrupAD == "N" || ds_init_sumprcpflagyn_flagyn.getColumn(0,"lbl6yn") != "Y") {
- // 20101221_laboru_라벨 출력은 팝업으로 함.
- // modal("SPADT62302", 1, 0, 0, "SPADT62302", "/root", "/root", "left:0px; top:0px; width:0px; height:0px; sysmenu:hidden; min:hidden; max:hidden; caption:hidden;", "false", "x");
- lf_openRexLabel();
- }
- }
- //외용
- if (lblitem[i]=="DI"){
- dsf_makeValue(ds_send_prcpinfo,"lblflag", "string", "DI");
- // 20101221_laboru_라벨 출력은 팝업으로 함.
- // modal("SPADT62302", 1, 0, 0, "SPADT62302", "/root", "/root", "left:0px; top:0px; width:0px; height:0px; sysmenu:hidden; min:hidden; max:hidden; caption:hidden;", "false", "x");
- lf_openRexLabel();
- }
- //수제
- if (lblitem[i]=="DS"){
- dsf_makeValue(ds_send_prcpinfo,"lblflag", "string", "DS");
- // 20101221_laboru_라벨 출력은 팝업으로 함.
- // modal("SPADT62302", 1, 0, 0, "SPADT62302", "/root", "/root", "left:0px; top:0px; width:0px; height:0px; sysmenu:hidden; min:hidden; max:hidden; caption:hidden;", "false", "x");
- lf_openRexLabel();
- }
- //PACK 20110922_laboru_pack 도 작은 라벨로 출력 가능하게 수정
- if (lblitem[i]=="DG"){
- dsf_makeValue(ds_send_prcpinfo,"lblflag", "string", "DG");
- // 20101221_laboru_라벨 출력은 팝업으로 함.
- // modal("SPADT62302", 1, 0, 0, "SPADT62302", "/root", "/root", "left:0px; top:0px; width:0px; height:0px; sysmenu:hidden; min:hidden; max:hidden; caption:hidden;", "false", "x");
- lf_openRexLabel();
- }
- //PTP단독처방
- if (lblitem[i]=="PTS"){
- dsf_makeValue(ds_send_prcpinfo,"lblflag", "string", "PTS");
- // 20101221_laboru_라벨 출력은 팝업으로 함.
- //modal("SPADT62302", 1, 0, 0, "SPADT62302", "/root", "/root", "left:0px; top:0px; width:0px; height:0px; sysmenu:hidden; min:hidden; max:hidden; caption:hidden;", "false", "x");
- lf_openRexLabel();
- }
- //산제용법별
- if (lblitem[i]=="DP"){
- dsf_makeValue(ds_send_prcpinfo,"lblflag", "string", "DP");
- // 20101221_laboru_라벨 출력은 팝업으로 함.
- // modal("SPADT62302", 1, 0, 0, "SPADT62302", "/root", "/root", "left:0px; top:0px; width:0px; height:0px; sysmenu:hidden; min:hidden; max:hidden; caption:hidden;", "false", "x");
- lf_openRexLabel();
- }
-
- //2010-06-29 [보관방법:냉장주사] 단독출력
- if (lblitem[i]=="LBL_INJ_I"){
- dsf_makeValue(ds_send_prcpinfo,"lblflag", "string", "LBL_INJ_I");
- // 20101221_laboru_라벨 출력은 팝업으로 함.
- // modal("SPADT62302", 1, 0, 0, "SPADT62302", "/root", "/root", "left:0px; top:0px; width:0px; height:0px; sysmenu:hidden; min:hidden; max:hidden; caption:hidden;", "false", "x");
- lf_openRexLabel();
- }
- //2010-06-29 [보관방법:고위험주사] 단독출력
- if (lblitem[i]=="LBL_INJ_D"){
- dsf_makeValue(ds_send_prcpinfo,"lblflag", "string", "LBL_INJ_D");
- // 20101221_laboru_라벨 출력은 팝업으로 함.
- // modal("SPADT62302", 1, 0, 0, "SPADT62302", "/root", "/root", "left:0px; top:0px; width:0px; height:0px; sysmenu:hidden; min:hidden; max:hidden; caption:hidden;", "false", "x");
- lf_openRexLabel();
- }
- }
- }
- }
- /****************************************************************************************
- * Argument : N/A
- * Description : 병동라벨렉스퍼트 출력화면 오픈
- ****************************************************************************************/
- function lf_openRexLabel() {
- ds_init_barcdprntsetup.copyData(ds_main_barcdprntsetup);
- var objArg = new Object();
- objArg.arg_ds_init_barcdprntsetup = ds_init_barcdprntsetup;
- objArg.arg_ds_send_prcpinfo = ds_send_prcpinfo;
- objArg.arg_ds_hidden_srchinfo = ds_hidden_srchinfo;
- objArg.arg_ds_init_sumprcpflagyn_flagyn = ds_init_sumprcpflagyn_flagyn;
- frmf_modal("SPADT62302","SPADT62302", objArg, "", 1, 0, 0, "", "", "", "", "", "M");
- }
- function fStopTimer() {
- // window.clearinterval(gT1);
- }
- /****************************************************************************************
- * Argument : N/A
- * Description : 처방전 출력
- ****************************************************************************************/
- function fHosInMPSPrint() {
- dsf_makeValue(ds_send_prcpinfo,"etcdescflag", "string",ds_hidden_srchinfo.getColumn(0,"etcdescflag"));
- dsf_makeValue(ds_send_prcpinfo,"autoyn", "string",ds_hidden_srchinfo.getColumn(0,"autoyn"));
- dsf_makeValue(ds_send_prcpinfo,"stocdeptcd", "string",ds_hidden_srchinfo.getColumn(0,"stocdeptcd"));
- var intiflag = "";
- var intinoflag = "";
- var prcpflag = ds_hidden_srchinfo.getColumn(0,'prcpflag');
-
- if(prcpflag.indexOf("IT") > -1) {
- intiflag = "Y";
- }
- if(prcpflag.indexOf("IN") > -1) {
- intinoflag = "Y";
- }
- dsf_makeValue(ds_send_prcpinfo,"intiflag", "string",intiflag);
- dsf_makeValue(ds_send_prcpinfo,"intinoflag", "string",intinoflag);
-
-
- //dsf_makeValue(ds_send_prcpinfo,"autolimanti", "string",ds_hidden_srchinfo.getColumn(0,"prcpflag")); // 2011.02.08 pymi 제한항생제
- //2016.12.25 Shaun 제한항생제.
- if (ds_hidden_srchinfo.getColumn(0,"prcpflag").indexOf("B") >=0 ){
- //sysf_trace("처방전 출력 : " + ds_hidden_srchinfo.getColumn(0,"prcpflag").indexOf("B"));
- dsf_makeValue(ds_send_prcpinfo,"autolimanti", "string", "B");
- }
- var objArg = new Object();
- objArg.arg_ds_send_prcpinfo = ds_send_prcpinfo;
- frmf_modal("SPADT62201","SPADT62201", objArg, "", 0, 0, 0,"","","","","","M" );
- }
- /****************************************************************************************
- * Argument : N/A
- * Description : 자동출력 버튼 클릭시 타이머 작동
- ****************************************************************************************/
- function fClickAutoPrnt(chk) {
- if (chk == "Y") {
- //20090824 마정민 수정. 오류가 나더라도 팝업이 뜨지 않고 계속해서 진행될 수 있도록 수정.
- sysf_setErrorMsg(true);
- ds_hidden.setColumn(0,"autoend", "N");
-
- if(utlf_isNull(ds_hidden_srchinfo.getColumn(0,"autoprntflag"))) {
- sysf_messageBox("자동출력의 처방구분을", "C001");
- return;
- }
-
- if(utlf_isNull(ds_hidden_srchinfo.getColumn(0,"autokind")) && utlf_isNull(ds_hidden_srchinfo.getColumn(0,"autolblsize"))) {
- sysf_messageBox("자동출력의 출력구분을", "C001");
- return;
- }
-
- // 20101203 wify 경북대병원 큰라벨(본원)추가
- if(ds_hidden_srchinfo.getColumn(0,"autolblsize") == "L" || ds_hidden_srchinfo.getColumn(0,"autolblsize") == "S" || ds_hidden_srchinfo.getColumn(0,"autolblsize1") == "L1") {
- if(utlf_isNull(ds_hidden_srchinfo.getColumn(0,"autolblflag"))) {
- sysf_messageBox("자동출력의 라벨구분을", "C001");
- return;
- }
- }
-
- var sRst = "";
- if(gTimer > 0) {
- sRst = sysf_messageBox("자동출력이 동작중입니다.\n자동출력구분설정대로 다시", "Q004");
- if(sRst == "6"){
- // window.clearinterval(gTimer);
- gTimer = 0;
- this.killTimer(0);
- } else {
- return;
- }
- }
- if(sRst == ""){
- sRst = sysf_messageBox("자동출력을", "Q004");
- if(sRst != "6"){
- return;
- }
- }
-
- btn_hist.visible = false;
- grd_sumlist.visible = false;
- grd_patlist.visible = false;
-
- //20090914 이선경 추가 : 자동출력중 처방구분등 다른조건 변경 못하게 함(오류 가능성 있음)
- rdo_prcp.enable = false; //처방구분(정규, 추가)
- rdo_prcp2.enable = false; //처방구분(admission, 병동응급, 퇴원, 외박, 응급실)
- checkbox4.enable = false; //항암프로토콜처방만 체크
- ipt_fst_drugno.enable = false; //투약번호 from
- caption25.enable = false; //'~'
- ipt_last_drugno.enable = false; //투약번호 to
- ipt_pid.enable = false; //등록번호
- chk_manl_lblflag.enable = false; //라벨구분
- btn_prt.enable = false; //출력버튼
- button1.enable = false; //마감버튼
- checkbox10.enable = false; //PTP단독처방라벨
- checkbox3.enable = false; //자동출력의 PTP단독처방라벨
- chk_auto_small.enable = false; //자동출력의 처방구분
- chk_auto_lblflag.enable = false; //자동출력의 라벨구분
- chk_auto_big.enable = false; //자동출력의 출력구분
- chk_auto_lblsize.enable = false; //자동출력의 출력구분
- chk_auto_lbl_L.enable = false;
- chk_auto_lbl_S.enable = false;
- //checkbox8.enable = false; //자동출력의 ptp라벨, 외용라벨
- ipt_prcpdd.enable = false; //적용일자
- btn_sea.enable = false; //조회버튼
- cmb_sumtmflag1.enable = false; //마감시간대구분
- cmb_fromddflag1.enable = false; //마감일자from
- ipt_fromtm1.enable = false; //마감시간from
- cmb_toddflag1.enable = false; //마감일자to
- ipt_totm1.enable = false; //마감시간to
- cmb_sumtmflag2.enable = false; //마감시간대구분
- cmb_fromddflag2.enable = false; //마감일자from
- ipt_fromtm2.enable = false; //마감시간from
- cmb_toddflag2.enable = false; //마감일자to
- ipt_totm2.enable = false; //마감시간to
- radio1.enable = false; //약주사구분
- radio3.enable = false; //기타조회구분
- btn_init.enable = false; //초기화버튼
- button5.enable = false; //병동검색이미지
- chk_mps.enable = false; //출력구분의 처방전체크
- chk_lbl.enable = false; //출력구분의 라벨체크
- //checkbox1.enable = false; //출력구분의 약체크
- //checkbox2.enable = false; //출력구분의 주사체크
- //chk_lbl_drug.enable = false; //출력구분의 약리스트체크
- //chk_lbl_inj.enable = false; //출력구분의 주사리스트체크
- combo1.enable = false; //실출고부서
- checkbox7.enable = false; //ATC순으로 정렬
- btn_prnt.enable = false; //프린터설정
- button3.enable = false; //마감시간관리
- input1.enable = false; //출력간격
- checkbox11.enable = false; //multi-day 처방포함
- checkbox14.enable = false;
- checkbox15.enable = false;
- cmb_sumtmflag3.enable = false;
- cmb_fromddflag3.enable = false;
- ipt_fromtm3.enable = false;
- cmb_toddflag3.enable = false;
- ipt_totm3.enable = false;
- cbx_etcdescflag.enable = false;
- chk_lbl_keepmthd.enable = false;
- chk_lbl_L.enable = false;
- chk_lbl_S.enable = false;
- chk_lbl1.enable = false;
- chk_name_card.enable = false;
- chk_auto_lblsize1.enable = false;
- //cmb_ward.visible = false;
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "");
- ds_hidden_srchinfo.setColumn(0,"fst_drugno", "");
- ds_hidden_srchinfo.setColumn(0,"last_drugno", "");
- ds_hidden_srchinfo.setColumn(0,"wardcd", "");
- ds_hidden_srchinfo.setColumn(0,"wardnm", "");
- ds_temp_srchinfo.setColumn(0,"ward", "");
- ds_hidden_srchinfo.setColumn(0,"pid", "");
- ds_hidden_srchinfo.setColumn(0,"onlyantis","");
- ds_hidden_srchinfo.setColumn(0,"autoyn", "Y");
-
- ds_send_suminfo.setColumn(0,"fromdd", "");
- ds_send_suminfo.setColumn(0,"fromtm", "");
- ds_send_suminfo.setColumn(0,"todd", "");
- ds_send_suminfo.setColumn(0,"totm", "");
-
- var autostr = String(chk_auto_small.getLableData());
- if(ds_hidden_srchinfo.getColumn(0,"autokind") == "M") autostr = autostr + " " + chk_auto_big.text;
- if(ds_hidden_srchinfo.getColumn(0,"autolblsize") == "L") autostr = autostr + " " + chk_auto_lbl_L.text;
- if(ds_hidden_srchinfo.getColumn(0,"autolblsize") == "S") autostr = autostr + " " + chk_auto_lbl_S.text;
- if(ds_hidden_srchinfo.getColumn(0,"autolblsize1") == "L1") autostr = autostr + " " + chk_auto_lblsize1.text;
- //+ " " + chk_auto_big.text + " " + chk_auto_lbl_L.text + " " + chk_auto_lbl_S.text;
- if(ds_hidden_srchinfo.getColumn(0,"autolblsize") == "L" || ds_hidden_srchinfo.getColumn(0,"autolblsize") == "S" || ds_hidden_srchinfo.getColumn(0,"autolblsize1") == "L1"){
- autostr = autostr + "(" + String(chk_auto_lblflag.getLableData()).replace(",","|") + ")";
- }
- autostr = autostr.setReplaceWord("|", ", " );
- group2.caption23.text = autostr;
- btn_autoprnt_start.enable = false;
- btn_autoprnt_end.enable = true;
- chk_sum_count = 8;
- // gTimer = window.setInterval("fAutoPrnt()",20000);
- gTimer = 1;
- this.setTimer(0, 20000);
- //재출력 불가
- ds_hidden_srchinfo.setColumn(0,"reprintyn", "");
- checkbox9.enable = false;
-
- group2.visible = true;
- //서버오류가 발생하더라도 modeless 팝업을 통해 계속해서 진행할 수 있도록 수정.
- // fErrMsg ();
- } else {
- sysf_setErrorMsg(true);
- // window.clearinterval(gTimer);
- gTimer = 0;
- this.killTimer(0);
-
- btn_hist.visible = true;
- grd_sumlist.visible = true;
- grd_patlist.visible = true;
-
- //20090914 이선경 추가 : 자동출력중 처방구분등 다른조건 변경 못하게 함(오류 가능성 있음)
- rdo_prcp.enable = true; //처방구분(정규, 추가)
- rdo_prcp2.enable = true; //처방구분(admission, 병동응급, 퇴원, 외박, 응급실)
- checkbox4.enable = true; //항암프로토콜처방만 체크
- ipt_fst_drugno.enable = true; //투약번호 from
- caption25.enable = true; //'~'
- ipt_last_drugno.enable = true; //투약번호 to
- ipt_pid.enable = true; //등록번호
- chk_manl_lblflag.enable = true; //라벨구분
- btn_prt.enable = true; //출력버튼
- button1.enable = true; //마감버튼
- checkbox10.enable = true; //PTP단독처방라벨
- checkbox3.enable = true; //자동출력의 PTP단독처방라벨
- chk_auto_small.enable = true; //자동출력의 처방구분
- chk_auto_lblflag.enable = true; //자동출력의 라벨구분
- chk_auto_big.enable = true; //자동출력의 출력구분
- chk_auto_lblsize.enable = true; //자동출력의 출력구분
- chk_auto_lbl_L.enable = true;
- chk_auto_lbl_S.enable = true;
- //checkbox8.enable = true; //자동출력의 ptp라벨, 외용라벨
- ipt_prcpdd.enable = true; //적용일자
- btn_sea.enable = true; //조회버튼
- cmb_sumtmflag1.enable = true; //마감시간대구분
- cmb_fromddflag1.enable = true; //마감일자from
- ipt_fromtm1.enable = true; //마감시간from
- cmb_toddflag1.enable = true; //마감일자to
- ipt_totm1.enable = true; //마감시간to
- cmb_sumtmflag2.enable = true; //마감시간대구분
- cmb_fromddflag2.enable = true; //마감일자from
- ipt_fromtm2.enable = true; //마감시간from
- cmb_toddflag2.enable = true; //마감일자to
- ipt_totm2.enable = true; //마감시간to
- radio1.enable = true; //약주사구분
- radio3.enable = true; //기타조회구분
- btn_init.enable = true; //초기화버튼
- button5.enable = true; //병동검색이미지
- chk_mps.enable = true; //출력구분의 처방전체크
- chk_lbl.enable = true; //출력구분의 라벨체크
- //checkbox1.enable = true; //출력구분의 약체크
- //checkbox2.enable = true; //출력구분의 주사체크
- //chk_lbl_drug.enable = true; //출력구분의 약리스트체크
- //chk_lbl_inj.enable = true; //출력구분의 주사리스트체크
- combo1.enable = true; //실출고부서
- checkbox7.enable = true; //ATC순으로 정렬
- btn_prnt.enable = true; //프린터설정
- button3.enable = true; //마감시간관리
- input1.enable = true; //출력간격
- checkbox11.enable = true; //multi-day 처방포함
- checkbox14.enable = true;
- checkbox15.enable = true;
- cmb_sumtmflag3.enable = true;
- cmb_fromddflag3.enable = true;
- ipt_fromtm3.enable = true;
- cmb_toddflag3.enable = true;
- ipt_totm3.enable = true;
- cbx_etcdescflag.enable = true;
- chk_lbl_keepmthd.enable = true;
- chk_lbl_L.enable = true;
- chk_lbl_S.enable = true;
- chk_lbl1.enable = true;
- chk_name_card.enable = true;
- chk_auto_lblsize1.enable = true;
-
- //cmb_ward.visible = true;
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "");
- ds_hidden_srchinfo.setColumn(0,"fst_drugno", "");
- ds_hidden_srchinfo.setColumn(0,"last_drugno", "");
- ds_hidden_srchinfo.setColumn(0,"wardcd", "");
- ds_hidden_srchinfo.setColumn(0,"wardnm", "");
- ds_hidden_srchinfo.setColumn(0,"drugkind", "T");
- ds_temp_srchinfo.setColumn(0,"ward", "");
- ds_hidden_srchinfo.setColumn(0,"pid", "");
- //ds_hidden_srchinfo.setColumn(0,"autoprntflag", "");
- ds_hidden_srchinfo.setColumn(0,"autoyn", "");
- btn_autoprnt_start.enable = true;
- btn_autoprnt_end.enable = false;
- ds_hidden.setColumn(0,"autoend", "Y") ;
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "A");
- //재출력 가능
- checkbox9.enable = true;
-
- group2.visible = false;
-
- ds_main_sumlist.clearData();
- ds_main_patlist.clearData();
- }
-
- sysf_setErrorMsg(false);
- }
- function fReStart(){
- //window.clearinterval(gTimer2);
- //gTimer = window.setInterval("fAutoPrnt()",11000);
- }
- /****************************************************************************************
- * Argument : N/A
- * Description : 자동출력
- ****************************************************************************************/
- function fAutoPrnt() {
- //window.clearinterval(gTimer);
- if ( ds_hidden.getColumn(0,"autoend") == "Y" ){
- gTimer = 0;
- return;
- }
- var orgPrcpflag = ds_hidden_srchinfo.getColumn(0,"prcpflag");
-
- chk_count++;
- if ( ( chk_count % 4 )=="0" ){
- group2.caption14.text="자동 출력중[/]";
- }
- if ( ( chk_count % 4 )=="1" ){
- group2.caption14.text="자동 출력중[ ―]";
- }
- if ( ( chk_count % 4 )=="2" ){
- group2.caption14.text="자동 출력중[\]";
- }
- if ( ( chk_count % 4 )=="3" ){
- group2.caption14.text="자동 출력중[|]";
- }
-
- if(chk_sum_count >= 4){
- if ( ds_hidden_srchinfo.getColumn(0,"autokind").indexOf("M") > -1 ){ //20090721 이선경 수정 : 처방전 자동출력일때만 마감적용
- if (ds_hidden_srchinfo.getColumn(0,"autoendyn") =="Y") {
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("Z") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "Z");
- fHosInSum("N", "auto"); //508응급병동 정규약
- }
-
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("9") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "9");
- fHosInSum("N", "auto"); //508응급병동 정규약
- }
-
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("8") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "8");
- fHosInSum("N", "auto"); //508응급병동 정규약
- }
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("7") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "7");
- fHosInSum("N", "auto"); //508응급병동 정규약
- }
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("M1") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "M");
- ds_hidden_srchinfo.setColumn(0,"drugkind", "D");
- fHosInSum("N", "auto"); //Admission약마감
- }
-
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("M2") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "M");
- ds_hidden_srchinfo.setColumn(0,"drugkind", "M");
- fHosInSum("N", "auto"); //Admission주사마감
- }
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("M1") < 0
- && ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("M2") < 0
- && ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("M") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "M");
- fHosInSum("N", "auto"); //Admission마감
- }
-
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("W1") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "W");
- ds_hidden_srchinfo.setColumn(0,"drugkind", "D");
- fHosInSum("N", "auto"); //병동응급약마감
- }
-
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("W2") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "W");
- ds_hidden_srchinfo.setColumn(0,"drugkind", "M");
- fHosInSum("N", "auto"); //병동응급주사마감
- } else
-
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("W1") < 0
- && ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("W2") < 0
- && ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("W") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "W");
- fHosInSum("N", "auto"); //병동응급마감
- }
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("L") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "L"); // 자동일때는 외출외박으로 처리하여 응급실 퇴원약 제외 20091027 이선경 수정 : 외출외박과 퇴원약은 따로 처리
- ds_hidden_srchinfo.setColumn(0,"drugkind", "T");
- fHosInSum("N", "auto"); //퇴원약마감
- }
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("G") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "G");
- ds_hidden_srchinfo.setColumn(0,"drugkind", "T");
- fHosInSum("N", "auto"); //외박마감
- }
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("E") >=0 ){
- //ds_hidden_srchinfo.setColumn(0,"prcpflag", "O"); //마약만 마감
- //fHosInSum("N", "auto");
- }
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("S") >=0 ){
- //ds_hidden_srchinfo.setColumn(0,"prcpflag", "Q"); //마약만 마감
- //fHosInSum("N");
- }
-
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("C2") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "C2");
- fHosInSum("N", "auto"); //임상주사 마감
- }
-
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("IN") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "IN");
-
- }
- }
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "");
- chk_sum_count = 0;
- }
- }
- chk_sum_count++;
-
- //퇴원 자동출력시 마감을 G로 해서 원래 L 값을 보내줘야함
- //ds_hidden_srchinfo.setColumn(0,"prcpflag", orgPrcpflag); //이훈재 막음. ( 옵션을 선택한 값임)
-
- if ( ds_hidden_srchinfo.getColumn(0,"autokind").indexOf("M") > -1 ){
- ds_hidden_srchinfo.setColumn(0,"prntkind", "M");
- ds_hidden_srchinfo.setColumn(0,"autolblyn", ""); //20190502.pkc 처방전 출력경우 null
-
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("Z") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "Z");
-
- fInSumList(); //마감시간별 미출력데이터 조회
-
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
- // grd_sumlist.setCellPos(grd_sumlist.getBindCellIndex("body","column"));
-
- ds_hidden_srchinfo.setColumn(0,"autolblyn", "");
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("A", "mps"); //처방전출력
- }
- }
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("M") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "M");
- fInSumList(); //마감시간별 미출력데이터 조회
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- ds_hidden_srchinfo.setColumn(0,"autolblyn", "");
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("A", "mps"); //처방전출력
- }
- }
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("W") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "W");
- if ( ds_send_suminfo.getColumn(0,"intiflag") != "N" ){
-
- fInSumList(); //마감시간별 미출력데이터 조회
-
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- ds_hidden_srchinfo.setColumn(0,"autolblyn", "");
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("A", "mps"); //처방전출력
- }
- }
- }
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("L") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "L"); // 자동일때는 외출외박으로 처리하여 응급실 퇴원약 제외 20091027 이선경 수정 : 외출외박과 퇴원약은 따로 처리
- fInSumList(); //마감시간별 미출력데이터 조회
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- ds_hidden_srchinfo.setColumn(0,"autolblyn", "");
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("A", "mps"); //처방전출력
- }
- }
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("G") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "G");
- fInSumList(); //마감시간별 미출력데이터 조회
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- ds_hidden_srchinfo.setColumn(0,"autolblyn", "");
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("A", "mps"); //처방전출력
- }
- }
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("E") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "E");
- fInSumList(); //마감시간별 미출력데이터 조회
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- ds_hidden_srchinfo.setColumn(0,"autolblyn", "");
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("A", "mps"); //처방전출력
- }
- }
-
- // 2011.02.08 pymi 제한항생제
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("B") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "B");
- fInSumList(); //마감시간별 미출력데이터 조회
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- ds_hidden_srchinfo.setColumn(0,"autolblyn", "");
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("A", "mps"); //처방전출력
- }
- }
- // (e)
-
- // 임상
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("C2") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "C2");
- fInSumList(); //마감시간별 미출력데이터 조회
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- ds_hidden_srchinfo.setColumn(0,"autolblyn", "");
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("A", "mps"); //처방전출력
- }
- }
-
- // 20120316_laboru_마약 단독 처방전 출력
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("S") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "S");
- fInSumList(); //마감시간별 미출력데이터 조회
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- ds_hidden_srchinfo.setColumn(0,"autolblyn", "");
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("A", "mps"); //처방전출력
- }
- }
-
- // 20120416_laboru_인티팜 처방전 출력
- if (ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("IT") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "T");
- dsf_makeValue(ds_send_sumlistinfo,"intiflag","string","N");
- fInSumList(); //마감시간별 미출력데이터 조회
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- ds_hidden_srchinfo.setColumn(0,"autolblyn", "");
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("A", "mps"); //처방전출력
- }
- }
- if (ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("IN") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "T");
- dsf_makeValue(ds_send_sumlistinfo,"intiflag","string","N");
- dsf_makeValue(ds_send_sumlistinfo,"intinoflag","string","Y");
- fInSumList(); //마감시간별 미출력데이터 조회
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- ds_hidden_srchinfo.setColumn(0,"autolblyn", "");
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("A", "mps"); //처방전출력
- }
- }
-
- if (ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("9") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "9");
-
- fInSumList(); //마감시간별 미출력데이터 조회
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- ds_hidden_srchinfo.setColumn(0,"autolblyn", "");
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("A", "mps"); //처방전출력
- }
- }
-
- if (ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("8") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "8");
-
- fInSumList(); //마감시간별 미출력데이터 조회
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- ds_hidden_srchinfo.setColumn(0,"autolblyn", "");
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("A", "mps"); //처방전출력
- }
- }
-
- if (ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("7") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "7");
-
- fInSumList(); //마감시간별 미출력데이터 조회
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- ds_hidden_srchinfo.setColumn(0,"autolblyn", "");
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("A", "mps"); //처방전출력
- }
- }
- }
-
- //라벨
- // 20101204 wify 경북대병원 큰라벨(본원) 추가
- if ( ds_hidden_srchinfo.getColumn(0,"autolblsize").indexOf("L") > -1 || ds_hidden_srchinfo.getColumn(0,"autolblsize").indexOf("S") > -1 || ds_hidden_srchinfo.getColumn(0,"autolblsize").indexOf("L1") > -1 ){
- ds_hidden_srchinfo.setColumn(0,"prntkind", "L");
- if (ds_hidden_srchinfo.getColumn(0,"autoyn") =="Y") {
- ds_hidden_srchinfo.setColumn(0,"autolblyn", "Y");
- } else {
- ds_hidden_srchinfo.setColumn(0,"autolblyn", "");
- }
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("Z") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "Z");
- fInSumList(); //마감시간별 미출력데이터 조회
-
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
- fPrcpMPSPrint("A", "lbl"); //라벨출력
- }
- }
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("M") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "M");
- fInSumList(); //마감시간별 미출력데이터 조회
-
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
- fPrcpMPSPrint("A", "lbl"); //라벨출력
- }
- }
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("W") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "W");
- fInSumList(); //마감시간별 미출력데이터 조회
-
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
- fPrcpMPSPrint("A", "lbl"); //라벨출력
- }
- }
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("L") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "L");
- fInSumList(); //마감시간별 미출력데이터 조회
-
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
- fPrcpMPSPrint("A", "lbl"); //라벨출력
- }
- }
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("G") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "G");
- fInSumList(); //마감시간별 미출력데이터 조회
-
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
- fPrcpMPSPrint("A", "lbl"); //라벨출력
- }
- }
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("E") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "E");
- fInSumList(); //마감시간별 미출력데이터 조회
-
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
- fPrcpMPSPrint("A", "lbl"); //라벨출력
- }
- }
- // 2011.02.09 pymi
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("B") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "B");
- fInSumList(); //마감시간별 미출력데이터 조회
-
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
- fPrcpMPSPrint("A", "lbl"); //라벨출력
- }
- }
- //(e)
-
- // 임상
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("C2") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "C2");
- fInSumList(); //마감시간별 미출력데이터 조회
-
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
- fPrcpMPSPrint("A", "lbl"); //라벨출력
- }
- }
- ///인티팜 20181207
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("IT") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "IT");
- fInSumList(); //마감시간별 미출력데이터 조회
-
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
- fPrcpMPSPrint("A", "lbl"); //라벨출력
- }
- }
- ///비인티팜 20181207
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("IN") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "IN");
- fInSumList(); //마감시간별 미출력데이터 조회
-
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
- fPrcpMPSPrint("A", "lbl"); //라벨출력
- }
- }
-
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("9") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "9");
- fInSumList(); //마감시간별 미출력데이터 조회
-
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
- fPrcpMPSPrint("A", "lbl"); //라벨출력
- }
- }
-
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("8") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "8");
- fInSumList(); //마감시간별 미출력데이터 조회
-
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
- fPrcpMPSPrint("A", "lbl"); //라벨출력
- }
- }
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("7") >=0 ){
- ds_hidden_srchinfo.setColumn(0,"prcpflag", "7");
- fInSumList(); //마감시간별 미출력데이터 조회
-
- for(var i = 0; i < ds_main_sumlist.rowcount; i++){
- chk_prnt_count++;
- // grd_sumlist.isSelected(i) = true;
- // grd_sumlist.row = i;
- grd_sumlist.setFocus();
- ds_main_sumlist.rowposition = i;
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
- fPrcpMPSPrint("A", "lbl"); //라벨출력
- }
- }
- }
-
-
- if (ds_hidden_srchinfo.getColumn(0,"autoatcyn") =="Y") {
- //ATC전송
- ds_send_atcinfo.setColumn(0,"drugdd", ds_hidden_srchinfo.getColumn(0,"prcpdd"));
-
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("L") > -1 ) {
- ds_send_atcinfo.setColumn(0,"drugflag", "L");
- ds_send_atcinfo.setColumn(0,"instcd", ds_hidden_srchinfo.getColumn(0,"instcd"));
-
- call_TXADT10202(); //ATC Data 전송(배치호출)
- }
-
- if ( ds_hidden_srchinfo.getColumn(0,"autoprntflag").indexOf("E") > -1 ) {
- ds_send_atcinfo.setColumn(0,"drugflag", "E");
- ds_send_atcinfo.setColumn(0,"instcd", ds_hidden_srchinfo.getColumn(0,"instcd"));
-
- call_TXADT10202(); //ATC Data 전송(배치호출)
- }
- ds_send_atcinfo.setColumn(0,"drugflag", "I");
- ds_send_atcinfo.setColumn(0,"instcd", ds_hidden_srchinfo.getColumn(0,"instcd"));
-
- call_TXADT10202(); //ATC Data 전송(배치호출)
- }
- }
- function fSleep(numberMillis) {
- var now = new Date();
- var exitTime = now.getTime() + numberMillis;
- while (true) {
- now = new Date();
- if (now.getTime() > exitTime)
- return;
- }
- }
- /****************************************************************************************
- * Argument : N/A
- * Description : 투약번호 변경시
- ****************************************************************************************/
- function fChgDrugno(flag) {
- var bResult = true;
- if(flag == "first"){
- var chk = ds_hidden_srchinfo.getColumn(0,"fst_drugno");
- if(utlf_isNull(chk)){
- ds_hidden_srchinfo.setColumn(0,"last_drugno", "");
- bResult = false;
- } else {
- if(isNaN(chk)){
- sysf_messageBox("투약번호는 숫자로","C001");
- ds_hidden_srchinfo.setColumn(0,"fst_drugno", "");
- bResult = false;
- }
- if(chk.length > 5){
- sysf_messageBox("투약번호는 5자리미만으로","C001");
- ds_hidden_srchinfo.setColumn(0,"fst_drugno", "");
- bResult = false;
- }
- }
- } else if(flag == "last"){
- var chk_fst = ds_hidden_srchinfo.getColumn(0,"fst_drugno");
- var chk_last = ds_hidden_srchinfo.getColumn(0,"fst_drugno");
- if(utlf_isNull(chk_fst)){
- sysf_messageBox("첫번째 투약번호부터","C001");
- ds_hidden_srchinfo.setColumn(0,"last_drugno", "");
- bResult = false;
- } else {
- if(isNaN(chk_fst)){
- sysf_messageBox("투약번호는 숫자로","C001");
- ds_hidden_srchinfo.setColumn(0,"fst_drugno", "");
- bResult = false;
- }
- if(chk_fst.length > 5 ){
- sysf_messageBox("투약번호는 5자리미만으로","C001");
- ds_hidden_srchinfo.setColumn(0,"fst_drugno", "");
- bResult = false;
- }
- if(isNaN(chk_last)){
- sysf_messageBox("투약번호는 숫자로","C001");
- ds_hidden_srchinfo.setColumn(0,"last_drugno", "");
- bResult = false;
- }
- if(chk_last.length > 5 ){
- sysf_messageBox("투약번호는 5자리미만으로","C001");
- ds_hidden_srchinfo.setColumn(0,"last_drugno", "");
- bResult = false;
- }
- }
- }
- return bResult;
- }
- function fErrMsg () {
- var errorMsgPath = "/root/properties/error";
- if ( model.getValue ( "/root/properties/error/type" ) == "error" ) {
- window.load("../../../com/commonweb/xrw/SPZZZ00100_시스템에러.xrw","modeless","","width:514px;height:198px;align:center;","/root/properties/error","/root/main");
- }
- }
- /****************************************************************************************
- * Argument : N/A
- * Description : 네임카드 출력
- ****************************************************************************************/
- function fPatLblPrint() {
- var oParam = {};
- oParam.id = "TRADT10215";
- oParam.service = "pharmacyprescriptionapp.DrugPrint";
- oParam.method = "reqGetPatLblData";
- oParam.inds = "req=ds_send_prcpinfo";
- oParam.outds = "ds_temp_prntpat_prcpdrug=prcpdrug";
- oParam.async = false;
- //oParam.callback = "cf_TRADT10215";
- tranf_submit(oParam);
-
- // var commkind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/commkind")
- //프린터 포트명, 혹은 네트웍 공유 프린터 명
- // if(commkind == "01") {
- // CommAX1.PrtNm = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm01/setupval");
- // }
- // var iPoint = 0;
- for(var iPoint = 0; iPoint < ds_temp_prntpat_prcpdrug.rowcount ; iPoint++) {
- if(!utlf_isNull(ds_temp_prntpat_prcpdrug.getColumn(iPoint,"pid"))) {
- //////////////////////////////////////////////////
- // 라벨 상단내용 //
- //////////////////////////////////////////////////
- //병동
- ds_temp_prntpat_prcpdrug.setColumn(iPoint,"wardnm" ,dsf_getColumnNullToEmpty(ds_temp_prntpat_prcpdrug, iPoint, "wardnm")+ " / " + dsf_getColumnNullToEmpty(ds_temp_prntpat_prcpdrug, iPoint, "roomcd"));
- //환자번호
- ds_temp_prntpat_prcpdrug.setColumn(iPoint,"pid", "등록번호:" + ds_temp_prntpat_prcpdrug.getColumn(iPoint,"pid") );
- //진료과
- ds_temp_prntpat_prcpdrug.setColumn(iPoint,"orddeptnm" , dsf_getColumnNullToEmpty(ds_temp_prntpat_prcpdrug,iPoint,"orddeptnm") + "/" + dsf_getColumnNullToEmpty(ds_temp_prntpat_prcpdrug,iPoint,"medispclidnm") + "/" + dsf_getColumnNullToEmpty(ds_temp_prntpat_prcpdrug,iPoint,"atdoctidnm") );
- //라벨출력일
- var lbldate = utlf_getCurrentDate();
- lbldate = lbldate.toDate().getDateFormat("YYYY/MM/DD") ;
- //model.makeValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/lbldate" , lbldate);
- dsf_makeValue(ds_temp_prntpat_prcpdrug,"lbldate","string",lbldate,iPoint);
- }
- }
-
- // makeReportIViewer(0,0,10, 10, arguments[0]);
- // fPrintRex("RFADT10310", "undefined", "undefined", "undefined", "undefined", "undefined", arguments[0]);
- rptf_printRexbar("RFADT10310", "", "/root/temp/prntpat/prcpdrug", ds_temp_prntpat_prcpdrug);
- }
- // function makeReportIViewer(left, top, width, height, iViewerName){
- // if(left==null || top==null || width==null || height==null){
- // sysf_messageBox("미리보기 크기정보가", "I004");
- // }else{
- // if(iViewerName != null && iViewerName != ""){
- // if(document.all("ivr_"+iViewerName) == null){
- // if(document.all("grp_biz") == null){
- // body.createChild("xforms:iviewer", "id:ivr_"+iViewerName+"; src:../../../com/commonweb/xrw/SPZUR00100_보고서.xrw; left:"+left+"px; top:"+top+"px; width:"+width+"px; height:"+height+
- // "px;");
- // }else{
- // grp_biz.createChild("xforms:iviewer", "id:ivr_"+iViewerName+"; src:../../../com/commonweb/xrw/SPZUR00100_보고서.xrw; left:"+left+"px; top:"+top+"px; width:"+width+"px; height:"+height+
- // "px;");
- // }
- // model.refresh();
- // }
- // }
- // }
- // }
- // function fPrintRex(rexnm, closeYn, printCount, dataXPath, paramsXPath, infoXPath, parentId){
- // var posx = '';
- // var posy = '';
- // var printnm = '';
- //
- // if(infoXPath == "" || infoXPath == "undefined" || infoXPath == null) infoXPath = "/root/main/barcdprntsetup/prntsetupinfo";
- //
- // if(model.getValue(infoXPath + "/setupinfo/rexgbn") != "1") return false;
- //
- // try{
- // if(model.getXpathValue("count(" + infoXPath + "/setupinfo/pcl/pcllist[barnm='"+rexnm+"']/barnm)") > "0"){
- // posx = model.getValue(infoXPath + "/setupinfo/pcl/pcllist[barnm='"+rexnm+"']/xpos");
- // posy = model.getValue(infoXPath + "/setupinfo/pcl/pcllist[barnm='"+rexnm+"']/ypos");
- // printnm = model.getValue(infoXPath + "/setupinfo/pcl/pcllist[barnm='"+rexnm+"']/prtnm");
- // }else{
- // posx = model.getValue(infoXPath + "/setupinfo/blank/left");
- // posy = model.getValue(infoXPath + "/setupinfo/blank/top");
- // printnm = model.getValue(infoXPath + "/setupinfo/comm01/setupval");
- // }
- //
- // if(posx == '') posx = "0";
- // if(posy == '') posy = "0";
- //
- // if(closeYn == "true") printnm = "";
- //
- // exeRexPreview(rexnm, 'XMLSTR', paramsXPath, '', printnm,
- // '', '', '', '', '',
- // '', parentId, '', '', '',
- // printCount, '', 'offsetx=' + posx + ';offsety=' + posy + ';', dataXPath, '',
- // '');
- // }
- // catch(e){
- // alert("출력시 오류가 발생하였습니다\n" + e);
- // return true;
- // }
- //
- // return true;
- // }
- // function exeRexPreview(rid, dataType, paramsXPath, submitId, print, printDialog, fileType, fileName, fileDialog, closeYn, monNo, parentObjId, printPaperBin, userService, showButton, printCount, zoomRate, printOption, dataXPath, mainDataXPath, subDataXPath)
- // {
- // var reportNode = instance1.selectSingleNode(gvReportPath);
- //
- // var syscd = getSystemCd();
- // syscd = syscd.substr(3,3);
- // //if(syscd == "888" || syscd == "999" || syscd == "") syscd = "001";
- // if(syscd == "") syscd = "001";
- //
- // //레포트 관련 내용 초기화
- // if(reportNode != null){
- // model.removeNodeset(gvReportPath);
- // }
- //
- // model.makeNode(gvReportPath);
- // model.makeNode(gvReportParamsPath);
- // model.makeNode(gvReportPropsPath);
- // model.makeNode(gvReportOptionsPath);
- // paramsXPath = instance1.selectSingleNode(paramsXPath);
- // if(paramsXPath != null){
- // model.copyNode(gvReportParamsPath, paramsXPath);
- // }
- //
- // model.makeValue(gvReportParamsPath+"/userid", getUserId());
- // model.makeValue(gvReportParamsPath+"/logoimgurl", getImageURL("error_logo"+getLogoImageKey()));
- // model.makeValue(gvReportParamsPath+"/url", rid);
- //
- // model.makeValue(gvReportPropsPath+"/rex_rptname", rid);
- // model.makeValue(gvReportPropsPath+"/rex_datatype", dataType);
- // model.makeValue(gvReportPropsPath+"/rex_submitid", submitId);
- // model.makeValue(gvReportPropsPath+"/rex_userservice", userService);
- // model.makeValue(gvReportPropsPath+"/rex_data_xpath", dataXPath);
- // model.makeValue(gvReportPropsPath+"/rex_xpath", mainDataXPath);
- // model.makeValue(gvReportPropsPath+"/rex_xpath1", subDataXPath);
- //
- // model.makeValue(gvReportOptionsPath+"/rex_print", print);
- // model.makeValue(gvReportOptionsPath+"/rex_printdialog", printDialog);
- // model.makeValue(gvReportOptionsPath+"/rex_printpaperbin", printPaperBin);
- // model.makeValue(gvReportOptionsPath+"/rex_filetype", fileType);
- // model.makeValue(gvReportOptionsPath+"/rex_filename", fileName);
- // model.makeValue(gvReportOptionsPath+"/rex_filedialog", fileDialog);
- // model.makeValue(gvReportOptionsPath+"/rex_close", closeYn);
- // model.makeValue(gvReportOptionsPath+"/rex_showbutton", showButton);
- // model.makeValue(gvReportOptionsPath+"/rex_printcount", printCount);
- // model.makeValue(gvReportOptionsPath+"/rex_zoomrate", zoomRate);
- // model.makeValue(gvReportOptionsPath+"/rex_printoption", printOption);
- //
- // if(parentObjId == null || parentObjId == ""){
- // if(document.all("ivr_report") == null){
- // //popup
- // setParameter("onready","true");
- // modal("SPZUR00100", monNo);
- // }else{
- // //iviewer
- // ivr_report.window.javascript.fInitRexpert();
- // }
- // }else{
- // var parentObj = document.all("ivr_"+parentObjId);
- // if(parentObj != null){
- // var childObj = document.all("ivr_"+parentObjId);
- //
- // if(childObj != null){
- // gCurrPrtObj = "ivr_"+parentObjId; //삭제할 viewer를 현재 출력 obj변수에 설정하고.. 프린트 끝난후 현재변수의 Iviewer를 삭제
- // childObj.window.javascript.fInitRexpert();
- // }
- // }
- // }
- // }
- /**
- 생성된 IViewer삭제
- **/
- // function cleanIViewer() {
- // if (arguments[0] == "undefined" || arguments[0] == undefined) { //파라미터가 없으면 현재 gCurrPrtObj변수로 IViewer를 삭제하고
- // var o = document.all("ivr_"+gCurrPrtObj);
- // if (o != null) {
- // body.removeChild("ivr_"+gCurrPrtObj);
- // }
- // } else { //파라미터가 존재하면 파라미터 배열의 IViewer를 삭제함
- // if (arguments[0].indexOf("|") != -1)
- // return;
- //
- // var arr = arguments[0].split("|");
- // for (var i in arr) {
- // var o = document.all("ivr_"+arr[i]);
- // if (o != null) {
- // body.removeChild("ivr_"+arr[i]);
- // }
- // }
- // }
- // gCurrPrtObj = null;
- // }]]></Script>
|