123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.4">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPMMO21800" position="absolute 0 0 974 556" titletext="향정신성의약품 30일 초과 처방 리스트" oninit="SPMMO21800_oninit" onload="SPMMO21800_onload">
- <Layouts>
- <Layout>
- <Button position="absolute 810 536 890 556" id="btn_save" class="btn4" text="계속저장" onclick="btn_save_onclick"/>
- <Static text="향정신성의약품 사유 입력" position="absolute 0 0 182 20" id="caption1" class="tit_2"/>
- <Static text="* 향정신성의약품 30일 초과 처방이 있습니다. 저장하시겠습니까 ?" position="absolute 421 536 804 556" id="caption2" style="color:red;"/>
- <Grid position="absolute 0 20 974 220" id="grd_prcperrlist" binddataset="ds_result_spclhdrugprcplist" oncellclick="grd_prcperrlist_oncellclick">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="0"/>
- <Column size="30"/>
- <Column size="30"/>
- <Column size="80"/>
- <Column size="205"/>
- <Column size="479"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell text="prcpno"/>
- <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 text="bind:prcpno"/>
- <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:status" expr="expr:(status == "Y" || status == 1) ? 1 : 0"/>
- <Cell col="2" text="bind:resncd"/>
- <Cell col="3" style="align:left middle;" text="bind:prcpcd"/>
- <Cell col="4" displaytype="normal" edittype="none" style="align:left middle;" text="bind:prcpnm"/>
- <Cell col="5" style="align:left middle;" text="bind:resncnt"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button position="absolute 894 536 974 556" id="button2" class="btn4" text="처방취소" onclick="button2_onclick"/>
- <Grid position="absolute 0 246 974 524" id="grd_resnlist" binddataset="ds_hardcd" oncellclick="grd_resnlist_oncellclick">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="0"/>
- <Column size="35"/>
- <Column size="486"/>
- <Column size="398"/>
- </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="상세사유"/>
- </Band>
- <Band id="body">
- <Cell displaytype="checkbox" edittype="checkbox" text="bind:status"/>
- <Cell col="1" text="bind:hardcd"/>
- <Cell col="2" style="align:left middle;" text="bind:hardcdnm"/>
- <Cell col="3" displaytype="text" edittype="text" text="bind:resncmt" editautoselect="true"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static text="사유선택" position="absolute 0 226 171 246" id="caption3" class="tit_2"/>
- <Shape position="absolute 3 243 985 249" linetype="vertical" id="line1" class="line_1"/>
- <Radio position="absolute 316 0 511 20" id="radio1" columncount="2" codecolumn="codecolumn" datacolumn="datacolumn" onitemchanged="radio1_onitemchanged">
- <Dataset id="innerdataset">
- <ColumnInfo>
- <Column id="codecolumn"/>
- <Column id="datacolumn"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="codecolumn">1</Col>
- <Col id="datacolumn">일괄사유입력</Col>
- </Row>
- <Row>
- <Col id="codecolumn">2</Col>
- <Col id="datacolumn">개별사유입력</Col>
- </Row>
- </Rows>
- </Dataset>
- </Radio>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_result_spclhdrugprcplist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_result_spclhdrugprcplist_oncolumnchanged">
- <ColumnInfo>
- <Column id="status" type="STRING" size="256"/>
- <Column id="resncd" type="STRING" size="256"/>
- <Column id="comcls" type="STRING" size="256"/>
- <Column id="prcpcd" type="STRING" size="256"/>
- <Column id="prcpnm" type="STRING" size="256"/>
- <Column id="dupdays" type="STRING" size="256"/>
- <Column id="duplprcpcd" type="STRING" size="256"/>
- <Column id="duplprcpnm" type="STRING" size="256"/>
- <Column id="duplprcpdd" type="STRING" size="256"/>
- <Column id="orddeptnm" type="STRING" size="256"/>
- <Column id="orddrnm" type="STRING" size="256"/>
- <Column id="rgstrnm" type="STRING" size="256"/>
- <Column id="resncnt" type="STRING" size="256"/>
- <Column id="prcpdd" type="STRING" size="256"/>
- <Column id="prcpno" 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="selcond1" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="selcond1">1</Col>
- </Row>
- </Rows>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="radio1" propid="value" datasetid="ds_init" columnid="selcond1"/>
- </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 SPMMO21800_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
-
- try {
- ds_result_spclhdrugprcplist.copyData(arg_ds_result_spclhdrugprcplist);
- } catch(e) {}
- }
- function SPMMO21800_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_setToolTipBind(grd_prcperrlist);
- grdf_setToolTipBind(grd_resnlist);
-
- for ( var i = 1; i < ds_result_spclhdrugprcplist.rowcount; i++ ) {
- ds_result_spclhdrugprcplist.setColumn(i, "status", "Y") ;
- }
- // 향정신성의약품 사유 조회
- ds_send.setColumn(0, "hardcd", "303");
-
- 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 ds_result_spclhdrugprcplist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- // 그리드안의 checkbox 값 변경 용도
- if(e.columnid == "status") {
- obj.setColumn(e.row, e.columnid, (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
-
- var currow = e.row;
- var status = obj.getColumn(e.row, "status");
-
- for ( var i = currow; i < obj.rowcount - 1; i++ ) {
- var j = i + 1;
- var currprcpno = obj.getColumn(i, "prcpno");
- var nextprcpno = obj.getColumn(j, "prcpno");
- if (currprcpno == nextprcpno) {
- obj.setColumn(j, "status", status);
- } else {
- break;
- }
- }
- }
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- var srchLength = ds_result_spclhdrugprcplist.rowcount;
- var srcNodeListMainLength = opener.ds_main_prcplist.rowcount;
-
- for ( var i = 0; i < srchLength; i++ ) {
- var resncd = ds_result_spclhdrugprcplist.getColumn(i, "resncd" );
- var prcpcd = ds_result_spclhdrugprcplist.getColumn(i, "prcpcd" );
- var resncnt = ds_result_spclhdrugprcplist.getColumn(i, "resncnt" );
-
- if ( resncd == "-" || utlf_isNull(resncd)) {
- sysf_messageBox ( "[" + prcpcd + "]"+ " 향정신성 의약품 처방 사유가", "I004" );
- return;
- } else if ( resncd == "03" && (utlf_isNull(resncnt) || resncnt == "기타 - " )) {
- sysf_messageBox ( "[" + prcpcd + "]"+ " 기타 사유가", "I004" );
- return;
- }
- }
- for ( var i = 0; i < srchLength; i++ ) {
- var saveresncnt = ds_result_spclhdrugprcplist.getColumn(i, "saveresncnt");
- var prcpno = ds_result_spclhdrugprcplist.getColumn(i, "prcpno");
- var resncd = ds_result_spclhdrugprcplist.getColumn(i, "esncd");
-
- for ( var j = 0; j < srcNodeListMainLength; j++ ) {
- if ( prcpno == opener.ds_result_savedrprcplist.getColumn(j, "prcpno")) {
- opener.ds_result_savedrprcplist.setColumn(j, "tempcol19", saveresncnt);
- }
- }
- }
- opener.frmf_setParameter ( "SPMMO21800_rtn1", "Y" );
- close();
- }
- function grd_prcperrlist_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- if(e.row < 0 || e.col < 0) return;
-
- var srchLength = ds_result_spclhdrugprcplist.rowcount;
- if ( e.col != obj.getBindCellIndex("body", "status")) {
- if ( ds_result_spclhdrugprcplist.getColumn(e.row, "status") == "Y" ) {
- ds_result_spclhdrugprcplist.setColumn(e.row, "status", "N");
- } else {
- ds_result_spclhdrugprcplist.setColumn(e.row, "status", "Y");
- }
- var status = ds_result_spclhdrugprcplist.getColumn(e.row, "status");
- var currprcpno = ds_result_spclhdrugprcplist.getColumn(e.row, "prcpno");
-
- for ( var i = 0; i < srchLength; i++ ) {
- var nextprcpno = ds_result_spclhdrugprcplist.getColumn(i, "prcpno");
- if (currprcpno == nextprcpno) {
- ds_result_spclhdrugprcplist.setColumn(i, "status", status);
- }
- }
- }
- }
- function button2_onclick(obj:Button, e:ClickEventInfo)
- {
- opener.frmf_setParameter ( "SPMMO21800_rtn1", "N" );
- close();
- }
- function grd_resnlist_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- if ( ds_hardcd.getColumn(e.row, "hardcd") == "03" ) {
- obj.setCellPos(obj.getBindCellIndex("body", "resncmt"));
- obj.showEditor(true);
- //fSelectResn();
- } else {
- fSelectResn();
- }
- }
- function ds_hardcd_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(grd_resnlist.getEditText() != undefined) {
- fSelectResn();
- }
- }
- function radio1_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
- {
- if ( obj.value == 1 ) {
- for ( var i = 0; i < ds_result_spclhdrugprcplist.rowcount; i++ ) {
- ds_result_spclhdrugprcplist.setColumn(i, "status", "Y");
- }
- } else {
- for ( var i = 0; i < ds_result_spclhdrugprcplist.rowcount; i++ ) {
- ds_result_spclhdrugprcplist.setColumn(i, "status", "N");
- }
- }
- }
- function fSelectResn() {
- var currow = ds_hardcd.rowposition;
- var srchLength = ds_result_spclhdrugprcplist.rowcount;
-
- for ( var i = 0; i < srchLength; i ++ ) {
- if ( ds_result_spclhdrugprcplist.getColumn(i, "status" ) == "Y" ) {
- ds_result_spclhdrugprcplist.setColumn(i, "resncd", ds_hardcd.getColumn(currow, "hardcd"));
-
- var resncnts = "instcd|pid|orddd|cretno|ordtype|orddeptcd|prcpdd|prcpno|prcphistno|resnflag|resncd|resncnts|payflagcd^" ;
- var pid = opener.ds_paminfo.getColumn(0, "pid");
- var prcpgenrflag = opener.ds_patflag.getColumn(0, "prcpgenrflag");
-
- var orddd = "";
- if ( prcpgenrflag == "O" ) {
- orddd = opener.ds_paminfo.getColumn(0, "orddd");
- } else {
- orddd = opener.ds_paminfo.getColumn(0, "indd");
- }
- var cretno = opener.ds_paminfo.getColumn(0, "cretno");
- var orddeptcd = opener.ds_paminfo.getColumn(0, "orddeptcd");
- var chkresncnts = '-'
- var chkresncd = ds_hardcd.getColumn(currow, "hardcd");
- var instcd = sysf_getUserInfo("dutplceinstcd") ;
-
- if (ds_hardcd.getColumn(currow, "hardcd" ) == "03") {
- resncnts = resncnts + instcd + "|" + pid + "|" + orddd + "|" + cretno + "|" + prcpgenrflag + "|" + orddeptcd + "|-|0|0|010|" + chkresncd + "|" + "기타 - " + ds_hardcd.getColumn(currow, "resncmt") + "^";
- ds_result_spclhdrugprcplist.setColumn(i, "resncnt", "기타 - " + ds_hardcd.getColumn(currow, "resncmt"));
- } else {
- resncnts = resncnts + instcd + "|" + pid + "|" + orddd + "|" + cretno + "|" + prcpgenrflag + "|" + orddeptcd + "|-|0|0|010|" + chkresncd + "|" + ds_hardcd.getColumn(currow, "hardcdnm") + "^";
- ds_result_spclhdrugprcplist.setColumn(i, "resncnt", ds_hardcd.getColumn(currow, "hardcdnm"));
- }
- ds_result_spclhdrugprcplist.setColumn(i, "saveresncnt", resncnts );
- }
- }
- }]]></Script>
- </Form>
- </FDL>
|