123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SMPAO01800_외래예상진료비.xrw
- * 설 명 : 외래예상진료비
- * 설 계 자 : 채희철
- * 작 성 자 : 이성인
- * 작 성 일 : 2008.10.04
- * 수정이력 :
- * 기 타 :
- -->
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>CD라벨출력</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <patinfo>
- <patinfolist>
- <pid/>
- <hngnm/>
- <rrgstno1/>
- <rrgstno2/>
- </patinfolist>
- </patinfo>
- <ordinfo>
- <printlist>
- <chk/>
- <pid/>
- <hngnm/>
- <rrgstno/>
- <orddeptnm/>
- <orddrnm/>
- <orddd/>
- <remark/>
- </printlist>
- </ordinfo>
- </main>
- <send>
- <fromdd/>
- <todd/>
- <pid/>
- <srchcond/>
- </send>
- <source>
- <srchcond/>
- <pid/>
- <hngnm/>
- <rrgstno1/>
- <rrgstno2/>
- </source>
- </root>
- </instance>
- <submission id="TRPMC02500" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/source" resultref="/root/main/patinfo"/>
- <submission id="TRPMB02701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/ordinfo"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- //초기화
- fInitialize();
- //세션정보 추출하기
- fGetUserInfosSampling();
- model.refresh();
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- //공통코드 및 원무사용 기초코드 세팅(진료과,의사,감면,미수 등)
- function fSetCodeList(){
- /*
- //공통코드
- zbcfGetCodeList( new Array("P0104","R0001","P0390","P0073","P0354"),
- new Array("/root/init_com/comncdlist/P0104list" //계산급여구분
- ,"/root/init_com/comncdlist/R0001list" //은행
- ,"/root/init_com/comncdlist/P0390list" //승인구분
- ,"/root/init_com/comncdlist/P0073list" //자격구분
- ,"/root/init_com/comncdlist/P0354list" //개인/법인
- ) );
- //원무사용 기초코드 조회(진료과,의사,할인,미수코드)
- submit("TRPAMCOM01");
- */
- }
-
- //수납내역 조회(영수내역,카드내역,현금영수증내역,통장입금내역) - (+) 선수금 수납내역
- function fSearch() {
- //조회조건 체크
-
- var vcheck_fromdd = (model.getValue("/root/send/fromdd")).getTrim();
- var vcheck_todd = (model.getValue("/root/send/todd")).getTrim();
- model.setValue("/root/send/pid" ,model.getValue( "/root/main/patinfo/patinfolist/pid"));
- if (vcheck_fromdd == "" || vcheck_fromdd == " " || vcheck_fromdd == "-" || vcheck_fromdd == null ) {
- messageBox("시작일자가 입력되지","E007");
- model.setFocus("ipt_fromdd");
- return;
- }
- if (vcheck_todd == "" || vcheck_todd == " " || vcheck_todd == "-" || vcheck_todd == null ) {
- messageBox("종료일자가 입력되지","E007");
- model.setFocus("ipt_todd");
- return;
- }
- submit("TRPMB02701", false);
-
- model.refresh();
- }
-
- function fInitialize() {
- var cur_date = getCurrentDate();
- model.setValue("root/send/fromdd", cur_date);
- model.setValue("root/send/todd", cur_date);
- model.resetInstanceNode("/root/main/patinfo/patinfolist");
- model.resetInstanceNode("/root/main/ordinfo/printlist");
- model.resetInstanceNode("/root/source");
- model.setValue("/root/send/srchcond" , "outord");
- // model.setValue("/root/main/patinfo/patinfolist/pid" , "19002860");
- }
- //세션정보 추출하기
- function fGetUserInfosSampling(){
- var sUserInfosS = getUserInfos();
-
- sUserInfosS = sUserInfosS + "|";
-
- var UserInfosS_Array = sUserInfosS.split("|");
-
- var userid = UserInfosS_Array[0]; //사용자번호
- var usernm = UserInfosS_Array[1]; //사용자이름
- var posinstcd = UserInfosS_Array[2]; //소속기관코드
- var posinstnm = UserInfosS_Array[3]; //소속기관명
- var posdeptcd = UserInfosS_Array[4]; //소속부서코드
- var posdeptnm = UserInfosS_Array[5]; //소속부서명
-
- if (userid == null || userid == "" || userid == " " || userid == "-") userid = "pam";
- if (posinstcd == null || posinstcd == "" || posinstcd == " " || posinstcd == "-") posinstcd = "012";
-
- model.makeValue("/root/hidden/session/sess_userid",userid);
- model.makeValue("/root/hidden/session/sess_usernm",usernm);
- model.makeValue("/root/hidden/session/sess_posinstcd",posinstcd);
- model.makeValue("/root/hidden/session/sess_posinstnm",posinstnm);
- model.makeValue("/root/hidden/session/sess_posdeptcd",posdeptcd);
- model.makeValue("/root/hidden/session/sess_posdeptnm",posdeptnm);
-
- model.refresh();
- }
-
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body guideline="2,53;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:885px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">CD라벨출력</caption>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:13px; width:895px; height:532px; ">
- <group id="group2" style="left:0px; top:10px; width:885px; height:45px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:885px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption2" class="search_name" style="left:422px; top:11px; width:86px; height:17px; ">등록번호 :</caption>
- <caption id="caption21" class="search_name" style="left:16px; top:11px; width:86px; height:17px; ">조회일자 :</caption>
- <caption id="caption4" style="left:198px; top:12px; width:10px; height:20px; ">-</caption>
- <line id="line1" style="x1:785px; y1:10px; x2:785px; y2:39px; border-color:#ffe4bb; border-left-style:solid; "/>
- <input id="ipt_pid" ref="/root/main/patinfo/patinfolist/pid" class="input_default" style="left:511px; top:10px; width:77px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if (event.keyCode == "8") {
- model.resetInstanceNode("/root/send");
- fInitialize();
- }
- if(event.keyCode == "13") {
- vcheck_pid = ipt_pid.currentText;
-
- fInitialize();
-
- //환자번호 null체크
- if (vcheck_pid == null || vcheck_pid == "" || vcheck_pid == " " || vcheck_pid == "-") {
- messageBox("환자등록번호가 입력되지","E007");
- return;
- }
- //환자번호 조건으로 인적정보 조회
- model.setValue("/root/source/srchcond", "1");
- model.setValue("/root/source/pid", vcheck_pid);
- //환자기본정보 node clear
- model.resetInstanceNode("/root/main/patinfo/patinfolist");
-
- //환자등록번호 체크
- if(submit("TRPMC02500")){
- var vcheck_pid = model.getValue("/root/main/patinfo/patinfolist/pid");
- if (vcheck_pid == null || vcheck_pid == "" || vcheck_pid == " " || vcheck_pid == "-") {
- //조회내역 체크
- messageBox("존재하지 않는 등록번호","E008");//E008=입니다
- fInitialize();
- return;
- }
-
- //재원환자 체크(계산진행 못하게 할 것인지는 추후 수납확인필요)
- var vcheck_inhospyn = model.getValue("/root/main/patinfo/patinfolist/inhospyn");
- if (vcheck_inhospyn == 'Y') {
- messageBox("["+model.getValue("/root/main/patinfo/patinfolist/hngnm")+"] 환자는 재원 중인 환자","E008");//E008=입니다
- }
-
- //조회되는 항목들 clear
- model.resetInstanceNode("/root/main/baseinfo");
- fSearch();
- }
- else {
- messageBox("존재하지 않는 등록번호","E008");//E008=입니다
- fInitialize();
- model.setFocus("ipt_pid");
- model.refresh();
- return;
- }
- }//End if(event.keyCode == "13") {
- ]]>
- </script>
- </input>
- <button id="btn_search" class="btn1_letter2" style="left:800px; top:9px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSearch();
- ]]>
- </script>
- </button>
- <input id="ipt_fromdd" ref="/root/send/fromdd" class="input_s_essential" inputtype="date" style="left:105px; top:10px; width:92px; height:19px; "/>
- <input id="ipt_todd" ref="/root/send/todd" class="input_s_essential" inputtype="date" style="left:209px; top:10px; width:92px; height:19px; "/>
- <output id="opt_hngnm" ref="/root/main/patinfo/patinfolist/hngnm" class="output_fix" style="left:590px; top:10px; width:65px; height:19px; "/>
- <output id="opt_rrgstno1" ref="/root/main/patinfo/patinfolist/rrgstno1" class="output_fix" style="left:657px; top:10px; width:46px; height:19px; "/>
- <output id="opt_rrgstno2" ref="/root/main/patinfo/patinfolist/rrgstno2" class="output_fix" style="left:705px; top:10px; width:52px; height:19px; "/>
- <button id="btn_pid" class="icon_search" style="left:759px; top:11px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/source", "/root/send");
- ]]>
- </script>
- </button>
- <select1 id="radio1" ref="/root/send/srchcond" overflow="visible" appearance="full" cols="2" style="left:323px; top:12px; width:90px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>외래</label>
- <value>outord</value>
- </item>
- <item>
- <label>입원</label>
- <value>inord</value>
- </item>
- </choices>
- </select1>
- </group>
- <datagrid id="grd_printlist" nodeset="/root/main/ordinfo/printlist" autoresize="true" caption="chk^등록번호^성명^주민등록번호^진료과^의사명^진료일시^비고^비고^진료의^진료의사^변경이력^상태" colsep="^" colwidth="26, 80, 89, 146, 170, 100, 161, 100" style="left:5px; top:55px; width:880px; height:475px; ">
- <col checkvalue="Y,N" ref="chk" type="checkbox"/>
- <col ref="pid" style="text-align:center; "/>
- <col ref="hngnm" type="input" style="text-align:center; "/>
- <col ref="rrgstno" format="999999-9999999" style="text-align:center; "/>
- <col ref="orddeptnm" style="text-align:center; "/>
- <col ref="orddrnm" style="text-align:center; "/>
- <col ref="orddd" format="yyyy-mm-dd hh:mm" style="text-align:center; "/>
- <col ref="remark"/>
- </datagrid>
- </group>
- <group id="group4" style="left:0px; top:545px; width:895px; height:35px; ">
- <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:885px; y2:0px; "/>
- <button id="btn_clear" class="btn4_letter3" style="left:820px; top:5px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- </button>
- <button id="btn_prntset" class="btn3_letter5" style="left:85px; top:5px; width:92px; height:22px; ">
- <caption>프린터설정</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var count = getNodesetCount("/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
- if(count == 0) {
- model.makeNode("/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
- }
- open("SPLLC90100_바코드프린터설정.xrw", "", "", "", "", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
- ]]>
- </script>
- </button>
- <button id="button11" class="btn3_letter3" style="left:5px; top:5px; width:68px; height:22px; ">
- <caption>바코드</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var cnt = getNodesetCount("/root/main/ordinfo/printlist[ chk = 'Y' ]" );
- if(cnt > 0 ){
- var sinstnm = model.getValue("/root/hidden/session/sess_posinstnm") ;
- for(i = 1 ; i <= grd_printlist.rows ; i++){
- if( model.getValue("/root/main/ordinfo/printlist [" + i + " ]/chk") == "Y"){
- var spid = model.getValue("/root/main/ordinfo/printlist [" + i + " ]/pid");
- var shngnm = model.getValue("/root/main/ordinfo/printlist [" + i + " ]/hngnm");
- var sorddd = model.getValue("/root/main/ordinfo/printlist [" + i + " ]/orddd");
- sorddd = sorddd.substr(0,4) + "/" + sorddd.substr(4,2) + "/" + sorddd.substr(6,2);
- //------------------------------------------- 프린터 연결 체크 ----------------------------------------------------------
- // 2008.07.02 모듈 로딩 체크 - 실패시 재로딩
- if (!body.isChild("CommAX")) {
- var objNm = "CommAX";
- body.removeChild(objNm);
- body.createChild("xforms:object", "id:"+objNm+"; clsid:{5fe8e390-d882-4ca4-9798-01b1eb10e0f3}; visibility:hidden; left:100px; top:100px; width:100px; height:100px; ");
- // lzzfMakeBrcdPrntObjHanDo("CommAX"); //lis / LZZ001.lzzfMakeBrcdPrntObjHanDo()
- }// if (!body.isChild("CommAX")) { end
-
- var sSndMsg = "";
- var portOpenTF = ""; //오픈 성공 여부
-
- //바코드 출력 시작
- //Port 설정
- // CommAX.CommPort = "3";
- // CommAX.CommPort = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm");
- // if(CommAX.CommPort == ""){CommAX.CommPort = "3"; }
- CommAX.CommPort = "2"; //유져 프린트포트2
- CommAX.Settings = "9600,n,8,1";
-
- portOpenTF = CommAX.PortOpen("true");
- if(portOpenTF == "TRUE") {
- sSndMsg = sSndMsg + "^XA^LH20,20"; // 출력시작
- sSndMsg = sSndMsg + "^CFE40,40^FO80,50^FD" + spid + "^FS"; // 등록번호
- CommAX.SendMessage(sSndMsg);
- sSndMsg = "";
- sSndMsg = sSndMsg + CommAX.PrtImgOut(70, 15, sinstnm, 1, 1); //기관명
- sSndMsg = sSndMsg + CommAX.HanImageData();
- CommAX.SendMessage(sSndMsg);
- sSndMsg = "";
- sSndMsg = sSndMsg + CommAX.PrtImgOut(90, 90, shngnm, 3, 3); // 환자명 - 가로시작위치, 세로시작위치, 출력할문자열, 1,1 (비율:X, Y)
- sSndMsg = sSndMsg + CommAX.HanImageData();
- CommAX.SendMessage(sSndMsg);
- sSndMsg = "";
- sSndMsg = sSndMsg + "^FO80,210^BC550,40,N,N,N^FD" + spid + "^FS"; // 바코드(등록번호)
- sSndMsg = sSndMsg + "^CFA30,30^FO80,180^FD" + sorddd + "^FS"; // 외래진료/입원 일자
- sSndMsg = sSndMsg + "^PQ1"; // 출력매수
- sSndMsg = sSndMsg + "^XZ";
-
- CommAX.SendMessage(sSndMsg);
- CommAX.PortOpen("false");
-
- } else {
- messageBox("아래 사항을 확인후 재출력해주십시오."
- + " \n 1.프린트설정 화면에서 통신유형을 com 으로 선택한 경우 port 번호 확인"
- + " \n 2.케이블 확인"
- + " \n 3.먼저 출력중인 바코드 확인(모두 출력된 후 재출력하십시오.)", "I", "");
- return;
- }
- }
- }//for end
- }//if end
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|