123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPMMO50100" position="absolute 0 0 843 532" titletext="처방사유 입력" oninit="SPMMO50100_oninit" onload="SPMMO50100_onload">
- <Layouts>
- <Layout>
- <Static text="처방 사유 입력" position="absolute 0 0 118 20" id="caption1" class="tit_2"/>
- <Button position="absolute 638 512 718 532" id="button3" class="btn4" text="계속저장" onclick="button3_onclick"/>
- <Button position="absolute 727 512 843 532" id="btn_cncl" class="btn3" text="처방변경(닫기)" onclick="btn_cncl_onclick"/>
- <Static text="아래의 처방은 사유를 선택 또는 입력 하셔야 발행이 가능 합니다. 처방을 선택하면 구분에 맞는 사유가 조회 됩니다." position="absolute 130 0 837 20" id="caption4"/>
- <Grid id="grd_prcpresnlist" taborder="1" binddataset="ds_result_checkprcpresn" useinputpanel="false" position="absolute 0 21 843 291" oncellclick="grd_prcpresnlist_oncellclick" autofittype="col">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="137"/>
- <Column size="70"/>
- <Column size="136"/>
- <Column size="339"/>
- <Column size="30"/>
- <Column size="111"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell text="구분"/>
- <Cell col="1" text="처방코드"/>
- <Cell col="2" text="처방명"/>
- <Cell col="3" text="내용"/>
- <Cell col="4" text="코드"/>
- <Cell col="5" text="상세사유"/>
- </Band>
- <Band id="body">
- <Cell displaytype="combo" edittype="combo" text="bind:resnflag" combodataset="ds_resnflag" combocodecol="value" combodatacol="label"/>
- <Cell col="1" style="align:left middle;" text="bind:prcpcd"/>
- <Cell col="2" style="align:left middle;" text="bind:prcpnm" wordwrap="word"/>
- <Cell col="3" style="align:left middle;" text="bind:resndesc" wordwrap="word"/>
- <Cell col="4" text="bind:resncd"/>
- <Cell col="5" style="align:left middle;" text="bind:resncnts" wordwrap="word"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static id="caption6" text="사유선택" class="tit_2" position="absolute 0 300 171 320"/>
- <Grid id="grd_resnlist" taborder="2" binddataset="ds_hardcd" useinputpanel="false" position="absolute 0 321 843 507" oncellclick="grd_resnlist_oncellclick" oncelldblclick="grd_resnlist_oncelldblclick" autofittype="col">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="35"/>
- <Column size="787"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell text="코드"/>
- <Cell col="1" text="상세사유"/>
- </Band>
- <Band id="body">
- <Cell text="bind:hardcd"/>
- <Cell col="1" displaytype="text" edittype="text" text="bind:hardcdnm" wordwrap="word" enable="true"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button id="button1" taborder="3" text="사유적용" class="btn2" position="absolute 779 298 843 317" onclick="button1_onclick"/>
- <CheckBox id="bool_cond1" taborder="4" position="absolute 700 298 770 318" text="일괄적용" falsevalue="N" truevalue="Y"/>
- <Static id="caption7" text="아래의 항목에서 사유를 선택 하세요. 일괄적용 체크 되면 사유구분이 같은 항목에 대해 한번에 적용 됩니다." position="absolute 85 298 695 318"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_resnflag" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="label" type="STRING" size="256"/>
- <Column id="value" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="label">사유</Col>
- <Col id="value"/>
- </Row>
- <Row>
- <Col id="label">처방전내병용금기</Col>
- <Col id="value">00</Col>
- </Row>
- <Row>
- <Col id="label">처방전내연령금기</Col>
- <Col id="value">01</Col>
- </Row>
- <Row>
- <Col id="label">처방전내안전성</Col>
- <Col id="value">02</Col>
- </Row>
- <Row>
- <Col id="label">처방전내최대용량</Col>
- <Col id="value">03</Col>
- </Row>
- <Row>
- <Col id="label">처방전내최대기간</Col>
- <Col id="value">04</Col>
- </Row>
- <Row>
- <Col id="label">처방전내저함량</Col>
- <Col id="value">05</Col>
- </Row>
- <Row>
- <Col id="label">처방전내임부금기</Col>
- <Col id="value">06</Col>
- </Row>
- <Row>
- <Col id="label">처방전간 병용금기</Col>
- <Col id="value">07</Col>
- </Row>
- <Row>
- <Col id="label">처방전간 성분별 중복처방</Col>
- <Col id="value">08</Col>
- </Row>
- <Row>
- <Col id="label">처방전내 치료중복</Col>
- <Col id="value">20</Col>
- </Row>
- <Row>
- <Col id="label">처방전간 치료중복</Col>
- <Col id="value">40</Col>
- </Row>
- <Row>
- <Col id="label">처방전내 2주 병용금기</Col>
- <Col id="value">21</Col>
- </Row>
- <Row>
- <Col id="label">처방전간 2주 병용금기</Col>
- <Col id="value">41</Col>
- </Row>
- <Row>
- <Col id="label">처방전내 1성분병용기간금기</Col>
- <Col id="value">22</Col>
- </Row>
- <Row>
- <Col id="label">처방전간 1성분병용기간금기</Col>
- <Col id="value">42</Col>
- </Row>
- <Row>
- <Col id="label">처방전내 병용연령성별제한</Col>
- <Col id="value">23</Col>
- </Row>
- <Row>
- <Col id="label">처방전간 병용연령성별제한</Col>
- <Col id="value">43</Col>
- </Row>
- <Row>
- <Col id="label">시럽제 처방</Col>
- <Col id="value">007</Col>
- </Row>
- <Row>
- <Col id="label">ADR(약물유해반응) 처방</Col>
- <Col id="value">008</Col>
- </Row>
- <Row>
- <Col id="label">수술예방적 항생제</Col>
- <Col id="value">011</Col>
- </Row>
- <Row>
- <Col id="label">수술예방적 항생제</Col>
- <Col id="value">012</Col>
- </Row>
- <Row>
- <Col id="label">약제 및 진료재료 적정성 심의</Col>
- <Col id="value">013</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_result_checkprcpresn" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_result_checkprcpresn_oncolumnchanged">
- <ColumnInfo>
- <Column id="resndd" type="STRING" size="256"/>
- <Column id="pid" type="STRING" size="256"/>
- <Column id="orddd" type="STRING" size="256"/>
- <Column id="cretno" type="STRING" size="256"/>
- <Column id="orddeptcd" type="STRING" size="256"/>
- <Column id="ordtype" type="STRING" size="256"/>
- <Column id="prcpdd" type="STRING" size="256"/>
- <Column id="prcpno" type="STRING" size="256"/>
- <Column id="prcphistno" type="STRING" size="256"/>
- <Column id="resnflag" type="STRING" size="256"/>
- <Column id="prcpcd" type="STRING" size="256"/>
- <Column id="prcpnm" type="STRING" size="256"/>
- <Column id="resndesc" type="STRING" size="256"/>
- <Column id="delflag" type="STRING" size="256"/>
- <Column id="resncd" type="STRING" size="256"/>
- <Column id="resncnts" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="hardcd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_hardcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_hardcd_oncolumnchanged">
- <ColumnInfo>
- <Column id="status" type="STRING" size="256" sumtext="상태값"/>
- <Column id="hardcd" type="STRING" size="256" sumtext="하드코드"/>
- <Column id="hardcdnm" type="STRING" size="256" sumtext="하드코드명"/>
- <Column id="resncmt" type="STRING" size="256" sumtext="상세사유"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cond1" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="cond1">Y</Col>
- </Row>
- </Rows>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="bool_cond1" propid="value" datasetid="ds_init" columnid="cond1"/>
- </Bind>
- <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";
- function SPMMO50100_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
-
- try {
- ds_result_checkprcpresn.copyData(arg_ds_result_checkprcpresn);
- } catch(e) {}
- }
- function SPMMO50100_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_setToolTipBind(grd_prcpresnlist);
- grdf_setToolTipBind(grd_resnlist);
- }
- function ds_result_checkprcpresn_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if ( e.columnid == "delflag" ) {
- var currow = e.row;
- obj.setColumn(currow, "resncd", "") ;
- obj.setColumn(currow, "resncnts", "") ;
- }
- }
- function grd_prcpresnlist_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- if ( e.col == obj.getBindCellIndex("body", "delflag") ) {
- return;
- }
-
- var resnFlag = ds_result_checkprcpresn.getColumn(e.row, "resnflag");
- if( resnFlag == "007") { //12세 이상 시럽제 처방 사유
- ds_send.setColumn(0, "hardcd", "320" );
- } else if ( resnFlag == "008") { //ADR(약품유해반응) 처방 사유
- ds_send.setColumn(0, "hardcd", "329" );
- } else if ( resnFlag == "011") { //수술예방적 항생제 처방사유(재원)
- ds_send.setColumn(0, "hardcd", "330" );
- } else if ( resnFlag == "012") { //수술예방적 항생제 처방사유(퇴원)
- ds_send.setColumn(0, "hardcd", "331" );
- }else if ( resnFlag == "013") { //약제 및 진료재료 적정성 심의(칠곡)
- ds_send.setColumn(0, "hardcd", "5609" );
- }else {
- alert("관련된 사유 정보가 존재 하지 않습니다.\n전산실(6598)로 문의 하세요.");
- return;
- }
-
- var oParam = {};
- oParam.id = "TRMMB16401";
- oParam.service = "prcpbaseapp.EnvInfoMngt";
- oParam.method = "reqGetHardCodeCD";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_hardcd=hardcd";
- oParam.async = true;
- oParam.callback = "cf_TRMMB16401";
- tranf_submit(oParam);
- }
- function cf_TRMMB16401(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
-
- dsf_setDefaultVal(ds_hardcd, "status:N");
- }
- function grd_resnlist_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- var col = grd_resnlist.getBindCellIndex("body", "hardcdnm");
-
- if(e.col == col) {
- var currow = e.row;
- if ( ds_hardcd.getColumn(currow, "hardcdnm") == "(이곳에 사유입력을 하세요)"
- || ds_hardcd.getColumn(currow, "hardcdnm") == "기타사유 (직접입력)" ) {
-
- grd_resnlist.setCellPos(col);
- grd_resnlist.setCellProperty("body", col, "edittype", "text");
- grd_resnlist.showEditor(true);
- } else {
- grd_resnlist.setCellProperty("body", col, "edittype", "none");
- }
- }
- }
- function ds_hardcd_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(grd_resnlist.getEditText() != undefined) {
- var currow = e.row;
- if ( obj.getColumn(currow, "hardcdnm") != "(이곳에 사유입력을 하세요)"
- && obj.getColumn(currow, "hardcdnm") != "기타사유 (직접입력)" ) {
- fSelectResn();
- }
- }
- }
- function grd_resnlist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
- {
- if(e.row < 0 || e.col < 0) return;
-
- fSelectResn();
- }
- function button1_onclick(obj:Button, e:ClickEventInfo)
- {
- if(ds_hardcd.rowcount != -1) {
- fSelectResn();
- }else{
- sysf_messageBox ( "선택된 사유가 없습니다." , "I" );
- }
- }
- function button3_onclick(obj:Button, e:ClickEventInfo)
- {
- var checkLength = ds_result_checkprcpresn.rowcount;
- var resnCnt = 0;
-
- if ( checkLength > 0 ) {
- for ( var i = 0; i < checkLength; i++ ) {
- if ( utlf_isNull(ds_result_checkprcpresn.getColumn(i, "resncd")) || utlf_isNull(ds_result_checkprcpresn.getColumn(i, "resncnts")) ) {
- resnCnt++;
- }
- }
- if (resnCnt > 0) {
- sysf_messageBox ( "처방사유 선택되지 않은 처방이", "I010" );
- return;
- }
-
- // 사유 정보 셋팅.
- for (var i = 0; i < checkLength; i++) {
- var row = opener.ds_result_savesujinresn.addRow();
- opener.ds_result_savesujinresn.setColumn(row, "resndd" , ds_result_checkprcpresn.getColumn(i, "resndd"));
- opener.ds_result_savesujinresn.setColumn(row, "pid" , ds_result_checkprcpresn.getColumn(i, "pid"));
- opener.ds_result_savesujinresn.setColumn(row, "orddd" , ds_result_checkprcpresn.getColumn(i, "orddd"));
- opener.ds_result_savesujinresn.setColumn(row, "cretno" , ds_result_checkprcpresn.getColumn(i, "cretno"));
- opener.ds_result_savesujinresn.setColumn(row, "orddeptcd" , ds_result_checkprcpresn.getColumn(i, "orddeptcd"));
- opener.ds_result_savesujinresn.setColumn(row, "ordtype" , ds_result_checkprcpresn.getColumn(i, "ordtype"));
- opener.ds_result_savesujinresn.setColumn(row, "prcpdd" , ds_result_checkprcpresn.getColumn(i, "prcpdd"));
- opener.ds_result_savesujinresn.setColumn(row, "prcpno" , ds_result_checkprcpresn.getColumn(i, "prcpno"));
- opener.ds_result_savesujinresn.setColumn(row, "prcphistno" , ds_result_checkprcpresn.getColumn(i, "prcphistno"));
- opener.ds_result_savesujinresn.setColumn(row, "resnflag" , ds_result_checkprcpresn.getColumn(i, "resnflag"));
- opener.ds_result_savesujinresn.setColumn(row, "resncd" , ds_result_checkprcpresn.getColumn(i, "resncd"));
- opener.ds_result_savesujinresn.setColumn(row, "resncnts" , ds_result_checkprcpresn.getColumn(i, "resncnts"));
- }
-
- opener.frmf_setParameter ( "SPMMO50100_rtn1", "Y" );
- }
-
- close();
- }
- function btn_cncl_onclick(obj:Button, e:ClickEventInfo)
- {
- opener.frmf_setParameter ( "SPMMO50100_rtn1", "N" );
- close();
- }
- function fSelectResn() {
- var resnRow = ds_hardcd.rowposition;
- var prcpRow = ds_result_checkprcpresn.rowposition;
-
- if (resnRow != -1 && prcpRow != -1) {
- var resncd = ds_hardcd.getColumn(resnRow, "hardcd") // 선택된 사유 코드
- var resncnts = ds_hardcd.getColumn(resnRow, "hardcdnm") // 선택된 사유 상세
- if(resncnts == "(이곳에 사유입력을 하세요)" || resncnts == "기타사유 (직접입력)") {
- var col = grd_resnlist.getBindCellIndex("body", "hardcdnm");
- grd_resnlist.setCellPos(col);
- grd_resnlist.setCellProperty("body", col, "edittype", "text");
- grd_resnlist.showEditor(true);
- } else {
- if(ds_init.getColumn(0, "cond1") == "Y") { // 일괄 적용이면
- var checkLength = ds_result_checkprcpresn.rowcount;
- var selectResnFlag = ds_result_checkprcpresn.getColumn(prcpRow, "resnflag"); // 처방사유구분
- var checkResnFlag = "";
-
- for ( var i = 0; i <checkLength; i++ ) {
- checkResnFlag = ds_result_checkprcpresn.getColumn(i, "resnflag" );
- if(selectResnFlag == checkResnFlag) {
- ds_result_checkprcpresn.setColumn(i, "resncd", resncd);
- ds_result_checkprcpresn.setColumn(i, "resncnts", resncnts);
- }
- }
- } else {
- ds_result_checkprcpresn.setColumn(prcpRow, "resncd", resncd);
- ds_result_checkprcpresn.setColumn(prcpRow, "resncnts", resncnts);
- }
- }
- }
- }]]></Script>
- </Form>
- </FDL>
|