123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPMMO33100" position="absolute 0 0 630 615" titletext="제한항생제 조건 리스트 조회" oninit="SPMMO33100_oninit" onload="SPMMO33100_onload">
- <Layouts>
- <Layout>
- <Static text="제한항생제 조건 관리" position="absolute 0 0 158 25" id="caption6" class="tit_1"/>
- <Static text="제한항생제 조건 상세" position="absolute 0 276 175 296" id="cpt_worktitle" class="tit_2" anchor="left top"/>
- <Button position="absolute 569 275 630 294" id="btn_excel" class="btn7" text="Excel" onclick="btn_excel_onclick" anchor="top right"/>
- <Static text="제한항생제 조건" position="absolute 0 30 188 50" align="align:left middle;" id="caption3" class="tit_2"/>
- <Grid position="absolute 0 50 630 269" id="grd_hardcodespec" binddataset="ds_speclist" autofittype="col" cellsizingtype="col" oncellclick="grd_hardcodespec_oncellclick" autoenter="select" anchor="left top right" onenterdown="grd_hardcodespec_onenterdown">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25"/>
- <Column size="80"/>
- <Column size="494"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="조건코드"/>
- <Cell col="2" text="조건명"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" text="expr:currow+1"/>
- <Cell col="1" text="bind:hardcdno"/>
- <Cell col="2" displaytype="text" edittype="text" text="bind:hardcdnm" editautoselect="true"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Grid position="absolute 0 296 630 615" id="grd_hardcodespecdetl" binddataset="ds_specdetllist" onexpandup="grd_hardcodespecdetl_onexpandup" autoenter="select" anchor="all" autofittype="col" onenterdown="grd_hardcodespecdetl_onenterdown" autoupdatetype="dateselect" oncloseup="grd_hardcodespecdetl_oncloseup" cellsizingtype="col">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="22"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="90"/>
- <Column size="320"/>
- <Column size="0"/>
- <Column size="99"/>
- <Column size="99"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell autosizecol="default"/>
- <Cell col="1" text="status"/>
- <Cell col="2" text="hardcd"/>
- <Cell col="3" text="코드"/>
- <Cell col="4" text="코드명"/>
- <Cell col="5" text="코드일련번호"/>
- <Cell col="6" text="시작일자"/>
- <Cell col="7" text="종료일자"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" autosizecol="default"/>
- <Cell col="1" text="bind:status"/>
- <Cell col="2" text="bind:hardcd"/>
- <Cell col="3" displaytype="text" edittype="expand" text="bind:trgtcd" editautoselect="true" expandshow="show" expandsize="20"/>
- <Cell col="4" displaytype="text" edittype="text" text="bind:trgtcdnm" editautoselect="true"/>
- <Cell col="5" text="bind:cdseqno"/>
- <Cell col="6" displaytype="date" edittype="date" text="bind:valifromdd" editautoselect="true" editautoskip="true"/>
- <Cell col="7" displaytype="date" edittype="date" text="bind:valitodd" editautoselect="true" editautoskip="true"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button position="absolute 574 28 630 48" id="button3" class="btn4" visible="false" text="저장" onclick="button3_onclick" anchor="top right"/>
- <Button position="absolute 422 275 464 294" id="button7" class="btn2" text="신규" onclick="button7_onclick" anchor="top right"/>
- <Button position="absolute 467 275 509 294" id="button8" class="btn2" text="삭제" onclick="button8_onclick" anchor="top right"/>
- <Button position="absolute 512 275 566 294" id="button9" class="btn4" text="저장" onclick="button9_onclick" anchor="top right"/>
- <Div position="absolute 28 334 623 553" id="grp_limantibioapplist" visible="false" style="background:#ffffffe6;border:0 none #808080ff ;shadow:outer 0,0 20 gray;">
- <Layouts>
- <Layout>
- <Button position="absolute 553 200 595 219" id="btn_grdhidden" class="btn2" text="닫기" anchor="default" onclick="grp_limantibioapplist_btn_grdhidden_onclick"/>
- <Grid position="absolute 0 0 595 200" id="grd_limantibioapplist" binddataset="ds_limantibiodruglist" anchor="default" oncelldblclick="grp_limantibioapplist_grd_limantibioapplist_oncelldblclick" autoenter="select" autofittype="col" style="background:#ffffffe6;" onenterdown="grp_limantibioapplist_grd_limantibioapplist_onenterdown" autoupdatetype="dateselect" oncloseup="grp_limantibioapplist_grd_limantibioapplist_oncloseup" cellsizingtype="col">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="22"/>
- <Column size="100"/>
- <Column size="260"/>
- <Column size="100"/>
- <Column size="100"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="처방코드"/>
- <Cell col="2" text="처방명"/>
- <Cell col="3" text="시작일자"/>
- <Cell col="4" text="종료일자"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" style="align:left middle;" text="bind:prcpcd"/>
- <Cell col="2" style="align:left middle;" text="bind:prcpnm"/>
- <Cell col="3" displaytype="date" edittype="date" text="bind:valifromdd" editautoselect="true" editautoskip="true"/>
- <Cell col="4" displaytype="date" edittype="date" text="bind:valitodd" editautoselect="true" editautoskip="true"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="hardcdlist" type="STRING" size="256"/>
- <Column id="prcpcd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="hardcdlist">236,237,238,257,258,259,286,417</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_speclist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="hardcdno" type="STRING" size="256" sumtext="hardcdno"/>
- <Column id="hardcdnm" type="STRING" size="256" sumtext="hardcdnm"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send_savedata1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="hardcdno" type="STRING" size="256" sumtext="hardcdno"/>
- <Column id="hardcdnm" type="STRING" size="256" sumtext="hardcdnm"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="hardcdno" type="STRING" size="256"/>
- <Column id="hardcdnm" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_specdetllist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="status" type="STRING" size="256" sumtext="status"/>
- <Column id="hardcd" type="STRING" size="256" sumtext="hardcd"/>
- <Column id="cdseqno" type="STRING" size="256" sumtext="cdseqno"/>
- <Column id="trgtcd" type="STRING" size="256" sumtext="trgtcd"/>
- <Column id="trgtcdnm" type="STRING" size="256" sumtext="trgtcdnm"/>
- <Column id="valifromdd" type="STRING" size="256" sumtext="유효시작일자"/>
- <Column id="valitodd" type="STRING" size="256" sumtext="유효종료일자"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_limantibiodruglist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="chkflag" type="STRING" size="256" sumtext="체크여부"/>
- <Column id="prcpnm" type="STRING" size="256" sumtext="처방명"/>
- <Column id="prcpcd" type="STRING" size="256" sumtext="처방코드"/>
- <Column id="dgflag" type="STRING" size="256" sumtext="차수구분"/>
- <Column id="valifromdd" type="STRING" size="256" sumtext="유효시작일자"/>
- <Column id="valitodd" type="STRING" size="256" sumtext="유효종료일자"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send_savedata2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="status" type="STRING" size="256" sumtext="status"/>
- <Column id="hardcd" type="STRING" size="256" sumtext="hardcd"/>
- <Column id="cdseqno" type="STRING" size="256" sumtext="cdseqno"/>
- <Column id="trgtcd" type="STRING" size="256" sumtext="trgtcd"/>
- <Column id="trgtcdnm" type="STRING" size="256" sumtext="trgtcdnm"/>
- <Column id="valifromdd" type="STRING" size="256" sumtext="유효시작일자"/>
- <Column id="valitodd" type="STRING" size="256" sumtext="유효종료일자"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2014-12-10
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2014-12-10 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs";
- include "emr_prcpmngtxp::MMO001.xjs";
- var selectedRow = -1;
- function SPMMO33100_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SPMMO33100_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_setRowTypeIcon(grd_hardcodespecdetl, 0);
- grdf_setRowTypeIcon(grp_limantibioapplist.grd_limantibioapplist, 0);
-
- var sUserId = sysf_getUserInfo ( "userid" );
- if(lf_ContainsHardCD("286", sUserId)) {
- button7.enable = true;
- button8.enable = true;
- button9.enable = true;
- } else {
- button7.enable = false;
- button8.enable = false;
- button9.enable = false;
- }
-
- //제한항생제 조건 리스트 조회
- var oParam = {};
- oParam.id = "TRMMO33101";
- oParam.service = "prcpmngtapp.LimAntibioMngt";
- oParam.method = "reqGetLimAntiBioCondList";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_speclist=speclist";
- oParam.async = true;
- oParam.callback = "cf_TRMMO33101";
- tranf_submit(oParam);
- }
- function cf_TRMMO33101(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
-
- ds_speclist.rowposition = -1;
- }
- function button3_onclick(obj:Button, e:ClickEventInfo)
- {
- ds_send_savedata1.copyData(ds_speclist);
-
- var oParam = {};
- oParam.id = "TXMMO33101";
- oParam.service = "prcpmngtapp.LimAntibioMngt";
- oParam.method = "reqExeLimAntiBioCondList";
- oParam.inds = "req=ds_send_reqdata savedata=ds_send_savedata1";
- oParam.outds = "ds_speclist=speclist";
- oParam.async = false;
- tranf_submit(oParam);
-
- ds_speclist.rowposition = -1;
- }
- function grd_hardcodespec_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- //그리드 row선택시 row외 다른곳 선택시 error메세지
- if(e.row < 0 || e.col < 0) return;
-
- //코드값을 가지고 가기위해
- ds_cond.setColumn(0, "hardcdno", ds_speclist.getColumn(e.row, "hardcdno"));
- ds_cond.setColumn(0, "hardcdnm", ds_speclist.getColumn(e.row, "hardcdnm"));
-
- //상세내역을 알기 위해 하드코드 값을 가지고 상세내역 조회
- var oParam = {};
- oParam.id = "TRMMO33102";
- oParam.service = "prcpmngtapp.LimAntibioMngt";
- oParam.method = "reqGetLimAntiBioCondInfo";
- oParam.inds = "req=ds_cond";
- oParam.outds = "ds_specdetllist=specdetllist";
- oParam.async = true;
- oParam.callback = "cf_TRMMO33102";
- tranf_submit(oParam);
- }
- function cf_TRMMO33102(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
-
- ds_specdetllist.rowposition = -1;
- }
- function grd_hardcodespecdetl_onexpandup(obj:Grid, e:GridMouseEventInfo)
- {
- if(e.row < 0 || e.col < 0) return;
-
- //위치 지정
- var arrCellRect = grd_hardcodespecdetl.getCellRect(e.row, e.col);
- var tPos = grd_hardcodespecdetl.position.y + arrCellRect.bottom + 13;
- if(tPos + grp_limantibioapplist.position.height > grd_hardcodespecdetl.position.bottom) tPos = tPos - (grp_limantibioapplist.position.height + 51);
-
- grp_limantibioapplist.position.y = tPos;
-
- //내용검색
- ds_send_reqdata.setColumn(0, "prcpcd", ds_specdetllist.getColumn(e.row, "trgtcd"));
-
- var oParam = {};
- oParam.id = "TRMMD08701";
- oParam.service = "prcpmngtapp.LimAntibioMngt";
- oParam.method = "reqGetLimAntibioMasterPrcpList";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_limantibiodruglist=limantibiodruglist";
- oParam.async = true;
- oParam.callback = "cf_TRMMD08701";
- tranf_submit(oParam);
- }
- function cf_TRMMD08701(sSvcId, nErrorCode, sErrorMsg) {
- grp_limantibioapplist.visible = true;
- selectedRow = ds_specdetllist.rowposition;
- }
- function grp_limantibioapplist_grd_limantibioapplist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
- {
- if(e.row < 0 || e.col < 0) return;
-
- ds_specdetllist.setColumn(selectedRow, "trgtcd", ds_limantibiodruglist.getColumn(e.row, "prcpcd"));
- ds_specdetllist.setColumn(selectedRow, "trgtcdnm", ds_limantibiodruglist.getColumn(e.row, "prcpnm"));
-
- grp_limantibioapplist.visible = false;
- selectedRow = -1;
- }
- function grp_limantibioapplist_btn_grdhidden_onclick(obj:Button, e:ClickEventInfo)
- {
- grp_limantibioapplist.visible = false;
- selectedRow = -1;
- }
- function button7_onclick(obj:Button, e:ClickEventInfo)
- {
- var cRow = ds_speclist.rowposition;
- if( cRow < 0 ){
- alert("제한항생제 조건을 선택해주십시오.");
- return;
- }
-
- var iRow = ds_specdetllist.addRow();
-
- ds_specdetllist.setColumn(iRow, "status", "I");
- ds_specdetllist.setColumn(iRow, "hardcd", ds_speclist.getColumn(cRow, "hardcdno"));
- ds_specdetllist.setColumn(iRow, "valifromdd", utlf_getCurrentDate());
- ds_specdetllist.setColumn(iRow, "valitodd", "99991231");
- }
- function button8_onclick(obj:Button, e:ClickEventInfo)
- {
- var iRow = ds_specdetllist.rowposition;
- if( iRow < 0 ){
- alert("삭제할 제한항생제 처방을 선택해주십시오.");
- return;
- }
-
- var status = ds_specdetllist.getColumn(iRow, "status");
- if( status == "I" ){
- ds_specdetllist.deleteRow(iRow);
- }else if( status == "D" ){
- ds_specdetllist.setColumn(iRow, "status", "-");
-
- var arrPostion = new Array();
- arrPostion[0] = iRow;
- grdf_setStatus(grd_hardcodespecdetl, "", arrPostion);
- }else{
- ds_specdetllist.setColumn(iRow, "status", "D");
-
- var arrPostion = new Array();
- arrPostion[0] = iRow;
- grdf_setStatus(grd_hardcodespecdetl, "D", arrPostion);
- }
- }
- function button9_onclick(obj:Button, e:ClickEventInfo)
- {
- if( ds_specdetllist.getCaseCount("status != '-'") > 0 ){
- if( ds_specdetllist.getCaseCount("trgtcd == ''") > 0 ){
- alert("처방코드가 누락되었습니다.");
- return;
- }else if( ds_specdetllist.getCaseCount("status != 'D' && trgtcdnm == ''") > 0 ){
- alert("처방명칭이 누락되었습니다.");
- return;
- }else if( ds_specdetllist.getCaseCount("status != 'D' && valifromdd == ''") > 0 ){
- alert("시작일자가 누락되었습니다.");
- return;
- }else if( ds_specdetllist.getCaseCount("status != 'D' && valitodd == ''") > 0 ){
- alert("종료일자가 누락되었습니다.");
- return;
- }
-
- var cRow = ds_speclist.rowposition;
-
- ds_send_savedata1.clearData();
- ds_send_savedata1.addRow();
- ds_send_savedata1.copyRow(0, ds_speclist, cRow);
-
- ds_send_savedata2.copyData(ds_specdetllist, true);
-
- var oParam = {};
- oParam.id = "TXMMO33102";
- oParam.service = "prcpmngtapp.LimAntibioMngt";
- oParam.method = "reqExeLimAntiBioCondInfo";
- oParam.inds = "req=ds_send_savedata1 savedata=ds_send_savedata2";
- oParam.outds = "ds_specdetllist=specdetllist";
- oParam.async = false;
- tranf_submit(oParam);
-
- ds_specdetllist.rowposition = -1;
- }
- }
- function btn_excel_onclick(obj:Button, e:ClickEventInfo)
- {
- var cRow = ds_speclist.rowposition;
- if( cRow < 0 ){
- alert("제한항생제 조건을 선택해주십시오.");
- return;
- }
- var SheetName = "제한항생제 조건코드 " + ds_speclist.getColumn(cRow, "hardcdno");
-
- grdf_exportExcel(grd_hardcodespecdetl, SheetName, SheetName);
- }
- function grd_hardcodespec_onenterdown(obj:Grid, e:GridEditEventInfo)
- {
- obj.showEditor(false);
- }
- function grd_hardcodespecdetl_onenterdown(obj:Grid, e:GridEditEventInfo)
- {
- obj.showEditor(false);
- }
- function grd_hardcodespecdetl_oncloseup(obj:Grid, e:GridEditEventInfo)
- {
- obj.showEditor(false);
- }
- function grp_limantibioapplist_grd_limantibioapplist_onenterdown(obj:Grid, e:GridEditEventInfo)
- {
- obj.showEditor(false);
- }
- function grp_limantibioapplist_grd_limantibioapplist_oncloseup(obj:Grid, e:GridEditEventInfo)
- {
- obj.showEditor(false);
- }
- ]]></Script>
- </Form>
- </FDL>
|