using System; using System.Collections.Generic; using System.Text; using System.Data; namespace IndianHealthService.BMXNet.Model { /// /// The user that established the connection to BMX either through the WinFramework dialogs or access/verify codes, or /// a user established through attach tho the EHR/VueCentric with the EhrFramework. /// The user breaks down into who is it and what can they do with some identify and security key checing. /// public interface User { /// /// The DUZ aka IEN of the NEW Person File of this user /// String Duz { get; } /// /// A displayable name of the user /// String Name { get; } /// /// The division that this user to currently operating within /// Division Division { get; set; } /// /// Check aKey against the active RPMS keys for the user. If the user has the PROGMODE key this /// method will always return true. /// /// The key name that is compared against the keys on the server /// Return true if the user has the key bool HasSecurityKey(String aKey); /// /// Fetch from RPMS the user's current keys. The user's /// division must be set before calling this metohd. /// /// List RequestKeys(); /// /// Return a list of keys that the user does NOT have. If the user has all of /// the keys then an empty list is returned /// /// /// List<String> missingKeys=aUser.HasSecurityKeys(new string[] { "Key1","Key2" }); /// if (missingKeys.Count==0) { /// //Take a secured path /// } else { /// MessageBox.Show(missingKeys); /// } /// /// /// The HasSecurityKeys appraoch does not give those with PROGMODE a free-pass since it compares /// the actual keys. HasSecurityKeys uses RequestKeys /// /// a list of keys to compare against the user's keys /// A list of keys the user does not have, empty of the user has them all List HasSecurityKeys(string[] keys); } }