123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418 |
- <?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>병상가동률조회</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <send>
- <data1>
- <refcond/>
- <fromdd/>
- <todd/>
- <termflag/>
- <kindflag/>
- </data1>
- </send>
- <main>
- <bedoperatingratelist/>
- </main>
- <init>
- </init>
- <hidden>
- </hidden>
- </root>
- </instance>
- <submission id="TRPMI03801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" resultref="/root/main/bedoperatingratelist"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
-
- // zbcfGetCodeList(new Array("P0149","P0016"), new Array("/root/init/P0149list", "/root/init/P0016list"));
-
- // submit("TRPMI00106", false);
- model.setValue("/root/send/data1/refcond" , "WARD");
-
- fShowGridWithRefCond("WARD");
-
- ipt_fromdd.value = getCurrentDate();
- ipt_todd.value = getCurrentDate();
-
- if (getUserInfo("dutplceinstcd") == "032" || getUserId() == "PAM") {
- chk_kindflag.disabled = false;
- }
-
- makeReportPreview(0, 0, 10, 10, "grp_report");
- model.refresh();
- ]]>
- </script>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/utilHelper.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">
- <![CDATA[
-
- function fInitialize() {
- model.resetInstanceNode("/root/main/bedoperatingratelist");
- model.resetInstanceNode("/root/send");
-
- model.setValue("/root/send/data1/refcond" , "WARD");
-
- model.refresh();
- }
-
- // 그리드 조건에 따라 컬럼 감추기
- function fShowGridWithRefCond(pRefCond) {
-
- var kindflag = model.getValue("/root/send/data1/kindflag");
-
- if (pRefCond == "WARD") {
- if (chk_term.value == "T" ) {
- grd_list.colHidden(grd_list.colRef("dschnoticnt") ) = true;
- } else {
- grd_list.colHidden( grd_list.colRef("dschnoticnt") ) = false;
- }
-
- if (kindflag == "Y") {
- grd_list.colHidden(0) = true;
- grd_list.colHidden(1) = false;
- grd_list.fixedCols = 2;
- } else {
- grd_list.colHidden(0) = false;
- grd_list.colHidden(1) = true;
- grd_list.fixedCols = 1;
- }
-
- grd_list.colHidden(2) = true;
- grd_list.colHidden(3) = false;
- grd_list.colHidden(4) = true;
-
- grd_list.mergeCellsFixedCols = "bycol"; // 병동정보를 merge한다.
-
- } else if ( pRefCond == "CENTER") {
- grd_list.colHidden(0) = true;
- grd_list.colHidden(1) = true;
- grd_list.colHidden(2) = false;
- grd_list.colHidden(3) = true;
- grd_list.colHidden(4) = true;
- grd_list.fixedCols = 4;
- grd_list.colHidden( grd_list.colRef("dschnoticnt") ) = false;
-
- } else if ( pRefCond == "DEPT") {
- grd_list.colHidden(0) = true;
- grd_list.colHidden(1) = true;
- grd_list.colHidden(2) = true;
- grd_list.colHidden(3) = true;
- grd_list.colHidden(4) = false;
- grd_list.fixedCols = 5;
- grd_list.colHidden( grd_list.colRef("dschnoticnt") ) = false;
-
- } else {
-
- if (kindflag == "Y") {
- grd_list.colHidden(0) = true;
- grd_list.colHidden(1) = false;
- grd_list.fixedCols = 2;
- } else {
- grd_list.colHidden(0) = false;
- grd_list.colHidden(1) = true;
- grd_list.fixedCols = 1;
- }
-
- grd_list.colHidden(2) = true;
- grd_list.colHidden(3) = false;
- grd_list.colHidden( grd_list.colRef("dschnoticnt") ) = false;
- grd_list.mergeCellsFixedCols = "bycol"; // 병동정보를 merge한다.
- }
- }
-
- // 통계
- function fSetSubTotal(pRefCond) {
- grd_list.subtotal("sum", -1, grd_list.colRef("bedcnt"),"", "", 1, "Total");
- grd_list.subtotal("sum", -1, grd_list.colRef("inpatcnt"),"", "", 1, "Total");
- grd_list.subtotal("sum", -1, grd_list.colRef("vacantcnt"),"", "", 1, "Total");
- grd_list.subtotal("sum", -1, grd_list.colRef("dschnoticnt"),"", "", 1, "Total");
-
- if (pRefCond == "WARD") {
- grd_list.subtotal("average", -1, grd_list.colRef("operatingrate"),"#,###.#", "", 0, "Total");
- } else if ( pRefCond == "CENTER") {
- grd_list.subtotal("average", -1, grd_list.colRef("operatingrate"),"#,###.#", "", 1, "Total");
- } else {
- grd_list.subtotal("average", -1, grd_list.colRef("operatingrate"),"#,###.#", "", 0, "Total");
- }
- }
-
- // 병동가동률 퍼센트별 색깔구분
- function fSetColor() {
- var iGridCount = grd_list.rows;
- for (var idx = 1 ; idx <= iGridCount ; idx++) {
- var sOperatingRate = model.getValue("/root/main/bedoperatingratelist[" + idx + "]/operatingrate");
- var iOperatingRate = parseInt(sOperatingRate); // parseIn("19.9") -> 19 floor와 같은 작용
-
- // 0 <= xx < 90
- if (iOperatingRate >= 0 && iOperatingRate < 90) {
- grd_list.cellstyle("background-color", idx, 7) = "#7FFFD4";
- }
- // 90 <= xx < 95
- if (iOperatingRate >= 90 && iOperatingRate < 95) {
- grd_list.cellstyle("background-color", idx, 7) = "#FAF58C";
- }
- // 95 <= xx
- if (iOperatingRate >= 95) {
- grd_list.cellstyle("background-color", idx, 7) = "#FF4646";
- }
- }
-
- model.refresh();
- }
-
- function fPrint(pCond) {
- var sPrintYN = "false";
- var sAutoCloseYN = "false";
- var sViewYN = "";
-
- if (pCond == "PREVIEW") {
- sPrintYN = "false";
- sAutoCloseYN = "false";
- sViewYN = "";
- }
-
- if (pCond == "PRINT") {
- sPrintYN = "true";
- sAutoCloseYN = "false";
- sViewYN = "grp_report";
- }
-
- var iCount = getNodesetCount("/root/main/vipinpatlist/vipinpatspec");
- if (iCount > 0) {
- var sPrintFromdd = model.getValue("/root/send/fromdd");
- var sPrinttodd = model.getValue("/root/send/todd");
-
- sPrintFromdd = sPrintFromdd.substr(0, 4) + "-" + sPrintFromdd.substr(4, 2) + "-" + sPrintFromdd.substr(6, 4);
-
- model.makeValue("/root/hidden/printtype/printkind", "VIP재원");
- model.makeValue("/root/hidden/printtype/printfromdd", sPrintFromdd);
- model.makeValue("/root/hidden/printtype/printtodd", sPrinttodd);
-
- exeReportPreview("RPPMI03601", "XMLSTR" , "" , "" , sPrintYN , "", "", "", "", sAutoCloseYN, "", sViewYN);
- } else {
- messageBox("출력할 내용이 없습니다!!", "I");
- }
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body guideline="1,1192;1,1196;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:200px; height:14px; ">병상가동률조회</caption>
- </group>
- <group id="group3" style="left:0px; top:13px; width:1195px; height:744px; ">
- <group id="group2" style="left:0px; top:10px; width:1194px; height:35px; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <line id="line2" class="line_4" style="x1:1108px; y1:7px; x2:1108px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
- <caption id="caption17" class="search_name" style="left:5px; top:10px; width:86px; height:17px; ">조회구분 :</caption>
- <select1 id="radio1" ref="/root/send/data1/refcond" appearance="full" cellspacing="5" cols="3" overflow="visible" style="left:95px; top:11px; width:250px; height:17px; border-style:none; ">
- <choices>
- <item>
- <label>병동별</label>
- <value>WARD</value>
- </item>
- <item>
- <label>센터별</label>
- <value>CENTER</value>
- </item>
- <item>
- <label>진료과별(재원기준)</label>
- <value>DEPT</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //btn_search.dispatch("DOMActivate");
- if ( radio1.value == "WARD" ) {
- chk_kindflag.visible = true;
- chk_term.visible = true;
- // grd_list.visible = true;
- // grd_list2.visible = false;
- } else if ( radio1.value == "CENTER" ) {
- chk_kindflag.visible = true;
- chk_term.visible = false;
- // grd_list.visible = true;
- // grd_list2.visible = false;
- } else {
- chk_kindflag.visible = false;
- chk_term.visible = false;
- // grd_list.visible = false;
- // grd_list2.visible = true;
- }
- chk_term.dispatch("xforms-value-changed");
- ]]>
- </script>
- </select1>
- <button id="btn_search" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var sRefCond = model.getValue("/root/send/data1/refcond");
- fShowGridWithRefCond(sRefCond);
-
- if( chk_term.value == "T") {
- var fromdd = ipt_fromdd.value;
- var todd = ipt_todd.value;
- var term = getDateInterval(fromdd, todd);
-
- if ( term > 185 ) {
- messageBox("조회기간은 6개월을 넘을수 없습니다.", "E999");
- ipt_fromdd.value = getCurrentDate();
- ipt_todd.value = getCurrentDate();
- return;
- }
- }
-
-
- // 병상가동률 조회
- submit("TRPMI03801");
-
- // subtotal 추가
- //fSetSubTotal(sRefCond);
- // mgr에서 total 계산
-
- // color setting
- fSetColor();
-
- model.refresh();
- ]]>
- </script>
- </button>
- <select id="chk_term" ref="/root/send/data1/termflag" visibility="visible" overflow="visible" appearance="full" style="left:458px; top:11px; width:57px; height:15px; border-style:none; ">
- <choices>
- <item>
- <label>기간별</label>
- <value>T</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if ( chk_term.value == "T" ) {
- caption7.visible = true;
- caption5.visible = true;
- ipt_fromdd.visible = true;
- ipt_todd.visible = true;
- } else {
- caption7.visible = false;
- caption5.visible = false;
- ipt_fromdd.visible = false;
- ipt_todd.visible = false;
- }
- ]]>
- </script>
- </select>
- <input id="ipt_fromdd" ref="/root/send/data1/fromdd" class="input_search" visibility="hidden" inputtype="date" style="left:610px; top:9px; width:95px; height:19px; "/>
- <input id="ipt_todd" ref="/root/send/data1/todd" class="input_search" visibility="hidden" inputtype="date" style="left:725px; top:9px; width:95px; height:19px; "/>
- <caption id="caption5" visibility="hidden" style="left:710px; top:10px; width:15px; height:20px; ">~</caption>
- <caption id="caption7" class="search_name" visibility="hidden" style="left:520px; top:10px; width:86px; height:17px; ">조회일자 :</caption>
- <select id="chk_kindflag" ref="/root/send/data1/kindflag" disabled="true" overflow="visible" appearance="full" style="left:365px; top:11px; width:80px; height:15px; border-style:none; ">
- <choices>
- <item>
- <label>병동구분별</label>
- <value>Y</value>
- </item>
- </choices>
- </select>
- </group>
- <caption id="caption2" class="tit_2" style="left:5px; top:55px; width:300px; height:14px; font-family:돋움; vertical-align:middle; ">병상가동률</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
- <group id="grp_report" visibility="hidden" style="left:865px; top:50px; width:65px; height:15px; "/>
- <button id="btn_preview" class="btn2_letter4" visibility="hidden" style="left:1018px; top:50px; width:64px; height:19px; ">
- <caption>미리보기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fPrint("PREVIEW");
- ]]>
- </script>
- </button>
- <button id="btn_print" class="btn2_letter2" visibility="hidden" style="left:1085px; top:50px; width:42px; height:19px; ">
- <caption>출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fPrint("PRINT");
- ]]>
- </script>
- </button>
- <button id="btn_excel" class="btn2_letter4" style="left:1130px; top:50px; width:64px; height:19px; ">
- <caption>엑셀저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var fileName = window.fileDialog("save", ",", false, getCurrentDate(), "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
-
- if (fileName != "")
- {
- grd_list.saveExcel(fileName, "SheetName", false, false, "", "", false);
- }
- ]]>
- </script>
- </button>
- <datagrid id="grd_list" nodeset="/root/main/bedoperatingratelist" class="datagrid2" caption="층^구분^센터^병동^진료과^병상수^재원병상^빈병상^퇴원예정(통보)^병상가동률(%)" colsep="^" colwidth="100, 100, 100, 150, 200, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:75px; width:1194px; height:668px; ">
- <col ref="posinfocd" style="text-align:center; "/>
- <col ref="wardkind" style="text-align:center; "/>
- <col disabled="true" ref="spaceflag" type="output" style="text-align:left; "/>
- <col ref="wardcd" style="text-align:left; "/>
- <col ref="spaceflag" style="text-align:left; "/>
- <col ref="bedcnt" format="#,###" style="text-align:center; "/>
- <col ref="inpatcnt" format="#,###" style="text-align:center; "/>
- <col ref="vacantcnt" format="#,###" style="text-align:center; "/>
- <col ref="dschnoticnt" format="#,###" style="text-align:center; "/>
- <col ref="operatingrate" roundmode="round" roundposition="1" style="text-align:right; padding-right:10; "/>
- </datagrid>
- <caption id="caption8" style="left:115px; top:50px; width:860px; height:15px; font-weight:bold; color:#0000ff; ">★ 병동 기간별 가동률 조회시 병상정보는 자정12시를 기준으로 저장된 데이터를 기준으로 조회됩니다. 조회기간은 6개월을 넘길수 없습니다.★</caption>
- </group>
- <group id="group5" style="left:0px; top:757px; width:1195px; height:27px; ">
- <button id="button2" class="btn4_letter3" style="left:1126px; top:5px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- </button>
- <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
- <shape id="rectangle1" appearance="rectangle" style="left:35px; top:5px; width:12px; height:12px; "/>
- </group>
- <group id="group4" style="left:0px; top:757px; width:1195px; height:27px; ">
- <button id="button1" class="btn4_letter3" style="left:1126px; top:5px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- </button>
- <line id="line3" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
- <shape id="rectangle2" appearance="rectangle" style="left:35px; top:5px; width:12px; height:12px; "/>
- </group>
- <group id="group6" style="left:0px; top:757px; width:1195px; height:27px; ">
- <button id="button3" class="btn4_letter3" style="left:1126px; top:5px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- </button>
- <line id="line4" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
- <shape id="rectangle3" appearance="rectangle" style="left:0px; top:5px; width:12px; height:12px; background-color:#7FFFD4; "/>
- <shape id="rectangle4" appearance="rectangle" style="left:57px; top:5px; width:12px; height:12px; background-color:#FAF58C; "/>
- <shape id="rectangle5" appearance="rectangle" style="left:114px; top:5px; width:12px; height:12px; background-color:#FF4646; "/>
- <caption id="caption1" style="left:14px; top:5px; width:35px; height:12px; ">: 여유</caption>
- <caption id="caption3" style="left:71px; top:5px; width:35px; height:14px; ">: 경고</caption>
- <caption id="caption4" style="left:128px; top:5px; width:35px; height:14px; ">: 부족</caption>
- </group>
- </xhtml:body>
- </xhtml:html>
|