1 | <?xml version="1.0" encoding="utf-8"?>
|
---|
2 | <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
|
---|
3 | xmlns:reports="gov.va.med.edp.view.reports.*"
|
---|
4 | xmlns:widget="gov.va.med.edp.widget.*"
|
---|
5 | width="100%"
|
---|
6 | height="100%"
|
---|
7 | creationComplete="{initState()}">
|
---|
8 |
|
---|
9 | <mx:Script>
|
---|
10 | <![CDATA[
|
---|
11 | import gov.va.med.edp.util.AccessibilityTools;
|
---|
12 | import gov.va.med.edp.control.reports.ReportDownloadEvent;
|
---|
13 | import gov.va.med.edp.util.ReportUtil;
|
---|
14 | import mx.core.Application;
|
---|
15 | import gov.va.med.edp.view.reports.print.ReportDataGridPrintView;
|
---|
16 | import mx.printing.FlexPrintJob;
|
---|
17 | import gov.va.med.edp.model.TrackingModelLocator;
|
---|
18 | import gov.va.med.edp.util.ChangeWatcher;
|
---|
19 |
|
---|
20 | [Bindable]
|
---|
21 | private var model: TrackingModelLocator = TrackingModelLocator.getInstance();
|
---|
22 |
|
---|
23 | [Bindable]
|
---|
24 | private var currentTabIndex: int = 1100;
|
---|
25 |
|
---|
26 | private function buildSummaryLbl(initilizationText: String):String {
|
---|
27 | var lbltext:String = initilizationText + providerRepeater.currentItem.name;
|
---|
28 | return lbltext;
|
---|
29 |
|
---|
30 | }
|
---|
31 |
|
---|
32 | private function doPrint():void {
|
---|
33 | var printJob:FlexPrintJob = new FlexPrintJob();
|
---|
34 | if (printJob.start() != true) return;
|
---|
35 |
|
---|
36 | printJob.addObject(this);
|
---|
37 | printJob.send();
|
---|
38 | }
|
---|
39 |
|
---|
40 | private function initState():void {
|
---|
41 | ReportUtil.setExportButtonState(exportButton);
|
---|
42 | if (model.reports.providerReport.providerList.length == 0){
|
---|
43 | currentState = "noDataFoundState";
|
---|
44 | }
|
---|
45 | }
|
---|
46 |
|
---|
47 | private function getNextTabIndex():int {
|
---|
48 | currentTabIndex = currentTabIndex + 1 + providerRepeater.currentIndex;
|
---|
49 | return currentTabIndex;
|
---|
50 | }
|
---|
51 |
|
---|
52 | ]]>
|
---|
53 | </mx:Script>
|
---|
54 | <mx:HBox width="100%">
|
---|
55 | <widget:AccessibleLabel
|
---|
56 | id="lblReportTitle"
|
---|
57 | initialize="{AccessibilityTools.accessComponentName(lblReportTitle,ReportUtil.accessibleReportLabelText('Provider Report'))}"
|
---|
58 | text="{ReportUtil.buildReportLabelText('Provider Report')}"
|
---|
59 | paddingTop="5"
|
---|
60 | paddingBottom="0"
|
---|
61 | width="100%"
|
---|
62 | styleName="viewTitle"
|
---|
63 | tabIndex="1099"
|
---|
64 | textAlign="center" />
|
---|
65 | <mx:HBox id="exportButton">
|
---|
66 | <widget:LinkButton label="Export" click="{ReportUtil.exportReport(ReportDownloadEvent.EVENT_PROVIDER_REPORT);}" tabIndex="1900"/>
|
---|
67 | <mx:Label text="|" paddingLeft="0" paddingRight="0" textAlign="center"/>
|
---|
68 | </mx:HBox>
|
---|
69 | <widget:LinkButton label="Print" click="{doPrint()}" tabIndex="1901"/>
|
---|
70 | </mx:HBox>
|
---|
71 | <mx:Spacer height="2" id="labelSpacer"/>
|
---|
72 |
|
---|
73 | <mx:VBox maxHeight="{this.height - 50}" width="100%">
|
---|
74 | <mx:Repeater id="providerRepeater" dataProvider="{model.reports.providerReport.providerList}">
|
---|
75 | <widget:AccessibleLabel
|
---|
76 | id="lblProviderSummary"
|
---|
77 | text="{buildSummaryLbl('Summary for ')}"
|
---|
78 | accessibleText="{buildSummaryLbl('Summary for ')}"
|
---|
79 | fontWeight="bold"
|
---|
80 | fontSize="12"
|
---|
81 | width="100%"
|
---|
82 | paddingTop="5"
|
---|
83 | tabIndex="{getNextTabIndex()}"
|
---|
84 | paddingBottom="0"
|
---|
85 | textAlign="center" />
|
---|
86 |
|
---|
87 | <!--outline box for borders and shading -->
|
---|
88 | <mx:VBox width="100%" borderThickness="1" borderStyle="solid" paddingTop="0" paddingBottom="0" backgroundAlpha="0.05" backgroundColor="black">
|
---|
89 | <!--summary/averages box -->
|
---|
90 | <mx:HBox width="100%" paddingTop="10" paddingBottom="10">
|
---|
91 | <mx:Label text="Total Num of Patients Handled: " tabIndex="{getNextTabIndex()}"/>
|
---|
92 | <widget:AccessibleLabel text="{providerRepeater.currentItem.total}" accessibleText="{'Total Number of Patients Handled is ' + providerRepeater.currentItem.total}" tabIndex="{getNextTabIndex()}"/>
|
---|
93 | <mx:Spacer width="20%"/>
|
---|
94 | <mx:Label text="Avg Time from Time In to Provider Assigned: " tabIndex="{getNextTabIndex()}"/>
|
---|
95 | <widget:AccessibleLabel text="{providerRepeater.currentItem.avgTimeMDAssigned}" accessibleText="{'Average Time from Time In to Provider Assigned is ' + providerRepeater.currentItem.avgTimeMDAssigned}" tabIndex="{getNextTabIndex()}"/>
|
---|
96 | <mx:Spacer width="20%"/>
|
---|
97 | <mx:Label text="Avg Time from Provider Assigned to Disp: " tabIndex="{getNextTabIndex()}"/>
|
---|
98 | <widget:AccessibleLabel text="{providerRepeater.currentItem.avgTimeToDisposition}" accessibleText="{'Average Time from Provider Assigned to Disposition is ' + providerRepeater.currentItem.avgTimeToDisposition}" tabIndex="{getNextTabIndex()}"/>
|
---|
99 | </mx:HBox>
|
---|
100 |
|
---|
101 | <widget:AccessibleLabel
|
---|
102 | id="lblProviderDetails"
|
---|
103 | text="{buildSummaryLbl('Shift Breakdown/Details for ')}"
|
---|
104 | accessibleText="{buildSummaryLbl('Shift Breakdown/Details for ')}"
|
---|
105 | paddingTop="0"
|
---|
106 | paddingBottom="0"
|
---|
107 | width="100%"
|
---|
108 | tabIndex="{getNextTabIndex()}"
|
---|
109 | textAlign="center" />
|
---|
110 | <mx:DataGrid id="providerReportDataGrid"
|
---|
111 | dataProvider="{providerRepeater.currentItem.shifts}"
|
---|
112 | width="100%"
|
---|
113 | paddingBottom="0"
|
---|
114 | tabIndex="{getNextTabIndex()}"
|
---|
115 | rowCount="5">
|
---|
116 | <mx:columns>
|
---|
117 | <mx:DataGridColumn dataField="number" headerText="Shift" width="60"/>
|
---|
118 | <mx:DataGridColumn dataField="acuity" headerText="Acuity" width="60"/>
|
---|
119 | <mx:DataGridColumn dataField="total" headerText="Number of Patients"/>
|
---|
120 | <mx:DataGridColumn dataField="timeInToMDAssigned" headerText="Time In to MD Assigned" sortable="false"/>
|
---|
121 | <mx:DataGridColumn dataField="timeFromMDAssignedToDisposition" headerText="Time from MD Assigned to Disposition" sortable="false" width="240"/>
|
---|
122 | </mx:columns>
|
---|
123 | </mx:DataGrid>
|
---|
124 | </mx:VBox>
|
---|
125 | <mx:Spacer height="10"/>
|
---|
126 | </mx:Repeater>
|
---|
127 | </mx:VBox>
|
---|
128 | <mx:states>
|
---|
129 | <mx:State name="noDataFoundState">
|
---|
130 | <mx:RemoveChild target="{providerRepeater}"/>
|
---|
131 | <mx:AddChild relativeTo="{labelSpacer}" position="after">
|
---|
132 | <mx:target>
|
---|
133 | <mx:HBox width="100%" borderThickness="1" borderStyle="solid" backgroundAlpha="0.05" backgroundColor="black">
|
---|
134 | <widget:AccessibleLabel width="100%" text="No data was found for the selected time range." textAlign="center" styleName="viewTitle" tabIndex="1600"/>
|
---|
135 | </mx:HBox>
|
---|
136 | </mx:target>
|
---|
137 | </mx:AddChild>
|
---|
138 | </mx:State>
|
---|
139 | </mx:states>
|
---|
140 |
|
---|
141 | </mx:VBox>
|
---|