123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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>
- <crdruglist>
- <item>
- <sel/>
- <drugstatnm/>
- <pid/>
- <hngnm/>
- <crflag/>
- <orddeptnm/>
- <wardnm/>
- <orddrnm/>
- <drugno/>
- <clincstdycd/>
- <prcpno/>
- <prcpcd/>
- <prcpnm/>
- <prcpqty/>
- <prcpqtyunit/>
- <prcptims/>
- <prcpdayno/>
- <totqty/>
- <totqtyunit/>
- <delivedt/>
- <deliveid/>
- <prcphistcd/>
- <drugstat/>
- <ioflag/>
- <hosinhosoutflag/>
- <drugdd/>
- </item>
- </crdruglist>
- <paramdata>
- <param>
- <pid/>
- <orddd/>
- <cretno/>
- <orddeptcd/>
- <orddrid/>
- <prcpdd/>
- <drugdd/>
- <drugno/>
- </param>
- </paramdata>
- <barcdprntsetup>
- </barcdprntsetup>
- </main>
- <send>
- <srchinfo>
- <srchprcpdd/>
- <srchtoprcpdd/>
- <srchioflag>A</srchioflag>
- <srchwardcd/>
- <srchorddeptcd/>
- <srchbcno/>
- <srchpid/>
- <srchdrugcd/>
- <srchorddrid/>
- </srchinfo>
- <deptinfo>
- <deptflag/>
- </deptinfo>
- <paramsrch/>
- <req>
- <drugdd/>
- <drugno/>
- <ioflag/>
- <drugstat/>
- <dispflag/>
- <dispcnts/>
- <inputtm/>
- <userid/>
- <stocdeptcd/>
- <instcd/>
- <crdrugprintflag/>
- </req>
- <scrnid/>
- </send>
- <init>
- <deptlist>
- <ward>
- <wardnm/>
- <wardcd/>
- </ward>
- </deptlist>
- <orddept>
- <dept>
- <depthngnm/>
- <deptcd/>
- </dept>
- </orddept>
- <autoflag/>
- <barcdprntsetup>
- <setupinfo/>
- </barcdprntsetup>
- <orddrlist>
- <usernm/>
- <userid/>
- </orddrlist>
- </init>
- <hidden>
- <prcpsrch>
- <drugno/>
- <prntflag/>
- <stocdeptcd/>
- </prcpsrch>
- </hidden>
- <temp>
- <ret/>
- </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/tfHelper.js"/>
- <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
- <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- // 진료과
- zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), "orduseyn", "D", "/root/init/orddept"); //부서코드 콤보조회
- astfAddCombo("/root/init/orddept","dept","deptcd,depthngnm",",전체");
-
- //병동 Combo 조회
- model.setValue("/root/send/deptinfo/deptflag", "W");
- success = submit("TRADT10204");
- if (success) astfAddCombo("/root/init/deptlist","ward","wardcd,wardnm",",전체");
-
- model.setValue("/root/send/srchinfo/srchprcpdd", getCurrentDate());
- model.setValue("/root/send/srchinfo/srchtoprcpdd", getCurrentDate());
- model.refresh();
- grd_crdruglist.fixedcellcheckbox(0,1) = true;
-
-
- //바코드프린터설정 초기화
- model.setValue("/root/send/scrnid", getScreenID());
- submit("TRLLC90101");
-
- var comm = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm");
- var prntkind = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind");
- if(comm == "2") {
- model.setValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm", "1");
- }
- if(prntkind == "1") {
- model.setValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind", "5");
- }
-
- grd_crdruglist.fixedcellcheckbox(0,3) = true;
-
- //1일기준인지 1회기준인지 체크하여 컬럼을 hidden
- var colHidnValue = grdBaseColHidn("D");
- //1회 기준
- if( colHidnValue == "C") {
- grd_crdruglist.colHidden(grd_crdruglist.colRef("prcpqty")) = true;
- } else {
- grd_crdruglist.colHidden(grd_crdruglist.colRef("prcpqty2")) = true;
- }
-
- // 출고부서 조회, 설정
- submit("TRADT01106");
- if(combo3.length == 1) {
- combo3.select(0);
- } else {
- // 2010.01.25 pymi 입원주사조제실 제거
- if(model.getValue("/root/init/misdeptlist/deptlist[1]/deptcd") == "3242104000") {
- combo3.choices.itemset.attribute("nodeset") = "/root/init/misdeptlist/deptlist[deptcd != '3242104000' ]";
- combo3.refresh();
- } else {
- combo3.select(0); // 20101019_laboru_경북대병원_cmc 셋팅을 경북대병원용으로 변경
- }
- }
- ]]>
- </script>
- <script id="script1" type="javascript">
- <![CDATA[
- var gTimer;
-
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- function fExeSaveToExcel(){
- var fileName = window.fileDialog("save", ",", false, "임상약리스트"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
-
- if (fileName != "")
- {
- grd_crdruglist.saveExcel(fileName);
- }
- }
-
- /**
- * 처방전/라벨 출력
- */
- function fPrcpMPSPrint() {
-
- var chk_drugno = model.getValue("/root/hidden/prcpsrch/drugno");
-
- model.setValue("/root/hidden/prcpsrch/prntflag", "Y");
- model.copyNode("/root/send/paramsrch","/root/hidden/prcpsrch");
-
- //원외 처방전 출력
- fHosOutMPSPrint();
- }
-
-
- /**
- * 라벨 출력
- */
- function fHosInLBLPrint() {
- var sParam = "";
- var drugdd ="";
- var drugno ="";
- var ioflag ="";
- for ( var i = 1 ; i<grd_crdruglist.rows; i++){
- if(model.getValue("/root/main/crdruglist/item["+i+"]/sel")=="Y"){
- if ( drugdd + drugno + ioflag != model.getValue("/root/main/crdruglist/item["+i+"]/drugdd")+model.getValue("/root/main/crdruglist/item["+i+"]/drugno")+model.getValue("/root/main/crdruglist/item["+i+"]/ioflag")){
- drugdd =model.getValue("/root/main/crdruglist/item["+i+"]/drugdd");
- drugno =model.getValue("/root/main/crdruglist/item["+i+"]/drugno");
- ioflag =model.getValue("/root/main/crdruglist/item["+i+"]/ioflag");
-
- sParam = "drugdd▦drugno▦ioflag▦prcpdd▦orddd▦cretno▦prcpgenrflag▦pid▦orddeptcd▦wardcd▦lblflag▦prcpflag▦prntflag▦drugflag▩";
- sParam += model.getValue("/root/main/crdruglist/item["+i+"]/drugdd")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/drugno")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/ioflag")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/prcpdd")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/orddd")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/cretno")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/prcpgenrflag")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/pid")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/orddeptcd")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/wardcd")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/lblflag")+"▦"+
- //model.getValue("/root/main/crdruglist/item["+i+"]/prcpflag")+"▦"+
- //20110111_laboru_경북대병원_임상약 라벨위해 flag 값 셋팅
- "R" +"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/prntflag")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/drugflag")+"▦"+
- //""+"▦"+""+"▦"+"C"+"▩"; // 20100325_laboru_라벨출력
- model.getValue("/root/main/crdruglist/item["+i+"]/prcpno")+"▦"+""+"▦"+"C"+"▩"; // 20100325_laboru_라벨출력
-
-
- model.setAttribute("params", sParam);
- model.copyNode("/root/init/barcdprntsetup", "/root/main/barcdprntsetup");
- //modal("SPADT63300",0,200,200,"SPADT63300","/root/init/barcdprntsetup","/root/init/barcdprntsetup");
- modal("SPADT63300",0,200,200,"SPADT63300","/root","/root"); // 20101220 wify 경북대병원 라벨출력방식 rexpert로 변경
- model.setAttribute("params", "");
- }
- }
- }
-
-
- // submit("TRADT10205");
-
- }
- /**
- * 원외 처방전 출력
- */
- function fHosOutMPSPrint() {
- var sParam = "";
- var drugno ="";
- for ( var i = 1 ; i<grd_crdruglist.rows; i++){
- //********* 자동출력시 외래 원외 처방은 제외========== 2008.10.29 김귀남*************************************************************
- var b_prntyn = false;
- // autoflag =1 : 자동출력
- if(model.getValue("/root/init/autoflag") == 1){
- if(model.getValue("/root/main/crdruglist/item["+i+"]/sel")=="Y" && model.getValue("/root/main/crdruglist/item["+i+"]/hosinhosoutflag") != "O"){
- b_prntyn = true;
- }
- }else{
- if(model.getValue("/root/main/crdruglist/item["+i+"]/sel")=="Y"){
- b_prntyn = true;
- }
- }
- // ****************************************************************************************************************************
- if (b_prntyn) {
- sParam = "";
- if ( drugno != model.getValue("/root/main/crdruglist/item["+i+"]/drugno") ) {
- drugno = model.getValue("/root/main/crdruglist/item["+i+"]/drugno");
- sParam = "pid▦orddd▦prcpdd▦cretno▦orddeptcd▦orddrid▦prcpgenrflag▦ioflag▦clincstdycd▦drugno▦crflag▦hosinhosoutflag▩";
- sParam += model.getValue("/root/main/crdruglist/item["+i+"]/pid")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/orddd")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/prcpdd")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/cretno")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/orddeptcd")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/orddrid")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/prcpgenrflag")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/ioflag")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/clincstdycd")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/drugno")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/crflag")+"▦"+
- model.getValue("/root/main/crdruglist/item["+i+"]/hosinhosoutflag")+"▩";
-
- model.setAttribute("params", sParam);
- modal("SPADC61500",0,200,200,"","");
- model.setAttribute("params", "");
- }
- }
- }
-
- }
-
- function fGetDrugPatList(){
- model.removeNodeset("/root/main/crdruglist");
- submit("TRADC10901");
- model.setValue("/root/send/srchinfo/srchwardcd","");
- model.setValue("/root/send/srchinfo/srchorddrid","");
- model.setValue("/root/send/srchinfo/srchorddeptcd","");
-
- grd_crdruglist.rebuildStyle();
-
- for ( var i = grd_crdruglist.fixedRows ; i<grd_crdruglist.rows; i++){
- if ( model.getValue("/root/main/crdruglist/item["+i+"]/drugstat")=="NP"
- && model.getValue("/root/main/crdruglist/item["+i+"]/spcldrug") != "M"
- // 20100107_laboru_prcphistcd 가 d,c 된 처방이면 check 하지 않음
- && model.getValue("/root/main/crdruglist/item["+i+"]/prcphistcd") != "C"
- && model.getValue("/root/main/crdruglist/item["+i+"]/prcphistcd") != "D"
- && model.getValue("/root/main/crdruglist/item["+i+"]/prcphistcd") != "E") {
- model.setValue("/root/main/crdruglist/item["+i+"]/sel", "Y");
- }else model.setValue("/root/main/crdruglist/item["+i+"]/sel","N");
-
- // 원외 색상 변경 -- D,C,E 색상변경전에 처리 - 2008-10-09 김귀남
- if(model.getValue("/root/main/crdruglist/item["+i+"]/hosinhosoutflag") == "O" ) {
- grd_crdruglist.rowStyle(i, "data", "background-color") = "#ffff99";
- }
- //********************************************************
- }
- setRowStyle("grd_crdruglist" , "4" , "C" , "prcphistcd", "equal" );
- setRowStyle("grd_crdruglist" , "3" , "D" , "prcphistcd", "equal" );
- setRowStyle("grd_crdruglist" , "2" , "E" , "prcphistcd", "equal" );
- //grd_crdruglist.autoMerge = "true";
- model.refresh();
- }
-
- function fDrugNo(){
- submit("TXADC10901");
- submit("TXADC10902");
- }
-
- function fAuto(){
- fDrugNo();
- fGetDrugPatList();
- fPrcpMPSPrint();
- fHosInLBLPrint(); // 자동마감 걸었을 때 라벨 출력 기능도 포함되게 수정 2011.9.15 jmkim
- }
-
- function fSubmitDrugStat(drugstat){
- var selrow = 0;
- var predrugstat = ""; // 이전처방상태
-
- if (grd_crdruglist.rows > 0 && grd_crdruglist.row <= 0) {
- selrow = 1;
- } else {
- selrow = grd_crdruglist.row;
- }
-
- for(var i = 0; i < grd_crdruglist.rows; i++) {
-
- selrow = i;
-
- if(model.getValue("/root/main/crdruglist/item["+selrow+"]/sel") == "Y") {
- // 처방상태처리
- predrugstat = model.getValue("/root/main/crdruglist/item["+selrow+"]/drugstat");
- //if (drugstat == "P" && predrugstat != "D") {
- // messageBox("이전상태가 조제완료가 아니므로 조제취소하실 수 없습니다.","I999");
- // return;
-
- if (drugstat == "NM" && predrugstat != "M") {
- messageBox("이전상태가 투약완료가 아니므로 투약취소를 하실 수 없습니다.","I999");
- return;
- }else if(drugstat == "M" && predrugstat != "D"){
- // messageBox("이전상태가 출력이 아니므로 불출처리를 하실 수 없습니다.","I999");
- messageBox("이전상태가 조제완료가 아니므로 투약완료를 하실 수 없습니다.","I999");
- return;
- }else if(drugstat == "D" && predrugstat != "P") {
- messageBox("이전상태가 출력이 아니므로 조제완료를 하실 수 없습니다.","I999");
- return;
- }else if(drugstat == "P" && predrugstat != "D") {
- messageBox("이전상태가 조제완료가 아니므로 조제취소를 하실 수 없습니다.","I999");
- return;
- }
-
- //if (drugstat == "M" && predrugstat != "D") {
- // messageBox("조제완료 상태가 아니므로 투약완료하실 수 없습니다.","I999");
- // return;
- // }
-
- // 투약취소 -> 조제완료
- var drugstat2 = drugstat;
- if (drugstat == "NM" ) drugstat = "D";
-
- // 전송정보
- model.setValue("/root/send/req/drugdd" , model.getValue("/root/main/crdruglist/item["+selrow+"]/drugdd"));
- model.setValue("/root/send/req/drugno" , model.getValue("/root/main/crdruglist/item["+selrow+"]/drugno"));
- model.setValue("/root/send/req/ioflag" , model.getValue("/root/main/crdruglist/item["+selrow+"]/ioflag"));
- model.setValue("/root/send/req/drugstat" , drugstat);
- model.setValue("/root/send/req/userid" , getUserId());
- model.setValue("/root/send/req/instcd" , getUserInfo("dutplceinstcd"));
- model.setValue("/root/send/req/crdrugprintflag" , "Y");
-
- // 투약처리
- if (drugstat =="M") model.setValue("/root/send/req/stocdeptcd", "3242103000");
-
- // 수정
- var success = submit("TXADT00701");
-
- if(drugstat2 == "NM") drugstat = "NM";
- }
- }
-
- // 처리결과
- if (success) fGetDrugPatList();
- }
-
- //프린터 설정
- function fSetPrint() {
- var count = getNodesetCount("/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
-
- if(count == 0) {
- model.makeNode("/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
- }
-
- //open("SPLLC90100_바코드프린터설정.xrw", "", "", "", "", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
- // 20101220 wify 경북대병원 라벨 출력방식 rexpert로 변경.
- open("SPZUR00300_바코드프린터설정_knuh.xrw", "", "", "", "", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
- }
-
- ]]>
- </script>
- <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/init/deptinfo"/>
- <submission id="TRADT10204" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/deptinfo" replace="instance" resultref="/root/init/deptlist"/>
- <submission id="TRADC10901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" add="bottom" resultref="/root/main/crdruglist"/>
- <submission id="TXADC10901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchinfo" replace="instance" resultref="/root/temp/ret"/>
- <submission id="TXADC10902" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchinfo" replace="instance" resultref="/root/temp/ret"/>
- <submission id="TXADT00701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" replace="instance" resultref="/root/hidden/item"/>
- <submission id="TXADT00702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" replace="instance" resultref="/root/hidden/item"/>
- <submission id="TRADC02104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/orddrinfo" replace="instance" resultref="/root/init/orddrlist"/>
- <!-- 프린터 설정-->
- <submission id="TRLLC90101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/barcdprntsetup"/>
- <submission id="TRADT01106" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/init/misdeptlist"/>
- </model>
- </xhtml:head>
- <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
- <caption id="caption19" class="tit_1" style="left:0px; top:0px; width:142px; height:14px; ">임상약 처방전 출력</caption>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
- <input id="input8" class="input_default" style="left:1107px; top:37px; width:80px; height:19px; "/>
- <group id="group2" style="left:0px; top:5px; width:895px; height:60px; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:1px; width:890px; height:55px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption2" class="search_name" style="left:5px; top:7px; width:91px; height:17px; ">처방일자 :</caption>
- <caption id="caption24" class="search_name" style="left:291px; top:31px; width:91px; height:17px; ">진료과 :</caption>
- <caption id="caption4" class="search_name" style="left:291px; top:7px; width:91px; height:17px; ">병동 :</caption>
- <line id="line1" class="line_4" style="x1:700px; y1:28px; x2:700px; y2:50px; border-color:#ffe4bb; border-left-style:solid; "/>
- <input id="input1" ref="/root/send/srchinfo/srchprcpdd" class="input_s_essential" inputtype="date" style="left:91px; top:6px; width:93px; height:19px; "/>
- <select1 id="radio2" ref="/root/send/srchinfo/srchioflag" class="radio_search" appearance="full" cols="3" rows="1" overflow="visible" style="left:95px; top:30px; width:145px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>외래</label>
- <value>O</value>
- </item>
- <item>
- <label>병동</label>
- <value>I</value>
- </item>
- <item>
- <label>전체</label>
- <value>A</value>
- </item>
- </choices>
- </select1>
- <button id="btn_sea" class="btn1_letter2" style="left:825px; top:29px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fGetDrugPatList();
- ]]>
- </script>
- </button>
- <select1 id="cbo_srchwardcd" ref="/root/send/srchinfo/srchwardcd" class="combo_search" appearance="minimal" cols="2" style="left:370px; top:6px; width:105px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/deptlist/ward">
- <label ref="wardnm"/>
- <value ref="wardcd"/>
- </itemset>
- </choices>
- </select1>
- <select1 id="cbo_srchorddeptcd" ref="/root/send/srchinfo/srchorddeptcd" class="combo_search" appearance="minimal" style="left:370px; top:30px; width:105px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/orddept/dept">
- <label ref="depthngnm"/>
- <value ref="deptcd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- model.makeValue("/root/send/srchinfo/srchorddrid","");
- model.makeValue("/root/send/orddrinfo/userflag", "03%");
- model.makeValue("/root/send/orddrinfo/deptcd", model.getValue("/root/send/srchinfo/srchorddeptcd"));
- submit("TRADC02104");
- ]]>
- </script>
- </select1>
- <select id="chk_autoflag" ref="/root/init/autoflag" overflow="visible" appearance="full" style="left:712px; top:32px; width:46px; height:15px; border-style:none; ">
- <choices>
- <item>
- <label>자동</label>
- <value>1</value>
- </item>
- </choices>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var autoflag = model.getValue("/root/init/autoflag");
- if (autoflag == "1" ) {
- if (gTimer == null) {
- gTimer = window.setInterval("fAuto()",10000);
- }
- } else {
- if (gTimer != null) {
- window.clearinterval(gTimer);
- gTimer = null;
- }
- }
- ]]>
- </script>
- </select>
- <button id="button1" class="btn4_letter2" style="left:767px; top:29px; width:56px; height:22px; ">
- <caption>마감</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fDrugNo();
- btn_sea.dispatch("DOMActivate");
- ]]>
- </script>
- </button>
- <input id="input7" ref="/root/send/srchinfo/srchdrugcd" class="input_s_default" style="left:785px; top:5px; width:95px; height:19px; "/>
- <caption id="caption5" class="search_name" style="left:485px; top:7px; width:90px; height:17px; vertical-align:middle; ">등록번호 :</caption>
- <caption id="caption7" class="search_name" style="left:690px; top:6px; width:95px; height:17px; vertical-align:middle; ">약품코드 :</caption>
- <input id="input6" ref="/root/send/srchinfo/srchpid" class="input_s_default" style="left:580px; top:6px; width:95px; height:19px; "/>
- <input id="input2" ref="/root/send/srchinfo/srchtoprcpdd" class="input_s_essential" inputtype="date" style="left:196px; top:6px; width:93px; height:19px; "/>
- <caption id="caption1" style="left:185px; top:9px; width:15px; height:15px; ">~</caption>
- <caption id="caption8" class="search_name" style="left:485px; top:30px; width:90px; height:17px; vertical-align:middle; ">담당의 :</caption>
- <select1 id="combo1" ref="/root/send/srchinfo/srchorddrid" class="combo_search" appearance="minimal" style="left:580px; top:30px; width:95px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/orddrlist/user">
- <label ref="usernm"/>
- <value ref="userid"/>
- </itemset>
- </choices>
- </select1>
- </group>
- <caption id="caption3" class="cell_1" style="left:897px; top:36px; width:60px; height:23px; vertical-align:middle; ">불출자ID</caption>
- <caption id="caption13" class="cell_1" style="left:897px; top:11px; width:60px; height:23px; vertical-align:middle; ">조제완료</caption>
- <caption id="caption6" class="cell_1" style="left:1044px; top:36px; width:60px; height:23px; vertical-align:middle; ">불출자</caption>
- <line id="line2" class="line_1" style="x1:895px; y1:6px; x2:1190px; y2:6px; "/>
- <line id="line3" class="line_2" style="x1:895px; y1:34px; x2:1190px; y2:34px; "/>
- <input id="input3" ref="/root/send/srchinfo/srchbcno" class="input_default" style="left:960px; top:12px; width:80px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- if(event.keyCode == "13") {
- var barcode = "";
- var ioflag ="";
- var drugdd="";
- var drugno ="";
- var drugstat ="D";
-
- setInputNodeCurText();
- barcode = model.getValue("/root/send/srchinfo/srchbcno");
-
- // 임상약 데이터만 처리
- if (barcode.length > 1) {
- ioflag = barcode.substr(0,1);
- if (ioflag.toUpperCase() != "C") return;
- } else {
- return;
- }
- ioflag = barcode.substr(1,1);
- drugdd = barcode.substr(2,8);
- drugno = barcode.substr(10,5);
-
- // 전송정보
- model.setValue("/root/send/req/drugdd" , drugdd);
- model.setValue("/root/send/req/drugno" , drugno);
- model.setValue("/root/send/req/ioflag" , ioflag);
- model.setValue("/root/send/req/drugstat" , drugstat);
- model.setValue("/root/send/req/userid" , getUserId());
- model.setValue("/root/send/req/instcd" , getUserInfo("dutplceinstcd"));
-
- // 투약처리
- if (drugstat =="D") model.setValue("/root/send/req/stocdeptcd", "3242103000");
-
-
- // 수정
- var success = submit("TXADT00701");
- model.setValue ( "/root/send/srchinfo/srchprcpdd", drugdd);
- // 처리결과
- if (success) fGetDrugPatList();
- model.setValue("/root/send/srchinfo/srchbcno","");
- model.refresh();
- }
- ]]>
- </script>
- </input>
- <input id="input5" class="input_default" style="left:960px; top:37px; width:80px; height:19px; "/>
- <line id="line6" class="line_3" style="x1:895px; y1:60px; x2:1190px; y2:60px; "/>
- <datagrid id="grd_crdruglist" nodeset="/root/main/crdruglist/item" caption="약번호(hidden)^구분(hidden)^^상태^투약번호^처방일자^등록번호^성명^구분^진료과^병동^담당의^과제번호^약품번호^약품코드^약품명^ 1일수량^1회수량^단위^횟수^일수^총량^단위^불출일시^불출약사^반환^상태" colsep="^" colwidth="1, 1, 26, 60, 56, 75, 70, 50, 40, 100, 70, 50, 100, 100, 80, 201, 52, 51, 36, 39, 33, 52, 34, 100, 60, 41, 41, 100" explorerbar="sortshowmove" mergecells="byrestriccol" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:65px; width:1194px; height:675px; ">
- <col ref="drugno" visibility="hidden"/>
- <col ref="crflag" visibility="hidden"/>
- <col checkvalue="Y,N" ref="sel" type="checkbox"/>
- <col ref="drugstatnm"/>
- <col ref="drugno"/>
- <col ref="drugdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="pid"/>
- <col ref="hngnm"/>
- <col ref="crflag" style="text-align:center; "/>
- <col ref="orddeptnm"/>
- <col ref="wardnm"/>
- <col ref="orddrnm"/>
- <col ref="clincstdycd"/>
- <!-- 20100203 황세원 자동머지 해제 했지요-->
- <col ref="prcpno" visibility="hidden"/>
- <!-- 20100223 여기까지 수정했지요-->
- <col ref="prcpcd"/>
- <col ref="prcpnm"/>
- <col ref="prcpqty" style="text-align:right; "/>
- <col ref="prcpqty2" style="text-align:right; "/>
- <col ref="prcpqtyunit"/>
- <col ref="prcptims" style="text-align:right; "/>
- <col ref="prcpdayno" style="text-align:right; "/>
- <col ref="totqty" visibility="hidden" style="text-align:right; "/>
- <col ref="totqtyunit" visibility="hidden"/>
- <col ref="delivedt"/>
- <col ref="deliveid"/>
- <col ref="prcphistcd"/>
- <col ref="drugstat"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- model.setValue("/root/init/autoflag","");
- if (gTimer != null) {
- window.clearinterval(gTimer);
- gTimer = null;
- }
-
- model.refresh();
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- var startrow = 0;
- if(grd_crdruglist.mouseCol == 3 && grd_crdruglist.mouseRow > 0) {
- startrow = grd_crdruglist.row;
- } else {
- startrow = 1;
- }
-
- // Cell Merge.. 체크박스 일괄선택기능 2008-09-12 김귀남 START
- selDrugno = model.getValue("/root/main/crdruglist/item["+grd_crdruglist.mouseRow+"]/drugno");
- selCrflag = model.getValue("/root/main/crdruglist/item["+grd_crdruglist.mouseRow+"]/crflag");
- for(var i = startrow; selDrugno == model.getValue("/root/main/crdruglist/item["+i+"]/drugno"); i++){
- if(selCrflag == model.getValue("/root/main/crdruglist/item["+i+"]/crflag")){
- model.setValue("/root/main/crdruglist/item["+i+"]/sel", "Y");
- }
- }
- model.refresh();
- // Cell Merge.. 체크박스 일괄선택기능 2008-09-12 김귀남 END
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-deselect">
- <![CDATA[
- var startrow = 0;
- if(grd_crdruglist.mouseCol == 3 && grd_crdruglist.mouseRow > 0) {
- startrow = grd_crdruglist.row;
- } else {
- startrow = 1;
- }
-
- // Cell Merge.. 체크박스 일괄선택기능 2008-09-12 김귀남 START
- selDrugno = model.getValue("/root/main/crdruglist/item["+grd_crdruglist.mouseRow+"]/drugno");
- selCrflag = model.getValue("/root/main/crdruglist/item["+grd_crdruglist.mouseRow+"]/crflag");
- for(var i = startrow; selDrugno == model.getValue("/root/main/crdruglist/item["+i+"]/drugno"); i++){
- if(selCrflag == model.getValue("/root/main/crdruglist/item["+i+"]/crflag")){
- model.setValue("/root/main/crdruglist/item["+i+"]/sel", "N");
- }
- }
- model.refresh();
- // Cell Merge.. 체크박스 일괄선택기능 2008-09-12 김귀남 END
- ]]>
- </script>
- </datagrid>
- <caption id="caption9" class="cell_1" style="left:1045px; top:10px; width:60px; height:23px; vertical-align:middle; ">투약완료</caption>
- <input id="input4" ref="/root/send/srchinfo/srchbcno" class="input_default" style="left:1108px; top:11px; width:80px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- if(event.keyCode == "13") {
- var barcode = "";
- var ioflag ="";
- var drugdd="";
- var drugno ="";
- var drugstat ="M";
-
- setInputNodeCurText();
- barcode = model.getValue("/root/send/srchinfo/srchbcno");
-
- // 임상약 데이터만 처리
- if (barcode.length > 1) {
- ioflag = barcode.substr(0,1);
- if (ioflag.toUpperCase() != "C") return;
- } else {
- return;
- }
- ioflag = barcode.substr(1,1);
- drugdd = barcode.substr(2,8);
- drugno = barcode.substr(10,5);
-
- // 전송정보
- model.setValue("/root/send/req/drugdd" , drugdd);
- model.setValue("/root/send/req/drugno" , drugno);
- model.setValue("/root/send/req/ioflag" , ioflag);
- model.setValue("/root/send/req/drugstat" , drugstat);
- model.setValue("/root/send/req/userid" , getUserId());
- model.setValue("/root/send/req/instcd" , getUserInfo("dutplceinstcd"));
-
- // 투약처리
- if (drugstat =="M") model.setValue("/root/send/req/stocdeptcd", "3242103000");
-
-
- // 수정
- var success = submit("TXADT00701");
- model.setValue ( "/root/send/srchinfo/srchprcpdd", drugdd);
- // 처리결과
- if (success) fGetDrugPatList();
- model.setValue("/root/send/srchinfo/srchbcno","");
- model.refresh();
- }
- ]]>
- </script>
- </input>
- </group>
- <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
- <button id="button2" class="btn4_letter4" style="left:1113px; top:5px; width:80px; height:22px; ">
- <caption>투약취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSubmitDrugStat ("NM");
- ]]>
- </script>
- </button>
- <button id="button3" class="btn4_letter4" style="left:1030px; top:5px; width:80px; height:22px; ">
- <caption>투약완료</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSubmitDrugStat ("M");
- ]]>
- </script>
- </button>
- <button id="button4" class="btn6_letter5" style="left:90px; top:5px; width:92px; height:22px; ">
- <caption>처방전출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fPrcpMPSPrint();
- fGetDrugPatList();
- ]]>
- </script>
- </button>
- <button id="button5" class="btn6_letter4" style="left:185px; top:5px; width:80px; height:22px; ">
- <caption>라벨출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fHosInLBLPrint();
- ]]>
- </script>
- </button>
- <button id="button23" class="btn3_letter4" style="left:5px; top:5px; width:80px; height:22px; ">
- <caption>약력조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- open("SMADB10100",0,0,0,"SMADB10100","/root/main/crdruglist/item["+grd_crdruglist.row+"]/pid","/root/temp/patinfo/pid");
- ]]>
- </script>
- </button>
- <button id="btn_excel" class="btn2_letter4" style="left:795px; top:5px; width:64px; height:19px; ">
- <caption>엑셀저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if (grd_crdruglist.rows>1) {
- fExeSaveToExcel();
- }
- ]]>
- </script>
- </button>
- <button id="btn_prnt" class="btn3_letter5" navindex="18" style="left:265px; top:5px; width:92px; height:22px; ">
- <caption>프린터설정</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSetPrint();
- ]]>
- </script>
- </button>
- <button id="button6" class="btn4_letter4" style="left:945px; top:5px; width:80px; height:22px; ">
- <caption>조제취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSubmitDrugStat ("P");
- ]]>
- </script>
- </button>
- <button id="button7" class="btn4_letter4" style="left:862px; top:5px; width:80px; height:22px; ">
- <caption>조제완료</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSubmitDrugStat ("D");
- ]]>
- </script>
- </button>
- <!-- 20101021_laboru_경북대병원_실출고부서 셋팅-->
- <caption id="caption10" style="left:550px; top:5px; width:69px; height:20px; font-weight:bold; color:#ff0000; ">실출고부서</caption>
- <select1 id="combo3" ref="/root/hidden/prcpsrch/stocdeptcd" appearance="minimal" style="left:625px; top:5px; width:121px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/misdeptlist/deptlist">
- <label ref="deptnm"/>
- <value ref="deptcd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var chk_cnt = 0;
- if(chk_cnt != 0) {
- var ret = messageBox("약품출고부서를 " + combo3.label +"으로 ", "S001");
- if(ret == "6") {
- model.setValue("/root/send/suminfo/mstocdeptcd", combo3.value);
- } else {
- model.setValue("/root/send/suminfo/mstocdeptcd", model.getValue("/root/temp/stocdeptcd"));
- //model.setValue("/root/hidden/prcpsrch/stocdeptcd", model.getValue("/root/temp/stocdeptcd"));
- }
- combo3.refresh();
- }
- ]]>
- </script>
- </select1>
- </group>
- </xhtml:body>
- </xhtml:html>
|