1 | <?xml version="1.0" encoding="utf-8"?>
|
---|
2 | <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:reports="gov.va.med.edp.view.reports.*"
|
---|
3 | width="100%" height="100%" creationComplete="{ReportUtil.setExportButtonState(exportButton)}" xmlns:widget="gov.va.med.edp.widget.*">
|
---|
4 |
|
---|
5 | <mx:Script>
|
---|
6 | <![CDATA[
|
---|
7 | import gov.va.med.edp.util.Vista;
|
---|
8 | import gov.va.med.edp.vo.reports.ReportLogEntryVO;
|
---|
9 | import mx.utils.ObjectUtil;
|
---|
10 | import gov.va.med.edp.control.reports.ReportDownloadEvent;
|
---|
11 | import gov.va.med.edp.vo.reports.ReportParamsVO;
|
---|
12 | import gov.va.med.edp.control.reports.ReportEvent;
|
---|
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 | import gov.va.med.edp.util.AccessibilityTools;
|
---|
20 |
|
---|
21 | [Bindable]
|
---|
22 | private var model: TrackingModelLocator = TrackingModelLocator.getInstance();
|
---|
23 |
|
---|
24 |
|
---|
25 | private function doPrint():void {
|
---|
26 |
|
---|
27 | var printJob:FlexPrintJob = new FlexPrintJob();
|
---|
28 | if (printJob.start() != true) return;
|
---|
29 |
|
---|
30 | ReportUtil.printDataGrid(printJob,dgActivityReportLogEnteries.columns, dgActivityReportLogEnteries.dataProvider, lblReportTitle.text, 5, 7);
|
---|
31 | ReportUtil.printDataGrid(printJob,dgActivityReportAvegares.columns, dgActivityReportAvegares.dataProvider, lblActivityAverages.text, 7, 5);
|
---|
32 |
|
---|
33 | printJob.send();
|
---|
34 | }
|
---|
35 |
|
---|
36 |
|
---|
37 | private function sortElapsedTime(obj1:Object, obj2:Object):int
|
---|
38 | {
|
---|
39 | var elapsed1: String = obj1.elapsed;
|
---|
40 | var elapsed2: String = obj2.elapsed;
|
---|
41 | if (elapsed1.indexOf("*") != -1){
|
---|
42 | var len1:int= elapsed1.length
|
---|
43 | elapsed1 = elapsed1.substring(0, len1-2);
|
---|
44 | }
|
---|
45 | if (elapsed2.indexOf("*") != -1){
|
---|
46 | var len2:int= elapsed2.length;
|
---|
47 | elapsed2 = elapsed2.substring(0, len2-2);
|
---|
48 | }
|
---|
49 | var elapsed1Num:Number = parseFloat(elapsed1);
|
---|
50 | var elapsed2Num:Number = parseFloat(elapsed2);
|
---|
51 |
|
---|
52 | if (elapsed1Num > elapsed2Num){
|
---|
53 | return -1;
|
---|
54 | } else if (elapsed1Num < elapsed2Num) {
|
---|
55 | return 1;
|
---|
56 | } else return 0;
|
---|
57 | }
|
---|
58 |
|
---|
59 |
|
---|
60 | ]]>
|
---|
61 | </mx:Script>
|
---|
62 |
|
---|
63 | <mx:HBox width="100%" horizontalGap="0">
|
---|
64 | <mx:Label
|
---|
65 | id="lblReportTitle"
|
---|
66 | text="{ReportUtil.buildReportLabelText('Activity Report')}"
|
---|
67 | paddingTop="0"
|
---|
68 | paddingBottom="0"
|
---|
69 | width="100%"
|
---|
70 | styleName="viewTitle"
|
---|
71 | textAlign="center" />
|
---|
72 | <mx:HBox id="exportButton">
|
---|
73 | <widget:LinkButton label="Export" click="{ReportUtil.exportReport(ReportDownloadEvent.EVENT_ACTIVITY_REPORT);}" tabIndex="1900"/>
|
---|
74 | <mx:Label text="|" paddingLeft="0" paddingRight="0" textAlign="center"/>
|
---|
75 | </mx:HBox>
|
---|
76 | <widget:LinkButton label="Print" click="{doPrint()}" tabIndex="1901"/>
|
---|
77 | </mx:HBox>
|
---|
78 |
|
---|
79 | <mx:DataGrid id="dgActivityReportLogEnteries"
|
---|
80 | initialize="{AccessibilityTools.accessComponentName(dgActivityReportLogEnteries,ReportUtil.accessibleReportLabelText('Activity Report'))}"
|
---|
81 | dataProvider="{model.reports.activityReport.activityLogs}"
|
---|
82 | width="100%"
|
---|
83 | wordWrap="true"
|
---|
84 | height="50%"
|
---|
85 | tabIndex="1100">
|
---|
86 | <mx:columns>
|
---|
87 | <mx:DataGridColumn dataField="id" headerText="IEN" width="40"/>
|
---|
88 | <mx:DataGridColumn dataField="timeIn" labelFunction="ReportUtil.formatReportDate" headerText="Time In" width="105" sortCompareFunction="ReportUtil.sortTimeInDates"/>
|
---|
89 | <mx:DataGridColumn dataField="timeOut" labelFunction="ReportUtil.formatReportDate" headerText="Time Out" width="105" sortCompareFunction="ReportUtil.sortTimeOutDates"/>
|
---|
90 | <mx:DataGridColumn dataField="complaint" headerText="Complaint"/>
|
---|
91 | <mx:DataGridColumn dataField="provider" headerText="MD" width="130"/>
|
---|
92 | <mx:DataGridColumn dataField="acuity" headerText="Acuity" width="58"/>
|
---|
93 | <mx:DataGridColumn dataField="elapsed" headerText="Elapsed" width="67" sortCompareFunction="sortElapsedTime"/>
|
---|
94 | <mx:DataGridColumn dataField="triage" headerText="Triage" width="55"/>
|
---|
95 | <mx:DataGridColumn dataField="wait" headerText="Wait" width="50"/>
|
---|
96 | <mx:DataGridColumn dataField="disposition" headerText="Dispo" width="67"/>
|
---|
97 | <mx:DataGridColumn dataField="admDec" headerText="Adm Dec" width="70"/>
|
---|
98 | <mx:DataGridColumn dataField="admDel" headerText="Adm Delay" width="75"/>
|
---|
99 | <mx:DataGridColumn dataField="diagnoses" headerText="Diagnosis" width="120"/>
|
---|
100 | <mx:DataGridColumn dataField="icd9" headerText="ICD9" width="67"/>
|
---|
101 | </mx:columns>
|
---|
102 | </mx:DataGrid>
|
---|
103 |
|
---|
104 | <mx:Spacer height="3%"/>
|
---|
105 | <mx:Label
|
---|
106 | id="lblActivityAverages"
|
---|
107 | text="{ReportUtil.buildReportLabelText('Averages for Different Categories')}"
|
---|
108 | paddingTop="0"
|
---|
109 | paddingBottom="0"
|
---|
110 | styleName="viewTitle"
|
---|
111 | textAlign="center"
|
---|
112 | width="100%"/>
|
---|
113 | <mx:DataGrid id="dgActivityReportAvegares"
|
---|
114 | initialize="{AccessibilityTools.accessComponentName(dgActivityReportAvegares,ReportUtil.accessibleReportLabelText('Averages for Different Categories'))}"
|
---|
115 | dataProvider="{model.reports.activityReport.activityAverages}"
|
---|
116 | width="100%"
|
---|
117 | height="30%"
|
---|
118 | tabIndex="1101">
|
---|
119 | <mx:columns>
|
---|
120 | <mx:DataGridColumn dataField="type" headerText="Category"/>
|
---|
121 | <mx:DataGridColumn dataField="total" headerText="Total"/>
|
---|
122 | <mx:DataGridColumn dataField="wait" headerText="Wait" sortable="false"/>
|
---|
123 | <mx:DataGridColumn dataField="triage" headerText="Triage" sortable="false"/>
|
---|
124 | <mx:DataGridColumn dataField="admDel" headerText="Admission Delay" sortable="false"/>
|
---|
125 | <mx:DataGridColumn dataField="admDec" headerText="Admission Decision" sortable="false"/>
|
---|
126 | <mx:DataGridColumn dataField="elapsed" headerText="Elapsed" sortable="false"/>
|
---|
127 | </mx:columns>
|
---|
128 | </mx:DataGrid>
|
---|
129 | </mx:VBox>
|
---|