[1227] | 1 | <?xml version="1.0" encoding="utf-8"?>
|
---|
| 2 | <!-- LogEntryView.mxml -->
|
---|
| 3 |
|
---|
| 4 | <mx:HBox
|
---|
| 5 | xmlns:mx="http://www.adobe.com/2006/mxml"
|
---|
| 6 | xmlns:log="gov.va.med.edp.view.log.*"
|
---|
| 7 | xmlns:widget="gov.va.med.edp.widget.*"
|
---|
| 8 | width="100%" height="100%"
|
---|
| 9 | paddingBottom="0" paddingRight="0" paddingLeft="0" paddingTop="0"
|
---|
| 10 | currentState="{getState(model.appViewState)}"
|
---|
| 11 | styleName="contentArea">
|
---|
| 12 |
|
---|
| 13 | <mx:states>
|
---|
| 14 | <mx:State name="ClosedVisits" enterState="enterClosedVisits()">
|
---|
| 15 | <mx:RemoveChild target="{logEntrySelector}"/>
|
---|
| 16 | <mx:AddChild relativeTo="{selectorArea}" position="firstChild">
|
---|
| 17 | <log:ClosedVisitSelector id="closedVisits" width="100%" height="100%"/>
|
---|
| 18 | </mx:AddChild>
|
---|
| 19 | </mx:State>
|
---|
| 20 | </mx:states>
|
---|
| 21 |
|
---|
| 22 | <mx:Script>
|
---|
| 23 | <![CDATA[
|
---|
| 24 | import gov.va.med.edp.pt.demog.model.MatchingPatientsModel;
|
---|
| 25 | import gov.va.med.edp.pt.demog.model.PatientChecksModel;
|
---|
| 26 | import gov.va.med.edp.pt.demog.IPatientChecksController;
|
---|
| 27 | import gov.va.med.edp.model.TrackingModelLocator;
|
---|
| 28 |
|
---|
| 29 | [Bindable]
|
---|
| 30 | public var ptChecksController:IPatientChecksController;
|
---|
| 31 |
|
---|
| 32 | [Bindable]
|
---|
| 33 | public var patientChecksModel:PatientChecksModel;
|
---|
| 34 |
|
---|
| 35 | [Bindable]
|
---|
| 36 | public var model: TrackingModelLocator = TrackingModelLocator.getInstance();
|
---|
| 37 |
|
---|
| 38 | private function enterClosedVisits(): void
|
---|
| 39 | {
|
---|
| 40 | closedVisits.patient.text = '';
|
---|
| 41 | closedVisits.matchPatientName();
|
---|
| 42 | }
|
---|
| 43 |
|
---|
| 44 | private function getState(state: int): String
|
---|
| 45 | {
|
---|
| 46 | if (model.appViewState == TrackingModelLocator.VIEW_APP_EDIT_CLOSED) {
|
---|
| 47 | if (logEntrySelector != null) {
|
---|
| 48 | logEntrySelector.stopRefreshTimer();
|
---|
| 49 | }
|
---|
| 50 | return "ClosedVisits";
|
---|
| 51 | }
|
---|
| 52 | if ((model.appViewState == TrackingModelLocator.VIEW_APP_DISPOSITION) ||
|
---|
| 53 | (model.appViewState == TrackingModelLocator.VIEW_APP_SIGN_IN) ||
|
---|
| 54 | (model.appViewState == TrackingModelLocator.VIEW_APP_TRIAGE) ||
|
---|
| 55 | (model.appViewState == TrackingModelLocator.VIEW_APP_UPDATE)) {
|
---|
| 56 | logEntrySelector.refreshLogSelector();
|
---|
| 57 | logEntrySelector.startRefreshTimer();
|
---|
| 58 | return "";
|
---|
| 59 | }
|
---|
| 60 | if (logEntrySelector != null) {
|
---|
| 61 | logEntrySelector.stopRefreshTimer();
|
---|
| 62 | }
|
---|
| 63 | return "";
|
---|
| 64 | }
|
---|
| 65 | ]]>
|
---|
| 66 | </mx:Script>
|
---|
| 67 |
|
---|
| 68 | <mx:VBox
|
---|
| 69 | id="selectorArea"
|
---|
| 70 | width="376" height="100%"
|
---|
| 71 | paddingLeft="6" paddingBottom="6"
|
---|
| 72 | verticalGap="0">
|
---|
| 73 | <log:LogEntrySelector
|
---|
| 74 | id="logEntrySelector"
|
---|
| 75 | width="100%" height="100%"
|
---|
| 76 | ptChecksController="{ptChecksController}"
|
---|
| 77 | patientChecksModel="{patientChecksModel}"/>
|
---|
| 78 | </mx:VBox>
|
---|
| 79 |
|
---|
| 80 | <mx:VBox
|
---|
| 81 | id="editorArea"
|
---|
| 82 | width="100%" height="100%"
|
---|
| 83 | paddingTop="6" paddingRight="6">
|
---|
| 84 | <log:LogEntryEditor
|
---|
| 85 | id="logEntryEditor"
|
---|
| 86 | width="100%" height="100%" ptChecksController="{ptChecksController}"
|
---|
| 87 | patientChecksModel="{patientChecksModel}"/>
|
---|
| 88 | </mx:VBox>
|
---|
| 89 |
|
---|
| 90 | </mx:HBox>
|
---|