123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMLBP01900" position="absolute 0 0 1196 802" titletext="혈액원NATFile결과전송" oninit="SMLBP01900_oninit" onload="SMLBP01900_onload">
- <Layouts>
- <Layout>
- <Button id="btn_cle" taborder="1" text="초기화" class="btn4" position="absolute 1127 19 1195 41" onclick="btn_cle_onclick"/>
- <Shape id="line1" linetype="horizontal" class="line_6" position="absolute 1 41 1196 47" style="strokepen:3 solid #33bbbbff;"/>
- <Button id="button42" taborder="2" text="저장" class="btn4" position="absolute 1068 19 1124 41" onclick="button42_onclick"/>
- <Static id="caption5" text="혈액원 NAT File 결과 전송" class="tit_1" position="absolute 0 0 186 25"/>
- <Static id="caption11" text="입력자 정보" class="tit_2" position="absolute 2 64 96 81"/>
- <Shape id="line7" linetype="horizontal" class="line_1" position="absolute 0 82 250 88" style="strokepen:3 solid #33bbbbff;"/>
- <Static id="caption3" text="결과목록" class="tit_2" position="absolute 257 65 366 81"/>
- <Shape id="line2" linetype="horizontal" class="line_1" position="absolute 255 82 1194 88" style="strokepen:3 solid #33bbbbff;"/>
- <Static id="caption6" text="입력자 이름" class="cell_1" position="absolute 0 110 100 133"/>
- <Shape id="line8" linetype="horizontal" class="line_3" position="absolute 0 132 250 138" style="strokepen:3 solid #33bbbbff;"/>
- <Static id="caption1" text="파일 선택" class="tit_2" position="absolute 1 142 95 159"/>
- <Shape id="line3" linetype="horizontal" class="line_1" position="absolute 0 158 250 164" style="strokepen:3 solid #33bbbbff;"/>
- <Button id="button16" taborder="3" text="NAT File 변환" class="btn2" visible="false" position="absolute 153 781 250 800"/>
- <Shape id="line14" linetype="horizontal" class="line_2" position="absolute 0 107 250 113" style="strokepen:1 solid #33bbbbff;"/>
- <Shape id="line4" linetype="horizontal" class="line_3" position="absolute 0 181 250 187" style="strokepen:1 solid #33bbbbff;"/>
- <Static id="caption12" text="입력자 ID" class="cell_1" position="absolute 0 86 100 109"/>
- <Edit id="ipt_userid" taborder="4" class="input_s_essential" position="absolute 103 87 250 106" onkeyup="ipt_userid_onkeyup"/>
- <Edit id="opt_usernm" taborder="5" readonly="true" position="absolute 103 111 250 130"/>
- <Button id="img1" taborder="6" class="icon_search" position="absolute 232 164 248 180" onclick="img1_onclick"/>
- <Grid id="grd_natrslt" taborder="7" binddataset="ds_grd_natrslt" useinputpanel="false" position="absolute 255 86 1194 800" autofittype="col">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="31"/>
- <Column size="30"/>
- <Column size="85"/>
- <Column size="85"/>
- <Column size="90"/>
- <Column size="0"/>
- <Column size="70"/>
- <Column size="90"/>
- <Column size="60"/>
- <Column size="90"/>
- <Column size="60"/>
- <Column size="90"/>
- <Column size="60"/>
- <Column size="100"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell rowspan="2" taborder="undefined"/>
- <Cell col="1" rowspan="2" text="No" taborder="undefined"/>
- <Cell col="2" rowspan="2" text="채혈일" taborder="undefined"/>
- <Cell col="3" rowspan="2" text="최종검사일" taborder="undefined"/>
- <Cell col="4" rowspan="2" text="혈액번호" taborder="undefined"/>
- <Cell col="5" text="헌혈종류"/>
- <Cell col="6" rowspan="2" text="검사단계" taborder="undefined"/>
- <Cell col="7" colspan="2" text="HCV" taborder="undefined"/>
- <Cell col="9" colspan="2" text="HIV" taborder="undefined"/>
- <Cell col="11" colspan="2" text="HTLV" taborder="undefined"/>
- <Cell col="13" rowspan="2" text="바코드" taborder="undefined"/>
- <Cell col="14"/>
- <Cell col="15"/>
- <Cell col="16"/>
- <Cell col="17"/>
- <Cell col="18"/>
- <Cell row="1" col="5" text="헌혈종류"/>
- <Cell row="1" col="7" text="결과"/>
- <Cell row="1" col="8" text="D/C"/>
- <Cell row="1" col="9" text="결과"/>
- <Cell row="1" col="10" text="D/C"/>
- <Cell row="1" col="11" text="결과"/>
- <Cell row="1" col="12" text="D/C"/>
- <Cell row="1" col="14" text="LBD10101"/>
- <Cell row="1" col="15" text="LBD10102"/>
- <Cell row="1" col="16" text="LBD10103"/>
- <Cell row="1" col="17"/>
- <Cell row="1" col="18"/>
- </Band>
- <Band id="body">
- <Cell text="expr:currow + 1"/>
- <Cell col="1" text="bind:no"/>
- <Cell col="2" text="bind:dondt"/>
- <Cell col="3" text="bind:rsltdt"/>
- <Cell col="4" text="bind:blodno"/>
- <Cell col="5" text="bind:dongbn"/>
- <Cell col="6" text="bind:rsltgbn"/>
- <Cell col="7" displaytype="combo" edittype="combo" text="bind:hcvrslt" enable="false"/>
- <Cell col="8" text="bind:hcvdc"/>
- <Cell col="9" displaytype="combo" edittype="combo" text="bind:hivrslt" enable="false"/>
- <Cell col="10" text="bind:hivdc"/>
- <Cell col="11" displaytype="combo" edittype="combo" text="bind:htlvrslt" enable="false"/>
- <Cell col="12" text="bind:htlvdc"/>
- <Cell col="13" text="bind:bcno"/>
- <Cell col="14" text="bind:n01"/>
- <Cell col="15" text="bind:n02"/>
- <Cell col="16" text="bind:n03"/>
- <Cell col="17" text="bind:Q"/>
- <Cell col="18" text="bind:R"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Edit id="ipt_filename" taborder="8" position="absolute 0 163 230 182"/>
- <Button id="button1" taborder="9" text="test" class="btn2_letter2" visible="false" position="absolute 1140 61 1182 80" onclick="button1_onclick"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_grd_natrslt" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="no" type="STRING"/>
- <Column id="dondt" type="STRING"/>
- <Column id="rsltdt" type="STRING"/>
- <Column id="blodno" type="STRING"/>
- <Column id="dongbn" type="STRING"/>
- <Column id="rsltgbn" type="STRING"/>
- <Column id="hcvrslt" type="STRING"/>
- <Column id="hcvdc" type="STRING"/>
- <Column id="hivrslt" type="STRING"/>
- <Column id="hivdc" type="STRING"/>
- <Column id="htlvrslt" type="STRING"/>
- <Column id="htlvdc" type="STRING"/>
- <Column id="bcno" type="STRING"/>
- <Column id="n01" type="STRING"/>
- <Column id="n02" type="STRING"/>
- <Column id="n03" type="STRING"/>
- <Column id="Q" type="STRING"/>
- <Column id="R" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="userid" type="STRING" size="256"/>
- <Column id="usernm" type="STRING" size="256"/>
- <Column id="drive" type="STRING" size="256"/>
- <Column id="filename" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_rslt_resultyn" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="bcnoall" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="bcnoall">G28BY00A0|</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="natlist" type="STRING" size="256"/>
- <Column id="grddata" type="STRING" size="256"/>
- <Column id="userid" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_bcnolist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="natno" type="STRING" size="256" sumtext="nat번호"/>
- <Column id="tnsrbcno" type="STRING" size="256" sumtext="검체번호"/>
- <Column id="n01" type="STRING" size="256" sumtext="LBD10101결과"/>
- <Column id="n02" type="STRING" size="256" sumtext="LBD10102결과"/>
- <Column id="n03" type="STRING" size="256" sumtext="LBD10103결과"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_getUsernm" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="usernm" type="STRING" size="256" sumtext="검사자명"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_rsltyn" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="bcnoall" type="STRING" size="256" sumtext="검체구분"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="ipt_userid" propid="value" datasetid="ds_hidden" columnid="userid"/>
- <BindItem id="item1" compid="opt_usernm" propid="value" datasetid="ds_hidden" columnid="usernm"/>
- <BindItem id="item2" compid="ipt_filename" propid="value" datasetid="ds_hidden" columnid="filename"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2015-05-01
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2015-05-01 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs";
- function SMLBP01900_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMLBP01900_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(grd_natrslt);
- grdf_setRowTypeIcon(grd_natrslt, 0);
- fSetInit();
- }
- //초기화
- function fSetInit()
- {
- ds_hidden.clearData();
- ds_hidden.addRow();
- ds_grd_natrslt.clearData();
- ipt_userid.setFocus();
- }
- //초기화버튼
- function btn_cle_onclick(obj:Button, e:ClickEventInfo)
- {
- fSetInit();
- }
- //TEST 버튼
- function button1_onclick(obj:Button, e:ClickEventInfo)
- {
- fSetRsltYnBcno();
- }
- // 결과저장된 bcno 표시바꾸기
- function fSetRsltYnBcno()
- {
- var bcnoall = ds_rslt_resultyn.getColumn(0, "bcnoall"); // ex : G28BY0010|G28BY0020|
- var bcno1 = bcnoall.split("|");
-
- for(i=0; i<(bcno1.length-1); i++)
- {
- //setRowStyle("grd_natrslt", "0", bcno1[i], "bcno", "");
- }
- }
- //결과 파일명 가져오기
- function img1_onclick(obj:Button, e:ClickEventInfo)
- {
- fGetFileName();
- }
- // 파일 가져오기
- function fGetFileName()
- {
- //if(model.getvalue("/root/hidden/usernm") == "")
- if(utlf_isNull(ds_hidden.getColumn(0, "usernm")))
- {
- sysf_messageBox("입력자 ID 를 입력하세요!!", "E");
- ipt_userid.setFocus();
- return;
- }
-
- //var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls|CSV Files(*.csv)|*.csv|Excel Files(*.xlsx)|*.xlsx");
- var fd = new FileDialog;
- var fileName = fd.open("FileOpen", FileDialog.LOAD);
- trace("fileName="+fileName.filename);
-
- if(utlf_isNull(fileName))
- {
- sysf_messageBox("입고할 파일을 선택하세요", "I");
- return;
- }
-
- ds_hidden.setColumn(0, "filename", (fileName.filename));
-
- var sStr = (fileName.filename).substr((fileName.filename).length -4)
- trace("sStr="+sStr);
- if(sStr.toLowerCase() == ".csv") //csv파일일때
- {
- fileName = (fileName.filename).substr(0, (fileName.filename).length - 4) + sStr.toLowerCase();
- //grd_natrslt.loadText(fileName);
- ds_grd_natrslt.loadCSV(fileName);
- }
- else if(sStr.toLowerCase() == ".xls" || sStr.toLowerCase() == "xlsx") //excel파일일때
- {
- fileName = (fileName.filename).substr(0, (fileName.filename).length - 4) + sStr.toLowerCase();
- //grd_natrslt.loadExcel(fileName);
- //ds_grd_natrslt.loadExcel(fileName);
- grdf_ImportExcel("ds_grd_natrslt", 0, grd_natrslt)
- ds_importExcel.copyData(ds_grd_natrslt);
- }
- else
- {
- sysf_messageBox("Excel파일을 선택하세요", "E");
- ds_hidden.setColumn(0, "filename", filename);
- return;
- }
-
- if(ds_grd_natrslt.getColumn(0, "R") == "ALT") //ALT 일때는 HTLV결과임
- {
- for(i = 0; i < ds_grd_natrslt.rowcount; i++)
- {
- ds_grd_natrslt.setColumn(i, "dongbn", ds_grd_natrslt.getColumn(i, "blodno")); //혈액번호에 들어가있는 헌혈종류
- ds_grd_natrslt.setColumn(i, "blodno", ds_grd_natrslt.getColumn(i, "rsltdt")); //최종검사일에 들어가있는 혈액번호
- ds_grd_natrslt.setColumn(i, "rsltdt", "-");
- ds_grd_natrslt.setColumn(i, "rsltgbn", "완료");
- ds_grd_natrslt.setColumn(i, "hcvrslt", "");
- ds_grd_natrslt.setColumn(i, "hcvdc", "");
- ds_grd_natrslt.setColumn(i, "hivrslt", "");
- ds_grd_natrslt.setColumn(i, "hivdc", "");
- ds_grd_natrslt.setColumn(i, "htlvrslt", ds_grd_natrslt.getColumn(i, "Q")); //엑셀 Q컬럼에 있는 HTLV결과
- ds_grd_natrslt.setColumn(i, "htlvdc", "-");
- ds_grd_natrslt.setColumn(i, "bcno", "");
- ds_grd_natrslt.setColumn(i, "n01", "");
- ds_grd_natrslt.setColumn(i, "n02", "");
- ds_grd_natrslt.setColumn(i, "n03", "");
- }
- //grd_natrslt.deleteRow(2); //제목 저장시 iud : d로 해서 넘어감
- ds_grd_natrslt.deleteRow(1);
- }
- else //NAT결과일때
- {
- //NAT일때는 deleteRow 2번만 함 - 제목이 두줄
- ds_grd_natrslt.deleteRow(1);
- }
-
- //혈액번호로 바코드번호 및 해당 결과 조회
- fGetNatnoBcno();
- }
- // 엑셀로딩후 natno에 맞는 bcno 가져오기
- function fGetNatnoBcno()
- {
- var natlist = "";
-
- if(ds_grd_natrslt.rowcount < 2)
- {
- return;
- }
-
- //for(i=1; i<(grd_natrslt.rows-1); i++)
- for(i = 0; i <ds_grd_natrslt.rowcount; i++)
- {
- //natlist += "'" + model.getValue("/root/main/rsltlist["+i+"]/blodno") + "'"; // $natlist$
- natlist += "'" + ds_grd_natrslt.getColumn(i, "blodno") + "'";
- //if(i < (grd_natrslt.rows-2))
- if( i < ds_grd_natrslt.rowcount-1)
- {
- natlist += ",";
- }
- }
-
- ds_send.setColumn(0, "natlist", natlist);
-
- // natno에 맞는 bcno 조회
- var oParam = {};
- oParam.id = "TRLBP01901";
- oParam.service = "refprintmngtapp.BloodBankRefPrintMngt";
- oParam.method = "reqGetNatnoBcno";
- oParam.inds = "cond=setColumn";
- oParam.outds = "ds_bcnolist=getNatnoBcno";
- oParam.async = false;
- //oParam.callback = "cf_TRLBP01901";
- tranf_submit(oParam);
- var row2 = 1;
- //var count = getNodesetCount("/root/main/bcnolist") ;
- var count = ds_bcnolist.rowcount;
-
- //for(j=1; j<(grd_natrslt.rows-1); j++)
- for(j=0; j < ds_grd_natrslt.rowcount-1; j++)
- {
- for(z=0; z < count; z++)
- {
- //if(model.getValue("/root/main/rsltlist["+j+"]/blodno") == model.getValue("/root/main/bcnolist["+(z+1)+"]/natno"))
- if(ds_grd_natrslt.getColumn(j, "blodno") == ds_bcnolist.getColumn(z, "natno"))
- {
- //model.setValue("/root/main/rsltlist["+j+"]/bcno", model.getValue("/root/main/bcnolist["+(z+1)+"]/bcno"));
- ds_grd_natrslt.setColumn(j, "bcno", ds_bcnolist.getColumn(z, "bcno"));
- ds_grd_natrslt.setColumn(j, "n01", ds_bcnolist.getColumn(z, "n01")); //등록된 LBD10101 결과
- ds_grd_natrslt.setColumn(j, "n02", ds_bcnolist.getColumn(z, "n02")); //등록된 LBD10102
- ds_grd_natrslt.setColumn(j, "n03", ds_bcnolist.getColumn(z, "n03")); //등록된 LBD10103
- }
- }
- }
- // for(k=1; k<grd_natrslt.rows; k++)
- // {
- // grd_natrslt.rowStatus(k) = 1;
- // }
- }
- function ipt_userid_onkeyup(obj:Edit, e:KeyEventInfo)
- {
- if(e.keycode == 13)
- {
- fKeyEvent();
- }
- }
- //키이벤트 엔터키 입력시
- function fKeyEvent()
- {
- // 등록번호 바코드 리딩시
- //model.setvalue("/root/hidden/userid", (ipt_userid.currentText).substr(0,8));
- ds_hidden.setColumn(0, "userid", (ipt_userid.text).substr(0, 8));
- // 입력자 정보
- fGetUserInfo();
-
- // ipt_userid.selBegin = 0;
- // ipt_userid.selEnd = ipt_userid.currentText.length;
- }
- // 입력자 정보
- function fGetUserInfo()
- {
- if(!utlf_isNull(ds_hidden.getColumn(0, "userid")))
- {
- //model.makeValue("/root/send/userid" , model.getvalue("/root/hidden/userid"));
- ds_send.setColumn(0, "userid", ds_hidden.getColumn(0, "userid"));
-
- var oParam = {};
- oParam.id = "TRLZZ00104";
- oParam.service = "diagtestapplib.LisCommon";
- oParam.method = "reqGetUserNM";
- oParam.inds = "cond=ds_send";
- oParam.outds = "ds_getUsernm=usernm";
- oParam.async = false;
- //oParam.callback = "cf_TRLZZ00104";
- tranf_submit(oParam);
- //model.setValue("/root/hidden/usernm", model.getValue("/root/main/getUsernm/usernm"));
- ds_hidden.setColumn(0, "usernm", ds_getUsernm.getColumn(0, "usernm"));
-
- }
- }
- //저장
- function button42_onclick(obj:Button, e:ClickEventInfo)
- {
- fExeNatRslt();
- }
- // 저장
- function fExeNatRslt()
- {
- // var grddata = grd_natrslt.getUpdateData();
-
- //model.setValue("/root/send/grddata", grddata);
- //model.setValue("/root/send/userid", model.getValue("/root/hidden/userid"));
- ds_send.setColumn(0, "userid", ds_hidden.getColumn(0, "userid"));
- //submit("TXLBP01901");
- var oParam = {};
- oParam.id = "TXLBP01901";
- oParam.service = "refprintmngtapp.BloodBankRefPrintMngt";
- oParam.method = "reqExeNatRslt";
- oParam.inds = "cond=ds_grd_natrslt:U cond2=ds_send";
- oParam.outds = "ds_rsltyn=rsltyn";
- oParam.transaction = false;
- oParam.async = false;
- //oParam.callback = "cf_TXLBP01901";
- tranf_submit(oParam);
-
- // 결과저장된 bcno 표시바꾸기
- fSetRsltYnBcno();
- }
- ]]></Script>
- </Form>
- </FDL>
|