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.*" xmlns:widget="gov.va.med.edp.widget.*"
|
---|
3 | width="100%" height="100%" creationComplete="{ReportUtil.setExportButtonState(exportButton)}">
|
---|
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,dgBVACReportLogEntries.columns, dgBVACReportLogEntries.dataProvider, lblReportTitle.text, 5, 7);
|
---|
31 | ReportUtil.printDataGrid(printJob,dgBVACReportAvegares.columns, dgBVACReportAvegares.dataProvider, lblBVACAverages.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('ED BVAC Patients')}"
|
---|
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_BVAC_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="dgBVACReportLogEntries"
|
---|
80 | initialize="{AccessibilityTools.accessComponentName(dgBVACReportLogEntries,ReportUtil.accessibleReportLabelText('ED BVAC Patients'))}"
|
---|
81 | dataProvider="{model.reports.bvacReport.bvacReportLogs}"
|
---|
82 | width="100%"
|
---|
83 | height="50%"
|
---|
84 | tabIndex="1100">
|
---|
85 | <mx:columns>
|
---|
86 | <mx:DataGridColumn dataField="timeIn" labelFunction="ReportUtil.formatReportDate" headerText="Time In" sortCompareFunction="ReportUtil.sortTimeInDates"/>
|
---|
87 | <mx:DataGridColumn dataField="timeOut" labelFunction="ReportUtil.formatReportDate" headerText="Time Out" sortCompareFunction="ReportUtil.sortTimeOutDates"/>
|
---|
88 | <mx:DataGridColumn dataField="complaint" headerText="Complaint"/>
|
---|
89 | <mx:DataGridColumn dataField="provider" headerText="MD"/>
|
---|
90 | <mx:DataGridColumn dataField="acuity" headerText="Acuity"/>
|
---|
91 | <mx:DataGridColumn dataField="elapsed" headerText="Elapsed" sortCompareFunction="sortElapsedTime"/>
|
---|
92 | <mx:DataGridColumn dataField="triage" headerText="Triage" />
|
---|
93 | <mx:DataGridColumn dataField="disposition" headerText="Dispo" />
|
---|
94 | <mx:DataGridColumn dataField="admDec" headerText="Adm Dec" />
|
---|
95 | <mx:DataGridColumn dataField="admDel" headerText="Adm Delay" />
|
---|
96 | <mx:DataGridColumn dataField="diagnoses" headerText="Diagnosis" />
|
---|
97 | <mx:DataGridColumn dataField="icd9" headerText="ICD9" />
|
---|
98 | <mx:DataGridColumn dataField="vietnamVet" headerText="Viet Vet" />
|
---|
99 | <mx:DataGridColumn dataField="agentOrange" headerText="Agent Orange" />
|
---|
100 | <mx:DataGridColumn dataField="iraq" headerText="OEF/OIF" />
|
---|
101 | <mx:DataGridColumn dataField="persGulf" headerText="Pers Gulf" />
|
---|
102 | <mx:DataGridColumn dataField="vaPension" headerText="VA Pension" />
|
---|
103 | <mx:DataGridColumn dataField="pow" headerText="POW" />
|
---|
104 | <mx:DataGridColumn dataField="serviceConnPct" headerText="Serv Conn %" />
|
---|
105 | <mx:DataGridColumn dataField="purpleHeart" headerText="Purp Hrt" />
|
---|
106 | <!-- this column removed until issues with it are resolved on the VistA side
|
---|
107 | <mx:DataGridColumn dataField="unemployable" headerText="Unemploy" />
|
---|
108 | -->
|
---|
109 | <mx:DataGridColumn dataField="combatEndDate" headerText="Combat End" labelFunction="ReportUtil.formatReportDate" />
|
---|
110 | </mx:columns>
|
---|
111 | </mx:DataGrid>
|
---|
112 |
|
---|
113 | <mx:Spacer height="3%"/>
|
---|
114 | <mx:Label
|
---|
115 | id="lblBVACAverages"
|
---|
116 | text="{ReportUtil.buildReportLabelText('Averages for Different Categories')}"
|
---|
117 | paddingTop="0"
|
---|
118 | paddingBottom="0"
|
---|
119 | styleName="viewTitle"
|
---|
120 | textAlign="center"
|
---|
121 | width="100%"/>
|
---|
122 | <mx:DataGrid id="dgBVACReportAvegares"
|
---|
123 | initialize="{AccessibilityTools.accessComponentName(dgBVACReportAvegares,ReportUtil.accessibleReportLabelText('Averages for Different Categories'))}"
|
---|
124 | dataProvider="{model.reports.bvacReport.bvacReportAverages}"
|
---|
125 | width="100%"
|
---|
126 | height="30%"
|
---|
127 | tabIndex="1101">
|
---|
128 | <mx:columns>
|
---|
129 | <mx:DataGridColumn dataField="total" headerText="Total"/>
|
---|
130 | <mx:DataGridColumn dataField="triage" headerText="Triage"/>
|
---|
131 | <mx:DataGridColumn dataField="admDel" headerText="Admission Delay"/>
|
---|
132 | <mx:DataGridColumn dataField="admDec" headerText="Admission Decision"/>
|
---|
133 | <mx:DataGridColumn dataField="elapsed" headerText="Elapsed"/>
|
---|
134 | </mx:columns>
|
---|
135 | </mx:DataGrid>
|
---|
136 | </mx:VBox>
|
---|