public static List<SubEntityRecord> GetDropdownValues(ProviderAdminDetailView parent, int providerId)
        {
            IEnumerable<ProviderLanguageDto> existingLanguages = new List<ProviderLanguageDto>();
            if (providerId != 0)
                existingLanguages = GetProviderLanguages(parent, providerId);

            var request = new ListLanguagesRequest() { IsEnabled = true };
            var languages = parent.ProcessRequest<ListLanguagesResponse>(request).Languages;
            var records = new List<SubEntityRecord>();

            foreach (var language in languages.Where(l => !existingLanguages.Any(e => e.LanguageId == l.Id)))
            {
                var record = new SubEntityRecord();
                record.DisplayName = language.Name;
                record.Id = language.Id;
                record.Fields.Add(new Field(_id, _id, FieldTypes.Hidden, null));
                record.Fields.Add(new Field(_providerId, _providerId, FieldTypes.Hidden, providerId));
                record.Fields.Add(new Field(_languageId, _languageId, FieldTypes.Hidden, language.Id));
                record.Fields.Add(new Field(_languageName, "Language Name", FieldTypes.Label, language.Name));
                record.Fields.Add(new Field(_isPrimary, "Is Primary", FieldTypes.Checkbox, false) { OnChangeCommand = "PrimaryLanguageChanged" });
                record.Fields.Add(new Field(_isFluent, "Is Fluent", FieldTypes.Checkbox, false));

                records.Add(record);
            }

            return records;
        }
