source: BMXNET_RPMS_dotNET_UTILITIES-BMX/branch/IHS BMX Framework/IndianHealthService.BMXNet/LocalSession.cs@ 1172

Last change on this file since 1172 was 1146, checked in by Sam Habiel, 14 years ago

Initial Import of BMX4

File size: 3.8 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Text;
4using IndianHealthService.BMXNet.Services;
5using IndianHealthService.BMXNet.Model;
6
7namespace IndianHealthService.BMXNet
8{
9 /// <summary>
10 /// The LocalSession is scoped to the client, whether EHR/VueCentric or a WinForm application.
11 /// User management, patient/visit context, and local events are the key services. Components/controls that are programmed
12 /// against this API will work within both the EhrFramework and WinFramework environments.
13 /// </summary>
14 public interface LocalSession:Log
15 {
16 /// <summary>
17 /// The current patient and visit context.
18 /// </summary>
19 /// <example>
20 /// The context object is access exclusively through the LocalSession and LocalSession
21 /// events. The context can be obtained if your control or component is a LocalSessionConsumer and if so then
22 /// define the Context property as follows:
23 /// <code>
24 /// public Context Context
25 /// {
26 /// get { return this.LocalSession == null ? null : this.LocalSession.Context; }
27 /// }
28 /// </code>
29 /// </example>
30 Context Context { get; }
31
32
33 /// <summary>
34 /// Authenticated user associated with LocalSession
35 /// </summary>
36 /// <remarks>
37 /// If there are also RemoteSessions, the RemoteSessions will have the same User object
38 /// </remarks>
39 /// <example>
40 /// <code>
41 /// this.StatusLabel.Text= aLocalSession.User == null ? "No user" : aLocalSession.User.Name;
42 /// </code>
43 /// </example>
44 User User { get; }
45
46 /// <summary>
47 /// Create a new user object.
48 /// </summary>
49 /// <remarks>
50 /// Instances of user are used by Frameworks or for configuration/comparisons.
51 /// </remarks>
52 /// <param name="aName">Display name of the user</param>
53 /// <param name="anIen">IEN or DUZ of the User</param>
54 /// <param name="aDivision">Currently set division of the user</param>
55 /// <returns></returns>
56 User NewUser(String aName, String anIen,Division aDivision);
57
58 /// <summary>
59 /// Access to the LocalSessions EventServices
60 /// </summary>
61 LocalEventService EventServices { get; }
62
63
64 /// <summary>
65 /// Simple uniform call for local notifications to the user when an exception occurs.
66 /// </summary>
67 /// <remarks>
68 /// API is not commonly used
69 /// </remarks>
70 /// <param name="aTitle">Title of the dialog</param>
71 /// <param name="anException">Exception to be displayed</param>
72 void Notify(String aTitle, Exception anException);
73 /// <summary>
74 /// Simple uniform call for local notifications to the user.
75 /// </summary>
76 /// <remarks>
77 /// API is not commonly used.
78 /// </remarks>
79 /// <param name="aTitle">Title of the dialog</param>
80 /// <param name="aMessage">Message to be displayed</param>
81 void Notify(String aTitle, String aMessage);
82
83 /// <summary>
84 /// Call to close the LocalSession which is the last action to take when
85 /// shutdown down your application.
86 /// </summary>
87 /// <remarks>
88 /// In the EHR this call does nothing because each instance of BMX EhrFramework manages
89 /// a single component within the greater EHR/VueCentric framework.
90 /// In a WinForm application this call shuts down the WinFramework, closes all RemoteSessions,
91 /// and closes the LocalSession and disconnects from RPMS.
92 /// </remarks>
93 void Close();
94 }
95}
Note: See TracBrowser for help on using the repository browser.