示例#1
0
 public void Initialize()
 {
     //Arrange
     controller   = new CallCenterProgressNoteController(new CallCenterProgressNoteRepository(ConfigurationManager.AppSettings["UnitTestToken"]));
     requestModel = new CallCenterProgressNoteViewModel
     {
         CallCenterHeaderID = 0,
         CallCenterTypeID   = 1,
         ClientContactID    = 3,
         CallerContactID    = 1,
         ProviderID         = 1,
         ClientStatusID     = 4,
         ClientProviderID   = 1,
         Disposition        = "Testing",
         IsActive           = false,
         Comments           = "",
         ReasonCalled       = "Testing",
         CallStartTime      = System.DateTime.Now,
         CallStatusID       = 1,
         ProgramUnitID      = 1,
         CountyID           = 2,
         ModifiedOn         = System.DateTime.Now,
         ModifiedBy         = 1,
         SuicideHomicideID  = 3
     };
 }
        /// <summary>
        /// Adds the call center progress note.
        /// </summary>
        /// <param name="model">The model.</param>
        /// <returns></returns>
        public Response <CallCenterProgressNoteViewModel> AddCallCenterProgressNote(CallCenterProgressNoteViewModel model)
        {
            const string apiUrl   = baseRoute + "AddCallCenterProgressNote";
            var          response = _communicationManager.Post <CallCenterProgressNoteModel, Response <CallCenterProgressNoteModel> >(model.ToModel(), apiUrl);

            return(response.ToViewModel());
        }
        /// <summary>
        /// Updates the Modified On in caller information Table.
        /// </summary>
        /// <param name = "callCenterHeaderID" > The call center header identifier.</param>
        /// <returns></returns>
        public Response <CallCenterProgressNoteViewModel> UpdateModifiedOn(CallCenterProgressNoteViewModel model)
        {
            const string apiUrl   = baseRoute + "UpdateModifiedOn";
            var          response = _communicationManager.Put <CallCenterProgressNoteModel, Response <CallCenterProgressNoteModel> >(model.ToModel(), apiUrl);

            return(response.ToViewModel());
        }
示例#4
0
        /// <summary>
        /// To the view model.
        /// </summary>
        /// <param name="model">The model.</param>
        /// <returns></returns>
        public static CallCenterProgressNoteViewModel ToViewModel(this CallCenterProgressNoteModel model)
        {
            if (model == null)
            {
                return(null);
            }

            var entity = new CallCenterProgressNoteViewModel
            {
                CallCenterHeaderID       = model.CallCenterHeaderID,
                NatureofCall             = model.NatureofCall,
                CallTypeID               = model.CallTypeID,
                ProgressNoteID           = model.ProgressNoteID,
                CallTypeOther            = model.CallTypeOther,
                FollowupPlan             = model.FollowupPlan,
                ClientStatusID           = model.ClientStatusID,
                ClientProvider           = model.ClientProvider,
                Comments                 = model.Comments,
                ModifiedBy               = model.ModifiedBy,
                ModifiedOn               = model.ModifiedOn,
                NoteHeaderID             = model.NoteHeaderID,
                ReferralAgencyID         = model.ReferralAgencyID,
                OtherReferralAgency      = model.OtherReferralAgency,
                ClientProviderID         = model.ClientProviderID,
                DescribeOther            = model.DescribeOther,
                BehavioralCategoryID     = model.BehavioralCategoryID,
                CallStartTime            = model.CallStartTime,
                Disposition              = model.Disposition,
                ProviderID               = model.ProviderID,
                CallCenterTypeID         = model.CallCenterTypeID,
                CallerContactID          = model.CallerID,
                ClientContactID          = model.ContactID,
                ContactTypeID            = model.ContactTypeID,
                CallEndTime              = model.CallEndTime,
                CallStatusID             = model.CallStatusID,
                ProgramUnitID            = model.ProgramUnitID,
                CountyID                 = model.CountyID,
                CallPriorityID           = model.CallCenterPriorityID,
                SuicideHomicideID        = model.SuicideHomicideID,
                DateOfIncident           = model.DateOfIncident,
                ReasonCalled             = model.ReasonCalled,
                OtherInformation         = model.OtherInformation,
                FollowUpRequired         = model.FollowUpRequired,
                IsCallerClientSame       = (model.CallerID == model.ContactID),
                NoteAdded                = model.NoteAdded,
                IsLinkedToContact        = model.IsLinkedToContact,
                ParentCallCenterHeaderID = model.ParentCallCenterHeaderID,
                IsCallerSame             = model.IsCallerSame,
                NewCallerID              = model.NewCallerID
            };

            return(entity);
        }
示例#5
0
 public Response <CallCenterProgressNoteViewModel> UpdateModifiedOn(CallCenterProgressNoteViewModel model)
 {
     return(_callerInformationRepository.UpdateModifiedOn(model));
 }
示例#6
0
 public Response <CallCenterProgressNoteViewModel> AddCallerInformation(CallCenterProgressNoteViewModel model)
 {
     return(_callerInformationRepository.AddCallerInformation(model));
 }
示例#7
0
 public Response <CallCenterProgressNoteViewModel> UpdateCallCenterProgressNote(CallCenterProgressNoteViewModel model)
 {
     return(_CallCenterProgressNoteRepository.UpdateCallCenterProgressNote(model));
 }