예제 #2
0
        public static List<SubEntityRecord> GetDropdownValues(ProviderAdminDetailView parent, int providerId)
        {
            IEnumerable<ProviderProviderTypeDto> existingTypes = new List<ProviderProviderTypeDto>();
            if (providerId != 0)
                existingTypes = GetProviderProviderTypes(parent, providerId);

            var request = new ListProviderTypeRequest() { IsEnabled = true };
            var types = parent.ProcessRequest<ListProviderTypeResponse>(request).ProviderTypes;
            var records = new List<SubEntityRecord>();

            foreach (var type in types.Where(t => !existingTypes.Any(e => e.ProviderTypeId == t.Id)))
            {
                var record = new SubEntityRecord();
                record.DisplayName = type.Name;
                record.Id = type.Id;
                record.Fields.Add(new Field(_id, _id, FieldTypes.Hidden, null));
                record.Fields.Add(new Field(_providerId, _providerId, FieldTypes.Hidden, providerId));
                record.Fields.Add(new Field(_providerTypeId, _providerTypeId, FieldTypes.Hidden, type.Id));
                record.Fields.Add(new Field(_providerTypeName, "Type Name", FieldTypes.Label, type.Name));

                records.Add(record);
            }

            return records;
        }
        public static List<SubEntityRecord> GetDropdownValues(ProviderAdminDetailView parent, int providerId)
        {
            IEnumerable<ProviderEducationDto> existingEducations = new List<ProviderEducationDto>();
            if (providerId != 0)
                existingEducations = GetProviderEducations(parent, providerId);

            var request = new ListEducationTypesRequest() { IsEnabled = true };
            var educationTypes = parent.ProcessRequest<ListEducationTypesResponse>(request).EducationTypes;
            var records = new List<SubEntityRecord>();

            foreach (var educationType in educationTypes.Where(e => !existingEducations.Any(x => x.EducationTypeId == e.Id)))
            {
                var record = new SubEntityRecord();
                record.DisplayName = educationType.Name;
                record.Id = educationType.Id;
                record.Fields.Add(new Field(_id, _id, FieldTypes.Hidden, null));
                record.Fields.Add(new Field(_providerId, _providerId, FieldTypes.Hidden, providerId));
                record.Fields.Add(new Field(_educationTypeId, _educationTypeId, FieldTypes.Hidden, educationType.Id));
                record.Fields.Add(new Field(_educationTypeName, "Education Type", FieldTypes.Label, educationType.Name));
                record.Fields.Add(new Field(_institutionName, "Institution Name", FieldTypes.Text, string.Empty, true));
                record.Fields.Add(new Field(_isCompleted, "Is Completed", FieldTypes.Checkbox, false));
                record.Fields.Add(new Field(_yearCompleted, "Year Completed", FieldTypes.Text, string.Empty));

                records.Add(record);
            }

            return records;
        }
        public static List<SubEntityRecord> GetDropdownValues(LocationAdminDetailView parent, int orgUnitId)
        {
            IEnumerable<OrgUnitInsuranceDto> existingInsurances = new List<OrgUnitInsuranceDto>();
            if (orgUnitId != 0)
                existingInsurances = GetOrgUnitInsurances(parent, orgUnitId);

            var request = new ListInsurancesRequest() { IsEnabled = true };
            var insurances = parent.ProcessRequest<ListInsurancesResponse>(request).Insurances;
            var records = new List<SubEntityRecord>();

            foreach (var insurance in insurances.Where(i => !existingInsurances.Any(e => e.InsuranceId == i.Id)))
            {
                var record = new SubEntityRecord();
                record.DisplayName = insurance.Name;
                record.Id = insurance.Id;
                record.Fields.Add(new Field(_idField, "Id", FieldTypes.Hidden, null));
                record.Fields.Add(new Field(_orgUnitIdField, _orgUnitIdField, FieldTypes.Hidden, orgUnitId));
                record.Fields.Add(new Field(_insuranceIdField, _insuranceIdField, FieldTypes.Hidden, insurance.Id));
                record.Fields.Add(new Field(_nameField, "Name", FieldTypes.Label, insurance.Name));

                records.Add(record);
            }

            return records;
        }
        public static SubEntity BuildLocationsSubEntity(ProviderAdminDetailView parent, int providerId)
        {
            _subEntity = parent._viewModel.SubEntities.FirstOrDefault(s => s.EntityName == ProviderAdminDetailView._providerOrgUnitSubEntity);

            if (_subEntity == null)
                _subEntity = new SubEntity() { EntityName = ProviderAdminDetailView._providerOrgUnitSubEntity, DisplayName = "Locations", CanAddExisting = true, CanDelete = true };
            else
                _subEntity.Records = new List<SubEntityRecord>();

            var providerOrgUnits = GetProviderLocations(parent, providerId);

            foreach (var providerOrgUnit in providerOrgUnits)
            {
                var record = new SubEntityRecord();

                record.Id = providerOrgUnit.Id;
                record.Fields.Add(new Field(_id, _id, FieldTypes.Hidden, providerOrgUnit.Id));
                record.Fields.Add(new Field(_providerId, _providerId, FieldTypes.Hidden, providerId));
                record.Fields.Add(new Field(_orgUntiId, _orgUntiId, FieldTypes.Hidden, providerOrgUnit.OrgUnitId));
                record.Fields.Add(new Field(_orgUnitName, "Location Name", FieldTypes.Label, providerOrgUnit.OrgUnitName));
                record.Fields.Add(new Field(_isPrimary, "Is Primary", FieldTypes.Checkbox, providerOrgUnit.IsPrimary));
                record.Fields.Add(new Field(_phone, "Phone Number", FieldTypes.Text, providerOrgUnit.DisplayPhone));
                record.Fields.Add(new Field(_fax, "Fax Number", FieldTypes.Text, providerOrgUnit.DisplayFax));
                record.Fields.Add(new Field(_isAcceptingNewPatients, "Is Accepting New Patients", FieldTypes.Checkbox, providerOrgUnit.IsAcceptingNewPatients));
                record.Fields.Add(new Field(_allowAppointmentRequests, "Allow Appointment Requests", FieldTypes.Checkbox, providerOrgUnit.AllowAppointmentRequests));

                record.SubEntities.Add(BuildInsurancesSubEntity(parent, providerOrgUnit));
                record.SubEntities.Add(BuildServicesSubEntity(parent, providerOrgUnit));
                record.SubEntities.Add(BuildHoursSubEntity(parent, providerOrgUnit));

                _subEntity.Records.Add(record);
            }

            return _subEntity;
        }
        public static List<SubEntityRecord> GetDropdownValues(ProviderAdminDetailView parent, int providerId)
        {
            IEnumerable<ProviderCertificationSpecialtyDto> existintCerts = new List<ProviderCertificationSpecialtyDto>();
            if (providerId != 0)
                existintCerts = GetProviderCertificationSpecialties(parent, providerId);

            var request = new ListCertificationSpecialtiesRequest();
            var certificationSpecialties = parent.ProcessRequest<ListCertificationSpecialtiesResponse>(request).CertificationSpecialties;
            var records = new List<SubEntityRecord>();

            foreach (var certificationSpecialty in certificationSpecialties.Where(c => c.IsEnabled && c.CertificationAgencyIsEnabled && !existintCerts.Any(e => e.CertificationSpecialtyId == c.Id)))
            {

                var record = new SubEntityRecord();
                record.DisplayName = certificationSpecialty.Name + " (" + certificationSpecialty.CertificationBoardName + ", " + certificationSpecialty.CertificationAgencyName + ")";
                record.Id = certificationSpecialty.Id;
                record.Fields.Add(new Field(_providerId, _providerId, FieldTypes.Hidden, providerId));
                record.Fields.Add(new Field(_certificationSpecialtyId, _certificationSpecialtyId, FieldTypes.Hidden, certificationSpecialty.Id));
                record.Fields.Add(new Field(_certificationSpecialtyName, "Certification Specialty", FieldTypes.Label, certificationSpecialty.Name));
                record.Fields.Add(new Field(_certificationBoardName, "Board Name", FieldTypes.Label, certificationSpecialty.CertificationBoardName));
                record.Fields.Add(new Field(_certificationAgencyName, "Certification Agency", FieldTypes.Label, certificationSpecialty.CertificationBoardName));
                record.Fields.Add(new Field(_yearOfIssuance, "Year Of Issuance", FieldTypes.Text, null, true));

                records.Add(record);
            }

            return records;
        }
