123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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>Untitle</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <signSaveData>
- <saveDataList>
- <stmtspec/>
- <attrinfo/>
- <status/>
- <origincd/>
- <stmtcd>--------</stmtcd>
- <dnarflag>3A</dnarflag>
- <recoriginflag/>
- <recdtflag/>
- <recdt/>
- <pid/>
- <indd/>
- <cretno/>
- <instcd/>
- <ioflag/>
- <orddeptcd/>
- <recflag/>
- <reclnkkey/>
- <diagstmtcd/>
- <orddd/>
- <dnarnm/>
- <usernm/>
- <deptflagnm/>
- </saveDataList>
- </signSaveData>
- <recinfo/>
- </main>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- var savePath= "/root/main/signSaveData/saveDataList";
- var recPath="/root/main/recinfo/reclist";
- var nrsRecPath="/root/main/recinfo/nursreclist";
-
- var savePath2= "/root/temp/signSaveData/saveDataList";
-
- var recrslt="";
- var prcpvol="";
- var recdd = "";
- var rectm="";
- var prcpnm2 = "";
-
- var pid = opener.javascript.getParameter("pid");
- var indd = opener.javascript.getParameter("indd");
- var cretno = opener.javascript.getParameter("cretno");
- var ordtype = opener.javascript.getParameter("ordtype");
- var orddeptcd = opener.javascript.getParameter("orddeptcd");
- var orddrid = opener.javascript.getParameter("orddrid");
- var orddd = opener.javascript.getParameter("orddd");
-
- if(ordtype == "I" || ordtype=="E" || ordtype=="D") {
- orddd="-";
- }
-
- if(ordtype == "O" || ordtype=="S") {
- indd ="-";
- }
- var cnt = 0;
-
- for (var i = 1; i <= getNodesetCount("/root/main/recinfo/nursreclist"); i++) {
-
- model.makeNode(savePath + "["+ i +"]");
- model.makeValue(savePath + "[" + i +"]/stmtspec", model.getValue(nrsRecPath+ "[" + i + "]/stmtspec") );
- model.makeValue(savePath + "[" + i + "]/status" , "U");
- model.makeValue(savePath + "[" + i + "]/attrinfo" , "");
- model.makeValue(savePath + "[" + i + "]/origincd" , model.getValue(nrsRecPath+ "[" + i + "]/origincd"));
- model.makeValue(savePath + "[" + i + "]/stmtcd" , model.getValue(nrsRecPath+ "[" + i + "]/stmtcd"));
- model.makeValue(savePath + "[" + i + "]/dnarflag" , model.getValue(nrsRecPath+ "[" + i + "]/dnarflag"));
- model.makeValue(savePath + "[" + i + "]/recoriginflag", model.getValue(nrsRecPath+ "[" + i + "]/recoriginflag"));
- model.makeValue(savePath + "[" + i + "]/recdtflag" , 'U');
- model.makeValue(savePath + "[" + i + "]/recdt" , model.getValue(nrsRecPath+ "[" + i + "]/recdd") + model.getValue(nrsRecPath+ "[" + i + "]/rectm"));
- model.makeValue(savePath + "[" + i + "]/pid" , model.getValue(nrsRecPath+ "[" + i + "]/pid"));
- model.makeValue(savePath + "[" + i + "]/indd" , model.getValue(nrsRecPath+ "[" + i + "]/indd"));
- model.makeValue(savePath + "[" + i + "]/cretno" , model.getValue(nrsRecPath+ "[" + i + "]/cretno"));
- model.makeValue(savePath + "[" + i + "]/instcd" , getUserInfo("dutplceinstcd"));
- model.makeValue(savePath + "[" + i + "]/ioflag" , ordtype);
- model.makeValue(savePath + "[" + i + "]/orddeptcd" , orddeptcd);
- model.makeValue(savePath + "[" + i + "]/recflag" , model.getValue(nrsRecPath+ "[" + i + "]/recflag"));
- model.makeValue(savePath + "[" + i + "]/reclnkkey" , model.getValue(nrsRecPath+ "[" + i + "]/reclnkkey"));
- model.makeValue(savePath + "[" + i + "]/diagstmtcd" , "");
- model.makeValue(savePath + "[" + i + "]/orddd" , model.getValue(nrsRecPath+ "[" + i + "]/outdd"));
- model.makeValue(savePath + "[" + i + "]/dnarnm" , "");
- model.makeValue(savePath + "[" + i + "]/usernm" , getUserInfo("usernm"));
- model.makeValue(savePath + "[" + i + "]/deptflagnm" , "[혈당]");
-
- cnt++;
- }
-
-
-
- for (var i = 1; i <= getNodesetCount("/root/main/recinfo/reclist"); i++) {
- recrslt = model.getValue(recPath + "[" + i + "]/recrslt");
- prcpvol = model.getValue(recPath + "[" + i + "]/prcpvol");
- recdd = model.getValue(recPath + "[" + i + "]/recdd");
- rectm = model.getValue(recPath + "[" + i + "]/rectm");
- prcpnm2= model.getValue(recPath + "[" + i + "]/prcpnm2");
-
- model.makeNode(savePath + "["+ cnt + i +"]");
-
- if(recrslt != '-' && trim(prcpnm2) != "" && trim(prcpvol) != ""){
- model.makeValue(savePath + "["+ cnt + i +"]/stmtspec", "혈당 검사 결과 " + recrslt + "mg/dl 측정되어 " + prcpnm2 + " " + prcpvol + "u주사 투여함." );
- }else if (recrslt != '-' && (trim(prcpnm2) == "" && trim(prcpvol) == "")){
- model.makeValue(savePath + "["+ cnt + i +"]/stmtspec", "혈당 검사 결과 " + recrslt + "mg/dl 측정됨." );
- }else if (recrslt == '-' && trim(prcpnm2) != "" && trim(prcpvol) != ""){
- model.makeValue(savePath + "["+ cnt + i +"]/stmtspec", prcpnm2 + " " + prcpvol + "u주사 투여함." );
- }
-
- model.makeValue(savePath + "[" + cnt + i + "]/status" , "I");
- model.makeValue(savePath + "[" + cnt + i + "]/attrinfo" , "");
- model.makeValue(savePath + "[" + cnt + i + "]/origincd" , "00000841");
- model.makeValue(savePath + "[" + cnt + i + "]/stmtcd" , "--------");
- model.makeValue(savePath + "[" + cnt + i + "]/dnarflag" , "3A");
- model.makeValue(savePath + "[" + cnt + i + "]/recoriginflag", "T");
- model.makeValue(savePath + "[" + cnt + i + "]/recdtflag" , "A");
-
- model.makeValue(savePath + "[" + cnt + i + "]/recdt" , recdd + rectm);
- model.makeValue(savePath + "[" + cnt + i + "]/pid" , pid);
- model.makeValue(savePath + "[" + cnt + i + "]/indd" , indd);
- model.makeValue(savePath + "[" + cnt + i + "]/cretno" , cretno);
- model.makeValue(savePath + "[" + cnt + i + "]/instcd" , getUserInfo("dutplceinstcd"));
- model.makeValue(savePath + "[" + cnt + i + "]/ioflag" , ordtype);
- model.makeValue(savePath + "[" + cnt + i + "]/orddeptcd" , orddeptcd);
- model.makeValue(savePath + "[" + cnt + i + "]/recflag" , "B");
- model.makeValue(savePath + "[" + cnt + i + "]/reclnkkey" , pid+","+(orddd == "-" ? indd : orddd )+","+cretno+","+getUserInfo("dutplceinstcd")+",B,015");
- model.makeValue(savePath + "[" + cnt + i + "]/diagstmtcd" , "");
- model.makeValue(savePath + "[" + cnt + i + "]/orddd" , "-");
- model.makeValue(savePath + "[" + cnt + i + "]/dnarnm" , "");
- model.makeValue(savePath + "[" + cnt + i + "]/usernm" , getUserInfo("usernm"));
- model.makeValue(savePath + "[" + cnt + i + "]/deptflagnm" , "[혈당]");
- }
-
- for (var i = 1; i <= getNodesetCount("/root/main/recinfo/reclist"); i++) {
- recrslt = model.getValue(recPath + "[" + i + "]/recrslt");
- prcpvol = model.getValue(recPath + "[" + i + "]/prcpvol");
- recdd = model.getValue(recPath + "[" + i + "]/recdd");
- rectm = model.getValue(recPath + "[" + i + "]/rectm");
- prcpnm2= model.getValue(recPath + "[" + i + "]/prcpnm2");
-
- model.makeNode(savePath2 + "["+ i +"]");
-
- if(recrslt != '-' && trim(prcpnm2) != "" && trim(prcpvol) != ""){
- model.makeValue(savePath2 + "["+ i +"]/stmtspec", "혈당 검사 결과 " + recrslt + "mg/dl 측정되어 " + prcpnm2 + " " + prcpvol + "u주사 투여함." );
- }else if (recrslt != '-' && (trim(prcpnm2) == "" && trim(prcpvol) == "")){
- model.makeValue(savePath2 + "["+ i +"]/stmtspec", "혈당 검사 결과 " + recrslt + "mg/dl 측정됨." );
- }else if (recrslt == '-' && trim(prcpnm2) != "" && trim(prcpvol) != ""){
- model.makeValue(savePath2 + "["+ i +"]/stmtspec", prcpnm2 + " " + prcpvol + "u주사 투여함." );
- }
-
- model.makeValue(savePath2 + "[" + i + "]/status" , "I");
- model.makeValue(savePath2 + "[" + i + "]/attrinfo" , "");
- model.makeValue(savePath2 + "[" + i + "]/origincd" , "00005858");
- model.makeValue(savePath2 + "[" + i + "]/stmtcd" , "--------");
- model.makeValue(savePath2 + "[" + i + "]/dnarflag" , "3A");
- model.makeValue(savePath2 + "[" + i + "]/recoriginflag", "T");
- model.makeValue(savePath2 + "[" + i + "]/recdtflag" , "U");
-
- model.makeValue(savePath2 + "[" + i + "]/recdt" , recdd + rectm);
- model.makeValue(savePath2 + "[" + i + "]/pid" , pid);
- model.makeValue(savePath2 + "[" + i + "]/indd" , indd);
- model.makeValue(savePath2 + "[" + i + "]/cretno" , cretno);
- model.makeValue(savePath2 + "[" + i + "]/instcd" , getUserInfo("dutplceinstcd"));
- model.makeValue(savePath2 + "[" + i + "]/ioflag" , ordtype);
- model.makeValue(savePath2 + "[" + i + "]/orddeptcd" , orddeptcd);
- model.makeValue(savePath2 + "[" + i + "]/recflag" , "B");
- model.makeValue(savePath2 + "[" + i + "]/reclnkkey" , pid+","+(orddd == "-" ? indd : orddd )+","+cretno+","+getUserInfo("dutplceinstcd")+",B,015");
- model.makeValue(savePath2 + "[" + i + "]/diagstmtcd" , "");
- model.makeValue(savePath2 + "[" + i + "]/orddd" , "-");
- model.makeValue(savePath2 + "[" + i + "]/dnarnm" , "");
- model.makeValue(savePath2 + "[" + i + "]/usernm" , getUserInfo("usernm"));
- model.makeValue(savePath2 + "[" + i + "]/deptflagnm" , "[혈당]");
- }
-
- var node = instance1.selectNodes(savePath2);
- var csv = getNodeListCSV(node);
-
- Sign.certchkflag = "N";
- if(Sign.signprocess() ){
- opener.javascript.setParameter("nodeinfo", csv);
- opener.javascript.setParameter("signbfcnts", Sign.signedInfos[1]);
- opener.javascript.setParameter("signaftcnts", Sign.signedInfos[2]);
- window.close();
- }
- ]]>
- </script>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../emr/carecomweb/js/ENRSignEngine.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
- <script type="javascript">
- <![CDATA[
- function fMake_SignData() {
- Sign.addnode("/root/main/signSaveData");
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="0" pageheight="0" style="border-color:#c7a3cf; "/>
- </xhtml:html>
|