Exemplo n.º 1
0
 public CustomerContactViewModel UpdateCallQueueCustomer([FromBody] CallQueueCustomerEditModel customerEditModel)
 {
     _callQueueCustomerContactService.UpdateCustomerData(customerEditModel, _sessionContext.UserSession.CurrentOrganizationRole.OrganizationRoleUserId);
     if (customerEditModel.IsHealthPlanQueue)
     {
         _primaryCarePhysicianHelper.UpdatePrimaryCarePhysician(customerEditModel.PrimaryCarePhysician, customerEditModel.CustomerId, _sessionContext.UserSession.CurrentOrganizationRole.OrganizationRoleUserId);
     }
     return(_callQueueCustomerContactService.Get(customerEditModel.CallQueueCustomerId, customerEditModel.CallId, _sessionContext.UserSession.CurrentOrganizationRole.OrganizationRoleUserId));
 }
Exemplo n.º 2
0
        public ActionResult SavePatientInfo(CallQueueCustomerEditModel model)
        {
            if (ModelState.IsValid)
            {
                _callQueueCustomerContactService.UpdateCustomerData(model, _sessionContext.UserSession.CurrentOrganizationRole.OrganizationRoleUserId);
                if (model.IsHealthPlanQueue)
                {
                    _primaryCarePhysicianHelper.UpdatePrimaryCarePhysician(model.PrimaryCarePhysician, model.CustomerId, _sessionContext.UserSession.CurrentOrganizationRole.OrganizationRoleUserId);
                }
            }
            var viewModel = _callQueueCustomerContactService.GetByCustomerId(model.CustomerId, model.CallId, _sessionContext.UserSession.CurrentOrganizationRole.OrganizationRoleUserId);

            if (!ModelState.IsValid)
            {
                viewModel.HasError             = true;
                viewModel.PatientInfoEditModel = model;
            }
            return(PartialView("GetPatientInfo", viewModel));
        }