예제 #7
0
        public static List<SubEntityRecord> GetDropdownValues(LocationAdminDetailView parent, int orgUnitId)
        {
            IEnumerable<OrgUnitOrgUnitTypeDto> existingTypes = new List<OrgUnitOrgUnitTypeDto>();
            if (orgUnitId != 0)
                existingTypes = GetOrgUnitOrgUnitTypes(parent, orgUnitId);

            var request = new ListOrgUnitTypesRequest() { IsEnabled = true };
            var types = parent.ProcessRequest<ListOrgUnitTypesResponse>(request).OrgUnitTypes;
            var records = new List<SubEntityRecord>();

            foreach (var type in types.Where(t => !existingTypes.Any(e => e.OrgUnitTypeId == t.Id)))
            {
                var record = new SubEntityRecord();
                record.DisplayName = type.Name;
                record.Id = type.Id;
                record.Fields.Add(new Field(_idField, "Id", FieldTypes.Hidden, null));
                record.Fields.Add(new Field(_orgUnitIdField, _orgUnitIdField, FieldTypes.Hidden, orgUnitId));
                record.Fields.Add(new Field(_orgUnitTypeIdField, _orgUnitTypeIdField, FieldTypes.Hidden, type.Id));
                record.Fields.Add(new Field(_nameField, "Name", FieldTypes.Label, type.Name));
                record.Fields.Add(new Field(_isPrimaryOrgUnitTypeField, "Is Primary", FieldTypes.Checkbox, false, true));

                records.Add(record);
            }

            return records;
        }
        public static List<SubEntityRecord> GetDropdownValues(ProviderAdminDetailView parent, int providerId)
        {
            IEnumerable<ProviderClinicalInterestDto> existingInterests = new List<ProviderClinicalInterestDto>();
            if (providerId != 0)
                existingInterests = GetProviderClinicalInterests(parent, providerId);

            var request = new ListClinicalInterestsRequest() { IsEnabled = true };
            var clinicalInterests = parent.ProcessRequest<ListClinicalInterestsResponse>(request).ClinicalInterests;
            var records = new List<SubEntityRecord>();

            foreach (var clinicalInterest in clinicalInterests.Where(c => !existingInterests.Any(e => e.ClinicalInterestId == c.Id)))
            {
                var record = new SubEntityRecord();
                record.DisplayName = clinicalInterest.Name;
                record.Id = clinicalInterest.Id;
                record.Fields.Add(new Field(_id, _id, FieldTypes.Hidden, null));
                record.Fields.Add(new Field(_providerId, _providerId, FieldTypes.Hidden, providerId));
                record.Fields.Add(new Field(_clinicalInterestId, _clinicalInterestId, FieldTypes.Hidden, clinicalInterest.Id));
                record.Fields.Add(new Field(_clinicalInterestName, "Clinical Interest Name", FieldTypes.Label, clinicalInterest.Name));

                records.Add(record);
            }

            return records;
        }
        public static List<SubEntityRecord> GetDropdownValues(ProviderAdminDetailView parent, int providerId)
        {
            IEnumerable<ProviderSpecialtyDto> existingSpecialties = new List<ProviderSpecialtyDto>();
            if(providerId != 0)
                existingSpecialties = GetProviderSpecialties(parent, providerId);

            var request = new ListSpecialtiesRequest() { IsEnabled = true };
            var specialties = parent.ProcessRequest<ListSpecialtiesResponse>(request).Specialties;
            var records = new List<SubEntityRecord>();

            foreach (var specialty in specialties.Where(s => !existingSpecialties.Any(e => e.SpecialtyId == s.Id)))
            {
                var record = new SubEntityRecord();
                record.DisplayName = specialty.Name + " (" + specialty.SpecialtyType + ")";
                record.Id = specialty.Id;
                record.Fields.Add(new Field(_id, _id, FieldTypes.Hidden, null));
                record.Fields.Add(new Field(_providerId, _providerId, FieldTypes.Hidden, providerId));
                record.Fields.Add(new Field(_specialtyId, _specialtyId, FieldTypes.Hidden, specialty.Id));
                record.Fields.Add(new Field(_specialtyName, specialty.SpecialtyType == "Specialty" ? "Specialty Name" : "Condition Name", FieldTypes.Label, specialty.Name));

                if (specialty.SpecialtyType == "Specialty")
                {
                    record.Fields.Add(new Field(_isPrimary, "Is Primary", FieldTypes.Checkbox, false));
                    record.Fields.Add(new Field(_isBoardCertified, "Is Board Certified", FieldTypes.Checkbox, false));
                }

                records.Add(record);
            }

            return records;
        }
