123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>병동처방전출력</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <sumrslt/>
- <sumlist>
- <sumlist>
- <sumdd/>
- <sumtm/>
- <sumdt/>
- <prcpflagnm/>
- <cnt/>
- <sumflag/>
- <drugkind/>
- </sumlist>
- </sumlist>
- <patlist>
- <patlist>
- <sel/>
- <prnttims/>
- <drugdd/>
- <drugno/>
- <wardnm/>
- <pid/>
- <patnm/>
- <prcpdd/>
- <orddd/>
- <cretno/>
- <orddeptcd/>
- <orddeptnm/>
- <orddrnm/>
- <prcpgenrflag/>
- <wardcd/>
- <prntdt/>
- <drugflag/>
- </patlist>
- </patlist>
- <prcpdata>
- <patinfo/>
- <diaginfo/>
- <sumlist/>
- </prcpdata>
- <lbllist>
- <lbllist/>
- </lbllist>
- </main>
- <send>
- <suminfo>
- <prcpdd/>
- <prcpflag/>
- <instcd/>
- <pid/>
- <ioflag>I</ioflag>
- <sumdrugkind/>
- <onlyantis/>
- </suminfo>
- <sumlistinfo/>
- <patlistinfo/>
- <prcpinfo/>
- <deptinfo>
- <deptflag/>
- </deptinfo>
- <atcinfo>
- <drugdd/>
- <drugflag>I</drugflag>
- <instcd/>
- </atcinfo>
- </send>
- <init/>
- <hidden>
- <srchinfo>
- <prcpdd/>
- <drugkind/>
- <etcflag/>
- <etcdescflag/>
- <fst_drugno/>
- <last_drugno/>
- <prcpflag/>
- <mpsflag/>
- <lblyn/>
- <lbl_drug/>
- <lbl_inj/>
- <wardcd/>
- <pid/>
- <prntflag/>
- <instcd/>
- <sumdt/>
- <autokind/>
- <autoprntflag/>
- <drugall/>
- <injall/>
- <wardnm/>
- <reprintyn/>
- <prntkind/>
- <reprintyn/>
- <onlyantis/>
- <autoatcyn/>
- <autoendyn>Y</autoendyn>
- <autodscyn/>
- </srchinfo>
- <deptlist>
- <ward>
- <wardcd/>
- <wardnm/>
- </ward>
- </deptlist>
- <popupinfo>
- <prcpdd/>
- <drugno/>
- <pid/>
- <ward/>
- </popupinfo>
- <sleeptime>1</sleeptime>
- <autoend/>
- </hidden>
- <temp>
- <ret/>
- <srchinfo>
- <ward/>
- </srchinfo>
- </temp>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInit();
- grd_patlist.fixedcellcheckbox(0,0) = true;
- fInSumList();
- ]]>
- </script>
- <submission id="TRADT60201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/sumlistinfo" replace="instance" resultref="/root/main/sumlist"/>
- <submission id="TRADT60202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/patlistinfo" replace="instance" resultref="/root/main/patlist"/>
- <submission id="TRADT60203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/deptinfo" replace="instance" resultref="/root/hidden/deptlist"/>
- <submission id="TXADT10201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/suminfo" replace="instance" resultref="/root/main/sumrslt"/>
- <submission id="TXADT10202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/atcinfo" replace="instance" add="bottom" resultref="/root/temp/ret"/>
- <script type="javascript" ev:event="xforms-model-destruct">
- <![CDATA[
- if (gTimer != null) {
- window.clearinterval(gTimer);
- gTimer = null;
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-close">
- <![CDATA[
- if (gTimer != null) {
- window.clearinterval(gTimer);
- gTimer = null;
- }
- ]]>
- </script>
- </model>
- <script type="javascript">
- <![CDATA[
- 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 = null;
- var gTimer2 = null;
- var gT1 = null;
- var sleepTime= 1000;
- /**
- * 초기화
- */
- function fInit() {
-
- if (model.getValue("/root/hidden/prcpsrch/prcpdd") == "") {
- // 날짜 초기화
- model.makeValue("/root/hidden/srchinfo/prcpdd", getCurrentDate());
- }
- //처방구분 초기화
- model.makeValue("/root/hidden/srchinfo/prcpflag", "A");
-
- //약주사구분 초기화
- model.makeValue("/root/hidden/srchinfo/drugkind", "T");
-
- //라벨 체크 초기화
- model.makeValue("/root/hidden/srchinfo/lblyn", "Y");
- fChkLBL_YN();
-
- //처방전 체크 초기화
- model.makeValue("/root/hidden/srchinfo/mpsflag", "P");
-
- //기타조회구분 초기화
- model.makeValue("/root/hidden/srchinfo/etcflag", "T");
- cbx_etcdescflag.disabled = true;
-
- //마감시 instcd 적용을 위해 instcd 초기화
- //model.setValue("/root/hidden/srchinfo/instcd", getUserInfo("posinstcd"));
- var dutplceinstcd = getUserInfo("dutplceinstcd");
- if(dutplceinstcd == ""){
- dutplceinstcd = "012";
- }
- model.makeValue("/root/hidden/srchinfo/instcd", dutplceinstcd);
- //makeReportPreview(0,270,820,700);
-
- //병동 Combo 조회
- model.setValue("/root/send/deptinfo/deptflag", "W");
- submit("TRADT60203");
- astfAddCombo("/root/hidden/deptlist", "ward", "wardcd,wardnm", "T,전체");
-
- //자동출력구분 초기화
- btn_autoprnt_start.disabled = false;
- btn_autoprnt_end.disabled = true;
- //model.setValue("/root/hidden/srchinfo/auto_selflag", "1");
- //chk_auto_big.disabled = false;
- //chk_auto_small.disabled = true;
- //model.setValue("/root/hidden/srchinfo/auto_bigflag", "E|L|G");
- //model.setValue("/root/hidden/srchinfo/auto_smallflag", "");
-
-
- model.refresh();
-
- //처방전 감사화면에서 팝업으로 열때 데이터 조회
- if(model.getValue("/root/hidden/popupinfo/drugno") != ""){
- model.setValue("/root/hidden/srchinfo/prcpdd", model.getValue("/root/hidden/popupinfo/prcpdd"));
- model.setValue("/root/hidden/srchinfo/fst_drugno", model.getValue("/root/hidden/popupinfo/drugno"));
- model.setValue("/root/hidden/srchinfo/pid", model.getValue("/root/hidden/popupinfo/pid"));
- //model.setValue("/root/hidden/srchinfo/ward", model.getValue("/root/hidden/popupinfo/ward"));
- model.refresh();
- fInSumList();
- }
- }
-
- /**
- * 라벨 변경시 처리
- */
- function fChkLBL_YN() {
- var chk = model.getValue("/root/hidden/srchinfo/lblyn");
- var sLbl_Drug = "D|DT|DX|DE|DH";
- var sLbl_Inj = "I|IO|IX|IE|IH";
-
-
- if(chk == "Y"){
- model.makeValue("/root/hidden/srchinfo/lbl_drug", sLbl_Drug);
- model.makeValue("/root/hidden/srchinfo/lbl_inj", sLbl_Inj);
- model.makeValue("/root/hidden/srchinfo/drugall", "Y");
- model.makeValue("/root/hidden/srchinfo/injall", "Y");
- } else {
- model.makeValue("/root/hidden/srchinfo/lbl_drug", "");
- model.makeValue("/root/hidden/srchinfo/lbl_inj", "");
- model.makeValue("/root/hidden/srchinfo/drugall", "");
- model.makeValue("/root/hidden/srchinfo/injall", "");
- }
-
- model.refresh();
- }
-
- /**
- * 마감리스트 조회
- */
- function fInSumList() {
- chk_ward.visible = false;
- if(model.getValue("/root/hidden/srchinfo/autoprntflag") == "" && model.getValue("/root/hidden/srchinfo/prcpflag") == ""){
- messageBox("처방구분을", "C001")
- return;
- }
- model.copyNode("/root/send/sumlistinfo", "/root/hidden/srchinfo");
- submit("TRADT60201");
- grd_sumlist.isSelected(grd_sumlist.fixedRows) = true;
- grd_sumlist.row = grd_sumlist.fixedRows;
- if(grd_sumlist.Rows > 1){
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
- } else {
- model.removeNodeset("/root/main/patlist/patlist");
- model.refresh();
- }
- }
-
- /**
- * 병동 마감
- */
- function fHosInSum(chk) {
- var prcpflag = model.getValue("/root/hidden/srchinfo/prcpflag");
- var prcpdd = model.getValue("/root/hidden/srchinfo/prcpdd");
- var instcd = model.getValue("/root/hidden/srchinfo/instcd");
- var pid = model.getValue("/root/hidden/srchinfo/pid");
- var drugkind = model.getValue("/root/hidden/srchinfo/drugkind");
- var onlyantis = model.getValue("/root/hidden/srchinfo/onlyantis");
- var prcpflagnm = rdo_prcp.label;
- var chkret = 0;
-
- if(chk == "Y"){
- chkret = messageBox(prcpflagnm + "마감을", "Q004");
- } else {
- chkret = 6;
- }
-
- if(chkret == 6){
-
- model.setValue("/root/send/suminfo/prcpdd", prcpdd);
- model.setValue("/root/send/suminfo/prcpflag", prcpflag);
- model.setValue("/root/send/suminfo/instcd", instcd);
- model.setValue("/root/send/suminfo/pid", pid);
- model.setValue("/root/send/suminfo/sumdrugkind", drugkind);
- model.setValue("/root/send/suminfo/onlyantis", onlyantis);
- model.setValue("/root/send/suminfo/ioflag", "I");
- submit("TXADT10201");
-
- if (model.getValue("/root/hidden/srchinfo/prcpflag")=="L" || model.getValue("/root/hidden/srchinfo/prcpflag")=="G") {
- model.setValue("/root/send/suminfo/prcpdd", prcpdd);
- model.setValue("/root/send/suminfo/prcpflag", prcpflag);
- model.setValue("/root/send/suminfo/instcd", instcd);
- model.setValue("/root/send/suminfo/pid", pid);
- model.setValue("/root/send/suminfo/ioflag", "O");
- submit("TXADT10201");
- }
- }
- }
-
- /**
- * 마감리스트 더블클릭시 출력할 환자리스트 조회
- */
- function fPrntPatList() {
- grd_patlist.rebuildStyle();
-
- if(model.getValue("/root/main/sumlist/sumlist["+grd_sumlist.row+"]/sumdt") != ""){
- model.copyNode("/root/send/patlistinfo","/root/main/sumlist/sumlist["+grd_sumlist.row+"]");
- model.makeValue("/root/send/patlistinfo/prcpdd", model.getValue("/root/hidden/srchinfo/prcpdd"));
- model.makeValue("/root/send/patlistinfo/fst_drugno", model.getValue("/root/hidden/srchinfo/fst_drugno"));
- model.makeValue("/root/send/patlistinfo/last_drugno", model.getValue("/root/hidden/srchinfo/last_drugno"));
- model.makeValue("/root/send/patlistinfo/wardcd", model.getValue("/root/hidden/srchinfo/wardcd"));
- model.makeValue("/root/send/patlistinfo/pid", model.getValue("/root/hidden/srchinfo/pid"));
- model.makeValue("/root/send/patlistinfo/autoprntflag", model.getValue("/root/hidden/srchinfo/autoprntflag"));
- model.makeValue("/root/send/patlistinfo/etcdescflag", model.getValue("/root/hidden/srchinfo/etcdescflag"));
- model.makeValue("/root/send/patlistinfo/prntkind", model.getValue("/root/hidden/srchinfo/prntkind"));
- model.makeValue("/root/send/patlistinfo/autolblyn", model.getValue("/root/hidden/srchinfo/autolblyn"));
- model.makeValue("/root/send/patlistinfo/autodscyn", model.getValue("/root/hidden/srchinfo/autodscyn"));
- model.makeValue("/root/send/patlistinfo/prcpflag", model.getValue("/root/hidden/srchinfo/prcpflag"));
- submit("TRADT60202");
- if(model.getValue("/root/hidden/srchinfo/fst_drugno") != ""){
- model.setValue("/root/main/patlist/patlist/sel", "Y");
- }
- }
- }
-
- /**
- * 처방전/라벨 출력
- */
- function fPrcpMPSPrint( flag ) {
- //투약번호로 출력
- var sDrugNo = model.getValue("/root/hidden/srchinfo/fst_drugno");
- sleepTime = model.getValue("/root/hidden/sleeptime") * 1000;
- /*if(sDrugNo != ""
- && chk_prnt_count == 0){
- fAutoPrnt();
- return;
- }*/
- chk_prnt_count = 0;
- //처방전 및 라벨 출력
- var chk_mpsflag = model.getValue("/root/hidden/srchinfo/mpsflag");
- var chk_lblyn = model.getValue("/root/hidden/srchinfo/lblyn");
- var chk_lbl_drug = model.getValue("/root/hidden/srchinfo/lbl_drug");
- var chk_lbl_inj = model.getValue("/root/hidden/srchinfo/lbl_inj");
-
-
- grd_patlist.rebuildStyle();
-
- if (chk_mpsflag != "" || chk_lblyn != "") {
- //처방전 출력 데이터 조회
- var cnt = 0;
- for(var i = grd_patlist.fixedRows; i < grd_patlist.rows; i++){
- if(model.getValue("/root/main/patlist/patlist["+i+"]/sel") == "Y"){
- model.copyNode("/root/send/prcpinfo", "/root/main/patlist/patlist["+i+"]");
- if(chk_lbl_drug != "" && chk_lbl_inj != ""){
- model.makeValue("/root/send/prcpinfo/lblflag", chk_lbl_drug+"|"+chk_lbl_inj);
- } else if(chk_lbl_drug != ""){
- model.makeValue("/root/send/prcpinfo/lblflag", chk_lbl_drug);
- } else if(chk_lbl_inj != ""){
- model.makeValue("/root/send/prcpinfo/lblflag", chk_lbl_inj);
- }
-
- model.makeValue("/root/send/prcpinfo/prcpflag", model.getValue("/root/hidden/srchinfo/prcpflag"));
- model.makeValue("/root/send/prcpinfo/prntflag", model.getValue("/root/hidden/srchinfo/prntflag"));
- model.makeValue("/root/send/prcpinfo/reprintyn", model.getValue("/root/hidden/srchinfo/reprintyn"));
- model.makeValue("/root/send/prcpinfo/ioflag", "I");
- var drugno = model.getValue("/root/send/prcpinfo/drugno");
- var wardcd = model.getValue("/root/send/prcpinfo/wardcd");
- var pid = model.getValue("/root/send/prcpinfo/pid");
-
- if ( flag =="M" || flag == null ){
- //처방전 출력
- // if (chk_mpsflag != "" && fChkParam(drugno, wardcd, pid) == true) {
- if (chk_mpsflag != "" ) {
- //var gT1 = window.setInterval("fHosInMPSPrint()",10000);
- //window.clearinterval(gT1);
- //gT1 = window.setInterval("fStopTimer()",100000);
- fSleep(sleepTime);
- fHosInMPSPrint();
- }
- }
-
- if ( flag =="L" || flag == null ){
-
- //라벨 출력
- // if (chk_lblyn != "" && fChkParam(drugno, wardcd, pid) == true) {
- if (chk_lblyn != "" ) {
- fSleep(sleepTime);
- fHosInLBLPrint();
- }
- }
-
- if ( flag =="Q" ){
-
- //라벨 출력
- // if (chk_lblyn != "" && fChkParam(drugno, wardcd, pid) == true) {
- if (chk_lblyn != "" ) {
- fSleep(sleepTime/2);
- fLiquidLBLPrint();
- }
- }
- cnt++;
-
- if (model.getValue("/root/hidden/srchinfo/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();
- }
- }
- }
-
-
- if( cnt == 0 && gTimer == null){
- messageBox("처방전을 출력할 환자리스트가 없거나 선택된 환자가", "I004");
- }
-
- model.setValue("/root/send/atcinfo/drugdd", model.getValue("/root/hidden/srchinfo/prcpdd"));
- if ( model.getValue("/root/hidden/srchinfo/prcpflag") =="L" ) {
- model.setValue("/root/send/atcinfo/drugflag", "L");
- } else if ( model.getValue("/root/hidden/srchinfo/prcpflag") =="E" ) {
- model.setValue("/root/send/atcinfo/drugflag", "E");
- } else {
- model.setValue("/root/send/atcinfo/drugflag", "I");
- }
- if (model.getValue("/root/hidden/srchinfo/autoatcyn") =="Y") {
- model.setValue("/root/send/atcinfo/instcd", model.getValue("/root/hidden/srchinfo/instcd"));
- submit("TXADT10202"); //ATC Data 전송(배치호출)
- }
- }
-
- }
-
- function fStopTimer() {
- window.clearinterval(gT1);
- }
-
- /**
- * 처방전 출력
- */
- function fHosInMPSPrint() {
- var sParam = "";
- sParam = "drugdd▦drugno▦ioflag▦prcpdd▦orddd▦cretno▦prcpgenrflag▦pid▦orddeptcd▦wardcd▦lblflag▦prcpflag▦prntflag▦etcdescflag▦reprintyn▩";
- sParam += model.getValue("/root/send/prcpinfo/drugdd")+"▦"+
- model.getValue("/root/send/prcpinfo/drugno")+"▦"+
- model.getValue("/root/send/prcpinfo/ioflag")+"▦"+
- model.getValue("/root/send/prcpinfo/prcpdd")+"▦"+
- model.getValue("/root/send/prcpinfo/orddd")+"▦"+
- model.getValue("/root/send/prcpinfo/cretno")+"▦"+
- model.getValue("/root/send/prcpinfo/prcpgenrflag")+"▦"+
- model.getValue("/root/send/prcpinfo/pid")+"▦"+
- model.getValue("/root/send/prcpinfo/orddeptcd")+"▦"+
- model.getValue("/root/send/prcpinfo/wardcd")+"▦"+
- model.getValue("/root/send/prcpinfo/lblflag")+"▦"+
- //model.getValue("/root/send/prcpinfo/prcpflag")+"▦"+
- model.getValue("/root/send/prcpinfo/drugflag")+"▦"+
- model.getValue("/root/send/prcpinfo/prntflag")+"▦"+
- model.getValue("/root/hidden/srchinfo/etcdescflag")+"▦"+
- model.getValue("/root/send/prcpinfo/reprintyn")+"▩";
-
- model.setAttribute("params", sParam);
- modal("SPADT62200",0,200,200,"","");
- model.setAttribute("params", "");
- return 0;
- }
-
- /**
- * 라벨 출력
- */
- function fHosInLBLPrint() {
- var sParam = "";
- sParam = "drugdd▦drugno▦ioflag▦prcpdd▦orddd▦cretno▦prcpgenrflag▦pid▦orddeptcd▦wardcd▦lblflag▦prcpflag▦prntflag▦liquidflag▦etcdescflag▦reprintyn▩";
- sParam += model.getValue("/root/send/prcpinfo/drugdd")+"▦"+
- model.getValue("/root/send/prcpinfo/drugno")+"▦"+
- model.getValue("/root/send/prcpinfo/ioflag")+"▦"+
- model.getValue("/root/send/prcpinfo/prcpdd")+"▦"+
- model.getValue("/root/send/prcpinfo/orddd")+"▦"+
- model.getValue("/root/send/prcpinfo/cretno")+"▦"+
- model.getValue("/root/send/prcpinfo/prcpgenrflag")+"▦"+
- model.getValue("/root/send/prcpinfo/pid")+"▦"+
- model.getValue("/root/send/prcpinfo/orddeptcd")+"▦"+
- model.getValue("/root/send/prcpinfo/wardcd")+"▦"+
- model.getValue("/root/send/prcpinfo/lblflag")+"▦"+
- //model.getValue("/root/send/prcpinfo/prcpflag")+"▦"+
- model.getValue("/root/send/prcpinfo/drugflag")+"▦"+
- model.getValue("/root/send/prcpinfo/prntflag")+"▦"+
- ""+"▦"+
- model.getValue("/root/hidden/srchinfo/etcdescflag")+"▦"+
- model.getValue("/root/send/prcpinfo/reprintyn")+"▩";
-
- model.setAttribute("params", sParam);
-
- modal("SPADT62300",0,200,200,"","");
- model.setAttribute("params", "");
- // submit("TRADT60205");
-
- return 0;
- }
-
- /**
- * 물약 라벨 출력
- */
- function fLiquidLBLPrint() {
- //처방전 출력 데이터 조회
- var cnt = 0;
- for(var i = grd_patlist.fixedRows; i < grd_patlist.rows; i++){
- if(model.getValue("/root/main/patlist/patlist["+i+"]/sel") == "Y"){
- model.copyNode("/root/send/prcpinfo", "/root/main/patlist/patlist["+i+"]");
- model.makeValue("/root/send/prcpinfo/prcpflag", model.getValue("/root/hidden/srchinfo/prcpflag"));
- model.makeValue("/root/send/prcpinfo/prntflag", model.getValue("/root/hidden/srchinfo/prntflag"));
- model.makeValue("/root/send/prcpinfo/reprintyn", model.getValue("/root/hidden/srchinfo/reprintyn"));
- model.makeValue("/root/send/prcpinfo/ioflag", "I");
- var drugno = model.getValue("/root/send/prcpinfo/drugno");
- var wardcd = model.getValue("/root/send/prcpinfo/wardcd");
- var pid = model.getValue("/root/send/prcpinfo/pid");
- var sParam = "";
- sParam = "drugdd▦drugno▦ioflag▦prcpdd▦orddd▦cretno▦prcpgenrflag▦pid▦orddeptcd▦wardcd▦lblflag▦prcpflag▦prntflag▦liquidflag▦etcdescflag▦reprintyn▩";
- sParam += model.getValue("/root/send/prcpinfo/drugdd")+"▦"+
- model.getValue("/root/send/prcpinfo/drugno")+"▦"+
- model.getValue("/root/send/prcpinfo/ioflag")+"▦"+
- model.getValue("/root/send/prcpinfo/prcpdd")+"▦"+
- model.getValue("/root/send/prcpinfo/orddd")+"▦"+
- model.getValue("/root/send/prcpinfo/cretno")+"▦"+
- model.getValue("/root/send/prcpinfo/prcpgenrflag")+"▦"+
- model.getValue("/root/send/prcpinfo/pid")+"▦"+
- model.getValue("/root/send/prcpinfo/orddeptcd")+"▦"+
- model.getValue("/root/send/prcpinfo/wardcd")+"▦"+
- model.getValue("/root/send/prcpinfo/lblflag")+"▦"+
- //model.getValue("/root/send/prcpinfo/prcpflag")+"▦"+
- model.getValue("/root/send/prcpinfo/drugflag")+"▦"+
- model.getValue("/root/send/prcpinfo/prntflag")+"▦"+
- "Y"+"▦"+
- model.getValue("/root/hidden/srchinfo/etcdescflag")+"▦"+
- model.getValue("/root/send/prcpinfo/reprintyn")+"▩";
-
- model.setAttribute("params", sParam);
- modal("SPADT62300",0,200,200,"","");
- model.setAttribute("params", "");
-
- cnt++;
- }
- }
-
-
- if( cnt == 0 && gTimer == null){
- messageBox("라벨를 출력할 환자리스트가 없거나 선택된 환자가", "I004");
- }
-
- }
-
- /**
- * 자동출력 버튼 클릭시 타이머 작동
- */
- function fClickAutoPrnt(chk) {
-
- if (chk == "Y") {
- model.setValue("/root/hidden/autoend", "N") ;
- var sRst = "";
- if(gTimer != null) {
- sRst = messageBox("자동출력이 동작중입니다.\n자동출력구분설정대로 다시", "Q004");
- if(sRst == "6"){
- window.clearinterval(gTimer);
- gTimer = null;
- } else {
- return;
- }
- }
- if(sRst == ""){
- sRst = messageBox("자동출력을", "S001");
- if(sRst != "6"){
- return;
- }
- }
- btn_hist.visible=false;
- grd_sumlist.visible=false;
- grd_patlist.visible=false;
- checkbox4.visible=false;
-
- rdo_prcp.visible = false;
- rdo_prcp2.visible = false;
- checkbox7.visible = false;
- ipt_fst_drugno.visible = false;
- caption25.visible = false;
- ipt_last_drugno.visible = false;
- //cmb_ward.visible = false;
- ipt_pid.visible = false;
- model.setValue("/root/hidden/srchinfo/prcpflag", "");
- model.setValue("/root/hidden/srchinfo/fst_drugno", "");
- model.setValue("/root/hidden/srchinfo/last_drugno", "");
- model.setValue("/root/hidden/srchinfo/wardcd", "");
- model.setValue("/root/hidden/srchinfo/wardnm", "");
- model.setValue("/root/temp/srchinfo/ward", "");
- model.setValue("/root/hidden/srchinfo/pid", "");
- model.setValue("/root/hidden/srchinfo/onlyantis","");
- model.makeValue("/root/hidden/srchinfo/autoyn", "Y");
- model.refresh();
-
- window.minimize();
- fSleep(sleepTime);
- window.maximize();
- /*if(model.getValue("/root/hidden/srchinfo/auto_selflag") == "1"){
- model.setValue("/root/hidden/srchinfo/autoprntflag", model.getValue("/root/hidden/srchinfo/auto_bigflag"));
- } else {
- model.setValue("/root/hidden/srchinfo/autoprntflag", model.getValue("/root/hidden/srchinfo/auto_smallflag"));
- }*/
- btn_autoprnt_start.disabled = true;
- btn_autoprnt_end.disabled = false;
- chk_sum_count = 8;
- gTimer = window.setInterval("fAutoPrnt()",11000);
-
- //재출력 불가
- model.setValue("/root/hidden/srchinfo/reprintyn", "");
- checkbox3.disabled = true;
-
- group2.visible = "true";
-
- } else {
- window.clearinterval(gTimer);
- gTimer = null;
- btn_hist.visible=true;
- grd_sumlist.visible=true;
- grd_patlist.visible=true;
- checkbox4.visible=true;
-
- rdo_prcp.visible = true;
- rdo_prcp2.visible = true;
- checkbox7.visible = true;
- ipt_fst_drugno.visible = true;
- caption25.visible = true;
- ipt_last_drugno.visible = true;
- //cmb_ward.visible = true;
- ipt_pid.visible = true;
- model.setValue("/root/hidden/srchinfo/prcpflag", "");
- model.setValue("/root/hidden/srchinfo/fst_drugno", "");
- model.setValue("/root/hidden/srchinfo/last_drugno", "");
- model.setValue("/root/hidden/srchinfo/wardcd", "");
- model.setValue("/root/hidden/srchinfo/wardnm", "");
- model.setValue("/root/temp/srchinfo/ward", "");
- model.setValue("/root/hidden/srchinfo/pid", "");
- //model.setValue("/root/hidden/srchinfo/autoprntflag", "");
- model.makeValue("/root/hidden/srchinfo/autoyn", "");
- btn_autoprnt_start.disabled = false;
- btn_autoprnt_end.disabled = true;
- model.setValue("/root/hidden/autoend", "Y") ;
- model.refresh();
- //재출력 가능
- checkbox3.disabled = false;
-
- group2.visible = "false";
- }
- }
-
- function fReStart(){
- window.clearinterval(gTimer2);
- window.maximize();
-
- gTimer = window.setInterval("fAutoPrnt()",11000);
- }
-
- /**
- * 자동출력
- */
- function fAutoPrnt() {
- window.clearinterval(gTimer);
- if ( model.getValue("/root/hidden/autoend") =="Y" ){
- gTimer = null;
- return;
- }
- var orgPrcpflag = model.getValue("/root/hidden/srchinfo/prcpflag");
- if ( chk_count >= 50 ){
- chk_count = 0;
- window.minimize();
- gTimer2 = window.setInterval("fReStart()",5000);
-
- return;
- }
- chk_count++;
- if ( ( chk_count % 4 )=="0" ){
- caption14.text="자동 출력중[/]";
- }
- if ( ( chk_count % 4 )=="1" ){
- caption14.text="자동 출력중[―]";
- }
- if ( ( chk_count % 4 )=="2" ){
- caption14.text="자동 출력중[\]";
- }
- if ( ( chk_count % 4 )=="3" ){
- caption14.text="자동 출력중[|]";
- }
- caption14.refresh();
- if(chk_sum_count >= 8){
- if (model.getValue("/root/hidden/srchinfo/autoendyn") =="Y") {
-
- if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("M") >=0 ){
- model.setValue("/root/hidden/srchinfo/prcpflag", "M");
- fHosInSum("N"); //Admission마감
- }
- if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("W") >=0 ){
- model.setValue("/root/hidden/srchinfo/prcpflag", "W");
- fHosInSum("N"); //병동응급마감
- }
- if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("L") >=0 ){
- model.setValue("/root/hidden/srchinfo/prcpflag", "G"); // 자동일때는 외출외박으로 처리하여 응급실 퇴원약 제외
- fHosInSum("N"); //퇴원약마감
- }
- if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("G") >=0 ){
- model.setValue("/root/hidden/srchinfo/prcpflag", "G");
- fHosInSum("N"); //외박마감
- }
- if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("E") >=0 ){
- //model.setValue("/root/hidden/srchinfo/prcpflag", "Q"); //마약만 마감
- //fHosInSum("N");
- }
- }
- model.setValue("/root/hidden/srchinfo/prcpflag", "");
- chk_sum_count = 0;
- }
- chk_sum_count++;
-
- //퇴원 자동출력시 마감을 G로 해서 원래 L 값을 보내줘야함
- //model.setValue("/root/hidden/srchinfo/prcpflag", orgPrcpflag); //이훈재 막음. ( 옵션을 선택한 값임)
-
- if ( model.getValue("/root/hidden/srchinfo/autokind").indexOf("M") > -1 ){
-
- model.setValue("/root/hidden/srchinfo/prntkind", "M");
- fInSumList(); //마감시간별 미출력데이터 조회
- for(var i = grd_sumlist.fixedRows; i < grd_sumlist.rows; i++){
- chk_prnt_count++;
- grd_sumlist.isSelected(i) = true;
- grd_sumlist.row = i;
-
- model.makeValue("/root/hidden/srchinfo/autolblyn", "");
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("M"); //출력
- }
- /*
- chk_ward.visible = false;
- if(model.getValue("/root/hidden/srchinfo/autoprntflag") == "" && model.getValue("/root/hidden/srchinfo/prcpflag") == ""){
- messageBox("처방구분을", "C001")
- return;
- }
- model.copyNode("/root/send/sumlistinfo", "/root/hidden/srchinfo");
- model.makeValue("/root/hidden/srchinfo/autolblyn", "");
-
- submit("TRADT60205");
- if(model.getValue("/root/hidden/srchinfo/fst_drugno") != ""){
- model.setValue("/root/main/patlist/patlist/sel", "Y");
- }
- model.refresh();
- fPrcpMPSPrint("M"); //출력
- */
- }
-
- if ( model.getValue("/root/hidden/srchinfo/autokind").indexOf("L") > -1 ){
- model.setValue("/root/hidden/srchinfo/prntkind", "L");
- fInSumList(); //마감시간별 미출력데이터 조회
- for(var i = grd_sumlist.fixedRows; i < grd_sumlist.rows; i++){
- chk_prnt_count++;
- grd_sumlist.isSelected(i) = true;
- grd_sumlist.row = i;
- if (model.getValue("/root/hidden/srchinfo/autoyn") =="Y") {
- model.makeValue("/root/hidden/srchinfo/autolblyn", "Y");
- } else {
- model.makeValue("/root/hidden/srchinfo/autolblyn", "");
- }
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("L"); //출력
- }
- }
-
- if ( model.getValue("/root/hidden/srchinfo/autokind").indexOf("Q") > -1 ){
- model.setValue("/root/hidden/srchinfo/prntkind", "Q");
- fInSumList(); //마감시간별 미출력데이터 조회
- for(var i = grd_sumlist.fixedRows; i < grd_sumlist.rows; i++){
- chk_prnt_count++;
- grd_sumlist.isSelected(i) = true;
- grd_sumlist.row = i;
- if (model.getValue("/root/hidden/srchinfo/autoyn") =="Y") {
- model.makeValue("/root/hidden/srchinfo/autolblyn", "Y");
- } else {
- model.makeValue("/root/hidden/srchinfo/autolblyn", "");
- }
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("Q"); //출력
- //var gT1 = window.setInterval("fDelay()",10000);
- //window.clearinterval(gT1);
- }
- }
- if (model.getValue("/root/hidden/srchinfo/autoatcyn") =="Y") {
- //ATC전송
-
- model.setValue("/root/send/atcinfo/drugdd", model.getValue("/root/hidden/srchinfo/prcpdd"));
-
- if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("L") > -1 ) {
- model.setValue("/root/send/atcinfo/drugflag", "L");
- model.setValue("/root/send/atcinfo/instcd", model.getValue("/root/hidden/srchinfo/instcd"));
- submit("TXADT10202"); //ATC Data 전송(배치호출)
- }
- if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("E") > -1 ) {
- model.setValue("/root/send/atcinfo/drugflag", "E");
- model.setValue("/root/send/atcinfo/instcd", model.getValue("/root/hidden/srchinfo/instcd"));
- submit("TXADT10202"); //ATC Data 전송(배치호출)
- }
- //if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("L") == -1 && model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("E") == -1 ){
- model.setValue("/root/send/atcinfo/drugflag", "I");
-
- model.setValue("/root/send/atcinfo/instcd", model.getValue("/root/hidden/srchinfo/instcd"));
- submit("TXADT10202"); //ATC Data 전송(배치호출)
- //}
- }
- gTimer = window.setInterval("fAutoPrnt()",11000);
- }
-
-
- function fSleep(numberMillis) {
- var now = new Date();
- var exitTime = now.getTime() + numberMillis;
-
-
- while (true) {
- now = new Date();
- if (now.getTime() > exitTime)
- return;
- }
- }
-
-
-
- /**
- * 투약번호 변경시
- */
- function fChgDrugno(flag) {
- var bResult = true;
- if(flag == "first"){
- var chk = model.getValue("/root/hidden/srchinfo/fst_drugno");
- if(chk == ""){
- model.setValue("/root/hidden/srchinfo/last_drugno", "");
- model.refresh();
- bResult = false;
- } else {
- if(isNaN(chk)){
- messageBox("투약번호는 숫자로","C001");
- model.setValue("/root/hidden/srchinfo/fst_drugno", "");
- model.refresh();
- bResult = false;
- }
- if(chk.length > 5){
- messageBox("투약번호는 5자리미만으로","C001");
- model.setValue("/root/hidden/srchinfo/fst_drugno", "");
- model.refresh();
- bResult = false;
- }
- }
- } else if(flag == "last"){
- var chk_fst = model.getValue("/root/hidden/srchinfo/fst_drugno");
- var chk_last = model.getValue("/root/hidden/srchinfo/fst_drugno");
- if(chk_fst == ""){
- messageBox("첫번째 투약번호부터","C001");
- model.setValue("/root/hidden/srchinfo/last_drugno", "");
- bResult = false;
- } else {
- if(isNaN(chk_fst)){
- messageBox("투약번호는 숫자로","C001");
- model.setValue("/root/hidden/srchinfo/fst_drugno", "");
- bResult = false;
- }
- if(chk_fst.length > 5 ){
- messageBox("투약번호는 5자리미만으로","C001");
- model.setValue("/root/hidden/srchinfo/fst_drugno", "");
- bResult = false;
- }
- if(isNaN(chk_last)){
- messageBox("투약번호는 숫자로","C001");
- model.setValue("/root/hidden/srchinfo/last_drugno", "");
- bResult = false;
- }
- if(chk_last.length > 5 ){
- messageBox("투약번호는 5자리미만으로","C001");
- model.setValue("/root/hidden/srchinfo/last_drugno", "");
- bResult = false;
- }
- }
- model.refresh();
- }
- return bResult;
- }
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body guideline="1,1195;1,0;1,1327;2,783;2,756;1,0;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- if (event.keyCode==121){
- checkbox5.visible=true;
- checkbox6.visible=true;
- }
- ]]>
- </script>
- <line id="line13" class="line_2" style="x1:0px; y1:422px; x2:570px; y2:422px; "/>
- <line id="line8" class="line_2" style="x1:0px; y1:314px; x2:570px; y2:314px; "/>
- <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">병동처방전출력(Ver N0114)</caption>
- </group>
- <button id="button20" class="btn4_letter2" visibility="hidden" style="left:575px; top:448px; width:56px; height:22px; ">
- <caption>종료</caption>
- </button>
- <line id="line6" class="line_2" style="x1:0px; y1:63px; x2:570px; y2:63px; "/>
- <line id="line9" class="line_2" style="x1:0px; y1:165px; x2:570px; y2:165px; "/>
- <line id="line10" class="line_2" style="x1:0px; y1:268px; x2:570px; y2:268px; "/>
- <line id="line11" class="line_2" style="x1:0px; y1:293px; x2:570px; y2:293px; "/>
- <caption id="caption20" class="cell_1" style="left:0px; top:193px; width:80px; height:23px; vertical-align:middle; ">병동</caption>
- <line id="line12" class="line_2" style="x1:0px; y1:191px; x2:570px; y2:191px; "/>
- <caption id="caption21" class="cell_1" style="left:0px; top:218px; width:80px; height:23px; vertical-align:middle; ">등록번호</caption>
- <line id="line14" class="line_2" style="x1:0px; y1:216px; x2:570px; y2:216px; "/>
- <caption id="caption13" class="cell_1" style="left:0px; top:65px; width:80px; height:45px; vertical-align:middle; ">처방구분</caption>
- <caption id="caption22" class="cell_1" style="left:0px; top:40px; width:80px; height:23px; vertical-align:middle; ">적용일자</caption>
- <caption id="caption24" class="cell_1" style="left:0px; top:245px; width:80px; height:70px; vertical-align:middle; ">출력구분</caption>
- <caption id="caption25" style="left:190px; top:168px; width:30px; height:25px; font-weight:bold; vertical-align:middle; ">~</caption>
- <caption id="caption26" class="cell_1" style="left:0px; top:400px; width:80px; height:23px; vertical-align:middle; ">처방구분</caption>
- <line id="line15" class="line_2" style="x1:0px; y1:241px; x2:570px; y2:241px; "/>
- <line id="line17" class="line_1" style="x1:0px; y1:35px; x2:570px; y2:35px; "/>
- <button id="button25" class="btn3_letter4" style="left:0px; top:345px; width:80px; height:22px; ">
- <caption>출력결과</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- messageBox("개발중", "E008");
- ]]>
- </script>
- </button>
- <button id="button5" class="icon_search" visibility="visible" style="left:420px; top:195px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- if(chk_ward.visible==true){
- chk_ward.visible = false;
- }else {
- chk_ward.visible = true;
- }
-
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_prt" class="btn6_letter2" style="left:510px; top:345px; width:56px; height:22px; ">
- <caption>출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(model.getValue("/root/hidden/srchinfo/fst_drugno") != "" || model.getValue("/root/hidden/srchinfo/fst_drugno") != "") {
- //setInputNodeCurText();
- var bResult = fChgDrugno("first");
- if(bResult){
- fInSumList();
-
- if(grd_patlist.rows > 1) {
- model.setValue("/root/main/patlist/patlist/sel", "Y");
- }
- //fPrcpMPSPrint();
- }
- }
- prntcheck = "Y"
- fPrcpMPSPrint();
-
- ]]>
- </script>
- </button>
- <button id="button1" class="btn6_letter2" style="left:510px; top:75px; width:56px; height:22px; ">
- <caption>마감</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if ( model.getValue("/root/hidden/srchinfo/prcpflag") =="E" ){
- messageBox("응급실은 마감할 수 없습니다.", "E999");
- return;
- }
- fHosInSum("Y");
- fInSumList();
- ]]>
- </script>
- </button>
- <select id="chk_mps" ref="/root/hidden/srchinfo/mpsflag" overflow="visible" appearance="full" cellspacing="10" cols="2" rows="1" sep="|" style="left:85px; top:247px; width:105px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>처방전</label>
- <value>P</value>
- </item>
- </choices>
- </select>
- <select id="chk_lbl_drug" ref="/root/hidden/srchinfo/lbl_drug" overflow="visible" appearance="full" cellspacing="10" cols="10" rows="1" sep="|" style="left:240px; top:275px; width:280px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>정제</label>
- <value>D</value>
- </item>
- <item>
- <label>PTP</label>
- <value>DT</value>
- </item>
- <item>
- <label>기타약</label>
- <value>DX</value>
- </item>
- <item>
- <label>향정</label>
- <value>DH</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if(model.getValue("/root/hidden/srchinfo/lbl_drug") == ""){
- if(model.getValue("/root/hidden/srchinfo/lbl_inj") == ""){
- model.setValue("/root/hidden/srchinfo/lblyn", "");
- }
- } else {
- model.setValue("/root/hidden/srchinfo/lblyn", "Y");
- }
- model.refresh();
- ]]>
- </script>
- </select>
- <select id="chk_lbl_inj" ref="/root/hidden/srchinfo/lbl_inj" overflow="visible" appearance="full" cellspacing="10" cols="10" rows="1" sep="|" style="left:240px; top:298px; width:315px; height:18px; border-style:none; ">
- <choices>
- <item>
- <label>일반주사</label>
- <value>I</value>
- </item>
- <item>
- <label>영양수액</label>
- <value>IO</value>
- </item>
- <item>
- <label>기타</label>
- <value>IX</value>
- </item>
- <item>
- <label>향정</label>
- <value>IH</value>
- </item>
- </choices>
- </select>
- <input id="ipt_prcpdd" ref="/root/hidden/srchinfo/prcpdd" class="input_default" inputtype="date" style="left:85px; top:41px; width:135px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fInSumList();
- ]]>
- </script>
- </input>
- <input id="ipt_fst_drugno" ref="/root/hidden/srchinfo/fst_drugno" class="input_search" autonext="false" maxlength="5" format="99999" style="left:85px; top:169px; width:100px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fChgDrugno("first");
- ]]>
- </script>
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- if(event.keyCode == "13") {
- setInputNodeCurText();
- var bResult = fChgDrugno("first");
- if(bResult){
- fInSumList();
-
- if(grd_patlist.rows > 1) {
- model.setValue("/root/main/patlist/patlist/sel", "Y");
- }
- //fPrcpMPSPrint();
- }
- }
- ]]>
- </script>
- </input>
- <input id="ipt_last_drugno" ref="/root/hidden/srchinfo/last_drugno" class="input_search" autonext="false" maxlength="5" format="99999" style="left:205px; top:169px; width:100px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fChgDrugno("last");
- ]]>
- </script>
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- if(event.keyCode == "13") {
- setInputNodeCurText();
- var bResult = fChgDrugno("last");
- if(bResult){
- fInSumList();
- model.setValue("/root/main/patlist/patlist/sel", "Y");
- //fPrcpMPSPrint();
- }
- }
- ]]>
- </script>
- </input>
- <input id="ipt_pid" ref="/root/hidden/srchinfo/pid" class="input_default" autonext="false" maxlength="10" style="left:85px; top:219px; width:100px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- if(event.keyCode == "13") {
- setInputNodeCurText();
- fInSumList();
- }
- ]]>
- </script>
- </input>
- <select id="chk_lbl" ref="/root/hidden/srchinfo/lblyn" overflow="visible" appearance="full" style="left:85px; top:275px; width:55px; height:15px; border-style:none; ">
- <choices>
- <item>
- <label>라벨</label>
- <value>Y</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fChkLBL_YN();
- ]]>
- </script>
- </select>
- <output id="output1" ref="/root/hidden/srchinfo/instcd" visibility="hidden" style="left:640px; top:448px; width:100px; height:19px; "/>
- <datagrid id="grd_sumlist" nodeset="/root/main/sumlist/sumlist" caption="마감일자^마감시간^sumdt^처방구분^건수^sumflag^drugkind" colsep="^" colwidth="80, 60, 60, 60, 40, 50, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:575px; top:35px; width:260px; height:305px; ">
- <col ref="sumdd" format="yyyy-mm-dd" style="text-align:center; vertical-align:middle; "/>
- <col ref="sumtm" format="hh:nn:ss" style="text-align:center; vertical-align:middle; "/>
- <col ref="sumdt" visibility="hidden" style="text-align:center; vertical-align:middle; "/>
- <col ref="prcpflagnm" style="text-align:center; vertical-align:middle; "/>
- <col ref="cnt" style="text-align:right; vertical-align:middle; "/>
- <col ref="sumflag" visibility="hidden" style="text-align:center; vertical-align:middle; "/>
- <col ref="drugkind" visibility="hidden"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- fPrntPatList();
- ]]>
- </script>
- </datagrid>
- <datagrid id="grd_patlist" nodeset="/root/main/patlist/patlist" visibility="visible" caption="^출력^drugdd^투약번호^병동^환자번호^성명^처방일^orddd^cretno^orddeptcd^진료과^진료의사^prcpgenrflag^wardcd^출력시간^drugflag" colsep="^" colwidth="36, 45, 70, 61, 80, 70, 69, 80, 61, 43, 67, 90, 85, 84, 100, 100, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:835px; top:35px; width:350px; height:305px; ">
- <col checkvalue="Y,N" ref="sel" type="checkbox"/>
- <col ref="prnttims" style="text-align:right; "/>
- <col ref="drugdd" visibility="hidden" style="text-align:right; "/>
- <col ref="drugno" style="text-align:right; "/>
- <col ref="wardnm" style="text-align:center; "/>
- <col ref="pid" style="text-align:center; "/>
- <col ref="patnm" style="text-align:center; "/>
- <col ref="prcpdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="orddd" visibility="hidden"/>
- <col ref="cretno" visibility="hidden"/>
- <col ref="orddeptcd" visibility="hidden"/>
- <col ref="orddeptnm" style="text-align:center; "/>
- <col ref="orddrnm" style="text-align:center; "/>
- <col ref="prcpgenrflag" visibility="hidden"/>
- <col ref="wardcd" visibility="hidden"/>
- <col ref="prntdt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
- <col ref="drugflag" visibility="hidden"/>
- </datagrid>
- <button id="btn_sea" class="btn1_letter2" visibility="visible" style="left:510px; top:40px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fInSumList();
- ]]>
- </script>
- </button>
- <select1 id="rdo_prcp" ref="/root/hidden/srchinfo/prcpflag" class="radio_search" appearance="full" cellspacing="6" cols="7" overflow="visible" style="left:86px; top:67px; width:114px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>정규</label>
- <value>R</value>
- </item>
- <item>
- <label>추가</label>
- <value>A</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fInSumList();
- ]]>
- </script>
- </select1>
- <caption id="caption1" class="cell_1" style="left:0px; top:168px; width:80px; height:23px; vertical-align:middle; ">투약번호</caption>
- <caption id="caption2" class="cell_1" style="left:0px; top:118px; width:80px; height:23px; vertical-align:middle; ">약주사구분</caption>
- <select1 id="radio1" ref="/root/hidden/srchinfo/drugkind" class="radio_search" appearance="full" cols="3" overflow="visible" style="left:86px; top:120px; width:165px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>전체</label>
- <value>T</value>
- </item>
- <item>
- <label>약</label>
- <value>D</value>
- </item>
- <item>
- <label>주사</label>
- <value>M</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fInSumList();
- ]]>
- </script>
- </select1>
- <button id="btn_autoprnt_start" class="btn1_letter6" style="left:355px; top:448px; width:104px; height:22px; ">
- <caption>자동출력시작</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fClickAutoPrnt("Y");
- ]]>
- </script>
- </button>
- <button id="btn_autoprnt_end" class="btn1_letter6" style="left:462px; top:448px; width:104px; height:22px; ">
- <caption>자동출력종료</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fClickAutoPrnt("N");
- ]]>
- </script>
- </button>
- <select id="chk_auto_big" ref="/root/hidden/srchinfo/autokind" overflow="visible" appearance="full" cellspacing="34" cols="3" sep="|" style="left:85px; top:426px; width:305px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>처방전</label>
- <value>M</value>
- </item>
- <item>
- <label>라벨</label>
- <value>L</value>
- </item>
- <item>
- <label>물약라벨</label>
- <value>Q</value>
- </item>
- </choices>
- </select>
- <select id="chk_auto_small" ref="/root/hidden/srchinfo/autoprntflag" overflow="visible" appearance="full" cellspacing="12" cols="5" sep="|" style="left:85px; top:401px; width:375px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>Admission</label>
- <value>M</value>
- </item>
- <item>
- <label>병동응급</label>
- <value>W</value>
- </item>
- <item>
- <label>응급실</label>
- <value>E</value>
- </item>
- <item>
- <label>퇴원</label>
- <value>L</value>
- </item>
- <item>
- <label>외박</label>
- <value>G</value>
- </item>
- </choices>
- </select>
- <button id="btn_init" class="btn1_letter3" style="left:498px; top:193px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.setValue("/root/hidden/srchinfo/fst_drugno", "");
- model.setValue("/root/hidden/srchinfo/last_drugno", "");
- model.setValue("/root/hidden/srchinfo/wardcd", "");
- model.setValue("/root/hidden/srchinfo/wardnm", "");
- model.setValue("/root/temp/srchinfo/ward", "");
- model.setValue("/root/hidden/srchinfo/pid", "");
- model.refresh();
- fInSumList();
- ]]>
- </script>
- </button>
- <line id="line2" class="line_2" style="x1:0px; y1:398px; x2:570px; y2:398px; "/>
- <button id="btn_hist" class="btn2_letter5" style="left:835px; top:15px; width:75px; height:19px; ">
- <caption>미출력선택</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- for ( var i = 1 ; i < grd_patlist.rows; i++){
- if ( parseInt (model.getValue("/root/main/patlist/patlist["+i+"]/prnttims")) ==0 ){
- model.setValue( "/root/main/patlist/patlist["+i+"]/sel", "Y");
- } else {
- model.setValue( "/root/main/patlist/patlist["+i+"]/sel", "N");
- }
- }
- model.refresh();
- ]]>
- </script>
- </button>
- <caption id="caption3" class="cell_1" style="left:0px; top:143px; width:80px; height:23px; vertical-align:middle; ">기타조회구분</caption>
- <select1 id="radio3" ref="/root/hidden/srchinfo/etcflag" appearance="full" cols="2" overflow="visible" style="left:86px; top:144px; width:130px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>전체</label>
- <value>T</value>
- </item>
- <item>
- <label>특정구분만</label>
- <value>Y</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if(model.getValue("/root/hidden/srchinfo/etcflag") == "T"){
- model.setValue("/root/hidden/srchinfo/etcdescflag", "");
- cbx_etcdescflag.disabled = true;
- } else {
- model.setValue("/root/hidden/srchinfo/etcdescflag", "");
- cbx_etcdescflag.disabled = false;
- }
- model.refresh();
- fInSumList();
- ]]>
- </script>
- </select1>
- <select id="cbx_etcdescflag" ref="/root/hidden/srchinfo/etcdescflag" overflow="visible" appearance="full" cols="3" sep="|" style="left:220px; top:144px; width:175px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>고가</label>
- <value>E</value>
- </item>
- <item>
- <label>산제</label>
- <value>P</value>
- </item>
- <item>
- <label>향정</label>
- <value>H</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fInSumList();
- ]]>
- </script>
- </select>
- <button id="button2" class="btn6_letter4" style="left:425px; top:345px; width:80px; height:22px; ">
- <caption>물약라벨</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- prntcheck = "Y"
- fLiquidLBLPrint();
-
- ]]>
- </script>
- </button>
- <caption id="caption4" class="tit_2" style="left:5px; top:20px; width:185px; height:14px; ">마감 및 출력</caption>
- <line id="line4" class="line_2" style="x1:0px; y1:110px; x2:570px; y2:110px; "/>
- <line id="line5" class="line_2" style="x1:0px; y1:140px; x2:570px; y2:140px; "/>
- <caption id="caption5" class="tit_2" style="left:5px; top:380px; width:185px; height:13px; ">자동출력</caption>
- <line id="line7" class="line_1" style="x1:0px; y1:395px; x2:570px; y2:395px; "/>
- <select id="checkbox1" ref="/root/hidden/srchinfo/drugall" overflow="visible" appearance="full" style="left:150px; top:275px; width:55px; height:15px; border-style:none; ">
- <choices>
- <item>
- <label>약</label>
- <value>Y</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var chk = model.getValue("/root/hidden/srchinfo/drugall");
- var sLbl_Drug = "D|DT|DX|DH";
- var sLbl_Inj = "I|IO|IX|IH";
-
-
- if(chk == "Y"){
- model.makeValue("/root/hidden/srchinfo/lbl_drug", sLbl_Drug);
- } else {
- model.makeValue("/root/hidden/srchinfo/lbl_drug", "");
- }
- model.refresh();
- ]]>
- </script>
- </select>
- <select id="checkbox2" ref="/root/hidden/srchinfo/injall" overflow="visible" appearance="full" style="left:150px; top:298px; width:55px; height:15px; border-style:none; ">
- <choices>
- <item>
- <label>주사</label>
- <value>Y</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var chk = model.getValue("/root/hidden/srchinfo/injall");
- var sLbl_Drug = "D|DT|DX|DH";
- var sLbl_Inj = "I|IO|IX|IH";
-
-
- if(chk == "Y"){
- model.makeValue("/root/hidden/srchinfo/lbl_inj", sLbl_Inj);
- } else {
- model.makeValue("/root/hidden/srchinfo/lbl_inj", "");
- }
- model.refresh();
- ]]>
- </script>
- </select>
- <caption id="caption7" autoresize="true" style="left:225px; top:277px; width:10px; height:15px; ">(</caption>
- <caption id="caption8" autoresize="true" style="left:225px; top:300px; width:10px; height:15px; ">(</caption>
- <caption id="caption9" autoresize="true" style="left:555px; top:300px; width:10px; height:15px; ">)</caption>
- <caption id="caption10" autoresize="true" style="left:555px; top:277px; width:10px; height:15px; ">)</caption>
- <input id="ipt_wardnm" ref="/root/hidden/srchinfo/wardnm" class="input_search" disabled="true" style="left:85px; top:195px; width:325px; height:19px; "/>
- <input id="ipt_wardcd" ref="/root/hidden/srchinfo/wardcd" class="input_search" visibility="hidden" style="left:295px; top:215px; width:140px; height:19px; "/>
- <select id="checkbox3" ref="/root/hidden/srchinfo/reprintyn" overflow="visible" appearance="full" cellspacing="10" cols="2" rows="1" sep="|" style="left:85px; top:320px; width:105px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>재출력</label>
- <value>Y</value>
- </item>
- </choices>
- </select>
- <caption id="caption11" class="cell_1" style="left:0px; top:318px; width:80px; height:23px; font-weight:bold; vertical-align:middle; ">재출력</caption>
- <caption id="caption12" class="cell_1" style="left:0px; top:424px; width:80px; height:23px; vertical-align:middle; ">출력구분</caption>
- <line id="line3" class="line_3" style="x1:0px; y1:446px; x2:570px; y2:446px; "/>
- <line id="line1" class="line_3" style="x1:0px; y1:340px; x2:570px; y2:340px; "/>
- <select1 id="rdo_prcp2" ref="/root/hidden/srchinfo/prcpflag" class="radio_search" appearance="full" cellspacing="6" cols="7" overflow="visible" style="left:86px; top:90px; width:344px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>Admission</label>
- <value>M</value>
- </item>
- <item>
- <label>병동응급</label>
- <value>W</value>
- </item>
- <item>
- <label>퇴원</label>
- <value>L</value>
- </item>
- <item>
- <label>외박</label>
- <value>G</value>
- </item>
- <item>
- <label>응급실</label>
- <value>E</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fInSumList();
- ]]>
- </script>
- </select1>
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if(event.keyCode == "115") { //F4키를 누르면 자동출력 중지
- prntcheck = "N"
- }
- ]]>
- </script>
- <group id="group2" visibility="hidden" style="left:575px; top:360px; width:605px; height:90px; background-color:#ffff99; ">
- <caption id="caption14" style="left:0px; top:15px; width:595px; height:75px; font-size:48pt; font-weight:bold; color:#ff0000; ">자동 출력 중</caption>
- </group>
- <select id="checkbox4" ref="/root/hidden/srchinfo/onlyantis" class="checkbox_search" overflow="visible" appearance="full" cellspacing="10" cols="2" rows="1" sep="|" style="left:205px; top:67px; width:160px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>항암프로토콜처방만</label>
- <value>Y</value>
- </item>
- </choices>
- </select>
- <caption id="caption15" style="left:235px; top:347px; width:55px; height:15px; ">출력간격</caption>
- <caption id="caption16" style="left:340px; top:347px; width:20px; height:15px; ">초</caption>
- <input id="input1" ref="/root/hidden/sleeptime" class="input_default" visibility="visible" style="left:290px; top:345px; width:45px; height:19px; "/>
- <select id="checkbox5" ref="/root/hidden/srchinfo/autoatcyn" visibility="hidden" overflow="visible" appearance="full" cellspacing="10" cols="2" rows="1" sep="|" style="left:495px; top:425px; width:65px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>ATC전송</label>
- <value>Y</value>
- </item>
- </choices>
- </select>
- <select id="checkbox6" ref="/root/hidden/srchinfo/autoendyn" visibility="hidden" overflow="visible" appearance="full" cellspacing="10" cols="2" rows="1" sep="|" style="left:420px; top:425px; width:65px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>마감작업</label>
- <value>Y</value>
- </item>
- </choices>
- </select>
- <select id="checkbox7" ref="/root/hidden/srchinfo/autodscyn" overflow="visible" appearance="full" style="left:375px; top:67px; width:95px; height:15px; border-style:none; ">
- <choices>
- <item>
- <label>DSC퇴원제외</label>
- <value>Y</value>
- </item>
- </choices>
- <hint>
- <![CDATA[처방구분이 퇴원이 선택된 경우만 적용됩니다.]]>
- </hint>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fInSumList();
- ]]>
- </script>
- </select>
- <select id="checkbox8" ref="/root/hidden/srchinfo/autodscyn" overflow="visible" appearance="full" style="left:440px; top:401px; width:95px; height:15px; border-style:none; ">
- <choices>
- <item>
- <label>DSC퇴원제외</label>
- <value>Y</value>
- </item>
- </choices>
- <hint>
- <![CDATA[처방구분이 퇴원이 선택된 경우만 적용됩니다.]]>
- </hint>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fInSumList();
- ]]>
- </script>
- </select>
- <select id="chk_ward" ref="/root/temp/srchinfo/ward" class="checkbox_search" visibility="hidden" overflow="visible" appearance="full" cols="2" sep="|" style="left:85px; top:215px; width:205px; height:15px; background-color:#e5eae9; border-style:none; ">
- <choices>
- <itemset nodeset="/root/hidden/deptlist/ward">
- <label ref="wardnm"/>
- <value ref="wardcd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- //if(isSearchString(model.getValue("/root/temp/srchinfo/ward"),"T")){
- if(chk_ward.mouseRow == 0){
- if(isSearchString(model.getValue("/root/temp/srchinfo/ward"),"T")){
- //ipt_wardcd.value = "2100300000|2110200000|2110201000|2280200000|2360800000|2361501000|3050107000|3050108000|3050109000|3050110000|3050112000|3050113000|3050115000|3050116000|3050118000|3050119000|3050120000|3050121000|3050122000|3050123000|3050135000|3050136000|3060000000|3060100000|3060200000|3060300000|3060400000|3060600000|3120400000";
- //ipt_wardnm.value = "분만실|신생아실|신생아중환자실|응급의료센터|통원수술센터|임상시험센터병동|04층동병동|04층서병동|05층동병동|05층서병동|06층동병동|06층서병동|07층동병동|07층서병동|08층동병동|08층서병동|09층동병동|09층서병동|10층동병동|10층서병동|응급병동|호스피스병동|중환자실|내과중환자실|외과중환자실|신경외과중환자실|순환기계중환자실|2층중환자실|특수주사실특수주사";
- model.setValue("/root/temp/srchinfo/ward", "T|2100300000|2110200000|2110201000|2280200000|2360800000|2361501000|3050107000|3050108000|3050109000|3050110000|3050112000|3050113000|3050115000|3050116000|3050118000|3050119000|3050120000|3050121000|3050122000|3050123000|3050135000|3050136000|3060000000|3060100000|3060200000|3060300000|3060400000|3060600000|3120400000");
- } else {
- //ipt_wardcd.value = "";
- //ipt_wardnm.value = "";
- model.setValue("/root/temp/srchinfo/ward", "");
- }
- model.refresh();
- }
- if(isSearchString(model.getValue("/root/temp/srchinfo/ward"),"T")){
- ipt_wardcd.value = chk_ward.value.substr(2,chk_ward.value.length);
- ipt_wardnm.value = chk_ward.label.substr(3,chk_ward.label.length);
- } else {
- ipt_wardcd.value = chk_ward.value;
- ipt_wardnm.value = chk_ward.label;
- }
- //input3.refresh();
- //검사실 체크박스 감추기
- //chk_excuroom.visible = false;
- ]]>
- </script>
- </select>
- </xhtml:body>
- </xhtml:html>
|