Rev | Line | |
---|
[1240] | 1 | /* MatchPatientsCommand.as */
|
---|
| 2 |
|
---|
| 3 | package gov.va.med.edp.pt.demog.control
|
---|
| 4 | {
|
---|
| 5 | import gov.va.med.edp.pt.demog.model.MatchingPatientsModel;
|
---|
| 6 | import gov.va.med.edp.pt.demog.dao.PatientXml;
|
---|
| 7 | import gov.va.med.edp.command.AbstractResponderCommand;
|
---|
| 8 |
|
---|
| 9 | import mx.rpc.IResponder;
|
---|
| 10 | import mx.rpc.events.FaultEvent;
|
---|
| 11 | import mx.rpc.events.ResultEvent;
|
---|
| 12 |
|
---|
| 13 | public class MatchPatientsResponder extends AbstractResponderCommand implements IResponder
|
---|
| 14 | {
|
---|
| 15 | private var model:MatchingPatientsModel;
|
---|
| 16 |
|
---|
| 17 | public function MatchPatientsResponder(model:MatchingPatientsModel):void {
|
---|
| 18 | this.model = model
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | public override function result(data:Object):void
|
---|
| 22 | {
|
---|
| 23 | var xml:XML = ResultEvent(data).result as XML;
|
---|
| 24 | model.matchingPatients =
|
---|
| 25 | PatientXml.buildLookupPatientListFromXML(xml);
|
---|
| 26 |
|
---|
| 27 | model.matchingPatientsTruncated = (xml.matchesTruncated == "true");
|
---|
| 28 | trace("trucated: ", model.matchingPatientsTruncated);
|
---|
| 29 | model.matchingPatientsLoaded = true;
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | protected override function getFaultMessage(faultEvent:FaultEvent):String {
|
---|
| 33 | return "Retrieve matching patients failed: " + super.getFaultMessage(faultEvent);
|
---|
| 34 | }
|
---|
| 35 | }
|
---|
| 36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.