예제 #10
0
        public static List<SubEntityRecord> GetDropdownValues(EventAdminDetailView parent, int eventId)
        {
            var existingPrerequisites = new List<EventPrerequisiteDto>();
            if (eventId != 0)
                existingPrerequisites = GetEventPrerequisites(parent, eventId);

            var request = new ListEventsRequest() { };
            var events = parent.ProcessRequest<ListEventsResponse>(request).Events;
            var records = new List<SubEntityRecord>();

            foreach (var item in events.Where(s => !existingPrerequisites.Any(e => e.AssociatedEventId == s.Id)))
            {
                var record = new SubEntityRecord();
                record.DisplayName = item.Title;
                record.Id = item.Id;

                record.Fields.Add(new Field(_id, "Id", FieldTypes.Hidden, null));
                record.Fields.Add(new Field(_associatedEventId, "EventId", FieldTypes.Hidden, item.Id));
                record.Fields.Add(new Field(_eventTitle, "Event Title", FieldTypes.Label, item.Title));
                record.Fields.Add(new Field(_prerequisiteDescription, "Description", FieldTypes.WYSIWYG, string.Empty));
                record.Fields.Add(new Field(_prerequisiteOrder, "Order ", FieldTypes.Text, string.Empty, true));

                records.Add(record);
            }

            return records;
        }
예제 #11
0
        private static void AddExistingRecords(EventAdminDetailView parent, int eventId)
        {
            var record = new SubEntityRecord();
            var fields = new List<Field>();

            fields.Add(new Field("OccurrencesLink", string.Empty, FieldTypes.Html, "<a href='" + EventUtils.AddStandardUrlParameters(eventId + "/occurrences") + "'>Edit Occurrences</a>"));
            record.Fields = fields;

            _subEntity.Records.Add(record);
        }
예제 #12
0
        private static void AddExistingRecords(EventAdminDetailView parent, int eventId)
        {
            var eventItem = GetEvent(parent, eventId);

            var record = new SubEntityRecord();
            var fields = new List<Field>();

            fields.Add(new Field("Content", "Event Content", FieldTypes.WYSIWYG, eventItem.EventContent, false, true));
            record.Fields = fields;

            _subEntity.Records.Add(record);
        }
예제 #13
0
        public static SubEntityRecord CreateRecord(OrgUnitOrgUnitTypeDto type, int orgUnitId)
        {
            var record = new SubEntityRecord();
            var fields = new List<Field>();

            fields.Add(new Field(_idField, _idField, FieldTypes.Hidden, type.Id));
            fields.Add(new Field(_orgUnitIdField, _orgUnitIdField, FieldTypes.Hidden, orgUnitId));
            fields.Add(new Field(_orgUnitTypeIdField, _orgUnitTypeIdField, FieldTypes.Hidden, type.OrgUnitTypeId));
            fields.Add(new Field(_nameField, "Name", FieldTypes.Label, type.OrgUnitTypeName));
            fields.Add(new Field(_isPrimaryOrgUnitTypeField, "Is Primary", FieldTypes.Checkbox, type.IsPrimaryOrgUnitType));

            record.Fields = fields;

            return record;
        }
