123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SMLBP01900_혈액원NATFile결과전송.xrw
- * 설 명 : 혈액원NATFile결과전송
- * 설 계 자 : (주)에이씨케이 - 박정은
- * 작 성 자 : (주)에이씨케이 - 박정은
- * 작 성 일 : 2008. 02. 20
- * 수정이력 :
- * 기 타 :
- -->
- <?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>혈액원NATFile결과전송</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root>
- <main>
- <rsltlist>
- <no/>
- <dondt/>
- <rsltdt/>
- <blodno/>
- <dongbn/>
- <rsltgbn/>
- <hcvrslt/>
- <hcvdc/>
- <hivrslt/>
- <hivdc/>
- <htlvrslt/>
- <htlvdc/>
- <bcno/>
- <n01/>
- <n02/>
- <n03/>
- <Q/>
- <R/>
- </rsltlist>
- <drv/>
- <folder/>
- <getUsernm/>
- <bcnolist>
- <bcno/>
- <natno/>
- <n01/>
- <n02/>
- <n03/>
- </bcnolist>
- <!--
- <rslt>
- <resultyn>
- <bcnoall/>
- </resultyn>
- </rslt>
- -->
- <rslt>
- <resultyn>
- <bcnoall>G28BY00A0|</bcnoall>
- </resultyn>
- </rslt>
- </main>
- <send>
- <natlist/>
- <grddata/>
- <userid/>
- </send>
- <init>
- </init>
- <hidden>
- <userid/>
- <usernm/>
- <drive/>
- <filename/>
- </hidden>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- //초기화
- fSetInit();
- ]]>
- </script>
- <submission id="TRLZZ00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/getUsernm"/>
- <submission id="TRLBP01901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/bcnolist"/>
- <submission id="TXLBP01901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/rslt"/>
- </model>
- <script type="javascript">
- <![CDATA[
- //초기화
- function fSetInit() {
- model.resetInstanceNode("/root/hidden");
- model.removeNodeset("/root/main/rsltlist");
- grd_natrslt.rebuild();
- model.setFocus("ipt_userid");
- model.refresh();
- }
-
- // 존재하는 drives 안씀
- function fGetDrive(){
- var fso, s, n, e, x;
- var i = 0;
-
- fso = new ActiveXObject("Scripting.FileSystemObject");
- e = new Enumerator(fso.Drives);
- s = "";
- for (; !e.atEnd(); e.moveNext()){
- x = e.item();
- i++;
- s = x.DriveLetter;
- model.makeValue("/root/main/drv/drvlist["+i+"]/nm" , x);
- model.makeValue("/root/main/drv/drvlist["+i+"]/cd" , s);
- }
- return(s);
-
- }
-
- // folder 가져오기 안씀
- function fGetFolderList(folderspec){
- var folderspec = folderspec + ":";
- var fso, f, fc, s;
- fso = new ActiveXObject("Scripting.FileSystemObject");
- f = fso.GetFolder(folderspec);
- fc = new Enumerator(f.SubFolders);
- s = "";
- for (; !fc.atEnd(); fc.moveNext())
- {
-
- }
- return(s);
-
- }
-
-
- //키이벤트 엔터키 입력시
- function fKeyEvent(){
- if(event.keyCode == "13"){
-
- // 등록번호 바코드 리딩시
- if(event.target == "ipt_userid"){
- model.setvalue("/root/hidden/userid", (ipt_userid.currentText).substr(0,8));
- // 입력자 정보
- fGetUserInfo();
-
- ipt_userid.selBegin = 0;
- ipt_userid.selEnd = ipt_userid.currentText.length;
- }
- }
- }
-
- // 입력자 정보
- function fGetUserInfo(){
- if(model.getvalue("/root/hidden/userid") != ""){
-
- model.makeValue("/root/send/userid" , model.getvalue("/root/hidden/userid"));
- submit("TRLZZ00104");
- model.setValue("/root/hidden/usernm", model.getValue("/root/main/getUsernm/usernm"));
- opt_usernm.refresh();
-
- }
-
- }
-
- // 파일 가져오기
- function fGetFileName(){
-
- if(model.getvalue("/root/hidden/usernm") == ""){
- messageBox("입력자 ID 를 입력하세요!!", "E");
- model.setFocus("ipt_userid");
- return;
- }
-
- var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls|CSV Files(*.csv)|*.csv|Excel Files(*.xlsx)|*.xlsx");
-
- if (fileName == "" || fileName == null) {
- messageBox("입고할 파일을 선택하세요", "I");
- return;
- }
-
- model.setValue("/root/hidden/filename", fileName);
- ipt_filename.refresh();
-
- model.resetInstanceNode("/root/main/rsltlist");
-
- var sStr = fileName.substring(fileName.length - 4);
-
- if(sStr.toLowerCase() == ".csv"){ //csv파일일때
-
- fileName = fileName.substring(0, fileName.length - 4) + sStr.toLowerCase();
- grd_natrslt.loadText(fileName);
-
- }else if(sStr.toLowerCase() == ".xls" || sStr.toLowerCase() == "xlsx"){ //excel파일일때
-
- fileName = fileName.substring(0, fileName.length - 4) + sStr.toLowerCase();
- grd_natrslt.loadExcel(fileName);
-
- }else{
- messageBox("Excel파일을 선택하세요", "E");
- return;
- }
-
- if(model.getValue("/root/main/rsltlist[" + 1 + "]/R") == "ALT"){ //ALT 일때는 HTLV결과임
-
- for(i = 1; i < (grd_natrslt.rows-1); i++){
- model.setValue("/root/main/rsltlist[" + i + "]/dongbn" , model.getValue("/root/main/rsltlist[" + i + "]/blodno" )); //혈액번호에 들어가있는 헌혈종류
- model.setValue("/root/main/rsltlist[" + i + "]/blodno" , model.getValue("/root/main/rsltlist[" + i + "]/rsltdt" )); //최종검사일에 들어가있는 혈액번호
- model.setValue("/root/main/rsltlist[" + i + "]/rsltdt" , "-");
- model.setValue("/root/main/rsltlist[" + i + "]/rsltgbn" , "완료");
- model.setValue("/root/main/rsltlist[" + i + "]/hcvrslt" , "");
- model.setValue("/root/main/rsltlist[" + i + "]/hcvdc" , "");
- model.setValue("/root/main/rsltlist[" + i + "]/hivrslt" , "");
- model.setValue("/root/main/rsltlist[" + i + "]/hivdc" , "");
- model.setValue("/root/main/rsltlist[" + i + "]/htlvrslt" , model.getValue("/root/main/rsltlist[" + i + "]/Q" )); //엑셀 Q컬럼에 있는 HTLV결과
- model.setValue("/root/main/rsltlist[" + i + "]/htlvdc" , "-");
- model.setValue("/root/main/rsltlist[" + i + "]/bcno" , "");
- model.setValue("/root/main/rsltlist[" + i + "]/n01" , "");
- model.setValue("/root/main/rsltlist[" + i + "]/n02" , "");
- model.setValue("/root/main/rsltlist[" + i + "]/n03" , "");
- }
- grd_natrslt.deleteRow(2); //제목 저장시 iud : d로 해서 넘어감
- }else{ //NAT결과일때
- //NAT일때는 deleteRow 2번만 함 - 제목이 두줄
- grd_natrslt.deleteRow(2); //제목
- grd_natrslt.deleteRow(2); //제목 지우기
- }
-
- //혈액번호로 바코드번호 및 해당 결과 조회
- fGetNatnoBcno();
-
- }
-
- // 저장
- function fExeNatRslt(){
- //alert("개발중");
- var grddata = grd_natrslt.getUpdateData();
-
- model.setValue("/root/send/grddata", grddata);
- model.setValue("/root/send/userid", model.getValue("/root/hidden/userid"));
- submit("TXLBP01901");
-
- // 결과저장된 bcno 표시바꾸기
- fSetRsltYnBcno();
- }
-
- // 결과저장된 bcno 표시바꾸기
- function fSetRsltYnBcno(){
- var bcnoall = model.getValue("/root/main/rslt/resultyn/bcnoall"); // ex : G28BY0010|G28BY0020|
- var bcno1 = bcnoall.split("|");
-
- for(i=0; i<(bcno1.length-1); i++){
- //alert("aaa= " + bcno1[i]);
- setRowStyle("grd_natrslt", "0", bcno1[i], "bcno", "");
- }
- grd_natrslt.rebuild();
- }
-
- // 엑셀로딩후 natno에 맞는 bcno 가져오기
- function fGetNatnoBcno(){
- var natlist = "";
-
- if(grd_natrslt.rows < 2){
- return;
- }
-
- for(i=1; i<(grd_natrslt.rows-1); i++){
- natlist += "'" + model.getValue("/root/main/rsltlist["+i+"]/blodno") + "'"; // $natlist$
- if(i < (grd_natrslt.rows-2)){
- natlist += ",";
- }
- }
-
- //alert("natlist= " + natlist);
- model.setValue("/root/send/natlist", natlist);
-
- // natno에 맞는 bcno 조회
- if(submit("TRLBP01901")){
- var row2 = 1;
- var count = getNodesetCount("/root/main/bcnolist") ;
-
- for(j=1; j<(grd_natrslt.rows-1); j++){
- for(z=0; z<count; z++){
- if(model.getValue("/root/main/rsltlist["+j+"]/blodno") == model.getValue("/root/main/bcnolist["+(z+1)+"]/natno")){
- model.setValue("/root/main/rsltlist["+j+"]/bcno", model.getValue("/root/main/bcnolist["+(z+1)+"]/bcno"));
- //일부 항목 등록 후 나머지 항목 등록시 이미 들어간 항목도 같이 보고 되어 수정보고되므로 이를 방지하기 위해 결과 등록시 app단에서 비교하여 등록하기 위해 조회함 20090417 승현
- model.setValue("/root/main/rsltlist["+j+"]/n01", model.getValue("/root/main/bcnolist["+(z+1)+"]/n01")); //등록된 LBD10101 결과
- model.setValue("/root/main/rsltlist["+j+"]/n02", model.getValue("/root/main/bcnolist["+(z+1)+"]/n02")); //등록된 LBD10102
- model.setValue("/root/main/rsltlist["+j+"]/n03", model.getValue("/root/main/bcnolist["+(z+1)+"]/n03")); //등록된 LBD10103
- }
- }
- //row2++;
-
- }
-
- for(k=1; k<grd_natrslt.rows; k++){
- grd_natrslt.rowStatus(k) = 1;
- }
-
- }
-
-
- }
-
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group3" style="left:0px; top:13px; width:1195px; height:27px; ">
- <button id="btn_cle" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //초기화
- fSetInit();
- ]]>
- </script>
- </button>
- <line id="line1" class="line_6" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
- <button id="button42" class="btn4_letter2" style="left:1068px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //저장
- fExeNatRslt();
- ]]>
- </script>
- </button>
- </group>
- <group id="group4" style="left:0px; top:40px; width:1195px; height:744px; ">
- <caption id="caption11" class="tit_2" style="left:5px; top:10px; width:94px; height:14px; ">입력자 정보</caption>
- <line id="line7" class="line_1" style="x1:0px; y1:25px; x2:250px; y2:25px; "/>
- <caption id="caption3" class="tit_2" style="left:260px; top:10px; width:109px; height:13px; ">결과목록</caption>
- <line id="line2" class="line_1" style="x1:255px; y1:25px; x2:1194px; y2:25px; "/>
- <caption id="caption6" class="cell_1" style="left:0px; top:54px; width:100px; height:23px; vertical-align:middle; ">입력자 이름</caption>
- <line id="line8" class="line_3" style="x1:0px; y1:76px; x2:250px; y2:76px; "/>
- <caption id="caption1" class="tit_2" style="left:5px; top:86px; width:94px; height:13px; ">파일 선택</caption>
- <line id="line3" class="line_1" style="x1:0px; y1:101px; x2:250px; y2:101px; "/>
- <button id="button16" class="btn2_letter7" visibility="hidden" style="left:153px; top:725px; width:97px; height:19px; ">
- <caption>NAT File 변환</caption>
- </button>
- <line id="line14" class="line_2" style="x1:0px; y1:52px; x2:250px; y2:52px; "/>
- <line id="line4" class="line_3" style="x1:0px; y1:128px; x2:250px; y2:128px; "/>
- <caption id="caption12" class="cell_1" style="left:0px; top:30px; width:100px; height:23px; vertical-align:middle; ">입력자 ID</caption>
- <input id="ipt_userid" ref="/root/hidden/userid" accesskey="f1" class="input_s_essential" appearance="input" style="left:103px; top:31px; width:147px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- fKeyEvent();
- ]]>
- </script>
- </input>
- <output id="opt_usernm" ref="/root/hidden/usernm" class="output_fix" style="left:103px; top:55px; width:147px; height:19px; "/>
- <button id="img1" class="icon_search" appearance="button" style="left:232px; top:108px; width:16px; height:16px; ">
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //결과 파일명 가져오기
- fGetFileName();
-
- ]]>
- </script>
- <caption/>
- </button>
- <datagrid id="grd_natrslt" nodeset="/root/main/rsltlist" caption="No^채혈일^최종검사일^혈액번호^헌혈종류^검사단계^HCV^HCV^HIV^HIV^HTLV^HTLV^바코드|No^채혈일^최종검사일^혈액번호^헌혈종류^검사단계^결과^D/C^결과^D/C^결과^D/C^바코드^LBD10101^LBD10102^LBD10103" colsep="^" colwidth="30, 85, 85, 90, 0, 70, 90, 60, 90, 60, 90, 60, 100, 100, 100, 100" dataheight="23" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:255px; top:30px; width:939px; height:714px; ">
- <col ref="no"/>
- <col ref="dondt"/>
- <col ref="rsltdt"/>
- <col ref="blodno"/>
- <col ref="dongbn"/>
- <col ref="rsltgbn"/>
- <col disabled="true" ref="hcvrslt" type="combo">
- <choices>
- <item>
- <label>Negative</label>
- <value>-</value>
- </item>
- <item>
- <label>Positive</label>
- <value>+</value>
- </item>
- <item>
- <label/>
- <value/>
- </item>
- </choices>
- </col>
- <col ref="hcvdc"/>
- <col disabled="true" ref="hivrslt" type="combo">
- <choices>
- <item>
- <label>Negative</label>
- <value>-</value>
- </item>
- <item>
- <label>Positive</label>
- <value>+</value>
- </item>
- <item>
- <label/>
- <value/>
- </item>
- </choices>
- </col>
- <col ref="hivdc"/>
- <col disabled="true" ref="htlvrslt" type="combo">
- <choices>
- <item>
- <label>Negative</label>
- <value>-</value>
- </item>
- <item>
- <label>Positive</label>
- <value>+</value>
- </item>
- <item>
- <label/>
- <value/>
- </item>
- </choices>
- </col>
- <col ref="htlvdc"/>
- <col ref="bcno"/>
- <col ref="n01" visibility="hidden"/>
- <col ref="n02" visibility="hidden"/>
- <col ref="n03" visibility="hidden"/>
- <col ref="Q" visibility="hidden"/>
- <col ref="R" visibility="hidden"/>
- </datagrid>
- <input id="ipt_filename" ref="/root/hidden/filename" style="left:0px; top:107px; width:230px; height:19px; "/>
- <button id="button1" class="btn2_letter2" visibility="hidden" style="left:1140px; top:5px; width:42px; height:19px; ">
- <caption>test</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //fGetNatnoBcno();
- fSetRsltYnBcno();
- ]]>
- </script>
- </button>
- </group>
- <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption5" class="tit_1" style="left:0px; top:0px; width:186px; height:13px; ">혈액원 NAT File 결과 전송</caption>
- </group>
- </xhtml:body>
- </xhtml:html>
|