123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688 |
- <?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="">
- <main>
- <cond>
- <drugindependpackflag>N</drugindependpackflag>
- <exptmthdfact>-</exptmthdfact>
- <exptmthdfactflag>N</exptmthdfactflag>
- </cond>
- </main>
- <init>
- <mthdkind/>
- <M0478/>
- <mthdtimenm/>
- <trgtcd/>
- </init>
- <send>
- <cond1/>
- <cond2/>
- <mthdtime/>
- <mthdtimenm/>
- <hardcd/>
- </send>
- <rateprcpflag>N</rateprcpflag>
- <rateprcp>
- <rate1/>
- <rate2/>
- <rate3/>
- <rate4/>
- <rate5/>
- <rate6/>
- <rate7/>
- <rate8/>
- </rateprcp>
- <rateflag/>
- <tmedmthd>
- <tmedmthdlist>
- <status/>
- <abbrnm/>
- <mthdcnts/>
- <mthdcd/>
- <basecnt/>
- <adminpath/>
- <mealflag/>
- <drdirecyn/>
- </tmedmthdlist>
- </tmedmthd>
- </root>
- </instance>
- <script type="javascript">
- <![CDATA[
- var mthdKind = "";
- var openerrow = 0;
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-model-construct-done">
- <![CDATA[
- grd_mthd.backcoloralternate = "transparent";
- opener.javascript.setParameter ( "SPMMO01900_prcptims", "" );
- opener.javascript.setParameter ( "SPMMO01900_rateprcpflag", "" );
- zbcfGetCodeList(new Array("A0017"),new Array("/root/init/mthdkind"), true, new Array("dispseq") ,new Array("asc")); //용법종류
- zbcfGetCodeList(new Array("M0478"),new Array("/root/init/M0478")); //용법시간
- addComboInstance("/root/init/M0478", "cdid^cdnm", "-^전체", "M0478"); //용법시간 전체항목 추가
- cmb_mthdtime.select(0);
- var srchRow = opener.javascript.getParameter ( "SPMMO01900_srchRow" );//복용방법이 없을 때 자동팝업
- if (isNull(srchRow)) {
- if ( opener.grd_prcplist.row == -1) {
- openerrow = 1;
- } else {
- openerrow = opener.grd_prcplist.row;
- }
- } else {
- openerrow = srchRow;
- document.title = document.title + "[" + opener.model.getValue( "/root/main/prcp/prcplist[" + openerrow +"]/prcpcd") + " : " + opener.model.getValue( "/root/main/prcp/prcplist[" + openerrow +"]/orgprcpnm") + "]";
- }
- var prcptims = opener.model.getValue( "/root/main/prcp/prcplist[" + openerrow +"]/prcptims");
- var tempcol2 = opener.model.getValue( "/root/main/prcp/prcplist[" + openerrow +"]/tempcol2");//수익분류
- if ( prcptims == 1 ) {
- checkbox1.disabled = true;
- }
- if ( isNull(prcptims)) prcptims = 1;
- var prcpclscd = opener.model.getValue( "/root/main/prcp/prcplist[" + openerrow +"]/prcpclscd");
- if ( prcpclscd == "A2" ) {
- mthdKind = "N";
- rdo_mthdkind.disabled = true;
- }
- if ( prcpclscd == "A4" ) {
- //비율은 내복약만 쓴다.
- rdo_baseqty.disabled = true;
- group1.visible = false;
- mthdKind = "Y"
- model.setValue("/root/send/hardcd",99);
- if(submit("TRMMB04103", false)) {
- if ( !isNull(model.getValue("/root/init/hardcd/hardcd[hardcd='" + tempcol2 + "']/hardcd"))) {
- mthdKind = "O";
- }
- model.removeNodeset ( "/root/init/hardcd/hardcd" );
- }
- }
-
- if ( prcpclscd == "A6" ) {
- mthdKind = "I"
- //비율은 내복약만 쓴다.
- group1.visible = false;
- //주사는 횟수가 무조건 1이다.
- prcptims = "1"
- rdo_baseqty.disabled = true;
- rdo_mthdkind.disabled = true;
- }
- model.setValue( "/root/send/cond1", mthdKind );
- if ( prcpclscd != "A2" ) {
- //경구약이 아닌경우에는 회수는 필요없다.
- model.setValue( "/root/send/cond2", "" );
- } else {
- model.setValue( "/root/send/cond2", prcptims );
- }
-
- //예외 용법 설정된 경우, 용법창에 표시
- //2008. 08. 06 오지훈
- var exptmthdfact = opener.model.getValue("/root/main/prcp/prcplist[" + openerrow + "]/exptmthdfact");
- if(exptmthdfact != "-" && exptmthdfact != ""){ //값이 default 또는 없는 경우
- ipt_exptmthdfact.disabled = false;
- model.setValue("/root/main/cond/exptmthdfact", exptmthdfact);
- bool1.value = "Y";
- }else{
- ipt_exptmthdfact.disabled = true;
- }
-
- //따로포장 값 설정된경우 표시되도록. by sonjy 20081112
- var drugindependpackflag = opener.model.getValue("/root/main/prcp/prcplist[" + openerrow + "]/drugindependpackflag");
- if( drugindependpackflag == "Y" ){
- model.setValue("/root/main/cond/drugindependpackflag" , drugindependpackflag);
- }
-
- var rateprcpflag = opener.model.getValue ( "/root/main/prcp/prcplist[" + openerrow + "]/rateprcpflag");
- if ( rateprcpflag == "N" || isNull(rateprcpflag)) {
- input1.disabled = true;
- input2.disabled = true;
- input3.disabled = true;
- input4.disabled = true;
- input5.disabled = true;
- input6.disabled = true;
- input7.disabled = true;
- input8.disabled = true;
- } else {
- model.setValue ( "/root/rateflag", "Y" );
- checkbox1.item(0).attribute("color") = "#ff0000";
- checkbox1.item(0).attribute("font-weight") = "bold";
- var drugrateqty = opener.model.getValue( "/root/main/prcp/prcplist[" + openerrow + "]/drugrateqty") + "^";
- var cnt = 0;
- var childCnt = group1.children.length;
- var childObj;
- for( var i = 0; i < childCnt; i++ ) {
- childOb = group1.children.item(i)
- if( childOb.elementName == "xforms:input") {
- if ( cnt < eval(prcptims)) {
- childOb.disabled = false;
- childOb.value = getArrayData (drugrateqty, 0, cnt, "^", "|" );
- } else {
- childOb.disabled = true;
- }
- cnt++;
- }
- }
- }
- model.setValue("/root/send/mthdtimenm", cmb_mthdtime.label);
- if(submit("TRMMO01901")){
- }
- var mthdcd = opener.model.getValue ( "/root/main/prcp/prcplist[" + openerrow + "]/drugmthdspccd" );
- for ( var i=1; i < grd_mthd.rows; i++ ) {
- if ( mthdcd == model.getValue ( "/root/tmedmthd/tmedmthdlist[" + i +"]/mthdcd")) {
- grd_mthd.row = i;
- grd_mthd.toprow = i;
- model.setValue ( "/root/tmedmthd/tmedmthdlist[" + i + "]/status", "Y" );
- }
- }
-
- model.setValue("/root/send/hardcd", 45);
- submit("TRMMB04103", false);
- ]]>
- </script>
- <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
- <submission id="TRMMO01901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/tmedmthd"/>
- <submission id="TRZBC00102" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
- <submission id="TRMMB04103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/trgtcd"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
- <script type="javascript" src="../../../emr/prcpmngtweb/js/SMMMO00100.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- </xhtml:head>
- <xhtml:body pagewidth="595" pageheight="620">
- <shape id="roundrect5" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:6px; top:5px; width:582px; height:90px; background-color:#fffbf2; border-color:#ffd799; "/>
- <select1 id="rdo_mthdkind" ref="/root/send/cond1" appearance="full" cols="5" rows="1" overflow="visible" style="left:117px; top:69px; width:460px; height:20px; border-style:none; ">
- <choices>
- <itemset nodeset="/root/init/mthdkind/A0017">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- var prcpclscd = opener.model.getValue( "/root/main/prcp/prcplist[" + openerrow +"]/prcpclscd");
- if ( prcpclscd == "A4" ) {
- bmthdKind = model.getValue( "/root/send/cond1" );
- if ( bmthdKind == "N" || bmthdKind == "I" ) {
- messageBox ( "선택할 수 없는 용법종류", "E008" );
- model.setValue( "/root/send/cond1", mthdKind );
- model.refresh();
- return;
- } else {
- //submit parameter로 용법시간명 추가 2008.06.09 오지훈
- model.setValue("/root/init/mthdtimenm", cmb_mthdtime.label);
- submit ( "TRMMO01901" );
- }
- }
- ]]>
- </script>
- </select1>
- <button id="button1" class="btn4_letter2" style="left:468px; top:568px; width:56px; height:22px; ">
- <caption>선택</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var drugrateqty = "";
- var cnt = 0;
-
- if ( (!input1.disabled && isNull(input1.value)) ||
- (!input2.disabled && isNull(input2.value)) ||
- (!input3.disabled && isNull(input3.value)) ||
- (!input4.disabled && isNull(input4.value)) ||
- (!input5.disabled && isNull(input5.value)) ||
- (!input6.disabled && isNull(input6.value)) ||
- (!input7.disabled && isNull(input7.value)) ||
- (!input8.disabled && isNull(input8.value))) {
- messageBox ( "비율처방 값을 모두 입력해 주십시오.", "E" );
- return;
- }
-
- if ( !isNull(input1.value)) drugrateqty = drugrateqty + input1.value + "|";
- if ( !isNull(input2.value)) drugrateqty = drugrateqty + input2.value + "|";
- if ( !isNull(input3.value)) drugrateqty = drugrateqty + input3.value + "|";
- if ( !isNull(input4.value)) drugrateqty = drugrateqty + input4.value + "|";
- if ( !isNull(input5.value)) drugrateqty = drugrateqty + input5.value + "|";
- if ( !isNull(input6.value)) drugrateqty = drugrateqty + input6.value + "|";
- if ( !isNull(input7.value)) drugrateqty = drugrateqty + input7.value + "|";
- if ( !isNull(input8.value)) drugrateqty = drugrateqty + input8.value + "|";
-
- if (!isNull(drugrateqty)) {
- drugrateqty = drugrateqty.substring ( 0, drugrateqty.length -1 );
- opener.model.setValue ( "/root/main/prcp/prcplist[" + openerrow + "]/drugrateqty", drugrateqty );
- }
-
- var drugmthdspccdnm = "";
- var drugmthdspccd = "";
- var prcpvol = 0;
- var prcpqty = 0;
- var prcptims = 0;
-
- var bfprcpqty = 0;
- var bfprcptims = 0;
- var gridchkflag ;
- if ( grd_mthd.row < 1 && bool1.value != "Y") {
- messageBox ( "선택된 복용방법이", "I004" );
- return;
- }
-
- for ( var i = 1; i < grd_mthd.rows; i++ ) {
- if ( model.getValue ( "/root/tmedmthd/tmedmthdlist[" + i + "]/status") == "Y" ) {
- gridchkflag = "Y" ;
- //복용방법 중 안과용법이 선택된 경우, 시행부서를 특수조제실로 설정
- //2008. 08. 04 오지훈
- var mthdcd = model.getValue("/root/tmedmthd/tmedmthdlist[" + grd_mthd.row + "]/mthdcd");
- var hardcd = model.getValue("/root/init/hardcd/hardcd[hardcd='" + mthdcd + "']/hardcd");
- if(hardcd != ""){
- opener.model.setValue("/root/main/prcp/prcplist[" + openerrow + "]/prcpexecdeptcd", "3240807000");
- }
-
- drugmthdspccdnm = model.getValue ( "/root/tmedmthd/tmedmthdlist[" + grd_mthd.row + "]/abbrnm" );
- drugmthdspccd = model.getValue ( "/root/tmedmthd/tmedmthdlist[" + grd_mthd.row +"]/mthdcd" );
- exptmthdfact = model.getValue("/root/main/cond/exptmthdfact");
- drugindependpackflag = model.getValue("/root/main/cond/drugindependpackflag");
-
- //예외용법을 선택한 경우, 용법 코드에 예외용법코드(ZZZ)를 설정한다.
- if(bool1.value == "Y"){
- drugmthdspccd = "ZZZ";
- drugmthdspccdnm = ipt_exptmthdfact.currentText;
- }
-
- if (opener.model.getvalue ( "/root/main/prcp/prcplist[" + openerrow + "]/prcpclscd" ) == "A6" ) {
- opener.model.setValue ( "/root/main/prcp/prcplist[" + openerrow + "]/drugmthdspccdnm" , drugmthdspccdnm );
- opener.model.setValue ( "/root/main/prcp/prcplist[" + openerrow + "]/drugmthdspccd" , drugmthdspccd );
- window.close();
- return;
- }
-
- prcptims = eval(grd_mthd.valueMatrix(grd_mthd.row,3));
- var drugrateqty = opener.model.getValue( "/root/main/prcp/prcplist[" + openerrow + "]/drugrateqty") + "^";
- var drugcnt = 0;
- var childCnt = group1.children.length;
- var childObj;
-
- if ( model.getValue ( "/root/rateflag" ) == "Y" ) {
- prcpqty = 0;
- for( var j = 0; j < childCnt; j++ ) {
- childOb = group1.children.item(j)
- if( childOb.elementName == "xforms:input") {
- if (drugcnt < eval(prcptims)) {
- prcpqty = prcpqty + eval(childOb.value);
- }
- drugcnt++;
- }
- }
- //비율처방일 때는 수량, 용량을 setValue 한다.
- if ( isNull(model.getValue ( "/root/chkflag/drugmthdspccd" ))) { //일괄입력은 용량을 계산하지 않는다.
-
- prcpvol = eval(opener.model.getvalue ( "/root/main/prcp/prcplist[" + openerrow + "]/prcpvol" ));
- bfprcpqty = eval(opener.model.getvalue ( "/root/main/prcp/prcplist[" + openerrow + "]/prcpqty" ));
- bfprcptims = eval(opener.model.getvalue ( "/root/main/prcp/prcplist[" + openerrow + "]/prcptims" ));
- if ( bfprcpqty != prcpqty ) {
- if ( messageBox ( "입력한 비율처방 수량이 원래수량과 틀립니다." , "Q009" ) == 7 ) {
- return;
- }
- }
- var calcprcpvol = prcpqty / bfprcpqty * prcpvol ;
-
- if ( calcprcpvol.toString().indexOf(".") >= 0 ) {
- calcprcpvol = calcprcpvol * 1000;
- calcprcpvol = Math.round(calcprcpvol);
- calcprcpvol = calcprcpvol / 1000;
- }
-
- opener.model.setvalue ( "/root/main/prcp/prcplist[" + openerrow + "]/prcpvol", calcprcpvol );
-
- }
-
- opener.model.setValue ( "/root/main/prcp/prcplist[" + openerrow + "]/prcpqty" , prcpqty );
- } else {
-
- opener.model.setValue ( "/root/main/prcp/prcplist[" + openerrow + "]/drugrateqty" , "-" );
- }
-
- opener.model.setValue ( "/root/main/prcp/prcplist[" + openerrow + "]/prcptims" , prcptims );
- }
- }
- //예외용법을 선택한 경우, 용법 코드에 예외용법코드(ZZZ)를 설정한다.
- if(bool1.value == "Y"){
- gridchkflag = "Y" ;
- drugmthdspccd = "ZZZ";
- drugmthdspccdnm = ipt_exptmthdfact.currentText;
- }
- opener.model.setValue ( "/root/main/prcp/prcplist[" + openerrow + "]/drugmthdspccdnm" , drugmthdspccdnm );
- opener.model.setValue ( "/root/main/prcp/prcplist[" + openerrow + "]/drugmthdspccd" , drugmthdspccd );
-
- //예외용법 및 따로포장 설정, 2008. 06. 02 오지훈
- exptmthdfact = model.getValue("/root/main/cond/exptmthdfact");
- drugindependpackflag = model.getValue("/root/main/cond/drugindependpackflag");
- if(exptmthdfact != "-"){
- opener.model.setValue ( "/root/main/prcp/prcplist[" + openerrow + "]/exptmthdfact" , exptmthdfact);
- opener.model.setValue ( "/root/main/prcp/prcplist[" + openerrow + "]/drugmthdspccdnm" , exptmthdfact);
- }else{
- opener.model.setValue ( "/root/main/prcp/prcplist[" + openerrow + "]/exptmthdfact" , "-");
- }
-
- //if(drugindependpackflag != "N"){ by sonjy 막음처리 20081112 따로포장값이 선택한대로 보여지지 않고 설정되지 않는오류 처리
- opener.model.setValue ( "/root/main/prcp/prcplist[" + openerrow + "]/drugindependpackflag", drugindependpackflag);
- //}
-
- //약일괄입력을 위해 추가
- opener.javascript.setParameter ( "SPMMO01900_prcptims", "Y" );
- if ( model.getValue ( "/root/rateflag" ) == "Y" ) {
- opener.javascript.setParameter ( "SPMMO01900_rateprcpflag", "Y" );
- opener.model.setValue ( "/root/main/prcp/prcplist[" + openerrow + "]/rateprcpflag", "Y" );
- } else {
- opener.javascript.setParameter ( "SPMMO01900_rateprcpflag", "N" );
- opener.model.setValue ( "/root/main/prcp/prcplist[" + openerrow + "]/rateprcpflag", "N" );
- }
-
- if ( gridchkflag == "Y" || bool2.value == "Y") {
- gGridUpdateChk("per", openerrow, "child");
- }
-
- window.close();
- ]]>
- </script>
- </button>
- <button id="button2" class="btn4_letter2" style="left:527px; top:568px; width:56px; height:22px; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- //약일괄입력을 위해 추가
- opener.javascript.setParameter ( "SPMMO01900_prcptims", "N" );
- opener.javascript.setParameter ( "SPMMO01900_rateprcpflag", "N" );
- window.close();
- ]]>
- </script>
- </button>
- <caption id="caption3" class="tit_2" style="left:7px; top:99px; width:171px; height:13px; ">복용방법 List</caption>
- <line id="line7" class="line_1" style="x1:7px; y1:114px; x2:588px; y2:114px; "/>
- <select1 id="rdo_baseqty" ref="/root/send/cond2" appearance="full" cols="6" overflow="visible" style="left:117px; top:16px; width:275px; height:19px; border-style:none; ">
- <choices>
- <item>
- <label>1회</label>
- <value>1</value>
- </item>
- <item>
- <label>2회</label>
- <value>2</value>
- </item>
- <item>
- <label>3회</label>
- <value>3</value>
- </item>
- <item>
- <label>4회</label>
- <value>4</value>
- </item>
- <item>
- <label>5회이상</label>
- <value>5</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- if ( rdo_baseqty.value == 1 ) {
- model.setValue ( "/root/rateflag", "" );
- //checkbox1.disabled = true;
- } else {
- //checkbox1.disabled = false;
- }
- //checkbox1.dispatch ( "xforms-value-changed" );
- //submit parameter로 용법시간명 추가 2008.06.09 오지훈
- model.setValue("/root/send/mthdtimenm", cmb_mthdtime.label);
- submit ( "TRMMO01901" );
- ]]>
- </script>
- </select1>
- <caption id="caption4" class="search_name" style="left:27px; top:15px; width:90px; height:17px; ">기본종류 :</caption>
- <caption id="caption5" class="search_name" style="left:27px; top:69px; width:86px; height:17px; ">용법종류 :</caption>
- <datagrid id="grd_mthd" nodeset="/root/tmedmthd/tmedmthdlist" caption="^복용방법코드^복용방법^횟수" colsep="^" colwidth="0, 100, 425, 40" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" tooltip="true" style="left:7px; top:118px; width:581px; height:405px; ">
- <col checkvalue="Y,N" ref="status" type="checkbox">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- /*if ( grd_mthd.valueMatrix ( grd_mthd.row,0 ) == "Y" ) {
- for ( var i = 1; i < grd_mthd.rows; i++ ) {
- if ( grd_mthd.valueMatrix ( i, 0 ) == "Y" && i != grd_mthd.row ) {
- grd_mthd.valueMatrix ( i, 0 ) = "N";
- }
- }
- if ( checkbox1.value == "Y" ) {
- var cnt = 0 ;
- var childCnt = group1.children.length;
- var disableCnt = grd_mthd.valueMatrix ( grd_mthd.row,3 );
- var childObj;
-
- for( var i = 0; i < childCnt; i++ ) {
- childOb = group1.children.item(i)
- if( childOb.elementName == "xforms:input") {
- if ( cnt < disableCnt )
- childOb.disabled = false;
- else {
- childOb.disabled = true;
- childOb.value = "";
- }
- cnt++;
- }
- }
- }
- }*/
- ]]>
- </script>
- </col>
- <col ref="mthdcd" style="text-align:left; "/>
- <col ref="abbrnm"/>
- <col ref="basecnt" style="text-align:center; "/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- //if( grd_mthd.isCell(event.target) && grd_mthd.row >= grd_mthd.fixedRows ){
- //예외 용법이 선택된 경우, 일반용법을 선택할 수 없도록 처리
- //2008. 08. 06
- if(isDataCell()){
- if(bool1.value == "Y"){
- messageBox("예외 용법이 선택된 경우, 일반용법을 선택", "E001");
- return;
-
- }else{
- model.setValue ( "/root/tmedmthd/tmedmthdlist[" + grd_mthd.row + "]/status", "Y" );
- button1.dispatch ( "DOMActivate" );
- }
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(isDataCell()){
- model.setValue ( "/root/tmedmthd/tmedmthdlist[" + grd_mthd.row + "]/status", "Y" );
- for ( var i = 1; i < grd_mthd.rows; i++ ) {
- var status = model.getValue ( "/root/tmedmthd/tmedmthdlist[" + i + "]/status" );
- if ( status == "Y" && i != grd_mthd.row ) {
- model.setValue ( "/root/tmedmthd/tmedmthdlist[" + i+ "]/status", "N" );
- }
- }
-
- if ( checkbox1.value == "Y" ) {
- var cnt = 0 ;
- var childCnt = group1.children.length;
- var disableCnt = model.getValue ( "/root/tmedmthd/tmedmthdlist[" + grd_mthd.row + "]/basecnt" );
- var childObj;
-
- for( var i = 0; i < childCnt; i++ ) {
- childOb = group1.children.item(i);
- if( childOb.elementName == "xforms:input") {
- if ( cnt < disableCnt ) {
- childOb.disabled = false;
- } else {
- childOb.disabled = true;
- childOb.value = "";
- }
- cnt++;
- }
- }
- }
- }
- model.refresh();
- ]]>
- </script>
- </datagrid>
- <group id="group1" visibility="hidden" style="left:5px; top:576px; width:390px; height:30px; ">
- <input id="input1" ref="/root/rateprcp/rate1" maxlength=".3" format="#.###" style="left:95px; top:5px; width:30px; height:19px; "/>
- <input id="input2" ref="/root/rateprcp/rate2" maxlength=".3" format="#.###" style="left:130px; top:5px; width:30px; height:19px; "/>
- <input id="input3" ref="/root/rateprcp/rate3" maxlength=".3" format="#.###" style="left:163px; top:5px; width:30px; height:19px; "/>
- <input id="input4" ref="/root/rateprcp/rate4" maxlength=".3" format="#.###" style="left:197px; top:5px; width:30px; height:19px; "/>
- <input id="input5" ref="/root/rateprcp/rate5" maxlength=".3" format="#.###" style="left:231px; top:5px; width:30px; height:19px; "/>
- <input id="input6" ref="/root/rateprcp/rate6" maxlength=".3" format="#.###" style="left:264px; top:5px; width:30px; height:19px; "/>
- <input id="input7" ref="/root/rateprcp/rate7" maxlength=".3" format="#.###" style="left:297px; top:5px; width:30px; height:19px; "/>
- <input id="input8" ref="/root/rateprcp/rate8" maxlength=".3" format="#.###" style="left:331px; top:5px; width:30px; height:19px; "/>
- <select id="checkbox1" ref="/root/rateflag" overflow="visible" appearance="full" style="left:13px; top:5px; width:72px; height:18px; vertical-align:middle; ">
- <choices>
- <item>
- <label>비율처방</label>
- <value>Y</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
-
- if ( checkbox1.value == "Y" ) {
- var basecnt = model.getValue ( "/root/tmedmthd/tmedmthdlist[status='Y']/basecnt" );
- if ( grd_mthd.row < 1 ) {
- messageBox ( "복용방법을 선택하여 주십시오.", "E" );
- model.setValue("/root/rateflag", "");
- checkbox1.refresh();
- } else {
- checkbox1.item(checkbox1.focusIndex).attribute("color") = "#ff0000";
- checkbox1.item(checkbox1.focusIndex).attribute("font-weight") = "bold";
- checkbox1.attribute ( "font-weight" ) = "bold";
- var cnt = 0;
- var childCnt = group1.children.length;
- var childObj;
- for( var i = 0; i < childCnt; i++ ) {
- childOb = group1.children.item(i)
- if( childOb.elementName == "xforms:input") {
- if ( cnt < eval(basecnt) ) {
- childOb.disabled = false;
- }else {
- childOb.disabled = true;
- childOb.value = "";
- }
- cnt++;
- }
-
- }
- }
- } else {
- checkbox1.item(checkbox1.focusIndex).attribute("color") = "#000000";
- checkbox1.item(checkbox1.focusIndex).attribute("font-weight") = "normal";
- var childCnt = group1.children.length;
- var childObj;
- for( var i = 0; i < childCnt; i++ ) {
- childOb = group1.children.item(i)
- if( childOb.elementName == "xforms:input") {
- childOb.disabled = true;
- childOb.value = "";
- }
-
- }
- }
- ]]>
- </script>
- </select>
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- if(event.keyCode == "13") {
- var childCnt = group1.children.length;
- var childObj;
- for( var i = 0; i < childCnt; i++ ) {
- if ( event.target == "input1" ) {
- model.setFocus ( "input2" );
- } else if ( event.target == "input2" ) {
- model.setFocus ( "input3" );
- } if ( event.target == "input3" ) {
- model.setFocus ( "input4" );
- } if ( event.target == "input4" ) {
- model.setFocus ( "input5" );
- } if ( event.target == "input5" ) {
- model.setFocus ( "input6" );
- } if ( event.target == "input6" ) {
- model.setFocus ( "input7" );
- } if ( event.target == "input7" ) {
- model.setFocus ( "input8" );
- }
- }
- }
- ]]>
- </script>
- </group>
- <bool id="bool1" checkvalue="Y,N" ref="/root/main/cond/exptmthdfactflag" style="left:0px; top:527px; width:35px; height:20px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var exptmthdfactflag = model.getValue("/root/main/cond/exptmthdfactflag");
- if(exptmthdfactflag == "Y"){
- var sPrcpgenrFlag = opener.model.getValue( "/root/main/prcp/prcplist[" + openerrow + "]/prcpgenrflag") ;
- var sPrcpClscd = opener.model.getValue( "/root/main/prcp/prcplist[" + openerrow + "]/prcpclscd") ;
- var sPrcpKindcd = opener.model.getValue( "/root/main/prcp/prcplist[" + openerrow + "]/prcpkindcd") ;
-
- if( sPrcpgenrFlag != "O" && sPrcpgenrFlag != "S" && sPrcpKindcd != "50" && sPrcpKindcd != "50" && sPrcpKindcd != "50") {
- if(sPrcpClscd == "A2" || sPrcpClscd == "A4" || sPrcpClscd == "A6") {
- model.setValue("/root/main/cond/exptmthdfactflag", "N");
- model.setValue("/root/main/cond/exptmthdfact", "-");
- ipt_exptmthdfact.disabled = true;
- messageBox ( "입원 환자의 약품 처방은 병동 투약기록이 불가 하므로 예외용법을 적용 할 수 없습니다. \n '의사지시대로' 용법 선택 후 처방 전달사항으로 입력 하세요.", "E" );
- } else {
- ipt_exptmthdfact.disabled = false;
- }
- } else {
- ipt_exptmthdfact.disabled = false;
- }
- }else{
- model.setValue("/root/main/cond/exptmthdfact", "-");
- ipt_exptmthdfact.disabled = true;
- }
- model.refresh();
- ]]>
- </script>
- </bool>
- <bool id="bool2" checkvalue="Y,N" ref="/root/main/cond/drugindependpackflag" style="left:0px; top:549px; width:35px; height:20px; "/>
- <caption id="caption1" style="left:29px; top:528px; width:56px; height:20px; ">예외용법</caption>
- <caption id="caption2" style="left:29px; top:550px; width:56px; height:20px; ">따로포장</caption>
- <caption id="caption6" class="search_name" style="left:27px; top:42px; width:90px; height:17px; ">용법시간 :</caption>
- <input id="ipt_exptmthdfact" ref="/root/main/cond/exptmthdfact" style="left:86px; top:529px; width:501px; height:19px; "/>
- <select1 id="cmb_mthdtime" ref="/root/send/mthdtime" appearance="minimal" style="left:117px; top:42px; width:197px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/M0478/M0478">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- model.setValue("/root/send/mthdtimenm", cmb_mthdtime.label);
- submit("TRMMO01901");
- ]]>
- </script>
- </select1>
- </xhtml:body>
- </xhtml:html>
|