123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMMNR00400" position="absolute 0 0 1201 792" titletext="중증도 및 위험사정 기준점수 관리" oninit="SMMNR00400_oninit" onload="SMMNR00400_onload">
- <Layouts>
- <Layout>
- <Static id="caption6" text="중증도 및 위험사정 기준점수 관리" class="tit_1" position="absolute 0 0 270 25"/>
- <Div id="grp_sea" taborder="1" class="div_SA" position="absolute 0 25 1195 65">
- <Layouts>
- <Layout>
- <Combo id="cmb_clsflag1" taborder="16" codecolumn="codecolumn" datacolumn="datacolumn" class="combo_search" visible="false" position="absolute 451 11 601 30" onitemchanged="grp_sea_cmb_clsflag1_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">신생아 ICU</Col>
- </Row>
- <Row>
- <Col id="codecolumn">3</Col>
- <Col id="datacolumn">혈액투석</Col>
- </Row>
- <Row>
- <Col id="codecolumn">4</Col>
- <Col id="datacolumn">중환자실</Col>
- </Row>
- <Row>
- <Col id="codecolumn">5</Col>
- <Col id="datacolumn">정신과병동</Col>
- </Row>
- </Rows>
- </Dataset>
- </Combo>
- <Combo id="cmb_clsflag2" taborder="17" codecolumn="codecolumn" datacolumn="datacolumn" class="combo_search" visible="false" position="absolute 451 11 601 30" onitemchanged="grp_sea_cmb_clsflag2_onitemchanged">
- <Dataset id="innerdataset">
- <ColumnInfo>
- <Column id="codecolumn"/>
- <Column id="datacolumn"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="codecolumn">1</Col>
- <Col id="datacolumn">Humpty Dumpty Scale</Col>
- </Row>
- <Row>
- <Col id="codecolumn">2</Col>
- <Col id="datacolumn">Morse Scale</Col>
- </Row>
- </Rows>
- </Dataset>
- </Combo>
- <Static id="caption2" text="종 류 :" class="search_name" position="absolute 16 12 87 29"/>
- <Radio id="rdo_recflag" taborder="15" columncount="-1" rowcount="-1" codecolumn="codecolumn" datacolumn="datacolumn" class="radio_search" position="absolute 90 11 345 30" onitemchanged="grp_sea_rdo_recflag_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>
- <Row>
- <Col id="codecolumn">3</Col>
- <Col id="datacolumn">욕창 위험사정</Col>
- </Row>
- </Rows>
- </Dataset>
- </Radio>
- <Static id="caption3" text="분 류 :" class="search_name" position="absolute 376 13 448 30"/>
- <Static id="caption4" text="기 준 일 :" class="search_name" position="absolute 644 13 730 30"/>
- <Calendar id="input5" taborder="18" class="input_search" position="absolute 730 11 850 30" autoselect="true" autoskip="true" onchanged="grp_sea_input5_onchanged"/>
- <Shape id="line13" linetype="vertical" class="line_4" position="absolute 933 9 939 31" anchor="top right"/>
- <Button id="button1" taborder="19" text="조회" class="btn1" position="absolute 956 9 1012 31" anchor="top right" onclick="grp_sea_button1_onclick"/>
- <Button id="button2" taborder="20" text="1차분류추가" class="btn4" position="absolute 1015 9 1119 31" anchor="top right" onclick="grp_sea_button2_onclick"/>
- <Button id="button10" taborder="21" text="저장" class="btn4" position="absolute 1122 9 1178 31" anchor="top right" onclick="grp_sea_button10_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- <Grid id="grd_detlgrup" taborder="2" binddataset="ds_main_detlgrup_detlgruplist" useinputpanel="false" position="absolute 0 76 1195 784" autoenter="select" autofittype="col" cellsizingtype="col" anchor="all">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="24"/>
- <Column size="171"/>
- <Column size="200"/>
- <Column size="200"/>
- <Column size="200"/>
- <Column size="200"/>
- <Column size="200"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- </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="종료점수"/>
- <Cell col="5" text="시작일자"/>
- <Cell col="6" text="종료일자"/>
- <Cell col="7" text="stat"/>
- <Cell col="8" text="clsflag"/>
- <Cell col="9" text="recflag"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" displaytype="text" edittype="normal" style="align:center middle;" text="bind:bspntcd"/>
- <Cell col="2" displaytype="text" edittype="normal" style="align:center middle;" text="bind:bspntnm"/>
- <Cell col="3" displaytype="text" edittype="text" style="align:center middle;" text="bind:frompnt" editlimit="3"/>
- <Cell col="4" displaytype="text" edittype="text" style="align:center middle;" text="bind:topnt" editlimit="3"/>
- <Cell col="5" displaytype="date" edittype="date" style="align:center middle;" text="bind:fromdd" calendardisplaynulltype="nulltext"/>
- <Cell col="6" displaytype="date" edittype="date" style="align:center middle;" text="bind:todd" calendardisplaynulltype="nulltext"/>
- <Cell col="7" displaytype="combo" edittype="combo" text="bind:stat"/>
- <Cell col="8" displaytype="text" edittype="text" text="bind:clsflag"/>
- <Cell col="9" text="bind:recflag"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_main_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="recflag" type="STRING" size="256"/>
- <Column id="clsflag" type="STRING" size="256"/>
- <Column id="fromdd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="recflag">1</Col>
- <Col id="clsflag"/>
- <Col id="fromdd"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_detlgrup_detlgruplist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_detlgrup_detlgruplist_oncolumnchanged">
- <ColumnInfo>
- <Column id="stat" type="STRING" size="256" sumtext="그리드상태"/>
- <Column id="clsflag" type="STRING" size="256" sumtext="분류구분"/>
- <Column id="recflag" type="STRING" size="256" sumtext="기록구분"/>
- <Column id="fromdd" type="STRING" size="256" sumtext="시작일자"/>
- <Column id="todd" type="STRING" size="256" sumtext="종료일자"/>
- <Column id="bspntcd" type="STRING" size="256" sumtext="분류군코드"/>
- <Column id="bspntnm" type="STRING" size="256" sumtext="분류군명"/>
- <Column id="frompnt" type="STRING" size="256" sumtext="시작점수"/>
- <Column id="topnt" type="STRING" size="256" sumtext="종료점수"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send_detlgrup" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_sea.rdo_recflag" propid="value" datasetid="ds_main_cond" columnid="recflag"/>
- <BindItem id="item1" compid="grp_sea.cmb_clsflag2" propid="value" datasetid="ds_main_cond" columnid="clsflag"/>
- <BindItem id="item2" compid="grp_sea.input5" propid="value" datasetid="ds_main_cond" columnid="fromdd"/>
- <BindItem id="item3" compid="grp_sea.cmb_clsflag1" propid="value" datasetid="ds_main_cond" columnid="clsflag"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2015-11-13
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2015-11-13 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs";
- include "emr_carerecxp::SerDiag.xjs";
- function SMMNR00400_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMMNR00400_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(grd_detlgrup);
- grdf_setRowTypeIcon(grd_detlgrup, 0);
-
- grp_sea.rdo_recflag.value="1";
- fShowSearchCombo(grp_sea.rdo_recflag.value, 'grp_sea.caption3', 'grp_sea.cmb_clsflag1', 'grp_sea.cmb_clsflag2');
- fSearch();
- }
- function fSearch()
- {
- var fromdd = ds_main_cond.getColumn(0, "fromdd");
- var clsflag = ds_main_cond.getColumn(0, "clsflag");
- var recflag = ds_main_cond.getColumn(0, "recflag");
-
- if(utlf_isNull(fromdd) || fromdd == '')
- {
- fromdd = utlf_getCurrentDate();
- }
- if(utlf_isNull(clsflag) || clsflag == '')
- {
- clsflag = '1';
- }
- if(utlf_isNull(recflag) || recflag == '')
- {
- recflag = '1';
- }
-
- if(recflag == '2')
- {
- if(clsflag != '1' && clsflag != '2')
- {
- clsflag = '1';
- }
- }
- else if(recflag == '3')
- {
- clsflag = '1';
- }
-
- dsf_makeValue(ds_main_cond, "clsflag", "string", clsflag);
- dsf_makeValue(ds_main_cond, "recflag", "string", recflag);
- dsf_makeValue(ds_main_cond, "fromdd", "string", fromdd);
-
- var oParam = {};
- oParam.id = "TRMNR00404";
- oParam.service = "carerecapp.AsesRec";
- oParam.method = "reqGetDetailGrupList";
- oParam.inds = "refCond=ds_main_cond";
- oParam.outds = "ds_main_detlgrup_detlgruplist=detlgruplist";
- oParam.async = false;
- //oParam.callback = "cf_TRMNR00404";
- tranf_submit(oParam);
- }
- function grp_sea_rdo_recflag_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
- {
- fShowSearchCombo(obj.value, 'grp_sea.caption3', 'grp_sea.cmb_clsflag1', 'grp_sea.cmb_clsflag2');
- fSearch();
- }
- function grp_sea_cmb_clsflag2_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- fSearch();
- }
- function grp_sea_cmb_clsflag1_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- fSearch();
- }
- function grp_sea_input5_onchanged(obj:Calendar, e:ChangeEventInfo)
- {
- fSearch();
- }
- function grp_sea_button1_onclick(obj:Button, e:ClickEventInfo)
- {
- fSearch();
- }
- function grp_sea_button2_onclick(obj:Button, e:ClickEventInfo)
- {
- fAddRow();
- }
- function fAddRow()
- {
- var rowCnt = ds_main_detlgrup_detlgruplist.rowcount;
- var topnt = ds_main_detlgrup_detlgruplist.getColumn(parseInt(rowCnt -1), "topnt");
- var fromdd = utlf_getCurrentDate();
- var todd = '99991231';
- var clsflag = ds_main_detlgrup_detlgruplist.getColumn(parseInt(rowCnt -1), "clsflag");
- var recflag = ds_main_detlgrup_detlgruplist.getColumn(parseInt(rowCnt -1), "recflag");
-
- rowCnt = ds_main_detlgrup_detlgruplist.addRow();
-
- if(rowCnt > 0)
- {
- ds_main_detlgrup_detlgruplist.setColumn(rowCnt, "frompnt", Number(topnt)+1);
- ds_main_detlgrup_detlgruplist.setColumn(rowCnt, "fromdd", fromdd);
- ds_main_detlgrup_detlgruplist.setColumn(rowCnt, "todd", todd);
- ds_main_detlgrup_detlgruplist.setColumn(rowCnt, "clsflag", clsflag);
- ds_main_detlgrup_detlgruplist.setColumn(rowCnt, "recflag", recflag);
- ds_main_detlgrup_detlgruplist.setColumn(rowCnt, "stat", "i");
- }
- else
- {
- ds_main_detlgrup_detlgruplist.setColumn(rowCnt, "clsflag", ds_main_cond.getColumn(0, "clsflag"));
- ds_main_detlgrup_detlgruplist.setColumn(rowCnt, "recflag", ds_main_cond.getColumn(0, "recflag"));
- ds_main_detlgrup_detlgruplist.setColumn(rowCnt, "stat", "i");
- }
- }
- function grp_sea_button10_onclick(obj:Button, e:ClickEventInfo)
- {
- fSave();
- }
- function fIsValid()
- {
- if(ds_main_detlgrup_detlgruplist.rowcount == 0)
- {
- return false;
- }
-
- var bspntcd, bspntnm, frompnt, topnt, fromdd, todd;
- var _bspntcd, _fromdd, _frompnt, _topnt;
- var endCd, edcdStr;
- for(var i = 0; i < ds_main_detlgrup_detlgruplist.rowcount; i++)
- {
- bspntcd = ds_main_detlgrup_detlgruplist.getColumn(i, "bspntcd");
- bspntnm = ds_main_detlgrup_detlgruplist.getColumn(i, "bspntnm");
- frompnt = ds_main_detlgrup_detlgruplist.getColumn(i, "frompnt");
- topnt = ds_main_detlgrup_detlgruplist.getColumn(i, "topnt");
- fromdd = parseInt(ds_main_detlgrup_detlgruplist.getColumn(i, "fromdd"));
- todd = parseInt(ds_main_detlgrup_detlgruplist.getColumn(i, "todd"));
-
- if(utlf_isNull(bspntcd))
- {
- sysf_messageBox(parseInt(i+1) + "번째 분류군의 분류군코드를","C001");
- return false;
- }
- if(utlf_isNull(bspntnm))
- {
- sysf_messageBox(parseInt(i+1) + "번째 분류군의 분류군명을","C001");
- return false;
- }
- if(utlf_isNull(frompnt))
- {
- sysf_messageBox(parseInt(i+1) + "번째 분류군의 시작점수를","C001");
- return false;
- }
- if(utlf_isNull(topnt))
- {
- sysf_messageBox(parseInt(i +1)+ "번째 분류군의 종료점수를","C001");
- return false;
- }
-
- for(var j = (i+1); j < ds_main_detlgrup_detlgruplist.rowcount; j++)
- {
- _bspntcd = ds_main_detlgrup_detlgruplist.getColumn(j, "bspntcd");
- _fromdd = parseInt(ds_main_detlgrup_detlgruplist.getColumn(j, "fromdd"));
- _frompnt = parseInt(ds_main_detlgrup_detlgruplist.getColumn(j, "frompnt"));
- _topnt = parseInt(ds_main_detlgrup_detlgruplist.getColumn(j, "topnt"));
-
- if(bspntcd == _bspntcd && fromdd == _fromdd)
- {
- sysf_messageBox(parseInt(i+1) + '번째와 ' + parseInt(j +1)+ '번째의 분류군코드와 시작일자가 중복입력 되었습니다. 분류코드나 시작일자를 다시',"C001");
- return false;
- }
- if(frompnt >= _frompnt && frompnt <= _topnt && todd == '99991231')
- {
- edcdStr = '입력하신 ' + parseInt(j+1) + '번째의 시작점수(' + _frompnt + ')는 ' + parseInt(i+1) + '번째의 점수(' + frompnt + '~' + topnt + ')에 포함됩니다. ';
- edcdStr += parseInt(i+1) + '번째의 종료일자를 ' + parseInt(j+1) + '번째의 시작일자 이전일로 변경';
- endCd = sysf_messageBox(edcdStr, 'Q002');
-
- if(endCd == 6)
- {
- //ds_main_detlgrup_detlgruplist.updatecontrol = false;
- ds_main_detlgrup_detlgruplist.setColumn(i, "todd", ds_main_detlgrup_detlgruplist.getColumn(j, "fromdd").toDate().getAddDate(-1, "D").getDateFormat());
- ds_main_detlgrup_detlgruplist.setColumn(i, "stat", "u");
- //ds_main_detlgrup_detlgruplist.updatecontrol = true;
- }
- else if(endCd == 7)
- {
- return false;
- }
- }
-
- }
- if(fromdd > todd)
- {
- sysf_messageBox(parseInt(i+1) + "번째 분류군의 시작일자가 종료일자보다 클 수","I004");
- return false;
- }
- }
-
- return true;
- }
- function fSave()
- {
- if(fIsValid())
- {
- var update = grdf_getGridUpdateData(grd_detlgrup, "all")
- ds_send_detlgrup.copyData(update);
- var oParam = {};
- oParam.id = "TXMNR00402";
- oParam.service = "carerecapp.AsesRec";
- oParam.method = "reqExeDetailGrupInfo";
- oParam.inds = "detlgrup=ds_send_detlgrup";
- oParam.outds = "";
- oParam.async = false;
- oParam.callback = "cf_TXMNR00402";
- tranf_submit(oParam);
- }
- }
- function cf_TXMNR00402(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0) return;
- else
- {
- fSearch();
- }
- }
- function ds_main_detlgrup_detlgruplist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(ds_main_detlgrup_detlgruplist.getColumn(ds_main_detlgrup_detlgruplist.rowposition, "stat") != "i")
- ds_main_detlgrup_detlgruplist.setColumn(ds_main_detlgrup_detlgruplist.rowposition, "stat", "u");
- }
- ]]></Script>
- </Form>
- </FDL>
|