123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPMMO32300" position="absolute 0 0 814 400" titletext="응급실 의사호출 Deactivation" onload="SPMMO32300_onload">
- <Layouts>
- <Layout>
- <Button position="absolute 708 8 750 27" id="btn_del" class="btn2_letter2" taborder="3" visible="false" text="삭제" onclick="btn_del_onclick"/>
- <Shape position="absolute 0 27 797 33" linetype="horizontal" id="line5" class="line_1"/>
- <Static text="응급실의사 호출 List" position="absolute 0 14 161 28" align="align:center middle;" id="caption2" class="tit_2"/>
- <Button position="absolute 736 368 792 390" id="btn_exit" class="btn4" taborder="7" text="종료" onclick="btn_exit_onclick"/>
- <Button position="absolute 295 8 436 27" id="btn_correct" class="btn2" taborder="2" visible="true" text="일반호출 Deactivation" onclick="btn_correct_onclick"/>
- <Grid position="absolute 0 35 797 360" id="grd_erdrcalllist" taborder="5" binddataset="ds_erdrcalllist" ontextchanged="grd_erdrcalllist_ontextchanged">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="46"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="40"/>
- <Column size="100"/>
- <Column size="75"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="100"/>
- <Column size="74"/>
- <Column size="0"/>
- <Column size="129"/>
- <Column size="127"/>
- <Column size="79"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell text="상태"/>
- <Cell col="1" text="instcd"/>
- <Cell col="2" text="pid"/>
- <Cell col="3" text="hngnm"/>
- <Cell col="4" text="indd"/>
- <Cell col="5" text="cretno"/>
- <Cell col="6" text="visitno"/>
- <Cell col="7" text="erorddeptcd"/>
- <Cell col="8" text="주/부"/>
- <Cell col="9" text="진료과"/>
- <Cell col="10" text="담당의"/>
- <Cell col="11" text="담당의ID"/>
- <Cell col="12" text="Gr Type"/>
- <Cell col="13" text="Call 유형"/>
- <Cell col="14" text="호출자"/>
- <Cell col="15" text="호출자ID"/>
- <Cell col="16" text="호출시간"/>
- <Cell col="17" text="도착시간"/>
- <Cell col="18" text="등록자"/>
- <Cell col="19" text="등록자ID"/>
- </Band>
- <Band id="body">
- <Cell displaytype="combo" edittype="none" text="bind:status" combodataset="ds_status" combocodecol="value" combodatacol="label"/>
- <Cell col="1" text="bind:instcd"/>
- <Cell col="2" text="bind:pid"/>
- <Cell col="3" text="bind:hngnm"/>
- <Cell col="4" text="bind:indd"/>
- <Cell col="5" text="bind:cretno"/>
- <Cell col="6" text="bind:visitno"/>
- <Cell col="7" text="bind:erorddeptcd"/>
- <Cell col="8" displaytype="combo" edittype="combo" text="bind:mainyn" combodataset="ds_choices" combocodecol="value" combodatacol="label"/>
- <Cell col="9" text="bind:erorddeptnm"/>
- <Cell col="10" text="bind:erorddoctnm"/>
- <Cell col="11" text="bind:erorddoctcd"/>
- <Cell col="12" text="bind:grtype"/>
- <Cell col="13" text="bind:grtypenm"/>
- <Cell col="14" text="bind:callpsnnm"/>
- <Cell col="15" text="bind:callpsnid"/>
- <Cell col="16" text="bind:calldt" mask="@@@@-@@-@@ @@:@@:@@"/>
- <Cell col="17" text="bind:arrivdt" mask="@@@@-@@-@@ @@:@@:@@"/>
- <Cell col="18" text="bind:visitrgstrnm"/>
- <Cell col="19" text="bind:visitrgstrid"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button position="absolute 753 8 795 27" id="button1" class="btn2_letter2" taborder="3" visible="false" text="저장" onclick="button1_onclick"/>
- <Button position="absolute 495 8 636 27" id="button2" class="btn2" taborder="2" visible="true" text="중증응급Deactivation" onclick="button2_onclick"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_erdrcalllist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="status" type="STRING"/>
- <Column id="instcd" type="STRING"/>
- <Column id="pid" type="STRING"/>
- <Column id="hngnm" type="STRING"/>
- <Column id="indd" type="STRING"/>
- <Column id="cretno" type="STRING"/>
- <Column id="visitno" type="STRING"/>
- <Column id="erorddeptcd" type="STRING"/>
- <Column id="mainyn" type="STRING"/>
- <Column id="erorddeptnm" type="STRING"/>
- <Column id="erorddoctnm" type="STRING"/>
- <Column id="erorddoctcd" type="STRING"/>
- <Column id="grtype" type="STRING"/>
- <Column id="grtypenm" type="STRING"/>
- <Column id="callpsnnm" type="STRING"/>
- <Column id="callpsnid" type="STRING"/>
- <Column id="calldt" type="STRING"/>
- <Column id="arrivdt" type="STRING"/>
- <Column id="visitrgstrnm" type="STRING"/>
- <Column id="visitrgstrid" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_status" 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>
- </Row>
- <Row>
- <Col id="label">신규</Col>
- <Col id="value">i</Col>
- </Row>
- <Row>
- <Col id="label">수정</Col>
- <Col id="value">u</Col>
- </Row>
- <Row>
- <Col id="label">삭제</Col>
- <Col id="value">d</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_choices" 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">M</Col>
- </Row>
- <Row>
- <Col id="label">부</Col>
- <Col id="value">S</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_erdrinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="orddeptcd" type="STRING" size="256"/>
- <Column id="orddrid" type="STRING" size="256"/>
- <Column id="mainyn" type="STRING" size="256"/>
- <Column id="call1" type="STRING" size="256"/>
- <Column id="call2" type="STRING" size="256"/>
- <Column id="call3" type="STRING" size="256"/>
- <Column id="call4" type="STRING" size="256"/>
- <Column id="callcnts" type="STRING" size="256"/>
- <Column id="callcnts2" type="STRING" size="256"/>
- <Column id="callnm" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="mainyn">M</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_send_savedata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_init_erdeptcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="erdeptcd" type="STRING" size="256"/>
- <Column id="macaddr" type="STRING" size="256"/>
- <Column id="internyn" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_macaddr" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_init_internyn" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2014-08-29
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2014-08-29 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs";
- include "emr_prcpmngtxp::MMOCommon.xjs";
- include "emr_prcpmngtxp::MMO001.xjs";
- var arErrorCode = new HashArray();
- function SPMMO32300_onload(obj:Form, e:LoadEventInfo)
- {
- frmf_initForm(obj);
- fInitialize_SPMMO32300();
- }
- function fInitialize_SPMMO32300() {
- //mmbfGetHardCodeInfo("/root/send/reqdata" , "/root/init/erdeptcd" , 1);
- lf_getHardCDList("N", 1, null, ds_init_erdeptcd);
- //mmbfGetHardCodeInfo("/root/send/reqdata" , "/root/init/macaddr" , 46);
- lf_getHardCDList("N", 46, null, ds_init_macaddr);
- //mmbfGetHardCodeInfo("/root/send/reqdata" , "/root/init/internyn" , 217);
- lf_getHardCDList("N", 217, null, ds_init_internyn);
-
- fReqCallDrList() ;
- }
- function fReqCallDrList() {
- var param = opener.frmf_getParameter("SPMMO32300_param");
- gPARAM = param.split("▦");
- ds_send_reqdata.clear();
- dsf_makeValue(ds_send_reqdata,"pid" ,"string" , gPARAM[0]);
- dsf_makeValue(ds_send_reqdata,"indd" ,"string" , gPARAM[1]);
- dsf_makeValue(ds_send_reqdata,"cretno" ,"string" , gPARAM[2]);
- dsf_makeValue(ds_send_reqdata,"visitno" ,"string" , gPARAM[3]);
- var oParam = {};
- oParam.id = "TRMMO32301";
- oParam.service = "prcpmngtapp.ErMngt";
- oParam.method = "reqGetCallDeactPatList";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_erdrcalllist=erdrcalllist";
- oParam.async = false;
- oParam.callback = "cf_TRMMO32301";
- tranf_submit(oParam);
- }
- function cf_TRMMO32301(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- }
- // 삭제
- function fDelERCallInfo(){
- var currow = ds_erdrcalllist.rowposition;
- if(currow < 0){
- return;
- }
- if (ds_erdrcalllist.rowcount >1) {
- if (ds_erdrcalllist.rowposition == 0 ) {
- sysf_messageBox("부유형이 있을때 주 유형은 삭제할수", "I004");
- return;
- }
- }
-
- for (var i = grd_erdrcalllist.selectstartrow; i <= grd_erdrcalllist.selectendrow; i++ ) {
- var status = ds_erdrcalllist.getColumn(i,"status");
- if(status == "i"){
- // grd_erdrcalllist.deleteRow(i);
- ds_erdrcalllist.deleteRow(i);
- }else{
- ds_erdrcalllist.setColumn(i,"status", "d");
- }
- }
- }
- function fClkColMainYN(){
- var currow = grd_erdrcalllist.currentrow;
- var curcol = grd_erdrcalllist.currentcol;
- var status = ds_erdrcalllist.getColumn(currow,"status");
-
- if( curcol == grd_erdrcalllist.getBindCellIndex("body","mainyn") ) { //주부유형 클릭한 경우
- if(status == "i" || status == "d"){ //신규, 삭제가 아닌 경우
- return;
- }else{
- ds_erdrcalllist.setColumn(currow,"status", "u");
- }
- }
-
- }
- function fSaveERCallInfo(){
- var statusCnts = 0;
- for (var i = 0; i < ds_erdrcalllist.rowcount; i++ ) {
- var status = ds_erdrcalllist.setColumn(i,"status");
- if (status != "-") {
- statusCnts ++
- }
- }
-
- if (statusCnts < 1) {
- sysf_messageBox("변경된 정보가 없습니다", "I");
- return;
- }
- //var savedata = getNodeListCSV(instance1.selectNodes(sERDRCALLLIST_PATH));
- //model.setValue("/root/send/savedata", savedata);
-
- var oParam = {};
- oParam.id = "TXMMO32301";
- oParam.service = "prcpmngtapp.ErMngt";
- oParam.method = "reqExeERDrCallDeActivationList";
- oParam.inds = "req=ds_erdrcalllist";
- oParam.outds = "ds_erdrcalllist=erdrcalllist";
- oParam.async = false;
- oParam.callback = "cf_TXMMO32301";
- tranf_submit(oParam);
- //model.copyNode("/root/temp/ercallmngtinfo", "/root/main/ercallmngtinfo");
- }
- function cf_TXMMO32301(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- }
- // 일반 호출 Deactivation
- function fCnclErDrCall(callflag) {
- var erorddeptcd = ds_init_erdeptcd.getColumn(0,"hardcd");
- var dutplcecd = sysf_getUserInfo("dutplcecd");
- var hardcd = ds_init_macaddr.lookup("hardcd" , sysf_getUserInfo("macaddr") , "hardcd");
- var internyn = ds_init_internyn.lookup("hardcd" , sysf_getUserInfo("jobposcd") , "hardcd");
- if ( (erorddeptcd == dutplcecd)
- && (utlf_isNull(internyn) ) ) { //응급의학과 , 인턴은 제외
- var param = opener.frmf_getParameter("SPMMO32300_param");
- gPARAM = param.split("▦");
- ds_send_savedata.clear();
- dsf_makeValue(ds_send_savedata, "pid" , "string" , gPARAM[0]);
- dsf_makeValue(ds_send_savedata, "indd" , "string" , gPARAM[1]);
- dsf_makeValue(ds_send_savedata, "cretno" , "int" , gPARAM[2]);
- dsf_makeValue(ds_send_savedata, "visitno" , "int" , gPARAM[3]);
- dsf_makeValue(ds_send_savedata, "callflag" , "string" , callflag);
- dsf_setTypeFormat(ds_send_savedata, "cretno:INT^visitno:INT");
-
- var oParam = {};
- oParam.id = "TXMMO32303";
- oParam.service = "prcpmngtapp.ErMngt";
- oParam.method = "reqExeERDrCallCnclInfo";
- oParam.inds = "req=ds_send_savedata";
- oParam.outds = "ds_erdrcalllist=erdrcalllist";
- oParam.async = false;
- oParam.callback = "cf_TXMMO32303";
- tranf_submit(oParam);
- if (arErrorCode.pop("TXMMO32303") > -1) {
- fReqCallDrList();
- sysf_messageBox("Deactivation되었습니다.", "I");
- }
- } else {
- sysf_messageBox("응급의학과 또는 지정된PC에서만 Deactivation이 가능합니다.", "I");
- }
- }
- function cf_TXMMO32303(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- function btn_del_onclick(obj:Button, e:ClickEventInfo)
- {
- fDelERCallInfo();
- }
- function btn_exit_onclick(obj:Button, e:ClickEventInfo)
- {
- close();
- }
- function btn_correct_onclick(obj:Button, e:ClickEventInfo)
- {
- fCnclErDrCall(1);
- }
- function grd_erdrcalllist_ontextchanged(obj:Grid, e:GridEditTextChangedEventInfo)
- {
- fClkColMainYN();
- }
- function button1_onclick(obj:Button, e:ClickEventInfo)
- {
- fSaveERCallInfo();
- }
- function button2_onclick(obj:Button, e:ClickEventInfo)
- {
- fCnclErDrCall(2);
- }
- ]]></Script>
- </Form>
- </FDL>
|