123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>CARE PLAN</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <cond>
- <fromdd/>
- <todd/>
- <dnarflag>3A</dnarflag>
- <sortseq>A</sortseq>
- <recsrchflag>NR</recsrchflag>
- <recusrid>%</recusrid>
- <pid/>
- <orddd/>
- <cretno/>
- <ioflag/>
- <origincd/>
- <diagstmtcd/>
- <recverno/>
- </cond>
- <recinfo/>
- </main>
- <send/>
- <init>
- <dnarflag>
- <itemset>
- <itemcd>%</itemcd>
- <itemnm>전체</itemnm>
- </itemset>
- <itemset>
- <itemcd>1D</itemcd>
- <itemnm>D</itemnm>
- </itemset>
- <itemset>
- <itemcd>3A</itemcd>
- <itemnm>A</itemnm>
- </itemset>
- <itemset>
- <itemcd>4R</itemcd>
- <itemnm>R</itemnm>
- </itemset>
- </dnarflag>
- <dnarflagnurs>
- <itemset>
- <itemcd>%</itemcd>
- <itemnm>전체</itemnm>
- </itemset>
- <itemset>
- <itemcd>1D</itemcd>
- <itemnm>D</itemnm>
- </itemset>
- <itemset>
- <itemcd>2N</itemcd>
- <itemnm>N</itemnm>
- </itemset>
- <itemset>
- <itemcd>3A</itemcd>
- <itemnm>A</itemnm>
- </itemset>
- <itemset>
- <itemcd>4R</itemcd>
- <itemnm>R</itemnm>
- </itemset>
- </dnarflagnurs>
- <recusrinfo/>
- </init>
- </root>
- </instance>
- <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript">
- <![CDATA[
- function fInit(){
-
- grd_careplaninfo.fixedcellcheckbox(0, grd_careplaninfo.colRef("check") ) = true;
- grd_careplaninfo.mergeCells = "byrestriccol";
- grd_careplaninfo.mergeCol( grd_careplaninfo.colRef("carerecno") ) =true;
- grd_careplaninfo.mergeCol( grd_careplaninfo.colRef("diagstmtnm") ) =true;
- grd_careplaninfo.mergeCol( grd_careplaninfo.colRef("check") ) = false;
- grd_careplaninfo.mergeCol( grd_careplaninfo.colRef("recdd") ) =false;
- grd_careplaninfo.mergeCol( grd_careplaninfo.colRef("rectm") ) =false;
- grd_careplaninfo.mergeCol( grd_careplaninfo.colRef("dnar") ) =false;
- grd_careplaninfo.mergeCol( grd_careplaninfo.colRef("stmtspec") ) =false;
- grd_careplaninfo.mergeCol( grd_careplaninfo.colRef("fstrgstrnm") ) =false;
-
- var SPMRJ00500_diaginfo = opener.javascript.getParameter("SPMRJ00500_diaginfo");// diagstmtcd^origincd |
- var SPMRJ00500_paminfo = opener.javascript.getParameter("SPMRJ00500_paminfo");// pid^indd^orddd^cretno^ioflag^
-
-
- var arrDiagInfoCnt = SPMRJ00500_diaginfo.split("|").length -1 ;
- var diagstmtcd = "";
- var origincd = "";
- var recverno = "";
-
- //function getArrayData(pData, pRow, pCol, pRowSep, pColSep){ CareCom.js
- for ( var idx = 0 ; idx < arrDiagInfoCnt ; idx++ ){
- if ( idx == 0 ){
- diagstmtcd = "'"+ getArrayData(SPMRJ00500_diaginfo, idx ,0,"|","^")+"'";
- origincd = "'"+ getArrayData(SPMRJ00500_diaginfo, idx ,1,"|","^")+"'";
- recverno = "'"+ getArrayData(SPMRJ00500_diaginfo, idx ,2,"|","^")+"'";
- }else{
- diagstmtcd += ",'"+ getArrayData(SPMRJ00500_diaginfo, idx ,0,"|","^")+"'";
- origincd += ",'"+ getArrayData(SPMRJ00500_diaginfo, idx ,1,"|","^")+"'";
- recverno += ",'"+ getArrayData(SPMRJ00500_diaginfo, idx ,2,"|","^")+"'";
- }
- }
- model.setValue("/root/main/cond/diagstmtcd", diagstmtcd );
- model.setValue("/root/main/cond/origincd", origincd );
- model.setValue("/root/main/cond/recverno", recverno );
-
- model.setValue("/root/main/cond/pid", getArrayData(SPMRJ00500_paminfo, 0,0,"|","^") );
- model.setValue("/root/main/cond/orddd", getArrayData(SPMRJ00500_paminfo, 0,1,"|","^") );
- model.setValue("/root/main/cond/cretno", getArrayData(SPMRJ00500_paminfo, 0,2,"|","^") );
- model.setValue("/root/main/cond/ioflag", getArrayData(SPMRJ00500_paminfo, 0,3,"|","^") );
- model.setValue("/root/main/cond/fromdd", getCurrentDate().toDate().getAddDate(-1,"M").getDateFormat());
- model.setValue("/root/main/cond/todd", getCurrentDate() );
- model.setValue("/root/main/cond/dnarflag", "%");
-
- fSearchRecInfo();
-
-
- model.refresh();
- }
-
- function fSearchRecInfo(){
- model.removenode("/root/send");
- var sSrchHeader = "pid▦indd▦orddd▦cretno▦ioflag▦fromdd▦todd▦dnarflag▦sortseq▦recflag▦reclnkkey▦carediagflag▦recsrchflag▦recusrid▦diagstmtcd▦origincd▦recverno▩";
- var sSrchData = model.getValue("/root/main/cond/pid") +"▦"
- + model.getValue("/root/main/cond/orddd") +"▦"
- + "-▦"
- + model.getValue("/root/main/cond/cretno") +"▦"
- + model.getValue("/root/main/cond/ioflag") +"▦"
- +model.getValue("/root/main/cond/fromdd")+"▦"
- +model.getValue("/root/main/cond/todd")+"▦"
- +model.getValue("/root/main/cond/dnarflag")+"▦"
- +model.getValue("/root/main/cond/sortseq")+"▦"
- +"G▦"
- +"▦"
- +"▦"
- +"NR▦"
- +model.getValue("/root/main/cond/recusrid")+"▦"
- +model.getValue("/root/main/cond/diagstmtcd")+"▦"
- +model.getValue("/root/main/cond/origincd")+"▦"
- +model.getValue("/root/main/cond/recverno")+ "▩";
- model.makeValue("/root/send/srchinfo",sSrchHeader+sSrchData );
-
- if(submit("TRMNR00704")){
- if(getNodesetCount("/root/main/recinfo/usersetlist")>0 ){
- model.removenodeset("/root/init/recusrinfo/usersetlist");
- model.makeNode("/root/init/recusrinfo/usersetlist");
- copyNodeset("/root/init/recusrinfo/usersetlist","/root/main/recinfo/usersetlist");
- cmb_recusr.refresh();
- }
- var sRecVerNo = "";
- var sDiagStmtNm = "";
- var sFstRgstRid = "";
-
- for(var iRow=1; iRow<=getNodesetCount("/root/main/recinfo/nursingrecordlist"); iRow++){
- sRecVerNo = model.getValue("/root/main/recinfo/nursingrecordlist["+iRow+"]/recverno");
- sDiagStmtNm = model.getValue("/root/main/recinfo/nursingrecordlist["+iRow+"]/diagstmtnm");
-
- if ( !isNull(sRecVerNo) ){
- model.setValue("/root/main/recinfo/nursingrecordlist["+iRow+"]/diagstmtnm",getArrayData(sDiagStmtNm,0,1,'|','^') );
- model.makeValue("/root/main/recinfo/nursingrecordlist["+iRow+"]/diagcarerecno", getArrayData(sDiagStmtNm,0,0,'|','^') );
- }
-
- sFstRgstRid = model.getValue("/root/main/recinfo/nursingrecordlist["+iRow+"]/fstrgstrid");
- if ( sFstRgstRid != getUserId() ){
- grd_careplaninfo.isReadOnly( iRow, grd_careplaninfo.colRef("stmtspec")) = true;
- }else {
- grd_careplaninfo.isReadOnly( iRow, grd_careplaninfo.colRef("stmtspec")) = false;
- }
- }
- }
- model.refresh();
- }
-
- function fSaveCarePlan(){
- model.removenode("/root/send");
- var xNursRecPath = "/root/main/recinfo/nursingrecordlist";
-
- var sSaveHeader = "m▦instcd▦careplanseq▦pid▦orddd▦cretno▦workflag▦problem▦careplan▦rgstdd▦rgsttm▩";
- var sSaveData ="";
-
- for ( var idx = 1 ; idx <= getNodesetCount(xNursRecPath) ; idx++ ){
- if ( model.getValue(xNursRecPath +"["+ idx + "]/check") == "Y" ) {
- sSaveData += "i▦"
- + getUserInfo("dutplceinstcd") +"▦"
- + "▦"
- + model.getValue("/root/main/cond/pid") +"▦"
- + model.getValue("/root/main/cond/orddd") +"▦"
- + model.getValue("/root/main/cond/cretno") +"▦"
- + "003▦"
- +model.getValue(xNursRecPath + "["+ idx + "]/recverno")+" "+model.getValue(xNursRecPath + "["+ idx + "]/diagstmtnm")+"▦"
- +model.getValue(xNursRecPath + "["+ idx + "]/stmtspec")+"▦"
- +model.getValue(xNursRecPath + "["+ idx + "]/recdd")+"▦"
- +model.getValue(xNursRecPath + "["+ idx + "]/rectm")+ "▩";
- }
- }
-
-
- if ( isNull(sSaveData) ){
- messageBox("저장할 데이타를 ","C002");
- return;
- }
- model.makeValue("/root/send/listdata",sSaveHeader + sSaveData);
-
- if ( submit("TXMRJ00101") ) {
- //datagrid1.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
- messageBox("저장 ","I002");
- }
-
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInit();
- ]]>
- </script>
- <submission id="TRMNR00704" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/recinfo"/>
- <submission id="TXMRJ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden"/>
- </model>
- </xhtml:head>
- <xhtml:body pagewidth="656" pageheight="420" guideline="1,640;" style="margin-left:8; margin-right:8; ">
- <caption id="caption17" class="tit_2" style="left:5px; top:41px; width:137px; height:13px; ">CARE PLAN</caption>
- <group id="grp_sea" style="left:0px; top:6px; width:640px; height:27px; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:640px; height:25px; "/>
- <caption id="caption49" class="search_name" style="left:5px; top:4px; width:86px; height:17px; ">조회일자 :</caption>
- <line id="line22" class="line_4" style="x1:570px; y1:3px; x2:570px; y2:22px; "/>
- <caption id="caption51" style="left:179px; top:4px; width:14px; height:20px; font-weight:bold; ">~</caption>
- <caption id="caption45" class="search_name" style="left:280px; top:5px; width:88px; height:17px; ">조회옵션 :</caption>
- <input id="ipt_srchfromdd" ref="/root/main/cond/fromdd" class="input_search" navindex="1" inputtype="date" style="left:95px; top:3px; width:85px; height:19px; "/>
- <select1 id="cmb_srchdnarflag" ref="/root/main/cond/dnarflag" class="combo_search" navindex="3" appearance="minimal" style="left:364px; top:3px; width:52px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/dnarflag/itemset">
- <label ref="itemnm"/>
- <value ref="itemcd"/>
- </itemset>
- </choices>
- </select1>
- <button id="btn_srchrecinfo" class="btn1_letter2" navindex="6" style="left:578px; top:2px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSearchRecInfo();
- ]]>
- </script>
- </button>
- <input id="ipt_srchtodd" ref="/root/main/cond/todd" class="input_search" navindex="2" inputtype="date" style="left:190px; top:3px; width:85px; height:19px; "/>
- <select1 id="cmb_srchsortseq" ref="/root/main/cond/sortseq" class="combo_search" navindex="4" appearance="minimal" style="left:417px; top:3px; width:84px; height:19px; ">
- <choices>
- <item>
- <label>기록일자↓</label>
- <value>A</value>
- </item>
- <item>
- <label>기록일자↑</label>
- <value>D</value>
- </item>
- </choices>
- </select1>
- <select1 id="cmb_recusr" ref="/root/main/cond/recusrid" class="combo_search" navindex="4" appearance="minimal" style="left:502px; top:3px; width:64px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/recusrinfo/usersetlist">
- <label ref="recusrnm"/>
- <value ref="recusrid"/>
- </itemset>
- </choices>
- </select1>
- </group>
- <datagrid id="grd_careplaninfo" nodeset="/root/main/recinfo/nursingrecordlist" autoresize="true" caption="Problem^Problem^^기록일자^시간^DNAR^Care Plan^작성자^작성자id" colsep="^" colwidth="24, 114, 19, 70, 44, 38, 246, 67, 0" mergecellsfixedrows="bycolrec" rowsep="|" tooltip="true" style="left:0px; top:62px; width:640px; height:348px; ">
- <col ref="recverno" style="font-weight:bold; text-align:center; border-right-width:0; "/>
- <col ref="diagstmtnm"/>
- <col checkvalue="Y,N" ref="check" type="checkbox"/>
- <col ref="recdd" format="yyyy-mm-dd" style="text-align:center; vertical-align:middle; "/>
- <col ref="rectm" format="hh:nn" style="text-align:center; vertical-align:middle; "/>
- <col disabled="true" ref="dnar" type="combo" style="text-align:center; vertical-align:middle; ">
- <choices>
- <itemset nodeset="/root/init/dnarflagnurs/itemset">
- <label ref="itemnm"/>
- <value ref="itemcd"/>
- </itemset>
- </choices>
- </col>
- <col ref="stmtspec" type="input"/>
- <col ref="fstrgstrnm" style="text-align:center; "/>
- <col ref="fstrgstrid" visibility="hidden"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var iRow = grd_careplaninfo.row;
- sFstRgstRid = model.getValue("/root/main/recinfo/nursingrecordlist["+iRow+"]/fstrgstrid");
- if ( sFstRgstRid != getUserId() ){
- grd_careplaninfo.isReadOnly( iRow, grd_careplaninfo.colRef("stmtspec")) = true;
- } else {
- grd_careplaninfo.isReadOnly( iRow, grd_careplaninfo.colRef("stmtspec")) = false;
- }
- ]]>
- </script>
- </datagrid>
- <line id="line1" class="line_1" style="x1:0px; y1:57px; x2:640px; y2:57px; "/>
- <button id="button1" class="btn1_letter2" style="left:578px; top:35px; width:56px; height:22px; ">
- <caption>등록</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSaveCarePlan();
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|