public void should_Enroll_Site() { //13080 Mbagathi DH var practice = _activationService.EnrollPractice("13080"); Assert.IsNotNull(practice); Console.WriteLine(practice); }
public IActionResult EnrollSite(string code) { try { var practice = _activationService.EnrollPractice(code); return(Ok(practice)); } catch (Exception e) { Log.Debug($"Error loading Practice: {e}"); return(StatusCode(500, "Error loading Practice")); } }
public IEnumerable <User> EnlistUsers(string practiceCode, IEnumerable <UserInfo> userInfos) { var practice = _activationService.EnrollPractice(practiceCode); if (null == practice) { throw new ArgumentException("Facility is not Registered!"); } var users = new List <User>(); foreach (var userInfo in userInfos) { var enlisted = EnlistUser(userInfo, practice.Id); if (null != enlisted) { users.Add(enlisted); } } return(users); }