123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPMRJ09900" position="absolute 0 0 700 400" titletext="Care Plan 상용구" onload="SPMRJ09900_onload">
- <Layouts>
- <Layout>
- <Static text="상용구" position="absolute 0 0 200 24" id="caption5" class="tit_1"/>
- <Button position="absolute 578 369 634 391" id="button1" class="btn4" text="확인" onclick="button1_onclick"/>
- <Static position="absolute 8 28 241 52" align="align:center middle;" id="caption10" class="tit_2"/>
- <Shape position="absolute 6 36 691 37" linetype="vertical" id="line7" class="line_1"/>
- <Button position="absolute 638 369 694 391" id="button43" class="btn4" text="취소" onclick="button43_onclick"/>
- <Grid position="absolute 20 270 555 390" id="datagrid1" class="datagrid2" visible="false" binddataset="ds_temp_comnuseilst">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="300"/>
- <Column size="171"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell text="problem"/>
- <Cell col="1" text="Care Plan Goal"/>
- </Band>
- <Band id="body">
- <Cell text="bind:cdnm"/>
- <Cell col="1" text="bind:refcdnm"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button position="absolute 445 370 573 392" id="button2" class="btn4" visible="false" text="인스턴스 전달" onclick="button2_onclick"/>
- <Grid position="absolute 4 51 694 367" id="datagrid99" class="datagrid2" binddataset="ds_init_A000000002" oncellclick="datagrid99_oncellclick">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="300"/>
- <Column size="40"/>
- <Column size="325"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell text="problem"/>
- <Cell col="1" text="선택"/>
- <Cell col="2" text="Care Plan&Goal"/>
- <Cell col="3"/>
- </Band>
- <Band id="body">
- <Cell text="bind:cdnm"/>
- <Cell col="1" text="bind:selectedSub" edittype="checkbox" displaytype="checkbox"/>
- <Cell col="2" enable="false" text="bind:refcdnm" edittype="text" displaytype="text"/>
- <Cell col="3" text="bind:refcdno"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_temp_comnuseilst" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cdnm" type="STRING"/>
- <Column id="refcdnm" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_A000000002" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cdnm" type="STRING"/>
- <Column id="selectedSub" type="STRING"/>
- <Column id="refcdnm" type="STRING"/>
- <Column id="refcdno" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_condition" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="workflag" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="workflag">002</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_pinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="workflag" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="workflag" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_careplanlists" 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 : 2015-02-23
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2015-02-23 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs";
- include "emr_prcpmngtxp::MMOCommon.xjs";
- include "emr_prcpmngtxp::MMO001.xjs";
- //include "emr_jcimngtxp::SPMRJ09900.xjs";
- var arErrorCode = new HashArray();
- function SPMRJ09900_onload(obj:Form, e:LoadEventInfo)
- {
- frmf_initForm(obj);
- fInit();
- }
- function button1_onclick(obj:Button, e:ClickEventInfo)
- {
- fOnClickOkBtn();
- }
- function button43_onclick(obj:Button, e:ClickEventInfo)
- {
- fClose();
- }
- function button2_onclick(obj:Button, e:ClickEventInfo)
- {
- fOnClickAddInstance();
- }
- function datagrid99_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- fCheckedGrd();
- }
- /* ---------------------------------------------------------------------
- Count List 관리 (SMMNP00320_CountList관리.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
- : Create By taebum
- : 2008-11-21 오전 10:05:51
- ---------------------------------------------------------------------- */
- /* --------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : xforms-ready시 수행한다 */
- /* return : */
- /* --------------------------------------------------*/
- function fInit() {
- // model.removeNodeSet("/root/main/careplanlists/careplanlist");
- ds_careplanlists.clear();
- var vWorkflag = "";
- var vTitle = "기타 Care Plan";
- var vMaincdidvalue = "";
- if (frmf_isPopup()) {
- vWorkflag = opener.frmf_getParameter("SPMRJ09900_workflag");
- if(utlf_isNull(vWorkflag)){
- alert("직종구분 값 세팅이 안되었습니다...!");
- this.close();
- }
- dsf_makeValue(ds_init_pinfo,"workflag" ,"string" , vWorkflag);
- }else{
- button43.visible = false;
- vWorkflag = frmf_getParameter("SPMRJ09900_workflag");
- if(utlf_isNull(vWorkflag)){
- alert("직종구분 값 세팅이 안되었습니다...! 임시테스로 002 세팅함");
- vWorkflag = "002";
- }
- dsf_makeValue(ds_init_pinfo,"workflag" ,"string" , vWorkflag);
- }
- if (vWorkflag=="001"){
- vTitle = "Treatment Plan";
- vMaincdidvalue = "A000000001";
- }else if(vWorkflag=="002"){
- vTitle = "Discharge Plan";
- vMaincdidvalue = "A000000002";
- }else if(vWorkflag=="003"){
- vTitle = "Nursing Care Plan";
- vMaincdidvalue = "A000000003";
- }else if(vWorkflag=="004"){
- vTitle = "Nutrition Management Plan";
- vMaincdidvalue = "A000000004";
- }else if(vWorkflag=="005"){
- vTitle = "Activity/Rehabilitation Plan";
- vMaincdidvalue = "A000000005";
- }else if(vWorkflag=="999"){
- vTitle = "기타 Care Plan";
- vMaincdidvalue = "A000000999";
- }
- caption10.text = vTitle;
- //테이블에 데이타 없음 2015-02-24
- //emrfGetCodeList(new Array(vMaincdidvalue), new Array("/root/init/"+vMaincdidvalue),"Y","Y");
- //var codeNodeSize = getNodesetCount("/root/init/"+vMaincdidvalue+"/"+vMaincdidvalue);
- // if (codeNodeSize > 0) {
- //
- // datagrid99.nodeset = "/root/init/"+vMaincdidvalue+"/"+vMaincdidvalue;
- //
- // datagrid99.mergecol(2)=false;
- //
- // datagrid99.mergecells = "byrestriccol";
- // }
- //
- fSetDatagrid();
- }
- /**
- * Count List 등록 내역 조회
- *
- */
- function fSelectCodeList(){
- dsf_makeValue(ds_send,"pid" ,"string" , ds_init_pinfo.getColumn(0,"pid"));
- dsf_makeValue(ds_send,"orddd" ,"string" , ds_init_pinfo.getColumn(0,"orddd"));
- dsf_makeValue(ds_send,"cretno" ,"string" , ds_init_pinfo.getColumn(0,"cretno"));
- dsf_makeValue(ds_send,"workflag" ,"string" , ds_init_pinfo.getColumn(0,"workflag"));
- if(utlf_isNull(ds_send.getColumn(0,"workflag"))){
- alert("전달받은 작업 구분자 영역이 없습니다...!")
- return;
- };
- }
- function fSetDatagrid(){
- var vDataGridSize = this.ds_init_A000000002.rowcount;
- for(i=0; i < vDataGridSize; i++){
- if(ds_init_A000000002.getColumn(i,"cdno") == "000000001"){
- // datagrid99.cellstyle("background-color", i, 1, i, 3) = "#CEEBFF";
- for(var colno = 0; colno < datagrid99.getCellCount("Head"); colno++)
- {
- datagrid99.setCellProperty("body",colno,"background","color:EXPR(getColumn(currow,'cdno')=='000000001'?'#CEEBFF')");
- }
- if(ds_init_A000000002.getColumn(i,"refcdno") == "000000001"){
- //datagrid99.valueMatrix(i,2) ="true";
- ds_init_A000000002.setColumn(i,"selectedSub","1");
- }
-
- }
-
- }
-
- }
- function fOnClickOkBtn(){
- var gridRows = this.ds_init_A000000002.rowcount;
- var vAllCarePlan = "";
- var checkedRow = 0;
- for(i=0; i<gridRows;i++ )
- {
- var checkYn = ds_init_A000000002.getColumn(i,"selectedSub");
- if(checkYn=="1"){
- checkedRow = checkedRow +1;
- var vProblem = ds_init_A000000002.getColumn(i,"cdnm");
- var vCarePlan = ds_init_A000000002.getColumn(i,"refcdnm");
- if(utlf_isNull(vAllCarePlan)){
- vAllCarePlan = vAllCarePlan +vProblem+"▦"+vCarePlan
- }else{
- vAllCarePlan = vAllCarePlan+"▩"+vProblem+"▦"+vCarePlan
- }
- }
- }
- if(checkedRow==0)
- {
- alert("선택 된 상용구가 없습니다...!");
- }else
- {
- if (frmf_isPopup()) {
- opener.frmf_setParameter("SPMRJ09900_careplan",vAllCarePlan);
- opener.frmf_setParameter("SPMRJ09900_clickbtn","ok");
- this.close();
- }else
- {
- frmf_setParameter("SPMRJ09900_careplan",vAllCarePlan);
- frmf_setParameter("SPMRJ09900_clickbtn","ok");
- }
- }
- }
- function fCheckedGrd(){
- var currRow = ds_init_A000000002.rowposition;
- var checkedYn = ds_init_A000000002.getColumn(currRow,"selectedSub");
- var checkedRowValue = ds_init_A000000002.getColumn(currRow,"refcdno");
- var colEnableCol = "";
- var colEnableYN = "";
- var rowDefaultValue = "";
- if(checkedYn=="true"){
- colEnableYN = "true";
- colEnableCol = "#FFFFFF";
- rowDefaultValue = "";
- }else{
- colEnableYN = "false";
- colEnableCol = "#DDDDDD";
- rowDefaultValue = "직접입력(free text)";
- }
- if(checkedRowValue=="999999999"){
- datagrid99.cellAttribute("disabled", currRow, 3 ) = colDisabledYN;
- datagrid99.cellstyle("background-color", currRow, 3) = colDisabledCol;
- ds_init_A000000002.setColumn(currRow,"refcdnm",rowDefaultValue);
- }
- }
- function fClose(){
- opener.frmf_setParameter("SPMRJ09900_clickbtn","");
- this.close();
- }
- function fOnClickAddInstance(){
- var gridRows = datagrid99.rows;
- var checkedRow = 0;
- for(i=1; i<gridRows;i++ )
- {
- var checkYn = datagrid99.valueMatrix(i,2);
- if(checkYn=="true"){
- checkedRow = checkedRow+1;
- var vProblem = datagrid99.valueMatrix(i,1);
- var vCarePlan = datagrid99.valueMatrix(i,3);
- datagrid1.addRow();
- var cur_row = datagrid1.row;
- datagrid1.valueMatrix(cur_row, 1) = vProblem;
- datagrid1.valueMatrix(cur_row, 2) = vCarePlan;
- }
- }
- model.refresh();
- if(checkedRow==0)
- {
- alert("선택 된 상용구가 없습니다...!");
- return;
- }
- fSendComnUse();
- }
- function fSendComnUse(){
- if(frmf_checkOpener()){
-
- var nodepath = opener.frmf_getParameter("SSPMRJ09900_nodepath");
-
- alert(nodepath);
- if(utlf_isNull(nodepath)){
- // window.close();
- return;
- }else{
- var selectnode = opener.instance1.selectSingleNode(nodepath);
- if(selectnode == null){
- // window.close();
- return;
- }
- opener.model.copyNode(nodepath, root.temp.comnuselists);
- }
- opener.frmf_setParameter("SPMRJ09900_clickbtn", "ok");
- }else{
- sysf_messageBox("상위화면이 변경되어 데이터를 전달", "E001");
- }
- this.close();
- }
- ]]></Script>
- </Form>
- </FDL>
|