1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMMMR03100" position="absolute 0 0 1178 750" titletext="APACHE II 기간조회" oninit="SMMMR03100_oninit" onload="SMMMR03100_onload">
- <Layouts>
- <Layout>
- <Shape position="absolute 477 100 1117 124" id="roundrect2" type="roundrectangle" text="* A : APACHE|| score (점) D : Predicted death rate (%) D(Adjusted) : Predicted death rate (%)"/>
- <Grid position="absolute 0 128 1178 750" align="align:center middle;" id="grd_apachelist" binddataset="ds_grd_apachelist" autoenter="select" cellsizingtype="both" onexpanddown="grd_apachelist_onexpanddown" oncellclick="grd_apachelist_oncellclick">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="20" band="left"/>
- <Column size="70" band="left"/>
- <Column size="100" band="left"/>
- <Column size="50" band="left"/>
- <Column size="0" band="left"/>
- <Column size="0" band="left"/>
- <Column size="0" band="left"/>
- <Column size="120" band="left"/>
- <Column size="70" band="left"/>
- <Column size="70" band="left"/>
- <Column size="0" band="left"/>
- <Column size="50" band="left"/>
- <Column size="45" band="left"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell rowspan="2" celltype="none"/>
- <Cell col="1" rowspan="2" text="환자번호"/>
- <Cell col="2" rowspan="2" text="성명"/>
- <Cell col="3" rowspan="2" text="S/A"/>
- <Cell col="4" rowspan="2" text="AGE"/>
- <Cell col="5" rowspan="2" text="입원일자"/>
- <Cell col="6" rowspan="2" text="원무번호"/>
- <Cell col="7" rowspan="2" text="진료과"/>
- <Cell col="8" rowspan="2" text="입실일자"/>
- <Cell col="9" rowspan="2" text="퇴실일자"/>
- <Cell col="10" rowspan="2" text="퇴실일자2"/>
- <Cell col="11" rowspan="2" text="ICU재원 기간"/>
- <Cell col="12" rowspan="2" text="그래프 보기"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" text="expr:currow + 1"/>
- <Cell col="1" celltype="head" text="bind:pid"/>
- <Cell col="2" celltype="head" text="bind:hngnm"/>
- <Cell col="3" celltype="head" text="bind:sexage"/>
- <Cell col="4" celltype="head" text="bind:age"/>
- <Cell col="5" celltype="head" text="bind:orddd"/>
- <Cell col="6" celltype="head" text="bind:cretno"/>
- <Cell col="7" celltype="head" text="bind:depthngnm"/>
- <Cell col="8" celltype="head" text="bind:fromdd"/>
- <Cell col="9" celltype="head" text="bind:todd"/>
- <Cell col="10" celltype="head" text="bind:todd2"/>
- <Cell col="11" celltype="head" text="bind:ining"/>
- <Cell col="12" celltype="head" text="bind:graph"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Div position="absolute 0 24 1178 89" id="roundrect1" type="roundrectangle" class="div_SA">
- <Layouts>
- <Layout>
- <Static id="caption2" text="조회기준" class="search_name" position="absolute 12 9 92 26" anchor="default"/>
- <Calendar id="ipt_reqstnddd" taborder="1" class="input_essential" position="absolute 97 9 192 28" mask="yyyy-mm-dd" anchor="default" onchanged="roundrect1_ipt_reqstnddd_onchanged"/>
- <Static id="caption1" text="~" position="absolute 197 11 212 26" anchor="default"/>
- <Calendar id="ipt_reqenddd" taborder="2" class="input_essential" position="absolute 212 9 307 28" mask="yyyy-mm-dd" anchor="default" onchanged="roundrect1_ipt_reqenddd_onchanged"/>
- <Combo id="cmb_term" taborder="3" codecolumn="codecolumn" datacolumn="datacolumn" class="combo_search" position="absolute 312 9 372 28" anchor="default" onitemchanged="roundrect1_cmb_term_onitemchanged">
- <Dataset id="innerdataset">
- <ColumnInfo>
- <Column id="codecolumn"/>
- <Column id="datacolumn"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="codecolumn">0</Col>
- <Col id="datacolumn"/>
- </Row>
- <Row>
- <Col id="codecolumn">90</Col>
- <Col id="datacolumn">3개월</Col>
- </Row>
- <Row>
- <Col id="codecolumn">180</Col>
- <Col id="datacolumn">6개월</Col>
- </Row>
- <Row>
- <Col id="codecolumn">270</Col>
- <Col id="datacolumn">9개월</Col>
- </Row>
- <Row>
- <Col id="codecolumn">365</Col>
- <Col id="datacolumn">1년</Col>
- </Row>
- <Row>
- <Col id="codecolumn">730</Col>
- <Col id="datacolumn">2년</Col>
- </Row>
- </Rows>
- </Dataset>
- </Combo>
- <Radio id="rdo_status" taborder="4" columncount="3" rowcount="1" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 377 11 587 27" anchor="default">
- <Dataset id="innerdataset">
- <ColumnInfo>
- <Column id="codecolumn"/>
- <Column id="datacolumn"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="codecolumn">0</Col>
- <Col id="datacolumn">재원중</Col>
- </Row>
- <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>
- <Static id="caption29" text="중환자실" class="search_name" position="absolute 602 11 687 28" anchor="default"/>
- <Combo id="cmb_icu" taborder="5" innerdataset="ds_init_cmb_icu" codecolumn="deptcd" datacolumn="deptnm" class="combo_search" position="absolute 687 11 817 30" anchor="default" onitemchanged="roundrect1_cmb_icu_onitemchanged"/>
- <Static id="caption3" text="진 료 과" class="search_name" position="absolute 827 11 912 28" anchor="default"/>
- <Combo id="cmb_orddeptcd" taborder="6" innerdataset="ds_init_cmb_orddeptcd" codecolumn="deptcd" datacolumn="depthngnm" class="combo_search" position="absolute 902 11 1032 30" anchor="default" onitemchanged="roundrect1_cmb_orddeptcd_onitemchanged"/>
- <Shape id="line13" linetype="vertical" class="line_4" position="absolute 1064 9 1070 59" anchor="default"/>
- <Button id="btn_srchall" taborder="7" text="조회" class="btn1" position="absolute 1097 24 1153 46" anchor="default" onclick="roundrect1_btn_srchall_onclick"/>
- <CheckBox id="opt_scoredown" taborder="8" position="absolute 377 41 552 56" anchor="default" text="APACHE Score 21 ~ 25점" truevalue="Y" falsevalue="false"/>
- <CheckBox id="opt_scoreup" taborder="9" position="absolute 582 41 762 56" anchor="default" text="APACHE Score 26점 이상" truevalue="Y" falsevalue="false"/>
- <CheckBox id="opt_scorechk" taborder="10" position="absolute 167 41 357 56" anchor="default" text="APACHE Score 20점 이하" truevalue="Y" falsevalue="false"/>
- <CheckBox id="opt_outchk" taborder="11" position="absolute 32 41 132 56" anchor="default" text="퇴실환자 포함" truevalue="Y" falsevalue="false"/>
- </Layout>
- </Layouts>
- </Div>
- <Static text="APACHE II" position="absolute 0 0 106 25" id="caption6" class="tit_1"/>
- <Shape position="absolute 0 124 1178 130" linetype="horizontal" id="line12" class="line_1"/>
- <Static text="환자리스트" position="absolute 0 105 95 122" id="caption17" class="tit_2"/>
- <Button position="absolute 1127 103 1178 122" id="btn_excel" class="btn7" text="엑셀" onclick="btn_excel_onclick"/>
- <Grid position="absolute 70 370 975 600" id="datagrid2" visible="false" binddataset="ds_datagrid2">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="60"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell text="환자번호"/>
- <Cell col="1" text="성명"/>
- <Cell col="2" text="S/A"/>
- <Cell col="3" text="AGE"/>
- <Cell col="4" text="ORDDD"/>
- <Cell col="5" text="CRETNO"/>
- <Cell col="6" text="진료과"/>
- <Cell col="7" text="입실일자"/>
- <Cell col="8" text="퇴실일자"/>
- <Cell col="9" text="퇴실일자2"/>
- <Cell col="10" text="ICU재원기간"/>
- <Cell col="11" text="작성일자"/>
- <Cell col="12" text="1"/>
- <Cell col="13" text="2"/>
- <Cell col="14" text="3"/>
- </Band>
- <Band id="body">
- <Cell text="bind:pid"/>
- <Cell col="1" text="bind:hngnm"/>
- <Cell col="2" text="bind:sexage"/>
- <Cell col="3" text="bind:age"/>
- <Cell col="4" text="bind:orddd"/>
- <Cell col="5" text="bind:cretno"/>
- <Cell col="6" text="bind:depthngnm"/>
- <Cell col="7" text="bind:fromdd"/>
- <Cell col="8" text="bind:todd"/>
- <Cell col="9" text="bind:todd2"/>
- <Cell col="10" text="bind:ining"/>
- <Cell col="11" text="bind:apchdd"/>
- <Cell col="12" text="bind:apchscore"/>
- <Cell col="13" text="bind:dethrate"/>
- <Cell col="14" text="bind:adjusted"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Grid position="absolute 1000 370 1065 600" id="grd_apchday" visible="false" binddataset="ds_grd_apchday">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="60"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell text="작성일자"/>
- </Band>
- <Band id="body">
- <Cell text="bind:apchdd"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_grd_apachelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false" onrowposchanged="ds_grd_apachelist_onrowposchanged">
- <ColumnInfo>
- <Column id="pid" type="STRING"/>
- <Column id="hngnm" type="STRING"/>
- <Column id="sexage" type="STRING"/>
- <Column id="age" type="STRING"/>
- <Column id="orddd" type="STRING"/>
- <Column id="cretno" type="STRING"/>
- <Column id="depthngnm" type="STRING"/>
- <Column id="fromdd" type="STRING"/>
- <Column id="todd" type="STRING"/>
- <Column id="todd2" type="STRING"/>
- <Column id="ining" type="STRING"/>
- <Column id="graph" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_cmb_icu" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="deptnm" type="STRING"/>
- <Column id="deptcd" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_cmb_orddeptcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="depthngnm" type="STRING"/>
- <Column id="deptcd" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_datagrid2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="pid" type="STRING" size="256" sumtext="등록번호"/>
- <Column id="hngnm" type="STRING" size="256" sumtext="성명"/>
- <Column id="sexage" type="STRING" size="256" sumtext="성별나이"/>
- <Column id="age" type="STRING" size="256" sumtext="나이"/>
- <Column id="orddd" type="STRING" size="256" sumtext="입원일자"/>
- <Column id="cretno" type="STRING" size="256" sumtext="원무번호"/>
- <Column id="depthngnm" type="STRING" size="256" sumtext="진료과"/>
- <Column id="fromdd" type="STRING" size="256" sumtext="입실일자"/>
- <Column id="todd" type="STRING" size="256" sumtext="퇴실일자"/>
- <Column id="todd2" type="STRING" size="256" sumtext="퇴실일자2"/>
- <Column id="ining" type="STRING" size="256" sumtext="재원기간"/>
- <Column id="apchdd" type="STRING" size="256" sumtext="아파치날짜"/>
- <Column id="graph" type="STRING" size="256" sumtext="그래프"/>
- <Column id="apchscore" type="STRING" size="256" sumtext="apchscore"/>
- <Column id="dethrate" type="STRING" size="256" sumtext="dethrate"/>
- <Column id="adjusted" type="STRING" size="256" sumtext="adjusted"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_grd_apchday" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="apchdd" type="STRING" size="256" sumtext="아파치날짜"/>
- </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="stnddd" type="STRING" size="256"/>
- <Column id="enddd" type="STRING" size="256"/>
- <Column id="range" type="STRING" size="256"/>
- <Column id="status" type="STRING" size="256"/>
- <Column id="ward" type="STRING" size="256"/>
- <Column id="orddept" type="STRING" size="256"/>
- <Column id="outchk" type="STRING" size="256"/>
- <Column id="scorechk" type="STRING" size="256"/>
- <Column id="scoredown" type="STRING" size="256"/>
- <Column id="scoreup" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="stnddd"/>
- <Col id="enddd"/>
- <Col id="range"/>
- <Col id="status"/>
- <Col id="ward"/>
- <Col id="orddept"/>
- <Col id="outchk"/>
- <Col id="scorechk"/>
- <Col id="scoredown"/>
- <Col id="scoreup"/>
- </Row>
- </Rows>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="roundrect1.ipt_reqstnddd" propid="value" datasetid="ds_send" columnid="stnddd"/>
- <BindItem id="item1" compid="roundrect1.ipt_reqenddd" propid="value" datasetid="ds_send" columnid="enddd"/>
- <BindItem id="item2" compid="roundrect1.cmb_icu" propid="value" datasetid="ds_send" columnid="ward"/>
- <BindItem id="item3" compid="roundrect1.opt_scorechk" propid="value" datasetid="ds_send" columnid="scorechk"/>
- <BindItem id="item4" compid="roundrect1.cmb_term" propid="value" datasetid="ds_send" columnid="range"/>
- <BindItem id="item5" compid="roundrect1.opt_scoreup" propid="value" datasetid="ds_send" columnid="scoreup"/>
- <BindItem id="item6" compid="roundrect1.cmb_orddeptcd" propid="value" datasetid="ds_send" columnid="orddept"/>
- <BindItem id="item7" compid="roundrect1.opt_outchk" propid="value" datasetid="ds_send" columnid="outchk"/>
- <BindItem id="item8" compid="roundrect1.rdo_status" propid="value" datasetid="ds_send" columnid="status"/>
- <BindItem id="item9" compid="roundrect1.opt_scoredown" propid="value" datasetid="ds_send" columnid="scoredown"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2014-10-22
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2014-10-22 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Lib Include
- //---------------------------------------------------------------------------------------
- include "com_commonxp::comm_main.xjs"
- include "emr_prcpmngtxp::MMOCommon.xjs" // lf_mmbfGetDeptCodeComboList include
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- var arErrorCode = new HashArray();
- var screenIdx1 = 0;
- //=======================================================================================
- // Function
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Argument : 01.sKey : 코드아이디
- * : 02.sValue : 코드명
- * Description : 공통코드를 가져온다.
- ****************************************************************************************/
- //초기화
- function fSetInit(){
- var vNowDD = utlf_getCurrentDate();
-
- ds_send.setColumn(0, "stnddd",vNowDD);
- ds_send.setColumn(0, "enddd",vNowDD);
- ds_send.setColumn(0, "status", "2");
- ds_send.setColumn(0, "range", "0");
- ds_send.setColumn(0, "orddept", "-");
-
- var node = sysf_getGlobalVariable("paminfo");
- dsf_setCSVToDs("ds_main_paminfo", node);
-
- lf_mmbfGetDeptCodeComboList(ds_init_cmb_orddeptcd, "A", utlf_getCurrentDate());
- frmf_addComboItem( "roundrect1.cmb_orddeptcd", "전체" , "-" , "above" ); //부서콤보 Item '전체'추가
- var wardinfo = ds_main_paminfo.getColumn(0, "wardcd");
-
- var jobkind = sysf_getUserInfo("jobkindcd").substring(0, 2);
- if(jobkind != "03")//의사가 아닌경우
- {
- ds_send.setColumn(0, "ward", sysf_getUserInfo("dutplcecd")); // 근무부서
- }
- else
- {
- ds_send.setColumn(0, "ward", wardinfo); // 병동정보
- }
-
- var oParam = {};
- oParam.id = "TRMMR03100";
- oParam.service = "anstrecapp.ApacheRec";
- oParam.method = "reqGetTermICUList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_init_cmb_icu=icudept";
- oParam.async = false;
- oParam.callback = "cf_TRMMR03100";
- tranf_submit(oParam);
-
- // if(submit("TRMMR03100")){
- // copyNodesetType("/root/init/ward","/root/temp/initlist/icudept","replace", model, model);
- // }
-
- frmf_addComboItem( "roundrect1.cmb_icu", "전체" , "-" , "above" ); //중환자실 부서콤보 Item '전체'추가
- ds_send.setColumn(0, "ward", "-");
- }
- function fGetRefInfo(){
- init_grid();
-
- var oParam = {};
- oParam.id = "TRMMR03102";
- oParam.service = "anstrecapp.ApacheRec";
- oParam.method = "reqGetApacheDDList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_grd_apchday=apchddlist";
- oParam.async = false;
- oParam.callback = "cf_TRMMR03102";
- tranf_submit(oParam); //apchdd 리스트
-
- var oParam = {};
- oParam.id = "TRMMR03101";
- oParam.service = "anstrecapp.ApacheRec";
- oParam.method = "reqGetApacheTermList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_datagrid2=apch";
- oParam.async = false;
- oParam.callback = "cf_TRMMR03101";
- tranf_submit(oParam); // 아파치 리스트 가져오기
-
- grd_apachelist.enableevent = false;
- ds_grd_apachelist.enableevent = false;
-
- // 원본 데이터 그리드 : datagrid2
- // 그래프 생성 될 데이터 그리드 : grd_apachelist
- // 티챠트가 거지 같아서 그리드 이름은 꼭 datagrid1 이어야 제대로 가져 온다.
-
- // 원본 데이터 갯수
- var row_cnt = ds_datagrid2.rowcount; // 아파치 전체 리스트
- var day_cnt = ds_grd_apchday.rowcount; // 아파치 작성일자 리스트
- // 캡션 날짜, inputdate의 최소 날짜에서 최대 날짜 까지를 그리드에 몽땅 그려 준다.
- var min_date = "2100-12-31";
- var max_date = "2000-12-31";
- // min,max 날짜 구하기 , full search 할 수 밖에 없다.
- // for( i = 1 ; i < row_cnt ; i++ ){
- // if( min_date > datagrid2.textmatrix(i,7)){
- // min_date = datagrid2.textmatrix(i,7);
- // }
- //
- // if( max_date < datagrid2.textmatrix(i,7)){
- // max_date = datagrid2.textmatrix(i,7);
- // }
- // }
- for( i = 0 ; i < day_cnt ; i++ ){
- if( min_date > ds_grd_apchday.getColumn(i, 0)){
- min_date = ds_grd_apchday.getColumn(i, 0);
- }
-
- if( max_date < ds_grd_apchday.getColumn(i, 0)){
- max_date = ds_grd_apchday.getColumn(i, 0);
- }
- }
- // 구한 날짜를 날짜 형식으로 변형한다. ( 날짜가 하루씩 증가해야 하니까.. )
- var minyear = min_date.substr(0,4);
- var minmon = min_date.substr(4,2);
- var minday = min_date.substr(6,2);
- // 날짜 계산을 위해서 여기서 1달 작은 값을 넣고 밑에서는 +1달을 해 준다.
- // 월을 0~11 까지로 출력하기 때문에 이런 뻘짓이 필요하다. 이렇게 안 하면 내년에 1월이 00으로 찍힌다.
- var tmp_min_date = new Date(minyear,minmon-1,minday);
- // 성능 대박 향상을 위한 caption_tmp!!! 컬럼 추가 될때 마다 캡션값을 입력하면 컬럼 하나씩 들어가는게 눈에 보인다.
- // 고로.. 변수에 저장해 두었다가 마지막에 찍어 주자.
- var caption_tmp = grd_apachelist.caption;
- // 날짜가 하루 더 많다. 그래서 하루 빼줬다.
- tmp_min_date.setDate(tmp_min_date.getDate()-1);
- // 컬럼 추가, 그리드 캡션 지정
- for(k = 0; k < day_cnt; k++){
- /*
- tmp_min_date.setDate(tmp_min_date.getDate()+1);
-
- // 그리드에서 비교를 위해 날짜 포맷 설정
- ty = tmp_min_date.getYear();
- tm = tmp_min_date.getMonth()+1;
- td = tmp_min_date.getDate();
- if(tm < 10)
- tm = "0" + tm;
- if(td < 10)
- td = "0" + td;
- tt = ty + "-" + tm + "-" + td;
- to = ty + tm + td;
- */
- s = "A";
- d = "D";
- a = "D(Adjusted)";
-
- var idx1 = grd_apachelist.insertContentsCol("body", grd_apachelist.getFormatColCount() + 1, false);
- var idx2 = grd_apachelist.insertContentsCol("body", grd_apachelist.getFormatColCount() + 1, false);
- var idx3 = grd_apachelist.insertContentsCol("body", grd_apachelist.getFormatColCount() + 1, false);
-
- //sysf_trace("getFormatColCount() : " + grd_apachelist.getFormatColCount());
-
- grd_apachelist.setCellProperty("head", idx1, "text", ds_grd_apchday.getColumn(k,0));
- // 총 열의 크기에서 merge된 컬럼 제외 후 생성된 idx 로 값 설정.
- grd_apachelist.setCellProperty("head", grd_apachelist.getFormatColCount() - 13 +idx1 , "text", s);
- grd_apachelist.setCellProperty("head", grd_apachelist.getFormatColCount() - 13 +idx2 , "text", d);
- grd_apachelist.setCellProperty("head", grd_apachelist.getFormatColCount() - 13 +idx3 , "text", a);
- // expand Button show
- grd_apachelist.setCellProperty("body", idx3 , "expandshow", "show");
- grd_apachelist.setCellProperty("body", idx3 , "displaytype", "text");
- grd_apachelist.setCellProperty("body", idx3 , "edittype", "readonly");
- grd_apachelist.setCellProperty("body", idx3 , "align", "center middle");
- // column binding
- grd_apachelist.setCellProperty("body", idx1 , "text", "bind:"+idx1);
- grd_apachelist.setCellProperty("body", idx2 , "text", "bind:"+idx2);
- grd_apachelist.setCellProperty("body", idx3 , "text", "bind:"+idx3);
- // dataset addColumn
- ds_grd_apachelist.addColumn(idx1, "string");
- ds_grd_apachelist.addColumn(idx2, "string");
- ds_grd_apachelist.addColumn(idx3, "string");
- // 열 크기 조절
- grd_apachelist.setFormatColProperty(idx1,"size",80);
- grd_apachelist.setFormatColProperty(idx2,"size",80);
- grd_apachelist.setFormatColProperty(idx3,"size",80);
-
-
-
- /*
- // 최대날짜까지 컬럼 추가
- grd_apachelist.addColumn("ref:s" + tt + s + ";; type: output;",false);
- //grd_apachelist.colWidth(grd_apachelist.cols-12) = 80;
- grd_apachelist.addColumn("ref:d" + tt + d + ";; type: output;",false);
- //grd_apachelist.colWidth(grd_apachelist.cols-13) = 80;
- grd_apachelist.addColumn("ref:a" + tt + a + ";; type: inputbutton;",false);
- //grd_apachelist.colWidth(grd_apachelist.cols-14) = 80;
- */
- }
-
- // Merge는 값을 저장한 다음 나중에... merge 하는 순간 idx 가 꼬임...
- var sidx = 13;
- var tmp_idx = 13;
- for(k = 0; k < day_cnt; k++){
- //grd_apachelist.mergeContentsCell("head",0,13,0,15,13,false);
- grd_apachelist.mergeContentsCell("head",0,tmp_idx,0,tmp_idx+2,(sidx+k),false);
- tmp_idx=tmp_idx+3;
- }
- //sysf_trace(grd_apachelist.getCurFormatString());
-
- /*
- for(j = 1; j < day_cnt; j++){
- //아파치 작성일자 추가
- //아파치 일자와 그리드 날짜가 동일할 때
- if(grd_apachelist.textmatrix(0,(13+3*j-3)) != grd_apchday.textmatrix(j,0)){
- grd_apachelist.textmatrix(0,(13+3*j-3)) = grd_apchday.textmatrix(j,0); //날짜는 0 로우에..add_row_cnt-i-1
- grd_apachelist.textmatrix(0,(14+3*j-3)) = grd_apchday.textmatrix(j,0);
- grd_apachelist.textmatrix(0,(15+3*j-3)) = grd_apchday.textmatrix(j,0);
- grd_apachelist.textmatrix(1,(13+3*j-3)) = "A"; //항목은 1 로우에
- grd_apachelist.colWidth(13+3*j-3) = 80;
- grd_apachelist.textmatrix(1,(14+3*j-3)) = "D";
- grd_apachelist.colWidth(14+3*j-3) = 80;
- grd_apachelist.textmatrix(1,(15+3*j-3)) = "D(Adjusted)";
- grd_apachelist.colWidth(15+3*j-3) = 80;
- }
- }
- */
- // 로우 생성, subteam,dev 입력
- var add_row_cnt = 0;
- var col_cnt = 12;
- var cmp_dev = "시작은암것두엄는거다";
- var cmp_team = "시작은암것두엄는거다";
- var cmp_day = "시작은암것두엄는거다";
- // 원본 데이터를 첨 부터 끝까지 읽어 내려가면서 그래프 기준이 될 데이터 그리드를 생성한다.
- for( i = 0 ; i < row_cnt ; i++ ){
- // 앞에 이름과 현재 로우의 dev가 다르면 로우를 추가한다. (dev로 sort 해서 가져 왔심)
- // 앞에 이름과 같은데 팀이 달라도 로우를 추가 한다. 두탕 뛰는 개발자 색출
- if (cmp_dev != ds_datagrid2.getColumn(i,"pid") || (cmp_dev == ds_datagrid2.getColumn(i,"pid") && cmp_team != ds_datagrid2.getColCount(i,"hngnm"))){
- add_row_cnt = ds_grd_apachelist.addRow();
- // fixed컬럼에 dev, subteam에 해당팀, 개발자 입력
- //grd_apachelist.textmatrix(add_row_cnt,0) = datagrid2.textmatrix(i,0);
- ds_grd_apachelist.setColumn(add_row_cnt,"pid", ds_datagrid2.getColumn(i,"pid"));
- ds_grd_apachelist.setColumn(add_row_cnt,"hngnm", ds_datagrid2.getColumn(i,"hngnm"));
- ds_grd_apachelist.setColumn(add_row_cnt,"sexage", ds_datagrid2.getColumn(i,"sexage"));
- ds_grd_apachelist.setColumn(add_row_cnt,"age", ds_datagrid2.getColumn(i,"age"));
- ds_grd_apachelist.setColumn(add_row_cnt,"orddd", ds_datagrid2.getColumn(i,"orddd"));
- ds_grd_apachelist.setColumn(add_row_cnt,"cretno", ds_datagrid2.getColumn(i,"cretno"));
- ds_grd_apachelist.setColumn(add_row_cnt,"depthngnm", ds_datagrid2.getColumn(i,"depthngnm"));
- ds_grd_apachelist.setColumn(add_row_cnt,"fromdd", ds_datagrid2.getColumn(i,"fromdd"));
- ds_grd_apachelist.setColumn(add_row_cnt,"todd", ds_datagrid2.getColumn(i,"todd"));
- ds_grd_apachelist.setColumn(add_row_cnt,"todd2", ds_datagrid2.getColumn(i,"todd2"));
- ds_grd_apachelist.setColumn(add_row_cnt,"ining", ds_datagrid2.getColumn(i,"ining"));
- // add_row_cnt = add_row_cnt + 1;
- }
- // 데이터 맵핑
- // sysf_trace("grd_apachelist.getCellCount : " +grd_apachelist.getCellCount("body"));
- var tmp_sidx = 13;
- for (var c = 13 ; c < grd_apachelist.getCellCount("body"); c+=3 ){
- // input date가 같다면 해당 셀에 데이터 맵핑
- // sysf_trace("grd_apachelist.getCellProperty : " + grd_apachelist.getCellProperty("head", tmp_sidx, "text"));
- if (grd_apachelist.getCellProperty("head", tmp_sidx, "text") == ds_datagrid2.getColumn(i,"apchdd")){
- // 통계 데이터 맵핑
- ds_grd_apachelist.setColumn(add_row_cnt,(c).toString(), ds_datagrid2.getColumn(i,"apchscore")); //apchscore
- ds_grd_apachelist.setColumn(add_row_cnt,(c+1).toString(), ds_datagrid2.getColumn(i,"dethrate")); //dethrate
- ds_grd_apachelist.setColumn(add_row_cnt,(c+2).toString(), ds_datagrid2.getColumn(i,"adjusted")); //adjusted
- }else{
- if(utlf_isNull(ds_grd_apachelist.getColumn(add_row_cnt,(c).toString()))){
- // 빈 셀은 0으로 채워 준다 -> 값이 비었을 경우 티차트에서 에러 발생.
- ds_grd_apachelist.setColumn(add_row_cnt,c.toString(),"0"); //apchscore
- ds_grd_apachelist.setColumn(add_row_cnt,(c+1).toString(),"0"); //dethrate
- }
- }
- tmp_sidx++;
- /*
- var colNum = grd_apachelist.colRef("graph");
- grd_apachelist.cellstyle("background-image", add_row_cnt-1, 12) = "../../../emr/anstrecweb/images/barchart.gif"
- grd_apachelist.cellstyle("background-position", add_row_cnt-1, 12) = "center center"
- */
-
- }
- // 현재 행의 개발자,Subteam 을 저장해 두었다가 다음 행과 비교한다.
- cmp_dev = ds_datagrid2.getColumn(i,"pid");//0
- cmp_team = ds_datagrid2.getColumn(i,"hngnm");//1
- cmp_day = ds_datagrid2.getColumn(i,"ining");//10
-
- }
-
- grd_apachelist.setCellProperty("body", grd_apachelist.getBindCellIndex("body","graph"), "background", "URL('theme://images\\barchart.png') center center stretch");
- grd_apachelist.setCellProperty("body", grd_apachelist.getBindCellIndex("body","graph"), "background2", "URL('theme://images\\barchart.png') center center stretch");
-
- grd_apachelist.enableevent = true;
- ds_grd_apachelist.enableevent = true;
- }
- function init_grid(){
- /*
- // 컬럼 캡션 초기화
- grd_apachelist.caption = "환자번호^성명^S/A^AGE^ORDDD^CRETNO^진료과^입실일자^퇴실일자^퇴실일자2^ICU재원기간^그래프보기|환자번호^성명^S/A^AGE^ORDDD^CRETNO^진료과^입실일자^퇴실일자^퇴실일자2^ICU재원기간^그래프보기";
-
- var cols = grd_apachelist.cols-grd_apachelist.fixedCols+1;
- for( var i = 0; i < cols; i++ ) {
- //그리드의 컬럼 삭제
- grd_apachelist.removeColumn(false);
- }
- */
-
- grd_apachelist.formats = grd_apachelist.userdata;
-
- // 노드 초기화
- ds_datagrid2.clearData()
- ds_grd_apachelist.clearData();
- /*
- model.removeNodeset("/root/main/apachelist/list/apch");
- model.removeNodeset("/root/grd_temp/grid");
- model.resetInstanceNode("/root/grd_temp/grid");
- model.resetInstanceNode("/root/main/apachelist/list/apch");
- */
- }
-
-
-
- //************************************** MMR03100 ****************************************//
- function fMakeChart(){
-
- //var hrcheck = model.getValue("/root/main/chrtsetup/hryn");
- //var rrcheck = model.getValue("/root/main/chrtsetup/rryn");
- //var btcheck = model.getValue("/root/main/chrtsetup/btyn");
-
- TChart1.RemoveAllSeries();
- TChart1.Axis.RemoveAllCustom();
- //margin 값 정하기
- TChart1.Panel.MarginTop = 0;
- TChart1.Panel.MarginLeft = 11;
- TChart1.Panel.MarginRight = 0;
- TChart1.Panel.MarginBottom = -5;
- TChart1.Axis.Bottom.TickLength = 1027;
- //시간 생성
- //var stDate = new Date(2005, 2, 3, 0, 0);
- //var endDate = new Date(2005, 2, 10, 0, 0);
- //alert(Date.UTC(2005, 2, 3));
-
- //하단축 칸 수 정하기와 눈금 없애기
-
- //TChart1.Axis.Bottom.SetMinMax (0, MinTimeConst * 60 * 24 * 7 - 1); //7일 동안 좌표를 표현
- TChart1.Axis.Bottom.SetMinMax (0, 30); //7일 동안 좌표를 표현 (하루는 DivPerDay만큼 나눠짐)
- TChart1.Axis.Bottom.Increment = 1;
- TChart1.Axis.Bottom.MinorTickCount = 1;
- TChart1.Axis.Bottom.AxisPen.Color = 0x000000;
- //TChart1.Axis.Bottom.GridPen.Color = 0x0000ff; //축 점선의 색 설정
- TChart1.Axis.Bottom.Labels.Font.Color = 0xffffff; //하단 축 눈금 명칭 색을 하얀색으로 하여 보이지 않게 처리
-
- TChart1.Header.Visible = false;
- TChart1.Header.Text(0)="Vital Sign"; //헤더제목넣기
- TChart1.Header.Font.Bold = true; //헤더 굵게
- TChart1.Header.Font.Size = 10; //헤더 사이즈
- TChart1.Aspect.View3D = 0; //2d 로 표현하기
- //TChart1.Aspect.Chart3DPercent = 2;
-
- TChart1.Zoom.enable = false; // zoom 사용하지 않기
- TChart1.Scroll.Enable = true; // scroll 사용하지 않기
- TChart1.Legend.Visible = false; // 그래프 참조 박스 띄우지 않기
- TChart1.Environment.MouseWheelScroll = true;
- TChart1.Panel.Gradient.Visible = true; // 페널에 그라디언트 적용
- TChart1.Panel.Gradient.StartColor = 0xffffff;
- TChart1.Panel.Gradient.EndColor = 0xffffff;
-
- var cus_axis1 = TChart1.Axis.AddCustom(false); // BT
- TChart1.Axis.Custom(0).AxisPen.Color = 0x00ff00;
- TChart1.Axis.Custom(0).Title.Caption = "BT";
- TChart1.Axis.Custom(0).Title.Font.Size = 8;
- TChart1.Axis.Custom(0).Title.Font.Bold = true;
- TChart1.Axis.Custom(0).Title.Angle = 90;
- TChart1.Axis.Custom(0).PositionPercent = -4.5;
- TChart1.Axis.Custom(0).Automatic = false;
- TChart1.Axis.Custom(0).Maximum = 100;
- TChart1.Axis.Custom(0).Minimum = 0;
- TChart1.Axis.Custom(0).Increment = 10;
-
- var cus_axis2 = TChart1.Axis.AddCustom(false); // RR
- TChart1.Axis.Custom(1).AxisPen.Color = 0xff0000;
- TChart1.Axis.Custom(1).Title.Caption = "RR";
- TChart1.Axis.Custom(1).Title.Font.Size = 8;
- TChart1.Axis.Custom(1).Title.Font.Bold = true;
- TChart1.Axis.Custom(1).Title.Angle = 90;
- TChart1.Axis.Custom(1).PositionPercent = -8.5;
- TChart1.Axis.Custom(1).Automatic = false;
- TChart1.Axis.Custom(1).Maximum = 110;
- TChart1.Axis.Custom(1).Minimum = 10;
- TChart1.Axis.Custom(1).Increment = 10;
-
- TChart1.AddSeries(11); // 혈압
- TChart1.AddSeries(11); // abp
- TChart1.AddSeries(0); // 맥박
- TChart1.AddSeries(0); // 체온
- TChart1.AddSeries(0); // 호흡
- TChart1.AddSeries(0); // 38선
- TChart1.Series(0).VerticalAxisCustom = cus_axis1;
- TChart1.Series(1).VerticalAxisCustom = cus_axis1;
- TChart1.Series(2).VerticalAxisCustom = cus_axis1;
- TChart1.Series(3).VerticalAxisCustom = cus_axis2;
- TChart1.Series(4).VerticalAxisCustom = cus_axis2;
- TChart1.Series(5).VerticalAxisCustom = cus_axis2;
-
- //라인의 굵기를 정해준다.
- TChart1.Series(0).asCandle.CandleStyle = 2;
- TChart1.Series(0).asCandle.CandleWidth = 4;
- TChart1.Series(1).asCandle.CandleStyle = 2;
- TChart1.Series(1).asCandle.CandleWidth = 1;
- TChart1.Series(2).asLine.LinePen.Width = 1;
- TChart1.Series(3).asLine.LinePen.Width = 2;
- TChart1.Series(4).asLine.LinePen.Width = 1;
- TChart1.Series(5).asLine.LinePen.Width = 2;
- TChart1.Series(0).Color = 0x000000; //black
- TChart1.Series(1).Color = 0x000000; //black
- TChart1.Series(2).Color = 0x0000ff; //red HR/BP
- TChart1.Series(3).Color = 0x00ff00; //green BT
- TChart1.Series(4).Color = 0xff0000; //blue RR
- TChart1.Series(5).Color = 0x656565; //38선
- // error bar test
- //Series(0).AsErrorBar.AddErrorBar (1234, 5678, 23, "MyErrorBar", model.rgb(0,255,255));
-
- TChart1.Series(2).asLine.Pointer.Visible = true;
- TChart1.Series(2).asLine.Pointer.Style = 1;
- TChart1.Series(2).asLine.Pointer.VerticalSize = 2;
- TChart1.Series(2).asLine.Pointer.HorizontalSize = 2;
-
- TChart1.Series(3).asLine.Pointer.Visible = true;
- TChart1.Series(3).asLine.Pointer.Style = 1;
- TChart1.Series(3).asLine.Pointer.VerticalSize = 2;
- TChart1.Series(3).asLine.Pointer.HorizontalSize = 2;
-
- TChart1.Series(4).asLine.Pointer.Visible = true;
- TChart1.Series(4).asLine.Pointer.Style = 1;
- TChart1.Series(4).asLine.Pointer.VerticalSize = 2;
- TChart1.Series(4).asLine.Pointer.HorizontalSize = 2;
-
- //기준선 그리기
- TChart1.Series(5).AddXY (-5, 38 , "", TChart1.Series(5).Color );
- TChart1.Series(5).AddXY (50, 38 , "", TChart1.Series(5).Color );
-
- //depth 정하기
- TChart1.Series(1).Depth = 1;
- TChart1.Series(2).Depth = 2;
- TChart1.Series(3).Depth = 3;
- TChart1.Series(4).Depth = 4;
- TChart1.Series(5).Depth = 5;
-
- var iRow = grd_apachelist.row - grd_apachelist.fixedRows + 1;
-
- //if (hrcheck == "Y"){
- for(i =1 ; i <31 ; i ++ ){
- //if(model.getValue("/root/main/recinfo/reclist/grid[2]/mnt" + i + "" ) != "" && model.getValue("/root/main/recinfo/reclist/grid[2]/mnt" + i + "" ) != "?"
- //&& model.getValue("/root/main/recinfo/reclist/grid[3]/mnt" + i + "" ) != "" && model.getValue("/root/main/recinfo/reclist/grid[3]/mnt" + i + "" ) != "?"){
- // TChart1.Series(0).asCandle.AddCandle ( i, model.getValue("/root/main/recinfo/reclist/grid[3]/mnt" + i + "" ), 0, 0, model.getValue("/root/main/recinfo/reclist/grid[2]/mnt" + i + "" ));
- //} else if (model.getValue("/root/main/recinfo/reclist/grid[2]/mnt" + i + "" ) != "" && model.getValue("/root/main/recinfo/reclist/grid[2]/mnt" + i + "" ) != "?"
- // && model.getValue("/root/main/recinfo/reclist/grid[3]/mnt" + i + "" ) == "" && model.getValue("/root/main/recinfo/reclist/grid[3]/mnt" + i + "" ) == "?"){
- // TChart1.Series(1).asCandle.AddCandle ( i, model.getValue("/root/main/recinfo/reclist/grid[2]/mnt" + i + "" ), 0, 0, model.getValue("/root/main/recinfo/reclist/grid[2]/mnt" + i + "" ));
- //} else if (model.getValue("/root/main/recinfo/reclist/grid[2]/mnt" + i + "" ) == "" && model.getValue("/root/main/recinfo/reclist/grid[2]/mnt" + i + "" ) == "?"
- // && model.getValue("/root/main/recinfo/reclist/grid[3]/mnt" + i + "" ) != "" && model.getValue("/root/main/recinfo/reclist/grid[3]/mnt" + i + "" ) != "?"){
- //TChart1.Series(1).asCandle.AddCandle ( i, model.getValue("/root/main/apachelist/row["+ iRow +"]/a" + i + "" ), 0, 0, model.getValue("/root/main/apachelist/row["+ iRow +"]/a" + i + "" ));
- //}
-
- //if(model.getValue("/root/main/recinfo/reclist/grid[4]/mnt" + i + "" ) != "" && model.getValue("/root/main/recinfo/reclist/grid[4]/mnt" + i + "" ) != "?"){
- alert(model.getValue("/root/main/apachelist/row["+ iRow +"]/a" + i + "" ));
- TChart1.Series(1).AddXY (i, model.getValue("/root/main/apachelist/row["+ iRow +"]/a" + i + "" ), "", TChart1.Series(2).Color);
-
- //}
- }
- //}
- //if (btcheck == "Y"){
- for(i =1 ; i <31 ; i ++ ){
- //if(model.getValue("/root/main/recinfo/reclist/grid[6]/mnt" + i + "" ) != "" && model.getValue("/root/main/recinfo/reclist/grid[6]/mnt" + i + "" ) != "?" ){
- TChart1.Series(2).AddXY (i, model.getValue("/root/main/apachelist/row["+ iRow +"]/d" + i + "" ), "", TChart1.Series(3).Color);
- //}
- }
- //}
- //if (rrcheck == "Y"){
- for(i =1 ; i <31 ; i ++ ){
- //if(model.getValue("/root/main/recinfo/reclist/grid[5]/mnt" + i + "" ) != "" && model.getValue("/root/main/recinfo/reclist/grid[5]/mnt" + i + "" ) != "?"){
- TChart1.Series(3).AddXY (i, model.getValue("/root/main/apachelist/row["+ iRow +"]/a" + i + "" ), "", TChart1.Series(4).Color);
- //}
- }
- //}
- }
-
- function fDisPatchTermSearch()
- {
- fTermSearch();
- }
- function fTermSearch()
- {
- init_grid();
- fGetRefInfo();
- }
- //=======================================================================================
- // Transaction Callback
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Argument : 01.sSvcId : 서비스 ID
- * : 02.nErrorCode : 에러코드
- * : 03.sErrorMsg : 에러메시지
- * Description : tr_getCodeList의 콜백함수
- ****************************************************************************************/
- function cf_TRMMR03100(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- arErrorCode.push(sSvcId, nErrorCode);
- sysf_trace("***** cf_TRMMR03100 *****");
- }
- function cf_TRMMR03102(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- arErrorCode.push(sSvcId, nErrorCode);
- sysf_trace("***** cf_TRMMR03102 *****");
- }
- function cf_TRMMR03101(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- arErrorCode.push(sSvcId, nErrorCode);
- sysf_trace("***** cf_TRMMR03101 *****");
- }
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components :
- * Components ID : button5
- * Event : onlbuttonup
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description :
- ****************************************************************************************/
- function SMMMR03100_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMMMR03100_onload(obj:Form, e:LoadEventInfo)
- {
- var sForm = grd_apachelist.getFormatString();
- grd_apachelist.userdata = sForm;
-
- grdf_setGridSort(grd_apachelist);
- //sysf_trace(grd_apachelist.userdata);
-
- fSetInit();
- }
- function grd_apachelist_onexpanddown(obj:Grid, e:GridMouseEventInfo)
- {
- var iRow = e.row;
- var iCol = e.col;
- if (iCol != 12) {
- frmf_setParameter("SPMMR03200_pid", ds_grd_apachelist.getColumn(iRow, "pid"));
- frmf_setParameter("SPMMR03200_hngnm", ds_grd_apachelist.getColumn(iRow, "hngnm"));
- frmf_setParameter("SPMMR03200_orddd", ds_grd_apachelist.getColumn(iRow, "orddd"));
- frmf_setParameter("SPMMR03200_cretno", ds_grd_apachelist.getColumn(iRow, "cretno"));
-
- var apchdd = grd_apachelist.getCellProperty("head", iCol-2, "text")
- frmf_setParameter("SPMMR03200_apchdd", apchdd);
- frmf_setParameter("SPMMR03200_age", ds_grd_apachelist.getColumn(iRow, "age"));
- frmf_setParameter("SPMMR03200_fromdd", ds_grd_apachelist.getColumn(iRow, "fromdd"));
- var fromdd = ds_grd_apachelist.getColumn(iRow, "fromdd");
- frmf_setParameter("SPMMR03200_todd", ds_grd_apachelist.getColumn(iRow, "todd"));
-
- if(apchdd < fromdd){
- sysf_messageBox("입실일자 ","E012");
- return;
- }else{
- //modal("SPMMR03200", "", "", "", "", "/root/send/param", "/root/send");
- //window.load("SPMMR03200_아파치기록정보.xrw", "modeless", "pop1", "width:900px; height:980;");
- var objPopForm = frmf_findPopup("SPMMR03200");
- if( !utlf_isNull(objPopForm) ){
- objPopForm.fInit();
- objPopForm.setFocus();
- }else{
- //765 + 26 + 4 = 795
- //740 + 16 = 756
- frmf_open("SPMMR03200", "SPMMR03200", null, false, 1, null, null, 756, 795, null, null, null, "M");
- }
-
- //inputEnterKey("btn_srch", "DOMActivate"); //의미없다...
- }
- }
- }
- function grd_apachelist_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
-
- var iRow = e.row;
- var iCol = e.col;
-
- if (iCol == 12) {
- frmf_setParameter("SPMMR03300_pid", ds_grd_apachelist.getColumn(iRow, "pid"));
- frmf_setParameter("SPMMR03300_fromdd", ds_grd_apachelist.getColumn(iRow, "fromdd"));
- frmf_setParameter("SPMMR03300_todd", ds_grd_apachelist.getColumn(iRow, "todd"));
- frmf_setParameter("SPMMR03300_orddd", ds_grd_apachelist.getColumn(iRow, "orddd"));
-
- frmf_setParameter("SPMMR03300_range", ds_send.getColumn(0, "range"));
- frmf_setParameter("SPMMR03300_status", ds_send.getColumn(0, "status"));
- frmf_setParameter("SPMMR03300_ward", ds_send.getColumn(0, "ward"));
- frmf_setParameter("SPMMR03300_orddept", ds_send.getColumn(0, "orddept"));
- frmf_setParameter("SPMMR03300_outchk", ds_send.getColumn(0, "outchk"));
- frmf_setParameter("SPMMR03300_scorechk", ds_send.getColumn(0, "scorechk"));
- frmf_setParameter("SPMMR03300_scoredown", ds_send.getColumn(0, "scoredown"));
- frmf_setParameter("SPMMR03300_scoreup", ds_send.getColumn(0, "scoreup"));
- frmf_open("SPMMR03300_"+screenIdx1, "SPMMR03300", null, null, 1, 300, 100, null, null, null, null, null, "M");
- screenIdx1++;
- //window.load("SPMMR03300_아파치환자그래프.xrw", "modeless", "pop1", "left:300px; top:100px; width:700px; height:780;");
- }
-
- }
- function ds_grd_apachelist_onrowposchanged(obj:Dataset, e:DSRowPosChangeEventInfo)
- {
- var iRow = e.newrow;
- var iCol = grd_apachelist.getCellPos();
-
- if (iCol == 12) {
- frmf_setParameter("SPMMR03300_pid", ds_grd_apachelist.getColumn(iRow, "pid"));
- frmf_setParameter("SPMMR03300_fromdd", ds_grd_apachelist.getColumn(iRow, "fromdd"));
- frmf_setParameter("SPMMR03300_todd", ds_grd_apachelist.getColumn(iRow, "todd"));
- frmf_setParameter("SPMMR03300_orddd", ds_grd_apachelist.getColumn(iRow, "orddd"));
-
- frmf_setParameter("SPMMR03300_range", ds_send.getColumn(0, "range"));
- frmf_setParameter("SPMMR03300_status", ds_send.getColumn(0, "status"));
- frmf_setParameter("SPMMR03300_ward", ds_send.getColumn(0, "ward"));
- frmf_setParameter("SPMMR03300_orddept", ds_send.getColumn(0, "orddept"));
- frmf_setParameter("SPMMR03300_outchk", ds_send.getColumn(0, "outchk"));
- frmf_setParameter("SPMMR03300_scorechk", ds_send.getColumn(0, "scorechk"));
- frmf_setParameter("SPMMR03300_scoredown", ds_send.getColumn(0, "scoredown"));
- frmf_setParameter("SPMMR03300_scoreup", ds_send.getColumn(0, "scoreup"));
-
- // var objPopForm = frmf_findPopup("SPMMR03300");
- // if( !utlf_isNull(objPopForm) ){
- // objPopForm.fGetRefInfo();
- // objPopForm.setFocus();
- // }else{
- // frmf_open("SPMMR03300", "SPMMR03300", null, null, 1, 300, 100, null, null, null, null, null, "M");
- // }
- frmf_open("SPMMR03300_"+screenIdx1, "SPMMR03300", null, null, 1, 300, 100, null, null, null, null, null, "M");
- screenIdx1++;
- //window.load("SPMMR03300_아파치환자그래프.xrw", "modeless", "pop1", "left:300px; top:100px; width:700px; height:780;");
- }
- }
- function roundrect1_btn_srchall_onclick(obj:Button, e:ClickEventInfo)
- {
- fTermSearch();
- }
- function btn_excel_onclick(obj:Button, e:ClickEventInfo)
- {
- // var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- //
- // if (fileName != "")
- // {
- // grd_apachelist.saveExcel(fileName, "SheetName", true, false, "", "", true);
- // }
-
- grdf_exportExcel(grd_apachelist, "excel", "SheetName");
- }
- function roundrect1_ipt_reqstnddd_onchanged(obj:Calendar, e:ChangeEventInfo)
- {
- //model.setValue("/root/send/stnddd", model.getValue("/root/send/stnddd"));
- roundrect1.ipt_reqstnddd.updateToDataset();
- }
- function roundrect1_ipt_reqenddd_onchanged(obj:Calendar, e:ChangeEventInfo)
- {
- //model.setValue("/root/send/enddd", model.getValue("/root/send/enddd"));
- roundrect1.ipt_reqenddd.updateToDataset();
- }
- function roundrect1_cmb_icu_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- //model.setValue("/root/send/ward", model.getValue("/root/send/ward"));
- roundrect1.cmb_icu.updateToDataset();
- }
- function roundrect1_cmb_term_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- var date2 = roundrect1.ipt_reqenddd.value;
- var term = roundrect1.cmb_term.value;
- roundrect1.ipt_reqstnddd.value = date2.getAddDate(-term,"D").getDateFormat("YYYYMMDD") ;
- }
- function roundrect1_cmb_orddeptcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- //model.setValue("/root/send/orddept", model.getValue("/root/send/orddept"));
- roundrect1.cmb_orddeptcd.updateToDataset();
- }
- ]]></Script>
- </Form>
- </FDL>
|