1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005 |
- <?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>
- <grd_druglist>
- <sel/>
- <ordrtnflag/>
- <prcpdd/>
- <drugno/>
- <prcpkindcdnm/>
- <roomcd/>
- <hngnm/>
- <pid/>
- <drugstat/>
- <prcpdt/>
- <bcno/>
- <drugpath/>
- <drugdt/>
- <nodeliveyn/>
- <nodelivedt/>
- <rtnflag/>
- <rtndt/>
- <drugdd/>
- <ioflag/>
- <instcd/>
- <predrugstat/>
- <userid/>
- <predrugpath/>
- <stocdeptcd/>
- <stocdeptnm/>
- <stocdt/>
- <medispclnm/>
- <atdocnm/>
- <prntdt/>
- <drugenddt/>
- </grd_druglist>
- <grd_exelist>
- <prcphistcdnm/>
- <prcpcd/>
- <prcpnm/>
- <prcpqty/>
- <prcptims/>
- <prcpdayno/>
- </grd_exelist>
- <grd_histlist>
- <prcphistcdnm/>
- <prcpcd/>
- <prcpnm/>
- <prcpqty/>
- <prcpqty/>
- <prcptims/>
- <prcpdayno/>
- </grd_histlist>
- </masterinfo>
- <detailinfo>
- <pat_info>
- <drugno/>
- <roomcd/>
- <hngnm/>
- <pid/>
- <indd/>
- <orddeptnm/>
- <atdocnm/>
- <medispclnm/>
- </pat_info>
- <item>
- <sel/>
- <ordrtnflag/>
- <prcpcd/>
- <drugnm/>
- <drugtypenm/>
- <prcpqty/>
- <prcptims/>
- <prcpdayno/>
- <prntdt/>
- <nodeliveyn/>
- <nodelivedt/>
- <rtnflag/>
- <rtndt/>
- <prcpdt/>
- <drugpathnm/>
- <drugdt/>
- <sumdt/>
- <pid/>
- <drugno/>
- <bcno/>
- <powdflag/>
- <drugdd/>
- <ioflag/>
- <drugseqno/>
- <instcd/>
- <prcpdd/>
- <prcpno/>
- <prcphistno/>
- <execprcpno/>
- <drugtype/>
- <drugstat/>
- <userid/>
- <userdeptcd/>
- <drugpath/>
- <prcpkindcd/>
- <prcphistcd/>
- <stocdeptcd/>
- <stocdeptnm/>
- <stocdt/>
- <spcldrug/>
- </item>
- <memoinfo>
- <pid/>
- <indd/>
- <seqno/>
- <instcd/>
- <orddeptcd/>
- <orddeptnm/>
- <writid/>
- <writid2/>
- <writnm/>
- <writdt/>
- <memo/>
- <useyn/>
- <m/>
- <ioflag/>
- </memoinfo>
- </detailinfo>
- <reokdateflag>
- <reokdateflag1/>
- <reokdateflag2/>
- </reokdateflag>
- </main>
- <send>
- <req1>
- <drugdd/>
- <drugno/>
- </req1>
- <req2>
- <list/>
- </req2>
- <srchinfo>
- <srchsumdd1/>
- <srchsumtm1/>
- <srchsumdd2/>
- <srchsumtm2/>
- <srchwardcd/>
- <srchpid/>
- <srchhngnm/>
- <srchprcpcd/>
- <srchdrugno/>
- <srchioflag/>
- <srchsumdt1/>
- <srchsumdt2/>
- <srchprcpkindcd> D</srchprcpkindcd>
- <srchprcpkindall/>
- <srchprcpnm/>
- <rtnstocdeptcd/>
- </srchinfo>
- <srchdetinfo>
- <drugdd/>
- <drugno/>
- <ioflag/>
- <srchpid/>
- </srchdetinfo>
- <srchbcinfo>
- <srchdrugdd/>
- <srchdrugno/>
- <srchioflag/>
- <srchbcno1/>
- <srchbcno2/>
- </srchbcinfo>
- <deptinfo>
- <deptflag/>
- </deptinfo>
- <srchprcpcdinfo>
- <srchdrugcd/>
- </srchprcpcdinfo>
- <memosrchinfo>
- <srchpid/>
- <srchseqno/>
- <srchindd/>
- <srchinstcd/>
- <srchioflag/>
- </memosrchinfo>
- <usersrchinfo>
- <srchuserid/>
- </usersrchinfo>
- <req>
- <data1>
- </data1>
- <data2/>
- <data3/>
- </req>
- </send>
- <init>
- <deptlist>
- <ward>
- <wardcd/>
- <wardnm/>
- </ward>
- </deptlist>
- <drugpathinfo>
- <A0149/>
- </drugpathinfo>
- <prcpkindinfo>
- <M0003/>
- </prcpkindinfo>
- <drugstatallinfo>
- <A0004/>
- </drugstatallinfo>
- <drugstatinfo/>
- <rtnflaginfo>
- <item>
- <cdid>X</cdid>
- <cdnm>미불출</cdnm>
- </item>
- <item>
- <cdid>D</cdid>
- <cdnm>반환확인</cdnm>
- </item>
- </rtnflaginfo>
- <patinfo>
- <pid/>
- <hngnm/>
- </patinfo>
- <grdwideyn/>
- <stocinfo>
- <stocdeptcd>3242107000</stocdeptcd>
- <deptlist>
- <stocdeptcd/>
- <stocdeptnm/>
- </deptlist>
- </stocinfo>
- <misdeptlist>
- <deptlist/>
- </misdeptlist>
- <dateinfo/>
- </init>
- <hidden>
- <drugitem>
- <drugcd/>
- <drugnm/>
- </drugitem>
- <receivedrugcd>/root/send/srchinfo/srchprcpcd</receivedrugcd>
- <stocdeptlist>
- <deptlist>
- <stocdeptcd/>
- <stocdeptnm/>
- </deptlist>
- </stocdeptlist>
- </hidden>
- <temp>
- <receivedata>
- <receiveref/>
- </receivedata>
- <popup>
- <drugstat>
- <mouserght>
- <label>[일괄처리항목]</label>
- <value>-</value>
- </mouserght>
- <mouserght>
- <label>-</label>
- <value/>
- </mouserght>
- <mouserght>
- <label>조제완료</label>
- <value>D</value>
- </mouserght>
- <mouserght>
- <label>조제보류</label>
- <value>ND</value>
- </mouserght>
- <mouserght>
- <label>-</label>
- <value/>
- </mouserght>
- <mouserght>
- <label>투약완료</label>
- <value>M</value>
- </mouserght>
- <mouserght>
- <label>투약취소</label>
- <value>MC</value>
- </mouserght>
- <mouserght>
- <label>-</label>
- <value/>
- </mouserght>
- <mouserght>
- <label>컨베어</label>
- <value>C</value>
- </mouserght>
- <mouserght>
- <label>에어슈터</label>
- <value>A</value>
- </mouserght>
- <mouserght>
- <label>포터</label>
- <value>P</value>
- </mouserght>
- <mouserght>
- <label>복약상담</label>
- <value>E</value>
- </mouserght>
- <mouserght>
- <label>투약구</label>
- <value>M</value>
- </mouserght>
- <mouserght>
- <label>기타</label>
- <value>Q</value>
- </mouserght>
- </drugstat>
- </popup>
- <reteresn/>
- </temp>
- <temp2>
- <rtnlist>
- <grd_exelist/>
- <grd_histlist/>
- </rtnlist>
- </temp2>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
-
- //2008-12-03 버튼권한
- ipt_bcno1.disabled = !checkAuth("X"); //조제완료 바코드
- ipt_bcno2.disabled = !checkAuth("X"); //반환확인 바코드
- chk_redateflag1.disabled = !checkAuth("X"); //조제완료 제 시간등록 2015.1.27 김치국
- chk_redateflag2.disabled = !checkAuth("X"); //조제완료 제 시간등록 2015.1.27 김치국
- cmb_stocdeptcd.disabled =! checkAuth("X"); //불출부서
- button36.disabled = !checkAuth("X"); //조제상태저장
- button1.disabled = !checkAuth("X"); //이동경로저장
- button4.disabled = !checkAuth("X"); //미불출확인
- button5.disabled = !checkAuth("X"); //미불출취소
- button6.disabled = !checkAuth("X"); //반환확인저장
- btn_save.disabled = !checkAuth("X"); //반환확인취소
-
- // 현재날짜
- model.setValue("/root/send/srchinfo/srchsumdd1",getCurrentDate());
- model.setValue("/root/send/srchinfo/srchsumdd2",getCurrentDate());
-
- // 초기코드값
- model.removeNodeset("/root/init/drugpathinfo/A0149");
- zbcfGetCodeList( new Array("A0149", "M0003","A0004"), new Array("/root/init/drugpathinfo","/root/init/prcpkindinfo","/root/init/drugstatallinfo") );
- var success = submit("TRADT10404");
- if (success) astfAddCombo("/root/init/drugpathinfo","A0149","cdid,cdnm",",-");
-
- //병동 Combo 조회
- model.setValue("/root/send/deptinfo/deptflag", "W");
- submit("TRADT10203");
- astfAddCombo("/root/init/deptlist","ward","wardcd,wardnm",",전체");
-
- var index = 1;
- var nodeList = instance1.selectNodes("/root/init/drugstatallinfo/A0004");
- for( var i=1; i<=nodeList.length; i++) {
- var cdid = model.getValue("/root/init/drugstatallinfo/A0004["+i+"]/cdid");
- if (cdid == "ND" || cdid == "MD" || cdid == "D" || cdid == "M") { // 20120829_투약완료 상태 추가
- index++;
- model.makeNode("/root/init/drugstatinfo/A0004["+index+"]");
- model.copyNode("/root/init/drugstatinfo/A0004["+index+"]","/root/init/drugstatallinfo/A0004["+i+"]");
- if (cdid == "MD") model.setValue("/root/init/drugstatinfo/A0004["+index+"]/cdnm","");
- }
- }
-
- // 전체선택
- grd_druglist.fixedcellcheckbox(0,1) = true;
- grd_detdruglist.fixedcellcheckbox(0,1) = true;
-
- // 상세보기 default값
- model.setValue("/root/init/grdwideyn","y");
-
- // 처방종류 전체선택
- //model.setValue("/root/send/srchinfo/srchprcpkindall","Y");
- //model.setValue("/root/send/srchinfo/srchprcpkindcd","R A D S M");
-
- // 재고불출부서
- model.setValue("/root/init/stocinfo/stocdeptcd",getUserInfo("dutplcecd")); // 재고불출부서 로긴부서로 default세팅
- // model.setValue("/root/init/stocinfo/stocdeptcd","3242106000");
- // 반환 출고부서 2009.11.17 pymi
- var dutplceinstcd = getUserInfo("dutplceinstcd");
- submit("TRADT01106");
- /*
- if((dutplceinstcd == "013") || (dutplceinstcd == "014") || (dutplceinstcd == "017") || (dutplceinstcd == "011")) {
- combo1.select(0);
- } else if(dutplceinstcd == "012"){
- combo1.select(2);
- } else {
- combo1.select(1);
- }*/
- // 20101021_laboru_경북대병원_실출고부서 셋팅
- combo1.select(0);
- //model.setValue("/root/temp/stocdeptcd", model.getValue("/root/hidden/srchinfo/stocdeptcd"));
- // (e)
-
- // 20100203_laboru_불출부서 visibility 막기
- // submit("TRADT00704");
- // if(model.getValue("/root/hidden/stocdeptlist/deptlist/stocdeptcd") == "Y") {
- // cmb_stocdeptcd.visible = false;
- // caption21.visible = false;
- // }
-
- model.refresh();
- ]]>
- </script>
- <submission id="TRADT10401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchinfo" replace="instance" resultref="/root/main/masterinfo/grd_druglist"/>
- <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/dateHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
- <submission id="TRADT10402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdetinfo" replace="instance" resultref="/root/main/detailinfo"/>
- <submission id="TRADT10403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchbcinfo" replace="instance" resultref="/root/main/masterinfo"/>
- <submission id="TXADT10401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req2" replace="instance" resultref="/root/hidden"/>
- <submission id="TXADT10402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req2" replace="instance" resultref="/root/hidden"/>
- <submission id="TXADT10403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req2" replace="instance" resultref="/root/hidden"/>
- <submission id="TRADT10404" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/init/wardinfo"/>
- <submission id="TXADT10101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req/data1" replace="instance" resultref="/root/hidden"/>
- <submission id="TRADT01106" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/init/misdeptlist"/>
- <submission id="TXADT10102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req/data2" replace="instance" resultref="/root/hidden"/>
- <submission id="TRADT00105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/usersrchinfo" replace="instance" resultref="/root/hidden/userinfo"/>
- <submission id="TRADT00103" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/init/dateinfo"/>
- <submission id="TRZBC00101"/>
- <script type="javascript">
- <![CDATA[
- // 전체선택 인덱스
- var varDrugTotSel = "false"; // 처방목록 전체선택
- var varDrugPathIndex = 2; // 처방목록 이동경로
- var varDrugStatIndex = 3; // 처방목록 조제상태
- var varDrugStocIndex = 1; // 처방상세 미불출/반환확인
-
-
- function fSetValueGrid2Cell(popupParam) {
- var row = grd_druglist.row;
- var col = grd_druglist.col;
- var nodeList = null;
- var drugpath = "";
- var drugstat = "";
- var predrugstat = "";
- var predrugpath = "";
- for( var i=1; i< grd_druglist.rows; i++) {
- if ( model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/drugdt") == "-") {
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/drugpath","-");
- }
- }
- model.refresh();
- if (popupParam== "D") { // 투약처방상태
- for( var i=1; i< grd_druglist.rows; i++) {
- predrugstat = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/predrugstat" );
- if ( model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/sel") == "true") { // 20120829
- if (predrugstat == "MD" || predrugstat == "P" || predrugstat == "ND" || predrugstat == "D") {
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"true");
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/drugstat" ,popupParam);
- }else {
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"false");
- }
- }
- }
- } else if (popupParam== "ND") { // 투약처방상태 (조제보류)
- for( var i=1; i< grd_druglist.rows; i++) {
- predrugstat = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/predrugstat" );
- if ( model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/sel") == "true") {
- if ((predrugstat == "MD" || predrugstat == "P" || predrugstat == "ND" || predrugstat == "D") ) { // && (model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/drugdt") == "-") 20120829_조건 삭제
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"true");
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/drugstat" ,popupParam);
- }else {
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"false");
- }
- }
- }
- } else if (popupParam== "M") { // 20120829_투약처방상태 (투약완료)
- for( var i=1; i< grd_druglist.rows; i++) {
- predrugstat = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/predrugstat" );
- if ( model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/sel") == "true") {
- if (predrugstat == "D" ) {
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"true");
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/drugstat" ,popupParam);
- }else {
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"false");
- }
- }
- }
- } else if (popupParam== "MC") { // 20120829_투약처방상태 (투약취소)
- for( var i=1; i< grd_druglist.rows; i++) {
- predrugstat = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/predrugstat" );
- if ( model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/sel") == "true") {
- if (predrugstat == "M" ) {
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"true");
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/drugstat" ,"D");
- }else {
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"false");
- }
- }
- }
- } else { // 이동경로
- for( var i=1; i< grd_druglist.rows; i++) {
- predrugstat = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/predrugstat" );
- predrugpath = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/predrugpath" );
- if ( model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/sel") == "true") {
- if (predrugstat == "D" && (predrugpath == '-' || predrugpath == '')) {
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/drugpath",popupParam);
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"true");
- } else {
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"false");
- }
- }
- }
- }
-
- button36.dispatch("DOMActivate"); // 20120829
- model.refresh();
- }
-
- function fgetprcpdesclist() {
- var rows = grd_druglist.rows;
- var row = grd_druglist.row;
- var col = grd_druglist.col;
- var predrugstat = "";
- var detdrugstat = "";
-
- // 전체선택
- if (row == 0 && col== 1) {
- for( var i=1; i< grd_druglist.rows; i++) {
- predrugstat = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/drugstat" );
- /*if (predrugstat == "ND") {
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"false");
- } */
- }
-
- return;
- }
-
- // row 인덱스 처리
- if (row == -1) row = 1;
- if (rows <= 1 ) return;
-
- // 노드초기화
- model.removeNodeset("/root/main/detailinfo/pat_info");
- model.removeNodeset("/root/main/detailinfo/item");
-
- // 처방상세조회
- predrugstat = model.getValue("/root/main/masterinfo/grd_druglist["+row+"]/predrugstat");
- model.setValue("/root/send/srchdetinfo/drugdd", model.getValue("/root/main/masterinfo/grd_druglist["+row+"]/drugdd"));
- model.setValue("/root/send/srchdetinfo/drugno", model.getValue("/root/main/masterinfo/grd_druglist["+row+"]/drugno"));
- model.setValue("root/send/srchdetinfo/ioflag" , model.getValue("/root/main/masterinfo/grd_druglist["+row+"]/ioflag"));
- model.setValue("root/send/srchdetinfo/srchpid" , model.getValue("/root/main/masterinfo/grd_druglist["+row+"]/pid"));
- var success = submit("TRADT10402");
-
- // 처리결과
- if (success) {
-
- // 반환처방-컬러세팅
- // 컬러 병동처방전감사와 동일하게 처리 2008.09.11
- grd_detdruglist.rebuildStyle();
- //setRowStyle("grd_detdruglist" , "1" , "true" , "ordrtnflag", "equal" );
-
- var style = new Array("#fcd2c1" , "#ffe79d" , "#f3e1bf" , "#7BE6B7" , "#b9e5fb" , "#f7a08b" , "#fec34d" , "#dec6a4" , "#c8e67b" , "#43c8f5", "#99cf16", "#e5f3c2" );
- for (var i = 1; i < grd_detdruglist.rows; i ++){
- var sprcphistcd = model.getValue("/root/main/detailinfo/item["+i+"]/prcphistcd");
- grd_detdruglist.cellStyle("background-color", i, grd_detdruglist.colRef("prcpcd")) = '#ffffff';
- if( sprcphistcd == "C") {
- grd_detdruglist.cellStyle("background-color", i, grd_detdruglist.colRef("prcpcd")) = style[2];
- }
- if( sprcphistcd == "D") {
- grd_detdruglist.cellStyle("background-color", i, grd_detdruglist.colRef("prcpcd")) = style[6];
- }
- if( sprcphistcd == "E") {
- grd_detdruglist.cellStyle("background-color", i, grd_detdruglist.colRef("prcpcd")) = style[6];
- }
-
- if(sprcphistcd == "O" && model.getValue("/root/main/detailinfo/item["+i+"]/execprcphistcd") == "Z") { //반환후 남은 처방
- grd_detdruglist.cellStyle("background-color", i, grd_detdruglist.colRef("prcpcd")) = style[4];
- }
-
- grd_detdruglist.fixedcellischeck(0, 1) = false;
- grd_detdruglist.isreadonly(i,1) = false;
-
- var nodeliveyn = model.getValue("/root/main/detailinfo/item["+i+"]/nodeliveyn"); //미불출여부
- var rtnflag = model.getValue("/root/main/detailinfo/item["+i+"]/rtnflag"); //반환확인여부
-
- if(nodeliveyn == "true") {
- grd_detdruglist.cellStyle("background-color", i, grd_detdruglist.colRef("nodeliveyn")) = "#FF0000";
- }
-
- if(rtnflag == "true") {
- grd_detdruglist.cellStyle("background-color", i, grd_detdruglist.colRef("rtnflag")) = "#FF0000";
- }
- }
- model.refresh();
- // 조제보류시 내역선택 불가
- // 이선경 2008-08-25 주석(조제보류시에도 반환확인할 수 있음)
- //for (var i=1; i<=grd_detdruglist.rows; i++) {
- //detdrugstat = model.getValue("/root/main/detailinfo/item["+i+"]/drugstat");
- //if (detdrugstat == "ND") {
- //grd_detdruglist.isreadonly(i,1) = true;
- //grd_detdruglist.isreadonly(i,10) = true;
- //grd_detdruglist.isreadonly(i,13) = true;
- //} else {
- //grd_detdruglist.isreadonly(i,1) = false;
- //grd_detdruglist.isreadonly(i,10) = false;
- //grd_detdruglist.isreadonly(i,13) = false;
- //}
- //}
- }
- }
-
- function fSubmitDrugChk(mode,drugstat,bccode){
- var reteresn = "";
- var nodeList = null;
- var rCSV = null;
- var sel = null;
- var befdrugstat = null;
- var prcpcd = null;
-
- nodeList = instance1.selectNodes("/root/main/detailinfo/item[sel='true']");
- rCSV = getNodeListCSV(nodeList);
- if ( rCSV == null ) {
- messageBox("처방내역을 선택해 주십시오.","I999");
- return;
- }
-
- // 검수보류사유
- if (drugstat == "ND") {
- modal("SMADT00101",0,100,160,"SMADT00101","","");
- reteresn = model.getValue("/root/temp/reteresn");
-
- if (reteresn == "") {
- messageBox("보류사유을", "C002");
- return;
- }
- }
-
- // 투약/미불출은 데이터 처리불가
- for (var j=1; j<grd_detdruglist.rows; j++) {
- sel = model.getValue("/root/main/detailinfo/item["+j+"]/sel");
- if (sel == "true") {
- befdrugstat = model.getValue("/root/main/detailinfo/item["+j+"]/drugstat");
- prcpcd = model.getValue("/root/main/detailinfo/item["+j+"]/prcpcd");
- prcpkindcdnm = model.getValue("/root/main/masterinfo/grd_druglist["+ grd_druglist.row+"]/prcpkindcdnm");
- //alert(prcpkindcdnm );
- if ( prcpkindcdnm != "퇴원" && prcpkindcdnm != "외출/외박"){
- if (befdrugstat == "M") {
- messageBox("[" + prcpcd + "] 약은 투약완료되어 처리", "E001");
- return;
- } else if (befdrugstat == "X") {
- messageBox("[" + prcpcd + "] 약은 미불출되어 처리", "E001");
- return;
- }
- }
- }
- }
-
- // 검수보류사유와 검수상태셋팅
- for(var i=1; i<grd_detdruglist.rows; i++) {
- model.setValue("/root/main/detailinfo/item["+i+"]/drugstat",drugstat);
- model.makeNode("/root/main/detailinfo/item["+i+"]/reteresn");
- model.setValue("/root/main/detailinfo/item["+i+"]/reteresn",reteresn);
- model.makeNode("/root/main/detailinfo/item["+i+"]/userid");
- model.setValue("/root/main/detailinfo/item["+i+"]/userid",getUserId());
- // 2015년 1월27일 조제완료일자 재등록을 위한 Flag 김치국
- model.makeNode("/root/main/detailinfo/item["+i+"]/mchk");
- model.setValue("/root/main/detailinfo/item["+i+"]/mchk",model.getValue("/root/main/reokdateflag/reokdateflag2"));
-
- }
-
- nodeList = instance1.selectNodes("/root/main/detailinfo/item[sel='true']");
- rCSV = getNodeListCSV(nodeList);
- model.removeNodeset("/root/send/req/data1");
- model.makeNode("/root/send/req/data1");
- setCSVToNode("/root/send/req/data1", rCSV);
-
- // 수정
- var sucess = submit("TXADT10101");
-
- if (sucess) {
- // 환자리스트 처리결과(조제상태없이 바코드 전체조회)
- fgetprcpdesclist();
- }
- }
-
- function fSubmitMemo() {
- var varSaveMode = ""; // i-입력, m-수정(제외)
- var varSaveFlag = false;
- var varWritId = "";
-
- // 환자선택 필수
- if (model.getValue("/root/main/detailinfo/pat_info/pid") == "" ) {
- messageBox("환자를 선택하시고", "C001");
- return;
- }
-
- // 작성자
- varWritId = model.getValue("/root/main/detailinfo/memoinfo/writid2");
- if (varWritId == "" ) {
- messageBox("메모작성자 이름은", "I003");
- // setInputNodeCurText();
- // model.setFocus("ipt_writeid");
- return;
- }
-
- // 메모내용필수
- if (model.getValue("/root/main/detailinfo/memoinfo/memo") == "" ) {
- messageBox("메모내용은", "I003");
- return;
- }
-
- /* 본인이 작성하지 않은 메모수정불가
- if (model.getValue("/root/main/detailinfo/memoinfo/writid") != getUserId()) {
- messageBox("자료를 수정할", "E002");
- return;
- }
- */
-
- model.setValue("/root/main/detailinfo/memoinfo/pid" , model.getValue("/root/main/detailinfo/pat_info/pid"));
- model.setValue("/root/main/detailinfo/memoinfo/indd" , model.getValue("/root/main/detailinfo/pat_info/indd"));
- model.setValue("/root/main/detailinfo/memoinfo/useyn" , "Y");
- model.setValue("/root/main/detailinfo/memoinfo/seqno" , "");
- // model.setValue("/root/main/detailinfo/memoinfo/memo" , "");
- model.setValue("/root/main/detailinfo/memoinfo/orddeptcd" , model.getValue("/root/main/detailinfo/pat_info/orddeptcd"));
- // model.setValue("/root/main/detailinfo/memoinfo/writid" , getUserId());
- // model.setValue("/root/main/detailinfo/memoinfo/writid2" , "");
- // model.setValue("/root/main/detailinfo/memoinfo/writnm" , getUserName());
- if(submit("TRADT00103")) {
- model.setValue("/root/main/detailinfo/memoinfo/writdt" , model.getValue("/root/init/dateinfo/currentdt"));
- }
- // 입원/외래 구분 로직 필요
- model.setValue("/root/main/detailinfo/memoinfo/ioflag" , "I");
-
- // 자료수집
- model.setValue("/root/main/detailinfo/memoinfo/writid",varWritId);
- model.copyNode("/root/send/req/data2", "/root/main/detailinfo/memoinfo");
-
- // 저장은 무조건 추가로 처리, 수정기능은 제외
- varSaveMode = "i";
- /*
- if (model.getValue("/root/main/detailinfo/memoinfo/seqno") == "") {
- varSaveMode = "i";
- } else {
- varSaveMode = "u";
- }
- */
-
- model.setValue("/root/send/req/data2/m", varSaveMode);
- submit("TXADT10102");
-
- varSaveFlag = true;
-
- /* 저장여부확인
- if (varSaveMode == "i" && Number(model.getValue("/root/hidden/memoitem/seqno")) > 0) {
- varSaveFlag = true;
- model.setValue("/root/main/detailinfo/memoinfo/seqno", model.getValue("/root/hidden/memoitem/seqno"));
- }
- /* 저장은 무조건 추가로 처리, 수정기능은 제외
- if (varSaveMode == "u" && Number(model.getValue("/root/hidden/memoitem/count")) > 0) {
- varSaveFlag = true;
- }
- */
-
- // 화면정리 및 메세지처리
- if (varSaveFlag == true) {
- model.refresh();
- messageBox("메모저장이", "I002");
- }
- }
-
- function trim(data) {
- return data.replace(/(^\s*)|(\s*$)/g, "");
- }
- ]]>
- </script>
- <submission id="TRADB02604" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchprcpcdinfo" replace="instance" resultref="/root/hidden/drugitem"/>
- <submission id="TXADT10404" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req2" replace="instance" resultref="/root/hidden"/>
- <submission id="TXADT10405" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req2" replace="instance" resultref="/root/hidden"/>
- <submission id="TRADT10203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/deptinfo" replace="instance" resultref="/root/init/deptlist"/>
- <submission id="TRADT10405" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchbcinfo" replace="instance" resultref="/root/temp2/rtnlist"/>
- <submission id="TRADT00704" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/hidden/stocdeptlist"/>
- </model>
- </xhtml:head>
- <xhtml:body guideline="1,1195;2,781;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <script type="javascript" ev:event="onmenu">
- <![CDATA[
- var popupParam = event.description;
- fSetValueGrid2Cell(popupParam);
- ]]>
- </script>
- <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:768px; ">
- <datagrid id="grd_detdruglist" nodeset="/root/main/detailinfo/item" caption="선택^반환^약품코드^약품명^제형구분^1일수량^횟수^일수^처방전 출력시간^미불출^미불출일시^반환확인^반환확인일시^조제상태^조제완료일시^이동경로^이동시간^적용일시^등록번호^약번호^바코드^산제여부" colsep="^" colwidth="50, 31, 91, 216, 64, 48, 37, 36, 112, 47, 110, 56, 119, 68, 118, 108, 120, 123, 74, 100, 100, 60" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:459px; width:1194px; height:308px; ">
- <col ref="sel" type="checkbox"/>
- <col disabled="true" ref="ordrtnflag" type="checkbox" style="color:#ff0000; "/>
- <col ref="prcpcd"/>
- <col ref="drugnm"/>
- <col ref="drugtypenm"/>
- <col ref="prcpqty" 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 disabled="true" ref="nodeliveyn" type="checkbox"/>
- <col ref="nodelivedt" format="yyyy-mm-dd hh:mm:ss"/>
- <col disabled="true" ref="rtnflag" type="checkbox"/>
- <col ref="rtndt" format="yyyy-mm-dd hh:mm:ss"/>
- <col ref="drugstatname"/>
- <col ref="prcpdt" format="yyyy-mm-dd hh:mm:ss"/>
- <col ref="drugpathnm"/>
- <col ref="drugdt" format="yyyy-mm-dd hh:ss:mm"/>
- <col ref="sumdt" format="yyyy-mm-dd hh:mm:ss"/>
- <col ref="pid"/>
- <col ref="drugno"/>
- <col ref="bcno"/>
- <col ref="powdflag" type="checkbox"/>
- <col ref="mchk" type="checkbox"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var row = grd_detdruglist.row;
- var col = grd_detdruglist.col;
- var predrugstat = "";
- var ordrtnflag="";
- // 전체선택
- if (row == 0 && col== 1) {
- for( var i=1; i< grd_detdruglist.rows; i++) {
- predrugstat = model.getValue("/root/main/detailinfo/item["+i+"]/drugstat" );
- ordrtnflag = model.getValue("/root/main/detailinfo/item["+i+"]/ordrtnflag" );
- /*if (predrugstat == "ND" && ordrtnflag =="false") {
- model.setValue("/root/main/detailinfo/item["+i+"]/sel" ,"false");
- } */
- }
-
- return;
- }
-
- ]]>
- </script>
- </datagrid>
- <button id="button1" class="btn4_letter6" style="left:1088px; top:64px; width:104px; height:22px; ">
- <caption>이동경로저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var node = null;
- var nodeList = null;
- var rCSV = null;
- var cnt = 0;
- var stocdeptcd = model.getValue("/root/init/stocinfo/stocdeptcd");
-
- // 조제완료만 CHECK
- for (var i=1; i<grd_druglist.rows; i++) {
- var sel = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/sel");
- var drugstat = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/drugstat");
- var drugpath = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/drugpath");
- var predrugpath = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/predrugpath");
-
- // 사용자 id
- if (sel == "true") {
- /*if (drugstat != "D") {
- messageBox("조제완료 상태만 이동경로를 저장하실수 있습니다.","I999");
- return;
- }
- */
- // 처리조건
- if ((predrugpath == "" || predrugpath == "-") && (drugpath == "" || drugpath == "-")) {
- messageBox("이동경로를 선택하십시오.","I999");
- return;
- }
-
- if ((predrugpath != "" && predrugpath != "-") && (drugpath != "" && drugpath != "-")) {
- messageBox("이동경로가 이미 처리되었습니다.","I999");
- return;
- }
-
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/userid" ,getUserId());
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/stocdeptcd",model.getValue("/root/init/stocinfo/stocdeptcd"));
- cnt++;
- }
- }
-
- // 처방내역 선택여부
- if ( cnt == 0 ) {
- messageBox("처방내역을 선택해 주십시오.","I999");
- return;
- }
-
- nodeList = instance1.selectNodes("/root/main/masterinfo/grd_druglist[sel='true']");
- rCSV = getNodeListCSV(nodeList);
- model.removeNodeset("/root/send/req2/list");
- setCSVToNode("/root/send/req2", rCSV);
-
- var success = submit("TXADT10401");
- if (success) {
- btn_sea.dispatch("DOMActivate");
- grd_druglist.fixedcellischeck(0,1) = false;
- varDrugTotSel = false;
- }
- ]]>
- </script>
- </button>
- <output id="input10" ref="/root/main/detailinfo/pat_info/pid" class="input_search" appearance="output" style="left:467px; top:371px; width:70px; height:19px; "/>
- <group id="group2" style="left:0px; top:2px; width:1195px; height:58px; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:55px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption2" style="left:252px; top:9px; width:15px; height:20px; vertical-align:middle; ">~</caption>
- <caption id="caption3" class="search_name" style="left:20px; top:10px; width:86px; height:17px; ">적용일시</caption>
- <caption id="caption4" class="search_name" style="left:420px; top:10px; width:86px; height:17px; ">병 동</caption>
- <caption id="caption5" class="search_name" style="left:635px; top:10px; width:86px; height:17px; ">등록번호</caption>
- <caption id="caption6" class="search_name" style="left:20px; top:33px; width:86px; height:17px; ">약품코드</caption>
- <button id="btn_sea" class="btn1_letter2" style="left:1128px; top:19px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //일시 세팅
- var srchsumdt1 = "";
- var srchsumdt2 = "";
- var drugstat = "";
- var sumfromdd = model.getValue("/root/send/srchinfo/srchsumdd1");
- var sumtodd = model.getValue("/root/send/srchinfo/srchsumdd2");
- var sumfromtm = model.getValue("/root/send/srchinfo/srchsumtm1");
- var sumtotm = model.getValue("/root/send/srchinfo/srchsumtm2");
- var predrugstat = "";
-
- if (sumfromtm == "") sumfromtm = "0000";
- if (sumtotm == "") sumtotm = "2359";
- srchsumdt1 = sumfromdd + sumfromtm;
- srchsumdt2 = sumtodd + sumtotm;
-
- model.setValue("/root/send/srchinfo/srchsumdt1",srchsumdt1);
- model.setValue("/root/send/srchinfo/srchsumdt2",srchsumdt2);
-
- // 초기화
- grd_druglist.rebuildStyle();
- model.removeNodeset("/root/main/masterinfo/grd_druglist");
- var success = submit("TRADT10401");
- if (success == false) return;
-
- if (grd_druglist.rows> 1) {
- grd_druglist.dispatch("ondblclick");
- } else {
- model.removeNodeset("/root/main/detailinfo/pat_info");
- model.removeNodeset("/root/main/detailinfo/item");
- model.refresh();
- }
-
- // 처리결과(반환처방-컬러세팅)
- setRowStyle("grd_druglist" , "1" , "true" , "ordrtnflag", "equal" );
-
- // 조제보류 데이터변경불가
- for (var i=1; i<grd_druglist.rows; i++) {
- predrugstat = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/predrugstat" );
- grd_druglist.isReadOnly(i, 1) = false;
- grd_druglist.isreadonly(i, 9) = false;
- grd_druglist.isreadonly(i, 13) = false;
-
-
- /*if (predrugstat == "ND") {
- grd_druglist.isReadOnly(i, 1) = true;
- grd_druglist.isreadonly(i, 9) = true;
- grd_druglist.isreadonly(i, 13) = true;
- }
-
- if (model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/ordrtnflag" )=="true" ){
- grd_druglist.isReadOnly(i, 1) = true;
- } */
- }
-
- // 처방상세 클릭이벤트
- if (grd_druglist.rows> 1) {
- grd_druglist.row = 1;
- //grd_druglist.dispatch("onclick");
- fgetprcpdesclist();
- }
-
- // 이동경로
- varDrugPathIndex = 2;
- ]]>
- </script>
- </button>
- <input id="ipt_sumdt1" ref="/root/send/srchinfo/srchsumdd1" class="input_default" inputtype="date" style="left:110px; top:9px; width:90px; height:19px; "/>
- <input id="ipt_sumdt2" ref="/root/send/srchinfo/srchsumdd2" class="input_default" inputtype="date" style="left:265px; top:9px; width:90px; height:19px; "/>
- <select1 id="cmb_wardcd" ref="/root/send/srchinfo/srchwardcd" class="combo_search" appearance="minimal" cols="2" style="left:500px; top:9px; width:125px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/deptlist/ward">
- <label ref="wardnm"/>
- <value ref="wardcd"/>
- </itemset>
- </choices>
- </select1>
- <input id="ipt_pid" ref="/root/send/srchinfo/srchpid" class="input_search" autonext="false" maxlength="10" style="left:714px; top:9px; width:80px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- if(event.keyCode == "13") {
- setInputNodeCurText();
- btn_sea.dispatch("onclick");
- }
- ]]>
- </script>
- </input>
- <input id="ipt_prcpcd" ref="/root/send/srchinfo/srchprcpcd" class="input_search" autonext="false" imemode="alpha" maxlength="12" style="left:110px; top:32px; width:90px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- if(event.keyCode == "13") {
- setInputNodeCurText();
- btn_sea.dispatch("onclick");
- }
- ]]>
- </script>
- </input>
- <button id="button2" class="icon_search" style="left:205px; top:33px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var prcpcd = "";
-
- model.setValue("/root/temp/receivedata/receiveref", model.getValue("/root/hidden/receivedrugcd"));
- modal("SPADB60100",0,100,150,"SPADB60100","/root/temp/receivedata","/root/temp/receivedata");
- prcpcd = model.getValue("/root/send/srchinfo/srchprcpcd");
-
- if (prcpcd != "") {
- model.setValue("/root/send/srchprcpcdinfo/srchdrugcd",prcpcd);
- submit("TRADB02604");
- model.setValue("/root/send/srchinfo/srchprcpnm",model.getValue("/root/hidden/drugitem/drugnm"));
- model.refresh();
- }
- ]]>
- </script>
- </button>
- <input id="input1" ref="/root/send/srchinfo/srchhngnm" class="input_search" editable="false" style="left:815px; top:9px; width:80px; height:19px; "/>
- <button id="button3" class="icon_search" style="left:797px; top:11px; 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>
- <input id="input2" ref="/root/send/srchinfo/srchsumtm1" class="input_search" format="hh:nn" style="left:202px; top:9px; width:45px; height:19px; "/>
- <input id="input3" ref="/root/send/srchinfo/srchsumtm2" class="input_search" format="hh:nn" style="left:357px; top:9px; width:45px; height:19px; "/>
- <caption id="caption29" class="search_name" style="left:420px; top:33px; width:86px; height:17px; ">처방종류</caption>
- <line id="line13" class="line_4" style="x1:1105px; y1:8px; x2:1105px; y2:50px; border-color:#ffe4bb; border-left-style:solid; "/>
- <input id="input4" ref="/root/send/srchinfo/srchprcpnm" class="input_search" style="left:225px; top:32px; width:177px; height:19px; "/>
- <input id="input5" ref="/root/send/srchinfo/srchdrugno" class="input_search" autonext="false" maxlength="5" format="99999" style="left:984px; top:9px; width:80px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- if(event.keyCode == "13") {
- setInputNodeCurText();
- btn_sea.dispatch("onclick");
- }
- ]]>
- </script>
- </input>
- <caption id="caption17" class="search_name" style="left:905px; top:10px; width:86px; height:17px; ">투약번호</caption>
- <select id="chk_prcpkind" ref="/root/send/srchinfo/srchprcpkindcd" class="checkbox_search" overflow="visible" appearance="full" cols="5" rows="1" style="left:542px; top:33px; width:285px; height:15px; border-style:none; ">
- <choices>
- <item>
- <label>정규</label>
- <value>R</value>
- </item>
- <item>
- <label>추가</label>
- <value>A</value>
- </item>
- <item>
- <label>퇴원</label>
- <value>D</value>
- </item>
- <item>
- <label>외출/외박</label>
- <value>S</value>
- </item>
- <item>
- <label>Admission</label>
- <value>M</value>
- </item>
- </choices>
- </select>
- <select id="chk_prcpkindall" ref="/root/send/srchinfo/srchprcpkindall" overflow="visible" appearance="full" style="left:498px; top:33px; width:45px; height:21px; border-style:none; ">
- <choices>
- <item>
- <label>전체</label>
- <value>Y</value>
- </item>
- </choices>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var allflag = model.getValue("/root/send/srchinfo/srchprcpkindall");
- var nodeList = instance1.selectNodes("/root/init/prcpkindinfo/M0003/cdid");
- var prcpkind = "";
-
- // 전체선택
- if (allflag == "Y") {
- model.setValue("/root/send/srchinfo/srchprcpkindcd","R A D S M");
- } else {
- model.setValue("/root/send/srchinfo/srchprcpkindcd","");
- }
-
- model.refresh();
- ]]>
- </script>
- </select>
- <select id="checkbox1" ref="/root/send/srchinfo/srchprcpkindcd" overflow="visible" appearance="full" style="left:840px; top:33px; width:65px; height:21px; border-style:none; ">
- <choices>
- <item>
- <label>응급만</label>
- <value>E</value>
- </item>
- </choices>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- model.setValue("/root/send/srchinfo/srchprcpkindall", "");
-
- if(model.getValue("/root/send/srchinfo/srchprcpkindcd") == "E") {
- chk_prcpkindall.disabled = true;
- chk_prcpkind.disabled = true;
- } else {
- chk_prcpkindall.disabled = false;
- chk_prcpkind.disabled = false;
- }
- model.refresh();
- ]]>
- </script>
- </select>
- </group>
- <output id="input11" ref="/root/main/detailinfo/pat_info/orddeptnm" class="input_search" appearance="output" style="left:743px; top:371px; width:110px; height:19px; "/>
- <caption id="caption10" class="cell_1" style="left:404px; top:370px; width:60px; height:23px; vertical-align:middle; ">등록번호</caption>
- <caption id="caption1" class="cell_1" style="left:340px; top:63px; width:60px; height:23px; vertical-align:middle; ">반환확인</caption>
- <output id="input12" ref="/root/main/detailinfo/pat_info/atdocnm" class="input_search" appearance="output" style="left:904px; top:371px; width:90px; height:19px; "/>
- <caption id="caption11" class="cell_1" style="left:694px; top:370px; width:46px; height:23px; vertical-align:middle; ">진료과</caption>
- <caption id="caption22" class="tit_2" style="left:5px; top:73px; width:216px; height:13px; ">처방목록</caption>
- <output id="input13" ref="/root/main/detailinfo/pat_info/medispclnm" class="input_search" appearance="output" style="left:1048px; top:371px; width:90px; height:19px; "/>
- <caption id="caption12" class="cell_1" style="left:86px; top:63px; width:60px; height:23px; vertical-align:middle; ">조제완료</caption>
- <caption id="caption13" class="cell_1" style="left:857px; top:370px; width:45px; height:23px; vertical-align:middle; ">주치의</caption>
- <caption id="caption14" class="cell_1" style="left:1000px; top:370px; width:45px; height:23px; vertical-align:middle; ">전문의</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:88px; x2:1194px; y2:88px; "/>
- <line id="line2" class="line_1" style="x1:1px; y1:365px; x2:1194px; y2:365px; "/>
- <caption id="caption7" class="cell_1" style="left:1px; top:370px; width:59px; height:23px; vertical-align:middle; ">투약번호</caption>
- <caption id="caption8" class="cell_1" style="left:140px; top:370px; width:35px; height:23px; vertical-align:middle; ">병실</caption>
- <caption id="caption9" class="cell_1" style="left:272px; top:370px; width:35px; height:23px; vertical-align:middle; ">성명</caption>
- <button id="button36" class="btn4_letter6" style="left:979px; top:64px; width:104px; height:22px; ">
- <caption>조제상태저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var nodeList = null;
- var rCSV = null;
- var cnt = 0;
-
- // 조제완료만 CHECK
- for (var i=1; i<grd_druglist.rows; i++) {
- var sel = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/sel");
- var drugstat = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/drugstat");
- var drugdd = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/drugdd");
- var drugno = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/drugno");
-
- model.setValue("/root/send/srchbcinfo/srchdrugdd" ,drugdd);
- model.setValue("/root/send/srchbcinfo/srchdrugno" ,drugno);
-
- if(sel == "true") {
- if ( drugstat =="P"){
- messageBox("조제상태를 ","C002");
- return;
- }
-
- if ( drugstat == "D") {
- model.removeNodeset("/root/temp2/rtnlist/grd_exelist");
- model.removeNodeset("/root/temp2/rtnlist/grd_histlist");
- var success1 = submit("TRADT10405");
-
- // 처방변경이력
- var count1 = 0;
- var count2 = 0;
- var datacount = 0;
- //var nodeList = instance1.selectNodes("/root/main/masterinfo/grd_druglist");
- var ordNodeList = instance1.selectNodes("/root/temp2/rtnlist/grd_exelist");
- var ordHistNodeList = instance1.selectNodes("/root/temp2/rtnlist/grd_histlist");
- count1 = ordNodeList.length;
- count2 = ordHistNodeList.length;
- datacount = count1 + count2;
-
- //if (datacount > 0) {
- if (count2 > 0) {
- modal("SMADT11100",0,100,150,"SMADT11100","/root/temp2/rtnlist","/root/temp2/rtnlist");
- }
-
- }
-
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/drugstat",drugstat);
- model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/userid",getUserId());
- cnt++;
-
- }
-
- }
-
- // 처방내역 선택체크
- if ( cnt == 0 ) {
- messageBox("처방내역을 선택해 주십시오.","I999");
- return;
- }
- nodeList = instance1.selectNodes("/root/main/masterinfo/grd_druglist[sel='true']");
- rCSV = getNodeListCSV(nodeList);
- model.removeNodeset("/root/send/req2/list");
- setCSVToNode("/root/send/req2", rCSV);
- var success = submit("TXADT10405");
- if (success) {
- btn_sea.dispatch("DOMActivate");
- grd_druglist.fixedcellischeck(0,1) = false;
- varDrugTotSel = false;
- }
- ]]>
- </script>
- </button>
- <output id="input14" ref="/root/main/detailinfo/pat_info/indd" class="input_search" format="yyyy-mm-dd" appearance="output" style="left:604px; top:371px; width:85px; height:19px; "/>
- <caption id="caption16" class="cell_1" style="left:542px; top:370px; width:60px; height:23px; vertical-align:middle; ">입원일자</caption>
- <input id="ipt_bcno1" ref="/root/send/srchbcinfo/srchbcno1" class="input_search" imemode="alpha" style="left:147px; top:65px; width:110px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- var barcode = "";
- var drugdd = "";
- var drugno = "";
- var ioflag = "";
-
- if(event.keyCode == "13") {
- // 바코드
- setInputNodeCurText();
- barcode = model.getValue("/root/send/srchbcinfo/srchbcno1");
- if (barcode.length > 9) {
- ioflag = barcode.substr(0,1);
- drugdd = barcode.substr(1,8);
- drugno = barcode.substr(9,barcode.length-9);
- model.setValue("/root/send/srchbcinfo/srchbcno1","");
-
- if (ioflag.toUpperCase() != "I") {
- messageBox("입원처방이 아니므로 처리","E001");
- model.refresh();
- return;
- }
- } else {
- return;
- }
-
- // 조회
- model.setValue("/root/send/srchbcinfo/srchdrugdd" ,drugdd);
- model.setValue("/root/send/srchbcinfo/srchdrugno" ,drugno);
- model.setValue("/root/send/srchbcinfo/srchioflag" ,"I");
-
-
- // 초기화
- model.removeNodeset("/root/main/masterinfo/grd_exelist");
- model.removeNodeset("/root/main/masterinfo/grd_histlist");
- var success1 = submit("TRADT10403");
-
- // 처방변경이력
- var count1 = 0;
- var count2 = 0;
- var datacount = 0;
- var nodeList = instance1.selectNodes("/root/main/masterinfo/grd_druglist");
- var ordNodeList = instance1.selectNodes("/root/main/masterinfo/grd_exelist");
- var ordHistNodeList = instance1.selectNodes("/root/main/masterinfo/grd_histlist");
- count1 = ordNodeList.length;
- count2 = ordHistNodeList.length;
- datacount = count1 + count2;
-
- //if (datacount > 0) {
- if (count2 > 0) {
- //grp_ordhist.visible = true;
- modal("SMADT11100",0,100,150,"SMADT11100","/root/main/masterinfo","/root/temp2/rtnlist");
- }
-
-
-
- // 데이터 처리건수
- var rCSV = getNodeListCSV(nodeList);
- if ( rCSV == null ) {
- messageBox("처리할 데이터가 없습니다.","I999");
- return;
- }
-
- // 투약상태 세팅
- model.removeNodeset("/root/send/req2/list");
- setCSVToNode("/root/send/req2", rCSV);
- for( var i=1; i< grd_druglist.rows; i++) {
- model.setValue("/root/send/req2/list["+i+"]/drugstat","D");
- model.setValue("/root/send/req2/list["+i+"]/userid",getUserId());
- // 2015년 1월27일 조제완료일자 재등록을 위한 Flag 김치국
- model.makeNode("/root/send/req2/list/mchk");
- model.setValue("/root/send/req2/list/mchk",model.getValue("/root/main/reokdateflag/reokdateflag1"));
- }
-
- // 처리
- var success2 = submit("TXADT10405");
- var success3 = submit("TRADT10403");
-
- // 처리결과(반환처방-컬러세팅)
- setRowStyle("grd_druglist" , "1" , "true" , "ordrtnflag", "equal" );
- // 상세클릭
- if (grd_druglist.rows> 1) {
- grd_druglist.dispatch("onclick");
- } else {
- model.removeNodeset("/root/main/detailinfo/pat_info");
- model.removeNodeset("/root/main/detailinfo/item");
- model.refresh();
- }
- }
- ]]>
- </script>
- </input>
- <input id="ipt_bcno2" ref="/root/send/srchbcinfo/srchbcno2" class="input_search" imemode="alpha" style="left:401px; top:65px; width:110px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- var barcode = "";
- var drugdd = "";
- var drugno = "";
- var ioflag = "";
-
- if(event.keyCode == "13") {
-
- // 바코드
- setInputNodeCurText();
- barcode = model.getValue("/root/send/srchbcinfo/srchbcno2");
- if (barcode.length > 9) {
- ioflag = barcode.substr(0,1);
- drugdd = barcode.substr(1,8);
- drugno = barcode.substr(9,barcode.length-9);
- model.setValue("/root/send/srchbcinfo/srchbcno2","");
-
- if (ioflag.toUpperCase() != "I") {
- messageBox("입원처방이 아니므로 처리","E001");
- model.refresh();
- return;
- }
-
- } else {
- return;
- }
-
- // 조회
- model.setValue("/root/send/srchbcinfo/srchdrugdd" ,drugdd);
- model.setValue("/root/send/srchbcinfo/srchdrugno" ,drugno);
- model.setValue("/root/send/srchbcinfo/srchioflag" ,"I");
- submit("TRADT10403");
-
- // 데이터 확인
- var nodeList = instance1.selectNodes("/root/main/masterinfo/grd_druglist[sel='']");
- var rCSV = getNodeListCSV(nodeList);
- if ( rCSV == null ) {
- messageBox("처리할 데이터가 없습니다.","I999");
- return;
- }
-
- // 반환처리
- model.removeNodeset("/root/send/req2/list");
- setCSVToNode("/root/send/req2", rCSV);
- for( var i=1; i< grd_druglist.rows; i++) {
- model.setValue("/root/send/req2/list["+i+"]/rtnflag","R");
- model.setValue("/root/send/req2/list["+i+"]/userid",getUserId());
- model.setValue("/root/send/req2/list["+i+"]/userdeptcd",getUserInfo("dutplcecd"));
- }
-
- submit("TXADT10402");
- submit("TRADT10403");
- }
- ]]>
- </script>
- </input>
- <output id="ipt_drugno" ref="/root/main/detailinfo/pat_info/drugno" class="input_search" appearance="output" style="left:63px; top:371px; width:73px; height:19px; "/>
- <output id="ipt_roomcd" ref="/root/main/detailinfo/pat_info/roomcd" class="input_search" appearance="output" style="left:177px; top:371px; width:90px; height:19px; "/>
- <output id="ipt_hngnm" ref="/root/main/detailinfo/pat_info/hngnm" class="input_search" appearance="output" style="left:310px; top:371px; width:90px; height:19px; "/>
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- // ESC키를 누르면 조제 바코드에 focus
- if(event.keyCode == "27") {
- model.setFocus("ipt_bcno1");
- }
- ]]>
- </script>
- <group id="group4" scroll="auto" style="left:0px; top:338px; width:1195px; height:27px; ">
- <button id="btn_save" class="btn4_letter4" visibility="hidden" style="left:1111px; top:3px; width:80px; height:22px; ">
- <caption>반환취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var nodeList = null;
- var rCSV = null;
-
- nodeList = instance1.selectNodes("/root/main/detailinfo/item[sel='true']");
- rCSV = getNodeListCSV(nodeList);
- if ( rCSV == null ) {
- messageBox("처방내역을 선택해 주십시오.","I999");
- return;
- }
-
- // 퇴원약과 반환여부
- for (var i=1; i<grd_detdruglist.rows; i++) {
- var sel = model.getValue("/root/main/detailinfo/item["+i+"]/sel");
- var prcpkindcd = model.getValue("/root/main/detailinfo/item["+i+"]/prcpkindcd");
- var prcphistcd = model.getValue("/root/main/detailinfo/item["+i+"]/prcphistcd");
-
- if (sel == "true") {
- // 처방종류가 퇴원이면서 반납의뢰일경우만 처리
- if (prcpkindcd == "60" && (prcphistcd =="C" || prcphistcd =="D" )) {
-
- } else {
- messageBox("퇴원반환약일 경우만 반환취소 하실 수 있습니다.","I999");
- return;
- }
-
- //cnt++;
- }
- }
- model.removeNodeset("/root/send/req2/list");
- setCSVToNode("/root/send/req2", rCSV);
- for (var i=1; i<=nodeList.length; i++) {
- model.setValue("/root/send/req2/list["+i+"]/userid",getUserId());
- model.setValue("/root/send/req2/list["+i+"]/userdeptcd",getUserInfo("dutplcecd"));
- }
-
- var success = submit("TXADT10402");
- if (success) {
- //grd_druglist.dispatch("onclick");
- fgetprcpdesclist();
- grd_detdruglist.fixedcellischeck(0,1) = false;
- varDrugTotSel = false;
- }
- ]]>
- </script>
- </button>
- <caption id="caption15" class="tit_2" style="left:0px; top:11px; width:216px; height:13px; ">처방상세</caption>
- <button id="button4" class="btn4_letter5" style="left:839px; top:3px; width:92px; height:22px; ">
- <caption>미불출 확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var nodeList = null;
- var rCSV = null;
- var cnt = 0;
-
- // 퇴원약과 반환여부
- for (var i=1; i<grd_detdruglist.rows; i++) {
- var sel = model.getValue("/root/main/detailinfo/item["+i+"]/sel");
- var drugstat = model.getValue("/root/main/detailinfo/item["+i+"]/drugstat");
-
- if (sel == "true") {
- // 투약처리된 약은 미불출 처리할수 없음
- /*if (drugstat =="ND") {
- messageBox("조제보류 처방은 미불출 처리하실 수 없습니다.","I999");
- return;
- } */
-
- if (drugstat == "M") {
- messageBox("이동경로가 지정되어 미불출 처리하실 수 없습니다.","I999");
- return;
- }
-
- model.setValue("/root/main/detailinfo/item["+i+"]/nodeliveyn","Y");
- model.setValue("/root/main/detailinfo/item["+i+"]/userid",getUserId());
- cnt++;
- }
- }
-
- // 처방선택여부
- if ( cnt == 0 ) {
- messageBox("처방내역을 선택해 주십시오.","I999");
- return;
- }
-
- nodeList = instance1.selectNodes("/root/main/detailinfo/item[sel='true']");
- rCSV = getNodeListCSV(nodeList);
- model.removeNodeset("/root/send/req2/list");
- setCSVToNode("/root/send/req2", rCSV);
-
- var success = submit("TXADT10403");
- if (success) {
- //grd_druglist.dispatch("onclick");
- fgetprcpdesclist();
- grd_detdruglist.fixedcellischeck(0,1) = false;
- varDrugTotSel = false;
- }
-
- ]]>
- </script>
- </button>
- <button id="button5" class="btn4_letter5" style="left:934px; top:3px; width:92px; height:22px; ">
- <caption>미불출 취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var nodeList = null;
- var rCSV = null;
- var cnt = 0;
-
-
- // 퇴원약과 반환여부
- for (var i=1; i<grd_detdruglist.rows; i++) {
- var sel = model.getValue("/root/main/detailinfo/item["+i+"]/sel");
- var nodeliveyn = model.getValue("/root/main/detailinfo/item["+i+"]/nodeliveyn");
-
- if (sel == "true") {
- // 투약처리된 약은 미불출 처리할수 없음
- if (nodeliveyn =="false") {
- messageBox("미불출 되지않은 약이 선택되었습니다.","I999");
- return;
- }
-
- model.setValue("/root/main/detailinfo/item["+i+"]/nodeliveyn","N");
- model.setValue("/root/main/detailinfo/item["+i+"]/userid",getUserId());
- cnt++;
- }
- }
-
- // 처방선택여부
- if ( cnt == 0 ) {
- messageBox("처방내역을 선택해 주십시오.","I999");
- return;
- }
-
- nodeList = instance1.selectNodes("/root/main/detailinfo/item[sel='true']");
- rCSV = getNodeListCSV(nodeList);
- model.removeNodeset("/root/send/req2/list");
- setCSVToNode("/root/send/req2", rCSV);
-
- var success = submit("TXADT10403");
- if (success) {
- //grd_druglist.dispatch("onclick");
- fgetprcpdesclist();
- grd_detdruglist.fixedcellischeck(0,1) = false;
- varDrugTotSel = false;
- }
- ]]>
- </script>
- </button>
- <button id="button6" class="btn4_letter4" style="left:1029px; top:3px; width:80px; height:22px; ">
- <caption>반환확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var nodeList = null;
- var rCSV = null;
- var cnt = 0;
-
- // 퇴원약과 반환여부
- for (var i=1; i<grd_detdruglist.rows; i++) {
- var sel = model.getValue("/root/main/detailinfo/item["+i+"]/sel");
- var prcpkindcd = model.getValue("/root/main/detailinfo/item["+i+"]/prcpkindcd");
- var prcphistcd = model.getValue("/root/main/detailinfo/item["+i+"]/prcphistcd");
-
- if (sel == "true") {
- // 처방종류가 퇴원이면서 반납의뢰일경우만 처리
- if ((prcpkindcd == "60" || prcpkindcd == "50") && (prcphistcd =="E" || prcphistcd =="C")) {
- model.setValue("/root/main/detailinfo/item["+i+"]/rtnflag","R");
- model.setValue("/root/main/detailinfo/item["+i+"]/userid",getUserId());
- model.setValue("/root/main/detailinfo/item["+i+"]/userdeptcd",model.getValue("/root/init/stocinfo/stocdeptcd"));
- model.setValue("/root/main/detailinfo/item["+i+"]/rtnstocdeptcd",model.getValue("/root/send/srchinfo/rtnstocdeptcd")); //2009.11.17 pymi
- } else {
- messageBox("퇴원 또는 외출(외박) 반환약 일 경우만 반환확인하실 수 있습니다.","I999");
- return;
- }
-
- cnt++;
- }
- }
-
- // 처방선택여부
- if ( cnt == 0 ) {
- messageBox("처방내역을 선택해 주십시오.","I999");
- return;
- }
-
- nodeList = instance1.selectNodes("/root/main/detailinfo/item[sel='true']");
- rCSV = getNodeListCSV(nodeList);
- model.removeNodeset("/root/send/req2/list");
- setCSVToNode("/root/send/req2", rCSV);
-
- var success = submit("TXADT10404");
- if (success) {
- //grd_druglist.dispatch("onclick");
- fgetprcpdesclist();
- grd_detdruglist.fixedcellischeck(0,1) = false;
- varDrugTotSel = false;
- }
- ]]>
- </script>
- </button>
- <caption id="caption24" style="left:630px; top:5px; width:74px; height:20px; font-weight:bold; color:#ff0000; ">실출고부서</caption>
- <select1 id="combo1" ref="/root/send/srchinfo/rtnstocdeptcd" appearance="minimal" style="left:705px; top:5px; width:120px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/misdeptlist/deptlist">
- <label ref="deptnm"/>
- <value ref="deptcd"/>
- </itemset>
- </choices>
- </select1>
- </group>
- <datagrid id="grd_druglist" nodeset="/root/main/masterinfo/grd_druglist" caption="^반환^적용일자^투약번호^처방종류^병실^환자명^등록번호^조제상태^조제완료일시^바코드^이동경로^투약(이동)시간^미불출^미불출일시^반환확인^반환확인일시^caption1^caption2^caption3^caption4^caption5^caption6^caption7^caption8^caption9^caption10^전문의^주치의^처방전 출력시간" colsep="^" colwidth="29, 31, 71, 56, 74, 72, 84, 74, 73, 123, 94, 101, 122, 52, 116, 56, 125, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 60, 60, 122" explorerbar="sort" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:93px; width:1194px; height:242px; ">
- <col ref="sel" type="checkbox"/>
- <col disabled="true" ref="ordrtnflag" type="checkbox" style="color:#ff0000; "/>
- <col ref="prcpdd" format="yyyy-mm-dd"/>
- <col ref="drugno"/>
- <col ref="prcpkindcdnm"/>
- <col ref="roomcd"/>
- <col ref="hngnm"/>
- <col ref="pid"/>
- <col ref="drugstat" type="combo">
- <choices>
- <itemset nodeset="/root/init/drugstatinfo/A0004">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="prcpdt" format="yyyy-mm-dd hh:mm:ss"/>
- <col ref="bcno" style="text-align:center; "/>
- <col ref="drugpath" type="combo">
- <choices>
- <itemset nodeset="/root/init/drugpathinfo/A0149">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="drugdt" format="yyyy-mm-dd hh:mm:ss"/>
- <col disabled="true" ref="nodeliveyn" type="checkbox"/>
- <col ref="nodelivedt" format="yyyy-mm-dd hh:mm:ss"/>
- <col ref="rtnflag" type="checkbox"/>
- <col ref="rtndt" format="yyyy-mm-dd hh:mm:ss"/>
- <col ref="nodeliveyn" visibility="hidden"/>
- <col ref="drugdd" visibility="hidden"/>
- <col ref="ioflag" visibility="hidden"/>
- <col ref="instcd" visibility="hidden"/>
- <col ref="predrugstat" visibility="hidden"/>
- <col ref="predrugpath" visibility="hidden"/>
- <col ref="userid" visibility="hidden"/>
- <col ref="stocdeptcd" visibility="hidden"/>
- <col ref="stocdeptnm" visibility="hidden"/>
- <col ref="stocdt" visibility="hidden"/>
- <col ref="medispclnm"/>
- <col ref="atdocnm"/>
- <col ref="prntdt" format="yyyy-mm-dd hh:nn:ss"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(isDataCell()) {
- fgetprcpdesclist();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var row = grd_druglist.row;
- var col = grd_druglist.col;
-
- // 조제상태나 이동경로가 바뀌면 체크
- if (col == 9 || col == 12) {
- model.setValue("/root/main/masterinfo/grd_druglist["+row+"]/sel" ,"true");
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onmousedown">
- <![CDATA[
- setPopupMenu("grd_druglist", true, "/root/temp/popup/drugstat/mouserght", "label", "value");
- ]]>
- </script>
- <script type="javascript" ev:event="DOMFocusOut">
- <![CDATA[
- initPopupMenu();
- ]]>
- </script>
- <script type="javascript" ev:event="onmouseup">
- <![CDATA[
- if ( grd_druglist.iscell(event.target) && grd_druglist.row >0){
- if(grd_druglist.col != grd_druglist.colRef("sel")){
- for ( var i =1 ; i< grd_druglist.rows ;i++){
- model.setValue("/root/main/masterinfo/grd_druglist[" + i + "]/sel", "false");
- }
- for ( var i =0 ; i< grd_druglist.selectedRows;i++){
-
- if ( grd_druglist.isReadOnly(grd_druglist.selectedRow(i) , 1) == false ){
- model.setValue("/root/main/masterinfo/grd_druglist[" + grd_druglist.selectedRow(i) + "]/sel", "true");
- } else {
- model.setValue("/root/main/masterinfo/grd_druglist[" + grd_druglist.selectedRow(i) + "]/sel", "false");
- }
- }
- }
- model.refresh();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_druglist.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <select1 id="cmb_stocdeptcd" ref="/root/init/stocinfo/stocdeptcd" class="combo_search" visibility="hidden" appearance="minimal" style="left:621px; top:65px; width:115px; height:19px; ">
- <choices>
- <item>
- <label>외래약국Unit</label>
- <value>3242106000</value>
- </item>
- <item>
- <label>병동약국Unit</label>
- <value>3242107000</value>
- </item>
- <item>
- <label>특수조제Unit</label>
- <value>3242104000</value>
- </item>
- </choices>
- </select1>
- <caption id="caption21" class="cell_1" visibility="hidden" style="left:560px; top:63px; width:60px; height:23px; vertical-align:middle; ">불출부서</caption>
- <caption id="caption40" class="color_2" style="left:1010px; top:437px; width:15px; height:15px; "/>
- <caption id="caption30" class="color_5" style="left:1077px; top:437px; width:15px; height:15px; "/>
- <caption id="caption31" style="left:1095px; top:439px; width:94px; height:14px; vertical-align:middle; ">반환후 남은 처방</caption>
- <caption id="caption36" style="left:940px; top:438px; width:50px; height:14px; vertical-align:middle; ">반환의뢰</caption>
- <caption id="caption37" style="left:1028px; top:439px; width:35px; height:14px; vertical-align:middle; ">반환</caption>
- <caption id="caption38" class="color_7" style="left:922px; top:437px; width:15px; height:15px; "/>
- <caption id="caption39" class="cell_2" style="left:844px; top:435px; width:55px; height:20px; ">범 례</caption>
- <button id="button51" class="btn2_letter4" style="left:909px; top:67px; width:64px; height:19px; ">
- <caption>엑셀저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var file = window.fileDialog("save","","false","","xls","Excel Files(*.xls)|*.xls");
- grd_druglist.saveExcel(file);
- ]]>
- </script>
- </button>
- <button id="btn_widesea" class="btn2_letter4" style="left:841px; top:67px; width:64px; height:19px; ">
- <caption>확대보기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var grdwideyn = model.getValue("/root/init/grdwideyn");
- if (grdwideyn == "y") {
- btn_widesea.attribute("text") = "축소보기";
- grd_druglist.attribute ("height") = 673;
- model.setValue("/root/init/grdwideyn","n");
- } else {
- btn_widesea.attribute("text") = "확대보기";
- grd_druglist.attribute ( "height" ) = 265;
- model.setValue("/root/init/grdwideyn","y");
- }
- ]]>
- </script>
- </button>
- <button id="button7" class="btn5_letter4" style="left:995px; top:411px; width:64px; height:19px; ">
- <caption>조제보류</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSubmitDrugChk("Btn","ND","");
- ]]>
- </script>
- </button>
- <button id="button9" class="btn5_letter4" style="left:1062px; top:411px; width:64px; height:19px; ">
- <caption>조제완료</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSubmitDrugChk("Btn","D","");
- ]]>
- </script>
- </button>
- <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:835px; top:431px; width:358px; height:27px; background-color:transparent; border-color:#7cbbdd; border-style:solid; "/>
- <button id="btn_hist" class="btn2_letter2" style="left:82px; top:399px; width:42px; height:19px; ">
- <caption>이력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if (model.getValue("/root/main/detailinfo/pat_info/pid") == "" ) {
- messageBox("환자를", "C002");
- return;
- }
-
- // 약사메모이력
- model.setValue("/root/send/memosrchinfo/srchpid", model.getValue("/root/main/detailinfo/pat_info/pid"));
- model.setValue("/root/send/memosrchinfo/srchinstcd", getUserInfo("dutplceinstcd"));
- model.setValue("/root/send/memosrchinfo/srchioflag", "I");
- modal("SPADB60601",0,100,150,"SPADB60601","/root/send/memosrchinfo","/root/send/srchinfo");
- ]]>
- </script>
- </button>
- <input id="ipt_writeid" ref="/root/main/detailinfo/memoinfo/writid2" class="input_essential" autonext="false" maxlength="10" style="left:447px; top:398px; width:72px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- if(event.keyCode == "13") {
- setInputNodeCurText();
- if(trim(model.getValue("/root/main/detailinfo/memoinfo/writid2")) != "") {
- var writid = trim(model.getValue("/root/main/detailinfo/memoinfo/writid2"));
- model.setValue("/root/send/usersrchinfo/srchuserid",writid);
- var success = submit("TRADT00105");
-
- if (success) {
- model.setValue("/root/main/detailinfo/memoinfo/writid2", trim(model.getValue("/root/main/detailinfo/memoinfo/writid2")));
- model.setValue("/root/main/detailinfo/memoinfo/writnm",model.getValue("/root/hidden/userinfo/item/usernm"));
- model.refresh();
-
- // 반환된 약사정보(이름) 체크
- if(trim(model.getValue("/root/main/detailinfo/memoinfo/writnm")) != "") {
- // 메모 내용 입력여부 체크
- if (trim(model.getValue("/root/main/detailinfo/memoinfo/memo")) == "" ) {
- messageBox("메모내용은", "I003");
- model.setFocus("tar_memo");
- return;
- } else {
- fSubmitMemo();
- /* 메모저장여부 확인 부분
- if (messageBox("메모사항을", "Q002", "") == 7) {
- return;
- } else {
- fSubmitMemo();
- return;
- }
- */
- }
- } else {
- messageBox("입력한 사번으로 이름 확인을", "E009");
- return;
- }
- }
- } else {
- messageBox("약사메모 입력을 위해 사번은", "I003");
- model.setValue("/root/main/detailinfo/memoinfo/writid2", trim(model.getValue("/root/main/detailinfo/memoinfo/writid2")));
- return;
- }
- }
-
- /*
- if(event.keyCode == "13") {
- setInputNodeCurText();
- var writid = model.getValue("/root/main/detailinfo/memoinfo/writid2");
- model.setValue("/root/send/usersrchinfo/srchuserid",writid);
- var success = submit("TRADT00105");
-
- if (success) {
- model.setValue("/root/main/detailinfo/memoinfo/writnm",model.getValue("/root/hidden/userinfo/item/usernm"));
- model.refresh();
- }
- }
- */
- ]]>
- </script>
- </input>
- <button id="button8" class="btn5_letter2" style="left:126px; top:399px; width:42px; height:19px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSubmitMemo();
-
- /*
- var varSaveMode = ""; // i-입력,m-수정
- var varSaveFlag = false;
- var varWritId = "";
-
- // 환자선택 필수
- if (model.getValue("/root/main/detailinfo/baseinfo/pid") == "" ) {
- messageBox("환자를 선택하시고", "C001");
- return;
- }
-
- // 작성자
- varWritId = model.getValue("/root/main/detailinfo/memoinfo/writid2");
- if (varWritId == "" ) {
- messageBox("메모작성자를", "I003");
- return;
- }
-
- // 메모내용필수
- if (model.getValue("/root/main/detailinfo/memoinfo/memo") == "" ) {
- messageBox("메모내용은", "I003");
- return;
- }
-
- // 본인이 작성하지 않은 메모수정불가
- if (model.getValue("/root/main/detailinfo/memoinfo/writid") != getUserId()) {
- messageBox("자료를 수정할", "E002");
- return;
- }
-
- // 자료수집
- model.setValue("/root/main/detailinfo/memoinfo/writid",varWritId);
- model.copyNode("/root/send/req/data2", "/root/main/detailinfo/memoinfo");
- if (model.getValue("/root/main/detailinfo/memoinfo/seqno") == "") {
- varSaveMode = "i";
- } else {
- varSaveMode = "u";
- }
-
- model.setValue("/root/send/req/data2/m", varSaveMode);
- submit("TXADT10102","false");
-
- // 저장여부확인
- if (varSaveMode == "i" && Number(model.getValue("/root/hidden/memoitem/seqno")) > 0) {
- varSaveFlag = true;
- model.setValue("/root/main/detailinfo/memoinfo/seqno", model.getValue("/root/hidden/memoitem/seqno"));
- }
-
- if (varSaveMode == "u" && Number(model.getValue("/root/hidden/memoitem/count")) > 0) {
- varSaveFlag = true;
- }
-
- // 화면정리 및 메세지처리
- if (varSaveFlag == true) {
- model.refresh();
- messageBox("메모저장이", "I002");
- }
- */
- ]]>
- </script>
- </button>
- <caption id="caption23" class="cell_1" style="left:404px; top:396px; width:41px; height:23px; vertical-align:middle; ">사번</caption>
- <input id="ipt_writenm" ref="/root/main/detailinfo/memoinfo/writnm" class="output_fix" style="left:561px; top:398px; width:75px; height:19px; "/>
- <caption id="caption25" class="cell_1" style="left:0px; top:420px; width:80px; height:38px; vertical-align:middle; ">메모사항</caption>
- <input id="ipt_writdt" ref="/root/main/detailinfo/memoinfo/writdt" class="output_fix" format="yyyy-mm-dd hh:mm:ss" style="left:703px; top:398px; width:127px; height:19px; "/>
- <caption id="caption26" class="cell_1" style="left:640px; top:396px; width:60px; height:23px; vertical-align:middle; ">작성일시</caption>
- <caption id="caption27" class="tit_2" style="left:0px; top:402px; width:82px; height:13px; ">약사메모</caption>
- <caption id="caption28" class="cell_1" style="left:523px; top:396px; width:36px; height:23px; vertical-align:middle; ">이름</caption>
- <button id="btn_ref" class="btn2_letter7" style="left:170px; top:399px; width:97px; height:19px; ">
- <caption>조제시참조사항</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- modal("SPADB60602",0,100,160,"SPADB60602","/root/send/memosrchinfo","/root/send/srchinfo");
- ]]>
- </script>
- </button>
- <textarea id="tar_memo" ref="/root/main/detailinfo/memoinfo/memo" style="left:82px; top:420px; width:748px; height:38px; "/>
- <group id="grp_ordhist" visibility="hidden" style="left:250px; top:85px; width:685px; height:683px; border-style:solid; ">
- <datagrid id="datagrid1" nodeset="/root/main/masterinfo/grd_exelist" caption="처방이력상태^약코드^약품명^수량^횟수^일수" colsep="^" colwidth="98, 78, 244, 80, 65, 80" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:35px; width:680px; height:255px; ">
- <col ref="prcphistcdnm" format="yyyy-mm-dd"/>
- <col ref="prcpcd"/>
- <col ref="prcpnm"/>
- <col ref="prcpqty"/>
- <col ref="prcptims"/>
- <col ref="prcpdayno"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- var rows = grd_druglist.rows;
- var selRow = grd_druglist.row;
-
- if (rows >0) {
- if (selRow<= 0) {
- selRow = 1;
- }
- }
-
- model.setValue("root/send/srchdetinfo/drugdd", model.getValue("/root/main/masterinfo/grd_druglist["+selRow+"]/drugdd"));
- model.setValue("root/send/srchdetinfo/drugno", model.getValue("/root/main/masterinfo/grd_druglist["+selRow+"]/drugno"));
- model.setValue("root/send/srchdetinfo/ioflag" , model.getValue("/root/main/masterinfo/grd_druglist["+selRow+"]/ioflag"));
-
- submit("TRADT10402");
- ]]>
- </script>
- </datagrid>
- <caption id="caption18" class="tit_2" style="left:5px; top:15px; width:216px; height:13px; ">현재 실행가능한 처방목록</caption>
- <line id="line3" class="line_1" style="x1:1px; y1:28px; x2:681px; y2:28px; "/>
- <line id="line4" class="line_1" style="x1:0px; y1:313px; x2:680px; y2:313px; "/>
- <caption id="caption20" class="tit_2" style="left:5px; top:300px; width:216px; height:13px; ">반환된 처방목록</caption>
- <button id="btn_cls" class="btn4_letter2" style="left:620px; top:657px; width:56px; height:22px; ">
- <caption>닫기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- grp_ordhist.visible = false;
- ]]>
- </script>
- </button>
- <datagrid id="datagrid2" nodeset="/root/main/masterinfo/grd_histlist" caption="처방이력상태^약코드^약품명^수량^횟수^일수" colsep="^" colwidth="97, 78, 243, 80, 65, 80" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:322px; width:680px; height:330px; ">
- <col ref="prcphistcdnm" style="text-align:center; "/>
- <col ref="prcpcd"/>
- <col ref="prcpnm"/>
- <col ref="prcpqty" style="text-align:right; "/>
- <col ref="prcpqty" style="text-align:right; "/>
- <col ref="prcptims" style="text-align:right; "/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- var rows = grd_druglist.rows;
- var selRow = grd_druglist.row;
-
- if (rows >0 && selRow<= 0) selRow = 1;
- model.setValue("root/send/srchdetinfo/drugdd", model.getValue("/root/main/masterinfo/grd_druglist["+selRow+"]/drugdd"));
- model.setValue("root/send/srchdetinfo/drugno", model.getValue("/root/main/masterinfo/grd_druglist["+selRow+"]/drugno"));
- model.setValue("root/send/srchdetinfo/ioflag" , model.getValue("/root/main/masterinfo/grd_druglist["+selRow+"]/ioflag"));
-
- submit("TRADT10402");
- ]]>
- </script>
- </datagrid>
- </group>
- <line id="line5" class="line_2" style="x1:0px; y1:393px; x2:1194px; y2:393px; "/>
- <select id="chk_redateflag2" ref="/root/main/reokdateflag/reokdateflag2" overflow="visible" appearance="full" style="left:1131px; top:412px; width:60px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>재등록</label>
- <value>Y</value>
- </item>
- </choices>
- </select>
- <select id="chk_redateflag1" ref="/root/main/reokdateflag/reokdateflag1" overflow="visible" appearance="full" style="left:260px; top:65px; width:70px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>재등록</label>
- <value>Y</value>
- </item>
- </choices>
- </select>
- </group>
- <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
- <caption id="caption19" class="tit_1" style="left:0px; top:0px; width:106px; height:14px; ">병동투약관리</caption>
- </group>
- </xhtml:body>
- </xhtml:html>
|