| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- package com.imt.intimamedia.business
- {
- import com.adobe.cairngorm.business.ServiceLocator;
- import com.imt.intimamedia.vo.AppointmentVo;
- import com.imt.intimamedia.vo.AtsVo;
- import com.imt.intimamedia.vo.CvExaminatorVo;
- import com.imt.intimamedia.vo.FamilyHistoryVo;
- import com.imt.intimamedia.vo.PatientVo;
- import com.imt.intimamedia.vo.PersonalHistoryVo;
- import com.imt.intimamedia.vo.TobaccoVo;
-
- import mx.collections.ArrayCollection;
- import mx.rpc.AbstractService;
- import mx.rpc.AsyncToken;
- import mx.rpc.IResponder;
-
- /**
- * Delegate de la gestion des patients
- */
- public class PatientDelegate
- {
- private var _responder : IResponder;
- private var _service : AbstractService;
-
- /**
- * Constructeur
- */
- public function PatientDelegate( responder : IResponder )
- {
- _service = ServiceLocator.getInstance().getRemoteObject( "patientService" );
- _responder = responder;
- }
-
- /**
- * Appel du service de création
- *
- * @param patient PatientVo
- * @param appointment AppointmentVo
- * @param session int
- * @return void
- */
- public function createPatient( patient : PatientVo, appointment : AppointmentVo, person : int, session : int ) : void
- {
- var token : AsyncToken = _service.createPatient( patient, appointment, person, session );
- token.addResponder ( _responder );
- }
-
- /**
- * Appel du service de mise à jour
- *
- * @param appointment PatientVo
- * @param session int
- * @return void
- */
- public function updatePatient( patient : PatientVo, session : int ) : void
- {
- var token : AsyncToken = _service.updatePatient( patient, session );
- token.addResponder ( _responder );
- }
-
- /**
- * Appel du service de mise à jour
- *
- * @param appointment AppointmentVo
- * @param session int
- * @return void
- */
- public function updateAppointment( appointment : AppointmentVo, patientUid : String, session : int ) : void
- {
- var token : AsyncToken = _service.updateAppointment( appointment, patientUid, session );
- token.addResponder ( _responder );
- }
-
- /**
- * Appel du service de recherche d'un patient
- *
- * @param criteria String
- * @param session int
- * @return void
- */
- public function searchPatient( criteria : String, organizationId : String, session : int ) : void
- {
- var token : AsyncToken = _service.searchPatient( criteria, organizationId, session );
- token.addResponder ( _responder );
- }
-
- /**
- * Appel du service de recherche des RDV pour un patient
- *
- * @param criteria String
- * @param session int
- * @return void
- */
- public function searchAppointments( criteria : String, session : int ) : void
- {
- var token : AsyncToken = _service.searchAppointments( criteria, session );
- token.addResponder ( _responder );
- }
-
- /**
- * Appel du service de creation d'un RDV
- *
- * @param appointmentVo AppointmentVo
- * @param session int
- * @return void
- */
- public function createAppointment( appointmentVo : AppointmentVo, patientUid : String, session : int ) : void
- {
- var token : AsyncToken = _service.createAppointment( appointmentVo, patientUid, session );
- token.addResponder ( _responder );
- }
-
- /**
- * Appel du service d'ajout des ATS
- *
- * @param atsVo AtsVo
- * @param tobaccoVo TobaccoVo
- * @param session int
- * @return void
- */
- public function addATSRiskToAnAppointment( atsVo : AtsVo, tobaccoVo : TobaccoVo, id : int, session : int ) : void
- {
- var token : AsyncToken = _service.addATSRiskToAnAppointment( atsVo, tobaccoVo, id, session );
- token.addResponder ( _responder );
- }
-
- /**
- * Appel du service d'ajout des antécédents
- *
- * @param personalHistoryVo PersonalHistoryVo
- * @param session int
- * @return void
- */
- public function addPersonalHistoryToAnAppointment( personalHistoryVo : PersonalHistoryVo, id : int, session : int ) : void
- {
- var token : AsyncToken = _service.addPersonalHistoryToAnAppointment( personalHistoryVo, id, session );
- token.addResponder ( _responder );
- }
-
- /**
- * Appel du service d'ajout des antécédents familiaux
- *
- * @param familyHistoryVo FamilyHistoryVo
- * @param session int
- * @return void
- */
- public function addFamilyHistoryToAnAppointment( familyHistoryVo : FamilyHistoryVo, id : int, session : int ) : void
- {
- var token : AsyncToken = _service.addFamilyHistoryToAnAppointment( familyHistoryVo, id, session );
- token.addResponder ( _responder );
- }
-
- /**
- * Appel du service d'ajout de l'examen cardio vasculaire
- *
- * @param cvExaminatorVo CvExaminatorVo
- * @param session int
- * @return void
- */
- public function addCardiovascularExaminatorToAnAppointment( cvExaminatorVo : CvExaminatorVo, id : int, session : int ) : void
- {
- var token : AsyncToken = _service.addCardiovascularExaminatorToAnAppointment( cvExaminatorVo, id, session );
- token.addResponder ( _responder );
- }
-
- /**
- * Appel du service d'ajout des traitements
- *
- * @param list Array
- * @param session int
- * @return void
- */
- public function addTreatmentsToAnAppointment( list : Array, id : int, session : int ) : void
- {
- var token : AsyncToken = _service.addTreatmentsToAnAppointment( list, id, session );
- token.addResponder ( _responder );
- }
- }
- }
|