123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SPPMI03400_입원결정서삭제복원.xrw
- * 설 명 : 입원결정서 삭제복원
- * 설 계 자 : 최병진
- * 작 성 자 : 최병진
- * 작 성 일 : 2008.03.10
- * 수정이력 :
- * 기 타 :
- * 구현예정 :
- -->
- <?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>입원결정서삭제복원</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <send>
- <data1>
- <conditon>1</conditon>
- <pid/>
- <orddeptcd/>
- <check/>
- <indirecddfrom/>
- <indirecddto/>
- </data1>
- <data2>
- <sendflag/>
- <pid/>
- <inrsrvacptdd/>
- <orddeptcd/>
- <inrsrvacptseqno/>
- <inrsrvstat/>
- <inrsrvstat_before/>
- <inrsrvstat_after/>
- <inrsrvcnclresn/>
- <inrsrvcnclresnrem/>
- </data2>
- </send>
- <main>
- <list1>
- <grdinhpdeci>
- <inrsrvstat/>
- <inrsrvcnclresn/>
- <inrsrvcnclresnrem/>
- <pid/>
- <hngnm/>
- <sex/>
- <inrsrvacptdd/>
- <orddeptcd/>
- <inrsrvacptseqno/>
- <inrsrvacpttm/>
- <insukind/>
- <indirecdrid/>
- <indirecdd/>
- <orddrid/>
- <patinhopedd/>
- <inhopeward/>
- <inhoperoomgrdefrom/>
- <inhoperoomgrdeto/>
- <inrsrvrem/>
- <lastupdtdt/>
- <lastupdtrid/>
- </grdinhpdeci>
- </list1>
- </main>
- <hidden>
- <init>
- <disccd>
- <cd/>
- <nm/>
- </disccd>
- <insukind>
- <cd/>
- <nm/>
- </insukind>
- <suppkind>
- <cd/>
- <nm/>
- <up/>
- <io/>
- </suppkind>
- <orddeptcd>
- <cd/>
- <nm/>
- </orddeptcd>
- <orddrid>
- <cd/>
- <nm/>
- <dp/>
- <sp/>
- </orddrid>
- <wardcd>
- <cd/>
- <nm/>
- <of/>
- </wardcd>
- <roomcd>
- <cd/>
- <nm/>
- <wd/>
- <gr/>
- <ty/>
- <sex/>
- </roomcd>
- <flag>
- <prestdd/>
- </flag>
- <roomgrdecd>
- <cd/>
- <nm/>
- <typecd/>
- </roomgrdecd>
- <roomtypecd>
- <cd/>
- <nm/>
- </roomtypecd>
- </init>
- <rsltflag>
- <rgst_cnt>
- <adrv_cnt/>
- </rgst_cnt>
- </rsltflag>
- </hidden>
- <init>
- <P0008list>
- <P0008>
- <cdnm/>
- <cdid/>
- </P0008>
- </P0008list>
- <P0017list>
- <P0017>
- <cdnm/>
- <cdid/>
- </P0017>
- </P0017list>
- <P0020list>
- <P0020>
- <cdnm/>
- <cdid/>
- </P0020>
- </P0020list>
- <P0025list>
- <P0025>
- <cdnm/>
- <cdid/>
- </P0025>
- </P0025list>
- <P0026list>
- <P0026>
- <cdnm/>
- <cdid/>
- </P0026>
- </P0026list>
- <P0149list>
- <P0149>
- <cdnm/>
- <cdid/>
- </P0149>
- </P0149list>
- <P0039list>
- <P0039>
- <cdnm/>
- <cdid/>
- </P0039>
- </P0039list>
- <P0378list>
- <P0378>
- <cdnm/>
- <cdid/>
- </P0378>
- </P0378list>
- <P0001list>
- <P0001>
- <cdnm/>
- <cdid/>
- </P0001>
- </P0001list>
- </init>
- </root>
- </instance>
- <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
- <submission id="TRPMI00106" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/hidden/init"/>
- <submission id="TXPMI03401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data2" resultref="/root/hidden/rsltflag"/>
- <submission id="TRPMI03401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" resultref="/root/main/list1"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/utilHelper.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/numericHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
-
- makeReportPreview(0,0,0,0,"");
-
- zbcfGetCodeList(new Array("P0001","P0008","P0017","P0020","P0025","P0026","P0149","P0039","P0378"),
- new Array("/root/init/P0001list","/root/init/P0008list","/root/init/P0017list","/root/init/P0020list","/root/init/P0025list","/root/init/P0026list","/root/init/P0149list","/root/init/P0039list","/root/init/P0378list"));
-
- submit("TRPMI00106");
-
- cmb_orddeptcd.choices.itemset.attribute("nodeset") = "/root/hidden/init/orddeptcd[orddeptflag = 'D']";
-
- // 지시일자 설정
- bol_indirecddchk.selected = false;
- cmb_condition.dispatch("xforms-value-changed");
- model.setValue("/root/send/data1/indirecddfrom", "");
- model.setValue("/root/send/data1/indirecddto", "");
-
- if (checkOpener()) {
- // 환자번호 자동설정
- // SPPMI03400_param : pid
- var parent_pid = opener.javascript.getParameter("SPPMI03400_param");
-
- if(parent_pid != null && parent_pid != "") {
- model.setValue("/root/send/data1/pid", parent_pid);
- submit("TRPMI03401");
- }
- }
- model.refresh();
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="1211" pageheight="410" guideline="1,1204;2,405;">
- <datagrid id="grd_inhpdeci" nodeset="/root/main/list1/grdinhpdeci" class="datagrid2" caption="상태^결정서삭제사유^삭제 참고사항^최종수정자^최종수정일시^환자번호^환자이름^성별^접수일자^진료과^번호^시간^환자유형^지시의사^지시일자^전문의^환자희망입원일^희망입원일^희망병동^희망병실등급FROM^희망병실등급TO^참고사항" colsep="^" colwidth="50, 100, 200, 70, 120, 70, 56, 36, 73, 130, 32, 40, 96, 78, 78, 78, 92, 73, 87, 116, 116, 188" dataheight="23" explorerbar="sort" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:10px; top:80px; width:1194px; height:295px; ">
- <col ref="inrsrvstatnm" style="text-align:center; "/>
- <col class="gridinput" ref="inrsrvcnclresn" type="combo">
- <choices>
- <itemset nodeset="/root/init/P0020list/P0020">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col class="gridinput" imemode="hangul" ref="inrsrvcnclresnrem" type="input"/>
- <col ref="lastupdtrid" type="output"/>
- <col ref="lastupdtdt" type="output" format="yyyy-mm-dd hh:nn:ss"/>
- <col ref="pid"/>
- <col ref="hngnm" style="text-align:center; "/>
- <col ref="sex" style="text-align:center; "/>
- <col ref="inrsrvacptdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col disabled="true" ref="orddeptcd" type="combo" style="text-align:center; ">
- <choices>
- <itemset nodeset="/root/hidden/init/orddeptcd">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </col>
- <col ref="inrsrvacptseqno" visibility="hidden"/>
- <col ref="inrsrvacpttm" format="hh:nn"/>
- <col disabled="true" ref="insukind" type="combo" style="text-align:center; ">
- <choices>
- <itemset nodeset="/root/hidden/init/insukind">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </col>
- <col disabled="true" ref="indirecdrid" type="combo" style="text-align:center; ">
- <choices>
- <itemset nodeset="/root/hidden/init/orddrid">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </col>
- <col ref="indirecdd" format="yyyy-mm-dd"/>
- <col disabled="true" ref="orddrid" type="combo" style="text-align:center; ">
- <choices>
- <itemset nodeset="/root/hidden/init/orddrid">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </col>
- <col ref="patinhopedd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="inhopeward" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="inhoperoomgrdefrom" type="combo" style="text-align:center; ">
- <choices>
- <itemset nodeset="/root/hidden/init/wardcd">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </col>
- <col disabled="true" ref="inhoperoomgrdeto" type="combo">
- <choices>
- <itemset nodeset="/root/init/P0025list/P0025">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col disabled="true" ref="inrsrvrem" type="combo">
- <choices>
- <itemset nodeset="/root/init/P0025list/P0025">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="inrsrvrem"/>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_inhpdeci.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <button id="btn_search1" class="btn1_letter2" style="left:1133px; top:17px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSQueryRef();
- ]]>
- </script>
- </button>
- <shape id="roundrect5" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:10px; top:10px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <line id="line12" class="line_4" style="x1:1118px; y1:17px; x2:1118px; y2:39px; border-color:#ffe4bb; border-left-style:solid; "/>
- <caption id="caption22" class="search_name" style="left:20px; top:19px; width:112px; height:17px; ">검색조건 :</caption>
- <caption id="caption36" class="tit_2" style="left:10px; top:55px; width:111px; height:13px; ">입원결정서</caption>
- <line id="line20" class="line_1" style="x1:10px; y1:80px; x2:1204px; y2:80px; "/>
- <button id="btn_save" class="btn4_letter2" style="left:1090px; top:380px; width:56px; height:22px; ">
- <caption>복원</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var cur_row = grd_inhpdeci.row;
-
- var deci_pid = model.getValue("/root/main/list1/grdinhpdeci["+ cur_row +"]/pid");
- var deci_inrsrvcnclresn = model.getValue("/root/main/list1/grdinhpdeci["+ cur_row +"]/inrsrvcnclresn");
- var deci_inrsrvstat = model.getValue("/root/main/list1/grdinhpdeci["+ cur_row +"]/inrsrvstat");
-
- if (deci_pid == null || deci_pid == "" ) {
- messageBox("환자를","C002");
- return false;
- }
-
- if (deci_inrsrvstat != "X") {
- messageBox("[삭제]인 상태를","C002");
- return false;
- }
-
- // 2009.02.19 이미 해당진료과로 'S', 'R' 상태가 있으면 복원하지 못하도록 막는다.
- var sOrdDeptCd = model.getValue("/root/main/list1/grdinhpdeci["+ cur_row +"]/orddeptcd");
-
- for (var idx = 1 ; idx <= grd_inhpdeci.rows ; idx++) {
- if (idx == cur_row)
- continue;
-
- var sOtherOrdDeptCd = model.getValue("/root/main/list1/grdinhpdeci["+ idx +"]/orddeptcd");
- if (sOrdDeptCd == sOtherOrdDeptCd) {
- var sInRsrvStat = model.getValue("/root/main/list1/grdinhpdeci["+ idx +"]/inrsrvstat");
- if (sInRsrvStat == "S" || sInRsrvStat == "R") {
- var sStatus = null;
- if (sInRsrvStat == "S") {
- sStatus = "결정";
- } else {
- sStatus = "예약";
- }
-
- messageBox("이미 해당 진료과로 [" + sStatus + "]인 내역이 있습니다.\n복원할 수 없습니다.", "I");
- return false;
- }
- }
- }
-
- if (messageBox("결정서 복원을", "Q004") == 7) {
- return false;
- }
-
- model.setValue("/root/send/data2/sendflag", "RECOVERY");
- model.setValue("/root/send/data2/pid", model.getValue("/root/main/list1/grdinhpdeci["+ cur_row +"]/pid"));
- model.setValue("/root/send/data2/inrsrvacptdd", model.getValue("/root/main/list1/grdinhpdeci["+ cur_row +"]/inrsrvacptdd"));
- model.setValue("/root/send/data2/orddeptcd", model.getValue("/root/main/list1/grdinhpdeci["+ cur_row +"]/orddeptcd"));
- model.setValue("/root/send/data2/inrsrvacptseqno", model.getValue("/root/main/list1/grdinhpdeci["+ cur_row +"]/inrsrvacptseqno"));
- model.setValue("/root/send/data2/inrsrvstat", "S"); // 변경할 flag
- model.setValue("/root/send/data2/inrsrvstat_before", "X"); // 현재 flag
- model.setValue("/root/send/data2/inrsrvstat_after", "C"); // 취소하기 위한 flag
- model.setValue("/root/send/data2/inrsrvcnclresn", "0");
- model.setValue("/root/send/data2/inrsrvcnclresnrem", "-");
- if (submit("TXPMI03401")) {
- //결정서조회
- submit("TRPMI03401");
- }
- ]]>
- </script>
- </button>
- <button id="btn_cancel" class="btn4_letter2" style="left:1148px; top:380px; width:56px; height:22px; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.close();
- ]]>
- </script>
- </button>
- <select1 id="cmb_orddeptcd" ref="/root/send/data1/orddeptcd" class="combo_search" visibility="hidden" appearance="minimal" style="left:215px; top:18px; width:99px; height:19px; ">
- <choices>
- <itemset nodeset="/root/hidden/init/orddeptcd">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </select1>
- <input id="ipt_pid" ref="/root/send/data1/pid" class="input_default" navindex="2" appearance="input" style="left:215px; top:18px; width:92px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
-
- if (event.keyCode=='13') {
- model.setValue("/root/send/data1/pid", ipt_pid.currentText);
- submit("TRPMI03401");
- model.refresh();
- }
- ]]>
- </script>
- </input>
- <select1 id="cmb_condition" ref="/root/send/data1/conditon" class="combo_search" navindex="1" appearance="minimal" style="left:110px; top:18px; width:99px; height:19px; ">
- <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 condition = model.getValue("/root/send/data1/conditon");
- if (condition == "1") {
- cmb_orddeptcd.visible = false;
- ipt_pid.visible= true;
- model.setValue("/root/send/data1/orddeptcd", "");
- model.setFocus("ipt_pid");
- }
-
- // 진료과
- if (condition == "2") {
- cmb_orddeptcd.visible = true;
- ipt_pid.visible= false;
- model.setValue("/root/send/data1/pid", "");
- model.setFocus("cmb_orddeptcd");
- }
-
- model.refresh();
- ]]>
- </script>
- </select1>
- <caption id="cpt_line" class="search_no_b" style="left:600px; top:18px; width:15px; height:17px; ">~</caption>
- <caption id="caption3" class="search_name" style="left:380px; top:18px; width:90px; height:17px; ">지시일자 :</caption>
- <input id="ipt_indirecddfrom" ref="/root/send/data1/indirecddfrom" class="input_search" inputtype="date" format="yyyy-mm-dd" style="left:495px; top:18px; width:100px; height:19px; "/>
- <input id="ipt_indirecddto" ref="/root/send/data1/indirecddto" class="input_search" inputtype="date" format="yyyy-mm-dd" style="left:615px; top:18px; width:100px; height:19px; "/>
- <bool id="bol_indirecddchk" ref="/root/send/data1/check" style="left:470px; top:20px; width:15px; height:15px; ">
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- ipt_indirecddfrom.disabled = false;
- ipt_indirecddto.disabled = false;
- // cpt_line.visible = true;
- model.setValue("/root/send/data1/indirecddfrom",getCurrentDate());
- model.setValue("/root/send/data1/indirecddto",getCurrentDate());
-
- model.refresh();
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-deselect">
- <![CDATA[
- model.setValue("/root/send/data1/indirecddfrom","");
- model.setValue("/root/send/data1/indirecddto","");
- ipt_indirecddfrom.disabled = true;
- ipt_indirecddto.disabled = true;
-
- model.refresh();
- ]]>
- </script>
- </bool>
- <button id="button2" class="btn4_letter2" style="left:1032px; top:380px; width:56px; height:22px; ">
- <caption>삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- var cur_row = grd_inhpdeci.row;
-
- var deci_pid = model.getValue("/root/main/list1/grdinhpdeci["+ cur_row +"]/pid");
- var deci_inrsrvcnclresn = model.getValue("/root/main/list1/grdinhpdeci["+ cur_row +"]/inrsrvcnclresn");
- var deci_inrsrvstat = model.getValue("/root/main/list1/grdinhpdeci["+ cur_row +"]/inrsrvstat");
-
- if (deci_pid == null || deci_pid == "" ) {
- messageBox("환자를","C002");
- return false;
- }
- // 2008.08.19 예약상태도 취소할 수 있도록 주석처리
- if (deci_inrsrvstat != "S" && deci_inrsrvstat != "R") {
- messageBox("결정, 예약인 상태를","C002");
- return false;
- }
-
- if (deci_inrsrvcnclresn == null || deci_inrsrvcnclresn == "" || deci_inrsrvcnclresn == "0" ) {
- messageBox("결정서 삭제 사유를","C002");
- return false;
- }
-
- if (messageBox("결정서를", "Q001") == 7) {
- return false;
- }
-
- model.setValue("/root/send/data2/sendflag", "DELETE");
- model.setValue("/root/send/data2/pid", model.getValue("/root/main/list1/grdinhpdeci["+ cur_row +"]/pid"));
- model.setValue("/root/send/data2/inrsrvacptdd", model.getValue("/root/main/list1/grdinhpdeci["+ cur_row +"]/inrsrvacptdd"));
- model.setValue("/root/send/data2/orddeptcd", model.getValue("/root/main/list1/grdinhpdeci["+ cur_row +"]/orddeptcd"));
- model.setValue("/root/send/data2/inrsrvacptseqno", model.getValue("/root/main/list1/grdinhpdeci["+ cur_row +"]/inrsrvacptseqno"));
- model.setValue("/root/send/data2/inrsrvstat", "X"); // 변경할 flag
- //model.setValue("/root/send/data2/inrsrvstat_before", "S"); // 현재 flag
- model.setValue("/root/send/data2/inrsrvstat_before", model.getValue("/root/main/list1/grdinhpdeci["+ cur_row +"]/inrsrvstat")); // 현재 flag
- model.setValue("/root/send/data2/inrsrvstat_after", "C"); // 취소를 위한 flag
- model.setValue("/root/send/data2/inrsrvcnclresn", model.getValue("/root/main/list1/grdinhpdeci["+ cur_row +"]/inrsrvcnclresn"));
- model.setValue("/root/send/data2/inrsrvcnclresnrem", model.getValue("/root/main/list1/grdinhpdeci["+ cur_row +"]/inrsrvcnclresnrem"));
- if (submit("TXPMI03401")) {
- //결정서조회
- submit("TRPMI03401");
- }
- ]]>
- </script>
- </button>
- <button id="ipt_search" class="btn1_letter2" navindex="3" style="left:1133px; top:17px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //model.setValue("/root/send/data1/sendflag","D");
- submit("TRPMI03401");
- model.refresh();
- //fSQueryRef();
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|