예제 #14
0
        private static void AddExistingRecords(ProviderAdminDetailView parent, int providerId)
        {
            var request = new ListDirectUrlHistoryRequest() { EntityId = providerId, EntityTypeId = EntityTypeId.Provider };
            var urlHistoryLinks = parent.ProcessRequest<ListDirectUrlHistoryResponse>(request).DirectUrlHistory;

            foreach (var directUrl in urlHistoryLinks)
            {
                var record = new SubEntityRecord();
                var fields = new List<Field>();

                fields.Add(new Field(_id, _id, FieldTypes.Hidden, directUrl.Id));
                fields.Add(new Field(_directUrl, directUrl.DateAdded.ToString("M/d/yy h:m:s tt"), FieldTypes.Label, directUrl.DirectUrl));

                record.Fields = fields;

                _subEntity.Records.Add(record);
            }
        }
        public static List<SubEntityRecord> GetDropdownValues(RegistrationFormAdminDetailView parent, int eventId)
        {
            int eventRegistrationEntityId = GetEventRegistrationFormEntityId(parent);

            var columns = CommonUtils.GetDynamicColumnInstances(parent, eventRegistrationEntityId);
            var records = new List<SubEntityRecord>();

            foreach (var item in columns)
            {
                var record = new SubEntityRecord();
                record.DisplayName = item.Name;
                record.Id = item.Id;

                record.Fields.Add(new Field(_id, "Id", FieldTypes.Hidden, item.Id));
                record.Fields.Add(new Field(_fieldName, "Field Name", FieldTypes.Label, item.Name));
                record.Fields.Add(new Field(_fieldLabel, "Field Label", FieldTypes.Text, item.FormLabel, true));
                record.Fields.Add(new Field(_isRequired, "Is Required", FieldTypes.Checkbox, item.IsRequired));
                record.Fields.Add(new Field(_dataType, "Data Type", FieldTypes.Dropdown, item.DataType)
                    {
                        Options = new List<KeyValuePair<object, object>>()
                    {
                        new KeyValuePair<object,object>("nvarchar","Text"),
                        new KeyValuePair<object,object>("int","Number"),
                        new KeyValuePair<object,object>("datetime","Date"),
                        new KeyValuePair<object,object>("dropdown","Dropdown"),
                        new KeyValuePair<object,object>("contentEditor","Content Editor")
                    },
                        OnChangeCommand = "DataTypeChanged",
                        IsDisabled = true
                    });
                record.Fields.Add(new Field(_maxSize, "Max Length", FieldTypes.Hidden, item.DataSize, true));
                record.Fields.Add(new Field(_dropdownOptions, "Dropdown Options", FieldTypes.Hidden, item.DropDownValues, true));
                record.Fields.Add(new Field(_isMultiLine, "Is Multiline", FieldTypes.Hidden, item.IsMultiline, true));

                record.Fields = SetupFieldVisibility(record.Fields);
                records.Add(record);
            }

            return records;
        }
예제 #16
0
        public static List<SubEntityRecord> GetDropdownValues(EventAdminDetailView parent)
        {
            IEnumerable<EventTypeDto> eventTypes;
            List<SubEntityRecord> records;
            GetAllEventTypes(parent, out eventTypes, out records);

            foreach (var item in eventTypes)
            {
                var record = new SubEntityRecord
                {
                    DisplayName = item.Name,
                    Id = item.Id
                };

                record.Fields.Add(new Field(_id, "Id", FieldTypes.Hidden, null));
                record.Fields.Add(new Field(_associatedEventId, "EventId", FieldTypes.Hidden, item.Id));
                record.Fields.Add(new Field(_eventType, "Event Type", FieldTypes.Label, item.Name));
                records.Add(record);
            }

            return records;
        }
        public static List<SubEntityRecord> GetDropdownValues(EventAdminDetailView parent)
        {
            var records = new List<SubEntityRecord>();
            var forms = GetAllForms(parent);

            foreach (var form in forms)
            {
                var record = new SubEntityRecord
                {
                    DisplayName = form.Name,
                    Id = form.Id
                };

                record.Fields.Add(new Field(_id, "Id", FieldTypes.Hidden, null));
                record.Fields.Add(new Field(_associatedEventId, "EventId", FieldTypes.Hidden, form.Id));
                record.Fields.Add(new Field(_formName, "Registration Form Name", FieldTypes.Label, form.Name));
                record.Fields.Add(new Field(_registrationFormLink, string.Empty, FieldTypes.Html, string.Format(_registrationFormLinkAnchorTag, form.Id)));

                records.Add(record);
            }

            return records;
        }
