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 | show="reportControls.report.setFocus();"
|
---|
5 | paddingTop="6" paddingBottom="6" paddingLeft="6" paddingRight="6"
|
---|
6 | width="100%" height="100%" backgroundColor="white">
|
---|
7 | <mx:Script>
|
---|
8 | <![CDATA[
|
---|
9 | import gov.va.med.edp.widget.InfoDialog;
|
---|
10 | import gov.va.med.edp.control.reports.ReportEvent;
|
---|
11 | import gov.va.med.edp.model.TrackingModelLocator;
|
---|
12 | import gov.va.med.edp.util.ChangeWatcher;
|
---|
13 |
|
---|
14 | [Bindable]
|
---|
15 | private var model: TrackingModelLocator = TrackingModelLocator.getInstance();
|
---|
16 |
|
---|
17 | private function set displayReport(value: String): void
|
---|
18 | {
|
---|
19 | displayReportArea.visible = false;
|
---|
20 | displayReportArea.removeAllChildren();
|
---|
21 | switch (value){
|
---|
22 | case ReportEvent.EVENT_ACTIVITY_REPORT:
|
---|
23 | displayReportArea.addChild(new ActivityReportView());
|
---|
24 | break;
|
---|
25 | case ReportEvent.EVENT_ACUITY_REPORT:
|
---|
26 | displayReportArea.addChild(new AcuityReportView());
|
---|
27 | break;
|
---|
28 | case ReportEvent.EVENT_DELAY_REPORT:
|
---|
29 | displayReportArea.addChild(new DelayReportView());
|
---|
30 | break;
|
---|
31 | case ReportEvent.EVENT_EXPOSURE_REPORT:
|
---|
32 | displayReportArea.addChild(new ExposureReportView());
|
---|
33 | break;
|
---|
34 | case ReportEvent.EVENT_MISSED_OP_REPORT:
|
---|
35 | displayReportArea.addChild(new MissedOpReportView());
|
---|
36 | break;
|
---|
37 | case ReportEvent.EVENT_PATIENT_INTAKE_REPORT:
|
---|
38 | displayReportArea.addChild(new PtIntakeReportView());
|
---|
39 | break;
|
---|
40 | case ReportEvent.EVENT_PROVIDER_REPORT:
|
---|
41 | displayReportArea.addChild(new ProviderReportView());
|
---|
42 | break;
|
---|
43 | case ReportEvent.EVENT_SHIFT_REPORT:
|
---|
44 | displayReportArea.addChild(new ShiftReportView());
|
---|
45 | break;
|
---|
46 | case ReportEvent.EVENT_SUMMARY_REPORT:
|
---|
47 | displayReportArea.addChild(new SummaryReportView());
|
---|
48 | break;
|
---|
49 | case ReportEvent.EVENT_PATIENT_XREF_REPORT:
|
---|
50 | displayReportArea.addChild(new PatientXRefReportView());
|
---|
51 | break;
|
---|
52 | case ReportEvent.EVENT_VA_ADMISSIONS_REPORT:
|
---|
53 | displayReportArea.addChild(new VaAdmissionsReportView());
|
---|
54 | break;
|
---|
55 | case ReportEvent.EVENT_BVAC_REPORT:
|
---|
56 | displayReportArea.addChild(new BVACReportView());
|
---|
57 | break;
|
---|
58 | case ReportEvent.EVENT_ORDERS_BY_ACUITY_REPORT:
|
---|
59 | displayReportArea.addChild(new OrdersByAcuityReportView());
|
---|
60 | break;
|
---|
61 | case ReportEvent.EVENT_NONE:
|
---|
62 | break;
|
---|
63 | default:
|
---|
64 | InfoDialog.show("No matching view found for the event of type: " + value)
|
---|
65 | break;
|
---|
66 | }
|
---|
67 | displayReportArea.visible = true;
|
---|
68 | }
|
---|
69 |
|
---|
70 | private function set clearDisplayArea(value: Boolean): void
|
---|
71 | {
|
---|
72 | if (value == true) {
|
---|
73 | displayReportArea.removeAllChildren();
|
---|
74 | }
|
---|
75 | }
|
---|
76 | ]]>
|
---|
77 | </mx:Script>
|
---|
78 |
|
---|
79 | <reports:ReportControls id="reportControls" width="100%" height="10%"/>
|
---|
80 |
|
---|
81 | <mx:VBox id="displayReportArea" width="100%" height="90%" showEffect="{wipeIn}" visible="false"/>
|
---|
82 |
|
---|
83 | <mx:Binding source="model.reports.reportType" destination="displayReport" />
|
---|
84 | <mx:Binding source="model.reports.clearDisplayArea" destination="clearDisplayArea" />
|
---|
85 |
|
---|
86 | <mx:WipeRight id="wipeIn" duration="1000"/>
|
---|
87 | </mx:VBox>
|
---|