Example #1
0
        public RequiredPatientProfileFieldsVm GetRequiredPatientProfileFieldsVm(string companyId)
        {
            var result  = new RequiredPatientProfileFieldsVm();
            var manager = new PreferencesManager();
            var dict    = manager.GetPreferencesByCategory(companyId, PreferenceCategory.RequiredPatientProfileFields);

            result.CompanyId                = companyId;
            result.IsAddressRequired        = dict["IsAddressRequired"] == "true";
            result.IsBirthDateRequired      = dict["IsBirthDateRequired"] == "true";
            result.IsEmailRequired          = dict["IsEmailRequired"] == "true";
            result.IsMeaningfulUseMandatory = dict["IsMeaningfulUseMandatory"] == "true";
            result.IsTitleRequired          = dict["IsTitleRequired"] == "true";
            result.IsPrimaryPhoneRequired   = dict["IsPrimaryPhoneRequired"] == "true";
            result.IsDefaultFamilyCheck     = manager.GetMaterialOrderPreferences(companyId);
            result.IsPatientCenterEnabled   = manager.GetPatientCenterEnabled(companyId);
            var patientStatementPreferences = manager.GetPatientStatementPreferences(companyId);

            result.IsDetailedPatientStatements  = patientStatementPreferences["IsDetailedPatientStatements"] == "true";
            result.AutoConfirmDays              = this.GetSchedulerAutoConfirmDays(companyId);
            result.IsInsuranceAdjustmentTypes   = patientStatementPreferences["IsInsuranceAdjustmentTypes"] == "true";
            result.IsCarrierPayments            = patientStatementPreferences["IsCarrierPayments"] == "true";
            result.IsProviderNameAndNpi         = patientStatementPreferences["IsProviderNameAndNpi"] == "true";
            result.IsReasonForTransferToPatient = patientStatementPreferences["IsReasonForTransferToPatient"] == "true";
            return(result);
        }
Example #2
0
        public void SaveRequiredPatientProfileFields([FromBody] RequiredPatientProfileFieldsVm vm)
        {
            var manager = new PreferencesManager();
            var dict    = new Dictionary <string, string>
            {
                { "IsAddressRequired", vm.IsAddressRequired ? "true" : "false" },
                {
                    "IsBirthDateRequired",
                    vm.IsBirthDateRequired ? "true" : "false"
                },
                { "IsEmailRequired", vm.IsEmailRequired ? "true" : "false" },
                {
                    "IsMeaningfulUseMandatory",
                    vm.IsMeaningfulUseMandatory ? "true" : "false"
                },
                { "IsTitleRequired", vm.IsTitleRequired ? "true" : "false" },
                {
                    "IsPrimaryPhoneRequired",
                    vm.IsPrimaryPhoneRequired ? "true" : "false"
                }
            };

            manager.SavePreferencesByCategory(vm.CompanyId, PreferenceCategory.RequiredPatientProfileFields, dict);

            bool defaultFamilyCheck = vm.IsDefaultFamilyCheck ?? false;

            manager.SaveMaterialOrderPreferences(vm.CompanyId, defaultFamilyCheck);

            bool patientCenterEnabled = vm.IsPatientCenterEnabled;

            manager.SavePatientCenterEnabled(vm.CompanyId, patientCenterEnabled);

            var patientStatementPreferences = new Dictionary <string, string>
            {
                { "IsDetailedPatientStatements", vm.IsDetailedPatientStatements ? "true" : "false" },
                { "IsInsuranceAdjustmentTypes", vm.IsInsuranceAdjustmentTypes ? "true" : "false" },
                { "IsCarrierPayments", vm.IsCarrierPayments ? "true" : "false" },
                { "IsProviderNameAndNpi", vm.IsProviderNameAndNpi ? "true" : "false" },
                { "IsReasonForTransferToPatient", vm.IsReasonForTransferToPatient ? "true" : "false" },
            };

            bool isDetailedPatientReport = vm.IsDetailedPatientStatements;

            manager.SavePatientStatementPreferences(vm.CompanyId, isDetailedPatientReport, patientStatementPreferences);

            this.SaveSchedulerAutoConfirmDays(vm.CompanyId, vm.AutoConfirmDays);
        }