예제 #18
0
        private static void AddExistingRecords(OrgUnitDto orgUnitDto, SubEntity locationTypeSubEntity)
        {
            var record = new SubEntityRecord();
            var fields = new List<Field>();

            var hasSiteLocationType = HasSiteLocationType(locationTypeSubEntity);

            fields.Add(new Field("PublicDomainUrlHeader", "", FieldTypes.Html, BuildPublicDomainUrlHeader()));
            fields.Add(new Field(_associationEnabledField, "Enable Site Association", FieldTypes.Checkbox, hasSiteLocationType) { OnChangeCommand = "ToggleSiteAssociation" });
            fields.Add(new Field(_siteUrlField, "Public Domain URL", FieldTypes.Text, orgUnitDto.CustomUrl) { IsDisabled = !hasSiteLocationType });
            fields.Add(new Field(_siteUrlLiveField, "Internal Live URL", FieldTypes.Text, orgUnitDto.CustomLiveUrl) { IsDisabled = !hasSiteLocationType });
            fields.Add(new Field(_siteUrlStageField, "Internal Stage URL", FieldTypes.Text, orgUnitDto.CustomStageUrl) { IsDisabled = !hasSiteLocationType });
            fields.Add(new Field(_siteUrlQaField, "Internal QA URL", FieldTypes.Hidden, orgUnitDto.CustomQaUrl));
            fields.Add(new Field(_siteUrlDevField, "Internal Dev URL", FieldTypes.Hidden, orgUnitDto.CustomDevUrl));

            record.Fields = fields;

            _subEntity.Records.Add(record);
        }
        private static void AddExistingRecords(EventAdminDetailView parent, EventDto eventDto)
        {
            if (!eventDto.DynamicFormsId.HasValue)
                return;

            var dynamicFormId = eventDto.DynamicFormsId.Value;

            var formRequest = new ReadDynamicFormRequest { FormId = dynamicFormId };
            var formResponse = parent.ProcessRequest<ReadDynamicFormResponse>(formRequest);

            var record = new SubEntityRecord { Id = dynamicFormId };
            var fields = new List<Field>();

            fields.Add(new Field(_formName, "Registration Form Name", FieldTypes.Label, formResponse.Form.Name));
            fields.Add(new Field(_registrationFormLink, string.Empty, FieldTypes.Html, string.Format(_registrationFormLinkAnchorTag, eventDto.DynamicFormsId)));
            record.Fields = fields;

            _subEntity.Records.Add(record);
        }
        private SubEntity BuildReceiptPageSubEntity(AuthorizeDotNetSettingsDto settings)
        {
            var newRecord = (_configurationId == 0);
            var subEntity = new SubEntity() { EntityName = "ReceiptPage", DisplayName = "Design Receipt Page", CanAddExisting = false, CanCreateNew = false, CanDelete = false };
            var record = new SubEntityRecord();
            var fields = new List<Field>();

            var approvalMessage = newRecord ? Constants.DefaultValues.ReceiptApprovalMessage : settings.ApprovalMessage;
            fields.Add(new Field(_approvalMessage, "Approval Message", FieldTypes.Text, approvalMessage, false, null, Constants.Tooltips.ApprovalMessage));

            var declineMessage = newRecord ? Constants.DefaultValues.ReceiptDeclineMessage : settings.DeclineMessage;
            fields.Add(new Field(_declineMessage, "Decline Message", FieldTypes.Text, declineMessage, false, null, Constants.Tooltips.DeclineMessage));

            var errorMessage = newRecord ? Constants.DefaultValues.ReceiptErrorMessage : settings.ErrorMessage;
            fields.Add(new Field(_errorMessage, "Error Message", FieldTypes.Text, errorMessage, false, null, Constants.Tooltips.ErrorMessage));

            var partialPaymentMessage = newRecord ? Constants.DefaultValues.ReceiptPartialPaymentMessage : settings.PartialPaymentMessage;
            fields.Add(new Field(_partialPaymentMessage, "Partial Payment Message", FieldTypes.Text, partialPaymentMessage, false, null, Constants.Tooltips.PartialPaymentMessage));

            fields.Add(new Field(_urlBackToSite, "URL Back to Site", FieldTypes.Text, settings.ReceiptReturnUrl, false, null, Constants.Tooltips.UrlBackToSite));
            fields.Add(new Field(_textForBackToUrlBackToSite, "Text for the URL Back to Site", FieldTypes.Text, settings.ReceiptReturnText, false, null, Constants.Tooltips.TextForBackToUrlBackToSite));

            var receiptHtml = newRecord ? Constants.DefaultValues.ReceiptPage : settings.ReceiptHtml;
            fields.Add(new Field(_receiptEditor, "Receipt Editor", FieldTypes.WYSIWYG, receiptHtml, false, true));

            record.Fields = fields;

            subEntity.Records.Add(record);
            return subEntity;
        }
        private SubEntity BuildPaymentFormSubEntity(AuthorizeDotNetSettingsDto settings)
        {
            var subEntity = new SubEntity() { EntityName = "PaymentForm", DisplayName = "Payment Form Options", CanAddExisting = false, CanCreateNew = false, CanDelete = false };

            var record = new SubEntityRecord();
            var fields = new List<Field>();

            fields.Add(new Field(_header1, "Header 1", FieldTypes.MultiLineText, settings.HeaderOne, false, null, Constants.Tooltips.Header1));
            fields.Add(new Field(_header2, "Header 2", FieldTypes.MultiLineText, settings.HeaderTwo, false, null, Constants.Tooltips.Header2));
            fields.Add(new Field(_footer1, "Footer 1", FieldTypes.MultiLineText, settings.FooterOne, false, null, Constants.Tooltips.Footer1));
            fields.Add(new Field(_footer2, "Footer 2", FieldTypes.MultiLineText, settings.FooterTwo, false, null, Constants.Tooltips.Footer2));
            fields.Add(new Field(_policyUrl, "Policy URL", FieldTypes.Text, settings.PolicyUrl, false, null, Constants.Tooltips.PolicyUrl));
            fields.Add(new Field(_cancelUrl, "Cancel URL", FieldTypes.Text, settings.CancelUrl, false, null, Constants.Tooltips.CancelUrl));
            fields.Add(new Field(_cancelUrlText, "Cancel URL Text", FieldTypes.Text, settings.CancelUrlText, false, null, Constants.Tooltips.CancelUrlText));

            record.Fields = fields;

            subEntity.Records.Add(record);
            return subEntity;
        }
        private SubEntity BuildEmailConfirmationSubEntity(AuthorizeDotNetSettingsDto settings)
        {
            var subEntity = new SubEntity() { EntityName = "EmailConfirmation", DisplayName = "Email Confirmation", CanAddExisting = false, CanCreateNew = false, CanDelete = false };
            var record = new SubEntityRecord();
            var fields = new List<Field>();

            fields.Add(new Field(_emailConfirmation, "Email Confirmation", FieldTypes.Checkbox, settings.EmailConfirmation, false, null, Constants.Tooltips.EmailConfirmation));
            fields.Add(new Field(_emailHeader, "Email Header", FieldTypes.WYSIWYG, settings.EmailHeader, false, true, Constants.Tooltips.EmailHeader));
            fields.Add(new Field(_emailFooter, "Email Footer", FieldTypes.WYSIWYG, settings.EmailFooter, false, true, Constants.Tooltips.EmailFooter));

            record.Fields = fields;
            subEntity.Records.Add(record);
            return subEntity;
        }
