source: BMXNET_RPMS_dotNET_UTILITIES-BMX/branch/IHS BMX Framework/IndianHealthService.BMXNet/Model/User.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: 2.5 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Text;
4using System.Data;
5
6namespace IndianHealthService.BMXNet.Model
7{
8
9 /// <summary>
10 /// The user that established the connection to BMX either through the WinFramework dialogs or access/verify codes, or
11 /// a user established through attach tho the EHR/VueCentric with the EhrFramework.
12 /// <para>The user breaks down into who is it and what can they do with some identify and security key checing.</para>
13 /// </summary>
14 public interface User
15 {
16 /// <summary>
17 /// The DUZ aka IEN of the NEW Person File of this user
18 /// </summary>
19 String Duz { get; }
20 /// <summary>
21 /// A displayable name of the user
22 /// </summary>
23 String Name { get; }
24 /// <summary>
25 /// The division that this user to currently operating within
26 /// </summary>
27 Division Division { get; set; }
28
29 /// <summary>
30 /// Check aKey against the active RPMS keys for the user. If the user has the PROGMODE key this
31 /// method will always return true.
32 /// </summary>
33 /// <param name="aKey">The key name that is compared against the keys on the server</param>
34 /// <returns>Return true if the user has the key</returns>
35 bool HasSecurityKey(String aKey);
36
37 /// <summary>
38 /// Fetch from RPMS the user's current keys. The user's
39 /// division must be set before calling this metohd.
40 /// </summary>
41 /// <returns></returns>
42 List<String> RequestKeys();
43
44 /// <summary>
45 /// Return a list of keys that the user does NOT have. If the user has all of
46 /// the keys then an empty list is returned
47 /// </summary>
48 /// <example>
49 /// List&lt;String&gt; missingKeys=aUser.HasSecurityKeys(new string[] { "Key1","Key2" });
50 /// if (missingKeys.Count==0) {
51 /// //Take a secured path
52 /// } else {
53 /// MessageBox.Show(missingKeys);
54 /// }
55 /// </example>
56 /// <remarks>
57 /// The HasSecurityKeys appraoch does not give those with PROGMODE a free-pass since it compares
58 /// the actual keys. HasSecurityKeys uses RequestKeys
59 /// </remarks>
60 /// <param name="keys">a list of keys to compare against the user's keys</param>
61 /// <returns>A list of keys the user does not have, empty of the user has them all</returns>
62 List<String> HasSecurityKeys(string[] keys);
63 }
64}
Note: See TracBrowser for help on using the repository browser.