source: EDIS/tags/ed/tracking-ui-core/src/main/flex/gov/va/med/edp/view/log/PatientHeaderBar.mxml@ 1240

Last change on this file since 1240 was 1240, checked in by George Lilly, 13 years ago

new version from the VA

File size: 4.9 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2
3<!--PatientHeaderBar.mxml -->
4<!--
5ApplicationControlBar has some weird borders that can make it screw up your layouts.
6Meaning, if you have a Canvas with 100% width and height, and have theApplicationControl
7bar in it, your Canvas will get scrollbars . Easiest way to fix is to (like a lot of
8things) wrap it in a Canvas with width and height of a 100%, as well as your vertical
9and horizontalScrollPolicies set to “off”. That’ll make it flush and not cause scrollbars.
10This works for other components as well that give you layout grief.
11-->
12<mx:VBox
13 xmlns:mx="http://www.adobe.com/2006/mxml"
14 xmlns:pt="gov.va.med.edp.pt.demog.view.*"
15 verticalScrollPolicy="off" horizontalScrollPolicy="off">
16
17<mx:ApplicationControlBar
18 paddingBottom="0"
19 paddingTop="0"
20 dock="true"
21 width="100%"
22 fillColors="[#6688E5,#3F6BEA]"
23 fillAlphas="[0.6,0.6]" >
24
25 <mx:Script>
26 <![CDATA[
27 import gov.va.med.edp.pt.demog.view.SelectPatientEvent;
28 import gov.va.med.edp.pt.demog.model.PatientChecksModel;
29 import gov.va.med.edp.pt.demog.IPatientChecksController;
30 import gov.va.med.edp.pt.demog.view.PatientRecordFlagsDialog;
31 import gov.va.med.edp.pt.demog.model.PatientSelectVO;
32 import gov.va.med.edp.model.TrackingModelLocator;
33 import gov.va.med.edp.util.ChangeWatcher;
34 import gov.va.med.edp.util.AccessibilityTools;
35
36 [Bindable]
37 public var model:TrackingModelLocator = TrackingModelLocator.getInstance();
38
39 [Bindable]
40 public var ptChecksController:IPatientChecksController;
41
42 [Bindable]
43 public var patientChecksModel:PatientChecksModel;
44
45 private function getPatient(name: String): PatientSelectVO
46 {
47 // name is passed in just to force the binding to call this
48 var patient: PatientSelectVO = new PatientSelectVO();
49 patient.dfn = model.logEdit.entry.dfn;
50 patient.name = model.logEdit.entry.name;
51 patient.ssn = model.logEdit.entry.ssn;
52 patient.dob = model.logEdit.entry.dob;
53 return patient;
54 }
55
56 private function changePatient(event: SelectPatientEvent): void
57 {
58 ChangeWatcher.changeField(event);
59 }
60
61 private function patientButtonLeft(pw: int, dw: int, sw: int): int
62 {
63 return (pw > (dw + sw + 12)) ? pw + 32 : dw + sw + 18;
64 }
65
66 private function set handleFlagsButton(value: Boolean): void
67 {
68 flag.visible = value;
69 }
70
71 private function displayFlagsDialog(): void
72 {
73 if (model.logEdit.entry.patientFlags != null &&
74 model.logEdit.entry.patientFlags.length > 0) {
75 PatientRecordFlagsDialog.show(model.logEdit.entry.patientFlags);
76 }
77 }
78
79
80 ]]>
81 </mx:Script>
82
83 <mx:Canvas width="100%" >
84 <mx:Label
85 id="ptName"
86 top="0" left="6"
87 text="{model.logEdit.entry.name}"
88 toolTip="{model.logEdit.entry.name}"
89 fontWeight="bold" />
90 <mx:Label
91 id="ssn"
92 top="{ptName.height + 2}" left="6"
93 text="{model.logEdit.entry.ssn}"
94 toolTip="{model.logEdit.entry.ssn}"/>
95 <mx:Label
96 id="dob"
97 top="{ptName.height + 2}" left="{ssn.width + 12}"
98 text="{model.logEdit.entry.dob}"
99 toolTip="{model.logEdit.entry.dob}"/>
100 <pt:SelectPatientButton
101 id="editPatient"
102 verticalCenter="0"
103 left="{patientButtonLeft(ptName.width, dob.width, ssn.width)}"
104 visible="{(model.logEdit.entry.dfn == '')}"
105 label="Identify Patient..."
106 patient="{getPatient(model.logEdit.entry.name)}"
107 selectPatient="changePatient(event)" tabIndex="1000"
108 ptSelectController="{ptChecksController}"
109 patientChecksModel="{patientChecksModel}"/>
110 <mx:Canvas
111 paddingTop="0" paddingBottom="0" paddingLeft="0" paddingRight="0" right="6" >
112 <!-- Modified by jtorreno 2008.02.13 for accessibility functionality - Start -->
113 <mx:Button
114 id="flag"
115 visible="{model.logEdit.entry.patientFlags.length > 0}"
116 initialize="{AccessibilityTools.accessComponentName(flag,'Flag')}"
117 icon="@Embed(source='flag.png')"
118 click="{displayFlagsDialog()}"
119 left="0" width="24" verticalCenter="0" tabIndex="1001"/>
120 <!-- Modified by jtorreno 2008.02.13 for accessibility functionality - End -->
121 <mx:Form id="times" left="{flag.width + 6}" indicatorGap="0"
122 paddingTop="0" paddingBottom="0" paddingLeft="0" paddingRight="0">
123 <mx:FormItem label="in" toolTip="in" tabIndex="1002" >
124 <mx:Label
125 text="{fmtDt.format(model.logEdit.entry.inTS)}"
126 toolTip="{fmtDt.format(model.logEdit.entry.inTS)}"
127 styleName="formField" />
128 </mx:FormItem>
129 <mx:FormItem label="out" toolTip="out" visible="{model.logEdit.entry.outTS != null}" tabIndex="1003">
130 <mx:Label
131 text="{fmtDt.format(model.logEdit.entry.outTS)}"
132 toolTip="{fmtDt.format(model.logEdit.entry.outTS)}"
133 styleName="formField" />
134 </mx:FormItem>
135 </mx:Form>
136 </mx:Canvas>
137 </mx:Canvas>
138
139</mx:ApplicationControlBar>
140
141<mx:DateFormatter id="fmtDt" formatString="D MMM YY J:NN" />
142</mx:VBox>
Note: See TracBrowser for help on using the repository browser.