예제 #23
0
        private static void AddExistingRecords(EventAdminDetailView parent, int eventId)
        {
            var eventTypes = GetEventTypes(parent, eventId);

            foreach (var eventType in eventTypes)
            {
                var record = new SubEntityRecord
                {
                    Id = eventType.Id
                };
                var fields = new List<Field>();

                fields.Add(new Field(_eventId, "EventId", FieldTypes.Hidden, eventId));
                fields.Add(new Field(_eventTypeId, "EventTypeId", FieldTypes.Hidden, eventType.Id));
                fields.Add(new Field(_eventType, "Event Type", FieldTypes.Label, eventType.Name));

                record.Fields = fields;

                _subEntity.Records.Add(record);
            }
        }
        private static void AddExistingRecords(ProviderAdminDetailView parent, int providerId)
        {
            var providerClinicalInterests = GetProviderClinicalInterests(parent, providerId);

            foreach (var providerClinicalInterest in providerClinicalInterests)
            {
                var record = new SubEntityRecord();
                var fields = new List<Field>();

                fields.Add(new Field(_id, _id, FieldTypes.Hidden, providerClinicalInterest.Id));
                fields.Add(new Field(_providerId, _providerId, FieldTypes.Hidden, providerId));
                fields.Add(new Field(_clinicalInterestId, _clinicalInterestId, FieldTypes.Hidden, providerClinicalInterest.ClinicalInterestId));
                fields.Add(new Field(_clinicalInterestName, "Clinical Interest Name", FieldTypes.Label, providerClinicalInterest.ClinicalInterestName));

                record.Fields = fields;

                _subEntity.Records.Add(record);
            }
        }
예제 #25
0
 public SubEntity()
 {
     Records = new List<SubEntityRecord>();
     NewRecordTemplate = new SubEntityRecord();
 }
예제 #26
0
        private static void AddExistingRecords(ProviderAdminDetailView parent, int providerId)
        {
            var providerTypes = GetProviderProviderTypes(parent, providerId);

            foreach (var type in providerTypes)
            {
                var record = new SubEntityRecord();
                var fields = new List<Field>();

                fields.Add(new Field(_id, _id, FieldTypes.Hidden, type.Id));
                fields.Add(new Field(_providerId, _providerId, FieldTypes.Hidden, providerId));
                fields.Add(new Field(_providerTypeId, _providerTypeId, FieldTypes.Hidden, type.ProviderTypeId));
                fields.Add(new Field(_providerTypeName, "Type Name", FieldTypes.Label, type.ProviderTypeName));

                record.Fields = fields;

                _subEntity.Records.Add(record);
            }
        }
