(window.webpackJsonpbundle=window.webpackJsonpbundle||[]).push([[1],[function(e,t,n){e.exports=n(11)(356)},function(e,t,n){e.exports=n(11)(59)},function(e,t,n){"use strict";n.r(t);var i=n(5);n.d(t,"AbnormalFlag",(function(){return i.AbnormalFlag})),n.d(t,"AccessionSequenceLocationDesignator",(function(){return i.AccessionSequenceLocationDesignator})),n.d(t,"AccessionSequenceStatus",(function(){return i.AccessionSequenceStatus})),n.d(t,"AccessionSequenceType",(function(){return i.AccessionSequenceType})),n.d(t,"ActiveOrInactive",(function(){return i.ActiveOrInactive})),n.d(t,"ActiveStatus",(function(){return i.ActiveStatus})),n.d(t,"AdditionalFreeTextIndicator",(function(){return i.AdditionalFreeTextIndicator})),n.d(t,"AdditionalProviderType",(function(){return i.AdditionalProviderType})),n.d(t,"AddressTypeDescription",(function(){return i.AddressTypeDescription})),n.d(t,"AdjustmentCodeType",(function(){return i.AdjustmentCodeType})),n.d(t,"AdjustmentGroupPrefix",(function(){return i.AdjustmentGroupPrefix})),n.d(t,"AdjustmentReason",(function(){return i.AdjustmentReason})),n.d(t,"AdminLabType",(function(){return i.AdminLabType})),n.d(t,"AgingBalanceRange",(function(){return i.AgingBalanceRange})),n.d(t,"AlertBannerType",(function(){return i.AlertBannerType})),n.d(t,"AlertComparator",(function(){return i.AlertComparator})),n.d(t,"AlertSubtype",(function(){return i.AlertSubtype})),n.d(t,"AlertType",(function(){return i.AlertType})),n.d(t,"AllergyReasonForDeletion",(function(){return i.AllergyReasonForDeletion})),n.d(t,"AllergyResponseTypeDescription",(function(){return i.AllergyResponseTypeDescription})),n.d(t,"AllergySeverity",(function(){return i.AllergySeverity})),n.d(t,"AnatomicOrientation",(function(){return i.AnatomicOrientation})),n.d(t,"AnesthesiaBillingOption",(function(){return i.AnesthesiaBillingOption})),n.d(t,"AppointmentCancellationReason",(function(){return i.AppointmentCancellationReason})),n.d(t,"AppointmentReminderBidirectionalType",(function(){return i.AppointmentReminderBidirectionalType})),n.d(t,"AppointmentReminderConfirmationStatus",(function(){return i.AppointmentReminderConfirmationStatus})),n.d(t,"AppointmentReminderContactType",(function(){return i.AppointmentReminderContactType})),n.d(t,"AppointmentReminderFrequency",(function(){return i.AppointmentReminderFrequency})),n.d(t,"AppointmentReminderResponseType",(function(){return i.AppointmentReminderResponseType})),n.d(t,"AppointmentReportableReason",(function(){return i.AppointmentReportableReason})),n.d(t,"AppointmentStatus",(function(){return i.AppointmentStatus})),n.d(t,"AppointmentSubStatus",(function(){return i.AppointmentSubStatus})),n.d(t,"ApprovedStatus",(function(){return i.ApprovedStatus})),n.d(t,"ApptReminderVendor",(function(){return i.ApptReminderVendor})),n.d(t,"AssignableTaskAction",(function(){return i.AssignableTaskAction})),n.d(t,"AsyncJobStatus",(function(){return i.AsyncJobStatus})),n.d(t,"AsyncJobType",(function(){return i.AsyncJobType})),n.d(t,"AtLeastThreeHpvVaccinationsOptions",(function(){return i.AtLeastThreeHpvVaccinationsOptions})),n.d(t,"AuditReportFileType",(function(){return i.AuditReportFileType})),n.d(t,"AuditReportParameterType",(function(){return i.AuditReportParameterType})),n.d(t,"AuditReportProcessingStatus",(function(){return i.AuditReportProcessingStatus})),n.d(t,"AuthenticationType",(function(){return i.AuthenticationType})),n.d(t,"AutoCloseFinancialStatus",(function(){return i.AutoCloseFinancialStatus})),n.d(t,"AutoCloseUserType",(function(){return i.AutoCloseUserType})),n.d(t,"AutoPayAuthCancelReason",(function(){return i.AutoPayAuthCancelReason})),n.d(t,"AutoPayAuthStatus",(function(){return i.AutoPayAuthStatus})),n.d(t,"AutoPayAuthType",(function(){return i.AutoPayAuthType})),n.d(t,"AutoPayBillStatus",(function(){return i.AutoPayBillStatus})),n.d(t,"AutoPayReason",(function(){return i.AutoPayReason})),n.d(t,"AutoPayStatementHandling",(function(){return i.AutoPayStatementHandling})),n.d(t,"AutoPayTransactionNotificationType",(function(){return i.AutoPayTransactionNotificationType})),n.d(t,"AutoPayTransactionStatus",(function(){return i.AutoPayTransactionStatus})),n.d(t,"AutoPaymentStatus",(function(){return i.AutoPaymentStatus})),n.d(t,"AutoPostBillSettingMatchingType",(function(){return i.AutoPostBillSettingMatchingType})),n.d(t,"AutoPostEraMatchingType",(function(){return i.AutoPostEraMatchingType})),n.d(t,"AutorefractionType",(function(){return i.AutorefractionType})),n.d(t,"BalanceType",(function(){return i.BalanceType})),n.d(t,"BaseClosingReportStatus",(function(){return i.BaseClosingReportStatus})),n.d(t,"BenefitCategory",(function(){return i.BenefitCategory})),n.d(t,"BenefitType",(function(){return i.BenefitType})),n.d(t,"BillAdditionalCodeType",(function(){return i.BillAdditionalCodeType})),n.d(t,"BillAssigneeGroupId",(function(){return i.BillAssigneeGroupId})),n.d(t,"BillAssigneeType",(function(){return i.BillAssigneeType})),n.d(t,"BillEditRuleActionOrderingProviderCriteriaType",(function(){return i.BillEditRuleActionOrderingProviderCriteriaType})),n.d(t,"BillEditRuleActionType",(function(){return i.BillEditRuleActionType})),n.d(t,"BillEditRuleActionUpdateBillPayerIdType",(function(){return i.BillEditRuleActionUpdateBillPayerIdType})),n.d(t,"BillEditRuleCriteriaCodeMatchingType",(function(){return i.BillEditRuleCriteriaCodeMatchingType})),n.d(t,"BillEditRuleCriteriaPayerMatchingType",(function(){return i.BillEditRuleCriteriaPayerMatchingType})),n.d(t,"BillEditRuleCriteriaType",(function(){return i.BillEditRuleCriteriaType})),n.d(t,"BillEditRuleModifierMatchingType",(function(){return i.BillEditRuleModifierMatchingType})),n.d(t,"BillEditRulePayerType",(function(){return i.BillEditRulePayerType})),n.d(t,"BillInsuranceAttachmentTransmissionCode",(function(){return i.BillInsuranceAttachmentTransmissionCode})),n.d(t,"BillItemAdjustmentStatus",(function(){return i.BillItemAdjustmentStatus})),n.d(t,"BillItemReversalState",(function(){return i.BillItemReversalState})),n.d(t,"BillItemStatus",(function(){return i.BillItemStatus})),n.d(t,"BillItemType",(function(){return i.BillItemType})),n.d(t,"BillPayerLinkState",(function(){return i.BillPayerLinkState})),n.d(t,"BillPayerStatus",(function(){return i.BillPayerStatus})),n.d(t,"BillStatus",(function(){return i.BillStatus})),n.d(t,"BillType",(function(){return i.BillType})),n.d(t,"BillTypeWithNonBillCharges",(function(){return i.BillTypeWithNonBillCharges})),n.d(t,"BillingPreference",(function(){return i.BillingPreference})),n.d(t,"BillingQuoteChargeType",(function(){return i.BillingQuoteChargeType})),n.d(t,"BillingQuoteResponsibleParty",(function(){return i.BillingQuoteResponsibleParty})),n.d(t,"BillingQuoteStatus",(function(){return i.BillingQuoteStatus})),n.d(t,"BillingResponsibleParty",(function(){return i.BillingResponsibleParty})),n.d(t,"BillingRule",(function(){return i.BillingRule})),n.d(t,"BillingType",(function(){return i.BillingType})),n.d(t,"BiopsyLogNotificationTemplateType",(function(){return i.BiopsyLogNotificationTemplateType})),n.d(t,"BiopsyLogResultFlag",(function(){return i.BiopsyLogResultFlag})),n.d(t,"BiopsyLogSignatureStatus",(function(){return i.BiopsyLogSignatureStatus})),n.d(t,"BlEntryHistoryType",(function(){return i.BlEntryHistoryType})),n.d(t,"BlEntryPriority",(function(){return i.BlEntryPriority})),n.d(t,"BodyLocationDetailLevel",(function(){return i.BodyLocationDetailLevel})),n.d(t,"BulkPrecollectionLetterStatus",(function(){return i.BulkPrecollectionLetterStatus})),n.d(t,"BullseyeSectorLayout",(function(){return i.BullseyeSectorLayout})),n.d(t,"BusinessNameType",(function(){return i.BusinessNameType})),n.d(t,"CPOEType",(function(){return i.CPOEType})),n.d(t,"CalculateBy",(function(){return i.CalculateBy})),n.d(t,"CalculationStatus",(function(){return i.CalculationStatus})),n.d(t,"CallButtonPriority",(function(){return i.CallButtonPriority})),n.d(t,"CallButtonStatus",(function(){return i.CallButtonStatus})),n.d(t,"CardStatus",(function(){return i.CardStatus})),n.d(t,"CarePlanSourceType",(function(){return i.CarePlanSourceType})),n.d(t,"CareQualityDocumentStatus",(function(){return i.CareQualityDocumentStatus})),n.d(t,"CareQualityTransactionStatus",(function(){return i.CareQualityTransactionStatus})),n.d(t,"CareQualityTransactionType",(function(){return i.CareQualityTransactionType})),n.d(t,"CatagoryTabDeletionDurationType",(function(){return i.CatagoryTabDeletionDurationType})),n.d(t,"CatagoryTabSection",(function(){return i.CatagoryTabSection})),n.d(t,"CatagoryTabUpdateDurationType",(function(){return i.CatagoryTabUpdateDurationType})),n.d(t,"Category",(function(){return i.Category})),n.d(t,"CategoryType",(function(){return i.CategoryType})),n.d(t,"CervixDilation",(function(){return i.CervixDilation})),n.d(t,"CervixEffacement",(function(){return i.CervixEffacement})),n.d(t,"CervixStation",(function(){return i.CervixStation})),n.d(t,"ChangeType",(function(){return i.ChangeType})),n.d(t,"ChargeCategory",(function(){return i.ChargeCategory})),n.d(t,"ChargeStatus",(function(){return i.ChargeStatus})),n.d(t,"ChartNoteAction",(function(){return i.ChartNoteAction})),n.d(t,"ChartNoteStatus",(function(){return i.ChartNoteStatus})),n.d(t,"ChartNoteSubStatus",(function(){return i.ChartNoteSubStatus})),n.d(t,"ChartNoteType",(function(){return i.ChartNoteType})),n.d(t,"ChartSegmentationEventType",(function(){return i.ChartSegmentationEventType})),n.d(t,"CheckAdjustmentType",(function(){return i.CheckAdjustmentType})),n.d(t,"ClaimAdjustmentDenialReasonCategory",(function(){return i.ClaimAdjustmentDenialReasonCategory})),n.d(t,"ClaimEditOverride",(function(){return i.ClaimEditOverride})),n.d(t,"ClaimEditRuleBillingMethod",(function(){return i.ClaimEditRuleBillingMethod})),n.d(t,"ClaimEditRuleMatchingType",(function(){return i.ClaimEditRuleMatchingType})),n.d(t,"ClaimFilingIndicator",(function(){return i.ClaimFilingIndicator})),n.d(t,"ClaimFollowUpActionType",(function(){return i.ClaimFollowUpActionType})),n.d(t,"ClaimFormQualifier",(function(){return i.ClaimFormQualifier})),n.d(t,"ClaimFormatType",(function(){return i.ClaimFormatType})),n.d(t,"ClaimHistoryEventType",(function(){return i.ClaimHistoryEventType})),n.d(t,"ClaimPayerCheckType",(function(){return i.ClaimPayerCheckType})),n.d(t,"ClaimPaymentExceptionType",(function(){return i.ClaimPaymentExceptionType})),n.d(t,"ClaimStatus",(function(){return i.ClaimStatus})),n.d(t,"ClaimStatusSource",(function(){return i.ClaimStatusSource})),n.d(t,"ClaimSubmissionType",(function(){return i.ClaimSubmissionType})),n.d(t,"ClaimType",(function(){return i.ClaimType})),n.d(t,"ClinicalNoteType",(function(){return i.ClinicalNoteType})),n.d(t,"ClipboardSectionType",(function(){return i.ClipboardSectionType})),n.d(t,"ClipboardSubSectionType",(function(){return i.ClipboardSubSectionType})),n.d(t,"ClosingReportEntryType",(function(){return i.ClosingReportEntryType})),n.d(t,"ClosingReportType",(function(){return i.ClosingReportType})),n.d(t,"CodeCategoryItemType",(function(){return i.CodeCategoryItemType})),n.d(t,"CodedReferenceQualifier",(function(){return i.CodedReferenceQualifier})),n.d(t,"ColorVisionFarnsworthDefect",(function(){return i.ColorVisionFarnsworthDefect})),n.d(t,"ColorVisionTestType",(function(){return i.ColorVisionTestType})),n.d(t,"CommissionConfigurationCodeRateType",(function(){return i.CommissionConfigurationCodeRateType})),n.d(t,"CommissionConfigurationCodeType",(function(){return i.CommissionConfigurationCodeType})),n.d(t,"ComparisonOperator",(function(){return i.ComparisonOperator})),n.d(t,"CompoundMedicationType",(function(){return i.CompoundMedicationType})),n.d(t,"ConditionType",(function(){return i.ConditionType})),n.d(t,"ConsentType",(function(){return i.ConsentType})),n.d(t,"ConsentVisibilityScope",(function(){return i.ConsentVisibilityScope})),n.d(t,"ConsentVisibilityType",(function(){return i.ConsentVisibilityType})),n.d(t,"ContactLensBlend",(function(){return i.ContactLensBlend})),n.d(t,"ContactLensCentration",(function(){return i.ContactLensCentration})),n.d(t,"ContactLensComfort",(function(){return i.ContactLensComfort})),n.d(t,"ContactLensDisinfecting",(function(){return i.ContactLensDisinfecting})),n.d(t,"ContactLensDot",(function(){return i.ContactLensDot})),n.d(t,"ContactLensFittingType",(function(){return i.ContactLensFittingType})),n.d(t,"ContactLensMonovision",(function(){return i.ContactLensMonovision})),n.d(t,"ContactLensMovement",(function(){return i.ContactLensMovement})),n.d(t,"ContactLensReplenishment",(function(){return i.ContactLensReplenishment})),n.d(t,"ContactLensRgpTint",(function(){return i.ContactLensRgpTint})),n.d(t,"ContactLensStatus",(function(){return i.ContactLensStatus})),n.d(t,"ContactLensVision",(function(){return i.ContactLensVision})),n.d(t,"ContactLensWearSchedule",(function(){return i.ContactLensWearSchedule})),n.d(t,"ContactLensWearingType",(function(){return i.ContactLensWearingType})),n.d(t,"ContactMethodType",(function(){return i.ContactMethodType})),n.d(t,"ControlledSubstanceCode",(function(){return i.ControlledSubstanceCode})),n.d(t,"ConversionStatus",(function(){return i.ConversionStatus})),n.d(t,"CopayTerm",(function(){return i.CopayTerm})),n.d(t,"CopayType",(function(){return i.CopayType})),n.d(t,"CosignatureWorkflowsStatus",(function(){return i.CosignatureWorkflowsStatus})),n.d(t,"CoverageAgeQualifierType",(function(){return i.CoverageAgeQualifierType})),n.d(t,"CoverageListType",(function(){return i.CoverageListType})),n.d(t,"CpiaActivityWeight",(function(){return i.CpiaActivityWeight})),n.d(t,"CpiaPracticeSize",(function(){return i.CpiaPracticeSize})),n.d(t,"CpiaSubcategory",(function(){return i.CpiaSubcategory})),n.d(t,"CrossCoverHorizontal",(function(){return i.CrossCoverHorizontal})),n.d(t,"CrossCoverVertical",(function(){return i.CrossCoverVertical})),n.d(t,"CustomField",(function(){return i.CustomField})),n.d(t,"CustomPage",(function(){return i.CustomPage})),n.d(t,"DataReviewed",(function(){return i.DataReviewed})),n.d(t,"DataSetStatus",(function(){return i.DataSetStatus})),n.d(t,"DataSetType",(function(){return i.DataSetType})),n.d(t,"DateRule",(function(){return i.DateRule})),n.d(t,"DayOfWeek",(function(){return i.DayOfWeek})),n.d(t,"DenialManagementResetStrategy",(function(){return i.DenialManagementResetStrategy})),n.d(t,"DeniedReasonCode",(function(){return i.DeniedReasonCode})),n.d(t,"DermPathAdditionalLabelIdentifierType",(function(){return i.DermPathAdditionalLabelIdentifierType})),n.d(t,"DermPathBillingType",(function(){return i.DermPathBillingType})),n.d(t,"DermPathCassettePrinterType",(function(){return i.DermPathCassettePrinterType})),n.d(t,"DermPathLabelIdentifierType",(function(){return i.DermPathLabelIdentifierType})),n.d(t,"DermPathRequestStatus",(function(){return i.DermPathRequestStatus})),n.d(t,"DermPathStaffRoleType",(function(){return i.DermPathStaffRoleType})),n.d(t,"DescriptionCode",(function(){return i.DescriptionCode})),n.d(t,"DeviceApp",(function(){return i.DeviceApp})),n.d(t,"DevicePlatform",(function(){return i.DevicePlatform})),n.d(t,"DftBusinessUnitOption",(function(){return i.DftBusinessUnitOption})),n.d(t,"DftClassification",(function(){return i.DftClassification})),n.d(t,"DiagnosisStatus",(function(){return i.DiagnosisStatus})),n.d(t,"DirectMailFileFormat",(function(){return i.DirectMailFileFormat})),n.d(t,"DiscountReason",(function(){return i.DiscountReason})),n.d(t,"DiscountType",(function(){return i.DiscountType})),n.d(t,"DivisionConfigType",(function(){return i.DivisionConfigType})),n.d(t,"DocumentHandleType",(function(){return i.DocumentHandleType})),n.d(t,"DocumentStatus",(function(){return i.DocumentStatus})),n.d(t,"DomainSubjectType",(function(){return i.DomainSubjectType})),n.d(t,"DoseForm",(function(){return i.DoseForm})),n.d(t,"DoseUnit",(function(){return i.DoseUnit})),n.d(t,"DrugAllergenWarningLevel",(function(){return i.DrugAllergenWarningLevel})),n.d(t,"DrugDrugWarningLevel",(function(){return i.DrugDrugWarningLevel})),n.d(t,"DuplicateTherapyWarningLevel",(function(){return i.DuplicateTherapyWarningLevel})),n.d(t,"EINType",(function(){return i.EINType})),n.d(t,"EMCode",(function(){return i.EMCode})),n.d(t,"EcrAuditEventType",(function(){return i.EcrAuditEventType})),n.d(t,"EcrMode",(function(){return i.EcrMode})),n.d(t,"EcrStatus",(function(){return i.EcrStatus})),n.d(t,"EdiVendor",(function(){return i.EdiVendor})),n.d(t,"ElectronicClaimType",(function(){return i.ElectronicClaimType})),n.d(t,"EligibilityAlertType",(function(){return i.EligibilityAlertType})),n.d(t,"EligibilityDiscrepancySubfieldType",(function(){return i.EligibilityDiscrepancySubfieldType})),n.d(t,"EligibilityDiscrepancyType",(function(){return i.EligibilityDiscrepancyType})),n.d(t,"EligibilityReportReviewStatus",(function(){return i.EligibilityReportReviewStatus})),n.d(t,"EligibilityRequestFormat",(function(){return i.EligibilityRequestFormat})),n.d(t,"EligibilityResponseFormat",(function(){return i.EligibilityResponseFormat})),n.d(t,"EmaLocation",(function(){return i.EmaLocation})),n.d(t,"EmailValidationMethod",(function(){return i.EmailValidationMethod})),n.d(t,"EmailValidationStatus",(function(){return i.EmailValidationStatus})),n.d(t,"EmergencyContactType",(function(){return i.EmergencyContactType})),n.d(t,"EmploymentStatus",(function(){return i.EmploymentStatus})),n.d(t,"EntityType",(function(){return i.EntityType})),n.d(t,"EraStatus",(function(){return i.EraStatus})),n.d(t,"EthnicGroup",(function(){return i.EthnicGroup})),n.d(t,"EthnicGroupDetailType",(function(){return i.EthnicGroupDetailType})),n.d(t,"EventName",(function(){return i.EventName})),n.d(t,"ExamSetLaterality",(function(){return i.ExamSetLaterality})),n.d(t,"ExternalSystemAuth",(function(){return i.ExternalSystemAuth})),n.d(t,"FacilityAdmissionSource",(function(){return i.FacilityAdmissionSource})),n.d(t,"FacilityAdmissionType",(function(){return i.FacilityAdmissionType})),n.d(t,"FacilityInclusionType",(function(){return i.FacilityInclusionType})),n.d(t,"FacilitySubmissionForm",(function(){return i.FacilitySubmissionForm})),n.d(t,"FacilityType",(function(){return i.FacilityType})),n.d(t,"FamilyMemberRelationship",(function(){return i.FamilyMemberRelationship})),n.d(t,"FamilyRelative",(function(){return i.FamilyRelative})),n.d(t,"FeeCalculationMethod",(function(){return i.FeeCalculationMethod})),n.d(t,"FeeScheduleImportStatus",(function(){return i.FeeScheduleImportStatus})),n.d(t,"FetalMovement",(function(){return i.FetalMovement})),n.d(t,"FetalPresentation",(function(){return i.FetalPresentation})),n.d(t,"FetusCount",(function(){return i.FetusCount})),n.d(t,"FhirApiAcl",(function(){return i.FhirApiAcl})),n.d(t,"FhirApiAclCategory",(function(){return i.FhirApiAclCategory})),n.d(t,"FhirApiVendorFirmadminAccess",(function(){return i.FhirApiVendorFirmadminAccess})),n.d(t,"FhirApiVendorStatus",(function(){return i.FhirApiVendorStatus})),n.d(t,"FhirApiVendorSysadminAccess",(function(){return i.FhirApiVendorSysadminAccess})),n.d(t,"FileAttachmentEmaArea",(function(){return i.FileAttachmentEmaArea})),n.d(t,"FinancialsAgingRule",(function(){return i.FinancialsAgingRule})),n.d(t,"FirmAdjustmentCodeExceptionCoverageType",(function(){return i.FirmAdjustmentCodeExceptionCoverageType})),n.d(t,"FirmAuthorizationSettingsAlertRecipientLinkType",(function(){return i.FirmAuthorizationSettingsAlertRecipientLinkType})),n.d(t,"FirmChargeDiscountType",(function(){return i.FirmChargeDiscountType})),n.d(t,"FirmCheckedInRoomPreferencesStatus",(function(){return i.FirmCheckedInRoomPreferencesStatus})),n.d(t,"FirmGroupType",(function(){return i.FirmGroupType})),n.d(t,"FirmLicenseType",(function(){return i.FirmLicenseType})),n.d(t,"FirmLogoType",(function(){return i.FirmLogoType})),n.d(t,"FirmPaymentType",(function(){return i.FirmPaymentType})),n.d(t,"FixativeIn",(function(){return i.FixativeIn})),n.d(t,"FollowUpReason",(function(){return i.FollowUpReason})),n.d(t,"FollowUpSchedulingInstruction",(function(){return i.FollowUpSchedulingInstruction})),n.d(t,"FollowUpStatus",(function(){return i.FollowUpStatus})),n.d(t,"FollowUpUnit",(function(){return i.FollowUpUnit})),n.d(t,"FormularyStatusType",(function(){return i.FormularyStatusType})),n.d(t,"Frequency",(function(){return i.Frequency})),n.d(t,"FrequencyType",(function(){return i.FrequencyType})),n.d(t,"FundsTransactionType",(function(){return i.FundsTransactionType})),n.d(t,"GdprAnswerType",(function(){return i.GdprAnswerType})),n.d(t,"Gender",(function(){return i.Gender})),n.d(t,"GenderIdentity",(function(){return i.GenderIdentity})),n.d(t,"GeographicElement",(function(){return i.GeographicElement})),n.d(t,"GlassesContactsUsageType",(function(){return i.GlassesContactsUsageType})),n.d(t,"GudidDeviceIssuingAgency",(function(){return i.GudidDeviceIssuingAgency})),n.d(t,"GudidDeviceLatexStatus",(function(){return i.GudidDeviceLatexStatus})),n.d(t,"GudidDeviceMriSafetyStatus",(function(){return i.GudidDeviceMriSafetyStatus})),n.d(t,"GudidDeviceRecordStatus",(function(){return i.GudidDeviceRecordStatus})),n.d(t,"GuidedWorkflowSection",(function(){return i.GuidedWorkflowSection})),n.d(t,"GuidelineCodeSystemType",(function(){return i.GuidelineCodeSystemType})),n.d(t,"HcpcsCategoryType",(function(){return i.HcpcsCategoryType})),n.d(t,"HideFromPortalReason",(function(){return i.HideFromPortalReason})),n.d(t,"HistoryType",(function(){return i.HistoryType})),n.d(t,"HourOfArrival",(function(){return i.HourOfArrival})),n.d(t,"HourOfDischarge",(function(){return i.HourOfDischarge})),n.d(t,"IdProofingVendor",(function(){return i.IdProofingVendor})),n.d(t,"ImmunizationRegistryStatus",(function(){return i.ImmunizationRegistryStatus})),n.d(t,"ImmunotherapyType",(function(){return i.ImmunotherapyType})),n.d(t,"ImoMappingType",(function(){return i.ImoMappingType})),n.d(t,"ImportStatus",(function(){return i.ImportStatus})),n.d(t,"InboundDftStatus",(function(){return i.InboundDftStatus})),n.d(t,"InfantVisionCornealLightReflex",(function(){return i.InfantVisionCornealLightReflex})),n.d(t,"InfantVisionMaintainsAlignment",(function(){return i.InfantVisionMaintainsAlignment})),n.d(t,"InfantVisionSteadiness",(function(){return i.InfantVisionSteadiness})),n.d(t,"InhaledOxygenDevice",(function(){return i.InhaledOxygenDevice})),n.d(t,"InsurancePolicyAttachmentType",(function(){return i.InsurancePolicyAttachmentType})),n.d(t,"InsurancePolicyAuthType",(function(){return i.InsurancePolicyAuthType})),n.d(t,"InsurancePolicyHolderType",(function(){return i.InsurancePolicyHolderType})),n.d(t,"InsurancePolicyPatientNameStrategy",(function(){return i.InsurancePolicyPatientNameStrategy})),n.d(t,"InsuranceZoneDescription",(function(){return i.InsuranceZoneDescription})),n.d(t,"InsuredRelationship",(function(){return i.InsuredRelationship})),n.d(t,"IntegrationType",(function(){return i.IntegrationType})),n.d(t,"IntervalsForHistory",(function(){return i.IntervalsForHistory})),n.d(t,"IntramailRecipientType",(function(){return i.IntramailRecipientType})),n.d(t,"InvBodyLocation",(function(){return i.InvBodyLocation})),n.d(t,"InvPackageOrderType",(function(){return i.InvPackageOrderType})),n.d(t,"InvPackagePaymentMethod",(function(){return i.InvPackagePaymentMethod})),n.d(t,"InvPackageType",(function(){return i.InvPackageType})),n.d(t,"InvProductLogStatus",(function(){return i.InvProductLogStatus})),n.d(t,"InvProductOrderStatus",(function(){return i.InvProductOrderStatus})),n.d(t,"InvProductType",(function(){return i.InvProductType})),n.d(t,"InvReconciliationStatus",(function(){return i.InvReconciliationStatus})),n.d(t,"InvRemovedReason",(function(){return i.InvRemovedReason})),n.d(t,"InvTransactionType",(function(){return i.InvTransactionType})),n.d(t,"InvUnitType",(function(){return i.InvUnitType})),n.d(t,"JobStatus",(function(){return i.JobStatus})),n.d(t,"KeratometryMethodType",(function(){return i.KeratometryMethodType})),n.d(t,"KeratometryMiresQualityValue",(function(){return i.KeratometryMiresQualityValue})),n.d(t,"KioskCopayBusinessUnitOption",(function(){return i.KioskCopayBusinessUnitOption})),n.d(t,"LabResultStatus",(function(){return i.LabResultStatus})),n.d(t,"LabRouting",(function(){return i.LabRouting})),n.d(t,"LabTestType",(function(){return i.LabTestType})),n.d(t,"LabType",(function(){return i.LabType})),n.d(t,"LabelSheetType",(function(){return i.LabelSheetType})),n.d(t,"LactationWarningLevel",(function(){return i.LactationWarningLevel})),n.d(t,"Language",(function(){return i.Language})),n.d(t,"LedgerGroupType",(function(){return i.LedgerGroupType})),n.d(t,"LensCoating",(function(){return i.LensCoating})),n.d(t,"LensColor",(function(){return i.LensColor})),n.d(t,"LensMaterial",(function(){return i.LensMaterial})),n.d(t,"LensStyle",(function(){return i.LensStyle})),n.d(t,"LensTint",(function(){return i.LensTint})),n.d(t,"LightReflexCorrection",(function(){return i.LightReflexCorrection})),n.d(t,"LightReflexFixation",(function(){return i.LightReflexFixation})),n.d(t,"LightReflexPrism",(function(){return i.LightReflexPrism})),n.d(t,"LightReflexWorkingDistance",(function(){return i.LightReflexWorkingDistance})),n.d(t,"LinkAttachmentType",(function(){return i.LinkAttachmentType})),n.d(t,"LocationType",(function(){return i.LocationType})),n.d(t,"MarginLocation",(function(){return i.MarginLocation})),n.d(t,"MaritalStatus",(function(){return i.MaritalStatus})),n.d(t,"MarkOfOrientation",(function(){return i.MarkOfOrientation})),n.d(t,"MarkOfOrientationPosition",(function(){return i.MarkOfOrientationPosition})),n.d(t,"MatchRule",(function(){return i.MatchRule})),n.d(t,"MavBatchStatus",(function(){return i.MavBatchStatus})),n.d(t,"MavBatchStatusCode",(function(){return i.MavBatchStatusCode})),n.d(t,"MavBatchType",(function(){return i.MavBatchType})),n.d(t,"MavContactMethod",(function(){return i.MavContactMethod})),n.d(t,"MavContractedPayerAddressTypeValue",(function(){return i.MavContractedPayerAddressTypeValue})),n.d(t,"MavContractedPayerContactTypeValue",(function(){return i.MavContractedPayerContactTypeValue})),n.d(t,"MavFacilityResourceType",(function(){return i.MavFacilityResourceType})),n.d(t,"MavInsurancePolicyType",(function(){return i.MavInsurancePolicyType})),n.d(t,"MavLedgerActivityType",(function(){return i.MavLedgerActivityType})),n.d(t,"MavMasterAccessLockFeatureType",(function(){return i.MavMasterAccessLockFeatureType})),n.d(t,"MavPlaceOfServiceFacilityType",(function(){return i.MavPlaceOfServiceFacilityType})),n.d(t,"MavRulePerformanceFlag",(function(){return i.MavRulePerformanceFlag})),n.d(t,"MaxAmountTimePeriodType",(function(){return i.MaxAmountTimePeriodType})),n.d(t,"MaxAmountType",(function(){return i.MaxAmountType})),n.d(t,"MdmDataReviewedMdmLabel",(function(){return i.MdmDataReviewedMdmLabel})),n.d(t,"MdmLevel",(function(){return i.MdmLevel})),n.d(t,"MedicalDomain",(function(){return i.MedicalDomain})),n.d(t,"MedicalSubdomain",(function(){return i.MedicalSubdomain})),n.d(t,"MedicationSubstitution",(function(){return i.MedicationSubstitution})),n.d(t,"MeetingType",(function(){return i.MeetingType})),n.d(t,"MeningococcalVaccinationOptions",(function(){return i.MeningococcalVaccinationOptions})),n.d(t,"MessageCategoryColor",(function(){return i.MessageCategoryColor})),n.d(t,"MessagePriority",(function(){return i.MessagePriority})),n.d(t,"Method",(function(){return i.Method})),n.d(t,"MethodOfDating",(function(){return i.MethodOfDating})),n.d(t,"MipsCertificationEdition",(function(){return i.MipsCertificationEdition})),n.d(t,"MipsEventType",(function(){return i.MipsEventType})),n.d(t,"MipsObjectiveDetailsType",(function(){return i.MipsObjectiveDetailsType})),n.d(t,"MipsObjectiveType",(function(){return i.MipsObjectiveType})),n.d(t,"MipsQualityMeasureType",(function(){return i.MipsQualityMeasureType})),n.d(t,"MipsReportingPeriodType",(function(){return i.MipsReportingPeriodType})),n.d(t,"MipsSection",(function(){return i.MipsSection})),n.d(t,"MipsTinLocationType",(function(){return i.MipsTinLocationType})),n.d(t,"MobileType",(function(){return i.MobileType})),n.d(t,"MostRecentDataType",(function(){return i.MostRecentDataType})),n.d(t,"Motility",(function(){return i.Motility})),n.d(t,"MotilityResult",(function(){return i.MotilityResult})),n.d(t,"MvpReportingPeriodType",(function(){return i.MvpReportingPeriodType})),n.d(t,"NavigationGroupName",(function(){return i.NavigationGroupName})),n.d(t,"NewRxRequestCommunicationType",(function(){return i.NewRxRequestCommunicationType})),n.d(t,"NewRxRequestUserType",(function(){return i.NewRxRequestUserType})),n.d(t,"NineSectorLayout",(function(){return i.NineSectorLayout})),n.d(t,"NormalAbnormal",(function(){return i.NormalAbnormal})),n.d(t,"NoteType",(function(){return i.NoteType})),n.d(t,"NotificationMethod",(function(){return i.NotificationMethod})),n.d(t,"NotificationStatus",(function(){return i.NotificationStatus})),n.d(t,"NotificationTemplate",(function(){return i.NotificationTemplate})),n.d(t,"ObGlobalPackageBillingPhase",(function(){return i.ObGlobalPackageBillingPhase})),n.d(t,"OcularUnderlyingCondition",(function(){return i.OcularUnderlyingCondition})),n.d(t,"Oculus",(function(){return i.Oculus})),n.d(t,"OnlineCheckInSectionTitle",(function(){return i.OnlineCheckInSectionTitle})),n.d(t,"OptionMapper",(function(){return i.OptionMapper})),n.d(t,"OrderAction",(function(){return i.OrderAction})),n.d(t,"OrderAttachmentType",(function(){return i.OrderAttachmentType})),n.d(t,"OrderDetailKey",(function(){return i.OrderDetailKey})),n.d(t,"OrderInterfaceStatus",(function(){return i.OrderInterfaceStatus})),n.d(t,"OrderPriority",(function(){return i.OrderPriority})),n.d(t,"OrderRecallStatus",(function(){return i.OrderRecallStatus})),n.d(t,"OrderRoutingType",(function(){return i.OrderRoutingType})),n.d(t,"OrderStatus",(function(){return i.OrderStatus})),n.d(t,"OrderSubType",(function(){return i.OrderSubType})),n.d(t,"OrderType",(function(){return i.OrderType})),n.d(t,"OtoacousticEmission",(function(){return i.OtoacousticEmission})),n.d(t,"OutboundBridgeProtocolType",(function(){return i.OutboundBridgeProtocolType})),n.d(t,"OutboundClaimType",(function(){return i.OutboundClaimType})),n.d(t,"OverallMDM",(function(){return i.OverallMDM})),n.d(t,"OverpaymentAllocationMode",(function(){return i.OverpaymentAllocationMode})),n.d(t,"PACancelReasonCode",(function(){return i.PACancelReasonCode})),n.d(t,"PAClosedReasonCode",(function(){return i.PAClosedReasonCode})),n.d(t,"PAPriorityIndicator",(function(){return i.PAPriorityIndicator})),n.d(t,"PQRSDomain",(function(){return i.PQRSDomain})),n.d(t,"PQRSMeasureType",(function(){return i.PQRSMeasureType})),n.d(t,"PQRSPerformanceFlag",(function(){return i.PQRSPerformanceFlag})),n.d(t,"PQRSRegistry",(function(){return i.PQRSRegistry})),n.d(t,"PQRSReportingOption",(function(){return i.PQRSReportingOption})),n.d(t,"PQRSUserType",(function(){return i.PQRSUserType})),n.d(t,"PackageAssociationType",(function(){return i.PackageAssociationType})),n.d(t,"PackageItemType",(function(){return i.PackageItemType})),n.d(t,"PastFamilySocialHistoryDescription",(function(){return i.PastFamilySocialHistoryDescription})),n.d(t,"PathAndLabsLabel",(function(){return i.PathAndLabsLabel})),n.d(t,"PatientAlertEntityType",(function(){return i.PatientAlertEntityType})),n.d(t,"PatientAlertLevel",(function(){return i.PatientAlertLevel})),n.d(t,"PatientAlertType",(function(){return i.PatientAlertType})),n.d(t,"PatientAssignableTaskAction",(function(){return i.PatientAssignableTaskAction})),n.d(t,"PatientBalanceAsyncJobStatus",(function(){return i.PatientBalanceAsyncJobStatus})),n.d(t,"PatientBalanceAsyncJobType",(function(){return i.PatientBalanceAsyncJobType})),n.d(t,"PatientCollectionAction",(function(){return i.PatientCollectionAction})),n.d(t,"PatientDeviceErrorAttachmentMetadataType",(function(){return i.PatientDeviceErrorAttachmentMetadataType})),n.d(t,"PatientDischargeStatus",(function(){return i.PatientDischargeStatus})),n.d(t,"PatientEhiRequestStatus",(function(){return i.PatientEhiRequestStatus})),n.d(t,"PatientOnlineCheckInSubtaskStatusEnum",(function(){return i.PatientOnlineCheckInSubtaskStatusEnum})),n.d(t,"PatientPaymentAssociationMethod",(function(){return i.PatientPaymentAssociationMethod})),n.d(t,"PatientPaymentReversalReason",(function(){return i.PatientPaymentReversalReason})),n.d(t,"PatientPaymentStatus",(function(){return i.PatientPaymentStatus})),n.d(t,"PatientPortalEvent",(function(){return i.PatientPortalEvent})),n.d(t,"PatientPortalEventData",(function(){return i.PatientPortalEventData})),n.d(t,"PatientPortalResultAction",(function(){return i.PatientPortalResultAction})),n.d(t,"PatientPortalResultsTimeRule",(function(){return i.PatientPortalResultsTimeRule})),n.d(t,"PatientPortalType",(function(){return i.PatientPortalType})),n.d(t,"PatientPreferredPronoun",(function(){return i.PatientPreferredPronoun})),n.d(t,"PatientPregnancyHistoryStatus",(function(){return i.PatientPregnancyHistoryStatus})),n.d(t,"PatientProviderType",(function(){return i.PatientProviderType})),n.d(t,"PatientSelfAssessmentOfTreatmentCompliance",(function(){return i.PatientSelfAssessmentOfTreatmentCompliance})),n.d(t,"PatientStatementBatchStatus",(function(){return i.PatientStatementBatchStatus})),n.d(t,"PatientStatementNote",(function(){return i.PatientStatementNote})),n.d(t,"PatientStatementPeriod",(function(){return i.PatientStatementPeriod})),n.d(t,"PatientStatementPreference",(function(){return i.PatientStatementPreference})),n.d(t,"PatientStatus",(function(){return i.PatientStatus})),n.d(t,"PatientWarningDataActionType",(function(){return i.PatientWarningDataActionType})),n.d(t,"PatientWarningType",(function(){return i.PatientWarningType})),n.d(t,"PayerCheckFormat",(function(){return i.PayerCheckFormat})),n.d(t,"PayerContactType",(function(){return i.PayerContactType})),n.d(t,"PayerIdType",(function(){return i.PayerIdType})),n.d(t,"PayerMatchingType",(function(){return i.PayerMatchingType})),n.d(t,"PayfacCardBrand",(function(){return i.PayfacCardBrand})),n.d(t,"PayfacQuickpayUserTokenType",(function(){return i.PayfacQuickpayUserTokenType})),n.d(t,"PayfacTerminalStatus",(function(){return i.PayfacTerminalStatus})),n.d(t,"PaymentChannelType",(function(){return i.PaymentChannelType})),n.d(t,"PaymentCode",(function(){return i.PaymentCode})),n.d(t,"PaymentMethod",(function(){return i.PaymentMethod})),n.d(t,"PaymentPlanAuthorizationStatus",(function(){return i.PaymentPlanAuthorizationStatus})),n.d(t,"PaymentPlanEndingReason",(function(){return i.PaymentPlanEndingReason})),n.d(t,"PaymentPlanFrequency",(function(){return i.PaymentPlanFrequency})),n.d(t,"PaymentPlanStatus",(function(){return i.PaymentPlanStatus})),n.d(t,"PaymentProcessor",(function(){return i.PaymentProcessor})),n.d(t,"PaymentRequestStatus",(function(){return i.PaymentRequestStatus})),n.d(t,"PaymentRequestType",(function(){return i.PaymentRequestType})),n.d(t,"PaymentStatus",(function(){return i.PaymentStatus})),n.d(t,"PaymentTerminalStatus",(function(){return i.PaymentTerminalStatus})),n.d(t,"PaymentType",(function(){return i.PaymentType})),n.d(t,"PaymentTypology",(function(){return i.PaymentTypology})),n.d(t,"PdfSplitAction",(function(){return i.PdfSplitAction})),n.d(t,"PdfSplitStatus",(function(){return i.PdfSplitStatus})),n.d(t,"PdmpVendorType",(function(){return i.PdmpVendorType})),n.d(t,"PharmacyType",(function(){return i.PharmacyType})),n.d(t,"PhiRelationship",(function(){return i.PhiRelationship})),n.d(t,"PhoneNumberType",(function(){return i.PhoneNumberType})),n.d(t,"PhoneNumberTypeDescription",(function(){return i.PhoneNumberTypeDescription})),n.d(t,"PhotoPermission",(function(){return i.PhotoPermission})),n.d(t,"PlanType",(function(){return i.PlanType})),n.d(t,"PlusOrMinus",(function(){return i.PlusOrMinus})),n.d(t,"PmIntegrationFileFormat",(function(){return i.PmIntegrationFileFormat})),n.d(t,"PmIntegrationVendor",(function(){return i.PmIntegrationVendor})),n.d(t,"PmNoteType",(function(){return i.PmNoteType})),n.d(t,"PmObPackageBillLinkType",(function(){return i.PmObPackageBillLinkType})),n.d(t,"PmObPackageStatus",(function(){return i.PmObPackageStatus})),n.d(t,"PolicyTypeFilter",(function(){return i.PolicyTypeFilter})),n.d(t,"PostingStatus",(function(){return i.PostingStatus})),n.d(t,"PqrsRateCategory",(function(){return i.PqrsRateCategory})),n.d(t,"PreCollectionApptBooking",(function(){return i.PreCollectionApptBooking})),n.d(t,"PregnancyAbortionTreatment",(function(){return i.PregnancyAbortionTreatment})),n.d(t,"PregnancyAnesthesia",(function(){return i.PregnancyAnesthesia})),n.d(t,"PregnancyBabyLiving",(function(){return i.PregnancyBabyLiving})),n.d(t,"PregnancyBabySex",(function(){return i.PregnancyBabySex})),n.d(t,"PregnancyBleeding",(function(){return i.PregnancyBleeding})),n.d(t,"PregnancyConclusionReason",(function(){return i.PregnancyConclusionReason})),n.d(t,"PregnancyContractions",(function(){return i.PregnancyContractions})),n.d(t,"PregnancyDeliveredByType",(function(){return i.PregnancyDeliveredByType})),n.d(t,"PregnancyEctopicTreatment",(function(){return i.PregnancyEctopicTreatment})),n.d(t,"PregnancyFluidLeakage",(function(){return i.PregnancyFluidLeakage})),n.d(t,"PregnancyIncludeInBillingForExternalProvider",(function(){return i.PregnancyIncludeInBillingForExternalProvider})),n.d(t,"PregnancyIncludeInBillingForInternalProvider",(function(){return i.PregnancyIncludeInBillingForInternalProvider})),n.d(t,"PregnancyMiscarriageTreatment",(function(){return i.PregnancyMiscarriageTreatment})),n.d(t,"PregnancyModeOfDelivery",(function(){return i.PregnancyModeOfDelivery})),n.d(t,"PregnancyType",(function(){return i.PregnancyType})),n.d(t,"PregnancyWarningLevel",(function(){return i.PregnancyWarningLevel})),n.d(t,"PretermLaborSymptoms",(function(){return i.PretermLaborSymptoms})),n.d(t,"PricingType",(function(){return i.PricingType})),n.d(t,"PriorAuthAppealStatus",(function(){return i.PriorAuthAppealStatus})),n.d(t,"PriorAuthCancelStatus",(function(){return i.PriorAuthCancelStatus})),n.d(t,"PriorAuthMessageType",(function(){return i.PriorAuthMessageType})),n.d(t,"PriorAuthOutgoingAttachmentStatus",(function(){return i.PriorAuthOutgoingAttachmentStatus})),n.d(t,"PriorAuthQuestionType",(function(){return i.PriorAuthQuestionType})),n.d(t,"PriorAuthStatus",(function(){return i.PriorAuthStatus})),n.d(t,"Priority",(function(){return i.Priority})),n.d(t,"Privilege",(function(){return i.Privilege})),n.d(t,"PrivilegeType",(function(){return i.PrivilegeType})),n.d(t,"ProblemGoalStatus",(function(){return i.ProblemGoalStatus})),n.d(t,"ProblemListStatus",(function(){return i.ProblemListStatus})),n.d(t,"ProblemListType",(function(){return i.ProblemListType})),n.d(t,"ProcedureDeletableStatus",(function(){return i.ProcedureDeletableStatus})),n.d(t,"ProcedureMetadataValidator",(function(){return i.ProcedureMetadataValidator})),n.d(t,"ProcedureResumableStatus",(function(){return i.ProcedureResumableStatus})),n.d(t,"ProcessType",(function(){return i.ProcessType})),n.d(t,"ProductionType",(function(){return i.ProductionType})),n.d(t,"ProfessionalDesignation",(function(){return i.ProfessionalDesignation})),n.d(t,"ProviderGroup",(function(){return i.ProviderGroup})),n.d(t,"ProviderIdentificationStrategy",(function(){return i.ProviderIdentificationStrategy})),n.d(t,"ProviderLevelAdjustmentAction",(function(){return i.ProviderLevelAdjustmentAction})),n.d(t,"ProviderType",(function(){return i.ProviderType})),n.d(t,"PublicityCode",(function(){return i.PublicityCode})),n.d(t,"PupilAPD",(function(){return i.PupilAPD})),n.d(t,"PupilRAPD",(function(){return i.PupilRAPD})),n.d(t,"PupilReacts",(function(){return i.PupilReacts})),n.d(t,"PupilRegular",(function(){return i.PupilRegular})),n.d(t,"PupilRound",(function(){return i.PupilRound})),n.d(t,"PupilSize",(function(){return i.PupilSize})),n.d(t,"QuantityUnitOfMeasure",(function(){return i.QuantityUnitOfMeasure})),n.d(t,"QuestionSetType",(function(){return i.QuestionSetType})),n.d(t,"QuickFilterGroup",(function(){return i.QuickFilterGroup})),n.d(t,"QuickpayAddressRenderingMode",(function(){return i.QuickpayAddressRenderingMode})),n.d(t,"RCMRoleType",(function(){return i.RCMRoleType})),n.d(t,"RCMVendor",(function(){return i.RCMVendor})),n.d(t,"Race",(function(){return i.Race})),n.d(t,"RcmCategoryName",(function(){return i.RcmCategoryName})),n.d(t,"RcmPaymentBatchType",(function(){return i.RcmPaymentBatchType})),n.d(t,"RcmServiceTypeEnabled",(function(){return i.RcmServiceTypeEnabled})),n.d(t,"RealTimePriorAuthStatus",(function(){return i.RealTimePriorAuthStatus})),n.d(t,"RealtimeJobStatus",(function(){return i.RealtimeJobStatus})),n.d(t,"RecallActivityType",(function(){return i.RecallActivityType})),n.d(t,"RecallStatus",(function(){return i.RecallStatus})),n.d(t,"RecallTypeFrequency",(function(){return i.RecallTypeFrequency})),n.d(t,"ReconReportGroupingType",(function(){return i.ReconReportGroupingType})),n.d(t,"RedoxMessageType",(function(){return i.RedoxMessageType})),n.d(t,"ReferralContactType",(function(){return i.ReferralContactType})),n.d(t,"ReferralInstitutionSourceType",(function(){return i.ReferralInstitutionSourceType})),n.d(t,"ReferralStatus",(function(){return i.ReferralStatus})),n.d(t,"RefillApprovalFailureReason",(function(){return i.RefillApprovalFailureReason})),n.d(t,"RefillQualifier",(function(){return i.RefillQualifier})),n.d(t,"RefillResponseType",(function(){return i.RefillResponseType})),n.d(t,"RefractionBase",(function(){return i.RefractionBase})),n.d(t,"RefractionSetType",(function(){return i.RefractionSetType})),n.d(t,"RefractionType",(function(){return i.RefractionType})),n.d(t,"RefreshTokenStatus",(function(){return i.RefreshTokenStatus})),n.d(t,"RefundMethod",(function(){return i.RefundMethod})),n.d(t,"RefundType",(function(){return i.RefundType})),n.d(t,"RegistryGroup",(function(){return i.RegistryGroup})),n.d(t,"RelativeDiagnosisStatus",(function(){return i.RelativeDiagnosisStatus})),n.d(t,"ReliabilityOfTest",(function(){return i.ReliabilityOfTest})),n.d(t,"ReminderType",(function(){return i.ReminderType})),n.d(t,"RepeatUnit",(function(){return i.RepeatUnit})),n.d(t,"RequestSiteStatus",(function(){return i.RequestSiteStatus})),n.d(t,"RequestSiteUnit",(function(){return i.RequestSiteUnit})),n.d(t,"RequestType",(function(){return i.RequestType})),n.d(t,"RescheduleReason",(function(){return i.RescheduleReason})),n.d(t,"ResultAction",(function(){return i.ResultAction})),n.d(t,"ResultAttachmentType",(function(){return i.ResultAttachmentType})),n.d(t,"ResultFlag",(function(){return i.ResultFlag})),n.d(t,"ResultLogFeatureMode",(function(){return i.ResultLogFeatureMode})),n.d(t,"ResultLogStatus",(function(){return i.ResultLogStatus})),n.d(t,"ResultSourceType",(function(){return i.ResultSourceType})),n.d(t,"ResultType",(function(){return i.ResultType})),n.d(t,"ResultWorkflowStatus",(function(){return i.ResultWorkflowStatus})),n.d(t,"ReviewOfSystemsSystemDescription",(function(){return i.ReviewOfSystemsSystemDescription})),n.d(t,"RgpContactLensType",(function(){return i.RgpContactLensType})),n.d(t,"RightLeft",(function(){return i.RightLeft})),n.d(t,"Role",(function(){return i.Role})),n.d(t,"RoomType",(function(){return i.RoomType})),n.d(t,"RosQuicklistSharedWith",(function(){return i.RosQuicklistSharedWith})),n.d(t,"Route",(function(){return i.Route})),n.d(t,"RxChangeType",(function(){return i.RxChangeType})),n.d(t,"RxErxChangeRequestStatus",(function(){return i.RxErxChangeRequestStatus})),n.d(t,"RxErxChangeResponseType",(function(){return i.RxErxChangeResponseType})),n.d(t,"RxErxRefillRequestStatus",(function(){return i.RxErxRefillRequestStatus})),n.d(t,"RxErxStatus",(function(){return i.RxErxStatus})),n.d(t,"RxHistoryCheckStatus",(function(){return i.RxHistoryCheckStatus})),n.d(t,"RxHistoryConsentType",(function(){return i.RxHistoryConsentType})),n.d(t,"RxHistoryDxType",(function(){return i.RxHistoryDxType})),n.d(t,"RxHistorySourceType",(function(){return i.RxHistorySourceType})),n.d(t,"RxPharmacyType",(function(){return i.RxPharmacyType})),n.d(t,"RxStatus",(function(){return i.RxStatus})),n.d(t,"ScrubRuleCategory",(function(){return i.ScrubRuleCategory})),n.d(t,"ScrubRuleDiagnosisOrder",(function(){return i.ScrubRuleDiagnosisOrder})),n.d(t,"ScrubRuleMatchingType",(function(){return i.ScrubRuleMatchingType})),n.d(t,"ScrubRuleModifierMatchingType",(function(){return i.ScrubRuleModifierMatchingType})),n.d(t,"SecondaryMedicarePolicyType",(function(){return i.SecondaryMedicarePolicyType})),n.d(t,"SectionAction",(function(){return i.SectionAction})),n.d(t,"SectionStatus",(function(){return i.SectionStatus})),n.d(t,"SectionType",(function(){return i.SectionType})),n.d(t,"SecureUploadStatus",(function(){return i.SecureUploadStatus})),n.d(t,"SecureUploadType",(function(){return i.SecureUploadType})),n.d(t,"SendRxStatus",(function(){return i.SendRxStatus})),n.d(t,"SendStatus",(function(){return i.SendStatus})),n.d(t,"Service",(function(){return i.Service})),n.d(t,"SexualOrientation",(function(){return i.SexualOrientation})),n.d(t,"SignatureStatus",(function(){return i.SignatureStatus})),n.d(t,"SignatureType",(function(){return i.SignatureType})),n.d(t,"SmokingStatus",(function(){return i.SmokingStatus})),n.d(t,"SnomedBodyPart",(function(){return i.SnomedBodyPart})),n.d(t,"SolutionType",(function(){return i.SolutionType})),n.d(t,"SortOrder",(function(){return i.SortOrder})),n.d(t,"SpecialtyRegistryEvent",(function(){return i.SpecialtyRegistryEvent})),n.d(t,"SpecificAssigneeType",(function(){return i.SpecificAssigneeType})),n.d(t,"SpecimenCollectionType",(function(){return i.SpecimenCollectionType})),n.d(t,"SpecimenColor",(function(){return i.SpecimenColor})),n.d(t,"SpecimenInked",(function(){return i.SpecimenInked})),n.d(t,"SpecimenInkedPositionType",(function(){return i.SpecimenInkedPositionType})),n.d(t,"SpecimenLabeling",(function(){return i.SpecimenLabeling})),n.d(t,"SpecimenPreservation",(function(){return i.SpecimenPreservation})),n.d(t,"SpecimenShape",(function(){return i.SpecimenShape})),n.d(t,"SpecimenType",(function(){return i.SpecimenType})),n.d(t,"StaffOrGroupLinkType",(function(){return i.StaffOrGroupLinkType})),n.d(t,"StateReportConfigFieldType",(function(){return i.StateReportConfigFieldType})),n.d(t,"StateReportErrorType",(function(){return i.StateReportErrorType})),n.d(t,"StateReportFacilityConfigFieldType",(function(){return i.StateReportFacilityConfigFieldType})),n.d(t,"StateReportPayerConfigFieldType",(function(){return i.StateReportPayerConfigFieldType})),n.d(t,"StateReportStatus",(function(){return i.StateReportStatus})),n.d(t,"StateReportType",(function(){return i.StateReportType})),n.d(t,"StatusButtonStatus",(function(){return i.StatusButtonStatus})),n.d(t,"SubContactMethodType",(function(){return i.SubContactMethodType})),n.d(t,"SubmissionMethod",(function(){return i.SubmissionMethod})),n.d(t,"SupportLevel",(function(){return i.SupportLevel})),n.d(t,"SupportedBillingType",(function(){return i.SupportedBillingType})),n.d(t,"SurescriptsCancelDenialReasonCode",(function(){return i.SurescriptsCancelDenialReasonCode})),n.d(t,"SurescriptsMessageType",(function(){return i.SurescriptsMessageType})),n.d(t,"SurescriptsPrescriberStatus",(function(){return i.SurescriptsPrescriberStatus})),n.d(t,"SystemMessageLogLevel",(function(){return i.SystemMessageLogLevel})),n.d(t,"SystemNotificationType",(function(){return i.SystemNotificationType})),n.d(t,"SystemRole",(function(){return i.SystemRole})),n.d(t,"TaskEventsEnum",(function(){return i.TaskEventsEnum})),n.d(t,"TaskLinkType",(function(){return i.TaskLinkType})),n.d(t,"TaskScheduleProcessType",(function(){return i.TaskScheduleProcessType})),n.d(t,"TaskScheduleStatus",(function(){return i.TaskScheduleStatus})),n.d(t,"TaskStatesEnum",(function(){return i.TaskStatesEnum})),n.d(t,"TaskType",(function(){return i.TaskType})),n.d(t,"TaskTypeEnum",(function(){return i.TaskTypeEnum})),n.d(t,"TaxOverrideState",(function(){return i.TaxOverrideState})),n.d(t,"TaxpayerIdType",(function(){return i.TaxpayerIdType})),n.d(t,"TdapVaccinationsOptions",(function(){return i.TdapVaccinationsOptions})),n.d(t,"TemplateDefaultType",(function(){return i.TemplateDefaultType})),n.d(t,"TemplateType",(function(){return i.TemplateType})),n.d(t,"TestCodeType",(function(){return i.TestCodeType})),n.d(t,"Tier",(function(){return i.Tier})),n.d(t,"TimeBufferUnit",(function(){return i.TimeBufferUnit})),n.d(t,"TimeUnit",(function(){return i.TimeUnit})),n.d(t,"TimelineSubType",(function(){return i.TimelineSubType})),n.d(t,"TimelineType",(function(){return i.TimelineType})),n.d(t,"ToricsRotation",(function(){return i.ToricsRotation})),n.d(t,"TransactionErrorCode",(function(){return i.TransactionErrorCode})),n.d(t,"TransactionMethod",(function(){return i.TransactionMethod})),n.d(t,"TransactionType",(function(){return i.TransactionType})),n.d(t,"TranscriptionFileStatus",(function(){return i.TranscriptionFileStatus})),n.d(t,"TranscriptionStatus",(function(){return i.TranscriptionStatus})),n.d(t,"TransducerType",(function(){return i.TransducerType})),n.d(t,"TransmissionStatus",(function(){return i.TransmissionStatus})),n.d(t,"TransportMedium",(function(){return i.TransportMedium})),n.d(t,"TreatmentCaseContactType",(function(){return i.TreatmentCaseContactType})),n.d(t,"TreatmentCaseType",(function(){return i.TreatmentCaseType})),n.d(t,"UnallocatedFundsType",(function(){return i.UnallocatedFundsType})),n.d(t,"UnitsOfLength",(function(){return i.UnitsOfLength})),n.d(t,"UnitsOfMass",(function(){return i.UnitsOfMass})),n.d(t,"UnitsOfTemperature",(function(){return i.UnitsOfTemperature})),n.d(t,"UserDataRestrictionAccessType",(function(){return i.UserDataRestrictionAccessType})),n.d(t,"UserDataRestrictionReferenceLinkType",(function(){return i.UserDataRestrictionReferenceLinkType})),n.d(t,"UserDataRestrictionViewerLinkType",(function(){return i.UserDataRestrictionViewerLinkType})),n.d(t,"VeDiagnosisProblemAddressed",(function(){return i.VeDiagnosisProblemAddressed})),n.d(t,"VeVisitAllergenDetailKey",(function(){return i.VeVisitAllergenDetailKey})),n.d(t,"VeVisitAllergenTestingMethod",(function(){return i.VeVisitAllergenTestingMethod})),n.d(t,"VeVisitFollowUpReasonDescription",(function(){return i.VeVisitFollowUpReasonDescription})),n.d(t,"VeVisitType",(function(){return i.VeVisitType})),n.d(t,"VendorType",(function(){return i.VendorType})),n.d(t,"VisitOverviewAlertCategory",(function(){return i.VisitOverviewAlertCategory})),n.d(t,"VisitSettingsBillAs",(function(){return i.VisitSettingsBillAs})),n.d(t,"VisitVirtualExamImpressionMode",(function(){return i.VisitVirtualExamImpressionMode})),n.d(t,"VisualAcuityAmslerGridDefect",(function(){return i.VisualAcuityAmslerGridDefect})),n.d(t,"VisualAcuityCorrectorsType",(function(){return i.VisualAcuityCorrectorsType})),n.d(t,"VisualAcuityDistanceType",(function(){return i.VisualAcuityDistanceType})),n.d(t,"VisualAcuityEyeEvaluated",(function(){return i.VisualAcuityEyeEvaluated})),n.d(t,"VisualAcuityEyeEvaluatedLeftRight",(function(){return i.VisualAcuityEyeEvaluatedLeftRight})),n.d(t,"VisualAcuityGlassesType",(function(){return i.VisualAcuityGlassesType})),n.d(t,"VisualAcuityIOPReliability",(function(){return i.VisualAcuityIOPReliability})),n.d(t,"VisualAcuityIOPType",(function(){return i.VisualAcuityIOPType})),n.d(t,"VisualAcuityNearTestType",(function(){return i.VisualAcuityNearTestType})),n.d(t,"VisualAcuityNearValue",(function(){return i.VisualAcuityNearValue})),n.d(t,"VisualAcuityRefractionType",(function(){return i.VisualAcuityRefractionType})),n.d(t,"VisualAcuityScale",(function(){return i.VisualAcuityScale})),n.d(t,"VisualAcuityTestType",(function(){return i.VisualAcuityTestType})),n.d(t,"VisualAcuityTropia",(function(){return i.VisualAcuityTropia})),n.d(t,"VisualAcuityValue",(function(){return i.VisualAcuityValue})),n.d(t,"VisualAlignmentTestCorrectionType",(function(){return i.VisualAlignmentTestCorrectionType})),n.d(t,"VisualAlignmentTestMethod",(function(){return i.VisualAlignmentTestMethod})),n.d(t,"VisualCoverTestType",(function(){return i.VisualCoverTestType})),n.d(t,"VisualFieldResult",(function(){return i.VisualFieldResult})),n.d(t,"VisualFieldTestType",(function(){return i.VisualFieldTestType})),n.d(t,"VitalsMeasurementPosition",(function(){return i.VitalsMeasurementPosition})),n.d(t,"VolumeUnit",(function(){return i.VolumeUnit})),n.d(t,"WorkflowStatus",(function(){return i.WorkflowStatus})),n.d(t,"WorkflowSubStatus",(function(){return i.WorkflowSubStatus})),n.d(t,"WorthFourDotTestOutcome",(function(){return i.WorthFourDotTestOutcome})),n.d(t,"YesNo",(function(){return i.YesNo})),n.d(t,"ActivePaymentPlanType",(function(){return i.ActivePaymentPlanType})),n.d(t,"AllergyDilutionConcentration",(function(){return i.AllergyDilutionConcentration})),n.d(t,"AngularSpaFeatures",(function(){return i.AngularSpaFeatures})),n.d(t,"AttachFileType",(function(){return i.AttachFileType})),n.d(t,"AutoPayCancellationAvailability",(function(){return i.AutoPayCancellationAvailability})),n.d(t,"BatchJobFeatures",(function(){return i.BatchJobFeatures})),n.d(t,"BridgeFeatures",(function(){return i.BridgeFeatures})),n.d(t,"BulkActionPostingOption",(function(){return i.BulkActionPostingOption})),n.d(t,"BusinessHistoryType",(function(){return i.BusinessHistoryType})),n.d(t,"CCDType",(function(){return i.CCDType})),n.d(t,"CardType",(function(){return i.CardType})),n.d(t,"ChartNoteDateFilter",(function(){return i.ChartNoteDateFilter})),n.d(t,"ChartNoteFilterStatus",(function(){return i.ChartNoteFilterStatus})),n.d(t,"ClinicalFeatures",(function(){return i.ClinicalFeatures})),n.d(t,"ClipboardAnswerMetadataType",(function(){return i.ClipboardAnswerMetadataType})),n.d(t,"ClipboardAnswerRule",(function(){return i.ClipboardAnswerRule})),n.d(t,"ClipboardPortalVersion",(function(){return i.ClipboardPortalVersion})),n.d(t,"CommissionsCriteriaSearchLookupBeanType",(function(){return i.CommissionsCriteriaSearchLookupBeanType})),n.d(t,"CommissionsCriteriaSearchType",(function(){return i.CommissionsCriteriaSearchType})),n.d(t,"ConversationMessageType",(function(){return i.ConversationMessageType})),n.d(t,"DataCorruptionType",(function(){return i.DataCorruptionType})),n.d(t,"DateFilter",(function(){return i.DateFilter})),n.d(t,"DatePreference",(function(){return i.DatePreference})),n.d(t,"DateTypeFilter",(function(){return i.DateTypeFilter})),n.d(t,"DermPathCptCodes",(function(){return i.DermPathCptCodes})),n.d(t,"DftValidatorMessage",(function(){return i.DftValidatorMessage})),n.d(t,"EligibilityReportFilter",(function(){return i.EligibilityReportFilter})),n.d(t,"EmaEnvironment",(function(){return i.EmaEnvironment})),n.d(t,"EncounterType",(function(){return i.EncounterType})),n.d(t,"ErrorType",(function(){return i.ErrorType})),n.d(t,"ExamFindingCategory",(function(){return i.ExamFindingCategory})),n.d(t,"ExamFindingType",(function(){return i.ExamFindingType})),n.d(t,"FacilitySearchPreference",(function(){return i.FacilitySearchPreference})),n.d(t,"FeatureGroupKey",(function(){return i.FeatureGroupKey})),n.d(t,"FinancialsDateModifierType",(function(){return i.FinancialsDateModifierType})),n.d(t,"FinancialsFilterQueryBeanDateFilter",(function(){return i.FinancialsFilterQueryBeanDateFilter})),n.d(t,"FinancialsTab",(function(){return i.FinancialsTab})),n.d(t,"FirmGroup",(function(){return i.FirmGroup})),n.d(t,"FrequencyIntervalType",(function(){return i.FrequencyIntervalType})),n.d(t,"GeneralFeatures",(function(){return i.GeneralFeatures})),n.d(t,"GeriatricPrecautionLevel",(function(){return i.GeriatricPrecautionLevel})),n.d(t,"GlobalPaymentMethod",(function(){return i.GlobalPaymentMethod})),n.d(t,"GuidedWorkflowsFeatures",(function(){return i.GuidedWorkflowsFeatures})),n.d(t,"IndependentHistorianProvider",(function(){return i.IndependentHistorianProvider})),n.d(t,"IndependentHistorianWhy",(function(){return i.IndependentHistorianWhy})),n.d(t,"InsurancePolicyAction",(function(){return i.InsurancePolicyAction})),n.d(t,"InsurancePolicyStatus",(function(){return i.InsurancePolicyStatus})),n.d(t,"InsurancePolicyTypeClassification",(function(){return i.InsurancePolicyTypeClassification})),n.d(t,"IntravitrealInjectionApiType",(function(){return i.IntravitrealInjectionApiType})),n.d(t,"IntravitrealInjectionErrorType",(function(){return i.IntravitrealInjectionErrorType})),n.d(t,"InvPositiveNegative",(function(){return i.InvPositiveNegative})),n.d(t,"LabelWarningVersion",(function(){return i.LabelWarningVersion})),n.d(t,"LactationPrecautionLevel",(function(){return i.LactationPrecautionLevel})),n.d(t,"Level",(function(){return i.Level})),n.d(t,"MapId",(function(){return i.MapId})),n.d(t,"MavCodeType",(function(){return i.MavCodeType})),n.d(t,"MavRuleType",(function(){return i.MavRuleType})),n.d(t,"MinMaxDosingFilter",(function(){return i.MinMaxDosingFilter})),n.d(t,"NpiType",(function(){return i.NpiType})),n.d(t,"OnlineCheckInSettingsKey",(function(){return i.OnlineCheckInSettingsKey})),n.d(t,"OperativeFeatures",(function(){return i.OperativeFeatures})),n.d(t,"PQRSTransmissionStatus",(function(){return i.PQRSTransmissionStatus})),n.d(t,"PacsVendor",(function(){return i.PacsVendor})),n.d(t,"PathologyFeatures",(function(){return i.PathologyFeatures})),n.d(t,"PatientCreatedVisitStatus",(function(){return i.PatientCreatedVisitStatus})),n.d(t,"PatientOverviewAngularFeatures",(function(){return i.PatientOverviewAngularFeatures})),n.d(t,"PatientStatementVendor",(function(){return i.PatientStatementVendor})),n.d(t,"PayErrorType",(function(){return i.PayErrorType})),n.d(t,"PayState",(function(){return i.PayState}));n.d(t,"PayfacFrequencyType",(function(){return i.PayfacFrequencyType})),n.d(t,"PayfacMetadata",(function(){return i.PayfacMetadata})),n.d(t,"PayfacMode",(function(){return i.PayfacMode})),n.d(t,"PayfacPaymentRequestStatus",(function(){return i.PayfacPaymentRequestStatus})),n.d(t,"PaymentDetailsSource",(function(){return i.PaymentDetailsSource})),n.d(t,"PaymentReportType",(function(){return i.PaymentReportType})),n.d(t,"PediatricPrecautionLevel",(function(){return i.PediatricPrecautionLevel})),n.d(t,"PerformanceFeatures",(function(){return i.PerformanceFeatures})),n.d(t,"PqrsTaxIdVerification",(function(){return i.PqrsTaxIdVerification})),n.d(t,"PracticeManagementFeatures",(function(){return i.PracticeManagementFeatures})),n.d(t,"PracticeManagementTemporaryFeatures",(function(){return i.PracticeManagementTemporaryFeatures})),n.d(t,"PregnancyPrecautionLevel",(function(){return i.PregnancyPrecautionLevel})),n.d(t,"PretestingExamAngularFeatures",(function(){return i.PretestingExamAngularFeatures})),n.d(t,"PriceSource",(function(){return i.PriceSource})),n.d(t,"PrincipalPayerCode",(function(){return i.PrincipalPayerCode})),n.d(t,"ProcedureMetadataNestedOptionType",(function(){return i.ProcedureMetadataNestedOptionType})),n.d(t,"ProductChargeType",(function(){return i.ProductChargeType})),n.d(t,"ProviderAlert",(function(){return i.ProviderAlert})),n.d(t,"QuickpayIdentificationType",(function(){return i.QuickpayIdentificationType})),n.d(t,"RecalculateBalanceStatus",(function(){return i.RecalculateBalanceStatus})),n.d(t,"RecalculateBalanceType",(function(){return i.RecalculateBalanceType})),n.d(t,"RecallsDateFilter",(function(){return i.RecallsDateFilter})),n.d(t,"ReportBy",(function(){return i.ReportBy})),n.d(t,"ReportDateType",(function(){return i.ReportDateType})),n.d(t,"ReportPaymentFrom",(function(){return i.ReportPaymentFrom})),n.d(t,"ReportPaymentType",(function(){return i.ReportPaymentType})),n.d(t,"RescheduleResponse",(function(){return i.RescheduleResponse})),n.d(t,"ResponseStatus",(function(){return i.ResponseStatus})),n.d(t,"ResultSectionType",(function(){return i.ResultSectionType})),n.d(t,"RibbonButtonFeatures",(function(){return i.RibbonButtonFeatures})),n.d(t,"SchedulingFeatures",(function(){return i.SchedulingFeatures})),n.d(t,"SectionLockType",(function(){return i.SectionLockType})),n.d(t,"SexualPartners",(function(){return i.SexualPartners})),n.d(t,"SideEffectsFrequencyFilter",(function(){return i.SideEffectsFrequencyFilter})),n.d(t,"SideEffectsSeverityFilter",(function(){return i.SideEffectsSeverityFilter})),n.d(t,"StateReportGenerationQuarter",(function(){return i.StateReportGenerationQuarter})),n.d(t,"StructuredSigInstructionMode",(function(){return i.StructuredSigInstructionMode})),n.d(t,"SupportedScanType",(function(){return i.SupportedScanType})),n.d(t,"TaskPriority",(function(){return i.TaskPriority})),n.d(t,"TestSource",(function(){return i.TestSource})),n.d(t,"TimeOfDay",(function(){return i.TimeOfDay})),n.d(t,"TimelineOptions",(function(){return i.TimelineOptions})),n.d(t,"UnifiedResultLogFlag",(function(){return i.UnifiedResultLogFlag})),n.d(t,"UnifiedResultLogProgressStatus",(function(){return i.UnifiedResultLogProgressStatus})),n.d(t,"UnifiedResultLogResultType",(function(){return i.UnifiedResultLogResultType})),n.d(t,"UnifiedResultLogStatus",(function(){return i.UnifiedResultLogStatus})),n.d(t,"UnifiedResultSourceType",(function(){return i.UnifiedResultSourceType})),n.d(t,"UrbanAirshipEnvironment",(function(){return i.UrbanAirshipEnvironment})),n.d(t,"VirtualExamRoomFeatures",(function(){return i.VirtualExamRoomFeatures})),n.d(t,"VisitOutputType",(function(){return i.VisitOutputType})),n.d(t,"VisitOverviewAngularFeatures",(function(){return i.VisitOverviewAngularFeatures})),n.d(t,"VisualDxLicenseType",(function(){return i.VisualDxLicenseType})),n.d(t,"WalkMeMode",(function(){return i.WalkMeMode})),n.d(t,"Weekday",(function(){return i.Weekday})),n.d(t,"BenefitCoverageType",(function(){return i.BenefitCoverageType})),n.d(t,"ClipboardPatientRestrictionType",(function(){return i.ClipboardPatientRestrictionType})),n.d(t,"ClipboardQuestionType",(function(){return i.ClipboardQuestionType})),n.d(t,"ClipboardQuestionValueType",(function(){return i.ClipboardQuestionValueType})),n.d(t,"ClipboardVisibilityScope",(function(){return i.ClipboardVisibilityScope})),n.d(t,"ClipboardVisibilityType",(function(){return i.ClipboardVisibilityType})),n.d(t,"MedicalCodeType",(function(){return i.MedicalCodeType})),n.d(t,"ObQuestionnaireQuestion",(function(){return i.ObQuestionnaireQuestion})),n.d(t,"ObQuestionnaireQuestionType",(function(){return i.ObQuestionnaireQuestionType})),n.d(t,"PatientSelectionMetadataGroup",(function(){return i.PatientSelectionMetadataGroup})),n.d(t,"QuickViewSections",(function(){return i.QuickViewSections})),n.d(t,"ResponseCode",(function(){return i.ResponseCode})),n.d(t,"ResponseValidationFollowUpActionCode",(function(){return i.ResponseValidationFollowUpActionCode})),n.d(t,"ResponseValidationRejectionReasonCode",(function(){return i.ResponseValidationRejectionReasonCode})),n.d(t,"AppointmentReminderField",(function(){return i.AppointmentReminderField})),n.d(t,"ConversionImportMode",(function(){return i.ConversionImportMode})),n.d(t,"FillStatus",(function(){return i.FillStatus})),n.d(t,"FirmUserPermissionType",(function(){return i.FirmUserPermissionType})),n.d(t,"PatientSearchMode",(function(){return i.PatientSearchMode})),n.d(t,"PayerLookupSource",(function(){return i.PayerLookupSource}))},function(e,t,n){"use strict";var i,a;i=[n(0)],void 0===(a=function(e){return function(e){return e.mixin({isFalse:function(e){return!1===e},isDefined:function(t){return!e.isUndefined(t)},getter:function(t,n){return e.partial(e.get,t,n)},setter:function(t,n){return e.partial(e.set,t,n)},firstIfOnly:function(t){return 1===e.size(t)?e.head(t):void 0},includedIn:function(t,n){var i=e.iteratee(n);return function(n){return e.includes(t,i(n))}},flatMapPath:e.rest((function(t,n,i){return e(t).map((function(t){var a=e.pick(t,e.flattenDepth(i,1));return e.map(e.get(t,n),(function(t){return e.assign({},a,t)}))})).flatten().value()})),flattenValues:function(t,n){return(n=e.isUndefined(n)?1:n)?e.flattenValues(e.flatMap(t,e.values),n-1):t},bindArgs:function(t){return e.partial(Function.prototype.apply.bind(t),e,Array.prototype.slice.call(arguments,1))},addOrUpdate:function(t,n,i){if(t&&n&&i){var a=e.find(t,i);a?e.assign(a,n):t.push(n)}},addOrReplace:function(t,n,i){if(t&&n&&i){var a=e.findIndex(t,i);a<0?t.push(n):t.splice(a,1,n)}},copyArray:function(e,t){return t.length=0,Array.prototype.push.apply(t,e),t},pickNestedProperties:function(t,n){if(e.isEmpty(t))return t;var i,a,r,o=function t(n){return e.isArray(n)?e.flatten(e.map(n,t)):e.isObject(n)?e.keys(n):e.isString(n)?n:[]},s=function(t){return e.pick(t,o(n))},c=(i=t,e.isArray(i)?e.map(i,s):s(i)),l=function(t,n,i){i[n]=e.pickNestedProperties(i[n],t)};return e.each((a=n,e.isArray(a)&&(r=e.filter(a,e.isObject),a=e.reduce(r,e.merge,{})),function(t){return e.pickBy(t,e.identity)}(a)),(function(t,n){e.isArray(c)?e.each(c,e.partial(l,t,n)):l(t,n,c)})),c},clearKeys:function(t){var n={};return e.forOwn(t,(function(e,i){delete t[i],n[i]=e})),n},toggle:function(e,t){return function(){e[t]=!e[t]}},toggleValue:function(e,t,n,i){n===e[t]?void 0!==i?e[t]=i:delete e[t]:e[t]=n},createProperty:function(){var e=void 0,t=function(t){e=t},n=function(){return e},i=function(e){return arguments.length?t(e):n()};return{wrapSetter:function(e){var n=t;return t=function(t){return e(n,t)},this},wrapGetter:function(e){var t=n;return n=function(){return e(t)},this},afterSet:function(e){return this.wrapSetter((function(t,n){t(n),e(n)}))},afterGet:function(e){return this.wrapGetter((function(t){return e(t())}))},value:function(e){return arguments.length&&i(e),i}}},smallest:function(t){return e(t).reject(e.isNil).sort().first()},collectingDebounce:function(t){var n=[],i=e.spread(e.debounce)([function(){return t(n.splice(0,n.length))}].concat(e.slice(arguments,1)));return function(){return n.push(e.slice(arguments)),i()}},assert:function(e,t){if(e)return e;throw new Error(t)},defaultObject:e.rest((function(t,n,i){var a=e.isObject(n)?n:e.zipObject([t],[n]);return e.defaults.apply(e,[a].concat(i))}))}),e}(e.runInContext())}.apply(t,i))||(e.exports=a)},function(e,t,n){"use strict";n.r(t);var i=n(66);n.d(t,"startsWith",(function(){return i.k})),n.d(t,"endsWith",(function(){return i.h})),n.d(t,"transformStartOfDay",(function(){return i.o})),n.d(t,"transformEndOfDay",(function(){return i.m})),n.d(t,"transformStartOfDayWithTzOffset",(function(){return i.p})),n.d(t,"transformEndOfDayWithTzOffset",(function(){return i.n})),n.d(t,"subtractTzOffset",(function(){return i.l})),n.d(t,"contains",(function(){return i.g})),n.d(t,"sanitizeParameter",(function(){return i.j})),n.d(t,"onlyNumbers",(function(){return i.i})),n.d(t,"RsqlProperty",(function(){return i.b})),n.d(t,"RsqlPropertyCriteria",(function(){return i.c})),n.d(t,"RsqlBuilder",(function(){return i.a})),n.d(t,"RsqlSpecificationBuilder",(function(){return i.e})),n.d(t,"SimpleSpecificationBuilder",(function(){return i.f})),n.d(t,"RsqlQueryFactory",(function(){return i.d}))},function(e,t,n){"use strict";n.r(t),n.d(t,"AbnormalFlag",(function(){return v.AbnormalFlag})),n.d(t,"AccessionSequenceLocationDesignator",(function(){return v.AccessionSequenceLocationDesignator})),n.d(t,"AccessionSequenceStatus",(function(){return v.AccessionSequenceStatus})),n.d(t,"AccessionSequenceType",(function(){return v.AccessionSequenceType})),n.d(t,"ActiveOrInactive",(function(){return v.ActiveOrInactive})),n.d(t,"ActiveStatus",(function(){return v.ActiveStatus})),n.d(t,"AdditionalFreeTextIndicator",(function(){return v.AdditionalFreeTextIndicator})),n.d(t,"AdditionalProviderType",(function(){return v.AdditionalProviderType})),n.d(t,"AddressTypeDescription",(function(){return v.AddressTypeDescription})),n.d(t,"AdjustmentCodeType",(function(){return v.AdjustmentCodeType})),n.d(t,"AdjustmentGroupPrefix",(function(){return v.AdjustmentGroupPrefix})),n.d(t,"AdjustmentReason",(function(){return v.AdjustmentReason})),n.d(t,"AdminLabType",(function(){return v.AdminLabType})),n.d(t,"AgingBalanceRange",(function(){return v.AgingBalanceRange})),n.d(t,"AlertBannerType",(function(){return v.AlertBannerType})),n.d(t,"AlertComparator",(function(){return v.AlertComparator})),n.d(t,"AlertSubtype",(function(){return v.AlertSubtype})),n.d(t,"AlertType",(function(){return v.AlertType})),n.d(t,"AllergyReasonForDeletion",(function(){return v.AllergyReasonForDeletion})),n.d(t,"AllergyResponseTypeDescription",(function(){return v.AllergyResponseTypeDescription})),n.d(t,"AllergySeverity",(function(){return v.AllergySeverity})),n.d(t,"AnatomicOrientation",(function(){return v.AnatomicOrientation})),n.d(t,"AnesthesiaBillingOption",(function(){return v.AnesthesiaBillingOption})),n.d(t,"AppointmentCancellationReason",(function(){return v.AppointmentCancellationReason})),n.d(t,"AppointmentReminderBidirectionalType",(function(){return v.AppointmentReminderBidirectionalType})),n.d(t,"AppointmentReminderConfirmationStatus",(function(){return v.AppointmentReminderConfirmationStatus})),n.d(t,"AppointmentReminderContactType",(function(){return v.AppointmentReminderContactType})),n.d(t,"AppointmentReminderFrequency",(function(){return v.AppointmentReminderFrequency})),n.d(t,"AppointmentReminderResponseType",(function(){return v.AppointmentReminderResponseType})),n.d(t,"AppointmentReportableReason",(function(){return v.AppointmentReportableReason})),n.d(t,"AppointmentStatus",(function(){return v.AppointmentStatus})),n.d(t,"AppointmentSubStatus",(function(){return v.AppointmentSubStatus})),n.d(t,"ApprovedStatus",(function(){return v.ApprovedStatus})),n.d(t,"ApptReminderVendor",(function(){return v.ApptReminderVendor})),n.d(t,"AssignableTaskAction",(function(){return v.AssignableTaskAction})),n.d(t,"AsyncJobStatus",(function(){return v.AsyncJobStatus})),n.d(t,"AsyncJobType",(function(){return v.AsyncJobType})),n.d(t,"AtLeastThreeHpvVaccinationsOptions",(function(){return v.AtLeastThreeHpvVaccinationsOptions})),n.d(t,"AuditReportFileType",(function(){return v.AuditReportFileType})),n.d(t,"AuditReportParameterType",(function(){return v.AuditReportParameterType})),n.d(t,"AuditReportProcessingStatus",(function(){return v.AuditReportProcessingStatus})),n.d(t,"AuthenticationType",(function(){return v.AuthenticationType})),n.d(t,"AutoCloseFinancialStatus",(function(){return v.AutoCloseFinancialStatus})),n.d(t,"AutoCloseUserType",(function(){return v.AutoCloseUserType})),n.d(t,"AutoPayAuthCancelReason",(function(){return v.AutoPayAuthCancelReason})),n.d(t,"AutoPayAuthStatus",(function(){return v.AutoPayAuthStatus})),n.d(t,"AutoPayAuthType",(function(){return v.AutoPayAuthType})),n.d(t,"AutoPayBillStatus",(function(){return v.AutoPayBillStatus})),n.d(t,"AutoPayReason",(function(){return v.AutoPayReason})),n.d(t,"AutoPayStatementHandling",(function(){return v.AutoPayStatementHandling})),n.d(t,"AutoPayTransactionNotificationType",(function(){return v.AutoPayTransactionNotificationType})),n.d(t,"AutoPayTransactionStatus",(function(){return v.AutoPayTransactionStatus})),n.d(t,"AutoPaymentStatus",(function(){return v.AutoPaymentStatus})),n.d(t,"AutoPostBillSettingMatchingType",(function(){return v.AutoPostBillSettingMatchingType})),n.d(t,"AutoPostEraMatchingType",(function(){return v.AutoPostEraMatchingType})),n.d(t,"AutorefractionType",(function(){return v.AutorefractionType})),n.d(t,"BalanceType",(function(){return v.BalanceType})),n.d(t,"BaseClosingReportStatus",(function(){return v.BaseClosingReportStatus})),n.d(t,"BenefitCategory",(function(){return v.BenefitCategory})),n.d(t,"BenefitType",(function(){return v.BenefitType})),n.d(t,"BillAdditionalCodeType",(function(){return v.BillAdditionalCodeType})),n.d(t,"BillAssigneeGroupId",(function(){return v.BillAssigneeGroupId})),n.d(t,"BillAssigneeType",(function(){return v.BillAssigneeType})),n.d(t,"BillEditRuleActionOrderingProviderCriteriaType",(function(){return v.BillEditRuleActionOrderingProviderCriteriaType})),n.d(t,"BillEditRuleActionType",(function(){return v.BillEditRuleActionType})),n.d(t,"BillEditRuleActionUpdateBillPayerIdType",(function(){return v.BillEditRuleActionUpdateBillPayerIdType})),n.d(t,"BillEditRuleCriteriaCodeMatchingType",(function(){return v.BillEditRuleCriteriaCodeMatchingType})),n.d(t,"BillEditRuleCriteriaPayerMatchingType",(function(){return v.BillEditRuleCriteriaPayerMatchingType})),n.d(t,"BillEditRuleCriteriaType",(function(){return v.BillEditRuleCriteriaType})),n.d(t,"BillEditRuleModifierMatchingType",(function(){return v.BillEditRuleModifierMatchingType})),n.d(t,"BillEditRulePayerType",(function(){return v.BillEditRulePayerType})),n.d(t,"BillInsuranceAttachmentTransmissionCode",(function(){return v.BillInsuranceAttachmentTransmissionCode})),n.d(t,"BillItemAdjustmentStatus",(function(){return v.BillItemAdjustmentStatus})),n.d(t,"BillItemReversalState",(function(){return v.BillItemReversalState})),n.d(t,"BillItemStatus",(function(){return v.BillItemStatus})),n.d(t,"BillItemType",(function(){return v.BillItemType})),n.d(t,"BillPayerLinkState",(function(){return v.BillPayerLinkState})),n.d(t,"BillPayerStatus",(function(){return v.BillPayerStatus})),n.d(t,"BillStatus",(function(){return v.BillStatus})),n.d(t,"BillType",(function(){return v.BillType})),n.d(t,"BillTypeWithNonBillCharges",(function(){return v.BillTypeWithNonBillCharges})),n.d(t,"BillingPreference",(function(){return v.BillingPreference})),n.d(t,"BillingQuoteChargeType",(function(){return v.BillingQuoteChargeType})),n.d(t,"BillingQuoteResponsibleParty",(function(){return v.BillingQuoteResponsibleParty})),n.d(t,"BillingQuoteStatus",(function(){return v.BillingQuoteStatus})),n.d(t,"BillingResponsibleParty",(function(){return v.BillingResponsibleParty})),n.d(t,"BillingRule",(function(){return v.BillingRule})),n.d(t,"BillingType",(function(){return v.BillingType})),n.d(t,"BiopsyLogNotificationTemplateType",(function(){return v.BiopsyLogNotificationTemplateType})),n.d(t,"BiopsyLogResultFlag",(function(){return v.BiopsyLogResultFlag})),n.d(t,"BiopsyLogSignatureStatus",(function(){return v.BiopsyLogSignatureStatus})),n.d(t,"BlEntryHistoryType",(function(){return v.BlEntryHistoryType})),n.d(t,"BlEntryPriority",(function(){return v.BlEntryPriority})),n.d(t,"BodyLocationDetailLevel",(function(){return v.BodyLocationDetailLevel})),n.d(t,"BulkPrecollectionLetterStatus",(function(){return v.BulkPrecollectionLetterStatus})),n.d(t,"BullseyeSectorLayout",(function(){return v.BullseyeSectorLayout})),n.d(t,"BusinessNameType",(function(){return v.BusinessNameType})),n.d(t,"CPOEType",(function(){return v.CPOEType})),n.d(t,"CalculateBy",(function(){return v.CalculateBy})),n.d(t,"CalculationStatus",(function(){return v.CalculationStatus})),n.d(t,"CallButtonPriority",(function(){return v.CallButtonPriority})),n.d(t,"CallButtonStatus",(function(){return v.CallButtonStatus})),n.d(t,"CardStatus",(function(){return v.CardStatus})),n.d(t,"CarePlanSourceType",(function(){return v.CarePlanSourceType})),n.d(t,"CareQualityDocumentStatus",(function(){return v.CareQualityDocumentStatus})),n.d(t,"CareQualityTransactionStatus",(function(){return v.CareQualityTransactionStatus})),n.d(t,"CareQualityTransactionType",(function(){return v.CareQualityTransactionType})),n.d(t,"CatagoryTabDeletionDurationType",(function(){return v.CatagoryTabDeletionDurationType})),n.d(t,"CatagoryTabSection",(function(){return v.CatagoryTabSection})),n.d(t,"CatagoryTabUpdateDurationType",(function(){return v.CatagoryTabUpdateDurationType})),n.d(t,"Category",(function(){return v.Category})),n.d(t,"CategoryType",(function(){return v.CategoryType})),n.d(t,"CervixDilation",(function(){return v.CervixDilation})),n.d(t,"CervixEffacement",(function(){return v.CervixEffacement})),n.d(t,"CervixStation",(function(){return v.CervixStation})),n.d(t,"ChangeType",(function(){return v.ChangeType})),n.d(t,"ChargeCategory",(function(){return v.ChargeCategory})),n.d(t,"ChargeStatus",(function(){return v.ChargeStatus})),n.d(t,"ChartNoteAction",(function(){return v.ChartNoteAction})),n.d(t,"ChartNoteStatus",(function(){return v.ChartNoteStatus})),n.d(t,"ChartNoteSubStatus",(function(){return v.ChartNoteSubStatus})),n.d(t,"ChartNoteType",(function(){return v.ChartNoteType})),n.d(t,"ChartSegmentationEventType",(function(){return v.ChartSegmentationEventType})),n.d(t,"CheckAdjustmentType",(function(){return v.CheckAdjustmentType})),n.d(t,"ClaimAdjustmentDenialReasonCategory",(function(){return v.ClaimAdjustmentDenialReasonCategory})),n.d(t,"ClaimEditOverride",(function(){return v.ClaimEditOverride})),n.d(t,"ClaimEditRuleBillingMethod",(function(){return v.ClaimEditRuleBillingMethod})),n.d(t,"ClaimEditRuleMatchingType",(function(){return v.ClaimEditRuleMatchingType})),n.d(t,"ClaimFilingIndicator",(function(){return v.ClaimFilingIndicator})),n.d(t,"ClaimFollowUpActionType",(function(){return v.ClaimFollowUpActionType})),n.d(t,"ClaimFormQualifier",(function(){return v.ClaimFormQualifier})),n.d(t,"ClaimFormatType",(function(){return v.ClaimFormatType})),n.d(t,"ClaimHistoryEventType",(function(){return v.ClaimHistoryEventType})),n.d(t,"ClaimPayerCheckType",(function(){return v.ClaimPayerCheckType})),n.d(t,"ClaimPaymentExceptionType",(function(){return v.ClaimPaymentExceptionType})),n.d(t,"ClaimStatus",(function(){return v.ClaimStatus})),n.d(t,"ClaimStatusSource",(function(){return v.ClaimStatusSource})),n.d(t,"ClaimSubmissionType",(function(){return v.ClaimSubmissionType})),n.d(t,"ClaimType",(function(){return v.ClaimType})),n.d(t,"ClinicalNoteType",(function(){return v.ClinicalNoteType})),n.d(t,"ClipboardSectionType",(function(){return v.ClipboardSectionType})),n.d(t,"ClipboardSubSectionType",(function(){return v.ClipboardSubSectionType})),n.d(t,"ClosingReportEntryType",(function(){return v.ClosingReportEntryType})),n.d(t,"ClosingReportType",(function(){return v.ClosingReportType})),n.d(t,"CodeCategoryItemType",(function(){return v.CodeCategoryItemType})),n.d(t,"CodedReferenceQualifier",(function(){return v.CodedReferenceQualifier})),n.d(t,"ColorVisionFarnsworthDefect",(function(){return v.ColorVisionFarnsworthDefect})),n.d(t,"ColorVisionTestType",(function(){return v.ColorVisionTestType})),n.d(t,"CommissionConfigurationCodeRateType",(function(){return v.CommissionConfigurationCodeRateType})),n.d(t,"CommissionConfigurationCodeType",(function(){return v.CommissionConfigurationCodeType})),n.d(t,"ComparisonOperator",(function(){return v.ComparisonOperator})),n.d(t,"CompoundMedicationType",(function(){return v.CompoundMedicationType})),n.d(t,"ConditionType",(function(){return v.ConditionType})),n.d(t,"ConsentType",(function(){return v.ConsentType})),n.d(t,"ConsentVisibilityScope",(function(){return v.ConsentVisibilityScope})),n.d(t,"ConsentVisibilityType",(function(){return v.ConsentVisibilityType})),n.d(t,"ContactLensBlend",(function(){return v.ContactLensBlend})),n.d(t,"ContactLensCentration",(function(){return v.ContactLensCentration})),n.d(t,"ContactLensComfort",(function(){return v.ContactLensComfort})),n.d(t,"ContactLensDisinfecting",(function(){return v.ContactLensDisinfecting})),n.d(t,"ContactLensDot",(function(){return v.ContactLensDot})),n.d(t,"ContactLensFittingType",(function(){return v.ContactLensFittingType})),n.d(t,"ContactLensMonovision",(function(){return v.ContactLensMonovision})),n.d(t,"ContactLensMovement",(function(){return v.ContactLensMovement})),n.d(t,"ContactLensReplenishment",(function(){return v.ContactLensReplenishment})),n.d(t,"ContactLensRgpTint",(function(){return v.ContactLensRgpTint})),n.d(t,"ContactLensStatus",(function(){return v.ContactLensStatus})),n.d(t,"ContactLensVision",(function(){return v.ContactLensVision})),n.d(t,"ContactLensWearSchedule",(function(){return v.ContactLensWearSchedule})),n.d(t,"ContactLensWearingType",(function(){return v.ContactLensWearingType})),n.d(t,"ContactMethodType",(function(){return v.ContactMethodType})),n.d(t,"ControlledSubstanceCode",(function(){return v.ControlledSubstanceCode})),n.d(t,"ConversionStatus",(function(){return v.ConversionStatus})),n.d(t,"CopayTerm",(function(){return v.CopayTerm})),n.d(t,"CopayType",(function(){return v.CopayType})),n.d(t,"CosignatureWorkflowsStatus",(function(){return v.CosignatureWorkflowsStatus})),n.d(t,"CoverageAgeQualifierType",(function(){return v.CoverageAgeQualifierType})),n.d(t,"CoverageListType",(function(){return v.CoverageListType})),n.d(t,"CpiaActivityWeight",(function(){return v.CpiaActivityWeight})),n.d(t,"CpiaPracticeSize",(function(){return v.CpiaPracticeSize})),n.d(t,"CpiaSubcategory",(function(){return v.CpiaSubcategory})),n.d(t,"CrossCoverHorizontal",(function(){return v.CrossCoverHorizontal})),n.d(t,"CrossCoverVertical",(function(){return v.CrossCoverVertical})),n.d(t,"CustomField",(function(){return v.CustomField})),n.d(t,"CustomPage",(function(){return v.CustomPage})),n.d(t,"DataReviewed",(function(){return v.DataReviewed})),n.d(t,"DataSetStatus",(function(){return v.DataSetStatus})),n.d(t,"DataSetType",(function(){return v.DataSetType})),n.d(t,"DateRule",(function(){return v.DateRule})),n.d(t,"DayOfWeek",(function(){return v.DayOfWeek})),n.d(t,"DenialManagementResetStrategy",(function(){return v.DenialManagementResetStrategy})),n.d(t,"DeniedReasonCode",(function(){return v.DeniedReasonCode})),n.d(t,"DermPathAdditionalLabelIdentifierType",(function(){return v.DermPathAdditionalLabelIdentifierType})),n.d(t,"DermPathBillingType",(function(){return v.DermPathBillingType})),n.d(t,"DermPathCassettePrinterType",(function(){return v.DermPathCassettePrinterType})),n.d(t,"DermPathLabelIdentifierType",(function(){return v.DermPathLabelIdentifierType})),n.d(t,"DermPathRequestStatus",(function(){return v.DermPathRequestStatus})),n.d(t,"DermPathStaffRoleType",(function(){return v.DermPathStaffRoleType})),n.d(t,"DescriptionCode",(function(){return v.DescriptionCode})),n.d(t,"DeviceApp",(function(){return v.DeviceApp})),n.d(t,"DevicePlatform",(function(){return v.DevicePlatform})),n.d(t,"DftBusinessUnitOption",(function(){return v.DftBusinessUnitOption})),n.d(t,"DftClassification",(function(){return v.DftClassification})),n.d(t,"DiagnosisStatus",(function(){return v.DiagnosisStatus})),n.d(t,"DirectMailFileFormat",(function(){return v.DirectMailFileFormat})),n.d(t,"DiscountReason",(function(){return v.DiscountReason})),n.d(t,"DiscountType",(function(){return v.DiscountType})),n.d(t,"DivisionConfigType",(function(){return v.DivisionConfigType})),n.d(t,"DocumentHandleType",(function(){return v.DocumentHandleType})),n.d(t,"DocumentStatus",(function(){return v.DocumentStatus})),n.d(t,"DomainSubjectType",(function(){return v.DomainSubjectType})),n.d(t,"DoseForm",(function(){return v.DoseForm})),n.d(t,"DoseUnit",(function(){return v.DoseUnit})),n.d(t,"DrugAllergenWarningLevel",(function(){return v.DrugAllergenWarningLevel})),n.d(t,"DrugDrugWarningLevel",(function(){return v.DrugDrugWarningLevel})),n.d(t,"DuplicateTherapyWarningLevel",(function(){return v.DuplicateTherapyWarningLevel})),n.d(t,"EINType",(function(){return v.EINType})),n.d(t,"EMCode",(function(){return v.EMCode})),n.d(t,"EcrAuditEventType",(function(){return v.EcrAuditEventType})),n.d(t,"EcrMode",(function(){return v.EcrMode})),n.d(t,"EcrStatus",(function(){return v.EcrStatus})),n.d(t,"EdiVendor",(function(){return v.EdiVendor})),n.d(t,"ElectronicClaimType",(function(){return v.ElectronicClaimType})),n.d(t,"EligibilityAlertType",(function(){return v.EligibilityAlertType})),n.d(t,"EligibilityDiscrepancySubfieldType",(function(){return v.EligibilityDiscrepancySubfieldType})),n.d(t,"EligibilityDiscrepancyType",(function(){return v.EligibilityDiscrepancyType})),n.d(t,"EligibilityReportReviewStatus",(function(){return v.EligibilityReportReviewStatus})),n.d(t,"EligibilityRequestFormat",(function(){return v.EligibilityRequestFormat})),n.d(t,"EligibilityResponseFormat",(function(){return v.EligibilityResponseFormat})),n.d(t,"EmaLocation",(function(){return v.EmaLocation})),n.d(t,"EmailValidationMethod",(function(){return v.EmailValidationMethod})),n.d(t,"EmailValidationStatus",(function(){return v.EmailValidationStatus})),n.d(t,"EmergencyContactType",(function(){return v.EmergencyContactType})),n.d(t,"EmploymentStatus",(function(){return v.EmploymentStatus})),n.d(t,"EntityType",(function(){return v.EntityType})),n.d(t,"EraStatus",(function(){return v.EraStatus})),n.d(t,"EthnicGroup",(function(){return v.EthnicGroup})),n.d(t,"EthnicGroupDetailType",(function(){return v.EthnicGroupDetailType})),n.d(t,"EventName",(function(){return v.EventName})),n.d(t,"ExamSetLaterality",(function(){return v.ExamSetLaterality})),n.d(t,"ExternalSystemAuth",(function(){return v.ExternalSystemAuth})),n.d(t,"FacilityAdmissionSource",(function(){return v.FacilityAdmissionSource})),n.d(t,"FacilityAdmissionType",(function(){return v.FacilityAdmissionType})),n.d(t,"FacilityInclusionType",(function(){return v.FacilityInclusionType})),n.d(t,"FacilitySubmissionForm",(function(){return v.FacilitySubmissionForm})),n.d(t,"FacilityType",(function(){return v.FacilityType})),n.d(t,"FamilyMemberRelationship",(function(){return v.FamilyMemberRelationship})),n.d(t,"FamilyRelative",(function(){return v.FamilyRelative})),n.d(t,"FeeCalculationMethod",(function(){return v.FeeCalculationMethod})),n.d(t,"FeeScheduleImportStatus",(function(){return v.FeeScheduleImportStatus})),n.d(t,"FetalMovement",(function(){return v.FetalMovement})),n.d(t,"FetalPresentation",(function(){return v.FetalPresentation})),n.d(t,"FetusCount",(function(){return v.FetusCount})),n.d(t,"FhirApiAcl",(function(){return v.FhirApiAcl})),n.d(t,"FhirApiAclCategory",(function(){return v.FhirApiAclCategory})),n.d(t,"FhirApiVendorFirmadminAccess",(function(){return v.FhirApiVendorFirmadminAccess})),n.d(t,"FhirApiVendorStatus",(function(){return v.FhirApiVendorStatus})),n.d(t,"FhirApiVendorSysadminAccess",(function(){return v.FhirApiVendorSysadminAccess})),n.d(t,"FileAttachmentEmaArea",(function(){return v.FileAttachmentEmaArea})),n.d(t,"FinancialsAgingRule",(function(){return v.FinancialsAgingRule})),n.d(t,"FirmAdjustmentCodeExceptionCoverageType",(function(){return v.FirmAdjustmentCodeExceptionCoverageType})),n.d(t,"FirmAuthorizationSettingsAlertRecipientLinkType",(function(){return v.FirmAuthorizationSettingsAlertRecipientLinkType})),n.d(t,"FirmChargeDiscountType",(function(){return v.FirmChargeDiscountType})),n.d(t,"FirmCheckedInRoomPreferencesStatus",(function(){return v.FirmCheckedInRoomPreferencesStatus})),n.d(t,"FirmGroupType",(function(){return v.FirmGroupType})),n.d(t,"FirmLicenseType",(function(){return v.FirmLicenseType})),n.d(t,"FirmLogoType",(function(){return v.FirmLogoType})),n.d(t,"FirmPaymentType",(function(){return v.FirmPaymentType})),n.d(t,"FixativeIn",(function(){return v.FixativeIn})),n.d(t,"FollowUpReason",(function(){return v.FollowUpReason})),n.d(t,"FollowUpSchedulingInstruction",(function(){return v.FollowUpSchedulingInstruction})),n.d(t,"FollowUpStatus",(function(){return v.FollowUpStatus})),n.d(t,"FollowUpUnit",(function(){return v.FollowUpUnit})),n.d(t,"FormularyStatusType",(function(){return v.FormularyStatusType})),n.d(t,"Frequency",(function(){return v.Frequency})),n.d(t,"FrequencyType",(function(){return v.FrequencyType})),n.d(t,"FundsTransactionType",(function(){return v.FundsTransactionType})),n.d(t,"GdprAnswerType",(function(){return v.GdprAnswerType})),n.d(t,"Gender",(function(){return v.Gender})),n.d(t,"GenderIdentity",(function(){return v.GenderIdentity})),n.d(t,"GeographicElement",(function(){return v.GeographicElement})),n.d(t,"GlassesContactsUsageType",(function(){return v.GlassesContactsUsageType})),n.d(t,"GudidDeviceIssuingAgency",(function(){return v.GudidDeviceIssuingAgency})),n.d(t,"GudidDeviceLatexStatus",(function(){return v.GudidDeviceLatexStatus})),n.d(t,"GudidDeviceMriSafetyStatus",(function(){return v.GudidDeviceMriSafetyStatus})),n.d(t,"GudidDeviceRecordStatus",(function(){return v.GudidDeviceRecordStatus})),n.d(t,"GuidedWorkflowSection",(function(){return v.GuidedWorkflowSection})),n.d(t,"GuidelineCodeSystemType",(function(){return v.GuidelineCodeSystemType})),n.d(t,"HcpcsCategoryType",(function(){return v.HcpcsCategoryType})),n.d(t,"HideFromPortalReason",(function(){return v.HideFromPortalReason})),n.d(t,"HistoryType",(function(){return v.HistoryType})),n.d(t,"HourOfArrival",(function(){return v.HourOfArrival})),n.d(t,"HourOfDischarge",(function(){return v.HourOfDischarge})),n.d(t,"IdProofingVendor",(function(){return v.IdProofingVendor})),n.d(t,"ImmunizationRegistryStatus",(function(){return v.ImmunizationRegistryStatus})),n.d(t,"ImmunotherapyType",(function(){return v.ImmunotherapyType})),n.d(t,"ImoMappingType",(function(){return v.ImoMappingType})),n.d(t,"ImportStatus",(function(){return v.ImportStatus})),n.d(t,"InboundDftStatus",(function(){return v.InboundDftStatus})),n.d(t,"InfantVisionCornealLightReflex",(function(){return v.InfantVisionCornealLightReflex})),n.d(t,"InfantVisionMaintainsAlignment",(function(){return v.InfantVisionMaintainsAlignment})),n.d(t,"InfantVisionSteadiness",(function(){return v.InfantVisionSteadiness})),n.d(t,"InhaledOxygenDevice",(function(){return v.InhaledOxygenDevice})),n.d(t,"InsurancePolicyAttachmentType",(function(){return v.InsurancePolicyAttachmentType})),n.d(t,"InsurancePolicyAuthType",(function(){return v.InsurancePolicyAuthType})),n.d(t,"InsurancePolicyHolderType",(function(){return v.InsurancePolicyHolderType})),n.d(t,"InsurancePolicyPatientNameStrategy",(function(){return v.InsurancePolicyPatientNameStrategy})),n.d(t,"InsuranceZoneDescription",(function(){return v.InsuranceZoneDescription})),n.d(t,"InsuredRelationship",(function(){return v.InsuredRelationship})),n.d(t,"IntegrationType",(function(){return v.IntegrationType})),n.d(t,"IntervalsForHistory",(function(){return v.IntervalsForHistory})),n.d(t,"IntramailRecipientType",(function(){return v.IntramailRecipientType})),n.d(t,"InvBodyLocation",(function(){return v.InvBodyLocation})),n.d(t,"InvPackageOrderType",(function(){return v.InvPackageOrderType})),n.d(t,"InvPackagePaymentMethod",(function(){return v.InvPackagePaymentMethod})),n.d(t,"InvPackageType",(function(){return v.InvPackageType})),n.d(t,"InvProductLogStatus",(function(){return v.InvProductLogStatus})),n.d(t,"InvProductOrderStatus",(function(){return v.InvProductOrderStatus})),n.d(t,"InvProductType",(function(){return v.InvProductType})),n.d(t,"InvReconciliationStatus",(function(){return v.InvReconciliationStatus})),n.d(t,"InvRemovedReason",(function(){return v.InvRemovedReason})),n.d(t,"InvTransactionType",(function(){return v.InvTransactionType})),n.d(t,"InvUnitType",(function(){return v.InvUnitType})),n.d(t,"JobStatus",(function(){return v.JobStatus})),n.d(t,"KeratometryMethodType",(function(){return v.KeratometryMethodType})),n.d(t,"KeratometryMiresQualityValue",(function(){return v.KeratometryMiresQualityValue})),n.d(t,"KioskCopayBusinessUnitOption",(function(){return v.KioskCopayBusinessUnitOption})),n.d(t,"LabResultStatus",(function(){return v.LabResultStatus})),n.d(t,"LabRouting",(function(){return v.LabRouting})),n.d(t,"LabTestType",(function(){return v.LabTestType})),n.d(t,"LabType",(function(){return v.LabType})),n.d(t,"LabelSheetType",(function(){return v.LabelSheetType})),n.d(t,"LactationWarningLevel",(function(){return v.LactationWarningLevel})),n.d(t,"Language",(function(){return v.Language})),n.d(t,"LedgerGroupType",(function(){return v.LedgerGroupType})),n.d(t,"LensCoating",(function(){return v.LensCoating})),n.d(t,"LensColor",(function(){return v.LensColor})),n.d(t,"LensMaterial",(function(){return v.LensMaterial})),n.d(t,"LensStyle",(function(){return v.LensStyle})),n.d(t,"LensTint",(function(){return v.LensTint})),n.d(t,"LightReflexCorrection",(function(){return v.LightReflexCorrection})),n.d(t,"LightReflexFixation",(function(){return v.LightReflexFixation})),n.d(t,"LightReflexPrism",(function(){return v.LightReflexPrism})),n.d(t,"LightReflexWorkingDistance",(function(){return v.LightReflexWorkingDistance})),n.d(t,"LinkAttachmentType",(function(){return v.LinkAttachmentType})),n.d(t,"LocationType",(function(){return v.LocationType})),n.d(t,"MarginLocation",(function(){return v.MarginLocation})),n.d(t,"MaritalStatus",(function(){return v.MaritalStatus})),n.d(t,"MarkOfOrientation",(function(){return v.MarkOfOrientation})),n.d(t,"MarkOfOrientationPosition",(function(){return v.MarkOfOrientationPosition})),n.d(t,"MatchRule",(function(){return v.MatchRule})),n.d(t,"MavBatchStatus",(function(){return v.MavBatchStatus})),n.d(t,"MavBatchStatusCode",(function(){return v.MavBatchStatusCode})),n.d(t,"MavBatchType",(function(){return v.MavBatchType})),n.d(t,"MavContactMethod",(function(){return v.MavContactMethod})),n.d(t,"MavContractedPayerAddressTypeValue",(function(){return v.MavContractedPayerAddressTypeValue})),n.d(t,"MavContractedPayerContactTypeValue",(function(){return v.MavContractedPayerContactTypeValue})),n.d(t,"MavFacilityResourceType",(function(){return v.MavFacilityResourceType})),n.d(t,"MavInsurancePolicyType",(function(){return v.MavInsurancePolicyType})),n.d(t,"MavLedgerActivityType",(function(){return v.MavLedgerActivityType})),n.d(t,"MavMasterAccessLockFeatureType",(function(){return v.MavMasterAccessLockFeatureType})),n.d(t,"MavPlaceOfServiceFacilityType",(function(){return v.MavPlaceOfServiceFacilityType})),n.d(t,"MavRulePerformanceFlag",(function(){return v.MavRulePerformanceFlag})),n.d(t,"MaxAmountTimePeriodType",(function(){return v.MaxAmountTimePeriodType})),n.d(t,"MaxAmountType",(function(){return v.MaxAmountType})),n.d(t,"MdmDataReviewedMdmLabel",(function(){return v.MdmDataReviewedMdmLabel})),n.d(t,"MdmLevel",(function(){return v.MdmLevel})),n.d(t,"MedicalDomain",(function(){return v.MedicalDomain})),n.d(t,"MedicalSubdomain",(function(){return v.MedicalSubdomain})),n.d(t,"MedicationSubstitution",(function(){return v.MedicationSubstitution})),n.d(t,"MeetingType",(function(){return v.MeetingType})),n.d(t,"MeningococcalVaccinationOptions",(function(){return v.MeningococcalVaccinationOptions})),n.d(t,"MessageCategoryColor",(function(){return v.MessageCategoryColor})),n.d(t,"MessagePriority",(function(){return v.MessagePriority})),n.d(t,"Method",(function(){return v.Method})),n.d(t,"MethodOfDating",(function(){return v.MethodOfDating})),n.d(t,"MipsCertificationEdition",(function(){return v.MipsCertificationEdition})),n.d(t,"MipsEventType",(function(){return v.MipsEventType})),n.d(t,"MipsObjectiveDetailsType",(function(){return v.MipsObjectiveDetailsType})),n.d(t,"MipsObjectiveType",(function(){return v.MipsObjectiveType})),n.d(t,"MipsQualityMeasureType",(function(){return v.MipsQualityMeasureType})),n.d(t,"MipsReportingPeriodType",(function(){return v.MipsReportingPeriodType})),n.d(t,"MipsSection",(function(){return v.MipsSection})),n.d(t,"MipsTinLocationType",(function(){return v.MipsTinLocationType})),n.d(t,"MobileType",(function(){return v.MobileType})),n.d(t,"MostRecentDataType",(function(){return v.MostRecentDataType})),n.d(t,"Motility",(function(){return v.Motility})),n.d(t,"MotilityResult",(function(){return v.MotilityResult})),n.d(t,"MvpReportingPeriodType",(function(){return v.MvpReportingPeriodType})),n.d(t,"NavigationGroupName",(function(){return v.NavigationGroupName})),n.d(t,"NewRxRequestCommunicationType",(function(){return v.NewRxRequestCommunicationType})),n.d(t,"NewRxRequestUserType",(function(){return v.NewRxRequestUserType})),n.d(t,"NineSectorLayout",(function(){return v.NineSectorLayout})),n.d(t,"NormalAbnormal",(function(){return v.NormalAbnormal})),n.d(t,"NoteType",(function(){return v.NoteType})),n.d(t,"NotificationMethod",(function(){return v.NotificationMethod})),n.d(t,"NotificationStatus",(function(){return v.NotificationStatus})),n.d(t,"NotificationTemplate",(function(){return v.NotificationTemplate})),n.d(t,"ObGlobalPackageBillingPhase",(function(){return v.ObGlobalPackageBillingPhase})),n.d(t,"OcularUnderlyingCondition",(function(){return v.OcularUnderlyingCondition})),n.d(t,"Oculus",(function(){return v.Oculus})),n.d(t,"OnlineCheckInSectionTitle",(function(){return v.OnlineCheckInSectionTitle})),n.d(t,"OptionMapper",(function(){return v.OptionMapper})),n.d(t,"OrderAction",(function(){return v.OrderAction})),n.d(t,"OrderAttachmentType",(function(){return v.OrderAttachmentType})),n.d(t,"OrderDetailKey",(function(){return v.OrderDetailKey})),n.d(t,"OrderInterfaceStatus",(function(){return v.OrderInterfaceStatus})),n.d(t,"OrderPriority",(function(){return v.OrderPriority})),n.d(t,"OrderRecallStatus",(function(){return v.OrderRecallStatus})),n.d(t,"OrderRoutingType",(function(){return v.OrderRoutingType})),n.d(t,"OrderStatus",(function(){return v.OrderStatus})),n.d(t,"OrderSubType",(function(){return v.OrderSubType})),n.d(t,"OrderType",(function(){return v.OrderType})),n.d(t,"OtoacousticEmission",(function(){return v.OtoacousticEmission})),n.d(t,"OutboundBridgeProtocolType",(function(){return v.OutboundBridgeProtocolType})),n.d(t,"OutboundClaimType",(function(){return v.OutboundClaimType})),n.d(t,"OverallMDM",(function(){return v.OverallMDM})),n.d(t,"OverpaymentAllocationMode",(function(){return v.OverpaymentAllocationMode})),n.d(t,"PACancelReasonCode",(function(){return v.PACancelReasonCode})),n.d(t,"PAClosedReasonCode",(function(){return v.PAClosedReasonCode})),n.d(t,"PAPriorityIndicator",(function(){return v.PAPriorityIndicator})),n.d(t,"PQRSDomain",(function(){return v.PQRSDomain})),n.d(t,"PQRSMeasureType",(function(){return v.PQRSMeasureType})),n.d(t,"PQRSPerformanceFlag",(function(){return v.PQRSPerformanceFlag})),n.d(t,"PQRSRegistry",(function(){return v.PQRSRegistry})),n.d(t,"PQRSReportingOption",(function(){return v.PQRSReportingOption})),n.d(t,"PQRSUserType",(function(){return v.PQRSUserType})),n.d(t,"PackageAssociationType",(function(){return v.PackageAssociationType})),n.d(t,"PackageItemType",(function(){return v.PackageItemType})),n.d(t,"PastFamilySocialHistoryDescription",(function(){return v.PastFamilySocialHistoryDescription})),n.d(t,"PathAndLabsLabel",(function(){return v.PathAndLabsLabel})),n.d(t,"PatientAlertEntityType",(function(){return v.PatientAlertEntityType})),n.d(t,"PatientAlertLevel",(function(){return v.PatientAlertLevel})),n.d(t,"PatientAlertType",(function(){return v.PatientAlertType})),n.d(t,"PatientAssignableTaskAction",(function(){return v.PatientAssignableTaskAction})),n.d(t,"PatientBalanceAsyncJobStatus",(function(){return v.PatientBalanceAsyncJobStatus})),n.d(t,"PatientBalanceAsyncJobType",(function(){return v.PatientBalanceAsyncJobType})),n.d(t,"PatientCollectionAction",(function(){return v.PatientCollectionAction})),n.d(t,"PatientDeviceErrorAttachmentMetadataType",(function(){return v.PatientDeviceErrorAttachmentMetadataType})),n.d(t,"PatientDischargeStatus",(function(){return v.PatientDischargeStatus})),n.d(t,"PatientEhiRequestStatus",(function(){return v.PatientEhiRequestStatus})),n.d(t,"PatientOnlineCheckInSubtaskStatusEnum",(function(){return v.PatientOnlineCheckInSubtaskStatusEnum})),n.d(t,"PatientPaymentAssociationMethod",(function(){return v.PatientPaymentAssociationMethod})),n.d(t,"PatientPaymentReversalReason",(function(){return v.PatientPaymentReversalReason})),n.d(t,"PatientPaymentStatus",(function(){return v.PatientPaymentStatus})),n.d(t,"PatientPortalEvent",(function(){return v.PatientPortalEvent})),n.d(t,"PatientPortalEventData",(function(){return v.PatientPortalEventData})),n.d(t,"PatientPortalResultAction",(function(){return v.PatientPortalResultAction})),n.d(t,"PatientPortalResultsTimeRule",(function(){return v.PatientPortalResultsTimeRule})),n.d(t,"PatientPortalType",(function(){return v.PatientPortalType})),n.d(t,"PatientPreferredPronoun",(function(){return v.PatientPreferredPronoun})),n.d(t,"PatientPregnancyHistoryStatus",(function(){return v.PatientPregnancyHistoryStatus})),n.d(t,"PatientProviderType",(function(){return v.PatientProviderType})),n.d(t,"PatientSelfAssessmentOfTreatmentCompliance",(function(){return v.PatientSelfAssessmentOfTreatmentCompliance})),n.d(t,"PatientStatementBatchStatus",(function(){return v.PatientStatementBatchStatus})),n.d(t,"PatientStatementNote",(function(){return v.PatientStatementNote})),n.d(t,"PatientStatementPeriod",(function(){return v.PatientStatementPeriod})),n.d(t,"PatientStatementPreference",(function(){return v.PatientStatementPreference})),n.d(t,"PatientStatus",(function(){return v.PatientStatus})),n.d(t,"PatientWarningDataActionType",(function(){return v.PatientWarningDataActionType})),n.d(t,"PatientWarningType",(function(){return v.PatientWarningType})),n.d(t,"PayerCheckFormat",(function(){return v.PayerCheckFormat})),n.d(t,"PayerContactType",(function(){return v.PayerContactType})),n.d(t,"PayerIdType",(function(){return v.PayerIdType})),n.d(t,"PayerMatchingType",(function(){return v.PayerMatchingType})),n.d(t,"PayfacCardBrand",(function(){return v.PayfacCardBrand})),n.d(t,"PayfacQuickpayUserTokenType",(function(){return v.PayfacQuickpayUserTokenType})),n.d(t,"PayfacTerminalStatus",(function(){return v.PayfacTerminalStatus})),n.d(t,"PaymentChannelType",(function(){return v.PaymentChannelType})),n.d(t,"PaymentCode",(function(){return v.PaymentCode})),n.d(t,"PaymentMethod",(function(){return v.PaymentMethod})),n.d(t,"PaymentPlanAuthorizationStatus",(function(){return v.PaymentPlanAuthorizationStatus})),n.d(t,"PaymentPlanEndingReason",(function(){return v.PaymentPlanEndingReason})),n.d(t,"PaymentPlanFrequency",(function(){return v.PaymentPlanFrequency})),n.d(t,"PaymentPlanStatus",(function(){return v.PaymentPlanStatus})),n.d(t,"PaymentProcessor",(function(){return v.PaymentProcessor})),n.d(t,"PaymentRequestStatus",(function(){return v.PaymentRequestStatus})),n.d(t,"PaymentRequestType",(function(){return v.PaymentRequestType})),n.d(t,"PaymentStatus",(function(){return v.PaymentStatus})),n.d(t,"PaymentTerminalStatus",(function(){return v.PaymentTerminalStatus})),n.d(t,"PaymentType",(function(){return v.PaymentType})),n.d(t,"PaymentTypology",(function(){return v.PaymentTypology})),n.d(t,"PdfSplitAction",(function(){return v.PdfSplitAction})),n.d(t,"PdfSplitStatus",(function(){return v.PdfSplitStatus})),n.d(t,"PdmpVendorType",(function(){return v.PdmpVendorType})),n.d(t,"PharmacyType",(function(){return v.PharmacyType})),n.d(t,"PhiRelationship",(function(){return v.PhiRelationship})),n.d(t,"PhoneNumberType",(function(){return v.PhoneNumberType})),n.d(t,"PhoneNumberTypeDescription",(function(){return v.PhoneNumberTypeDescription})),n.d(t,"PhotoPermission",(function(){return v.PhotoPermission})),n.d(t,"PlanType",(function(){return v.PlanType})),n.d(t,"PlusOrMinus",(function(){return v.PlusOrMinus})),n.d(t,"PmIntegrationFileFormat",(function(){return v.PmIntegrationFileFormat})),n.d(t,"PmIntegrationVendor",(function(){return v.PmIntegrationVendor})),n.d(t,"PmNoteType",(function(){return v.PmNoteType})),n.d(t,"PmObPackageBillLinkType",(function(){return v.PmObPackageBillLinkType})),n.d(t,"PmObPackageStatus",(function(){return v.PmObPackageStatus})),n.d(t,"PolicyTypeFilter",(function(){return v.PolicyTypeFilter})),n.d(t,"PostingStatus",(function(){return v.PostingStatus})),n.d(t,"PqrsRateCategory",(function(){return v.PqrsRateCategory})),n.d(t,"PreCollectionApptBooking",(function(){return v.PreCollectionApptBooking})),n.d(t,"PregnancyAbortionTreatment",(function(){return v.PregnancyAbortionTreatment})),n.d(t,"PregnancyAnesthesia",(function(){return v.PregnancyAnesthesia})),n.d(t,"PregnancyBabyLiving",(function(){return v.PregnancyBabyLiving})),n.d(t,"PregnancyBabySex",(function(){return v.PregnancyBabySex})),n.d(t,"PregnancyBleeding",(function(){return v.PregnancyBleeding})),n.d(t,"PregnancyConclusionReason",(function(){return v.PregnancyConclusionReason})),n.d(t,"PregnancyContractions",(function(){return v.PregnancyContractions})),n.d(t,"PregnancyDeliveredByType",(function(){return v.PregnancyDeliveredByType})),n.d(t,"PregnancyEctopicTreatment",(function(){return v.PregnancyEctopicTreatment})),n.d(t,"PregnancyFluidLeakage",(function(){return v.PregnancyFluidLeakage})),n.d(t,"PregnancyIncludeInBillingForExternalProvider",(function(){return v.PregnancyIncludeInBillingForExternalProvider})),n.d(t,"PregnancyIncludeInBillingForInternalProvider",(function(){return v.PregnancyIncludeInBillingForInternalProvider})),n.d(t,"PregnancyMiscarriageTreatment",(function(){return v.PregnancyMiscarriageTreatment})),n.d(t,"PregnancyModeOfDelivery",(function(){return v.PregnancyModeOfDelivery})),n.d(t,"PregnancyType",(function(){return v.PregnancyType})),n.d(t,"PregnancyWarningLevel",(function(){return v.PregnancyWarningLevel})),n.d(t,"PretermLaborSymptoms",(function(){return v.PretermLaborSymptoms})),n.d(t,"PricingType",(function(){return v.PricingType})),n.d(t,"PriorAuthAppealStatus",(function(){return v.PriorAuthAppealStatus})),n.d(t,"PriorAuthCancelStatus",(function(){return v.PriorAuthCancelStatus})),n.d(t,"PriorAuthMessageType",(function(){return v.PriorAuthMessageType})),n.d(t,"PriorAuthOutgoingAttachmentStatus",(function(){return v.PriorAuthOutgoingAttachmentStatus})),n.d(t,"PriorAuthQuestionType",(function(){return v.PriorAuthQuestionType})),n.d(t,"PriorAuthStatus",(function(){return v.PriorAuthStatus})),n.d(t,"Priority",(function(){return v.Priority})),n.d(t,"Privilege",(function(){return v.Privilege})),n.d(t,"PrivilegeType",(function(){return v.PrivilegeType})),n.d(t,"ProblemGoalStatus",(function(){return v.ProblemGoalStatus})),n.d(t,"ProblemListStatus",(function(){return v.ProblemListStatus})),n.d(t,"ProblemListType",(function(){return v.ProblemListType})),n.d(t,"ProcedureDeletableStatus",(function(){return v.ProcedureDeletableStatus})),n.d(t,"ProcedureMetadataValidator",(function(){return v.ProcedureMetadataValidator})),n.d(t,"ProcedureResumableStatus",(function(){return v.ProcedureResumableStatus})),n.d(t,"ProcessType",(function(){return v.ProcessType})),n.d(t,"ProductionType",(function(){return v.ProductionType})),n.d(t,"ProfessionalDesignation",(function(){return v.ProfessionalDesignation})),n.d(t,"ProviderGroup",(function(){return v.ProviderGroup})),n.d(t,"ProviderIdentificationStrategy",(function(){return v.ProviderIdentificationStrategy})),n.d(t,"ProviderLevelAdjustmentAction",(function(){return v.ProviderLevelAdjustmentAction})),n.d(t,"ProviderType",(function(){return v.ProviderType})),n.d(t,"PublicityCode",(function(){return v.PublicityCode})),n.d(t,"PupilAPD",(function(){return v.PupilAPD})),n.d(t,"PupilRAPD",(function(){return v.PupilRAPD})),n.d(t,"PupilReacts",(function(){return v.PupilReacts})),n.d(t,"PupilRegular",(function(){return v.PupilRegular})),n.d(t,"PupilRound",(function(){return v.PupilRound})),n.d(t,"PupilSize",(function(){return v.PupilSize})),n.d(t,"QuantityUnitOfMeasure",(function(){return v.QuantityUnitOfMeasure})),n.d(t,"QuestionSetType",(function(){return v.QuestionSetType})),n.d(t,"QuickFilterGroup",(function(){return v.QuickFilterGroup})),n.d(t,"QuickpayAddressRenderingMode",(function(){return v.QuickpayAddressRenderingMode})),n.d(t,"RCMRoleType",(function(){return v.RCMRoleType})),n.d(t,"RCMVendor",(function(){return v.RCMVendor})),n.d(t,"Race",(function(){return v.Race})),n.d(t,"RcmCategoryName",(function(){return v.RcmCategoryName})),n.d(t,"RcmPaymentBatchType",(function(){return v.RcmPaymentBatchType})),n.d(t,"RcmServiceTypeEnabled",(function(){return v.RcmServiceTypeEnabled})),n.d(t,"RealTimePriorAuthStatus",(function(){return v.RealTimePriorAuthStatus})),n.d(t,"RealtimeJobStatus",(function(){return v.RealtimeJobStatus})),n.d(t,"RecallActivityType",(function(){return v.RecallActivityType})),n.d(t,"RecallStatus",(function(){return v.RecallStatus})),n.d(t,"RecallTypeFrequency",(function(){return v.RecallTypeFrequency})),n.d(t,"ReconReportGroupingType",(function(){return v.ReconReportGroupingType})),n.d(t,"RedoxMessageType",(function(){return v.RedoxMessageType})),n.d(t,"ReferralContactType",(function(){return v.ReferralContactType})),n.d(t,"ReferralInstitutionSourceType",(function(){return v.ReferralInstitutionSourceType})),n.d(t,"ReferralStatus",(function(){return v.ReferralStatus})),n.d(t,"RefillApprovalFailureReason",(function(){return v.RefillApprovalFailureReason})),n.d(t,"RefillQualifier",(function(){return v.RefillQualifier})),n.d(t,"RefillResponseType",(function(){return v.RefillResponseType})),n.d(t,"RefractionBase",(function(){return v.RefractionBase})),n.d(t,"RefractionSetType",(function(){return v.RefractionSetType})),n.d(t,"RefractionType",(function(){return v.RefractionType})),n.d(t,"RefreshTokenStatus",(function(){return v.RefreshTokenStatus})),n.d(t,"RefundMethod",(function(){return v.RefundMethod})),n.d(t,"RefundType",(function(){return v.RefundType})),n.d(t,"RegistryGroup",(function(){return v.RegistryGroup})),n.d(t,"RelativeDiagnosisStatus",(function(){return v.RelativeDiagnosisStatus})),n.d(t,"ReliabilityOfTest",(function(){return v.ReliabilityOfTest})),n.d(t,"ReminderType",(function(){return v.ReminderType})),n.d(t,"RepeatUnit",(function(){return v.RepeatUnit})),n.d(t,"RequestSiteStatus",(function(){return v.RequestSiteStatus})),n.d(t,"RequestSiteUnit",(function(){return v.RequestSiteUnit})),n.d(t,"RequestType",(function(){return v.RequestType})),n.d(t,"RescheduleReason",(function(){return v.RescheduleReason})),n.d(t,"ResultAction",(function(){return v.ResultAction})),n.d(t,"ResultAttachmentType",(function(){return v.ResultAttachmentType})),n.d(t,"ResultFlag",(function(){return v.ResultFlag})),n.d(t,"ResultLogFeatureMode",(function(){return v.ResultLogFeatureMode})),n.d(t,"ResultLogStatus",(function(){return v.ResultLogStatus})),n.d(t,"ResultSourceType",(function(){return v.ResultSourceType})),n.d(t,"ResultType",(function(){return v.ResultType})),n.d(t,"ResultWorkflowStatus",(function(){return v.ResultWorkflowStatus})),n.d(t,"ReviewOfSystemsSystemDescription",(function(){return v.ReviewOfSystemsSystemDescription})),n.d(t,"RgpContactLensType",(function(){return v.RgpContactLensType})),n.d(t,"RightLeft",(function(){return v.RightLeft})),n.d(t,"Role",(function(){return v.Role})),n.d(t,"RoomType",(function(){return v.RoomType})),n.d(t,"RosQuicklistSharedWith",(function(){return v.RosQuicklistSharedWith})),n.d(t,"Route",(function(){return v.Route})),n.d(t,"RxChangeType",(function(){return v.RxChangeType})),n.d(t,"RxErxChangeRequestStatus",(function(){return v.RxErxChangeRequestStatus})),n.d(t,"RxErxChangeResponseType",(function(){return v.RxErxChangeResponseType})),n.d(t,"RxErxRefillRequestStatus",(function(){return v.RxErxRefillRequestStatus})),n.d(t,"RxErxStatus",(function(){return v.RxErxStatus})),n.d(t,"RxHistoryCheckStatus",(function(){return v.RxHistoryCheckStatus})),n.d(t,"RxHistoryConsentType",(function(){return v.RxHistoryConsentType})),n.d(t,"RxHistoryDxType",(function(){return v.RxHistoryDxType})),n.d(t,"RxHistorySourceType",(function(){return v.RxHistorySourceType})),n.d(t,"RxPharmacyType",(function(){return v.RxPharmacyType})),n.d(t,"RxStatus",(function(){return v.RxStatus})),n.d(t,"ScrubRuleCategory",(function(){return v.ScrubRuleCategory})),n.d(t,"ScrubRuleDiagnosisOrder",(function(){return v.ScrubRuleDiagnosisOrder})),n.d(t,"ScrubRuleMatchingType",(function(){return v.ScrubRuleMatchingType})),n.d(t,"ScrubRuleModifierMatchingType",(function(){return v.ScrubRuleModifierMatchingType})),n.d(t,"SecondaryMedicarePolicyType",(function(){return v.SecondaryMedicarePolicyType})),n.d(t,"SectionAction",(function(){return v.SectionAction})),n.d(t,"SectionStatus",(function(){return v.SectionStatus})),n.d(t,"SectionType",(function(){return v.SectionType})),n.d(t,"SecureUploadStatus",(function(){return v.SecureUploadStatus})),n.d(t,"SecureUploadType",(function(){return v.SecureUploadType})),n.d(t,"SendRxStatus",(function(){return v.SendRxStatus})),n.d(t,"SendStatus",(function(){return v.SendStatus})),n.d(t,"Service",(function(){return v.Service})),n.d(t,"SexualOrientation",(function(){return v.SexualOrientation})),n.d(t,"SignatureStatus",(function(){return v.SignatureStatus})),n.d(t,"SignatureType",(function(){return v.SignatureType})),n.d(t,"SmokingStatus",(function(){return v.SmokingStatus})),n.d(t,"SnomedBodyPart",(function(){return v.SnomedBodyPart})),n.d(t,"SolutionType",(function(){return v.SolutionType})),n.d(t,"SortOrder",(function(){return v.SortOrder})),n.d(t,"SpecialtyRegistryEvent",(function(){return v.SpecialtyRegistryEvent})),n.d(t,"SpecificAssigneeType",(function(){return v.SpecificAssigneeType})),n.d(t,"SpecimenCollectionType",(function(){return v.SpecimenCollectionType})),n.d(t,"SpecimenColor",(function(){return v.SpecimenColor})),n.d(t,"SpecimenInked",(function(){return v.SpecimenInked})),n.d(t,"SpecimenInkedPositionType",(function(){return v.SpecimenInkedPositionType})),n.d(t,"SpecimenLabeling",(function(){return v.SpecimenLabeling})),n.d(t,"SpecimenPreservation",(function(){return v.SpecimenPreservation})),n.d(t,"SpecimenShape",(function(){return v.SpecimenShape})),n.d(t,"SpecimenType",(function(){return v.SpecimenType})),n.d(t,"StaffOrGroupLinkType",(function(){return v.StaffOrGroupLinkType})),n.d(t,"StateReportConfigFieldType",(function(){return v.StateReportConfigFieldType})),n.d(t,"StateReportErrorType",(function(){return v.StateReportErrorType})),n.d(t,"StateReportFacilityConfigFieldType",(function(){return v.StateReportFacilityConfigFieldType})),n.d(t,"StateReportPayerConfigFieldType",(function(){return v.StateReportPayerConfigFieldType})),n.d(t,"StateReportStatus",(function(){return v.StateReportStatus})),n.d(t,"StateReportType",(function(){return v.StateReportType})),n.d(t,"StatusButtonStatus",(function(){return v.StatusButtonStatus})),n.d(t,"SubContactMethodType",(function(){return v.SubContactMethodType})),n.d(t,"SubmissionMethod",(function(){return v.SubmissionMethod})),n.d(t,"SupportLevel",(function(){return v.SupportLevel})),n.d(t,"SupportedBillingType",(function(){return v.SupportedBillingType})),n.d(t,"SurescriptsCancelDenialReasonCode",(function(){return v.SurescriptsCancelDenialReasonCode})),n.d(t,"SurescriptsMessageType",(function(){return v.SurescriptsMessageType})),n.d(t,"SurescriptsPrescriberStatus",(function(){return v.SurescriptsPrescriberStatus})),n.d(t,"SystemMessageLogLevel",(function(){return v.SystemMessageLogLevel})),n.d(t,"SystemNotificationType",(function(){return v.SystemNotificationType})),n.d(t,"SystemRole",(function(){return v.SystemRole})),n.d(t,"TaskEventsEnum",(function(){return v.TaskEventsEnum})),n.d(t,"TaskLinkType",(function(){return v.TaskLinkType})),n.d(t,"TaskScheduleProcessType",(function(){return v.TaskScheduleProcessType})),n.d(t,"TaskScheduleStatus",(function(){return v.TaskScheduleStatus})),n.d(t,"TaskStatesEnum",(function(){return v.TaskStatesEnum})),n.d(t,"TaskType",(function(){return v.TaskType})),n.d(t,"TaskTypeEnum",(function(){return v.TaskTypeEnum})),n.d(t,"TaxOverrideState",(function(){return v.TaxOverrideState})),n.d(t,"TaxpayerIdType",(function(){return v.TaxpayerIdType})),n.d(t,"TdapVaccinationsOptions",(function(){return v.TdapVaccinationsOptions})),n.d(t,"TemplateDefaultType",(function(){return v.TemplateDefaultType})),n.d(t,"TemplateType",(function(){return v.TemplateType})),n.d(t,"TestCodeType",(function(){return v.TestCodeType})),n.d(t,"Tier",(function(){return v.Tier})),n.d(t,"TimeBufferUnit",(function(){return v.TimeBufferUnit})),n.d(t,"TimeUnit",(function(){return v.TimeUnit})),n.d(t,"TimelineSubType",(function(){return v.TimelineSubType})),n.d(t,"TimelineType",(function(){return v.TimelineType})),n.d(t,"ToricsRotation",(function(){return v.ToricsRotation})),n.d(t,"TransactionErrorCode",(function(){return v.TransactionErrorCode})),n.d(t,"TransactionMethod",(function(){return v.TransactionMethod})),n.d(t,"TransactionType",(function(){return v.TransactionType})),n.d(t,"TranscriptionFileStatus",(function(){return v.TranscriptionFileStatus})),n.d(t,"TranscriptionStatus",(function(){return v.TranscriptionStatus})),n.d(t,"TransducerType",(function(){return v.TransducerType})),n.d(t,"TransmissionStatus",(function(){return v.TransmissionStatus})),n.d(t,"TransportMedium",(function(){return v.TransportMedium})),n.d(t,"TreatmentCaseContactType",(function(){return v.TreatmentCaseContactType})),n.d(t,"TreatmentCaseType",(function(){return v.TreatmentCaseType})),n.d(t,"UnallocatedFundsType",(function(){return v.UnallocatedFundsType})),n.d(t,"UnitsOfLength",(function(){return v.UnitsOfLength})),n.d(t,"UnitsOfMass",(function(){return v.UnitsOfMass})),n.d(t,"UnitsOfTemperature",(function(){return v.UnitsOfTemperature})),n.d(t,"UserDataRestrictionAccessType",(function(){return v.UserDataRestrictionAccessType})),n.d(t,"UserDataRestrictionReferenceLinkType",(function(){return v.UserDataRestrictionReferenceLinkType})),n.d(t,"UserDataRestrictionViewerLinkType",(function(){return v.UserDataRestrictionViewerLinkType})),n.d(t,"VeDiagnosisProblemAddressed",(function(){return v.VeDiagnosisProblemAddressed})),n.d(t,"VeVisitAllergenDetailKey",(function(){return v.VeVisitAllergenDetailKey})),n.d(t,"VeVisitAllergenTestingMethod",(function(){return v.VeVisitAllergenTestingMethod})),n.d(t,"VeVisitFollowUpReasonDescription",(function(){return v.VeVisitFollowUpReasonDescription})),n.d(t,"VeVisitType",(function(){return v.VeVisitType})),n.d(t,"VendorType",(function(){return v.VendorType})),n.d(t,"VisitOverviewAlertCategory",(function(){return v.VisitOverviewAlertCategory})),n.d(t,"VisitSettingsBillAs",(function(){return v.VisitSettingsBillAs})),n.d(t,"VisitVirtualExamImpressionMode",(function(){return v.VisitVirtualExamImpressionMode})),n.d(t,"VisualAcuityAmslerGridDefect",(function(){return v.VisualAcuityAmslerGridDefect})),n.d(t,"VisualAcuityCorrectorsType",(function(){return v.VisualAcuityCorrectorsType})),n.d(t,"VisualAcuityDistanceType",(function(){return v.VisualAcuityDistanceType})),n.d(t,"VisualAcuityEyeEvaluated",(function(){return v.VisualAcuityEyeEvaluated})),n.d(t,"VisualAcuityEyeEvaluatedLeftRight",(function(){return v.VisualAcuityEyeEvaluatedLeftRight})),n.d(t,"VisualAcuityGlassesType",(function(){return v.VisualAcuityGlassesType})),n.d(t,"VisualAcuityIOPReliability",(function(){return v.VisualAcuityIOPReliability})),n.d(t,"VisualAcuityIOPType",(function(){return v.VisualAcuityIOPType})),n.d(t,"VisualAcuityNearTestType",(function(){return v.VisualAcuityNearTestType})),n.d(t,"VisualAcuityNearValue",(function(){return v.VisualAcuityNearValue})),n.d(t,"VisualAcuityRefractionType",(function(){return v.VisualAcuityRefractionType})),n.d(t,"VisualAcuityScale",(function(){return v.VisualAcuityScale})),n.d(t,"VisualAcuityTestType",(function(){return v.VisualAcuityTestType})),n.d(t,"VisualAcuityTropia",(function(){return v.VisualAcuityTropia})),n.d(t,"VisualAcuityValue",(function(){return v.VisualAcuityValue})),n.d(t,"VisualAlignmentTestCorrectionType",(function(){return v.VisualAlignmentTestCorrectionType})),n.d(t,"VisualAlignmentTestMethod",(function(){return v.VisualAlignmentTestMethod})),n.d(t,"VisualCoverTestType",(function(){return v.VisualCoverTestType})),n.d(t,"VisualFieldResult",(function(){return v.VisualFieldResult})),n.d(t,"VisualFieldTestType",(function(){return v.VisualFieldTestType})),n.d(t,"VitalsMeasurementPosition",(function(){return v.VitalsMeasurementPosition})),n.d(t,"VolumeUnit",(function(){return v.VolumeUnit})),n.d(t,"WorkflowStatus",(function(){return v.WorkflowStatus})),n.d(t,"WorkflowSubStatus",(function(){return v.WorkflowSubStatus})),n.d(t,"WorthFourDotTestOutcome",(function(){return v.WorthFourDotTestOutcome})),n.d(t,"YesNo",(function(){return v.YesNo})),n.d(t,"ActivePaymentPlanType",(function(){return T.ActivePaymentPlanType})),n.d(t,"AllergyDilutionConcentration",(function(){return T.AllergyDilutionConcentration})),n.d(t,"AngularSpaFeatures",(function(){return T.AngularSpaFeatures})),n.d(t,"AttachFileType",(function(){return T.AttachFileType})),n.d(t,"AutoPayCancellationAvailability",(function(){return T.AutoPayCancellationAvailability})),n.d(t,"BatchJobFeatures",(function(){return T.BatchJobFeatures})),n.d(t,"BridgeFeatures",(function(){return T.BridgeFeatures})),n.d(t,"BulkActionPostingOption",(function(){return T.BulkActionPostingOption})),n.d(t,"BusinessHistoryType",(function(){return T.BusinessHistoryType})),n.d(t,"CCDType",(function(){return T.CCDType})),n.d(t,"CardType",(function(){return T.CardType})),n.d(t,"ChartNoteDateFilter",(function(){return T.ChartNoteDateFilter})),n.d(t,"ChartNoteFilterStatus",(function(){return T.ChartNoteFilterStatus})),n.d(t,"ClinicalFeatures",(function(){return T.ClinicalFeatures})),n.d(t,"ClipboardAnswerMetadataType",(function(){return T.ClipboardAnswerMetadataType})),n.d(t,"ClipboardAnswerRule",(function(){return T.ClipboardAnswerRule})),n.d(t,"ClipboardPortalVersion",(function(){return T.ClipboardPortalVersion})),n.d(t,"CommissionsCriteriaSearchLookupBeanType",(function(){return T.CommissionsCriteriaSearchLookupBeanType})),n.d(t,"CommissionsCriteriaSearchType",(function(){return T.CommissionsCriteriaSearchType})),n.d(t,"ConversationMessageType",(function(){return T.ConversationMessageType})),n.d(t,"DataCorruptionType",(function(){return T.DataCorruptionType})),n.d(t,"DateFilter",(function(){return T.DateFilter})),n.d(t,"DatePreference",(function(){return T.DatePreference})),n.d(t,"DateTypeFilter",(function(){return T.DateTypeFilter})),n.d(t,"DermPathCptCodes",(function(){return T.DermPathCptCodes})),n.d(t,"DftValidatorMessage",(function(){return T.DftValidatorMessage})),n.d(t,"EligibilityReportFilter",(function(){return T.EligibilityReportFilter})),n.d(t,"EmaEnvironment",(function(){return T.EmaEnvironment})),n.d(t,"EncounterType",(function(){return T.EncounterType})),n.d(t,"ErrorType",(function(){return T.ErrorType})),n.d(t,"ExamFindingCategory",(function(){return T.ExamFindingCategory})),n.d(t,"ExamFindingType",(function(){return T.ExamFindingType})),n.d(t,"FacilitySearchPreference",(function(){return T.FacilitySearchPreference})),n.d(t,"FeatureGroupKey",(function(){return T.FeatureGroupKey})),n.d(t,"FinancialsDateModifierType",(function(){return T.FinancialsDateModifierType})),n.d(t,"FinancialsFilterQueryBeanDateFilter",(function(){return T.FinancialsFilterQueryBeanDateFilter})),n.d(t,"FinancialsTab",(function(){return T.FinancialsTab})),n.d(t,"FirmGroup",(function(){return T.FirmGroup})),n.d(t,"FrequencyIntervalType",(function(){return T.FrequencyIntervalType})),n.d(t,"GeneralFeatures",(function(){return T.GeneralFeatures})),n.d(t,"GeriatricPrecautionLevel",(function(){return T.GeriatricPrecautionLevel})),n.d(t,"GlobalPaymentMethod",(function(){return T.GlobalPaymentMethod})),n.d(t,"GuidedWorkflowsFeatures",(function(){return T.GuidedWorkflowsFeatures})),n.d(t,"IndependentHistorianProvider",(function(){return T.IndependentHistorianProvider})),n.d(t,"IndependentHistorianWhy",(function(){return T.IndependentHistorianWhy})),n.d(t,"InsurancePolicyAction",(function(){return T.InsurancePolicyAction})),n.d(t,"InsurancePolicyStatus",(function(){return T.InsurancePolicyStatus})),n.d(t,"InsurancePolicyTypeClassification",(function(){return T.InsurancePolicyTypeClassification})),n.d(t,"IntravitrealInjectionApiType",(function(){return T.IntravitrealInjectionApiType})),n.d(t,"IntravitrealInjectionErrorType",(function(){return T.IntravitrealInjectionErrorType})),n.d(t,"InvPositiveNegative",(function(){return T.InvPositiveNegative})),n.d(t,"LabelWarningVersion",(function(){return T.LabelWarningVersion})),n.d(t,"LactationPrecautionLevel",(function(){return T.LactationPrecautionLevel})),n.d(t,"Level",(function(){return T.Level})),n.d(t,"MapId",(function(){return T.MapId})),n.d(t,"MavCodeType",(function(){return T.MavCodeType})),n.d(t,"MavRuleType",(function(){return T.MavRuleType})),n.d(t,"MinMaxDosingFilter",(function(){return T.MinMaxDosingFilter})),n.d(t,"NpiType",(function(){return T.NpiType})),n.d(t,"OnlineCheckInSettingsKey",(function(){return T.OnlineCheckInSettingsKey})),n.d(t,"OperativeFeatures",(function(){return T.OperativeFeatures})),n.d(t,"PQRSTransmissionStatus",(function(){return T.PQRSTransmissionStatus})),n.d(t,"PacsVendor",(function(){return T.PacsVendor})),n.d(t,"PathologyFeatures",(function(){return T.PathologyFeatures})),n.d(t,"PatientCreatedVisitStatus",(function(){return T.PatientCreatedVisitStatus})),n.d(t,"PatientOverviewAngularFeatures",(function(){return T.PatientOverviewAngularFeatures})),n.d(t,"PatientStatementVendor",(function(){return T.PatientStatementVendor})),n.d(t,"PayErrorType",(function(){return T.PayErrorType}));n.d(t,"PayState",(function(){return T.PayState})),n.d(t,"PayfacFrequencyType",(function(){return T.PayfacFrequencyType})),n.d(t,"PayfacMetadata",(function(){return T.PayfacMetadata})),n.d(t,"PayfacMode",(function(){return T.PayfacMode})),n.d(t,"PayfacPaymentRequestStatus",(function(){return T.PayfacPaymentRequestStatus})),n.d(t,"PaymentDetailsSource",(function(){return T.PaymentDetailsSource})),n.d(t,"PaymentReportType",(function(){return T.PaymentReportType})),n.d(t,"PediatricPrecautionLevel",(function(){return T.PediatricPrecautionLevel})),n.d(t,"PerformanceFeatures",(function(){return T.PerformanceFeatures})),n.d(t,"PqrsTaxIdVerification",(function(){return T.PqrsTaxIdVerification})),n.d(t,"PracticeManagementFeatures",(function(){return T.PracticeManagementFeatures})),n.d(t,"PracticeManagementTemporaryFeatures",(function(){return T.PracticeManagementTemporaryFeatures})),n.d(t,"PregnancyPrecautionLevel",(function(){return T.PregnancyPrecautionLevel})),n.d(t,"PretestingExamAngularFeatures",(function(){return T.PretestingExamAngularFeatures})),n.d(t,"PriceSource",(function(){return T.PriceSource})),n.d(t,"PrincipalPayerCode",(function(){return T.PrincipalPayerCode})),n.d(t,"ProcedureMetadataNestedOptionType",(function(){return T.ProcedureMetadataNestedOptionType})),n.d(t,"ProductChargeType",(function(){return T.ProductChargeType})),n.d(t,"ProviderAlert",(function(){return T.ProviderAlert})),n.d(t,"QuickpayIdentificationType",(function(){return T.QuickpayIdentificationType})),n.d(t,"RecalculateBalanceStatus",(function(){return T.RecalculateBalanceStatus})),n.d(t,"RecalculateBalanceType",(function(){return T.RecalculateBalanceType})),n.d(t,"RecallsDateFilter",(function(){return T.RecallsDateFilter})),n.d(t,"ReportBy",(function(){return T.ReportBy})),n.d(t,"ReportDateType",(function(){return T.ReportDateType})),n.d(t,"ReportPaymentFrom",(function(){return T.ReportPaymentFrom})),n.d(t,"ReportPaymentType",(function(){return T.ReportPaymentType})),n.d(t,"RescheduleResponse",(function(){return T.RescheduleResponse})),n.d(t,"ResponseStatus",(function(){return T.ResponseStatus})),n.d(t,"ResultSectionType",(function(){return T.ResultSectionType})),n.d(t,"RibbonButtonFeatures",(function(){return T.RibbonButtonFeatures})),n.d(t,"SchedulingFeatures",(function(){return T.SchedulingFeatures})),n.d(t,"SectionLockType",(function(){return T.SectionLockType})),n.d(t,"SexualPartners",(function(){return T.SexualPartners})),n.d(t,"SideEffectsFrequencyFilter",(function(){return T.SideEffectsFrequencyFilter})),n.d(t,"SideEffectsSeverityFilter",(function(){return T.SideEffectsSeverityFilter})),n.d(t,"StateReportGenerationQuarter",(function(){return T.StateReportGenerationQuarter})),n.d(t,"StructuredSigInstructionMode",(function(){return T.StructuredSigInstructionMode})),n.d(t,"SupportedScanType",(function(){return T.SupportedScanType})),n.d(t,"TaskPriority",(function(){return T.TaskPriority})),n.d(t,"TestSource",(function(){return T.TestSource})),n.d(t,"TimeOfDay",(function(){return T.TimeOfDay})),n.d(t,"TimelineOptions",(function(){return T.TimelineOptions})),n.d(t,"UnifiedResultLogFlag",(function(){return T.UnifiedResultLogFlag})),n.d(t,"UnifiedResultLogProgressStatus",(function(){return T.UnifiedResultLogProgressStatus})),n.d(t,"UnifiedResultLogResultType",(function(){return T.UnifiedResultLogResultType})),n.d(t,"UnifiedResultLogStatus",(function(){return T.UnifiedResultLogStatus})),n.d(t,"UnifiedResultSourceType",(function(){return T.UnifiedResultSourceType})),n.d(t,"UrbanAirshipEnvironment",(function(){return T.UrbanAirshipEnvironment})),n.d(t,"VirtualExamRoomFeatures",(function(){return T.VirtualExamRoomFeatures})),n.d(t,"VisitOutputType",(function(){return T.VisitOutputType})),n.d(t,"VisitOverviewAngularFeatures",(function(){return T.VisitOverviewAngularFeatures})),n.d(t,"VisualDxLicenseType",(function(){return T.VisualDxLicenseType})),n.d(t,"WalkMeMode",(function(){return T.WalkMeMode})),n.d(t,"Weekday",(function(){return T.Weekday})),n.d(t,"BenefitCoverageType",(function(){return i})),n.d(t,"ClipboardPatientRestrictionType",(function(){return a})),n.d(t,"ClipboardQuestionType",(function(){return r})),n.d(t,"ClipboardQuestionValueType",(function(){return o})),n.d(t,"ClipboardVisibilityScope",(function(){return s})),n.d(t,"ClipboardVisibilityType",(function(){return c})),n.d(t,"MedicalCodeType",(function(){return l})),n.d(t,"ObQuestionnaireQuestion",(function(){return d})),n.d(t,"ObQuestionnaireQuestionType",(function(){return p})),n.d(t,"PatientSelectionMetadataGroup",(function(){return u})),n.d(t,"QuickViewSections",(function(){return m})),n.d(t,"ResponseCode",(function(){return f})),n.d(t,"ResponseValidationFollowUpActionCode",(function(){return b})),n.d(t,"ResponseValidationRejectionReasonCode",(function(){return A})),n.d(t,"AppointmentReminderField",(function(){return h})),n.d(t,"ConversionImportMode",(function(){return M})),n.d(t,"FillStatus",(function(){return O})),n.d(t,"FirmUserPermissionType",(function(){return y})),n.d(t,"PatientSearchMode",(function(){return g})),n.d(t,"PayerLookupSource",(function(){return E}));var i,a,r,o,s,c,l,d,p,u,m,f,b,A,h,M,O,y,g,E,v=n(15),T=n(195);!function(e){e.ACTIVE="ACTIVE",e.INACTIVE="INACTIVE",e.OUT_OF_POCKET="OUT_OF_POCKET",e.NON_COVERED="NON_COVERED",e.CANNOT_PROCESS="CANNOT_PROCESS"}(i||(i={})),function(e){e.VISIBLE_AT_AGE="VISIBLE_AT_AGE"}(a||(a={})),function(e){e.PAST_MEDICAL_CONDITIONS="PAST_MEDICAL_CONDITIONS",e.PAST_SURGERIES="PAST_SURGERIES",e.GYNECOLOGIC_LAST_MENSTRUAL_PERIOD="GYNECOLOGIC_LAST_MENSTRUAL_PERIOD",e.GYNECOLOGIC_LAST_PELVIC_EXAM="GYNECOLOGIC_LAST_PELVIC_EXAM",e.GYNECOLOGIC_LAST_MAMMOGRAM="GYNECOLOGIC_LAST_MAMMOGRAM",e.GYNECOLOGIC_LAST_PAP_SMEAR="GYNECOLOGIC_LAST_PAP_SMEAR",e.OBSTETRIC_GRAVIDA="OBSTETRIC_GRAVIDA",e.OBSTETRIC_PARA="OBSTETRIC_PARA",e.OBSTETRIC_TAB="OBSTETRIC_TAB",e.OBSTETRIC_SAB="OBSTETRIC_SAB",e.PEDIATRIC_AGE_AT_BIRTH="PEDIATRIC_AGE_AT_BIRTH",e.PEDIATRIC_BIRTH_WEIGHT_LBS="PEDIATRIC_BIRTH_WEIGHT_LBS",e.PEDIATRIC_BIRTH_WEIGHT_OZ="PEDIATRIC_BIRTH_WEIGHT_OZ",e.PEDIATRIC_FORCEPS_DELIVERY="PEDIATRIC_FORCEPS_DELIVERY",e.PEDIATRIC_MATERNAL_ILLNESS="PEDIATRIC_MATERNAL_ILLNESS",e.SMOKING_STATUS="SMOKING_STATUS",e.SMOKING_SCREENED="SMOKING_SCREENED",e.SMOKING_START="SMOKING_START",e.SMOKING_STOP="SMOKING_STOP",e.SMOKING_AGE_START="SMOKING_AGE_START",e.SMOKING_PACKS="SMOKING_PACKS",e.SMOKING_YEARS="SMOKING_YEARS",e.SMOKING_PACK_YEARS="SMOKING_PACK_YEARS",e.SMOKING_HOUSEHOLD="SMOKING_HOUSEHOLD",e.SMOKING_NOTES="SMOKING_NOTES",e.SEX_ACTIVE="SEX_ACTIVE",e.SEX_SAME="SEX_SAME",e.SAFE_AT_HOME="SAFE_AT_HOME",e.DRUG_USE="DRUG_USE",e.DRUG_USE_IV="DRUG_USE_IV",e.DRUG_USE_IV_PAST_12_MONTHS="DRUG_USE_IV_PAST_12_MONTHS",e.DRUG_USE_FAMILY="DRUG_USE_FAMILY",e.ALCOHOL_USE="ALCOHOL_USE",e.ALCOHOL_HEAVY_DRINKING="ALCOHOL_HEAVY_DRINKING",e.ALCOHOL_HOUSEHOLD_USE="ALCOHOL_HOUSEHOLD_USE",e.DRIVE_DAYTIME="DRIVE_DAYTIME",e.DRIVE_NIGHTTIME="DRIVE_NIGHTTIME",e.DRIVE_NONE="DRIVE_NONE",e.DRIVE_OTHER="DRIVE_OTHER",e.EXERCISE_FREQUENCY="EXERCISE_FREQUENCY",e.CAFFEINE_FREQUENCY="CAFFEINE_FREQUENCY",e.OCCUPATION="OCCUPATION",e.PLACE_OF_RESIDENCE="PLACE_OF_RESIDENCE",e.CHILDCARE_PERSON="CHILDCARE_PERSON",e.CHILDCARE_FACILITY="CHILDCARE_FACILITY",e.HOUSEHOLD_PERMANENCE="HOUSEHOLD_PERMANENCE",e.HOUSEHOLD_MEMBERS="HOUSEHOLD_MEMBERS",e.HOUSEHOLD_MARITAL_STATUS="HOUSEHOLD_MARITAL_STATUS",e.HOUSEHOLD_DECISION_MAKER="HOUSEHOLD_DECISION_MAKER",e.HOUSEHOLD_CAREGIVER_OCCUPATION="HOUSEHOLD_CAREGIVER_OCCUPATION",e.FOOD_WORRIES_LAST_YEAR="FOOD_WORRIES_LAST_YEAR",e.FOOD_FINANCES_LAST_YEAR="FOOD_FINANCES_LAST_YEAR",e.FOOD_SPECIAL_NUTRITION_PROGRAM="FOOD_SPECIAL_NUTRITION_PROGRAM",e.FOOD_COMMUNITY_SUPPORT_SERVICES="FOOD_COMMUNITY_SUPPORT_SERVICES",e.FOOD_SUPPORT_SERVICES="FOOD_SUPPORT_SERVICES",e.FOOD_COMMUNITY_SUPPORT_SERVICES_NOTES="FOOD_COMMUNITY_SUPPORT_SERVICES_NOTES",e.HOME_UTILITIES_RUNNING_WATER="HOME_UTILITIES_RUNNING_WATER",e.HOME_UTILITIES_ELECRICITY="HOME_UTILITIES_ELECRICITY",e.HOME_UTILITIES_INTERNET="HOME_UTILITIES_INTERNET",e.HOME_SAFETY_GUN_PRESENCE="HOME_SAFETY_GUN_PRESENCE",e.HOME_SAFETY_GUN_SECURITY="HOME_SAFETY_GUN_SECURITY",e.HOME_SAFETY_PETS="HOME_SAFETY_PETS",e.HOME_SAFETY_POOL="HOME_SAFETY_POOL",e.HOME_SAFETY_POOL_FENCE="HOME_SAFETY_POOL_FENCE",e.HOME_SAFETY_SMOKE_DETECTORS="HOME_SAFETY_SMOKE_DETECTORS",e.HOME_SAFETY_CO_DETECTORS="HOME_SAFETY_CO_DETECTORS",e.SOCIAL_HISTORY_OTHER="SOCIAL_HISTORY_OTHER",e.SOCIAL_HISTORY_NONE="SOCIAL_HISTORY_NONE",e.ENT_DISEASE_HISTORY="ENT_DISEASE_HISTORY",e.ENT_SURGICAL_HISTORY="ENT_SURGICAL_HISTORY",e.ENT_FAMILY_HISTORY="ENT_FAMILY_HISTORY",e.ENT_FAMILY_HISTORY_OTHER="ENT_FAMILY_HISTORY_OTHER",e.ENT_PEDIATRIC_HISTORY="ENT_PEDIATRIC_HISTORY",e.ENT_PEDIATRIC_HISTORY_OTHER="ENT_PEDIATRIC_HISTORY_OTHER",e.ORTHO_DISEASE_HISTORY="ORTHO_DISEASE_HISTORY",e.ORTHO_SURGICAL_HISTORY="ORTHO_SURGICAL_HISTORY",e.ORTHO_FAMILY_HISTORY="ORTHO_FAMILY_HISTORY",e.ORTHO_FAMILY_HISTORY_OTHER="ORTHO_FAMILY_HISTORY_OTHER",e.ORTHO_PEDIATRIC_HISTORY="ORTHO_PEDIATRIC_HISTORY",e.ORTHO_PEDIATRIC_HISTORY_OTHER="ORTHO_PEDIATRIC_HISTORY_OTHER",e.ORTHO_INTERVENTIONAL_PAIN_HISTORY="ORTHO_INTERVENTIONAL_PAIN_HISTORY",e.ORTHO_INTERVENTIONAL_PAIN_HISTORY_OTHER="ORTHO_INTERVENTIONAL_PAIN_HISTORY_OTHER",e.PODIATRIC_DISEASE_HISTORY="PODIATRIC_DISEASE_HISTORY",e.PODIATRIC_SURGICAL_HISTORY="PODIATRIC_SURGICAL_HISTORY",e.PODIATRIC_FAMILY_HISTORY="PODIATRIC_FAMILY_HISTORY",e.PODIATRIC_FAMILY_HISTORY_OTHER="PODIATRIC_FAMILY_HISTORY_OTHER",e.PODIATRIC_PEDIATRIC_HISTORY="PODIATRIC_PEDIATRIC_HISTORY",e.PODIATRIC_PEDIATRIC_HISTORY_OTHER="PODIATRIC_PEDIATRIC_HISTORY_OTHER",e.OPHTH_OCULAR_HISTORY="OPHTH_OCULAR_HISTORY",e.OPHTH_SURGICAL_HISTORY="OPHTH_SURGICAL_HISTORY",e.PLASTICS_SURGERY_HISTORY="PLASTICS_SURGERY_HISTORY",e.PLASTICS_HAS_BREAST_CANCER_HISTORY="PLASTICS_HAS_BREAST_CANCER_HISTORY",e.PLASTICS_BREAST_CANCER_HISTORY="PLASTICS_BREAST_CANCER_HISTORY",e.PLASTICS_BREAST_CANCER_HISTORY_OTHER="PLASTICS_BREAST_CANCER_HISTORY_OTHER",e.PLASTICS_HAS_ANESTHESIA_HISTORY="PLASTICS_HAS_ANESTHESIA_HISTORY",e.PLASTICS_ANESTHESIA_HISTORY="PLASTICS_ANESTHESIA_HISTORY",e.PLASTICS_ANESTHESIA_HISTORY_OTHER="PLASTICS_ANESTHESIA_HISTORY_OTHER",e.PLASTICS_HAS_HERBAL_MEDICATIONS="PLASTICS_HAS_HERBAL_MEDICATIONS",e.PLASTICS_HERBAL_MEDICATIONS="PLASTICS_HERBAL_MEDICATIONS",e.PLASTICS_HERBAL_MEDICATIONS_OTHER="PLASTICS_HERBAL_MEDICATIONS_OTHER",e.SKIN_CONDITION_HISTORY="SKIN_CONDITION_HISTORY",e.SUNSCREEN_USE="SUNSCREEN_USE",e.SPF_LEVEL="SPF_LEVEL",e.TANNING_SALON_USE="TANNING_SALON_USE",e.FAMILY_HISTORY_HAS_MELANOMA="FAMILY_HISTORY_HAS_MELANOMA",e.FAMILY_HISTORY_OF_MELANOMA="FAMILY_HISTORY_OF_MELANOMA",e.FAMILY_HISTORY_OF_MELANOMA_OTHER="FAMILY_HISTORY_OF_MELANOMA_OTHER",e.GYN_PROBLEMS="GYN_PROBLEMS",e.GYN_CANCER_HISTORY="GYN_CANCER_HISTORY",e.BREAST_HISTORY="BREAST_HISTORY",e.REPRODUCTIVE_STAGE="REPRODUCTIVE_STAGE",e.TRYING_TO_CONCEIVE="TRYING_TO_CONCEIVE",e.LACTATING="LACTATING",e.REPRODUCTIVE_STAGE_OTHER="REPRODUCTIVE_STAGE_OTHER",e.AGE_AT_MENARCHE="AGE_AT_MENARCHE",e.AVERAGE_CYCLE_LENGTH="AVERAGE_CYCLE_LENGTH",e.AVERAGE_CYCLE_LENGTH_FREQUENCY="AVERAGE_CYCLE_LENGTH_FREQUENCY",e.MENSES_DURATION="MENSES_DURATION",e.MENSTRUAL_HISTORY_OTHER="MENSTRUAL_HISTORY_OTHER",e.CONTRACEPTION_HISTORY="CONTRACEPTION_HISTORY",e.STD_HISTORY="STD_HISTORY",e.HPV_VACCINE_RECEIVED="HPV_VACCINE_RECEIVED",e.HPV_VACCINE_DOSAGE="HPV_VACCINE_DOSAGE",e.HPV_VACCINE_FIRST_DOSE="HPV_VACCINE_FIRST_DOSE",e.HPV_VACCINE_HISTORY_OTHER="HPV_VACCINE_HISTORY_OTHER",e.HORMONE_REPLACEMENT_THERAPY_USAGE="HORMONE_REPLACEMENT_THERAPY_USAGE",e.HORMONE_REPLACEMENT_HISTORY_OTHER="HORMONE_REPLACEMENT_HISTORY_OTHER",e.INFERTILITY_HISTORY="INFERTILITY_HISTORY",e.INFERTILITY_CAUSES="INFERTILITY_CAUSES",e.INFERTILITY_TREATMENT="INFERTILITY_TREATMENT",e.INFERTILITY_HISTORY_OTHER="INFERTILITY_HISTORY_OTHER",e.PREGNANCY_COMPLICATIONS_DELIVERY="PREGNANCY_COMPLICATIONS_DELIVERY",e.PREGNANCY_COMPLICATIONS_MISCARRIAGE="PREGNANCY_COMPLICATIONS_MISCARRIAGE",e.PREGNANCY_COMPLICATIONS_ABORTION="PREGNANCY_COMPLICATIONS_ABORTION",e.PREGNANCY_COMPLICATIONS_ECTOPIC="PREGNANCY_COMPLICATIONS_ECTOPIC",e.PAST_PREGNANCIES="PAST_PREGNANCIES",e.OB_HISTORY_OTHER="OB_HISTORY_OTHER",e.PEDIATRIC_GYNECOLOGICAL_LAST_PERIOD_DAY="PEDIATRIC_GYNECOLOGICAL_LAST_PERIOD_DAY",e.PEDIATRIC_GYNECOLOGICAL_FIRST_PERIOD_AGE="PEDIATRIC_GYNECOLOGICAL_FIRST_PERIOD_AGE",e.PEDIATRIC_GYNECOLOGICAL_PERIOD_DURATION="PEDIATRIC_GYNECOLOGICAL_PERIOD_DURATION",e.PEDIATRIC_GYNECOLOGICAL_HAVE_REGULAR_PERIODS="PEDIATRIC_GYNECOLOGICAL_HAVE_REGULAR_PERIODS",e.PEDIATRIC_GYNECOLOGICAL_HAVE_HEAVY_PERIODS="PEDIATRIC_GYNECOLOGICAL_HAVE_HEAVY_PERIODS",e.PEDIATRIC_GYNECOLOGICAL_HAVE_PAINFUL_PERIODS="PEDIATRIC_GYNECOLOGICAL_HAVE_PAINFUL_PERIODS",e.PEDIATRIC_GYNECOLOGICAL_HISTORY_NOTES="PEDIATRIC_GYNECOLOGICAL_HISTORY_NOTES"}(r||(r={})),function(e){e.BOOLEAN="BOOLEAN",e.DATE="DATE",e.OPTION="OPTION",e.NUMBER="NUMBER",e.STRING="STRING",e.CHECKBOX="CHECKBOX",e.MEDICAL_CODE="MEDICAL_CODE",e.HIDDEN="HIDDEN",e.BOOLEAN_WITH_OPTOUT="BOOLEAN_WITH_OPTOUT"}(o||(o={})),function(e){e.CLIPBOARD="CLIPBOARD",e.NEW_PATIENT="NEW_PATIENT",e.EXISTING_PATIENT="EXISTING_PATIENT",e.PATIENT_PORTAL="PATIENT_PORTAL"}(s||(s={})),function(e){e.SHOW="SHOW",e.HIDE="HIDE",e.LOCK_SHOW="LOCK_SHOW",e.LOCK_HIDE="LOCK_HIDE"}(c||(c={})),function(e){e.ICD9="ICD9",e.ICD10="ICD10",e.SNOMED="SNOMED"}(l||(l={})),function(e){e.GENETIC_SCREENING_NONE="GENETIC_SCREENING_NONE",e.CONGENITAL_HEART_DEFECT_HEADING="CONGENITAL_HEART_DEFECT_HEADING",e.CONGENITAL_HEART_DEFECT_PATIENT_POSITIVE="CONGENITAL_HEART_DEFECT_PATIENT_POSITIVE",e.CONGENITAL_HEART_DEFECT_PATIENT_NEGATIVE="CONGENITAL_HEART_DEFECT_PATIENT_NEGATIVE",e.CONGENITAL_HEART_DEFECT_PATIENT_NOT_PERFORMED="CONGENITAL_HEART_DEFECT_PATIENT_NOT_PERFORMED",e.CONGENITAL_HEART_DEFECT_FATHER_POSITIVE="CONGENITAL_HEART_DEFECT_FATHER_POSITIVE",e.CONGENITAL_HEART_DEFECT_FATHER_NEGATIVE="CONGENITAL_HEART_DEFECT_FATHER_NEGATIVE",e.CONGENITAL_HEART_DEFECT_FATHER_NOT_PERFORMED="CONGENITAL_HEART_DEFECT_FATHER_NOT_PERFORMED",e.CONGENITAL_HEART_DEFECT_OTHER_POSITIVE="CONGENITAL_HEART_DEFECT_OTHER_POSITIVE",e.CONGENITAL_HEART_DEFECT_OTHER_NEGATIVE="CONGENITAL_HEART_DEFECT_OTHER_NEGATIVE",e.CONGENITAL_HEART_DEFECT_OTHER_NOT_PERFORMED="CONGENITAL_HEART_DEFECT_OTHER_NOT_PERFORMED",e.CONGENITAL_HEART_DEFECT_NOTES="CONGENITAL_HEART_DEFECT_NOTES",e.NEURAL_TUBE_DEFECT_HEADING="NEURAL_TUBE_DEFECT_HEADING",e.NEURAL_TUBE_DEFECT_PATIENT_POSITIVE="NEURAL_TUBE_DEFECT_PATIENT_POSITIVE",e.NEURAL_TUBE_DEFECT_PATIENT_NEGATIVE="NEURAL_TUBE_DEFECT_PATIENT_NEGATIVE",e.NEURAL_TUBE_DEFECT_PATIENT_NOT_PERFORMED="NEURAL_TUBE_DEFECT_PATIENT_NOT_PERFORMED",e.NEURAL_TUBE_DEFECT_FATHER_POSITIVE="NEURAL_TUBE_DEFECT_FATHER_POSITIVE",e.NEURAL_TUBE_DEFECT_FATHER_NEGATIVE="NEURAL_TUBE_DEFECT_FATHER_NEGATIVE",e.NEURAL_TUBE_DEFECT_FATHER_NOT_PERFORMED="NEURAL_TUBE_DEFECT_FATHER_NOT_PERFORMED",e.NEURAL_TUBE_DEFECT_OTHER_POSITIVE="NEURAL_TUBE_DEFECT_OTHER_POSITIVE",e.NEURAL_TUBE_DEFECT_OTHER_NEGATIVE="NEURAL_TUBE_DEFECT_OTHER_NEGATIVE",e.NEURAL_TUBE_DEFECT_OTHER_NOT_PERFORMED="NEURAL_TUBE_DEFECT_OTHER_NOT_PERFORMED",e.NEURAL_TUBE_DEFECT_NOTES="NEURAL_TUBE_DEFECT_NOTES",e.HEMOGLOBINOPATHY_OR_CARRIER_HEADING="HEMOGLOBINOPATHY_OR_CARRIER_HEADING",e.HEMOGLOBINOPATHY_OR_CARRIER_PATIENT_POSITIVE="HEMOGLOBINOPATHY_OR_CARRIER_PATIENT_POSITIVE",e.HEMOGLOBINOPATHY_OR_CARRIER_PATIENT_NEGATIVE="HEMOGLOBINOPATHY_OR_CARRIER_PATIENT_NEGATIVE",e.HEMOGLOBINOPATHY_OR_CARRIER_PATIENT_NOT_PERFORMED="HEMOGLOBINOPATHY_OR_CARRIER_PATIENT_NOT_PERFORMED",e.HEMOGLOBINOPATHY_OR_CARRIER_FATHER_POSITIVE="HEMOGLOBINOPATHY_OR_CARRIER_FATHER_POSITIVE",e.HEMOGLOBINOPATHY_OR_CARRIER_FATHER_NEGATIVE="HEMOGLOBINOPATHY_OR_CARRIER_FATHER_NEGATIVE",e.HEMOGLOBINOPATHY_OR_CARRIER_FATHER_NOT_PERFORMED="HEMOGLOBINOPATHY_OR_CARRIER_FATHER_NOT_PERFORMED",e.HEMOGLOBINOPATHY_OR_CARRIER_OTHER_POSITIVE="HEMOGLOBINOPATHY_OR_CARRIER_OTHER_POSITIVE",e.HEMOGLOBINOPATHY_OR_CARRIER_OTHER_NEGATIVE="HEMOGLOBINOPATHY_OR_CARRIER_OTHER_NEGATIVE",e.HEMOGLOBINOPATHY_OR_CARRIER_OTHER_NOT_PERFORMED="HEMOGLOBINOPATHY_OR_CARRIER_OTHER_NOT_PERFORMED",e.HEMOGLOBINOPATHY_OR_CARRIER_NOTES="HEMOGLOBINOPATHY_OR_CARRIER_NOTES",e.CYSTIC_FIBROSIS_HEADING="CYSTIC_FIBROSIS_HEADING",e.CYSTIC_FIBROSIS_PATIENT_POSITIVE="CYSTIC_FIBROSIS_PATIENT_POSITIVE",e.CYSTIC_FIBROSIS_PATIENT_NEGATIVE="CYSTIC_FIBROSIS_PATIENT_NEGATIVE",e.CYSTIC_FIBROSIS_PATIENT_NOT_PERFORMED="CYSTIC_FIBROSIS_PATIENT_NOT_PERFORMED",e.CYSTIC_FIBROSIS_FATHER_POSITIVE="CYSTIC_FIBROSIS_FATHER_POSITIVE",e.CYSTIC_FIBROSIS_FATHER_NEGATIVE="CYSTIC_FIBROSIS_FATHER_NEGATIVE",e.CYSTIC_FIBROSIS_FATHER_NOT_PERFORMED="CYSTIC_FIBROSIS_FATHER_NOT_PERFORMED",e.CYSTIC_FIBROSIS_OTHER_POSITIVE="CYSTIC_FIBROSIS_OTHER_POSITIVE",e.CYSTIC_FIBROSIS_OTHER_NEGATIVE="CYSTIC_FIBROSIS_OTHER_NEGATIVE",e.CYSTIC_FIBROSIS_OTHER_NOT_PERFORMED="CYSTIC_FIBROSIS_OTHER_NOT_PERFORMED",e.CYSTIC_FIBROSIS_NOTES="CYSTIC_FIBROSIS_NOTES",e.CHROMOSOME_ABNORMALITY_HEADING="CHROMOSOME_ABNORMALITY_HEADING",e.CHROMOSOME_ABNORMALITY_PATIENT_POSITIVE="CHROMOSOME_ABNORMALITY_PATIENT_POSITIVE",e.CHROMOSOME_ABNORMALITY_PATIENT_NEGATIVE="CHROMOSOME_ABNORMALITY_PATIENT_NEGATIVE",e.CHROMOSOME_ABNORMALITY_PATIENT_NOT_PERFORMED="CHROMOSOME_ABNORMALITY_PATIENT_NOT_PERFORMED",e.CHROMOSOME_ABNORMALITY_FATHER_POSITIVE="CHROMOSOME_ABNORMALITY_FATHER_POSITIVE",e.CHROMOSOME_ABNORMALITY_FATHER_NEGATIVE="CHROMOSOME_ABNORMALITY_FATHER_NEGATIVE",e.CHROMOSOME_ABNORMALITY_FATHER_NOT_PERFORMED="CHROMOSOME_ABNORMALITY_FATHER_NOT_PERFORMED",e.CHROMOSOME_ABNORMALITY_OTHER_POSITIVE="CHROMOSOME_ABNORMALITY_OTHER_POSITIVE",e.CHROMOSOME_ABNORMALITY_OTHER_NEGATIVE="CHROMOSOME_ABNORMALITY_OTHER_NEGATIVE",e.CHROMOSOME_ABNORMALITY_OTHER_NOT_PERFORMED="CHROMOSOME_ABNORMALITY_OTHER_NOT_PERFORMED",e.CHROMOSOME_ABNORMALITY_NOTES="CHROMOSOME_ABNORMALITY_NOTES",e.TAY_SACHS_HEADING="TAY_SACHS_HEADING",e.TAY_SACHS_PATIENT_POSITIVE="TAY_SACHS_PATIENT_POSITIVE",e.TAY_SACHS_PATIENT_NEGATIVE="TAY_SACHS_PATIENT_NEGATIVE",e.TAY_SACHS_PATIENT_NOT_PERFORMED="TAY_SACHS_PATIENT_NOT_PERFORMED",e.TAY_SACHS_FATHER_POSITIVE="TAY_SACHS_FATHER_POSITIVE",e.TAY_SACHS_FATHER_NEGATIVE="TAY_SACHS_FATHER_NEGATIVE",e.TAY_SACHS_FATHER_NOT_PERFORMED="TAY_SACHS_FATHER_NOT_PERFORMED",e.TAY_SACHS_OTHER_POSITIVE="TAY_SACHS_OTHER_POSITIVE",e.TAY_SACHS_OTHER_NEGATIVE="TAY_SACHS_OTHER_NEGATIVE",e.TAY_SACHS_OTHER_NOT_PERFORMED="TAY_SACHS_OTHER_NOT_PERFORMED",e.TAY_SACHS_NOTES="TAY_SACHS_NOTES",e.HEMOPHILIA_HEADING="HEMOPHILIA_HEADING",e.HEMOPHILIA_PATIENT_POSITIVE="HEMOPHILIA_PATIENT_POSITIVE",e.HEMOPHILIA_PATIENT_NEGATIVE="HEMOPHILIA_PATIENT_NEGATIVE",e.HEMOPHILIA_PATIENT_NOT_PERFORMED="HEMOPHILIA_PATIENT_NOT_PERFORMED",e.HEMOPHILIA_FATHER_POSITIVE="HEMOPHILIA_FATHER_POSITIVE",e.HEMOPHILIA_FATHER_NEGATIVE="HEMOPHILIA_FATHER_NEGATIVE",e.HEMOPHILIA_FATHER_NOT_PERFORMED="HEMOPHILIA_FATHER_NOT_PERFORMED",e.HEMOPHILIA_OTHER_POSITIVE="HEMOPHILIA_OTHER_POSITIVE",e.HEMOPHILIA_OTHER_NEGATIVE="HEMOPHILIA_OTHER_NEGATIVE",e.HEMOPHILIA_OTHER_NOT_PERFORMED="HEMOPHILIA_OTHER_NOT_PERFORMED",e.HEMOPHILIA_NOTES="HEMOPHILIA_NOTES",e.INTELLECTUAL_DISABILITY_AUTISM_HEADING="INTELLECTUAL_DISABILITY_AUTISM_HEADING",e.INTELLECTUAL_DISABILITY_AUTISM_PATIENT_POSITIVE="INTELLECTUAL_DISABILITY_AUTISM_PATIENT_POSITIVE",e.INTELLECTUAL_DISABILITY_AUTISM_PATIENT_NEGATIVE="INTELLECTUAL_DISABILITY_AUTISM_PATIENT_NEGATIVE",e.INTELLECTUAL_DISABILITY_AUTISM_PATIENT_NOT_PERFORMED="INTELLECTUAL_DISABILITY_AUTISM_PATIENT_NOT_PERFORMED",e.INTELLECTUAL_DISABILITY_AUTISM_FATHER_POSITIVE="INTELLECTUAL_DISABILITY_AUTISM_FATHER_POSITIVE",e.INTELLECTUAL_DISABILITY_AUTISM_FATHER_NEGATIVE="INTELLECTUAL_DISABILITY_AUTISM_FATHER_NEGATIVE",e.INTELLECTUAL_DISABILITY_AUTISM_FATHER_NOT_PERFORMED="INTELLECTUAL_DISABILITY_AUTISM_FATHER_NOT_PERFORMED",e.INTELLECTUAL_DISABILITY_AUTISM_OTHER_POSITIVE="INTELLECTUAL_DISABILITY_AUTISM_OTHER_POSITIVE",e.INTELLECTUAL_DISABILITY_AUTISM_OTHER_NEGATIVE="INTELLECTUAL_DISABILITY_AUTISM_OTHER_NEGATIVE",e.INTELLECTUAL_DISABILITY_AUTISM_OTHER_NOT_PERFORMED="INTELLECTUAL_DISABILITY_AUTISM_OTHER_NOT_PERFORMED",e.INTELLECTUAL_DISABILITY_AUTISM_NOTES="INTELLECTUAL_DISABILITY_AUTISM_NOTES",e.RECURRENT_PREGNANCY_LOSS_STILLBIRTH_HEADING="RECURRENT_PREGNANCY_LOSS_STILLBIRTH_HEADING",e.RECURRENT_PREGNANCY_LOSS_STILLBIRTH_PATIENT_POSITIVE="RECURRENT_PREGNANCY_LOSS_STILLBIRTH_PATIENT_POSITIVE",e.RECURRENT_PREGNANCY_LOSS_STILLBIRTH_PATIENT_NEGATIVE="RECURRENT_PREGNANCY_LOSS_STILLBIRTH_PATIENT_NEGATIVE",e.RECURRENT_PREGNANCY_LOSS_STILLBIRTH_PATIENT_NOT_PERFORMED="RECURRENT_PREGNANCY_LOSS_STILLBIRTH_PATIENT_NOT_PERFORMED",e.RECURRENT_PREGNANCY_LOSS_STILLBIRTH_OTHER_POSITIVE="RECURRENT_PREGNANCY_LOSS_STILLBIRTH_OTHER_POSITIVE",e.RECURRENT_PREGNANCY_LOSS_STILLBIRTH_OTHER_NEGATIVE="RECURRENT_PREGNANCY_LOSS_STILLBIRTH_OTHER_NEGATIVE",e.RECURRENT_PREGNANCY_LOSS_STILLBIRTH_OTHER_NOT_PERFORMED="RECURRENT_PREGNANCY_LOSS_STILLBIRTH_OTHER_NOT_PERFORMED",e.RECURRENT_PREGNANCY_LOSS_STILLBIRTH_NOTES="RECURRENT_PREGNANCY_LOSS_STILLBIRTH_NOTES",e.GENETIC_SCREENING_OTHER="GENETIC_SCREENING_OTHER",e.GENETIC_SCREENING_OTHER_NOTES="GENETIC_SCREENING_OTHER_NOTES",e.PRESCRIPTION_MEDICATION_YES="PRESCRIPTION_MEDICATION_YES",e.PRESCRIPTION_MEDICATION_NO="PRESCRIPTION_MEDICATION_NO",e.PRESCRIPTION_MEDICATION_NOTES="PRESCRIPTION_MEDICATION_NOTES",e.OVER_THE_COUNTER_MEDICATION_YES="OVER_THE_COUNTER_MEDICATION_YES",e.OVER_THE_COUNTER_MEDICATION_NO="OVER_THE_COUNTER_MEDICATION_NO",e.OVER_THE_COUNTER_MEDICATION_NOTES="OVER_THE_COUNTER_MEDICATION_NOTES",e.DRINKING_ALCOHOL_YES="DRINKING_ALCOHOL_YES",e.DRINKING_ALCOHOL_NO="DRINKING_ALCOHOL_NO",e.DRINKING_ALCOHOL_NOTES="DRINKING_ALCOHOL_NOTES",e.ILLICIT_DRUGS_YES="ILLICIT_DRUGS_YES",e.ILLICIT_DRUGS_NO="ILLICIT_DRUGS_NO",e.ILLICIT_DRUGS_NOTES="ILLICIT_DRUGS_NOTES",e.DIABETES_YES="DIABETES_YES",e.DIABETES_NO="DIABETES_NO",e.DIABETES_HEMOGLOBIN_A1C="DIABETES_HEMOGLOBIN_A1C",e.MOTHER_EXPOSED_TO_DES_YES="MOTHER_EXPOSED_TO_DES_YES",e.MOTHER_EXPOSED_TO_DES_NO="MOTHER_EXPOSED_TO_DES_NO",e.MOTHER_EXPOSED_TO_DES_NOTES="MOTHER_EXPOSED_TO_DES_NOTES",e.CONGENITAL_UTERINE_ANOMALY_YES="CONGENITAL_UTERINE_ANOMALY_YES",e.CONGENITAL_UTERINE_ANOMALY_NO="CONGENITAL_UTERINE_ANOMALY_NO",e.CONGENITAL_UTERINE_ANOMALY_NOTES="CONGENITAL_UTERINE_ANOMALY_NOTES",e.TERATOGEN_EXPOSURE_NOTES="TERATOGEN_EXPOSURE_NOTES",e.EXPOSED_TO_TB_YES="EXPOSED_TO_TB_YES",e.EXPOSED_TO_TB_NO="EXPOSED_TO_TB_NO",e.EXPOSED_TO_TB_NOTES="EXPOSED_TO_TB_NOTES",e.RASH_OR_VIRAL_ILLNESS_YES="RASH_OR_VIRAL_ILLNESS_YES",e.RASH_OR_VIRAL_ILLNESS_NO="RASH_OR_VIRAL_ILLNESS_NO",e.RASH_OR_VIRAL_ILLNESS_NOTES="RASH_OR_VIRAL_ILLNESS_NOTES",e.PRIOR_GBS_INFECTED_CHILD_YES="PRIOR_GBS_INFECTED_CHILD_YES",e.PRIOR_GBS_INFECTED_CHILD_NO="PRIOR_GBS_INFECTED_CHILD_NO",e.PRIOR_GBS_INFECTED_CHILD_NOTES="PRIOR_GBS_INFECTED_CHILD_NOTES",e.HISTORY_OF_HIV_INFECTION_YES="HISTORY_OF_HIV_INFECTION_YES",e.HISTORY_OF_HIV_INFECTION_NO="HISTORY_OF_HIV_INFECTION_NO",e.HISTORY_OF_HIV_INFECTION_NOTES="HISTORY_OF_HIV_INFECTION_NOTES",e.HISTORY_OF_HEPATITIS_YES="HISTORY_OF_HEPATITIS_YES",e.HISTORY_OF_HEPATITIS_NO="HISTORY_OF_HEPATITIS_NO",e.HISTORY_OF_HEPATITIS_NOTES="HISTORY_OF_HEPATITIS_NOTES",e.RECENT_EXPOSURE_TO_ZIKA_VIRUS_PATIENT_YES="RECENT_EXPOSURE_TO_ZIKA_VIRUS_PATIENT_YES",e.RECENT_EXPOSURE_TO_ZIKA_VIRUS_PARTNER_YES="RECENT_EXPOSURE_TO_ZIKA_VIRUS_PARTNER_YES",e.RECENT_EXPOSURE_TO_ZIKA_VIRUS_PATIENT_AND_PARTNER_YES="RECENT_EXPOSURE_TO_ZIKA_VIRUS_PATIENT_AND_PARTNER_YES",e.RECENT_EXPOSURE_TO_ZIKA_VIRUS_PATIENT_AND_PARTNER_NO="RECENT_EXPOSURE_TO_ZIKA_VIRUS_PATIENT_AND_PARTNER_NO",e.RECENT_EXPOSURE_TO_ZIKA_VIRUS_NOTES="RECENT_EXPOSURE_TO_ZIKA_VIRUS_NOTES",e.RECENT_TRAVEL_HISTORY_PATIENT_YES="RECENT_TRAVEL_HISTORY_PATIENT_YES",e.RECENT_TRAVEL_HISTORY_PARTNER_YES="RECENT_TRAVEL_HISTORY_PARTNER_YES",e.RECENT_TRAVEL_HISTORY_PATIENT_AND_PARTNER_YES="RECENT_TRAVEL_HISTORY_PATIENT_AND_PARTNER_YES",e.RECENT_TRAVEL_HISTORY_PATIENT_AND_PARTNER_NO="RECENT_TRAVEL_HISTORY_PATIENT_AND_PARTNER_NO",e.RECENT_TRAVEL_HISTORY_NOTES="RECENT_TRAVEL_HISTORY_NOTES",e.HISTORY_OF_GENITAL_HERPES_PATIENT_YES="HISTORY_OF_GENITAL_HERPES_PATIENT_YES",e.HISTORY_OF_GENITAL_HERPES_PARTNER_YES="HISTORY_OF_GENITAL_HERPES_PARTNER_YES",e.HISTORY_OF_GENITAL_HERPES_PATIENT_AND_PARTNER_YES="HISTORY_OF_GENITAL_HERPES_PATIENT_AND_PARTNER_YES",e.HISTORY_OF_GENITAL_HERPES_PATIENT_AND_PARTNER_NO="HISTORY_OF_GENITAL_HERPES_PATIENT_AND_PARTNER_NO",e.HISTORY_OF_GENITAL_HERPES_NOTES="HISTORY_OF_GENITAL_HERPES_NOTES",e.HISTORY_OF_OTHER_STIS_NONE="HISTORY_OF_OTHER_STIS_NONE",e.HISTORY_OF_OTHER_STIS_CHLAMYDIAL_INFECTION="HISTORY_OF_OTHER_STIS_CHLAMYDIAL_INFECTION",e.HISTORY_OF_OTHER_STIS_GONORRHEA="HISTORY_OF_OTHER_STIS_GONORRHEA",e.HISTORY_OF_OTHER_STIS_HPV="HISTORY_OF_OTHER_STIS_HPV",e.HISTORY_OF_OTHER_STIS_PELVIC_INFLAMMATORY_DISEASE="HISTORY_OF_OTHER_STIS_PELVIC_INFLAMMATORY_DISEASE",e.HISTORY_OF_OTHER_STIS_SYPHILIS="HISTORY_OF_OTHER_STIS_SYPHILIS",e.HISTORY_OF_OTHER_STIS_TRICHOMONAS_INFECTION="HISTORY_OF_OTHER_STIS_TRICHOMONAS_INFECTION",e.HISTORY_OF_OTHER_STIS_OTHER="HISTORY_OF_OTHER_STIS_OTHER",e.HISTORY_OF_OTHER_STIS_OTHER_NOTES="HISTORY_OF_OTHER_STIS_OTHER_NOTES",e.INFECTION_HISTORY_NOTES="INFECTION_HISTORY_NOTES"}(d||(d={})),function(e){e.EXPANDABLE="EXPANDABLE",e.CHECKBOX="CHECKBOX",e.RADIO="RADIO",e.TEXT="TEXT",e.TEXTAREA="TEXTAREA"}(p||(p={})),function(e){e.TIMELINE_CATEGORY="TIMELINE_CATEGORY"}(u||(u={})),function(e){e.MEDICATION="MEDICATION",e.ORDERS="ORDERS",e.ATTACHMENTS="ATTACHMENTS",e.OB_MANAGEMENT_LIST="OB_MANAGEMENT_LIST",e.PROBLEM_LIST="PROBLEM_LIST",e.OB_MEDICAL_CONTAINER="OB_MEDICAL_CONTAINER",e.VBC_PROBLEM_LIST="VBC_PROBLEM_LIST"}(m||(m={})),function(e){e.N="N",e.Y="Y"}(f||(f={})),function(e){e.C="C",e.N="N",e.P="P",e.R="R",e.S="S",e.W="W",e.X="X",e.Y="Y"}(b||(b={})),function(e){e.N_04="N_04",e.N_41="N_41",e.N_42="N_42",e.N_79="N_79",e.N_15="N_15",e.N_33="N_33",e.N_35="N_35",e.N_52="N_52",e.N_53="N_53",e.N_43="N_43",e.N_44="N_44",e.N_45="N_45",e.N_46="N_46",e.N_47="N_47",e.N_48="N_48",e.N_49="N_49",e.N_50="N_50",e.N_51="N_51",e.N_97="N_97",e.N_T4="N_T4",e.N_54="N_54",e.N_55="N_55",e.N_56="N_56",e.N_57="N_57",e.N_58="N_58",e.N_60="N_60",e.N_61="N_61",e.N_62="N_62",e.N_63="N_63",e.N_69="N_69",e.N_70="N_70",e.N_71="N_71",e.N_72="N_72",e.N_73="N_73",e.N_74="N_74",e.N_75="N_75",e.N_76="N_76",e.N_78="N_78",e.N_64="N_64",e.N_65="N_65",e.N_66="N_66",e.N_67="N_67",e.N_68="N_68",e.N_77="N_77",e.N_80="N_80",e.UNKNOWN="UNKNOWN"}(A||(A={})),function(e){e.APPOINTMENT_ID="APPOINTMENT_ID",e.APPOINTMENT_TYPE="APPOINTMENT_TYPE",e.APPOINTMENT_STATUS="APPOINTMENT_STATUS",e.APPOINTMENT_DATE="APPOINTMENT_DATE",e.APPOINTMENT_TIME="APPOINTMENT_TIME",e.PATIENT_MRN="PATIENT_MRN",e.PATIENT_FIRST_NAME="PATIENT_FIRST_NAME",e.PATIENT_LAST_NAME="PATIENT_LAST_NAME",e.PATIENT_MOBILE_NUMBER="PATIENT_MOBILE_NUMBER",e.PATIENT_HOME_NUMBER="PATIENT_HOME_NUMBER",e.PATIENT_EMAIL="PATIENT_EMAIL",e.PATIENT_DOB="PATIENT_DOB",e.PROVIDER_FIRST_NAME="PROVIDER_FIRST_NAME",e.PROVIDER_LAST_NAME="PROVIDER_LAST_NAME",e.LOCATION_NAME="LOCATION_NAME",e.APPOINTMENT_CREATED_DATE="APPOINTMENT_CREATED_DATE",e.LANGUAGE="LANGUAGE",e.PREFERRED_CONTACT_METHOD="PREFERRED_CONTACT_METHOD"}(h||(h={})),function(e){e.INSERT="INSERT",e.INSERT_ONLY="INSERT_ONLY",e.UPDATE="UPDATE",e.UPDATE_INSERT="UPDATE_INSERT",e.DRYRUN="DRYRUN"}(M||(M={})),function(e){e.FILLED="FILLED",e.NOT_FILLED="NOT_FILLED",e.PARTIAL_FILLED="PARTIAL_FILLED",e.DISPENSED="DISPENSED",e.PARTIALLY_DISPENSED="PARTIALLY_DISPENSED",e.NOT_DISPENSED="NOT_DISPENSED",e.TRANSFERRED="TRANSFERRED"}(O||(O={})),function(e){e.TAXPAYER_ID="TAXPAYER_ID"}(y||(y={})),function(e){e.PMS_ID="PMS_ID",e.EMA_ID="EMA_ID",e.FIRST_MIDDLE_LAST_DOB="FIRST_MIDDLE_LAST_DOB",e.FIRST_LAST_DOB="FIRST_LAST_DOB",e.FIRST_LAST_DOB_MRN="FIRST_LAST_DOB_MRN",e.FIRST_LAST_DOB_MRN_OPTIONAL="FIRST_LAST_DOB_MRN_OPTIONAL",e.PRE_MATCH_PMS_ID="PRE_MATCH_PMS_ID",e.FIRST_LAST_DOB_PMS_ID="FIRST_LAST_DOB_PMS_ID",e.FIRST_DOB_PMS_ID="FIRST_DOB_PMS_ID",e.FIRST_LAST_DOB_GENDER="FIRST_LAST_DOB_GENDER",e.FIRST_LAST_DOB_GENDER_MRN="FIRST_LAST_DOB_GENDER_MRN",e.FIRST_LAST_DOB_GENDER_MRN_OPTIONAL="FIRST_LAST_DOB_GENDER_MRN_OPTIONAL"}(g||(g={})),function(e){e.GEDI="GEDI",e.GEDI_WC="GEDI_WC",e.GEDI_VISION="GEDI_VISION",e.ADMIN_GOVERNMENT_MEDICARE="ADMIN_GOVERNMENT_MEDICARE",e.GEDI_INSTITUTIONAL="GEDI_INSTITUTIONAL",e.GEDI_DME="GEDI_DME"}(E||(E={}))},function(e,t,n){e.exports=n(11)(250)},function(e,t,n){e.exports=n(11)(832)},function(e,t,n){"use strict";var i,a;function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n0)for(;e.length0)for(;e.lengths.length&&(c=(s=i(s,r,c)).length),s.slice(0,c)+t+s.slice(c)}function o(e){for(;"0"===e.charAt(0)&&"."!==e.charAt(1);)e=e.slice(1);for(;"0"===e.charAt(e.length-1)&&e.indexOf(".")>=0||"."===e.charAt(e.length-1);)e=e.slice(0,e.length-1);return e}function s(e){var n=Array.prototype.slice.call(arguments,1);return e?t.tz.apply(t,r(n.concat(e))):t.apply(t,n)}function c(n,i,a){return e.isNil(n)||e.isNil(i)?null:t(i).diff(t(n),a||"seconds")}function l(){return t.utc(t().format("YYYY-MM-DD"))}function d(e){return e&&t(e).utc().startOf("day")}function p(t,n,i){var a=e(t).map("position").max();if(t&&t.length>1&&n&&i>=1&&i<=a){var r=e.find(t,{position:i});if(r){var o=r.position;return r.position=n.position,n.position=o,r}}}return{getContextPath:function(){return window&&window.APP&&window.APP.contextPath||"/ema"},padLeft:n,padRight:i,shiftSubstr:a,replaceAll:function(e,t,n){return e.replace(new RegExp(t.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"),"g"),n)},trimZeroes:o,shiftDecimalPoint:function(e,t){return e.indexOf(".")<0&&(e+=".0"),o(a(e,".",t,"0"))},shortDuration:function(e,n){var i=t(e),a=t(n);if(e&&n&&i.isValid()&&a.isValid())return i.isBefore(a)?r(i,a):r(a,i);function r(e,n){var i=n-e,a=t.duration(i).minutes(),r=t.duration(i).hours(),o=Math.floor(t.duration(i).asDays()),s=[];return o&&s.push(o+"d"),r&&s.push(r+"h"),a&&s.push(a+"m"),s.join(" ")}},adjustDateToTimeZone:function(e,n){if(!n)return t(e);var i=t(e).utcOffset()-s(n,e).utcOffset();return t(e).subtract(i,"minutes")},adjustDateFromTimeZone:function(e,n){if(!n)return t(e);var i=t(e).utcOffset()-s(n,e).utcOffset();return t(e).add(i,"minutes")},momentOptionalTimeZone:s,momentNoOffset:function(e){return t(e,"YYYY-MM-DDT00:00:00+0000")},getUTCDateWithStartOfDay:function(){return l().toDate()},getUTCMomentWithStartOfDay:l,startOfDayUtcDate:function(e){return d(e).toDate()},startOfDayUtcMoment:d,toStartOfDayIgnoreTimezone:function(e){return new Date(Date.UTC(e.getUTCFullYear(),e.getMonth(),e.getDate()))},moveOrderedUp:function(e,t){return p(e,t,t.position-1)},moveOrderedDown:function(e,t){return p(e,t,t.position+1)},removeOrderedItem:function(t,n){var i=t.length;e.remove(t,{position:n}),i!==t.length&&e.forEach(e.sortBy(t,"position"),(function(e,t){e.position=t+1}))},adjustOrderedItems:function(t){var n=e.sortBy(t,"position");e.forEach(n,(function(e,t){e.position=t+1}))},localTimeZoneForTimestamp:function(e){return new Date(e).toLocaleString("en",{timeZoneName:"short"}).split(" ").pop()},sum:function(t){return e.reduce(t,(function(e,t){return e+t}))||0},extractNames:function(t){var n,i="",a="",r=[];if(t){t=t.trim();var o=e.compact(t.split(","));r=e.compact(o[0].split(" ")),2===o.length&&(r.length>1?n=o[1].trim():r=o.reverse()),r.length>0&&(i=r[0],a=r[0]),r.length>1&&(a=r[1]),i=i.trim().replace(/,/g,""),a=a.trim().replace(/,/g,"")}return{firstName:i,lastName:a,names:r,title:n}},dateDifferenceInUnits:c,isTimestampDifferenceWithinSeconds:function(t,n,i){if(e.isNil(i))return null;var a=c(t,n,"seconds");return e.isNil(a)?null:Math.abs(a)<=i},urlHasImage:function(e){return/\.(jpg|jpeg|jp2|gif|png|bmp|tiff|tif|jb2)($|\/|\?|&)/i.test(e)},urlHasPdf:function(e){return/\.pdf($|\/|\?|&)/i.test(e)},getLocaleFormattedDate:function(e){return new Date(e).toLocaleDateString()},getIsoFormattedDate:function(e){var t=new Date(e);return new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()).toISOString()}}}.apply(t,i))||(e.exports=a)},function(e,t,n){"use strict";var i,a;i=[n(1),n(0),n(493),n(320),n(894),n(71),n(422),n(10),n(76),n(340),n(19),n(33),n(1594),n(1434),n(38),n(385)],void 0===(a=function(e,t,n){var i=n.default;return e.module("singleInstance",[]).provider("singleInstance",(function(){var e=!1;this.markInstantiated=function(){e=!0},this.isAlreadyInstantiated=function(){return e},this.$get=function(){return this}})),e.module("angular.ui.utils",["ui.indeterminate","ui.keypress","ui.mask","ui.unique"]),{wireModule:function(a,r){var o=["singleInstance","ema.uiUtils","ui.router","ct.ui.router.extras","ema.formDirectives","ui.bootstrap","angular.ui.utils","ema.errorUtils","FormErrors","ema.commonServices","ema.filters","ema.routerServices","ema.states","ema.events","ngResource","custom-element-wrapper.module"].concat(r);return e.module(a,r.concat(o)).config(["singleInstanceProvider","$compileProvider","$locationProvider","$qProvider","$httpProvider","$stickyStateProvider","$logProvider","$provide",function(e,t,i,a,r,o,s,c){if(!e.isAlreadyInstantiated()){e.markInstantiated(),i.hashPrefix(""),r.interceptors.push("emaHttpInterceptor"),c.decorator("$exceptionHandler",n.exceptionHandler);o.enableDebug(false),s.debugEnabled(false),r.interceptors.push(n.templateCacheBustingHttpInterceptor)}}]).run(["$rootScope","$state","$previousState","EmaStateService","userPrivilegeUtils",function(e,n,a,r,o){i.decorateRootScope(e),e.$state=n,e.$on("$stateChangeSuccess",(function(n,i,a,o,s){r.isSameState(i,o)||(r.flushStateChangeQueue(),e.goBackDescription=t.result(o.data,"description"))})),e.$on("$stateChangeError",t.debounce((function(e,n,i,s,c,l){"NOT_AUTHORIZED"===t.get(l,"reason")?o.showUnauthorizedNotification(l,!a.get()).then((function(){a.get()||r.goBack()})):e.preventDefault()})))}])},bootstrapApp:function(t,n,i){var a=e.element(t).injector();a||(a=e.bootstrap(t,[n])),i(a)}}}.apply(t,i))||(e.exports=a)},function(e,t,n){"use strict";var i,a,r=n(1534),o=n(1535);i=[n(1),n(6),n(3),n(8),n(48),n(33),n(339),n(1289),n(321),n(19),n(805),n(139),n(615),n(71),n(45),n(1430)],void 0===(a=function(e,t,i,a,s){function c(t,n){return{restrict:"A",scope:{callbackFN:"&outsideClick",enabled:"=outsideClickEnabled"},link:function(a,r){var o=i.uniqueId("click.outsideClick"),s=t.get(0),c=r.get(0);function l(){$("html").bind(o,(function(e){if(a.enabled){var t=$.contains(s,e.target),i=$.contains(c,e.target);t&&!i&&n((function(){a.callbackFN()}))}}))}function d(){$("html").off(o)}e.isDefined(a.enabled)?a.$watch("enabled",(function(e){e?n((function(){l()})):d()}),!0):l(),a.$on("$destroy",(function(){d()}))}}}L.$inject=["$state","$window","$timeout","$location","$anchorScroll"],z.$inject=["$state"],N.$inject=["$rootScope","$uibModal","$rootElement","EmaStateService"],C.$inject=["$rootScope","$uibModal","$rootElement","EmaStateService"],P.$inject=["$templateCache"],I.$inject=["$rootScope","$uibModal","$q","$timeout","$rootElement"],_.$inject=["$compile","$templateCache","$templateRequest"],v.$inject=["$window","$timeout","$compile"],E.$inject=["$parse","$timeout","emaPopover"],g.$inject=["$uibModalInstance","imgSrc","maxWidth","width"],y.$inject=["$uibModal","$window","$document"],O.$inject=["$uibModalInstance","pdfSrc","title"],M.$inject=["$uibModal"],h.$inject=["cssAnimate"],A.$inject=["$animate","$timeout"],b.$inject=["$location","$anchorScroll"],f.$inject=["$timeout"],m.$inject=["$compile"],u.$inject=["$timeout","$window","$q"],d.$inject=["EmaModalNg","EmaModalNext","$q"],c.$inject=["$document","$timeout"],e.module("ema.emaEnter",[]).directive("emaEnter",(function(){return{restrict:"A",link:function(e,t,n){t.bind("keypress",(function(t){13===t.keyCode&&(e.$apply((function(){e.$eval(n.emaEnter,{event:t})})),t.preventDefault())}))}}})),e.module("ema.emaStopPropagation",[]).directive("emaStopPropagation",(function(){return{restrict:"A",link:function(e,t,n){t.bind(n.emaStopPropagation||"click",(function(e){e.stopPropagation()}))}}})).directive("emaPreventDefault",(function(){return{restrict:"A",link:function(e,t,n){t.bind(n.emaPreventDefault||"click",(function(e){e.preventDefault()}))}}})).directive("emaEventFocus",(function(){return function(e,t,n){t.on(n.emaEventFocus,(function(){$(n.emaEventFocusSelector).focus()})),e.$on("$destroy",(function(){t.off(n.emaEventFocus)}))}})),e.module("ema.emaEscape",[]).directive("emaEscape",(function(){return{restrict:"A",link:function(e,t,n){t.bind("keydown",(function(t){27===t.keyCode&&(e.$apply((function(){e.$eval(n.emaEscape,{event:t})})),t.preventDefault())}))}}})),e.module("ema.emaFocus",[]).directive("emaFocus",(function(){return function(e,t){t[0].focus()}})),e.module("ema.addressDisplay",[]).directive("emaAddress",(function(){return{restrict:"E",scope:{address:"="},template:n(1566)}})),e.module("ema.tooltip",[]).directive("emaTooltip",[function(){return{restrict:"E",scope:{text:"@"},replace:!0,template:function(t,n){var i=e.isDefined(n.unsafeTooltip)?"uib-tooltip-html":"uib-tooltip",a=e.isDefined(n.unsafeTooltip)?"text":"{{text}}";return'')}}}]),e.module("ema.errorTooltip",[]).directive("emaErrorTooltip",[function(){return{restrict:"E",scope:{text:"@"},replace:!0,template:function(e,t){return''}}}]),e.module("ema.tooltipOnOverflow",[]).directive("emaTooltipOnOverflow",[function(){return{restrict:"A",link:function(e,t,n){var i=t[0];e.$watch((function(){return i.scrollWidth}),(function(){i.offsetWidth',link:function(t){var n=t.text;t.label=t.labelExpand,t.$watch("expanded",(function(i){i?(t.text=n,t.label=t.labelCollapse):(t.text=e("emaTruncate")(n,t.limit,"")+(t.isLargerThanLimit()?"...":""),t.label=t.labelExpand)})),t.toggleReadMore=function(){t.expanded=!t.expanded},t.isLargerThanLimit=function(){return n.length>t.limit}}}}]),e.module("ema.chosenWorkaround",[]).directive("chosenWorkaround",(function(){return{restrict:"A",scope:{chosenWorkaround:"="},link:function(e,t){e.$watchCollection((function(){return e.chosenWorkaround}),(function(){i.defer((function(){t.trigger("chosen:updated")}))}))}}}));var l=e.module("ema.confirmBack",["ema.popover"]);function d(a,r,o){var s=[a,r];function c(e){var t=i.get(e,"additionalDialogClass")||"";return(e.forceNext?i.last(s):i.head(s)).open(e.title||"Notification",{controller:["$uibModalInstance",function(t){this.options=i.defaults({},e,{cancelButton:{text:"Cancel",hidden:!1}}),this.cancel=t.dismiss,this.confirmPrimary=i.partial(t.close,i.result(this.options,"primaryButton.value")),this.confirmSecondary=i.partial(t.close,i.result(this.options,"secondaryButton.value"))}],controllerAs:"$ctrl",additionalDialogClass:"modal-notification "+t,width:e.width,template:n(1568)})}var l=i.template('
Select AllNo text to show
');return{openRadioSelectionModal:function(e){return a.open(e.title||"Please Select One",{controller:["$uibModalInstance",function(t){this.options=e,this.selection=e.defaultValue,this.cancel=t.dismiss,this.confirm=function(){t.close(this.selection)}}],controllerAs:"$ctrl",template:n(1567)})},openNotificationModal:c,openNotificationErrorModal:function(t){return c(e.extend({},t,{additionalDialogClass:"modal-error"}))},openConfirmationModal:function(e,t,n){return c({title:t||"Confirm",notifications:i.isArray(e)?e:[e],primaryButton:{text:i.get(n,"primaryButtonLabel","OK"),value:!0},secondaryButton:{text:i.get(n,"secondaryButtonLabel","Cancel"),value:!1},cancelButton:!1,forceNext:i.get(n,"forceNext",!1)}).result.then((function(e){return e?o.resolve():o.reject()}))},openSelectableTextModal:function(e,t,n){return a.open(e,{template:l({textAreaId:t}),size:"lg",resolve:{text:i.constant(n)},controllerAs:"$ctrl",controller:["$document","text",function(e,n){this.text=n,this.selectAll=function(){i.head(e.find("#"+t)).select()}}]})},openDateRangeModal:function(e){return r.open(e.title,{additionalDialogClass:"date-range-modal",controllerAs:"$ctrl",controller:["$uibModalInstance",function(n){var a=this;a.options=e,a.fromDate=e.fromDate?t.utc(e.fromDate).toDate():null,a.toDate=e.toDate?t.utc(e.toDate).toDate():null,a.serviceLocation=e.serviceLocation,a.update=function(){n.close(i.pick(a,["fromDate","toDate"]))},a.isValid=function(){var t=!e.requireFrom||!!a.fromDate,n=!e.requireTo||!!a.toDate;return t&&n},a.cancel=i.partial(n.dismiss,"cancel")}],template:n(1569)})}}}l.directive("emaConfirmBack",["emaPopover",function(t){return{restrict:"A",scope:{onBack:"&backAction",onSave:"&saveAction",position:"@position",showConfirm:"=?emaConfirmBack"},controllerAs:"ctrl",controller:["$scope","$q",function(e,t){this.goBack=e.onBack,this.saveAndGoBack=function(){t.when(e.onSave()).then(e.onBack)}}],link:function(n,i){e.isUndefined(n.showConfirm)&&(n.showConfirm=!0),i.on("click",(function(e){e.stopImmediatePropagation(),n.showConfirm?t.display(i,n.position||"bottom",APP.contextPath+"/static/js/angularApp/common/templates/goBackPopover.html","_",n):n.onBack()}))}}}]),l.directive("emaConfirm",["EmaModalNg","$q","EmaPleaseWaitModal",function(e,t,a){return{restrict:"A",scope:{onYes:"&emaConfirm",onNo:"&declineAction",message:"&modalMessage",title:"@modalTitle",yesMessage:"@?",noMessage:"@?",showPleaseWait:"=?showPleaseWait",showConfirm:"=?showModal",additionalDialogClass:"@?additionalDialogClass",defaultNo:"@"},link:function(r,o){i.defaults(r,{showConfirm:!0,showPleaseWait:!0}),o.on("click",(function(o){if(o.stopImmediatePropagation(),o.preventDefault(),r.showConfirm){e.open(r.title||"Confirm",{size:"sm",additionalDialogClass:r.additionalDialogClass,backdrop:"static",controller:["$scope","$uibModalInstance",function(e,n){function o(e){return function(){var o=r["on"+i.upperFirst(e)]();n.close(),o&&r.showPleaseWait&&a.showWhile(t.when(o))}}e.yes=o("yes"),e.no=o("no"),e.yesMessage=r.yesMessage,e.noMessage=r.noMessage,t.when(r.message()).then((function(t){e.message=t})),e.defaultNo=i.get(r,"defaultNo")}],template:n(806)})}else r.onYes()}))}}}]),e.module("ema.patientSearch",["ema.filters"]).filter("formatPatient",["lastFirstMiddleInitialFilter","$sce",function(e,n){return function(i){if(i&&i.lastName&&i.firstName){var a=e(i);return i.mrn&&"null"!==i.mrn&&(a+=" [MRN:"+i.mrn+"]"),i.pmsId&&"null"!==i.pmsId&&(a+=" [PMS ID:"+i.pmsId+"]"),i.dateOfBirth&&"null"!==i.dateOfBirth&&(a+=" [DOB:"+t(i.dateOfBirth).utc().format("MM/DD/YYYY")+"]"),n.trustAsHtml(''+a+"")}return n.trustAsHtml('Create A New Patient')}}]).component("emaPatientSearch",{bindings:{patient:"=",createNew:"@",selector:"@",onSelectFn:"&?",placeholder:"@",excludePatient:""+e.bill.patient.lastName+", "+e.bill.patient.firstName+" Claim# "+e.id+" $0.00":e.bill.patient.lastName+", "+e.bill.patient.firstName+" Claim# "+e.id+" $0.00"}}]).factory("ClaimSearch",["$http",function(e){return{search:function(t){return e({url:APP.contextPath+"/ws/v2/billInsurance/search",method:"GET",params:{claimNumber:t}})}}}]);var p=e.module("ema.notification",["ngNotify"]);function u(t,n,a){function r(i,a){a=a||n;var r=i?1e3:0;i=i||e.noop;return t(i).then((function(){return t(a.print,r)}))}function o(t){var i=n.open(),r=e.element(i.document.body);return r.html("Please wait..."),a.when(t).then((function(e){return r.html(e),i}))}function s(t){e.element(n.document.head).append(""),n.print()}return{print:r,showHtmlInNewWindow:o,printHtmlFromNewWindow:function(e){return o(e).then(i.partial(r,null))},printPortrait:i.partial(s,"portrait"),printLandscape:i.partial(s,"landscape")}}function m(t){return{restrict:"A",link:function(n,i,a){var r;n.$watch(a.emaCompileHtml,(function(a){r&&r.remove(),r=e.element("
").html(a).appendTo(i);var o=n.$new(!1);t(r)(o)}))}}}function f(t){return function(n){t((function(){return e.element(n).focus()}))}}function b(e,t){return function(n){e.hash(n),t()}}function A(t,n){return function(i,a){var r=e.element(a);t.addClass(r,i).then((function(){n((function(){t.removeClass(r,i)}))}))}}function h(e){return i.partial(e,"highlight-fade")}function M(e){return{restrict:"A",scope:{pdfSrc:"@",pdfTitle:"@"},link:function(t,i,a){i.addClass("clickable"),i.on("click",(function(){e.open({template:n(1572),controller:"emaPdfModalController as ctrl",size:"lg",resolve:{pdfSrc:function(){return a.pdfSrc},title:function(){return a.pdfTitle}}})}))}}}function O(e,t,n){var i=this;i.pdfSrc=t,i.pdfTitle=n,i.$modalInstance=e,i.close=function(){i.$modalInstance.dismiss("cancel")}}function y(e,t,a){return{restrict:"A",scope:{src:"@",useWindowWidth:"
';return"showCloseButton"in t&&(n+='
'),n+='
'},scope:{alertType:"<",maxWidth:"@?"},transclude:{header:"?alertHeader",body:"alertBody"},controllerAs:"$ctrl",controller:function(){var e=this;e.showMe=!0,e.dismiss=function(){e.showMe=!1}}}})),p.directive("emaAlertBanner",(function(){return{restrict:"E",replace:!0,template:'
\n \n
\n {{title}}\n \n
\n
',scope:{alertType:"<",maxWidth:"@?",title:"@?"},transclude:{body:"alertBody"}}})),e.module("ema.patientOverviewUrl",["ngNotify"]).service("emaPatientOverviewUrl",[function(){this.get=function(e){return APP.contextPath+"/app/PatientOverview.action?pid="+e}}]),e.module("ema.eobPayerCheckUrl",["ngNotify"]).service("emaEobPayerCheckUrl",[function(){this.get=function(e){return APP.contextPath+"/practice/financial/Financials.action#/home/payments/associateCheck/"+e}}]),e.module("ema.eraPayerCheckUrl",["ngNotify"]).service("emaEraPayerCheckUrl",[function(){this.get=function(e){return APP.contextPath+"/practice/financial/Financials.action#/home/payments/era/web/"+e}}]),e.module("ema.eraUrl",["ngNotify"]).service("emaEraUrl",[function(){this.get=function(e){return APP.contextPath+"/practice/financial/Financials.action#/postPayments/era/era/prePost/web/"+e}}]),e.module("ema.patientFinancialsUrl",["ngNotify"]).service("emaPatientFinancialsUrl",[function(){this.get=function(e,t,n){var i=n||"summary";return APP.contextPath+"/patient/PatientFinancials.action?pid="+e+"#/patient/"+t+"/patientFinancials/"+i}}]),e.module("ema.patientAppointmentHistoryUrl",["ngNotify"]).service("emaPatientAppointmentHistoryUrl",[function(){this.get=function(e){return APP.contextPath+"/patient/PatientAppointmentHistory.action?pid="+e}}]),e.module("ema.appointmentUrl",["ngNotify"]).service("emaAppointmentUrl",[function(){this.get=function(e){return APP.contextPath+"/practice/scheduler/front/SchedulerDHTMLX.action#/scheduler/appointmentDetails/"+e+"/autoReschedule/false/autoRescheduleLinked/"}}]).service("emaAppointmentUrlNoReschedulePopUp",[function(){this.get=function(e){return APP.contextPath+"/practice/scheduler/front/SchedulerDHTMLX.action#/scheduler/appointmentDetails/"+e+"/autoReschedule//autoRescheduleLinked/"}}]).service("emaAppointmentUrlFromState",[function(){this.get=function(e,t,n,i,a){var r="";return e.current.name.startsWith("scheduler")?r="/scheduler":e.current.name.startsWith("appointmentHistory")?r="/patient/".concat(n,"/apptHistory"):e.current.name.startsWith("patientHome")?r="/patient/".concat(n,"/home"):e.current.name.startsWith("recallsMain")&&(r="/recallsMain"),"#".concat(r,"/appointmentDetails/").concat(t,"/autoReschedule/").concat(i,"/autoRescheduleLinked/").concat(a)}}]),e.module("ema.multipleAppointmentsUrl",["ngNotify"]).service("emaMultipleAppointmentsUrl",[function(){this.get=function(e,t,n,i){return"".concat(APP.contextPath,"/practice/scheduler/front/SchedulerDHTMLX.action#/scheduler/multipleAppointments/").concat(e,"/linkBothAppointments/").concat(t,"/firstAppointmentId/").concat(n,"/secondAppointmentId/").concat(i)}}]).service("emaMultipleAppointmentsUrlFromState",[function(){this.get=function(e,t,n,i,a,r){var o="";return e.current.name.startsWith("scheduler")?o="/scheduler":e.current.name.startsWith("appointmentHistory")?o="/patient/".concat(r,"/apptHistory"):e.current.name.startsWith("patientHome")&&(o="/patient/".concat(r,"/home")),"#".concat(o,"/multipleAppointments/").concat(t,"/linkBothAppointments/").concat(n,"/firstAppointmentId/").concat(i,"/secondAppointmentId/").concat(a)}}]),e.module("ema.previousAppointmentUrl",["ngNotify"]).service("emaPreviousAppointmentUrl",[function(){this.get=function(e){return APP.contextPath+"/practice/scheduler/front/SchedulerDHTMLX.action#/scheduler/previousAppointment/"+e}}]),e.module("ema.newAppointmentUrl",["ngNotify"]).service("emaNewAppointmentUrl",[function(){this.get=function(e,t,n,i,a,r,o){return APP.contextPath+"/practice/scheduler/front/SchedulerDHTMLX.action#/scheduler/newAppointment/provider/".concat(e,"/facility/").concat(t,"/patient/").concat(n,"/appointmentType/").concat(i,"/scheduledDuration//at/").concat(a,"/recall//removeWaitlist/").concat(r,"/requestedResourcesIds//appointmentHoldId/").concat(o)}}]),e.module("ema.intramailCreateUrl",[]).service("emaIntramailCreateUrl",[function(){this.get=function(e){return APP.contextPath+"/app/intramail/MessagesCreate.action?newWithVisit=&vid="+e}}]),e.module("clearinghousePortalUrl",[]).service("clearinghousePortalUrl",[function(){this.get=function(){return"https://mytools.gatewayedi.com/logon.aspx"}}]),e.module("patientNoPhotoImageUrl",[]).service("patientNoPhotoImageUrl",[function(){this.get=function(){return APP.contextPath+"/static/images/misc/placeholder-headshots/Unspecified_dark_194.png"}}]),e.module("patientNoPhotoImageUrlGenderSpecific",[]).service("patientNoPhotoImageUrlGenderSpecific",[function(){this.get=function(e){return"MALE"===e.sex?APP.contextPath+"/static/images/misc/placeholder-headshots/Male_dark_194.png":"FEMALE"===e.sex?APP.contextPath+"/static/images/misc/placeholder-headshots/Female_dark_194.png":APP.contextPath+"/static/images/misc/placeholder-headshots/Unspecified_dark_194.png"}}]),e.module("ema.urls",[]).service("emaPatientInsuranceOverviewUrl",(function(){this.get=function(e,t,n){var i=APP.contextPath+"/patient/InsuranceOverviewForm.action?pid="+e;return t&&n&&(i=i+"#/patient/"+t+"/insurance/"+n),i}})).service("manageClaimBillUrl",(function(){this.get=function(e){return APP.contextPath+"/practice/financial/Bill.action#/bill/"+e}})).service("schedulerUrl",(function(){this.get=function(){return APP.contextPath+"/practice/scheduler/front/SchedulerDHTMLX.action"}})).service("emaPatientContactInformationUrl",(function(){this.get=function(e){return APP.contextPath+"/patient/PatientDemographics.action?pid="+e}})),e.module("ema.toggleSwitch",[]).directive("emaToggle",(function(){return{restrict:"E",replace:!0,require:"?ngModel",template:'
',compile:function(t,n){var a=t.find("input"),r=t.find("label");i.forEach({name:n.name,"ng-value":n.ngValue,"ng-model":n.ngModel,"ng-checked":n.ngChecked,"ng-disabled":n.ngDisabled,"ng-true-value":n.ngTrueValue,"ng-false-value":n.ngFalseValue,"ng-change":n.ngChange},(function(n,i){e.isDefined(n)&&(a.attr(i,n),t.removeAttr(i))})),n.id?(a.attr("id",n.id),r.attr("for",n.id),t.removeAttr("id")):console.error("Toggle switches must have a unique id")}}}));var T=e.module("ema.collapse",[]);function _(e,t,n){var a="common/emaDynamicDropdown.html";function r(e,t){var n=e.find(t);if(1!==n.length)throw new Error("Expected element: "+t);var i=n.html().trim();return n.remove(),i}return t.put(a,o),{compile:function(t,o){var s={DROPDOWN_TEMPLATE:r(t,"ema-dropdown"),ITEM_TEMPLATE:r(t,"ema-item")};return function(r){n(a).then((function(n){i.forOwn(s,(function(e,t){n=n.split(t).join(e)})),t.html(n);var a=r.$new();r.$watch(o.items,(function(e){a.items=e,a.item=e&&1===e.length&&e[0]||void 0})),e(t.children())(a)}))}}}}function I(e,t,n,a,r){var o,s,c,l=this,d=0;function p(e){window.APP.automationHelper.showingPleaseWait=e}function u(){p(!1),o&&(m(),o.close(),o=null)}function m(){c&&(a.cancel(c),c=null)}function f(e){var t=l.openModal.apply(l,Array.prototype.slice.call(arguments,1));return t.opened.then((function(){e.finally((function(e){return l.closeModal(),e}))})),e}return l.openModal=function(n,i,l){return m(),c=a((function(){d>0&&(console.warn("Please wait modal failed to complete after 300000 ms."),d=0,u())}),3e5),d++>0?(s.message=n||s.message,s.help=i||s.help,o):(l=l||"",(s=e.$new()).message=n||"Please Wait...",s.help=i,o=t.open({backdrop:"static",keyboard:!1,scope:s,template:'\n',windowClass:l,appendTo:r}),p(!0),o)},l.closeModal=function(){1===d?a((function(){1===d&&u(),d=Math.max(0,d-1)}),APP.pleaseWaitConfig.pleaseWaitMinTime||300):d>1&&d--},l.configureErrorDismissal=function(e){e.$on("errorModalShown",i.debounce(l.closeModal,1e3)),e.$on("fatalErrorModalShown",i.debounce(l.closeModal,1e3)),e.$on("conflictErrorModalShown",i.debounce(l.closeModal,1e3))},l.showWhile=function(e){return e=n.when(e),APP.pleaseWaitConfig.preProcess&&APP.pleaseWaitConfig.pleaseWaitDisable?e:APP.pleaseWaitConfig.preProcess&&APP.pleaseWaitConfig.pleaseWaitDelay>0?function(e){var t=!1;return e.finally((function(e){return t=!0,e})),a((function(){if(!t)return f(e)}),APP.pleaseWaitConfig.pleaseWaitDelay),e}(e):f(e)},l}T.directive("emaCollapse",(function(){return{restrict:"A",link:function(e,t,n){n.collapsedGlyphicon=n.collapsedGlyphicon||"glyphicon-menu-right",n.expandedGlyphicon=n.expandedGlyphicon||"glyphicon-menu-down",t.addClass("glyphicon"),e.$watch(n.emaCollapse,(function(e){e?(t.addClass(n.expandedGlyphicon),t.removeClass(n.collapsedGlyphicon)):(t.addClass(n.collapsedGlyphicon),t.removeClass(n.expandedGlyphicon))}),!0)}}})),T.directive("emaHideEmpty",(function(){return{restrict:"A",link:function(e,t,n){var i=n.emaHideEmpty;function a(){(!i||e.$eval(i))&&!t.text().trim()?t.hide():t.show()}t.on("DOMSubtreeModified",a),e.$watch(i,a),e.$on("$destroy",(function(){t.off("DOMSubtreeModified",a)}))}}})),T.directive("emaSyncHide",(function(){return{restrict:"A",link:function(e,t,n){var a=i.bind(t.hide,t),r=i.bind(t.show,t);$(document).on("hide.ema.syncHide",n.emaSyncHide,a),$(document).on("show.ema.syncHide",n.emaSyncHide,r),e.$on("$destroy",(function(){$(document).off("hide",a),$(document).off("show",r)}))}}})),T.directive("emaDynamicDropdown",_),e.module("ema.stateSelect",[]).directive("emaStateSelect",(function(){return{restrict:"E",require:"ngModel",scope:{id:"@",style:"@",class:"@",isRequired:"@"},replace:!0,templateUrl:APP.contextPath+"/templates/AngularTemplateLoader.action?templateId=stateSelect"}})),e.module("ema.countrySelect",[]).directive("emaCountrySelect",(function(){return{restrict:"E",require:"ngModel",scope:{id:"@",style:"@",class:"@",isRequired:"@"},replace:!0,templateUrl:APP.contextPath+"/templates/AngularTemplateLoader.action?templateId=countrySelect"}}));var S="common/modalNext.html";function P(e){e.put(S,r)}function R(t,n,i,a){var r=a||{},o="printable-container";function s(){e.isElement(this.otherPrintableElements)&&this.otherPrintableElements.addClass(o)}return{open:function(a,c,l){var d=t.$new(),p={showCloseButton:!c.hideCloseButton,draggable:null==c.draggable||c.draggable},u=n.open(e.extend({scope:e.extend(d,{title:a,draggable:p.draggable,showCloseButton:p.showCloseButton,additionalDialogClass:c.additionalDialogClass,width:c.width,maxHeight:c.maxHeight,scrollable:c.scrollable}),windowTemplateUrl:S,windowClass:"modal-dark",backdrop:"static"},r,c));return c.closeOnStateChange&&i.invokeOnceOnStateChange(u.dismiss),u.opened.then((function(){u.otherPrintableElements=e.element(".printable-container"),u.otherPrintableElements.removeClass(o)})),u.modalScope=d,u.result.then(s.bind(u),s.bind(u)),u}}}function C(t,n,i,a){return R(t,n,a,{appendTo:e.element("#app-content")})}function N(e,t,n,i){return R(e,t,i,n.length?{appendTo:n}:{})}function z(t){return{restrict:"E",replace:!0,scope:{matchChildStates:"=?",selectedTab:"=?",onTabChange:"&?",type:"@?"},template:n(1575),controllerAs:"tabCtrl",transclude:!0,bindToController:!0,controller:["$scope","$attrs",function(n,a){var r=this;r.$onInit=function(){r.tabItems=[],r.routing=e.isUndefined(a.noRoutes),r.type=r.type||"primary"},r.active=function(e){return r.routing?i.some(e.stateMatches||[e.route],(function(e){return(r.matchChildStates?t.includes:t.is)(e)})):r.selectedTab===e.name},r.selectTab=function(e){r.selectedTab=e.name,i.isFunction(r.onTabChange)&&r.onTabChange({selectedTab:r.selectedTab})},r.addTabItem=function(e){r.routing&&!e.route?console.error("ema-tab-item is missing a `route` attribute. This is required when routing.",e):r.routing||e.name||console.error("ema-tab-item is missing a `name` attribute. This is required when `no-routes` is specified.",e),r.tabItems.push(e),r.routing||r.selectedTab||r.selectTab(e)},r.removeTabItem=function(e){i.remove(r.tabItems,(function(t){return t===e}))}}]}}e.module("ema.tabs",[]).directive("emaTabs",z).component("emaTabItem",{require:{tabCtrl:"^emaTabs"},bindings:{route:"@?",iconClass:"@?",heading:"@",stateMatches:"
',error:'',success:'',defaultArrow:'',titled:'',_:''};return{displayConfig:function(c){var l,d=c.selector,p=c.placement,u=c.templateUrl,m=c.templateHtml,f=c.type,b=c.scope,A=c.customClass,h=c.popover||{};function M(n){var a=i.template(s[f]||s._),r=e.element(d),c=r.data("bs.popover");if(!(c&&c.$tip&&c.$tip.is(":visible"))){var l=b.$new();l.$close=function(){r.popover("hide")},r.popover(i.assign({html:!0,viewport:{selector:"body"}},h,{placement:p,trigger:"manual",content:n,template:a({customClass:A||""})})).one("shown.bs.popover",(function(){var e=$(this).data("bs.popover"),n=e.$tip.find("> .popover-content");t(n)(l),o((function(){e.updatePlacement(p)}))})).one("hidden.bs.popover",(function(){l.$destroy()})).popover("show"),$("html").on("click.popover",(function(e){var t=$(e.target),n=t.parents();void 0!==t.data("original-title")||0===n.length||n.is(".popover.in")||i.last(n).parentNode!==document||($("[data-original-title]").popover("hide"),$("html").off("click.popover"))}))}}m?M(m):(l=u,a.when(n.get(l)||r.get(l)).then((function(t){return e.isObject(t)?(n.put(l,t.data),t.data):t}))).then((function(e){return M(e)}))},display:function(e,t,n,i,a,r){this.displayConfig({selector:e,placement:t,templateUrl:n,type:i,scope:a,customClass:r})},cancel:function(t){e.element(t).popover("hide")}}}]}})).directive("popoverTemplate",E).directive("popoverTemplateHtml",E),e.module("ema.imageModal",[]).directive("emaImageModal",y).controller("emaImageModalController",g),e.module("ema.pdfModal",[]).directive("emaPdfModal",M).controller("emaPdfModalController",O).component("emaOpenPdf",{template:'\n \n Open PDF \n \n ',bindings:{url:"<"},controller:function(){}}).component("emaPdf",{template:'

It appears you don\'t have Adobe Reader or PDF support in this web browser. Click here to download the PDF.

',bindings:{url:"<",height:"@"},controller:function(){var e=this;e.$onInit=function(){e.height=e.height||800}}}),e.module("ema.asyncActions",[]).directive("asyncActionButton",["$q","$timeout",function(t,n){return{restrict:"A",scope:{onClick:"&asyncActionButton"},link:function(i,a,r){var o=e.element(' ');r.$observe("disabled",(function(e){i.shouldEnable=!e})),a.on("click",(function(){var s=e.isDefined(r.asyncActionButtonTarget)?e.element(r.asyncActionButtonTarget):a,c=s.next("button.dropdown-toggle");i.shouldEnable=!0,s.prop("disabled",!0),c.prop("disabled",!0);var l=n((function(){s.prepend(o)}),1e3);t.when(i.onClick()).finally((function(){o.remove(),i.shouldEnable&&(s.prop("disabled",!1),c.prop("disabled",!1)),n.cancel(l)}))}))}}}]).directive("showBusyIndicator",(function(){var t={left:"prepend",right:"append"};return{restrict:"A",scope:!1,link:function(n,i,a){var r,o=e.element(' ');n.$watch(a.showBusyIndicator,(function(e,n){if(e){r=a.disabled,a.$set("disabled","disabled");var s=t[a.indicatorPosition||"left"];i[s](o)}else!e&&n&&(o.remove(),a.$set("disabled",r))}))}}})).directive("emaLoadingToggle",(function(){return{restrict:"A",controller:function(){this.status=i.createProperty().value(!1)},link:function(t,n,i,a){t.$watch((function(){return t.$eval(i.emaLoadingToggle)}),a.status),function(t,n,i){var a=e.element('

Loading

');t.$watch((function(){return i.status()}),(function(e){e?(n.before(a),n.addClass("ema-loading")):(a.remove(),n.removeClass("ema-loading"))})),t.$on("$destroy",(function(){a.remove()}))}(t,n,a)}}})),e.module("ema.disableDefaultDragDrop",[]).directive("disableDefaultDragDrop",(function(){return{restrict:"A",link:function(e,t){t.on("dragover drop",(function(e){e.preventDefault()}))}}})),e.module("ema.object",[]).directive("emaData",(function(){return{restrict:"A",link:function(e,t,n){var i=t;e.$watch((function(){return n.emaData}),(function(){var e=t.clone().attr("data",n.emaData);i.replaceWith(e),i=e}))}}})),e.module("ema.formBuilder",[]).factory("emaFormBuilder",["EmaPleaseWaitModal",function(e){function t(e,t){this.$form=$("
").prop({action:e,method:t||"post"})}return t.prototype.add=function(e,t){i.isArray(t)||(t=[t]);var n=this.$form;return i.forEach(t,(function(t){n.append($("
',controller:function(){function e(e,t,n,i){this.$filter=e,this.ComponentService=t,this.$window=n,this.eligibilityBenefitService=i,this.autoSelection=!0,this.benefitHeaders={COPAY:"Co-Pay",COINSURANCE:"Co-Insurance",DEDUCTIBLE:"Deductible",REM_DEDUCTIBLE:"Remaining Deductible",OUT_OF_POCKET:"Out-of-Pocket",REM_OUT_OF_POCKET:"Remaining Out-of-Pocket"},this.benefitNoteAbbreviations={COPAY:"Co-pay",COINSURANCE:"Co-ins",DEDUCTIBLE:"Annual Deductible",REM_DEDUCTIBLE:"Remaining Deductible",OUT_OF_POCKET:"Annual OOP",REM_OUT_OF_POCKET:"Remaining OOP"},this.benefitTypes=Object.keys(this.benefitHeaders),this.benefitOptions={},this.selectedBenefits={},this.disableConfirm=!0,this.loggedInUserInitials=o.a.head(APP.loggedInUserFirstName)+"."+o.a.head(APP.loggedInUserLastName)+".",this.noteDate=c.a.tz("America/New_York").format("MM/DD/YYYY (z)")}return e.$inject=["$filter","ComponentService","$window","eligibilityBenefitService"],e.prototype.$onChanges=function(e){this.ComponentService.updateOneWayBindings(this,e,"eligibilityResponse"),e.eligibilityResponse&&(this.benefitOptions=this.eligibilityBenefitService.getBenefitOptionsByType(this.eligibilityResponse,!0))},e.prototype.onBenefitSelect=function(e,t,n){this.selectedBenefits[t]=e,n||this.autoSelectBenefitsFromSelection(t),this.selectedBenefitNote=this.getSelectedBenefitNote(),this.disableConfirm=!1},e.prototype.confirm=function(e){void 0===e&&(e=!1),this.onConfirm({result:{values:o.a.mapValues(this.selectedBenefits,"value"),note:e?this.selectedBenefitNote:void 0}})},e.prototype.cancel=function(){this.onCancel()},e.prototype.autoSelectBenefitsFromSelection=function(e){var t=this;if(this.autoSelection){var n=this.selectedBenefits[e];if(n){var i=n.benefit;o()(this.benefitOptions).omit(e).forEach((function(e,n){t.selectedBenefits[n]||(t.selectedBenefits[n]=t.eligibilityBenefitService.findBenefitOptionForAutoSelection(e,i))}))}}},e.prototype.getSelectedBenefitNote=function(){var e=this,t=o()(this.benefitTypes).map((function(t){return{type:t,benefit:e.selectedBenefits[t]}})).map((function(t){var n=t.type,i=t.benefit;return i?e.benefitNoteAbbreviations[n]+" "+i.displayValue:null})).filter(o.a.identity).join(", ");return t?t+". Checked online & found patient to be active - "+this.loggedInUserInitials+" "+this.noteDate:t},e}(),bindings:{eligibilityResponse:"<",dateOfService:"=",requestSentTime:"=",timezone:"=",onConfirm:"&",onCancel:"&"}},u=["ema.utils",l.EligibilityBenefitServiceModule,d.eligibilityBenefitOptions],m=i.module("eligibilityBenefitSelector.component",u).component("eligibilityBenefitSelector",p).name,f=n(2),b=APP.contextPath+"/ws/v2/patient",A=function(){function e(e,t,n){this.$http=e,this.EmaModalNg=t,this.emaNotification=n,this.eligibilityBenefitPropertyMap={COPAY:"copayAmount",COINSURANCE:"copayPercent",DEDUCTIBLE:"copayDeductible",REM_DEDUCTIBLE:"deductibleRemaining",OUT_OF_POCKET:"outOfPocketAmount",REM_OUT_OF_POCKET:"outOfPocketRemainingAmount"}}return e.$inject=["$http","EmaModalNg","emaNotification"],e.prototype.getNextMedicalRanking=function(e){var t=b+"/"+e+"/insurance/nextMedicalRanking",n={params:{patientId:e}};return this.$http.get(t,n)},e.prototype.getNextVisionRanking=function(e){var t=b+"/"+e+"/insurance/nextVisionRanking",n={params:{patientId:e}};return this.$http.get(t,n)},e.prototype.getNextInsurancePolicyRankings=function(e){var t=b+"/"+e+"/insurance/nextInsurancePolicyRankings",n={params:{patientId:e}};return this.$http.get(t,n)},e.prototype.isMedicalPolicyType=function(e){return![f.MavInsurancePolicyType.WORKERS_COMP,f.MavInsurancePolicyType.VISION,f.MavInsurancePolicyType.AUTO_PIP].includes(e)},e.prototype.isWorkersCompPolicyType=function(e){return e===f.MavInsurancePolicyType.WORKERS_COMP},e.prototype.isVisionPolicyType=function(e){return e===f.MavInsurancePolicyType.VISION},e.prototype.isAutoPipPolicyType=function(e){return e===f.MavInsurancePolicyType.AUTO_PIP},e.prototype.isTreatmentCaseRequired=function(e){return this.isWorkersCompPolicyType(e)||this.isAutoPipPolicyType(e)},e.prototype.isRankingPolicyType=function(e){return this.isMedicalPolicyType(e)||this.isVisionPolicyType(e)},e.prototype.getDefaultBillTypeForPolicy=function(e){return e?this.isVisionPolicyType(e)?f.BillType.VISION:this.isAutoPipPolicyType(e)?f.BillType.AUTO_PIP:this.isWorkersCompPolicyType(e)?f.BillType.WORKERS_COMP:f.BillType.CLAIM:f.BillType.PATIENT},e.prototype.isSamePolicyType=function(e,t){return e.mavPolicyType===t.mavPolicyType||this.isMedicalPolicyType(e.mavPolicyType)&&this.isMedicalPolicyType(t.mavPolicyType)},e.prototype.groupByPolicyType=function(e){var t=this,n="Worker's Compensation",i="Auto/PIP",a=new Map;return a.Medical=new Array,a.Vision=new Array,a[n]=new Array,a[i]=new Array,e.sort((function(e,t){return e.ranking-t.ranking})),e.map((function(e){t.isMedicalPolicyType(e.mavPolicyType)&&a.Medical.push(e),t.isVisionPolicyType(e.mavPolicyType)&&a.Vision.push(e),t.isWorkersCompPolicyType(e.mavPolicyType)&&a[n].push(e),t.isAutoPipPolicyType(e.mavPolicyType)&&a[i].push(e)})),a},e.prototype.getPolicyClassification=function(e){switch(e){case f.MavInsurancePolicyType.VISION:return f.InsurancePolicyTypeClassification.VISION;case f.MavInsurancePolicyType.WORKERS_COMP:return f.InsurancePolicyTypeClassification.WORKERS_COMP;case f.MavInsurancePolicyType.AUTO_PIP:return f.InsurancePolicyTypeClassification.AUTO_PIP;default:return f.InsurancePolicyTypeClassification.MEDICAL}},e.prototype.restorePolicy=function(e,t,n){var i=b+"/"+e+"/insurance/"+t+"/restore/"+n;return this.$http.post(i,{params:{showPleaseWait:!0}})},e.prototype.search=function(e,t){var n=APP.contextPath+"/ws/v3/insurances",i={params:{showPleaseWait:!0,where:e,selector:t}};return this.$http.get(n,i)},e.prototype.openEligibilityBenefitSelectorModal=function(e,t,n,i){var r=this;return this.EmaModalNg.open("Select Eligibility Benefits",{template:'\n ',controller:function(){},size:"lg",resolve:{eligResponse:function(){return e},dateOfService:function(){return t},requestSentTime:function(){return i},timezone:function(){return n}}}).result.then((function(e){return e.note&&a.copyToClipboard(e.note).then((function(){return r.emaNotification.showSuccessNotification("Note has been successfully copied to clipboard")}),(function(){return r.emaNotification.showErrorNotification("Error: Couldn't copy note to clipboard!")})),e.values}))},e.prototype.setEligibilityBenefits=function(e,t){var n=this;r.forEach(t,(function(t,i){return e[n.eligibilityBenefitPropertyMap[i]]=t}))},e}(),h=["ema.utils","ema.notification",m],M=i.module("insurancePolicy.service",h).service("insurancePolicyService",A).name},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.paymentServiceModule=void 0;var i=pe(n(1)),a=pe(n(3)),r=pe(n(6)),o=pe(n(8));n(44),n(71);var s=pe(n(1683)),c=n(75),l=n(1684),d=n(33),p=n(1686),u=n(1689),m=n(293),f=n(689),b=n(1515),A=n(685),h=n(469),M=n(331),O=n(191),y=n(2966),g=n(1516),E=n(2991),v=n(248),T=n(105),_=n(1254),I=n(851),S=n(1253),P=n(217),R=n(466),C=n(2967),N=n(187),z=n(2947),L=n(179),D=n(454),q=n(146),F=n(316),U=n(272),B=n(41),k=n(1699),W=n(490),w=n(2992),H=pe(n(1700)),x=pe(n(1701)),Y=pe(n(1702)),G=pe(n(1703)),V=pe(n(1704)),j=pe(n(1705)),X=pe(n(1706)),K=pe(n(1707)),Q=pe(n(1708)),J=pe(n(1709)),Z=pe(n(1710)),ee=pe(n(1711)),te=n(27),ne=n(2993),ie=n(236),ae=n(68),re=n(1255);n(196);var oe=n(17),se=n(2),ce=n(776),le=n(37),de=n(74);function pe(e){return e&&e.__esModule?e:{default:e}}function ue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function me(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:window.patientId;return this.$http.get("/ema/ws/v3/patients/".concat(t,"?selector=portalEnabled")).then((function(t){return!!t.data.portalEnabled&&e.firmRegistryValueService.getEnableBillingStatements()}))}},{key:"getPaymentSkeleton",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return{action:"CHARGE",hasCopay:!1,hasDeposit:!1,hasGeneral:!1,copayAmount:null,depositAmount:null,generalAmount:null,cardLastFour:"",saveCard:!1,emailReceipt:!1,email:e,cardCvv:"",achType:"PPD",checkNumber:"",depositDate:t,depositNote:"",referenceNumber:"",facilityId:n,terminalId:null,payments:[{allocated:!0,available:!0,amount:null,unallocatedFunds:{fundsType:"COPAY"}},{allocated:!0,available:!0,amount:null,unallocatedFunds:{fundsType:"AVAILABLE"}},{allocated:!1,available:!0,amount:i,unallocatedFunds:{fundsType:"UNAVAILABLE"}}]}}},{key:"isCreditPayfacPayment",value:function(e,t){return"credit"===e&&"PAYFAC"===t.vendor&&t.enabled||!t}},{key:"isCreditPayjunctionPayment",value:function(e,t){return"credit"===e&&"PAYJUNCTION"===t.vendor&&t.enabled||!t}},{key:"isCreditCardExternalPayment",value:function(e,t){return"credit"===e&&(!t.enabled||"NONE"===t.vendor)}},{key:"isCreditEcheckInstamedPayment",value:function(e,t){return("credit"===e||"echeck"===e)&&"INSTAMED"===t.vendor&&t.enabled}},{key:"isPayjunctionSmartTerminalPayment",value:function(e,t){return"smartTerminal"===e&&"PAYJUNCTION"===t.vendor}},{key:"isPayfacTerminalPayment",value:function(e,t){return"smartTerminal"===e&&"PAYFAC"===t.vendor}},{key:"isCheckPayment",value:function(e){return"check"===e}},{key:"isEcheckPayjunctionPayment",value:function(e,t){return"echeck"===e&&"PAYJUNCTION"===t.vendor&&t.enabled}},{key:"isECheckPayfacPayment",value:function(e,t){return"echeck"===e&&"PAYFAC"===t.vendor&&t.enabled}},{key:"isCashPayment",value:function(e){return"cash"===e}},{key:"isPayjunctionLastCardUsedPayment",value:function(e,t){return"lastUsedCard"===e&&"PAYJUNCTION"===t.vendor&&t.enabled}},{key:"isPayfacCardsOnFile",value:function(e,t){return"payfacCardsOnFile"===e&&"PAYFAC"===t.vendor&&t.enabled}},{key:"isOtherPayment",value:function(e){return"other"===e||!isNaN(e)}},{key:"getTotalPaymentAmount",value:function(e){return a.default.sumBy(e.payments,"amount")}}]),e}(),ve=function(){function e(t,n){ue(this,e),this.componentService=t,this.patientPaymentService=n}return e.$inject=["ComponentService","PatientPaymentService"],fe(e,[{key:"$onChanges",value:function(e){this.componentService.updateOneWayBindings(this,e,"paymentMethod","paymentSettings")}},{key:"isCreditPayfac",value:function(){return this.patientPaymentService.isCreditPayfacPayment(this.paymentMethod,this.paymentSettings)}},{key:"isCreditPayjunction",value:function(){return this.patientPaymentService.isCreditPayjunctionPayment(this.paymentMethod,this.paymentSettings)}},{key:"isCreditCardExternal",value:function(){return this.patientPaymentService.isCreditCardExternalPayment(this.paymentMethod,this.paymentSettings)}},{key:"isCreditEcheckInstamed",value:function(){return this.patientPaymentService.isCreditEcheckInstamedPayment(this.paymentMethod,this.paymentSettings)}},{key:"isPayjunctionSmartTerminal",value:function(){return this.patientPaymentService.isPayjunctionSmartTerminalPayment(this.paymentMethod,this.paymentSettings)}},{key:"isPayfacTerminal",value:function(){return this.patientPaymentService.isPayfacTerminalPayment(this.paymentMethod,this.paymentSettings)}},{key:"isCheck",value:function(){return this.patientPaymentService.isCheckPayment(this.paymentMethod)}},{key:"isEcheckPayjunction",value:function(){return this.patientPaymentService.isEcheckPayjunctionPayment(this.paymentMethod,this.paymentSettings)}},{key:"isECheckPayfac",value:function(){return this.patientPaymentService.isECheckPayfacPayment(this.paymentMethod,this.paymentSettings)}},{key:"isCash",value:function(){return this.patientPaymentService.isCashPayment(this.paymentMethod)}},{key:"isPayjunctionLastCardUsed",value:function(){return this.patientPaymentService.isPayjunctionLastCardUsedPayment(this.paymentMethod,this.paymentSettings)}},{key:"isPayfacCardsOnFile",value:function(){return this.patientPaymentService.isPayfacCardsOnFile(this.paymentMethod,this.paymentSettings)}},{key:"isOther",value:function(){return this.patientPaymentService.isOtherPayment(this.paymentMethod)}}]),e}(),Te={template:n(1718),transclude:{creditPayjunction:"?creditPayjunction",creditPayfac:"?creditPayfac",creditCardExternal:"?creditCardExternal",creditECheckInstamed:"?creditECheckInstamed",payjunctionSmartTerminal:"?payjunctionSmartTerminal",payfacTerminal:"?payfacTerminal",check:"?check",eCheckPayjunction:"?eCheckPayjunction",eCheckPayfac:"?eCheckPayfac",cash:"?cash",payjunctionLastCardUsed:"?payjunctionLastCardUsed",payfacCardsOnFile:"?payfacCardsOnFile",other:"?other"},bindings:{paymentMethod:"<",paymentSettings:"<"},controller:ve};function _e(e,t,n,i,o,s,c,l,d,p,u,m,f,b,A,h,M,O,y,g,E,v,T,_,I,S,P,R,C,N,z,L,D,q,F,U,B,k,W){var $=this;function w(){return $.showVoidedTransaction()?$.voidedTransaction.id:$.transaction.id}$.isRCMUser="RCM"===APP.loggedInUserRole,$.patient=i,$.isBillingStatementsEnabled=!1,$.transaction=o,a.default.has(o,"facility.timeZone")?$.timeZoneAbbr=v(o.facility.timeZone):$.timeZoneAbbr="UTC",$.isExternalPatientPayment=a.default.has(o,"mavTransactionLogPendingPayment"),$.voidedTransaction=o&&o.referenceTransaction?o.referenceTransaction:null,$.patientReceivedPayment=s,$.chargeId=c,$.paymentSettings=l,$.$uibModalInstance=n,$.activeTab=a.default.get(g,"activeTab",0),$.hideVoidedTransaction=a.default.get(g,"hideVoidedTransaction",!1),$.hidePaymentDetails=a.default.get(g,"hidePaymentDetails")||null===o,$.hasPendingBatchUpdate=!1,$.isLegacyPayment=$.patientReceivedPayment.legacy,$.selectedPaymentCode=null,$.reassignAmounts={},$.showAllocationHistoryInitially=a.default.get(g,"showAllocationHistoryInitially",!1),$.taxpayerIds=A,$.closedPeriodDate=(0,r.default)(P).subtract(1,"day"),$.paymentPlan=h,$.isPaymentPlanFeatureEnabled=z,$.payfacMode=D,$.isLabelRebrandedEnabled=W,$.existingBatchId=a.default.get($.transaction,"paymentBatch.id"),$.hasPatientPaymentsPrivilege=y.hasPatientPaymentsPrivilege(),$.hasPatientLedgerPrivilege=y.hasPatientLedgerPrivilege(),$.hasAllocatorAccess=y.hasFirmPaymentsPrivilege(),$.voidMessage="Payment has been voided.",$.postedRefundMessage="Payment or Transfer has been partially or fully allocated to a charge or refunded.",$.patientTransferMessage="There is money which is allocated. Reverse the allocated payments first to void the transfer.",$.legacyTransferRefundMessage="There is no unallocated legacy available or payment has been completely refunded and/or transferred.",$.newPaymentRefundMessage="No unallocated payment amount to refund.",$.newPaymentTransferMessage="No unallocated payment amount to transfer.",$.patientTransferDepositDateMessage="Deposit Date of original payment method.",$.externalTransferDepositDateMessage="Transfer came from an External transfer which does not have an associated Deposit date.",$.paymentPlanTransferDisabledMessage="Payment Plan must be in a Complete or Cancelled status.",$.paymentPlanVoidDisabledMessage="Linked to Payment Plan. Unable to void.",$.codeCategory=a.default.get(F,"codeCategory"),$.patientPackage=null,$.packageLinkingStatus=ne.PATIENT_PROMO_PACKAGE_LINKING_STATUS.NONE,$.showLinkPaymentToPackage=!1,$.isMultipleRefundsEnabled=!1,$.changeLabelBrand=function(e){switch(e){case"Pocket Patient Android":return $.isLabelRebrandedEnabled?"APPatient Android":e;case"Pocket Patient iOS":return $.isLabelRebrandedEnabled?"APPatient iOS":e;default:return e}},$.getDepositUnallocatedFunds=function(){if($.isLegacyPayment)return a.default.first(a.default.filter($.payments,(function(e){return"AVAILABLE"===e.fundsType})));var e=a.default.first(a.default.filter($.payments,(function(e){return"AVAILABLE"===e.unallocatedFunds.fundsType})));return a.default.get(e,"unallocatedFunds")},$.isDepositGreaterThanPackageAmount=function(){var e=$.packageLinkingStatus!==ne.PATIENT_PROMO_PACKAGE_LINKING_STATUS.LINKED;return $.patientPackage&&$.getDepositUnallocatedAmount()>a.default.round(a.default.subtract(this.patientPackage.totalAmount,this.patientPackage.collectedAmount),2)&&e},$.getDepositUnallocatedAmount=function(){var e=$.getDepositUnallocatedFunds();return e?$.getUnallocatedAmount(e):0},$.hasPackage=function(e){return $.isLegacyPayment?"AVAILABLE"===e.fundsType&&$.patientPackage:"AVAILABLE"===e.unallocatedFunds.fundsType&&$.patientPackage},$.onPatientPromoPackageSelect=function(e){$.patientPackage=e},$.onPackageLinkingStatusChange=function(e){$.packageLinkingStatus=e},$.generateHeader=function(){var e=a.default.get(g,"modalTitle"),t=e||T(o);$.$uibModalInstance.modalScope.title="Viewing ".concat(t,": ").concat($.patientReceivedPayment.businessUnit.title)},$.loadPatientPackage=function(e){$.patientPackage=a.default.isEmpty(e)?null:e,$.packageLinkingStatus=a.default.isNil($.patientPackage)?ne.PATIENT_PROMO_PACKAGE_LINKING_STATUS.NOT_LINKED:ne.PATIENT_PROMO_PACKAGE_LINKING_STATUS.LINKED},$.searchLinkedPatientPackage=function(){var e=$.getDepositUnallocatedFunds(),t=a.default.get(e,"id");if(t){B.findLinkedPatientPackage(t,"totalAmount,collectedAmount,payments(assignedAmount,unallocatedFunds),items,expirationDate,voidDate").then((function(e){return $.loadPatientPackage(e)}))}},$.shouldShowLinkPaymentToPackage=function(){return a.default.get(APP,"mavFeatureFlags.isPromotionPackageManagementEnabled",!1)&&(a.default.isNil($.paymentPlan)||a.default.isEmpty($.paymentPlan))},$.init=function(){if($.generateHeader(),M.getLedgerOverview($.patient.id,$.patientReceivedPayment.businessUnit.id).then((function(e){return $.ledgerOverview=e.data})),O.getFirstUnclosedDateForBusinessUnit($.patientReceivedPayment.businessUnit.id).then(a.default.setter($,"firstUnclosedDate")),C.getEnableBillingStatements().then((function(e){return $.isBillingStatementsEnabled=e})),$.getIsTransactionSettled(),$.showAssociatePaymentPlan=$.shouldShowAssociatePaymentPlan(),$.payments=$.getPayments(),$.searchLinkedPatientPackage(),a.default.has($.transaction,"provider")){var e=a.default.get($.transaction,"provider");$.onProviderSelected(e)}$.isProviderNameOnUpdateTransactionEnabled=a.default.get(APP.mavFeatureFlags,"isProviderNameOnUpdateTransactionEnabled",!1),q.getSettings(s.businessUnit.id).then((function(e){$.paymentBatchRequired=a.default.get(e,"paymentBatchRequired",!1)})),$.updateDepositAmount(),$.isDefaultSelected=$.codeCategory&&!$.paymentSettings.codeCategoryEnabled,$.paymentPlanCodeCategory=a.default.get($.paymentPlan,"codeCategoryPaymentPlan.codeCategory"),$.showLinkPaymentToPackage=$.shouldShowLinkPaymentToPackage(),$.isMultipleRefundsEnabled=a.default.get(APP.mavFeatureFlags,"isMultipleRefundsEnabled",!1)},$.isDefaultCodeCategorySelected=function(){return $.isDefaultSelected||$.isPaymentPlanFeatureEnabled&&$.paymentPlanCodeCategory},$.updateDepositAmount=function(){$.depositAmount=a.default.get(a.default.find($.payments,(function(e){return"AVAILABLE"===a.default.get(e,"unallocatedFunds.fundsType")})),"amount")},$.shouldShowAssociatePaymentPlan=function(){return!("PATIENT_EXTERNAL_TRANSFER"===a.default.get($,"transaction.transactionType"))&&!$.isLegacyPayment&&z&&"ACTIVE"===$.payfacMode&&a.default.isNil($.patientPackage)},$.onPlanLinkStatusChange=function(e){$.planLinkStatus=e,$.selectedPaymentCode=null,"UNLINKED"===e&&($.paymentPlan=null,$.onCodeCategoryChange($.codeCategory)),$.setCodeCategoryFromPaymentPlan()},$.setCodeCategoryFromPaymentPlan=function(){$.paymentPlanCodeCategory=a.default.get($.paymentPlan,"codeCategoryPaymentPlan.codeCategory"),$.paymentPlanCodeCategory&&$.depositAmount&&$.onCodeCategoryChange($.paymentPlanCodeCategory)},$.onPaymentPlanChange=function(e){$.paymentPlan=e,$.setCodeCategoryFromPaymentPlan()},$.hasPaymentPlanAssigned=function(e){return N.hasPaymentPlanAssigned(e,$.paymentPlan)},$.hasPaymentPlanAssignedAndPayfacModeIsActive=function(e){return"ACTIVE"===$.payfacMode&&$.hasPaymentPlanAssigned(e)},$.doesPaymentPlanAllowTransfer=function(){if(!$.paymentPlan)return!0;var e=a.default.get($,"transaction.payments",[]).filter((function(e){return e.unallocatedFunds.unallocatedAmount>0})).filter((function(e){return!$.hasPaymentPlanAssigned(e)}));return!a.default.isEmpty(e)||"ACTIVE"!==$.paymentPlan.status&&"DELINQUENT"!==$.paymentPlan.status},$.isClosed=function(){return!$.closedPeriodDate||!$.getDepositDate()||($.closedPeriodDate.isSame((0,r.default)($.getDepositDate()))||$.closedPeriodDate.isAfter((0,r.default)($.getDepositDate())))},$.onBatchSelect=function(e){$.transaction.paymentBatch=e,$.setHasPendingBatchUpdateFlag()},$.setHasPendingBatchUpdateFlag=function(){$.hasPendingBatchUpdate=$.existingBatchId!==a.default.get($.transaction,"paymentBatch.id")},$.onBatchRemove=function(){$.transaction.paymentBatch=null,$.setHasPendingBatchUpdateFlag()},$.isBatchDisabled=function(){return!$.hasPatientPaymentsPrivilege||O.isBatchSelectorDisabled($.transaction,$.firstUnclosedDate)},$.appointmentSelected=function(e){e?($.transaction.appointment=e,e.provider&&$.onProviderSelected(e.provider)):$.transaction.appointment=null},$.shouldDisableProviderSelect=function(){return $.hasAppointment()||$.isClosed()},$.hasAppointment=function(){return!a.default.isNil($.transaction.appointment)},$.onProviderSelected=function(e){e?($.transaction.providerId=e.id,$.selectedProvider=e):(delete $.transaction.providerId,$.selectedProvider=null)},$.isPatientTransfer=function(){return O.isPatientTransfer($.transaction)},$.isBusinessUnitTransfer=function(){return O.isBusinessUnitTransfer($.transaction)},$.isExternalTransfer=function(){return O.isExternalTransfer($.transaction)},$.isTransferTransaction=function(){return O.isTransferTransaction($.transaction)},$.showVoidButton=function(){return!$.isPatientTransfer()&&!$.isBusinessUnitTransfer()},$.showTransferInfo=function(){return $.isBusinessUnitTransfer()||$.isPatientTransfer()},$.hasLockedPaymentBatch=function(){return a.default.get($.transaction,"paymentBatch.locked")},$.showBusinessUnitTransferButton=function(){return a.default.get(APP.mavFeatureFlags,"isBusinessUnitTransferEnabled",!1)&&a.default.size(A)>1},$.getIsTransactionSettled=function(){$.transaction&&M.isTransactionSettled($.transaction.id).then((function(e){$.isSettled=e.data}))},$.emailReceipt=function(){u.openModal($.patient.email,w())},$.sendReceiptToIntramail=function(){R.sendReceiptToIntramail(w()).then((function(e){M.getTransaction(o.id,"TRANSACTION_RECEIPT").then((function(e){$.showVoidedTransaction()?$.voidedTransaction.messageMain=e.data.messageMain:$.transaction.messageMain=e.data.messageMain}))}))},$.getCanSendReceiptToIntramail=function(){return $.transaction.patient.portalEnabled&&$.isBillingStatementsEnabled&&!$.getMessageMain()},$.printReceipt=function(){return M.getReceipt(w()).then((function(e){window.location=e.data.filePath})).catch((function(){console.log("error occurred while trying to download the receipt.")}))},$.hasUnallocatedFundsForRefund=function(){var e=$.transaction.patientReceivedPayment.unallocatedFunds;return!a.default.isEmpty(a.default.filter(e,O.hasUnallocatedAmount))},$.transactionHasRefundableAmount=function(){return $.transaction.returnedAmount<$.transaction.amount},$.isVoidOrRefund=function(){return"REFUND"===a.default.get($.transaction,"type")&&a.default.includes(["VOID","APPROVED"],a.default.get($.transaction,"status"))},$.isRefundable=function(){return $.isPaymentVendorDifferentThanTransaction()||$.isSettled&&O.isRefundableTransaction($.transaction)||O.isNonAchInstamedPayment($.transaction)},$.isRefundButtonDisabled=function(){return!$.hasPatientLedgerPrivilege||!$.transaction.canRefund||$.isPJTransaction()&&"PAYJUNCTION"===$.paymentSettings.vendor&&!$.isSettled||!$.doesPaymentPlanAllowTransfer()},$.isEligibleToRefund=function(){return $.hasUnallocatedFundsForRefund()&&$.transactionHasRefundableAmount()},$.refundTransaction=function(){a.default.get(APP.mavFeatureFlags,"isMultipleRefundsEnabled",!1)&&!a.default.get(this.transaction,"patientReceivedPayment.legacy",!1)?k.getUnallocatedPaymentsRefundModal($.transaction.businessUnit,$.patient,$.ledgerOverview,null,$.transaction,!0).result.finally($.refreshLedgerOverview):m.openModal($.transaction,$.isPaymentVendorDifferentThanTransaction(),$.paymentSettings,$.paymentPlan,$.patientPackage).result.then($.refreshLedgerOverview)},$.isPaymentVendorDifferentThanTransaction=function(){var e=a.default.get($.transaction,"paymentProcessor"),t=$.paymentSettings.vendor;return!!["PAYJUNCTION","INSTAMED","PAYFAC"].includes(e)&&e!==t},$.voidTransaction=function(){p.openModal($.transaction,$.refreshLedgerOverview)},$.isVoided=function(){return $.transaction.voided||O.isVoidTransaction($.transaction)},$.isVoidButtonDisabled=function(){return $.patientPackage||!$.hasPatientLedgerPrivilege||!$.transaction.canVoid||$.isPJTransaction()&&$.isSettled||$.isPaymentVendorDifferentThanTransaction()||"FHIR"===a.default.get($,"transaction.mavTransactionLogPendingPayment.paymentSource")||$.paymentPlan&&!(["CANCELLED","COMPLETED"].includes($.paymentPlan.status)&&"PAYFAC"!==$.transaction.paymentProcessor)},$.isPJTransaction=function(){return"PAYJUNCTION"===$.transaction.paymentProcessor},$.isTransferButtonDisabled=function(){return!$.hasPatientPaymentsPrivilege||!$.transaction.canTransfer||!$.doesPaymentPlanAllowTransfer()},$.isUpdateTransactionButtonDisabled=function(){return!!$.paymentDetailsForm.$invalid||(!$.hasPatientPaymentsPrivilege||$.isVoided()||!$.paymentDetailsForm.$dirty||$.selectedPaymentCode)},$.isVoidPatientTransferButtonDisabled=function(){return $.isVoidButtonDisabled()||$.isPatientTransferFundsAllocated()},$.isPatientTransferFundsAllocated=function(){return O.isPatientFundsAllocated(this.transaction)},$.isBusinessUnitTransferButtonDisabled=function(){return!$.hasPatientPaymentsPrivilege||!$.transaction.canTransfer||!$.doesPaymentPlanAllowTransfer()},$.transferFunds=function(){f.open($.transaction,$.paymentPlan,$.paymentSettings,$.patientPackage).result.finally($.refreshLedgerOverview)},$.transferFundsToBusinessUnit=function(){b.open($.transaction,$.taxpayerIds,$.paymentPlan,$.paymentSettings,$.patientPackage).result.finally($.refreshLedgerOverview)},$.getPayments=function(){return $.isLegacyPayment?(0,a.default)($.patientReceivedPayment.unallocatedFunds).filter(O.hasUnallocatedAmount).sortBy(d).value():(0,a.default)($.transaction.payments).filter((function(e){return e.amount>0||O.hasUnallocatedAmount(e.unallocatedFunds)})).sortBy((function(e){return d(e.unallocatedFunds)})).value()},$.getDepositDate=function(){return O.getTransactionDepositDate($.transaction)},$.showDepositDateHint=function(){return!$.isLegacyPayment&&O.isTransferTransaction($.transaction)},$.getDepositDateTooltip=function(){var e=O.isTransferFromAnotherTransfer($.transaction);return $.isPatientTransfer()&&!e?$.patientTransferDepositDateMessage:$.isExternalTransfer()||e?$.externalTransferDepositDateMessage:void 0},$.getTotalUnallocatedAmounts=function(){return a.default.round((0,a.default)($.transaction.payments).sumBy("unallocatedFunds.unallocatedAmount"),2)},$.showVoidedTransaction=function(){return!$.hideVoidedTransaction&&$.voidedTransaction},$.getTransactionId=function(){var e=a.default.get($.transaction,"transactionId"),t=a.default.get($.voidedTransaction,"transactionId");return $.isInstamedVoid()?e:$.showVoidedTransaction()?t:e},$.getReceiptPrintedDate=function(){return $.showVoidedTransaction()?$.voidedTransaction.messageMain.dateCreated:$.transaction.messageMain.dateCreated},$.getMessageMain=function(){return $.showVoidedTransaction()?$.voidedTransaction.messageMain:$.transaction.messageMain},$.isInstamedVoid=function(){return $.transaction.voided&&"INSTAMED"===$.transaction.paymentProcessor},$.getTransactionInitiatedBy=function(){if("BUILTIN"===a.default.get($.transaction,"transactionInitiatedBy.type"))return"System";var e=a.default.get($.transaction,"transactionInitiatedBy.fullName"),t=a.default.get($.voidedTransaction,"transactionInitiatedBy.fullName");return $.showVoidedTransaction()?t:e},$.getTransactionInitiatedDate=function(){var e=a.default.get($.transaction,"transactionInitiatedDate"),t=a.default.get($.voidedTransaction,"transactionInitiatedDate");return $.showVoidedTransaction()?t:e},$.getTransactionTimeZone=function(){var e=a.default.get($.transaction,"facility.timeZone");return e||"UTC"},$.getRestrictedTransactionNote=function(){var e=a.default.get($.transaction,"restrictedNote.noteText"),t=a.default.get($.voidedTransaction,"restrictedNote.noteText");return $.showVoidedTransaction()?t:e},$.refreshTransaction=function(){return M.getTransaction($.transaction.id,"TRANSACTION_RECEIPT").then((function(e){$.transaction=e.data,$.voidedTransaction=e.data.referenceTransaction,$.isProviderNameOnUpdateTransactionEnabled&&a.default.has($.transaction,"provider")&&$.onProviderSelected($.transaction.provider),U.findLinkedCodeCategory($.transaction).then((function(e){$.codeCategory=a.default.get(e,"codeCategory")})),L.get(e.data.patientReceivedPayment.id,{selector:"legacy,unallocatedFunds(patientPackagePayment(patientPackage(items))),businessUnit,paymentChannelType"}).then((function(e){$.patientReceivedPayment=e,$.payments=$.getPayments(),$.updateDepositAmount()}))}))},$.refreshLedgerOverview=function(){return M.getLedgerOverview($.patient.id,$.patientReceivedPayment.businessUnit.id).then((function(e){if($.ledgerOverview=e.data,$.transaction)return $.refreshTransaction()}))},$.getUnallocatedAmount=function(e){return e.unallocatedAmount-($.reassignAmounts[e.fundsType]||0)},$.getPaymentAmount=function(e){return e.amount-($.reassignAmounts[e.unallocatedFunds.fundsType]||0)},$.getCheckOrReferenceNumber=function(){return a.default.get($.transaction,"checkNumber",a.default.get($.transaction,"referenceNumber"))},$.canReassignAmount=function(e){return $.hasPatientPaymentsPrivilege&&$.transaction&&(!$.isVoided()||$.isLegacyPayment)&&a.default.get(e,"unallocatedAmount")>0&&"LINKING"!==$.planLinkStatus&&!$.selectedPaymentCode&&$.packageLinkingStatus!==ne.PATIENT_PROMO_PACKAGE_LINKING_STATUS.LINKING},$.reassign=function(e){$.selectedPaymentCode=e.fundsType,$.selectedCodeCategory=$.codeCategory},$.cancelReassign=function(e){$.selectedPaymentCode=null,e||$.updateCodeCategory()},$.isCategoryRequired=function(){return!$.isLegacyPayment&&$.paymentSettings.codeCategoryRequired&&$.hasDeposit()},$.hasDeposit=function(){return"AVAILABLE"===a.default.get($.unallocatedTransfer,"to")||"AVAILABLE"===a.default.get($.unallocatedTransfer,"from")?"AVAILABLE"===$.unallocatedTransfer.to||$.isDepositHasBalance():$.depositAmount>0},$.isDepositHasBalance=function(){var e=!1;return $.depositAmount-$.unallocatedTransfer.amount>0&&(e=!0,$.updateCodeCategory()),e},$.onCodeCategoryChange=function(e){$.codeCategory=e,a.default.get(F,"codeCategory.id")!==a.default.get($.codeCategory,"id")&&$.paymentDetailsForm.$setDirty()},$.requiredCodeCategoryIsEmpty=function(){return $.isCategoryRequired()&&a.default.isEmpty($.codeCategory)},$.onPaymentCodeChange=function(e){$.unallocatedTransfer=e},$.updateCodeCategory=function(){$.selectedCodeCategory&&($.codeCategory=$.selectedCodeCategory,$.selectedCodeCategory=null)},$.getVoidButtonTooltip=function(){return $.isVoidButtonDisabled()?!$.isExternalPatientPayment&&$.isPaymentVendorDifferentThanTransaction()?"Cannot void this payment because the payment vendor has changed. Only paper check and cash refunds are allowed.":!$.isExternalPatientPayment&&$.isPJTransaction()&&$.isSettled?"Cannot void this PayJunction transaction because it is already settled.":"FHIR"===a.default.get($,"transaction.mavTransactionLogPendingPayment.paymentSource")?"Cannot void this payment because it is an external patient payment.":$.paymentPlan?$.paymentPlanVoidDisabledMessage:$.transaction.cannotVoidMessage:null},$.getVoidTransferButtonTooltip=function(){if($.isVoidPatientTransferButtonDisabled())return $.paymentPlan?$.paymentPlanVoidDisabledMessage:$.transaction.cannotVoidMessage},$.getRefundButtonTooltip=function(){return $.isRefundButtonDisabled()?$.isPJTransaction()&&!$.isSettled?"Cannot refund this PayJunction transaction because it is not yet settled.":$.doesPaymentPlanAllowTransfer()?$.transaction.cannotRefundMessage:$.paymentPlanTransferDisabledMessage:void 0},$.getTransferButtonTooltip=function(){if($.isTransferButtonDisabled())return $.doesPaymentPlanAllowTransfer()?$.transaction.cannotTransferMessage:$.paymentPlanTransferDisabledMessage},$.getBusinessUnitTransferButtonTooltip=function(){if($.isBusinessUnitTransferButtonDisabled())return $.doesPaymentPlanAllowTransfer()?$.transaction.cannotTransferMessage:$.paymentPlanTransferDisabledMessage},$.openPatientLedger=function(e){t.open(E.get(e.encryptedId,e.id,"ledger"),"_blank")},$.openPatientLedgerInBusinessUnit=function(e){_.saveTaxpayerIdFilter(e.id).$promise.then((function(){return $.$uibModalInstance.close()}))},$.updatePaymentDetails=function(){return M.updatePaymentDetails($.transaction.id,a.default.get($.transaction,"paymentBatch.id"),a.default.get($.transaction,"appointment.id"),a.default.get($.transaction,"note.noteText"),a.default.get($.transaction,"providerId"),a.default.get($.codeCategory,"id")).then((function(e){$.existingBatchId=a.default.get(e,"paymentBatch.id"),$.hasPendingBatchUpdate=!1,S($.selectedProvider,$.transaction)})).finally($.refreshTransaction)},$.hasPaymentChannelType=function(){return a.default.has($,"patientReceivedPayment.paymentChannelType")},$.getRecordedBySectionCss=function(){return $.isTransferTransaction()||$.isRCMUser||$.hasPaymentChannelType()?"":"recorded-by"},$.init(),$.getLinkedPatientPackage=function(){if(ne.PATIENT_PROMO_PACKAGE_LINKING_STATUS.LINKED===$.packageLinkingStatus)return $.patientPackage}}function Ie(e,t,r,o,s){function c(c,l,d,p,u,m){return e.open("",{size:"lg",additionalDialogClass:"patient-transaction-log-modal",controller:_e,template:n(1720),controllerAs:"$ctrl",resolve:{patient:function(){return r.get({id:c,mapId:"ALLOCATOR"}).$promise},transaction:function(){return a.default.isNil(d)?null:t.getTransaction(d.id,"TRANSACTION_RECEIPT").then(a.default.property("data"))},patientReceivedPayment:function(){return o.get(l,{selector:"legacy,unallocatedFunds(patientPackagePayment(patientPackage(items))),businessUnit,paymentChannelType,transactionLog"})},chargeId:function(){return u},options:function(){return m},closedPeriod:function(){return s.getFirstUnclosedDateForSelectedTaxpayer()},paymentSettings:["FirmPaymentSettings",function(e){return e.getEnabled().$promise}],taxpayerIds:["TaxpayerIdentification",function(e){return e.forStaff({mapId:"FACILITIES"}).$promise}],linkedPaymentPlan:["paymentPlanService",function(e){return APP.mavFeatureFlags.isPaymentPlansEnabled?e.findLinkedPaymentPlan(d):null}],linkedCodeCategory:["paymentCodeCategoryService",function(e){return a.default.isNil(d)?null:e.findLinkedCodeCategory(d)}],isPaymentPlanFeatureEnabled:function(){return APP.mavFeatureFlags.isPaymentPlansEnabled},setLedgerGroupProvider:function(){return p?function(e,t){return p(e,t)}:i.default.noop},payfacMode:["firmPayfacEnabledService",function(e){return e.getPayfacMode()}],isLabelRebrandedEnabled:["featureFlagQueryService",function(e){return e.isEnabled(se.FeatureGroupKey.GENERAL,se.GeneralFeatures.POCKET_PATIENT_REBRAND_APPATIENT)}]}})}return{openModal:c,openModalForPatientPaymentAllocation:function(e,t,n,i){var a=n||t.patientReceivedPayment;return c(e,a.id,t,null,null,{activeTab:1,hidePaymentDetails:a.legacy,showAllocationHistoryInitially:i})}}}function Se(e){var t={analyticsPage:"/refundPayment",description:"Refund Payment Modal"};return{openModal:function(n,i,r,o,c){var l=n.businessUnit,d="Refund Payment: ".concat(l.title);return e.open(d,{additionalDialogClass:"ema-refund-modal",resolve:{transaction:function(){return n},isPaymentVendorDifferentThanTransaction:function(){return i},paymentSettings:function(){return r},paymentPlan:function(){return o},shouldDisplayPatientPortalReceiptMessage:["PatientPaymentService",function(e){var t=a.default.get(n,"patient.id");return e.arePatientPortalAndBillingStatementsEnabled(t)}],paymentBatchRequired:["financialBatchSettingsService",function(e){return e.getSettings(l.id).then((function(e){return a.default.get(e,"paymentBatchRequired",!1)}))}],patientPackage:function(){return c},payfacCreditBusinessUnitTransferSourceTransaction:["transactionLogService",function(e){return e.getPayfacCreditBusinessUnitTransferSourceTransaction(n).then((function(e){return e}))}]},controller:"RefundPaymentModalController as refundCtrl",template:s.default},t)}}}function Pe(e,t,n,i,o,s,c,l,d,p,u,m,f,b,A,h,M){var O=this,y=(0,r.default)().subtract(1,"years");O.patientPackage=A,O.shouldDisplayPatientPortalReceiptMessage=b,O.transaction=n,O.isLegacyPayment=O.transaction.patientReceivedPayment.legacy,O.isPaymentVendorDifferentThanTransaction=i,O.paymentSettings=o,O.paymentPlan=s,O.email=O.transaction.patient.email,O.businessUnit=m.getPatientTransactionBusinessUnit(n),O.isPayjunctionPaymentMoreThanOneYearOld="PAYJUNCTION"===O.transaction.paymentProcessor&&(0,r.default)(O.transaction.transactionInitiatedDate).isBefore(y),O.paymentBatchRequired=l,O.emailReceipt=!1,O.printReceipt=!1,O.paymentCodes=[],O.refundAllocations=[],O.maxRefundAmount=[],O.paymentBatch=null,O.errorMessage=null,O.payfacCreditBusinessUnitTransferSourceTransaction=h,O.init=function(){var e=O.transaction.patientReceivedPayment.unallocatedFunds;O.paymentCodes=(0,a.default)(e).filter(m.hasUnallocatedAmount).sortBy(d).value(),O.paymentCodes.map((function(e){O.refundAllocations.push({transactionLogId:O.transaction.id,unallocatedFundsId:e.id,fundsType:e.fundsType,amount:null}),O.maxRefundAmount.push({transactionLogId:O.transaction.id,unallocatedFundsId:e.id,fundsType:e.fundsType,amount:O.getMaxRefundAmount(e)})}))},O.getLegacyMaxRefundableAmount=function(e){var t=a.default.round(a.default.sumBy(O.paymentCodes,"unallocatedAmount"),2),n=Math.min(e.unallocatedAmount,a.default.round(O.transaction.amount-O.transaction.returnedAmount,2));return Math.min(n,t)},O.getMaxRefundAmount=function(e){return O.isLegacyPayment?O.getLegacyMaxRefundableAmount(e):a.default.round(e.unallocatedAmount,2)},O.getTotalUnallocatedAmount=function(){var e=a.default.round(a.default.sumBy(O.paymentCodes,"unallocatedAmount"),2),t=a.default.round(O.transaction.amount-O.getLegacyPaymentUnallocatedAmount(),2);return O.isLegacyPayment?Math.min(t,e):e},O.hasPackage=function(e){return"AVAILABLE"===e.fundsType&&O.patientPackage},O.getLegacyPaymentUnallocatedAmount=function(){var e=a.default.reject(O.transaction.fundsTransactionSourceTransaction,(function(e){var t=a.default.get(e,"transaction.referenceTransaction");return t&&"VOID"===t.status})),t=a.default.sumBy(e,"amount");return t||0},O.isRefundButtonDisabled=function(){return O.refundForm.$invalid||0===O.refund.amount||O.showInvalidPaymentVendorRefundWarning()||O.showOldPayJunctionRefundWarning()||O.showExternalPaymentRefundWarning()},O.calculateTotalRefundAmount=function(){O.refund.amount=a.default.round(a.default.sumBy(O.refund.allocations,"amount")||0,2)},O.getPaymentCodeMaxRefundAllowed=function(e){var t=O.maxRefundAmount.find((function(t){return t.unallocatedFundsId===e.id})).amount;if(!O.isLegacyPayment)return t;var n=this.refund.allocations.filter((function(t){return t.unallocatedFundsId!==e.id})).reduce((function(e,t){return e+(t.amount||0)}),0),i=O.getTotalUnallocatedAmount(),r=a.default.round(i-n,2);return 0===n?Math.min(t,i):Math.min(t,r,i)},O.getDefaultRefundMethod=function(){var e=O.payfacCreditBusinessUnitTransferSourceTransaction||O.transaction,t=a.default.get(e,"paymentMethod.name"),n=e.paymentProcessor;return"PATIENT_CREDIT"===n?"PT_CREDIT":"Check"===t?"CHECK_MANUAL":"E-Check"!==t||!O.paymentSettings.enabled||"PAYJUNCTION"!==n&&"PAYFAC"!==n?"Credit or Debit Card"===t?"MANUAL"!==n&&"NONE"!==O.paymentSettings.vendor&&O.paymentSettings.enabled?"CREDIT_PJ":"CREDIT_MANUAL":"CASH":"CHECK_PJ"},O.refund={notes:null,restrictedNotes:null,amount:0,allocations:O.refundAllocations,email:O.email,batchId:null,refundDetail:{refundMethod:O.getDefaultRefundMethod(),firstName:O.transaction.patient.firstName,lastName:O.transaction.patient.lastName,street1:a.default.get(O.transaction.patient,"addressPrimary.street1"),street2:a.default.get(O.transaction.patient,"addressPrimary.street2"),city:a.default.get(O.transaction.patient,"addressPrimary.city"),state:a.default.get(O.transaction.patient,"addressPrimary.state"),zipcode:a.default.get(O.transaction.patient,"addressPrimary.zipcode")}},O.isBatchDisabled=function(){return m.isBatchSelectorDisabled(O.transaction)},O.onBatchSelect=function(e){O.paymentBatch=e},O.doRefund=function(){return O.refund.email=O.emailReceipt?O.refund.email:null,O.refund.batchId=a.default.get(this,"paymentBatch.id"),O.refund.refundDetail.overrideToGuarantorInfo=!1,a.default.get(APP,"mavFeatureFlags.isMultipleRefundsEnabled",!1)?M.submitRefund(O.refund).then((function(e){var n=a.default.get(e,"data[0]"),i=a.default.get(n,"status");if(["ERROR","DECLINED"].includes(i))O.errorMessage="The refund transaction failed. Please select another refund method.";else{if("UNAUTHORIZED"!==i)return p.showSuccessNotification("Payment Refunded successfully."),O.printReceipt&&O.printRefundReceipt(n),t.close({response:e});O.errorMessage="The password entered in configurations is not valid. Please contact your administrator."}})):u.refundTransaction(this.transaction.id,a.default.get(this,"paymentBatch.id"),O.refund).then((function(e){var n=a.default.get(e,"data.status");if("ERROR"===n||"DECLINED"===n)O.errorMessage=e.data.message;else{if("UNAUTHORIZED"!==n)return p.showSuccessNotification("Payment Refunded successfully."),O.printReceipt&&O.printRefundReceipt(e.data),t.close({response:e});O.errorMessage="The password entered in configurations is not valid. Please contact your administrator."}}))},O.printRefundReceipt=function(e){return u.getReceipt(e.id).then((function(e){window.location=e.data.filePath})).catch((function(){console.log("error occurred while trying to download the receipt.")}))},O.showInvalidPaymentVendorRefundWarning=function(){return O.isPaymentVendorDifferentThanTransaction&&O.isPayJunctionRefundMethod()},O.isCreditRefundMethod=function(){return"CREDIT_MANUAL"===O.refund.refundDetail.refundMethod||"CREDIT_PJ"===O.refund.refundDetail.refundMethod},O.showExternalPaymentRefundWarning=function(){return O.isCreditRefundMethod()&&"FHIR"===a.default.get(O,"transaction.mavTransactionLogPendingPayment.paymentSource")},O.showOldPayJunctionRefundWarning=function(){return O.isPayjunctionPaymentMoreThanOneYearOld&&O.isPayJunctionRefundMethod()},O.isPayJunctionRefundMethod=function(){return"CHECK_PJ"===O.refund.refundDetail.refundMethod||"CREDIT_PJ"===O.refund.refundDetail.refundMethod},O.cancel=function(){t.dismiss()},O.getDepositDate=function(){return m.getTransactionDepositDate(O.transaction)},O.hasLinkedPaymentPlan=function(e,t){return c.hasPaymentPlanAssigned({unallocatedFunds:e},O.paymentPlan,t)},O.init()}function Re(e){var t={analyticsPage:"/manualCreditCardIframeProcessing",description:"Manual Credit Card Iframe Processing Modal"};return{modalInstance:null,openModal:function(i,r,o,s,c,l){return this.modalInstance=e.open("Transaction",{additionalDialogClass:"modal-manual-credit-card-iframe",size:"lg",resolve:{paymentRequest:function(){return i},shopIdentifier:function(){return r},isPayerPayment:function(){return o},firstName:function(){return s},lastName:function(){return c},postalCode:function(){return l},paymentProperties:["PaymentService",function(e){return e.getPaymentProperties().then(a.default.property("data"))}]},controller:"ManualCreditCardIframeProcessingModalController as mccCtrl",template:n(1723)},t),this.modalInstance.result}}}function Ce(e,t,n,i,a,r,o,s,c,l,d,p){var u=this;u.invoiceNumber=t.id,u.totalCharge=t.amount,u.uniqueTransactionId=t.requestPaymentId,u.storeName=a,u.isPayerPayment=r,u.paymentProperties=l,u.poller=null,u.init=function(){d.onPJIframeLoaded=function(){u.poller||(u.poller=p((function(){var e=$("iframe#pjFormFrame");e.contents().find("div.confirmMessage").length>0&&(e.css("height",.99*e.height()),p.cancel(u.poller))}),500))},u.iframeUrl=u.getIframeUrl()},u.getIframeUrl=function(){var e,t;return u.isPayerPayment?(e=i.protocol()+"://"+i.host()+":"+i.port()+APP.contextPath+"/ws/v3/unsecured/ledger/payments/confirmPayerPayJunctionPayment",t="Payer Payment"):(e=i.protocol()+"://"+i.host()+":"+i.port()+APP.contextPath+"/ws/v3/unsecured/ledger/payments/confirmPatientPayJunctionPayment",t="Patient Payment"),n.trustAsResourceUrl(u.paymentProperties.baseUrl+"?store="+encodeURIComponent(u.storeName)+"&need_to_ship=no&need_to_tax=no&identifier="+t+"&quantity=1&description="+t+"&price=$"+u.totalCharge+"&echo=transactionId%3D"+u.uniqueTransactionId+"&relay="+e+"&invoice="+u.invoiceNumber+"&billingFirstName="+o+"&billingLastName="+s+"&billingZip="+c)},u.canIncludeMerchantAccount=function(){return function(e){return""!==e.storeIdentifier}},u.complete=function(){e.close("cancel")},u.init()}function Ne(e){var t={analyticsPage:"/smartTerminalProcessing",description:"Smart Terminal Processing Modal"};return{modalInstance:null,openModal:function(n){return e.open("Transaction",{additionalDialogClass:"modal-smart-terminal",resolve:{paymentRequestId:function(){return n}},controller:"SmartTerminalProcessingModalController as stpCtrl",template:Z.default},t)}}}function ze(e,t,n,i,r,o){var s=this;s.paymentRequestId=t,s.transactionLog=null,s.showError=!1,s.transactionPoller=null,s.signaturePoller=null,s.pollSmartTerminalForCompletedTransaction=function(){var e=1,t=1;a.default.isNil(s.transactionPoller)&&(s.transactionPoller=n((function(){i.getTransactionByPaymentRequestId(s.paymentRequestId).then((function(e){s.transactionLog=e.data,"APPROVED"===s.transactionLog.status?(s.showError=!1,n.cancel(s.transactionPoller),"NOT_REQUIRED_PIN"!==s.transactionLog.paymentRequest.signatureStatus&&"NOT_REQUESTED"!==s.transactionLog.paymentRequest.signatureStatus?s.pollSmartTerminalForSignature():s.closeProcessingModalWithSuccess()):(s.showError=!0,s.isChipCardRemovedError()?(t++,s.processTookTooLongCounter(t)):n.cancel(s.transactionPoller))}),(function(){e++,s.processTookTooLongCounter(e)}))}),1500))},s.processTookTooLongCounter=function(e){if(42===e){s.closeProcessingModalWithError({message:"The Smart Terminal timed out. Please try again."})}},s.isChipCardRemovedError=function(){return s.transactionLog&&s.transactionLog.message.includes("chip card removed")},s.pollSmartTerminalForSignature=function(){var e=1;a.default.isNil(s.signaturePoller)&&(s.signaturePoller=n((function(){o.processSmartTerminalSignature(s.transactionLog.id).then((function(e){n.cancel(s.signaturePoller),s.transactionLog.signatureAttachment=e.data,s.closeProcessingModalWithSuccess()}),(function(){e++,s.signatureRequestTookTooLongCounter(e)}))}),5e3))},s.signatureRequestTookTooLongCounter=function(e){9===e&&(r.openModal(s.transactionLog),o.resetSmartTerminalForTransaction(s.transactionLog.id).then((function(){s.closeProcessingModalWithError(s.transactionLog)})))},s.closeProcessingModalWithError=function(t){s.cancelPollers(),e.close(t||s.transactionLog)},s.closeProcessingModalWithSuccess=function(){i.emailReceiptForPaymentRequest(s.transactionLog.id).then((function(t){!1===t.data&&i.openEmailReceiptErrorNotification(),r.openModal(s.transactionLog),s.cancelPollers(),e.close(s.transactionLog)}))},s.cancel=function(){s.cancelPollers(),e.dismiss()},s.cancelPollers=function(){s.transactionPoller&&n.cancel(s.transactionPoller),s.signaturePoller&&n.cancel(s.signaturePoller)},s.pollSmartTerminalForCompletedTransaction()}function Le(e){var t={analyticsPage:"/smartTerminalTransaction",description:"Smart Terminal Transaction Modal"};return{modalInstance:null,openModal:function(n){return this.modalInstance=e.open("Transaction Complete",{additionalDialogClass:"modal-smart-terminal-transaction",resolve:{transactionLog:function(){return n}},controller:"SmartTerminalTransactionModalController as sttCtrl",template:ee.default},t),this.modalInstance.result}}}function De(e,t,n){var i=this;i.transactionLog=t,i.printReceipt=function(){return n.getReceipt(i.transactionLog.id).then((function(e){window.location=e.data.filePath})).catch((function(){console.log("error occurred while trying to download the receipt.")}))},i.closeModal=function(){e.close()}}var qe=i.default.module("ema.paymentServices",[d.moduleName,c.userPrivilegeServicesModule,_.moduleName,I.paymentsServiceModule,p.moduleName,m.moduleName,f.moduleName,"ui.bootstrap",u.moduleName,l.moduleName,y.paymentAppointmentSelectorModule,b.moduleName,A.moduleName,g.payfacTerminalServiceModule,E.payfacPaymentRequestProcessorModalModule,M.chargeDetailsModalModule,O.chargeServiceModule,v.voidProductChargeModalModule,T.moduleName,S.receiptsServiceModule,P.firmRegistryValueServiceModule,h.moduleName,R.moduleName,C.associatePaymentPlanModule,N.paymentPlanServiceModule,z.makePaymentLinkPlanModule,L.paymentPlanSettingsServiceModule,D.patientReceivedPaymentsServiceModule,q.financialBatchModule,U.firmPayfacEnabledServiceModule,F.codeCategorySelectModule,B.financialBatchSettingsServiceModule,k.paymentCodeCategoryServiceModule,W.emailReceiptModalModule,w.patientStatementPreviewLinkModule,te.patientPromoPackageServiceModule,ne.associatePromoPackageModule,ie.transactionLogServiceModule,ae.patientFinancialsModalSubheaderNew,re.patientPaymentsRefundServiceModule,"rcmVisibility.directives",oe.featureFlagQueryServiceModule]).factory("SwipeReader",[function(){return{parseSwipe:function(e){var t={valid:!1};if(i.default.isString(e)&&0===e.toUpperCase().indexOf("%B")){var n=e.split("^"),a=n[1].split("/");t.cardTrack=e,t.firstName=a[1].trim().split(" ")[0],t.lastName=a[0].trim(),t.cardNumber=n[0].substring(2),t.cardType=this.detectType(t.cardNumber),t.expirationMonth=n[2].substring(2,4),t.expirationYear="20"+n[2].substring(0,2),t.valid=null!==t.cardType}return t},_patterns:[{type:"VISA",pattern:/^4[0-9]{12}(?:[0-9]{3})?$/},{type:"MC",pattern:/^5[1-5][0-9]{14}$/},{type:"AMEX",pattern:/^3[47][0-9]{13}$/},{type:"DC",pattern:/^6(?:011|5[0-9]{2})[0-9]{12}$/}],detectType:function(e){if(i.default.isString(e)){for(var t=null,n=0;n',link:function(t,n,i,a){a.$formatters.push((function(e){return t.isSwipePayment?"******"+e.substr(e.length-4):e})),a.$validators.cardtype=function(n){var i=!0;if(n){var a=e.detectType(n);a?t.cardTypeModel=a:i=!1}return i}}}}]).component("patientPaymentTotals",{bindings:{payment:"<",primaryPolicy:"<",patient:"<",businessUnit:"<",hidePaymentPlans:"0&&e.patientResponsibleBalance>0:l.isValidChargeCategory(e)&&("INSURANCE_ASSIGNMENTS_TO_PATIENT"!==a.default.get(e,"chargeCategory")||e.patientResponsibleBalance>0||e.resolved)}))},l.getBillCharges=function(e){return a.default.groupBy(e,(function(e){return e.billItem.bill.id}))},l.getTotal=function(){return a.default.reduce(l.financials.charges,(function(e,t){return l.isValidChargeCategory(t)?e+t.actualAmount:e}),0)},l.getTotalRemaining=function(){return a.default.round(a.default.reduce(l.financials.charges,(function(e,t){return l.isValidChargeCategory(t)?e+t.remainingAmount:e}),0),2)},l.getChargeSubtotal=function(e){var t=e.units?e.units:1;return e.originalAmount*t},l.getChargeServiceDate=function(e){return a.default.result(e,"billItem.bill.serviceDateLd")||e.serviceDateLd},l.isChargeDeletable=function(e){return o.hasPatientBillingPrivilege()&&!e.billItem&&!e.resolved},l.deleteCharge=function(e){var n=a.default.has(e,"invPatientProduct"),o={businessUnit:e.businessUnit};(n?s.openModal([e.id],e.businessUnit,l.patient).then((function(e){return c.voidProductCharges(e).then((function(e){return l.financials=e}))})):r.openModal("Void Charge Posting Date",o).result.then((function(t){return c.voidCharges({chargeIds:[e.id],postDate:t.postDate,paymentBatchId:a.default.get(t,"batch.id")}).then((function(e){return l.financials=e.data}))}))).then((function(){(l.onDeleteCharge||i.default.noop)({financials:l.financials}),t.showSuccessNotification("Charge was deleted successfully.")}))},l.getBillPaymentsAmount=function(e){var t=(0,a.default)(e).map("chargeResponsibility").flatten().filter({responsibleBalance:{balanceType:"PATIENT"}}).value();return a.default.reduce(t,(function(e,t){return e+t.paidAmount}),0)},l.getChargePaymentAmount=function(e){var t=a.default.find(e.chargeResponsibility,(function(e){return e.responsibleBalance&&"PATIENT"===e.responsibleBalance.balanceType}));return a.default.get(t,"paidAmount",0)},l.viewChargeDetails=function(e){var t=a.default.has(e,"invPatientProduct");n.openModal(e.id,e.businessUnit,l.patient).then((function(e){e&&(l.financials=t?e:e.data,(l.onDeleteCharge||i.default.noop)({financials:l.financials}))}))},l.hideDetails=function(e){return e.billItem}}]}).component("unappliedPatientPayments",{bindings:{financials:"<"},template:J.default,controllerAs:"ctrl",controller:["ComponentService",function(e){var t=this;t.$onChanges=function(n){e.updateOneWayBindings(t,n,"financials")}}]}).service("PatientPaymentService",Ee).component("paymentMethodSpecificContent",Te).component("paymentMethodSpecificActions",function(){t.$inject=["ComponentService","$rootScope","EventService","EmaPleaseWaitModal","emaNotification","PaymentService","PayjunctionPaymentService","SmartTerminalProcessingModal","featureFlagQueryService","ManualCreditCardIframeProcessingModal","iframeProcessingModal","EmaModalServices","userPrivilegeUtils","paymentsService","paymentsModalService","payfacPaymentRequestProcessorModal"];var e={paymentSettings:"<",paymentMethod:"<",payment:"<",patient:"<",appointment:"',controller:["ComponentService",function(e){var t=this,n=e.getOneWayBindingsUpdater(t,["selectedLocation","businessUnit"]);t.$onChanges=function(e){n(e),(e.selectedLocation||e.businessUnit)&&t.getValidSmartTerminals()},t.getValidSmartTerminals=function(){var e=(0,a.default)(t.smartTerminals).reduce((function(e,n){return(a.default.isEmpty(n.facilities)||a.default.find(n.facilities,(function(e){return e.id===t.selectedLocation})))&&e.push(n),e}),[]);return 1===e.length&&(t.selectedTerminal=a.default.head(e),t.onChange({smartTerminal:t.selectedTerminal})),e}}]}).component("merchantAccountSelector",{bindings:{merchantAccounts:"<",selectedMerchantAccount:"<",onChange:"&",businessUnit:"<",accountType:"@",hasStoreIdentifier:"<",location:"<"},template:'',controller:["ComponentService",function(e){var t=this,n=e.getOneWayBindingsUpdater(t,["businessUnit"]);t.$onChanges=function(e){n(e),e.businessUnit&&t.getMerchantAccounts()},t.getMerchantAccounts=function(){var e=(0,a.default)(t.merchantAccounts).reduce((function(e,n){var i=!t.businessUnit||a.default.get(n,"businessUnit.id")===t.businessUnit.id,r=!t.accountType||a.default.get(n,"accountType")===t.accountType,o=!t.hasStoreIdentifier||a.default.get(n,"storeIdentifier"),s=t.isValidMerchantAccountForLocation(n);return i&&r&&o&&s&&e.push(n),e}),[]);return 1===e.length&&(t.selectedMerchantAccount=a.default.head(e),t.onChange({merchantAccount:t.selectedMerchantAccount.merchantId})),e},t.isValidMerchantAccountForLocation=function(e){var n=!1,i=a.default.get(e,"locations",[]),r=a.default.size(i);return!a.default.isEmpty(t.location)&&(0===r?n=!0:a.default.isEmpty(a.default.filter(i,(function(e){return e.id===t.location.id})))||(n=!0),n)}}]}).factory("SmartTerminalProcessingModal",Ne).controller("SmartTerminalProcessingModalController",ze).factory("SmartTerminalTransactionModal",Le).controller("SmartTerminalTransactionModalController",De).filter("merchantAccountHasStoreFilter",(function(){return function(e){return a.default.filter(e,a.default.property("storeIdentifier"))}})).controller("ManualCreditCardIframeProcessingModalController",Ce).factory("ManualCreditCardIframeProcessingModal",Re).component("emailReceiptConfirmation",{template:j.default,bindings:{email:"=",sendEmail:"=",defaultEmail:"")))},i.getPatientPhotoUrl=function(){return i.patient.photo?i.patient.photo.inlineFilePath||i.patient.photo.filePath:APP.contextPath+"/static/dhtmlxSchedulerV5/imgs/patientNoPhoto.png"}}]}).component("patientFinancialsReassignLine",{template:n(1722),bindings:{transaction:"<",paymentCode:"<",linkedPaymentPlan:"<",onAmountChange:"&",onSave:"&",onCancel:"&",payfacMode:"<",codeCategory:"<",onPaymentCodeChange:"&",isCodeCategoryRequired:"<",linkedPatientPackage:"e.length)&&(t=e.length);for(var n=0,i=new Array(t);n=0?t:Math.abs(t),n);return t>0?i?"-"+a:"("+a+")":a}return e(0,n)}}function S(e){var t=o.default.template('');return function(n){var i=n?"ok":"remove",a=n?"Yes":"No",r=n?"green":"red";return o.default.isUndefined(n)?"":e.trustAsHtml(t({cl:i,t:a,c:r}))}}function P(e){return function(t){switch(t&&t.type){case"INSTITUTION":return t.institutionName;default:return e("lastAndFirstName")(t)}}}function R(e){return function(t){if(t)return e("referralContactName")(t)+(t.npi?" [NPI:"+t.npi+"]":"")}}function C(e){return function(t){return e.trustAsResourceUrl(t)}}function N(e){return t=e.CONTEXT_PATH,n=e.resourceVersionParameters,function(e){return-1===e.indexOf(t)&&(e=t+e),(e+=-1===e.indexOf("?")?"?":"&")+n};var t,n}function z(e){var t=o.default.union(e.isWorkersCompBillingEnabled()?null:["WORKERS_COMP"],e.isVisionBillingEnabled()?null:["PRIMARY_VISION","SECONDARY_VISION","VISION"],e.isAutoPipBillingEnabled()?null:["AUTO_PIP"]);return function(e){return o.default.reject(e,o.default.includedIn(t,"name"))}}function L(e){var t="VISION";return function(n){if(!e.isVisionBillingEnabled()){if(o.default.isArray(n))return o.default.reject(n,o.default.includedIn([t],"name"));if(o.default.isObject(n))return o.default.omit(n,t)}return n}}function D(e,t){var n={},i=o.default.collectingDebounce((function(i){e.$apply((function(){var e=(0,o.default)(i).map(0).uniq().value();t.load({enums:o.default.zipObject(e,e),indexed:!0}).then((function(e){return o.default.assign(n,e)}))}))}),250),a=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"localizedMessage",r=n[t];return void 0===r&&(i(t),r=n[t]=!1),!1===r?e:r?o.default.get(r[e],a,e):void 0};return a.$stateful=!0,a}function q(e){function t(n,i,a){for(var r=n.contents(),o=0;o\n"),i+=e.street2),e.street3&&(i&&(i+=t?n?" - ":" ":"\n
\n"),i+=e.street3),(e.city||e.state||e.zipcode)&&(i+=t?n?" - ":" ":"\n
\n",e.city&&(i+=e.city+", "),e.state&&(i+=e.state+" "),e.zipcode&&(9===e.zipcode.length?i+=[e.zipcode.slice(0,5),"-",e.zipcode.slice(5)].join(""):i+=e.zipcode))),i}})).filter("formatPhone",(function(){return a.formatPhone})).filter("formatPhoneWithType",b).filter("formatZip",(function(){return function(e){var t,n=(t=e)?t.replace(/[^0-9]/g,""):"";return 5===n.length?n:9===n.length?function(e,t){var n=0;return t.replace(/[0-9]/g,(function(){return e.charAt(n++)}))}(n,"99999-9999"):e}})).filter("reportableReason",(function(){return function(e){switch(e){case"MEDICAL_NON_EMERGENCY":return"Medical Non-emergency";case"MEDICAL_EMERGENCY":return"Medical emergency";case"AUTOMOBILE_ACCIDENT":return"Auto Accident/PIP";case"COSMETIC_SERVICES":return"Cosmetic services";case"VISION":return"Vision Services";case"WORKERS_COMP":return"Worker's Comp";default:return e}}})).filter("removeUnderscore",(function(){return function(e){if(o.default.isString(e))return e.replace(new RegExp("_","g")," ")}})).filter("formatDob",["$filter",function(e){return function(t){return e("date")(t,"MM/dd/yyyy","UTC")}}]).filter("booleanToStatus",["$sce",function(e){var t=o.default.template('${t}');return function(n,i,a){var r=n?"green":"red";a&&(r=n?a.true:a.false);var s=n?"Active":"Inactive",c=i?"":"Unknown";return o.default.isUndefined(n)?c:e.trustAsHtml(t({c:r,t:s}))}}]).filter("dobToAge",(function(){return function(e){return s.default.utc().startOf("day").diff(s.default.tz(e,"UTC").startOf("day"),"years")}})).filter("dobToAgeInYearsOrMonths",(function(){return function(e){var t=s.default.utc().startOf("day").diff(s.default.tz(e,"UTC").startOf("day"),"years");return t>2?"".concat(t):(t=s.default.utc().startOf("day").diff(s.default.tz(e,"UTC").startOf("day"),"months"),"".concat(t," months"))}})).filter("billServiceDate",A).filter("daysSince",(function(){return function(e){var t=o.default.isString(e)?s.default.utc(e,"YYYY-MM-DD"):s.default.utc(e);return s.default.utc().startOf("day").diff(t,"days")}})).filter("formatDate",M).filter("formatDateForFacility",O).filter("utcDate",y).filter("utcShortDate",g).filter("utcFinancialsDate",E).filter("timeZoneToAbbr",(function(){return function(e){return s.default.tz(e).format("z")}})).filter("emaTruncate",(function(){return function(e,t,n){if(e)return isNaN(t)&&(t=10),!r.default.isUndefined(n)&&r.default.isString(n)||(n="..."),e.length<=t||e.length-n.length<=t?e:String(e).substring(0,t-n.length)+n}})).filter("emaRest",(function(){return function(e){return o.default.tail(e)}})).filter("url",(function(){return function(e){return e&&!e.match(/^http(s)?:\/\//i)?"http://"+e:e}})).filter("angularUrl",(function(){return function(e){return e}})).filter("appContextUrl",N).filter("capitalizeFirst",(function(){return function(e){return o.default.capitalize(e)}})).filter("pluck",(function(){return function(e,t){return o.default.map(e,t)}})).filter("joinBy",(function(){return function(e,t){return r.default.isArray(e)?e.join(t):""}})).filter("isEmpty",(function(){return o.default.isEmpty})).filter("sumOfArrayByKey",v).filter("callButtonName",(function(){return function(e){if(e&&e.name)return e.name}})).filter("builtinUser",T).filter("formatPercent",["$filter",function(e){return function(t,n,i){if(r.default.isDefined(t)){var a=e("number")(o.default.round(parseFloat(t),6),n);return i&&(a+="%"),a}}}]).filter("formatPercentTrimmed",["formatPercentFilter",function(e){return function(t,n,i){if(r.default.isDefined(t))return e(100*t,n,i).replace(/\.?0+(%)?$/,"$1")}}]).filter("gender",(function(){return function(e){switch(e){case"MALE":return"Male";case"FEMALE":return"Female";default:return"Unknown"}}})).filter("formatToFixed",(function(){return function(e,t){var n=parseInt(e,10);if(t=parseInt(t,10),isNaN(n)||isNaN(t))return e;for(n=""+n;n.length0?e.charAt(0):"U"}})).filter("yesOrNo",(function(){return function(e){return e?"Yes":"No"}})).filter("formatTaxPayerId",(function(){return function(e,t){if(r.default.isDefined(e)){var n=r.default.isObject(e)?e.identificationNumber:e;return"EIN"===(r.default.isObject(e)?e.type:t)?n.replace(/(\d{2})(\d{7})/,"$1-$2"):n.replace(/(\d{3})(\d{2})(\d{4})/,"$1-$2-$3")}}})).filter("maskedTaxpayerIdDisplay",(function(){var e=/^[0-9]{9}$/;function t(t){return e.test(t)?"*****"+t.slice(5):t}return function(e){if(null==e?void 0:e.endsWith(" - Boost")){var n=e.lastIndexOf(" - Boost");return t(e.substring(0,n))+" - Boost"}return t(e)}})).filter("formatTaxpayerIdAndType",_).filter("businessUnitHasFacilities",(function(){return function(e){return o.default.filter(e,(function(e){return e.facilities&&e.facilities.length>0}))}})).filter("businessUnit",(function(){return function(e,t){return o.default.result(e,"additionalInfo.taxpayer."+t)}})).filter("businessUnitTitleAndIdentifier",(function(){return function(e){return e.identificationNumber&&e.title&&e.identificationNumber!==e.title?e.title+" ("+e.identificationNumber+")":e.identificationNumber}})).filter("balance",I).filter("times",(function(){return function(e,t){return new Array(t)}})).filter("range",(function(){return function(e,t,n){return o.default.range(e,t,n)}})).filter("math",(function(){return function(e,t){return Math[t].apply(Math,m([e].concat(o.default.slice(arguments,2))))}})).filter("booleanIcon",S).filter("visible",(function(){return function(e){return o.default.filter(e,(function(e){return e.visible}))}})).filter("notDeprecated",(function(){return function(e){return o.default.filter(e,(function(e){return!e.deprecated}))}})).filter("tokenAt",(function(){return function(e,t,n){if(e)return o.default.at(e.split(t),n)}})).filter("patientAge",(function(){return function(e){if(e){if(void 0!==e.ageInYears&&void 0!==e.ageInMonths)return function(e){var t,n=e.ageInYears,i=e.ageInMonths;return n>0?t=n:(t=i+" month",i>1&&(t+="s")),t}(e);if(e.dateOfBirth)return function(e){var t=(0,s.default)(e.dateOfBirth),n=(0,s.default)(),i=n.diff(t,"years");if(i>0)return i;var a=n.diff(t,"months");return[a,a>1?"months":"month"].join(" ")}(e)}return""}})).filter("prefixWhenExist",(function(){return function(e,t){var n="";return e&&(n=t+e),n}})).filter("fromMap",(function(){return function(e,t,n,i){return e=i&&e?e[i]:e,(e=t&&t[e])&&n?e[n]:e||""}})).filter("trustAsResourceUrl",C).filter("localizedMessage",o.default.constant(o.default.property("localizedMessage"))).filter("referralContactName",P).filter("referralContactNameWithNpi",R).filter("ld",(function(){return function(e,t){var n=o.default.slice(arguments,2);return o.default.spread(o.default[t])([e].concat(n))}})).filter("orderByNumber",(function(){return function(e,t){return o.default.sortBy(e,(function(e){e=e[t];var n=parseInt(e);return o.default.isNumber(n)?n:e}))}})).filter("filterSpecialtyPayers",z).filter("filterVisionEnum",L).filter("filterAdminAssistantRoleEnum",(function(){var e="ASSISTANT_ADMINISTRATOR";return function(t){return o.default.isArray(t)?o.default.reject(t,o.default.includedIn([e],"name")):o.default.isObject(t)?o.default.omit(t,e):t}})).filter("filterOutChartNoteTypes",F).filter("filterOutCompletedTaskChartNoteType",(function(){return function(e){var t=F()(e);return o.default.filter(t,(function(e){return"COMPLETED_TASK"!==e.name}))}})).filter("filterAlwaysActiveEnum",(function(){var e="ALWAYS_ACTIVE";return function(t){return o.default.isArray(t)?o.default.reject(t,o.default.includedIn([e],"name")):o.default.isObject(t)?o.default.omit(t,e):t}})).filter("prependIfMissing",(function(){return function(e,t){return o.default.isNil(e)?t:(o.default.startsWith(e,t)?"":t)+e}})).filter("activeStatus",(function(){return function(e){switch(e){case"ALWAYS_ACTIVE":return"Always Active";case"ACTIVE":return"Active";case"INACTIVE":return"Inactive"}}})).filter("priorityFilter",(function(){return function(e){return e?e.replace("_"," "):""}})).filter("departmentName",(function(){return function(e){return e?e.departmentName:""}})).filter("directionsFilter",(function(){return function(e){return e?e.directions:""}})).filter("localizeEnum",D).filter("highlightHtml",q).filter("breakLinesDisplay",(function(){return function(e){if(o.default.isString(e))return o.default.escape(e).replace(/(\r\n|\n|\r)/gm,"
")}})).name;t.moduleName=U;var B=U;t.emaFiltersModule=B;var k=U;t.default=k},function(e,t,n){"use strict";n.d(t,"z",(function(){return r})),n.d(t,"i",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"l",(function(){return l})),n.d(t,"d",(function(){return d})),n.d(t,"u",(function(){return u})),n.d(t,"w",(function(){return m})),n.d(t,"x",(function(){return A})),n.d(t,"e",(function(){return h})),n.d(t,"f",(function(){return O})),n.d(t,"g",(function(){return y})),n.d(t,"o",(function(){return g})),n.d(t,"k",(function(){return E})),n.d(t,"a",(function(){return v})),n.d(t,"h",(function(){return T})),n.d(t,"n",(function(){return _})),n.d(t,"q",(function(){return I})),n.d(t,"b",(function(){return S})),n.d(t,"j",(function(){return P})),n.d(t,"m",(function(){return R})),n.d(t,"y",(function(){return C})),n.d(t,"p",(function(){return N})),n.d(t,"t",(function(){return z})),n.d(t,"r",(function(){return L})),n.d(t,"s",(function(){return F})),n.d(t,"v",(function(){return U}));var i=n(5),a=n(0),r=function(e){return e.insuranceId&&!a.isEmpty(e.codes)&&a.isEmpty(e.codes.filter((function(e){return a.isNil(e.code)||!a.isNumber(e.units)||!a.isNumber(e.unitsAllowedPerUnit)})))},o=function(){return{outOfPocket:0,deductible:0,coInsurance:0,coPay:0,estimatedPatientTotal:0}},s=function(e,t,n,r,o){return{responsibleParty:c(e)&&!a.includes([i.PaymentMethod.NONE_SELF_PAY,i.PaymentMethod.OTHER],o)?i.BillingQuoteResponsibleParty.INSURANCE:i.BillingQuoteResponsibleParty.PATIENT,patient:e,provider:t,businessUnit:n,serviceLocation:r,status:i.BillingQuoteStatus.QUOTE_CREATED}},c=function(e){return!a.isEmpty(a.get(e,"allActiveInsurancePolicies"))},l=function(e){return{chargeType:i.BillingQuoteChargeType.ADDITIONAL_FEE,position:e}},d=function(e,t){return a.filter(e,(function(e){return t?!u(e):u(e)}))},p=function(e){return e.chargeType===i.BillingQuoteChargeType.CPT},u=function(e){return e.chargeType===i.BillingQuoteChargeType.ADDITIONAL_FEE},m=function(e){return f(e)||b(e)},f=function(e){return e===i.BillingQuoteStatus.PROCEDURE_COMPLETED},b=function(e){return e===i.BillingQuoteStatus.EXPIRED},A=function(e,t,n){e.isAlwaysIncluded&&!e.isRemovable?t.push(e):n.push(e)},h=function(e,t){switch(t){case i.PaymentMethod.MEDICAL:return e.find((function(e){return"WORKERS_COMP"!==e.mavPolicyType&&"VISION"!==e.mavPolicyType&&"AUTO_PIP"!==e.mavPolicyType}));case i.PaymentMethod.AUTOMOBILE:return e.find((function(e){return"AUTO_PIP"===e.mavPolicyType}));case i.PaymentMethod.VISION:return e.find((function(e){return"VISION"===e.mavPolicyType}));case i.PaymentMethod.WORKERS_COMP:return e.find((function(e){return"WORKERS_COMP"===e.mavPolicyType}));default:return}},M=[i.PaymentMethod.MEDICAL,i.PaymentMethod.VISION,i.PaymentMethod.AUTOMOBILE,i.PaymentMethod.WORKERS_COMP],O=function e(t,n){if(t!==M.length){var i=h(n,M[t]);return void 0===i?e(t+1,n):i}},y=function(e){var t={},n=[e.modifier1,e.modifier2,e.modifier3,e.modifier4];return t.modifiers=n.map((function(e,t){return{modifier:e,position:t+1}})),t.quickKey=e.quickKey,t},g=function(e,t){switch(e){case 0:return t.charge;case 1:return t.mprSecondary;case 2:return t.mprTertiary;default:return t.mprAdditional}},E=function(e){var t,n=[e.modifier1,e.modifier2,e.modifier3,e.modifier4];return e.quickKey?n.filter((function(e){return e})).join():n.indexOf("50")>-1?"50":null!==(t=e.modifier1)&&void 0!==t?t:""},v=function(e,t){var n={code:e.code,description:e.description,chargeType:e.type,unitCharge:e.unitCharge,units:1,position:t};switch(e.type){case i.BillingQuoteChargeType.CUSTOM_CODE:n.customCode={id:e.id,billingPreference:e.billingPreference};break;case i.BillingQuoteChargeType.CUSTOM_CHARGE:case i.BillingQuoteChargeType.PRODUCT:n.financialCategory={id:e.id};break;case i.BillingQuoteChargeType.INVENTORY:n.invProduct={id:e.id};break;case i.BillingQuoteChargeType.CPT:n.cptCode=e.code,n.cptDescription=e.description,e.quickKey&&(n.quickCode={id:e.id},n.quickKey=e.quickKey,n.modifier1=e.modifier1,n.modifier2=e.modifier2,n.modifier3=e.modifier3,n.modifier4=e.modifier4)}return n},T=function(e){switch(e){case i.BillingQuoteChargeType.CPT:return 1;case i.BillingQuoteChargeType.CUSTOM_CODE:return 2;case i.BillingQuoteChargeType.CUSTOM_CHARGE:return 3;case i.BillingQuoteChargeType.INVENTORY:return 4;case i.BillingQuoteChargeType.PRODUCT:return 5;case i.BillingQuoteChargeType.ADDITIONAL_FEE:return 6;default:return 7}},_=function(e){if(e.units&&e.unitCharge)return e.units*e.unitCharge},I=function(e){return!a.isNil(a.find(e,(function(e){return!!u(e)&&!(e.units&&e.unitCharge)})))},S=function(e,t,n,a){return void 0===a&&(a=1),{firmChargeDiscount:e,type:t?i.DiscountType.AMOUNT:i.DiscountType.PERCENT,amount:null!=t?t:n,position:a}},P=function(e){return{billingType:i.SupportedBillingType.PROFESSIONAL,codes:e.map((function(e){return{modifier:E(e),code:e.code,quickKey:e.quickKey}}))}},R=function(e,t){return{codes:function(e,t){return a.filter(e,(function(e){return t?!p(e):p(e)}))}(t).map((function(e){return{code:e.code,units:e.units,unitsAllowedPerUnit:C(e.unitAllowable,e.mprDiscount)||0}})),insuranceId:e.id}},C=function(e,t){return!a.isNil(t)&&t>0?e-e*(t/100):e},N=function(e){return e.reduce((function(e,t){return t.units*(C(t.unitAllowable,t.mprDiscount)||0)+e}),0)},z=function(e){return u(e)&&!e.units},L=function(e){return a.isEmpty(e)||I(e)||D(e)},D=function(e){return!a.isNil(a.find(e,(function(e){var t;return(null!==(t=_(e))&&void 0!==t?t:0)-q(e)<0})))},q=function(e){var t=e.chargeDiscount||{type:i.DiscountType.AMOUNT,amount:0},n=t.type,a=t.amount;return n===i.DiscountType.AMOUNT?a:a*e.unitCharge*e.units},F=function(e){return!a.isNil(a.find(e,U))},U=function(e){return e.chargeType===i.BillingQuoteChargeType.INVENTORY}},function(e,t,n){"use strict";n.r(t),n.d(t,"PENDING_INSURANCE_UPDATE_TYPES",(function(){return c})),n.d(t,"applyInsurancePolicyDefaults",(function(){return d})),n.d(t,"patientInsuranceServiceModule",(function(){return p}));var i=n(1),a=n(0),r=(n(10),n(38)),o=n(1272),s=n(5);l.$inject=["$resource","PatientInsuranceDefaults","EventService"];var c=["PRIMARY_MEDICAL_INSURANCE","SECONDARY_MEDICAL_INSURANCE","TERTIARY_MEDICAL_INSURANCE","PRIMARY_VISION_INSURANCE","SECONDARY_VISION_INSURANCE"];function l(e,t,n){var a=e(APP.contextPath+"/ws/v2/patient/:patientId/insurance/:id",{patientId:"@patientId",id:"@id"},{full:{url:APP.contextPath+"/ws/v2/patient/:patientId/insurance",method:"GET",params:{patientId:"@patientId"},isArray:!0},list:{url:APP.contextPath+"/ws/v2/patient/:patientId/insurance/lite",method:"GET",params:{patientId:"@patientId"},isArray:!0},byPayerAndPolicyNumber:{url:APP.contextPath+"/ws/v2/patient/:patientId/insurance/byPayerAndPolicyNumber",method:"GET",params:{patientId:"@patientId"},isArray:!0},createOrUpdate:{url:APP.contextPath+"/ws/v2/patient/:patientId/insurance",method:"POST",params:{patientId:"@patientId",mapId:"@mapId",ignoreHttpInterceptor:[400]},interceptor:{response:n.getResourceResponseInterceptor("insurance","createOrUpdate")}},archive:{url:APP.contextPath+"/ws/v2/patient/:patientId/insurance/:id/archive",method:"POST",params:{patientId:"@patientId",id:"@id",showPleaseWait:!0},interceptor:{response:n.getResourceResponseInterceptor("insurance","archive")}},restore:{url:APP.contextPath+"/ws/v2/patient/:patientId/insurance/:id/restore/:ranking",method:"POST",params:{patientId:"@patientId",id:"@id",ranking:"@ranking",showPleaseWait:!0},interceptor:{response:n.getResourceResponseInterceptor("insurance","restore")}},getNextMedicalRanking:{url:APP.contextPath+"/ws/v2/patient/:patientId/insurance/nextMedicalRanking",method:"GET",params:{patientId:"@patientId"}},getNextVisionRanking:{url:APP.contextPath+"/ws/v2/patient/:patientId/insurance/nextVisionRanking",method:"GET",params:{patientId:"@patientId"}},search:{url:APP.contextPath+"/ws/v3/insurances",params:{selector:"payer,policyNumber"},isArray:!0},getPendingUpdates:{url:APP.contextPath+"/ws/v3/patient/:patientId/reconciliation",method:"GET",params:{patientId:"@patientId",where:"status==PENDING and type=in=("+c+")"},isArray:!0}});return i.extend(a.prototype,{createOrUpdate:function(){return d(this),this.$createOrUpdate.apply(this,Array.prototype.slice.call(arguments,0))}}),a}var d=function(e){return a.isString(e.policyNumber)&&(e.policyNumber=e.policyNumber.toUpperCase()),a.isString(e.groupNumber)&&(e.groupNumber=e.groupNumber.toUpperCase()),a.each(e.payerContacts,(function(e){a.isObject(e.address)&&(e.address.addressType=s.AddressTypeDescription.BILLING_ADDRESS),a.isObject(e.phoneNumber)&&(e.phoneNumber.phoneNumberType=s.PhoneNumberTypeDescription.INSURANCE),a.isObject(e.faxNumber)&&(e.faxNumber.phoneNumberType=s.PhoneNumberTypeDescription.INSURANCE)})),e},p=i.module("patientInsuranceServiceModule",["ema.modal",r.emaEventsModule,o.patientInsuranceDefaultsModule]).factory("PatientInsurance",l).name},function(e,t,n){"use strict";n.r(t),n.d(t,"StateReportsService",(function(){return r})),n.d(t,"stateReportsServiceModule",(function(){return o}));var i=n(1),a=n(0),r=function(){function e(e){this.baseUrl=APP.contextPath+"/ws/v3/stateReport",this.$http=e}return e.$inject=["$http"],e.prototype.getConfigs=function(){var e=this.baseUrl+"/config";return this.$http.get(e,{params:{"sorting.sortBy":"reportType","sorting.sortOrder":"asc","paging.pageSize":25}}).then((function(e){return e.data}))},e.prototype.generateReport=function(e){var t=this.baseUrl+"/generate";return this.$http.post(t,e,{params:{showPleaseWait:!0}})},e.prototype.getReports=function(e,t){return this.$http.get(this.baseUrl,{params:e}).then((function(e){return a.isFunction(t)&&t(e.data,e.headers),e.data}))},e.prototype.getErrors=function(e,t){var n=this.baseUrl+"/errors";return this.$http.get(n,{params:e}).then((function(e){return a.isFunction(t)&&t(e.data,e.headers),e.data}))},e.prototype.getPayerConfigs=function(e){var t=this.baseUrl+"/payerConfig";return this.$http.get(t,{params:{payerId:e}}).then((function(e){return e.data}))},e.prototype.savePayerConfig=function(e,t){var n=this.baseUrl+"/payerConfig/"+e;return this.$http.post(n,t)},e.prototype.saveStateReportIdentifier=function(e,t){var n=this.baseUrl+"/stateReportIdentifiers/"+e;return this.$http.post(n,t)},e.prototype.getStateReportIdentifiers=function(e){var t=this.baseUrl+"/stateReportIdentifiers";return this.$http.get(t,{params:{taxpayerId:e}}).then((function(e){return e.data}))},e.prototype.saveStateReportFacilityIdentifier=function(e,t){var n=this.baseUrl+"/facilityIdentifiers/facility/"+e;return this.$http.post(n,t)},e.prototype.getStateReportFacilityIdentifiers=function(e){var t=this.baseUrl+"/facilityIdentifiers";return this.$http.get(t,{params:{facilityId:e}}).then((function(e){return e.data}))},e.prototype.savePayerPlanStateReportIdentifier=function(e,t){var n=this.baseUrl+"/payerPlanStateReportIdentifiers/"+e;return this.$http.post(n,t)},e.prototype.getPayerPlanStateReportIdentifiers=function(e){var t=this.baseUrl+"/payerPlanStateReportIdentifiers";return this.$http.get(t,{params:{payerPlanId:e}}).then((function(e){return e.data}))},e.prototype.getFileDownloadUrl=function(e){return"/ema/ws/v3/stateReport/"+e+"/download"},e.prototype.loadFile=function(e){return this.$http.get(this.baseUrl+"/"+e+"/download",{headers:{accept:"text/plain"},responseType:"text"})},e}(),o=i.module("state-reports.service",[]).service("stateReportsService",r).name},function(e,t,n){e.exports=n(11)(836)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.emaEventsModule=void 0;var i=r(n(1)),a=r(n(0));function r(e){return e&&e.__esModule?e:{default:e}}var o=i.default.module("ema.events",[]).constant("validEvents",{appointment:["createOrUpdate","saveFromHeader","refreshApptFlow","refreshApptFlowAndAlerts","saveRemindersFilter","updateReminders","refreshFinancials","refreshApptValues","completeCheckIn","completeCheckOut","openLinkedPatientsModal"],insurance:["createOrUpdate","archive","restore","createOrUpdateAttachment","clearAttachment"],alerts:["createOrUpdate","componentInit"],financials:["refreshLedger","refreshOverview","refreshCounts","refreshUnallocatedFunds","saveFilterSettings","saveManageBill","saveTaxpayerIdFilter","makePayment","updateBillAssignee","saveInboundDft"],charge:["updateCharge"],financialReport:["updateReconReport","updateClosingReport"],batch:["markItemCompleted"],payerCheck:["createOrUpdate","posted"],scheduler:["refresh","postRefresh","addNewAppointment","editApptOrEvent","toggleApptFinder","rescheduleWithFinder","moveApptPreview","parentDataLoaded","viewDeletedBlocks","postViewDeletedBlocksRefresh"],pmNote:["createOrUpdate","updateAlerts"],collections:["createOrUpdate"],scrubRule:["createOrUpdate"],realtimeClaimStatus:["complete"],statements:["patientAddressChange"]}).service("EventService",["$q","$log","validEvents","$http",function(e,t,n,r){var o={interpolate:/\$\{([\s\S]+?)\}/g},s=this;s.debug=!1;var c={};function l(e,t,n){return{p:e?e+": ":"",dt:t,e:n}}s.enableDebug=function(e){s.debug=e};var d=a.default.template("${p}Channel '${dt}' is invalid.",o);function p(e,t){if(!i.default.isArray(n[e]))throw new Error(d(l(t,e)))}var u=a.default.template("${p}Event type '${e}' is invalid for channel '${dt}'.",o);function m(e,t,i){if(p(e,i),!a.default.includes(n[e],t))throw new Error(u(l(i,e,t)))}s.subscribe=function(e,t,n){p(e,"Couldn't subscribe"),c[e]||(c[e]={});var i=a.default.uniqueId();return c[e][i]={callback:t,criteria:n||a.default.constant(!0)},function(){delete c[e][i]}},s.subscribeForScope=function(e){var t=a.default.spread(s.subscribe)(a.default.slice(arguments,1));return e.$on("$destroy",t),t};var f=a.default.template('Publishing "${eventType}" event to ${subscriberCount} subscriber(s) on channel "${channel}"',o);return s.publish=function(n,i,r,o){if(!r)throw new Error("Couldn't notify subscribers: object ID invalid or not specified.");m(n,i,"Couldn't notify subscribers"),s.debug&&t.debug(f({eventType:i,subscriberCount:a.default.size(c),channel:n}));var l=(0,a.default)(c[n]).filter((function(e){return e.criteria({eventType:i,id:r,data:o})})).map((function(t){try{return e.when(t.callback(i,r,o))}catch(e){throw console.error(e),e}})).value();return e.all(l)},s.getResourceResponseInterceptor=function(e,t,n){return m(e,t,"Couldn't create $resource response interceptor"),function(r){var o=n?i.default.isFunction(n)?n(r):a.default.result(r,"data.".concat(n)):a.default.result(r,"data.id");return s.publish(e,t,o,r.data),r.resource}},s.getHttpResponseInterceptor=function(e,t,n){return m(e,t,"Couldn't create $http response interceptor"),(i.default.isArray(r.defaults.transformResponse)?r.defaults.transformResponse:[r.defaults.transformResponse]).concat((function(r,o,c){if(200===c||204===c){var l=n?i.default.isFunction(n)?n(r):a.default.result(r,n):-1;s.publish(e,t,l,r)}return r}))},s.chainPromiseSuccess=function(e){return e.then(a.default.constant(!0),a.default.constant(!1))},s}]).name;t.emaEventsModule=o},function(e,t,n){e.exports=n(11)(841)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.appointmentServicesModule=void 0;var i=I(n(1)),a=I(n(0)),r=I(n(6)),o=I(n(8));n(44),n(320),n(71),n(19),n(39),n(16),n(10),n(93),n(124),n(45),n(1864),n(165),n(173),n(84),n(96),n(155);var s=n(204),c=n(323),l=n(62),d=n(108),p=n(376),u=n(23),m=n(47),f=n(188),b=n(3011),A=n(3012),h=n(491),M=n(1261),O=n(598),y=n(23),g=I(n(1865)),E=I(n(1866)),v=I(n(1431)),T=I(n(1867)),_=n(3013);function I(e){return e&&e.__esModule?e:{default:e}}function S(e,t,n,s,c,l,d,p,u,m,f,b,A,h,M,O,y,g,_,I,S,P){var R=this;this.openReadOnlyApptDetailsModal=function(e){return t.open("Appointment Details (Pending Maverick-1425)",{template:E.default,controller:"ApptDetailsReadOnlyCtrl as adc",resolve:{appointmentId:function(){return e}}},{analyticsPage:"/appointmentDetailsReadOnly",description:"Appointment Details (read-only)"})},R.getCounties=function(e,t){return m({url:APP.contextPath+"/ws/v3/fips/county/search",method:"GET",params:{q:"%"+e+"%",state:t,"paging.pageSize":10}})},this.createNewAppointment=function(e,t,r,o,s,c){return new n({status:"PENDING",scheduledStartDate:i.default.copy(e),scheduledDuration:t,provider:i.default.copy(r),facility:i.default.copy(o),facilityTimeZone:a.default.result(o,"timeZone"),patient:i.default.copy(s),newPatient:!1,appointmentType:i.default.copy(c)})},this.selectPatientAttachments=function(e,n,i){return t.open("Patient Attachments",{template:v.default,resolve:{patientAttachments:["AppointmentAttachment",function(t){return t.findCandidates({patientId:e,appointmentId:n,mapId:"APPOINTMENT",filterRequired:!!i}).$promise.then((function(e){return e}))}],enums:["Enums",function(e){return e.get({enumClassName:"com.m2.domain.enums.CatagoryTabSection"}).$promise}]},controller:["$scope","$uibModalInstance","patientAttachments","enums",function(e,t,n,i){var r=this;r.patientAttachments=n,r.sections=a.default.keyBy(i["com.m2.domain.enums.CatagoryTabSection"],"name"),r.tableParams=c.createNgTableParams(r.patientAttachments,{sorting:{dateCreated:"desc"}});var o=[];e.$on("ngTableCheckboxes.selectionChanged",(function(e,t){o=t,r.selectionCount=o.length})),r.hasSelections=function(){return o.length},r.cancel=function(){t.dismiss("cancel")},r.attach=function(){t.close(o)}}],controllerAs:"pac"},{analyticsPage:"/patientAttachments",description:"Patient Attachments"}).result},this.editAttachmentDetails=function(e){return t.open("Attachment Details",{template:T.default,size:"sm",resolve:{categories:["FirmCategoryTab",function(e){return e.query({mapId:"SHALLOW"})}],attachment:function(){return e}},controller:["$scope","$uibModalInstance","attachment","categories",function(e,t,n,i){var a=this;a.attachment=n,a.categories=i,a.cancel=function(){t.dismiss("cancel")},a.save=function(){t.close(n)}}],controllerAs:"adc"},{analyticsPage:"/attachmentDetails",description:"Attachment Details"}).result},this.linkAttachments=function(e,t){return s.link({appointmentId:t,mapId:"APPOINTMENT"},e).$promise},R.associateAppointmentToVisit=function(e,t){u.get({id:e.patient.id,mapId:"VISIT_LIST_WITH_APPOINTMENTS",showPleaseWait:!0}).$promise.then((function(n){a.default.some(n.visits,{appointment:{id:e.id}})?t():d.openModal(e.id,n,t)}))},this.navigateToInsuranceEligibilityReport=function(t,n){var i=APP.contextPath+"/practice/reports/Reports.action#/eligibilityReport?facilityId="+t+"&apptDate="+n;e.location.href=i},R.canCancelAppointment=function(e){return!a.default.includes(["CANCELLED","CHECKED_OUT","NO_SHOW"],e.status)},R.showRemoveAuthorizationFromAppt=function(e){return!a.default.has(e,"visit")||0===a.default.get(e,"visit.bills",[]).length},R.createVisit=function(t,n,i){p.createVisit(t,n).then((function(n){i&&_.linkVisitToRoomTime(n.data.id,i),e.location.href=APP.contextPath+"/app/VisitOverview.action?pid="+t.patient.encryptedId+"&vid="+n.data.encryptedId}))},this.getAppointmentHistoryURL=function(e){return e&&e.patient&&e.patient.encryptedId?APP.contextPath+"/patient/PatientAppointmentHistory.action?pid="+e.patient.encryptedId:null},this.getFinalOrScheduledDuration=function(e){var t,n;return e.checkInDate&&e.checkOutDate?(t=e.checkInDate,n=e.checkOutDate):(t=e.scheduledStartDate,n=e.scheduledEndDate),(0,r.default)(n).diff((0,r.default)(t),"minutes")},this.getAppointmentFinalOrOngoingDuration=function(e){return e.checkInDate?o.default.shortDuration(e.checkInDate,e.checkOutDate?e.checkOutDate:(0,r.default)().toDate()):null},this.getAppointmentScheduledDuration=function(e){return o.default.shortDuration(e.scheduledStartDate,e.scheduledEndDate)},this.getPreferredPhoneByType=function(e){if(e&&e.patient&&e.patient.preferredPhone&&e.patient.preferredPhone.phoneNumberType){var t={HOME:"homePhone",MOBILE:"cellPhone",WORK:"workPhone"},n=e.patient.preferredPhone.phoneNumberType;return e.patient[t[n]]?(e.patient[t[n]].phoneNumberType=n,e.patient[t[n]]):{phoneNumber:"",phoneNumberType:n}}},R.paymentMethodByPolicyType={VISION:"VISION",WORKERS_COMP:"WORKERS_COMP",AUTO_PIP:"AUTOMOBILE"},R.updatePaymentMethod=function(e){if(!e.paymentMethod||P.isPatientResponsible(e))if(O.getMedicalInsurancePolicy(e.patient,1))e.paymentMethod="MEDICAL";else{var t=O.getVisionInsurancePolicy(e.patient,1),n=O.getUnrankedInsurancePolicy(e.patient,"WORKERS_COMP"),i=O.getUnrankedInsurancePolicy(e.patient,"AUTO_PIP"),r=a.default.reject([t,n,i],a.default.isNil);1===a.default.size(r)?e.paymentMethod=R.paymentMethodByPolicyType[a.default.head(r).mavPolicyType]:a.default.size(r)>1?e.paymentMethod=null:e.paymentMethod="NONE_SELF_PAY"}},this.setAppointmentReferralFromAuthorization=function(e,t){if(t&&a.default.isNil(e.referral)){var n=a.default.get(t,"referringProvider.id");n&&y.findAppointmentReferralById(n).then((function(t){e.referral=y.referralContactToReferral(t)}))}},R.getVisitNoteStatus=function(e){return a.default.result(e,"visit.chartNote.noteStatus")},R.isVisitNoteFinal=function(e){return"FINAL"===R.getVisitNoteStatus(e)},R.filterInactiveAppointmentTypes=function(e){return a.default.filter(e,(function(e){return"ACTIVE"===e.status}))},R.getAppointmentIntegrationEnabled=function(){return m({url:APP.contextPath+"/ws/v3/appointments/integrationEnabled",method:"GET"}).then(a.default.property("data"))},R.saveSchedulerFinderDefaults=function(e){e.apptType&&(e.apptType.alternateDurations&&delete e.apptType.alternateDurations,e.apptType=a.default.mapValues(e.apptType,(function(e,t){return a.default.includes(["childAppointmentTypeLinks","parentAppointmentTypeLinks"],t)?(0,a.default)(e).flatMap((function(e){return a.default.defaults({id:e.id})})).value():e})));var t={stickyData:[]};return a.default.forEach(e,(function(e,n){b.addSticky(t,"scheduler-rescheduling-data",n,e)})),m.post(APP.contextPath+"/ws/v3/stickies",t)},R.isOpenEndedFinderSearch=function(e){return a.default.includes(["FIRST_AVAILABLE","TIME_FRAME"],e.timeFrame)||"DATE_RANGE"===e.timeFrame&&!e.dateRangeEnd},R.savePatient=function(e){return h.shouldSavePatient(e).then((function(t){return t?u.save(e).$promise:null}))},R.createPatient=function(e){return h.shouldSavePatient(e).then((function(t){return t?m.post("".concat(APP.contextPath,"/ws/v3/patients/register-internal"),e,{params:{selector:"encryptedId,phoneNumbers,preferredPhone,preferredPhoneType,allActiveInsurancePolicies,mavAdditionalInfo,addressPrimary,homePhone,cellPhone,workPhone"}}):null}))},R.updateLinkedPatientsDemographics=function(e,t){return m.post("".concat(APP.contextPath,"/ws/v3/patient-demographics"),e,{params:{selectedLinkedPatients:t,showPleaseWait:!0,ignoreHttpInterceptor:[400,401,500]}})},R.getFamily=function(e){return m({url:"".concat(APP.contextPath,"/ws/v3/family/patient/").concat(e),method:"GET",params:{selector:"familyPatients"}})},R.saveFamily=function(e,t){return m.post("".concat(APP.contextPath,"/ws/v3/family/patient/").concat(e),t)},R.saveGuarantor=function(e,t){return m.post("".concat(APP.contextPath,"/ws/v3/guarantors"),t,{params:{patientId:"".concat(e),selector:R.guarantorSelector}})},R.ensureAdditionalInfo=function(e){return m.post("".concat(APP.contextPath,"/ws/v2/patient/ensureAdditionalInfo/").concat(e))}}function P(e){var t=APP.contextPath+"/ws/v2/appointment/:apptId/history";return e(t,{},{queryForHistory:{url:t,method:"GET",params:{apptId:"@apptId",status:"CANCELLED"},isArray:!0}})}n(472),P.$inject=["$resource"],S.$inject=["$window","EmaModalNg","Appointment","AppointmentAttachment","emaNgTableUtils","$state","AssociateVisitModal","VisitCreation","Patient","$http","EmaModalServices","stickyUtil","emaNotification","PatientDupeService","PracticeManagementSettings","PatientInsuranceService","referralContactService","TreatmentCaseService","OfficeFlowVisitService","FirmStaffV3","$q","appointmentInsurancesService"];var R,C=i.default.module("appointmentModule",["ema.commonServices","ngTable","ema.ngTableUtils","ema.modal","ui.router","schedulerFilters","stickyUtil","patientModule","ema.appointmentReminderServices","patientInsurancesServices","referralContactService","treatmentCaseServices","officeFlow.common.services","ema.facility",_.availableWaitlistApptsModalModule,c.roomEquipmentSelectModule,l.facilityResourcesServiceModule,p.linkedApptCancelPromptModalModule,u.moduleName,m.linkAppointmentServiceModule,f.AppointmentTypeServiceModule,b.quickFiltersPopoverModule,A.childAppointmentTypeDropdownModule,h.appointmentConfirmationModule,M.appointmentFinderResultsDisplayServiceModule,O.routineFootCareModule,s.appointmentWaitlistServiceModule,y.moduleName,"appointmentAttachment.resource"]).factory("Appointment",["$resource","EventService","AppointmentTransformationService",function(e,t,n){return e(APP.contextPath+"/ws/v2/appointment/:id",{id:"@id"},{queryBySpec:{method:"GET",url:"".concat(APP.contextPath,"/ws/v3/appointments"),isArray:!0,responseType:"json",transformResponse:n.massageAppointmentData},query:{method:"GET",isArray:!0,responseType:"json",transformResponse:n.massageAppointmentData},get:{method:"GET",isArray:!1,responseType:"json",transformResponse:n.massageAppointmentData},save:{method:"POST",interceptor:{response:t.getResourceResponseInterceptor("appointment","createOrUpdate")},responseType:"json",transformResponse:n.massageAppointmentData},saveAndRefreshApptFlow:{method:"POST",interceptor:{response:t.getResourceResponseInterceptor("appointment","refreshApptFlowAndAlerts")},responseType:"json",transformResponse:n.massageAppointmentData},updateAppointmentOverview:{method:"POST",url:APP.contextPath+"/ws/v2/appointment/updateAppointmentOverview",responseType:"json",transformResponse:n.massageAppointmentData},queryFilterAppts:{method:"GET",url:APP.contextPath+"/ws/v3/checkin/filterAppts",params:{"sorting.sortBy":"scheduledStartDate","sorting.sortOrder":"ASC","paging.pageSize":250,selector:"facility,patient(allActiveInsurancePolicies,preferredPhone,photo,encryptedId,stickyNote,prefix,middleName,nickName),provider,parentAppointmentLink(parentAppointment(provider,facility)),childAppointmentLink(childAppointment(provider,facility)),authorizationPrimary,authorizationPrimaryVision,reservations(facilityResource),previousAppointmentInfo,treatmentCase(insurancePolicy,patient(encryptedId)),visit(encryptedId)"},isArray:!0},queryFilterApptsCountByDate:{method:"GET",url:APP.contextPath+"/ws/v3/checkin/appt-count-by-date",isArray:!0},sweepForPrevious:{method:"POST",url:APP.contextPath+"/ws/v3/appointments/previous-appointment-sweep"},performFinderSearch:{method:"GET",url:APP.contextPath+"/ws/v2/appointment/finder",isArray:!0},getWithAssociatedVisit:{method:"GET",params:{mapId:"ASSOCIATE_VISIT"}},queryWithRemindersFilter:{method:"GET",url:APP.contextPath+"/ws/v3/appointments/reminders",isArray:!0,params:{"paging.pageSize":10,selector:"latestReminderActivity(note),patient(preferredPhone,encryptedId,allActiveInsurancePolicies),facility,provider,numberOfReminders,childAppointmentLink(childAppointment(facility,provider,appointmentType(childAppointmentTypeLinks(childApptType)))),parentAppointmentLink(parentAppointment(facility,provider,appointmentType(childAppointmentTypeLinks(childApptType)))),appointmentType(childAppointmentTypeLinks(childApptType))"}}})}]).service("AppointmentService",S).service("AppointmentTransformationService",(function(){var e=this;this.convertApptDatesToUTC=function(e){return i.default.forEach(["scheduledStartDate","scheduledEndDate","checkInDate","checkOutDate"],(function(t){e[t]&&(e[t]=r.default.utc(e[t]).toDate())})),e},this.massageDatesForScheduler=function(e){return e.scheduledStartDate&&(e.start_date=e.scheduledStartDate),e.scheduledEndDate&&(e.end_date=e.scheduledEndDate),e},this.convertSpecialties=function(e){var t=a.default.get(e,"referral.referralInstitution");return t&&(t.specialities=a.default.flatMap(t.institutionSpecialties,"specialtyType")),e},this.convertPhoneNumbers=function(e){var t=a.default.get(e,"patient.phoneNumbers");return a.default.forEach(t,(function(t){switch(t.phoneNumberType){case"HOME":e.patient.homePhone=t;break;case"WORK":e.patient.workPhone=t;break;case"MOBILE":e.patient.cellPhone=t;break;default:e.patient.homePhone=t}})),e},this.massageAppointmentData=function(t){return a.default.forEach(a.default.isArray(t)?t:[t],a.default.flow(e.convertApptDatesToUTC,e.massageDatesForScheduler,e.convertSpecialties)),t}})).factory("AssociateVisitModal",["EmaModalNg","Appointment",function(e,t){var n,i={analyticsPage:"/associateVisit",description:"Associate a visit"};return{openModal:function(r,o,s){return n=e.open("Associate a visit",{resolve:{appointment:function(){return t.getWithAssociatedVisit({id:r}).$promise.then((function(e){return a.default.merge(e.patient,o),e}))},callbackFn:function(){return s}},controller:"AssociateVisitController as ctrl",template:g.default},i)},closeModal:function(){n.close()}}}]).factory("AppointmentHistoryLog",["$resource",function(e){return e(APP.contextPath+"/ws/v2/appointment/:appointmentId/history",{},{query:{method:"GET",params:{"sorting.sortBy":"auditEventTime","sorting.sortOrder":"DESC"},isArray:!0},queryForCancelled:{method:"GET",params:{status:"CANCELLED"},isArray:!0}})}]).component("appointmentFinderLayout",(R=["modal","embedded","expanded"],{bindings:{layout:"@",apptFinderCtrl:"<"},template:n(1868),transclude:{apptFinderPatientInfo:"apptFinderPatientInfo",apptFinderProvider:"apptFinderProvider",apptFinderLocation:"apptFinderLocation",apptFinderApptType:"apptFinderApptType",apptFinderDuration:"apptFinderDuration",apptFinderTimeOfDay:"apptFinderTimeOfDay",apptFinderAlternateDuration:"apptFinderAlternateDuration",apptFinderWeekday:"apptFinderWeekday",apptFinderTimeFrame:"apptFinderTimeFrame",apptFinderRoomEquipment:"apptFinderRoomEquipment",apptFinderRadioOptions:"apptFinderRadioOptions",apptFinderSpecificDateTimeframe:"apptFinderSpecificDateTimeframe",apptFinderTimeNumber:"apptFinderTimeNumber",apptFinderTimeUnit:"apptFinderTimeUnit",apptFinderDateRangeStart:"apptFinderDateRangeStart",apptFinderDateRangeEnd:"apptFinderDateRangeEnd",apptFinderResults:"apptFinderResults",apptFinderConfirmation:"apptFinderConfirmation",apptFinderTextLinks:"apptFinderTextLinks",apptFinderButtons:"apptFinderButtons",apptFinderError:"apptFinderError",apptFinderNoResultExtended:"apptFinderNoResultExtended"},controller:function(){var e=this;this.$onInit=function(){if(!a.default.includes(R,e.layout))throw"Invalid appointment finder layout specified. Supported layouts:"+R.join(", ");e.showModalLayout="modal"===e.layout,e.showEmbeddeLayout="embedded"===e.layout||"expanded"===e.layout},this.showAlternateDuration=function(){return e.isAlternateDurationEnabled()&&e.isAlternateDurationConfiguredForApptType()},this.isAlternateDurationEnabled=function(){return a.default.get(APP.mavFeatureFlags,"isAlternateDurationEnabled",!0)},this.isAlternateDurationConfiguredForApptType=function(){return a.default.get(e.apptFinderCtrl,"apptType.alternateDurationsCount",0)>0},this.showResourceSelect=function(){return!!this.apptFinderCtrl.finderOptions.apptTypeId},this.shouldShowPatientInfo=function(){return a.default.get(e.apptFinderCtrl,"defaults.showPatientInfo",!1)}}})).controller("AssociateVisitController",["$uibModalInstance","appointment","callbackFn",function(e,t,n){var i=this;i.alertString="",i.appointment=t,i.appointment.visit={},i.appointment.patient.visits=a.default.reject(t.patient.visits,"appointment"),i.setSelectedVisit=function(){i.appointment.$saveAndRefreshApptFlow({mapId:"ASSOCIATE_VISIT"}).then((function(){i.dismissAndPerformCallback()}))},i.dismissAndPerformCallback=function(){e.dismiss(),n()},i.patientHasVisits=function(){return a.default.result(i.appointment,"patient.visits.length")>0},i.onSelectedVisit=function(e){var t,n,a=[];(null===(t=i.appointment.facility)||void 0===t?void 0:t.id)!==e.facility.id&&a.push("Location"),(null===(n=i.appointment.provider)||void 0===n?void 0:n.id)!==e.physician.id&&a.push("Provider"),(0,r.default)(i.appointment.scheduledStartDate).format("MM/DD/YYYY").toString()!==(0,r.default)(e.visitDate).format("MM/DD/YYYY").toString()&&a.push("Date");var o=a.join(", ").replace(/,(?=[^,]+$)/," and");i.alertString=o.length>0?"Appointment's ".concat(o," is different than Visit's ").concat(o.replace("Date","Service Date")," selected"):""},i.cancel=e.dismiss}]).directive("appointmentAttachmentUpload",["AppointmentAttachment","AppointmentService",function(e,t){return{restrict:"E",scope:{appointment:"=",onSuccess:"&"},template:'',controller:["$scope",function(n){n.emaUploadApi={},n.onFileSelect=function(i){i.length>0&&(i.length>1?n.emaUploadApi.showErrorMsg("Please select a single file."):i[0].size>10485760?this.emaUploadApi.showErrorMsg("Please select a file under 10MB in size."):t.editAttachmentDetails({file:i[0]}).then((function(t){return n.emaUploadApi.showInProgress(!0),e.createOrUpdate({aid:n.appointment.id},t).$promise.then((function(e){n.emaUploadApi.showInProgress(!1),n.onSuccess({attachment:e})}),(function(){n.emaUploadApi.showInProgress(!1),n.emaUploadApi.showErrorMsg("An error occurred while uploading this file, please try again.")}))})))}}]}}]).factory("AppointmentHistoryLogService",["$http",function(e){return{getHistoryLogs:function(t){return e({url:APP.contextPath+"/ws/v2/appointment/"+t+"/history?status=CANCELLED",method:"GET"})}}}]).factory("ApptCancelHistory",["$resource",P]).service("AppointmentHoldService",d.AppointmentHoldService).name;t.appointmentServicesModule=C;var N=C;t.default=N},function(e,t,n){"use strict";n.r(t),n.d(t,"FinancialBatchSettingsService",(function(){return a})),n.d(t,"financialBatchSettingsServiceModule",(function(){return r}));var i=n(1),a=function(){function e(e){this.$http=e,this.baseUrl=APP.contextPath+"/ws/v3/financial-batch-settings"}return e.$inject=["$http"],e.prototype.getSettings=function(e){return this.$http.get(this.baseUrl+"/business-unit/"+e).then((function(e){return e.data}))},e.prototype.save=function(e,t){var n=this.baseUrl;return t&&(n=n+"/"+t),this.$http.post(n,e,{params:{showPleaseWait:!0}}).then((function(e){return e.data}))},e}(),r=i.module("financialBatchSettingsServiceModule",[]).service("financialBatchSettingsService",a).name},function(e,t,n){"use strict";n.r(t),n.d(t,"DivisionsUtil",(function(){return a}));var i=n(0),a=function(){function e(){}return e.isFlagEnabled=function(e,t){var n=i.get(APP,"mavFeatureFlags.isFirmAdminDivisionsEnabled",!1);return e.filter((function(e){return e.configType===t&&e.enabled})).length>0&&n},e}()},,function(e,t,n){e.exports=n(11)(578)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.moduleName=void 0;var i=M(n(1)),a=M(n(0)),r=M(n(13)),o=M(n(899));n(10);var s=M(n(1428)),c=M(n(30)),l=n(1560),d=n(607),p=M(n(1431)),u=M(n(1561)),m=M(n(1562)),f=M(n(1563)),b=M(n(1564)),A=M(n(1565)),h=M(n(1432));function M(e){return e&&e.__esModule?e:{default:e}}_.$inject=["$resource"],T.$inject=["specificationsFactory","Patient","EmaModalNg"],v.$inject=["EmaModalNg","lastFirstMiddleInitialAndPrefixFilter"],E.$inject=["EnumService","PatientService"],g.$inject=["firstAndLastNameFilter"],y.$inject=["$window","$http","$templateCache","EmaModalNg","emaPatientOverviewUrl","selectionModalService","Visit","EnumService","globalPeriodServices"];var O="visit/visitRow.html";function y(e,t,n,o,s,c,l,d,m){var f=this,b="patientHeader:reload",M="".concat(APP.contextPath,"/ws/v3/patients");n.put(O,A.default),n.put("/visit/templates/summaryColumnHeader.html",h.default),f.openPatientOverview=function(t){t&&t.encryptedId&&e.open(s.get(t.encryptedId),"_blank")},f.hasIdCard=function(e){return e&&e.mavAdditionalInfo&&!!e.mavAdditionalInfo.identificationCard},f.hasPatientPhoto=function(e){return e&&!!e.photo},f.clearIdCard=function(e){f.setIdCard(e,null)},f.setIdCard=function(e,t){e.mavAdditionalInfo.identificationCard=t},f.selectPatientAttachments=function(e,t){return o.open("Patient Attachments",{template:p.default,size:"lg",resolve:{patientAttachments:function(){return e},enums:["Enums",function(e){return e.get({enumClassName:"com.m2.domain.enums.CatagoryTabSection"}).$promise}],maxSelectionCount:function(){return t}},controller:["$scope","$uibModalInstance","patientAttachments","enums","emaNgTableUtils","maxSelectionCount",function(e,t,n,i,r,o){var s=this;s.patientAttachments=n,s.sections=a.default.keyBy(i["com.m2.domain.enums.CatagoryTabSection"],"name"),s.selectedIds=[],s.maxSelectionCount=o,s.tableParams=r.createNgTableParams(s.patientAttachments,{sorting:{dateCreated:"desc"}}),s.tableParams.settings({showTotal:!0}),e.$on("ngTableCheckboxes.selectionChanged",(function(e,t){s.selectedIds=t,s.selectionCount=s.selectedIds.length})),s.hasSelections=function(){return s.selectedIds.length},s.hasTooManySelections=function(){return o&&s.selectedIds.length>o},s.cancel=function(){t.dismiss("cancel")},s.getSelectedAttachments=function(){return a.default.map(s.selectedIds,(function(e){return a.default.find(s.patientAttachments,{id:a.default.parseInt(e)})}))},s.attach=function(){t.close(s.getSelectedAttachments())}}],controllerAs:"pac"},{analyticsPage:"/patientAttachments",description:"Patient Attachments"}).result},f.selectPatientVisits=function(e,t){var n=(0,r.default)().cb();return(t=a.default.assign({selector:l.selectors.selectionModal().build(),resource:l,rowTemplateUrl:O,timezone:APP.loggedInUserTimezone,loadItems:function(e){return l.query({where:n.p("id").any(e).toQuery(),selector:t.selector}).$promise}},t)).extend=a.default.wrap(t.extend||a.default.noop,(function(n,i){i.queryParams.where=l.specifications.isPatient(e).and(l.specifications.isVisible()).toQuery(),i.queryParams.selector=t.selector,i.table.$params.sorting={date:"desc"},i.getVisitUrl=function(e){return f.getVisitUrl(e.patient.encryptedId,e.encryptedId)};var a=!1;i.toggleVisitSummaryDetails=function(){a=!a},i.isVisitSummaryDetailed=function(){return a},i.enums={},d.load({enums:{chartNoteStatus:"com.m2.domain.enums.ChartNoteStatus"},indexed:!0,target:i.enums}),n(i)})),c.selectItemsFromResource(t)},f.getVisitUrl=function(e,t){return APP.contextPath+"/app/VisitOverview.action?pid="+e+"&vid="+t},f.refreshPatientHeader=function(){var e;i.default.element("#patientHeaderContainer").trigger(b),i.default.element("#patientHeaderFullContainer").trigger(b),null===(e=document.querySelector("#angularPatientHeader"))||void 0===e||e.dispatchEvent(new Event("refresh")),m.refreshPatientHeaderGlobalPeriods()},f.selectPatientChartNotes=function(e,t){var n="Add "+e+" Notes";return o.open(n,{resolve:{availableChartNotes:a.default.constant(t)},template:u.default,controller:["$scope","$uibModalInstance","emaNgTableUtils","availableChartNotes",function(e,t,n,i){var r=this;r.availableChartNotes=i,d.load({enums:{chartNoteTypes:"com.m2.domain.enums.ChartNoteType",chartNoteStatuses:"com.m2.domain.enums.ChartNoteStatus"},indexed:!0,target:r}),r.tableParams=n.createNgTableParams(r.availableChartNotes,{maxBlocks:7,sorting:{noteCreatedDate:"desc"}},{showTotal:!0}),e.$on("ngTableCheckboxes.selectionChanged",(function(e,t){r.selectedNoteIds=t,r.selectionCount=r.selectedNoteIds.length})),r.cancel=function(){t.dismiss("cancel")},r.attach=function(){t.close(a.default.map(r.selectedNoteIds,a.default.parseInt))},r.getSelectedAttachments=function(){return a.default.map(r.selectedNoteIds,(function(e){return a.default.find(r.availableChartNotes,{id:a.default.parseInt(e)})}))}}],controllerAs:"$ctrl"})},f.search=function(e,n){return t.get("".concat(M,"/search"),{params:Object.assign({term:e},n?{selector:n}:{})}).then((function(e){return e.data}))}}function g(e){return function(t){var n=e(t);if(n&&t){var i=t.mrn,a=t.pmsId;i&&(n+=" MRN:".concat(i)),a&&(n+=" PMS:".concat(a))}return n}}function E(e,t){var n=e.load({enums:{sex:"com.m2.domain.enums.Gender"},indexed:!0});return{restrict:"A",scope:{patient:" ',controller:["$window","emaPatientOverviewUrl","emaPatientFinancialsUrl",function(e,t,n){var i=this;i.viewPage=function(){var a;a="financials"==i.location?n.get(i.patient.encryptedId,i.patient.id,i.subLocation||""):t.get(i.patient.encryptedId),e.open(a,"_blank")}}]}).component("patientThumbnail",{bindings:{patient:"<"},template:'
',controller:["$window","emaPatientOverviewUrl",function(e,t){var n=this;n.viewPage=function(){e.open(t.get(n.patient.encryptedId),"_blank")}}]}).component("patientDetails",{template:'DOB: ()

',bindings:{patient:"<",withDob:"0&&!r.get(e,"childAppointmentLink")||r.get(e,"appointmentType.parentAppointmentTypeCount")>0&&!r.get(e,"parentAppointmentLink")},e.prototype.createMavFacilityResourceReservationDtos=function(e,t){return t.map((function(t){return{facilityResource:{id:t.id},startTime:e.scheduledStartDate,endTime:s()(e.scheduledStartDate).add(e.scheduledDuration,"minutes").toDate()}}))},e.prototype.checkInLinkedAppointments=function(e,t){var n,i=this,a=t.status,o=r.get(t,"childAppointmentLink.childAppointment")?r.get(t,"childAppointmentLink.childAppointment"):r.get(t,"parentAppointmentLink.parentAppointment");this.linkedAppointmentCheckInUtil.isParentAppointment(t)?n=[t,r.get(t,"childAppointmentLink.childAppointment")]:this.linkedAppointmentCheckInUtil.isChildAppointment(t)&&(n=[t,r.get(t,"parentAppointmentLink.parentAppointment")]),this.checkInLinkedAppointmentsModal.open(n,t.id).then((function(n){var s=o.status;n&&e?i.AppointmentServiceV3.getAppointmentResource().get({id:o.id}).$promise.then((function(e){return i.schedulerService.beginCheckIn(t,r.includes(n,e.id)?e:null)})):n?(t.status="CHECKED_IN",o.status=r.includes(n,o.id)?"CHECKED_IN":s):t.status=a}))},e.prototype.checkInUnlinkedAppointments=function(e,t,n){var i=this,a=[t,n,this.unlinkedAppointmentIndicator];this.checkInLinkedAppointmentsModal.open(a,t.id).then((function(t){t&&e&&i.schedulerService.beginCheckIn(t,void 0)}))},e}(),u=a.module("linkAppointment.service",[]).service("linkAppointmentService",p).name},function(e,t,n){"use strict";var i;void 0===(i=function(){return{COUNTRY_USA:"United_States_of_America",COUNTRY_USA_ALIASES:["United_States_of_America","United States of America","USA"],TIMEZONE_EST:"US/Eastern",SECONDS_IN_MINUTE:60,DATES:{NO_OFFSET:"YYYY-MM-DDTHH:mm:00+0000",SHORT_DATE:"MM/DD/YYYY",MEDIUM_DATE:"MMM D, YYYY",SHORT_TIME:"h:mm a",XML_DATE:"YYYY-MM-DD"},ENUMS:{APPOINTMENT_CANCELLATION_REASON:"com.m2.mav.domain.enums.AppointmentCancellationReason",APPOINTMENT_REMINDER_CONFIRMATION_STATUS:"com.m2.mav.appointment.enums.AppointmentReminderConfirmationStatus",APPOINTMENT_REMINDER_CONTACT_TYPE:"com.m2.mav.appointment.enums.AppointmentReminderContactType",APPOINTMENT_REMINDER_RESPONSE_TYPE:"com.m2.mav.appointment.enums.AppointmentReminderResponseType",APPOINTMENT_STATUS:"com.m2.mav.domain.enums.AppointmentStatus",CLAIM_FORMAT_TYPE:"com.m2.mav.domain.enums.ClaimFormatType",CLAIM_SUBMISSION_TYPE:"com.m2.mav.domain.enums.ClaimSubmissionType",CLAIM_STATUS:"com.m2.mav.domain.enums.ClaimStatus",INSURANCE_ELIGIBILITY_STATUS:"com.m2.mav.eligibility.enums.InsuranceEligibilityStatus",INSURED_RELATIONSHIP:"com.m2.domain.enums.InsuredRelationship",MAV_INSURANCE_POLICY_TYPE:"com.m2.domain.enums.MavInsurancePolicyType",MEDICAL_SUBDOMAIN:"com.m2.domain.enums.MedicalSubdomain",PAYMENT_METHOD:"com.m2.mav.domain.enums.PaymentMethod",PM_NOTE_TYPE:"com.m2.mav.note.enums.PmNoteType",POSTING_STATUS:"com.modmed.common.financial.enums.PostingStatus",RECALL_STATUS:"com.m2.domain.enums.RecallStatus",COMMONWELL_PROXY_RELATIONSHIP:"com.modmed.commonwell.data.enums.Relationship",COMMONWELL_ENROLLMENT_STATUS:"com.modmed.commonwell.enums.CommonWellEnrollmentStatus",DIRECT_MAIL_FILE_FORMAT:"com.m2.domain.enums.DirectMailFileFormat"}}}.apply(t,[]))||(e.exports=i)},function(e,t,n){"use strict";n.r(t),n.d(t,"BillService",(function(){return g})),n.d(t,"BillServiceModule",(function(){return E}));var i=n(3),a=n.n(i),r=n(6),o=n.n(r),s=n(1),c=(n(10),n(8)),l=n(5),d=n(109),p=n(132),u=(n(73),n(38)),m=n(135),f=n(452),b=n(311),A=n(831),h=n(382),M=n(15),O=n(191),y=function(){return(y=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&!this.isBillInactive(e)},e.prototype.addServiceLine=function(e,t){void 0===t&&(t={});var n=a.a.result(a.a.maxBy(e.items,"position"),"position")||0,i=y({position:n+1,diagnosisPointers:[],modifiers:[],status:"PRELIMINARY",reversalState:"ACTIVE",units:1,serviceDateFrom:e.serviceDateLd},t);return e.items.push(i),i},e.prototype.calculateItemCharge=function(e){return(e.units||0)*(e.unitCharge||0)},e.prototype.calculateTotalItemCharge=function(e,t){var n=this.calculateItemCharge(e),i=t.type===l.BillType.PATIENT?this.getDiscount(e):0,r=this.calculateTotalItemTax(e,t);return a.a.round(n+r-i,2)},e.prototype.getDiscount=function(e){var t,n;if(!a.a.isNil(e.billingQuoteCharge)&&!this.shouldApplyQuoteDiscountToItem(e))return 0;var i=this.calculateItemCharge(e),r=null===(t=null==e?void 0:e.mavCharge)||void 0===t?void 0:t.discountAmount,o=null===(n=null==e?void 0:e.mavCharge)||void 0===n?void 0:n.discountType,s=0;return!a.a.isNil(o)&&r>0&&i>0&&(s="PERCENT"===o?i*r:r),a.a.round(s,2)},e.prototype.shouldApplyQuoteDiscountToItem=function(e){var t=e.billingQuoteCharge;return!a.a.isNil(t)&&(e.code===t.cptOrProductCode&&e.units===t.units&&e.unitCharge===t.unitCharge)},e.prototype.isBillUsingQuoteDiscounts=function(e){return!e.isPosted&&e.type==l.BillType.PATIENT&&e.items.some(this.shouldApplyQuoteDiscountToItem.bind(this))},e.prototype.calculateTotalItemTax=function(e,t){var n=a.a.get(e,"mavCharge.taxAmount"),i=a.a.get(t,"serviceLocation.additionalInfo.useTaxRates",!1),r=this.isPatientBill(t),o=a.a.get(e,"mavCharge.invPatientProduct.invStock.invProduct"),s=a.a.get(e,"mavCharge.packageCharge.packageItem");if(s){var c=s.taxAmount||0,l=e.units||0;return a.a.round(c*l,2)}if(i&&(a.a.isNil(n)||r&&!a.a.isUndefined(o))){var d=this.calculateItemLocalTax(e,t),p=this.calculateItemStateTax(e,t);return a.a.round(d+p,2)}return n||0},e.prototype.calculateItemLocalTax=function(e,t){var n=a.a.get(t,"serviceLocation.additionalInfo.localTaxRate",0);return this.calculateItemTax(e,n)},e.prototype.calculateItemStateTax=function(e,t){var n=a.a.get(t,"serviceLocation.additionalInfo.stateTaxRate",0);return this.calculateItemTax(e,n)},e.prototype.calculateItemTax=function(e,t){var n=a.a.get(e,"mavCharge.invPatientProduct.invStock.invProduct.isTaxable",!1),i=this.calculateItemCharge(e),r=this.getDiscount(e);return n?a.a.round((i-r)*t,2):0},e.prototype.calculateTotalCharges=function(e){var t=this;return a.a.reduce(e.items,(function(n,i){return n+t.calculateTotalItemCharge(i,e)}),0)},e.prototype.calculateItemBalance=function(e,t){return(e.totalPayments||0)+(e.totalAdjustments||0)-this.calculateTotalItemCharge(e,t)},e.prototype.calculateTotalBalance=function(e){var t=this;return a.a.reduce(e.items,(function(n,i){return n+t.calculateItemBalance(i,e)}),0)},e.prototype.calculateItemAllowed=function(e,t){var n=this;return a.a.chain(e.claimBillItems).sumBy((function(e){if(e.paymentsTotal>0){var i=a.a.find(e.claimBillItemPayerChecks,(function(e){return e.claimPayerCheck.payerCheck.payer.id===t.insurancePolicy.payer.id}));if(i){var r=a.a.find(i.payments,(function(e){return n.FinancialsService.isPaymentOrAdjustmentPosted(e)}));return r?r.allowed:0}}})).round(2).value()},e.prototype.getProviderFeeScheduleOptions=function(e){return e.renderingProvider&&e.serviceLocation&&e.serviceDate?this.ProviderFeeSchedule.find({locationId:e.serviceLocation.id,providerId:e.renderingProvider.id,serviceDate:o()(e.serviceDate).toISOString()}).$promise:this.$q.when([])},e.prototype.getPayerFeeScheduleOptions=function(e){if(e.policies.length&&e.renderingProvider&&e.serviceLocation&&e.serviceDate){var t=a()(e.policies).map("insurancePolicy").map("id").value();return this.PayerFeeSchedule.find({locationId:e.serviceLocation.id,providerId:e.renderingProvider.id,serviceDate:o()(e.serviceDate).toISOString(),policyIds:t}).$promise}return this.$q.when([])},e.prototype.lookupFromFeeSchedule=function(e,t,n,i,r){var s=this;return e.serviceLocation&&n&&e.serviceDate&&a.a.keys(i).length&&r?this.FeeEntry.searchAllByCodeAndModifier({locationId:e.serviceLocation.id,scheduleId:n,serviceDate:o()(e.serviceDate).toISOString(),billingType:e.billingType},i).$promise.then((function(e){return s.billChargesService.applyFeeScheduleCharges(t,e,r)})):(a.a.forEach(t,(function(e){r(e,{charge:0,description:""})})),this.$q.resolve())},e.prototype.lookupItemsFromFeeSchedule=function(e,t,n,i){var r=this,o=a()(t).map((function(e){var t=r.billChargesService.getModifiersAsString(e.modifiers,r.hasQuickKey(e));return{code:e.code,modifier:t,quickKey:e.quickKey}})).filter("code").value();return this.lookupFromFeeSchedule(e,t,n,{codes:o,billingType:e.billingType},i)},e.prototype.updateUnitCharges=function(e){var t=this;return e.providerFeeSchedule?this.lookupItemsFromFeeSchedule(e,e.items,a.a.result(e.providerFeeSchedule,"id"),(function(n,i){var r=a.a.has(n,"mavCharge.postDateLd")||t.isClaimReadyOrPosted(e)||t.isBillInactive(e),o=t.getProductCode(n),s=a.a.has(n,"mavCharge.packageCharge");r||o||s||(n.unitCharge=i.charge,t.hasQuickKey(n)||(n.codeDescription=i.description))})):this.$q.resolve()},e.prototype.updateUnitCharge=function(e,t){var n=this;return e.providerFeeSchedule?this.lookupItemsFromFeeSchedule(e,[t],a.a.result(e.providerFeeSchedule,"id"),(function(e,t){a.a.has(e,"mavCharge.packageCharge")||(e.unitCharge=t.charge,n.hasQuickKey(e)||a.a.isEmpty(t.description)||(e.codeDescription=t.description))})):this.$q.resolve()},e.prototype.hasQuickKey=function(e){return a.a.has(e,"quickKey")&&null!==e.quickKey},e.prototype.updateCodeDefaults=function(e,t){var n=this;this.lookupItemsFromFeeSchedule(e,[t],a.a.result(e.providerFeeSchedule,"id"),(function(e,i){var a=i.billItemCodeDefault;a?(e.supplementalQualifier=a.supplementalQualifier,e.supplementalCode=a.supplementalCode,e.supplementalDescription=a.supplementalDescription,e.supplementalQuantityQualifier=a.supplementalQuantityQualifier,e.supplementalQuantity=a.supplementalQuantity):(n.requiresSupplementalCode(t)?e.supplementalQualifier="FIELD_24A_N4":n.resetSupplementalInfo(e),n.isVCode(t)||(e.purchasedServiceChargeAmount=null,e.purchasedServiceReferralContact=null))}))},e.prototype.resetSupplementalInfo=function(e){e.supplementalQualifier=null,e.supplementalCode=null,e.supplementalDescription=null,e.supplementalQuantityQualifier=null,e.supplementalQuantity=null},e.prototype.updateAssociatedNdc=function(e,t){return this.findAssociatedNdc(t.code,o()(e.serviceDate).format("YYYY-MM-DD")).then((function(e){t.associatedNdcList=e.data}))},e.prototype.findAssociatedNdc=function(e,t){return this.$http({url:APP.contextPath+"/ws/v2/claimCodes/hcpcsNdcCrosswalk/"+e+"/"+t,method:"GET",isArray:!0})},e.prototype.clearUnitCharge=function(e){e.unitCharge=0,e.codeDescription=null,e.quickKey=null},e.prototype.updateRevenueCode=function(e){var t=this,n=e.code;n&&this.lookupRevenueCodeIgnoreModifiers(n,e.quickKey).then((function(n){e.revenueCode=n.data.revenueCode||t.DEFAULT_REV_CODE}))},e.prototype.lookupRevenueCodeIgnoreModifiers=function(e,t){return this.$http({url:APP.contextPath+"/ws/v3/codeCategory/category-item-ignore-modifiers",params:{code:e,quickKey:t},method:"GET"})},e.prototype.updateUnitAllowables=function(e,t){var n=this;1===a.a.get(t,"position")&&this.lookupItemsFromFeeSchedule(e,e.items,a.a.result(t,"payerFeeSchedule.id"),(function(e,t){e.mprDiscount=void 0,s.isUndefined(e.mprIndex)?e.unitAllowable=t.charge:n.billChargesService.setUnitAllowable(e,t)}))},e.prototype.updateUnitAllowable=function(e,t){var n=this;if(this.isInsurableBill(e)){var i=a.a.find(e.policies,{position:1});i&&this.lookupItemsFromFeeSchedule(e,[t],a.a.result(i,"payerFeeSchedule.id"),(function(e,t){e.mprDiscount=void 0,s.isUndefined(e.mprIndex)?e.unitAllowable=t.charge:n.billChargesService.setUnitAllowable(e,t)}))}},e.prototype.updateAllAllowables=function(e){if(!a.a.isEmpty(e.policies)){var t=a.a.find(e.policies,{position:1});t&&this.updateUnitAllowables(e,t)}},e.prototype.billItemHasLookupModifierAtLeadingPosition=function(e){var t=this.billItemLeadingModifier(e);return this.isModifierForLookup(t)},e.prototype.billItemLeadingModifier=function(e){return a.a.chain(e.modifiers).filter((function(e){return!a.a.isEmpty(e.modifier)})).sortBy("position").head().value()},e.prototype.billItemContainsModifierUpdatedCharges=function(e){return this.billItemHasLookupModifierAtLeadingPosition(e)||s.isDefined(a.a.find(e.modifiers,(function(e){return"50"===e.modifier})))},e.prototype.clearUnitAllowable=function(e){e.unitAllowable=0},e.prototype.getModifierForPosition=function(e,t){return a.a.result(a.a.find(e.modifiers,{position:t}),"modifier")},e.prototype.setModifierForPosition=function(e,t,n){if(n){var i=a.a.find(e.modifiers,{position:t});i||(i={position:t},e.modifiers.push(i)),i.modifier=n}else a.a.remove(e.modifiers,{position:t})},e.prototype.clearItemModifiers=function(e){e.modifiers.length=0},e.prototype.isModifierForLookup=function(e){var t=a.a.isObject(e)?e.modifier:e;return a.a.includes(this.lookupModifiers,t)},e.prototype.getDiagnosisPointerIndicators=function(){return"ABCDEFGHIJKL"},e.prototype.getDiagnosisPointerForPosition=function(e,t){return a.a.find(e.diagnosisPointers,{position:t})},e.prototype.setDiagnosisPointerForPosition=function(e,t,n){if(n)if(n.position){var i=a.a.find(e.diagnosisPointers,{position:t});i||(i={position:t},e.diagnosisPointers.push(i)),i.billDiagnosis=n}else a.a.remove(e.diagnosisPointers,{position:t})},e.prototype.isJCode=function(e){var t=a.a.get(e,"code","");return 5===t.length&&t.search(/^J\d{4}$/)>-1},e.prototype.isQCode=function(e){var t=a.a.get(e,"code","");return 5===t.length&&t.search(/^Q\d{4}$/)>-1},e.prototype.isJCodeOrQCode=function(e){return this.isJCode(e)||this.isQCode(e)},e.prototype.requiresSupplementalCode=function(e){return this.isJCodeOrQCode(e)&&this.isCrosswalkCode(e)},e.prototype.isVCode=function(e){var t=a.a.get(e,"code");return t&&5===t.length&&!!t.match(/^V\d{4}$/)},e.prototype.isHcpcsOrJCode=function(e){var t=a.a.result(e,"code");return this.hcpcsOrJCodePattern.test(t)},e.prototype.isValidCode=function(e){var t=a.a.result(e,"code");return/^\w{5,10}$/.test(t)&&this.isInsurableCode(e)},e.prototype.isInsurableCode=function(e){var t=a.a.get(APP,"mavFeatureFlags.isCustomCodeBillingPreferenceEnabled",!0),n=e.billingPreference===l.BillingPreference.INSURABLE&&t;return!e.billingPreference||n},e.prototype.isCrosswalkCode=function(e){var t=a.a.get(e,"associatedNdcList",[]);return t&&t.length>0},e.prototype.isSupplementalQualifierNdc=function(e){return"FIELD_24A_N4"===e},e.prototype.isNdcCode=function(e){return this.isSupplementalQualifierNdc(e.supplementalQualifier)},e.prototype.isDefaultCustomCode=function(e){return"COSMETIX"===a.a.result(e,"code.toUpperCase")},e.prototype.isClaimStatusAvailable=function(e){return"UNAVAILABLE"!==e},e.prototype.isUnlinkedInsurance=function(e){return"UNLINKED"===(null==e?void 0:e.linkState)},e.prototype.isClaimStatusOptionDisabled=function(e,t){return this.isUnlinkedInsurance(e)&&a.a.includes(["BATCHED_FOR_PRINTING","QUEUED"],a.a.get(t,"name"))},e.prototype.isClaimAvailable=function(e){return this.isClaimStatusAvailable(e.status)},e.prototype.isClaimReadyOrPosted=function(e){return a.a.some(e.policies,(function(e){return a.a.includes(["READY_FOR_POSTING","ON_HOLD","IN_DISPUTE"],e.status)||a.a.startsWith(e.status,"RESOLVED")||a.a.startsWith(e.status,"INACTIVE")}))},e.prototype.doesBillContainClosedItems=function(e){return a.a.some(e.items,(function(e){return e.mavCharge&&e.mavCharge.closingReport}))},e.prototype.doesBillContainPostedItems=function(e){return a.a.some(e.items,(function(e){return a.a.has(e,"mavCharge.postDateAddedDate")}))},e.prototype.isBillEditable=function(e){return a.a.includes(["READY_FOR_POSTING","PAYMENT_PENDING"],e.status)||a.a.startsWith(e.status,"RESOLVED")||a.a.startsWith(e.status,"INACTIVE")},e.prototype.isPrimaryPayerClaimResolvedOrInactive=function(e){var t=a.a.find(e.policies,{position:1});return!!t&&this.hasResolvedOrInactiveClaim(t)},e.prototype.billRequiresPracticeLocation=function(e){return!(!e||!e.additionalInfo)&&(a.a.get(APP,"mavFeatureFlags.isMaverickPracticeLocationsEnabled")&&e.additionalInfo.requirePracticeLocation)},e.prototype.hasResolvedClaim=function(e){var t=this;return a.a.some(a.a.get(e,"claims"),(function(e){return t.isClaimStatusResolved(e)}))},e.prototype.isClaimStatusResolved=function(e){return a.a.startsWith(e.status,"RESOLVED")},e.prototype.hasResolvedOrInactiveClaim=function(e){var t=this;return a.a.some(a.a.get(e,"claims"),(function(e){return t.isClaimStatusResolvedOrInactive(e)}))},e.prototype.isClaimStatusResolvedOrInactive=function(e){return this.isClaimStatusResolved(e)||a.a.startsWith(e.status,"INACTIVE")},e.prototype.isBillInactive=function(e){return a.a.startsWith(e.status,"INACTIVE")},e.prototype.isBillResolved=function(e){return a.a.startsWith(e.status,"RESOLVED")},e.prototype.isBillResolvedPaid=function(e){return a.a.isEqual(e.status,"RESOLVED_PAID")},e.prototype.hasAllValidClaimStatusesForResolvedPaidBill=function(e){var t=["RESOLVED_PAID","RESOLVED_OTHER","DENIED","INACTIVE_VOIDED","INACTIVE_DUPLICATE"],n=!0;return a.a.get(e,"policies",[]).forEach((function(e){a.a.get(e,"claims",[]).forEach((function(e){t.indexOf(e.status)<0&&(n=!1)}))})),n},e.prototype.hasValidPrimaryPayer=function(e){return a.a.some(e.policies,(function(e){return 1===e.position&&!a.a.isNil(e.insurancePolicy)}))},e.prototype.canChangeInsurance=function(e,t){return!this.isBillInactive(e)&&!this.hasResolvedClaim(t)},e.prototype.isBillItemClean=function(e){var t=a.a.filter(e.patientPayments,{visible:!0,voidPostDateLd:null}),n=a.a.filter(e.patientAdjustments,{visible:!0,voidPostDateLd:null});return a.a.isEmpty(t)&&a.a.isEmpty(n)},e.prototype.lookupBillItemNocCodes=function(e,t){var n=s.isArray(e)?e:[e],i=a.a.filter(a.a.pickNestedProperties(n,["code"]),"code");return this.$http({url:APP.contextPath+"/ws/v2/claimCodes/nocCodes?serviceDate="+o()(t).toISOString(),method:"POST",data:i}).then(a.a.property("data"))},e.prototype.getAllActivePolicies=function(e){return a()([]).concat(e.policies||[]).concat(e.unlinkedPolicies||[]).value()},e.prototype.hasClaims=function(e){var t=this.getAllActivePolicies(e);return!!a()(t).map("claims").flatten().size()},e.prototype.doesAnyChargeResponsibilityHaveAPositiveBalance=function(e){var t=this,n=a.a.get(e,"items",[]).filter((function(e){return e.visible&&t.BillItem.getIsBillItemPosted(e)})),i=a.a.flatten(a.a.map(n,"mavCharge.chargeResponsibility"));return a.a.some(i,(function(e){return e.visible&&e.balance>0}))},e.prototype.isEveryClaimInactive=function(e){if(this.hasClaims(e)){var t=this.getAllActivePolicies(e);return a()(t).map("claims").flatten().every((function(e){return a.a.startsWith(e.status,"INACTIVE")}))}return!0},e.prototype.isPaymentOrAdjustmentActive=function(e){return e&&!0===e.visible&&a.a.isNil(e.voidPostDateLd)},e.prototype.hasPaymentsOrAdjustments=function(e){return this.hasActivePostedPaymentsOrAdjustments(e.items)},e.prototype.hasActivePostedPaymentsOrAdjustments=function(e){var t=this,n=a()(e).flatMap("claimBillItems").flatMap("claimBillItemPayerChecks").filter({visible:!0}),i=n.flatMap("payments").filter((function(e){return t.isPaymentOrAdjustmentActive(e)})).size(),r=n.flatMap("adjustments").filter((function(e){return t.isPaymentOrAdjustmentActive(e)})).size(),o=a()(e).map("patientPayments").flatten().filter((function(e){return t.isPaymentOrAdjustmentActive(e)})).size(),s=a()(e).map("patientAdjustments").flatten().filter((function(e){return t.isPaymentOrAdjustmentActive(e)})).size();return!!(o||s||n.size()||i||r)},e.prototype.hasAssociatedPayerChecks=function(e){var t=this.getAllActivePolicies(e);return a()(t).flatMap("claims").flatMap("claimPayerChecks").filter((function(e){return!a.a.includes(["PLA_OFFSET_CHARGE","PLA_INFORMATIONAL"],e.type)})).some((function(e){return!!e.visible}))},e.prototype.hasAssociatedProviderLevelAdjustments=function(e){var t=this.getAllActivePolicies(e);return a()(t).flatMap("claims").flatMap("claimPayerChecks").filter((function(e){return a.a.includes([M.ClaimPayerCheckType.PLA_OFFSET_CHARGE,M.ClaimPayerCheckType.PLA_INFORMATIONAL,M.ClaimPayerCheckType.PLA_POST_TO_SVC_LINES],e.type)})).some((function(e){return e.visible}))},e.prototype.hasPostedPaymentsOrAdjustments=function(e){var t=this,n=a.a.filter(e.items||[],(function(e){return t.itemHasPostedPaymentsOrAdjustments(e)}));return!a.a.isEmpty(n)},e.prototype.itemHasPostedPaymentsOrAdjustments=function(e){var t=this,n=a()(e.claimBillItems).flatMap("claimBillItemPayerChecks"),i=n.flatMap("payments"),r=n.flatMap("adjustments");return i.concat(r.value()).concat(e.patientPayments).concat(e.patientAdjustments).filter({visible:!0}).some((function(e){return t.FinancialsService.isPaymentOrAdjustmentPosted(e)}))},e.prototype.itemHasUnpostedPaymentsOrAdjustments=function(e){var t=this,n=a()(e.claimBillItems).flatMap("claimBillItemPayerChecks"),i=n.flatMap("payments"),r=n.flatMap("adjustments");return i.concat(r.value()).concat(e.patientPayments).concat(e.patientAdjustments).filter({visible:!0}).some((function(e){return t.FinancialsService.isPaymentOrAdjustmentUnposted(e)}))},e.prototype.itemHasPostedOrUnpostedPaymentsOrAdjustments=function(e){return this.itemHasPostedPaymentsOrAdjustments(e)||this.itemHasUnpostedPaymentsOrAdjustments(e)},e.prototype.populatePurchasedServiceInfo=function(e){var t="purchasedServiceReferralContact.id",n=a()(e).filter(t).groupBy(t).value();a.a.isEmpty(n)||this.referralContactService.findByIds(a.a.keys(n)).then((function(e){e.forEach((function(e){(n[e.id]||[]).forEach((function(t){return t.purchasedServiceReferralContact=e}))}))}))},e.prototype.splitBill=function(e,t,n,i,a,r){return this.$http.post(APP.contextPath+"/ws/v3/bill/"+e+"/split",t,{params:{selector:r,itemIds:n,postDate:i,batchId:a,ignoreHttpInterceptor:[400]}}).then((function(e){return e.data}))},e.prototype.getPayersWithPostedPaymentsForAllBillItems=function(e){return this.$http({url:APP.contextPath+"/ws/v2/bill/"+e+"/payersWithPostedPaymentsForAllBillItems",method:"GET"}).then(a.a.property("data"))},e.prototype.getGlobalPeriods=function(e){return this.$http({url:APP.contextPath+"/ws/v2/globalperiod/visitProcedures/bill/"+e,method:"GET",isArray:!0,params:{billId:e}}).then(a.a.property("data"))},e.prototype.getResponsibleParty=function(e){return this.billResponsiblePartyService.get(e)},e.prototype.getResponsibleParties=function(e){return this.getBillResponsibleParties(e,a()(e.items).map("mavCharge").map("chargeResponsibility").flatten().value())},e.prototype.getAllActiveResponsibleParties=function(e){return this.getBillResponsibleParties(e,a()(e.items).map("mavCharge").map("allActiveChargeResponsibilities").flatten().value())},e.prototype.getBillResponsibleParties=function(e,t){var n=this;return a()(t).map("responsibleBalance").uniqBy("id").map((function(t){return n.fillResponsiblePosition(e,t)})).value()},e.prototype.fillResponsiblePosition=function(e,t){return a.a.find(e.policies,(function(e){if(a.a.get(e,"insurancePolicy.id")===a.a.get(t,"insurancePolicy.id"))return t.position=a.a.get(e,"position"),!0})),t},e.prototype.getAppointmentTransactionsFromBill=function(e){return a()(a.a.get(e,"appointment.transactions",[])).reject((function(e){return!e.patientReceivedPayment})).filter(["businessUnit.id",e.businessUnit.id]).value()},e.prototype.getResponsiblePartyBalance=function(e,t){return a()(e.items).map("mavCharge").map("allActiveChargeResponsibilities").flatten().filter((function(e){return a.a.result(e,"responsibleBalance.id")===a.a.result(t,"id")})).reduce((function(e,t){return e+(t&&t.balance||0)}),0)},e.prototype.isBillValidForNewClaim=function(e){return this.Bill.getBillIsValidForNewClaim({billId:e}).$promise},e.prototype.findAssigneeByName=function(e,t){return this.$http({url:APP.contextPath+"/ws/v3/bill/assignee/"+t,method:"GET",params:{nameQuery:e},isArray:!0})},e.prototype.updateAssignee=function(e,t){return this.$http({url:APP.contextPath+"/ws/v3/bill/assignee/"+e,method:"POST",data:t,transformResponse:this.EventService.getHttpResponseInterceptor("financials","updateBillAssignee",a.a.constant(e))})},e.prototype.removeAssignee=function(e){return this.$http({url:APP.contextPath+"/ws/v3/bill/assignee/"+e,method:"DELETE",transformResponse:this.EventService.getHttpResponseInterceptor("financials","updateBillAssignee",a.a.constant(e))})},e.prototype.updatePayerIds=function(e,t){return this.Bill.updatePayerIds({billId:e,payerIdType:t}).$promise},e.prototype.canConvertToInsurableBill=function(e,t,n,i){var r=this.hasActivePoliciesForTargetBillType(e,n,i);return a.a.get(e,"type")!==n&&r?this.hasAllValidCodes(t||a.a.get(e,"items")):r&&this.hasAllInsurableCodes(t||a.a.get(e,"items"))},e.prototype.getPolicyClassificationForBillType=function(e){return"CLAIM"===e?"MEDICAL":e},e.prototype.getInsurancePolicyForBillInsurancePosition=function(e,t){return a.a.find(e,(function(e){return Math.max(e.ranking,1)===t}))},e.prototype.getInsuranceRanking=function(e,t){return"MEDICAL"===this.getPolicyClassificationForBillType(e.type)?a.a.get(t,"insurancePolicy.ranking"):0},e.prototype.getValidPolicyTypesForBillType=function(e,t){var n=this.getPolicyClassificationForBillType(e);return a.a.get(t,n)},e.prototype.hasActivePoliciesForTargetBillType=function(e,t,n){return this.hasActivePoliciesWithTypes(e,this.getValidPolicyTypesForBillType(t,n))},e.prototype.hasActivePoliciesWithTypes=function(e,t){var n=a.a.get(e.patient,"allInsurancePolicies"),i=a.a.get(e.patient,"activeInsurancePolicies");return a.a.some(n||i,a.a.includedIn(t,"mavPolicyType"))},e.prototype.hasAllValidCodes=function(e){var t=this;return a.a.every(e,(function(e){return t.isValidCode(e)}))},e.prototype.hasAllInsurableCodes=function(e){var t=this;return a.a.every(e,(function(e){return t.isInsurableCode(e)}))},e.prototype.hasEmptyDiagnosisPointers=function(e){return a.a.some(a.a.result(e,"items"),(function(e){return a.a.isEmpty(e.diagnosisPointers)}))},e.prototype.isBillContainsPostedItemsInClosedDate=function(e,t){var n=a()(e.items).flatMap("claimBillItems").flatMap("claimBillItemPayerChecks"),i=n.flatMap("payments").flatMap("postDateLd").some(a.a.partial(a.a.gt,t)),r=n.flatMap("adjustments").flatMap("postDateLd").some(a.a.partial(a.a.gt,t)),o=a()(e.items).flatMap("patientPayments").flatMap("postDateLd").some(a.a.partial(a.a.gt,t)),s=a()(e.items).flatMap("patientAdjustments").flatMap("postDateLd").some(a.a.partial(a.a.gt,t)),c=a()(e.items).flatMap("mavCharge").flatMap("postDateLd").some(a.a.partial(a.a.gt,t));return e.hasPostedItemsInClosedDate||i||r||o||s||c},e.prototype.getTreatmentCaseTypes=function(e){switch(e){case"AUTO_PIP":return["AUTO_ACCIDENT","PERSONAL_INJURY"];case"WORKERS_COMP":return["WORKERS_COMP"]}},e.prototype.hasMaxNumberOfPolicies=function(e){var t=a.a.get(e,"policies");return 3===a.a.size(t)||a.a.some(t,["insurancePolicy.ranking",0])},e.prototype.postPatientBill=function(e,t,n){return this.billService.postPatientBill({billId:e,postDate:o()(t).toISOString(),paymentBatchId:n},"$manageBill")},e.prototype.recreateBill=function(e){return this.$http.post(APP.contextPath+"/ws/v2/bill/"+e.billId+"/recreate",e,{})},e.prototype.validateBillForNewClaim=function(e){var t=this;return this.isBillValidForNewClaim(e.id).then().then((function(e){return e.isValid?t.$q.resolve():t.EmaModalServices.openNotificationModal({title:"CLIA Number Required",notifications:[{text:"One or more services lines may require a CLIA number and it is not present in the bill."}],primaryButton:{text:"Continue to create claim"}}).result}))},e.prototype.getFormattedProcedureCodes=function(e,t){var n="",i=new Set(t);return a.a.forEach(e,(function(e){if(!a.a.isUndefined(e.code)){n+=i.has(e.code)?'

':"

",n+=e.code;var t=a()(e.modifiers).sortBy("position").value();a.a.size(t)>0&&(n+="-"+a()(t).uniqBy("position").map("modifier").join("-")),n+="

"}})),n},e.prototype.getProductCode=function(e){return a.a.get(e,"mavCharge.invPatientProduct.invStock.invProduct.productCode")},e.prototype.isSavedProduct=function(e){return a.a.has(e,"mavCharge.id")&&a.a.has(e,"mavCharge.invPatientProduct.id")},e.prototype.exportBills=function(e){return this.Bill.exportBills(e)},e.prototype.getExportTask=function(e){return this.Bill.getExportTask({taskScheduleId:e})},e.prototype.getExportFile=function(e){return this.Bill.getExportFile(e)},e}(),E=s.module("BillServiceModule",[p.feeSetupServicesModule,d.mainFinancialsServiceModule,"patientFinancialsServices","ema.uiUtils",u.emaEventsModule,m.referralContactServiceModule,f.billChargesServiceModule,b.billResponsiblePartyServiceModule,A.billServiceModule,O.chargeServiceModule,h.billItemServiceModule]).service("BillService",g).name},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n(0),a=n(6),r=n.n(a),o=function(){function e(){}return e.checkDateLastSeenValidMinDate=function(e,t){return!!i.isNil(e)||!r()(e).isBefore(t)},e.getAdjustedTZForToday=function(){var e=(new Date).getTimezoneOffset()<0;return r()().clone().utc(e).endOf("day").format()},e.getAdjustedTZForMinDate=function(e){return r()(e).utc(!1).clone().startOf("day").subtract(6,"months").format()},e.isNotLoadedOrReferralChanged=function(e,t,n){return this.referralIdExists(t)&&(i.isNil(null==n?void 0:n.id)&&!this.referralIdExists(e)&&i.isNil(null==n?void 0:n.dateLastSeen)||this.referralIdExists(e)&&e!==t)},e.referralIdExists=function(e){return!i.isNil(e)&&e>0},e.checkDateLastSeenInvalidMinDate=function(e,t){if(!i.isNil(t)){var n=r()(e.scheduledStartDate).utc(!1).clone().startOf("day").subtract(6,"months").format();return r()(t).isBefore(n)}return!1},e}()},function(e,t,n){"use strict";var i,a;i=[n(0),n(63)],void 0===(a=function(e,t){var n={selector:function(){return new t.YogaSelector}};return n}.apply(t,i))||(e.exports=a)},,function(e,t,n){"use strict";n.r(t),n.d(t,"FirmPaymentSettingsService",(function(){return o})),n.d(t,"firmPaymentSettingsModule",(function(){return s}));var i=n(1),a=n(2),r=n(0),o=function(){function e(e){this.$http=e,this.BASE_URL=APP.contextPath+"/ws/v3/firms/paymentSettings",this.selector=new Array}return e.$inject=["$http"],e.prototype.save=function(e,t){return void 0===t&&(t=this.BASE_URL),this.$http.post(t,e,{params:{selector:this.selector.join(","),showPleaseWait:!0}}).then((function(e){return e.data}))},e.prototype.get=function(){return this.$http.get(""+this.BASE_URL,{params:{selector:this.selector.join(",")}}).then((function(e){return e.data}))},e.prototype.getForFirm=function(e){return this.$http.get(this.BASE_URL+"/for-firm",{params:{firmId:e,selector:this.selector.join(",")}}).then((function(e){return e.data}))},e.prototype.withFirm=function(){return this.selector.push("firm"),this},e.prototype.withKioskCopayBusinessUnit=function(){return this.selector.push("kioskCopayBusinessUnit"),this},e.prototype.withAutoAccept=function(){return this.selector.push("firmPaymentSettingAutoAcceptBusinessUnits"),this},e.prototype.augmentWithDefaults=function(e){var t=r.defaults(e,{defaultExternalPaymentCode:a.UnallocatedFundsType.UNAVAILABLE,kioskCopayBusinessUnitOption:a.KioskCopayBusinessUnitOption.APPOINTMENT_LOCATION_BU});return t.firm||(t.firm={id:APP.firm.id}),t},e}(),s=i.module("firm-payment-settings.service",[]).service("firmPaymentSettingsService",o).name},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.payerFinancialCategoriesModule=void 0;var i=r(n(1)),a=r(n(13));function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var n=0;n0&&"MEDICARE"===i[0].payerId&&i.shift(),i},e}(),s=i.module("payerLookupServiceModule",[]).service("payerLookupService",o).name},function(e,t,n){"use strict";n.r(t),n.d(t,"AppointmentFinderModal",(function(){return c})),n.d(t,"appointmentFinderModalModule",(function(){return l}));var i=n(0),a=n(1),r=' ',o=(n(29),n(337)),s=function(){function e(e,t,n,i,a,r,o,s,c,l,d){this.$uibModalInstance=e,this.callbackFn=t,this.appointment=n,this.patient=i,this.defaults=a,this.justConfirm=r,this.recall=o,this.withConfirmAndViewAppt=s,this.newApptState=c,this.parentAppt=l,this.childAppt=d}return e.$inject=["$uibModalInstance","callbackFn","appointment","patient","defaults","justConfirm","recall","withConfirmAndViewAppt","newApptState","parentAppt","childAppt"],e.prototype.onDismiss=function(){this.$uibModalInstance.dismiss()},e}(),c=function(){function e(e,t,n){this.EmaModalNg=e,this.AppointmentType=t,this.AppointmentService=n,this.analyticsData={analyticsPage:"/appointmentFinder",description:"Appointment Finder"}}return e.$inject=["EmaModalNg","AppointmentType","AppointmentService"],e.prototype.openExistingApptModal=function(e,t,n){return this.openModal(e,null,t,null,n)},e.prototype.openNewApptWithPatientModal=function(e,t,n){return this.openModal(null,e,null,t,n)},e.prototype.openModal=function(e,t,n,a,o){return this.EmaModalNg.open("Appointment Finder",{size:"lg",resolve:{callbackFn:function(){return n},appointment:["AppointmentServiceV3","AppointmentTransformationService",function(t,n){return i.isNil(e)?null:t.getAppointmentResource(null).get({id:e.id}).$promise}],parentAppt:function(){return i.isNil(e)||i.isNil(e.parentAppointmentLink)?null:e.parentAppointmentLink.parentAppointment},patient:function(){return i.result(e,"patient")||t},defaults:function(){if(e){var t={appointmentType:e.appointmentType,provider:e.provider,facility:e.facility};return o&&i.assign(t,o),t}return o},justConfirm:function(){return i.get(o,"justConfirm",!1)},recall:function(){return null},withConfirmAndViewAppt:function(){return!1},newApptState:function(){return a||".newAppointment"},childAppt:function(){return null}},controller:s,controllerAs:"ctrl",template:r},this.analyticsData)},e.prototype.openModalWithDefaults=function(e,t,n,i){return this.EmaModalNg.open("Appointment Finder",{size:"lg",resolve:{callbackFn:function(){return n},appointment:function(){return null},patient:function(){return e},parentAppt:function(){return null},defaults:function(){return t},justConfirm:function(){return!0},recall:function(){return null},withConfirmAndViewAppt:function(){return i},newApptState:function(){return".newAppointment"},childAppt:function(){return null}},controller:s,controllerAs:"ctrl",template:r},this.analyticsData)},e.prototype.openModalForLinkingAppts=function(e,t,n,a,o){return this.EmaModalNg.open(' Linked Appointment Finder',{size:"lg",resolve:{callbackFn:function(){return n},parentAppt:function(){return!i.isEmpty(o)&&i.get(o,"appointmentType.childAppointmentTypeCount")>0?o:null},appointment:function(){return null},patient:function(){return e},defaults:function(){return t},justConfirm:function(){return!0},recall:function(){return null},withConfirmAndViewAppt:function(){return a},newApptState:function(){return".newAppointment"},childAppt:function(){return!i.isEmpty(o)&&i.get(o,"appointmentType.parentAppointmentTypeCount")>0?o:null}},controller:s,controllerAs:"ctrl",template:r},this.analyticsData).result},e.prototype.openModalWithRecall=function(e,t,n,i){return this.EmaModalNg.open("Appointment Finder",{size:"lg",resolve:{callbackFn:function(){return null},appointment:function(){return null},parentAppt:function(){return null},patient:function(){return e},defaults:function(){return t},justConfirm:function(){return!1},recall:function(){return n},withConfirmAndViewAppt:function(){return!1},newApptState:function(){return".newAppointment"},checkRoutineFootCare:function(){return i},childAppt:function(){return null}},controller:s,controllerAs:"ctrl",template:r},this.analyticsData)},e}(),l=a.module("appointment-finder-modal.service",["ema.staff",o.a]).service("appointmentFinderModal",c).name},function(e,t,n){"use strict";n.r(t),n.d(t,"StaffSpecificationBuilder",(function(){return c}));var i,a=n(26),r=n(408),o=n(2),s=(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.withNameLike=function(e){return t.and(a.RsqlQueryFactory.p("firstName").equals(e+"%").or(a.RsqlQueryFactory.p("lastName").equals(e+"%")))},t}return s(t,e),t.builder=function(e,n){return void 0===e&&(e={}),void 0===n&&(n=a.RsqlQueryFactory.when()),new t(e,n)},t.prototype.withTiers=function(e,t){return void 0===t&&(t=!1),this.and(a.RsqlQueryFactory.fn(t?"strictTiers":"tiers")(e))},t.prototype.withRcmOverride=function(e){return this.and(a.RsqlQueryFactory.p("role").equals("RCM").or(a.RsqlQueryFactory.p("privilege").any(e)))},t.prototype.withRoles=function(e){return this.and(a.RsqlQueryFactory.p("role").any(e))},t.prototype.withFacilityIds=function(e){return this.and(a.RsqlQueryFactory.p("facilityId").any(e))},t.prototype.excludeStaffIds=function(e){return this.and(a.RsqlQueryFactory.p("id").none(e))},t.prototype.includeStaffIds=function(e){return this.and(a.RsqlQueryFactory.p("id").any(e))},t.prototype.withFacilities=function(){return this.and(a.RsqlQueryFactory.p("facilityId").isNull(!1))},t.prototype.worksAtActiveFacilities=function(){return this.and(a.RsqlQueryFactory.p("activeFacilities").equals(!0))},t.prototype.worksAtNonBillingTypeFacilities=function(){return this.and(a.RsqlQueryFactory.p("facilitiesLocationType").notEquals(o.LocationType.BILLING))},t.prototype.withoutRoles=function(e){return this.and(a.RsqlQueryFactory.p("role").none(e))},t.prototype.withRcm=function(){return this.withRoles([o.Role.RCM])},t.prototype.withoutRcm=function(){return this.withoutRoles([o.Role.RCM])},t.prototype.withPrivilege=function(e){return this.and(a.RsqlQueryFactory.p("privilege").equals(e))},t.prototype.withoutAssistAdmin=function(){return this.withoutRoles([o.Role.ASSISTANT_ADMINISTRATOR])},t.prototype.withCalendarEnabled=function(){return this.and(a.RsqlQueryFactory.p("calendarEnabled").equals(!0))},t.prototype.withOrthoTherapist=function(){return this.or(a.RsqlQueryFactory.p("role").any([o.Role.PHYSICAL_THERAPIST,o.Role.OCCUPATIONAL_THERAPIST]).and(a.RsqlQueryFactory.p("visible").equals(!0)).and(a.RsqlQueryFactory.p("accountExpired").equals(!1)))},t.prototype.withRegionIds=function(e){return this.and(a.RsqlQueryFactory.p("regionId").any(e))},t.prototype.searchByNameSpec=function(e){return this.and(a.RsqlQueryFactory.p("name").equals("% "+e+" %").and(a.RsqlQueryFactory.p("visible").equals(!0)))},t.prototype.searchActiveByNameSpec=function(e){return this.searchByNameSpec(e).and(a.RsqlQueryFactory.p("active").equals(!0))},t.prototype.withUniqueId=function(e){return this.and(a.RsqlQueryFactory.p("taskUniqueId").any(e))},t.prototype.withIn=function(e){return this.and(a.RsqlQueryFactory.p("name").any(e))},t}(r.FirmUserSpecificationBuilder)},function(e,t,n){"use strict";(function(e){var i,a;function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}i=[n(1),n(9),n(0)],void 0===(a=function(e,t,n){function i(e){var t=APP.contextPath+"/ws/v3/quick-filters",i=e(t,{},{update:{url:t+"/batch",method:"POST",isArray:!0},getGroups:{url:t+"/groups",method:"GET",isArray:!0}});return{create:function(e,t,n){return i.save({group:e,name:t,value:n})},bulkDelete:function(e){var t={ids:n.map(e,"id")};return i.delete(t)},findByGroup:function(e,t){return i.query({where:"group=="+e,"sorting.sortBy":"name","sorting.sortOrder":"asc","paging.pageSize":t,group:e})},bulkUpdate:function(e){return this.bulkUpdateWithPickValues(e,["id","name"])},bulkUpdateWithPickValues:function(e,t){var a=n.map(e,(function(e){return n.pick(e,t)}));return i.update(a)},getGroups:function(){return i.getGroups()}}}function a(e){var t=function(t,i){var a=this;function r(){a.list.sort((function(e,t){return(e=e.name.toLowerCase())===(t=t.name.toLowerCase())?0:e>t?1:-1}))}function o(e,t){return e.find((function(e){return e.groupName===t}))||{}}this.group=t,a.$promise=e.getGroups().$promise.then((function(r){return a.addLimit=function(e,t){var i=o(e,t);return n.get(i,"addLimit")}(r,t),a.viewLimit=function(e,t){var i=o(e,t);return n.get(i,"viewLimit")}(r,t),a.list=e.findByGroup(t,i||a.viewLimit),a.list.$promise})),this.addToCache=function(n,i){var o=e.create(t,n,i);return a.list.push(o),r(),o.$promise},this.removeFromCache=function(t){return n.remove(a.list,(function(e){return n.some(t,{id:e.id})})),e.bulkDelete(t).$promise},this.updateCache=function(t){return r(),e.bulkUpdate(t).$promise},this.updateCacheAndQfValue=function(t,n){return r(),e.bulkUpdateWithPickValues(t,n).$promise}};return{create:function(e,n){return new t(e,n)}}}function o(e,t){var i,a;function o(e){a&&(a.selected=!1),a=e,e.selected=!0}return{_onSelectHandlers:[],_onDeleteHandlers:[],newFilter:{},createNewFilter:function(e){this.newFilter.name=e},cancelCreate:function(){this.newFilter.name=null},create:function(t){if(this.newFilter.name){!function(e){n.has(e,"payers")&&(e.payers=e.payers.map((function(e){return n.pick(e,n.keys({id:null,payerName:null}))})))}(t);var a=JSON.stringify(t),r=i.addToCache(this.newFilter.name,a);return this.cancelCreate(),r.then((function(e){return o(e),e}))}return e.resolve()},delete:function(t){return 0===t.length?e.resolve([]):(n.each(this._onDeleteHandlers,(function(e){e(t)})),i.removeFromCache(t))},onDelete:function(e){n.isFunction(e)?this._onDeleteHandlers.push(e):console.error("Could not attach Quick Filter handler. Expected function, but got "+r(e))},initialize:function(e,n){return this.cancelCreate(),i&&i.group===e||(i=t.create(e,n)),i.$promise},clearHandlers:function(){this._onSelectHandlers=[],this._onDeleteHandlers=[]},isCreating:function(){return!!this.newFilter.name},onSelect:function(e){n.isFunction(e)?this._onSelectHandlers.push(e):console.error("Could not attach Quick Filter handler. Expected function, but got "+r(e))},select:function(e){try{var t=JSON.parse(e.value);n(this._onSelectHandlers).each((function(n){n(t,e.name)})),o(e)}catch(t){console.error("Could not select Quick Filter. An error occurred parsing the JSON model: "+e.value)}},update:function(t){return 0===t.length?e.resolve([]):i.updateCache(t)},updateAll:function(t){return 0===t.length?e.resolve([]):i.updateCacheAndQfValue(t,["id","name","value"])},getViewLimit:function(){return i.viewLimit},getAddLimit:function(){return i.addLimit},clearSelected:function(){a&&(a.selected=!1,a=null)}}}i.$inject=["$resource"],a.$inject=["quickFilterFactory"],o.$inject=["$q","quickFilterCacheFactory"];var s=e.module("quickFilterServices",[]);return s.factory("quickFilterFactory",i),s.factory("quickFilterCacheFactory",a),s.factory("quickFilterManager",o),s.factory("quickFilterPopoverManager",o),s.name}.apply(t,i))||(e.exports=a)}).call(this,n(14)(e))},function(e,t,n){"use strict";n.r(t),n.d(t,"FacilityResourcesService",(function(){return c})),n.d(t,"FacilityResourceParamsBuilder",(function(){return l})),n.d(t,"FacilityResourceRsqlBuilder",(function(){return d})),n.d(t,"facilityResourcesServiceModule",(function(){return p}));var i=n(1),a=n(0),r=n(4),o=n(63),s=APP.contextPath+"/ws/v3/facility-resource",c=function(){function e(e){this.$http=e}return e.$inject=["$http"],e.prototype.getResources=function(e){return this.$http.get(s,{params:e})},e.prototype.saveResource=function(e,t){return this.$http.post(s,e,{params:a.defaults({},t,{officeFlow:!1})}).then((function(e){return e.data}))},e}(),l=function(){function e(){this.params={}}return e.prototype.withPageNumber=function(e){return this.params["paging.pageNumber"]=e,this},e.prototype.withPageSize=function(e){return this.params["paging.pageSize"]=e,this},e.prototype.withSorting=function(e){return this.params["sorting.sortBy"]=e,this},e.prototype.withSortingOrder=function(e){return this.params["sorting.sortOrder"]=e,this},e.prototype.withSelector=function(e){return this.params.selector=(new o.YogaSelector).and(e).build(),this},e.prototype.withShowPleaseWait=function(){return this.params.showPleaseWait=!0,this},e.prototype.where=function(e){return this.params.where=e,this},e.prototype.build=function(){var e=i.copy(this.params);return this.params={},e},e}(),d=function(){function e(){this.spec=r.RsqlQueryFactory.when()}return e.prototype.withName=function(e){return e&&(this.spec=this.spec.and(r.RsqlQueryFactory.p("name").contains(e))),this},e.prototype.withActive=function(e){return this.spec=this.spec.and(r.RsqlQueryFactory.p("status").equals(e)),this},e.prototype.withResourceIds=function(e){return e&&e.length>0&&(this.spec=this.spec.and(r.RsqlQueryFactory.p("id").any(e))),this},e.prototype.withAppointmentTypeIdsOrAll=function(e){return e&&e.length>0&&(this.spec=this.spec.and(r.RsqlQueryFactory.p("appointmentTypes").any(e).or(r.RsqlQueryFactory.p("appointmentTypes").isNull(!0)))),this},e.prototype.withAppointmentTypeIds=function(e){return e&&e.length>0&&(this.spec=this.spec.and(r.RsqlQueryFactory.p("appointmentTypes").any(e))),this},e.prototype.withProviders=function(e){return e&&e.length>0&&(this.spec=this.spec.and(r.RsqlQueryFactory.p("providers").any(e).or(r.RsqlQueryFactory.p("providers").isNull(!0)))),this},e.prototype.withFacilities=function(e){return e&&e.length>0&&(this.spec=this.spec.and(r.RsqlQueryFactory.p("facilities").any(e).or(r.RsqlQueryFactory.p("facilities").isNull(!0)))),this},e.prototype.build=function(){var e=this.spec.toQuery();return this.spec=r.RsqlQueryFactory.when(),e},e}(),p=i.module("facilityResourcesService",[]).service("facilityResourcesService",c).name},function(e,t,n){"use strict";n.r(t);var i=n(828);n.d(t,"YogaSelector",(function(){return i.a}))},function(e,t,n){"use strict";n.r(t),n.d(t,"EligibilityService",(function(){return M})),n.d(t,"eligibilityServiceModule",(function(){return O}));var i=n(1),a=n.n(i),r=n(0),o=n(6),s=n.n(o),c=(n(10),n(38)),l=n(1276),d=n(882),p=n(5),u=n(7),m=n.n(u),f=function(){function e(e,t){this.$http=e,this.$rootScope=t}return e.$inject=["$http","$rootScope"],e.prototype.acknowledgeDiscrepancies=function(e,t){return this.$http({url:APP.contextPath+"/ws/v3/eligibility/eligibility-history/"+t+"/discrepancy/acknowledge",method:"PUT",params:{ignoreHttpInterceptor:[409]},data:e}).then(r.property("data"))},e.prototype.updateDiscrepancies=function(e,t,n){var i=this;return this.$http({url:APP.contextPath+"/ws/v3/eligibility/eligibility-history/"+t+"/discrepancy/update",method:"PUT",params:{ignoreHttpInterceptor:[409]},data:e}).then(r.property("data")).then((function(){i.$rootScope.$broadcast("eligibilityDiscrepanciesUpdated",n)}))},e.prototype.getDiscrepancies=function(e){return this.$http({url:APP.contextPath+"/ws/v3/eligibility/eligibility-history/"+e+"/discrepancy",params:{selector:"requestValue,responseValue,acknowledgeDatetime,acknowledgeUser,updateDatetime,updateUser"},method:"GET"}).then(r.property("data"))},e}(),b=i.module("eligibilityDiscrepancyService.module",[]).service("eligibilityDiscrepancyService",f).name,A={template:'
{{ $ctrl.disclaimer }}
{{ $ctrl.preventUpdatingDisclaimerLine1 }}
{{ $ctrl.preventUpdatingDisclaimerLine2 }}
Discrepancy Field mmPM {{$ctrl.payerName}} Resolution Status
{{$ctrl.enums.discrepancyType[discrepancy.discrepancyType].description}} {{discrepancy.requestValue}} {{discrepancy.responseValue}} {{discrepancy.resolutionStatus | orDash}}
',controller:function(){function e(e,t,n,i,a){var r,o;this.EnumService=e,this.$scope=t,this.$rootScope=n,this.EmaModalServices=i,this.eligibilityDiscrepancyService=a,this.allDiscrepanciesIds=[],this.selectedDiscrepanciesIds=[],this.checkedDiscrepancies={},this.allChecked=!1,this.selectCount=0,this.hasRelationshipDiscrepancy=!1,this.updating=!1,this.isEligibilityDiscrepancyAcknowledgeAndUpdateEnabled=null===(r=APP.mavFeatureFlags)||void 0===r?void 0:r.isEligibilityDiscrepancyAcknowledgeAndUpdateEnabled,this.isEligibilityDiscrepanciesPatientFieldDisclaimerFixEnabled=null===(o=null===APP||void 0===APP?void 0:APP.mavFeatureFlags)||void 0===o?void 0:o.isEligibilityDiscrepanciesPatientFieldDisclaimerFixEnabled,this.newlyUpdatedDiscrepancies=[],this.demographicDiscrepancies=Array.of(p.EligibilityDiscrepancyType.PATIENT_NAME,p.EligibilityDiscrepancyType.PATIENT_DOB,p.EligibilityDiscrepancyType.PATIENT_SEX,p.EligibilityDiscrepancyType.PATIENT_ADDR_STREET,p.EligibilityDiscrepancyType.PATIENT_ADDR_CITY_STATE_ZIP),this.insuranceDiscrepancies=Array.of(p.EligibilityDiscrepancyType.POLICY_NUMBER,p.EligibilityDiscrepancyType.GROUP_NUMBER),this.patientAndPolicyHolderTypes=new Set([p.EligibilityDiscrepancyType.RELATIONSHIP_TO_POLICY_HOLDER,p.EligibilityDiscrepancyType.PATIENT_NAME,p.EligibilityDiscrepancyType.PATIENT_ADDR_STREET,p.EligibilityDiscrepancyType.PATIENT_ADDR_CITY_STATE_ZIP,p.EligibilityDiscrepancyType.PATIENT_DOB,p.EligibilityDiscrepancyType.PATIENT_SEX,p.EligibilityDiscrepancyType.POLICY_HOLDER_NAME,p.EligibilityDiscrepancyType.POLICY_HOLDER_ADDR_STREET,p.EligibilityDiscrepancyType.POLICY_HOLDER_ADDR_CITY_STATE_ZIP,p.EligibilityDiscrepancyType.POLICY_HOLDER_DOB,p.EligibilityDiscrepancyType.POLICY_HOLDER_SEX]),this.typeSortOrder=new Map([[p.EligibilityDiscrepancyType.POLICY_NUMBER,1],[p.EligibilityDiscrepancyType.GROUP_NUMBER,2],[p.EligibilityDiscrepancyType.RELATIONSHIP_TO_POLICY_HOLDER,3],[p.EligibilityDiscrepancyType.POLICY_HOLDER_NAME,4],[p.EligibilityDiscrepancyType.POLICY_HOLDER_DOB,5],[p.EligibilityDiscrepancyType.POLICY_HOLDER_SEX,6],[p.EligibilityDiscrepancyType.POLICY_HOLDER_ADDR_STREET,7],[p.EligibilityDiscrepancyType.POLICY_HOLDER_ADDR_CITY_STATE_ZIP,8],[p.EligibilityDiscrepancyType.PATIENT_NAME,9],[p.EligibilityDiscrepancyType.PATIENT_DOB,10],[p.EligibilityDiscrepancyType.PATIENT_SEX,11],[p.EligibilityDiscrepancyType.PATIENT_ADDR_STREET,12],[p.EligibilityDiscrepancyType.PATIENT_ADDR_CITY_STATE_ZIP,13]]),this.preventUpdating=!1,this.preventUpdatingDisclaimerLine1="For this eligibility request please either (1) re-run the eligibility request or (2) manually enter any appropriate discrepancy updates.",this.preventUpdatingDisclaimerLine2='Use of the "Update Discrepancies" button from this eligibility request, may result in incorrect demographics updates.'}return e.$inject=["EnumService","$scope","$rootScope","EmaModalServices","eligibilityDiscrepancyService"],e.prototype.$onInit=function(){var e=this;this.isLatestEligibility=this.eligibilityHistory.id===this.eligibilityHistory.insurancePolicy.latestEligibilityHistory.id,this.enums={},this.isEligibilityDiscrepanciesPatientFieldDisclaimerFixEnabled?this.disclaimer="Demographic discrepancies are recommended to be verified with the patient.":this.disclaimer="Demographic discrepancies are recommended to be verified with the patient prior to selecting the option to Update.",this.EnumService.load({enums:{discrepancyType:"com.m2.mav.edi.eligibility.enums.EligibilityDiscrepancyType",discrepancySubfieldType:"com.m2.mav.edi.eligibility.enums.EligibilityDiscrepancySubfieldType"},indexed:!0}).then((function(t){e.enums=t})),this.$scope.$watch("$ctrl.eligibilityHistory",(function(){var t,n,i,a,r;(null===(n=null===(t=e.eligibilityHistory)||void 0===t?void 0:t.insurancePolicy)||void 0===n?void 0:n.payer)?e.payerName=e.eligibilityHistory.insurancePolicy.payer.payerName:e.payerName=null===(a=null===(i=e.eligibilityHistory)||void 0===i?void 0:i.insurancePolicy)||void 0===a?void 0:a.insuranceCompanyName,(null===(r=e.eligibilityHistory)||void 0===r?void 0:r.discrepancies)&&e.transformIntoPendingDiscrepancies(),e.checkIfNeedToPreventUpdating()}))},e.prototype.checkIfNeedToPreventUpdating=function(){var e,t,n,i,a,r,o,s,c,l;if((this.preventUpdating=!1,this.pendingDiscrepancies&&this.isLatestEligibility)&&(!this.pendingDiscrepancies.some((function(e){return!e.updateDatetime&&e.discrepancyType===p.EligibilityDiscrepancyType.RELATIONSHIP_TO_POLICY_HOLDER}))&&!this.eligibilityHistory.dependent&&this.pendingDiscrepancies.some((function(e){return!e.updateDatetime&&(e.discrepancyType===p.EligibilityDiscrepancyType.POLICY_HOLDER_DOB||e.discrepancyType===p.EligibilityDiscrepancyType.POLICY_HOLDER_SEX)})))){var d=JSON.parse(this.eligibilityHistory.eligibilityResponse),u=null===(a=null===(i=null===(n=null===(t=null===(e=null==d?void 0:d.subscribers)||void 0===e?void 0:e[0])||void 0===t?void 0:t.nameLoop)||void 0===n?void 0:n.relationship)||void 0===i?void 0:i.relationshipCode)||void 0===a?void 0:a.code,m=null===(l=null===(c=null===(s=null===(o=null===(r=null==d?void 0:d.dependents)||void 0===r?void 0:r[0])||void 0===o?void 0:o.nameLoop)||void 0===s?void 0:s.relationship)||void 0===c?void 0:c.relationshipCode)||void 0===l?void 0:l.code,f=!!u&&!!m;this.preventUpdating=f}},e.prototype.transformIntoPendingDiscrepancies=function(){var e=this;this.pendingDiscrepancies=this.eligibilityHistory.discrepancies.filter((function(e){return!e.eligibilityDiscrepancySubfieldType})).sort((function(t,n){var i,a,r=null!==(i=e.typeSortOrder.get(t.eligibilityDiscrepancyType))&&void 0!==i?i:0,o=null!==(a=e.typeSortOrder.get(n.eligibilityDiscrepancyType))&&void 0!==a?a:0;return r>o?1:r===o?0:-1})).map((function(t){return e.toPendingDiscrepancy(t)})),this.pendingDiscrepancies.forEach((function(t){t.discrepancyType===p.EligibilityDiscrepancyType.RELATIONSHIP_TO_POLICY_HOLDER&&(e.hasRelationshipDiscrepancy=!0),e.allDiscrepanciesIds.push(t.discrepancyId)})),this.onSelectionChanged()},e.prototype.toPendingDiscrepancy=function(e){return{discrepancyId:e.id,discrepancyType:e.eligibilityDiscrepancyType,discrepancySubfieldType:e.eligibilityDiscrepancySubfieldType,requestValue:e.requestValue,responseValue:e.responseValue,acknowledgeDatetime:e.acknowledgeDatetime,acknowledgeUser:e.acknowledgeUser,updateDatetime:e.updateDatetime,updateUser:e.updateUser,resolutionStatus:this.getResolutionStatus(e)}},e.prototype.acknowledgeWithoutChanges=function(){var e=this;return this.updating=!0,this.eligibilityDiscrepancyService.acknowledgeDiscrepancies(this.selectedDiscrepanciesIds,this.eligibilityHistory.id).catch((function(){e.showDiscrepancyUpdateError()})).finally((function(){return e.refreshDiscrepancies()}))},e.prototype.updateDiscrepancies=function(){var e=this;this.updating=!0;var t=new Set(this.selectedDiscrepanciesIds),n=this.pendingDiscrepancies.filter((function(e){return t.has(e.discrepancyId)}));return this.eligibilityDiscrepancyService.updateDiscrepancies(this.selectedDiscrepanciesIds,this.eligibilityHistory.id,n).catch((function(){e.showDiscrepancyUpdateError()})).finally((function(){return n.forEach((function(t){return e.newlyUpdatedDiscrepancies.push(t)})),e.refreshDiscrepancies()}))},e.prototype.getResolutionStatus=function(e){return e.acknowledgeDatetime&&e.acknowledgeUser?"Acknowledged":e.updateDatetime&&e.updateUser?"Updated":""},e.prototype.onCheckboxClick=function(e,t){var n=e.currentTarget;if(this.checkedDiscrepancies[t]=n.checked,"null"!==n.id&&n.checked)this.selectedDiscrepanciesIds.push(t);else{var i=this.selectedDiscrepanciesIds.indexOf(t);this.selectedDiscrepanciesIds.splice(i,1)}this.onSelectionChanged()},e.prototype.onToggleCheckAll=function(e){if(e.currentTarget.checked){for(var t=0;t0&&this.selectCount===this.allDiscrepanciesIds.length-this.getUpdatedDiscrepancies().length},e.prototype.getSelectedDiscrepanciesIds=function(){var e=this;return Object.keys(this.checkedDiscrepancies).filter((function(t){return e.checkedDiscrepancies[t]})).map((function(e){return parseInt(e,10)}))},e.prototype.clearSelection=function(){var e=this;Object.keys(this.checkedDiscrepancies).forEach((function(t){return e.checkedDiscrepancies[t]=!1}))},e.prototype.showDemographicDiscrepancyDisclaimer=function(){var e=this;return this.pendingDiscrepancies.filter((function(t){var n=t.discrepancyId;return e.selectedDiscrepanciesIds.includes(n)})).some((function(t){return e.demographicDiscrepancies.includes(t.discrepancyType)}))},e.prototype.alreadyUpdated=function(e){return null!=(null==e?void 0:e.acknowledgeUser)||null!=(null==e?void 0:e.updateUser)},e.prototype.allDiscrepanciesAreUpdated=function(){var e=this;return this.pendingDiscrepancies.every((function(t){return e.alreadyUpdated(t)||!e.allowUpdate(t)}))},e.prototype.allowUpdate=function(e){return!(this.hasRelationshipDiscrepancy&&this.patientAndPolicyHolderTypes.has(e.discrepancyType))},e.prototype.getUpdatedDiscrepancies=function(){var e=this;return this.pendingDiscrepancies.filter((function(t){return e.alreadyUpdated(t)}))},e.prototype.getStatusMessage=function(e){var t,n,i,a;return"Acknowledged"===e.resolutionStatus?"Acknowledged on "+this.formatDate(e.acknowledgeDatetime)+" \n by "+(null===(t=e.acknowledgeUser)||void 0===t?void 0:t.lastName)+", "+(null===(n=e.acknowledgeUser)||void 0===n?void 0:n.firstName)+" ":"Updated"===e.resolutionStatus?"Updated on "+this.formatDate(e.updateDatetime)+" \n by "+(null===(i=e.updateUser)||void 0===i?void 0:i.lastName)+", "+(null===(a=e.updateUser)||void 0===a?void 0:a.firstName):""},e.prototype.formatDate=function(e){return m.a.tz(e,APP.loggedInUserTimezone).format("MM/DD/YYYY hh:mm A")},e.prototype.showDiscrepancyUpdateError=function(){this.isLatestEligibility=!1,this.EmaModalServices.openNotificationErrorModal({forceNext:!0,title:"Discrepancy Error",notifications:["Could not update discrepancies because this is not the latest Eligibility Response.","Please refresh the page and view the latest Eligibility Response."],cancelButton:!1,primaryButton:{text:"OK",value:!0}})},e.prototype.refreshDiscrepancies=function(){var e=this;return this.eligibilityDiscrepancyService.getDiscrepancies(this.eligibilityHistory.id).then((function(t){e.eligibilityHistory.discrepancies=t,e.allDiscrepanciesIds=[],e.checkedDiscrepancies={},e.selectedDiscrepanciesIds=[],e.transformIntoPendingDiscrepancies(),e.$rootScope.$broadcast("updatedDiscrepancies",{areAllDiscrepanciesUpdated:e.pendingDiscrepancies.every((function(t){return e.alreadyUpdated(t)}))}),e.$rootScope.$broadcast("insurance.changed",{areInsuranceDiscrepanciesUpdated:e.getUpdatedDiscrepancies().some((function(t){return e.insuranceDiscrepancies.includes(t.discrepancyType)}))});var n=e.getNewPatientSexValue(e.getUpdatedDiscrepancies(),e.eligibilityHistory.insurancePolicy);n&&e.$rootScope.$broadcast("patientSex.changedValue",{patientSexDiscrepancyUpdatedValue:n}),e.updating=!1}))},e.prototype.getNewPatientSexValue=function(e,t){var n=this.patientSexDiscrepancyType(t),i=e.filter((function(e){return n===e.discrepancyType}));return i.length>0?i[0].responseValue.toUpperCase():null},e.prototype.patientSexDiscrepancyType=function(e){return e.patientRelationshipToPolicyHolder===p.InsuredRelationship.SELF?p.EligibilityDiscrepancyType.POLICY_HOLDER_SEX:p.EligibilityDiscrepancyType.PATIENT_SEX},e}(),bindings:{eligibilityHistory:"<"}},h=a.a.module("eligibilityDiscrepanciesModule",["ema.uiUtils",d.a,b]).component("eligibilityDiscrepancies",A).name,M=function(){function e(e,t,n,a,r,o){this.$http=e,this.$resource=t,this.$q=n,this.$filter=a,this.EmaModalNg=r,this.EventService=o,this.EligibilityResource=this.$resource(APP.contextPath+"/ws/v2/eligibility",{ignoreHttpInterceptor:[400,502]},{updateEligibilityForPolicy:{url:APP.contextPath+"/ws/v2/eligibility/insurancePolicy/:insurancePolicyId",params:{insurancePolicyId:"@insurancePolicyId",taxpayerId:"@taxpayerId",mapId:"@mapId"},method:"POST",interceptor:{response:this.EventService.getResourceResponseInterceptor("insurance","createOrUpdate")}}}),this.ebWarningCodes=["R","U"],this.getEligibilityHistoryStatus=function(e){var t="No Response";return i.isDefined(e.responseReceivedTime)&&(t=i.isDefined(e.activeCoverage)?e.activeCoverage?"Active":"Inactive":"Failed"),t}}return e.$inject=["$http","$resource","$q","$filter","EmaModalNg","EventService"],e.prototype.updateEligibilityForPolicy=function(e,t,n){var a=this;if(!e.id)throw new Error("Must save policy before checking eligibility.");if(!e.payerId||!e.policyNumber)throw new Error("Payer ID, Policy Number, and patientId are required to check eligibility.");return this.EligibilityResource.updateEligibilityForPolicy({insurancePolicyId:e.id,taxpayerId:t.id,mapId:"SHALLOW"}).$promise.then((function(t){i.extend(e,t),t.eligibilityActive||(e.eligibilityActive=void 0)}),(function(e){return 502===e.status&&n(e.data),a.$q.reject()}))},e.prototype.getLatestEligiblityForPolicy=function(e){return this.$http({url:APP.contextPath+"/ws/v2/eligibility/insurancePolicy/"+e,method:"GET"}).then(r.property("data"))},e.prototype.getValidEligibilityHistoryResponseFromPolicy=function(e){return r.get(e,"latestEligibilityHistory.eligibilityResponse")},e.prototype.getValidEligibilityHistoryFromPolicy=function(e){return r.get(e,"latestEligibilityHistory")},e.prototype.getErrorMessage=function(e){return r.result(e,"systemErrorMessage")?e.eligibilityResponse?"The patient policy number is inaccurate, however the payer provided details on the policy. Please update the policy number; doing so will clear the eligibility values.":"There was an issue connecting with the clearinghouse for the eligibility request on "+this.$filter("date")(e.requestSentTime,"short")+". Please try again in a few moments. If the problem persists, contact Modernizing Medicine support.":r.result(e,"vendorErrorMessage")?"Unable to process request. Please try again. If the problem persists, contact Modernizing Medicine support.":r.result(e,"eligibilityResponse.allValidations.length")?"Unable to process request. See the Full Eligibility Response for details. If adjusted requests fail, contact Modernizing Medicine support.":void 0},e.prototype.checkEligibility=function(e){return this.$http({url:APP.contextPath+"/ws/v2/eligibility/check",method:"POST",data:e}).then(r.property("data"))},e.prototype.checkEligibilityStatus=function(e){return this.$http({url:APP.contextPath+"/ws/v2/eligibility/check/status/"+e,method:"GET"}).then(r.property("data"))},e.prototype.submitBatchEligibilityRequests=function(e,t){return this.$http({url:APP.contextPath+"/ws/v2/eligibility/batch/submit",params:{taxpayerId:e},method:"POST",data:t||[]}).then(r.property("data"))},e.prototype.checkPendingInsuranceEligibility=function(e){return this.$http({url:APP.contextPath+"/ws/v2/eligibility/check-pending-insurance",method:"POST",params:{showPleaseWait:!0},data:e}).then(r.property("data"))},e.prototype.getPendingEligibility=function(e){return this.$http({url:APP.contextPath+"/ws/v2/eligibility/pending",params:{id:e},method:"GET"}).then(r.property("data"))},e.prototype.checkForBatchEligibilityResponses=function(e){return this.$http({url:APP.contextPath+"/ws/v2/eligibility/batch/checkResponses",params:{taxpayerId:e},method:"POST"}).then(r.property("data"))},e.prototype.openFullEligibilityInfoModal=function(e){if(r.result(e,"eligibilityResponse"))return this.EmaModalNg.open("Full Eligibility Information",{template:n(906),windowClass:"modal-dark modal-snug",size:"lg",controller:"EligibilityInfoController as ctrl",resolve:{eligibilityHistory:function(){return e}}})},e.prototype.openEligibilityResponse=function(e,t,i){if(e){var a="Eligibility Response (Received: "+this.formatDateString(e.responseReceivedTime)+")";return this.EmaModalNg.open(a,{template:n(1665),windowClass:"modal-dark modal-snug",size:"xlg",controller:"EligibilityResponseController as ctrl",resolve:{eligibilityHistory:function(){return e},status:function(){return t},selectedTab:function(){return i}}})}},e.prototype.openFullEligibilityInfoModalById=function(e){var t=this;return this.EmaModalNg.open("Full Eligibility Information",{template:n(906),windowClass:"modal-dark modal-snug",size:"lg",controller:"EligibilityInfoController as ctrl",resolve:{eligibilityHistory:function(){return t.getLatestEligiblityForPolicy(e)}}})},e.prototype.getEligibilityOrBenefitWarningIndex=function(e){var t=r.get(e,"benefit.serviceTypeCodes"),n=r.some(t,{code:"30"})||r.some(t,{code:"1"}),i=r.indexOf(this.ebWarningCodes,r.get(e,"benefit.eligibilityOrBenefitInformation.code"));return n&&i>=0?i:-1},e.prototype.getEligibilityAndBenefitsForWarning=function(e){return r.filter(e,this.eligibilityOrBenefitHasWarningCode)},e.prototype.getEligibilityOrBenefitOrderByFn=function(e){var t=this;return function(n,i){return t.getEligibilityOrBenefitCompareValue(e,n)-t.getEligibilityOrBenefitCompareValue(e,i)}},e.prototype.getEligibilityOrBenefitCompareValue=function(e,t){var n=this.getEligibilityOrBenefitWarningIndex(t);return n>=0?n:e.length},e.prototype.eligibilityOrBenefitHasWarningCode=function(e){return this.getEligibilityOrBenefitWarningIndex(e)>=0},e.prototype.getSecondaryMedicalEnumFromCode=function(e){switch(r.get(e,"eligibilityResponse.subscribers[0].benefits[0].benefit.insuranceTypeCode.code")){case"12":return"WORKING_AGED";case"13":return"END_STAGE_RENAL_DISEASE";case"14":return"AUTOMOBILE_NO_FAULT";case"15":return"WORKERS_COMPENSATION";case"16":return"FEDERAL";case"41":return"BLACK_LUNG";case"42":return"VA";case"43":return"DISABLED_LGHP";case"47":return"LIABILITY";default:return null}},e.prototype.formatDateString=function(e){return s.a.utc(e,"YYYYMMDD").format("MM/DD/YYYY")},e}(),O=i.module("eligibility.service.module",["ema.modal",c.emaEventsModule,"eligibilityControllers","eligibilityDirectives",l.eligibilityDetailedOverviewModule,h]).service("eligibilityService",M).name},function(e,t,n){"use strict";n.r(t),n.d(t,"COUNTRY_USA",(function(){return i})),n.d(t,"COUNTRY_USA_ALIASES",(function(){return a})),n.d(t,"TIMEZONE_EST",(function(){return r})),n.d(t,"SECONDS_IN_MINUTE",(function(){return o})),n.d(t,"DATES",(function(){return s})),n.d(t,"ENUMS",(function(){return c}));var i="United_States_of_America",a=["United_States_of_America","United States of America","USA"],r="US/Eastern",o=60,s={NO_OFFSET:"YYYY-MM-DDTHH:mm:00+0000",SHORT_DATE:"MM/DD/YYYY",MEDIUM_DATE:"MMM D, YYYY",SHORT_TIME:"h:mm a",XML_DATE:"YYYY-MM-DD"},c={APPOINTMENT_CANCELLATION_REASON:"com.m2.mav.domain.enums.AppointmentCancellationReason",APPOINTMENT_REMINDER_CONFIRMATION_STATUS:"com.m2.mav.appointment.enums.AppointmentReminderConfirmationStatus",APPOINTMENT_REMINDER_CONTACT_TYPE:"com.m2.mav.appointment.enums.AppointmentReminderContactType",APPOINTMENT_REMINDER_RESPONSE_TYPE:"com.m2.mav.appointment.enums.AppointmentReminderResponseType",APPOINTMENT_STATUS:"com.m2.mav.domain.enums.AppointmentStatus",CLAIM_FORMAT_TYPE:"com.m2.mav.domain.enums.ClaimFormatType",CLAIM_SUBMISSION_TYPE:"com.m2.mav.domain.enums.ClaimSubmissionType",CLAIM_STATUS:"com.m2.mav.domain.enums.ClaimStatus",INSURANCE_ELIGIBILITY_STATUS:"com.m2.mav.eligibility.enums.InsuranceEligibilityStatus",INSURED_RELATIONSHIP:"com.m2.domain.enums.InsuredRelationship",MAV_INSURANCE_POLICY_TYPE:"com.m2.domain.enums.MavInsurancePolicyType",MEDICAL_SUBDOMAIN:"com.m2.domain.enums.MedicalSubdomain",PAYMENT_METHOD:"com.m2.mav.domain.enums.PaymentMethod",PM_NOTE_TYPE:"com.m2.mav.note.enums.PmNoteType",POSTING_STATUS:"com.modmed.common.financial.enums.PostingStatus",RECALL_STATUS:"com.m2.domain.enums.RecallStatus",COMMONWELL_PROXY_RELATIONSHIP:"com.modmed.commonwell.data.enums.Relationship",COMMONWELL_ENROLLMENT_STATUS:"com.modmed.commonwell.enums.CommonWellEnrollmentStatus",DIRECT_MAIL_FILE_FORMAT:"com.m2.domain.enums.DirectMailFileFormat",ASSIGNABLE_TASK_STATE:"com.m2.domain.enums.tasking.AssignableTaskState",TASK_PRIORITY:"com.m2.domain.enums.tasking.TaskPriority",TASK_TYPE:"com.m2.domain.enums.tasking.TaskType",TASK_DESCRIPTION:"com.m2.domain.enums.tasking.TaskDescription",CALL_BUTTON_PRIORITY:"com.modmed.callbuttons.enums.CallButtonPriority",COMMISSIONS_CRITERIA_SEARCH_TYPE:"com.modmed.pm.commission.impl.CommissionsCriteriaSearchType",RECALL_ACTIVITY_TYPE:"com.m2.domain.enums.RecallActivityType"}},function(e,t,n){"use strict";n.d(t,"k",(function(){return ie})),n.d(t,"h",(function(){return ae})),n.d(t,"o",(function(){return re})),n.d(t,"m",(function(){return oe})),n.d(t,"p",(function(){return se})),n.d(t,"n",(function(){return ce})),n.d(t,"l",(function(){return le})),n.d(t,"g",(function(){return de})),n.d(t,"j",(function(){return pe})),n.d(t,"i",(function(){return ue})),n.d(t,"b",(function(){return me})),n.d(t,"c",(function(){return Me})),n.d(t,"a",(function(){return ye})),n.d(t,"e",(function(){return ge})),n.d(t,"f",(function(){return Ee})),n.d(t,"d",(function(){return ve}));var i=n(388),a=Object.create,r=function(){function e(){}return function(t){if(!Object(i.a)(t))return{};if(a)return a(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var o=function(){};function s(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}s.prototype=r(o.prototype),s.prototype.constructor=s;var c=s,l=n(855),d=n(280),p=n(511),u=n(115),m=d.a?d.a.isConcatSpreadable:void 0;var f=function(e){return Object(u.a)(e)||Object(p.a)(e)||!!(m&&e&&e[m])};var b=function e(t,n,i,a,r){var o=-1,s=t.length;for(i||(i=f),r||(r=[]);++o0&&i(c)?n>1?e(c,n-1,i,a,r):Object(l.a)(r,c):a||(r[r.length]=c)}return r};var A=function(e){return(null==e?0:e.length)?b(e,1):[]};var h=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},M=Math.max;var O=function(e,t,n){return t=M(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,r=M(i.length-t,0),o=Array(r);++a0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(v);var I=function(e){return _(O(e,void 0,A),e+"")},S=n(632),P=S.a&&new S.a;var R=P?function(e){return P.get(e)}:function(){},C={},N=Object.prototype.hasOwnProperty;var z=function(e){for(var t=e.name+"",n=C[t],i=N.call(C,t)?n.length:0;i--;){var a=n[i],r=a.func;if(null==r||r==e)return a.name}return t};function L(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}L.prototype=r(o.prototype),L.prototype.constructor=L;var D=L,q=n(317);var F=function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n")},e.prototype.lessThan=function(e){return this.compare(new fe(e),"<")},e.prototype.greaterEqualThan=function(e){return this.compare(new fe(e),">=")},e.prototype.lessEqualThan=function(e){return this.compare(new fe(e),"<=")},e.prototype.isNull=function(e){return this.compare(new fe(e),"=null=")},e.prototype.any=function(e){return this.compare(new Ae(e),"=in=")},e.prototype.none=function(e){return this.compare(new Ae(e),"=out=")},e.prototype.compare=function(e,t){return new Me(this.property,t,e)},e}(),fe=function(){function e(e){this.value=e}return e.prototype.isEmpty=function(){return!1},e.prototype.toParameter=function(){return pe(String(this.value))},e}(),be=function(e){function t(t){return e.call(this,t)||this}return ne(t,e),t.prototype.toParameter=function(){return pe(JSON.stringify(this.value))},t}(fe),Ae=function(e){function t(t){return e.call(this,t||[])||this}return ne(t,e),t.prototype.isEmpty=function(){return J(this.value)},t.prototype.toParameter=function(){return"("+this.value.map(pe).join(",")+")"},t}(fe),he=function(){function e(){}return e.prototype.and=function(e,t){return void 0===t&&(t=function(){return!0}),this.buildConditional(Q.and,e,t)},e.prototype.or=function(e,t){return void 0===t&&(t=function(){return!0}),this.buildConditional(Q.or,e,t)},e.prototype.toQuery=function(){return""},e.prototype.buildConditional=function(e,t,n){return void 0===n&&(n=function(){return!0}),!n||n()?new Oe(e,this,t):this},e}(),Me=function(e){function t(t,n,i){var a=e.call(this)||this;return a.property=t,a.comparison=n,a.value=i,a}return ne(t,e),t.prototype.toQuery=function(){return this.value.isEmpty()?"":""+this.property+this.comparison+this.value.toParameter()},t}(he);!function(e){e[e.and=0]="and",e[e.or=1]="or"}(Q||(Q={}));var Oe=function(e){function t(t){for(var n=[],i=1;i")},e.prototype.getGuarantorNameFormatted=function(){var e,t;return this.guarantor&&this.guarantor.relationToPatient!==s.InsuredRelationship.SELF?(null===(e=this.guarantor)||void 0===e?void 0:e.lastName)+", "+(null===(t=this.guarantor)||void 0===t?void 0:t.firstName):"Self"},e.prototype.getGuarantorRelationToPatient=function(e){switch(null==e?void 0:e.relationToPatient){case s.InsuredRelationship.CHILD:return"Child";case s.InsuredRelationship.EMPLOYER:return"Employer";case s.InsuredRelationship.OTHER:return"Other";case s.InsuredRelationship.SPOUSE:return"Spouse"}return""},e.prototype.openEncounterForm=function(){var e,t=a.result(this.patient,"encryptedId"),n=a.result(null===(e=this.pastAppt)||void 0===e?void 0:e.visit,"encryptedId");t&&n&&this.$window.open(this.emaVisitEncounterFormUrl.get(t,n),"_blank")},e.prototype.getApptTooltip=function(e){var t,n,i;return e?e.appointmentType.name+": "+this.formatDateForApptLocationFilter(e.scheduledStartDate,"h:mm a",e)+"
\n Provider: "+(null===(t=e.provider)||void 0===t?void 0:t.lastName)+", "+(null===(n=null==e?void 0:e.provider)||void 0===n?void 0:n.firstName)+"
\n Location: "+(null===(i=null==e?void 0:e.facility)||void 0===i?void 0:i.name):""},e.prototype.getPatientOverappliedAmount=function(){var e,t;return(null===(e=this.ledgerOverview)||void 0===e?void 0:e.patientOverappliedAmount)<0?-(null===(t=this.ledgerOverview)||void 0===t?void 0:t.patientOverappliedAmount):0},e.prototype.openBusinessUnitBalanceModel=function(){var e=this;this.isBusinessUnitsTotalsBannerEnabled?(this.modalTitle="Business Units' Totals: "+this.taxpayerIdFilter.title,this.modalWidth=1200):(this.modalTitle="Business Units' Balances",this.modalWidth=900),this.businessUnitBalanceModal.openModal(this.patient,this.taxpayerIdFilter,this.businessUnitIds,this.modalTitle,this.modalWidth).result.then((function(t){"saved"===t&&e.$uibModalStack.dismissAll("cancel")}))},e.prototype.isBusinessUnitBalanceEnabled=function(){return!(!this.userPrivilegeUtils.hasPatientFinancialsPrivilege()||this.hasSingleBusinessUnit)},e.prototype.initializeTaxpayerDetails=function(){var e=this;this.isBusinessUnitBalanceEnabled()&&!this.hideHyperlink&&this.isBusinessUnitsTotalsBannerEnabled&&this.$q.all({selectedBusinessUnit:this.getTaxpayerIdentificationNumber(),businessUnitIds:this.getBusinessUnitIds()}).then((function(){e.hasModalDataLoaded=!0,e.patientBalancesService.getPatientFinancialsHeaderBannerType(e.patient.id,e.selectedBusinessUnit.id).then((function(t){return e.initializeAlertBannerData(t)}))}))},e.prototype.getTaxpayerIdentificationNumber=function(){var e=this;return this.TaxpayerIdentification.getTaxpayerIdFilter({mapId:"SHALLOW_WITH_TIMEZONE"}).$promise.then((function(t){e.selectedBusinessUnit=t}))},e.prototype.getBusinessUnitIds=function(){var e=this;return this.TaxpayerIdentification.forStaff({mapId:"FACILITIES"}).$promise.then((function(t){e.businessUnitIds=a.map(t,"id")}))},e.prototype.initializeAlertBannerData=function(e){switch(this.bannerType={alertType:"",text:""},e.alertBannerType){case s.AlertBannerType.TIER_2:this.bannerType.alertType="tier2";break;case s.AlertBannerType.ATTENTION:this.bannerType.alertType="attention";break;case s.AlertBannerType.TIER_3:this.bannerType.alertType="tier3"}this.bannerType.text=e.message},e}(),bindings:{patient:"<",ledgerOverview:"<",hideHyperlink:"<",referenceTotal:"
DOB: MRN:
Guarantor: {{$ctrl.getGuarantorNameFormatted(statement)}} ({{$ctrl.getGuarantorRelationToPatient($ctrl.guarantor)}}) Appt. History: Last Appt.- {{$ctrl.pastAppt.scheduledStartDate | formatDateForApptLocation:\'MM/D/YYYY\':$ctrl.pastAppt}} Next Appt.-
Patient Balance:
Patient Overapplied:
Adjustments Collections:
Insurance Balance:
Patient Unallocated:
Adjustments Bad Debt:
Total Charge:
'},f=i.module("patientFinancialsModalSubheaderNew",["appointmentHistoryDirectives",o.a,c.appointmentQueryServiceModule,l.taxpayerIdentificationResourceModule,d.patientBalancesService]).component("patientFinancialsModalSubheaderNew",m).name},function(e,t,n){"use strict";n.r(t),n.d(t,"BillSearchService",(function(){return l})),n.d(t,"billSearchServiceModule",(function(){return d}));var i=n(1),a=n(0),r=n(25),o=n(616),s=function(){return(s=Object.assign||function(e){for(var t,n=1,i=arguments.length;n299?t.error(r.statusCode):i.hasNext()?n.emitRestCall(e,t,i,a):t.complete()}))},this.preppingConfig=function(e){return r.has(e,"params")||(e.params={}),e},this.mapToPage=function(e,t){return{data:e.data,count:Number(e.headers().count),statusCode:e.status,pageNumber:t}},this.mutateConfig=function(e,t,n,i){return e.params["paging.pageNumber"]=t,e.params["paging.pageSize"]=n,r.isNil(i)||(e.params["paging.count"]=i),e}}return e.$inject=["$http","$q"],e.prototype.getByPage=function(e,t){var n=this;void 0===t&&(t={});var i=this.preppingConfig(t),r=new o((function(t,a,r){var o=n.mutateConfig(i,t,a,r);return(o.data?n.$http.post(e,o.data,o):n.$http.get(e,o)).then((function(e){return n.mapToPage(e,t)}))}),i.params["paging.pageSize"],i.params["paging.count"]);return new a.Observable((function(t){n.emitRestCall(e,t,r,i)}))},e.prototype.get=function(e,t){var n=this.$q.defer(),i=new Array;return this.getByPage(e,t).subscribe((function(e){e.data.forEach((function(e){return i.push(e)}))}),(function(e){return n.reject(e)}),(function(){return n.resolve(i)})),n.promise},e}(),c=i.module("batchHttp.service",[]).service("batchHttpService",s).name},function(e,t,n){e.exports=n(11)(585)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.billServicesModule=t.moduleName=void 0;var i=V(n(1)),a=V(n(3)),r=V(n(6)),o=V(n(8)),s=V(n(13));n(96),n(120),n(165);var c=n(635);n(155),n(111),n(404),n(121),n(171),n(852),n(144);var l=n(165),d=n(852),p=n(171),u=n(245),m=n(120),f=n(1277),b=n(448),A=n(69),h=n(1257),M=n(238),O=n(170),y=n(158),g=n(454),E=n(3018),v=n(41),T=n(651),_=n(311),I=n(3019),S=n(185),P=n(382),R=n(3020),C=n(652),N=V(n(1841)),z=V(n(1842)),L=V(n(1843)),D=V(n(1844)),q=V(n(1845)),F=V(n(1846)),U=V(n(1847)),B=V(n(1848)),k=V(n(1849)),W=V(n(1850)),w=V(n(1851)),H=n(328),x=n(460),Y=n(409),G=n(1446);function V(e){return e&&e.__esModule?e:{default:e}}function j(e,t){var n=a.default.template(APP.contextPath+"/ws/v3/bill/${billId}/attachment");return{addNewAttachment:function(n,r){return e(t.getFileUploadHttpConfig(i(n),r)).then(a.default.property("data"))},link:function(t,n){return e({url:i(t)+"/link",method:"POST",data:n}).then(a.default.property("data"))},unlink:function(t,n){a.default.isFinite(n)&&(n=[n]);return e({url:i(t)+"/unlink",method:"POST",data:n}).then(a.default.property("data"))},linkChartNotes:function(t,n){return e({url:i(t)+"/chartNotes/link",method:"POST",data:n}).then(a.default.property("data"))}};function i(e){return n({billId:e})}}function X(e){var t={analyticsPage:"/viewBillHistory",description:"View Bill History Modal"};return{modalInstance:null,openModal:function(n){return e.open("Bill History",{additionalDialogClass:"ema-bill-history-modal",windowClass:"modal-dark",size:"lg",resolve:{billId:function(){return n.id}},controller:"BillHistoryModalController as bhCtrl",template:N.default},t)}}}function K(e){this.billId=e}function Q(e,t,n){var r=this;r.init=function(t,i,o){r.billItem=t,r.claim=i,r.claim?(r.claimBillItem=a.default.find(r.billItem.claimBillItems,(function(e){return r.claim.id===e.claim.id})),r.claimBillItem&&(r.claimBillItemPayerAdjustments=a.default.filter(a.default.flatten(a.default.map(r.claimBillItem.claimBillItemPayerChecks,"adjustments")),{visible:!0}),r.claimBillItemPayerPayments=a.default.filter(a.default.flatten(a.default.map(r.claimBillItem.claimBillItemPayerChecks,"payments")),{visible:!0})),r.responsibleBalance=n.getResponsibleBalanceForInsurancePolicy(r.billItem,r.claim.policy.insurancePolicy.id),o[r.claim.id]?o[r.claim.id]=o[r.claim.id]+r.responsibleBalance:o[r.claim.id]=r.responsibleBalance):r.isBillItemPosted(r.billItem)?r.responsibleBalance=e.getResponsibleBalanceForPatient(r.billItem).balance:r.responsibleBalance=0},r.isNotInClaim=function(){return i.default.isUndefined(r.claimBillItem)},r.isBillItemPosted=function(t){return e.getIsBillItemPosted(t)},r.getLabelClass=function(e){var n=e&&t.isPaymentOrAdjustmentVoided(e);return{"voided-text color-r3":!r.billItem.visible||n}}}function J(e){var t=APP.contextPath+"/ws/v2/claimCodes/carc";return e(t,{},{get:{url:t+"/byCode",method:"GET",params:{code:"@code"},isArray:!0,cache:!0}})}function Z(e){return{query:function(){return e.get(APP.contextPath+"/ws/v2/claimCodes/carc/denial",{isArray:!0,cache:!0}).then(a.default.property("data"))}}}function ee(e){var t=APP.contextPath+"/ws/v2/claimCodes/rarc";return e(t,{},{get:{url:t+"/byCode",method:"GET",params:{code:"@code"},isArray:!0,cache:!0}})}function te(e){return{query:function(){return e.get(APP.contextPath+"/ws/v2/claimCodes/rarc/denial",{isArray:!0,cache:!0}).then(a.default.property("data"))}}}function ne(e,t,n){var i=a.default.template(['','${patientName}','',""].join("\r\n"));return{postForBill:function(t,n,i){return e({url:APP.contextPath+"/ws/v2/allocator/payerPost",method:"POST",params:{billId:n,claimPayerCheckId:i,showPleaseWait:!0,ignoreHttpInterceptor:[500]},data:t}).then(a.default.property("data"))},postForCheck:function(t,n){return e({url:APP.contextPath+"/ws/v2/allocator/payerPost",method:"POST",params:{claimPayerCheckId:n,showPleaseWait:!0},data:t}).then(a.default.property("data"))},generateHeader:function(e,r){var o=i({href:n.get(e.encryptedId,e.id),patientName:t(e)});return(e.photo?'':'')+'
'+o+'
|
DOB: '+a.default.get(e,"displayDateOfBirth","N/A")+'
|
MRN: '+a.default.get(e,"mrn","N/A")+'
|
P: '+a.default.get(e,"preferredPhone.formattedPhoneNumber","N/A")+"

"+(r?'
Provider: '+t(r.renderingProvider)+' ('+r.renderingProvider.npi+')
| Location: '+r.serviceLocation.name+"
":'
 
')}}}function ie(e,t,n){function i(t){return e.findByCode(t)}function a(e){return t.get({code:e,mapId:"SHALLOW"}).$promise}return{getCarcs:i,getCarc:n.batch(i,1e3,"code"),getRarcs:a,getRarc:n.batch(a,1e3,"code")}}function ae(e){return{restrict:"E",scope:{code:"=",options:"=",isRequired:"=",selectId:"@"},replace:!0,template:q.default,controllerAs:"carcCtrl",bindToController:!0,controller:function(){var t=this;t.$onInit=function(){t.options=[]},e.query({mapId:"ALLOCATOR"}).$promise.then((function(e){t.options=e}))}}}function re(e,t){return e(APP.contextPath+"/ws/v3/claim/history/:claimId",{selector:"id,date,action,user,additionalInformation,source,processedAt,restricted,eventType,realtimeClaimStatusJob(277,requestDate,responseData,claimStatusResponse(serviceLines(statusInformation(categoryCode,code)),claimLevelStatus(code,actionCode,categoryCode,effectiveDate,freeFormMessageText))),statusInformation(code,actionCode,categoryCode,effectiveDate,freeFormMessageText)",where:t.isRestrictedNoteVisible().toQuery()})}function oe(e,t){var n={analyticsPage:"/createClaim",description:"Create Claim"};return{modalInstance:null,openModal:function(i,r,o,s){var c=e.open("Create Claim: Bill #"+i.billIdentifier,{additionalDialogClass:"ema-create-claim-modal",windowClass:"modal-dark",resolve:{bill:a.default.constant(i),billInsurance:a.default.constant(r),selectedItemIds:a.default.constant(o),batch:a.default.constant(s),existingClaims:["claimService",function(e){return r?e.getExistingForBillInsurance(r.id,"$billInsurance"):[]}],originalClaimsForCrossover:["claimService",function(e){return r&&r.position>1?e.getOriginalForCrossover(r.id,"$claimsForCrossOver"):[]}],stateOptions:["States",function(e){return e.query().$promise}],enums:["EnumService",function(e){return e.get(["com.m2.mav.domain.enums.ClaimType","com.m2.mav.domain.enums.ClaimFormatType","com.m2.mav.domain.enums.ClaimSubmissionType"])}]},controller:"CreateClaimModalController as ctrl",template:F.default},n);return c.result.then((function(e){return t.showSuccessNotification("Claim '"+e.claim.claimIdentifier+"' created successfully!"),e})),c}}}function se(e,t,n,i,r,o,s,c,l,d,p,u,m,f){var b=this;b.bill=r,b.billInsurance=o,b.selectedItemIds=s,b.batch=c,b.existingClaims=d,b.originalClaimsForCrossover=p,b.stateOptions=i,b.enums=l;var A={alert:"This claim is unable to be printed as it failed a scrub rule. Please navigate to the Queued Paper Claims tab in order to scrub this claim again or override the scrub rule."};b.save=function(t,i,r){return n.create(t).then((function(t){return b.close(t,i).then((function(){return r?b.printScrubbedForm(t):e.resolve(!0)}))})).catch((function(e){409===e.status&&m.showStickyErrorNotification(a.default.get(e,"data.message","An error occurred while creating a claim. Please try again.")),400===e.status&&m.showStickyErrorNotification(a.default.get(e,"data.message","An error occurred while creating a claim. Please try again."))}))},b.printScrubbedForm=function(e){return e.scrubFailed?f.openModal(e,A):u.openModal([e])},b.close=function(n,i){return e.when(t.close({claim:n,shouldClosePage:i}))},b.cancel=function(){t.dismiss()}}function ce(e,t,n,r,o){var s=this;function c(e){return!!e&&!a.default.isEmpty(e.flatMap((function(e){return e.claims})))}s.$onInit=function(){s.selectedItems=r.getBillItemsByIds(s.bill,s.selectedItemIds),s.hasSelectedServiceLines=!a.default.isEmpty(s.selectedItems),s.shouldShowSupplementalOptions=!0,s.existingClaim=n.getLatestClaim(s.existingClaims),s.attachments=a.default.filter(s.bill.attachments,{claimAttachment:!0}),s.isPropertyAndCasualtyClaim="WORKERS_COMP"===s.bill.type||"AUTO_PIP"===s.bill.type,s.allClaimTypeOptions=s.enums.ClaimType,s.claimSubmissionTypeOptions=a.default.groupBy(s.enums.ClaimSubmissionType,(function(e){return e.claimFormatType.name})),s.claim={},s.availablePolicies=[],s.isFirmPayerSettingsEnhancementEnabled=a.default.get(APP,"mavFeatureFlags.isFirmPayerSettingsEnhancementEnabled"),r.getPayersWithPostedPaymentsForAllBillItems(s.bill.id).then((function(e){return s.payersWithPostedPaymentsForAllBillItems=e,r.getResponsibleParty(s.bill.id)})).then((function(e){if(a.default.forEach(s.bill.policies,(function(t){t.canCreateClaim=s.canCreateClaim(t),t.isResponsibleParty=s.isResponsibleParty(t,e)})),!a.default.isEmpty(s.bill.policies)){var t=s.bill.policies.filter((function(e){return 1===e.position})),n=s.bill.policies.filter((function(e){return 2===e.position})),i=s.bill.policies.filter((function(e){return 3===e.position})),r={};r.primary=a.default.first(t),c(t)&&!c(n)&&(r.secondary=a.default.first(n)),(c(n)||c(i))&&(r.secondary=a.default.first(n),r.thirdiary=a.default.first(i)),(0,a.default)(Object.values(r)).filter((function(e){return!!e})).forEach((function(e){return s.availablePolicies.push(e)}))}s.claim.billInsurance=a.default.maxBy(s.bill.policies,(function(e){return e.canCreateClaim&&e.isResponsibleParty?e.position:0})),s.initClaim()})),s.cancel=s.cancelFn},s.initializeZeroDollarServicesOption=function(){s.billHasNonZeroItems()?s.isFirmPayerSettingsEnhancementEnabled&&(s.claim.includeZeroDollarServices=!a.default.get(s.claim.billInsurance,"insurancePolicy.payer.omitZeroDollarItems")):s.claim.includeZeroDollarServices=!0},s.initClaim=function(){s.claim.billInsurance?(s.claim=de(s.claim.billInsurance,s.bill,s.selectedItemIds,s.batch),s.position=s.claim.billInsurance.position,s.claimTypeOptions=n.getClaimTypeOptionsForCreation(s.allClaimTypeOptions,s.claim.billInsurance,s.originalClaimsForCrossover),s.initializeZeroDollarServicesOption()):(s.claim.claimFormatType=null,s.claim.claimSubmissionType=null),s.initFormatOptions()},s.canCreateClaim=function(e){if(e.position>1)for(var t=1;t=1&&e<=3){var t=a.default.result(a.default.find(s.bill.policies,{position:e}),"insurancePolicy.payer.id");return a.default.includes(s.payersWithPostedPaymentsForAllBillItems,t)}},s.isCrossover=function(){return"CROSSOVER"===s.claim.claimType},s.initFormatOptions=function(){var e=n.getClaimSubmissionPaperFormType(s.bill.billingType,s.claim.billInsurance);s.formatOptions=a.default.assign({},s.enums.ClaimFormatType),s.formatOptions.PAPER.label="CMS_1500"===e?"Paper CMS 1500":"Paper UB 04",s.formatOptions.ELECTRONIC_5010.label="CMS_1500"===e?"Electronic 837p":"Electronic 837i",s.isCrossover()&&delete s.formatOptions.PAPER},s.getFormatOptions=function(){return s.formatOptions},s.getClaimSubmissionTypeOptions=function(){var e=s.claimSubmissionTypeOptions[s.claim.claimFormatType],t=a.default.partition(e,{name:"WAITING_FOR_PAYMENT"});return s.isCrossover()?t[0]:t[1]},s.getRelatedClaimOptions=function(){return s.isCrossover()?s.originalClaimsForCrossover:s.existingClaims},s.getRelatedClaimLabel=function(){return s.isCrossover()?"Original Claim":"Payer Claim Control Number"},s.getRelatedClaimOptionLabel=function(e){var t=a.default.result(e.billInsurance,"position");return e.claimIdentifier+(t?" ("+o(e.billInsurance)+")":"")},s.getClaimSubmissionTypeDefaultOptionLabel=function(){return s.claim.claimFormatType?"-- Choose One --":"-- Choose Format First --"},s.getClaimSubmissionTypeDescription=function(){return a.default.result(s.enums.ClaimSubmissionType[s.claim.claimSubmissionType],"description")},s.isVoidedClaim=function(){return"VOIDED"===s.claim.claimType},s.isReplacementClaim=function(){return"REPLACEMENT"===s.claim.claimType},s.showReplacementClaimError=function(){return a.default.isEmpty(s.existingClaims)&&(s.isReplacementClaim()||s.isVoidedClaim())},s.claimTypeChanged=function(){var e;!function(){var e=null;s.isReplacementClaim()&&s.existingClaim?e=a.default.assign(s.existingClaim,pe(s.bill)):s.billInsurance&&(e=de(s.billInsurance,s.bill,s.selectedItemIds,s.batch));null!==e&&i.default.extend(s.claim,a.default.pick(e,l))}(),s.shouldShowRelatedClaimField()?function(){if(s.shouldShowRelatedClaimSelector()){var e=s.getRelatedClaimOptions();1===e.length&&(s.claim.relatedClaim=e[0])}else!function(){if(i.default.isUndefined(s.payerClaimControlNumber)&&!s.billInsurance)return;(i.default.isUndefined(s.payerClaimControlNumber)?n.getLatestPayerClaimControlNumber(s.billInsurance.id):t.when(s.payerClaimControlNumber)).then((function(e){s.claim.relatedClaimIdentifier=s.payerClaimControlNumber=e}))}()}():(s.claim.relatedClaim=null,s.claim.relatedClaimIdentifier=null),s.shouldShowSupplementalOptions=!s.isCrossover()&&"VOIDED"!==s.claim.claimType,1===(e=s.getFormatOptions()).length&&(s.claim.claimFormatType=a.default.result(e[0],"name"),s.claimFormatTypeChanged()),s.isCrossover()&&(s.claim.claimSubmissionType="WAITING_FOR_PAYMENT")};var l=["autoAccidentRelated","autoAccidentRelatedState","employmentRelated","includeZeroDollarServices","otherAccidentRelated"];s.shouldShowRelatedClaimField=function(){return a.default.includes(["VOIDED","REPLACEMENT","CORRECTED","CROSSOVER"],s.claim.claimType)},s.shouldShowRelatedClaimSelector=function(){return"CROSSOVER"===s.claim.claimType&&s.getRelatedClaimOptions().length},s.claimFormatTypeChanged=function(){var e=s.getClaimSubmissionTypeOptions();1===e.length?s.claim.claimSubmissionType=a.default.result(e[0],"name"):s.isPaper()&&a.default.some(e,{name:"SUBMIT_TO_PRINT_QUEUE"})?s.claim.claimSubmissionType=s.isPropertyAndCasualtyClaim?"PRINT_TO_FORM":"SUBMIT_TO_PRINT_QUEUE":s.isElectronic()&&a.default.find(e,{name:"SUBMIT_TO_QUEUE"})&&(s.claim.claimSubmissionType="SUBMIT_TO_QUEUE")},s.claimSubmissionTypeChanged=function(){s.isPaper()&&"SUBMIT_TO_PRINT_QUEUE"!==s.claim.claimSubmissionType||(s.claim.submissionDate=null)},s.autoAccidentRelatedChanged=function(){!0==!s.autoAccidentRelated&&(s.claim.autoAccidentRelatedState=null)},s.isPaper=function(){return"PAPER"===s.claim.claimFormatType},s.isElectronic=function(){return"PAPER"!==s.claim.claimFormatType},s.isPrintToForm=function(){return s.isPaper()&&"PRINT_TO_FORM"===s.claim.claimSubmissionType},s.preview=function(){e.open(n.getCms1500ForClaimCreationUrl(s.claim,n.getClaimSubmissionPaperFormType()))},s.onBeforeSave=function(){s.claim.postDate=s.bill.postDate},s.save=function(e){return s.onBeforeSave(),s.saveFn({claim:s.claim,shouldClosePage:e,printForm:s.isPrintToForm()})},s.isPolicyRankingMatchesPosition=function(){return s.position===s.billInsurance.insurancePolicy.ranking},s.showAttachments=function(){return!s.isUnsupportedFormatForAttachments()&&!s.isPrintQueueSubmissionTypeWithAttachments()},s.isUnsupportedFormatForAttachments=function(){return a.default.size(s.attachments)>0&&s.claim.billInsurance&&"PAPER"===le(s.claim.billInsurance,s.bill.type)&&"ELECTRONIC_5010"===s.claim.claimFormatType},s.isPrintQueueSubmissionTypeWithAttachments=function(){return a.default.size(s.attachments)>0&&"SUBMIT_TO_PRINT_QUEUE"===s.claim.claimSubmissionType},s.getAttachmentFileName=function(e){return e.fileAttachment?e.fileAttachment.fileName||e.fileAttachment.title:e.chartNote.fileName},s.billHasNonZeroItems=function(){return(s.hasSelectedServiceLines?s.selectedItems:s.bill.items).filter((function(e){return e.charge>0})).length>0}}function le(e,t){var n=null;switch(t){case"CLAIM":n=1===e.position?"primaryDefaultFormat":"sequentialDefaultFormat";break;case"VISION":n="visionDefaultFormat";break;case"WORKERS_COMP":n=1===e.position?"workersCompDefaultFormat":"sequentialDefaultFormat";break;case"AUTO_PIP":n=1===e.position?"autoPipDefaultFormat":"sequentialDefaultFormat"}return a.default.get(e.insurancePolicy.payer,n,null)}function de(e,t,n,i){var r=le(e,t.type),o=function(e,t){if("ELECTRONIC_5010"===t)return"SUBMIT_TO_QUEUE";return a.default.includes(["WORKERS_COMP","VISION","AUTO_PIP"],e.insurancePolicy.mavPolicyType)?"PRINT_TO_FORM":"SUBMIT_TO_PRINT_QUEUE"}(e,r);return a.default.assign({claimType:"NEW",billInsurance:e,includeZeroDollarServices:!0,claimFormatType:r,claimSubmissionType:o,selectedItemIds:n,paymentBatchId:a.default.get(i,"id")},pe(t))}function pe(e){return{employmentRelated:e.employmentRelated||!1,autoAccidentRelated:e.autoAccidentRelated||!1,otherAccidentRelated:e.otherAccidentRelated||!1,autoAccidentRelatedState:e.autoAccidentRelatedState}}function ue(e){var t={analyticsPage:"/manageDiagnoses",description:"Manage Diagnoses"};return{modalInstance:null,openModal:function(n){return e.open("Manage Diagnoses",{additionalDialogClass:"ema-manage-diagnoses-modal",windowClass:"modal-dark",resolve:{bill:function(){return n}},controller:"ManageDiagnosesModalController as ctrl",template:B.default},t)}}}function me(e,t,n){var i=this;i.bill=t,i.diagnoses=a.default.cloneDeep(i.bill.diagnoses),i.diagnosisPointerIndicators=n.getDiagnosisPointerIndicators(),i.removeDiagnosis=function(e){o.default.removeOrderedItem(i.diagnoses,e.position)},i.moveUp=a.default.partial(o.default.moveOrderedUp,i.diagnoses),i.moveDown=a.default.partial(o.default.moveOrderedDown,i.diagnoses),i.addDiagnosis=function(){var e={position:(a.default.result(a.default.maxBy(i.diagnoses,"position"),"position")||0)+1,eciEnabled:!1};i.diagnoses.push(e)},i.isDiagnosisPointerReferenced=function(e){return(0,a.default)(i.bill.items).map("diagnosisPointers").flatten().some(["billDiagnosis.id",e.id])},i.isValid=function(){var e=(0,a.default)(i.bill.diagnoses).sortBy("position").map("code").value(),t=(0,a.default)(i.diagnoses).sortBy("position").map("code").value(),n=a.default.isEqual(e,t);return!a.default.find(i.diagnoses,(function(e){return a.default.isEmpty(e.code)}))&&!n},i.isMaxAllowedReached=function(){return a.default.size(i.diagnosisPointerIndicators)===a.default.size(i.diagnoses)},i.isDiagnosisDisabled=function(e){return(0,a.default)(i.diagnoses).map("code").includes(e.code)},i.save=function(){e.close(i.diagnoses)},i.cancel=function(){e.dismiss()}}function fe(e,t,n,r){return{restrict:"A",controllerAs:"ctrl",bindToController:!0,scope:{claim:"<",preliminary:"<",claimSubmission:"0?"+":"")+e}})),e.isLazyCreateClaimSubmissionElectronicData=a.default.get(APP,"mavFeatureFlags.isLazyCreateClaimSubmissionElectronicData")},e.preview=function(){var i={hideTemplate:!!e.hideTemplate,xOffset:e.nudgeSettings.left,yOffset:e.nudgeSettings.top},a=e.preliminary?t.getCms1500ForClaimCreationUrl(e.claim,e.submissionFormType,i):t.getClaimFormPdfUrl(e.claim,e.claimSubmission,e.claimSubmission.facilitySubmissionForm,i);n.open(a),e.saveNudgeSettings()},e.isElectronicClaimSubmission=function(){return e.claimSubmission&&("SUBMIT_TO_QUEUE"===e.claimSubmission.submissionType||"CREATE_AND_HOLD"===e.claimSubmission.submissionType||"WAITING_FOR_PAYMENT"===e.claimSubmission.submissionType)},e.doesClaimSubmissionHaveElectronicData=function(){return e.isLazyCreateClaimSubmissionElectronicData?e.isElectronicClaimSubmission()&&e.claimSubmission.transmissionDate:i.default.isDefined(e.claimSubmission.electronicData)},e.getClaimSubmissionId=function(){return e.claimSubmission.id},e.saveNudgeSettings=function(){r.save("CMS1500NudgeSettings",e.nudgeSettings)},e.getPaperFormLabel=function(){var t=(e.preliminary?"preliminary ":"final ")+a.default.replace(e.submissionFormType,"_"," ");return"Download the ".concat(t," form")}},link:function(n,i){var a=n.ctrl;a.displayPopover=function(){e.display(i,"bottom",APP.contextPath+"/static/js/angularApp/financials/templates/cms1500PrintPreview.html","defaultArrow",n,"cms1500-popover"),a.submissionFormType=a.submissionFormType||t.getClaimSubmissionPaperFormType(a.claim.billInsurance.bill.billingType,a.claim.billInsurance)},i.bind("click",a.displayPopover)}}}function be(e){var t={analyticsPage:"/billServiceLineNotes",description:"Set Bill Service Line Notes"};return{modalInstance:null,openModal:function(n,i,a){return e.open("Service Line Notes",{windowClass:"modal-dark",resolve:{bill:function(){return n},nocCodes:function(){return i},saveFn:function(){return a}},controller:"BillServiceLineNotesController as ctrl",template:W.default},t)}}}function Ae(e,t,n,i,r,o){var s=this;s.bill=t,s.nocCodes=i,s.isBillInactive=o.isBillInactive(s.bill),s.isPatientBill=o.isPatientBill(s.bill),s.notesByPosition=a.default.reduce(t.items,(function(e,t){return e[t.position]=t.note,e}),{}),s.cancel=function(){e.dismiss("cancel")},s.isNocCode=function(e){return e.code&&s.nocCodes[e.code]},s.isNoteRequired=function(e){var t=s.isNocCode(e);return!s.isPatientBill&&t&&o.isNoteRequired(e,t)},s.save=function(){a.default.forEach(t.items,(function(e){e.note=s.notesByPosition[e.position]})),r((function(){n(),e.close()}))}}function he(e){return{open:function(t,n){return e.open("Resolve Bill",{additionalDialogClass:"ema-inactivate-bill-modal",windowClass:"modal-dark",template:'
There is a responsible party on the bill with balance not equal to 0.00. Please resolve prior to updating status to Resolved/Paid.
',resolve:{bill:a.default.constant(t)},controllerAs:"$ctrl",controller:["$uibModalInstance",function(e){var i=this;i.bill=t,i.confirm=function(){i.bill.status=n,e.close(!1)}}]})}}}function Me(e){return{open:function(t,n){return e.open("Invalid Claim Status",{additionalDialogClass:"ema-inactivate-bill-modal",windowClass:"modal-dark",template:'
The claim status(es) for bills marked as Resolved/Paid must be one of:
  • Resolved/Paid
  • Resolved/Other
  • Inactive/Voided
  • Inactive/Duplicate
  • Denied
',resolve:{bill:a.default.constant(t)},controllerAs:"$ctrl",controller:["$uibModalInstance",function(e){var i=this;i.bill=t,i.confirm=function(){i.bill.status=n,e.close(!1)}}]})}}}function Oe(e){var t={analyticsPage:"/inactivateBill",description:"Inactivate Bill"};return{modalInstance:null,openModal:function(i,a){return e.open("Inactivate Bill",{additionalDialogClass:"ema-inactivate-bill-modal",windowClass:"modal-dark",resolve:{bill:function(){return i},oldStatus:function(){return a}},controller:"InactivateBillModalController as ctrl",template:n(1853)},t)}}}function ye(e,t,n,i,r,o,s,c){var l=this;l.bill=i,l.oldStatus=o,l.hasPaymentsOrAdjustments=r.hasPaymentsOrAdjustments(l.bill),l.canInactivateBill=function(){return!(a.default.startsWith(l.oldStatus,"RESOLVED")||r.hasAssociatedPayerChecks(l.bill)||r.hasPaymentsOrAdjustments(l.bill)||r.hasActivePostedPaymentsOrAdjustments(l.bill.reversedLineItems)||!r.isEveryClaimInactive(l.bill))},l.getInactivationText=function(){return"PATIENT"!==l.bill.type||r.hasClaims(l.bill)?"Inactivate claims, remove and disassociate all payments/adjustments to inactivate the bill.":"Remove all payments and adjustments to inactivate the bill."},l.autoInactivateBill=function(){if(a.default.get(APP,"mavFeatureFlags.inactivateBillOnSave"))return n.close(!0);s.inactivateBill(l.bill.id,l.bill.postDate,"$manageBill").then((function(e){n.close(e)})).catch((function(t){return 401===t.status?c.showNotification("Not Authorized - You do not have Manage Ledger permissions to inactivate the bill",{type:"error",duration:5e3}):500===t.status&&c.showNotification("Unable to inactivate bill",{type:"error",duration:5e3}),n.close(!1),e.reject()}))},l.continue=function(){n.close(!0)},t.$dismiss=function(){l.cancel()},l.cancel=function(){l.bill.status=l.oldStatus,n.close(!1)}}function ge(e){var t=APP.contextPath+"/ws/v3/clia/codes";return e(t,{},{query:{url:t,method:"GET",isArray:!0},list:{url:t+"/all",method:"GET",isArray:!0,cache:!0}})}function Ee(e){var t={analyticsPage:"/appointmentPaymentsModal",description:"Appointment Payments Modal"};return{modalInstance:null,openModal:function(n,a){return this.modalInstance=e.open("Payments",{windowClass:"modal-dark",size:"sm",template:w.default,resolve:{enums:["EnumService",function(e){return e.get(["com.m2.mav.payment.enums.PaymentCategory"])}]},controllerAs:"$ctrl",controller:["$uibModalInstance","enums",function(e,t){var r=this;r.paymentCategories=t.PaymentCategory,r.apptPayments=n,r.close=function(){e.dismiss()},r.payAdjust=function(){r.close(),(a()||i.default.noop)()}}]},t),this.modalInstance},closeModal:function(){this.modalInstance.close()}}}Ee.$inject=["EmaModalNg"],ge.$inject=["$resource"],ye.$inject=["$q","$scope","$uibModalInstance","bill","BillService","oldStatus","billAutoInactivationService","emaNotification"],Oe.$inject=["EmaModalNg"],Me.$inject=["EmaModalNg"],he.$inject=["EmaModalNg"],Ae.$inject=["$uibModalInstance","bill","saveFn","nocCodes","$timeout","BillService"],be.$inject=["EmaModalNg"],fe.$inject=["emaPopover","ClaimService","$window","emaLocalStorage"],me.$inject=["$uibModalInstance","bill","BillService"],ue.$inject=["EmaModalNg"],ce.$inject=["$window","$q","ClaimService","BillService","positionDescFilter"],se.$inject=["$q","$uibModalInstance","ClaimService","stateOptions","bill","billInsurance","selectedItemIds","batch","enums","existingClaims","originalClaimsForCrossover","PrintClaimsModal","emaNotification","ClaimScrubDetailModal"],oe.$inject=["EmaModalNg","emaNotification"],re.$inject=["$resource","ClaimHistorySpecifications"],ae.$inject=["ClaimAdjustmentReasonCode"],ie.$inject=["firmAdjustmentCodeService","RemittanceAdviceRemark","CommonService"],ne.$inject=["$http","lastAndFirstNameFilter","emaPatientFinancialsUrl"],te.$inject=["$http"],ee.$inject=["$resource"],Z.$inject=["$http"],J.$inject=["$resource"],Q.$inject=["BillItem","FinancialsService","billResponsiblePartyService"],K.$inject=["billId"],X.$inject=["EmaModalNg"],j.$inject=["$http","EmaUploadService"];var ve=i.default.module("ema.billServices",["ui.select","ngSanitize",m.moduleName,E.financialFiltersModule,"patientInsurancesDirectives",u.moduleName,"localytics.directives",l.patientInsurancesServices,c.moduleName,"emaLocalStorage","ema.eraUrl","ema.upload","ema.events",p.TaxpayerIdSelectName,d.plaBillAllocatorModule,f.moduleName,b.claimPayerCheckServiceModule,A.billSearchServiceModule,M.billUpdateServiceModule,O.claimServiceModule,h.allocatorServiceModule,y.patientUnallocatedPaymentsModalModule,g.patientReceivedPaymentsServiceModule,v.financialBatchSettingsServiceModule,T.reverseLineItemServiceModule,_.billResponsiblePartyServiceModule,R.claimAddressSelectModule,I.postDateModalFactoryModule,S.firmPreferencesModule,P.billItemServiceModule,H.characterCounterModule,x.billAutoInactivationServiceModule,Y.claimServiceLegacyModule,C.firmAdjustmentCodeServiceModule,G.claimPayerCheckReportPdfModuleService]).factory("BillHistoryModal",X).controller("BillHistoryModalController",K).controller("BillHistoryItemController",Q).component("allocatorPatientPaymentDetails",{bindings:{payment:"=",patientId:"<"},template:z.default,controller:["PatientTransactionLogModal",function(e){var t=this;t.$onInit=function(){t.isLegacyPayment=t.payment.source.patientReceivedPayment.legacy,t.transaction=t.isLegacyPayment?null:t.payment.source.patientReceivedPayment.transactionLog,t.transactionId=t.isLegacyPayment?null:t.transaction.transactionId.slice(-5)},t.openPaymentDetails=function(){e.openModal(t.patientId,t.payment.source.patientReceivedPayment.id,t.transaction)}}]}).factory("AppointmentPaymentsModal",Ee).directive("claimPayerCheckView",(function(){return{restrict:"E",replace:!0,controllerAs:"cpcCtrl",bindToController:!0,template:L.default,scope:{bill:"=",claimPayerCheck:"=",adjustmentGroupPrefixes:"=",reasonCodes:"=",isPrimary:"<",modalInstance:"<",onUpdateFn:"&"},controller:["BillService","AllocatorService","$scope","$window","emaEraUrl","emaEobPayerCheckUrl","FinancialAttachment","emaNotification","reverseLineItemService","claimPayerCheckReportPdfService",function(e,t,n,i,r,o,s,c,l,d){var p=this;p.$onInit=function(){p.load(p.isPrimary,!0)},p.load=function(e,t){t&&(p.postDate=p.claimPayerCheck.payerCheck.depositDate),p.paymentsAndAdjustments={},p.eobAttachments=[],p.expanded=e,p.initServiceLines(),p.isPrimary&&p.getAttachments()},p.initServiceLines=function(){var e,t=l.getAllocatorBean(p.bill,p.claimPayerCheck);p.activeLineItems=t.activeLineItems,p.reversedLineItems=t.reversedLineItems,p.isReverseLineItemEnabled=null===(e=APP.mavFeatureFlags)||void 0===e?void 0:e.isReverseLineItemEnabled,a.default.isNil(p.reversedLineItemsExpanded)&&(p.reversedLineItemsExpanded=t.reversedLineItemsExpanded)},p.toggleCard=function(){p.expanded=!p.expanded,p.expanded&&p.getAttachments()},p.getAttachments=function(){s.queryByPayerCheck({payerCheckId:p.claimPayerCheck.payerCheck.id}).$promise.then((function(e){p.eobAttachments=e}))},p.print=function(){d.generateReport(p.claimPayerCheck.id)},p.displayCheckNumberAsLink=function(){return!("EOB"===p.claimPayerCheck.payerCheck.checkFormat&&a.default.isEmpty(p.eobAttachments))},p.openEraOrEobView=function(){if("ERA"===p.claimPayerCheck.payerCheck.checkFormat){var e=p.claimPayerCheck.payerCheck.era.id;i.open(r.get(e),"_blank")}else"EOB"===p.claimPayerCheck.payerCheck.checkFormat&&s.queryByPayerCheck({payerCheckId:p.claimPayerCheck.payerCheck.id}).$promise.then((function(e){i.open(a.default.head(e).filePath,"_blank")}))},p.managePayment=function(){p.modalInstance.dismiss();var e=a.default.get(p.claimPayerCheck,"payerCheck.id"),t=o.get(e)+"?claimIdentifier="+a.default.get(p.claimPayerCheck,"claim.claimIdentifier");i.open(t,"_self")},p.apply=function(){var e={postDate:p.postDate,payments:[],adjustments:[],adjustmentIdsToReverse:[],paymentIdsToReverse:[]};a.default.forEach(p.paymentsAndAdjustments,(function(t){t.shouldPost&&(e.payments=a.default.concat(e.payments,t.unpostedPayments),e.adjustments=a.default.concat(e.adjustments,t.unpostedAdjustments,t.unpostedCopays,t.unpostedDeductibles,t.unpostedCoinsurances),e.adjustmentIdsToReverse=a.default.concat(e.adjustmentIdsToReverse,t.adjustmentIdsToReverse),e.paymentIdsToReverse=a.default.concat(e.paymentIdsToReverse,t.paymentIdsToReverse))})),t.postForBill(e,p.bill.id,p.claimPayerCheck.id).then((function(e){p.onUpdateFn({claimPayerChecks:e}),p.claimPayerCheck=a.default.find(e,{id:p.claimPayerCheck.id}),p.load(p.expanded,!1)}),(function(e){409!==e.status&&(c.showStickyErrorNotification("An error occurred while updating the adjustment. Please try again."),p.modalInstance.dismiss())}))},p.isUnlinkedInsurance=function(){var t=a.default.get(p.claimPayerCheck,"claim.billInsurance");return e.isUnlinkedInsurance(t)},p.disablePostButton=function(){return a.default.every(p.paymentsAndAdjustments,{shouldPost:!1})},p.setPostDate=function(e){p.postDate=e},p.getUnallocatedAmount=function(){return p.claimPayerCheck.amount-p.claimPayerCheck.postedAmount-p.getTotalUnpostedPayments()},p.getAssignedAmount=function(){return p.claimPayerCheck.postedAmount+p.getTotalUnpostedPayments()},p.getTotalUnpostedPayments=function(){var e=a.default.reduce(p.paymentsAndAdjustments,(function(e,t){return a.default.sumBy(t.unpostedPayments,"amount")+e}),0);return a.default.round(e,2)},p.getPostButtonTooltipMessage=function(){if(n.claimPayerCheckForm.$invalid&&n.claimPayerCheckForm.$error.dollarMax)return"Payment amount exceeds allocated payment amount to claim. Please correct."},p.hasReversedLineItems=function(){return!a.default.isEmpty(p.reversedLineItems)}}]}})).directive("claimBillItemView",(function(){return{restrict:"A",replace:!0,controllerAs:"cbiCtrl",bindToController:!0,template:n(1852),scope:{bill:"=",claimPayerCheck:"<",claimBillItem:"=",adjustmentGroupPrefixes:"=",reasonCodes:"=",paymentsAndAdjustments:"=",position:"@",totalUnallocated:"<",isReversedItem:"e.amount&&(s.isTransfersExceedRemainingBalance=!0)}else e.visible&&(e.fullCode=s.getFullCodeFromAdjustment(e),"PATIENT_RESPONSIBILITY"===e.groupCode&&"1"===e.carc&&"TRANSFER_RESPONSIBILITY"===e.status?s.paymentsAndAdjustments.unpostedDeductibles.push(e):"PATIENT_RESPONSIBILITY"===e.groupCode&&"2"===e.carc&&"TRANSFER_RESPONSIBILITY"===e.status?s.paymentsAndAdjustments.unpostedCoinsurances.push(e):"PATIENT_RESPONSIBILITY"===e.groupCode&&"3"===e.carc&&"TRANSFER_RESPONSIBILITY"===e.status?s.paymentsAndAdjustments.unpostedCopays.push(e):s.paymentsAndAdjustments.unpostedAdjustments.push(e))})),s.claimBillItemPayerCheck.payments&&a.default.forEach(s.claimBillItemPayerCheck.payments,(function(e){if(e.claimBillItemPayerCheckId=s.claimBillItemPayerCheck.id,a.default.has(e,"postDateLd")){null===s.allowable&&a.default.isNumber(e.allowed)&&(s.allowable=e.allowed);var i=n(e.postDateLd);if(a.default.has(s.paymentsAndAdjustments.postedItems,i)||t(s.paymentsAndAdjustments.postedItems,i,e.postDateLd),s.paymentsAndAdjustments.postedItems[i].payments.push(e),a.default.has(e,"voidPostDateLd")){var r=n(e.voidPostDateLd);a.default.has(s.paymentsAndAdjustments.postedItems,r)||t(s.paymentsAndAdjustments.postedItems,r,e.voidPostDateLd);var o=a.default.clone(e);o.amount=-1*o.amount,o.allowed&&(o.allowed=-1*o.allowed),s.paymentsAndAdjustments.postedItems[r].payments.push(o)}}else e.visible&&s.paymentsAndAdjustments.unpostedPayments.push(e)})),0===s.paymentsAndAdjustments.unpostedAdjustments.length&&s.paymentsAndAdjustments.unpostedAdjustments.push({fullCode:null,amount:null,status:"IGNORE",claimBillItemPayerCheckId:s.claimBillItemPayerCheck.id}),0===s.paymentsAndAdjustments.unpostedDeductibles.length&&s.paymentsAndAdjustments.unpostedDeductibles.push({groupCode:"PATIENT_RESPONSIBILITY",carc:"1",amount:null,status:"TRANSFER_RESPONSIBILITY",claimBillItemPayerCheckId:s.claimBillItemPayerCheck.id}),0===s.paymentsAndAdjustments.unpostedCoinsurances.length&&s.paymentsAndAdjustments.unpostedCoinsurances.push({groupCode:"PATIENT_RESPONSIBILITY",carc:"2",amount:null,status:"TRANSFER_RESPONSIBILITY",claimBillItemPayerCheckId:s.claimBillItemPayerCheck.id}),0===s.paymentsAndAdjustments.unpostedCopays.length&&s.paymentsAndAdjustments.unpostedCopays.push({groupCode:"PATIENT_RESPONSIBILITY",carc:"3",amount:null,status:"TRANSFER_RESPONSIBILITY",claimBillItemPayerCheckId:s.claimBillItemPayerCheck.id}),0===s.paymentsAndAdjustments.unpostedPayments.length&&s.paymentsAndAdjustments.unpostedPayments.push({allowed:s.allowable,amount:null,claimBillItemPayerCheckId:s.claimBillItemPayerCheck.id}))},s.hasItems=function(e){return s.paymentsAndAdjustments.postedItems[e.key].payments.length>0||s.paymentsAndAdjustments.postedItems[e.key].adjustments.length>0||s.paymentsAndAdjustments.postedItems[e.key].copays.length>0||s.paymentsAndAdjustments.postedItems[e.key].coinsurances.length>0||s.paymentsAndAdjustments.postedItems[e.key].deductibles.length>0},s.hasUnpostedPaymentsOrAdjustments=function(){return!(0,a.default)(s.claimBillItemPayerCheck.payments).concat(s.claimBillItemPayerCheck.adjustments).filter(i.isPaymentOrAdjustmentUnposted).filter({visible:!0}).isEmpty()},s.allAdjustmentsAndPaymentsPosted=function(){return!s.hasUnpostedPaymentsOrAdjustments()},s.isBillItemVisible=function(){var e=APP.mavFeatureFlags.isReverseLineItemEnabled&&"REVERSED"===s.claimBillItem.billItem.reversalState;return s.claimBillItem.billItem.visible||e},s.shouldAllowUnpostedInput=function(){return s.isBillItemVisible()||s.hasUnpostedPaymentsOrAdjustments()},s.getBalance=function(){var e=APP.mavFeatureFlags.isReverseLineItemEnabled&&s.isReversedItem?s.bill.reversedLineItems:s.bill.items,t=a.default.find(e,(function(e){return e.id===s.claimBillItem.billItem.id})),n=s.claimPayerCheck.claim.billInsurance.insurancePolicy.id,i=o.getResponsibleBalanceForInsurancePolicy(t,n),r=a.default.concat(s.paymentsAndAdjustments.unpostedAdjustments,s.paymentsAndAdjustments.unpostedCopays,s.paymentsAndAdjustments.unpostedDeductibles,s.paymentsAndAdjustments.unpostedCoinsurances),c=a.default.sumBy(r,(function(e){return e.amount&&e.status&&("WRITE_OFF"===e.status||"TRANSFER_RESPONSIBILITY"===e.status)?e.amount:0})),l=a.default.round(a.default.get(i,"balance",0)-s.paymentsAndAdjustments.unpostedPayments[0].amount-c,2);return s.getBalanceHtml(l)},s.getBalanceHtml=function(e){return e>0?''+n(e)+"":''+n(e)+""},s.getMinPayerPaymentAmount=function(e){return a.default.round(Math.min(s.totalUnallocated+e.amount,0),2)},s.getMaxPayerPaymentAmount=function(e){return a.default.round(Math.max(s.totalUnallocated+e.amount,0),2)},s.getFullCodeFromAdjustment=function(e){return a.default.find(s.adjustmentGroupPrefixes,{name:e.groupCode}).code+e.carc},s.addPayerAdjustment=function(){s.paymentsAndAdjustments.unpostedAdjustments.unshift({amount:null,fullCode:null,status:"IGNORE",claimBillItemPayerCheckId:s.claimBillItemPayerCheck.id})},s.deletePayerAdjustment=function(e,t){s.paymentsAndAdjustments.adjustmentIdsToReverse.push(e.id);var n=s.paymentsAndAdjustments.postedItems.Pending,i=a.default.clone(e);i.amount=-1*i.amount,n[t].push(i)},s.deletePayerPayment=function(e){s.paymentsAndAdjustments.paymentIdsToReverse.push(e.id);var t=a.default.clone(e);t.amount=-1*t.amount,t.allowed&&(t.allowed=-1*t.allowed),s.paymentsAndAdjustments.postedItems.Pending.payments.push(t)},s.getAdjustmentGroupPrefixFromCode=function(e){return a.default.find(s.adjustmentGroupPrefixes,{code:e}).name},s.parseFullCode=function(e){if(e.fullCode){e.groupCode=s.getAdjustmentGroupPrefixFromCode(e.fullCode.substring(0,2)),e.carc=e.fullCode.substring(2,6);var n=a.default.get(s.claimBillItem,"billItem.id"),i=a.default.get(e,"claimBillItemPayerCheckId"),r=a.default.get(e,"amount");t.getDefaultAdjustmentStatus(e.fullCode,s.position,n,i,r).then((function(t){e.status=t.data}))}},s.onPayerPaymentEntered=function(){if("1"===s.position){var e=(0,a.default)(s.paymentsAndAdjustments.postedItems).flattenValues(2).some(i.isPaymentOrAdjustmentPosted);if(1===s.paymentsAndAdjustments.unpostedPayments.length&&1===s.paymentsAndAdjustments.unpostedAdjustments.length&&!e){var t=s.paymentsAndAdjustments.unpostedPayments[0];if(a.default.isNumber(t.amount)&&t.allowed>0&&t.allowed>=t.amount){var n=a.default.round(s.claimBillItem.billItem.charge-t.allowed,2);if(n>0){var r={amount:n,groupCode:"CONTRACTUAL_OBLIGATION",carc:"45",status:"WRITE_OFF",fullCode:"CO45",claimBillItemPayerCheckId:s.claimBillItemPayerCheck.id,autoGenerated:!0};s.paymentsAndAdjustments.unpostedAdjustments.push(r)}}}}},s.clearAdjustment=function(e){e.fullCode=null,e.groupCode=null,e.carc=null,e.amount=null,e.status="IGNORE"},s.clearPayment=function(e){e.allowed=null,e.amount=null},s.clearAll=function(){a.default.forEach(s.paymentsAndAdjustments.unpostedPayments,s.clearPayment),a.default.forEach(s.paymentsAndAdjustments.unpostedAdjustments,s.clearAdjustment),a.default.forEach(s.paymentsAndAdjustments.unpostedDeductibles,s.clearAdjustment),a.default.forEach(s.paymentsAndAdjustments.unpostedCopays,s.clearAdjustment),a.default.forEach(s.paymentsAndAdjustments.unpostedCoinsurances,s.clearAdjustment)},s.getAdjStatusLabel=function(e){switch(e){case"IGNORE":return"Not Adjust";case"TRANSFER_RESPONSIBILITY":return"Transfer";case"ON_HOLD":return"On Hold";case"WRITE_OFF":return"Adjust";default:return"?"}},s.navigate=function(e){e.shiftKey&&39===e.which?$(e.target).closest("td").next().find("input").focus():e.shiftKey&&37===e.which?$(e.target).closest("td").prev().find("input").focus():40===e.which?$(e.target).closest("tbody").next().children("tr:first").find("td:eq("+$(e.target).closest("td").index()+")").find("input").focus():38===e.which&&$(e.target).closest("tbody").prev().children("tr:first").find("td:eq("+$(e.target).closest("td").index()+")").find("input").focus()},s.navigateFromCopay=function(e,t){t&&s.isLastClaimBillItem&&9===e.which?(e.preventDefault(),$(e.target).closest("div.claim-payer-check-container").find("input#postDate").focus()):s.navigate(e)},s.onPlusBtnEnterBtn=function(e){13===e.which&&s.addPayerAdjustment()},s.adjIsOnHold=function(e){return"ON_HOLD"===e.status},s.hasLinkedBillInsurance=function(){return r.hasLinkedBillInsurance(a.default.get(s.claimPayerCheck,"claim"))},s.hasUnlinkedBillInsurance=function(){return r.hasUnlinkedBillInsurance(a.default.get(s.claimPayerCheck,"claim"))},s.isInactiveClaim=function(){return r.isInactive(a.default.get(s.claimPayerCheck,"claim"))},s.isVoided=i.isPaymentOrAdjustmentVoided,s.disablePaymentInput=function(){return!s.isBillItemVisible()||s.hasUnlinkedBillInsurance()||s.isInactiveClaim()||s.isReversedItem}}]}})).component("payerAdjustmentOnHoldWarning",{bindings:{adjustment:"="},template:'',controller:["emaPopover","$scope",function(e,t){var n=this;t.ignoreAdjustment=function(){n.adjustment.status="IGNORE"},n.onClick=function(){var i="#adjWarning_"+n.adjustment.id;e.display(i,"top",APP.contextPath+"/static/js/angularApp/common/templates/payerAdjustmentOnHoldWarning.html","error",t,"on-hold-popover")}}]}).component("payerPaymentOrAdjustmentIcon",{restrict:"E",bindings:{paymentOrAdjustment:"=",deleteFn:"&",additionalReversalClass:"@"},template:D.default,controller:function(){var e=this;e.deletePayerAdjustment=function(){e.paymentOrAdjustment.pendingReversal=!0,e.isReversed()||e.deleteFn(e.paymentOrAdjustment)},e.isReversed=function(){return a.default.has(e.paymentOrAdjustment,"voidPostDateLd")}}}).component("allocatorProcedureView",{bindings:{billItem:"<",reversedLineItem:"

R

'}).component("allocatorChargeView",{bindings:{charge:"<"},template:'

',controller:["$filter",function(e){var t=this;t.getDosLabel=function(){return t.charge.billItem?"DOS: "+e("billItemServiceDate")(t.charge.billItem):"CHG: "+e("date")(t.charge.chargeCreatedDate,"MM/dd/yy","UTC")}}]}).factory("ClaimAdjustmentReasonCode",J).factory("ClaimAdjustmentReasonCodeDenial",Z).factory("RemittanceAdviceRemark",ee).factory("RemittanceAdviceRemarkDenial",te).service("ClaimCodeService",ie).directive("claimAdjustmentReasonCodeSelector",ae).factory("ClaimHistory",re).factory("ClaimHistorySpecifications",(function(){var e=(0,s.default)().cb();return{isRestrictedNoteVisible:function(){var t="RCM"===APP.loggedInUserRole;return e.p("restrictedNote").isNull(!0).or(e.p("restrictedNote").any(t?[!1,!0]:[!1]))}}})).factory("CreateClaimModal",oe).controller("CreateClaimModalController",se).service("BillAttachmentService",j).factory("AllocatorService",ne).directive("adjustmentCode",(function(){return{restrict:"E",require:"ngModel",replace:!0,template:'',link:function(e,t,n,r){var o=a.default.map(e.$eval(n.reasonCodes),"code");r.$validators.groupCode=function(e){if(i.default.isUndefined(e)||null===e||""===e)return!0;if(e.length>=2){var t=e.substring(0,2);return a.default.includes(["CO","PR","OA","PI","CR"],t)}return!1},r.$validators.reasonCode=function(e){if(i.default.isUndefined(e)||null===e||""===e)return!0;var t=e.substring(2,6);return a.default.includes(o,t)}}}})).component("adjustmentCodeReasonDescription",{restrict:"E",bindings:{code:"@"},template:'',controller:["ClaimCodeService",function(e){var t=this;t.$onInit=function(){e.getCarc(t.code).then((function(e){t.description=a.default.result(e,"description")||"No description available"}))}}]}).component("remittanceAdviceRemarkDescription",{bindings:{code:"@"},template:'',controller:["ClaimCodeService",function(e){var t=this;t.$onInit=function(){e.getRarc(t.code).then((function(e){t.description=a.default.result(e,"description")||"No description available"}))}}]}).factory("ManageDiagnosesModal",ue).controller("ManageDiagnosesModalController",me).directive("cmsPrintPreview",fe).factory("BillServiceLineNotesModal",be).controller("BillServiceLineNotesController",Ae).component("adjustmentCodeTooltip",{bindings:{code:"@"},template:'',controller:["ClaimCodeService",function(e){var t=this;t.$onInit=function(){e.getCarc(t.code).then((function(e){t.description=a.default.result(e,"description")||"No description available"}))}}]}).factory("ResolveBillModal",he).factory("InvalidClaimStatusModal",Me).factory("InactivateBillModal",Oe).controller("InactivateBillModalController",ye).component("cms1500PrintAdjustments",{bindings:{api:"="},template:k.default,controller:["ClaimService",function(e){var t=this;t.$onInit=function(){t._initApi(),t.api.loadPdfAdjustments().then((function(e){t.adjustments=e})),t.nudgeOptions=a.default.map(a.default.range(-20,20),(function(e){return{value:e,label:(e>0?"+":"")+e}}))},t._initApi=function(){t.api=t.api||{},t.api.savePdfAdjustments=function(){return e.saveCms1500PdfAdjustments(t.adjustments).then((function(){return t.adjustments}))},t.api.loadPdfAdjustments=function(){return e.getCms1500PdfAdjustments().then((function(e){return a.default.isEmpty(e)?{xOffset:0,yOffset:0,hideTemplate:!1}:{xOffset:a.default.parseInt(a.default.find(e,["name","X_OFFSET"]).value)||0,yOffset:a.default.parseInt(a.default.find(e,["name","Y_OFFSET"]).value)||0,hideTemplate:"TRUE"===a.default.find(e,["name","HIDE_TEMPLATE"]).value}}))},t.api.getAdjustments=function(){return t.adjustments}}}]}).controller("CreateClaimController",ce).component("createClaim",{bindings:{bill:"<",billInsurance:"',controller:["FinancialReportsService","$q",function(e,t){var n=this;n.dtConfig={format:"MM/dd/yy",mask:"99/99/99",shortcutPropagation:!0},n.$onInit=function(){(n.firstUnclosedDate?t.resolve(n.firstUnclosedDate):e.getFirstUnclosedDateForSelectedTaxpayer()).then(n.setDefaults),void 0===n.required&&(n.required=!0)},n.$onChanges=function(e){e.disabled&&e.disabled.previousValue&&!e.disabled.currentValue?(n.postDate=null,n.setDefaults(n.firstUnclosedDate)):e.postDate&&n.updatePostDate(e.postDate.currentValue)},n.updatePostDate=function(e){!e||i.default.isDate(e)?n.postDate=e:(n.postDate=r.default.utc(e).toDate(),n.onChange({postDate:n.postDate})),n.disabled&&(n.dtConfig.minDate=n.postDate,n.dtConfig.maxDate=n.postDate)},n.setDefaults=function(e){var t=o.default.getUTCDateWithStartOfDay(),i=(0,r.default)(e),a=(0,r.default)(n.postDate);n.postDate&&a.isValid()&&(!i.isValid()||!a.isBefore(i))||(n.postDate=t,n.onChange({postDate:n.postDate})),i.isValid()&&(n.dtConfig.minDate=i.toDate()),n.dtConfig.maxDate=t}}]}).factory("CliaCode",ge).name;t.billServicesModule=t.moduleName=ve;var Te=ve;t.default=Te},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.patientFinancialsServicesModule=t.moduleName=void 0;var i=b(n(1)),a=b(n(3)),r=b(n(6)),o=b(n(13)),s=b(n(51));n(1440),n(44),n(132),n(124),n(135),n(452);var c=b(n(1618)),l=n(311),d=n(831),p=n(2987),u=n(49),m=n(453),f=n(1619);function b(e){return e&&e.__esModule?e:{default:e}}O.$inject=["$resource"],M.$inject=["EmaModalNg","PatientStatementResource"],h.$inject=["$resource","stickyUtil","$http"];var A=i.default.module("patientFinancialsServices",["feeSetupServices","ema.modal","referralContactService","bill-charges.service",d.billServiceModule,l.billResponsiblePartyServiceModule,p.patientStatementPdfComponentModule,u.BillServiceModule,m.billResourceModule,f.billSearchServiceModuleLegacy]).factory("MavUnallocatedFunds",O).factory("MavUnallocatedFundsSpecifications",(function(){var e=(0,o.default)().cb();return{isInsuranceUnallocated:function(t){var n=e.p("fundsType").equals("PAYER_CHECK_CLAIM").and(e.p("claimPayerCheckVisible").equals(!0)).and(e.p("unallocatedAmount").notEquals(0));return t&&(t.patientId&&(n=n.and(e.p("claimPayerCheckPatient").equals(t.patientId))),t.taxpayerId&&(n=n.and(e.p("taxpayer").equals(t.taxpayerId)))),n}}})).service("PatientStatementService",M).factory("MavLedgerGroup",h).name;function h(e,t,n){var c=APP.contextPath+"/ws/v3/ledgerGroup",l=s.default.selector().and("id","serviceDate","groupType","provider","location","voided","legacy").select("bill",(function(e){e.and("billId","billIdentifier","totalCharges","totalPayments","totalAdjustments","insBalance","patBalance","balance","responsibleParty","hasUnpostedCharges","hasActivities","serviceDateLd","status"),e.select("items",(function(e){e.and("billItemId","description","additionalInfo","claimPayerCheckType","payerCheckId","charges","serviceDateFrom","serviceDateTo","postDate","voidPostDate","topLevel","patBalance","insBalance","totalBalance","totalPayments","appliedAdjustmentsTotal","responsibleParty","diagnosisPointer","diagnosisDescription","insPmt","insAdj","claimPayerCheckId","paymentPrefix","patPmt","patAdj","linkText","reversed","reversal","reversalState","flagged","provider","insLinkState").end()}))})).select("transaction",(function(e){e.select("items",(function(e){e.and("id","transactionId","patientReceivedPaymentId","serviceDate","timeZone","depositDate","paymentMethod","description","linkText","hoverText","payment","unallocatedRemaining","refund","voided","notes","topLevel","legacy","paymentProcessor","restrictedNotes","hasActivities","provider"),e.select("activities",(function(e){e.and("patientPaymentActivityType","chargeId","reversal","dos","postDate","voidPostDate","voided","details","linkText","hoverText","amount","transactionLogId","notes","restrictedNotes").end()}))}))})).select("charge",(function(e){e.select("items",(function(e){e.and("chargeId","description","charges","actualAmount","tax","discount","balance","payments","adjustments","notes","topLevel","serviceDate","postDate","voidPostDate","categoryName","voided"),e.select("levelTwoItems",(function(e){e.and("componentId","mavTransactionLogId","type","amount","postDate","voidPostDate","reversal","details","linkText","voided","adjustmentCodeType","transactionId").end()}))}))})),d=s.default.selector().and("serviceDate","provider","location").select("bill",(function(e){e.and("billId","billIdentifier","totalCharges","totalPayments","totalAdjustments","insBalance","patBalance","balance","responsibleParty","hasUnpostedCharges","hasActivities","serviceDateLd"),e.select("items",(function(e){e.and("billItemId","description","additionalInfo","claimPayerCheckType","payerCheckId","charges","serviceDateFrom","serviceDateTo","postDate","voidPostDate","topLevel","patBalance","insBalance","totalBalance","totalPayments","appliedAdjustmentsTotal","responsibleParty","diagnosisPointer","diagnosisDescription","insPmt","insAdj","claimPayerCheckId","paymentPrefix","patPmt","patAdj","linkText","reversed","reversal","reversalState","flagged","insLinkState").end()}))})).build();function p(e){var n={stickyData:[]};t.addSticky(n,"patient-ledger","SHOW_VOIDED_TRANSACTIONS",e.showVoided),t.addSticky(n,"patient-ledger","SHOW_UNLINKED_INSURANCE_TRANSACTIONS",e.showUnlinkedInsuranceTransactions),t.addSticky(n,"patient-ledger","SHOW_PAYER_ADJUSTMENTS",e.showPayerAdjustments),t.addSticky(n,"patient-ledger","SHOW_REVERSED_ALLOCATIONS",e.showReversedAllocations),t.addSticky(n,"patient-ledger","SHOW_PLA_POST_TO_SVC_LINES",e.showPostToSvcLines),t.addSticky(n,"patient-ledger","SHOW_PLA_OFFSET_CHARGE",e.showOffsetCharge),t.addSticky(n,"patient-ledger","LEDGER_GROUP_TYPES",e.ledgerGroupTypes),t.addSticky(n,"patient-ledger","EXPAND_ALL_BY_DEFAULT",e.expandAllByDefault),t.saveStickies(n);var i=(0,o.default)().cb(),s=a.default.clone(e.ledgerGroupTypes).filter((function(e){return"TRANSFER"!==e}));e.ledgerGroupTypes.find((function(e){return"TRANSFER"===e}))&&s.push("EXTERNAL_BALANCE_TRANSFER","PATIENT_TRANSFER_SEND","PATIENT_TRANSFER_RECEIVE","BUSINESS_UNIT_TRANSFER_RECEIVE");var c=i.p("groupType").any(s);return a.default.get(APP,"mavFeatureFlags.isMultipleRefundsEnabled",!1)&&(c=s.find((function(e){return"REFUND"===e}))?c.or(i.fn("isRefund")(!0)):c.and(i.fn("isRefund")(!1))),c=c.and(i.p("patient").equals(e.patientId)),e.showVoided||(c=c.and(i.p("voided").equals(!1))),"RANGE"===e.ledgerGroupFilterDateType&&e.startDate&&(e.startDate&&(c=c.and(i.p("dos").greaterEqualThan((0,r.default)(new Date(e.startDate)).utc()))),e.endDate&&(c=c.and(i.p("dos").lessThan((0,r.default)(new Date(e.endDate)).utc().add(1,"days").toDate())))),c.toQuery()}var u=a.default.template('
${note}
'),m=a.default.template('
${restrictedNote}
');return{resource:function(){return e(c,{},{query:{url:c,method:"GET",isArray:!0,params:{selector:l.build(),showPleaseWait:!0}},get:{url:c+"/:id",method:"GET",isArray:!1,params:{showPleaseWait:!0}},print:{url:c+"/print",method:"GET",isArray:!1,params:{showPleaseWait:!0}}})},getListSpec:function(e,t){return{taxpayerId:t,where:p(e),showVoided:e.showVoided,showUnlinkedInsuranceTransactions:e.showUnlinkedInsuranceTransactions,showReversedAllocations:e.showReversedAllocations,showPayerAdjustments:e.showPayerAdjustments,showPostToSvcLines:e.showPostToSvcLines,showOffsetCharge:e.showOffsetCharge,expandAllByDefault:e.expandAllByDefault}},getSingleSpec:function(e,t,n,i){return{id:e,selector:t,showVoided:n.showVoided,showUnlinkedInsuranceTransactions:n.showUnlinkedInsuranceTransactions,showReversedAllocations:n.showReversedAllocations,showPayerAdjustments:n.showPayerAdjustments,showPostToSvcLines:n.showPostToSvcLines,showOffsetCharge:n.showOffsetCharge,showDetails:i}},billItemSelector:d,paymentSelector:"transaction(items(id,transactionId,patientReceivedPaymentId,activities(patientPaymentActivityType,chargeId,reversal,dos,postDate,voidPostDate,voided,details,linkText,hoverText,amount,transactionLogId,notes,restrictedNotes)))",loadStickyFilterBean:function(){return t.loadStickies("patient-ledger",i.default.noop).then((function(e){return{ledgerGroupTypes:t.findStickyValue(e.data,"LEDGER_GROUP_TYPES",["BILL","TRANSACTION","CHARGE","TRANSFER"]),showVoided:t.findStickyValue(e.data,"SHOW_VOIDED_TRANSACTIONS",!1),showUnlinkedInsuranceTransactions:t.findStickyValue(e.data,"SHOW_UNLINKED_INSURANCE_TRANSACTIONS",!0),showPayerAdjustments:t.findStickyValue(e.data,"SHOW_PAYER_ADJUSTMENTS",!0),showReversedAllocations:t.findStickyValue(e.data,"SHOW_REVERSED_ALLOCATIONS",!0),showPostToSvcLines:t.findStickyValue(e.data,"SHOW_PLA_POST_TO_SVC_LINES",!0),showOffsetCharge:t.findStickyValue(e.data,"SHOW_PLA_OFFSET_CHARGE",!0),expandAllByDefault:t.findStickyValue(e.data,"EXPAND_ALL_BY_DEFAULT",!1)}}))},getTransactionNotes:function(e){var t="";return e.notes&&(t=t.concat(u({note:e.notes}))),e.restrictedNotes&&(t=t.concat(m({restrictedNote:e.restrictedNotes}))),t},getPrintHtml:function(e){return n({url:c+"/print",params:e,method:"GET"}).then(a.default.property("data"))}}}function M(e,t){function n(e){return"QUEUED"===e.status||"QUEUED_HELD"===e.status}return{displayPatientStatementPdf:function(t){return e.open("Patient Statement Detail",{template:c.default,size:"lg",controller:["$uibModalInstance",function(){var e=this;e.statementId=t.statementId,e.buttons=t.buttons,e.setStatementId=a.default.setter(e,"statementId")}],controllerAs:"$ctrl"},{analyticsPage:"/viewPatientStatementPreview",description:"Patient Statement Preview Modal"})},isQueued:n,getStatementClass:function(e,t,i){var r=[];return"FAILED"===e.status?r.push("warning"):"QUEUED_SCRUB_FAILED"===e.status?r.push("danger"):"HOLD"===i&&n(e)&&r.push("queued-held"),t>0&&n(e)&&r.push("unallocated-balance"),a.default.join(r," ")},saveStatementNote:function(e,n){return t.saveStatementNote({id:e,note:n})},getLastStatementSent:function(e,n){return t.getLastStatementSent({patientId:e,businessUnitId:n})}}}function O(e){var t=APP.contextPath+"/ws/v3/funds/unallocated";return e(t+"/:id",{},{query:{url:t,method:"GET",isArray:!0}})}t.patientFinancialsServicesModule=t.moduleName=A},function(e,t,n){e.exports=n(11)(866)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.userPrivilegeServicesModule=void 0;var i=c(n(1)),a=c(n(51)),r=c(n(0)),o=c(n(13));n(2986);var s=c(n(1595));function c(e){return e&&e.__esModule?e:{default:e}}m.$inject=["$uibModalInstance","user","priviliges","selfPriviliges","licenseInfo"],u.$inject=["EmaModalNg","userPrivilegeService"];var l=i.default.module("ema.userPrivilegeServices",["radioGroupButton.component"]),d=(0,o.default)().cb();function p(e){var t=APP.contextPath+"/ws/v3/admin/analytics";return{firmAnalyticsLicenses:function(){return e({url:t+"/licenses/staff",method:"GET"}).then(r.default.property("data"))}}}function u(e,t){var n={analyticsPage:"/discreetPermissionModal",description:"Discreet Permission"};return{openBulk:function(t,a,o,c){return e.open("Bulk Actions",{controllerAs:"$ctrl",width:500,controller:["$uibModalInstance",function(e){var n=this,s="FINANCIALS",l="NON_FINANCIALS",d="MY_LOCATIONS",p="ANALYTICS_BASIC",u="ANALYTICS_PREMIUM",m="DERMATOPATHOLOGIST",f="COMMISSION_REPORTS",b=["STATE_REPORTS","ENTERPRISE_REPORTS","MMIM_ANALYTICS","PATIENT_ENGAGEMENT_ANALYTICS"];function A(){return(0,r.default)(n.users).filter((function(e){return"TIER_3"===e.role.tier||e.role.name===m})).value()}function h(){return(0,r.default)(n.users).filter((function(e){return"TIER_2"===e.role.tier&&e.role.name!==m})).value()}function M(){var e=(0,r.default)(c).find((function(e){return e.object.name===u})),t=(0,r.default)(n.users).flatMap((function(e){return r.default.values(e.privilegeChanges)})),i=t.flatMap((function(e){return e.toAdd})).compact().filter((function(e){return e.name===u})).value(),a=t.flatMap((function(e){return e.toRemove})).compact().filter((function(e){return e.name===u})).value();return e.used-a.length+i.length}function O(e,t,n,i,a){return{label:e,selected:t,privilege:n,show:!1,choiceId:i}}function y(e){var t=(0,r.default)(n.privileges).find((function(t){return t.name===e.name})),i=(0,r.default)(n.selfPriviliges).find((function(t){return t.name===e.name}));return t||i}n.addingClinicalAnalytics=!1,n.privileges=i.default.copy(a),n.selfPriviliges=i.default.copy(o),n.privilegeChanges={},n.users=i.default.copy(t),n.licenseInfo=i.default.copy(c),n.isBulk=!0,n.privligeContainer={},n.$onInit=function(){n.privligeContainer=(0,r.default)(n.privileges).filter((function(e){return n.isNotQlikPrivilege(e)})).map((function(e){var t=Math.random(),i=[];if(i.push(O("None",!1,e,t)),(A().length>0&&b.indexOf(e.name)<0||e.name===f&&h().length>0)&&i.push(O("My Data",!1,function(e){return(0,r.default)(n.selfPriviliges).find((function(t){return t.name==="".concat(e.name,"_SELF")}))}(e),t)),e.name===p&&h().length>0){var a=function(e){var t=[],i=O("Non-Financials",!1,n.privileges.NON_FINANCIALS,e),a=O("Financials",!1,n.privileges.FINANCIALS,e);return t.push(i,a),t}(t),o=function(e){var t=[],i=O("My Locations",!1,n.privileges.MY_LOCATIONS,e),a=O("All Locations",!0,null,e);return t.push(i,a),t}(t);i.push(function(e,t,n,i,a){return{label:e,selected:t,childs:n,locationChilds:i,choiceId:a}}("Custom",!1,a,o,t))}return i.push(O("All Data",!1,e,t)),{choices:i,label:e.localizedMessage}})).value(),(0,r.default)(n.users).forEach((function(e){e.privilegeChanges={}}))},n.submit=function(){e.close(n.users)},n.cancel=function(){e.dismiss()},n.shouldBulkChange=function(e,t){var i=e.choices;if(t&&!t.target.checked){i.forEach((function(e){return e.selected=!1}));var a=i[0];a.selected=!1,"Clinical Analytics"===e.label&&(n.addingClinicalAnalytics=!1),(0,r.default)(n.users).forEach((function(e){e.privilegeChanges[a.choiceId]&&(e.privilegeChanges[a.choiceId].toRemove=[],e.privilegeChanges[a.choiceId].toAdd=[])}))}else n.buildButtonAttributes(i[0])},n.isNotQlikPrivilege=function(e){return e.name!==s&&e.name!==l&&e.name!==d},n.addClinicalAnalytics=function(e){"Custom"!==e.label&&("None"!==e.label&&e.privilege.name.includes(u)?n.addingClinicalAnalytics=!0:n.addingClinicalAnalytics=!1)},n.buildButtonAttributes=function(e){n.addClinicalAnalytics(e),(0,r.default)(n.users).filter((function(t){return e.selected})).forEach((function(t){if(t.privilegeChanges[e.choiceId]={toRemove:[],toAdd:[]},("None"===e.label||"All Data"===e.label)&&e.privilege.name===p){var i=n.getPrivilegeByName(t.privileges,s),a=n.getPrivilegeByName(t.privileges,l),o=n.getPrivilegeByName(t.privileges,d);i&&t.privilegeChanges[e.choiceId].toRemove.push(i),a&&t.privilegeChanges[e.choiceId].toRemove.push(a),o&&t.privilegeChanges[e.choiceId].toRemove.push(o)}if("None"===e.label){var c=(0,r.default)(t.privileges).filter((function(t){return t.name.includes(e.privilege.name.replace("_SELF",""))}));(0,r.default)(c).forEach((function(n){var i=y(n);i&&t.privilegeChanges[e.choiceId].toRemove.push(i)}))}else if("All Data"===e.label){var u=(0,r.default)(t.privileges).find((function(t){return t.name.includes("".concat(e.privilege.name,"_SELF"))})),b=(0,r.default)(t.privileges).find((function(t){return t.name===e.privilege.name}));if(u){var A=y(u);t.privilegeChanges[e.choiceId].toRemove.push(A)}b||t.privilegeChanges[e.choiceId].toAdd.push(e.privilege)}else if("My Data"===e.label&&("TIER_3"===t.role.tier||t.role.name===m)||"TIER_2"===t.role.tier||e.privilege.name===f){var h=(0,r.default)(t.privileges).find((function(t){return t.name===e.privilege.name}));if(!(0,r.default)(t.privileges).find((function(t){return t.name===e.privilege.name.replace("_SELF","")}))){var M=(0,r.default)(n.privileges).find((function(t){return t.name===e.privilege.name.replace("_SELF","")}));t.privilegeChanges[e.choiceId].toAdd.push(M)}h||t.privilegeChanges[e.choiceId].toAdd.push(e.privilege)}else if("Custom"===e.label&&"TIER_2"===t.role.tier&&t.role.name!==m){(0,r.default)(t.privileges).find((function(e){return e.name.includes(p)}))||function(e,t,i){if(i){var a=function(e){var t=(0,r.default)(n.privileges).find((function(t){return t.name===e})),i=(0,r.default)(n.selfPriviliges).find((function(t){return t.name===e}));return t||i}(i);e.privilegeChanges[t.choiceId].toAdd.push(a)}}(t,e,p),e.childs.forEach((function(n){var i=(0,r.default)(t.privileges).find((function(e){return e.name===n.privilege.name}));n.selected?t.privilegeChanges[e.choiceId].toAdd.push(n.privilege):i&&t.privilegeChanges[e.choiceId].toRemove.push(n.privilege)}));var O=e.locationChilds[0],g=(0,r.default)(t.privileges).find((function(e){return e.name===O.privilege.name}));O.selected?t.privilegeChanges[e.choiceId].toAdd.push(O.privilege):g&&t.privilegeChanges[e.choiceId].toRemove.push(O.privilege)}})),n.privilegeChanges[e.choiceId]=e},n.showMixedError=function(e){var t=(0,r.default)(e).find((function(e){return"My Data"===e.label&&e.selected})),i=A();return t&&i.length>0&&i.length!==n.users.length},n.showCustomLicenseInformation=function(e){var t=(0,r.default)(e).find((function(e){return"Custom"===e.label&&e.selected})),i=h();return t&&i.length>0&&i.length!==n.users.length},n.getLicenseInformation=function(e){var t=A();if("Commission Reports"===e.label){var n=h();t=t.concat(n)}var i=(0,r.default)(t).map((function(e){return'"'.concat(e.lastName,",").concat(e.firstName,'"')})).sort().join(", ");return"My Data will only apply to ".concat(t.length," user").concat(t.length>1?"s":"",":\n").concat(i)},n.getCustomLicenseInformation=function(){var e=h(),t=(0,r.default)(e).map((function(e){return'"'.concat(e.lastName,",").concat(e.firstName,'"')})).sort().join(", ");return"These permissions will only apply to ".concat(e.length," user").concat(e.length>1?"s":"",":
\n").concat(t)},n.getPrivilegeByName=function(e,t){var n=(0,r.default)(e).find((function(e){return e.name===t}));return n?y(n):null},n.disabledSubmit=function(){var e=(0,r.default)(c).find((function(e){return e.object.name===u}));return M()>e.total&&n.addingClinicalAnalytics},n.licenseError=function(){var e=(0,r.default)(c).find((function(e){return e.object.name===u}));return"License limit of ".concat(e.total," exceeded by ").concat(M()-e.total," for Clinical Analytics")},n.isSelectionInvalid=function(){var e=r.default.values(n.privilegeChanges),t=(0,r.default)(e).find((function(e){return e.hasOwnProperty("childs")}));if(t){var i=!1;return t.childs.forEach((function(e){!0===e.selected&&(i=!0)})),!i}return!1}}],template:s.default},n)},openSingle:function(t,i,a,o){return e.open("".concat(t.lastName,", ").concat(t.firstName," - User Permissions"),{controllerAs:"$ctrl",width:400,controller:m,resolve:{user:r.default.constant(t),priviliges:r.default.constant(i),selfPriviliges:r.default.constant(a),licenseInfo:r.default.constant(o)},template:s.default},n)}}}function m(e,t,n,a,o){var s=this,c="FINANCIALS",l="NON_FINANCIALS",d="MY_LOCATIONS",p="ANALYTICS_BASIC",u=["STATE_REPORTS","MMIM_ANALYTICS","ENTERPRISE_REPORTS","PATIENT_ENGAGEMENT_ANALYTICS"];function m(e,t){if(t){var n=b(t);e.toRemove.push(n)}}function f(e){if(e.privilege.name==p){var t=(0,r.default)(s.user.privileges).find((function(e){return e.name.includes(c)})),n=(0,r.default)(s.user.privileges).find((function(e){return e.name.includes(l)}));m(e,(0,r.default)(s.user.privileges).find((function(e){return e.name.includes(d)}))),m(e,t),m(e,n)}}function b(e){var t=(0,r.default)(s.privileges).find((function(t){return t.name===e.name})),n=(0,r.default)(s.selfPriviliges).find((function(t){return t.name===e.name}));return t||n}function A(e){var t=(0,r.default)(s.user.privileges).find((function(t){return t.name===e.name}));if(!r.default.isNil(t))return t;var n=h(e);return r.default.isNil(n)?e:n}function h(e){return(0,r.default)(s.selfPriviliges).find((function(t){return t.name==="".concat(e.name,"_SELF")}))}function M(e){return!!(0,r.default)(s.user.privileges).find((function(t){return t.name===e}))}function O(e,t,n,i,a){return{label:e,selected:t,privilege:n,choiceId:i,tooltip:a}}s.customValid=!0,s.privileges=i.default.copy(n),s.selfPriviliges=i.default.copy(a),s.user=i.default.copy(t),s.privligeContainer={},s.privilegeChanges={},s.isBulk=!1,s.isNotQlikPrivilege=function(e){return e.name!==c&&e.name!==l&&e.name!==d},s.$onInit=function(){s.privligeContainer=(0,r.default)(s.privileges).filter((function(e){return s.isNotQlikPrivilege(e)})).map((function(e){var n=Math.random(),i=M(e.name),a=M("".concat(e.name,"_SELF")),r=[],o=!i&&!a,m=a&&i,f=i&&!a;if(e.name===p&&"TIER_2"===t.role.tier&&"DERMATOPATHOLOGIST"!==t.role.name){var b=[],y=[],g=M(d),E=M(c),v=M(l),T=E||v,_=O("Non-Financials",v,s.privileges.NON_FINANCIALS,n,null),I=O("Financials",E,s.privileges.FINANCIALS,n,null),S=O("My Locations",g,s.privileges.MY_LOCATIONS,n,"Allows the user to access data for all of their locations, as listed under the user account in practice settings."),P=O("All Locations",!g,null,n,null);b.push(_,I),y.push(S,P),r.push(O("None",o&&!T,e,n,null)),r.push(function(e,t,n,i,a,r){return{label:e,selected:t,childs:n,locationChilds:i,choiceId:a,tooltip:r}}("Custom",T,b,y,n,null)),r.push(O("All Data",f&&!T,e,n,null))}else"COMMISSION_REPORTS"!==e.name||"TIER_2"!==t.role.tier&&"TIER_3"!==t.role.tier||"DERMATOPATHOLOGIST"===t.role.name?(r.push(O("None",o,A(e),n,null)),function(e,t){var n="TIER_3"===e.role.tier||"DERMATOPATHOLOGIST"===e.role.name;return u.indexOf(t.name)<0&&n}(t,e)&&r.push(O("My Data",m,h(e),n,null)),r.push(O("All Data",f,e,n,null))):(r.push(O("None",o,A(e),n,null)),r.push(O("My Data",m,h(e),n,null)),r.push(O("All Data",f,e,n,null)));return{choices:r,label:e.localizedMessage}})).value()},s.buildButtonAttributes=function(e){if(e.toRemove=[],e.toAdd=[],"None"===e.label){var t=(0,r.default)(s.user.privileges).filter((function(t){return t.name.includes(e.privilege.name.replace("_SELF",""))}));(0,r.default)(t).forEach((function(t){var n=b(t);m(e,n)})),f(e)}else if("All Data"===e.label){var n=(0,r.default)(s.user.privileges).find((function(t){return t.name.includes("".concat(e.privilege.name,"_SELF"))}));m(e,n),f(e),(0,r.default)(s.user.privileges).find((function(t){return t.name===e.privilege.name}))||e.toAdd.push(e.privilege)}else if("Custom"===e.label||"Non-Financials"===e.label){(0,r.default)(s.user.privileges).find((function(e){return e.name.includes(p)}))||function(e,t){if(t){var n=function(e){return(0,r.default)(s.privileges).find((function(t){return t.name===e}))}(t);e.toAdd.push(n)}}(e,p),function(e){e.childs.forEach((function(e){e.toRemove=[],e.toAdd=[];var t=(0,r.default)(s.user.privileges).find((function(t){return t.name===e.privilege.name}));e.selected?e.toAdd.push(e.privilege):t&&e.toRemove.push(e.privilege)}))}(e),function(e){var t=e.locationChilds[0];t.toRemove=[],t.toAdd=[];var n=(0,r.default)(s.user.privileges).find((function(e){return e.name===t.privilege.name}));t.selected?t.toAdd.push(t.privilege):n&&t.toRemove.push(t.privilege)}(e)}else if("My Data"===e.label){var i=(0,r.default)(s.user.privileges).find((function(t){return t.name===e.privilege.name}));if(!(0,r.default)(s.user.privileges).find((function(t){return t.name===e.privilege.name.replace("_SELF","")}))){var a=(0,r.default)(s.privileges).find((function(t){return t.name===e.privilege.name.replace("_SELF","")}));e.toAdd.push(a)}i||e.toAdd.push(e.privilege)}s.privilegeChanges[e.choiceId]=e},s.getTotalLicense=function(){var e=(0,r.default)(o).find((function(e){return"ANALYTICS_PREMIUM"===e.object.name}));if(e)return e.total},s.disabledSubmit=function(){var e=r.default.values(s.privilegeChanges),t=(0,r.default)(o).find((function(e){return"ANALYTICS_PREMIUM"===e.object.name})),n=(0,r.default)(e).find((function(e){return e.hasOwnProperty(e.privilege)&&e.privilege.name.includes("ANALYTICS_PREMIUM")}));return!r.default.isNil(n)&&"None"!==n.label&&0!==n.toAdd.length&&(!!(0,r.default)(n.toAdd).find((function(e){return"ANALYTICS_PREMIUM"===e.name}))&&t.used>=t.total)},s.isSelectionInvalid=function(){var e=r.default.values(s.privilegeChanges),t=(0,r.default)(e).find((function(e){return e.hasOwnProperty("childs")}));if(t){var n=!1;return t.childs.forEach((function(e){!0===e.selected&&(n=!0)})),!n}return!1},s.submit=function(){var t=r.default.values(s.privilegeChanges);e.close(t)},s.cancel=function(){e.dismiss()},s.isAllowedPrivilege=function(e){return userPrivilegeService.isAllowedPrivilege(e.name,s.user)}}l.factory("userPrivilegeUtils",["$q","EmaModalServices","emaNotification","userPrivilegeService",function(e,t,n,i){var a=d.p("role").none(["ADMINISTRATOR","RCM","JUNIOR_ADMINISTRATOR","PATHOLOGY_ADMINISTRATOR","ASSISTANT_ADMINISTRATOR"]).and(d.p("accountExpired").notEquals("true")).and(d.p("visible").equals("true"));function o(e){return r.default.partial(i.hasPrivilege,e)}return{showUnauthorizedNotification:function(a,o){return i.getPrivilegeEnums().then((function(i){var s="Not Authorized",c=r.default.get(i.privileges[a.privilege],"localizedMessage"),l="Contact administrator to obtain permission";return o?t.openNotificationModal({title:s,notifications:[{text:l+":",center:!0},{text:c,center:!0}],cancelButton:!1}).result.catch((function(){return!0})):(n.showNotification(s+" - "+l+": "+c,{type:"error",duration:5e3}),e.resolve(!0))}))},hasPatientFinancialsPrivilege:o("PM_PATIENT_FINANCIALS_BASIC"),hasPatientBillingPrivilege:o("PM_PATIENT_FINANCIALS_MANAGE_BILLING"),hasPatientLedgerPrivilege:o("PM_PATIENT_FINANCIALS_MANAGE_LEDGER"),hasPatientPaymentsPrivilege:o("PM_PATIENT_FINANCIALS_MANAGE_PAYMENTS"),hasPatientStatementsPrivilege:o("PM_PATIENT_FINANCIALS_MANAGE_STATEMENTS"),hasFirmFinancialsPrivilege:o("PM_FIRM_FINANCIALS_HOME"),hasFirmKeyMetricsPrivilege:o("PM_FIRM_FINANCIALS_KEY_METRICS"),hasFirmPaymentsPrivilege:o("PM_FIRM_FINANCIALS_MANAGE_PAYMENTS"),hasFirmStatementsPrivilege:o("PM_FIRM_FINANCIALS_MANAGE_STATEMENTS"),hasFirmReconClosingPrivilege:o("PM_FIRM_FINANCIALS_RECON_CLOSING_REPORTS"),hasStateReportViewPrivilege:o("STATE_REPORTS"),getRoleBasedUserSpec:function(){return a}}}]),l.factory("userPrivilegeService",["$resource","$q","$http","EnumService",function(e,t,n,i){var o=a.default.selector().and("username").select("privileges",(function(e){e.and("name")})).select("role",(function(e){e.and("name","tier")})).build(),s=APP.contextPath+"/ws/v3/admin/staff",c=e(s,{selector:o},{updatePrivileges:{url:s+"/privileges",method:"POST"}});function l(e){return"RCM"===(r.default.result(e,"role")||{name:APP.loggedInUserRole}).name}var d=function(e,n,i){function a(){return l(i)||u(e,i)&&p({name:e},i.privileges)}return i=i||{privileges:r.default.map(APP.loggedInUserPrivileges,(function(e){return{name:e}}))},n?f().then(a).then((function(n){return n||t.reject({reason:"NOT_AUTHORIZED",privilege:e})})):a()};function p(e,t){return r.default.some(t,{name:e.name})}function u(e,t){var n,i=(n=e,r.default.find(m.privileges,{name:n}));return i&&r.default.reduce(i.required,(function(e,n){return e&&d(n,!1,t)}),!0)}var m={},f=r.default.memoize((function(){return i.load({enums:{privileges:"com.m2.domain.enums.Privilege",privilegeTypes:"com.m2.domain.enums.PrivilegeType",roles:"com.m2.domain.enums.Role"},target:m,indexed:!0,showPleaseWait:!1})}));return f(),{Staff:c,getPrivilegeEnums:f,isRcmUser:l,hasPrivilege:d,containsPrivilege:p,isAllowedPrivilege:u,getAvailablePrivilegeTypes:function(){return n.get(APP.contextPath+"/ws/v3/admin/staff/privileges/types",{params:{showPleaseWait:!0}}).then(r.default.property("data"))},getAvailablePrivilegeLicenses:function(){return n.get(APP.contextPath+"/ws/v3/admin/staff/privileges/licenses",{params:{showPleaseWait:!0,selector:"object(name,value,type)"}}).then(r.default.property("data"))},updateLicensedPrivilege:function(e){return n.post(s+"/licensed/privileges",e,{params:{showPleaseWait:!0,selector:"object(id,name)"}}).then((function(e){return e.data}))},isAnalyticsUser:function(e){return"ANALYTICS"===(r.default.result(e,"role")||{name:APP.loggedInUserRole}).name},findUser:function(e){return n.get(s,{params:{selector:o,where:e,"paging.pageSize":10,"sorting.sortBy":"lastName","sorting.sortOrder":"asc"}}).then((function(e){return e.data}))}}}]),p.$inject=["$http"],l.factory("analyticsLicensesService",["$http",p]),l.factory("DiscreetPermissionsModal",u);var f=l.name;t.userPrivilegeServicesModule=f;var b=l;t.default=b},function(e,t,n){"use strict";var i,a,r=s(n(1433)),o=s(n(273));function s(e){return e&&e.__esModule?e:{default:e}}i=[n(1),n(7),n(805),n(8),n(3),n(48),n(10),n(1289),n(321),n(71),n(19),n(1579),n(30)],void 0===(a=function(e,t,i,a,s,c){function l(t,n){return{restrict:"E",require:["?^form"],replace:!0,scope:!1,compile:function(){return function(i,a,r,o){var c=r.fieldMessages;if(s.isUndefined(o[0].$name))throw new Error("Form must have a name attribute");if(s.isUndefined(r.fieldName))throw new Error("emaValidationError directive must have a fieldName attribute");var l=o[0].$name,d=l+"."+r.fieldName,p='
';s.each(n,(function(e,t){p+=''+e+""}));var u=c?i.$eval(c):new Object;s.each(u,(function(e,t){p+=''+e+""}));var m=e.element(p);t(m)(i),a.replaceWith(m)}}}}function d(e){return{restrict:"E",require:"ngModel",replace:!0,template:'',scope:{label:"@",showPulseIndicator:"="},link:function(t,n,i){if(t.$watch("showPulseIndicator",(function(){t.showPulseIndicator&&(n.before(''),e((function(){n.prev().remove()}),1800),t.showPulseIndicator=!1)})),t.label){var a='