public ContactLensOrderController(string practiceId, string officeNumber)
 {
     this.companyId    = practiceId;
     this.officeNumber = officeNumber;
     this.contactLensOrderIt2Manager = new ContactLensOrderIt2Manager();
     this.patientInsuranceManager    = new PatientInsuranceManager();
 }
Ejemplo n.º 2
0
 public EyeglassOrderController(string companyId, string officeNumber)
 {
     this.companyId               = companyId;
     this.officeNumber            = officeNumber;
     this.eyeglassOrderIt2Manager = new EyeglassOrderIt2Manager();
     this.patientInsuranceManager = new PatientInsuranceManager();
     this.eyeglassLensIt2Manager  = new EyeglassLensIt2Manager();
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="PatientInsuranceController"/> class.
        /// </summary>
        public PatientInsuranceController()
        {
            this.it2Business             = new PatientAddressIt2Manager();
            this.patientInsuranceManager = new PatientInsuranceManager();

            // TODO: This needs a better design. PatientInsuranceManager can't make its own InsuranceManager
            // or even reference once because PatientInsuranceManager is in Eyefinity.Enterprise.Business and
            // InsuranceManager is in Eyefinity.PracticeManagement.Business which already has a dependency
            // on Eyefinity.Enterprise.Business (it would make a circular reference)
            this.patientInsuranceManager.GetMappedVspPlanIdsForOffice = officenum => new InsuranceManager()
                                                                        .SearchManualInsurancePlans("VSP", officenum, null, true)
                                                                        .Select(plan => plan.PlanID);

            this.patientServices = Container.Resolve <IPatientServices>();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ContactLensOrderController"/> class.
        /// </summary>
        public ContactLensOrderController()
        {
            this.contactLensOrderIt2Manager = new ContactLensOrderIt2Manager();
            this.patientInsuranceManager    = new PatientInsuranceManager();
            if (!this.User.Identity.IsAuthenticated)
            {
                return;
            }

            var authorizationTicketHelper = new AuthorizationTicketHelper();

            this.companyId    = authorizationTicketHelper.GetCompanyId();
            this.officeNumber = authorizationTicketHelper.GetPracticeLocationId();
            this.userId       = authorizationTicketHelper.GetUserInfo().Id;
        }