예제 #27
0
        private static void Validate(ProviderAdminDetailView parent, SubEntityRecord record)
        {
            if (!CommonUtils.IsPhoneNumber(parent.GetFieldValue(record.Fields, _phone)))
                throw new BusinessException("Location Phone Number is invalid");

            if (!CommonUtils.IsPhoneNumber(parent.GetFieldValue(record.Fields, _fax)))
                throw new BusinessException("Location Fax Number is invalid");
        }
예제 #28
0
        private static SubEntity BuildServicesSubEntity(ProviderAdminDetailView parent, ProviderOrgUnitDto providerOrgUnit)
        {
            var subEntity = new SubEntity() { EntityName = ProviderAdminDetailView._providerOrgUnitServicesSubEntity, DisplayName = "Services", CanAddExisting = true, CanCreateNew = true, CanDelete = true };

            foreach (var service in providerOrgUnit.Service)
            {
                var record = new SubEntityRecord();

                record.Fields.Add(new Field(_serviceId, _serviceId, FieldTypes.Hidden, service.Id));
                record.Fields.Add(new Field("ServiceName", "Service Name", FieldTypes.Label, service.ServiceName));

                subEntity.Records.Add(record);
            }

            subEntity.NewRecordTemplate.Fields.Add(new Field(_providerOrgUnitId, _providerOrgUnitId, FieldTypes.Hidden, providerOrgUnit.Id));
            subEntity.NewRecordTemplate.Fields.Add(new Field("ServiceName", "Service Name", FieldTypes.Text, null, true) { Focus = true });

            return subEntity;
        }
예제 #29
0
        public static List<SubEntityRecord> GetInsuranceDropdownValues(ProviderAdminDetailView parent, int providerOrgUnitId)
        {
            var existingInsurances = parent.ProcessRequest<ListProviderOrgUnitInsurancesResponse>(new ListProviderOrgUnitInsurancesRequest() { ProviderOrgUnitId = providerOrgUnitId }).Insurances;
            var request = new ListInsurancesRequest() { IsEnabled = true };
            var insurances = parent.ProcessRequest<ListInsurancesResponse>(request).Insurances;
            var records = new List<SubEntityRecord>();

            foreach (var insurance in insurances.Where(i => !existingInsurances.Any(x => x.InsuranceId == i.Id)))
            {
                var record = new SubEntityRecord();
                record.DisplayName = insurance.Name;
                record.Id = insurance.Id;
                record.Fields.Add(new Field(_insuranceId, _orgUntiId, FieldTypes.Hidden, insurance.Id));
                record.Fields.Add(new Field("InsuranceName", "Insurance Name", FieldTypes.Label, insurance.Name));
                records.Add(record);
            }

            return records;
        }
예제 #30
0
        public static List<SubEntityRecord> GetLocationDropdownValues(ProviderAdminDetailView parent, int providerId)
        {
            IEnumerable<ProviderOrgUnitDto> existingLocations = new List<ProviderOrgUnitDto>();
            if (providerId != 0)
                existingLocations = GetProviderLocations(parent, providerId);

            var request = new ListOrgUnitsRequest();
            var orgUnits = parent.ProcessRequest<ListOrgUnitsResponse>(request).OrgUnits;
            var records = new List<SubEntityRecord>();

            foreach (var orgUnit in orgUnits.Where(o => !existingLocations.Any(e => e.OrgUnitId == o.Id)))
            {
                var record = new SubEntityRecord();
                record.DisplayName = orgUnit.Name;
                record.Id = orgUnit.Id;
                record.Fields.Add(new Field(_providerId, _providerId, FieldTypes.Hidden, providerId));
                record.Fields.Add(new Field(_orgUntiId, _orgUntiId, FieldTypes.Hidden, orgUnit.Id));
                record.Fields.Add(new Field(_orgUnitName, "Location Name", FieldTypes.Label, orgUnit.Name));
                record.Fields.Add(new Field(_isPrimary, "Is Primary", FieldTypes.Checkbox, false));
                record.Fields.Add(new Field(_phone, "Phone Number", FieldTypes.Text, null));
                record.Fields.Add(new Field(_fax, "Fax Number", FieldTypes.Text, null));
                record.Fields.Add(new Field(_isAcceptingNewPatients, "Is Accepting New Patients", FieldTypes.Checkbox, true));
                record.Fields.Add(new Field(_allowAppointmentRequests, "Allow Appointment Requests", FieldTypes.Checkbox, true));

                records.Add(record);
            }

            return records;
        }