123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216 |
- <?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>미처방 사유 선택</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <send>
- <cond1/>
- </send>
- <hardcd>
- <hardcd>
- <status/>
- <hardcd/>
- <hardcdnm/>
- <resncmt/>
- </hardcd>
- </hardcd>
- <selectedresn>
- <code/>
- <resn/>
- </selectedresn>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- var sPara = opener.javascript.getParameter("SPMMO21900_hardcdno");
-
- model.setValue ( "/root/send/cond1", opener.javascript.getParameter("SPMMO21900_hardcdno"));
- caption1.attribute("text")= opener.javascript.getParameter("SPMMO21900_title");
- submit("TRMMB16401" );
- ]]>
- </script>
- <submission id="TRMMB16401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hardcd"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
- <script type="javascript">
- <![CDATA[
- //===============================================================================================
- // getNodesValue
- //===============================================================================================
- function getNodesValue(oNodeList, nIndex, sName) {
- var sRtn = "";
-
- if (Object.prototype.toString.call(oNodeList.item(nIndex)) == "[object Object]") {
- for (var i=0; i < oNodeList.item(nIndex).childNodes.length; i++) {
- if (Object.prototype.toString.call(oNodeList.item(nIndex).childNodes.item(i).nodeName) == "[object String]") {
- if (oNodeList.item(nIndex).childNodes.item(i).nodeName == sName){
- sRtn = oNodeList.item(nIndex).childNodes.item(i).nodeValue;
- break;
- }
- }
- }
- }
-
- return sRtn;
- }
-
- function fSelectResn() {
-
- var currow = grd_resnlist.row;
- var srchLength = model.instances(0).selectNodes( "/root/hardcd/hardcd" ).length;
-
- if ( grd_resnlist.col != grd_resnlist.colref("status")) {
- if ( model.getValue ( "/root/hardcd/hardcd[" + currow + "]/status" ) == "N" ) {
- model.setValue ( "/root/hardcd/hardcd[" + currow + "]/status", "Y" )
- } else {
- model.setValue ( "/root/hardcd/hardcd[" + currow + "]/status", "N" )
- return;
- }
- }
-
- if ( model.getValue ( "/root/hardcd/hardcd[" + currow + "]/status" ) == "Y" ) {
- for ( var i = 1; i < grd_resnlist.rows; i++ ) {
- if ( i != currow ) {
- model.setValue ( "/root/hardcd/hardcd[" + i + "]/status", "N" )
- }
- }
-
- for ( var i =1; i <= srchLength ; i ++ ) {
- if ( model.getValue ( "/root/result/spclhdrugprcplist[" + i + "]/status" ) == "Y" ) {
- model.setValue ( "/root/result/spclhdrugprcplist[" + i + "]/resncd", model.getValue ( "/root/hardcd/hardcd[" + currow + "]/hardcd" ));
- var resncnts = "instcd|pid|orddd|cretno|ordtype|orddeptcd|prcpdd|prcpno|prcphistno|resnflag|resncd|resncnts|payflagcd^" ;
- var pid = opener.model.getValue( "/root/paminfo/list/pid");
- var prcpgenrflag = opener.model.getValue ( "/root/patflag/list/prcpgenrflag" );
- var orddd = "";
- if ( prcpgenrflag == "O" ) {
- orddd = opener.model.getValue( "/root/paminfo/list/orddd");
- } else {
- orddd = opener.model.getValue( "/root/paminfo/list/indd");
- }
- var cretno = opener.model.getValue( "/root/paminfo/list/cretno");
- var orddeptcd = opener.model.getValue( "/root/paminfo/list/orddeptcd");
- var chkresncnts = '-'
- var chkresncd = model.getValue ( "/root/hardcd/hardcd[" + currow + "]/hardcd" );
- var instcd = getUserInfo("dutplceinstcd") ;
- resncnts = resncnts + instcd + "|" + pid + "|" + orddd + "|" + cretno + "|" + prcpgenrflag + "|" + orddeptcd + "|-|0|0|010|" + chkresncd + "|" + model.getValue ( "/root/hardcd/hardcd[" + currow + "]/hardcdnm" ) + "^";
- model.setValue ( "/root/result/spclhdrugprcplist[" + i + "]/saveresncnt", resncnts );
- model.setValue ( "/root/result/spclhdrugprcplist[" + i + "]/resncnt", model.getValue ( "/root/hardcd/hardcd[" + currow + "]/hardcdnm" ));
- }
- }
- } else {
- for ( var i =1; i <= srchLength; i ++ ) {
- if ( model.getValue ( "/root/result/spclhdrugprcplist[" + i + "]/status" ) == "Y" ) {
- model.setValue ( "/root/result/spclhdrugprcplist[" + i + "]/resncd", "-");
-
- var resncnts = "instcd|pid|orddd|cretno|ordtype|orddeptcd|prcpdd|prcpno|prcphistno|resnflag|resncd|resncnts|payflagcd^" ;
- var pid = opener.model.getValue( "/root/paminfo/list/pid");
- var prcpgenrflag = opener.model.getValue ( "/root/patflag/list/prcpgenrflag" );
- var orddd = "";
- if ( prcpgenrflag == "O" ) {
- orddd = opener.model.getValue( "/root/paminfo/list/orddd");
- } else {
- orddd = opener.model.getValue( "/root/paminfo/list/indd");
- }
- var cretno = opener.model.getValue( "/root/paminfo/list/cretno");
- var orddeptcd = opener.model.getValue( "/root/paminfo/list/orddeptcd");
-
- var chkresncnts = '-'
- var chkresncd = model.getValue ( "/root/hardcd/hardcd[" + currow + "]/hardcd" );
- var instcd = getUserInfo("dutplceinstcd") ;
- resncnts = resncnts + instcd + "|" + pid + "|" + orddd + "|" + cretno + "|" + prcpgenrflag + "|" + orddeptcd + "|-|0|0|010|" + chkresncd + "|" + model.getValue ( "/root/hardcd/hardcd[" + currow + "]/hardcdnm" ) + "^";
- model.setValue ( "/root/result/spclhdrugprcplist[" + i + "]/saveresncnt", "-" );
- model.setValue ( "/root/result/spclhdrugprcplist[" + i + "]/resncnt", "-" );
- }
- }
- }
- grd_prcperrlist.refresh();
- model.recalculate();
- //}
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="730" pageheight="340" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <button id="btn_save" class="btn4_letter4" style="left:549px; top:306px; width:80px; height:22px; ">
- <caption>계속저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var sSelHardCd = "";
- var sSelResnCmt = "";
-
- var oSelNode = model.instances(0).selectNodes( "/root/hardcd/hardcd[status='Y']" );
- if( oSelNode.length == 1 ) {
- sSelHardCd = getNodesValue(oSelNode, 0, "hardcd");
- if (sSelHardCd == "999") { // 기타 선택시
- if (getNodesValue(oSelNode, 0, "resncmt") == "") {
- messageBox ( "기타사유 선택시 상세사유을 입력", "I008" );
- return;
- }
-
- sSelResnCmt = getNodesValue(oSelNode, 0, "hardcdnm") + ":" + getNodesValue(oSelNode, 0, "resncmt");
- } else {
- sSelResnCmt = getNodesValue(oSelNode, 0, "hardcdnm");
- }
- opener.javascript.setParameter ( "SPMMO21900_resncode", sSelHardCd );
- opener.javascript.setParameter ( "SPMMO21900_resncmt", sSelResnCmt );
- } else {
- messageBox ( "미처방 사유는 하나만 선택", "I006" );
- return;
- }
- opener.javascript.setParameter ( "SPMMO21900_rtn1", "Y" );
- window.close();
- ]]>
- </script>
- </button>
- <caption id="caption1" class="tit_2" style="left:5px; top:2px; width:302px; height:14px; ">미처방 사유 선택</caption>
- <line id="line7" class="line_1" style="x1:3px; y1:18px; x2:710px; y2:17px; "/>
- <caption id="caption2" style="left:285px; top:308px; width:260px; height:20px; color:#ff0000; ">* 누락된 처방이 있습니다. 저장하시겠습니까 ?</caption>
- <button id="button2" class="btn4_letter4" style="left:633px; top:306px; width:80px; height:22px; ">
- <caption>처방취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- opener.javascript.setParameter ( "SPMMO21900_rtn1", "N" );
- window.close();
- ]]>
- </script>
- </button>
- <datagrid id="grd_resnlist" nodeset="/root/hardcd/hardcd" autoresize="true" caption="선택^코드^사유^상세사유" colsep="^" colwidth="30, 50, 403, 202" dataheight="23" ellipsis="true" rowheight="23" rowsep="|" tooltip="true" style="left:3px; top:21px; width:707px; height:278px; ">
- <col checkvalue="Y,N" ref="status" type="checkbox"/>
- <col ref="hardcd" style="text-align:center; "/>
- <col ref="hardcdnm"/>
- <col imemode="hangul" ref="resncmt" type="input"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var currow = grd_resnlist.row;
-
- if (currow >= grd_resnlist.fixedRows && grd_resnlist.col != grd_resnlist.colref("status")) {
- if ( model.getValue ( "/root/hardcd/hardcd[" + currow + "]/status" ) == "Y" ) {
- model.setValue ( "/root/hardcd/hardcd[" + currow + "]/status", "N" );
- } else {
- model.setValue ( "/root/hardcd/hardcd[" + currow + "]/status", "Y" );
- }
- grd_resnlist.refresh();
- }
-
- // 기타 선택시만 상세 내용 입력 하도록
- if (grd_resnlist.colref("resncmt") != -1 && model.getValue("/root/hardcd/hardcd[" + currow + "]/hardcd")=="999"){
- if ( model.getValue ( "/root/hardcd/hardcd[" + currow + "]/status" ) == "Y" ) {
- grd_resnlist.col = grd_resnlist.colref("resncmt");
- grd_resnlist.editCell();
- } else {
- model.setValue ( "/root/hardcd/hardcd[" + currow + "]/resncmt", "" );
- }
- }
- ]]>
- </script>
- </datagrid>
- </xhtml:body>
- </xhtml:html>
|