/// <summary>
        /// Inserts a new visit in database
        /// </summary>
        /// <param name="visitStatusID">The visit status identifier.</param>
        /// <param name="paymentStatusID">The payment status identifier.</param>
        /// <returns></returns>
        public static Visit InsertVisit(EntityEnums.VisitStatusEnum visitStatusID, EntityEnums.PaymentStatusEnum paymentStatusID)
        {
            IVisitService visitService = (IVisitService)EntityFactory.GetEntityServiceByName(vVisit.EntityName, "");
            Visit         v            = new Visit();

            v.PatientUserID    = TestEnums.User.constPatientUserID;
            v.DoctorScheduleID = 1; // const for service of doctor 1
            v.VisitStatusID    = (int)visitStatusID;
            v.IllnessID        = 0; // no specified
            //v.PaymentStatusID = (int)paymentStatusID;
            visitService.Insert(v, new InsertParameters());
            return(v);
        }
        private Payment UpdateStatusPaymentInDatabase(long paymentID, EntityEnums.PaymentStatusEnum newStatus, bool setCompletedDate)
        {
            Payment payment = (Payment)GetByID(paymentID, new GetByIDParameters());

            UpdateParameters updateParameters = new UpdateParameters();

            payment.PaymentStatusID = (int)newStatus;
            if (setCompletedDate)
            {
                payment.CompletedDateTime = DateTime.UtcNow;
            }

            Update(payment, updateParameters);
            return(payment);
        }
Beispiel #3
0
 private Visit InsertVisit(EntityEnums.VisitStatusEnum visitStatusEnum, EntityEnums.PaymentStatusEnum paymentStatusEnum)
 {
     return(UTD.Tricorder.Service.Tests.VisitServiceTests.InsertVisit(visitStatusEnum, paymentStatusEnum));
 }