123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391 |
- <?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="">
- <result>
- <comduplprcplist>
- <status/>
- <resncd/>
- <comcls/>
- <prcpcd/>
- <prcpnm/>
- <dupdays/>
- <duplprcpcd/>
- <duplprcpnm/>
- <duplprcpdd/>
- <orddeptnm/>
- <orddrnm/>
- <rgstrnm/>
- <resncnt/>
- <prcpdd/>
- <prcpno/>
- </comduplprcplist>
- </result>
- <send>
- <cond1/>
- </send>
- <hardcd>
- <hardcd>
- <status/>
- <hardcd/>
- <hardcdnm/>
- </hardcd>
- </hardcd>
- <init>
- <selcond1>1</selcond1>
- </init>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-model-construct-done">
- <![CDATA[
- // 보건복지부 고시 제2009-72호. 별표8 제2호 JT012
- if ( model.getValue ( "/root/result/comduplprcplist[1]/prcpdd") >= "20090601" ) {
- model.setValue ( "/root/send/cond1", "96" );
- } else {
- model.setValue ( "/root/send/cond1", "58" );
- }
- submit("TRMMB16401" );
- ]]>
- </script>
- <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
- <submission id="TRMMB16401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hardcd"/>
- <bind id="bind1" ref="/root/hardcd/hardcd/hardcdnm" readonly="../hardcd != 'D7'"/>
- </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[
- function fSelectResn() {
-
- var currow = grd_resnlist.row;
- var srchLength = model.instances(0).selectNodes( "/root/result/comduplprcplist" ).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 {
- return;
- model.setValue ( "/root/hardcd/hardcd[" + currow + "]/status", "N" )
- }
- }
-
- // 보건복지부 고시 제2009-72호. 별표8 제2호 JT012
- if ( model.getValue ( "/root/hardcd/hardcd[" + currow + "]/hardcd" ) == "A" ) {
- for ( var i =1; i <= srchLength ; i ++ ) {
- if ( model.getValue ( "/root/result/comduplprcplist[" + i + "]/status" ) == "Y" ) {
- if ( model.getValue ( "/root/result/comduplprcplist[" + i + "]/prcpdd") >= "20090601" && parseInt(model.getValue ( "/root/result/comduplprcplist[" + i + "]/dupdays")) >30 ) {
- messageBox("[A] 사유로는 최대 30일 까지만 중복처방이 허용됩니다. 총 중복일수는 "+model.getValue ( "/root/result/comduplprcplist[" + i + "]/dupdays")+"일 입니다.", "E");
- return;
- }
- }
- }
- }
-
- //if ( grd_rsrnlist.col == grd_resnlist.colref("status")) {
- 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/comduplprcplist[" + i + "]/status" ) == "Y" ) {
- model.setValue ( "/root/result/comduplprcplist[" + 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|A|" + chkresncd + "|" + model.getValue ( "/root/hardcd/hardcd[" + currow + "]/hardcdnm" ) + "^";
- model.setValue ( "/root/result/comduplprcplist[" + i + "]/saveresncnt", resncnts );
- model.setValue ( "/root/result/comduplprcplist[" + i + "]/resncnt", model.getValue ( "/root/hardcd/hardcd[" + currow + "]/hardcdnm" ));
- }
- }
- } else {
- for ( var i =1; i <= srchLength; i ++ ) {
- if ( model.getValue ( "/root/result/comduplprcplist[" + i + "]/status" ) == "Y" ) {
- model.setValue ( "/root/result/comduplprcplist[" + 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|A|" + chkresncd + "|" + model.getValue ( "/root/hardcd/hardcd[" + currow + "]/hardcdnm" ) + "^";
- model.setValue ( "/root/result/comduplprcplist[" + i + "]/saveresncnt", "-" );
- model.setValue ( "/root/result/comduplprcplist[" + i + "]/resncnt", "-" );
- }
- }
- }
- grd_prcperrlist.refresh();
- model.recalculate();
- //}
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="1002" pageheight="570" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <button id="btn_save" class="btn4_letter4" style="left:819px; top:536px; width:80px; height:22px; ">
- <caption>계속저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var srchLength = model.instances(0).selectNodes( "/root/result/comduplprcplist" ).length;
- var srcNodeListMainLength = opener.model.instances(0).selectNodes( "/root/main/prcp/prcplist" ).length;
-
- for ( var i = 1; i <= srchLength; i++ ) {
- var resncd = model.getvalue ( "/root/result/comduplprcplist[" + i + "]/resncd" );
- var prcpcd = model.getvalue ( "/root/result/comduplprcplist[" + i + "]/prcpcd" );
- var resncnt = model.getvalue ( "/root/result/comduplprcplist[" + i + "]/resncnt" );
-
- if ( resncd == "-" ) {
- messageBox ( "[" + prcpcd + "]"+ " 중복처방 사유가", "I004" );
- return;
- } else if ( resncd == "D7" && resncnt == "기타(직접입력)" ) {
- messageBox ( "[" + prcpcd + "]"+ " 기타 사유가", "I004" );
- return;
- }
- }
- for ( var i = 1; i <= srchLength; i++ ) {
- var saveresncnt = model.getvalue ( "/root/result/comduplprcplist[" + i + "]/saveresncnt" );
- var prcpno = model.getvalue ( "/root/result/comduplprcplist[" + i + "]/prcpno" );
- var resncd = model.getvalue ( "/root/result/comduplprcplist[" + i + "]/resncd" );
-
- for ( var j = 1; j <= srcNodeListMainLength; j++ ) {
- if ( prcpno == opener.model.getValue ( "/root/result/savedrprcplist[" + j + "]/prcpno" )) {
- opener.model.setValue ( "/root/result/savedrprcplist[" + j + "]/tempcol19", saveresncnt );
-
- // 보건복지부 고시 제2009-72호. 별표8 제2호 JT012
- if ( model.getValue ( "/root/result/comduplprcplist[" + i + "]/prcpdd") >= "20090601" && resncd == "E" ) {
- opener.model.setValue ( "/root/result/savedrprcplist[" + j + "]/payflagcd", "1" );
- }
- }
- }
- }
- opener.javascript.setParameter ( "SPMMO16400_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:985px; y2:18px; "/>
- <caption id="caption2" style="left:535px; top:538px; width:278px; height:20px; color:#ff0000; ">* 성분 중복처방이 있습니다. 저장하시겠습니까 ?</caption>
- <datagrid id="grd_prcperrlist" nodeset="/root/result/comduplprcplist" caption="prcpno^선택^사유^성분코드^처방코드^처방명^중복일^중복처방코드^중복처방명^중복처방일^진료과^진료의" colsep="^" colwidth="30, 30, 30, 80, 80, 205, 45, 80, 205, 75, 85, 60" dataheight="23" ellipsis="true" extendlastcol="scroll" mergecells="byrestriccol" rowheight="23" rowsep="|" tooltip="true" style="left:3px; top:23px; width:982px; height:200px; ">
- <col ref="prcpno" visibility="hidden"/>
- <col checkvalue="Y,N" ref="status" type="checkbox"/>
- <col ref="resncd" style="text-align:center; "/>
- <col ref="comcls"/>
- <col ref="prcpcd"/>
- <col ref="prcpnm" type="output"/>
- <col ref="dupdays" style="text-align:center; "/>
- <col ref="duplprcpcd"/>
- <col ref="duplprcpnm"/>
- <col ref="duplprcpdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="orddeptnm" style="text-align:center; "/>
- <col ref="orddrnm" style="text-align:center; "/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if ( grd_prcperrlist.col == grd_prcperrlist.colRef ( "status" )) {
- var currow = grd_prcperrlist.row;
- var srcNodeList = model.instances(0).selectNodes( "/root/result/comduplprcplist" );
- var status = model.getValue ( "/root/result/comduplprcplist[" + currow + "]/status" );
- for ( var i= currow; i<=srcNodeList.length; i++ ) {
- var j = i + 1;
- var currprcpno = model.getValue ( "/root/result/comduplprcplist[" + i + "]/prcpno" );
- var nextprcpno = model.getValue ( "/root/result/comduplprcplist[" + j + "]/prcpno" );
- if (currprcpno == nextprcpno) {
- model.setValue("/root/result/comduplprcplist[" + j + "]/status", status) ;
- } else {
- break;
- }
- }
- }
- model.refresh();
- ]]>
- </script>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var currow = grd_prcperrlist.row;
- if( currow > 0 && currow <= grd_resnlist.rows ){
- var srchLength = model.instances(0).selectNodes( "/root/result/comduplprcplist" ).length;
- if ( grd_prcperrlist.col != grd_prcperrlist.colRef ( "status" )) {
- if ( model.getValue ( "/root/result/comduplprcplist[" + currow + "]/status" ) == "Y" ) {
- model.setValue ( "/root/result/comduplprcplist[" + currow + "]/status", "N" )
- } else {
- model.setValue ( "/root/result/comduplprcplist[" + currow + "]/status", "Y" )
- }
- var status = model.getValue ( "/root/result/comduplprcplist[" + currow + "]/status" );
- var currprcpno = model.getValue ( "/root/result/comduplprcplist[" + currow + "]/prcpno" );
- for ( var i= 1; i<=srchLength; i++ ) {
- var nextprcpno = model.getValue ( "/root/result/comduplprcplist[" + i + "]/prcpno" );
- if (currprcpno == nextprcpno) {
- model.setValue("/root/result/comduplprcplist[" + i + "]/status", status) ;
- }
- }
- }
- model.refresh()
- }
- ]]>
- </script>
- </datagrid>
- <button id="button2" class="btn4_letter4" style="left:903px; top:536px; width:80px; height:22px; ">
- <caption>처방취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- opener.javascript.setParameter ( "SPMMO16400_rtn1", "N" );
- window.close();
- ]]>
- </script>
- </button>
- <datagrid id="grd_resnlist" nodeset="/root/hardcd/hardcd" caption="선택^코드^상세사유" colsep="^" colwidth="30, 35, 877" dataheight="23" ellipsis="true" extendlastcol="scroll" rowheight="23" rowsep="|" tooltip="true" style="left:3px; top:251px; width:982px; height:278px; ">
- <col checkvalue="Y,N" ref="status" type="checkbox" visibility="hidden"/>
- <col ref="hardcd" style="text-align:center; "/>
- <col ref="hardcdnm" type="input"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if( grd_resnlist.row > 0 && grd_resnlist.row <= grd_resnlist.rows ){
- fSelectResn();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onendedit">
- <![CDATA[
- var currow = grd_resnlist.row;
- var srchLength = model.instances(0).selectNodes( "/root/result/comduplprcplist" ).length;
- if ( grd_resnlist.col == grd_resnlist.colref("hardcdnm")) {
- 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/comduplprcplist[" + i + "]/status" ) == "Y" ) {
- model.setValue ( "/root/result/comduplprcplist[" + i + "]/resncd", model.getValue ( "/root/hardcd/hardcd[" + currow + "]/hardcd" ));
- var resncnts = "instcd|pid|orddd|cretno|ordtype|orddeptcd|prcpdd|prcpno|prcphistno|resnflag|resncd|resncnts^" ;
- 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|A|" + chkresncd + "|" + model.getValue ( "/root/hardcd/hardcd[" + currow + "]/hardcdnm" ) + "^" ;
- model.setValue ( "/root/result/comduplprcplist[" + i + "]/saveresncnt", resncnts );
- model.setValue ( "/root/result/comduplprcplist[" + i + "]/resncnt", model.getValue ( "/root/hardcd/hardcd[" + currow + "]/hardcdnm" ));
- }
- }
- } else {
- for ( var i =1; i <= srchLength; i ++ ) {
- if ( model.getValue ( "/root/result/comduplprcplist[" + i + "]/status" ) == "Y" ) {
- model.setValue ( "/root/result/comduplprcplist[" + i + "]/resncd", "-");
-
- var resncnts = "instcd|pid|orddd|cretno|ordtype|orddeptcd|prcpdd|prcpno|prcphistno|resnflag|resncd|resncnts^" ;
- 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|A|" + chkresncd + "|" + model.getValue ( "/root/hardcd/hardcd[" + currow + "]/hardcdnm" ) + "^" ;
- model.setValue ( "/root/result/comduplprcplist[" + i + "]/saveresncnt", "-" );
- model.setValue ( "/root/result/comduplprcplist[" + i + "]/resncnt", "-" );
- }
- }
- }
- grd_prcperrlist.refresh();
- model.recalculate();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onentercell">
- <![CDATA[
- var currow = grd_resnlist.row;
- if ( model.getValue ( "/root/hardcd/hardcd[" + currow + "]/hardcd" ) == "D7" && grd_resnlist.col == grd_resnlist.colref("hardcdnm")) {
- model.setfocus( "grd_resnlist" );
- grd_resnlist.editCell();
- fSelectResn();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- //사유 클릭 하면 자동으로 팝업 창이 닫히도록 ONE CLICK 요청 -의정부 성모병원 소화기내과 (2009.06.15 JJE)
- if( grd_resnlist.row > 0 && grd_resnlist.row <= grd_resnlist.rows ){
- if( model.getValue("/root/init/selcond1") == "1" ) btn_save.dispatch("DOMActivate");
- }
- ]]>
- </script>
- </datagrid>
- <caption id="caption3" class="tit_2" style="left:5px; top:230px; width:171px; height:13px; ">사유선택</caption>
- <line id="line1" class="line_1" style="x1:3px; y1:246px; x2:985px; y2:246px; "/>
- <select1 id="radio1" ref="/root/init/selcond1" appearance="full" cols="2" overflow="visible" style="left:316px; top:0px; width:195px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>일괄사유입력</label>
- <value>1</value>
- </item>
- <item>
- <label>개별사유입력</label>
- <value>2</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var srcNodeList = model.instances(0).selectNodes( "/root/result/comduplprcplist" );
- if ( model.getValue ( "/root/init/selcond1" ) == 1 ) {
- for ( var i= 1; i<=srcNodeList.length; i++ ) {
- model.setValue("/root/result/comduplprcplist[" + i + "]/status", "Y") ;
- }
- } else {
- for ( var i= 1; i<=srcNodeList.length; i++ ) {
- model.setValue("/root/result/comduplprcplist[" + i + "]/status", "N") ;
- }
- }
- model.refresh();
- ]]>
- </script>
- </select1>
- </xhtml:body>
- </xhtml:html>
|