using System; using System.Collections.Generic; using System.Text; using IndianHealthService.BMXNet.Services; using IndianHealthService.BMXNet.Model; namespace IndianHealthService.BMXNet { /// /// The LocalSession is scoped to the client, whether EHR/VueCentric or a WinForm application. /// User management, patient/visit context, and local events are the key services. Components/controls that are programmed /// against this API will work within both the EhrFramework and WinFramework environments. /// public interface LocalSession:Log { /// /// The current patient and visit context. /// /// /// The context object is access exclusively through the LocalSession and LocalSession /// events. The context can be obtained if your control or component is a LocalSessionConsumer and if so then /// define the Context property as follows: /// /// public Context Context /// { /// get { return this.LocalSession == null ? null : this.LocalSession.Context; } /// } /// /// Context Context { get; } /// /// Authenticated user associated with LocalSession /// /// /// If there are also RemoteSessions, the RemoteSessions will have the same User object /// /// /// /// this.StatusLabel.Text= aLocalSession.User == null ? "No user" : aLocalSession.User.Name; /// /// User User { get; } /// /// Create a new user object. /// /// /// Instances of user are used by Frameworks or for configuration/comparisons. /// /// Display name of the user /// IEN or DUZ of the User /// Currently set division of the user /// User NewUser(String aName, String anIen,Division aDivision); /// /// Access to the LocalSessions EventServices /// LocalEventService EventServices { get; } /// /// Simple uniform call for local notifications to the user when an exception occurs. /// /// /// API is not commonly used /// /// Title of the dialog /// Exception to be displayed void Notify(String aTitle, Exception anException); /// /// Simple uniform call for local notifications to the user. /// /// /// API is not commonly used. /// /// Title of the dialog /// Message to be displayed void Notify(String aTitle, String aMessage); /// /// Call to close the LocalSession which is the last action to take when /// shutdown down your application. /// /// /// In the EHR this call does nothing because each instance of BMX EhrFramework manages /// a single component within the greater EHR/VueCentric framework. /// In a WinForm application this call shuts down the WinFramework, closes all RemoteSessions, /// and closes the LocalSession and disconnects from RPMS. /// void Close(); } }