123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925 |
- <?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>
- <사원번호/>
- <안내문/>
- <masterinfo>
- <druglist>
- <sel/>
- <prcpdd/>
- <hngnm/>
- <pid/>
- <drugno/>
- <orddeptnm/>
- <drugstatnm/>
- <appdt/>
- <rgstdm/>
- <sumdt/>
- <prntdt/>
- <labelcompdt/>
- <prcpdt/>
- <waitmin/>
- <prcpidnm/>
- <drugdt/>
- <drugidnm/>
- <stocdeptnm/>
- <stocdt/>
- <drugstat/>
- <prcpid/>
- <drugid/>
- <drugdd/>
- <ioflag/>
- <instcd/>
- <hosinhosoutflag/>
- <stocdeptcd/>
- <spcldrug/>
- </druglist>
- </masterinfo>
- <waitinfo>
- <tmlist1>
- <waittm/>
- <avgwaitmin/>
- </tmlist1>
- <tmlist2>
- <orddeptnm/>
- <avgwaitmin/>
- <orddeptcd/>
- </tmlist2>
- <totwatitinfo>
- <avgwaitmin/>
- <minwaitmin/>
- <maxwaitmin/>
- </totwatitinfo>
- </waitinfo>
- <totwaitinfo>
- <tmlist3>
- <item>
- <titlenm>전체평균</titlenm>
- <avgwaitmin/>
- </item>
- <item>
- <titlenm>전체최대</titlenm>
- <avgwaitmin/>
- </item>
- <item>
- <titlenm>전체최소</titlenm>
- <avgwaitmin/>
- </item>
- </tmlist3>
- </totwaitinfo>
- <detlinfo>
- <detdruglist>
- <ordrtnflag/>
- <prcpcd/>
- <drugnm/>
- <drugtypenm/>
- <prcpqty/>
- <prcptims/>
- <prcpdayno/>
- <prntdt/>
- <prcpdt/>
- <sumdt/>
- <pid/>
- <drugno/>
- <bcno/>
- <powdflag/>
- <drugdd/>
- <ioflag/>
- <drugseqno/>
- <instcd/>
- <prcpdd/>
- <prcpno/>
- <prcphistno/>
- <execprcpno/>
- <drugtype/>
- </detdruglist>
- </detlinfo>
- </main>
- <send>
- <srchinfo>
- <srchsumdt1/>
- <srchsumdt2/>
- <srchorddeptcd/>
- <srchpid/>
- <srchhngnm/>
- <srchdrugyn/>
- <srchbcno/>
- <srchdrugdd/>
- <srchdrugno/>
- <srchioflag/>
- <srchprcpno/>
- </srchinfo>
- <req>
- <drugdd/>
- <drugno/>
- <ioflag/>
- <drugstat/>
- <dispflag/>
- <dispcnts/>
- <inputtm/>
- <userid/>
- <stocdeptcd/>
- <instcd/>
- <srchrcvflag/>
- <srchdrugmngtyn/>
- <pid/>
- <dispcnts/>
- </req>
- <callbarcode/>
- <srchdetlinfo>
- <drugdd/>
- <drugno/>
- <ioflag/>
- </srchdetlinfo>
- </send>
- <init>
- <orddept>
- </orddept>
- <patinfo>
- <pid/>
- <hngnm/>
- </patinfo>
- <stocinfo>
- <stocdeptcd>3242106000</stocdeptcd>
- </stocinfo>
- </init>
- <hidden>
- <item>
- <count/>
- </item>
- <cnfrresult/>
- <stocdeptlist>
- <deptlist>
- <stocdeptcd/>
- <stocdeptnm/>
- </deptlist>
- </stocdeptlist>
- </hidden>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tchartHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.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"); //부서코드 콤보조회
- if ( model.instances(0).selectSingleNode("/root/init/orddept/dept") != null) {
- astfAddCombo("/root/init/orddept","dept","deptcd,depthngnm",",전체");
- }
-
- // 20100203_laboru_불출부서 visibility 막기
- // submit("TRADT00704");
- // if(model.getValue("/root/hidden/stocdeptlist/deptlist/stocdeptcd") == "Y") {
- // cmb_stocdeptcd.visible = false;
- // caption1.visible = false;
- // }
-
- model.setValue("/root/send/srchinfo/srchsumdt1" , getCurrentDate());
- model.setValue("/root/send/srchinfo/srchsumdt2" , getCurrentDate());
- //model.setValue("/root/init/stocinfo/stocdeptcd",getUserInfo("dutplcecd")); // 재고불출부서 로긴부서로 default세팅
- model.refresh();
-
- //1일기준인지 1회기준인지 체크하여 컬럼을 hidden
- var colHidnValue = grdBaseColHidn("D");
- //1회 기준
- if( colHidnValue == "C") {
- grd_detdruglist.colHidden(grd_detdruglist.colRef("prcpqty")) = true;
- } else {
- grd_detdruglist.colHidden(grd_detdruglist.colRef("prcpqty2")) = true;
- }
- ]]>
- </script>
- <submission id="TXADT00701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" replace="instance" resultref="/root/hidden/item"/>
- <script type="javascript">
- <![CDATA[
- var gWaitDispType = "G"; // 대기시간 표현방법(G-그래프, T-표)
- var gTimer;
- var gInterval = 500000000;
-
- function fSubmitDrugStat(drugstat){
-
- var selrow = 0;
- var predrugstat = ""; // 이전처방상태
- ///2012년 9월19일 한개 처리에서 멀티선택 처리 하기
- // if (grid_druglist.rows > 0 && grid_druglist.row <= 0)
- // selrow = 1;
- // else selrow = grid_druglist.row;
-
- for (var i=1; i<grid_druglist.rows; i++) {
- var sel = model.getValue("/root/main/masterinfo/druglist["+i+"]/sel");
- //alert(i + " , " + sel );
- if(sel == "true") {
- selrow = i ;
- // 처방상태처리
- predrugstat = model.getValue("/root/main/masterinfo/druglist["+selrow+"]/drugstat");
- spcldrug = model.getValue("/root/main/masterinfo/druglist["+selrow+"]/spcldrug");
- if (drugstat == "P" && predrugstat != "D" && spcldrug != "M" ) {
- messageBox("이전상태가 조제완료가 아니므로 조제취소하실 수 없습니다.","I999");
- return;
- }
-
- if (drugstat == "NM" && predrugstat != "M" && spcldrug != "M" ) {
- messageBox("이전상태가 투약완료가 아니므로 투약취소하실 수 없습니다.","I999");
- return;
- }
-
- if (drugstat == "M" && predrugstat != "D" && spcldrug != "M") {
- messageBox("조제완료 상태가 아니므로 투약완료하실 수 없습니다.","I999");
- return;
- }
-
- // 투약취소 -> 조제완료
- if (drugstat == "NM" ) drugstat = "D";
-
- // 전송정보
- model.setValue("/root/send/req/drugdd" , model.getValue("/root/main/masterinfo/druglist["+selrow+"]/drugdd"));
- model.setValue("/root/send/req/drugno" , model.getValue("/root/main/masterinfo/druglist["+selrow+"]/drugno"));
- model.setValue("/root/send/req/ioflag" , model.getValue("/root/main/masterinfo/druglist["+selrow+"]/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", model.getValue("/root/init/stocinfo/stocdeptcd"));
-
-
- // 조제취소, 투약완료 시 승인이 필요한 경우
- var srchdrugyn = model.getValue("/root/send/srchinfo/srchdrugyn");
- var srchrcvflag = "";
- var srchdrugmngtyn = "";
-
- if(srchdrugyn != null && srchdrugyn.length> 0) {
- if(srchdrugyn == "1") {
- srchrcvflag = "Y";
- model.setValue("/root/send/req/srchrcvflag", "Y");
- model.setValue("/root/send/req/srchdrugmngtyn", "");
- } else if(srchdrugyn == "1 2" || srchdrugyn == "2 1") {
- srchrcvflag = "Y";
- model.setValue("/root/send/req/srchrcvflag", "Y");
- srchdrugmngtyn = "Y";
- model.setValue("/root/send/req/srchdrugmngtyn", "Y");
- } else if(srchdrugyn == "2") {
- srchdrugmngtyn = "Y";
- model.setValue("/root/send/req/srchrcvflag", "");
- model.setValue("/root/send/req/srchdrugmngtyn", "Y");
- }
- }
-
- // 조제취소
- if(drugstat == "P" && predrugstat == "D" && srchrcvflag == "Y") {
- model.setValue("/root/hidden/cnfrresult", "");
- model.setValue("/root/send/req/pid", model.getValue("/root/main/masterinfo/druglist["+selrow+"]/pid"));
- modal("SPADT63400",0,100,150,"SPADT63400","/root/send/req","/root/send/srchinfo");
- } else if(drugstat == "M" && predrugstat == "D" && srchrcvflag == "Y" && srchdrugmngtyn == "Y") {
- model.setValue("/root/hidden/cnfrresult", "");
- model.setValue("/root/send/req/pid", model.getValue("/root/main/masterinfo/druglist["+selrow+"]/pid"));
- modal("SPADT63400",0,100,150,"SPADT63400","/root/send/req","/root/send/srchinfo");
- }
- if(drugstat == "P" && predrugstat == "D" && srchrcvflag == "Y" && model.getValue("/root/hidden/cnfrresult") == "Y") {
- var success = submit("TXADT00701");
- // if (success) submit("TRADT00701");
- } else if(drugstat == "M" && predrugstat == "D" && srchdrugmngtyn == "Y" && model.getValue("/root/hidden/cnfrresult") == "Y") {
- var success = submit("TXADT00701");
- // if (success) submit("TRADT00701");
- } else {
- var success = submit("TXADT00701");
- // if (success) submit("TRADT00701");
- }
- }
- }
- // submit("TRADT00701");
- }
-
- function fDrugnoDisp(drugstat) {
- ///2012년 9월19일 한개 처리에서 멀티선택 처리 하기
- for (var j=1; j<grid_druglist.rows; j++) {
- var sel = model.getValue("/root/main/masterinfo/druglist["+j+"]/sel");
- if(sel == "true") {
- // 전광판처리
- if(drugstat == "D") {
- model.setValue("/root/send/req/dispcnts", "N");
- }
- model.setValue("/root/send/req/dispflag", drugstat);
- model.setValue("/root/send/req/inputtm", getCurrentTime());
- model.setValue("/root/send/req/drugdd", model.getValue("/root/main/masterinfo/druglist["+j+"]/drugdd"));
- model.setValue("/root/send/req/drugno", model.getValue("/root/main/masterinfo/druglist["+j+"]/drugno"));
- // if(model.getValue("/root/send/req/drugdd") == "") {
- // model.setValue("/root/send/req/drugdd", model.getValue("/root/main/masterinfo/druglist[1]/drugdd"));
- // }
-
- // if(model.getValue("/root/send/req/drugno") == "") {
- //alert("dd");
- // model.setValue("/root/send/req/drugno", model.getValue("/root/main/masterinfo/druglist[1]/drugno"));
- // }
- //alert(model.getValue("/root/send/req/drugno"));
- //전광판 데이터
- submit("TXADT00702");
- // alert("wait");
- //model.refresh();
- }
- }
- btn_sea.dispatch( "DOMActivate");
- }
-
- function fDispWaitTime(type) {
-
- var success = submit("TRADT20703");
- var avgwaitmin = model.getValue("/root/main/waitinfo/totwatitinfo/avgwaitmin"); // 전체 평균대기시간
- var minwaitmin = model.getValue("/root/main/waitinfo/totwatitinfo/minwaitmin"); // 전체 최소대기시간
- var maxwaitmin = model.getValue("/root/main/waitinfo/totwatitinfo/maxwaitmin"); // 전체 최대대기시간
-
- // 데이터가 없을 경우 return
- if (avgwaitmin == null || avgwaitmin == "") return;
-
- // 전체대기시간 세팅
- model.setValue("/root/main/totwaitinfo/tmlist3/item[1]/avgwaitmin",avgwaitmin);
- model.setValue("/root/main/totwaitinfo/tmlist3/item[2]/avgwaitmin",maxwaitmin);
- model.setValue("/root/main/totwaitinfo/tmlist3/item[3]/avgwaitmin",minwaitmin);
- model.refresh();
-
- document.all.item("TChart_Tot").visible = false;
- document.all.item("TChart_Time").visible = false;
- document.all.item("TChart_Ord").visible = false;
-
- if (type == "G") { // 20110113_laboru_경북대병원 임시로 그래프 버전 막기
- /* document.all.item("TChart_Tot").visible = true;
- document.all.item("TChart_Time").visible = true;
- document.all.item("TChart_Ord").visible = true;
- document.all.item("TChart_Tot").refresh();
- document.all.item("TChart_Time").refresh();
- document.all.item("TChart_Ord").refresh();
- btn_graph1.text = "텍스트로 보기"
-
- drawBar(TChart_Tot , grd_tottmlist , "avgwaitmin", "전체 대기시간" , true); // 전체 대기시간
- drawBar(TChart_Time, grd_bytmlist , "avgwaitmin", "시간별 대기시간" , true); // 시간대별 대기시간
- drawBar(TChart_Ord , grd_byordlist, "avgwaitmin", "진료과별 대기시간", true); // 진료과별 대기시간
- gWaitDispType = "T";*/
- } else if (type == "T") {
- /* if (gTimer != null) window.clearinterval(gTimer);
- btn_graph1.text = "그래프보기"
- gWaitDispType = "G";*/
- }
- }
-
- function fNuCall(drugno){
- // var max_drugno = drugno;
- // var max_drugno2;
- //
- // alert("aa = " +max_drugno);
- // alert("aa = " +max_drugno.length);
-
- // if(max_drugno.length == 1 ){
- // max_drugno2 = "000"+max_drugno;
- // } else if (max_drugno.length == 2 ){
- // max_drugno2 = "00"+max_drugno;
- // } else if (max_drugno.length == 3 ){
- // max_drugno2 = "0"+max_drugno;
- // } else if (max_drugno.length == 4 ){
- // max_drugno2 = max_drugno;
- // }
- // alert("max_drugno2 = " +max_drugno2);
- // if(max_drugno2.length != 5){
- // if(max_drugno2.length == 0){
- // max_drugno2.length = 1;
- // }
- // for (var i = max_drugno2.length; i > 0; i--){
- //// // 5번째 자리는 당분간 생략
- //// if(i = 5){
- //// var OOOOO = max_drugno.substring(0,i-1)+"0000.wav";
- //// alert("5 = "+OOOOO)
- //// }
- // if(i == 4){
- // var OOOO = max_drugno2.substring(0,1)+"000.wav";
- // snd2 = "";
- // if(OOOO != "0000.wav"){
- // snd2 ="c:\\windows\\media\\"+OOOO;
- // }
- // }
- // if(i == 3 ){
- // var OOO = max_drugno2.substring(1,2)+"00.wav";
- // snd3 = "";
- // if(OOO != "000.wav"){
- // snd3 ="c:\\windows\\media\\"+OOO;
- // }
- // }
- // if(i==2){
- // var OO = max_drugno2.substring(2,3)+"0.wav";
- // snd4 = "";
- // if(OO != "00.wav"){
- // snd4 ="c:\\windows\\media\\"+OO;
- // }
- // }
- // if(i==1){
- // var O = "0"+max_drugno2.substring(3,4)+".wav";
- // snd5 = "";
- // if(O != "00.wav"){
- // snd5 ="c:\\windows\\media\\"+O;
- // }
- // }
- // }//for
- //snd1 ="c:\\windows\\media\\딩동1.wav";
- //object1.url = snd1;
- // var intcnt =100;
- // call1 = window.setInterval("fCall1()",intcnt);
- // if(OOOO != "0000.wav"){
- // intcnt=intcnt+2200;
- //// fSleep(470);
- // call2 = window.setInterval("fCall2()",intcnt);
- // }
- // if(OOO != "000.wav"){
- // intcnt=intcnt+2000;
- //// fSleep(470);
- // call3 = window.setInterval("fCall3()",intcnt);
- // }
- // if(OO != "00.wav"){
- // intcnt=intcnt+2000;
- //// fSleep(470);
- // call4 = window.setInterval("fCall4()",intcnt);
- // }
- // if(O != "00.wav"){
- // intcnt=intcnt+2000;
- //// fSleep(470);
- // call5 = window.setInterval("fCall5()",intcnt);
- // }
- // intcnt=intcnt+900;
- //// fSleep(470);
- // snd6 ="c:\\windows\\media\\번.wav";
- // call6 = window.setInterval("fCall6()",intcnt);
- //
- // }
- // var speed = 500;
- //
- // object1.url = snd1;
- // fSleep(1000);
- }
-
- function fCall1(){
- object1.url = snd1;
- window.clearInterval(call1);
- }
-
- function fSleep(numberMillis) {
- var now = new Date();
- var exitTime = now.getTime() + numberMillis;
-
-
- while (true) {
- now = new Date();
- if (now.getTime() > exitTime)
- return;
- }
- }
-
-
- ]]>
- </script>
- <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/init/deptinfo"/>
- <submission id="TXADT00702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" replace="instance" resultref="/root/hidden/item"/>
- <script type="javascript" ev:event="xforms-model-destruct">
- <![CDATA[
- if (gTimer != null) window.clearinterval(gTimer);
- gTimer = null;
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-model-construct-done">
- <![CDATA[
- grid_druglist.fixedcellcheckbox(0,1) = true;
- ]]>
- </script>
- <submission id="TRADT20701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchinfo" replace="instance" resultref="/root/main/masterinfo"/>
- <submission id="TRADT20702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdetlinfo" replace="instance" resultref="/root/main/detlinfo/detdruglist"/>
- <submission id="TRADT20703" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchinfo" replace="instance" resultref="/root/main/waitinfo"/>
- <submission id="TRADT20704" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/hidden/stocdeptlist"/>
- </model>
- </xhtml:head>
- <xhtml:body guideline="1,1194;" 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="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">특수조제실 조제관리</caption>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
- <datagrid id="grd_byordlist" nodeset="/root/main/waitinfo/tmlist2" caption="진료과^대기시간(분)" colsep="^" colwidth="118, 78" fixedcols="1" mergecellsfixedrows="bycolrec" rowsep="|" style="left:979px; top:477px; width:215px; height:235px; ">
- <col ref="orddeptnm"/>
- <col ref="avgwaitmin" format="#,###" style="text-align:right; "/>
- </datagrid>
- <object id="TChart_Ord" clsid="{fab9b41c-87d6-474d-ab7e-f07d78f2422e}" style="left:980px; top:478px; width:215px; height:235px; "/>
- <datagrid id="grd_bytmlist" nodeset="/root/main/waitinfo/tmlist1" caption="시간대^대기시간(분)" colsep="^" colwidth="95, 100" fixedcols="1" mergecellsfixedrows="bycolrec" rowsep="|" style="left:979px; top:237px; width:215px; height:238px; ">
- <col ref="waittm"/>
- <col ref="avgwaitmin" format="#,###" style="text-align:right; "/>
- </datagrid>
- <datagrid id="grd_tottmlist" nodeset="/root/main/totwaitinfo/tmlist3/item" caption="구분^대기시간(분)" colsep="^" colwidth="95, 100" fixedcols="1" mergecellsfixedrows="bycolrec" rowsep="|" style="left:980px; top:110px; width:215px; height:123px; ">
- <col ref="titlenm"/>
- <col ref="avgwaitmin" format="#,###" style="text-align:right; "/>
- </datagrid>
- <group id="group2" style="left:0px; top:30px; width:1194px; height:45px; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:3px; width:1194px; height:42px; background-color:#fffbf2; border-color:#ffd799; "/>
- <button id="button5" class="icon_search" style="left:720px; top:13px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/init/patinfo", "/root/send");
- model.setValue("/root/send/srchinfo/srchpid" ,model.getValue("/root/init/patinfo/pid"));
- model.setValue("/root/send/srchinfo/srchhngnm",model.getValue("/root/init/patinfo/hngnm"));
- ]]>
- </script>
- </button>
- <line id="line13" style="x1:1095px; y1:9px; x2:1095px; y2:34px; border-color:#ffe4bb; border-left-style:solid; "/>
- <caption id="caption24" class="search_name" style="left:10px; top:15px; width:86px; height:17px; ">적용일자 :</caption>
- <caption id="caption4" class="search_name" style="left:346px; top:15px; width:86px; height:17px; ">진료과 :</caption>
- <caption id="caption5" style="left:207px; top:15px; width:15px; height:20px; vertical-align:middle; ">~</caption>
- <caption id="caption26" class="search_name" style="left:568px; top:15px; width:86px; height:17px; ">환자 :</caption>
- <caption id="caption27" class="search_name" style="left:838px; top:15px; width:85px; height:17px; ">처방구분 :</caption>
- <button id="btn_sea" class="btn1_letter2" style="left:1120px; top:10px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var barcode = model.getValue("/root/send/srchinfo/srchbcno");
- var ioflag = "";
- var drugdd = "";
- var drugno = "";
- var prcpno = "";
- if (barcode.length > 9) {
- // 일반 원내 처방전
- ioflag = barcode.substr(0,1);
- drugdd = barcode.substr(1,8);
- drugno = barcode.substr(9,barcode.length-9);
- // 외래데이터만 처리
- if (ioflag.toUpperCase() != "O") {
- messageBox("바코드 조회내용이 외래처방이 아니므로 처리","E001");
- model.setValue("/root/send/srchinfo/srchbcno","");
- model.refresh();
- return;
- }
- }else{
- // 투약번호별 입력으로 처리
- if (model.getValue("/root/send/srchinfo/srchdrugno") !="") {
- drugno=model.getValue("/root/send/srchinfo/srchdrugno");
- }
- }
-
- model.setValue("/root/send/srchinfo/srchdrugdd",drugdd);
- model.setValue("/root/send/srchinfo/srchdrugno",drugno);
- model.setValue("/root/send/srchinfo/srchprcpno",prcpno);
- // model.setValue("/root/send/srchinfo/srchioflag" ,"O");
-
- model.removeNodeset("/root/main/masterinfo/tmlist1");
- model.removeNodeset("/root/main/masterinfo/tmlist2");
- model.removeNodeset("/root/main/masterinfo/druglist");
- model.removeNodeset("/root/main/masterinfo/tmlist3");
- var success = submit("TRADT20701", false);
-
- if (success) {
- // 바코드번호 reset
- model.setValue("/root/send/srchinfo/srchbcno","");
- model.refresh();
-
- // 상세조회
- if (grid_druglist.rows > 0) {
- grid_druglist.dispatch("onclick");
- }
-
- // 그래프
- fDispWaitTime("G");
- gTimer = window.setInterval("fDispWaitTime('G')",gInterval);
- }
- ]]>
- </script>
- </button>
- <input id="ipt_sumdt1" ref="/root/send/srchinfo/srchsumdt1" class="input_s_essential" inputtype="date" style="left:104px; top:13px; width:100px; height:19px; "/>
- <input id="ipt_sumdt2" ref="/root/send/srchinfo/srchsumdt2" class="input_s_essential" inputtype="date" style="left:220px; top:13px; width:100px; height:19px; "/>
- <select1 id="cmb_orddeptcd" ref="/root/send/srchinfo/srchorddeptcd" class="combo_search" appearance="minimal" style="left:430px; top:13px; width:115px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/orddept/dept">
- <label ref="depthngnm"/>
- <value ref="deptcd"/>
- </itemset>
- </choices>
- </select1>
- <input id="ipt_pid" ref="/root/send/srchinfo/srchpid" class="input_search" autonext="false" maxlength="10" style="left:637px; top:13px; width:80px; height:19px; "/>
- <input id="ipt_hngnm" ref="/root/send/srchinfo/srchhngnm" class="input_search" style="left:740px; top:13px; width:70px; height:19px; "/>
- <select id="chk_drugyn" ref="/root/send/srchinfo/srchdrugyn" class="checkbox_search" overflow="visible" appearance="full" cols="2" rows="1" style="left:929px; top:15px; width:145px; height:19px; border-style:none; ">
- <choices>
- <item>
- <label>미수령약</label>
- <value>1</value>
- </item>
- <item>
- <label>투약관리약</label>
- <value>2</value>
- </item>
- </choices>
- </select>
- </group>
- <datagrid id="grid_druglist" nodeset="/root/main/masterinfo/druglist" scroll="auto" caption="^처방일자^환자명^등록번호^투약번호^진료과^조제상태^처방입력일시^특조전송일시^처방마감일시^처방출력일시^라벨조제완료일시^대기시간(분)^투약일시^투약약사^stocdeptnm^stocdt^drugstat^prcpid^drugid^drugdd^ioflag^instcd^hosinhosoutflag^stocdeptcd" colsep="^" colwidth="26, 67, 72, 71, 58, 100, 63, 116, 122, 116, 115, 123, 120, 139, 63, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" explorerbar="sortshow" frozencols="7" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" selectionmode="listbox" style="left:0px; top:112px; width:975px; height:283px; ">
- <col ref="sel" type="checkbox"/>
- <col ref="prcpdd" format="yyyy-mm-dd"/>
- <col ref="hngnm"/>
- <col ref="pid"/>
- <col ref="drugno"/>
- <col ref="orddeptnm"/>
- <col ref="drugstatnm" format="yyyy-mm-dd hh:mm:ss"/>
- <col ref="rgstdm" format="yyyy-mm-dd hh:mm:ss"/>
- <col ref="appdt" format="yyyy-mm-dd hh:mm:ss"/>
- <col ref="sumdt" format="yyyy-mm-dd hh:mm:ss"/>
- <col ref="prntdt" format="yyyy-mm-dd hh:mm:ss" style="left:831px; top:23px; width:115px; height:23px; "/>
- <col ref="labelcompdt" format="yyyy-mm-dd hh:mm:ss"/>
- <col ref="waitmin" format="#,###" style="text-align:right; "/>
- <col ref="prcpdt" format="yyyy-mm-dd hh:mm:ss"/>
- <col ref="prcpidnm" format="yyyy-mm-dd hh:mm:ss"/>
- <col ref="drugdt" visibility="hidden"/>
- <col ref="drugidnm" visibility="hidden" format="yyyy-mm-dd hh:mm:ss"/>
- <col ref="stocdeptnm" visibility="hidden"/>
- <col ref="stocdt" visibility="hidden"/>
- <col ref="drugstat" visibility="hidden"/>
- <col ref="prcpid" visibility="hidden"/>
- <col ref="drugid" visibility="hidden"/>
- <col ref="drugdd" visibility="hidden"/>
- <col ref="ioflag" visibility="hidden"/>
- <col ref="instcd" visibility="hidden"/>
- <col ref="hosinhosoutflag" visibility="hidden"/>
- <col ref="stocdeptcd" visibility="hidden"/>
- <col ref="spcldrug" visibility="hidden"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var row = grid_druglist.row;
- if (row == -1) row = 1;
- var drugdd = model.getValue("/root/main/masterinfo/druglist["+row+"]/drugdd");
- var drugno = model.getValue("/root/main/masterinfo/druglist["+row+"]/drugno");
- var ioflag = model.getValue("/root/main/masterinfo/druglist["+row+"]/ioflag");
- var spcldrug = model.getValue("/root/main/masterinfo/druglist["+row+"]/spcldrug");
-
-
- model.setValue("/root/send/srchdetlinfo/drugdd",drugdd);
- model.setValue("/root/send/srchdetlinfo/drugno",drugno);
- model.setValue("/root/send/srchdetlinfo/ioflag" ,ioflag);
- submit("TRADT20702");
-
- // setRowStyle("grd_detdruglist" , "6" , "true" , "ordrtnflag", "equal" );
- model.refresh();
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- // 소트 후 인스턴스 정리
- grid_druglist.gridToInstance(); // Sort 된 Grid 상의 Data 순서와 Instance Node 상의 Data 순서를 동일하게 맞춰준다.
- ]]>
- </script>
- </datagrid>
- <line id="line6" class="line_1" style="x1:0px; y1:107px; x2:975px; y2:107px; "/>
- <caption id="caption11" class="tit_2" style="left:0px; top:406px; width:144px; height:13px; ">처방상세</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:420px; x2:975px; y2:420px; "/>
- <datagrid id="grd_detdruglist" nodeset="/root/main/detlinfo/detdruglist" caption="반환^약품코드^약품명^제형^1일수량^1회수량^횟수^일수^처방출력일시^조제완료일시^적용일시^등록번호^약번호^바코드^산제" colsep="^" colwidth="31, 80, 216, 47, 48, 48, 37, 36, 125, 119, 120, 86, 75, 100, 35" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:425px; width:975px; height:288px; ">
- <col ref="ordrtnflag" type="checkbox"/>
- <col ref="prcpcd"/>
- <col ref="drugnm"/>
- <col ref="drugtypenm"/>
- <col ref="prcpqty" style="text-align:right; "/>
- <col ref="prcpqty2" style="text-align:right; "/>
- <col ref="prcptims" style="text-align:right; "/>
- <col ref="prcpdayno" style="text-align:right; "/>
- <col ref="prntdt" format="yyyy-mm-dd hh:mm:ss"/>
- <col ref="prcpdt" format="yyyy-mm-dd hh:mm:ss"/>
- <col ref="sumdt" format="yyyy-mm-dd hh:mm:ss"/>
- <col ref="pid"/>
- <col ref="drugno"/>
- <col ref="bcno"/>
- <col ref="powdflag" type="checkbox"/>
- </datagrid>
- <caption id="caption12" class="tit_2" style="left:975px; top:92px; width:144px; height:14px; ">대기시간(분)</caption>
- <line id="line2" class="line_1" style="x1:979px; y1:107px; x2:1194px; y2:107px; "/>
- <caption id="caption2" class="cell_1" style="left:11px; top:80px; width:59px; height:23px; vertical-align:middle; ">조제완료</caption>
- <input id="ipt_bcno" ref="/root/send/srchinfo/srchbcno" class="input_search" imemode="alpha" style="left:75px; top:82px; width:115px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- var barcode = "";
- var drugstat = "";
- var ioflag = "";
-
- if(event.keyCode == "13") {
- setInputNodeCurText();
- barcode = model.getValue("/root/send/srchinfo/srchbcno");
-
- // 소리 나오기
- fNuCall("1");
-
- btn_sea.dispatch( "DOMActivate");
-
- // 외래데이터만 처리
- if (barcode.length > 1) {
- if(barcode.substr(0,1) == "M"){//마약전용처방전
- ioflag = barcode.substr(1,1);
- } else {// 일반 원내처방전
- ioflag = barcode.substr(0,1);
- }
- if (ioflag.toUpperCase() != "O") return;
- }
- // 바코드에 해당하는 데이터없음
- if (grid_druglist.rows == 0) {
- messageBox("처리할 데이터가 ","I004");
- return;
- }
-
- // 조제처리
- drugstat = model.getValue("/root/main/masterinfo/druglist[1]/drugstat");
- if (drugstat == "P" || drugstat == "ND") {
- fSubmitDrugStat("D");
- //window.children.item("SMADT01200").model.dispatch("xforms-ready");
- model.setFocus("ipt_bcno");
-
- } else if(barcode.substr(0,1) == "M") {
- //model.setValue("/root/send/req/dispcnts", "N");
- //model.setValue("/root/send/req/dispflag", "D");
- //model.setValue("/root/send/req/drugdd", model.getValue("/root/main/masterinfo/druglist[1]/drugdd"));
- //model.setValue("/root/send/req/drugno", model.getValue("/root/main/masterinfo/druglist[1]/drugno"));
- //model.setValue("/root/send/req/inputtm", getCurrentTime());
- //전광판 데이터
- //submit("TXADT00702");
- } else {
- //messageBox("처리할 데이터가 ","I004");
- }
-
- //전광판 데이터 전송
- if (grid_druglist.rows > 0) {
- //20110127_laboru
- model.setValue("/root/send/req/drugno", model.getValue("/root/main/masterinfo/druglist[1]/drugno"));
- fDrugnoDisp("D");
- }
- //바코드 스캔 반복가능하도록 focus 이동. 2011.9.8 jmkim
- model.setFocus("ipt_bcno", true);
- }
- //btn_sea.dispatch( "DOMActivate");
- ]]>
- </script>
- </input>
- <caption id="caption8" class="cell_1" style="left:385px; top:80px; width:55px; height:23px; text-align:center; vertical-align:middle; ">호출</caption>
- <input id="input1" ref="/root/send/callbarcode" class="input_search" imemode="alpha" style="left:445px; top:82px; width:115px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- var drugstat = "";
- var barcode = "";
- var drugdd = "";
- var drugno = "";
- var ioflag = "";
-
- if(event.keyCode == "13") {
- setInputNodeCurText();
- barcode = model.getValue("/root/send/callbarcode");
-
- if (barcode.length > 9) {
- ioflag = barcode.substr(0,1);
- drugdd = barcode.substr(1,8);
- drugno = barcode.substr(9,barcode.length-9);
-
- // 외래데이터만 처리
- if (ioflag.toUpperCase() != "O") {
- messageBox("외래처방이 아니므로 처리","E001");
- model.setValue("/root/send/callbarcode","");
- model.refresh();
- return;
- }
- }
-
- model.setValue("/root/send/req/drugdd",drugdd);
- model.setValue("/root/send/req/drugno",drugno);
- model.setValue("/root/send/req/ioflag" ,"O");
-
- model.setValue("/root/send/req/dispflag" ,"C");
- model.setValue("/root/send/req/inputtm" ,getCurrentTime());
- //전광판 데이터
- // submit("TXADT00702");
- model.setValue("/root/send/callbarcode","");
- model.refresh();
- /*
- // 바코드에 해당하는 데이터없음
- if (grid_druglist.rows == 0) {
- messageBox("처리할 데이터가 ","I004");
- return;
- }
-
- // 조제처리
- drugstat = model.getValue("/root/main/masterinfo/druglist[1]/drugstat");
- if (drugstat == "P" || drugstat == "ND") {
- fSubmitDrugStat("D");
- } else if (drugstat == "D") {
- fSubmitDrugStat("M");
- } else {
- messageBox("처리할 데이터가 ","I004");
- }*/
- window.children.item("SMADT01200").model.dispatch("xforms-ready");
-
- }
- ]]>
- </script>
- </input>
- <button id="btn_graph1" class="btn2_letter6" style="left:1105px; top:87px; width:86px; height:19px; ">
- <caption>텍스트로보기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- // 타이머 설정
- if (gWaitDispType == "G") {
- if (gTimer == null) gTimer = window.setInterval("fDispWaitTime('G')",gInterval);
- } else if (gWaitDispType == "T") {
- if (gTimer != null) window.clearinterval(gTimer);
- gTimer = null;
- }
-
- // 조회
- fDispWaitTime(gWaitDispType);
- ]]>
- </script>
- </button>
- <object id="TChart_Time" clsid="{fab9b41c-87d6-474d-ab7e-f07d78f2422e}" style="left:980px; top:238px; width:215px; height:235px; "/>
- <object id="TChart_Tot" clsid="{fab9b41c-87d6-474d-ab7e-f07d78f2422e}" style="left:980px; top:112px; width:215px; height:120px; "/>
- <button id="button6" class="btn2_letter2" navindex="4" style="left:925px; top:85px; width:42px; height:19px; ">
- <caption>엑셀</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var file = window.fileDialog("save","","false","","xls","Excel Files(*.xls)|*.xls");
- grid_druglist.saveExcel(file);
- ]]>
- </script>
- </button>
- <input id="input3" ref="/root/send/srchinfo/srchbcno" class="input_search" imemode="alpha" style="left:264px; top:82px; width:115px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- var barcode = "";
- var drugstat = "";
- var ioflag = "";
-
- if(event.keyCode == "13") {
- setInputNodeCurText();
- barcode = model.getValue("/root/send/srchinfo/srchbcno");
-
- btn_sea.dispatch( "DOMActivate");
-
- // 외래데이터만 처리
- if (barcode.length > 1) {
- if(barcode.substr(0,1) == "M"){//마약전용처방전
- ioflag = barcode.substr(1,1);
- } else {
- ioflag = barcode.substr(0,1);
- }
- if (ioflag.toUpperCase() != "O") return;
- }
- // 바코드에 해당하는 데이터없음
- if (grid_druglist.rows == 0) {
- messageBox("처리할 데이터가 ","I004");
- return;
- }
-
- // 조제처리
- drugstat = model.getValue("/root/main/masterinfo/druglist[1]/drugstat");
- if (drugstat == "D") {
- fSubmitDrugStat("M");
- // window.children.item("SMADT01200").model.dispatch("xforms-ready");
- // model.setFocus("input3");
- model.setFocus("input3");
- } else if(barcode.substr(0,1) == "M") {
- //model.setValue("/root/send/req/dispflag", "M");
- //model.setValue("/root/send/req/drugdd", model.getValue("/root/main/masterinfo/druglist[1]/drugdd"));
- //model.setValue("/root/send/req/drugno", model.getValue("/root/main/masterinfo/druglist[1]/drugno"));
- //model.setValue("/root/send/req/inputtm", getCurrentTime());
- //전광판 데이터
- //submit("TXADT00702");
- } else{
- //messageBox("처리할 데이터가 ","I004");
- }
-
- //전광판 데이터 전송
- if (grid_druglist.rows > 0) {
- //20110127_laboru
- model.setValue("/root/send/req/drugno", model.getValue("/root/main/masterinfo/druglist[1]/drugno"));
- fDrugnoDisp("M");
- }
- //바코드 스캔 반복가능하도록 focus 이동. 2011.9.8 jmkim
- model.setFocus("input3", true);
- }
- //btn_sea.dispatch( "DOMActivate");
- ]]>
- </script>
- </input>
- <caption id="caption10" class="cell_1" style="left:200px; top:80px; width:59px; height:23px; vertical-align:middle; ">투약완료</caption>
- <input id="input2" ref="/root/send/srchinfo/srchdrugno" class="input_search" autonext="false" maxlength="10" format="9999999999" style="left:847px; top:83px; width:68px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- inputEnterKey("btn_sea","DOMActivate");
- ]]>
- </script>
- </input>
- <caption id="caption9" class="search_name" style="left:758px; top:85px; width:86px; height:17px; ">투약번호 :</caption>
- </group>
- </xhtml:body>
- </xhtml:html>
|