{"version":3,"file":"aprimanow.min.js","sources":["../../modules/app/app.js","../../modules/app/app.approutes.js","../../modules/app/app.templates.js","../../modules/app/components/apPatientPortal.js","../../modules/app/components/apPrintablePracticeInfo.js","../../modules/app/controllers/AboutSettingsCtrl.js","../../modules/app/controllers/ApiDocumentationGatekeeperModalCtrl.js","../../modules/app/controllers/AppointmentListSettingsCtrl.js","../../modules/app/controllers/LandingCtrl.js","../../modules/app/controllers/LoginCtrl.js","../../modules/app/controllers/LoginSettingsCtrl.js","../../modules/app/controllers/MessageListSettingsCtrl.js","../../modules/app/controllers/StatementsLoginCtrl.js","../../modules/app/controllers/TokenLoginCtrl.js","../../modules/app/controllers/UserSettingsCtrl.js","../../modules/app/controllers/ViewApiDocumentModalCtrl.js","../../modules/app/controllers/ViewDocumentModalCtrl.js","../../modules/app/controllers/modals/PracticeTermsModalCtrl.js","../../modules/app/controllers/modals/PrivacyPolicyModalCtrl.js","../../modules/app/controllers/navigation/NavigationAppointmentsCtrl.js","../../modules/app/controllers/navigation/NavigationBillingCtrl.js","../../modules/app/controllers/navigation/NavigationDoctorsCtrl.js","../../modules/app/controllers/navigation/NavigationFormsCtrl.js","../../modules/app/controllers/navigation/NavigationMessagesCtrl.js","../../modules/app/controllers/navigation/NavigationPrescriptionsCtrl.js","../../modules/app/directives/apDatePicker.js","../../modules/app/directives/apFormAttachment.js","../../modules/app/directives/apLoginBackground.js","../../modules/app/directives/apMessageAttachment.js","../../modules/app/directives/apSavePdfToFile.js","../../modules/app/directives/apSaveStringToFile.js","../../modules/app/directives/apSelectFile.js","../../modules/app/directives/apSelectImage.js","../../modules/app/directives/inputfileOnchange.js","../../modules/app/filters/apPatientPortalThumbnailSrc.js","../../modules/app/notifications/NotificationRepository.js","../../modules/app/notifications/NotificationService.js","../../modules/app/partials/desktopRuler/directives/apDesktopRuler.js","../../modules/app/partials/footer/directives/apFooter.js","../../modules/app/partials/header/directives/apHeader.js","../../modules/app/partials/mobileNav/directives/apMobileNav.js","../../modules/app/partials/toolbar/directives/apToolbar.js","../../modules/app/services/ContentAttributeRepository.js","../../modules/app/services/ContentAttributeService.js","../../modules/app/services/GatewayFactory.js","../../modules/app/services/LoginAssistanceRepository.js","../../modules/app/services/LoginFactory.js","../../modules/app/services/MimeTypeRepository.js","../../modules/app/services/PatientPortalStorageRepository.js","../../modules/app/services/SessionService.js","../../modules/account/app.js","../../modules/account/app.approutes.js","../../modules/account/app.templates.js","../../modules/account/controllers/AccountActivationCtrl.js","../../modules/account/controllers/AccountActivationRequestCtrl.js","../../modules/account/controllers/AccountDetailsCtrl.js","../../modules/account/controllers/AccountSetupCtrl.js","../../modules/account/controllers/AccountValidationCtrl.js","../../modules/account/controllers/AprimaConditionsCtrl.js","../../modules/account/controllers/ChangePasswordCtrl.js","../../modules/account/controllers/CreateAccountCtrl.js","../../modules/account/controllers/EmailOptOutCtrl.js","../../modules/account/controllers/EmailOptOutLayoutCtrl.js","../../modules/account/controllers/ForgotPasswordCtrl.js","../../modules/account/controllers/LoginConsentCtrl.js","../../modules/account/services/AccountRepository.js","../../modules/account/services/ConsentService.js","../../modules/rxrefills/app.js","../../modules/rxrefills/app.approutes.js","../../modules/rxrefills/app.templates.js","../../modules/rxrefills/controllers/RxRefillCtrl.js","../../modules/rxrefills/services/PrescriptionsService.js","../../modules/rxrefills/services/RxRefillRepository.js","../../modules/mychart/app.js","../../modules/mychart/app.approutes.js","../../modules/mychart/app.templates.js","../../modules/mychart/components/apPrintablePatientInfo.js","../../modules/mychart/contollers/ChartConsentCtrl.js","../../modules/mychart/contollers/ImmunizationsCtrl.js","../../modules/mychart/contollers/LabResultsCtrl.js","../../modules/mychart/contollers/MedicationAllergiesCtrl.js","../../modules/mychart/contollers/MyChartCtrl.js","../../modules/mychart/contollers/PatientDocumentsCtrl.js","../../modules/mychart/contollers/PersonalDetailsCtrl.js","../../modules/mychart/contollers/ProblemsCtrl.js","../../modules/mychart/contollers/ProceduresCtrl.js","../../modules/mychart/contollers/ReferenceMaterialCtrl.js","../../modules/mychart/contollers/ShareCCDCtrl.js","../../modules/mychart/contollers/VisitSummaryCtrl.js","../../modules/mychart/contollers/modals/CcdAccessLogModalCtrl.js","../../modules/mychart/contollers/modals/CcdTransmitModalCtrl.js","../../modules/mychart/contollers/modals/CompleteChartModalCtrl.js","../../modules/mychart/contollers/modals/GenericModalCtrl.js","../../modules/mychart/contollers/modals/ImmunizationModalCtrl.js","../../modules/mychart/contollers/modals/LabResultPrintDownloadModalCtrl.js","../../modules/mychart/contollers/modals/ObservationOrderPrintDownloadModalCtrl.js","../../modules/mychart/contollers/modals/PharmacyModalCtrl.js","../../modules/mychart/contollers/modals/ReferenceMaterialPrintDownloadModalCtrl.js","../../modules/mychart/directives/apImmunizationCard.js","../../modules/mychart/services/ChartRepository.js","../../modules/mychart/services/MyChartService.js","../../modules/mychart/services/PatientAttachmentRepository.js","../../modules/mychart/services/PersonRepository.js","../../modules/mymessages/app.js","../../modules/mymessages/app.approutes.js","../../modules/mymessages/app.templates.js","../../modules/mymessages/controllers/DisplayMessageThreadCtrl.js","../../modules/mymessages/controllers/DisplayMessagesCtrl.js","../../modules/mymessages/controllers/MyMessagesCtrl.js","../../modules/mymessages/controllers/NewMessageCtrl.js","../../modules/mymessages/services/MyMessagesService.js","../../modules/mymessages/services/myMessagesRepository.js","../../modules/myappointments/app.js","../../modules/myappointments/app.approutes.js","../../modules/myappointments/app.templates.js","../../modules/myappointments/controllers/ConfirmAppointmentCtrl.js","../../modules/myappointments/controllers/MyAppointmentsCtrl.js","../../modules/myappointments/controllers/ScheduleAppointmentCtrl.js","../../modules/myappointments/services/MyAppointmentsRepository.js","../../modules/myappointments/services/MyAppointmentsService.js","../../modules/dashboard/app.js","../../modules/dashboard/app.approutes.js","../../modules/dashboard/app.templates.js","../../modules/dashboard/controllers/AlertsDashboardCtrl.js","../../modules/dashboard/controllers/AppointmentsDashboardCtrl.js","../../modules/dashboard/controllers/BillingDashboardCtrl.js","../../modules/dashboard/controllers/ChartDashboardCtrl.js","../../modules/dashboard/controllers/DashboardCtrl.js","../../modules/dashboard/controllers/FormsDashboardCtrl.js","../../modules/dashboard/controllers/MessagesDashboardCtrl.js","../../modules/dashboard/controllers/PrescriptionsDashboardCtrl.js","../../modules/dashboard/services/DashboardRepository.js","../../modules/dashboard/services/DashboardService.js","../../modules/forms/app.js","../../modules/forms/app.approutes.js","../../modules/forms/app.templates.js","../../modules/forms/controllers/CompleteFormCtrl.js","../../modules/forms/controllers/ConfirmCtrl.js","../../modules/forms/controllers/FormsCtrl.js","../../modules/forms/controllers/PatientQuestionnaireCtrl.js","../../modules/forms/controllers/UpdateFamilyHistoryModalCtrl.js","../../modules/forms/directive/apFormAnswerCheckbox.js","../../modules/forms/directive/apFormAnswerDate.js","../../modules/forms/directive/apFormAnswerNumeric.js","../../modules/forms/directive/apFormAnswerRadiobutton.js","../../modules/forms/directive/apFormAnswerText.js","../../modules/forms/directive/apFormAnswerTimeframe.js","../../modules/forms/directive/apFormQuestion.js","../../modules/forms/directive/apFormQuestionFamilyHistory.js","../../modules/forms/directive/apFormQuestionImmunizationHistory.js","../../modules/forms/directive/apFormQuestionPatientProblemHistory.js","../../modules/forms/directive/apSetFocusEvent.js","../../modules/forms/directive/apTimeFrame.js","../../modules/forms/services/FormsRepository.js","../../modules/forms/services/FormsService.js","../../modules/billing/app.js","../../modules/billing/app.approutes.js","../../modules/billing/app.templates.js","../../modules/billing/controllers/BillingCtrl.js","../../modules/billing/controllers/PaymentFromConsentCtrl.js","../../modules/billing/controllers/PaymentFromNewCardCtrl.js","../../modules/billing/controllers/PaymentOptionsCtrl.js","../../modules/billing/controllers/PaymentSummaryCtrl.js","../../modules/billing/controllers/TransactionCompleteCtrl.js","../../modules/billing/controllers/modals/ConfirmPaymentModalCtrl.js","../../modules/billing/controllers/modals/LedgerModalCtrl.js","../../modules/billing/controllers/modals/ReceiptModalCtrl.js","../../modules/billing/controllers/modals/StatementModalCtrl.js","../../modules/billing/services/BillingRepository.js","../../modules/billing/services/BillingService.js","../../modules/common/init.js","../../modules/common/routeDefs.js"],"names":["angular","module","constant","MessageSubHeader","PracticeName","PracticeTagline","config","IdleProvider","interrupt","autoResume","keepalive","idle","timeout","AppRoutesProvider","$stateProvider","appRoutes","login","state","route","portalSettings","hideToolbar","toolbarItem","tokenLogin","hideHeader","statementslogin","landing","loginsettings","navigationDoctors","setupAppRoutes","url","templateUrl","controller","description","resolve","$title","gettextCatalog","getString","alternativeLoginRoute","run","$templateCache","put","ApPatientPortalDirective","restrict","ApPatientPortalCtrl","$rootScope","$scope","$state","CustomModuleRunService","isLoginView","loginView","onAngularInitialized","current","name","transitionTo","params","reload","inherit","notify","location","vm","loadedAngular","shouldHideFooter","hideFooter","shouldHideToolbar","directive","window","ApPrintablePracticeInfo","ContentAttributeService","activate","getPracticeName","then","data","practiceName","this","component","controllerAs","configuration","LocalStorageRepository","AprimaAnalytics","ServerInfoRepository","sendPageView","clientID","getClientID","versionNumber","CLIENT_VERSION","gitCommitHash","GIT_COMMIT_HASH","gitCommitHashShort","substring","deviceId","getDeviceId","serverVersion","getMobileAssemblyVersion","prmVersion","getPrmAssemblyVersion","databaseVersion","getPrmDatabaseVersion","databaseBuild","getPrmDatabaseBuild","$modalInstance","modalConfig","ok","close","cancel","dismiss","downloadingDocument","model","Title","SettingService","ListService","loadingOption","Description","appointmentDashboardSettings","getAppointmentsListSettings","findById","list","id","_","find","Id","loadSettings","apptOptions","calendars","settings","getList","currentCalendarId","calendarId","appointmentsCalendar","displayEndTime","badgeSettings","getAppointmentsBadgeSettings","hideDischarged","mode","saveAppointmentsTileSettings","setAppointmentsListSettings","updateNativeSettings","saveHideDischargedOption","sendEvent","setAppointmentsBadgeSettings","LoginFactory","TransitionManager","LogOffService","currentUserID","getUserID","logoff","transition","appRoute","$location","$log","gettext","Bridge","ConsentService","GatewayFactory","LoginAssistanceRepository","PatientPortalStorageRepository","SessionService","AccountRepository","toaster","loadPracticeInfo","getPracticeInfo","practiceInfo","practiceTagline","onLoad","getLoginAssistanceInfo","loginProcess","loading","loginForm","$invalid","submitted","userName","password","gateway","prefix","userId","$broadcast","setPatientAuthenticated","getNewPasswordRequired","setDisplayDashboardToolbar","setShowHeaderNavigationMenu","getPracticeConsentAccepted","err","errorMessage","message","createModalAlert","title","buttons","completeAccount","forgotPassword","setUserName","getSecurityQuestions","pop","getLoginAssistanceInformation","loginAssistanceInfo","assistanceInfoLoaded","info","resetSessionParams","removeActivePatient","gateways","map","cloneDeep","GATEWAYS","g","display","getUserName","DEV_HOSTED","getClientConfig","oldClientId","clientId","clearAll","setClientURL","hostUrl","setClientID","$timeout","LanguageFactory","NotificationService","clearClientId","clientid","updateActionMessage","backButton","go","changeLanguage","setLang","values","language","changeClientId","changeNotificationTimeout","interval","notificationTimeout","setNotificationTimeout","stopNotificationTimer","status","actionMessage","getLang","code","getNotificationTimeout","isLanguageOpen","isApplicationInformationOpen","isOtherOpen","languages","getLangOptions","showDebugSettings","options","selectedGroup","messageOptions","messageFilters","currentMessageFilterId","messagesDashboardSettings","messageFilterId","messagesFilter","getMessagesListSettings","saveMessagesTileSettings","setMessagesListSettings","$stateParams","PatientSettingsService","phoneNumberScrubbed","phoneNumber","replace","loginStatementsOnly","birthDate","zipCode","accessCode","toUpperCase","getPatientFeatures","birthDateRegex","phoneRegEx","zipCodeRegex","statementId","token","lodash","usersettings","username","getUserFullName","currentLanguage","filter","getStaticUrl","documentId","GetStaticUrl","loadDocument","requestSettings","loadingDocument","DocumentLoad","downloadDocument","DocumentDownload","EnableDownload","DownloadFileName","DocumentId","HasStaticUrl","DisableInlinePdf","DocumentHelper","ClientID","ClientURL","$sce","loadPracticeTerms","removeHttpError","loginUserId","getPracticeConsent","practiceConsent","ConsentForm","response","addHttpError","loadPrivacyPolicy","getPrivacyPolicyUrl","privacyPolicyUrl","fullName","userID","CurrentUser","FullName","$window","calendar","selectedDate","calendarOptions","disableWeekends","disablePastDates","disabledDates","year","month","days","selectDate","date","setDisabledDates","weekends","day","getDay","isValidDay","enableDay","getMonth","getFullYear","indexOf","getDate","calendarShow","input","inst","selectedDay","d","Date","monthChange","link","elm","datepicker","changeYear","minDate","onChangeMonthYear","beforeShow","beforeShowDay","onSelect","$on","scope","attachmentDto","practiceForm","sending","Data","FileName","MimeType","Extension","selectDocumentModel","selectedFileName","selectedFileContents","selectedMimeType","validationMessage","$watch","newval","oldval","split","$emit","element","css","attachmentDtoList","featureList","maxNumberFiles","PatientMessageAttachment","FileAttachmentConfig","NumberOfFilesThatCanBeAttached","newAttachment","$","each","i","obj","length","push","remove","attachment","splice","BrowserService","_savePdfAsFile","fileNameToSaveAs","base64String","contentType","isBlobCompatible","byteCharacters","atob","byteArray","Array","charCodeAt","byteArrayInt","Uint8Array","textFileAsBlob","Blob","type","saveBlob","document","_onClick","fileName","on","off","_saveTextAsFile","textToWrite","loadText","MimeTypeRepository","maxSizeKb","fileType","loadMaxFileSize","isNaN","messageAttachmentConfig","MaxFileSizeKb","selectFileModel","loadAllowableFileTypes","allowableFileExtensions","AllowableFileExtensions","extensions","forEach","ext","mimeTypes","Types","FileExtension","trim","getMimeTypeFromFileExtension","loadView","isSelectedFileMimeType","selectedFile","isValid","isSelectedFileSizeValid","size","isSelectedFileExtensionValid","extension","inputFileOnchangeCallback","myEventArg","target","files","myInputFileElement","value","$apply","reader","FileReader","onload","e","result","readAsDataURL","selectImageModel","clearSelectedFile","callBack","event","patientId","height","width","factory","AprimaRestangular","getNotifications","uid","restangular","get","one","$interval","updateNotifications","log","moment","format","startNotificationTimer","isDefined","notificationPromise","timeoutInterval","undefined","transclude","$modal","ConsentRepository","contactUs","viewPracticeTerms","modalInstance","open","windowClass","viewPrivacyPolicy","isModalDisplayed","getPrivacyPolicy","downloadPrivacyPolicy","supportsInlinePdf","viewApiDocumentation","getApiDocumentation","downloadApiDocumentation","getClientURL","viewApiDocumentationGatekeeper","DisplayAPIDocumentationModal","PatientAuthenticated","apFooter","downloadAgreementPrivacyPolicy","getPatientAuthenticated","patientAuthenticatedListener","apHeader","openmenu","loginUser","getLoginUser","activePatient","getActivePatient","loginUserFullName","activePatientId","activePatientFullName","patientAuthenticated","showHeaderNavigationMenu","getShowHeaderNavigationMenu","responsibleParties","getActiveResponsibleParties",{"end":{"file":"../../modules/app/partials/header/directives/apHeader.js","comments_before":[],"nlb":false,"endpos":1768,"endcol":49,"endline":31,"pos":1747,"col":28,"line":31,"value":"hasResponsibleParties","type":"name"},"start":{"file":"../../modules/app/partials/header/directives/apHeader.js","comments_before":[],"nlb":false,"endpos":1768,"endcol":49,"endline":31,"pos":1747,"col":28,"line":31,"value":"hasResponsibleParties","type":"name"},"name":"hasResponsibleParties"},"hasResponsibleParties","signOff","toggleMobileNav","setShowMobileNav","getShowMobileNav","setActivePatient","patient","FirstName","LastName","IsPatient","accountDetails","LoginUserFullName","showHeaderMenuListener","ShowHeaderNavigationMenu","headerDataListener","requestor","headerData","responsiblePartyListener","$transitions","AppRoutes","NotificationRepository","GuidList","notifications","Chart","BadgeCount","NotificationType","Count","Messages","IsActive","SendReceiveMessages","Forms","ViewEducationMaterial","Prescriptions","RequestRxRefills","Appointments","ViewAppointments","Billing","ViewPatientStatement","ViewPatientLedger","MakeAPayment","Doctors","loadMobileNav","Welcome","showMobileNav","transitionAndCloseNav","responsiblePartyDataListener","notificationListener","stateChangeListener","onSuccess","toState","targetState","toStateName","showMobileNavListener","loadToolbar","resetToolbarState","blankToolbar","BackToHome","backToHome","navigateToChart","targetAppRoute","opts","ViewClinicalSummary","ViewMedicalHistory","ViewMedications","ViewProcedures","ViewLabTestResults","ViewImmunizations","ViewMedicationAllergies","toolbarButton","getContentAttributes","ClientId","ContentAttributeRepository","$q","AppId","UrlParsingService","getAttributeValue","contentAttributes","attributeValue","attribute","toLowerCase","Value","loadContentAttributes","clientURL","when","forceRefresh","createPracticeInfo","promise","getMessageSubHeading","parsePortalUrl","getPaymentRedirectUrl","absPath","absUrl","partial","path","newPartial","redirectUrl","Restangular","$qHelpers","getServerUrl","gatewayPrefix","clientUrl","deferred","defer","filteredGateways","some","reject","Error","gatewayRequests","whenFirstSuccess","serverInfo","AppServerUrl","loginWithUrl","updateLocalStorage","postLogin","CLIENT_FEATURES","postTokenLogin","loginStatementsOnlyWithUrl","setAccessCode","postStatementsLogin","withConfig","setBaseUrl","setDefaultHeaders","ApiKey","API_KEY","NgxLoginAssistanceRepository","toPromise","VersionService","DashboardService","AprimaCache","updateVersionInfo","userLoginInfo","ProductVersions","PrmAssemblyVersion","setPrmAssemblyVersion","PrmDatabaseVersion","setPrmDatabaseVersion","PrmDatabaseBuild","setPrmDatabaseBuild","AppServiceVersion","setMobileAssemblyVersion","SupportedFeatures","setSupportedFeatures","loginErrorCodes","UnknownError","InvalidRequest","UnknownClientId","LoginFailed","NotMobileUser","InactiveUser","NotAllowedToLogin","PrmVersionUnsupported","MultipleUserAccounts","_clientId","_birthdate","_zipcode","_accessCode","_phoneNumber","clientFeatures","customPOST","BirthDate","ZipCode","DeviceId","AccessCode","PhoneNumber","ClientFeatures","msg","authToken","JsonWebToken","checkVersions","SupportedApiVersions","MinClientVersion","validationSuccesful","warn","trackException","Lists","removeAll","clearKeysOfType","setDeviceId","setJsonWebToken","setBirthDate","setUserFullName","setUserID","setIsPatient","setResponsibleParties","ResponsibleParties","setPracticeConsentAccepted","IsPracticeConcentAccepted","setNewPasswordRequired","IsNewPasswordRequired","changeUserInfo","featuresPromise","loadPatientFeatures","dashboardPromise","loadPatientDashboardFeatures","all","loginSuccess","Username","setIsAccountResponsiblePartyForPatient","IsAccountResponsiblePartyForPatient","responsiblePartyPatient","getActiveResponsibleParty","loginFailure","errorCode","isNumber","ErrorCode","_username","_password","Password","UserId","requestedMimeTypes","types","JSON","stringify","FileExtensions","customGET","storage","firstName","lastName","isPatient","set","getResponsibleParties","activeResponsibleParty","IsActivePerson","activeResponsibleParties","removeResponsibleParties","removeFeatureList","getJsonWebToken","permissions","getUserPermissions","getIsPatient","getIsAccountResponsiblePartyForPatient","sessionParams","NewPasswordRequired","sessionStorage","getItem","PracticeConsentAccepted","DisplayDashboardToolbar","ShowMobileNav","setItem","getDisplayDashboardToolbar","createaccountlayout","emailoptoutlayout","changepassword","emailoptout","forgotpassword","accountActivationRequest","accountActivation","accountvalidation","accountsetup","aprimaconditions","loginconsent","accountdetails","debounce","activateAccount","accountActivationForm","UserNameInUse","userNameLoading","submitLoading","postAccountActivation","accountActivationDto","activateAccountValidation","postAccountActivationIdValidation","WebRegistrationId","activateAccountUserNameValidation","postUserNameValidation","UserName","IsSuccess","getActivatePatientPortalMetadata","back","webRegistrationId","ConfirmPassword","activateAccountRequest","accountRequestValidationForm","Birthdate","question","SelectedAnswerText","postAccountActivationRequest","getActivatePatientPortalRequestMetadata","SurveySectionId","SurveyQuestionId","SectionOptional","QuestionOptional","EmailAddress","MyChartService","getMyChartDetails","getDetails","DateOfBirth","getAccountDetails","accountDetailsDto","LoginUserId","Questions","myChartPromise","getAccountDetailsPromise","updateCredentialsScope","setAnswerToEmptyString","updateSecurityQuestionsAnswersScope","editCredentials","isEditingQuestionAnswers","cancelQuestionAnswers","getCredentialsMetadata","isEditingCredentials","cancelCredentials","loginCredentialsForm","$setPristine","saveCredentials","isSavingCredentials","$valid","putAccountCredentials","securityAccountCredentialsDto","editQuestionAnswers","getSecurityQuestionsAnswersMetadata","securityQuestionAnswersForm","saveQuestionAnswers","isSavingQuestionAnswers","putSecurityQuestionsAnswers","securityAccountQuestionsAnswersDto","selectedQuestionChanged","selectedSecurityQuestion","lstProdParamSecurityQuestion","securityQuestions","Text","OldPassword","NewPassword","initializeAnswer","questionAnswer","DisplayOrder","Answer","$filter","viewSecondaryInsurance","createAccountDto","DriversLicenseNumber","DriversLicenseState","PrimaryInsurance","InsuranceProvider","InsurancePlan","AccountFirstName","AccountLastName","PolicyNumber","GroupNumber","SecondaryInsurance","SecurityQuestions","Question","insurancePlanList","primaryInsuranceImageModel","secondaryInsuranceImageModel","updatePrimaryInsuranceList","primaryInsurancePlansModified","InsuranceCarrierId","InsuranceCarrier","updateSecondaryInsuranceList","secondaryInsurancePlansModified","toggleViewSecondaryInsurance","skip","next","accountValidationDto","PDFPath","finish","submit","changePasswordForm","postChangePassword","confirmNewPassword","getOptOutOfEmaiDetails","Result","invalidAccessCode","postOptOutEmail","processed","IsOptOutPatientMarketing","IsOptOutStatement","loadSecurityQuestions","plain","requestDto","Answers","Question1","Question2","Question3","postForgotPassword","console","loginConsent","IsAccepted","PracticeConsentText","loadPage","practiceConsentPromise","getPrivacyPolicyPromise","disagreeToConsent","submitForm","loginConsentForm","postUserAgreedToPracticeConsent","AgreeToConsentChecked","AprimaConsent","ConsentWarningMessage","AgreeCheckboxText","MetadataRepository","changePasswordDto","emailOptOutDto","activatePatientPortalAccountRequestDto","activatePatientPortalAccountDto","activationId","getMetadata","customPUT","replaceLineBreaksWithHtmlLineBreak","text","returnText","re","RegExp","getAgreementPrivacyPolicyPath","baseurl","SERVER_API_VERSION","Path","apiKey","pdfUrl","trustAsResourceUrl","currentPracticeConsent","trustAsHtml","getChartConsent","currentPatientConsent","PatientId","clearChartConsent","Version","AlwaysDisplayConsent","consentHtml","postChartConsent","setOncePerLoginChartConsent","isChartConsentAccepted","myPatientConsent","getOncePerLoginChartConsent","rxrefill","prescriptions","prescriptionsMobile","isMobile","RxRefillBaseCtrl","autoInit","changePharmacyRoute","changePharmacyRouteOpts","PrescriptionService","updateFilteredPrescriptions","activeFilter","filteredPrescriptions","Medications","item","dateFilter","EndDate","Days","RefillRequestPending","pharmacyFormat","pharmacy","str","Name","Address","Address1","City","State","Zip","changePharmacy","extendPrescriptionList","medications","extendedList","assignIn","SelectedForRefillRequest","getSelectedMedId","RelPatientMedicationId","initialize","pharmaciesPromise","getPharmacies","Pharmacies","selectedPharmacy","IsPreferredPharmacy","toggleMapDisplay","rxRefillsPromise","getRxRefills","splitPrescriptions","partition","medFilters","currentPrescriptions","previousPrescriptions","orderedPrescriptions","concat","auditMedications","reportRequestDto","auditMedicationsLogging","medCheck","med","medSelect","setSelectedMedId","bool","mapDisplay","rxRefillRequest","requestLoading","rxRefills","CreatedById","RequestedPharmacyId","Reason","DrugName","Instructions","ProviderId","putRxRefills","clearSelectedMedId","Phone","LoginUserName","tileState","isCollapsed","toggleState","RxRefillCtrl","RxRefillMobileChartCtrl","openPD","call","viewModal","patientMedicationId","canPrint","modalContent","patientMedication","StartDate","toLocaleDateString","RxRefillMobileCtrl","RxRefillRepository","getDateDiff","startOf","utc1","diff","validDays","saveRxRefills","rxRefillsToSave","expiring","prescriptionsServiceUserId","resetService","pharmacies","selectedMed","setPrescriptionServiceUserId","requestReportDto","postMedicationsAudit","rxRefilRequest","tel","country","city","number","toString","slice","myChart","myChartProblems","myChartPrescriptions","myChartVisitSummary","myChartDocuments","myChartProcedures","myChartLabResults","myChartImmunizations","myChartReferenceMaterial","myChartMedicationAllergies","myChartPersonalDetails","shareCCD","chartConsent","myChartMobile","chartMobileConsent","ApPrintablePatientInfo","details","age","Age","requestedChartRoute","redirectRoute","PatientChartConsent","chartConsentForm","ImmunizationsBaseCtrl","DateUtilities","loadingStartup","getDetailsPromise","getMyChartConfigPromise","getMyChartConfig","results","VaccineCardList","Adult","Config","Pediatric","Misc","patientAge","getPersonAge","vaccineCardType","loadVaccineCard","auditImmunization","loadingVaccineCard","SelectedVaccineCard","getImmunizations","PatientImmunizations","Results","vaccineTypeList","Immunizations","AdministeredDate","Details","ImmunizationsExist","auditImmunizationLogging","modalPrint","patientImmunizations","auditImmunzation","ImmunizationsCtrl","ImmunizationsMobileCtrl","LabResultsBaseCtrl","PersonRepository","PatientAttachmentRepository","getLabResults","labResults","entry","AttachmentInfos","attachmentInfo","assign","Downloading","auditLabResults","viewLabResultAttachment","AttachmentUid","getLabResultAttachment","downloadLabResultAttachmentOriginalFormat","getAttachment","getAttachmentRetainOriginalFormat","downloadLabResultAttachment","viewLabResultObservation","resultId","getObservationOrderPdf","downloadLabResultObservation","labResult","auditLabResultsLogging","LabResultsCtrl","LabResultsMobileCtrl","MedicationAllergiesBaseCtrl","auditMedicationAllergies","auditMedicationAllergiesLogging","getMedicationAllergies","MedicationAllergies","MedicationAllergiesCtrl","MedicationAllergiesMobileCtrl","MyChartBaseCtrl","destinationRoutePrefix","chartConsentRoute","loadMyChart","User","getPatientChartAccepted","isPatientChartAccepted","ShowSidebar","loadController","loadMyChartPromise","getPatientChartAcceptedPromise","currentName","destinationRoute","displayCompleteChart","auditChartResults","viewCompleteChartImage","getCompleteChartImage","downloadCompleteChart","usageMetricSubTypeName","getCompleteChart","updateUsageMetric","auditChartLogging","metricSubTypeName","updateUsageMetricDto","MetricSubTypeName","usageMetricLogging","collapseMedicalHistory","collapsePersonalDetails","MetricTypeName","IncrementFactor","expandPersonalDetails","expandMedicalDetails","showChartSidebarListener","MyChartCtrl","MyChartMobileCtrl","openPersonalDetails","PatientDocumentsCtrl","context","PersonalDetailsBaseCtrl","cancelEdit","updateDetailsRequestDto","edit","plusPhone","editPatientDetailsForm","phoneNumberFormat","addNumbers","editDetails","dto","patientDetail","genderList","Gender","languageList","Language","raceList","Race","maritalStatusList","MaritalStatus","phoneTypeList","PhoneNumber1Type","PhoneNumber2Type","PhoneNumber3Type","PhoneNumber4Type","saveUpdateDetailsRequest","theForm","saving","PhoneNumber1","PhoneNumber2","PhoneNumber3","PhoneNumber4","updateDetails","updateScope","error","hasPhoneNumber","EmailAddress1","EmailAddress2","hasEmailAddress","removePharmacy","index","$setDirty","auditDemographics","auditDemographicsLogging","getPatientDetailsMetadata","updateDemographicsRequestDto","ssnRegEx","PersonalDetailsCtrl","PersonalDetailsMobileCtrl","ProblemsBaseCtrl","getProblems","problems","Show","update","problem","active","activeName","activeFilters","hidden","prob","Notes","newFilterId","activeProblems","Number","filteredProblems","numprobs","ProblemsCtrl","ProblemsMobileCtrl","ProceduresBaseCtrl","getProcedures","procedures","Long","auditProcedures","auditProceduresLogging","proc","ProceduresCtrl","ProceduresMobileCtrl","procId","procedure","VisitDate","ReferenceMaterialBaseCtrl","getReferenceMaterial","auditEducationMaterials","EducationalMaterial","LanguageOptions","Languages","activeLanguage","ActiveLanguage","viewReferenceMaterial","eduForms","selectedEduForm","form","AttachmentId","downloadReferenceMaterial","updateActiveLanguage","mobile","auditEducationMaterialLogging","downloadFormFromModal","getReferenceMaterialAttachment","downloadForm","formGroup","getActiveLanguage","ActivatePatient","ReferenceMaterialCtrl","ReferenceMaterialMobileCtrl","ChartRepository","downloadCDA","loadingXml","startDate","endDate","fullHistory","hour","minute","second","toDate","getCDAXml","StringResult","downloadHtml","loadingHtml","postCCDHtmlDownloaded","ccdHtml","viewAccessLog","transmitModal","getCcdHtml","loadingCcd","getCCDHtml","chartHtml","loadingUrl","xmlFileName","ccdFileName","WebDocumentHelper","getVisitSummaries","visits","numVisits","auditMedicalHistory","viewVisitSummary","visitId","visitDate","auditClinicalSummary","getVisitSummary","downloadVisitSummary","getVisitSummaryUrl","downloadVisitSummaryByVisit","visit","selectedVisit","VisitId","auditMedicalHistoryLogging","auditClinicalSummaryLogging","AccessLog","getAccessLog","SendType","SendTypeList","getTransferCcdMetadata","getTransmitCcdConfig","DirectMailConfig","DirectMailAddress","DirectMailUser","Enabled","EmailEnabled","isConfigured","submitTransferRequest","transmitCcdForm","transmitting","transferRequestDto","DocumentType","Type","Subject","Message","DirectMailAddressFrom","ToName","DirectMailAddressTo","Email","postTransmitRequest","canSendDirectMail","DocumentTypeList","MyMessagesService","loadCompleteChart","loadingCompleteChart","completeChartUrl","PatientChart","CompleteChartData","isCompleteChartError","CompleteChartErrorMessageHtml","print","displayPrintButton","completeChartErrorMessage","loadResult","loadingLabResult","isImage","includes","imageFormats","isHtml","htmlFormats","isText","textFormats","getAttachmentPdf","ActivePatient","labResultUrl","ContentType","ByteArray","LabResultData","PdfFileName","resultInfo","ResultId","observationOrderUrl","ObservationOrderData","searchPharmacies","zip","searchPharmaciesParams","pharmacyResults","noResults","addPharmacy","PharmacyId","unshift","submitZip","submitPhoneNumber","tempPhoneNumber","getRoutineDoses","routineDoses","rowSpanCal","vaccineCount","getDirectMailUsers","transferDto","createUpdateDetailsDto","patientDetails","myChartConfigList","PatientDocuments","LabelName","Route","Uid","FeatureList","ViewDocuments","ViewProblems","ImmunizationsConfig","ViewLabResults","UpdateDemographics","UpdateInsurance","ViewCompleteChart","AllowGenerateCCD","forceUpdate","mychartServiceUserId","resetMyChart","vaccineCardTypeId","immunizations","VaccineCardTypeId","getNewLabResults","newLabResults","visitSummaries","getAppointments","appointments","referenceMaterial","medicationAllergies","getBilling","getFemaleThumbnailSrc","getMaleThumbnailSrc","userFullName","documents","setBillingServiceUserId","postImmunizationAudit","postClinicalSummaryAudit","postDemographicsAudit","postLabResultAudit","postMedicalHistoryAudit","postMedicationAllergiesAudit","postProcedureAudit","postEducationalMaterialAudit","postChartAudit","postUsageMetricUpdate","aprimaRestangular","attachmentId","applicationComponent","disableInLinePdf","timing","startTiming","inlinePDF","queryString","page","stop","getAttachmentStaticUrl","getRemarks","getRecentVisits","getOrders","getHealthMaintenanceReminders","getObservationOrderPdfImage","getVisitSummaryImage","request","getPatient","typeUid","immunizationType","myMessages","myMessagesNewMessage","myMessagesDisplayMessages","myMessagesDisplayMessageThread","myMessagesMobile","myMessagesMobileNewMessage","myMessagesMobileDisplayMessageThread","folder","DisplayMessageThreadBaseCtrl","returnRoute","returnOpts","$anchorScroll","MyMessagesRepository","messageThread","DisplayMode","getMessageThreadMessages","MessageHeaderText","cleanMessageHeader","MessageBodyTextNoLineBreaks","removeLineBreaks","MessageBodyText","IsCollapsed","NumberOfMessages","getMessageSettings","msgSetting","MessageSubTypes","MessageSubTypeId","allowReply","CanBeSentByPatient","SystemMessage","hash","replying","thumbnailSrc","displayMode","panelHeadingText","updateNotification","portalMessage","replyToMessage","isSubmitted","newMessage","MessageBody","ParentMessageId","DisplayMessageThreadCtrl","DisplayMessageThreadMobileCtrl","MessageDisplayBaseCtrl","msgSubTypes","defaultSettings","displayReceiveMessages","CanBeReceivedByPatient","messageSubTypes","selectedMessageSubTypeName","messageFilter","SearchSendReceivedMessages","displaySentMessages","panelHeadingTest","getMessages","displayMessages","displayMessageThreadRoute","SortDirection","SearchNewOldMessages","LastReadByPortalDate","NewMessage","filterMessages","selectedItem","displayMessageThread","MessageId","DisplayMessagesCtrl","MyMessagesMobileCtrl","isInSubstate","is","folders","Key","Filter","selectedFolder","mobileModel","subMessageText","changeFolder","folderKey","composeNewMessage","inSubState","displayMessageThreadMobile","goBackToMessages","messageLinkSelected","linkId","NewMessageBaseCtrl","MessageRepository","getUrgencyList","urgencyList","urgencies","defaultUrgency","IsDefault","isUndefined","UrgencyId","messageSettings","getAttachmentConfig","isAttachmentAllowed","urgencyListPromise","messageSettingsPromise","getPortalMessageMetadata","RouteType","routeTypeString","defaultSettingsItem","DefaultRoutingItem","ProviderOrServiceSiteId","defaultItem","SubTypeId","patientAttachmentSubtype","MessageSubType","PatientAttachment","Header","AttachmentList","selectedProviderOrServiceSiteChanged","selectedMessageSettingsItem","sendMessage","selectedMessageSubType","Status","AttachmentDto","createMessage","NewMessageCtrl","NewMessageMobileCtrl","setMessageSettingsStorage","getMessageSettingsStorage","indexAppointmentsQuestion","indexBillingQuestion","indexDemographicsQuestion","indexGeneralQuestion","indexLoginAssistanceQuestion","indexPrescriptionRxQuestion","indexAllMessages","getMessageSubTypes","Index","getNewMessages","messages","messageId","myAppointments","editRequestedAppointment","addRequestedAppointment","confirmRequestedAppointment","MyAppointmentsService","calendarList","serviceSiteList","appointmentTypeList","requestedAppointment","getRequestedAppointment","appointmentType","AppointmentType","appointment","AppointmentTypeDescription","AppointmentTypeName","RequestDateTime","CalendarDescription","Calendar","selectedCalendar","serviceSite","serviceSites","DefaultServiceSiteId","selectAppointmentLocation","clearRequestedAppointment","appointmentLocation","Address2","appointmentLocationDefined","AppointmentName","GoogleMapsUrl","MyAppointmentsRepository","isUpcomingAppointment","appointmentDateTime","minUpcomingAppointmentDateTime","createAppointmentLists","subtract","appointmentLists","StartDateTime","AppointmentStatus","IsCanceledStatus","upcomingAppointments","property","mapLoaded","fullAppointmentDescription","sortBy","CanReschedule","CanCheckIn","CanCancel","isCheckIn","isDischarged","isBetween","add","IsAppointmentToday","isAppointmentToday","previousAppointments","getPatientAppointments","searchFilter","createPendingAppointments","pendingAppts","pendingAppointment","getPendingAppointments","getPendingAppointmentRequest","canViewAppointments","pendingAppointmentsPromise","bookedAppointmentsPromise","limitTo","FetchLimit","canRequestAppointments","RequestAppointments","canCheckInFeature","CheckIn","toggleFullAppointmentDescriptionPending","fullAppointmentDescriptionPending","toggleFullAppointmentDescription","appt","requestNewAppointment","rescheduleRequestedAppointment","cacheRequestedAppointment","appointmentCheckIn","changeAppointmentStatus","AppointmentId","loadMap","AppointmentRepository","loadTimeZonePromise","loadTimeZone","patientCalendars","AllowPatientRequest","patientAppointmentTypes","isNewRequestedAppointment","selectedAppointmentTypeDescription","datePicker","assignTimeZone","populateOpenAppointmentSlots","getAppointmentRequestMetadata","getTimeZone","myTimeZone","TimeZone","StandardName","clearAppointmentLocation","selectedTime","loadingAppointmentSlots","AppointmentTypeId","getAppointmentsOpenTimeSlots","openAppointmentSlots","Selected","isSame","validateRequestDate","RequestDate","$dirty","validateSelectedTimeSlot","selectedTimeSlotInvalid","validateAppointmentReason","AppointmentReason","isFormValid","datepickerOptions","maxDate","showWeeks","minMode","maxMode","selectedCalendarChanged","selectedAppointmentTypeChanged","selectedApptType","datePickerChanged","SelectedTimeSlotClick","requestAppointment","apptRequest","CalendarId","appointmentId","statusId","updateAppointment","Patient","getAppointment","newRequestedAppointment","appointmentStatusId","dashboard","PatientSettingsRepository","labs","messagesPromise","labsPromise","chartConfigPromise","displayLabResults","getFeatureList","load","tile","updateCollapseState","setPatientDashboardTileState","displayAlertMessageThread","displayAlertMyChartLabs","BillingService","LoginUserPatientId","RemoteSessionId","getBillingAccount","billingAccountDto","PersonBalanceAll","owesUsMoney","ConsentAnnual","DepositByFinancialCenterEnabled","MerchantIdByFinancialCenterEnabled","DefaultMerchantId","FinancialCenterBalances","ShowMultipleFinancialCenters","makeAPaymentButtonEnabled","getViewMakeAPaymentFeatureFlag","makeSpecificOnlinePayment","balance","CardType","statementsOnly","amount","Balance","merchantId","MerchantId","financialCenterUid","FinancialCenterUid","makeGenericOnlinePayment","displayMyChartLabs","ApPersonalHealthAppsModalService","isPatientRegisteredForFHIR","activeTiles","getPatientDashboardFeatures","providerName","PrimaryProviderName","PrimaryProviderServiceSite","serviceSitePhoneNumber","PrimaryProviderServiceSitePhoneNumber","serviceSiteAddress1","PrimaryProviderServiceSiteAddress1","serviceSiteAddress2","PrimaryProviderServiceSiteAddress2","serviceSiteLocation","PrimaryProviderServiceSiteLocation","showPersonalHealthAppModal","openModal","baseId","isSuccess","resultValue","showLinkPersonalHealthApp","today","FormsRepository","getAssignedQuestionnaires","assignedForms","incompleteFormsList","IsComplete","getAssignedPracticeForms","searchCriteria","IncludeOnlyUnviewedForms","practiceFormsList","assignedQuestionnairesPromise","assignedPracticeFormsPromise","displayForms","openPatientQuestionnaire","relSurveyPatientId","RelSurveyPatientId","questionnaireId","QuestionnaireId","medicationsExist","patientDashboardFeatures","setDashboardFeatureList","getDashboardFeatureList","DashboardRepository","repositorySettings","localSettings","updatedRepositorySettings","repositoryItem","localSettingsItem","dashboardTile","setPatientDashboardFeatures","dashboardSettings","TimeFrameId","Clear","DaysAgo","WeeksAgo","MonthsAgo","YearsAgo","Childhood","Teenager","Birth","HistoryGroupId","ProblemDiagnosis","Family","Immunization","ModalInstanceReturnId","Accept","Cancel","forms","completeForm","confirmForm","patientQuestionnaire","FormsService","getQuestionnaireDetails","questionnaire","questionnaireDetails","questionnaireName","SurveyName","sectionNumber","questionnaireSections","sections","groupBy","surveySectionQuestions","surveySection","SectionNumber","SurveySectionName","SectionDisplayOrder","Visible","maxNavigationItems","createQuestionList","currentSectionNumber","currentSectionId","currentSectionName","firstSectionNumber","lastSectionNumber","nextSectionName","getNextSectionName","getPatientQuestionnaire","sectionQuestions","questionNumber","questions","sectionQuestionAnswers","sectionQuestionAnswer","QuestionNumber","SurveyQuestionLabel","SurveyControlTypeId","SurveyControlTypeName","SelectedAnswerId","getSelectedAnswerId","QuestionEnabled","isQuestionEnabled","createAnswerList","AnswersThatTriggerThisQuestion","getAnswersThatTriggerThisQuestion","HasAnswersThatTriggerThisQuestion","answers","QuestionIdToTrigger","answer","SurveyAnswerId","SelectedAnswer","head","surveySectionId","surveyQuestionId","surveyControlTypeId","selectedAnswer","myAnswers","SurveyAnswerLabel","SurveyResponseAnswerText","QuestionsToTrigger","QuestionId","submitQuestionnaire","completedForm","Form","cacheCompletedForm","getCurrentSectionName","navMoveNext","completeQuestionnaireForm","curSectionNumber","numOfSections","section","navMovePrevious","displaySection","getCompletedForm","clearCompletedForm","filterPracticeForm","activeList","selectedFilterForm","completeList","viewPracticeFormAttachment","selectedPracticeForm","PracticeFormName","PersonId","getPracticeFormAttachmentImage","getPracticeFormImage","RelPracticeFormPatientId","updatePracticeFormDownloadDate","updateDto","downloadPracticeFormAttachment","Downloaded","Uploaded","getPracticeFormAttachment","incompleteForms","completedForms","masterList","Uploading","isPending","isComplete","createLists","Approved","LastUploadedByPortalDate","Rejected","assignUploadForm","uploadForm","filterForm","MessageTypeId","AttachmentTypeName","PracticeFormId","AttachmentGroupId","AttachmentTypeId","createApprovalMessage","uploadDto","updatePracticeFormUploadDate","FormsId","loadingSection","removeLocalStorageKeys","Questionnaire","Sections","initializeSectionNavigation","containsPatientHxQuestion","navigationSectionParams","ContainsPatientHxQuestion","RequiredFieldsPopulated","validateCheckboxQuestions","curQuestions","curCheckboxQuestions","checkboxQuestionsHaveAnswers","checkboxQuestion","QuestionRequireAnswer","patientQuestionnaireForm","hxQuestion","isPatientHxQuestion","isPatientProblemDiagnosisHxQuestion","isFamilyProblemHxQuestion","isImmunizationHxQuestion","savingQuestionnaire","finishLater","patientHistorySections","unselectedItems","historySection","ProblemHistoryAnswers","removeObj","pull","FamilyHistoryAnswers","familyHxAnswer","ImmunizationHistoryAnswers","ImmunizationAdultAnswers","ImmunizationAnswers","ImmunizationPediatricAnswers","Completed","putPatientQuestionnaire","FamilyHxRelationshipId","FamilyHistoryAnswer","HistoryRelationshipList","loadModal","IsRelationshipMaternal","Model","RelationshipQualifier","isMaternal","IsRelationshipPaternal","isPaternal","IsRelationshipUnknown","isUnknown","none","familyHxRelationshipList","loadingModal","TimeFrameIdBirthdate","TimeFrameIdDeathdate","relationshipSelect","selectedRelationship","ItemId","RelationshipId","RelationshipName","timeFrameSelectedCallback","timeFrameId","onsetTimeFrameId","problemHistoryAnswer","ProblemHistoryAnswerId","accept","familyHistoryForm","lastQuestion","enableQuestionsForSelectedAnswer","enableQuestion","questionToEnable","EnableQuestion","explanationPlaceHolder","answerChanged","SurveyRequiresExplanation","explanationTextChanged","datePopup","Opened","openDatePicker","$event","preventDefault","updateEnteredAnswer","answerText","String","fireEvent","selectedButtonCallback","disableTriggeredQuestions","questionsToDisable","curAnswer","questionToDisable","questionId","SurveyExplanation","selectedUid","formAnswerChanged","eventData","formAnswerChangedListener","timeframeText","TextPlaceHolder","TextPlaceHolderRequired","selectedId","formAnswerExplanationTextChanged","isRequiredExplanationTextPopulated","formAnswerExplanationTextChangedListener","unselectedAnswers","isTextPopulated","selectedAnswers","questionnaireSectionId","questionnaireSection","getFamilyHxProblemList","familyHxProblemId","familyHxProblemList","getHistoryRelationshipList","historyRelationshipList","getFamilyHxRelationshipList","subFindTableId","IsVisible","setAllfamilyHxRelationshipListItemsToVisible","setFamilyHxRelationshipListBasedOnMultipleUsage","patientFamilyHistoryId","fhAnswer","PatientFamilyHistoryId","hxRelationshipItem","AllowMultipleUsage","familyHxRelationshipItem","setupDirectiveScope","familyHxProblemListPromise","FamilyHxProblemSubFindTableId","historyRelationshipListPromise","familyHxRelationshipListPromise","FamilyHxRelationshipSubFindTableId","familyHistoryAnswer","relationshipToAdd","newItem","SubFindTableId","SubFindTableItemId","getNewProblemHistoryAnswers","problemHistoryAnswers","findTableItem","getNewProblemHistoryAnswer","addFamilyHistoryInformation","getNewFamilyHistoryAnswer","EditFamilyHistoryAnswer","DeleteFamilyHistoryAnswer","getAdultVaccineList","adultVaccineList","vaccineCard","getNewImmunizationHistoryAnswer","getPediatricVaccineList","pediatricVaccineList","adultVaccineListPromise","AdultVaccineAdminSubFindTableId","pediatricVaccineListPromise","PediatricVaccineAdminSubFindTableId","adultTimeFrameSelectedCallback","ids","vaccineAdminId","vaccineAdminItemId","immunizationCard","VaccineAdminId","immunizationItem","VaccineAdminItemId","pediatricTimeFrameSelectedCallback","getFindTableItemsProblemHx","findTableItemsProblemHx","findTableItemsProblemHxPromise","ProblemHxSubFindTableId","attrs","setFocus","getElementById","focus","apSetFocusEvent","apSetFocusId","timeFrameAnswer","disabled","require","formCtrl","formRef","timeFramesPromise","timeFrameTypes","timeFrameEntryClear","DefaultValue","UseBirthDate","AddToDate","TimespanUnitType","TimespanUnitTypeName","tfInputCtrlId","calInputCtrlId","tfSelCtrlId","OnsetTimeFrameId","OnsetTimeFrameValue","parseInt","timeFrameInputIsVisible","calendarInputIsVisible","datePickerModel","showDatePicker","timeFrameTypeChanged","OnsetTimeFrameDate","OnsetTimeFrameAnswer","timeFrameItem","isTimeFrameInputVisible","patientQuestionnaireDto","searchCriteriaDto","relPracticeFormPatientId","cacheForm","problemHistoryAnswerId","historyGroupId","diseaseId","CameFromPatientChart","DiseaseId","DiseaseName","CauseOfDeath","Denies","OnsetTimeFrame","BirthDateTimeFrame","DeathDateTimeFrame","NoKnownDiseases","isAdultCard","isPediatricCard","IsAdultCard","IsPediatricCard","VaccineAdminName","Inactive","PatientImmunizationCardItems","vaccineItem","VaccineId","VaccineName","PatientImmunization","VaccineInactive","TypeofVaccineId","VaccineAdminIdVaccineAdminItemId","startsWith","len","getKeys","key","billing","paymentOptions","paymentFromConsent","paymentFromNewCard","transactionComplete","paymentSummary","paymentStatementsOnly","paymentFromNewCardStatementsOnly","paymentOptionsStatementsOnly","paymentFromConsentStatementsOnly","paymentSummaryStatementsOnly","BillingRepository","viewMakeAPaymentFeature","viewLedgerFeature","getViewLedgerFeatureFlag","viewStatementFeature","getViewStatementFeatureFlag","ledgerAvailable","promises","loadStatementHistory","loadBillingAccount","loadPaymentHistory","loadingBillingAccount","loadingPaymentHistory","getPaymentHistory","paymentHistoryArray","PaymentHistory","loadingStatementHistory","getStatementHistory","StatementHistory","viewReceipt","txId","viewStatement","viewLedger","downloadLedger","getLedgerUrl","viewLedgerPdf","getLedgerPdf","getStatementHistoryItemPdf","downloadStatementHistoryItem","historyItem","viewStatementHistoryItem","statementHistoryItem","logOff","loadingReceipt","Mask","ExpDate","ConsentId","RemainingInConsent","PerChargeLimit","ReceiptHtml","ActiveTxId","getState","payment","parseFloat","maxPaymentAmount","HasCardOnFile","paymentFromConsentForm","consentAnnual","chargeAmount","ChargeAmount","postPayment","submitPaymentLoading","consentAnnualRequestDto","ConsentAnnualId","consentId","PaymentAmount","ApplicationSubmittingPayment","FinancialCenter","postConsentAnnualPayment","TxId","responsiblePartyBilling","chargeRegEx","loadOneTimePayment","absPathSplit","oneTimePaymentRequestDto","Amount","RedirectUrl","FinancialCenterGuid","getOneTimePaymentUrl","OneTimePaymentUrl","redirectUrlPostBack","applyPaymentRequestDto","PaymentResponseString","postApplyPayment","IsCanceled","PaymentMethodList","PaymentMethodSelect","paymentMethodSelected","paymentMethodSelect","loadPaymentResult","receiptRequestDto","RecipientEnumText","getReceiptHtml","done","parent","postMessage","eventName","href","origin","loadLedger","ledgerPdf","LedgerData","loadingLedger","Base64","loadReceipt","loadStatement","getStatementUrl","statementPdf","StatementData","loadingStatement","billingRequestDto","oneTimePaymentUrlRequestDto","getReceipt","consentAnnualPaymentRequestDto","getAccountBalance","getStatementImage","getLedgerImage","getStatementHistoryItemImage","statementBatchDetailUid","billingServiceUserId","resetBillingService","accountBalance","billingAccount","statementHistory","receiptHtml","Idle","$modalStack","closeOpenModals","dismissAll","removeClass","modal","onStart","injector","running","unwatch","watch","$urlRouterProvider","$urlServiceProvider","getAppRoutes","deferIntercept"],"mappings":"AAAAA,QAAQC,OAAO,OAGX,sBACA,UACA,SACA,YACA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AKtE4H,cAAcG,SAAS1E,KAAK,WACxBsE,kBAAkBK,YAAYC,SAAU,cAcpDtG,WAAW6S,IAAI,iBAAkB,WAC7B86D,KAAKU,gBCjEjBjxE,QAAQC,OAAO,OAAOK,QAAQ,qBAAsB,sBAAuB,oBACvE,SAAU4wE,mBAAoBC,oBAAqBtwE,mBAE/C,YAEA,IAAIE,WAAYF,kBAAkBuwE,cAElCF,oBACKjsD,KAAK,GAAIlkB,UAAUC,MAAME,OACzB+jB,KAAK,IAAKlkB,UAAUC,MAAME,OAE/BiwE,oBAAoBE","sourcesContent":["angular.module('app', [\r\n\r\n    //third party\r\n    'angularLocalStorage',\r\n    'gettext',\r\n    'lodash',\r\n    'ngAnimate',\r\n    'ngTouch',\r\n    'restangular',\r\n    'toaster',\r\n    'ui.bootstrap',\r\n    'ui.router',\r\n    'ui.router.upgrade',\r\n    'ngIdle',\r\n\r\n    //aprima\r\n    'account',\r\n    'apEasyScroller',\r\n\r\n    'aprima-core',\r\n    'aprima-bridge',\r\n    'aprima-config',\r\n    'aprima-legacy-common',\r\n    'aprima-provider-api',\r\n    'aprima-patient-api'\r\n]).constant('AppId', {\r\n        MessageSubHeader: 'B348F800-1FCB-4397-9E1A-2226AFD836E4',\r\n        PracticeName: '2AD081A3-A195-4093-9C7F-1563BD3179A3',\r\n        PracticeTagline: '72AF95CE-12F5-450A-8C0A-3941A3256AC7',\r\n}).config(['IdleProvider', function(IdleProvider) {\r\n    'use strict';\r\n\r\n\r\n    // Application timeout logic is in the following locations :\r\n    // =======================================================\r\n    // 1 - modules\\app\\app.js\r\n    //       ng-idle configuration and links to documentation are located here.\r\n    //\r\n    // 2 - modules\\app\\controllers\\LoginCtrl.js\r\n    //       After user logs in, IdleStartWatch is broadcast to start application timeout.\r\n    //       Listener is located in modules\\common\\init.js\r\n    //\r\n    // 3 - modules\\common\\init.js\r\n    //       IdleStartWatch listener.  Event is broadcast from LoginCtrl.js once user is logged in.  Idle.watch() is called here.\r\n    //       IdleTimeout listener.  fires when IdleProvider.idle() + IdleProvider.timeout() expire.  Log out logic is located here.\r\n    //\r\n    // 4 - ng-idle documentation can be found at the following locations\r\n    //       http://hackedbychinese.github.io/ng-idle/\r\n    //       https://github.com/HackedByChinese/ng-idle/wiki/Idle-and-Idleprovider\r\n    //       https://github.com/HackedByChinese/ng-idle/wiki\r\n\r\n\r\n    // List of DOM events the Idle service will watch to reset the idle timeout\r\n    // IdleProvider.interrupt('mousemove keydown DOMMouseScroll mousewheel mousedown')\r\n    IdleProvider.interrupt('keydown mousedown mousewheel');    // Exclude mousemove DOM event.  ng-idle has bug with mousemove.\r\n\r\n    IdleProvider.autoResume(true);   // FALSE - you will need to manually call watch() to start watching for idleness\r\n    IdleProvider.keepalive(false);    // FALSE - turn off keepalive\r\n\r\n    // The idle timeout duration in seconds.  After this amount of time passes without the user\r\n    // performing an action that triggers one of the watched DOM events, the user is considered\r\n    // idle.  Default is 20 minutes.\r\n    IdleProvider.idle(600); // Set timeout to 10 minutes (60*10)\r\n\r\n    // The amount of time the user has to respond (in seconds) before they have been considered timed out.\r\n    // Set to 0 or false to disable this feature.  Default is 30 seconds.\r\n    IdleProvider.timeout(1);\r\n}]);\r\n","angular.module('app').config(['AppRoutesProvider', '$stateProvider',\r\n    function (AppRoutesProvider, $stateProvider) {\r\n        'use strict';\r\n\r\n        var appRoutes = {\r\n            'login': {\r\n                state: 'login',\r\n                route: '/login',\r\n                portalSettings: {\r\n                    hideToolbar: true,\r\n                    toolbarItem: 'login'\r\n                }\r\n            },\r\n            'tokenLogin': {\r\n                state: 'tokenLogin',\r\n                route: '/login/:token',\r\n                portalSettings: {\r\n                    hideHeader: true,\r\n                    hideToolbar: true\r\n                }\r\n            },\r\n            'statementslogin': {\r\n                state: 'statementslogin',\r\n                route: '/statementslogin',\r\n                portalSettings: {\r\n                    hideHeader: false,\r\n                    hideToolbar: true\r\n                }\r\n            },\r\n            'landing': {\r\n                state: 'landing',\r\n                route: '/landing',\r\n                portalSettings: { toolbarItem: 'landing' }\r\n            },\r\n            'loginsettings': {\r\n                state: 'loginsettings',\r\n                route: '/loginsettings',\r\n                portalSettings: {\r\n                    hideToolbar: true,\r\n                    toolbarItem: 'settings'\r\n                }\r\n            },\r\n            'navigationDoctors': {\r\n                state: 'navigationDoctors',\r\n                route: '/navigationDoctors',\r\n                portalSettings: { toolbarItem: 'doctors' }\r\n            },\r\n        };\r\n\r\n        AppRoutesProvider.setupAppRoutes(appRoutes);\r\n\r\n        $stateProvider\r\n            .state(appRoutes.login.state, {\r\n                url: appRoutes.login.route,\r\n                templateUrl: '/app/views/login.html',\r\n                controller: 'LoginCtrl',\r\n                description: '/Login',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Login'); }\r\n                }\r\n            })\r\n            .state(appRoutes.tokenLogin.state, {\r\n                url: appRoutes.tokenLogin.route,\r\n                controller: 'TokenLoginCtrl',\r\n                description: 'Login with a auth-token',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('TokenLogin'); }\r\n                }\r\n            })\r\n            .state(appRoutes.loginsettings.state, {\r\n                url: appRoutes.loginsettings.route,\r\n                templateUrl: '/app/views/loginsettings.html',\r\n                controller: 'LoginSettingsCtrl',\r\n                description: '/LoginSettings',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Settings'); }\r\n                }\r\n            })\r\n            .state(appRoutes.statementslogin.state, {\r\n                url: appRoutes.statementslogin.route,\r\n                templateUrl: '/app/views/statementslogin.html',\r\n                controller: 'StatementsLoginCtrl',\r\n                description: '/StatementsLogin',\r\n                alternativeLoginRoute : appRoutes.statementslogin.route,\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Login'); }\r\n                }\r\n            })\r\n            .state(appRoutes.landing.state, {\r\n                url: appRoutes.landing.route,\r\n                templateUrl: '/app/views/landing.html',\r\n                controller: 'LandingCtrl',\r\n                description: '/Landing'\r\n            })\r\n            .state(appRoutes.navigationDoctors.state, {\r\n                url: appRoutes.navigationDoctors.route,\r\n                templateUrl: '/app/views/navigation/navigationDoctors.html',\r\n                controller: 'NavigationDoctorsCtrl',\r\n                description: '/Doctors'\r\n            });\r\n    }]);\r\n","angular.module('app').run(['$templateCache', function($templateCache) {\n  'use strict';\r\n\r\n  $templateCache.put('/app/views/aboutsettings.html',\r\n    \"<div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div id=\\\"about-settings\\\" class=\\\"form-section\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"form-section-header\\\" translate>\\r\" +\r\n    \"\\n\" +\r\n    \"                About Aprima NOW\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <ul class=\\\"list-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Client ID' | translate }}:<br/>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span id=\\\"client-id\\\">{{::clientID}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Version' | translate }}:<br/>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span id=\\\"versionNumber\\\">{{::versionNumber}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Version Code' | translate}}:<br/>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span title=\\\"{{::gitCommitHash}}\\\">{{::gitCommitHashShort}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Device Id' | translate}}:<br/>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span id=\\\"deviceId\\\">{{::deviceId}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Server Version' | translate}}:<br/>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span id=\\\"serverVersion\\\">{{::serverVersion}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'PRM Server Version' | translate}}:<br/>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span id=\\\"prmServerVersion\\\">{{::prmVersion}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'PRM Database Version' | translate}}:<br/>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span id=\\\"prmDatabaseVersion\\\">{{::databaseVersion}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'PRM Database Build' | translate}}:<br/>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span id=\\\"prmDatabaseBuild\\\">{{::databaseBuild}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"            </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/appointmentlistsettings.html',\r\n    \"<div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"form-section\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"form-section-header\\\" translate>\\r\" +\r\n    \"\\n\" +\r\n    \"                Schedule Settings\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <label class=\\\"control-label\\\" for=\\\"appointment-calendar\\\" translate>Schedule Calendar</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <select id=\\\"appointment-calendar\\\" name=\\\"appointment-calendar\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            data-ng-model=\\\"settings.appointmentsCalendar\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            data-ng-options=\\\"calendar.Description for calendar in apptOptions.calendars\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            ng-change=\\\"saveAppointmentsTileSettings()\\\"></select>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <input type=\\\"checkbox\\\" name=\\\"hideDischarged\\\" id=\\\"hideDischarged\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           data-ng-model=\\\"settings.hideDischarged\\\" ng-change=\\\"saveHideDischargedOption()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <label for=\\\"hideDischarged\\\" translate>Hide Discharged Appointments</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                &nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <input type=\\\"checkbox\\\" name=\\\"display-end-times\\\" id=\\\"display-end-times\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           data-ng-model=\\\"settings.displayEndTime\\\" ng-change=\\\"saveAppointmentsTileSettings()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <label for=\\\"display-end-times\\\" translate>Display End Times</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/components/apPatientPortal.html',\r\n    \"<div ng-if=\\\"!vm.loadedAngular\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <ap-force-load-angular (angular-initialized)=\\\"vm.onAngularInitialized()\\\" />\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"<div ng-if=\\\"vm.loadedAngular\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <ap-header ng-if=\\\"!vm.shouldHideToolbar()\\\"></ap-header>\\r\" +\r\n    \"\\n\" +\r\n    \"    <ap-toolbar ng-if=\\\"!vm.shouldHideToolbar()\\\"></ap-toolbar>\\r\" +\r\n    \"\\n\" +\r\n    \"    <ap-mobile-nav ng-if=\\\"!vm.shouldHideToolbar()\\\"></ap-mobile-nav>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-class=\\\"(vm.shouldHideToolbar())?'ap-main-content':'ap-main-content-toolbar'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div\\r\" +\r\n    \"\\n\" +\r\n    \"            id=\\\"main-content\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            ng-class=\\\"!vm.isLoginView() ? 'ap-application-margin ap-application-content' : 'container-fluid container-flush'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            ui-view>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <toaster-container toaster-options=\\\"{}\\\"></toaster-container>\\r\" +\r\n    \"\\n\" +\r\n    \"        <ap-footer ng-if=\\\"!vm.shouldHideFooter()\\\"></ap-footer>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/components/apPrintablePracticeInfo.html',\r\n    \"<div class=\\\"visible-print-block\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    {{::vm.practiceName}}\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/directives/apDynamicFrame.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <iframe id=\\\"docFrame\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                width=\\\"100%\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                iframe-onload=\\\"reload('docFrame')\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                src=\\\"{{loadingUrl}}\\\"></iframe>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/directives/apFormAttachment.html',\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-12 col-xs-flush col-md-7\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-select-file id=\\\"apSelectFile\\\" name=\\\"apSelectFile\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            selected-file-name=\\\"selectDocumentModel.selectedFileName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            selected-file-contents=\\\"selectDocumentModel.selectedFileContents\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            selected-mime-type=\\\"selectDocumentModel.selectedMimeType\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            validation-message=\\\"selectDocumentModel.validationMessage\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            practice-form=\\\"practiceForm\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            sending = \\\"sending\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            </ap-select-file>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row text-danger\\\"  ng-if=\\\"selectDocumentModel.validationMessage.length > 0\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12\\\" id=\\\"divValidationMessage\\\" name=\\\"divValidationMessage\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{ selectDocumentModel.validationMessage }}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/directives/apMessageAttachment.html',\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"panel\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-2\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <ap-select-file id=\\\"apSelectFile\\\" name=\\\"apSelectFile\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        selected-file-name=\\\"selectDocumentModel.selectedFileName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        selected-file-contents=\\\"selectDocumentModel.selectedFileContents\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        selected-mime-type=\\\"selectDocumentModel.selectedMimeType\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        validation-message=\\\"selectDocumentModel.validationMessage\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        </ap-select-file>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \" <div class=\\\"col-xs-10\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"attachmentList\\\" ng-repeat=\\\"attachment in attachmentDtoList\\\" ng-click=\\\"remove(attachment)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"          <img src=\\\"images/spacer.png\\\" class=\\\"attachment-svg attachment-remove\\\" alt=\\\"attachment\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"attachmentList attachmentName \\\"> {{ attachment.FileName | limitTo: 15 }}<span ng-if=\\\"attachment.FileName.length > 15\\\">...</span> </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"row text-danger\\\"  ng-if=\\\"selectDocumentModel.validationMessage.length > 0\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-12\\\" id=\\\"divValidationMessage\\\" name=\\\"divValidationMessage\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        {{ selectDocumentModel.validationMessage }}\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/directives/apSelectFile.html',\r\n    \"<div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <input\\r\" +\r\n    \"\\n\" +\r\n    \"        type=\\\"file\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"        name=\\\"inputFile\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"        id=\\\"inputFile\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"        style=\\\"cursor:pointer; font-size:0; height:30px; width:80px; overflow:hidden; position:relative; opacity:0; -moz-opacity: 0; filter:alpha(opacity=0); z-index:3\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"        inputfile-onchange=\\\"inputFileOnchangeCallback(myEventArg)\\\"/>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <!-- position:absolute; top:0px; width:60px; height:30px; -->\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"!practiceForm.isPending\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <button style=\\\"z-index:1; position:absolute; top:0px; width:80px; height:30px;\\\" class=\\\"btn btn-default1\\\" name=\\\"selectBtn\\\" id=\\\"selectBtn\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"ng-hide\\\" ng-show=\\\"sending\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"        <span ng-class=\\\"pull-left\\\" ng-hide=\\\"sending\\\">{{:: 'Upload' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"practiceForm.isPending\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button style=\\\"z-index:1; position:absolute; top:0px; width:100px; height:30px;\\\" class=\\\"btn btn-default1\\\" name=\\\"selectBtn\\\" id=\\\"selectBtn\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <span class=\\\"ng-hide\\\" ng-show=\\\"sending\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </span>\\r\" +\r\n    \"\\n\" +\r\n    \"            <span class=\\\"ng-hide\\\" ng-hide=\\\"sending\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <span class=\\\"pull-left lime-green\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{:: 'Form Sent' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </span>\\r\" +\r\n    \"\\n\" +\r\n    \"            </span>\\r\" +\r\n    \"\\n\" +\r\n    \"        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/directives/apSelectImage.html',\r\n    \"<div class=\\\"row\\\" style=\\\"margin-top:5px; margin-bottom:5px;\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-2\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <ap-select-file\\r\" +\r\n    \"\\n\" +\r\n    \"                id=\\\"apSelectFile\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                name=\\\"apSelectFile\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                selected-file-name=\\\"selectImageModel.selectedFileName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                selected-file-contents=\\\"selectImageModel.selectedFileContents\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                selected-mime-type=\\\"selectImageModel.selectedMimeType\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                validation-message=\\\"selectImageModel.validationMessage\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        </ap-select-file>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-10\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <input id=\\\"selectedImageFile\\\" name=\\\"selectedImageFile\\\" type=\\\"text\\\" style=\\\"width:100%\\\" ng-model=\\\"selectImageModel.selectedFileName\\\" ng-readonly=\\\"true\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <input id=\\\"selectedImageMimeType\\\" name=\\\"selectedImageMimeType\\\" type=\\\"text\\\" style=\\\"width:100%\\\" ng-model=\\\"selectImageModel.selectedMimeType\\\" ng-readonly=\\\"true\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"row\\\" style=\\\"margin-top:5px; margin-bottom:5px;\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-2\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button style=\\\"width:80px;\\\" class=\\\"btn btn-default1\\\" name=\\\"selectedImageClearBtn\\\"  id=\\\"selectedImageClearBtn\\\" ng-click=\\\"clearSelectedFile()\\\">{{:: 'Clear' | translate }}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-10\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <span id=\\\"spanSelectedImage\\\" name=\\\"spanSelectedImage\\\" ng-if=\\\"selectImageModel.selectedFileName.length > 0\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <img name=\\\"selectedImage\\\" id=\\\"selectedImage\\\" src=\\\"{{ selectImageModel.selectedFileContents }}\\\" style=\\\"height: 150px; width: 150px;\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"row text-danger\\\" style=\\\"margin-top:5px; margin-bottom:5px;\\\" ng-if=\\\"selectImageModel.validationMessage.length > 0\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-12\\\" id=\\\"divValidationMessage\\\" name=\\\"divValidationMessage\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        {{ selectImageModel.validationMessage }}\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"<!--\\r\" +\r\n    \"\\n\" +\r\n    \"        <ap-select-file\\r\" +\r\n    \"\\n\" +\r\n    \"                id=\\\"apSelectFile\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                name=\\\"apSelectFile\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                max-size-kb=\\\"selectImageModel.maxSizeKb\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                file-type=\\\"selectImageModel.fileType\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                selected-file-name=\\\"selectImageModel.selectedFileName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                selected-file-contents=\\\"selectImageModel.selectedFileContents\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                selected-mime-type=\\\"selectImageModel.selectedMimeType\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                validation-message=\\\"selectImageModel.validationMessage\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        </ap-select-file>\\r\" +\r\n    \"\\n\" +\r\n    \"-->\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/landing.html',\r\n    \"<div id=\\\"landing-btn-group\\\" class=\\\"row\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-10 col-xs-push-1\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row tile-container\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6 col-sm-6 col-md-3 col-lg-2 tile\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-default btn-landing\\\" id=\\\"landing-logoff\\\" ng-click=\\\"logoff()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <i class=\\\"fa fa-sign-out fa-4x\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span translate>Sign Out</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/login.html',\r\n    \"<div class=\\\"body\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div id=\\\"login-container\\\" class=\\\"container-fluid\\\" ap-login-background client-Id=\\\"model.clientID\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12 col-xs-flush col-md-6 col-md-offset-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div id=\\\"login-header\\\" class=\\\"logo-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row\\\">&nbsp;</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"modal-dialog modal-dialog-login\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12 col-xs-flush col-md-10\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"modal-content\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"modal-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <img src=\\\"images/spacer.png\\\" class=\\\"login-image\\\" alt=\\\"login-image\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div class=\\\"modal-subtitle\\\" id=\\\"myModalLabel2\\\" ng-if=\\\"model.practiceName\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                {{model.practiceName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div class=\\\"modal-tagline\\\" id=\\\"myModalLabel3\\\" ng-if=\\\"model.practiceTagline\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                {{model.practiceTagline}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"modal-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <form id=\\\"login-form\\\" name=\\\"loginForm\\\" ap-form-focus ng-submit=\\\"loginProcess()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                              novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div ng-if=\\\"!selectUserMode\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                     ng-class=\\\"{ 'has-error' : loginForm.userName.$invalid && submitted}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <label for=\\\"userName\\\">{{::'Username' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <input type=\\\"text\\\" class=\\\"form-control\\\" name=\\\"userName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                           ng-model=\\\"model.userName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                           placeholder=\\\"{{'Username' | translate}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                           id=\\\"userName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                           ng-change=\\\"model.userId = null;\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                           required>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <span ng-show=\\\"loginForm.userName.$invalid && submitted\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                          class=\\\"text-danger ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        {{::'Not valid.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                     ng-class=\\\"{ 'has-error' : loginForm.passwordInput.$invalid && submitted}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <label for=\\\"passwordInput\\\">{{::'Password' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <input type=\\\"password\\\" class=\\\"form-control\\\" name=\\\"passwordInput\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                           ng-model=\\\"model.password\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                           id=\\\"passwordInput\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                           placeholder=\\\"{{'Password' | translate}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                           required>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <b class=\\\"tooltip tooltip-top-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        <i class=\\\"fa fa-lock txt-color-teal\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        {{::'Enter your password' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </b>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <span ng-show=\\\"loginForm.passwordInput.$invalid && submitted\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                          class=\\\"help-block ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        {{::'Not valid.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <div class=\\\"text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <span class=\\\"text-danger ng-hide\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                          ng-show=\\\"loginForm.passwordInput.$invalid && submitted\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        {{::'Login could not be completed.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div ng-show=\\\"errorMessage\\\" class=\\\"ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        <span class=\\\"text-danger\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            {{errorMessage | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <button type=\\\"submit\\\" class=\\\"btn btn-primary btn-lg btn-block btn-login\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        ng-disabled=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <span class=\\\"ng-hide\\\" ng-show=\\\"loading\\\"><ap-spinner></ap-spinner></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{'Login' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <button type=\\\"button\\\" class=\\\"btn btn-primary btn-lg btn-block btn-login\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        id=\\\"settingsBtn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        ng-click=\\\"settings()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{'Settings' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </form>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                {{::'Trouble logging in?' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <label class=\\\"link clickable\\\" ng-click=\\\"forgotPassword()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{::'Reset My Password' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <hr/>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"row modal-content-lowercase\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <p>{{::'Please contact our office if you need assistance.' | translate }}</p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div ng-if=\\\"assistanceInfoLoaded && !(!!loginAssistanceInfo.CustomPortalFooter)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div>{{::loginAssistanceInfo.PracticeName}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div>{{::loginAssistanceInfo.Address1}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div ng-if=\\\"loginAssistanceInfo.Address2\\\">{{::loginAssistanceInfo.Address2}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div>{{::loginAssistanceInfo.City}}, {{::loginAssistanceInfo.State}} {{::loginAssistanceInfo.Zip}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div>{{::loginAssistanceInfo.PhoneNumber}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div ng-if=\\\"assistanceInfoLoaded && !!loginAssistanceInfo.CustomPortalFooter\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div><pre>{{::loginAssistanceInfo.CustomPortalFooter}}</pre></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <!--<div class=\\\"modal-footer\\\">-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <!--<div class=\\\"text-center\\\">-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <!--<p>{{::'New to our portal?' | translate}}</p>-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <!--</div>-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <!--<button class=\\\"btn btn-default1 btn-lg btn-block btn-login\\\"-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <!--ng-click=\\\"completeAccount()\\\">-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <!--{{'Create Account' | translate}}-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <!--</button>-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <!--</div>-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <!-- Below is a hack to get the android webview to behave properly while logging in.\\r\" +\r\n    \"\\n\" +\r\n    \"        If this is removed, it will cause random whitespace to appear after login.  Please don't remove. -->\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\" style=\\\"overflow: hidden; min-height: 1px;\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12 col-sm-10 col-sm-offset-1 col-md-6 col-md-offset-3\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 style=\\\"margin-bottom: -99999px; padding-bottom: 99999px;\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/loginsettings.html',\r\n    \"<div class=\\\"body body-settings\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"container-fluid container-flush\\\" ng-controller=\\\"LoginSettingsCtrl\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12 col-sm-10 col-sm-offset-1 col-md-6 col-md-offset-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <header class=\\\"text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <h2>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{'Settings' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </h2>\\r\" +\r\n    \"\\n\" +\r\n    \"                </header>\\r\" +\r\n    \"\\n\" +\r\n    \"                <form name=\\\"settingsForm\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"panel panel-settings-dialog\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <uib-accordion>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <uib-accordion-group heading=\\\"Language\\\" is-open=\\\"isLanguageOpen\\\" template-url=\\\"/app/views/templates/settings-group-template.html\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <label>{{'Change the language:' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <select\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    ng-change=\\\"changeLanguage()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    ng-model=\\\"values.language\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    ng-options=\\\"lang.id as lang.name for lang in languages\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </select>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </uib-accordion-group>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <uib-accordion-group heading=\\\"Application Information\\\" is-open=\\\"isApplicationInformationOpen\\\" template-url=\\\"/app/views/templates/settings-group-template.html\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div ng-include=\\\"'/app/views/aboutsettings.html'\\\" ng-controller=\\\"AboutSettingsCtrl\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </uib-accordion-group>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <uib-accordion-group heading=\\\"Other\\\" is-open=\\\"isOtherOpen\\\" template-url=\\\"/app/views/templates/settings-group-template.html\\\" ng-show=\\\"showDebugSettings\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <label>{{'Client ID:' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                ng-model=\\\"clientId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                ng-change=\\\"changeClientId()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                placeholder=\\\"{{'Client ID' | translate}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"form-group\\\" ng-class=\\\"{ 'has-error' : (settingsForm.notificationTimeout.$error.pattern)}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <label>{{:: 'Notification Timeout in minutes (0 - 99, where 0 is off) :' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                type=\\\"number\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                name=\\\"notificationTimeout\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                ng-pattern=\\\"/^[0-9]{1,2}$/\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                ng-model=\\\"notificationTimeout\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                ng-change=\\\"changeNotificationTimeout()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                placeholder=\\\"{{:: 'Notification Timeout' | translate}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"ap-settings-invalid-timeout\\\" ng-show=\\\"settingsForm.notificationTimeout.$error.pattern\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{:: 'Timeout must be a number between 0 and 99.' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </uib-accordion-group>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </uib-accordion>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <footer>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-show=\\\"(actionMessage === 'reset')\\\" translate>Client ID Successfully Reset.</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-show=\\\"(actionMessage === 'failed')\\\" translate>Failed, please try again.</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-show=\\\"(actionMessage === 'english')\\\" translate>Language Set to English.</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-show=\\\"(actionMessage === 'spanish')\\\" translate>Language Set to Spanish.</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button class=\\\"btn btn-primary btn-block\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                id=\\\"backToLoginBtn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                ng-click=\\\"backButton()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{'Back to Login' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button id=\\\"clearStorageBtn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                class=\\\"btn btn-default btn-block\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                ng-click=\\\"clearClientId()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                ng-show=\\\"showDebugSettings\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{'Reset Client ID' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </footer>\\r\" +\r\n    \"\\n\" +\r\n    \"                </form>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/modals/apidocumentationgatekeepermodal.html',\r\n    \"<div class=\\\"modal-dialog-report\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"cancel()\\\"><span>&times;</span></button>\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"modal-subtitle\\\">{{'API Documentation Disclaimer' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <p>As a patient, you have the right to access information in your health record via an app of your choice, \\r\" +\r\n    \"\\n\" +\r\n    \"                provided it meets the technical specifications required by law.\\r\" +\r\n    \"\\n\" +\r\n    \"                Examples of apps you may use include Health (Apple), CommonHealth (Android), or iBlueButton (Medicare and Veterans). \\r\" +\r\n    \"\\n\" +\r\n    \"                While not required, you may want to check the security and privacy standards of your app to ensure that your health \\r\" +\r\n    \"\\n\" +\r\n    \"                information will be protected and secure. A connection can be made from your provider’s database to the app of your \\r\" +\r\n    \"\\n\" +\r\n    \"                choice using the information provided here. Please contact the office for further details.</p>        \\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Error loading privacy policy.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak translate>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Error loading privacy policy.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-footer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-5 col-sm-4 col-md-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <button id=\\\"agreeBtn\\\" type=\\\"submit\\\" class=\\\"btn btn-primary btn-lg btn-block\\\" ng-click=\\\"ok()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <i class=\\\"fa fa-4x\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Agree' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-5 col-sm-4 col-md-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <button id=\\\"disagreeBtn\\\" type=\\\"button\\\" class=\\\"btn btn-default2 btn-lg btn-block\\\" ng-click=\\\"cancel()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <i class=\\\"fa fa-4x\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Cancel' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/modals/practicetermsmodal.html',\r\n    \"<div class=\\\"modal-dialog-report\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"cancel()\\\"><span>&times;</span></button>\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"modal-subtitle\\\">{{'Patient Portal Practice Terms' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <p ng-if=\\\"practiceConsent\\\"  ng-bind-html=\\\"practiceConsent\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            </p>\\r\" +\r\n    \"\\n\" +\r\n    \"            <p ng-if=\\\"!practiceConsent\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{'You must login to view terms' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </p>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Error loading practice terms.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak translate>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Error loading practice terms.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-footer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"btn btn-default2 btn-lg\\\" ng-click=\\\"ok()\\\">{{::'Close' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/modals/privacypolicymodal.html',\r\n    \"<div class=\\\"modal-dialog-report\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"cancel()\\\"><span>&times;</span></button>\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"modal-subtitle\\\">{{'Patient Portal Privacy Policy' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"privacyPolicyUrl\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <iframe ng-src=\\\"{{::privacyPolicyUrl}}\\\"></iframe>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"!privacyPolicyUrl\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{'You must login to view policy.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Error loading privacy policy.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak translate>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Error loading privacy policy.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-footer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"btn btn-default2 btn-lg\\\" ng-click=\\\"ok()\\\">{{::'Close' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/navigation/navigationDoctors.html',\r\n    \"<div class=\\\"panel panel-dashboard\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <img class=\\\"page-image doctors\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"<!--<div ng-cloak>-->\\r\" +\r\n    \"\\n\" +\r\n    \"    <!--<div id=\\\"doctors-panel\\\" class=\\\"panel panel-default panel-flush\\\">-->\\r\" +\r\n    \"\\n\" +\r\n    \"        <!--<div class=\\\"panel-heading\\\">-->\\r\" +\r\n    \"\\n\" +\r\n    \"            <!--{{::'Doctors' | translate}} - {{CurrentUser.FullName}}-->\\r\" +\r\n    \"\\n\" +\r\n    \"        <!--</div>-->\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <!--<div ng-if=\\\"!loading && !httpError\\\" class=\\\"panel-body\\\">-->\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <!--<div class=\\\"form-section\\\">-->\\r\" +\r\n    \"\\n\" +\r\n    \"                <!--<h3>Doctors</h3>-->\\r\" +\r\n    \"\\n\" +\r\n    \"                <!--<h3>...Coming Soon...</h3>-->\\r\" +\r\n    \"\\n\" +\r\n    \"                <!--<h4><a id=\\\"landing-btn\\\" data-transition-to=\\\"{appRoute: 'landing'}\\\"><strong>Landing Page</strong></a></h4>-->\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <!--</div>-->\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <!--</div>-->\\r\" +\r\n    \"\\n\" +\r\n    \"        <!--<div ng-if=\\\"loading || httpError\\\">-->\\r\" +\r\n    \"\\n\" +\r\n    \"            <!--<div class=\\\"text-center\\\" ng-show=\\\"loading\\\">-->\\r\" +\r\n    \"\\n\" +\r\n    \"                <!--<span><i class=\\\"fa fa-spinner fa-spin fa-3x\\\"></i></span>-->\\r\" +\r\n    \"\\n\" +\r\n    \"            <!--</div>-->\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <!--<uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>-->\\r\" +\r\n    \"\\n\" +\r\n    \"                <!--{{::\\\"An error has occurred and the patient info could not be loaded.\\\" | translate}}-->\\r\" +\r\n    \"\\n\" +\r\n    \"            <!--</uib-alert>-->\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <!--<uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak translate>-->\\r\" +\r\n    \"\\n\" +\r\n    \"                <!--You do not have access to this patient's info.-->\\r\" +\r\n    \"\\n\" +\r\n    \"            <!--</uib-alert>-->\\r\" +\r\n    \"\\n\" +\r\n    \"        <!--</div>-->\\r\" +\r\n    \"\\n\" +\r\n    \"    <!--</div>-->\\r\" +\r\n    \"\\n\" +\r\n    \"<!--</div>-->\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/settings-phone.html',\r\n    \"<div class=\\\"body-inverse ng-hide\\\" ng-show=\\\"true\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"container-fluid container-flush\\\" id=\\\"settings\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-group\\\" id=\\\"accordian\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel panel-ap-settings\\\" id=\\\"appointments-settings-option\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-heading\\\" data-toggle=\\\"collapse\\\" ng-click=\\\"switch('appointments');\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     data-parent=\\\"#accordian\\\" href=\\\"#appointments\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"panel-title\\\" ng-class=\\\"options.selectedGroup === 'appointments' ? 'selected' : 'deselected'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{'Schedule Settings' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-1 col-md-1 pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ng-class=\\\"options.selectedGroup === 'appointments'? 'ap-chevron-up':'ap-chevron-down'\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-collapse collapse\\\" id=\\\"appointments\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"panel-body \\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-include=\\\"'/app/views/appointmentlistsettings.html'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             ng-controller=\\\"AppointmentListSettingsCtrl\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel panel-ap-settings\\\" id=\\\"messages-settings-option\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-heading\\\" data-toggle=\\\"collapse\\\" ng-click=\\\"switch('messages');\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     data-parent=\\\"#accordian\\\" href=\\\"#messages\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"panel-title\\\" ng-class=\\\"options.selectedGroup === 'messages' ? 'selected' : 'deselected'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{'Messages Settings' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-1 col-md-1 pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ng-class=\\\"options.selectedGroup === 'messages'? 'ap-chevron-up':'ap-chevron-down'\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-collapse collapse\\\" id=\\\"messages\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"panel-body \\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-include=\\\"'/app/views/messagelistsettings.html'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             ng-controller=\\\"MessageListSettingsCtrl\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel panel-ap-settings\\\" id=\\\"user-settings-option\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-heading\\\" data-toggle=\\\"collapse\\\" ng-click=\\\"switch('user');\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     data-parent=\\\"#accordian\\\" href=\\\"#user\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"panel-title\\\" ng-class=\\\"options.selectedGroup === 'user' ? 'selected' : 'deselected'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{'User Settings' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-1 col-md-1 pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ng-class=\\\"options.selectedGroup === 'user'? 'ap-chevron-up':'ap-chevron-down'\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div id=\\\"user\\\" class=\\\"panel-collapse collapse\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"panel-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-include=\\\"'/app/views/usersettings.html'\\\" ng-controller=\\\"UserSettingsCtrl\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel panel-ap-settings\\\" id=\\\"about-settings-option\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-heading\\\" data-toggle=\\\"collapse\\\" ng-click=\\\"switch('about');\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     data-parent=\\\"#accordian\\\" href=\\\"#about\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"panel-title\\\" ng-class=\\\"options.selectedGroup === 'about' ? 'selected' : 'deselected'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{'About' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-1 col-md-1 pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ng-class=\\\"options.selectedGroup === 'about'? 'ap-chevron-up':'ap-chevron-down'\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-collapse collapse\\\" id=\\\"about\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"panel-body \\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-include=\\\"'/app/views/aboutsettings.html'\\\" ng-controller=\\\"AboutSettingsCtrl\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel panel-ap-settings\\\" id=\\\"logoff-setting\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"panel-title deselected\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                         ng-click=\\\"logoff();\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{'Log off' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/settings-tablet.html',\r\n    \"<div class=\\\"body-inverse ng-hide\\\" ng-cloak ng-show=\\\"true\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div id=\\\"settings\\\" class=\\\"container-fluid container-flush\\\" ng-controller=\\\"LoginSettingsCtrl\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12 col-sm-6 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ul class=\\\"list-group list-group-menu blur-deselected list-group-flush-left list-group-flush-top\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <li id=\\\"appointments-settings-option\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        class=\\\"list-group-item\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-click=\\\"options.selectedGroup = 'appointmentslist'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-class=\\\"{'selected' : options.selectedGroup === 'appointmentslist', 'deselected' : options.selectedGroup !== 'appointmentslist'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span class=\\\"ap-chevron-right-lt-gray\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"header\\\">{{\\\"Schedule Settings\\\" | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <li id=\\\"messages-settings-option\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        class=\\\"list-group-item\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-click=\\\"options.selectedGroup = 'messageslist'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-class=\\\"{'selected' : options.selectedGroup === 'messageslist', 'deselected' : options.selectedGroup !== 'messageslist'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span class=\\\"ap-chevron-right-lt-gray\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"header\\\">{{\\\"Messages Settings\\\" | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <li id=\\\"user-settings-option\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        class=\\\"list-group-item\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-click=\\\"options.selectedGroup = 'user'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-class=\\\"{'selected' : options.selectedGroup === 'user', 'deselected' : options.selectedGroup !== 'user'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span class=\\\"ap-chevron-right-lt-gray\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"header\\\">{{\\\"User Settings\\\" | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <li id=\\\"about-settings-option\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        class=\\\"list-group-item\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-click=\\\"options.selectedGroup = 'about'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-class=\\\"{'selected' : options.selectedGroup === 'about', 'deselected' : options.selectedGroup !== 'about'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span class=\\\"ap-chevron-right-lt-gray\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"header\\\">{{\\\"About\\\" | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </li>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <li id=\\\"logoff-setting\\\" class=\\\"list-group-item deselected\\\" ng-click=\\\"logoff()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"header\\\">{{\\\"Log off\\\" | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12 col-sm-6 col-flush\\\" ng-switch=\\\"options.selectedGroup\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-switch-when=\\\"dashboard\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-include=\\\"'/app/views/dashboardsettings.html'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-switch-when=\\\"appointmentslist\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-include=\\\"'/app/views/appointmentlistsettings.html'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                         ng-controller=\\\"AppointmentListSettingsCtrl\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-switch-when=\\\"messageslist\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-include=\\\"'/app/views/messagelistsettings.html'\\\" ng-controller=\\\"MessageListSettingsCtrl\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-switch-when=\\\"user\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-include=\\\"'/app/views/usersettings.html'\\\" ng-controller=\\\"UserSettingsCtrl\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-switch-when=\\\"about\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-include=\\\"'/app/views/aboutsettings.html'\\\" ng-controller=\\\"AboutSettingsCtrl\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/statementslogin.html',\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"body\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div id=\\\"login-container\\\" class=\\\"container-fluid\\\" ap-login-background client-Id=\\\"model.clientID\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 col-xs-flush col-md-6 col-md-offset-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div id=\\\"login-header\\\" class=\\\"logo-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row\\\">&nbsp;</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"modal-dialog modal-dialog-login\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 col-xs-flush col-md-10\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"modal-content\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div class=\\\"modal-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <div class=\\\"text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <img src=\\\"images/spacer.png\\\" class=\\\"login-image\\\" alt=\\\"login-image\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div class=\\\"modal-subtitle\\\" id=\\\"myModalLabel2\\\" ng-if=\\\"model.practiceName\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        {{model.practiceName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div class=\\\"modal-tagline\\\" id=\\\"myModalLabel3\\\" ng-if=\\\"model.practiceTagline\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        {{model.practiceTagline}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <h1 class=\\\"large-description text-center\\\">View And Pay Statements</h1>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div class=\\\"modal-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <form id=\\\"login-form\\\" name=\\\"loginForm\\\" ap-form-focus ng-submit=\\\"loginProcess()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                      novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    ng-class=\\\"{ 'has-error' : loginForm.accessCode.$invalid && submitted}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        <label for=\\\"zipCode\\\">{{::'Access Code' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        <input class=\\\"form-control\\\" name=\\\"accessCode\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                ng-model=\\\"model.accessCode\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                id=\\\"accessCode\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                placeholder=\\\"{{'ER879B3' | translate}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                required>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        <span ng-show=\\\"loginForm.accessCode.$invalid && submitted\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            class=\\\"help-block ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            {{::'Not valid format.' | translate}}<br/>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            {{::'12345' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                             ng-class=\\\"{ 'has-error' : loginForm.zipCode.$invalid && submitted}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            <label for=\\\"zipCode\\\">{{::'ZipCode' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            <input class=\\\"form-control\\\" name=\\\"zipCode\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                   ng-model=\\\"model.zipCode\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                   id=\\\"zipCode\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                   placeholder=\\\"{{'12345' | translate}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                   ng-pattern=\\\"zipCodeRegex\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                   required>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            <span ng-show=\\\"loginForm.zipCode.$invalid && submitted\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                  class=\\\"help-block ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                {{::'Not valid format.' | translate}}<br/>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                {{::'12345' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                   <div class=\\\"modal-text\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       {{::'Provide one of the following:' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                   </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div ng-if=\\\"!selectUserMode\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                             ng-class=\\\"{ 'has-error' : loginForm.birthDate.$invalid && submitted}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                         <label for=\\\"birthDate\\\">{{::'BirthDate' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            <input type=\\\"text\\\" class=\\\"form-control\\\" name=\\\"birthDate\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                   ng-model=\\\"model.birthDate\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                   placeholder=\\\"{{'yyyy-mm-dd' | translate}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                   id=\\\"birthDate\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                   ng-pattern=\\\"birthDateRegex\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                   ng-required=\\\"!model.phoneNumber\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                          <span ng-show=\\\"loginForm.birthDate.$invalid && submitted\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                  class=\\\"text-danger ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        {{::'Not valid format.' | translate}}<br/>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        {{::'yyyy-mm-dd' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                     </span>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                             ng-class=\\\"{ 'has-error' : loginForm.phoneNumber.$invalid && submitted}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                         <label for=\\\"phoneNumber\\\">{{::'Phone Number' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            \\r\" +\r\n    \"\\n\" +\r\n    \"                                                         <input class=\\\"form-control\\\" id=\\\"phoneNumber\\\" name=\\\"phoneNumber\\\" ng-model=\\\"model.phoneNumber\\\" type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                         placeholder=\\\"(XXX)XXX-XXXX\\\" ng-pattern=\\\"phoneRegEx\\\" ng-required=\\\"!model.birthDate\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                          <span ng-show=\\\"loginForm.phoneNumber.$invalid && submitted\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                  class=\\\"text-danger ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            {{::'Not valid format.' | translate}}<br/>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            {{::'(XXX)XXX-XXXX' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div class=\\\"text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        <div class=\\\"col-xs-12 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                <div ng-show=\\\"errorMessage\\\" class=\\\"text-danger ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                    <div class=\\\"pre\\\">{{errorMessage | translate}} </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        <button type=\\\"submit\\\" class=\\\"btn btn-primary btn-lg btn-block btn-login\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                ng-disabled=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            <span class=\\\"ng-hide\\\" ng-show=\\\"loading\\\"><ap-spinner></ap-spinner></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            {{'Login' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </form>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                           </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <!-- Below is a hack to get the android webview to behave properly while logging in.\\r\" +\r\n    \"\\n\" +\r\n    \"                If this is removed, it will cause random whitespace to appear after login.  Please don't remove. -->\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row\\\" style=\\\"overflow: hidden; min-height: 1px;\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 col-sm-10 col-sm-offset-1 col-md-6 col-md-offset-3\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                         style=\\\"margin-bottom: -99999px; padding-bottom: 99999px;\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/templates/settings-group-template.html',\r\n    \"<div class=\\\"panel panel-ap-portal-settings\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel-heading clickable\\\" data-toggle=\\\"collapse\\\" ng-click=\\\"toggleOpen()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-title\\\" ng-class=\\\"isOpen ? 'selected' : 'deselected'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{heading | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-1 col-md-1 pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <span ng-class=\\\"isOpen ? 'ap-chevron-up-gray' : 'ap-chevron-down-gray'\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel-collapse collapse\\\" uib-collapse=\\\"!isOpen\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-body\\\" ng-transclude>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/usersettings.html',\r\n    \"<div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div id=\\\"user-settings\\\" class=\\\"form-section\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"form-section-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'User Settings' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <label>{{::'Logged in as' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::usersettings.username}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <label>{{::'Client ID' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::usersettings.clientId}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <label for=\\\"language-input\\\">{{::'Change the language:' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <select id=\\\"language-input\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            ng-change=\\\"changeLanguage()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            ng-model=\\\"usersettings.language\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            ng-options=\\\"language.id as language.name for language in usersettings.languages\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    </select>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/viewApiDocumentModal.html',\r\n    \"<div class=\\\"modal-dialog-report\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"cancel()\\\"><span>&times;</span></button>\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"modal-subtitle\\\">{{model.Title}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <ap-document-viewer-with-download\\r\" +\r\n    \"\\n\" +\r\n    \"            disable-inline-pdf=\\\"model.DisableInlinePdf\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            document-helper=\\\"model.DocumentHelper\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            document-id=\\\"model.DocumentId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            download-file-name=\\\"model.DownloadFileName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            enable-download=\\\"model.EnableDownload\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            has-static-url=\\\"model.HasStaticUrl\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            document-download=\\\"downloadDocument(documentId)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            document-get-static-url=\\\"getStaticUrl(documentId)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            document-load=\\\"loadDocument(documentId, requestSettings)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"        ></ap-document-viewer-with-download>\\r\" +\r\n    \"\\n\" +\r\n    \"        <p><span class=\\\"text-bold\\\">Client ID:</span> {{:: model.ClientID }}<br />\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"text-bold\\\">Base URL:</span> {{:: model.ClientURL }}</p>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-footer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"btn btn-default2 btn-lg\\\" ng-click=\\\"ok()\\\">{{::'Close' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/views/viewDocumentModal.html',\r\n    \"<div class=\\\"modal-dialog-report\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"cancel()\\\"><span>&times;</span></button>\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"modal-subtitle\\\">{{model.Title}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <ap-document-viewer-with-download\\r\" +\r\n    \"\\n\" +\r\n    \"            disable-inline-pdf=\\\"model.DisableInlinePdf\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            document-helper=\\\"model.DocumentHelper\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            document-id=\\\"model.DocumentId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            download-file-name=\\\"model.DownloadFileName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            enable-download=\\\"model.EnableDownload\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            has-static-url=\\\"model.HasStaticUrl\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            document-download=\\\"downloadDocument(documentId)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            document-get-static-url=\\\"getStaticUrl(documentId)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            document-load=\\\"loadDocument(documentId, requestSettings)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"        ></ap-document-viewer-with-download>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-footer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"btn btn-default2 btn-lg\\\" ng-click=\\\"ok()\\\">{{::'Close' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/partials/desktopRuler/views/apDesktopRuler.html',\r\n    \"<div class=\\\"container-fluid container-flush ap-application-margin ap-application-content desktop-ruler-height\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-margin-left\\\">P-L</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-column-left\\\">01</div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-gutter\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-column-left\\\">02</div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-gutter\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-column-left\\\">03</div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-gutter\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-column-left\\\">04</div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-gutter\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-column-left\\\">05</div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-gutter\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-column-left\\\">06</div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-gutter\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-column-left\\\">07</div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-gutter\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-column-left\\\">08</div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-gutter\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-column-left\\\">09</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-gutter\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-column-left\\\">10</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-gutter\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-column-left\\\">11</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-gutter\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-column-left\\\">12</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-gutter\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-column-left\\\">13</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-gutter\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-column-left\\\">14</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-gutter\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-column-left\\\">15</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-gutter\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-column-left\\\">16</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"desktop-ruler-margin-right\\\">P-R</div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/partials/footer/views/apFooter.html',\r\n    \"<div class=\\\"row print-bottom\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"ap-footer ap-application-padding\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <span class=\\\"hidden-print\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                 {{'Powered by' | translate}}&nbsp;&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                <img src=\\\"images/spacer.png\\\" class=\\\"ap-footer-logo\\\" alt=\\\"logo\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            </span>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-8\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row hidden-print\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <a class=\\\"clickable\\\" ng-click=\\\"contactUs()\\\">{{'Contact Us' | translate}}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                        &nbsp;&nbsp;|&nbsp;&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                        <a class=\\\"clickable\\\" ng-click=\\\"viewPrivacyPolicy()\\\">{{'Privacy Policy' | translate}}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-if=\\\"apFooter.PatientAuthenticated\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            &nbsp;&nbsp;|&nbsp;&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                            <a class=\\\"clickable\\\" ng-click=\\\"viewPracticeTerms()\\\">{{'Practice Terms' | translate}}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                            &nbsp;&nbsp;|&nbsp;&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                            <a class=\\\"clickable\\\" ng-click=\\\"viewApiDocumentationGatekeeper()\\\">{{'API Documentation' | translate}}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"pull-right hidden-print\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                      &copy; {{'Aprima Medical Software 2015.  All rights reserved.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/partials/header/views/apHeader.html',\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"ap-header flexbox flexbox-horizontal-center hidden-print\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"flexbox-pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <span>\\r\" +\r\n    \"\\n\" +\r\n    \"            <img src=\\\"images/spacer.png\\\" class=\\\"header-image\\\" alt=\\\"header-logo\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"header-title\\\" ng-if=\\\"apHeader.practiceName\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{apHeader.practiceName}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"flexbox-pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"header-dropdown header-menu header-item\\\" ng-show=\\\"!hideToolbar\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div uib-dropdown is-open='openmenu'>\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-header btn-header-image\\\" type=\\\"button\\\" uib-dropdown-toggle>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"header-text1\\\">{{'Patient'|translate}}&nbsp;&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                        <img class=\\\"rounded-corner-sm border-width-sm extra-dark-grey-border\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             lazy-src=\\\"{{apHeader.activePatientId | apPatientPortalThumbnailSrc:30:30}}\\\" endpoint-base='patient' alt=\\\"patient-image\\\"/>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"header-text2\\\">&nbsp;&nbsp;{{apHeader.activePatientFullName}} </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-if=\\\"apHeader.hasResponsibleParties\\\" class=\\\"caret\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                <ul ng-if=\\\"apHeader.hasResponsibleParties\\\" class=\\\"dropdown-menu dropdown-menu-right\\\" uib-dropdown-menu role=\\\"menu\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <li ng-repeat=\\\"patient in apHeader.responsibleParties\\\" role=\\\"presentation\\\" ng-click=\\\"setActivePatient(patient)\\\" ng-if=\\\"patient\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <a role=\\\"menuitem\\\" >\\r\" +\r\n    \"\\n\" +\r\n    \"                            <img class=\\\"rounded-corner-md border-width-md extra-dark-grey-border\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                 lazy-src=\\\"{{patient.Id | apPatientPortalThumbnailSrc:40:40}}\\\" endpoint-base='patient' alt=\\\"patient-image\\\"/>&nbsp;&nbsp;{{patient.FirstName}} {{patient.LastName}}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"flexbox-pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"header-dropdown header-menu header-item flush-right\\\" ng-show=\\\"!hideToolbar\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div uib-dropdown>\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-header btn-flush-right btn-header-image no-image\\\" type=\\\"button\\\" id=\\\"header-context-menu\\\" uib-dropdown-toggle>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"header-text1\\\">{{'Welcome,'|translate}}&nbsp;&nbsp;</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"header-text2\\\">{{apHeader.loginUserFullName}} </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"caret\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                <ul class=\\\"dropdown-menu dropdown-menu-right no-image\\\" uib-dropdown-menu role=\\\"menu\\\" aria-labelledby=\\\"header-context-menu\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <li role=\\\"presentation\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <a id=\\\"context-update-notifications\\\" role=\\\"menuitem\\\" tabindex=\\\"1\\\" ng-click=\\\"updateNotifications()\\\">{{'Update Notifications' | translate}}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <li role=\\\"presentation\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <a id=\\\"context-account-details\\\" role=\\\"menuitem\\\" tabindex=\\\"2\\\" ng-click=\\\"accountDetails()\\\">{{'Account Details' | translate}}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <li role=\\\"presentation\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <a id=\\\"context-signout\\\" role=\\\"menuitem\\\" tabindex=\\\"3\\\" ng-click=\\\"signOff()\\\">{{'Sign Out' | translate}}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"ap-mobile-menu-button\\\" ng-click=\\\"toggleMobileNav()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <span class=\\\"glyphicon glyphicon-menu-hamburger\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class = \\\"header-item pull-right center-text\\\" ng-if=\\\"loading\\\"><ap-spinner></ap-spinner></span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/partials/mobileNav/views/apMobileNav.html',\r\n    \"<!--Begin mobile nav bar-->\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"ap-mobile-nav slide-in\\\" uib-dropdown uib-collapse=\\\"!showMobileNav\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"  <div ng-if=\\\"showMobileNav\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"ap-mobile-nav-item flexbox flexbox-horizontal-center\\\" ng-click=\\\"transitionAndCloseNav({appRoute: 'dashboard'})\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <img class=\\\"toolbar-svg home-selected\\\" src=\\\"images/spacer.png\\\" ng-if=\\\"(!toolbarItem || (toolbarItem == 'welcome'))\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <img class=\\\"toolbar-svg home\\\" src=\\\"images/spacer.png\\\" ng-if=\\\"(toolbarItem && (toolbarItem != 'welcome'))\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"      <span class=\\\"nav-item\\\" ng-class=\\\"{'nav-item-active': (!toolbarItem || (toolbarItem == 'welcome')) }\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        {{:: 'Welcome' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"      </span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"ap-mobile-nav-item flexbox flexbox-horizontal-center\\\" ng-click=\\\"transitionAndCloseNav({appRoute: 'myChartMobile', opts: {openPD: 'false'}})\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <img class=\\\"toolbar-svg chart-selected\\\" src=\\\"images/spacer.png\\\" ng-if=\\\"(toolbarItem == 'chart')\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <img class=\\\"toolbar-svg chart\\\" src=\\\"images/spacer.png\\\" ng-if=\\\"(toolbarItem != 'chart')\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"      <span class=\\\"nav-item\\\" ng-class=\\\"{'nav-item-active': toolbarItem == 'chart' }\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        {{:: 'Chart' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"      </span>\\r\" +\r\n    \"\\n\" +\r\n    \"      <span class=\\\"flexbox-pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"badge\\\" ng-if=\\\"notifications.Chart.BadgeCount > 0\\\">{{notifications.Chart.BadgeCount}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"      </span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"ap-mobile-nav-item flexbox flexbox-horizontal-center\\\" ng-click=\\\"transitionAndCloseNav({appRoute: 'myMessagesMobile', opts: {displayMode: 'received'}})\\\" ng-show=\\\"notifications.Messages.IsActive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <img class=\\\"toolbar-svg messages-selected\\\" src=\\\"images/spacer.png\\\" ng-if=\\\"(toolbarItem == 'messages')\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <img class=\\\"toolbar-svg messages\\\" src=\\\"images/spacer.png\\\" ng-if=\\\"(toolbarItem != 'messages')\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"      <span class=\\\"nav-item\\\" ng-class=\\\"{'nav-item-active': toolbarItem == 'messages' }\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        {{:: 'Messages' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"      </span>\\r\" +\r\n    \"\\n\" +\r\n    \"      <span class=\\\"flexbox-pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"badge\\\" ng-if=\\\"notifications.Messages.BadgeCount > 0\\\">{{notifications.Messages.BadgeCount}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"      </span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"ap-mobile-nav-item flexbox flexbox-horizontal-center\\\" ng-click=\\\"transitionAndCloseNav({appRoute: 'prescriptionsMobile'})\\\" ng-show=\\\"notifications.Prescriptions.IsActive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <img class=\\\"toolbar-svg prescriptions-selected\\\" src=\\\"images/spacer.png\\\" ng-if=\\\"(toolbarItem == 'prescriptions')\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <img class=\\\"toolbar-svg prescriptions\\\" src=\\\"images/spacer.png\\\" ng-if=\\\"(toolbarItem != 'prescriptions')\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"      <span class=\\\"nav-item\\\" ng-class=\\\"{'nav-item-active': toolbarItem == 'prescriptions' }\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        {{:: 'Prescriptions' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"      </span>\\r\" +\r\n    \"\\n\" +\r\n    \"      <span class=\\\"flexbox-pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"badge\\\" ng-if=\\\"notifications.Prescriptions.BadgeCount > 0\\\">{{notifications.Prescriptions.BadgeCount}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"      </span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"ap-mobile-nav-item flexbox flexbox-horizontal-center\\\" ng-click=\\\"transitionAndCloseNav({appRoute: 'forms'})\\\" ng-show=\\\"notifications.Forms.IsActive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <img class=\\\"toolbar-svg forms-selected\\\" src=\\\"images/spacer.png\\\" ng-if=\\\"(toolbarItem == 'forms')\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <img class=\\\"toolbar-svg forms\\\" src=\\\"images/spacer.png\\\" ng-if=\\\"(toolbarItem != 'forms')\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"      <span class=\\\"nav-item\\\" ng-class=\\\"{'nav-item-active': toolbarItem == 'forms' }\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        {{:: 'Forms' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"      </span>\\r\" +\r\n    \"\\n\" +\r\n    \"      <span class=\\\"flexbox-pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"badge\\\" ng-if=\\\"notifications.Forms.BadgeCount > 0\\\">{{notifications.Forms.BadgeCount}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"      </span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"ap-mobile-nav-item flexbox flexbox-horizontal-center\\\" ng-click=\\\"transitionAndCloseNav({appRoute: 'myAppointments'})\\\" ng-show=\\\"notifications.Appointments.IsActive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <img class=\\\"toolbar-svg appointments-selected\\\" src=\\\"images/spacer.png\\\" ng-if=\\\"(toolbarItem == 'appointments')\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <img class=\\\"toolbar-svg appointments\\\" src=\\\"images/spacer.png\\\" ng-if=\\\"(toolbarItem != 'appointments')\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"      <span class=\\\"nav-item\\\" ng-class=\\\"{'nav-item-active': toolbarItem == 'appointments' }\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        {{:: 'Appointments' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"      </span>\\r\" +\r\n    \"\\n\" +\r\n    \"      <span class=\\\"flexbox-pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"badge\\\" ng-if=\\\"notifications.Appointments.BadgeCount > 0\\\">{{notifications.Appointments.BadgeCount}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"      </span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"ap-mobile-nav-item flexbox flexbox-horizontal-center\\\" ng-click=\\\"transitionAndCloseNav({appRoute: 'billing'})\\\" ng-show=\\\"notifications.Billing.IsActive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <img class=\\\"toolbar-svg billing-selected\\\" src=\\\"images/spacer.png\\\" ng-if=\\\"(toolbarItem == 'billing')\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <img class=\\\"toolbar-svg billing\\\" src=\\\"images/spacer.png\\\" ng-if=\\\"(toolbarItem != 'billing')\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"      <span class=\\\"nav-item\\\" ng-class=\\\"{'nav-item-active': toolbarItem == 'billing' }\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        {{:: 'Billing' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"      </span>\\r\" +\r\n    \"\\n\" +\r\n    \"      <span class=\\\"flexbox-pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"badge\\\" ng-if=\\\"notifications.Billing.BadgeCount > 0\\\">{{notifications.Billing.BadgeCount}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"      </span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <!--<div class=\\\"ap-mobile-nav-item flexbox flexbox-horizontal-center\\\" ng-click=\\\"transitionAndCloseNav({appRoute: 'navigationDoctors'})\\\">-->\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <!--<img class=\\\"toolbar-svg\\\" src=\\\"images/doctors-selected.svg\\\" ng-if=\\\"(toolbarItem == 'doctors')\\\">-->\\r\" +\r\n    \"\\n\" +\r\n    \"        <!--<img class=\\\"toolbar-svg\\\" src=\\\"images/doctors.svg\\\" ng-if=\\\"(toolbarItem != 'doctors')\\\">-->\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"      <!--<span class=\\\"nav-item\\\" ng-class=\\\"{'nav-item-active': toolbarItem == 'doctors' }\\\">-->\\r\" +\r\n    \"\\n\" +\r\n    \"        <!--{{:: 'Doctors' | translate}}-->\\r\" +\r\n    \"\\n\" +\r\n    \"      <!--</span>-->\\r\" +\r\n    \"\\n\" +\r\n    \"      <!--<span class=\\\"flexbox-pull-right\\\">-->\\r\" +\r\n    \"\\n\" +\r\n    \"        <!--<span class=\\\"badge\\\" ng-if=\\\"notifications.Doctors.BadgeCount > 0\\\">{{notifications.Doctors.BadgeCount}}</span>-->\\r\" +\r\n    \"\\n\" +\r\n    \"      <!--</span>-->\\r\" +\r\n    \"\\n\" +\r\n    \"    <!--</div>-->\\r\" +\r\n    \"\\n\" +\r\n    \"    \\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"ap-mobile-nav-item ap-mobile-nav-welcome flexbox flexbox-horizontal-center\\\" ng-if=\\\"headerData && headerData.activePatientId\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        {{:: 'Welcome' | translate}}, {{ ::headerData.loginUserFullName }}\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    \\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"headerData && headerData.hasResponsibleParties\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"ap-mobile-nav-item flexbox flexbox-horizontal-center\\\" ng-repeat=\\\"party in headerData.responsibleParties | filter: {Id: '!' + headerData.activePatientId }\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <span class=\\\"nav-item\\\" ng-click=\\\"setActivePatient(party.Id)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{:: 'Switch to' | translate }} {{ ::party.FirstName }} {{ ::party.LastName }}\\r\" +\r\n    \"\\n\" +\r\n    \"            </span>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"ap-mobile-nav-item ap-mobile-nav-signout flexbox flexbox-horizontal-center\\\" ng-click=\\\"signOff()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"      <i class=\\\"fa fa-power-off\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"      <span class=\\\"nav-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        {{:: 'Sign out' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"      </span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"  </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/app/partials/toolbar/views/apToolbar.html',\r\n    \"<div class=\\\"btn-group btn-group-justified ap-toolbar ap-application-margin ap-application-content hidden-print\\\" role=\\\"group\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"btn-group-toolbar-blank flexbox flexbox-horizontal-center\\\" ng-if=\\\"blankToolbar.IsActive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <button\\r\" +\r\n    \"\\n\" +\r\n    \"                    ng-if=\\\"blankToolbar.BackToHome.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    class=\\\"btn btn-nowrap btn-toolbar\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    id=\\\"back-to-home-btn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    ng-click=\\\"backToHome()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"underline-blank-toolbar\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <i class=\\\"fa fa-backward\\\"></i>&nbsp;{{:: 'Back to Home' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"btn-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             ng-class=\\\"(!toolbarItem || toolbarItem === 'welcome')? 'btn-group-toolbar-selected btn-group-flush-left' : 'btn-group-toolbar btn-group-flush-left'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             role=\\\"group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <button\\r\" +\r\n    \"\\n\" +\r\n    \"                        class=\\\"btn btn-nowrap btn-toolbar underline\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        id=\\\"welcome-btn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-if=\\\"notifications.Welcome.IsActive && !blankToolbar.BackToHome.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        data-transition-to=\\\"{appRoute: 'dashboard'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <img src=\\\"images/spacer.png\\\" class=\\\"toolbar-svg home-selected\\\" ng-if=\\\"(!toolbarItem || toolbarItem === 'welcome')\\\" alt=\\\"home-selected\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <img src=\\\"images/spacer.png\\\" class=\\\"toolbar-svg home\\\" ng-if=\\\"(toolbarItem && toolbarItem !== 'welcome')\\\" alt=\\\"home\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{:: 'Welcome' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"btn-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             ng-class=\\\"(toolbarItem == 'chart')? 'btn-group-toolbar-selected' : 'btn-group-toolbar'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             role=\\\"group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             ng-if=\\\"notifications.Chart.IsActive && !blankToolbar.BackToHome.IsActive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <button\\r\" +\r\n    \"\\n\" +\r\n    \"                        class=\\\"btn btn-nowrap btn-toolbar underline\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        id=\\\"chart-btn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-if=\\\"notifications.Chart.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-click=\\\"navigateToChart()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <img src=\\\"images/spacer.png\\\" class=\\\"toolbar-svg chart-selected\\\" ng-if=\\\"toolbarItem == 'chart'\\\" alt=\\\"chart-selected\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <img src=\\\"images/spacer.png\\\" class=\\\"toolbar-svg chart\\\" ng-if=\\\"toolbarItem != 'chart'\\\" alt=\\\"chart\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{:: 'Chart' | translate}}&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"badge\\\" ng-if=\\\"notifications.Chart.BadgeCount > 0\\\">{{notifications.Chart.BadgeCount}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"btn-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             ng-class=\\\"(toolbarItem == 'messages')? 'btn-group-toolbar-selected' : 'btn-group-toolbar'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             role=\\\"group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             ng-if=\\\"notifications.Messages.IsActive && !blankToolbar.BackToHome.IsActive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <button\\r\" +\r\n    \"\\n\" +\r\n    \"                        class=\\\"btn btn-nowrap btn-toolbar underline\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        id=\\\"messages-btn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-if=\\\"notifications.Messages.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        data-transition-to=\\\"{appRoute: 'myMessagesDisplayMessages', opts: {displayMode: 'received'}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <img src=\\\"images/spacer.png\\\" class=\\\"toolbar-svg messages-selected\\\" ng-if=\\\"toolbarItem == 'messages'\\\" alt=\\\"messages-selected\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <img src=\\\"images/spacer.png\\\" class=\\\"toolbar-svg messages\\\" ng-if=\\\"toolbarItem != 'messages'\\\" alt=\\\"messages\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{:: 'Messages' | translate}}&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"badge\\\" ng-if=\\\"notifications.Messages.BadgeCount > 0\\\">{{notifications.Messages.BadgeCount}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"btn-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             ng-class=\\\"(toolbarItem == 'forms')? 'btn-group-toolbar-selected' : 'btn-group-toolbar'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             role=\\\"group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             ng-if=\\\"notifications.Forms.IsActive && !blankToolbar.BackToHome.IsActive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <button\\r\" +\r\n    \"\\n\" +\r\n    \"                        class=\\\"btn btn-nowrap btn-toolbar underline\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        id=\\\"forms-btn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-if=\\\"notifications.Forms.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        data-transition-to=\\\"{appRoute: 'forms'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <img src=\\\"images/spacer.png\\\" class=\\\"toolbar-svg forms-selected\\\" ng-if=\\\"toolbarItem == 'forms'\\\" alt=\\\"forms-selected\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <img src=\\\"images/spacer.png\\\" class=\\\"toolbar-svg forms\\\" ng-if=\\\"toolbarItem != 'forms'\\\" alt=\\\"forms\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{:: 'Forms' | translate}}&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"badge\\\" id=\\\"froms-badge-count\\\" ng-if=\\\"notifications.Forms.BadgeCount > 0\\\">{{notifications.Forms.BadgeCount}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"btn-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             ng-class=\\\"(toolbarItem == 'prescriptions')? 'btn-group-toolbar-selected' : 'btn-group-toolbar'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             role=\\\"group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             ng-if=\\\"notifications.Prescriptions.IsActive && !blankToolbar.BackToHome.IsActive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <button\\r\" +\r\n    \"\\n\" +\r\n    \"                        class=\\\"btn btn-nowrap btn-toolbar underline\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        id=\\\"prescriptions-btn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-if=\\\"notifications.Prescriptions.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        data-transition-to=\\\"{appRoute: 'prescriptions'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <img src=\\\"images/spacer.png\\\" class=\\\"toolbar-svg prescriptions-selected\\\" ng-if=\\\"toolbarItem == 'prescriptions'\\\" alt=\\\"prescriptions-selected\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <img src=\\\"images/spacer.png\\\" class=\\\"toolbar-svg prescriptions\\\" ng-if=\\\"toolbarItem != 'prescriptions'\\\" alt=\\\"prescriptions\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{:: 'Prescriptions' | translate}}&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"badge\\\" ng-if=\\\"notifications.Prescriptions.BadgeCount > 0\\\">{{notifications.Prescriptions.BadgeCount}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"btn-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             ng-class=\\\"(toolbarItem == 'appointments')? 'btn-group-toolbar-selected' : 'btn-group-toolbar'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             role=\\\"group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             ng-if=\\\"notifications.Appointments.IsActive && !blankToolbar.BackToHome.IsActive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <button\\r\" +\r\n    \"\\n\" +\r\n    \"                        class=\\\"btn btn-nowrap btn-toolbar underline\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        id=\\\"appointments-btn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-if=\\\"notifications.Appointments.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        data-transition-to=\\\"{appRoute: 'myAppointments'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <img src=\\\"images/spacer.png\\\" class=\\\"toolbar-svg appointments-selected\\\" ng-if=\\\"toolbarItem == 'appointments'\\\" alt=\\\"appointments-selected\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <img src=\\\"images/spacer.png\\\" class=\\\"toolbar-svg appointments\\\" ng-if=\\\"toolbarItem != 'appointments'\\\" alt=\\\"appointments\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{:: 'Appointments' | translate}}&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"badge\\\" ng-if=\\\"notifications.Appointments.BadgeCount > 0\\\">{{notifications.Appointments.BadgeCount}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"btn-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             ng-class=\\\"(toolbarItem == 'billing')? 'btn-group-toolbar-selected btn-group-flush-right' : 'btn-group-toolbar btn-group-flush-right'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             role=\\\"group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             ng-if=\\\"notifications.Billing.IsActive && !blankToolbar.BackToHome.IsActive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <button\\r\" +\r\n    \"\\n\" +\r\n    \"                        class=\\\"btn btn-nowrap btn-toolbar underline\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        id=\\\"billing-btn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-if=\\\"notifications.Billing.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        data-transition-to=\\\"{appRoute: 'billing'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <img src=\\\"images/spacer.png\\\" class=\\\"toolbar-svg billing-selected\\\" ng-if=\\\"toolbarItem == 'billing'\\\" alt=\\\"billing-selected\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <img src=\\\"images/spacer.png\\\" class=\\\"toolbar-svg billing\\\" ng-if=\\\"toolbarItem != 'billing'\\\" alt=\\\"billing\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{:: 'Billing' | translate}}&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"badge\\\" ng-if=\\\"notifications.Billing.BadgeCount > 0\\\">{{notifications.Billing.BadgeCount}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"btn-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             ng-class=\\\"(toolbarItem == 'doctors')? 'btn-group-toolbar-selected' : 'btn-group-toolbar'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             role=\\\"group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             ng-if=\\\"notifications.Doctors.IsActive && !blankToolbar.BackToHome.IsActive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <button\\r\" +\r\n    \"\\n\" +\r\n    \"                        class=\\\"btn btn-nowrap btn-toolbar underline\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        id=\\\"doctors-btn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-if=\\\"notifications.Doctors.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        data-transition-to=\\\"{appRoute: 'navigationDoctors'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <img src=\\\"images/spacer.png\\\" class=\\\"toolbar-svg doctors-selected\\\" ng-if=\\\"toolbarItem == 'doctors'\\\" alt=\\\"doctors-selected\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <img src=\\\"images/spacer.png\\\" class=\\\"toolbar-svg doctors\\\" ng-if=\\\"toolbarItem != 'doctors'\\\" alt=\\\"doctors\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{:: 'Doctors' | translate}}&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"badge\\\" ng-if=\\\"notifications.Doctors.BadgeCount > 0\\\">{{notifications.Doctors.BadgeCount}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\"\r\n  );\r\n\n}]);\n","(function(angular){\r\n    'use strict';\r\n\r\n    angular.module('app').directive('apPatientPortal', ApPatientPortalDirective);\r\n\r\n    function ApPatientPortalDirective() {\r\n        return {\r\n            restrict: 'E',\r\n            controller: [\r\n                '$rootScope',\r\n                '$scope',\r\n                '$state',\r\n                'CustomModuleRunService',\r\n                ApPatientPortalCtrl,\r\n            ],\r\n            templateUrl: '/app/views/components/apPatientPortal.html',\r\n        };\r\n    }\r\n\r\n    function ApPatientPortalCtrl(\r\n        $rootScope,\r\n        $scope,\r\n        $state,\r\n        CustomModuleRunService\r\n    ) {\r\n        var vm = {\r\n            loadedAngular: false,\r\n            \r\n            isLoginView: isLoginView,\r\n            onAngularInitialized: onAngularInitialized,\r\n            shouldHideFooter: shouldHideFooter,\r\n            shouldHideToolbar: shouldHideToolbar,\r\n        };\r\n\r\n        $scope.vm = vm;\r\n\r\n        function isLoginView() {\r\n            return $rootScope.loginView;\r\n        }\r\n\r\n        function onAngularInitialized() {\r\n            CustomModuleRunService.run();\r\n\r\n            if ($state.current && $state.current.name) {\r\n                // Reload the state since none of the listeners were setup before the initial state change.\r\n                // For instance, listeners like onStart, or onSuccess in source/web/www/modules/common/init.js.\r\n                // This call essentially does the same thing as $state.reload(),\r\n                // except it also uses location:false to not update the url.\r\n                // This would have an effect when you have an initial url that corresponds to a route\r\n                // that doesn't completely match the query string.\r\n                //\r\n                // Example to show the difference:\r\n                // initial url: http://localhost:4200/#/transactionComplete?m=55&i=55\r\n                // (Option 1)\r\n                // $state.reload() would transition to transactionComplete state, and then change the url\r\n                // to http://localhost:4200/#/transactionComplete,\r\n                // because there are currently no query parameters defined in the route for the state,\r\n                // so the ones from the initial url are not kept\r\n                // (Option 2)\r\n                // This call below with location:false would transition to transactionComplete state, and then NOT change the url\r\n                // According to the docs: If false, it will not update the url in the location bar.\r\n                $state.transitionTo($state.current, $state.params, {\r\n                    reload: true,\r\n                    inherit: false,\r\n                    notify: false,\r\n                    location: false,\r\n                });\r\n            }\r\n\r\n            vm.loadedAngular = true;\r\n        }\r\n\r\n        function shouldHideFooter() {\r\n            return $rootScope.hideFooter;\r\n        }\r\n\r\n        function shouldHideToolbar() {\r\n            return $rootScope.hideToolbar;\r\n        }\r\n    }\r\n})(window.angular);\r\n","(function(angular){\r\n    'use strict';\r\n\r\n    angular.module('app').component('apPrintablePracticeInfo', {\r\n        templateUrl: '/app/views/components/apPrintablePracticeInfo.html',\r\n        controllerAs: 'vm',\r\n        controller: [\r\n            'ContentAttributeService',\r\n            ApPrintablePracticeInfo,\r\n        ],\r\n    });\r\n\r\n    function ApPrintablePracticeInfo(\r\n        ContentAttributeService\r\n    ) {\r\n        var vm = this;\r\n\r\n\r\n        activate();\r\n\r\n        function activate() {\r\n            ContentAttributeService\r\n                .getPracticeName(false)\r\n                .then(function(data) {\r\n                    vm.practiceName = data;\r\n                });\r\n        }\r\n    }\r\n\r\n})(window.angular);","angular.module('app').controller('AboutSettingsCtrl',\r\n    ['$scope', 'configuration', 'LocalStorageRepository', 'AprimaAnalytics', 'ServerInfoRepository',\r\n        function ($scope, configuration, LocalStorageRepository, AprimaAnalytics, ServerInfoRepository) {\r\n            'use strict';\r\n\r\n            AprimaAnalytics.sendPageView('/Settings/About');\r\n\r\n            $scope.clientID = LocalStorageRepository.getClientID();\r\n            $scope.versionNumber = configuration.CLIENT_VERSION;\r\n            $scope.gitCommitHash = configuration.GIT_COMMIT_HASH;\r\n            $scope.gitCommitHashShort = configuration.GIT_COMMIT_HASH.substring(0,7);\r\n            $scope.deviceId = LocalStorageRepository.getDeviceId();\r\n            $scope.serverVersion = ServerInfoRepository.getMobileAssemblyVersion();\r\n            $scope.prmVersion = ServerInfoRepository.getPrmAssemblyVersion();\r\n            $scope.databaseVersion = ServerInfoRepository.getPrmDatabaseVersion();\r\n            $scope.databaseBuild = ServerInfoRepository.getPrmDatabaseBuild();\r\n        }]);\r\n","angular.module('app').controller('ApiDocumentationGatekeeperModalCtrl',\r\n    ['$scope', '$uibModalInstance', 'modalConfig',\r\n        function ($scope, $modalInstance, modalConfig) {\r\n            'use strict';\r\n\r\n            $scope.downloadingDocument = false;\r\n            $scope.model = {\r\n                Title: modalConfig.Title,\r\n            };\r\n            \r\n            function ok() {\r\n                $modalInstance.close('ok');\r\n            }\r\n\r\n            function cancel() {\r\n                $modalInstance.dismiss('cancel');\r\n            }\r\n\r\n            $scope.ok = ok;\r\n            $scope.cancel = cancel;\r\n        }]);\r\n","angular.module('app').controller('AppointmentListSettingsCtrl',\r\n    ['$scope', 'SettingService', 'ListService', 'AprimaAnalytics',\r\n        function ($scope, SettingService, ListService, AprimaAnalytics) {\r\n            'use strict';\r\n\r\n            AprimaAnalytics.sendPageView('/Settings/Schedule');\r\n\r\n            var loadingOption = {\r\n                    Description: 'Loading...'\r\n                },\r\n                appointmentDashboardSettings = SettingService.getAppointmentsListSettings();\r\n\r\n            var findById = function (list, id) {\r\n                return !id || _.find(list, {'Id': id});\r\n            };\r\n\r\n            var loadSettings = function () {\r\n                $scope.apptOptions = {\r\n                    calendars: [loadingOption]\r\n                };\r\n\r\n                $scope.settings = {\r\n                };\r\n\r\n                ListService.getList('calendar').then(function (list) {\r\n                    var currentCalendarId = appointmentDashboardSettings && appointmentDashboardSettings.calendarId;\r\n                    $scope.apptOptions.calendars = list;\r\n                    $scope.settings.appointmentsCalendar = findById($scope.apptOptions.calendars, currentCalendarId);\r\n                });\r\n\r\n                $scope.settings.displayEndTime = appointmentDashboardSettings && appointmentDashboardSettings.displayEndTime;\r\n\r\n                var badgeSettings = SettingService.getAppointmentsBadgeSettings();\r\n                $scope.settings.hideDischarged = badgeSettings && badgeSettings.hideDischarged;\r\n            };\r\n\r\n            $scope.mode = 'unlocked';\r\n\r\n            $scope.saveAppointmentsTileSettings = function () {\r\n                SettingService.setAppointmentsListSettings({\r\n                    calendarId: $scope && $scope.settings && $scope.settings.appointmentsCalendar && $scope.settings.appointmentsCalendar.Id,\r\n                    displayEndTime : $scope && $scope.settings && $scope.settings.displayEndTime\r\n                });\r\n\r\n                SettingService.updateNativeSettings();\r\n            };\r\n\r\n            $scope.saveHideDischargedOption = function () {\r\n                AprimaAnalytics.sendEvent('user', 'click', 'hide discharge');\r\n                SettingService.setAppointmentsBadgeSettings({\r\n                    hideDischarged: $scope && $scope.settings && $scope.settings.hideDischarged\r\n                });\r\n\r\n                SettingService.updateNativeSettings();\r\n            };\r\n\r\n            loadSettings();\r\n\r\n        }]);\r\n","angular.module('app').controller('LandingCtrl',\r\n    ['$scope', 'LoginFactory', 'TransitionManager', 'LogOffService', 'LocalStorageRepository',\r\n        function ($scope, LoginFactory, TransitionManager, LogOffService, LocalStorageRepository) {\r\n            'use strict';\r\n\r\n            $scope.currentUserID = LocalStorageRepository.getUserID();\r\n\r\n            $scope.logoff = function () {\r\n                LogOffService.logoff().then(function () {\r\n                    TransitionManager.transition({appRoute: 'login'});\r\n                });\r\n            };\r\n        }]\r\n);\r\n","angular.module('app').controller( 'LoginCtrl', [ '$location', '$log', '$rootScope', '$scope', '$state',\r\n    'aprgettext', 'AprimaAnalytics', 'Bridge', 'configuration', 'ConsentService', 'ContentAttributeService', 'GatewayFactory',\r\n    'LocalStorageRepository', 'LogOffService', 'LoginAssistanceRepository', 'PatientPortalStorageRepository', 'SessionService', 'TransitionManager', \r\n    'AccountRepository', 'toaster',\r\n        function ($location, $log, $rootScope, $scope, $state,\r\n            gettext, AprimaAnalytics, Bridge, configuration, ConsentService, ContentAttributeService, GatewayFactory,\r\n            LocalStorageRepository, LogOffService, LoginAssistanceRepository, PatientPortalStorageRepository, SessionService, TransitionManager,\r\n            AccountRepository, toaster) {\r\n            'use strict';\r\n\r\n            $log.info('LoginCtrl starting up');\r\n\r\n            AprimaAnalytics.sendPageView('/Logon');\r\n            LogOffService.logoff();\r\n            SessionService.resetSessionParams();\r\n            PatientPortalStorageRepository.removeActivePatient();\r\n\r\n            $scope.errorMessage = '';\r\n            $scope.submitted = false;\r\n            $scope.loading = false;\r\n            $scope.gateways = _.map(_.cloneDeep(configuration.GATEWAYS), function (g) {\r\n                g.display = g.prefix + ' - ' + g.url;\r\n                return g;\r\n            });\r\n\r\n            $scope.loginAssistanceInfo = null;\r\n\r\n            $scope.model = {\r\n                clientID: LocalStorageRepository.getClientID() || '0',\r\n                userName: LocalStorageRepository.getUserName() || '',\r\n                userId: LocalStorageRepository.getUserID() || null,\r\n                password: '',\r\n                gateway: null,\r\n                practiceName: '',\r\n                practiceTagline: '',\r\n            };\r\n\r\n            if(!configuration.DEV_HOSTED) {\r\n                ContentAttributeService.getClientConfig()\r\n                    .then(function (data) {\r\n                        var oldClientId = LocalStorageRepository.getClientID();\r\n\r\n                        if(oldClientId !== data.clientId) {\r\n                            LocalStorageRepository.clearAll();\r\n                        }\r\n\r\n                        LocalStorageRepository.setClientURL(data.hostUrl);\r\n                        LocalStorageRepository.setClientID(data.clientId);\r\n                        \r\n                        $scope.model.clientID = LocalStorageRepository.getClientID();\r\n                        onLoad();\r\n                    }).catch(function () {\r\n                        $scope.errorMessage = gettext('Error loading page. Unknown Client Id');\r\n                        Bridge.createModalAlert({\r\n                            title: gettext('Loading Error'),\r\n                            message: $scope.errorMessage,\r\n                            buttons: [gettext('Okay')]\r\n                        });\r\n                    });\r\n            } else {\r\n                onLoad();\r\n            }\r\n\r\n            function loadPracticeInfo() {\r\n                ContentAttributeService.getPracticeInfo(true)\r\n                    .then(function (practiceInfo) {\r\n                        $scope.model.practiceName = practiceInfo.practiceName;\r\n                        $scope.model.practiceTagline = practiceInfo.practiceTagline;\r\n                    })\r\n                    .catch(function () {\r\n                        $scope.model.practiceName = '';\r\n                        $scope.model.practiceTagline = '';\r\n                    });\r\n            }\r\n\r\n            function onLoad() {\r\n                loadPracticeInfo();\r\n                getLoginAssistanceInfo();\r\n            }\r\n\r\n            function loginProcess() {\r\n                //do not try logging in while trying to login.\r\n                if ($scope.loading) {\r\n                    return;\r\n                }\r\n\r\n                if ($scope.loginForm.$invalid) {\r\n                    $scope.submitted = true;\r\n                    return;\r\n                }\r\n\r\n                $scope.loading = true;\r\n\r\n                GatewayFactory.login(LocalStorageRepository.getClientID(), $scope.model.userName, $scope.model.password, $scope.model.gateway ? $scope.model.gateway.prefix : null, $scope.model.userId)\r\n                    .then(function () {\r\n                        // Broadcast event to start application timeout logic.\r\n                        // Please see 'modules\\app\\app.js' for application timeout configuration and documentation.\r\n                        $rootScope.$broadcast('IdleStartWatch');\r\n\r\n                        SessionService.setPatientAuthenticated(true);\r\n                        if (SessionService.getNewPasswordRequired() === true) {\r\n                            SessionService.setDisplayDashboardToolbar(false);\r\n                            SessionService.setShowHeaderNavigationMenu(false);\r\n                            TransitionManager.transition({appRoute: 'changepassword'});\r\n                        }\r\n                        else if (SessionService.getPracticeConsentAccepted() === true) {\r\n                            SessionService.setDisplayDashboardToolbar(true);\r\n                            SessionService.setShowHeaderNavigationMenu(true);\r\n                            TransitionManager.transition({appRoute: 'dashboard'});\r\n                        }\r\n                        else {\r\n                            SessionService.setDisplayDashboardToolbar(false);\r\n                            SessionService.setShowHeaderNavigationMenu(false);\r\n                            TransitionManager.transition({appRoute: 'loginconsent'});\r\n                        }\r\n                    }, function (err) {\r\n                        $scope.errorMessage = err.message;\r\n\r\n                        Bridge.createModalAlert({\r\n                            title: gettext('Login Error'),\r\n                            message: err.message,\r\n                            buttons: [gettext('Okay')]\r\n                        });\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n\r\n            function completeAccount() {\r\n                SessionService.setDisplayDashboardToolbar(true);\r\n                TransitionManager.transition({appRoute: 'accountActivationRequest'});\r\n            }\r\n\r\n            function settings() {\r\n                TransitionManager.transition({appRoute: 'loginsettings'});\r\n            }\r\n\r\n            function forgotPassword() {\r\n                if (!$scope.model.userName) {\r\n                    toaster.pop('warning', '', gettext('Please provide username and try again.'));\r\n                    return;\r\n                }\r\n\r\n                LocalStorageRepository.setUserName($scope.model.userName);\r\n\r\n                // see if the user has security questions available before switching to new screen\r\n                AccountRepository.getSecurityQuestions($scope.model.userName, LocalStorageRepository.getClientID())\r\n                    .then(function (data) {\r\n                        if (data) {\r\n                            TransitionManager.transition({appRoute: 'forgotpassword'});\r\n                        } else {\r\n                            toaster.pop('warning', '', gettext('You do not have Security Questions configured. Please contact the practice.'));\r\n                        }\r\n                    }).catch(function () {\r\n                        toaster.pop('warning', '', gettext('You do not have Security Questions configured. Please contact the practice.'));\r\n                    }).finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n\r\n            function getLoginAssistanceInfo() {\r\n                LoginAssistanceRepository.getLoginAssistanceInformation(LocalStorageRepository.getClientID())\r\n                    .then(function (data) {\r\n                        $scope.loginAssistanceInfo = data;\r\n                        $scope.assistanceInfoLoaded = true;\r\n                    })\r\n                    .catch(function () {\r\n                        $scope.errorMessage = gettext('Unable to retrieve Login Assistance.');\r\n                        Bridge.createModalAlert({\r\n                            title: gettext('Unable to retrieve Login Assistance'),\r\n                            message: $scope.errorMessage,\r\n                            buttons: [gettext('Okay')]\r\n                        });\r\n                    });\r\n            }\r\n\r\n            $scope.loginProcess = loginProcess;\r\n            $scope.completeAccount = completeAccount;\r\n            $scope.settings = settings;\r\n            $scope.forgotPassword = forgotPassword;\r\n            $scope.getLoginAssistanceInfo = getLoginAssistanceInfo;\r\n        }\r\n    ]\r\n);\r\n\r\n","angular.module('app').controller('LoginSettingsCtrl',\r\n    ['$scope', '$timeout', '$state', 'LanguageFactory', 'LocalStorageRepository', 'AprimaAnalytics', 'NotificationService', 'configuration',\r\n        function ($scope, $timeout, $state, LanguageFactory, LocalStorageRepository, AprimaAnalytics, NotificationService, configuration) {\r\n            'use strict';\r\n\r\n            AprimaAnalytics.sendPageView('/Settings/User');\r\n\r\n            $scope.values = {\r\n                language: LanguageFactory.getLang().code\r\n            };\r\n\r\n            $scope.clientId = LocalStorageRepository.getClientID();\r\n            $scope.notificationTimeout = LocalStorageRepository.getNotificationTimeout();\r\n            $scope.isLanguageOpen = true;\r\n            $scope.isApplicationInformationOpen = false;\r\n            $scope.isOtherOpen = false;\r\n\r\n            $scope.languages = LanguageFactory.getLangOptions;\r\n            $scope.showDebugSettings = configuration.DEV_HOSTED;\r\n\r\n\r\n            function getPrmAssemblyVersion() {\r\n                return LocalStorageRepository.getPrmAssemblyVersion();\r\n            }\r\n\r\n            function clearClientId() {\r\n                AprimaAnalytics.sendEvent('user', 'click', 'clear settings', 0);\r\n\r\n                LocalStorageRepository.clearAll();\r\n\r\n                var clientid = LocalStorageRepository.getClientID();\r\n\r\n                if (!clientid) {\r\n                    updateActionMessage('reset');\r\n                } else {\r\n                    updateActionMessage('failed');\r\n                }\r\n            }\r\n\r\n            function backButton() {\r\n                AprimaAnalytics.sendEvent('user', 'click', 'back button', 0);\r\n                $state.go('login');\r\n            }\r\n\r\n            function changeLanguage() {\r\n                AprimaAnalytics.sendEvent('user', 'click', 'change language', 0);\r\n                LanguageFactory.setLang($scope.values.language);\r\n                updateActionMessage($scope.values.language);\r\n            }\r\n\r\n           function changeClientId() {\r\n                LocalStorageRepository.setClientID($scope.clientId);\r\n                updateActionMessage($scope.clientId);\r\n            }\r\n\r\n            function changeNotificationTimeout() {\r\n                var interval = $scope.notificationTimeout;\r\n                if (interval >= 0 && interval <= 99) {\r\n                    //if (interval == null) {\r\n                    //    $scope.notificationTimeout = 0;\r\n                    //}\r\n                    LocalStorageRepository.setNotificationTimeout($scope.notificationTimeout);\r\n                    updateActionMessage($scope.notificationTimeout);\r\n                }\r\n\r\n                NotificationService.stopNotificationTimer();\r\n            }\r\n\r\n            function updateActionMessage(status) {\r\n                $scope.actionMessage = status;\r\n\r\n                $timeout(function () {\r\n                    $scope.actionMessage = '';\r\n                }, 2500);\r\n            }\r\n\r\n            $scope.options = {\r\n                selectedGroup: 'language'\r\n            };\r\n\r\n            $scope.backButton = backButton;\r\n            $scope.changeLanguage = changeLanguage;\r\n            $scope.clearClientId = clearClientId;\r\n            $scope.getPrmAssemblyVersion = getPrmAssemblyVersion;\r\n\r\n            if ($scope.showDebugSettings){\r\n                $scope.changeNotificationTimeout = changeNotificationTimeout;\r\n                $scope.changeClientId = changeClientId;\r\n            }\r\n        }]\r\n);\r\n\r\n","angular.module('app').controller('MessageListSettingsCtrl',\r\n    ['$scope', 'SettingService', 'ListService', 'AprimaAnalytics',\r\n        function ($scope, SettingService, ListService, AprimaAnalytics) {\r\n            'use strict';\r\n\r\n            AprimaAnalytics.sendPageView('/Settings/Message');\r\n\r\n\r\n            var loadingOption = {\r\n                    Description: 'Loading...'\r\n                },\r\n                messagesDashboardSettings = SettingService.getMessagesListSettings();\r\n\r\n            function findById(list, id) {\r\n                return !id || _.find(list, {'Id': id});\r\n            }\r\n\r\n            $scope.mode = 'locked';\r\n\r\n            function loadSettings() {\r\n                $scope.messageOptions = {\r\n                    messageFilters: [loadingOption]\r\n                };\r\n\r\n                $scope.settings = {};\r\n\r\n                ListService.getList('messageFilters').then(function (list) {\r\n                    var currentMessageFilterId = messagesDashboardSettings && messagesDashboardSettings.messageFilterId;\r\n                    $scope.messageOptions.messageFilters = list;\r\n                    $scope.settings.messagesFilter = findById($scope.messageOptions.messageFilters, currentMessageFilterId);\r\n                });\r\n            }\r\n\r\n            $scope.saveMessagesTileSettings = function () {\r\n                SettingService.setMessagesListSettings({\r\n                    messageFilterId: $scope && $scope.settings && $scope.settings.messagesFilter && $scope.settings.messagesFilter.Id\r\n                });\r\n\r\n                SettingService.updateNativeSettings();\r\n            };\r\n\r\n            loadSettings();\r\n        }]);\r\n","angular.module('app').controller('StatementsLoginCtrl',\r\n    ['$scope','$rootScope','TransitionManager', 'LocalStorageRepository','ContentAttributeService','GatewayFactory','Bridge', 'aprgettext','$stateParams','LogOffService','$log','AprimaAnalytics','configuration','PatientSettingsService',\r\n        function ($scope,$rootScope, TransitionManager, LocalStorageRepository,ContentAttributeService,GatewayFactory, Bridge, gettext, $stateParams, LogOffService, $log, AprimaAnalytics, configuration, PatientSettingsService) {\r\n            'use strict';\r\n\r\n            $log.info('LoginCtrl starting up');\r\n\r\n            $scope.birthDateRegex = /^$|\\d{4}\\-\\d{2}\\-\\d{2}/ ;\r\n            $scope.phoneRegEx = /\\(?\\d{3}(-|\\))?\\s?\\d{3}-?\\d{4}$/;\r\n            $scope.zipCodeRegex = /^$|\\d{5}/ ;\r\n            $scope.practiceName = null;\r\n            $scope.statementId = $stateParams.statementId;\r\n            $scope.gateways = _.map(_.cloneDeep(configuration.GATEWAYS), function (g) {\r\n                g.display = g.prefix + ' - ' + g.url;\r\n                return g;\r\n            });\r\n\r\n            $scope.model =\r\n                {\r\n                clientID: LocalStorageRepository.getClientID() || '0',\r\n                birthDate: '',\r\n                zipCode: '',\r\n                accessCode:'',\r\n                gateway: null,\r\n                practiceName: '',\r\n                practiceTagline: '',\r\n                userId:  ''\r\n                };\r\n\r\n\r\n\r\n            AprimaAnalytics.sendPageView('/StatementsLogin');\r\n            LogOffService.logoff();\r\n\r\n            function loadPracticeInfo() {\r\n                ContentAttributeService.getPracticeInfo(true)\r\n                    .then(function (practiceInfo) {\r\n                        $scope.model.practiceName = practiceInfo.practiceName;\r\n                        $scope.model.practiceTagline = practiceInfo.practiceTagline;\r\n                    })\r\n                    .catch(function () {\r\n                        $scope.model.practiceName = '';\r\n                        $scope.model.practiceTagline = '';\r\n                    });\r\n            }\r\n\r\n            if (!configuration.DEV_HOSTED) {\r\n                ContentAttributeService.getClientConfig()\r\n                    .then(function (data) {\r\n                        if (data) {\r\n                            var oldClientId = LocalStorageRepository.getClientID();\r\n\r\n                            if (oldClientId !== data.clientId) {\r\n                                LocalStorageRepository.clearAll();\r\n                            }\r\n\r\n                            LocalStorageRepository.setClientURL(data.hostUrl);\r\n                            LocalStorageRepository.setClientID(data.clientId);\r\n\r\n                        } else {\r\n                            $scope.errorMessage = gettext('Error loading page. Unknown Client Id');\r\n                            Bridge.createModalAlert({\r\n                                title: gettext('Loading Error'),\r\n                                message: $scope.errorMessage,\r\n                                buttons: [gettext('Okay')]\r\n                            });\r\n                        }\r\n                    }).catch(function () {\r\n                    $scope.errorMessage = gettext('Error loading page. Unknown Client Id');\r\n                    Bridge.createModalAlert({\r\n                        title: gettext('Loading Error'),\r\n                        message: $scope.errorMessage,\r\n                        buttons: [gettext('Okay')]\r\n                    });\r\n                });\r\n            }\r\n\r\n            function onLoad() {\r\n                loadPracticeInfo();\r\n            }\r\n\r\n            onLoad();\r\n\r\n            function loginProcess()\r\n            {\r\n                if ($scope.loading) {\r\n                    return;\r\n                }\r\n\r\n                if ($scope.loginForm.$invalid) {\r\n                    $scope.submitted = true;\r\n                    return;\r\n                }\r\n\r\n                $scope.loading = true;\r\n                var phoneNumberScrubbed = $scope.model.phoneNumber && $scope.model.phoneNumber.replace(/\\D/g,'');\r\n\r\n                GatewayFactory.loginStatementsOnly(LocalStorageRepository.getClientID(), $scope.model.birthDate, $scope.model.zipCode, $scope.model.accessCode.toUpperCase(), phoneNumberScrubbed, $scope.model.gateway ? $scope.model.gateway.prefix : null)\r\n                    .then(function () {\r\n                        // Broadcast event to start application timeout logic.\r\n                        // Please see 'modules\\app\\app.js' for application timeout configuration and documentation.\r\n                        $rootScope.$broadcast('IdleStartWatch');\r\n                        PatientSettingsService.getPatientFeatures();\r\n                        TransitionManager.transition({appRoute: 'paymentStatementsOnly'});\r\n\r\n                    }, function (err) {\r\n                        $scope.errorMessage = '\\nLogin failure.\\nYou have entered incorrect login information\\n';\r\n\r\n                        Bridge.createModalAlert({\r\n                            title: gettext('Login Error.'),\r\n                            message: err.message,\r\n                            buttons: [gettext('Okay')]\r\n                        });\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n\r\n            $scope.loginProcess = loginProcess;\r\n        }\r\n    ]\r\n);\r\n\r\n","angular.module('app').controller( 'TokenLoginCtrl', [ '$location', '$log', '$rootScope', '$scope', '$state', '$stateParams',\r\n    'aprgettext', 'AprimaAnalytics', 'Bridge', 'configuration', 'ConsentService', 'ContentAttributeService', 'GatewayFactory',\r\n    'LocalStorageRepository', 'LogOffService', 'LoginAssistanceRepository', 'PatientPortalStorageRepository', 'SessionService', 'TransitionManager',\r\n    function ($location, $log, $rootScope, $scope, $state, $stateParams,\r\n              gettext, AprimaAnalytics, Bridge, configuration, ConsentService, ContentAttributeService, GatewayFactory,\r\n              LocalStorageRepository, LogOffService, LoginAssistanceRepository, PatientPortalStorageRepository, SessionService, TransitionManager) {\r\n        'use strict';\r\n\r\n        $log.info('TokenLoginCtrl starting up');\r\n\r\n        AprimaAnalytics.sendPageView('/Logon');\r\n        LogOffService.logoff();\r\n        SessionService.resetSessionParams();\r\n        PatientPortalStorageRepository.removeActivePatient();\r\n\r\n        $scope.errorMessage = '';\r\n        $scope.submitted = false;\r\n        $scope.loading = false;\r\n        $scope.gateways = _.map(_.cloneDeep(configuration.GATEWAYS), function (g) {\r\n            g.display = g.prefix + ' - ' + g.url;\r\n            return g;\r\n        });\r\n\r\n        $scope.loginAssistanceInfo = null;\r\n\r\n        $scope.model = {\r\n            clientID: LocalStorageRepository.getClientID() || '0',\r\n            userName: LocalStorageRepository.getUserName() || '',\r\n            userId: LocalStorageRepository.getUserID() || null,\r\n            password: '',\r\n            gateway: null,\r\n            practiceName: '',\r\n            practiceTagline: '',\r\n        };\r\n\r\n        if (!configuration.DEV_HOSTED) {\r\n            ContentAttributeService.getClientConfig()\r\n                .then(function (data) {\r\n                    var oldClientId = LocalStorageRepository.getClientID();\r\n\r\n                    if (oldClientId !== data.clientId) {\r\n                        LocalStorageRepository.clearAll();\r\n                    }\r\n\r\n                    LocalStorageRepository.setClientURL(data.hostUrl);\r\n                    LocalStorageRepository.setClientID(data.clientId);\r\n\r\n                    $scope.model.clientID = LocalStorageRepository.getClientID();\r\n                    login();\r\n                }).catch(function () {\r\n                $scope.errorMessage = gettext('Error loading page. Unknown Client Id');\r\n                Bridge.createModalAlert({\r\n                    title: gettext('Loading Error'),\r\n                    message: $scope.errorMessage,\r\n                    buttons: [gettext('Okay')]\r\n                });\r\n            });\r\n        } else {\r\n            login();\r\n        }\r\n\r\n        function login() {\r\n            $scope.loading = true;\r\n\r\n            GatewayFactory.tokenLogin(LocalStorageRepository.getClientID(), $scope.model.gateway ? $scope.model.gateway.prefix : null, $stateParams.token)\r\n                .then(function () {\r\n                    // Broadcast event to start application timeout logic.\r\n                    // Please see 'modules\\app\\app.js' for application timeout configuration and documentation.\r\n                    $rootScope.$broadcast('IdleStartWatch');\r\n\r\n                    SessionService.setPatientAuthenticated(true);\r\n                    if (SessionService.getNewPasswordRequired() === true) {\r\n                        SessionService.setDisplayDashboardToolbar(false);\r\n                        SessionService.setShowHeaderNavigationMenu(false);\r\n                        TransitionManager.transition({appRoute: 'changepassword'});\r\n                    }\r\n                    else if (SessionService.getPracticeConsentAccepted() === true) {\r\n                        SessionService.setDisplayDashboardToolbar(true);\r\n                        SessionService.setShowHeaderNavigationMenu(true);\r\n                        TransitionManager.transition({appRoute: 'dashboard'});\r\n                    }\r\n                    else {\r\n                        SessionService.setDisplayDashboardToolbar(false);\r\n                        SessionService.setShowHeaderNavigationMenu(false);\r\n                        TransitionManager.transition({appRoute: 'loginconsent'});\r\n                    }\r\n                }, function (err) {\r\n                    $scope.errorMessage = err.message;\r\n\r\n                    Bridge.createModalAlert({\r\n                        title: gettext('Login Error'),\r\n                        message: err.message,\r\n                        buttons: [gettext('Okay')]\r\n                    });\r\n                })\r\n                .finally(function () {\r\n                    $scope.loading = false;\r\n                });\r\n        }\r\n    }\r\n]);\r\n","angular.module('app').controller('UserSettingsCtrl',\r\n    ['$scope', '_', '$state', 'LanguageFactory', 'LocalStorageRepository', 'AprimaAnalytics',\r\n        function ($scope, lodash, $state, LanguageFactory, LocalStorageRepository, AprimaAnalytics) {\r\n            'use strict';\r\n\r\n            $scope.mode = 'locked';\r\n            $scope.usersettings = {\r\n                username: LocalStorageRepository.getUserFullName(),\r\n                clientId: LocalStorageRepository.getClientID()\r\n            };\r\n            $scope.usersettings.languages = [\r\n                {\r\n                    name: 'English',\r\n                    id: 'en_US'\r\n                },\r\n                {\r\n                    name: 'Spanish',\r\n                    id: 'es_MX'\r\n                }\r\n            ];\r\n\r\n            var currentLanguage = _($scope.usersettings.languages).filter({id: LanguageFactory.getLang().code}).pop();\r\n\r\n            $scope.usersettings.language = currentLanguage ? currentLanguage.id : null;\r\n\r\n            $scope.changeLanguage = function () {\r\n                LanguageFactory.setLang($scope.usersettings.language);\r\n                AprimaAnalytics.sendEvent('api', 'usersettings', 'change language', 0);\r\n            };\r\n        }]);\r\n","angular.module('app').controller('ViewApiDocumentModalCtrl',\r\n    ['$scope', '$uibModalInstance', 'modalConfig',\r\n        function ($scope, $modalInstance, modalConfig) {\r\n            'use strict';\r\n\r\n            $scope.downloadingDocument = false;\r\n            $scope.model = {\r\n                Title: modalConfig.Title,\r\n                EnableDownload: !!modalConfig.DocumentDownload,\r\n                DownloadFileName: modalConfig.DownloadFileName,\r\n                DocumentId: modalConfig.DocumentId,\r\n                HasStaticUrl: modalConfig.HasStaticUrl,\r\n                DisableInlinePdf: modalConfig.DisableInlinePdf,\r\n                DocumentHelper: modalConfig.DocumentHelper,\r\n                ClientID: modalConfig.ClientID,\r\n                ClientURL: modalConfig.ClientURL,\r\n            };\r\n\r\n            function getStaticUrl(documentId) {\r\n                return modalConfig.GetStaticUrl(documentId);\r\n            }\r\n\r\n            function loadDocument(documentId, requestSettings) {\r\n                $scope.loadingDocument = true;\r\n                return modalConfig.DocumentLoad(documentId, requestSettings)\r\n                    .finally(function () {\r\n                        $scope.loadingDocument = false;\r\n                    });\r\n            }\r\n\r\n            function downloadDocument(documentId) {\r\n                $scope.downloadingDocument = true;\r\n                return modalConfig.DocumentDownload(documentId)\r\n                    .finally(function () {\r\n                        $scope.downloadingDocument = false;\r\n                    });\r\n            }\r\n\r\n            function ok() {\r\n                $modalInstance.close('ok');\r\n            }\r\n\r\n            function cancel() {\r\n                $modalInstance.dismiss('cancel');\r\n            }\r\n\r\n            $scope.ok = ok;\r\n            $scope.cancel = cancel;\r\n            $scope.getStaticUrl = getStaticUrl;\r\n            $scope.loadDocument = loadDocument;\r\n            $scope.downloadDocument = downloadDocument;\r\n        }]);\r\n","angular.module('app').controller('ViewDocumentModalCtrl',\r\n    ['$scope', '$uibModalInstance', 'modalConfig',\r\n        function ($scope, $modalInstance, modalConfig) {\r\n            'use strict';\r\n\r\n            $scope.downloadingDocument = false;\r\n            $scope.model = {\r\n                Title: modalConfig.Title,\r\n                EnableDownload: !!modalConfig.DocumentDownload,\r\n                DownloadFileName: modalConfig.DownloadFileName,\r\n                DocumentId: modalConfig.DocumentId,\r\n                HasStaticUrl: modalConfig.HasStaticUrl,\r\n                DisableInlinePdf: modalConfig.DisableInlinePdf,\r\n                DocumentHelper: modalConfig.DocumentHelper,\r\n            };\r\n\r\n            function getStaticUrl(documentId) {\r\n                return modalConfig.GetStaticUrl(documentId);\r\n            }\r\n\r\n            function loadDocument(documentId, requestSettings) {\r\n                $scope.loadingDocument = true;\r\n                return modalConfig.DocumentLoad(documentId, requestSettings)\r\n                    .finally(function () {\r\n                        $scope.loadingDocument = false;\r\n                    });\r\n            }\r\n\r\n            function downloadDocument(documentId) {\r\n                $scope.downloadingDocument = true;\r\n                return modalConfig.DocumentDownload(documentId)\r\n                    .finally(function () {\r\n                        $scope.downloadingDocument = false;\r\n                    });\r\n            }\r\n\r\n            function ok() {\r\n                $modalInstance.close('ok');\r\n            }\r\n\r\n            function cancel() {\r\n                $modalInstance.dismiss('cancel');\r\n            }\r\n\r\n            $scope.ok = ok;\r\n            $scope.cancel = cancel;\r\n            $scope.getStaticUrl = getStaticUrl;\r\n            $scope.loadDocument = loadDocument;\r\n            $scope.downloadDocument = downloadDocument;\r\n        }]);\r\n","angular.module('app').controller('PracticeTermsModalCtrl',\r\n    ['$scope', '$uibModalInstance', '$sce', 'ConsentService', 'LocalStorageRepository',\r\n        function ($scope, $modalInstance, $sce, ConsentService, LocalStorageRepository) {\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n            var loginUserId = LocalStorageRepository.getUserID();\r\n\r\n            function loadPracticeTerms() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n\r\n                if (loginUserId) {\r\n                    ConsentService.getPracticeConsent()\r\n                        .then(function (data) {\r\n                            $scope.practiceConsent = data.ConsentForm;\r\n                        })\r\n                        .catch(function (response) {\r\n                            $scope.addHttpError(response);\r\n                        })\r\n                        .finally(function () {\r\n                            $scope.loading = false;\r\n                        });\r\n                } else {\r\n                    $scope.loading = false;\r\n                }\r\n            }\r\n\r\n            function ok() {\r\n                $modalInstance.close('ok');\r\n            }\r\n\r\n            function cancel() {\r\n                $modalInstance.dismiss('cancel');\r\n            }\r\n\r\n            $scope.ok = ok;\r\n            $scope.cancel = cancel;\r\n\r\n            loadPracticeTerms();\r\n        }]);","angular.module('app').controller('PrivacyPolicyModalCtrl',\r\n    ['$scope', '$uibModalInstance', '$sce', 'ConsentService', 'LocalStorageRepository',\r\n        function ($scope, $modalInstance, $sce, ConsentService, LocalStorageRepository) {\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n            var loginUserId = LocalStorageRepository.getUserID();\r\n\r\n            function loadPrivacyPolicy() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n\r\n                if (loginUserId){\r\n                    ConsentService\r\n                        .getPrivacyPolicyUrl()\r\n                        .then(function (privacyPolicyUrl) {\r\n                            $scope.privacyPolicyUrl = privacyPolicyUrl;\r\n                        })\r\n                        .catch(function (response) {\r\n                            $scope.addHttpError(response);\r\n                        })\r\n                        .finally(function() {\r\n                            $scope.loading = false;\r\n                        });\r\n                } else {\r\n                    $scope.loading = false;\r\n                }\r\n            }\r\n\r\n            function ok() {\r\n                $modalInstance.close('ok');\r\n            }\r\n\r\n            function cancel() {\r\n                $modalInstance.dismiss('cancel');\r\n            }\r\n\r\n            $scope.ok = ok;\r\n            $scope.cancel = cancel;\r\n\r\n            loadPrivacyPolicy();\r\n        }]);","angular.module('app').controller('NavigationAppointmentsCtrl',\r\n    ['$scope', 'LocalStorageRepository', '$stateParams',\r\n        function ($scope, LocalStorageRepository) {\r\n            'use strict';\r\n\r\n            var fullName = LocalStorageRepository.getUserFullName(),\r\n                userID = LocalStorageRepository.getUserID();\r\n\r\n            $scope.CurrentUser = {\r\n                FullName: fullName + '  hello world',\r\n                Id: userID\r\n            };\r\n\r\n        }]);","angular.module('app').controller('NavigationBillingCtrl',\r\n    ['$scope', 'LocalStorageRepository', '$stateParams',\r\n        function ($scope, LocalStorageRepository) {\r\n            'use strict';\r\n\r\n            var fullName = LocalStorageRepository.getUserFullName(),\r\n                userID = LocalStorageRepository.getUserID();\r\n\r\n            $scope.CurrentUser = {\r\n                FullName: fullName,\r\n                Id: userID\r\n            };\r\n\r\n        }]);","angular.module('app').controller('NavigationDoctorsCtrl',\r\n    ['$scope', 'LocalStorageRepository', '$stateParams',\r\n        function ($scope, LocalStorageRepository) {\r\n            'use strict';\r\n\r\n            var fullName = LocalStorageRepository.getUserFullName(),\r\n                userID = LocalStorageRepository.getUserID();\r\n\r\n            $scope.CurrentUser = {\r\n                FullName: fullName,\r\n                Id: userID\r\n            };\r\n\r\n        }]);","angular.module('app').controller('NavigationFormsCtrl',\r\n    ['$scope', 'LocalStorageRepository', '$stateParams',\r\n        function ($scope, LocalStorageRepository) {\r\n            'use strict';\r\n\r\n            var fullName = LocalStorageRepository.getUserFullName(),\r\n                userID = LocalStorageRepository.getUserID();\r\n\r\n            $scope.CurrentUser = {\r\n                FullName: fullName,\r\n                Id: userID\r\n            };\r\n\r\n        }]);","angular.module('app').controller('NavigationMessagesCtrl',\r\n    ['$scope', 'LocalStorageRepository', '$stateParams',\r\n        function ($scope, LocalStorageRepository) {\r\n            'use strict';\r\n\r\n            var fullName = LocalStorageRepository.getUserFullName(),\r\n                userID = LocalStorageRepository.getUserID();\r\n\r\n            $scope.CurrentUser = {\r\n                FullName: fullName,\r\n                Id: userID\r\n            };\r\n\r\n        }]);","angular.module('app').controller('NavigationPrescriptionsCtrl',\r\n    ['$scope', 'LocalStorageRepository', '$stateParams',\r\n        function ($scope, LocalStorageRepository) {\r\n            'use strict';\r\n\r\n            var fullName = LocalStorageRepository.getUserFullName(),\r\n                userID = LocalStorageRepository.getUserID();\r\n\r\n            $scope.CurrentUser = {\r\n                FullName: fullName,\r\n                Id: userID\r\n            };\r\n\r\n        }]);","angular.module('app').directive('apDatePicker',\r\n    ['_', '$window',\r\n        function (_, $window) {\r\n            'use strict';\r\n\r\n            //API: https://api.jqueryui.com/datepicker/   25 March 2015\r\n\r\n            //uses:\r\n            //<input type=\"text\" ap-date-picker>    (appears after clicking in box)\r\n            //<div ap-date-picker></div>            static calendar\r\n\r\n            //getDay() --> returns the day of the week (0-6) sunday-saturday\r\n            //getDate() --> July 21 returns 21\r\n            //getFullYear() --> July 21 2015 returns 2015\r\n            //getMonth() --> July 21 returns 6  (starts from 0)\r\n\r\n            $window=$window;\r\n\r\n            var calendar = {\r\n                selectedDate: null\r\n            };\r\n\r\n            var calendarOptions = {\r\n                disableWeekends: true,\r\n                disablePastDates: true\r\n            };\r\n\r\n            var disabledDates = {\r\n                year: 2015,\r\n                month: 3,\r\n                days: [13,15,17,21]\r\n            };\r\n\r\n            var selectDate = function (date) {\r\n                calendar.selectedDate=date;\r\n                //$window.alert(calendar.selectedDate);\r\n            };\r\n\r\n            var setDisabledDates = function (year, month, days) {\r\n                disabledDates.year=year;\r\n                disabledDates.month=month;\r\n                disabledDates.days=days;\r\n            };\r\n\r\n            var weekends = function (date) {\r\n                var day = date.getDay();\r\n                return (day > 0 && day < 6);\r\n            };\r\n\r\n            var isValidDay = function (date) {\r\n                var enableDay = true;\r\n                if(date.getMonth() === disabledDates.month && date.getFullYear() === disabledDates.year) {\r\n                    enableDay = disabledDates.days.indexOf(date.getDate()) === -1;\r\n                }\r\n                if(enableDay && calendarOptions.disableWeekends) {\r\n                    enableDay = weekends(date);\r\n                }\r\n                return [enableDay, ''];\r\n            };\r\n\r\n            //inst.selectedMonth  (month) goes from 0-11\r\n            var calendarShow = function (input, inst) {\r\n                //query server and set disabled dates\r\n                //the calendar is first opened (no month set)\r\n                if(inst.selectedDay === 0) {\r\n                    var d = new Date();\r\n                    d=d;\r\n                    setDisabledDates(disabledDates.year, disabledDates.month, disabledDates.days);\r\n                    //$window.alert(d.getDate());\r\n                }\r\n                else{\r\n                    //$window.alert(month);\r\n                }\r\n            };\r\n\r\n            //month goes from 1-12\r\n            //inst.selectedMonth will be 0-11\r\n            var monthChange = function (year ,month ,inst){\r\n                inst=inst;\r\n                //query server and set disabled dates\r\n                //$window.alert(month);\r\n            };\r\n\r\n            return {\r\n                restrict: 'A',\r\n                link: function ($scope, elm) {\r\n                    elm.datepicker({\r\n                        changeYear: false,\r\n                        minDate: calendarOptions.disablePastDates ? '0d' : '',\r\n                        onChangeMonthYear: monthChange,\r\n                        beforeShow: calendarShow,\r\n                        beforeShowDay: isValidDay,\r\n                        onSelect: selectDate\r\n                    });\r\n                    $scope.$on('destroy', function() {\r\n                        elm.datepicker('destroy');\r\n                    });\r\n                }\r\n            };\r\n        }]);","angular.module('app').directive('apFormAttachment',\r\n        function() {\r\n            'use strict';\r\n\r\n            return {\r\n                restrict: 'E',\r\n                templateUrl: '/app/views/directives/apFormAttachment.html',\r\n                scope: {\r\n                    // Use '@' for one way binding.  String value is returned.\r\n                    // Use '=' for two way binding.  An object is returned.\r\n                    // Use '&' for a method.\r\n                    attachmentDto : '=attachmentDto',\r\n                    practiceForm : '=practiceForm',\r\n                    sending : '=sending'\r\n                },\r\n\r\n                controller: function($scope) {\r\n\r\n                    $scope.attachmentDto = {\r\n                        Data: null,\r\n                        FileName: null,\r\n                        MimeType : null,\r\n                        Extension : null\r\n                    };\r\n\r\n                    $scope.selectDocumentModel = {\r\n                        selectedFileName: $scope.selectedFileName,\r\n                        selectedFileContents: $scope.selectedFileContents,\r\n                        selectedMimeType: $scope.selectedMimeType,\r\n                        validationMessage: $scope.validationMessage\r\n                    };\r\n\r\n                    $scope.$watch('selectDocumentModel.selectedFileContents', function(newval, oldval) {\r\n\r\n                        if (newval) {\r\n\r\n\r\n                            if (newval !== oldval) {\r\n                                        $scope.attachmentDto.Data = $scope.selectDocumentModel.selectedFileContents.split(',')[1];\r\n                                        $scope.attachmentDto.FileName = $scope.selectDocumentModel.selectedFileName;\r\n                                        $scope.attachmentDto.MimeType = $scope.selectDocumentModel.selectedMimeType;\r\n                                        $scope.attachmentDto.Extension = $scope.selectDocumentModel.selectedFileName.split('.')[1];\r\n                                    }\r\n                                    $scope.$emit('createMessage');\r\n                                }\r\n                    }, true);\r\n\r\n\r\n\r\n\r\n\r\n                }\r\n            };\r\n        }\r\n);","angular.module('app').directive('apLoginBackground',\r\n    [\r\n        function () {\r\n            'use strict';\r\n        function link(scope, element) {\r\n            element.css('background-image', 'url(images/login-background-clientId-' + scope.clientId + '.jpg), url(images/login-background.jpg)');\r\n        }\r\n\r\n        return {\r\n            restrict: 'EA',\r\n            scope: {\r\n                clientId: '=clientId'\r\n            },\r\n            link: link\r\n\r\n        };\r\n    }]);","angular.module('app').directive('apMessageAttachment', ['aprgettext','PatientSettingsService',\r\n    function(gettext,PatientSettingsService) {\r\n        'use strict';\r\n\r\n        return {\r\n            restrict: 'E',\r\n            templateUrl: '/app/views/directives/apMessageAttachment.html',\r\n            scope: {\r\n                // Use '@' for one way binding.  String value is returned.\r\n                // Use '=' for two way binding.  An object is returned.\r\n                // Use '&' for a method.\r\n                attachmentDtoList: '=attachmentDtoList'\r\n\r\n            },\r\n\r\n            controller: function($scope) {\r\n\r\n                var featureList = PatientSettingsService.getPatientFeatures();\r\n                $scope.maxNumberFiles = featureList.PatientMessageAttachment.FileAttachmentConfig.NumberOfFilesThatCanBeAttached;\r\n\r\n                $scope.attachmentDtoList = [];\r\n\r\n                $scope.selectDocumentModel = {\r\n                    selectedFileName: $scope.selectedFileName,\r\n                    selectedFileContents: $scope.selectedFileContents,\r\n                    selectedMimeType: $scope.selectedMimeType,\r\n                    validationMessage: $scope.validationMessage\r\n                };\r\n\r\n            $scope.$watch('selectDocumentModel.selectedFileContents', function(newval, oldval) {\r\n\r\n                if (newval) {\r\n\r\n                    if (newval !== oldval) {\r\n\r\n                        var newAttachment = true;\r\n                        $.each($scope.attachmentDtoList, function(i, obj) {\r\n                            if (obj.Data === newval) {\r\n                                newAttachment = false;\r\n                                return false;\r\n                            }\r\n                        });\r\n\r\n\r\n                    if (newAttachment) {\r\n                        if($scope.attachmentDtoList.length < $scope.maxNumberFiles){\r\n                        $scope.attachmentDtoList.push({\r\n                            Data: $scope.selectDocumentModel.selectedFileContents.split(',')[1],\r\n                            FileName: $scope.selectDocumentModel.selectedFileName,\r\n                            MimeType: $scope.selectDocumentModel.selectedMimeType,\r\n                            Extension: $scope.selectDocumentModel.selectedFileName.split('.')[1]\r\n                        });\r\n                        }\r\n                        else{\r\n                            $scope.selectDocumentModel.validationMessage = gettext('Maximum of ') + $scope.maxNumberFiles + gettext(' attachments can be selected per message. ' + 'Please send this message and create another one to send additional files.');\r\n                        }\r\n                    }\r\n\r\n                    }\r\n                }\r\n\r\n            }, true);\r\n\r\n\r\n            $scope.remove = function remove(attachment) {\r\n                $.each($scope.attachmentDtoList, function(i) {\r\n                    if ($scope.attachmentDtoList[i].Data === attachment.Data) {\r\n                        $scope.attachmentDtoList.splice(i, 1);\r\n                        $scope.selectDocumentModel.selectedFileContents = '';\r\n                        $scope.selectDocumentModel.selectedFileName = '';\r\n                        $scope.selectDocumentModel.selectedFileContents = '';\r\n                        $scope.selectDocumentModel.selectedFileContents = '';\r\n                        $scope.selectDocumentModel.selectedMimeType = '';\r\n                        return false;\r\n                    }\r\n                });\r\n            };\r\n\r\n        }\r\n    };\r\n  }\r\n]\r\n);","angular.module('app').directive('apSavePdfToFile',\r\n    ['BrowserService',\r\n        function (BrowserService) {\r\n            'use strict';\r\n\r\n            function link($scope, element) {\r\n                function _savePdfAsFile(fileNameToSaveAs, base64String, contentType) {\r\n\r\n                    if (!BrowserService.isBlobCompatible) {\r\n                        return;\r\n                    }\r\n\r\n                    var byteCharacters = atob(base64String);\r\n                    var byteArray = new Array(byteCharacters.length);\r\n\r\n                    for (var i = 0; i < byteCharacters.length; i++) {\r\n                        byteArray[i] = byteCharacters.charCodeAt(i);\r\n                    }\r\n                    var byteArrayInt = new Uint8Array(byteArray);\r\n\r\n\r\n                    var textFileAsBlob = new Blob([byteArrayInt], {\r\n                        type: contentType\r\n                    });\r\n\r\n                    BrowserService.saveBlob(document, textFileAsBlob, fileNameToSaveAs);\r\n\r\n                }\r\n\r\n                function _onClick() {\r\n                    _savePdfAsFile($scope.fileName, $scope.base64String, $scope.contentType);\r\n                }\r\n\r\n                element.on('click', _onClick);\r\n                $scope.$on('$destroy', function () {\r\n                    element.off('click');\r\n                });\r\n            }\r\n\r\n            return {\r\n                restrict: 'A',\r\n                scope: {\r\n                    base64String: '@apSavePdfToFile',\r\n                    contentType: '@',\r\n                    fileName: '@'\r\n                },\r\n                link: link\r\n            };\r\n        }]);","angular.module('app').directive('apSaveStringToFile',\r\n    ['BrowserService',\r\n        function (BrowserService) {\r\n            'use strict';\r\n\r\n            function link($scope, element) {\r\n                function _saveTextAsFile(fileNameToSaveAs, textToWrite) {\r\n\r\n                    if (!BrowserService.isBlobCompatible) {\r\n                        return;\r\n                    }\r\n\r\n                    var textFileAsBlob = new Blob([textToWrite], {\r\n                        type: 'text/html; charset=utf-8'\r\n                    });\r\n\r\n                    BrowserService.saveBlob(document, textFileAsBlob, fileNameToSaveAs);\r\n                }\r\n\r\n                function _onClick() {\r\n                    $scope.loadText()\r\n                        .then(function (data) {\r\n                            if (data) {\r\n                                _saveTextAsFile($scope.fileName, data);\r\n                            }\r\n                        });\r\n                }\r\n\r\n                element.on('click', _onClick);\r\n                $scope.$on('$destroy', function () {\r\n                    element.off('click');\r\n                });\r\n            }\r\n\r\n            return {\r\n                restrict: 'A',\r\n                scope: {\r\n                    loadText: '&apSaveStringToFile',\r\n                    fileName: '@'\r\n                },\r\n                link: link\r\n            };\r\n        }]);","angular.module('app').directive('apSelectFile',\r\n    ['aprgettext', 'MimeTypeRepository', 'PatientSettingsService',\r\n        function (gettext, MimeTypeRepository, PatientSettingsService) {\r\n            'use strict';\r\n\r\n            return {\r\n                restrict: 'E',\r\n                templateUrl: '/app/views/directives/apSelectFile.html',\r\n                scope: {\r\n                    // Use '@' for one way binding.  String value is returned.\r\n                    // Use '=' for two way binding.  An object is returned.\r\n                    // Use '&' for a method.\r\n                    maxSizeKb: '=maxSizeKb',\r\n                    fileType: '=fileType',\r\n                    selectedFileName: '=selectedFileName',\r\n                    selectedFileContents: '=selectedFileContents',\r\n                    selectedMimeType: '=selectedMimeType',\r\n                    validationMessage: '=validationMessage',\r\n                    practiceForm:'=practiceForm',\r\n                    sending: '=sending'\r\n                },\r\n\r\n                controller: function($scope) {\r\n                    //var myInputElement = angular.element(element.find('#inputFile'));\r\n\r\n                    var featureList = PatientSettingsService.getPatientFeatures();\r\n                    var messageAttachmentConfig = featureList.PatientMessageAttachment;\r\n\r\n                    $scope.selectFileModel = {\r\n                        maxSizeKb: 0,\r\n                        mimeTypes: { Types: [] },\r\n                        allowableFileExtensions: ''\r\n                    };\r\n\r\n                    $scope.isSelectedFileMimeType = function isSelectedFileMimeType(selectedFile) {\r\n                        var isValid = false;\r\n\r\n                        _.forEach($scope.selectFileModel.mimeTypes, function(type) {\r\n                            if (type.MimeType.toUpperCase() === selectedFile.type.toUpperCase()) {\r\n                                isValid = true;\r\n                                return false; //break the loop\r\n                            }\r\n                        });\r\n\r\n                        if (!isValid) {\r\n                            $scope.validationMessage = gettext('An invalid file was selected.  Only') + ' ' + $scope.selectFileModel.allowableFileExtensions + ' ' + gettext('files can be selected.');\r\n                        }\r\n\r\n                        return isValid;\r\n                    };\r\n\r\n\r\n                    $scope.isSelectedFileSizeValid = function isSelectedFileSizeValid(selectedFile) {\r\n                        var isValid = true;\r\n\r\n                        if (selectedFile.size > ($scope.selectFileModel.maxSizeKb * 1024)) {\r\n                            $scope.validationMessage = gettext('The selected file exceeds the maximum allowable size.  Please select another file.') + ' (' + $scope.selectFileModel.maxSizeKb + ' KB)';\r\n                            isValid = false;\r\n                        }\r\n\r\n                        return isValid;\r\n                    };\r\n\r\n                    $scope.isSelectedFileExtensionValid = function isSelectedFileExtensionValid(selectedFile) {\r\n                        var isValid = false;\r\n                        var extension = selectedFile.name.toUpperCase().split('.');\r\n                        extension = '.' + extension[1];\r\n                        _.forEach($scope.selectFileModel.mimeTypes, function(type) {\r\n                            if (extension === type.FileExtension.toUpperCase()){\r\n                                isValid = true;\r\n                                return false; //break the loop\r\n                            }\r\n                        });\r\n\r\n                        return isValid;\r\n                    };\r\n\r\n\r\n\r\n\r\n                    $scope.inputFileOnchangeCallback = function inputFileOnchangeCallback(myEventArg) {\r\n                        $scope.validationMessage = '';\r\n                        $scope.selectedFileName = '';\r\n                        $scope.selectedFileContents = '';\r\n                        $scope.selectedMimeType = '';\r\n\r\n                        if (!myEventArg || !myEventArg.target) {\r\n                            $scope.validationMessage = gettext('Input element is not defined.');\r\n                            return;\r\n                        }\r\n\r\n                        var files = myEventArg.target.files;\r\n                        if (!files || files.length <= 0) {\r\n                            // User pressed the cancel button\r\n                            return;\r\n                        }\r\n\r\n                        var selectedFile = files[0];\r\n                        var myInputFileElement = myEventArg.target;\r\n\r\n                        if (!$scope.isSelectedFileExtensionValid(selectedFile)) {\r\n                            if (myInputFileElement) {\r\n                                myInputFileElement.value = null;\r\n                            }\r\n                            \r\n                            // IE11 FIX: Note, this line was moved here: it once resided in isSelectedFileExtensionValid, but IE11 would skip over the error message.\r\n                            $scope.validationMessage = gettext('An invalid file was selected.  Only') + ' ' + $scope.selectFileModel.allowableFileExtensions + ' ' + gettext('files can be selected.');\r\n\r\n                            $scope.$apply();\r\n                            return;\r\n                        }\r\n\r\n                        if (!$scope.isSelectedFileMimeType(selectedFile)) {\r\n                            if (myInputFileElement) {\r\n                                myInputFileElement.value = null;\r\n                            }\r\n                            $scope.$apply();\r\n                            return;\r\n                        }\r\n\r\n                        if (!$scope.isSelectedFileSizeValid(selectedFile)) {\r\n                            if (myInputFileElement) {\r\n                                myInputFileElement.value = null;\r\n                            }\r\n\r\n                            // IE11 FIX: Note, this line was moved here: it once resided in isSelectedFileSizeValid, but IE11 would skip over the error message.\r\n                            $scope.validationMessage = gettext('The selected file exceeds the maximum allowable size.  Please select another file.') + ' (' + $scope.selectFileModel.maxSizeKb + ' KB)';\r\n\r\n                            $scope.$apply();\r\n                            return;\r\n                        }\r\n\r\n\r\n\r\n                        $scope.selectedFileName = selectedFile.name;\r\n                        $scope.selectedMimeType = selectedFile.type;\r\n                        $scope.selectedFileContents = '';\r\n\r\n\r\n                        var reader = new FileReader();\r\n                        reader.onload = function (e) {\r\n                            if (e != null) {\r\n                                $scope.selectedFileContents = e.target.result;\r\n                                $scope.$apply();\r\n                            }\r\n                        };\r\n\r\n                        reader.readAsDataURL(selectedFile);\r\n\r\n                        $scope.$apply();\r\n\r\n\r\n\r\n                    };\r\n\r\n\r\n                    function loadMaxFileSize() {\r\n                        if ($scope.maxSizeKb && !isNaN($scope.maxSizeKb) && $scope.maxSizeKb <= messageAttachmentConfig.FileAttachmentConfig.MaxFileSizeKb) {\r\n                            $scope.selectFileModel.maxSizeKb = $scope.maxSizeKb;\r\n                        }\r\n                        else {\r\n                            $scope.selectFileModel.maxSizeKb = messageAttachmentConfig.FileAttachmentConfig.MaxFileSizeKb;\r\n                        }\r\n                    }\r\n\r\n\r\n                    function loadAllowableFileTypes() {\r\n                        if ($scope.fileType) {\r\n                            $scope.selectFileModel.allowableFileExtensions = $scope.fileType;\r\n                        }\r\n                        else {\r\n                            $scope.selectFileModel.allowableFileExtensions = messageAttachmentConfig.FileAttachmentConfig.AllowableFileExtensions;\r\n                        }\r\n\r\n                        if ($scope.selectFileModel.allowableFileExtensions) {\r\n                            var extensions = $scope.selectFileModel.allowableFileExtensions.split(',');\r\n\r\n                            _.forEach(extensions, function (ext) {\r\n                                $scope.selectFileModel.mimeTypes.Types.push(\r\n                                    {\r\n                                        FileExtension: ext.trim(),\r\n                                        MimeType: ''\r\n                                    });\r\n                            });\r\n\r\n                            MimeTypeRepository.getMimeTypeFromFileExtension($scope.selectFileModel.mimeTypes)\r\n                                .then(function (data) {\r\n                                    $scope.selectFileModel.mimeTypes = data;\r\n                                })\r\n                                .catch(function () {\r\n                                    $scope.validationMessage = gettext('Was not able to retrieve MIME type mappings.');\r\n                                })\r\n                                .finally(function () {\r\n                                    $scope.loading = false;\r\n                                });\r\n                        }\r\n                        else {\r\n                            $scope.validationMessage = gettext('No file type criteria was supplied.');\r\n                        }\r\n                    }\r\n\r\n\r\n\r\n\r\n                    function loadView() {\r\n                        $scope.loading = true;\r\n                        loadMaxFileSize();\r\n                        loadAllowableFileTypes();\r\n                    }\r\n                    loadView();\r\n                }\r\n            };\r\n        }\r\n    ]\r\n);","angular.module('app').directive('apSelectImage',\r\n    [\r\n        function () {\r\n            'use strict';\r\n\r\n            return {\r\n                restrict: 'E',\r\n                templateUrl: '/app/views/directives/apSelectImage.html',\r\n                scope: {\r\n                    // Use '@' for one way binding.  String value is returned.\r\n                    // Use '=' for two way binding.  An object is returned.\r\n                    // Use '&' for a method.\r\n                    maxSizeKb: '=maxSizeKb',\r\n                    selectedFileName: '=selectedFileName',\r\n                    selectedMimeType: '=selectedMimeType',\r\n                    selectedFileContents: '=selectedFileContents'\r\n                },\r\n\r\n                controller: function($scope) {\r\n\r\n                    $scope.selectImageModel = {\r\n                        //maxSizeKb: $scope.maxSizeKb,\r\n                        //fileType : '', //'.bmp,.jpeg,.gif',\r\n                        selectedFileName: $scope.selectedFileName,\r\n                        selectedFileContents: $scope.selectedFileContents,\r\n                        selectedMimeType: $scope.selectedMimeType,\r\n                        validationMessage : ''\r\n                    };\r\n\r\n                    $scope.clearSelectedFile = function clearSelectedFile() {\r\n                        $scope.selectImageModel.selectedFileName = '';\r\n                        $scope.selectImageModel.selectedFileContents = '';\r\n                        $scope.selectImageModel.selectedMimeType = '';\r\n                        $scope.selectImageModel.validationMessage = '';\r\n                    };\r\n                }\r\n            };\r\n        }\r\n    ]\r\n);","angular.module('app').directive('inputfileOnchange', [function(){\r\n    'use strict';\r\n    return {\r\n        scope: {\r\n            callBack: '&inputfileOnchange'\r\n        },\r\n        link: function(scope, element){\r\n            element.on('change', function(event){\r\n                scope.callBack({myEventArg: event});\r\n            });\r\n\r\n            scope.$on('$destroy', function () {\r\n                element.off('change');\r\n            });\r\n        }\r\n    };\r\n}]);","angular.module('app').filter('apPatientPortalThumbnailSrc', [function () {\r\n    'use strict';\r\n    return function (patientId, height, width) {\r\n        if(!patientId) {\r\n            // if the patientId is null or undefined, return undefined because a valid url can't be formed\r\n            // and undefined can be handled accordingly\r\n            return;\r\n        }\r\n\r\n        if(height && !width) {\r\n            width = height;\r\n        }\r\n\r\n        var url = 'person/' + patientId + '/thumbnail';\r\n\r\n        if(height) {\r\n            url += '?height=' + height + '&width=' + width;\r\n        }\r\n\r\n        return url;\r\n    };\r\n}]);\r\n","angular.module('app').factory('NotificationRepository',\r\n    ['AprimaRestangular', function (AprimaRestangular) {\r\n        'use strict';\r\n\r\n        function getNotifications (uid) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('notifications/patientportal/' + uid).get();\r\n        }\r\n\r\n        return{\r\n            getNotifications: getNotifications\r\n        };\r\n    }]);","angular.module('app').factory('NotificationService',\r\n    ['$rootScope', '$interval', '$log', 'LocalStorageRepository',\r\n        function($rootScope, $interval, $log, LocalStorageRepository) {\r\n            'use strict';\r\n\r\n            var notificationPromise;\r\n\r\n            function updateNotifications () {\r\n                $log.log('updateNotifications - raising Notification:updated event - ' + moment().format('lll'));\r\n\r\n                //$rootScope.$broadcast('Notification:updated', 'Notification event fired : ' + new Date());\r\n                $rootScope.$broadcast('Notification:updated');\r\n            }\r\n\r\n            function startNotificationTimer() {\r\n                $log.log('setupNotificationTimer - starting - ' + moment().format('lll'));\r\n\r\n                if (!angular.isDefined(notificationPromise)) {\r\n                    $log.log('setupNotificationTimer - initializing notification timer');\r\n\r\n                    var timeoutInterval = LocalStorageRepository.getNotificationTimeout();\r\n                    if (typeof timeoutInterval === 'number') {\r\n                        if (timeoutInterval % 1 === 0) {\r\n                            if (timeoutInterval > 0 && timeoutInterval < 100) {\r\n                                timeoutInterval = timeoutInterval * 60000;\r\n                                notificationPromise = $interval(updateNotifications, timeoutInterval, 0, false);\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    if (angular.isDefined(notificationPromise)) {\r\n                        $log.log('setupNotificationTimer - notification timer started successfully.  Timeout Interval is ' + timeoutInterval + ' milliseconds.');\r\n                    }\r\n                    else {\r\n                        $log.log('setupNotificationTimer - not able to start notification timer.  Timeout Interval is >>' + timeoutInterval + '<<');\r\n                    }\r\n                }\r\n                else {\r\n                    $log.log('setupNotificationTimer - notification timer already initialized');\r\n                }\r\n\r\n                $log.log('setupNotificationTimer - ending');\r\n            }\r\n\r\n            function stopNotificationTimer() {\r\n                $log.log('stopNotificationTimer - starting - ' + moment().format('lll'));\r\n\r\n                if (angular.isDefined(notificationPromise)) {\r\n                    $interval.cancel(notificationPromise);\r\n                    notificationPromise = undefined;\r\n                    $log.log('stopNotificationTimer - timer stopped');\r\n                }\r\n\r\n                $log.log('stopNotificationTimer - ending');\r\n            }\r\n\r\n            $rootScope.$on('$destroy', function() {\r\n                stopNotificationTimer();\r\n            });\r\n\r\n\r\n            return {\r\n                updateNotifications: updateNotifications,\r\n                startNotificationTimer: startNotificationTimer,\r\n                stopNotificationTimer: stopNotificationTimer\r\n            };\r\n        }\r\n    ]);","angular.module('app').directive('apDesktopRuler', [\r\n    function () {\r\n        'use strict';\r\n        return {\r\n            restrict: 'E',\r\n            templateUrl: '/app/partials/desktopRuler/views/apDesktopRuler.html',\r\n            scope: true,\r\n            transclude: false,\r\n            link: function () {\r\n\r\n                function onLoad() {\r\n                }\r\n\r\n                onLoad();\r\n            }\r\n        };\r\n    }]);","angular.module('app').directive('apFooter',\r\n    [\r\n        'SessionService',\r\n        'LocalStorageRepository', \r\n        '$uibModal', \r\n        'ConsentRepository', \r\n        'aprgettext', \r\n        'TransitionManager',\r\n        'BrowserService',\r\n        function (\r\n            SessionService, \r\n            LocalStorageRepository, \r\n            $modal, \r\n            ConsentRepository, \r\n            gettext, \r\n            TransitionManager,\r\n            BrowserService\r\n        ) {\r\n            'use strict';\r\n            return {\r\n                restrict: 'E',\r\n                templateUrl: '/app/partials/footer/views/apFooter.html',\r\n                scope: true,\r\n                transclude: false,\r\n                link: function (scope) {\r\n\r\n                    scope.apFooter = {\r\n                        PatientAuthenticated: SessionService.getPatientAuthenticated()\r\n                    };\r\n\r\n                    function contactUs() {\r\n                        TransitionManager.transition({appRoute: 'contactus'});\r\n                    }\r\n\r\n                    function viewPracticeTerms() {\r\n\r\n                        var modalInstance = $modal.open({\r\n                            templateUrl: '/app/views/modals/practicetermsmodal.html',\r\n                            controller: 'PracticeTermsModalCtrl',\r\n                            windowClass: 'modal-full',\r\n                            resolve: {}\r\n                        });\r\n\r\n                        modalInstance.result.then(function () {\r\n                        });\r\n                    }\r\n\r\n                    function viewPrivacyPolicy() {\r\n                        scope.isModalDisplayed = true;\r\n\r\n                        var modalConfig = {\r\n                            Title: gettext('Privacy Policy'),\r\n                            DocumentId: 'privacypolicy',\r\n                            DocumentLoad: getPrivacyPolicy,\r\n                            DocumentDownload: downloadPrivacyPolicy,\r\n                            DisableInlinePdf: !BrowserService.supportsInlinePdf(),\r\n                        };\r\n\r\n                        var modalInstance = $modal.open({\r\n                            templateUrl: '/app/views/viewDocumentModal.html',\r\n                            controller: 'ViewDocumentModalCtrl',\r\n                            windowClass: 'modal-full',\r\n                            resolve: {\r\n                                modalConfig: function () {\r\n                                    return modalConfig;\r\n                                }\r\n                            }\r\n                        });\r\n\r\n                        modalInstance.result.then(function () {\r\n                            scope.isModalDisplayed = false;\r\n                        });\r\n                    }\r\n\r\n                    function viewApiDocumentation() {\r\n                        scope.isModalDisplayed = true;\r\n\r\n                        var modalConfig = {\r\n                            Title: gettext('API Documentation'),\r\n                            DocumentId: 'apidocumentation',\r\n                            DocumentLoad: getApiDocumentation,\r\n                            DocumentDownload: downloadApiDocumentation,\r\n                            DisableInlinePdf: !BrowserService.supportsInlinePdf(),\r\n                            ClientID: LocalStorageRepository.getClientID() || '',\r\n                            ClientURL: LocalStorageRepository.getClientURL() || '',\r\n                        };\r\n\r\n                        var modalInstance = $modal.open({\r\n                            templateUrl: '/app/views/viewApiDocumentModal.html',\r\n                            controller: 'ViewApiDocumentModalCtrl',\r\n                            windowClass: 'modal-full',\r\n                            resolve: {\r\n                                modalConfig: function () {\r\n                                    return modalConfig;\r\n                                }\r\n                            }\r\n                        });\r\n\r\n                        modalInstance.result.then(function () {\r\n                            scope.isModalDisplayed = false;\r\n                        });\r\n                    }\r\n\r\n                    function viewApiDocumentationGatekeeper() {\r\n                        scope.isModalDisplayed = true;\r\n\r\n                        var modalConfig = {\r\n                            Title: gettext('API Documentation Disclaimer'),\r\n                            DisplayAPIDocumentationModal: viewApiDocumentation,\r\n                            PatientAuthenticated: scope.apFooter.PatientAuthenticated,\r\n                        };\r\n\r\n                        var modalInstance = $modal.open({\r\n                            templateUrl: '/app/views/modals/apidocumentationgatekeepermodal.html',\r\n                            controller: 'ApiDocumentationGatekeeperModalCtrl',\r\n                            windowClass: 'modal-lg',\r\n                            resolve: {\r\n                                modalConfig: function () {\r\n                                    return modalConfig;\r\n                                }\r\n                            }\r\n                        });\r\n\r\n                        modalInstance.result.then(function (data) {\r\n                            scope.isModalDisplayed = false;\r\n                            if (data === 'ok') {\r\n                                viewApiDocumentation();\r\n                            }\r\n                        });\r\n                    }\r\n\r\n                    function getPrivacyPolicy() {\r\n                        return ConsentRepository.downloadAgreementPrivacyPolicy();\r\n                    }\r\n\r\n                    function downloadPrivacyPolicy(){\r\n                        return ConsentRepository.downloadAgreementPrivacyPolicy()\r\n                            .then(function (data) {\r\n                                return {Data: data.Data, FileName: 'PrivacyPolicy', Extension: 'pdf'};\r\n                            });\r\n                    }\r\n\r\n                    function getApiDocumentation() {\r\n                        return ConsentRepository.downloadApiDocumentation();\r\n                    }\r\n\r\n                    function downloadApiDocumentation() {\r\n                        return ConsentRepository.downloadApiDocumentation()\r\n                            .then(function (data) {\r\n                                return {Data: data.Data, FileName: 'APIPatientDocumentation', Extension: 'pdf'};\r\n                            });\r\n                    }\r\n\r\n                    var patientAuthenticatedListener = scope.$on('PatientAuthenticated:updated', function (event, data) {\r\n                        scope.apFooter.PatientAuthenticated = data;\r\n                    });\r\n\r\n                    scope.$on('$destroy', function () {\r\n                        patientAuthenticatedListener();\r\n                    });\r\n\r\n                    scope.contactUs = contactUs;\r\n                    scope.viewPrivacyPolicy = viewPrivacyPolicy;\r\n                    scope.viewPracticeTerms = viewPracticeTerms;\r\n                    scope.viewApiDocumentationGatekeeper = viewApiDocumentationGatekeeper;\r\n                }\r\n            };\r\n        }\r\n    ]\r\n);","angular.module('app').directive('apHeader', ['aprgettext', 'LogOffService', 'TransitionManager', 'SessionService', 'PatientPortalStorageRepository', 'NotificationService', '$rootScope', '$log', 'ContentAttributeService',\r\n    function (gettext, LogOffService, TransitionManager, SessionService, PatientPortalStorageRepository, NotificationService, $rootScope, $log, ContentAttributeService) {\r\n        'use strict';\r\n        return {\r\n            restrict: 'E',\r\n            templateUrl: '/app/partials/header/views/apHeader.html',\r\n            scope: true,\r\n            transclude: false,\r\n            link: function (scope) {\r\n\r\n                function getPracticeName() {\r\n                    ContentAttributeService.getPracticeName(false)\r\n                        .then(function(data) {\r\n                            scope.apHeader.practiceName = data;\r\n                        });\r\n                }\r\n\r\n                function onLoad() {\r\n                    scope.openmenu = false;\r\n                    \r\n                    var loginUser = PatientPortalStorageRepository.getLoginUser(),\r\n                        activePatient = PatientPortalStorageRepository.getActivePatient();\r\n\r\n                    scope.apHeader = {\r\n                        loginUserFullName: loginUser.fullName,\r\n                        activePatientId: activePatient.id,\r\n                        activePatientFullName: activePatient.fullName,\r\n                        patientAuthenticated: SessionService.getPatientAuthenticated(),\r\n                        showHeaderNavigationMenu: SessionService.getShowHeaderNavigationMenu(),\r\n                        responsibleParties: PatientPortalStorageRepository.getActiveResponsibleParties(),\r\n                        get hasResponsibleParties() {\r\n                            return (typeof this.responsibleParties === 'object') && (this.responsibleParties.length > 0);\r\n                        },\r\n                        practiceName: ''\r\n                    };\r\n\r\n                    getPracticeName();\r\n\r\n                    $rootScope.$broadcast('HeaderData:requested');\r\n                }\r\n\r\n                function signOff() {\r\n                    $log.info('User has selected the Sign Out option from the header drop down menu.');\r\n\r\n                    LogOffService.logoff().then(function () {\r\n                        TransitionManager.transition({appRoute: 'login'});\r\n                        SessionService.setPatientAuthenticated(false);\r\n                    });\r\n                }\r\n\r\n                function toggleMobileNav() {\r\n                    SessionService.setShowMobileNav(!SessionService.getShowMobileNav());\r\n                }\r\n\r\n                function setActivePatient(patient) {\r\n                    PatientPortalStorageRepository.setActivePatient(patient.Id, patient.FirstName, patient.LastName, patient.IsPatient);\r\n                    NotificationService.updateNotifications();\r\n                    onLoad();\r\n\r\n                    TransitionManager.transition({appRoute: 'dashboard'});\r\n                }\r\n\r\n                function accountDetails() {\r\n                    TransitionManager.transition({appRoute: 'accountdetails'});\r\n                }\r\n\r\n\r\n                scope.updateNotifications = function() {\r\n                    NotificationService.updateNotifications();\r\n                };\r\n\r\n                //\r\n                //scope.startNotificationTimer = function() {\r\n                //    NotificationService.startNotificationTimer();\r\n                //};\r\n                //\r\n                //scope.stopNotificationTimer = function() {\r\n                //    NotificationService.stopNotificationTimer();\r\n                //};\r\n\r\n                var patientAuthenticatedListener = scope.$on('PatientAuthenticated:updated', function (event, data) {\r\n                    scope.apHeader.PatientAuthenticated = data;\r\n                    scope.apHeader.LoginUserFullName = PatientPortalStorageRepository.getLoginUser().fullName;\r\n                });\r\n\r\n                var showHeaderMenuListener = scope.$on('ShowHeaderNavigationMenu:updated', function (event, data) {\r\n                    scope.apHeader.ShowHeaderNavigationMenu = data;\r\n                });\r\n                \r\n                var headerDataListener = $rootScope.$on('HeaderData:requested', function(event, requestor) {\r\n                    var headerData = {\r\n                        loginUserFullName: scope.apHeader.loginUserFullName,\r\n                        activePatientId: scope.apHeader.activePatientId,\r\n                        activePatientFullName: scope.apHeader.activePatientFullName,\r\n                        responsibleParties: scope.apHeader.responsibleParties,\r\n                        hasResponsibleParties: scope.apHeader.hasResponsibleParties,\r\n                        requestor: requestor\r\n                    };\r\n                    $rootScope.$broadcast('HeaderData:updated', headerData);\r\n                });\r\n                \r\n                var responsiblePartyListener = $rootScope.$on('ResponsibleParty:updated', function(event, patientId) {\r\n                    var patient = _.find(scope.apHeader.responsibleParties, { Id: patientId });\r\n                    if(patient)\r\n                        setActivePatient(patient); \r\n                });\r\n\r\n                scope.$on('$destroy', function () {\r\n                    patientAuthenticatedListener();\r\n                    showHeaderMenuListener();\r\n                    headerDataListener();\r\n                    responsiblePartyListener();\r\n                });\r\n\r\n                onLoad();\r\n\r\n                scope.signOff = signOff;\r\n                scope.setActivePatient = setActivePatient;\r\n                scope.toggleMobileNav = toggleMobileNav;\r\n                scope.accountDetails = accountDetails;\r\n            }\r\n        };\r\n    }]);","angular.module('app').directive('apMobileNav', ['$rootScope','$transitions', 'AppRoutes', 'NotificationRepository', 'LocalStorageRepository', 'SessionService', 'GuidList', 'PatientSettingsService', 'NotificationService', 'TransitionManager', 'LogOffService',\r\n    function ($rootScope, $transitions, AppRoutes, NotificationRepository, LocalStorageRepository, SessionService, GuidList, PatientSettingsService, NotificationService, TransitionManager, LogOffService) {\r\n        'use strict';\r\n\r\n        return {\r\n            restrict: 'E',\r\n            templateUrl: '/app/partials/mobileNav/views/apMobileNav.html',\r\n            scope: true,\r\n            transclude: false,\r\n            link: function (scope) {\r\n                scope.notifications = {\r\n                    Welcome: { BadgeCount: 0, IsActive: true},\r\n                    Chart: { BadgeCount: 0, IsActive: true},\r\n                    Messages: { BadgeCount: 0, IsActive: true},\r\n                    Forms: { BadgeCount: 0, IsActive: true},\r\n                    Prescriptions: { BadgeCount: 0, IsActive: true},\r\n                    Appointments: { BadgeCount: 0, IsActive: true},\r\n                    Billing: { BadgeCount: 0, IsActive: true},\r\n                    Doctors: { BadgeCount: 0, IsActive: true}\r\n                };\r\n\r\n                scope.showMobileNav = SessionService.getShowMobileNav();\r\n                \r\n                scope.headerData = {\r\n                };\r\n\r\n                scope.transitionAndCloseNav = function(transition) {\r\n                  TransitionManager.transition(transition);\r\n                  SessionService.setShowMobileNav(false);\r\n                };\r\n\r\n                scope.signOff = function() {\r\n                    LogOffService.logoff().then(function() {\r\n                        TransitionManager.transition({appRoute: 'login'});\r\n                        SessionService.setPatientAuthenticated(false);\r\n                        SessionService.setShowMobileNav(false);\r\n                    });\r\n                };\r\n                \r\n                scope.setActivePatient = function(patientId) {\r\n                    $rootScope.$broadcast('ResponsibleParty:updated', patientId);  \r\n                    SessionService.setShowMobileNav(false);\r\n                };\r\n\r\n                function getNotifications() {\r\n                    NotificationRepository\r\n                        .getNotifications(LocalStorageRepository.getUserID())\r\n                        .then(function (notifications) {\r\n                            var featureList = PatientSettingsService.getPatientFeatures();\r\n\r\n                            scope.notifications.Chart.BadgeCount = _.find(notifications, {NotificationType: 'Chart'}).Count;\r\n\r\n                            scope.notifications.Messages.BadgeCount = _.find(notifications, {NotificationType: 'Messages'}).Count;\r\n                            scope.notifications.Messages.IsActive = featureList.SendReceiveMessages.IsActive;\r\n\r\n                            scope.notifications.Forms.BadgeCount = _.find(notifications, {NotificationType: 'Forms'}).Count;\r\n                            scope.notifications.Forms.IsActive = featureList.ViewEducationMaterial.IsActive;\r\n\r\n                            scope.notifications.Prescriptions.BadgeCount = _.find(notifications, {NotificationType: 'Prescriptions'}).Count;\r\n                            scope.notifications.Prescriptions.IsActive = featureList.RequestRxRefills.IsActive;\r\n\r\n                            scope.notifications.Appointments.BadgeCount = _.find(notifications, {NotificationType: 'Appointments'}).Count;\r\n                            scope.notifications.Appointments.IsActive = featureList.ViewAppointments.IsActive;\r\n\r\n                            scope.notifications.Billing.BadgeCount = _.find(notifications, {NotificationType: 'Billing'}).Count;\r\n                            scope.notifications.Billing.IsActive = (featureList.ViewPatientStatement.IsActive ||  featureList.ViewPatientLedger.IsActive || featureList.MakeAPayment.IsActive);\r\n\r\n                            scope.notifications.Doctors.BadgeCount = _.find(notifications, {NotificationType: 'Doctors'}).Count;\r\n                        });\r\n                }\r\n                getNotifications();\r\n\r\n                var responsiblePartyDataListener = $rootScope.$on('HeaderData:updated', function(event, data) {\r\n                    if(!(data && (data.requestor || 'apMobileNav') !== 'apMobileNav'))\r\n                        scope.headerData = data;\r\n                });\r\n\r\n                function loadMobileNav() {\r\n                    $rootScope.$broadcast('HeaderData:requested', 'apMobileNav');\r\n                    NotificationService.startNotificationTimer();\r\n                }\r\n                loadMobileNav();\r\n\r\n                //var notificationListener = scope.$on('Notification:updated', function (event, data)  {\r\n                var notificationListener = scope.$on('Notification:updated', function ()  {\r\n                    getNotifications();\r\n                });\r\n\r\n                var stateChangeListener = $transitions.onSuccess({}, function onTransitionSuccess(transition) {\r\n                    var toState = transition.targetState() || {};\r\n                    var toStateName = toState && toState.name() || '';\r\n                    var appRoute = _.find(AppRoutes, {state: toStateName});\r\n                    scope.toolbarItem = (appRoute && appRoute.portalSettings && appRoute.portalSettings.toolbarItem);\r\n                });\r\n\r\n                var showMobileNavListener = scope.$on('ShowMobileNav:updated', function(event, data) {\r\n                  scope.showMobileNav = data;\r\n                });\r\n\r\n                scope.$on('$destroy', function () {\r\n                    notificationListener();\r\n                    stateChangeListener();\r\n                    showMobileNavListener();\r\n                    responsiblePartyDataListener();\r\n                    NotificationService.stopNotificationTimer();\r\n                });\r\n            }\r\n        };\r\n}]);\r\n","angular.module('app').directive('apToolbar', ['$rootScope', '$transitions', 'AppRoutes', 'NotificationRepository', 'GuidList', 'PatientSettingsService', 'NotificationService', 'PatientPortalStorageRepository', 'TransitionManager',\r\n    function ($rootScope, $transitions, AppRoutes, NotificationRepository, GuidList, PatientSettingsService, NotificationService, PatientPortalStorageRepository, TransitionManager) {\r\n        'use strict';\r\n\r\n        return {\r\n            restrict: 'E',\r\n            templateUrl: '/app/partials/toolbar/views/apToolbar.html',\r\n            scope: true,\r\n            transclude: false,\r\n            link: function (scope) {\r\n\r\n                scope.blankToolbar = {\r\n                    IsActive: false,\r\n                    BackToHome: { IsActive: false}\r\n                };\r\n                var featureList = PatientSettingsService.getPatientFeatures();\r\n                scope.notifications = {\r\n                    Welcome: { BadgeCount: 0, IsActive: true},\r\n                    Chart: { BadgeCount: 0, IsActive: true},\r\n                    Messages: { BadgeCount: 0, IsActive: featureList.SendReceiveMessages.IsActive},\r\n                    Forms: { BadgeCount: 0, IsActive: true},\r\n                    Prescriptions: { BadgeCount: 0, IsActive: featureList.RequestRxRefills.IsActive},\r\n                    Appointments: { BadgeCount: 0, IsActive: featureList.ViewAppointments.IsActive},\r\n                    Billing: { BadgeCount: 0, IsActive: (featureList.ViewPatientStatement.IsActive || featureList.ViewPatientLedger.IsActive || featureList.MakeAPayment)},\r\n                    Doctors: { BadgeCount: 0, IsActive: false}    // TODO - Implement Doctor pages\r\n                };\r\n\r\n                function getNotifications() {\r\n                    if (!!$rootScope.hideToolbar) {\r\n                        return;\r\n                    }\r\n\r\n                    var activePatientId = PatientPortalStorageRepository.getActivePatient().id;\r\n                    if (activePatientId) {\r\n                        NotificationRepository\r\n                            .getNotifications(activePatientId)\r\n                            .then(function (notifications) {\r\n                                featureList = PatientSettingsService.getPatientFeatures();\r\n\r\n                                scope.notifications.Chart.BadgeCount = _.find(notifications, {NotificationType: 'Chart'}).Count;\r\n\r\n                                scope.notifications.Messages.BadgeCount = _.find(notifications, {NotificationType: 'Messages'}).Count;\r\n                                scope.notifications.Messages.IsActive = featureList.SendReceiveMessages.IsActive;\r\n\r\n                                scope.notifications.Forms.BadgeCount = _.find(notifications, {NotificationType: 'Forms'}).Count; \r\n                                scope.notifications.Forms.IsActive = true;\r\n\r\n                                scope.notifications.Prescriptions.BadgeCount = _.find(notifications, {NotificationType: 'Prescriptions'}).Count;\r\n                                scope.notifications.Prescriptions.IsActive = featureList.RequestRxRefills.IsActive;\r\n\r\n                                scope.notifications.Appointments.BadgeCount = _.find(notifications, {NotificationType: 'Appointments'}).Count;\r\n                                scope.notifications.Appointments.IsActive = featureList.ViewAppointments.IsActive;\r\n\r\n                                scope.notifications.Billing.BadgeCount = _.find(notifications, {NotificationType: 'Billing'}).Count;\r\n                                scope.notifications.Billing.IsActive = (featureList.ViewPatientStatement.IsActive || featureList.ViewPatientLedger.IsActive || featureList.MakeAPayment.IsActive);\r\n\r\n                                scope.notifications.Doctors.BadgeCount = _.find(notifications, {NotificationType: 'Doctors'}).Count;\r\n                            });\r\n                    }\r\n                }\r\n\r\n                getNotifications();\r\n\r\n                function loadToolbar() {\r\n                    if (!!$rootScope.hideToolbar) {\r\n                        return;\r\n                    }\r\n                    NotificationService.startNotificationTimer();\r\n                }\r\n\r\n                loadToolbar();\r\n\r\n                //var notificationListener = scope.$on('Notification:updated', function (event, data)  {\r\n                var notificationListener = scope.$on('Notification:updated', function () {\r\n                    getNotifications();\r\n                });\r\n\r\n                var stateChangeListener = $transitions.onSuccess({}, function onTransitionSuccess(transition) {\r\n                    var toState = transition.targetState() || {};\r\n                    var toStateName = toState && toState.name() || '';\r\n                    var appRoute = _.find(AppRoutes, {state: toStateName});\r\n                    scope.toolbarItem = (appRoute && appRoute.portalSettings && appRoute.portalSettings.toolbarItem);\r\n\r\n                    if (scope.toolbarItem === 'blank') {\r\n                        _.forEach(scope.notifications, function (toolbarButton) {\r\n                            toolbarButton.IsActive = false;\r\n                        });\r\n\r\n                        scope.blankToolbar.IsActive = true;\r\n                        scope.blankToolbar.BackToHome.IsActive = true;\r\n                    }\r\n                    else {\r\n                        if (scope.blankToolbar.IsActive) {\r\n                            resetToolbarState();\r\n                        }\r\n                    }\r\n                });\r\n\r\n                scope.$on('$destroy', function () {\r\n                    notificationListener();\r\n                    stateChangeListener();\r\n                    NotificationService.stopNotificationTimer();\r\n                });\r\n\r\n\r\n                function resetToolbarState() {\r\n                    scope.blankToolbar.IsActive = false;\r\n                    scope.blankToolbar.BackToHome.IsActive = false;\r\n\r\n                    scope.notifications.Welcome.IsActive = true;\r\n                    scope.notifications.Chart.IsActive = true;\r\n                    scope.notifications.Doctors.IsActive = false;\r\n\r\n                    var featureList = PatientSettingsService.getPatientFeatures();\r\n                    scope.notifications.Messages.IsActive = featureList.SendReceiveMessages.IsActive;\r\n                    scope.notifications.Forms.IsActive = true;\r\n                    scope.notifications.Prescriptions.IsActive = featureList.RequestRxRefills.IsActive;\r\n                    scope.notifications.Appointments.IsActive = featureList.ViewAppointments.IsActive;\r\n                    scope.notifications.Billing.IsActive = (featureList.ViewPatientStatement.IsActive || featureList.ViewPatientLedger.IsActive || featureList.MakeAPayment);\r\n                }\r\n\r\n\r\n                function backToHome() {\r\n                    //getNotifications();\r\n                    resetToolbarState();\r\n                    TransitionManager.transition({appRoute: 'dashboard'});\r\n                }\r\n\r\n                function navigateToChart() {\r\n                    var activePatientId = PatientPortalStorageRepository.getActivePatient().id;\r\n                    var targetAppRoute;\r\n                    var opts = {\r\n                        id: activePatientId,\r\n                    };\r\n                    if (featureList.ViewClinicalSummary.IsActive) {\r\n                        targetAppRoute = 'myChartVisitSummary';\r\n                    } else if (featureList.ViewMedicalHistory.IsActive) {\r\n                        targetAppRoute = 'myChartProblems';\r\n                    } else if (featureList.ViewMedications.IsActive) {\r\n                        targetAppRoute = 'myChartPrescriptions';\r\n                    } else if (featureList.ViewProcedures.IsActive) {\r\n                        targetAppRoute = 'myChartProcedures';\r\n                    } else if (featureList.ViewLabTestResults.IsActive) {\r\n                        targetAppRoute = 'myChartLabResults';\r\n                    } else if (featureList.ViewImmunizations.IsActive) {\r\n                        targetAppRoute = 'myChartImmunizations';\r\n                    } else if (featureList.ViewEducationMaterial.IsActive) {\r\n                        targetAppRoute = 'myChartReferenceMaterial';\r\n                    } else if (featureList.ViewMedicationAllergies.IsActive) {\r\n                        targetAppRoute = 'myChartMedicationAllergies';\r\n                    } else {\r\n                        targetAppRoute = 'myChartPersonalDetails';\r\n                    }\r\n\r\n                    TransitionManager.transition({\r\n                        appRoute: targetAppRoute,\r\n                        opts: opts,\r\n                    });\r\n                }\r\n\r\n                scope.backToHome = backToHome;\r\n                scope.navigateToChart = navigateToChart;\r\n\r\n            }\r\n        };\r\n    }]);","angular.module('app').factory('ContentAttributeRepository',\r\n    ['AprimaRestangular',\r\n        function(AprimaRestangular) {\r\n            'use strict';\r\n\r\n            function getContentAttributes(clientId) {\r\n                var params = {\r\n                    ClientId: clientId\r\n                };\r\n\r\n                var restangular = AprimaRestangular.get('patient');\r\n                return restangular.one('login/Content-Attributes/').get(params);\r\n            }\r\n\r\n            return {\r\n                getContentAttributes: getContentAttributes\r\n            };\r\n    }]);","angular.module('app').factory('ContentAttributeService',\r\n    ['ContentAttributeRepository',  'LocalStorageRepository', '$q', 'AppId', 'UrlParsingService', '$location',\r\n        function(ContentAttributeRepository, LocalStorageRepository, $q, AppId, UrlParsingService, $location) {\r\n            'use strict';\r\n\r\n            var contentAttributes = null;\r\n\r\n            function getAttributeValue(id) {\r\n                if (!contentAttributes) {\r\n                    return '';\r\n                }\r\n\r\n                var attributeValue = _.filter(contentAttributes, function(attribute) {\r\n                    return attribute.Id.toLowerCase() === id.toLowerCase();\r\n                });\r\n                return attributeValue[0].Value;\r\n            }\r\n\r\n            function loadContentAttributes() {\r\n                var clientId = LocalStorageRepository.getClientID();\r\n                var clientURL = LocalStorageRepository.getClientURL();\r\n\r\n                if (!clientId || !clientURL) {\r\n                    return $q.when();\r\n                }\r\n\r\n                return ContentAttributeRepository\r\n                    .getContentAttributes(clientId)\r\n                    .then(function (data) {\r\n                        contentAttributes = data;\r\n                        return;\r\n                    });\r\n            }\r\n\r\n            function getPracticeInfo(forceRefresh) {\r\n                if (!contentAttributes || forceRefresh) {\r\n                    var promise = loadContentAttributes()\r\n                        .then(function() {\r\n                            return createPracticeInfo();\r\n                        });\r\n                    return promise;\r\n                }\r\n\r\n                return $q.when(createPracticeInfo());\r\n\r\n                function createPracticeInfo() {\r\n                    return {\r\n                        practiceName: getAttributeValue(AppId.PracticeName),\r\n                        practiceTagline: getAttributeValue(AppId.PracticeTagline),\r\n                    };\r\n                }\r\n            }\r\n\r\n            function getPracticeName(forceRefresh) {\r\n                return getPracticeInfo(forceRefresh).then(function(practiceInfo) {\r\n                    return practiceInfo.practiceName;\r\n                });\r\n            }\r\n\r\n            function getMessageSubHeading(forceRefresh) {\r\n                if (!contentAttributes || forceRefresh) {\r\n                    var promise = loadContentAttributes()\r\n                        .then(function() {\r\n                            return getAttributeValue(AppId.MessageSubHeader);\r\n                        });\r\n                    return promise;\r\n                }\r\n\r\n                return $q.when(getAttributeValue(AppId.MessageSubHeader));\r\n            }\r\n\r\n            function getClientConfig() {\r\n                return UrlParsingService.parsePortalUrl('/portal/');\r\n            }\r\n\r\n            function getPaymentRedirectUrl() {\r\n                var absPath = $location.absUrl(),\r\n                    partial = $location.path(),\r\n                    newPartial = '/transactionComplete/';\r\n                var redirectUrl = absPath.replace(partial, newPartial);\r\n                return redirectUrl;\r\n            }\r\n\r\n            return {\r\n                loadContentAttributes: loadContentAttributes,\r\n                getPracticeInfo: getPracticeInfo,\r\n                getPracticeName: getPracticeName,\r\n                getMessageSubHeading: getMessageSubHeading,\r\n                getClientConfig: getClientConfig,\r\n                getPaymentRedirectUrl: getPaymentRedirectUrl,\r\n            };\r\n\r\n        }]);","angular.module('app').factory('GatewayFactory',\r\n    ['Restangular', 'LoginFactory', 'LocalStorageRepository', 'configuration', '$q', '$qHelpers', 'aprgettext',\r\n        function (Restangular, LoginFactory, LocalStorageRepository, configuration, $q, $qHelpers, gettext) {\r\n            'use strict';\r\n\r\n            var gateways = _(configuration.GATEWAYS).map(function (gateway) {\r\n                var restangular = Restangular.withConfig(function () {\r\n                });\r\n\r\n                restangular.setBaseUrl(gateway.url);\r\n                restangular.setDefaultHeaders({\r\n                    'ApiKey': configuration.API_KEY\r\n                });\r\n\r\n                return {\r\n                    prefix: gateway.prefix,\r\n                    restangular: restangular\r\n                };\r\n            });\r\n\r\n            function getServerUrl(clientId, gatewayPrefix) {\r\n                var clientUrl = LocalStorageRepository.getClientURL();\r\n//                var clientUrl = 'http://MobileAppService:8000';\r\n//                LocalStorageRepository.setClientURL(clientUrl);\r\n\r\n                if (clientUrl) {\r\n                    var deferred = $q.defer();\r\n                    deferred.resolve(clientUrl);\r\n                    return deferred.promise;\r\n                }\r\n                else {\r\n                    var filteredGateways = gateways;\r\n\r\n                    if (gatewayPrefix) {\r\n                        filteredGateways = filteredGateways.filter(function (gateway) {\r\n                            return gateway.prefix === gatewayPrefix;\r\n                        });\r\n\r\n                        if (!filteredGateways.some()) {\r\n                            return $q.reject(new Error(gettext('Gateway prefix is not recognized.')));\r\n                        }\r\n                    }\r\n\r\n                    var gatewayRequests = filteredGateways.map(function (gateway) {\r\n                        return gateway.restangular.one('home', clientId).get();\r\n                    }).map(function (promise) {\r\n                        return $qHelpers.timeout(promise, 5000);\r\n                    }).value();\r\n\r\n                    return $qHelpers\r\n                        .whenFirstSuccess(gatewayRequests)\r\n                        .then(function (serverInfo) {\r\n                            LocalStorageRepository.setClientURL(serverInfo.AppServerUrl);\r\n                            return serverInfo.AppServerUrl;\r\n                        }, function (response) {\r\n                            return $q.reject(new Error(gettext('Gateway connection error') + ' (' + response.status + ')'));\r\n                        });\r\n                }\r\n            }\r\n\r\n            function login(clientId, username, password, gatewayPrefix, userId) {\r\n                if (!configuration.DEV_HOSTED) {\r\n                    var url = LocalStorageRepository.getClientURL();\r\n                    return loginWithUrl(url);\r\n                }\r\n\r\n                return getServerUrl(clientId, gatewayPrefix)\r\n                    .then(loginWithUrl);\r\n\r\n                function loginWithUrl(url) {\r\n                    updateLocalStorage(clientId, url);\r\n                    return LoginFactory.postLogin(url, clientId, username, password, userId, configuration.CLIENT_FEATURES);\r\n                }\r\n            }\r\n\r\n            function tokenLogin(clientId, gatewayPrefix, token) {\r\n                if (!configuration.DEV_HOSTED) {\r\n                    var url = LocalStorageRepository.getClientURL();\r\n                    return loginWithUrl(url);\r\n                }\r\n\r\n                return getServerUrl(clientId, gatewayPrefix)\r\n                    .then(loginWithUrl);\r\n\r\n                function loginWithUrl(url) {\r\n                    updateLocalStorage(clientId, url);\r\n                    return LoginFactory.postTokenLogin(url, clientId, token);\r\n                }\r\n            }\r\n\r\n            function loginStatementsOnly(clientId, birthDate, zipCode, accessCode, phoneNumber, gatewayPrefix ) {\r\n                if (!configuration.DEV_HOSTED) {\r\n                    var url = LocalStorageRepository.getClientURL();\r\n                    return loginStatementsOnlyWithUrl(url);\r\n                }\r\n\r\n                return getServerUrl(clientId, gatewayPrefix)\r\n                    .then(loginStatementsOnlyWithUrl);\r\n\r\n                function loginStatementsOnlyWithUrl(url) {\r\n                    updateLocalStorage(clientId, url);\r\n                    LocalStorageRepository.setAccessCode(accessCode);\r\n                    return LoginFactory.postStatementsLogin(url, clientId, birthDate, zipCode, accessCode, phoneNumber, configuration.CLIENT_FEATURES);\r\n                }\r\n            }\r\n\r\n            function updateLocalStorage(clientId, url) {\r\n                LocalStorageRepository.clearAll();\r\n                LocalStorageRepository.setClientURL(url);\r\n                LocalStorageRepository.setClientID(clientId);\r\n            }\r\n\r\n            return {\r\n                login: login,\r\n                tokenLogin: tokenLogin,\r\n                loginStatementsOnly : loginStatementsOnly\r\n            };\r\n        }]);\r\n\r\n","angular.module('app').factory('LoginAssistanceRepository',\r\n    ['NgxLoginAssistanceRepository', function (NgxLoginAssistanceRepository) {\r\n        'use strict';\r\n\r\n        function getLoginAssistanceInformation (clientId) {\r\n            return NgxLoginAssistanceRepository.getLoginAssistanceInformation({ ClientId: clientId }).toPromise();\r\n        }\r\n\r\n        return{\r\n            getLoginAssistanceInformation: getLoginAssistanceInformation\r\n        };\r\n    }]);","angular.module('app').factory('LoginFactory',\r\n    ['AprimaRestangular', '$q', 'Bridge', 'LocalStorageRepository', 'VersionService', '$log', 'ServerInfoRepository', 'aprgettext','PatientSettingsService', 'SessionService','DashboardService', 'PatientPortalStorageRepository', 'AprimaCache',\r\n        function (AprimaRestangular, $q, Bridge, LocalStorageRepository, VersionService, $log, ServerInfoRepository, gettext, PatientSettingsService, SessionService, DashboardService, PatientPortalStorageRepository, AprimaCache) {\r\n            'use strict';\r\n\r\n            var loginErrorCodes = {\r\n                UnknownError: 1,\r\n                InvalidRequest: 2,\r\n                UnknownClientId: 4,\r\n                LoginFailed: 8,\r\n                NotMobileUser: 16,\r\n                InactiveUser: 32,\r\n                NotAllowedToLogin: 64,\r\n                PrmVersionUnsupported: 128,\r\n                MultipleUserAccounts: 256,\r\n            };\r\n\r\n            function updateVersionInfo(userLoginInfo) {\r\n                if (userLoginInfo && userLoginInfo.ProductVersions) {\r\n                    if (userLoginInfo.ProductVersions.PrmAssemblyVersion) {\r\n                        ServerInfoRepository.setPrmAssemblyVersion(userLoginInfo.ProductVersions.PrmAssemblyVersion);\r\n                    }\r\n                    if (userLoginInfo.ProductVersions.PrmDatabaseVersion) {\r\n                        ServerInfoRepository.setPrmDatabaseVersion(userLoginInfo.ProductVersions.PrmDatabaseVersion);\r\n                    }\r\n                    if (userLoginInfo.ProductVersions.PrmDatabaseBuild) {\r\n                        ServerInfoRepository.setPrmDatabaseBuild(userLoginInfo.ProductVersions.PrmDatabaseBuild);\r\n                    }\r\n                    if (userLoginInfo.ProductVersions.AppServiceVersion) {\r\n                        ServerInfoRepository.setMobileAssemblyVersion(userLoginInfo.ProductVersions.AppServiceVersion);\r\n                    }\r\n                    if(userLoginInfo.SupportedFeatures) {\r\n                        ServerInfoRepository.setSupportedFeatures(userLoginInfo.SupportedFeatures);\r\n                    }\r\n                }\r\n            }\r\n\r\n            var postStatementsLogin = function (clientURL, _clientId, _birthdate, _zipcode, _accessCode, _phoneNumber, clientFeatures) {\r\n\r\n                var restangular = AprimaRestangular.get('patient');\r\n\r\n                return restangular.one('statements-login').customPOST({\r\n                    BirthDate: _birthdate,\r\n                    ZipCode: _zipcode,\r\n                    ClientId: _clientId,\r\n                    DeviceId: LocalStorageRepository.getDeviceId(),\r\n                    AccessCode: _accessCode,\r\n                    PhoneNumber: _phoneNumber,\r\n                    ClientFeatures : clientFeatures\r\n                })\r\n                    .then(function (userLoginInfo) {\r\n                        var authToken = userLoginInfo.JsonWebToken,\r\n                            msg;\r\n\r\n                        return VersionService.checkVersions(userLoginInfo.SupportedApiVersions, userLoginInfo.MinClientVersion).then(function (validationSuccesful) {\r\n                            if (validationSuccesful === false) {\r\n                                return $q.reject(new Error(gettext('Client Version not compatible with api server. Please update your app.')));\r\n                            }\r\n\r\n                            if (!userLoginInfo) {\r\n                                msg = gettext('Unexpected null result from server in Login');\r\n                            }\r\n                            else if (!userLoginInfo.DeviceId) {\r\n                                return $q.reject(new Error(gettext('Client Version not compatible with api server. Please update your app.')));\r\n                            }\r\n\r\n                            if (msg) {\r\n                                $log.warn(msg);\r\n                                Bridge.trackException(msg);\r\n                            }\r\n\r\n                            AprimaCache.Lists.removeAll();\r\n                            LocalStorageRepository.clearKeysOfType('metadata');\r\n\r\n                            LocalStorageRepository.setDeviceId(userLoginInfo.DeviceId);\r\n                            LocalStorageRepository.setJsonWebToken(authToken);\r\n                            LocalStorageRepository.setBirthDate(_birthdate);\r\n                            LocalStorageRepository.setUserFullName(userLoginInfo.FirstName + ' ' + userLoginInfo.LastName);\r\n                            LocalStorageRepository.setUserID(userLoginInfo.Id);\r\n                            LocalStorageRepository.setIsPatient(userLoginInfo.IsPatient);\r\n                            LocalStorageRepository.setAccessCode(_accessCode);\r\n\r\n                            updateVersionInfo(userLoginInfo);\r\n\r\n                            PatientPortalStorageRepository.setResponsibleParties(userLoginInfo.ResponsibleParties);\r\n\r\n                            SessionService.setPracticeConsentAccepted(userLoginInfo.IsPracticeConcentAccepted);\r\n                            SessionService.setNewPasswordRequired(userLoginInfo.IsNewPasswordRequired);\r\n\r\n                            Bridge.changeUserInfo(authToken, clientURL, userLoginInfo.Id);\r\n\r\n                            var featuresPromise = PatientSettingsService.loadPatientFeatures();\r\n                            var dashboardPromise = DashboardService.loadPatientDashboardFeatures();\r\n                            return $q.all([featuresPromise, dashboardPromise]);\r\n                        }, function () {\r\n                            return $q.reject(new Error(gettext('Client Version not compatible with api server. Please update your app.')));\r\n                        });\r\n                    }, function (response) {\r\n                        updateVersionInfo(response.data);\r\n\r\n                        var msg = gettext('login error');\r\n\r\n                        return  $q.reject(new Error(msg));\r\n\r\n                    });\r\n            };\r\n\r\n            var loginSuccess = function(userLoginInfo, clientURL) {\r\n                var authToken = userLoginInfo.JsonWebToken,\r\n                    msg;\r\n\r\n                return VersionService.checkVersions(userLoginInfo.SupportedApiVersions, userLoginInfo.MinClientVersion).then(function (validationSuccesful) {\r\n                    if (validationSuccesful === false) {\r\n                        return $q.reject(new Error(gettext('Client Version not compatible with api server. Please update your app.')));\r\n                    }\r\n\r\n                    if (!userLoginInfo) {\r\n                        msg = gettext('Unexpected null result from server in Login');\r\n                    }\r\n                    else if (!userLoginInfo.DeviceId) {\r\n                        return $q.reject(new Error(gettext('Client Version not compatible with api server. Please update your app.')));\r\n                    }\r\n\r\n                    if (msg) {\r\n                        $log.warn(msg);\r\n                        Bridge.trackException(msg);\r\n                    }\r\n\r\n                    AprimaCache.Lists.removeAll();\r\n                    LocalStorageRepository.clearKeysOfType('metadata');\r\n\r\n                    LocalStorageRepository.setDeviceId(userLoginInfo.DeviceId);\r\n                    LocalStorageRepository.setJsonWebToken(authToken);\r\n                    LocalStorageRepository.setUserName(userLoginInfo.Username);\r\n                    LocalStorageRepository.setUserFullName(userLoginInfo.FirstName + ' ' + userLoginInfo.LastName);\r\n                    LocalStorageRepository.setUserID(userLoginInfo.Id);\r\n                    LocalStorageRepository.setIsPatient(userLoginInfo.IsPatient);\r\n\r\n                    updateVersionInfo(userLoginInfo);\r\n\r\n                    PatientPortalStorageRepository.setResponsibleParties(userLoginInfo.ResponsibleParties);\r\n                    PatientPortalStorageRepository.setIsAccountResponsiblePartyForPatient(userLoginInfo.IsAccountResponsiblePartyForPatient);\r\n\r\n                    if (userLoginInfo.IsPatient) {\r\n                        PatientPortalStorageRepository.setActivePatient(userLoginInfo.Id, userLoginInfo.FirstName, userLoginInfo.LastName, userLoginInfo.IsPatient);\r\n                    } else {\r\n                        var responsiblePartyPatient = PatientPortalStorageRepository.getActiveResponsibleParty();\r\n                        if (responsiblePartyPatient) {\r\n                            PatientPortalStorageRepository.setActivePatient(responsiblePartyPatient.Id, responsiblePartyPatient.FirstName, responsiblePartyPatient.LastName, responsiblePartyPatient.IsPatient);\r\n                        } else {\r\n                            return $q.reject(new Error(gettext('Username is not associated with a patient.')));\r\n                        }\r\n                    }\r\n\r\n                    SessionService.setPracticeConsentAccepted(userLoginInfo.IsPracticeConcentAccepted);\r\n                    SessionService.setNewPasswordRequired(userLoginInfo.IsNewPasswordRequired);\r\n\r\n                    Bridge.changeUserInfo(authToken, clientURL, userLoginInfo.Id);\r\n\r\n                    var featuresPromise = PatientSettingsService.loadPatientFeatures();\r\n                    var dashboardPromise = DashboardService.loadPatientDashboardFeatures();\r\n                    return $q.all([featuresPromise, dashboardPromise]);\r\n                }, function () {\r\n                    return $q.reject(new Error(gettext('Client Version not compatible with api server. Please update your app.')));\r\n                });\r\n            };\r\n\r\n            var loginFailure = function(response, _clientId) {\r\n                updateVersionInfo(response.data);\r\n\r\n                var msg = gettext('login error'),\r\n                    errorCode = null;\r\n                if (response.status === 401) {\r\n                    msg = gettext('Invalid username or password');\r\n\r\n                    errorCode = angular.isNumber(response.data.ErrorCode) ? response.data.ErrorCode : 0;\r\n\r\n                    if (errorCode & loginErrorCodes.UnknownClientId) {\r\n                        msg = gettext('Unknown clientId (' + _clientId + ').');\r\n                    } else if (errorCode & loginErrorCodes.LoginFailed) {\r\n                        msg = gettext('Invalid username or password');\r\n                    } else if (errorCode & loginErrorCodes.InactiveUser) {\r\n                        msg = gettext('This user account is not active and cannot login.');\r\n                    } else if (errorCode & loginErrorCodes.PrmVersionUnsupported) {\r\n                        msg = gettext('PRM version out of date.  Please contact customer support about upgrading.');\r\n                    }\r\n                }\r\n\r\n                return $q.reject(new Error(msg));\r\n            };\r\n\r\n            var postLogin = function (clientURL, _clientId, _username, _password, userId, clientFeatures) {\r\n\r\n                var restangular = AprimaRestangular.get('patient');\r\n\r\n                return restangular.one('login').customPOST({\r\n                    Username: _username,\r\n                    Password: _password,\r\n                    ClientId: _clientId,\r\n                    DeviceId: LocalStorageRepository.getDeviceId(),\r\n                    UserId : userId,\r\n                    ClientFeatures : clientFeatures\r\n                })\r\n                    .then(function (userLoginInfo) {\r\n                        return loginSuccess(userLoginInfo, clientURL);\r\n                    }, function (response) {\r\n                        return loginFailure(response, _clientId);\r\n                    });\r\n            };\r\n\r\n            var postTokenLogin = function (clientURL, _clientId, token) {\r\n                var restangular = AprimaRestangular.get('patient');\r\n\r\n                return restangular.one('token-login').customPOST({}, '', { token: token }, {})\r\n                    .then(function (userLoginInfo) {\r\n                        return loginSuccess(userLoginInfo, clientURL);\r\n                    }, function (response) {\r\n                        return loginFailure(response, _clientId);\r\n                    });\r\n            };\r\n\r\n            return {\r\n                postLogin: postLogin,\r\n                postTokenLogin: postTokenLogin,\r\n                postStatementsLogin: postStatementsLogin,\r\n            };\r\n        }]);\r\n","angular.module('app').factory('MimeTypeRepository',\r\n    ['AprimaRestangular', function (AprimaRestangular) {\r\n        'use strict';\r\n\r\n        function getMimeTypeFromFileExtension(requestedMimeTypes) {\r\n            var types = JSON.stringify(requestedMimeTypes);\r\n\r\n            var params = {\r\n                FileExtensions : types\r\n            };\r\n\r\n            var restangular = AprimaRestangular.get('patient');\r\n\r\n            return restangular.one('patients/').customGET('mimetype/from-file-extension', params);\r\n        }\r\n\r\n        return {\r\n            getMimeTypeFromFileExtension: getMimeTypeFromFileExtension\r\n        };\r\n\r\n    }]);","angular.module('app').factory('PatientPortalStorageRepository',\r\n    ['storage', '$timeout', 'LocalStorageRepository',\r\n        function (storage, $timeout, LocalStorageRepository) {\r\n            'use strict';\r\n\r\n            function removeActivePatient() {\r\n                storage.remove('activePatient');\r\n            }\r\n\r\n            function getActivePatient() {\r\n                var activePatient = storage.get('activePatient');\r\n                return {\r\n                    id: activePatient && activePatient.id,\r\n                    firstName: activePatient && activePatient.firstName,\r\n                    lastName: activePatient && activePatient.lastName,\r\n                    fullName: activePatient && activePatient.fullName,\r\n                    isPatient: activePatient && activePatient.isPatient\r\n                };\r\n            }\r\n\r\n            function setActivePatient(id, firstName, lastName, isPatient) {\r\n                var activePatient = {\r\n                    id: id,\r\n                    fullName: firstName + ' ' + lastName,\r\n                    firstName: firstName,\r\n                    lastName: lastName,\r\n                    isPatient: isPatient\r\n                };\r\n\r\n                storage.set('activePatient', activePatient);\r\n            }\r\n\r\n            function getResponsibleParties() {\r\n                return storage.get('responsibleParties');\r\n            }\r\n\r\n            function setResponsibleParties(value) {\r\n//                Array of AccountResponsiblePartyDto\r\n//                [\r\n//                    {\"Id\": \"2ab0d13c-2bbe-46f5-990d-533067be2eb3\",\r\n//                        \"Relationship\": {\r\n//                            \"Id\": \"7b4c63c7-fe13-48ef-81e5-3afc963f3fee\",\r\n//                            \"Name\": \"Self\",\r\n//                            \"ExternalId\": \"18\",\r\n//                            \"AnsiCode\": \"18\"},\r\n//                        \"FirstName\": \"George\",\r\n//                        \"LastName\": \"Cassidy\",\r\n//                        \"FullName\": \"George Cassidy\"}\r\n//                ]\r\n                storage.set('responsibleParties', value);\r\n            }\r\n\r\n            function getActiveResponsibleParty() {\r\n                // _.find(responsibleParties, { IsPatient: true, IsActivePerson: true, IsActivePersonWeb: true });\r\n                var responsibleParties = storage.get('responsibleParties');\r\n                var activeResponsibleParty = _.find(responsibleParties, { IsPatient: true, IsActivePerson: true });\r\n                return activeResponsibleParty;\r\n            }\r\n\r\n            function getActiveResponsibleParties() {\r\n                var responsibleParties = storage.get('responsibleParties');\r\n                var activeResponsibleParties = _.filter(responsibleParties, { IsPatient: true, IsActivePerson: true });\r\n                return activeResponsibleParties;\r\n            }\r\n\r\n\r\n            function removeResponsibleParties() {\r\n                storage.remove('responsibleParties');\r\n            }\r\n\r\n            function removeFeatureList(){\r\n                storage.remove('featureList');\r\n            }\r\n\r\n            function getLoginUser() {\r\n                return {\r\n                    name: LocalStorageRepository.getUserName(),\r\n                    fullName: LocalStorageRepository.getUserFullName(),\r\n                    id: LocalStorageRepository.getUserID(),\r\n                    token: LocalStorageRepository.getJsonWebToken(),\r\n                    clientId: LocalStorageRepository.getClientID(),\r\n                    clientURL: LocalStorageRepository.getClientURL(),\r\n                    deviceId: LocalStorageRepository.getDeviceId(),\r\n                    permissions: LocalStorageRepository.getUserPermissions(),\r\n                    isPatient: LocalStorageRepository.getIsPatient()\r\n                };\r\n            }\r\n\r\n            function getIsAccountResponsiblePartyForPatient() {\r\n                return storage.get('isAccountResponsiblePartyForPatient');\r\n            }\r\n\r\n            function setIsAccountResponsiblePartyForPatient(value) {\r\n                storage.set('isAccountResponsiblePartyForPatient', value);\r\n            }\r\n\r\n            return {\r\n                getActivePatient: getActivePatient,\r\n                setActivePatient: setActivePatient,\r\n                removeActivePatient: removeActivePatient,\r\n                getResponsibleParties: getResponsibleParties,\r\n                setResponsibleParties: setResponsibleParties,\r\n                removeResponsibleParties: removeResponsibleParties,\r\n                getLoginUser: getLoginUser,\r\n                getActiveResponsibleParty: getActiveResponsibleParty,\r\n                getActiveResponsibleParties: getActiveResponsibleParties,\r\n                removeFeatureList : removeFeatureList,\r\n                getIsAccountResponsiblePartyForPatient: getIsAccountResponsiblePartyForPatient,\r\n                setIsAccountResponsiblePartyForPatient: setIsAccountResponsiblePartyForPatient\r\n            };\r\n        }\r\n    ]);\r\n","angular.module('app').factory('SessionService',\r\n    ['$rootScope',\r\n        function($rootScope) {\r\n            'use strict';\r\n\r\n            var sessionParams = {\r\n                PatientAuthenticated: sessionStorage.getItem('PatientAuthenticated') || false, \r\n                PracticeConsentAccepted: false,\r\n                DisplayDashboardToolbar: false,\r\n                ShowHeaderNavigationMenu: false,\r\n                NewPasswordRequired: false,\r\n                ShowMobileNav: false\r\n            };\r\n\r\n            function setNewPasswordRequired (value){\r\n                sessionParams.NewPasswordRequired = value;\r\n            }\r\n\r\n            function getNewPasswordRequired() {\r\n                return sessionParams.NewPasswordRequired;\r\n            }\r\n            var setPatientAuthenticated = function (value) {\r\n                sessionParams.PatientAuthenticated = value;\r\n                sessionStorage.setItem('PatientAuthenticated',value);\r\n                $rootScope.$broadcast('PatientAuthenticated:updated', sessionParams.PatientAuthenticated);\r\n            };\r\n            var getPatientAuthenticated = function() {\r\n                return sessionParams.PatientAuthenticated;\r\n            };\r\n\r\n            var setPracticeConsentAccepted = function (value) {\r\n                sessionParams.PracticeConsentAccepted = value;\r\n            };\r\n            var getPracticeConsentAccepted = function() {\r\n                return sessionParams.PracticeConsentAccepted;\r\n            };\r\n\r\n            var setDisplayDashboardToolbar = function (value) {\r\n                sessionParams.DisplayDashboardToolbar = value;\r\n            };\r\n            var getDisplayDashboardToolbar = function () {\r\n                return sessionParams.DisplayDashboardToolbar;\r\n            };\r\n\r\n            var setShowHeaderNavigationMenu = function (value) {\r\n                sessionParams.ShowHeaderNavigationMenu = value;\r\n                $rootScope.$broadcast('ShowHeaderNavigationMenu:updated', sessionParams.ShowHeaderNavigationMenu);\r\n            };\r\n            var getShowHeaderNavigationMenu = function () {\r\n                return sessionParams.ShowHeaderNavigationMenu;\r\n            };\r\n            var setShowMobileNav = function (value){\r\n              sessionParams.ShowMobileNav = value;\r\n              $rootScope.$broadcast('ShowMobileNav:updated', sessionParams.ShowMobileNav);\r\n            };\r\n            var getShowMobileNav = function (){\r\n              return sessionParams.ShowMobileNav;\r\n            };\r\n\r\n            var resetSessionParams = function () {\r\n                setPatientAuthenticated(false);\r\n                setPracticeConsentAccepted(false);\r\n                setDisplayDashboardToolbar(false);\r\n                setShowHeaderNavigationMenu(false);\r\n            };\r\n\r\n\r\n            return {\r\n                resetSessionParams: resetSessionParams,\r\n                setPatientAuthenticated: setPatientAuthenticated,\r\n                getPatientAuthenticated: getPatientAuthenticated,\r\n                setPracticeConsentAccepted: setPracticeConsentAccepted,\r\n                getPracticeConsentAccepted: getPracticeConsentAccepted,\r\n                setDisplayDashboardToolbar: setDisplayDashboardToolbar,\r\n                getDisplayDashboardToolbar: getDisplayDashboardToolbar,\r\n                setShowHeaderNavigationMenu: setShowHeaderNavigationMenu,\r\n                getShowHeaderNavigationMenu: getShowHeaderNavigationMenu,\r\n                getNewPasswordRequired: getNewPasswordRequired,\r\n                setNewPasswordRequired: setNewPasswordRequired,\r\n                setShowMobileNav: setShowMobileNav,\r\n                getShowMobileNav: getShowMobileNav\r\n            };\r\n        }\r\n    ]);","angular.module('account', [\r\n    'app',\r\n    'mychart',\r\n\r\n    //third party\r\n    'angularLocalStorage',\r\n    'gettext',\r\n    'lodash',\r\n    'ngAnimate',\r\n    'ngTouch',\r\n    'restangular',\r\n    'toaster',\r\n    'ui.bootstrap',\r\n    'ui.router',\r\n\r\n\r\n    //aprima\r\n    'apEasyScroller',\r\n\r\n    'aprima-core',\r\n    'aprima-bridge',\r\n    'aprima-config',\r\n    'aprima-legacy-common',\r\n    'aprima-provider-api',\r\n    'aprima-patient-api',\r\n    'aprima-utils'\r\n]);\r\n\r\n","angular.module('account').config(['AppRoutesProvider', '$stateProvider',\r\n    function (AppRoutesProvider, $stateProvider) {\r\n        'use strict';\r\n\r\n        var appRoutes = {\r\n            'createaccountlayout': {\r\n                state: 'createaccountlayout',\r\n                route: '/createaccountlayout',\r\n                portalSettings: {\r\n                    hideHeader: false,\r\n                    hideToolbar: true\r\n                }\r\n            },\r\n            'emailoptoutlayout': {\r\n                state: 'emailoptoutlayout',\r\n                route: '/emailoptoutlayout',\r\n                portalSettings: {\r\n                    hideHeader: false,\r\n                    hideToolbar: true\r\n                }\r\n            },\r\n            'changepassword': {\r\n                state: 'createaccountlayout.changepassword',\r\n                route: '/changepassword/',\r\n                portalSettings: {\r\n                    hideHeader: false,\r\n                    hideToolbar: true\r\n                }\r\n            },\r\n            'emailoptout': {\r\n                state: 'emailoptoutlayout.emailoptout',\r\n                route: '/emailoptout/:accessCode',\r\n                portalSettings: {\r\n                    hideHeader: false,\r\n                    hideToolbar: true\r\n                }\r\n            },\r\n            'forgotpassword': {\r\n                state: 'createaccountlayout.forgotpassword',\r\n                route: '/forgotpassword/',\r\n                portalSettings: {\r\n                    hideHeader: false,\r\n                    hideToolbar: true\r\n                }\r\n            },\r\n            'accountActivationRequest': {\r\n                state: 'createaccountlayout.accountActivationRequest',\r\n                route: '/accountActivationRequest',\r\n                portalSettings: {\r\n                    hideHeader: false,\r\n                    hideToolbar: true\r\n                }\r\n            },\r\n            'accountActivation': {\r\n                state: 'createaccountlayout.accountActivation',\r\n                route: '/accountActivation/:webRegistrationId',\r\n                portalSettings: {\r\n                    hideHeader: false,\r\n                    hideToolbar: true\r\n                }\r\n            },\r\n            'accountvalidation': {\r\n                state: 'createaccountlayout.accountvalidation',\r\n                route: '/accountvalidation',\r\n                portalSettings: {\r\n                    hideHeader: false,\r\n                    hideToolbar: true\r\n                }\r\n            },\r\n            'accountsetup': {\r\n                state: 'createaccountlayout.accountsetup',\r\n                route: '/accountsetup',\r\n                portalSettings: {\r\n                    hideHeader: false,\r\n                    hideToolbar: true\r\n                }\r\n            },\r\n            'aprimaconditions': {\r\n                state: 'createaccountlayout.aprimaconditions',\r\n                route: '/aprimaconditions',\r\n                portalSettings: {\r\n                    hideHeader: false,\r\n                    hideToolbar: true\r\n                }\r\n            },\r\n            'loginconsent': {\r\n                state: 'createaccountlayout.loginconsent',\r\n                route: '/loginconsent',\r\n                portalSettings: {\r\n                    hideToolbar: true,\r\n                    toolbarItem: 'consent'\r\n                }\r\n            },\r\n            'accountdetails': {\r\n                state:'accountdetails',\r\n                route: '/accountdetails',\r\n                portalSettings: {\r\n                    hideToolbar: false,\r\n                    hideHeader: false,\r\n                    toolbarItem: 'blank'\r\n                }\r\n            }\r\n        };\r\n\r\n        AppRoutesProvider.setupAppRoutes(appRoutes);\r\n\r\n        $stateProvider\r\n            .state(appRoutes.createaccountlayout.state, {\r\n                url: appRoutes.createaccountlayout.route,\r\n                templateUrl: '/account/views/createaccountlayout.html',\r\n                controller: 'CreateAccountCtrl',\r\n                description: '/CreateAccount',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Complete your account'); }\r\n                }\r\n            })\r\n            .state(appRoutes.emailoptoutlayout.state, { // email opt out layout\r\n                url: appRoutes.emailoptoutlayout.route,\r\n                templateUrl: '/account/views/emailoptoutlayout.html',\r\n                controller: 'EmailOptOutLayoutCtrl',\r\n                description: '/EmailOptOutLayout',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Email Opt Out'); }\r\n                }\r\n            })\r\n            .state(appRoutes.changepassword.state, {\r\n                url: appRoutes.changepassword.route,\r\n                templateUrl: '/account/views/changepassword.html',\r\n                controller: 'ChangePasswordCtrl',\r\n                description: '/ChangePassword'\r\n            })\r\n            .state(appRoutes.emailoptout.state, { // emailoptout\r\n                url: appRoutes.emailoptout.route,\r\n                templateUrl: '/account/views/emailoptout.html',\r\n                controller: 'EmailOptOutCtrl',\r\n                description: '/EmailOptOut'\r\n            })\r\n            .state(appRoutes.forgotpassword.state, {\r\n                url: appRoutes.forgotpassword.route,\r\n                templateUrl: '/account/views/forgotpassword.html',\r\n                controller: 'ForgotPasswordCtrl',\r\n                description: '/ChangePassword',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Forgot Password'); }\r\n                }\r\n            })\r\n            .state(appRoutes.accountActivationRequest.state, {\r\n                url: appRoutes.accountActivationRequest.route,\r\n                templateUrl: '/account/views/accountActivationRequest.html',\r\n                controller: 'AccountActivationRequestCtrl',\r\n                description: '/AccountActivationRequest'\r\n            })\r\n            .state(appRoutes.accountActivation.state, {\r\n                url: appRoutes.accountActivation.route,\r\n                templateUrl: '/account/views/accountActivation.html',\r\n                controller: 'AccountActivationCtrl',\r\n                description: '/AccountActivation'\r\n            })\r\n            .state(appRoutes.accountvalidation.state, {\r\n                url: appRoutes.accountvalidation.route,\r\n                templateUrl: '/account/views/accountvalidation.html',\r\n                controller: 'AccountValidationCtrl',\r\n                description: '/AccountValidation'\r\n            })\r\n            .state(appRoutes.accountsetup.state, {\r\n                url: appRoutes.accountsetup.route,\r\n                templateUrl: '/account/views/accountsetup.html',\r\n                controller: 'AccountSetupCtrl',\r\n                description: '/AccountSetup'\r\n            })\r\n            .state(appRoutes.aprimaconditions.state, {\r\n            url: appRoutes.aprimaconditions.route,\r\n                templateUrl: '/account/views/aprimaconditions.html',\r\n                controller: 'AprimaConditionsCtrl',\r\n                description: '/AprimaConditions'\r\n            })\r\n            .state(appRoutes.loginconsent.state, {\r\n                url: appRoutes.loginconsent.route,\r\n                templateUrl: '/account/views/loginconsent.html',\r\n                description: '/LoginConsent',\r\n                controller: 'LoginConsentCtrl',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Aprima Consent'); }\r\n                }\r\n            })\r\n            .state(appRoutes.accountdetails.state, {\r\n                url: appRoutes.accountdetails.route,\r\n                templateUrl: '/account/views/accountdetails.html',\r\n                description: '/AccountDetails',\r\n                controller: 'AccountDetailsCtrl',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Account Details'); }\r\n                }\r\n            });\r\n    }]);","angular.module('account').run(['$templateCache', function($templateCache) {\n  'use strict';\r\n\r\n  $templateCache.put('/account/views/accountActivation.html',\r\n    \"<form name=\\\"accountActivationForm\\\" ng-submit=\\\"activateAccount()\\\" novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"!loading\\\" class=\\\"panel-body panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Account Information' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12 col-md-6 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <label class=\\\"control-label\\\">{{::'Username' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ap-spinner ng-show=\\\"userNameLoading\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                               name=\\\"UserName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                               ng-model=\\\"accountActivationDto.UserName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                               ng-change=\\\"activateAccountUserNameValidation()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                               type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                               placeholder=\\\"User Name\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                               ap-metadata\\r\" +\r\n    \"\\n\" +\r\n    \"                                >\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-show=\\\"accountActivationForm.UserName.$invalid && model.UserNameInUse\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                          class=\\\"help-block ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'User Name is not available.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-show=\\\"accountActivationForm.UserName.$invalid && accountActivationForm.$submitted && !model.UserNameInUse\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                          class=\\\"help-block ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'User Name must be at least 5 characters.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12 col-md-6 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     >\\r\" +\r\n    \"\\n\" +\r\n    \"                    <label class=\\\"control-label\\\">{{::'Password' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           name=\\\"Password\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ng-model=\\\"accountActivationDto.Password\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           type=\\\"password\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           placeholder=\\\"New Password\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ap-metadata\\r\" +\r\n    \"\\n\" +\r\n    \"                            >\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-show=\\\"accountActivationForm.Password.$invalid && accountActivationForm.$submitted\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                          class=\\\"help-block ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Password must be at least 5 characters.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12 col-md-6 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-class=\\\"{ 'has-error' : accountActivationForm.confirmPassword.$invalid && accountActivationForm.$submitted}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <label class=\\\"control-label\\\">{{::'Retype Password' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           name=\\\"confirmPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ng-model=\\\"confirmNewPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           type=\\\"password\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           placeholder=\\\"Retype Password\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ng-pattern=\\\"accountActivationDto.Password\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ap-required=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            >\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-show=\\\"accountActivationForm.confirmPassword.$invalid && accountActivationForm.$submitted\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                          class=\\\"help-block ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Passwords do not match.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6 col-md-3 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <button type=\\\"button\\\" class=\\\"btn btn-default2 btn-lg\\\" ng-click=\\\"back()\\\">{{'Back' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6 col-md-3 col-flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <button type=\\\"submit\\\" class=\\\"btn btn-default1 btn-lg pull-right\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-disabled=\\\"submitLoading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ap-spinner ng-show=\\\"submitLoading\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{'Submit' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center\\\" ng-if=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</form>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/account/views/accountActivationRequest.html',\r\n    \"<form name=\\\"accountRequestValidationForm\\\" ng-submit=\\\"activateAccountRequest()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"!loading && !httpError\\\" class=\\\"panel-body panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Personal Information' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12 col-md-6 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <label class=\\\"control-label\\\">{{::'Email Address' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           name=\\\"EmailAddress\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ng-model=\\\"accountActivationDto.EmailAddress\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           placeholder=\\\"\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ap-metadata\\r\" +\r\n    \"\\n\" +\r\n    \"                            >\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12 col-md-6 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <label class=\\\"control-label\\\">{{::'Birthdate' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ap-form-answer-date question=\\\"question\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                         answer=\\\"accountActivationDto.Birthdate\\\"></ap-form-answer-date>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6 col-md-3 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <button type=\\\"button\\\" class=\\\"btn btn-default2 btn-lg\\\" ng-click=\\\"back()\\\">{{'Back' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6 col-md-3 col-flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <button type=\\\"submit\\\" class=\\\"btn btn-default1 btn-lg pull-right\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-disabled=\\\"submitLoading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ap-spinner ng-show=\\\"submitLoading\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{'Submit' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center\\\" ng-if=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-if=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'An error has occurred and the page could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-if=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'You do not have access to this info.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</form>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/account/views/accountdetails.html',\r\n    \"<div id=\\\"account-details\\\" class=\\\"container-fluid container-flush\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-demo non-mychart chart-label\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"account-details-tile\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"dashboard-photo\\\" ng-if=\\\"patient.isPatient\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <img class=\\\"rounded-corner-lg border-width-lg extra-dark-grey-border\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     lazy-src=\\\"{{::patient.loginUserId | apPatientPortalThumbnailSrc:150:150}}\\\" endpoint-base='patient' alt=\\\"patient-image\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"dashboard-patient\\\" ng-if=\\\"patient.isPatient\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Patient'|translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"dashboard-patient\\\" ng-if=\\\"!patient.isPatient\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Responsible Party'|translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"dashboard-name\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <span class=\\\"dashboard-name\\\">{{::patient.name}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"dashboard-date\\\" ng-if=\\\"patient.birthDate\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <ap-date-formatter date=\\\"{{::patient.birthDate}}\\\" format=\\\"long-date\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-9\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"panel-heading panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"panel-title\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{:: 'Account Details' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"panel-body panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-6 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <form name=\\\"loginCredentialsForm\\\" ng-submit=\\\"saveCredentials(loginCredentialsForm)\\\" novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"row panel-subheading flexbox flexbox-horizontal-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <span class=\\\"title\\\">{{::'Login Credentials' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <span class=\\\"flexbox-pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <button id=\\\"save-credentials-btn\\\" class=\\\"btn btn-default2\\\" ng-if=\\\"isEditingCredentials\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        type=\\\"submit\\\" ng-disabled=\\\"isSavingCredentials\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{::'Save' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <span ng-if=\\\"isSavingCredentials\\\"><ap-spinner></ap-spinner></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <button id=\\\"edit-credentials-btn\\\" class=\\\"btn btn-default2\\\" ng-show=\\\"(!isEditingCredentials && !isEditingQuestionAnswers)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        type=\\\"button\\\" ng-click=\\\"editCredentials()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{::'Edit' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <button id=\\\"cancel-credentials-btn\\\" class=\\\"btn btn-default2\\\" ng-if=\\\"isEditingCredentials\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        type=\\\"button\\\" ng-click=\\\"cancelCredentials(loginCredentialsForm)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{::'Cancel' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <label class=\\\"control-label\\\">{{::'UserName' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{securityAccountCredentialsDto.UserName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div ng-if=\\\"!isEditingCredentials\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <label class=\\\"control-label\\\">{{::'Password' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <span ng-if=\\\"!securityAccountCredentialsDto.NewPassword\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{::'********'}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <span ng-if=\\\"securityAccountCredentialsDto.NewPassword\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{securityAccountCredentialsDto.NewPassword}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div class=\\\"form-group\\\" ng-if=\\\"isEditingCredentials\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                 ng-class=\\\"{ 'has-error' : (loginCredentialsForm.oldpassword.$invalid && loginCredentialsForm.$submitted)}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <label class=\\\"control-label\\\">{{::'Old Password' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       id=\\\"oldpassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       name=\\\"oldpassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       ng-model=\\\"securityAccountCredentialsDto.OldPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       type=\\\"password\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       placeholder=\\\"Old Password goes here\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       ap-metadata>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div class=\\\"form-group\\\" ng-if=\\\"isEditingCredentials\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                 ng-class=\\\"{ 'has-error' : (loginCredentialsForm.newpassword.$invalid && loginCredentialsForm.$submitted)}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <label class=\\\"control-label\\\">{{::'New Password' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       id=\\\"newpassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       name=\\\"newpassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       ng-model=\\\"securityAccountCredentialsDto.NewPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       type=\\\"password\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       placeholder=\\\"New Password goes here\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       ap-metadata\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        >\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <span ng-show=\\\"loginCredentialsForm.newpassword.$invalid && loginCredentialsForm.$submitted\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                      class=\\\"help-block ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        {{::'Password must be at least 5 characters.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div ng-if=\\\"validationMessage && isEditingCredentials\\\" class=\\\"text-danger\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                {{ validationMessage }}\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </form>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-6 col-flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <form name=\\\"securityQuestionAnswersForm\\\" novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"row panel-subheading flexbox flexbox-horizontal-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <span class=\\\"title\\\">{{::'Security Questions' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <span class=\\\"flexbox-pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <button id=\\\"save-question-answers-btn\\\" class=\\\"btn btn-default2\\\" ng-if=\\\"isEditingQuestionAnswers\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        type=\\\"submit\\\" ng-click=\\\"saveQuestionAnswers(securityQuestionAnswersForm)\\\" ng-disabled=\\\"isSavingQuestionAnswers\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{::'Save' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <span ng-if=\\\"isSavingQuestionAnswers\\\"><ap-spinner></ap-spinner></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <button id=\\\"edit-question-answers-btn\\\" class=\\\"btn btn-default2\\\" ng-show=\\\"(!isEditingQuestionAnswers && !isEditingCredentials)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        type=\\\"button\\\" ng-click=\\\"editQuestionAnswers()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{::'Edit' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <button id=\\\"cancel-question-answers-btn\\\" class=\\\"btn btn-default2\\\" ng-if=\\\"isEditingQuestionAnswers\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        type=\\\"button\\\" ng-click=\\\"cancelQuestionAnswers(securityQuestionAnswersForm)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{::'Cancel' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"row\\\" ng-repeat=\\\"patientSecurityQuestion in securityAccountQuestionsAnswersDto.Questions\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <!-- Question -->\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div ng-if=\\\"!isEditingQuestionAnswers\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <label class=\\\"control-label\\\">{{::'Security Question ' | translate}} {{ $index + 1 }}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{patientSecurityQuestion.Text}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div class=\\\"form-group\\\" ng-if=\\\"isEditingQuestionAnswers\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <label class=\\\"control-label\\\">{{::'Security Question ' | translate}} {{ $index + 1 }}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <select class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            name=\\\"question_{{$index}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            id=\\\"question_{{$index}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            ng-model=\\\"patientSecurityQuestion.Id\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            ng-options=\\\"securityQuestion.Id as securityQuestion.Text for securityQuestion in securityQuestions\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            ng-change=\\\"selectedQuestionChanged(patientSecurityQuestion)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            ap-metadata=\\\"metadata.Fields.Questions.Fields.Id\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </select>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <!-- Answer -->\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div ng-if=\\\"!isEditingQuestionAnswers\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <label class=\\\"control-label\\\">{{::'Answer' | translate}} {{ $index + 1 }}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <span ng-if=\\\"!patientSecurityQuestion.Answer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{::'****************'}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <span ng-if=\\\"patientSecurityQuestion.Answer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{patientSecurityQuestion.Answer}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div class=\\\"form-group\\\" ng-if=\\\"isEditingQuestionAnswers\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                 ng-class=\\\"{ 'has-error' : (securityQuestionAnswersForm['answer_' + $index].$invalid\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    && securityQuestionAnswersForm['answer_' + $index].$dirty)}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <label class=\\\"control-label\\\">{{::'Answer' | translate}} {{ $index + 1 }}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       id=\\\"answer_{{$index}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       name=\\\"answer_{{$index}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       ng-model=\\\"patientSecurityQuestion.Answer\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       placeholder=\\\"Answer goes here\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       ap-metadata=\\\"metadata.Fields.Questions.Fields.Answer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <span ng-show=\\\"securityQuestionAnswersForm['answer_' + $index].$invalid && securityQuestionAnswersForm.$submitted\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                      class=\\\"help-block ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        {{::'Answer must be at least 4 characters.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div ng-if=\\\"validationMessage && isEditingQuestionAnswers\\\" class=\\\"text-danger\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{ validationMessage }}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </form>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'An error has occurred and Account Details could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'You do not have access to Account Details.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/account/views/accountsetup.html',\r\n    \"<div ng-if=\\\"!loading && !httpError\\\" class=\\\"panel-body panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"<form name=\\\"editPatientDetailsForm\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    {{::'Insurance Details' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"<div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <span>{{::'Upload a photo of your primary insurance card' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-select-image\\r\" +\r\n    \"\\n\" +\r\n    \"                max-size-kb=\\\"primaryInsuranceImageModel.maxSizeKb\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                selected-file-name=\\\"primaryInsuranceImageModel.selectedFileName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                selected-mime-type=\\\"primaryInsuranceImageModel.selectedMimeType\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                selected-file-contents=\\\"primaryInsuranceImageModel.selectedFileContents\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            </ap-select-image>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"        ---------------------- {{::'OR'|translate}} ---------------------\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <label class=\\\"control-label\\\">{{::'Insurance Provider' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                <select\\r\" +\r\n    \"\\n\" +\r\n    \"                        class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        name=\\\"insuranceProvider1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-model=\\\"createAccountDto.PrimaryInsurance.InsuranceCarrier\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-change=\\\"updatePrimaryInsuranceList()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-options=\\\"insuranceCarrier as insuranceCarrier.Name for insuranceCarrier in insuranceCarriers\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        >\\r\" +\r\n    \"\\n\" +\r\n    \"                </select>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <label class=\\\"control-label \\\">{{::'Insurance Plan' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                <select\\r\" +\r\n    \"\\n\" +\r\n    \"                        class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        name=\\\"insurancePlan1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-model=\\\"createAccountDto.PrimaryInsurance.InsurancePlan\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-options=\\\"insurancePlan as insurancePlan.Name for insurancePlan in primaryInsurancePlansModified\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        >\\r\" +\r\n    \"\\n\" +\r\n    \"                </select>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <label class=\\\"control-label\\\">{{::'Primary Account Holder First Name' |\\r\" +\r\n    \"\\n\" +\r\n    \"                translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       id=\\\"accountFirstName1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       name=\\\"accountFirstName1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       ng-model=\\\"createAccountDto.PrimaryInsurance.AccountFirstName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       placeholder=\\\"\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        >\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <label class=\\\"control-label\\\">{{::'Primary Account Holder Last Name' |\\r\" +\r\n    \"\\n\" +\r\n    \"                translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       id=\\\"accountLastName1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       name=\\\"accountLastName1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       ng-model=\\\"createAccountDto.PrimaryInsurance.AccountLastName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       placeholder=\\\"\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        >\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <label class=\\\"control-label\\\">{{::'Policy No.' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       id=\\\"policyNumber1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       name=\\\"policyNumber1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       ng-model=\\\"createAccountDto.PrimaryInsurance.PolicyNumber\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       placeholder=\\\"\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        >\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <label class=\\\"control-label\\\">{{::'Group No.' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       id=\\\"groupNumber1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       name=\\\"groupNumber1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       ng-model=\\\"createAccountDto.PrimaryInsurance.GroupNumber\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       placeholder=\\\"\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        >\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"<div ng-show=\\\"viewSecondaryInsurance\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <span>{{'Upload a photo of your secondary insurance card' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            <!--  <input name=\\\"file\\\" type=\\\"file\\\" style=\\\"cursor:hand;\\\"/></div>  -->\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"<!--\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-select-image\\r\" +\r\n    \"\\n\" +\r\n    \"                    max-size-kb=\\\"secondaryInsuranceImageModel.maxSizeKb\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    selected-file-name=\\\"secondaryInsuranceImageModel.selectedFileName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    selected-mime-type=\\\"secondaryInsuranceImageModel.selectedMimeType\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    selected-file-contents=\\\"secondaryInsuranceImageModel.selectedFileContents\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            </ap-select-image>\\r\" +\r\n    \"\\n\" +\r\n    \"-->\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"        ---------------------- {{::'OR'|translate}} ---------------------\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <label class=\\\"control-label\\\">{{::'Insurance Provider' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                <select\\r\" +\r\n    \"\\n\" +\r\n    \"                        class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        name=\\\"insuranceProvider2\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-model=\\\"createAccountDto.SecondaryInsurance.InsuranceCarrier\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-change=\\\"updateSecondaryInsuranceList()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-options=\\\"insuranceCarrier as insuranceCarrier.Name for insuranceCarrier in insuranceCarriers\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        >\\r\" +\r\n    \"\\n\" +\r\n    \"                </select>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <label class=\\\"control-label\\\">{{::'Insurance Plan' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                <select\\r\" +\r\n    \"\\n\" +\r\n    \"                        class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        name=\\\"insurancePlan2\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-model=\\\"createAccountDto.SecondaryInsurance.InsurancePlan\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-options=\\\"insurancePlan as insurancePlan.Name for insurancePlan in secondaryInsurancePlansModified\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        >\\r\" +\r\n    \"\\n\" +\r\n    \"                </select>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <label class=\\\"control-label\\\">{{::'Primary Account Holder First Name' |\\r\" +\r\n    \"\\n\" +\r\n    \"                translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       id=\\\"accountFirstName2\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       name=\\\"accountFirstName2\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       ng-model=\\\"createAccountDto.SecondaryInsurance.AccountFirstName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       placeholder=\\\"\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        >\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <label class=\\\"control-label\\\">{{::'Primary Account Holder Last Name' |\\r\" +\r\n    \"\\n\" +\r\n    \"                translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       id=\\\"accountLastName2\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       name=\\\"accountLastName2\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       ng-model=\\\"createAccountDto.SecondaryInsurance.AccountLastName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       placeholder=\\\"\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        >\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <label class=\\\"control-label\\\">{{::'Policy No.' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       id=\\\"policyNumber2\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       name=\\\"policyNumber2\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       ng-model=\\\"createAccountDto.SecondaryInsurance.PolicyNumber\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       placeholder=\\\"\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        >\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <label class=\\\"control-label\\\">{{::'Group No.' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       id=\\\"groupNumber2\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       name=\\\"groupNumber2\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       ng-model=\\\"createAccountDto.SecondaryInsurance.GroupNumber\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       placeholder=\\\"\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        >\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"<button class=\\\"btn btn-default1\\\" ng-click=\\\"toggleViewSecondaryInsurance()\\\"><span ng-if=\\\"!viewSecondaryInsurance\\\">Add Secondary Insurance</span>\\r\" +\r\n    \"\\n\" +\r\n    \"    <span ng-if=\\\"viewSecondaryInsurance\\\">Remove Secondary Insurance</span></button>\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    {{::'Security Information' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"<div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <label class=\\\"control-label\\\">{{::'Security Question 1' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"        <select\\r\" +\r\n    \"\\n\" +\r\n    \"                class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                name=\\\"question1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                ng-model=\\\"step2createAccountDto.SecurityQuestion[1].Question\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                ng-options=\\\"securityQuestion as securityQuestion.Text for securityQuestion in securityQuestions\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                >\\r\" +\r\n    \"\\n\" +\r\n    \"        </select>\\r\" +\r\n    \"\\n\" +\r\n    \"    <label class=\\\"control-label\\\">{{::'Answer' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               id=\\\"answer1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               name=\\\"answer1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-model=\\\"createAccountDto.SecurityQuestions[1].Answer\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               placeholder=\\\"Type your answer and make sure it is something you can remember\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                >\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"<div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <label class=\\\"control-label\\\">{{::'Security Question 2' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"        <select\\r\" +\r\n    \"\\n\" +\r\n    \"                class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                name=\\\"question2\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                ng-model=\\\"step2createAccountDto.SecurityQuestion[2].Question\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                ng-options=\\\"securityQuestion as securityQuestion.Text for securityQuestion in securityQuestions\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                >\\r\" +\r\n    \"\\n\" +\r\n    \"        </select>\\r\" +\r\n    \"\\n\" +\r\n    \"    <label class=\\\"control-label\\\">{{::'Answer' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               id=\\\"answer2\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               name=\\\"answer2\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-model=\\\"createAccountDto.SecurityQuestions[2].Answer\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               placeholder=\\\"Type your answer and make sure it is something you can remember\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                >\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"<div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <label class=\\\"control-label\\\">{{::'Security Question 3' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"        <select\\r\" +\r\n    \"\\n\" +\r\n    \"                class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                name=\\\"question3\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                ng-model=\\\"step2createAccountDto.SecurityQuestion[3].Question\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                ng-options=\\\"securityQuestion as securityQuestion.Text for securityQuestion in securityQuestions\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                >\\r\" +\r\n    \"\\n\" +\r\n    \"        </select>\\r\" +\r\n    \"\\n\" +\r\n    \"    <label class=\\\"control-label\\\">{{::'Answer' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               id=\\\"answer3\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               name=\\\"answer3\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-model=\\\"createAccountDto.SecurityQuestions[3].Answer\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               placeholder=\\\"Type your answer and make sure it is something you can remember\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                >\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"</form>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"<div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"text-center\\\" ng-if=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <uib-alert type=\\\"danger\\\" ng-if=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"        {{::'An error has occurred and the page could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <uib-alert type=\\\"danger\\\" ng-if=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"        {{::'You do not have access to this info.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"panel-footer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <span>\\r\" +\r\n    \"\\n\" +\r\n    \"        <button class=\\\"btn btn-default2\\\" ng-click=\\\"back()\\\">{{::'Back' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"        <button class=\\\"btn btn-default2\\\" ng-click=\\\"skip()\\\">{{::'Skip' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"        <button class=\\\"btn btn-default1\\\" ng-click=\\\"next()\\\">{{::'Next' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/account/views/accountvalidation.html',\r\n    \"<div ng-if=\\\"!loading && !httpError\\\" class=\\\"panel-body panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        {{::'Personal Information' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <form name=\\\"accountValidationForm\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <label class=\\\"control-label\\\">{{::'Driver\\\\'s License Number' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           id=\\\"driversLicenseNumber\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           name=\\\"driversLicenseNumber\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ng-model=\\\"accountValidationDto.DriversLicenseNumber\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           placeholder=\\\"\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ap-required\\r\" +\r\n    \"\\n\" +\r\n    \"                            >\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <label class=\\\"control-label\\\">{{::'Driver\\\\'s License Issue State' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <select\\r\" +\r\n    \"\\n\" +\r\n    \"                            class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            name=\\\"driversLicenseState\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            ng-model=\\\"accountValidationDto.DriversLicenseState\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            ng-options=\\\"driversLicenseState as driversLicenseState.Description for driversLicenseState in driversLicenseStates\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            ap-required\\r\" +\r\n    \"\\n\" +\r\n    \"                            >\\r\" +\r\n    \"\\n\" +\r\n    \"                    </select>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </form>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"<div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"text-center\\\" ng-if=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <uib-alert type=\\\"danger\\\" ng-if=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"        {{::'An error has occurred and the page could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <uib-alert type=\\\"danger\\\" ng-if=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"        {{::'You do not have access to this info.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"panel-footer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-4 col-sm-3 col-md-2 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button class=\\\"btn btn-default2\\\" ng-click=\\\"back()\\\">{{'Back' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-4 col-sm-3 col-md-2 col-flush col-xs-offset-1 col-md-offset-0\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button class=\\\"btn btn-default1\\\" ng-click=\\\"next()\\\">{{'Next' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/account/views/aprimaconditions.html',\r\n    \"<div ng-if=\\\"!loading && !httpError\\\" class=\\\"panel-body panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        {{::'Aprima Terms & Conditions' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <label class=\\\"control-label\\\">{{::'Patient Portal Terms and Conditions' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <p>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <iframe ng-src=\\\"{{PDFPath}}\\\" class=\\\"ap-consent-terms-conditions\\\"></iframe>\\r\" +\r\n    \"\\n\" +\r\n    \"                </p>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"<div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"text-center\\\" ng-if=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <uib-alert type=\\\"danger\\\" ng-if=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"        {{\\\"An error has occurred and the consent info could not be loaded.\\\" | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <uib-alert type=\\\"danger\\\" ng-if=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"        {{\\\"You do not have access to this info.\\\"| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"panel-footer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <span>\\r\" +\r\n    \"\\n\" +\r\n    \"        <button class=\\\"btn btn-default2\\\" ng-click=\\\"back()\\\">{{'Back' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"        <button class=\\\"btn btn-primary\\\" ng-click=\\\"finish()\\\">{{'Finish' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/account/views/changepassword.html',\r\n    \"<form name=\\\"changePasswordForm\\\" ng-submit=\\\"submit()\\\" novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"!loading && !httpError\\\" class=\\\"panel-body panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Please create a new password:' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                 ng-class=\\\"{ 'has-error' : changePasswordForm.oldPassword.$invalid && changePasswordForm.$submitted}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label class=\\\"control-label\\\" for=\\\"oldPassword\\\">{{::'Old Password' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                       id=\\\"oldPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                       name=\\\"oldPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                       ng-model=\\\"model.OldPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                       type=\\\"password\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                       placeholder=\\\"Old Password\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                       ng-disabled=\\\"showSecurityQuestions\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                       required\\r\" +\r\n    \"\\n\" +\r\n    \"                                        >\\r\" +\r\n    \"\\n\" +\r\n    \"                                <span ng-show=\\\"changePasswordForm.oldPassword.$invalid && changePasswordForm.$submitted\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                      class=\\\"help-block ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Not valid.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-class=\\\"{ 'has-error' : changePasswordForm.newPassword.$invalid && changePasswordForm.$submitted}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <label class=\\\"control-label\\\" for=\\\"newPassword\\\">{{::'New Password' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           id=\\\"newPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           name=\\\"newPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ng-model=\\\"model.NewPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           type=\\\"password\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           placeholder=\\\"New Password\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ng-minlength=\\\"5\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           required\\r\" +\r\n    \"\\n\" +\r\n    \"                            >\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-show=\\\"changePasswordForm.newPassword.$invalid && changePasswordForm.$submitted\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                          class=\\\"help-block ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Password must be at least 5 characters.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-class=\\\"{ 'has-error' : changePasswordForm.confirmNewPassword.$invalid && changePasswordForm.$submitted}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <label class=\\\"control-label\\\" for=\\\"confirmNewPassword\\\">{{::'Retype New Password' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           id=\\\"confirmNewPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           name=\\\"confirmNewPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ng-model=\\\"confirmNewPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           type=\\\"password\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           placeholder=\\\"Retype Password\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ng-pattern=\\\"model.NewPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           required\\r\" +\r\n    \"\\n\" +\r\n    \"                            >\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-show=\\\"changePasswordForm.confirmNewPassword.$invalid && changePasswordForm.$submitted\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                          class=\\\"help-block ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Passwords do not match.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-footer panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-6 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button type=\\\"button\\\" class=\\\"btn btn-default2 btn-lg\\\" ng-click=\\\"back()\\\">{{'Back' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-6 col-flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button type=\\\"submit\\\" class=\\\"btn btn-primary btn-lg pull-right\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            ng-disabled=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-spinner ng-show=\\\"loading\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{'Submit' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center\\\" ng-if=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-if=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{\\\"An error has occurred and the page could not be loaded.\\\" | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-if=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{\\\"You do not have access to this info.\\\"| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</form>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/account/views/createaccountlayout.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-demo\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-1 col-sm-2\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-10 col-sm-8 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-heading panel-flush text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Complete your account' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ui-view></div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-1 col-sm-2\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/account/views/emailoptout.html',\r\n    \"<form name=\\\"emailoptoutForm\\\" ng-submit=\\\"submit()\\\" novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"!loading && !httpError\\\" class=\\\"panel-body panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Opt Out Email: ' | translate}} {{model.EmailAddress}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <input class=\\\"col-xs-3\\\" type=\\\"checkbox\\\" name=\\\"isOptOutStatement\\\" id=\\\"isOptOutStatement\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            ng-model=\\\"model.IsOptOutStatement\\\" >\\r\" +\r\n    \"\\n\" +\r\n    \"                    <label for=\\\"isOptOutStatement\\\"></label>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <label class=\\\"col-xs-2 col-xs-offset-1\\\" for=\\\"isOptOutStatement\\\">Statements</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-footer panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-6 col-flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <label class=\\\"pull-right\\\" ng-disabled=\\\"loading || invalidAccessCode\\\" ng-show=\\\"processed\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-spinner ng-show=\\\"loading\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{'Success' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </label>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button type=\\\"submit\\\" class=\\\"btn btn-primary btn-lg pull-right\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-disabled=\\\"loading || invalidAccessCode\\\" ng-hide=\\\"processed\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-spinner ng-show=\\\"loading\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{'Submit' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"loading || httpError || invalidAccessCode\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center\\\" ng-if=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-if=\\\"invalidAccessCode\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{\\\"Access Code is invalid in URL.\\\" | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-if=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{\\\"An error has occurred and the page could not be loaded.\\\" | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-if=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{\\\"You do not have access to this info.\\\"| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</form>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/account/views/emailoptoutlayout.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-demo\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-1 col-sm-2\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-10 col-sm-8 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-heading panel-flush text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Email Opt Out' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ui-view></div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-1 col-sm-2\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/account/views/forgotpassword.html',\r\n    \"<form name=\\\"changePasswordForm\\\" ng-submit=\\\"submit()\\\" novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"!loading && !httpError\\\" class=\\\"panel-body panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Please create a new password:' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-class=\\\"{ 'has-error' : changePasswordForm.answer1.$invalid && changePasswordForm.$submitted}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <label class=\\\"control-label\\\" for=\\\"answer1\\\">{{model.Questions[0].Text}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       id=\\\"answer1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       name=\\\"answer1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       ng-model=\\\"Answers.Question1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       placeholder=\\\"Answer 1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       required\\r\" +\r\n    \"\\n\" +\r\n    \"                        >\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ng-show=\\\"changePasswordForm.answer1.$invalid && changePasswordForm.$submitted\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                  class=\\\"help-block ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Not valid.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-class=\\\"{ 'has-error' : changePasswordForm.answer2.$invalid && changePasswordForm.$submitted}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <label class=\\\"control-label\\\" for=\\\"answer2\\\">{{model.Questions[1].Text}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       id=\\\"answer2\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       name=\\\"answer2\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       ng-model=\\\"Answers.Question2\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       placeholder=\\\"Answer 2\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       required\\r\" +\r\n    \"\\n\" +\r\n    \"                        >\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ng-show=\\\"changePasswordForm.answer2.$invalid && changePasswordForm.$submitted\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                  class=\\\"help-block ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Not valid.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-class=\\\"{ 'has-error' : changePasswordForm.answer3.$invalid && changePasswordForm.$submitted}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <label class=\\\"control-label\\\" for=\\\"answer3\\\">{{model.Questions[2].Text}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       id=\\\"answer3\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       name=\\\"answer3\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       ng-model=\\\"Answers.Question3\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       placeholder=\\\"Answer 3\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                       required\\r\" +\r\n    \"\\n\" +\r\n    \"                        >\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ng-show=\\\"changePasswordForm.answer3.$invalid && changePasswordForm.$submitted\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                  class=\\\"help-block ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Not valid.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-class=\\\"{ 'has-error' : changePasswordForm.newPassword.$invalid && changePasswordForm.$submitted}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <label class=\\\"control-label\\\" for=\\\"newPassword\\\">{{::'New Password' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           id=\\\"newPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           name=\\\"newPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ng-model=\\\"model.NewPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           type=\\\"password\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           placeholder=\\\"New Password\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ng-minlength=\\\"5\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           required\\r\" +\r\n    \"\\n\" +\r\n    \"                            >\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-show=\\\"changePasswordForm.newPassword.$invalid && changePasswordForm.$submitted\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                          class=\\\"help-block ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Password must be at least 5 characters.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-class=\\\"{ 'has-error' : changePasswordForm.confirmNewPassword.$invalid && changePasswordForm.$submitted}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <label class=\\\"control-label\\\" for=\\\"confirmNewPassword\\\">{{::'Retype New Password' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           id=\\\"confirmNewPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           name=\\\"confirmNewPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ng-model=\\\"confirmNewPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           type=\\\"password\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           placeholder=\\\"Retype Password\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ng-pattern=\\\"model.NewPassword\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           required\\r\" +\r\n    \"\\n\" +\r\n    \"                            >\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-show=\\\"changePasswordForm.confirmNewPassword.$invalid && changePasswordForm.$submitted\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                          class=\\\"help-block ng-hide\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Passwords do not match.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-footer text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-1 col-sm-2 col-md-3\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-5 col-sm-4 col-md-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button type=\\\"submit\\\" class=\\\"btn btn-primary btn-lg btn-block\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            ng-disabled=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-spinner ng-show =\\\"loading\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{'Submit' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-5 col-sm-4 col-md-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button class=\\\"btn btn-default2 btn-lg btn-block\\\" ng-click=\\\"back()\\\">{{::'Back' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-1 col-sm-2 col-md-3\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center\\\" ng-if=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-if=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'An error has occurred and the page could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-if=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'You do not have access to this info.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</form>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/account/views/loginconsent.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div id=\\\"login-consent-panel\\\" class=\\\"panel panel-primary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel panel-default panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <form name=\\\"loginConsentForm\\\" ng-submit=\\\"submitForm()\\\" novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <label class=\\\"control-label\\\">{{::'Aprima Consent' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{::loginConsent.AprimaConsent}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <label class=\\\"control-label\\\">{{::'Patient Portal Terms and Conditions' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <ap-document-viewer-with-download\\r\" +\r\n    \"\\n\" +\r\n    \"                                    disable-inline-pdf=\\\"model.DisableInlinePdf\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    document-id=\\\"model.DocumentId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    enable-download=\\\"model.DocumentId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    document-download=\\\"downloadPrivacyPolicy()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    document-load=\\\"getPrivacyPolicy()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                ></ap-document-viewer-with-download>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <label class=\\\"control-label\\\">{{::'Practice Consent' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <p class=\\\"form-control-static\\\" ng-bind-html=\\\"loginConsent.PracticeConsentText\\\"></p>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <label style=\\\"word-wrap: break-word\\\" for=\\\"agreeToConsentCheckbox\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <input type=\\\"checkbox\\\" id=\\\"agreeToConsentCheckbox\\\" name=\\\"agreeToConsentCheckbox\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                           ng-model=\\\"LoginConsentVm.agreeToConsentChecked\\\"  required/>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    &nbsp;&nbsp;{{loginConsent.AgreeCheckboxText}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </label>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-show=\\\"loginConsentForm.$submitted || loginConsentForm.agreeToConsentCheckbox.$touched\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-show=\\\"loginConsentForm.agreeToConsentCheckbox.$error.required\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     class=\\\"text-danger\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{loginConsent.ConsentWarningMessage}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-1 col-sm-2 col-md-3\\\">&nbsp;</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-5 col-sm-4 col-md-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button id=\\\"disagreeBtn\\\" type=\\\"button\\\" class=\\\"btn btn-default2 btn-lg btn-block\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    ng-click=\\\"disagreeToConsent()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <i class=\\\"fa fa-4x\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Disagree' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-5 col-sm-4 col-md-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button id=\\\"agreeBtn\\\" type=\\\"submit\\\" class=\\\"btn btn-primary btn-lg btn-block\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <span class=\\\"ng-hide\\\" ng-show=\\\"submitted\\\"><ap-spinner></ap-spinner></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <i class=\\\"fa fa-4x\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Agree' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-1 col-sm-2 col-md-3\\\">&nbsp;</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                </form>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'An error has occurred and the login consent could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'You do not have access to login consent page.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\"\r\n  );\r\n\n}]);\n","angular.module('account').controller('AccountActivationCtrl',\r\n    ['$scope', 'toaster', 'aprgettext', 'TransitionManager', 'SessionService', 'AccountRepository', 'LocalStorageRepository', '$stateParams', 'debounce', 'configuration', 'ContentAttributeService', 'Bridge',\r\n        function ($scope, toaster, gettext, TransitionManager, SessionService, AccountRepository, LocalStorageRepository, $stateParams, debounce, configuration, ContentAttributeService, Bridge) {\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n            var webRegistrationId = $stateParams.webRegistrationId;\r\n            $scope.accountActivationDto = {\r\n                ClientId: LocalStorageRepository.getClientID(),\r\n                WebRegistrationId: webRegistrationId,\r\n                UserName: '',\r\n                Password: ''\r\n            };\r\n            $scope.model = {\r\n                ConfirmPassword: '',\r\n                UserNameInUse: false\r\n            };\r\n\r\n            function activateAccount() {\r\n                if ($scope.accountActivationForm.$invalid || $scope.model.UserNameInUse || $scope.userNameLoading) {\r\n                    return;\r\n                }\r\n\r\n\r\n                $scope.submitLoading = true;\r\n                AccountRepository.postAccountActivation($scope.accountActivationDto)\r\n                    .then(function () {\r\n                        toaster.pop('success', '', gettext('Portal account has been successfully created.'));\r\n                        TransitionManager.transition({appRoute: 'login'});\r\n                    })\r\n                    .catch(function () {\r\n                        toaster.pop('error', '', gettext('An error has occurred. Unable to create portal account.'));\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.submitLoading = false;\r\n                    });\r\n            }\r\n\r\n            function activateAccountValidation() {\r\n                AccountRepository.postAccountActivationIdValidation($scope.accountActivationDto.ClientId, $scope.accountActivationDto.WebRegistrationId)\r\n                    .catch(function () {\r\n                        toaster.pop('error', '', gettext('Invalid link, timed out.'));\r\n                        TransitionManager.transition({appRoute: 'login'});\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n\r\n            function activateAccountUserNameValidation() {\r\n                $scope.userNameLoading = true;\r\n                AccountRepository.postUserNameValidation($scope.accountActivationDto.ClientId, $scope.accountActivationDto.UserName)\r\n                    .then(function (data) {\r\n                        if (!data.IsSuccess) {\r\n                            $scope.model.UserNameInUse = true;\r\n                            $scope.accountActivationForm.UserName.$invalid = true;\r\n                        } else {\r\n                            $scope.model.UserNameInUse = false;\r\n                        }\r\n                    })\r\n                    .catch(function () {\r\n\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.userNameLoading = false;\r\n                    });\r\n            }\r\n\r\n            function onLoad() {\r\n                AccountRepository.getActivatePatientPortalMetadata($scope);\r\n\r\n                if (!configuration.DEV_HOSTED) {\r\n                    ContentAttributeService.getClientConfig()\r\n                        .then(function (data) {\r\n                            if (data) {\r\n                                var oldClientId = LocalStorageRepository.getClientID();\r\n\r\n                                if (oldClientId !== data.clientId) {\r\n                                    LocalStorageRepository.clearAll();\r\n                                }\r\n\r\n                                LocalStorageRepository.setClientURL(data.hostUrl);\r\n                                LocalStorageRepository.setClientID(data.clientId);\r\n\r\n                            } else {\r\n                                $scope.errorMessage = gettext('Error loading page. Unknown Client Id');\r\n                                Bridge.createModalAlert({\r\n                                    title: gettext('Loading Error'),\r\n                                    message: $scope.errorMessage,\r\n                                    buttons: [gettext('Okay')]\r\n                                });\r\n                            }\r\n                        }).catch(function () {\r\n                            $scope.errorMessage = gettext('Error loading page. Unknown Client Id');\r\n                            Bridge.createModalAlert({\r\n                                title: gettext('Loading Error'),\r\n                                message: $scope.errorMessage,\r\n                                buttons: [gettext('Okay')]\r\n                            });\r\n                        });\r\n                }\r\n                activateAccountValidation();\r\n            }\r\n\r\n            function back() {\r\n\r\n                SessionService.setDisplayDashboardToolbar(false);\r\n                TransitionManager.transition({appRoute: 'login'});\r\n            }\r\n\r\n            onLoad();\r\n\r\n            $scope.back = back;\r\n            $scope.activateAccount = activateAccount;\r\n            $scope.activateAccountUserNameValidation = debounce(100, activateAccountUserNameValidation);\r\n        }]);\r\n\r\n\r\n","angular.module('account').controller('AccountActivationRequestCtrl',\r\n    ['$scope', 'toaster', 'aprgettext', 'TransitionManager', 'SessionService', 'AccountRepository', 'LocalStorageRepository',\r\n        function ($scope, toaster, gettext, TransitionManager, SessionService, AccountRepository, LocalStorageRepository) {\r\n            'use strict';\r\n\r\n            $scope.loading = false;\r\n\r\n            //todo use Ryan's date picker\r\n            $scope.question = {\r\n                SurveySectionId: 1,\r\n                SurveyQuestionId: 2,\r\n                SelectedAnswerText: '',\r\n                SectionOptional: true,\r\n                QuestionOptional: true\r\n            };\r\n            $scope.accountActivationDto = {\r\n                ClientId: LocalStorageRepository.getClientID(),\r\n                EmailAddress: '',\r\n                Birthdate: ''\r\n            };\r\n\r\n            function activateAccountRequest() {\r\n                if ($scope.accountRequestValidationForm.$invalid){\r\n                    return;\r\n                }\r\n                $scope.submitLoading = true;\r\n                $scope.accountActivationDto.Birthdate = $scope.question.SelectedAnswerText && new Date($scope.question.SelectedAnswerText);\r\n                AccountRepository.postAccountActivationRequest($scope.accountActivationDto)\r\n                    .then(function () {\r\n                        toaster.pop('success', '', gettext('Account activation email sent.'));\r\n                        TransitionManager.transition({appRoute: 'login'});\r\n                    })\r\n                    .catch(function () {\r\n                        toaster.pop('error', '', gettext('An error has occurred. Email failed to send or we were unable to find your account.'));\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.submitLoading = false;\r\n                    });\r\n            }\r\n\r\n            function back() {\r\n                SessionService.setDisplayDashboardToolbar(false);\r\n                TransitionManager.transition({appRoute: 'login'});\r\n            }\r\n\r\n            function onLoad() {\r\n                AccountRepository.getActivatePatientPortalRequestMetadata($scope);\r\n            }\r\n\r\n            onLoad();\r\n\r\n            $scope.back = back;\r\n            $scope.activateAccountRequest = activateAccountRequest;\r\n\r\n        }]);\r\n\r\n\r\n","angular.module('account').controller('AccountDetailsCtrl', [\r\n        '$q',\r\n        '$scope',\r\n        'AccountRepository',\r\n        'aprgettext',\r\n        'ListService',\r\n        'MyChartService',\r\n        'PatientPortalStorageRepository',\r\n        'toaster',\r\n        function (\r\n            $q,\r\n            $scope,\r\n            AccountRepository,\r\n            gettext,\r\n            ListService,\r\n            MyChartService,\r\n            PatientPortalStorageRepository,\r\n            toaster\r\n            ) {\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n\r\n            $scope.isEditingCredentials = false;\r\n            $scope.isSavingCredentials = false;\r\n\r\n            $scope.isEditingQuestionAnswers = false;\r\n            $scope.isSavingQuestionAnswers = false;\r\n\r\n            $scope.validationMessage = '';\r\n\r\n            $scope.securityAccountCredentialsDto = {\r\n                LoginUserId: '',\r\n                UserName: '',\r\n                OldPassword: '',\r\n                NewPassword: ''\r\n            };\r\n\r\n            $scope.securityAccountQuestionsAnswersDto = {\r\n                LoginUserId: '',\r\n                Questions: [\r\n                    {\r\n                        Id: null,\r\n                        Text: '',\r\n                        DisplayOrder: 0,\r\n                        Answer: ''\r\n                    },\r\n                    {\r\n                        Id: null,\r\n                        Text: '',\r\n                        DisplayOrder: 1,\r\n                        Answer: ''\r\n                    },\r\n                    {\r\n                        Id: null,\r\n                        Text: '',\r\n                        DisplayOrder: 2,\r\n                        Answer: ''\r\n                    }\r\n                ]\r\n            };\r\n\r\n            var accountDetailsDto = {\r\n                    LoginUserId: '',\r\n                    UserName: '',\r\n                    Questions: null\r\n            };\r\n\r\n\r\n            var loginUser = PatientPortalStorageRepository.getLoginUser();\r\n            ListService.getList('securityquestions', $scope, 'securityQuestions');\r\n\r\n\r\n            function getMyChartDetails() {\r\n                if (loginUser.isPatient) {\r\n                    return MyChartService.getDetails(loginUser.id)\r\n                        .then(function (data) {\r\n                            $scope.patient = {\r\n                                loginUserId: loginUser.id,\r\n                                name: loginUser.fullName,\r\n                                birthDate: data.DateOfBirth,\r\n                                isPatient: true\r\n                            };\r\n                        });\r\n                }\r\n                else {\r\n                    $scope.patient = {\r\n                        loginUserId: loginUser.id,\r\n                        name: loginUser.fullName,\r\n                        birthDate: null,\r\n                        isPatient: false\r\n                    };\r\n                    return $q.when();\r\n                }\r\n            }\r\n\r\n            function getAccountDetails() {\r\n                return AccountRepository.getAccountDetails(loginUser.id)\r\n                    .then(function (data) {\r\n                        accountDetailsDto.LoginUserId = data.LoginUserId;\r\n                        accountDetailsDto.UserName = data.UserName;\r\n                        accountDetailsDto.Questions = data.Questions;\r\n                    });\r\n            }\r\n\r\n\r\n            function loadView() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n\r\n                var myChartPromise = getMyChartDetails();\r\n                var getAccountDetailsPromise = getAccountDetails();\r\n\r\n                $q.all([myChartPromise, getAccountDetailsPromise]).then(function () {\r\n                    updateCredentialsScope();\r\n\r\n                    var setAnswerToEmptyString = true;\r\n                    updateSecurityQuestionsAnswersScope(setAnswerToEmptyString);\r\n                }).catch(function (response) {\r\n                    $scope.addHttpError(response);\r\n                }).finally(function () {\r\n                    $scope.loading = false;\r\n                });\r\n            }\r\n            loadView();\r\n\r\n\r\n            function editCredentials() {\r\n                if ($scope.isEditingQuestionAnswers) {\r\n                    cancelQuestionAnswers();\r\n                }\r\n\r\n                AccountRepository.getCredentialsMetadata($scope)\r\n                    .then(function() { })\r\n                    .finally(function () {\r\n                        $scope.isEditingCredentials = true;\r\n                    });\r\n            }\r\n\r\n            function cancelCredentials(loginCredentialsForm) {\r\n                updateCredentialsScope();\r\n                loginCredentialsForm.$setPristine();\r\n                $scope.isEditingCredentials = false;\r\n            }\r\n\r\n            function saveCredentials(loginCredentialsForm) {\r\n                $scope.isSavingCredentials = true;\r\n\r\n                if (loginCredentialsForm.$valid) {\r\n                    AccountRepository.putAccountCredentials($scope.securityAccountCredentialsDto)\r\n                        .then(function (data) {\r\n                            accountDetailsDto.LoginUserId = data.LoginUserId;\r\n                            accountDetailsDto.UserName = data.UserName;\r\n                            updateCredentialsScope();\r\n\r\n                            $scope.isEditingCredentials = !$scope.isEditingCredentials;\r\n                            loginCredentialsForm.$setPristine();\r\n                            toaster.pop('success', '', gettext('Your password was successfully updated.'));\r\n                        })\r\n                        .catch(function () {\r\n                            $scope.validationMessage = gettext('Please make sure your old password is correct.');\r\n                            toaster.pop('error', '', gettext('Please make sure your old password is correct.'));\r\n                        })\r\n                        .finally(function () {\r\n                            $scope.isSavingCredentials = false;\r\n                        });\r\n                }\r\n                else {\r\n                    $scope.isSavingCredentials = false;\r\n                }\r\n            }\r\n\r\n\r\n            function editQuestionAnswers() {\r\n                if ($scope.isEditingCredentials) {\r\n                    cancelCredentials();\r\n                }\r\n\r\n                AccountRepository.getSecurityQuestionsAnswersMetadata($scope)\r\n                    .then(function () { })\r\n                    .finally(function () {\r\n                        $scope.isEditingQuestionAnswers = true;\r\n                    });\r\n            }\r\n\r\n            function cancelQuestionAnswers(securityQuestionAnswersForm) {\r\n                updateSecurityQuestionsAnswersScope(true);\r\n                securityQuestionAnswersForm.$setPristine();\r\n                $scope.isEditingQuestionAnswers = false;\r\n            }\r\n\r\n            function saveQuestionAnswers(securityQuestionAnswersForm) {\r\n                $scope.isSavingQuestionAnswers = true;\r\n\r\n                if (securityQuestionAnswersForm.$valid) {\r\n                    AccountRepository.putSecurityQuestionsAnswers($scope.securityAccountQuestionsAnswersDto)\r\n                        .then(function (data) {\r\n                            accountDetailsDto.Questions = data.Questions;\r\n                            updateSecurityQuestionsAnswersScope(false);\r\n\r\n                            $scope.isEditingQuestionAnswers = !$scope.isEditingQuestionAnswers;\r\n\r\n                            securityQuestionAnswersForm.$setPristine();\r\n                            toaster.pop('success', '', gettext('Security Questions and Answers were successfully updated.'));\r\n                        })\r\n                        .catch(function () {\r\n                            $scope.validationMessage = gettext('Security Question and Answers could not be updated.');\r\n                            toaster.pop('error', '', gettext('Security Questions and Answers could not be updated.'));\r\n                        })\r\n                        .finally(function () {\r\n                            $scope.isSavingQuestionAnswers = false;\r\n                        });\r\n                }\r\n                else {\r\n                    $scope.isSavingQuestionAnswers = false;\r\n                }\r\n            }\r\n\r\n\r\n            function selectedQuestionChanged(selectedSecurityQuestion) {\r\n                if (selectedSecurityQuestion.Id !== null) {\r\n                    var lstProdParamSecurityQuestion = _.find($scope.securityQuestions, {Id: selectedSecurityQuestion.Id});\r\n                    selectedSecurityQuestion.Text = lstProdParamSecurityQuestion.Text;\r\n                }\r\n                else {\r\n                    selectedSecurityQuestion.Text = '';\r\n                }\r\n            }\r\n\r\n\r\n            function updateCredentialsScope() {\r\n                $scope.validationMessage = '';\r\n\r\n                $scope.securityAccountCredentialsDto.LoginUserId = accountDetailsDto.LoginUserId;\r\n                $scope.securityAccountCredentialsDto.UserName = accountDetailsDto.UserName;\r\n                $scope.securityAccountCredentialsDto.OldPassword = '';\r\n                $scope.securityAccountCredentialsDto.NewPassword = '';\r\n            }\r\n\r\n            function updateSecurityQuestionsAnswersScope(initializeAnswer) {\r\n                $scope.validationMessage = '';\r\n\r\n                $scope.securityAccountQuestionsAnswersDto.LoginUserId = accountDetailsDto.LoginUserId;\r\n\r\n                var questionAnswer = _.find($scope.securityQuestions, {Id: accountDetailsDto.Questions[0] && accountDetailsDto.Questions[0].Id});\r\n                if (questionAnswer != null) {\r\n                    $scope.securityAccountQuestionsAnswersDto.Questions[0].Id = questionAnswer.Id;\r\n                    $scope.securityAccountQuestionsAnswersDto.Questions[0].Text = questionAnswer.Text;\r\n                    $scope.securityAccountQuestionsAnswersDto.Questions[0].DisplayOrder = questionAnswer.DisplayOrder;\r\n                    if (initializeAnswer) {\r\n                        $scope.securityAccountQuestionsAnswersDto.Questions[0].Answer = '';\r\n                    }\r\n                }\r\n\r\n                questionAnswer = _.find($scope.securityQuestions, {Id: accountDetailsDto.Questions[1] && accountDetailsDto.Questions[1].Id});\r\n                if (questionAnswer != null) {\r\n                    $scope.securityAccountQuestionsAnswersDto.Questions[1].Id = questionAnswer.Id;\r\n                    $scope.securityAccountQuestionsAnswersDto.Questions[1].Text = questionAnswer.Text;\r\n                    $scope.securityAccountQuestionsAnswersDto.Questions[1].DisplayOrder = questionAnswer.DisplayOrder;\r\n                    if (initializeAnswer) {\r\n                        $scope.securityAccountQuestionsAnswersDto.Questions[1].Answer = '';\r\n                    }\r\n                }\r\n\r\n                questionAnswer = _.find($scope.securityQuestions, {Id: accountDetailsDto.Questions[2] && accountDetailsDto.Questions[2].Id});\r\n                if (questionAnswer != null) {\r\n                    $scope.securityAccountQuestionsAnswersDto.Questions[2].Id = questionAnswer.Id;\r\n                    $scope.securityAccountQuestionsAnswersDto.Questions[2].Text = questionAnswer.Text;\r\n                    $scope.securityAccountQuestionsAnswersDto.Questions[2].DisplayOrder = questionAnswer.DisplayOrder;\r\n                    if (initializeAnswer) {\r\n                        $scope.securityAccountQuestionsAnswersDto.Questions[2].Answer = '';\r\n                    }\r\n                }\r\n            }\r\n\r\n\r\n            $scope.saveCredentials = saveCredentials;\r\n            $scope.editCredentials = editCredentials;\r\n            $scope.cancelCredentials = cancelCredentials;\r\n            $scope.saveQuestionAnswers = saveQuestionAnswers;\r\n            $scope.editQuestionAnswers = editQuestionAnswers;\r\n            $scope.cancelQuestionAnswers = cancelQuestionAnswers;\r\n            $scope.selectedQuestionChanged = selectedQuestionChanged;\r\n        }\r\n    ]\r\n);","angular.module('account').controller('AccountSetupCtrl',\r\n    ['$scope', '$stateParams', '$uibModal', '$filter', 'MyChartService', 'ListService', 'toaster', 'aprgettext', '$log', 'TransitionManager',\r\n        function ($scope, $stateParams, $modal, $filter, MyChartService, ListService, toaster, gettext, $log, TransitionManager) {\r\n            'use strict';\r\n\r\n            $scope.loading = false;\r\n            $scope.viewSecondaryInsurance = false;\r\n            $scope.createAccountDto = {\r\n                DriversLicenseNumber: '',\r\n                DriversLicenseState: '',\r\n                PrimaryInsurance: {\r\n                    InsuranceProvider: '',\r\n                    InsurancePlan: '',\r\n                    AccountFirstName: '',\r\n                    AccountLastName: '',\r\n                    PolicyNumber: '',\r\n                    GroupNumber: ''\r\n                },\r\n                SecondaryInsurance: {\r\n                    InsuranceProvider: '',\r\n                    InsurancePlan: '',\r\n                    AccountFirstName: '',\r\n                    AccountLastName: '',\r\n                    PolicyNumber: '',\r\n                    GroupNumber: ''\r\n                },\r\n                SecurityQuestions: [\r\n                    {Question: {Id: '', Text: '', DisplayOrder: ''}, Answer: ''},\r\n                    {Question: {Id: '', Text: '', DisplayOrder: ''}, Answer: ''},\r\n                    {Question: {Id: '', Text: '', DisplayOrder: ''}, Answer: ''}\r\n                ]\r\n            };\r\n\r\n            ListService.getList('maritalstatuslist', $scope, 'maritalStatusTypes');\r\n            ListService.getList('insurancecarriers', $scope, 'insuranceCarriers');\r\n            ListService.getList('securityquestions', $scope, 'securityQuestions');\r\n\r\n            var insurancePlanList = ListService.getList('insuranceplans', $scope, 'insurancePlans');\r\n\r\n            $scope.primaryInsuranceImageModel = {\r\n                maxSizeKb : 200,\r\n                selectedFileName : '',\r\n                selectedMimeType : '',\r\n                selectedFileContents : ''\r\n            };\r\n\r\n            $scope.secondaryInsuranceImageModel = {\r\n                maxSizeKb : 200,\r\n                selectedFileName : '',\r\n                selectedMimeType : '',\r\n                selectedFileContents : ''\r\n            };\r\n\r\n\r\n            $scope.updatePrimaryInsuranceList = function updatePrimaryInsuranceList() {\r\n                insurancePlanList.then(function (data) {\r\n                    $scope.primaryInsurancePlansModified = _.filter(data, {InsuranceCarrierId: $scope.createAccountDto.PrimaryInsurance.InsuranceCarrier.Id});\r\n                });\r\n            };\r\n            $scope.updateSecondaryInsuranceList = function updateSecondaryInsuranceList() {\r\n                insurancePlanList.then(function (data) {\r\n                    $scope.secondaryInsurancePlansModified = _.filter(data, {InsuranceCarrierId: $scope.createAccountDto.SecondaryInsurance.InsuranceCarrier.Id});\r\n                });\r\n            };\r\n\r\n            $scope.toggleViewSecondaryInsurance = function toggleViewSecondaryInsurance() {\r\n                $scope.viewSecondaryInsurance = !$scope.viewSecondaryInsurance;\r\n            };\r\n\r\n            $scope.back = function back() {\r\n                TransitionManager.transition({appRoute: 'accountvalidation'});\r\n            };\r\n            $scope.skip = function skip() {\r\n                TransitionManager.transition({appRoute: 'aprimaconditions'});\r\n            };\r\n            $scope.next = function next() {\r\n                TransitionManager.transition({appRoute: 'aprimaconditions'});\r\n            };\r\n        }]);\r\n\r\n\r\n","angular.module('account').controller('AccountValidationCtrl',\r\n    ['$scope', '$stateParams', 'ListService', 'toaster', 'aprgettext', 'TransitionManager', 'SessionService',\r\n        function ($scope, $stateParams, ListService, toaster, gettext, TransitionManager, SessionService) {\r\n            'use strict';\r\n\r\n            $scope.loading = false;\r\n            $scope.accountValidationDto = {\r\n                DriversLicenseNumber: '',\r\n                DriversLicenseState: ''\r\n            };\r\n\r\n            $scope.back = function back(){\r\n\r\n                SessionService.setDisplayDashboardToolbar(false);\r\n                TransitionManager.transition({appRoute: 'login'});\r\n            };\r\n            $scope.next = function next(){\r\n                TransitionManager.transition({appRoute: 'accountsetup'});\r\n            };\r\n\r\n        }]);\r\n\r\n\r\n","angular.module('account').controller('AprimaConditionsCtrl',\r\n    ['$scope', '$stateParams', 'toaster', 'aprgettext', 'TransitionManager', 'ConsentService',\r\n        function ($scope, $stateParams, toaster, gettext, TransitionManager, ConsentService) {\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n\r\n            ConsentService\r\n                .getPrivacyPolicyUrl()\r\n                .then(function (privacyPolicyUrl) {\r\n                    $scope.removeHttpError();\r\n                    $scope.PDFPath = privacyPolicyUrl;\r\n                })\r\n                .catch(function (response) {\r\n                    $scope.addHttpError(response);\r\n                })\r\n                .finally(function () {\r\n                    $scope.loading = false;\r\n                });\r\n\r\n            $scope.finish = function finish() {\r\n                TransitionManager.transition({appRoute: 'dashboard'});\r\n            };\r\n\r\n            $scope.back = function back() {\r\n                TransitionManager.transition({appRoute: 'accountsetup'});\r\n            };\r\n\r\n            $scope.finish = function finish() {\r\n                TransitionManager.transition({appRoute: 'login'});\r\n            };\r\n        }]);\r\n","angular.module('account').controller('ChangePasswordCtrl',\r\n    ['$scope', 'toaster', 'aprgettext', 'TransitionManager', 'SessionService', 'AccountRepository', 'LocalStorageRepository',\r\n        function ($scope, toaster, gettext, TransitionManager, SessionService, AccountRepository, LocalStorageRepository) {\r\n            'use strict';\r\n\r\n            $scope.loading = false;\r\n            $scope.model = {\r\n                Id: LocalStorageRepository.getUserID(),\r\n                OldPassword: '',\r\n                NewPassword: ''\r\n            };\r\n            $scope.confirmNewPassword = '';\r\n\r\n            $scope.back = back;\r\n\r\n            $scope.submit = submit;\r\n\r\n            function back() {\r\n                SessionService.setDisplayDashboardToolbar(false);\r\n                TransitionManager.transition({appRoute: 'login'});\r\n            }\r\n\r\n            function submit() {\r\n\r\n                if ($scope.changePasswordForm.$invalid) {\r\n                    return;\r\n                }\r\n\r\n                $scope.loading = true;\r\n\r\n                AccountRepository.postChangePassword($scope.model)\r\n                    .then(function () {\r\n                        toaster.pop('success', '', gettext('Password has been changed successfully. Please login with new password.'));\r\n                        TransitionManager.transition({appRoute: 'login'});\r\n                    })\r\n                    .catch(function () {\r\n                        toaster.pop('error', '', gettext('One or more answers were incorrect. Please try again or contact your practice for further assistance.'));\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n        }]);","angular.module('account').controller('CreateAccountCtrl',\r\n    ['$scope', '$state',\r\n        function () {\r\n            'use strict';\r\n        }]);\r\n\r\n\r\n","angular.module('account').controller('EmailOptOutCtrl',\r\n    ['$scope', 'toaster', 'aprgettext', 'TransitionManager', 'ContentAttributeService', 'Bridge', 'configuration', 'SessionService', 'AccountRepository', 'LocalStorageRepository', '$stateParams',\r\n        function ($scope, toaster, gettext, TransitionManager, ContentAttributeService, Bridge, configuration, SessionService, AccountRepository, LocalStorageRepository, $stateParams) {\r\n            'use strict';\r\n\r\n            $scope.loading = false;\r\n            $scope.processed = false;\r\n            $scope.invalidAccessCode = false; // assume initially that all is good\r\n            $scope.model = {  // setup and initialize dto\r\n                AccessCode: $stateParams.accessCode,\r\n                ClientId: LocalStorageRepository.getClientID(),\r\n                EmailAddress: '',\r\n                IsOptOutPatientMarketing: false,\r\n                IsOptOutStatement: true,\r\n            };\r\n\r\n            $scope.onLoad = onLoad;\r\n\r\n            if (!configuration.DEV_HOSTED) {\r\n                ContentAttributeService.getClientConfig()\r\n                    .then(function (data) {\r\n                        if (data) {\r\n                            var oldClientId = LocalStorageRepository.getClientID();\r\n\r\n                            if (oldClientId !== data.clientId) {\r\n                                LocalStorageRepository.clearAll();\r\n                            }\r\n                            \r\n                            LocalStorageRepository.setClientURL(data.hostUrl);\r\n                            LocalStorageRepository.setClientID(data.clientId);\r\n                            $scope.model.ClientId = LocalStorageRepository.getClientID();\r\n\r\n                            $scope.onLoad($scope.model.AccessCode, $scope.model.ClientId); \r\n\r\n                        } else {\r\n                            $scope.errorMessage = gettext('Error loading page. Unknown Client Id');\r\n                            Bridge.createModalAlert({\r\n                                title: gettext('Loading Error'),\r\n                                message: $scope.errorMessage,\r\n                                buttons: [gettext('Okay')]\r\n                            });\r\n                        }\r\n                    }).catch(function () {\r\n                    $scope.errorMessage = gettext('Error loading page. Unknown Client Id');\r\n                    Bridge.createModalAlert({\r\n                        title: gettext('Loading Error'),\r\n                        message: $scope.errorMessage,\r\n                        buttons: [gettext('Okay')]\r\n                    });\r\n                });\r\n            }\r\n\r\n            $scope.back = back;\r\n\r\n            $scope.submit = submit;\r\n\r\n            function back() {\r\n                SessionService.setDisplayDashboardToolbar(false);\r\n                TransitionManager.transition({appRoute: 'login'});\r\n            }\r\n\r\n            function onLoad(accessCode, clientId) {\r\n                \r\n                $scope.loading = true;\r\n                var params = {\r\n                    accessCode: accessCode,\r\n                    clientId: clientId,\r\n                };\r\n                \r\n                AccountRepository.getOptOutOfEmaiDetails(params)\r\n                    .then(function (data) {\r\n                        $scope.model.EmailAddress = data.Result.EmailAddress;\r\n                        $scope.invalidAccessCode = false;\r\n                    })\r\n                    .catch(function () {\r\n                        toaster.pop('error', '', gettext('EmailOptOutInfo Load Failed. Please try again or contact your practice for further assistance.'));\r\n                        $scope.invalidAccessCode = true;\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n\r\n            function submit() {\r\n\r\n                $scope.loading = true;\r\n\r\n                AccountRepository.postOptOutEmail($scope.model)\r\n                    .then(function () {\r\n                        toaster.pop('success', '', gettext('OptOut has been changed successfully.'));\r\n                        $scope.processed = true;\r\n                    })\r\n                    .catch(function () {\r\n                        toaster.pop('error', '', gettext('OptOut Failed. Please try again or contact your practice for further assistance.'));\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n        }]);","angular.module('account').controller('EmailOptOutLayoutCtrl',\r\n    ['$scope', '$state',\r\n        function () {\r\n            'use strict';\r\n        }]);\r\n\r\n\r\n","angular.module('account').controller('ForgotPasswordCtrl',\r\n    ['$scope', '$stateParams', 'toaster', 'aprgettext', 'TransitionManager', 'SessionService', 'AccountRepository', 'LocalStorageRepository',\r\n        function ($scope, $stateParams, toaster, gettext, TransitionManager, SessionService, AccountRepository, LocalStorageRepository) {\r\n            'use strict';\r\n\r\n            $scope.loading = false;\r\n            $scope.model = {\r\n                UserName: LocalStorageRepository.getUserName(),\r\n                ClientId: LocalStorageRepository.getClientID(),\r\n                NewPassword: '',\r\n                Questions: []\r\n            };\r\n            $scope.Answers = {\r\n                Question1: '',\r\n                Question2: '',\r\n                Question3: ''\r\n            };\r\n            $scope.confirmNewPassword = '';\r\n\r\n            $scope.back = back;\r\n            $scope.submit = submit;\r\n\r\n            loadSecurityQuestions();\r\n            function loadSecurityQuestions() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n\r\n                AccountRepository.getSecurityQuestions($scope.model.UserName, $scope.model.ClientId)\r\n                    .then(function (data) {\r\n                        if (data) {\r\n                            var securityQuestions = data.plain();\r\n                            $scope.model.Questions = securityQuestions.Questions;\r\n                        }else{\r\n                            toaster.pop('warning', '', gettext('You do not have Security Questions configured. Please contact the practice.'));\r\n                            back();\r\n                        }\r\n                    }).catch(function (response) {\r\n                        toaster.pop('warning', '', gettext('You do not have Security Questions configured. Please contact the practice.'));\r\n                        $scope.addHttpError(response);\r\n                    }).finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n\r\n            function back() {\r\n                SessionService.setDisplayDashboardToolbar(false);\r\n                TransitionManager.transition({appRoute: 'login'});\r\n            }\r\n\r\n            function submit() {\r\n\r\n                if ($scope.changePasswordForm.$invalid) {\r\n                    return;\r\n                }\r\n\r\n                $scope.loading = true;\r\n                var requestDto = {\r\n                    UserName: $scope.model.UserName,\r\n                    ClientId: $scope.model.ClientId,\r\n                    NewPassword: $scope.model.NewPassword,\r\n                    Questions: _($scope.model.Questions)\r\n                        .map(function (question) {\r\n                            return {\r\n                                Id: question.Id,\r\n                                Text: question.Text,\r\n                                Answer: '',\r\n                                DisplayOrder: question.DisplayOrder\r\n                            };\r\n                        }).value()\r\n                };\r\n\r\n                if (requestDto.Questions.length === 3) {\r\n                    requestDto.Questions[0].Answer = $scope.Answers.Question1;\r\n                    requestDto.Questions[1].Answer = $scope.Answers.Question2;\r\n                    requestDto.Questions[2].Answer = $scope.Answers.Question3;\r\n                }\r\n\r\n                AccountRepository.postForgotPassword(requestDto)\r\n                    .then(function (data) {\r\n                        console.log(data);\r\n                        toaster.pop('success', '', gettext('Password has been changed successfully. Please login with new password.'));\r\n                        TransitionManager.transition({appRoute: 'login'});\r\n                    })\r\n                    .catch(function () {\r\n                        toaster.pop('error', '', gettext('One or more answers were incorrect. Please try again or contact your practice for further assistance.'));\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n        }]);\r\n\r\n\r\n","angular.module('account').controller('LoginConsentCtrl',\r\n    [\r\n        '$scope', \r\n        'SessionService', \r\n        '$q', \r\n        'ConsentService', \r\n        'LocalStorageRepository', \r\n        'TransitionManager', \r\n        'ConsentRepository', \r\n        'LogOffService', \r\n        'aprgettext',\r\n        'BrowserService',\r\n        function (\r\n            $scope, \r\n            SessionService, \r\n            $q, \r\n            ConsentService, \r\n            LocalStorageRepository, \r\n            TransitionManager, \r\n            ConsentRepository, \r\n            LogOffService, \r\n            gettext,\r\n            BrowserService\r\n        ) {\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n            $scope.submitted = false;\r\n\r\n            $scope.loginConsent = {\r\n                PracticeConsentText: '',\r\n                PDFPath: '',\r\n                AgreeToConsentChecked: false,\r\n                PracticeConsentAccepted: false,\r\n                AprimaConsent: gettext('Clicking on Agree denotes that you are authorized to view the above patient records and agree to be bound by the terms and conditions of the Patient Portal.'),\r\n                ConsentWarningMessage: gettext('Please indicate that you agree with this consent form and select the Agree checkbox to proceed.'),\r\n                AgreeCheckboxText: gettext('I have read the consent form and the above information and I accept the conditions')\r\n            };\r\n\r\n            $scope.model =\r\n            {\r\n                DisableInlinePdf: !BrowserService.supportsInlinePdf(),\r\n                DocumentId: 'privacypolicy',\r\n            };\r\n\r\n            function getPrivacyPolicyUrl() {\r\n                return ConsentService\r\n                    .getPrivacyPolicyUrl()\r\n                    .then(function (privacyPolicyUrl) {\r\n                        $scope.loginConsent.PDFPath = privacyPolicyUrl;\r\n                    });\r\n            }\r\n\r\n            function getPracticeConsent() {\r\n                return ConsentService\r\n                    .getPracticeConsent()\r\n                    .then(function (data) {\r\n                        $scope.loginConsent.PracticeConsentAccepted = data.IsAccepted;\r\n                        $scope.loginConsent.PracticeConsentText = data.ConsentForm;\r\n                    });\r\n            }\r\n\r\n            function getPrivacyPolicy() {\r\n                return ConsentRepository.downloadAgreementPrivacyPolicy();\r\n            }\r\n\r\n            function downloadPrivacyPolicy(){\r\n                return ConsentRepository.downloadAgreementPrivacyPolicy()\r\n                    .then(function (data) {\r\n                        return {Data: data.Data, FileName: 'PrivacyPolicy', Extension: 'pdf'};\r\n                    });\r\n            }\r\n\r\n            function loadPage() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n\r\n                var practiceConsentPromise = getPracticeConsent();\r\n                var getPrivacyPolicyPromise = getPrivacyPolicyUrl();\r\n\r\n                $q.all([practiceConsentPromise, getPrivacyPolicyPromise])\r\n                    .then(function () {\r\n                        if ($scope.loginConsent.PracticeConsentAccepted === true) {\r\n                            SessionService.setDisplayDashboardToolbar(true);\r\n                            SessionService.setShowHeaderNavigationMenu(true);\r\n                            TransitionManager.transition({appRoute: 'dashboard'});\r\n                        }\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n\r\n            loadPage();\r\n\r\n            function disagreeToConsent() {\r\n                LogOffService.logoff().then(function () {\r\n                    TransitionManager.transition({appRoute: 'login'});\r\n                });\r\n            }\r\n\r\n            function submitForm() {\r\n                if ($scope.loginConsentForm.$invalid) {\r\n                    return;\r\n                }\r\n\r\n                $scope.submitted = true;\r\n                ConsentRepository\r\n                    .postUserAgreedToPracticeConsent(LocalStorageRepository.getUserID())\r\n                    .then(function () {\r\n                        $scope.removeHttpError();\r\n                        SessionService.setDisplayDashboardToolbar(true);\r\n                        SessionService.setShowHeaderNavigationMenu(true);\r\n                        TransitionManager.transition({appRoute: 'dashboard'});\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    });\r\n                $scope.submitted = false;\r\n            }\r\n\r\n            $scope.downloadPrivacyPolicy = downloadPrivacyPolicy;\r\n            $scope.getPrivacyPolicy = getPrivacyPolicy;\r\n            $scope.submitForm = submitForm;\r\n            $scope.disagreeToConsent = disagreeToConsent;\r\n\r\n        }\r\n    ]\r\n);","angular.module('account').factory('AccountRepository',\r\n    ['AprimaRestangular', 'MetadataRepository', function (AprimaRestangular, MetadataRepository) {\r\n        'use strict';\r\n\r\n        function postChangePassword(changePasswordDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('security/'+ changePasswordDto.Id +'/changepassword/').customPOST(changePasswordDto);\r\n        }\r\n\r\n        function getOptOutOfEmaiDetails(params) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('optout/email/getoptoutofemaildetails/').get(params);\r\n        }\r\n\r\n        function postOptOutEmail(emailOptOutDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('optout/email/optoutofemail/').customPOST(emailOptOutDto);\r\n        }\r\n\r\n        function postForgotPassword(changePasswordDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('security/changepassword/').customPOST(changePasswordDto);\r\n        }\r\n\r\n        function postAccountActivationRequest(activatePatientPortalAccountRequestDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('security/activate-account-request/').customPOST(activatePatientPortalAccountRequestDto);\r\n        }\r\n\r\n        function postAccountActivation(activatePatientPortalAccountDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('security/activate-account/').customPOST(activatePatientPortalAccountDto);\r\n        }\r\n\r\n        function postAccountActivationIdValidation(clientId, activationId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('security/activate-account-request-validation/' + activationId).customPOST(clientId);\r\n        }\r\n\r\n        function postUserNameValidation(clientId, userName) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('security/username-validation/' + userName).customPOST(clientId);\r\n        }\r\n\r\n        function getSecurityQuestions(userName, clientId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            var params = {\r\n                userName: userName,\r\n                clientId: clientId\r\n            };\r\n            return restangular.one('security/securityquestions/').get(params);\r\n        }\r\n\r\n        function getCredentialsMetadata($scope) {\r\n            return MetadataRepository.getMetadata('account-details/credentials', $scope);\r\n        }\r\n\r\n        function getSecurityQuestionsAnswersMetadata($scope) {\r\n            return MetadataRepository.getMetadata('account-details/security-questions-answers', $scope);\r\n        }\r\n\r\n        function getActivatePatientPortalRequestMetadata($scope) {\r\n            return MetadataRepository.getMetadata('account-details/activate-patient-portal-request', $scope);\r\n        }\r\n\r\n        function getActivatePatientPortalMetadata($scope) {\r\n            return MetadataRepository.getMetadata('account-details/activate-patient-portal', $scope);\r\n        }\r\n\r\n        function getAccountDetails(loginUserId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('security/'+ loginUserId +'/account-details/').get();\r\n        }\r\n\r\n        function putAccountCredentials(securityAccountCredentialsDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('security/'+ securityAccountCredentialsDto.LoginUserId +'/credentials').customPUT(securityAccountCredentialsDto);\r\n        }\r\n\r\n        function putSecurityQuestionsAnswers(securityAccountQuestionsAnswersDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('security/'+ securityAccountQuestionsAnswersDto.LoginUserId +'/questions-answers').customPUT(securityAccountQuestionsAnswersDto);\r\n        }\r\n\r\n\r\n        return{\r\n            postChangePassword: postChangePassword,\r\n            postOptOutEmail: postOptOutEmail,\r\n            getOptOutOfEmaiDetails: getOptOutOfEmaiDetails,\r\n            postForgotPassword: postForgotPassword,\r\n            getSecurityQuestions: getSecurityQuestions,\r\n            getAccountDetails: getAccountDetails,\r\n            putAccountCredentials: putAccountCredentials,\r\n            putSecurityQuestionsAnswers: putSecurityQuestionsAnswers,\r\n            getCredentialsMetadata: getCredentialsMetadata,\r\n            getSecurityQuestionsAnswersMetadata: getSecurityQuestionsAnswersMetadata,\r\n            postAccountActivationRequest: postAccountActivationRequest,\r\n            postAccountActivation: postAccountActivation,\r\n            postAccountActivationIdValidation: postAccountActivationIdValidation,\r\n            postUserNameValidation: postUserNameValidation,\r\n            getActivatePatientPortalRequestMetadata: getActivatePatientPortalRequestMetadata,\r\n            getActivatePatientPortalMetadata: getActivatePatientPortalMetadata\r\n        };\r\n    }]);","angular.module('account').factory('ConsentService',\r\n    ['$sce', '$q', 'ConsentRepository', 'LocalStorageRepository', 'configuration',\r\n        function ($sce, $q, ConsentRepository, LocalStorageRepository, configuration) {\r\n            'use strict';\r\n\r\n            var currentPatientConsent = {\r\n                PatientId: null,\r\n                Version: 0,\r\n                IsAccepted: false,\r\n                AlwaysDisplayConsent: false,\r\n                ConsentForm: null,\r\n            };\r\n\r\n            function replaceLineBreaksWithHtmlLineBreak(text) {\r\n                var returnText = text;\r\n\r\n                var re = new RegExp('\\r\\n', 'g');\r\n                returnText = returnText.replace(re, '<br/>');\r\n\r\n                re = new RegExp('\\n', 'g');\r\n                returnText = returnText.replace(re, '<br/>');\r\n\r\n                return returnText;\r\n            }\r\n\r\n            function getPrivacyPolicyUrl() {\r\n                return ConsentRepository\r\n                    .getAgreementPrivacyPolicyPath(LocalStorageRepository.getUserID())\r\n                    .then(function (data) {\r\n                        var baseurl = LocalStorageRepository.getClientURL() + '/api/patient/' + configuration.SERVER_API_VERSION + '/',\r\n                            path = 'consents/' + data.Path,\r\n                            apiKey = configuration.API_KEY,\r\n                            pdfUrl = baseurl + path + '?apikey=' + apiKey;\r\n\r\n                        var privacyPolicyUrl = $sce.trustAsResourceUrl(pdfUrl);\r\n                        return privacyPolicyUrl;\r\n                    });\r\n            }\r\n\r\n            function getPracticeConsent() {\r\n                return ConsentRepository\r\n                    .getPracticeConsent(LocalStorageRepository.getUserID())\r\n                    .then(function (data) {\r\n                        var currentPracticeConsent = {\r\n                            IsAccepted: data.IsAccepted,\r\n                            ConsentForm: $sce.trustAsHtml(replaceLineBreaksWithHtmlLineBreak(data.ConsentForm))\r\n                        };\r\n                        return currentPracticeConsent;\r\n                    });\r\n            }\r\n\r\n            function getChartConsent(patientId) {\r\n                if (currentPatientConsent.PatientId !== patientId) {\r\n                    clearChartConsent();\r\n                }\r\n\r\n                if (!currentPatientConsent.PatientId) {\r\n                    return ConsentRepository\r\n                        .getChartConsent(patientId)\r\n                        .then(function (data) {\r\n                            currentPatientConsent = {\r\n                                PatientId: patientId,\r\n                                Version: data.Version,\r\n                                IsAccepted: data.IsAccepted,\r\n                                AlwaysDisplayConsent: data.AlwaysDisplayConsent,\r\n                                ConsentForm: data.ConsentForm,\r\n                            };\r\n\r\n                            var consentHtml = $sce.trustAsHtml(replaceLineBreaksWithHtmlLineBreak(currentPatientConsent.ConsentForm));\r\n                            currentPatientConsent.ConsentForm = consentHtml;\r\n                            return currentPatientConsent;\r\n                        });\r\n                } else {\r\n                    return $q.when(currentPatientConsent);\r\n                }\r\n            }\r\n\r\n            function postChartConsent(patientId) {\r\n                if (currentPatientConsent.PatientId === patientId) {\r\n                    currentPatientConsent.IsAccepted = true;\r\n                    LocalStorageRepository.setOncePerLoginChartConsent(true);\r\n                } else {\r\n                    clearChartConsent();\r\n                }\r\n\r\n                return ConsentRepository\r\n                    .postChartConsent(patientId)\r\n                    .then(function () {\r\n                        return;\r\n                    });\r\n            }\r\n\r\n            function clearChartConsent() {\r\n                currentPatientConsent = {\r\n                    PatientId: null,\r\n                    Version: 0,\r\n                    IsAccepted: false,\r\n                    AlwaysDisplayConsent: false,\r\n                    ConsentForm: null,\r\n                };\r\n            }\r\n\r\n            function isChartConsentAccepted(patientId) {\r\n                return getChartConsent(patientId)\r\n                    .then(function (data) {\r\n                        var myPatientConsent = data;\r\n                        return !!(myPatientConsent && myPatientConsent.PatientId && myPatientConsent.PatientId === patientId && ( LocalStorageRepository.getOncePerLoginChartConsent() || (myPatientConsent.IsAccepted && !myPatientConsent.AlwaysDisplayConsent)));\r\n                    });\r\n            }\r\n\r\n            return{\r\n                getPrivacyPolicyUrl: getPrivacyPolicyUrl,\r\n                getPracticeConsent: getPracticeConsent,\r\n                getChartConsent: getChartConsent,\r\n                postChartConsent: postChartConsent,\r\n                isChartConsentAccepted: isChartConsentAccepted,\r\n                clearChartConsent: clearChartConsent\r\n            };\r\n        }\r\n    ]\r\n);","angular.module('rxrefills', [\r\n    //third party\r\n    'angularLocalStorage',\r\n    'gettext',\r\n    'headroom',\r\n    'lodash',\r\n    'ngAnimate',\r\n    'ngTouch',\r\n    'restangular',\r\n    'toaster',\r\n    'ui.bootstrap',\r\n    'ui.router',\r\n\r\n\r\n    //aprima\r\n    'apEasyScroller',\r\n\r\n    'aprima-core',\r\n    'aprima-bridge',\r\n    'aprima-config',\r\n    'aprima-legacy-common',\r\n    'aprima-provider-api',\r\n    'aprima-utils'\r\n\r\n]);","angular.module('rxrefills').config(['AppRoutesProvider', '$stateProvider',\r\n    function (AppRoutesProvider, $stateProvider) {\r\n        'use strict';\r\n\r\n        var portalSettings = { toolbarItem: 'prescriptions' };\r\n\r\n        var appRoutes = {\r\n            'rxrefill': {\r\n                state: 'rxrefill',\r\n                route: '/rxrefill/',\r\n                portalSettings: portalSettings\r\n            },\r\n            'prescriptions': {\r\n                state: 'prescriptions',\r\n                route: '/prescriptions',\r\n                portalSettings: portalSettings\r\n            },\r\n            'prescriptionsMobile': {\r\n                state: 'prescriptionsMobile',\r\n                route: '/prescriptionsMobile',\r\n                portalSettings: portalSettings\r\n            }\r\n        };\r\n\r\n        AppRoutesProvider.setupAppRoutes(appRoutes);\r\n\r\n        $stateProvider\r\n            .state(appRoutes.rxrefill.state, {\r\n                url: appRoutes.rxrefill.route,\r\n                templateUrl: '/rxrefills/views/rxrefills.html',\r\n                controller: 'RxRefillCtrl',\r\n                description: '/RxRefill',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('RxRefills'); }\r\n                }\r\n            })\r\n            .state(appRoutes.prescriptions.state, {\r\n                url: appRoutes.prescriptions.route,\r\n                templateUrl: '/rxrefills/views/prescriptions.html',\r\n                controller: 'RxRefillCtrl',\r\n                description: '/prescriptions',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('RxRefills'); }\r\n                }\r\n            })\r\n            .state(appRoutes.prescriptionsMobile.state, {\r\n                url: appRoutes.prescriptionsMobile.route,\r\n                templateUrl: '/rxrefills/views/prescriptions.html',\r\n                resolve: {\r\n                    isMobile: function() { return true; },\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('RxRefills'); }\r\n                },\r\n                controller: 'RxRefillMobileCtrl',\r\n                description: appRoutes.prescriptionsMobile.route\r\n            });\r\n\r\n    }]);","angular.module('rxrefills').run(['$templateCache', function($templateCache) {\n  'use strict';\r\n\r\n  $templateCache.put('/rxrefills/views/prescriptions.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-primary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !httpError\\\" class=\\\"panel-body panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12 col-md-3 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'My Pharmacy' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"bottom-line col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-if=\\\"mapDisplay\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-google-maps\\r\" +\r\n    \"\\n\" +\r\n    \"                                id=\\\"ap-google-maps\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                name=\\\"selectedPharmacy.pharmacy.Name\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                address=\\\"selectedPharmacy.pharmacy.Address.Address1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                city=\\\"selectedPharmacy.pharmacy.Address.City\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                state=\\\"selectedPharmacy.pharmacy.Address.State\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                zip=\\\"selectedPharmacy.pharmacy.Address.Zip\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        </ap-google-maps>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <h4><b>{{::selectedPharmacy.pharmacy.Name}}</b></h4>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::selectedPharmacy.pharmacy.Address.Address1}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        <br>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::selectedPharmacy.pharmacy.Address.City}},&nbsp;{{::selectedPharmacy.pharmacy.Address.State}}&nbsp;{{::selectedPharmacy.pharmacy.Address.Zip}}\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"bottom-line col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            p.&nbsp;{{::selectedPharmacy.pharmacy.Phone.PhoneNumber | apPhoneNumberFilter}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <a ng-click=\\\"changePharmacy()\\\">{{::'Change my Pharmacy' | translate}}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-if=\\\"!mapDisplay\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <a ng-click=\\\"changePharmacy()\\\">{{::'Add a Pharmacy' | translate}}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12 col-md-9 flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"ap-margin-bottom-30 flush-left flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'Current Prescriptions' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-if=\\\"!currentPrescriptions.length\\\" class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'No Current Prescriptions' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"striped row panel-row\\\" ng-repeat=\\\"med in currentPrescriptions track by $index\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-md-6 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::med.DrugName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12 smaller\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::med.Instructions}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-md-4 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row-item col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-2 smaller\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{::'Start' | translate}}&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-10\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span ap-date-formatter date=\\\"{{::med.StartDate}}\\\" format=\\\"long-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row-item col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-2 smaller\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{::'End' | translate}}&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-10\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span ap-date-formatter date=\\\"{{::med.EndDate}}\\\" format=\\\"long-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-md-2 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"pull-right\\\" ng-if=\\\"!med.RefillRequestPending && !med.IsDiscontinued && med.ProviderId\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <button class=\\\"btn btn-lg-height btn-default1\\\" ng-click=\\\"medSelect(med)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        data-transition-to=\\\"{appRoute: 'rxrefill'}\\\">{{'Request Refill' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <br>\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::med.IsActive ? dateDiff(med.EndDate) : ''}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"pull-right\\\" ng-if=\\\"med.IsDiscontinued\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"btn-height flexbox flexbox-horizontal-center\\\"><span\\r\" +\r\n    \"\\n\" +\r\n    \"                                        class=\\\"btn-width pending text-center\\\">{{'Discontinued' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"pull-right\\\" ng-if=\\\"med.RefillRequestPending\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <button class=\\\"btn btn-lg-height btn-default1 btn-minpadding\\\" ng-click=\\\"medSelect(med)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        data-transition-to=\\\"{appRoute: 'rxrefill'}\\\"><span class=\\\"lime-green\\\">{{'Refill Requested' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"pending text-center\\\">{{'Pending Review' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"pull-right\\\" ng-if=\\\"!med.ProviderId\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"btn-height flexbox flexbox-horizontal-center\\\"><span\\r\" +\r\n    \"\\n\" +\r\n    \"                                        class=\\\"btn-width pending text-center\\\">{{'Please contact office to process.' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Previous Prescriptions' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-if=\\\"!previousPrescriptions.length\\\" class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'No Previous Prescriptions' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"striped row panel-row\\\" ng-repeat=\\\"med in previousPrescriptions track by $index\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-md-6 col-xs-flush \\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::med.DrugName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12 smaller\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::med.Instructions}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-md-4 col-xs-flush \\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row-item col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-2 smaller\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{::'Start' | translate}}&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-10\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span ap-date-formatter date=\\\"{{::med.StartDate}}\\\" format=\\\"long-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row-item col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-2 smaller\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{::'End' | translate}}&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-10\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span ap-date-formatter date=\\\"{{::med.EndDate}}\\\" format=\\\"long-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-md-2 col-xs-flush \\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"pull-right\\\" ng-if=\\\"!med.RefillRequestPending && !med.IsDiscontinued && med.ProviderId\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <button class=\\\"btn btn-lg-height btn-default1\\\" ng-click=\\\"medSelect(med)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        data-transition-to=\\\"{appRoute: 'rxrefill'}\\\">{{'Request Refill' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"pull-right\\\" ng-if=\\\"med.IsDiscontinued\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"btn-height flexbox flexbox-horizontal-center\\\"><span\\r\" +\r\n    \"\\n\" +\r\n    \"                                        class=\\\"btn-width pending text-center\\\">{{'Discontinued' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"pull-right\\\" ng-if=\\\"med.RefillRequestPending\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <button class=\\\"btn btn-default1 btn-minpadding\\\" ng-click=\\\"medSelect(med)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        data-transition-to=\\\"{appRoute: 'rxrefill'}\\\"><span class=\\\"lime-green\\\">{{'Refill Requested' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"pending text-center\\\">{{'Pending Review' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"pull-right\\\" ng-if=\\\"!med.ProviderId\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"btn-height flexbox flexbox-horizontal-center\\\"><span\\r\" +\r\n    \"\\n\" +\r\n    \"                                        class=\\\"btn-width pending text-center\\\">{{'Please contact office to process.' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'An error has occurred and the patient medications could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'You do not have access to this patient\\\\'s medications.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/rxrefills/views/rxrefills.html',\r\n    \"<div ng-cloak class=\\\"panel panel-default panel-flush panel-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-12 col-xs-flush col-md-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-heading panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Selected Pharmacy' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"selectedPharmacy && selectedPharmacy.pharmacy && selectedPharmacy.pharmacy.Name\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"body-line col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-if=\\\"mapDisplay\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <ap-google-maps\\r\" +\r\n    \"\\n\" +\r\n    \"                                name=\\\"selectedPharmacy.pharmacy.Name\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                address=\\\"selectedPharmacy.pharmacy.Address.Address1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                city=\\\"selectedPharmacy.pharmacy.Address.City\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                state=\\\"selectedPharmacy.pharmacy.Address.State\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                zip=\\\"selectedPharmacy.pharmacy.Address.Zip\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            </ap-google-maps>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <h4><b>{{selectedPharmacy.pharmacy.Name}}</b></h4>\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{selectedPharmacy.pharmacy.Address.Address1}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            <br />\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{selectedPharmacy.pharmacy.Address.City}},&nbsp;{{selectedPharmacy.pharmacy.Address.State}}&nbsp;{{selectedPharmacy.pharmacy.Address.Zip}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"bottom-line col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    p.&nbsp;{{selectedPharmacy.pharmacy.Phone.PhoneNumber | apPhoneNumberFilter}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <a ng-click=\\\"changePharmacy()\\\">{{::'Change my Pharmacy' | translate}}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-if=\\\"!mapDisplay\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <a ng-click=\\\"changePharmacy()\\\">{{::'Add a Pharmacy' | translate}}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"!(selectedPharmacy && selectedPharmacy.pharmacy && selectedPharmacy.pharmacy.Name)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <p class=\\\"has-error\\\">No pharmacy is selected. Please select a pharmacy to continue.</p>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-12 col-md-9 flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-heading panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Request Refills' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Which prescriptions would you like refilled?' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"form-section\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"body-line\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"striped col-xs-12\\\" ng-repeat=\\\"med in orderedPrescriptions track by $index\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             ng-if=\\\"med && !med.IsDiscontinued && med.ProviderId\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-2 col-xs-flush col-sm-1\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <input type=\\\"checkbox\\\" id=\\\"{{med.MedicationSIGUid}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-model=\\\"med.SelectedForRefillRequest\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ap-checkbox-hidden-label=\\\"{{med.DrugName}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-12 col-sm-4\\\" ng-click=\\\"medCheck(med)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{::med.DrugName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"smaller\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{::med.Instructions}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-12 col-sm-4 col-flush\\\" ng-click=\\\"medCheck(med)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"row-item col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-2 smaller\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{::'Start' | translate}}&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-10\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <span ap-date-formatter date=\\\"{{::med.StartDate}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                  format=\\\"long-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"row-item col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-2 smaller\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{::'End' | translate}}&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-10\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <span ap-date-formatter date=\\\"{{::med.EndDate}}\\\" format=\\\"long-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 col-xs-flush padding-vert\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-xs-flush col-sm-3 padding-vert\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label ng-class=\\\"['pull-right', 'padding-vert', (!(selectedPharmacy && selectedPharmacy.pharmacy && selectedPharmacy.pharmacy.Name) ? 'has-error' : '')]\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                for=\\\"selectPharmacy\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Select Pharmacy' | translate}}&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                            </label>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-xs-flush col-sm-9 padding-vert\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12 col-xs-flush pull-left col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <select class=\\\"pharmacySelection form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        id=\\\"selectPharmacy\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-model=\\\"selectedPharmacy.pharmacy\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-options=\\\"pharmacyFormat(pharm) for pharm in patient.Pharmacies\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                </select>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-xs-flush col-sm-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label class=\\\"pull-right\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    for=\\\"reason\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Refill Reason' | translate}}&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                            </label>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-xs-flush col-sm-9\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <textarea id=\\\"reason\\\" class=\\\"col-xs-12 col-xs-flush pull-left\\\" rows=\\\"4\\\" ng-model=\\\"Reason\\\"></textarea>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-6 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button class=\\\"btn btn-default2 btn-lg\\\" id=\\\"cancelRefillRequest\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    data-transition-to=\\\"{appRoute: 'prescriptions'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Cancel' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-6 col-flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button class=\\\"btn btn-primary btn-lg pull-right\\\" id=\\\"refillRequest\\\" ng-click=\\\"rxRefillRequest()\\\" ng-disabled=\\\"!(selectedPharmacy && selectedPharmacy.pharmacy && selectedPharmacy.pharmacy.Name)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <ap-spinner ng-show=\\\"requestLoading\\\"></ap-spinner>{{::'Submit Request' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'An error has occurred and the patient medications could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak translate>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'You do not have access to this patient\\\\'s medications.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\n}]);\n","(function() {\r\n    'use strict';\r\n    var RxRefillBaseCtrl = function (autoInit, changePharmacyRoute, changePharmacyRouteOpts) {\r\n        return function ($q, $scope, $stateParams, toaster, gettext, _, PatientPortalStorageRepository, PrescriptionService, TransitionManager, PatientSettingsService) {\r\n            $scope.name = 'RxRefill';\r\n            $scope.mapDisplay = false;\r\n            $scope.loading = false;\r\n            $scope.requestLoading = false;\r\n            $scope.selectedPharmacy = {\r\n                pharmacy: {\r\n                    Name: '',\r\n                    Address: {\r\n                        Address1: '',\r\n                        City: '',\r\n                        State: '',\r\n                        Zip: ''\r\n                    },\r\n                    Phone: {\r\n                        PhoneNumber: ''\r\n                    }\r\n                }};\r\n            $scope.patient = {Medications: [], Pharmacies: []};\r\n            $scope.medFilters = PrescriptionService.medFilters;\r\n            $scope.activeFilter = PrescriptionService.medFilters[1];\r\n\r\n            var activePatient =  PatientPortalStorageRepository.getActivePatient();\r\n            var loginUser = PatientPortalStorageRepository.getLoginUser(),\r\n                reportRequestDto = {\r\n                    PatientId: activePatient.id,\r\n                    LoginUserId: loginUser.id,\r\n                    LoginUserName: loginUser.name\r\n                };\r\n            $scope.featureList = PatientSettingsService.getPatientFeatures();\r\n\r\n            function updateFilteredPrescriptions(filter) {\r\n                $scope.activeFilter = filter;\r\n\r\n                $scope.filteredPrescriptions = _.filter($scope.patient.Medications, function (item) {\r\n                    return PrescriptionService.dateFilter(item.EndDate, $scope.activeFilter.Days) || !!item.RefillRequestPending;\r\n                });\r\n            }\r\n\r\n            function pharmacyFormat(pharmacy) {\r\n                var str = '';\r\n                str += pharmacy.Name + ' ' + pharmacy.Address.Address1 + ' ' + pharmacy.Address.City + ' ' + pharmacy.Address.State + ' ' + pharmacy.Address.Zip;\r\n                return str;\r\n            }\r\n\r\n            function changePharmacy(){\r\n                TransitionManager.transition({appRoute: changePharmacyRoute, opts : changePharmacyRouteOpts || {id: activePatient.id}});\r\n            }\r\n\r\n            function extendPrescriptionList(medications) {\r\n                var extendedList = _.map(medications, function (element) {\r\n                    return _.assignIn(element,\r\n                        {SelectedForRefillRequest:\r\n                            (PrescriptionService.getSelectedMedId() === element.RelPatientMedicationId || !!element.RefillRequestPending)});\r\n                });\r\n                return extendedList;\r\n            }\r\n\r\n            function initialize() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n                PatientPortalStorageRepository.getActivePatient();\r\n                var pharmaciesPromise = PrescriptionService.getPharmacies(activePatient.id)\r\n                    .then(function (data) {\r\n                        $scope.patient.Pharmacies = data.plain();\r\n                        if ($scope.patient.Pharmacies && $scope.patient.Pharmacies.length) {\r\n                            $scope.selectedPharmacy.pharmacy = _($scope.patient.Pharmacies)\r\n                                .filter({'IsPreferredPharmacy': true})\r\n                                .value();\r\n                            $scope.selectedPharmacy.pharmacy = $scope.selectedPharmacy.pharmacy.length ? $scope.selectedPharmacy.pharmacy[0] : $scope.patient.Pharmacies[0];\r\n                            toggleMapDisplay(true);\r\n                        }\r\n                    });\r\n                var rxRefillsPromise = PrescriptionService.getRxRefills(activePatient.id)\r\n                    .then(function (data) {\r\n                        $scope.patient.Medications = data.Medications;\r\n\r\n                        //prescriptions.html\r\n                        var splitPrescriptions = _.partition($scope.patient.Medications, function (item) {\r\n                            return PrescriptionService.dateFilter(item.EndDate, PrescriptionService.medFilters[1].Days);\r\n                        });\r\n                        $scope.currentPrescriptions = splitPrescriptions[0];\r\n                        $scope.previousPrescriptions = splitPrescriptions[1];\r\n\r\n                        //prescriptionsList.html\r\n                        updateFilteredPrescriptions($scope.activeFilter);\r\n\r\n                        //rxRefills.html\r\n                        if ($scope.patient.Medications && $scope.patient.Medications.length) {\r\n                            $scope.orderedPrescriptions = $scope.currentPrescriptions.concat($scope.previousPrescriptions);\r\n                            $scope.orderedPrescriptions  = extendPrescriptionList($scope.orderedPrescriptions);\r\n                        }\r\n                    });\r\n\r\n                auditMedications(reportRequestDto);\r\n\r\n                $q.all([pharmaciesPromise, rxRefillsPromise]).catch(function (response) {\r\n                    $scope.addHttpError(response);\r\n                }).finally(function () {\r\n                    $scope.loading = false;\r\n                });\r\n            }\r\n            function auditMedications(reportRequestDto) {\r\n                PrescriptionService.auditMedicationsLogging(reportRequestDto);\r\n            }\r\n\r\n            function medCheck(med) {\r\n                med.SelectedForRefillRequest = !med.SelectedForRefillRequest;\r\n            }\r\n\r\n            function medSelect(med) {\r\n                PrescriptionService.setSelectedMedId(med.RelPatientMedicationId);\r\n            }\r\n\r\n            function toggleMapDisplay(bool) {\r\n                $scope.mapDisplay = bool;\r\n            }\r\n\r\n            function rxRefillRequest() {\r\n                $scope.requestLoading = true;\r\n                var rxRefills = {\r\n                    PatientId: activePatient.id,\r\n                    CreatedById: loginUser.id,\r\n                    RequestedPharmacyId: $scope.selectedPharmacy.pharmacy.Id,\r\n                    Reason: $scope.Reason,\r\n                    Medications: _($scope.patient.Medications)\r\n                        .filter({'SelectedForRefillRequest': true})\r\n                        .map(function (med) {\r\n                            return {\r\n                                RelPatientMedicationId: med.RelPatientMedicationId,\r\n                                DrugName: med.DrugName,\r\n                                Instructions: med.Instructions,\r\n                                ProviderId: med.ProviderId\r\n                            };\r\n                        })\r\n                        .value()\r\n                };\r\n\r\n                if (rxRefills.Medications.length === 0) {\r\n                    toaster.pop('warning', '', gettext('No medications selected.'));\r\n                    $scope.requestLoading = false;\r\n                } else {\r\n                    PrescriptionService\r\n                        .putRxRefills(rxRefills)\r\n                        .then(function (data) {\r\n                            PrescriptionService.clearSelectedMedId();\r\n                            $scope.patient.Medications = data.Medications;\r\n                            toaster.pop('success', '', gettext('Refill request sent successfully.'));\r\n                            TransitionManager.transition({appRoute: 'prescriptions'});\r\n                        })\r\n                        .catch(function () {\r\n                            toaster.pop('error', '', gettext('An error occurred while sending the refill request'));\r\n                        })\r\n                        .finally(function () {\r\n                            $scope.requestLoading = false;\r\n                        });\r\n                }\r\n            }\r\n\r\n            $scope.tileState = {\r\n                isCollapsed: undefined\r\n            };\r\n            $scope.toggleState = function() {\r\n                if($scope.tileState.isCollapsed === undefined)\r\n                {\r\n                    initialize();\r\n                    $scope.tileState.isCollapsed = false;\r\n                }\r\n                else\r\n                    $scope.tileState.isCollapsed = !$scope.tileState.isCollapsed;\r\n            };\r\n\r\n            if(autoInit) {\r\n                initialize();\r\n            }\r\n\r\n            $scope.auditMedications = auditMedications;\r\n            $scope.updateFilteredPrescriptions = updateFilteredPrescriptions;\r\n            $scope.pharmacyFormat = pharmacyFormat;\r\n            $scope.medCheck = medCheck;\r\n            $scope.medSelect = medSelect;\r\n            $scope.rxRefillRequest = rxRefillRequest;\r\n            $scope.changePharmacy = changePharmacy;\r\n        };\r\n    };\r\n    \r\n    var RxRefillCtrl = new RxRefillBaseCtrl(true, 'myChartPersonalDetails');\r\n    var RxRefillMobileChartCtrl = function ($q, $scope, $stateParams, toaster, gettext, _, PatientPortalStorageRepository, PrescriptionService, TransitionManager, PatientSettingsService, $modal) {\r\n        new RxRefillBaseCtrl(false, 'myChartMobile', { openPD: true }).call(this, $q, $scope, $stateParams, toaster, gettext, _, PatientPortalStorageRepository, PrescriptionService, TransitionManager, PatientSettingsService);\r\n        $scope.viewModal = function(patientMedicationId) {\r\n            var modalInstance = $modal.open({\r\n                templateUrl: '/mychart/views/mobile/genericModal.html',\r\n                controller: 'GenericModalCtrl',\r\n                scope: $scope,\r\n                resolve: {\r\n                    canPrint: function() {\r\n                        return false;\r\n                    },\r\n                    modalContent: function () {\r\n                        var patientMedication = _.find($scope.filteredPrescriptions, { RelPatientMedicationId: patientMedicationId });\r\n                        var modalContent =\r\n                                '<div>' + new Date(patientMedication.StartDate).toLocaleDateString() + ' - ' + new Date(patientMedication.EndDate).toLocaleDateString() + '</div>' +\r\n                                '<div>' + patientMedication.DrugName + '</div>' +\r\n                                '<div>' + patientMedication.Instructions + '</div>';\r\n                        return modalContent;\r\n                    }\r\n                }\r\n            });\r\n            modalInstance.result.then(function() {\r\n            });\r\n        };\r\n    };\r\n    var RxRefillMobileCtrl = function ($q, $scope, $stateParams, toaster, gettext, _, PatientPortalStorageRepository, PrescriptionService, TransitionManager, PatientSettingsService) {\r\n        new RxRefillBaseCtrl(true, 'myChartMobile', { openPD: true }).call(this, $q, $scope, $stateParams, toaster, gettext, _, PatientPortalStorageRepository, PrescriptionService, TransitionManager, PatientSettingsService);\r\n    };\r\n    \r\n    angular.module('rxrefills').controller('RxRefillCtrl',\r\n    ['$q', '$scope', '$stateParams', 'toaster', 'aprgettext', '_', 'PatientPortalStorageRepository', 'PrescriptionService', 'TransitionManager', 'PatientSettingsService',\r\n        RxRefillCtrl]);\r\n    angular.module('rxrefills').controller('RxRefillMobileCtrl',\r\n    ['$q', '$scope', '$stateParams', 'toaster', 'aprgettext', '_', 'PatientPortalStorageRepository', 'PrescriptionService', 'TransitionManager', 'PatientSettingsService',\r\n        RxRefillMobileCtrl]);\r\n    angular.module('rxrefills').controller('RxRefillMobileChartCtrl',\r\n    ['$q', '$scope', '$stateParams', 'toaster', 'aprgettext', '_', 'PatientPortalStorageRepository', 'PrescriptionService', 'TransitionManager', 'PatientSettingsService', '$uibModal',\r\n        RxRefillMobileChartCtrl]);\r\n})();\r\n","angular.module('rxrefills').factory('PrescriptionService',\r\n    ['PatientSettingsService', 'RxRefillRepository', '$q',\r\n        function (PatientSettingsService, RxRefillRepository, $q) {\r\n            'use strict';\r\n\r\n            var rxRefills,\r\n                pharmacies,\r\n                selectedMed,\r\n                prescriptionsServiceUserId;\r\n\r\n                \r\n            var medFilters = [\r\n                { Id: 1, Days: -1, Name: 'All' },\r\n                { Id: 2, Days: 30, Name: 'Current' }\r\n            ];\r\n\r\n            function getDateDiff(date) {\r\n                date = moment(date).startOf('d');\r\n                var utc1 = moment().startOf('d');\r\n\r\n                return date.diff(utc1, 'd');\r\n            }\r\n\r\n            function dateFilter(date, validDays) {\r\n                //return true if there is no date since it's assumed the medication is ongoing\r\n                //active < 0 means they are showing all Prescriptions\r\n                if (date && validDays >= 0) {\r\n                    var diff = getDateDiff(date);\r\n                    return diff >= -1 * validDays;\r\n                }\r\n                return true;\r\n            }    \r\n            \r\n            function saveRxRefills(rxRefillsToSave) {\r\n                rxRefills = rxRefillsToSave;\r\n                return rxRefills;\r\n            }\r\n\r\n            function getRxRefills(patientId, expiring) {\r\n                expiring = expiring || false;\r\n                if (patientId !== prescriptionsServiceUserId) {\r\n                    resetService(patientId);\r\n                }\r\n                if (!rxRefills) {\r\n                    return RxRefillRepository.getRxRefills(patientId, expiring)\r\n                        .then(function (data) {\r\n                            rxRefills = data;\r\n                            return rxRefills;\r\n                        });\r\n                } else {\r\n                    return $q.when(rxRefills);\r\n                }\r\n            }\r\n\r\n            function putRxRefills(rxRefillRequest) {\r\n                return RxRefillRepository.putRxRefills(rxRefillRequest.PatientId, rxRefillRequest)\r\n                    .then(function (data) {\r\n                        rxRefills = data;\r\n                        return rxRefills;\r\n                    });\r\n            }\r\n\r\n            function getPharmacies(patientId) {\r\n                if (patientId !== prescriptionsServiceUserId) {\r\n                    resetService(patientId);\r\n                }\r\n                if (!pharmacies) {\r\n                    return RxRefillRepository.getPharmacies(patientId)\r\n                        .then(function (data) {\r\n                            pharmacies = data;\r\n                            return pharmacies;\r\n                        });\r\n                } else {\r\n                    return $q.when(pharmacies);\r\n                }\r\n            }\r\n\r\n            function setSelectedMedId(med) {\r\n                selectedMed = med;\r\n            }\r\n\r\n            function clearSelectedMedId() {\r\n                selectedMed = null;\r\n            }\r\n\r\n            function getSelectedMedId() {\r\n                return selectedMed;\r\n            }\r\n\r\n            function resetService(patientId) {\r\n                clearAll();\r\n                setPrescriptionServiceUserId(patientId);\r\n            }\r\n\r\n            function clearAll(){\r\n                rxRefills = null;\r\n                pharmacies = null;\r\n                selectedMed = null;\r\n            }\r\n\r\n            function setPrescriptionServiceUserId(patientId){\r\n                prescriptionsServiceUserId = patientId;\r\n            }\r\n\r\n            function auditMedicationsLogging(requestReportDto) {\r\n                return RxRefillRepository.postMedicationsAudit(requestReportDto);\r\n            }\r\n            return {\r\n                medFilters: medFilters,\r\n                saveRxRefills: saveRxRefills,\r\n                getRxRefills: getRxRefills,\r\n                dateFilter : dateFilter,\r\n                putRxRefills: putRxRefills,\r\n                getPharmacies: getPharmacies,\r\n                setSelectedMedId: setSelectedMedId,\r\n                getSelectedMedId: getSelectedMedId,\r\n                clearSelectedMedId: clearSelectedMedId,\r\n                auditMedicationsLogging : auditMedicationsLogging\r\n            };\r\n        }]);\r\n","angular.module('rxrefills').factory('RxRefillRepository',\r\n    ['AprimaRestangular', function (AprimaRestangular) {\r\n        'use strict';\r\n\r\n        var getRxRefills = function (uid, expiring) {\r\n            expiring = !!expiring; //|| false;\r\n            var restangular = AprimaRestangular.get('patient');\r\n            //todo: need to get serperate pharmacy list, should controller care about how the calls to the endpoints work?\r\n            //return restangular.one('rxrefills', uid).customGET(expiring);//get();\r\n            return restangular.one('rxrefills', uid).get({expiring: expiring});\r\n        };\r\n\r\n        var putRxRefills = function (uid, rxRefilRequest) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('rxrefills', uid).customPUT(rxRefilRequest);\r\n        };\r\n\r\n        function getPharmacies(uid) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + uid + '/pharmacies').get();\r\n        }\r\n\r\n        function postMedicationsAudit(reportRequestDto){\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one( 'audit-patient-access/' + reportRequestDto.PatientId + '/medications').customPOST(reportRequestDto);\r\n        }\r\n\r\n        return{\r\n            getRxRefills: getRxRefills,\r\n            getPharmacies: getPharmacies,\r\n            putRxRefills: putRxRefills,\r\n            postMedicationsAudit : postMedicationsAudit\r\n        };\r\n    }]);\r\n\r\n","angular.module('mychart', [\r\n    //third party\r\n    'angularLocalStorage',\r\n    'gettext',\r\n    'headroom',\r\n    'lodash',\r\n    'ngAnimate',\r\n    'ngTouch',\r\n    'restangular',\r\n    'toaster',\r\n    'ui.bootstrap',\r\n    'ui.router',\r\n\r\n\r\n    //aprima\r\n    'apEasyScroller',\r\n    'account',\r\n    'app',\r\n    'mymessages',\r\n\r\n    'aprima-core',\r\n    'aprima-bridge',\r\n    'aprima-config',\r\n    'aprima-legacy-common',\r\n    'aprima-provider-api',\r\n    'aprima-patient-api'\r\n\r\n]);\r\n\r\n//todo move to WebCommon\r\nangular.module('mychart').filter('tel', function () {\r\n    'use strict';\r\n    return function (tel) {\r\n        if (!tel) {\r\n            return '';\r\n        }\r\n\r\n        var value = tel.toString().trim().replace(/\\D/g, '');\r\n\r\n//        if (value.match(/[^0-9]/)) {\r\n//            return tel;\r\n//        }\r\n\r\n        var country, city, number;\r\n\r\n        switch (value.length) {\r\n            case 10: // +1PPP####### -> C (PPP) ###-####\r\n                country = 1;\r\n                city = value.slice(0, 3);\r\n                number = value.slice(3);\r\n                break;\r\n\r\n            case 11: // +CPPP####### -> CCC (PP) ###-####\r\n                country = value[0];\r\n                city = value.slice(1, 4);\r\n                number = value.slice(4);\r\n                break;\r\n\r\n            case 12: // +CCCPP####### -> CCC (PP) ###-####\r\n                country = value.slice(0, 3);\r\n                city = value.slice(3, 5);\r\n                number = value.slice(5);\r\n                break;\r\n\r\n            case 13: // (CCC)###-#### -> (PPP) ###-####\r\n                return value.slice(0, 5) + ' ' + value.slice(5);\r\n\r\n            default:\r\n                return tel;\r\n        }\r\n\r\n        if (country === 1) {\r\n            country = '';\r\n        }\r\n\r\n        number = number.slice(0, 3) + '-' + number.slice(3);\r\n\r\n        return (country + ' (' + city + ') ' + number).trim();\r\n    };\r\n});","angular.module('mychart').config(['AppRoutesProvider', '$stateProvider', '$urlRouterProvider',\r\n    function (AppRoutesProvider, $stateProvider) {\r\n        'use strict';\r\n\r\n        var portalSettings = { toolbarItem: 'chart' };\r\n\r\n        var appRoutes = {\r\n            'myChart': {\r\n                state: 'myChart',\r\n                route: '/myChart',\r\n                portalSettings: portalSettings\r\n            },\r\n            'myChartProblems': {\r\n                state: 'myChart.myChartProblems',\r\n                route: '/problems/:id',\r\n                portalSettings: portalSettings\r\n            },\r\n            'myChartPrescriptions': {\r\n                state: 'myChart.myChartPrescriptions',\r\n                route: '/rxrefill/:id',\r\n                portalSettings: portalSettings\r\n            },\r\n            'myChartVisitSummary': {\r\n                state: 'myChart.myChartVisitSummary',\r\n                route: '/visitSummary/:id',\r\n                portalSettings: portalSettings\r\n            },\r\n            'myChartDocuments': {\r\n                state: 'myChart.myChartDocuments',\r\n                route: '/documents/:id',\r\n                portalSettings: portalSettings\r\n            },\r\n            'myChartProcedures': {\r\n                state: 'myChart.myChartProcedures',\r\n                route: '/procedures/:id',\r\n                portalSettings: portalSettings\r\n            },\r\n            'myChartLabResults': {\r\n                state: 'myChart.myChartLabResults',\r\n                route: '/labResults/:id',\r\n                portalSettings: portalSettings\r\n            },\r\n            'myChartImmunizations': {\r\n                state: 'myChart.myChartImmunizations',\r\n                route: '/immunizations/:id',\r\n                portalSettings: portalSettings\r\n            },\r\n            'myChartReferenceMaterial': {\r\n                state: 'myChart.myChartReferenceMaterial',\r\n                route: '/referenceMaterial/:id',\r\n                portalSettings: portalSettings\r\n            },\r\n            'myChartMedicationAllergies': {\r\n                state: 'myChart.myChartMedicationAllergies',\r\n                route: '/medicationAllergies/:id',\r\n                portalSettings: portalSettings\r\n            },\r\n            'myChartPersonalDetails': {\r\n                state: 'myChart.myChartPersonalDetails',\r\n                route: '/personalDetails/:id',\r\n                portalSettings: portalSettings\r\n            },\r\n            'shareCCD': {\r\n                state: 'shareCCD',\r\n                route: '/shareCCD/',\r\n                portalSettings: portalSettings\r\n            },\r\n            'loadingDocument': {\r\n                state: 'loadingDocument',\r\n                route: '/loadingDocument/',\r\n                portalSettings: {\r\n                    hideHeader: true,\r\n                    hideToolbar: true,\r\n                    hideFooter: true\r\n                }\r\n            },\r\n            'chartConsent': {\r\n                state: 'myChart.chartConsent',\r\n                route: '/chartConsent/:redirectRoute',\r\n                portalSettings: {\r\n                    toolbarItem: 'blank'\r\n                }\r\n            },\r\n            'myChartMobile': {\r\n                state: 'myChartMobile',\r\n                route: '/myChartMobile/:openPD',\r\n                portalSettings: portalSettings                \r\n            },\r\n            'chartMobileConsent': {\r\n                state: 'myChartMobile.chartConsent',\r\n                route: '/chartConsent/:redirectRoute',\r\n                portalSettings: portalSettings\r\n            }\r\n        };\r\n\r\n        AppRoutesProvider.setupAppRoutes(appRoutes);\r\n\r\n        $stateProvider\r\n            .state(appRoutes.myChart.state, {\r\n                url: appRoutes.myChart.route,\r\n                templateUrl: '/mychart/views/myChart.html',\r\n                controller: 'MyChartCtrl',\r\n                description: '/myChart'\r\n            })\r\n            .state(appRoutes.myChartVisitSummary.state, {\r\n                url: appRoutes.myChartVisitSummary.route,\r\n                templateUrl: '/mychart/views/visitSummary.html',\r\n                controller: 'VisitSummaryCtrl',\r\n                description: '/VisitSummary',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Visit Summary'); }\r\n                }\r\n            })\r\n            .state(appRoutes.myChartProblems.state, {\r\n                url: appRoutes.myChartProblems.route,\r\n                templateUrl: '/mychart/views/problems.html',\r\n                controller: 'ProblemsCtrl',\r\n                description: 'Problems',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Problems'); }\r\n                }\r\n            })\r\n            .state(appRoutes.myChartProcedures.state, {\r\n                url: appRoutes.myChartProcedures.route,\r\n                templateUrl: '/mychart/views/procedures.html',\r\n                controller: 'ProceduresCtrl',\r\n                description: '/Procedures',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Procedures'); }\r\n                }\r\n            })\r\n            .state(appRoutes.myChartLabResults.state, {\r\n                url: appRoutes.myChartLabResults.route,\r\n                templateUrl: '/mychart/views/labResults.html',\r\n                controller: 'LabResultsCtrl',\r\n                description: '/LabResults',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Test Results'); }\r\n                }\r\n            })\r\n            .state(appRoutes.myChartImmunizations.state, {\r\n                url: appRoutes.myChartImmunizations.route,\r\n                templateUrl: '/mychart/views/immunizations.html',\r\n                controller: 'ImmunizationsCtrl',\r\n                description: '/Immunizations',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Immunizations'); }\r\n                }\r\n            })\r\n            .state(appRoutes.myChartPrescriptions.state, {\r\n                url: appRoutes.myChartPrescriptions.route,\r\n                templateUrl: '/mychart/views/prescriptionsList.html',\r\n                controller: 'RxRefillCtrl',\r\n                description: '/Prescriptions',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Prescriptions'); }\r\n                }\r\n            })\r\n            .state(appRoutes.myChartReferenceMaterial.state, {\r\n                url: appRoutes.myChartReferenceMaterial.route,\r\n                templateUrl: '/mychart/views/referenceMaterial.html',\r\n                controller: 'ReferenceMaterialCtrl',\r\n                description: '/ReferenceMaterial',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Educational Material'); }\r\n                }\r\n            })\r\n            .state(appRoutes.myChartMedicationAllergies.state, {\r\n                url: appRoutes.myChartMedicationAllergies.route,\r\n                templateUrl: '/mychart/views/medicationAllergies.html',\r\n                controller: 'MedicationAllergiesCtrl',\r\n                description: '/ReferenceMaterial',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Medication Allergies'); }\r\n                }\r\n            })\r\n            .state(appRoutes.myChartDocuments.state, {\r\n                url: appRoutes.myChartDocuments.route,\r\n                templateUrl: '/mychart/views/patientDocuments.html',\r\n                controller: 'PatientDocumentsCtrl',\r\n                description: '/PatientDocuments',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Documents'); }\r\n                }\r\n            })\r\n            .state(appRoutes.myChartPersonalDetails.state, {\r\n                url: appRoutes.myChartPersonalDetails.route,\r\n                templateUrl: '/mychart/views/personalDetails.html',\r\n                controller: 'PersonalDetailsCtrl',\r\n                description: '/PersonalDetails',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Patient Overview'); }\r\n                }\r\n            })\r\n            .state(appRoutes.shareCCD.state, {\r\n                url: appRoutes.shareCCD.route,\r\n                templateUrl: '/mychart/views/shareCCD.html',\r\n                controller: 'ShareCCDCtrl',\r\n                description: '/PersonalDetails',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Continuity Care Document'); }\r\n                }\r\n            })\r\n            .state(appRoutes.loadingDocument.state, {\r\n                url: appRoutes.loadingDocument.route,\r\n                templateUrl: '/mychart/views/loadingDocument.html',\r\n                controller: '',\r\n                description: '/MyChart'\r\n            })\r\n            .state(appRoutes.chartConsent.state, {\r\n                url: appRoutes.chartConsent.route,\r\n                templateUrl: '/mychart/views/chartConsent.html',\r\n                controller: 'ChartConsentCtrl',\r\n                description: '/ChartConsent',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Patient Chart Consent'); }\r\n                }\r\n            })\r\n            .state(appRoutes.myChartMobile.state, {\r\n                url: appRoutes.myChartMobile.route,\r\n                templateUrl: '/mychart/views/myChartMobile.html',\r\n                controller: 'MyChartMobileCtrl',\r\n                description: '/MyChartMobile'\r\n            })\r\n            .state(appRoutes.chartMobileConsent.state, {\r\n                url: appRoutes.chartMobileConsent.route,\r\n                templateUrl: '/mychart/views/chartConsent.html',\r\n                controller: 'ChartConsentCtrl',\r\n                description: '/ChartMobileConsent',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Patient Chart Consent'); }\r\n                }\r\n            });\r\n    }]);","angular.module('mychart').run(['$templateCache', function($templateCache) {\n  'use strict';\r\n\r\n  $templateCache.put('/mychart/views/chartConsent.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-demo\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-subheading panel-flush text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Patient Chart Consent' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div id=\\\"login-consent-panel\\\" class=\\\"container-fluid container-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"panel panel-default panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"panel-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <form name=\\\"chartConsentForm\\\" ng-submit=\\\"submitForm()\\\" novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <p class=\\\"form-control-static\\\" ng-bind-html=\\\"model.PatientChartConsent.ConsentForm\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"<!--\\r\" +\r\n    \"\\n\" +\r\n    \"                                                {{::model.PatientChartConsent.ConsentForm}}\\r\" +\r\n    \"\\n\" +\r\n    \"-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <label for=\\\"agreeToConsentCheckbox\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <input type=\\\"checkbox\\\" \\r\" +\r\n    \"\\n\" +\r\n    \"                                                    id=\\\"agreeToConsentCheckbox\\\" \\r\" +\r\n    \"\\n\" +\r\n    \"                                                    name=\\\"agreeToConsentCheckbox\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    ng-model=\\\"ChartConsentVm.agreeToConsentChecked\\\" \\r\" +\r\n    \"\\n\" +\r\n    \"                                                    required/>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    &nbsp;&nbsp;{{model.AgreeCheckboxText}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div ng-show=\\\"chartConsentForm.$submitted || chartConsentForm.agreeToConsentCheckbox.$touched\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div ng-show=\\\"chartConsentForm.agreeToConsentCheckbox.$error.required\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                 class=\\\"text-danger\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                {{model.ConsentWarningMessage}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-1 col-sm-2 col-md-3\\\">&nbsp;</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-5 col-sm-4 col-md-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <button id=\\\"disagreeBtn\\\" type=\\\"button\\\" class=\\\"btn btn-default1 btn-lg btn-block\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                ng-click=\\\"disagreeToConsent()\\\"><i class=\\\"fa fa-5x\\\"></i>{{::'Disagree' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-5 col-sm-4 col-md-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <button id=\\\"agreeBtn\\\" type=\\\"submit\\\" class=\\\"btn btn-primary btn-lg btn-block\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <span class=\\\"ng-hide\\\" ng-show=\\\"submitted\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <ap-spinner></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </span><i class=\\\"fa fa-5x\\\"></i>{{::'Agree' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-1 col-sm-2 col-md-3\\\">&nbsp;</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            </form>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'An error has occurred and the chart consent could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'You do not have access to chart consent page.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/components/apPrintablePatientInfo.html',\r\n    \"<div class=\\\"visible-print-block\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div><b>{{::vm.fullName}}</b></div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <ap-date-formatter date=\\\"{{::vm.birthDate}}\\\" format=\\\"long-date\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"    <span>({{::vm.age}})</span>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/directives/apImmunizationsCard.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"        <table id=\\\"immunizations-table\\\" class=\\\"table table-striped\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <thead>\\r\" +\r\n    \"\\n\" +\r\n    \"            <tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                <th>{{::'Vaccine' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                <th>{{::'Vaccine Type' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                <th>{{::'Date' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                <th>{{::'Details' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"            <tr>\\r\" +\r\n    \"\\n\" +\r\n    \"            </thead>\\r\" +\r\n    \"\\n\" +\r\n    \"            <tbody ng-repeat=\\\"vaccine in patientImmunizations\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <tr ng-repeat=\\\"immunization in vaccine.Immunizations track by $index\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <td ng-if=\\\"$first\\\" rowspan=\\\"{{rowSpanCal(vaccine.RoutineDoses, vaccine.Immunizations.length)}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::vaccine.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                <td ng-if=\\\"immunization.Name\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::immunization.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                <td ng-if=\\\"!immunization.Name\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    &nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ap-date-formatter date=\\\"{{::immunization.AdministeredDate}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            format=\\\"short-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::immunization.Details}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </td>\\r\" +\r\n    \"\\n\" +\r\n    \"            </tr>\\r\" +\r\n    \"\\n\" +\r\n    \"            <tr ng-repeat=\\\"i in getRoutineDoses(vaccine.RoutineDoses, vaccine.Immunizations.length) track by $index\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    &nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    &nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    &nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                </td>\\r\" +\r\n    \"\\n\" +\r\n    \"            </tr>\\r\" +\r\n    \"\\n\" +\r\n    \"            </tbody>\\r\" +\r\n    \"\\n\" +\r\n    \"        </table>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/immunizations.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div id=\\\"immunizations-panel\\\" class=\\\"panel panel-default panel-flush table-responsive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"         ng-class=\\\"(modalPrint)?'hidden-print':''\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Immunizations' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            <button class=\\\"btn btn-default pull-right\\\" ng-click=\\\"viewModal()\\\">{{\\\"Download Records\\\" | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"            <span class=\\\"header-menu pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"dropdown-primary\\\" uib-dropdown>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button class=\\\"btn btn-default\\\" type=\\\"button\\\" id=\\\"vaccinecardtype-filter-btn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            uib-dropdown-toggle>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>{{'Vaccine Card Type' | translate}}&nbsp;&nbsp;</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"title-text\\\">{{model.SelectedVaccineCard.Name | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"caret\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ul class=\\\"dropdown-menu dropdown-menu-right\\\" uib-dropdown-menu role=\\\"menu\\\" id=\\\"messageSubTypeFilter\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <li class=\\\"clickable\\\" role=\\\"presentation\\\" ng-repeat=\\\"vaccineCard in model.VaccineCardList\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <a id=\\\"vaccinecardtype-filter-item-{{vaccineCard.Id}}\\\" ng-if=\\\"vaccineCard\\\" role=\\\"menuitem\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                               ng-click=\\\"loadVaccineCard(vaccineCard)\\\">{{::vaccineCard.Name | translate}}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </span>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div id=\\\"immunizations-table\\\" ng-if=\\\"!loadingVaccineCard && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-immunizations-card\\r\" +\r\n    \"\\n\" +\r\n    \"                    patient-immunizations=\\\"model.PatientImmunizations\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            </ap-immunizations-card>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loadingVaccineCard\\\" class=\\\"text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"loadingStartup || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'An error has occurred and immunizations could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak translate>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'You do not have access to this patient\\\\'s info.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/labResults.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div id=\\\"lab-results-panel\\\" class=\\\"panel panel-default panel-flush\\\" ng-class=\\\"(isModalDisplayed)?'hidden-print':''\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Test Results' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !httpError\\\" class=\\\"table-responsive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"!labResults.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'No Test Results' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <table id=\\\"lab-results-table\\\" class=\\\"table table-striped\\\" ng-if=\\\"labResults.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <thead>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <th>{{::\\\"Order Date\\\" | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <th>{{::\\\"Description\\\" | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <th>{{::\\\"Result Date\\\" | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <th>{{::\\\"Results\\\" | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <th></th>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                </thead>\\r\" +\r\n    \"\\n\" +\r\n    \"                <tbody ng-repeat=\\\"labResult in labResults track by $index\\\" ng-if=\\\"labResult\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <tr ng-repeat=\\\"attachmentInfo in labResult.AttachmentInfos track by $index\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ap-date-formatter date=\\\"{{labResult.Result.OrderDate}}\\\" format=\\\"long-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"column-text\\\">{{::labResult.Result.Description}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"column-subtext\\\">{{::labResult.Result.AttachmentType}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ap-date-formatter date=\\\"{{::labResult.Result.ResultDate}}\\\" format=\\\"long-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-1 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <i class=\\\"fa fa-file fa-lg\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-11 col-flush float-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 column-text\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <a ng-click=\\\"viewLabResultAttachment(labResult.Result.Description, attachmentInfo)\\\"><u>{{::'View Results' | translate}}</u></a>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 column-subtext\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{::attachmentInfo.Extension | uppercase}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button ap-save-to-file=\\\"downloadLabResultAttachment(labResult.Result.Description, attachmentInfo)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    ><i ng-show=\\\"!attachmentInfo.Downloading\\\" class=\\\"fa fa-download\\\"></i><ap-spinner ng-show=\\\"attachmentInfo.Downloading\\\"></ap-spinner></button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </tr>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <tr ng-if=\\\"labResult.AttachmentInfos.length <= 0\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ap-date-formatter date=\\\"{{labResult.Result.OrderDate}}\\\" format=\\\"long-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"column-text\\\">{{::labResult.Result.Description}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"column-subtext\\\">{{::labResult.Result.AttachmentType}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ap-date-formatter date=\\\"{{::labResult.Result.ResultDate}}\\\" format=\\\"long-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-1 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <i class=\\\"fa fa-file fa-lg\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-11 col-flush float-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 column-text\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <a ng-click=\\\"viewLabResultObservation(labResult.Result.Description, labResult.Result.Id)\\\"><u>{{::'View Results' | translate}}</u></a>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 column-subtext\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{ 'PDF' | uppercase}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button ap-save-to-file=\\\"downloadLabResultObservation(labResult.Result)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    ><i ng-show=\\\"!labResult.Result.Downloading\\\" class=\\\"fa fa-download\\\"></i><ap-spinner ng-show=\\\"labResult.Result.Downloading\\\"></ap-spinner></button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                </tbody>\\r\" +\r\n    \"\\n\" +\r\n    \"            </table>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'An error has occurred and the patient info could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak translate>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'You do not have access to this patient\\\\'s info.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/loadingDocument.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-primary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Loading Document' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <p>{{::'You will be redirected shortly...'| translate}}</p>\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/medicationAllergies.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-default panel-flush table-responsive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Medication Allergies' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!model.MedicationAllergies.length && !loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'There are no Medication Allergies' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <table ng-if=\\\"model.MedicationAllergies.length && !loading && !httpError\\\" class=\\\"table table-striped\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <thead>\\r\" +\r\n    \"\\n\" +\r\n    \"            <tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                <th>{{::'Record Date' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                <th>{{::'Allergen' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                <th>{{::'Reaction' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                <th>{{::'Notes' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"            <tr>\\r\" +\r\n    \"\\n\" +\r\n    \"            </thead>\\r\" +\r\n    \"\\n\" +\r\n    \"            <tbody>\\r\" +\r\n    \"\\n\" +\r\n    \"            <tr ng-repeat=\\\"group in model.MedicationAllergies track by $index\\\" ng-if=\\\"group.Allergen\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ap-date-formatter date=\\\"{{::group.PatientMedicationAllergy[0].RecordDateTime}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                          format=\\\"short-date\\\" ng-if=\\\"group.PatientMedicationAllergy[0]\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::group.Allergen}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-repeat=\\\"item in group.PatientMedicationAllergy track by $index\\\" ng-if=\\\"item.Reaction\\\">{{::item.Reaction}}<span ng-if=\\\"!$last\\\">,&nbsp;</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-repeat=\\\"item in group.PatientMedicationAllergy track by $index\\\" ng-if=\\\"item.Notes\\\">{{::item.Notes}}<span ng-if=\\\"!$last\\\">,&nbsp;</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </td>\\r\" +\r\n    \"\\n\" +\r\n    \"            </tr>\\r\" +\r\n    \"\\n\" +\r\n    \"            </tbody>\\r\" +\r\n    \"\\n\" +\r\n    \"        </table>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'An error has occurred and medication allergies could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak translate>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'You do not have access to this patient\\\\'s info.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/mobile/genericModal.html',\r\n    \"<div class=\\\"modal-body\\\" ng-bind-html=\\\"modalContent\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"modal-footer hidden-print\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-class=\\\"{'col-xs-3': !canPrint, 'col-xs-1': canPrint }\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-5\\\" ng-if=\\\"canPrint\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <button type=\\\"button\\\" class=\\\"btn btn-default\\\" ng-click=\\\"print()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Print' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-class=\\\"{'col-xs-6': !canPrint, 'col-xs-5': canPrint }\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <button type=\\\"button\\\" class=\\\"btn btn-default\\\" ng-click=\\\"ok()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Close' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-class=\\\"{'col-xs-3': !canPrint, 'col-xs-1': canPrint }\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/mobile/immunizations.html',\r\n    \"<div class=\\\"row\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div id=\\\"immunizations-panel\\\" class=\\\"panel panel-tile-secondary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable pull-right\\\" ng-click=\\\"toggleState()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"pull-right panel-collapser\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-if=\\\"tileState.isCollapsed !== false\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-expand\\\" alt=\\\"tile-expand\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-if=\\\"tileState.isCollapsed === false\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-collapse\\\" alt=\\\"tile-collapse\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable pull-right\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-click=\\\"(tileState.isCollapsed === undefined) || viewModal()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <i class=\\\"fa fa-save\\\" ng-show=\\\"tileState.isCollapsed !== undefined\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <span class=\\\"header-menu\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"dropdown-primary\\\" uib-dropdown ng-show=\\\"tileState.isCollapsed !== undefined\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button class=\\\"btn btn-default btn-icon btn-nowrap\\\" type=\\\"button\\\" id=\\\"vaccinecardtype-filter-btn\\\" uib-dropdown-toggle>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <i class=\\\"fa fa-filter\\\" />\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span class=\\\"caret\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ul class=\\\"dropdown-menu dropdown-menu-right\\\" uib-dropdown-menu role=\\\"menu\\\" id=\\\"messageSubTypeFilter\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <li class=\\\"clickable\\\" role=\\\"presentation\\\" ng-repeat=\\\"vaccineCard in model.VaccineCardList\\\" ng-if=\\\"vaccineCard.Name\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <a id=\\\"vaccinecardtype-filter-item-{{vaccineCard.Id}}\\\" ng-if=\\\"vaccineCard.Name\\\" role=\\\"menuitem\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-click=\\\"loadVaccineCard(vaccineCard); tileState.isCollapsed = false;\\\"><span><i class=\\\"fa fa-filter\\\" ng-if=\\\"model.SelectedVaccineCard.Name == vaccineCard.Name\\\" />&nbsp;{{::vaccineCard.Name | translate}}</span></a>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable\\\" ng-click=\\\"toggleState()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"pull-right ng-hide\\\" ng-show=\\\"loadingVaccineCard\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-spinner></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"panel-title\\\">{{::'Immunizations' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <ul class=\\\"list-group list-group-fixed-height\\\" uib-collapse=\\\"tileState.isCollapsed\\\" ng-if=\\\"tileState.isCollapsed !== undefined\\\" ng-show=\\\"!loadingVaccineCard && !model.ImmunizationsExist\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 text-center-vert text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>{{::'There are no Immunizations' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"            </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"            <ul class=\\\"list-group list-group-fixed-height\\\" uib-collapse=\\\"tileState.isCollapsed\\\" ng-if=\\\"tileState.isCollapsed !== undefined && model.ImmunizationsExist\\\" ng-repeat=\\\"patientImmunization in model.PatientImmunizations track by patientImmunization.Id\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item list-group-header\\\" ng-if=\\\"$index == 0\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-col-sm list-item-sub-heading overflow-ellipsis text-center-vert pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>{{::'Date' | translate }}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-content text-center-vert\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Immunization Name' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Vaccine Name' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Details' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                <li ng-repeat=\\\"immunization in patientImmunization.Immunizations track by $index\\\" ng-if=\\\"immunization.AdministeredDate\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"text-center-vert list-item-col-sm list-item-time pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ap-date-formatter date=\\\"{{::immunization.AdministeredDate}}\\\" format=\\\"short-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-content\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"list-item-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::patientImmunization.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::immunization.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"list-item-details overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::immunization.Details}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"            </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'An error has occurred and immunizations could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'You do not have access to this patient\\\\'s info.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/mobile/labResults.html',\r\n    \"<div class=\\\"row\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div id=\\\"lab-results-panel\\\" class=\\\"panel panel-tile-secondary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable pull-right\\\" ng-click=\\\"toggleState()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"pull-right panel-collapser\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-if=\\\"tileState.isCollapsed !== false\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-expand\\\" alt=\\\"tile-expand\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-if=\\\"tileState.isCollapsed === false\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-collapse\\\" alt=\\\"tile-collapse\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable\\\" ng-click=\\\"toggleState()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"pull-right ng-hide\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-spinner></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"panel-title\\\">{{::'Test Results' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <ul class=\\\"list-group list-group-fixed-height\\\" uib-collapse=\\\"tileState.isCollapsed\\\" ng-if=\\\"tileState.isCollapsed !== undefined\\\" ng-show=\\\"!loading && !labResults.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 text-center-vert text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>{{::'No Test Results' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"            </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"            <ul class=\\\"list-group list-group-fixed-height\\\" uib-collapse=\\\"tileState.isCollapsed\\\" ng-if=\\\"tileState.isCollapsed !== undefined\\\" ng-show=\\\"!loading && labResults.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item list-group-header\\\" ng-if=\\\"labResults.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-col2-xs list-item-sub-heading overflow-ellipsis text-center-vert pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"text-center-vert pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span>{{::'Download' | translate }}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-col-sm list-item-sub-heading overflow-ellipsis text-center-vert pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>{{::'Order' | translate }}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>{{::'Date' | translate }}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>{{::'Result' | translate }}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>{{::'Date' | translate }}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-content text-center-vert text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Description' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                <li ng-repeat=\\\"labResult in labResults track by $index\\\" class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-col-sm list-item-sub-heading overflow-ellipsis text-center-vert pull-right\\\" ng-init=\\\"attachmentInfo = labResult.AttachmentInfos[0]\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"text-center-vert pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span class=\\\"clickable\\\" ng-if=\\\"attachmentInfo\\\" ng-click=\\\"viewLabResultAttachment(labResult.Result.Description, attachmentInfo)\\\"><i class=\\\"fa fa-download fa-2x\\\"></i></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button ap-save-to-file=\\\"downloadLabResultObservation(labResult.Result)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <i ng-show=\\\"!labResult.Result.Downloading\\\" class=\\\"fa fa-download\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <ap-spinner ng-show=\\\"labResult.Result.Downloading\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"text-center-vert list-item-col-sm list-item-time pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div><span ap-date-formatter date=\\\"{{::labResult.Result.OrderDate}}\\\" format=\\\"short-date\\\"></span></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div><span ap-date-formatter date=\\\"{{::labResult.Result.ResultDate}}\\\" format=\\\"short-date\\\"></span></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-content\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"list-item-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::labResult.Result.Description}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"list-item-details overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::labResult.Result.AttachmentType}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"            </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'An error has occurred and the patient info could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak translate>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'You do not have access to this patient\\\\'s info.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/mobile/medicationAllergies.html',\r\n    \"<div class=\\\"row\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div id=\\\"medication-allergies-panel-mobile\\\" class=\\\"panel panel-tile-secondary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable pull-right\\\" ng-click=\\\"toggleState()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"pull-right panel-collapser\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-if=\\\"tileState.isCollapsed !== false\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-expand\\\" alt=\\\"tile-expand\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-if=\\\"tileState.isCollapsed === false\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-collapse\\\" alt=\\\"tile-collapse\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable\\\" ng-click=\\\"toggleState()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"pull-right ng-hide\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-spinner></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"panel-title\\\">{{::'Medication Allergies' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <ul class=\\\"list-group list-group-fixed-height\\\" uib-collapse=\\\"tileState.isCollapsed\\\" ng-if=\\\"tileState.isCollapsed !== undefined\\\" ng-show=\\\"!loading && model.MedicationAllergies.length == 0\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 text-center-vert text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>{{::'There are no Medication Allergies' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"            </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"            <ul class=\\\"list-group list-group-fixed-height\\\" uib-collapse=\\\"tileState.isCollapsed\\\" ng-if=\\\"tileState.isCollapsed !== undefined\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item list-group-header\\\" ng-if=\\\"model.MedicationAllergies.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-col-xs list-item-sub-heading overflow-ellipsis text-center-vert pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"text-center-vert pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span>{{::'Notes' | translate }}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-col-sm list-item-sub-heading overflow-ellipsis text-center-vert pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>{{::'Record' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>{{::'Date' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-content text-center-vert\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Disease' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Reaction' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                <li ng-repeat=\\\"group in model.MedicationAllergies track by $index\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-col-xs list-item-sub-heading overflow-ellipsis text-center-vert pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-repeat=\\\"item in group.PatientMedicationAllergy track by $index\\\" ng-if=\\\"item.Notes\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::item.Notes}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ng-if=\\\"!$last\\\">,&nbsp;</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"text-center-vert list-item-col-sm list-item-time pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ap-date-formatter date=\\\"{{::group.PatientMedicationAllergy[0].RecordDateTime}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                  format=\\\"short-date\\\" ng-if=\\\"group.PatientMedicationAllergy[0]\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-content\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::group.Allergen}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"list-item-details overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ng-repeat=\\\"item in group.PatientMedicationAllergy track by $index\\\" ng-if=\\\"item.Reaction\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::item.Reaction}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-if=\\\"!$last\\\">,&nbsp;</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"            </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'An error has occurred and medication allergies could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'You do not have access to this patient\\\\'s info.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/mobile/personalDetails.html',\r\n    \"<div class=\\\"row\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <form name=\\\"editPatientDetailsForm\\\" ng-submit=\\\"saveUpdateDetailsRequest(this.editPatientDetailsForm)\\\" novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div id=\\\"patient-details-panel\\\" class=\\\"panel panel-tile-secondary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"clickable pull-right\\\" ng-click=\\\"toggleState()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"pull-right panel-collapser\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ng-if=\\\"tileState.isCollapsed !== false\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-expand\\\" alt=\\\"tile-expand\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ng-if=\\\"tileState.isCollapsed === false\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-collapse\\\" alt=\\\"tile-collapse\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"clickable pull-right\\\" ng-show=\\\"config.UpdateDemographics.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                         ng-click=\\\"(tileState.isCollapsed === undefined) || saving || (edit ? cancelEdit() : editDetails())\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <i class=\\\"fa\\\" ng-class=\\\"{'fa-pencil': !edit, 'fa-undo': edit}\\\" ng-show=\\\"tileState.isCollapsed !== undefined\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"clickable pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button class=\\\"btn btn-default btn-icon\\\" type=\\\"submit\\\" ng-hide=\\\"(tileState.isCollapsed === undefined) || saving || !edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <i class=\\\"fa fa-save\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"clickable\\\" ng-click=\\\"toggleState()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"pull-right ng-hide\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <ap-spinner></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"panel-title\\\">{{::'Personal Details' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-include=\\\"'/mychart/views/personalDetailsCommon.html'\\\" ng-if=\\\"tileState.isCollapsed !== undefined\\\" uib-collapse=\\\"tileState.isCollapsed\\\" />\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </form>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'An error has occurred and the patient info could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'You do not have access to this patient\\\\'s info.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/mobile/prescriptionsList.html',\r\n    \"<div class=\\\"row\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div id=\\\"prescriptions-panel-mobile\\\" class=\\\"panel panel-tile-secondary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable pull-right\\\" ng-click=\\\"toggleState()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"pull-right panel-collapser\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-if=\\\"tileState.isCollapsed !== false\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-expand\\\" alt=\\\"tile-expand\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-if=\\\"tileState.isCollapsed === false\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-collapse\\\" alt=\\\"tile-collapse\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <span class=\\\"header-menu\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"dropdown-primary\\\" uib-dropdown ng-show=\\\"tileState.isCollapsed !== undefined\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button class=\\\"btn btn-default btn-nowrap btn-icon\\\" type=\\\"button\\\" id=\\\"recent-filter-btn\\\" uib-dropdown-toggle>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <i class=\\\"fa fa-filter\\\" />\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span class=\\\"caret\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ul class=\\\"dropdown-menu dropdown-menu-right\\\" uib-dropdown-menu role=\\\"menu\\\" id=\\\"daysFilter\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <li class=\\\"clickable\\\" role=\\\"presentation\\\" ng-repeat=\\\"medFilter in medFilters\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <a id=\\\"day-filter-item-{{medFilter.Id}}\\\" role=\\\"menuitem\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-click=\\\"updateFilteredPrescriptions(medFilter); tileState.isCollapsed = false;\\\"><span><i class=\\\"fa fa-filter\\\" ng-if=\\\"activeFilter.Name == medFilter.Name\\\" />&nbsp;{{::medFilter.Name | translate}}</span></a>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable\\\" ng-click=\\\"toggleState()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"pull-right ng-hide\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-spinner></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"panel-title\\\">{{::'Prescriptions' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <ul class=\\\"list-group list-group-fixed-height\\\" uib-collapse=\\\"tileState.isCollapsed\\\" ng-if=\\\"tileState.isCollapsed !== undefined\\\" ng-show=\\\"!loading && !filteredPrescriptions.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 text-center-vert text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>{{::'No prescriptions' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"            </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"            <ul class=\\\"list-group list-group-fixed-height\\\" uib-collapse=\\\"tileState.isCollapsed\\\" ng-if=\\\"tileState.isCollapsed !== undefined\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item list-group-header\\\" ng-if=\\\"filteredPrescriptions.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-if=\\\"featureList.RequestRxRefills.IsActive\\\" class=\\\"list-item-col2-xs list-item-sub-heading overflow-ellipsis text-center-vert pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"text-center-vert pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span>{{::'Refill' | translate }}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-col-sm list-item-sub-heading overflow-ellipsis text-center-vert pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>{{::'Status' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>{{::'Duration' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-content text-center-vert\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Drug + Directions' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                <li ng-repeat=\\\"med in filteredPrescriptions track by med.RelPatientMedicationId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-if=\\\"featureList.RequestRxRefills.IsActive && !med.IsDiscontinued\\\" class=\\\"list-item-col2-xs list-item-sub-heading overflow-ellipsis text-center-vert pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button class=\\\"btn btn-default\\\" data-transition-to=\\\"{appRoute: 'rxrefill'}\\\" ng-click=\\\"medSelect(med)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <i class=\\\"fa fa-medkit fa-2x\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"text-center-vert list-item-col-sm list-item-time pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div><span>{{::med.IsActive ? dateDiff(med.EndDate) : ''}}</span></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div><span ap-date-formatter date=\\\"{{::med.StartDate}}\\\" format=\\\"short-date\\\"></span></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div><span>-</span></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div><span ap-date-formatter date=\\\"{{::med.EndDate}}\\\" format=\\\"short-date\\\"></span></div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-if=\\\"med.RefillRequestPending && !med.IsDiscontinued\\\"><span>{{::'Pending Review' | translate}}</span></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-if=\\\"med.IsDiscontinued\\\"><span>{{::'Discontinued' | translate}}</span></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-content clickable\\\" ng-click=\\\"viewModal(med.RelPatientMedicationId)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::med.DrugName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"list-item-details overflow-wrap\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::med.Instructions}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"            </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'An error has occurred and the patient medications could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'You do not have access to this patient\\\\'s medications.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/mobile/problems.html',\r\n    \"<div class=\\\"row\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div id=\\\"problems-panel-mobile\\\" class=\\\"panel panel-tile-secondary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable pull-right\\\" ng-click=\\\"toggleState()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"pull-right panel-collapser\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-if=\\\"tileState.isCollapsed !== false\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-expand\\\" alt=\\\"tile-expand\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-if=\\\"tileState.isCollapsed === false\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-collapse\\\" alt=\\\"tile-collapse\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <span class=\\\"header-menu\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"dropdown-primary\\\" uib-dropdown ng-show=\\\"tileState.isCollapsed !== undefined\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button class=\\\"btn btn-default btn-icon btn-nowrap\\\" type=\\\"button\\\" id=\\\"active-filter-btn\\\" uib-dropdown-toggle>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <i class=\\\"fa fa-filter\\\" />\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span class=\\\"caret\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ul class=\\\"dropdown-menu dropdown-menu-right\\\" uib-dropdown-menu role=\\\"menu\\\" id=\\\"activeFilter\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <li class=\\\"clickable\\\" role=\\\"presentation\\\" ng-repeat=\\\"activeFilter in activeFilters\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <a id=\\\"active-filter-item-{{activeFilter.Id}}\\\" role=\\\"menuitem\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-click=\\\"update(activeFilter.Id); tileState.isCollapsed = false;\\\"><span><i class=\\\"fa fa-filter\\\" ng-if=\\\"problem.activeName == activeFilter.Name\\\" />&nbsp;{{::activeFilter.Name | translate}}</span></a>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable\\\" ng-click=\\\"toggleState()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"pull-right ng-hide\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-spinner></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"panel-title\\\">{{::'Problems' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <ul class=\\\"list-group list-group-fixed-height\\\" uib-collapse=\\\"tileState.isCollapsed\\\" ng-if=\\\"tileState.isCollapsed !== undefined\\\" ng-show=\\\"!loading && filteredProblems.length == 0\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 text-center-vert text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>{{::'No problems have been entered' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"            </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"            <ul class=\\\"list-group list-group-fixed-height\\\" uib-collapse=\\\"tileState.isCollapsed\\\" ng-if=\\\"tileState.isCollapsed !== undefined\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item list-group-header\\\" ng-if=\\\"filteredProblems.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-col-sm list-item-sub-heading overflow-ellipsis text-center-vert pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>{{::'Status' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>{{::'Duration' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-content text-center-vert\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Disease' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Notes' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                <li ng-repeat=\\\"prob in filteredProblems track by $index\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"text-center-vert list-item-col-sm list-item-time pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div><span>{{prob.IsActive ? ('Active' | translate) : ('Not Active' | translate)}}</span></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div><span ap-date-formatter date=\\\"{{::prob.Date}}\\\" format=\\\"short-date\\\"></span></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div><span>-</span></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div><span ng-if=\\\"prob.Duration\\\" ap-date-formatter date=\\\"{{::prob.Duration}}\\\" format=\\\"short-date\\\"></span><span ng-if=\\\"!prob.Duration\\\">-----</span></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-content\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::prob.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"list-item-details overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::prob.Notes}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"            </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'An error has occurred and the patient info could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'You do not have access to this patient\\\\'s info.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/mobile/procedures.html',\r\n    \"<div class=\\\"row\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div id=\\\"procedures-panel-mobile\\\" class=\\\"panel panel-tile-secondary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable pull-right\\\" ng-click=\\\"toggleState()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"pull-right panel-collapser\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-if=\\\"tileState.isCollapsed !== false\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-expand\\\" alt=\\\"tile-expand\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-if=\\\"tileState.isCollapsed === false\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-collapse\\\" alt=\\\"tile-collapse\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable\\\" ng-click=\\\"toggleState()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"pull-right ng-hide\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-spinner></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"panel-title\\\">{{::'Procedures' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <ul class=\\\"list-group list-group-fixed-height\\\" uib-collapse=\\\"tileState.isCollapsed\\\" ng-if=\\\"tileState.isCollapsed !== undefined\\\" ng-show=\\\"!loading && !procedures.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 text-center-vert text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>{{::'There are no procedures' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"            </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"            <ul class=\\\"list-group list-group-fixed-height\\\" uib-collapse=\\\"tileState.isCollapsed\\\" ng-if=\\\"tileState.isCollapsed !== undefined\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item list-group-header\\\" ng-if=\\\"procedures.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-col-sm list-item-sub-heading overflow-ellipsis text-center-vert pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>{{::'Date' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-content text-center-vert\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Procedure' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Description' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                <li ng-repeat=\\\"proc in procedures track by $index\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"text-center-vert list-item-col-sm list-item-time pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div><span ap-date-formatter date=\\\"{{::proc.VisitDate}}\\\" format=\\\"short-date\\\"></span></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-content clickable\\\" ng-click=\\\"viewModal(proc.Id)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::proc.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"list-item-details overflow-wrap\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::proc.Description}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"            </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'An error has occurred and the patient info could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'You do not have access to this patient\\\\'s info.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/mobile/referenceMaterial.html',\r\n    \"<div class=\\\"row\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div id=\\\"reference-material-panel-mobile\\\" class=\\\"panel panel-tile-secondary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable pull-right\\\" ng-click=\\\"toggleState()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"pull-right panel-collapser\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-show=\\\"tileState.isCollapsed !== false\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-expand\\\" alt=\\\"tile-expand\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-show=\\\"tileState.isCollapsed === false\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-collapse\\\" alt=\\\"tile-collapse\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"header-menu\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"dropdown-primary\\\" uib-dropdown ng-show=\\\"tileState.isCollapsed !== undefined\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button class=\\\"btn btn-default btn-icon btn-nowrap\\\" type=\\\"button\\\" id=\\\"language-filter-btn\\\" uib-dropdown-toggle>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <i class=\\\"fa fa-filter\\\" />\\r\" +\r\n    \"\\n\" +\r\n    \"                                <span class=\\\"caret\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <ul class=\\\"dropdown-menu dropdown-menu-right\\\" uib-dropdown-menu role=\\\"menu\\\" id=\\\"languageFilter\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <li class=\\\"clickable\\\" role=\\\"presentation\\\" ng-repeat=\\\"language in model.LanguageOptions\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <a id=\\\"language-filter-item-{{language.Id}}\\\" role=\\\"menuitem\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    ng-click=\\\"updateActiveLanguage(language, true)\\\"><span><i class=\\\"fa fa-filter\\\" ng-if=\\\"model.ActiveLanguage.Description == language.Description\\\" />&nbsp;{{::language.Description | translate}}</span></a>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable\\\" ng-click=\\\"toggleState()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"pull-right ng-hide\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-spinner></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"panel-title\\\">{{::'Educational Material' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <ul class=\\\"list-group list-group-fixed-height\\\" uib-collapse=\\\"tileState.isCollapsed\\\" ng-if=\\\"tileState.isCollapsed !== undefined\\\" ng-show=\\\"!loading && !model.EducationalMaterial.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 text-center-vert text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>{{::'No Reference Material found.' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"            </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"            <ul class=\\\"list-group list-group-fixed-height\\\" uib-collapse=\\\"tileState.isCollapsed\\\" ng-if=\\\"tileState.isCollapsed !== undefined\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item list-group-header\\\" ng-if=\\\"model.EducationalMaterial.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-col2-xs list-item-sub-heading overflow-ellipsis text-center-vert pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>{{::'View Form' | translate }}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"text-center-vert pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">{{::'Description' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">{{::'Available Languages' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                <li ng-repeat=\\\"formGroup in model.EducationalMaterial track by $index\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-col2-xs list-item-sub-heading overflow-ellipsis text-center-vert pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button class=\\\"btn btn-default1\\\" ng-click=\\\"viewReferenceMaterial(formGroup.GroupName, formGroup.Forms)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <i class=\\\"fa fa-file fa-2x\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"text-center-vert\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"list-item-sub-heading\\\">{{::formGroup.GroupName | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"list-item-details\\\"><span ng-repeat=\\\"refForm in formGroup.Forms track by $index\\\">{{::refForm.Language.Description | translate}}<span\\r\" +\r\n    \"\\n\" +\r\n    \"                                ng-if=\\\"!$last\\\">,&nbsp;</span></span></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"            </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'An error has occurred and the patient info could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'You do not have access to this patient\\\\'s info.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/mobile/visitSummary.html',\r\n    \"<div class=\\\"row\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div id=\\\"visit-summary-panel\\\" class=\\\"panel panel-tile-secondary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable pull-right\\\" ng-click=\\\"tileState.isCollapsed = !tileState.isCollapsed\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"pull-right panel-collapser\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-if=\\\"tileState.isCollapsed\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-expand\\\" alt=\\\"tile-expand\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-if=\\\"!tileState.isCollapsed\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-collapse\\\" alt=\\\"tile-collapse\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"clickable\\\" ng-click=\\\"tileState.isCollapsed = !tileState.isCollapsed\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"panel-title\\\">{{::'Visit Summary' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <ul class=\\\"list-group list-group-fixed-height\\\" uib-collapse=\\\"tileState.isCollapsed\\\" ng-show=\\\"!loading && !visits.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 text-center-vert text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>{{::'No completed Visit Summaries were found' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"            </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"            <ul class=\\\"list-group list-group-fixed-height\\\" uib-collapse=\\\"tileState.isCollapsed\\\" ng-show=\\\"!loading && visits.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <li class=\\\"list-group-item list-group-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-col2-xs list-item-sub-heading overflow-ellipsis text-center-vert pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>{{::'Download' | translate }}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-col-sm list-item-sub-heading overflow-ellipsis text-center-vert pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>{{::'Date' | translate }}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-content text-center-vert\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Clinical Note Type' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Diagnoses' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Provider' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                <li ng-repeat=\\\"visit in visits track by $index\\\" class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-col-xs list-item-sub-heading overflow-ellipsis text-center-vert pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"text-center-vert pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span class=\\\"clickable\\\" ng-click=\\\"viewVisitSummary(visit.VisitId, visit.Date)\\\"><i class=\\\"fa fa-download fa-2x\\\"></i></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"text-center-vert list-item-col-sm list-item-time pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ap-date-formatter date=\\\"{{::visit.Date}}\\\" format=\\\"short-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"list-item-content\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"list-item-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::visit.ClinicalNoteTypeName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"list-item-sub-heading overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-repeat=\\\"diagnosisName in ::visit.Diagnosis\\\">{{::diagnosisName}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"list-item-details overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::visit.Provider}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"            </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'An error has occurred and the patient info could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak translate>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'You do not have access to this patient\\\\'s info.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/modals/ccdAccessLog.html',\r\n    \"<div class=\\\"modal-default\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"cancel()\\\"><span>&times;</span></button>\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"modal-subtitle\\\">{{'Access Log' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-body modal-max-height\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !model.AccessLog.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'No logs found.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <table ng-if=\\\"!loading && model.AccessLog.length\\\" class=\\\"table table-striped table-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <thead>\\r\" +\r\n    \"\\n\" +\r\n    \"            <tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                <th>{{::'Disclosure Date' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                <th>{{::'Patient' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                <th>{{::'Portal Login Name' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                <th>{{::'Disclosure Purpose' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"            <tr>\\r\" +\r\n    \"\\n\" +\r\n    \"            </thead>\\r\" +\r\n    \"\\n\" +\r\n    \"            <tbody>\\r\" +\r\n    \"\\n\" +\r\n    \"            <tr ng-repeat=\\\"log in model.AccessLog\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ap-date-formatter date=\\\"{{::log.DisclosureDatetime}}\\\" format=\\\"short-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::log.DisclosedByName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::log.PortalLoginName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::log.DisclosurePurpose}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </td>\\r\" +\r\n    \"\\n\" +\r\n    \"            </tr>\\r\" +\r\n    \"\\n\" +\r\n    \"            </tbody>\\r\" +\r\n    \"\\n\" +\r\n    \"        </table>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-footer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"btn btn-default btn-lg text-center\\\" ng-click=\\\"ok()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Close' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/modals/ccdTransmit.html',\r\n    \"<div class=\\\"modal-default\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <form name=\\\"transmitCcdForm\\\" ng-submit=\\\"submitTransferRequest()\\\" novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"cancel()\\\"><span>&times;</span></button>\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"modal-subtitle\\\">{{'Transmit CCD' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"modal-body\\\" ng-if=\\\"!loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center has-error\\\" ng-if=\\\"!isConfigured\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{'Transmit feature is disabled. The transmit feature has not been configured.'}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <label class=\\\"control-label\\\" for=\\\"SendType\\\">{{::'Type' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <select\\r\" +\r\n    \"\\n\" +\r\n    \"                                        class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        name=\\\"SendType\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        id=\\\"SendType\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-model=\\\"model.SendType\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-options=\\\"item.Type for item in model.SendTypeList | filter:{Enabled:true}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ap-required=true>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </select>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-show=\\\"model.SendType.Type === 'Email'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Email over the internet is not secure. Information in an email, including attachments, can be intercepted and read by parties other than the person to whom it is addressed.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"form-group\\\" ng-show=\\\"model.SendType.Type !== 'Email'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label class=\\\"control-label\\\" for=\\\"fromProvider\\\">{{::'From User' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    name=\\\"DirectMailUser\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    id=\\\"fromProvider\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    ng-model=\\\"model.DirectMailUser.FullName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    ng-disabled=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    ap-required=\\\"model.SendType.Type !== 'Email'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"form-group\\\" ng-show=\\\"model.SendType.Type === 'Email'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label class=\\\"control-label\\\" for=\\\"directMailAddress\\\">{{::'To Name' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        name=\\\"ToName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        id=\\\"toName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-model=\\\"model.ToName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ap-required=\\\"model.SendType.Type === 'Email'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"form-group\\\" ng-show=\\\"model.SendType.Type !== 'Email'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <label class=\\\"control-label\\\" for=\\\"directMailAddress\\\">{{::'To Direct Mail Address' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   name=\\\"DirectMailAddressTo\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   id=\\\"directMailAddress\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-model=\\\"model.DirectMailAddressTo\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ap-required=\\\"model.SendType.Type !== 'Email'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"form-group\\\" ng-show=\\\"model.SendType.Type === 'Email'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <label class=\\\"control-label\\\" for=\\\"directMailAddress\\\">{{::'Email' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   name=\\\"Email\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   id=\\\"email\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-model=\\\"model.Email\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ap-required=\\\"model.SendType.Type === 'Email'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <label class=\\\"control-label\\\" for=\\\"documentType\\\">{{::'Document Type' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <select\\r\" +\r\n    \"\\n\" +\r\n    \"                                        class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        name=\\\"DocumentType\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        id=\\\"documentType\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-model=\\\"model.DocumentType\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-options=\\\"item.Type for item in model.DocumentTypeList\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ap-required>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </select>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <label class=\\\"control-label\\\" for=\\\"subject\\\">{{::'Subject' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   name=\\\"Subject\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   id=\\\"subject\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-model=\\\"model.Subject\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ap-required>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <label class=\\\"control-label\\\" for=\\\"messageInput\\\">{{::'Message' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   name=\\\"Message\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   id=\\\"messageInput\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-model=\\\"model.Message\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ap-required>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center\\\" ng-if=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"modal-footer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-2\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button type=\\\"submit\\\" class=\\\"btn btn-primary btn-lg\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    ng-disabled=\\\"loading || transmitting || !isConfigured\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"ng-hide\\\" ng-show=\\\"transmitting\\\"><ap-spinner></ap-spinner></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'Submit' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button type=\\\"button\\\" class=\\\"btn btn-default btn-lg\\\" ng-click=\\\"cancel()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'Cancel' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-2\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </form>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/modals/completeChartModal.html',\r\n    \"<div class=\\\"modal-dialog-report\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-header hidden-print\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"cancel()\\\"><span>&times;</span></button>\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"modal-subtitle\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <span ng-if=\\\"loadingCompleteChart\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Downloading patient chart for ' | translate}} {{model.FullName}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </span>\\r\" +\r\n    \"\\n\" +\r\n    \"            <span ng-if=\\\"!loadingCompleteChart\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Patient chart for ' | translate }} {{model.FullName}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </span>\\r\" +\r\n    \"\\n\" +\r\n    \"        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loadingCompleteChart || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loadingCompleteChart\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loadingCompleteChart && !isCompleteChartError\\\" id=\\\"my-complete-chart\\\" name=\\\"my-complete-chart\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <iframe ng-src=\\\"{{model.CompleteChartData}}\\\"></iframe>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loadingCompleteChart && (httpError || isCompleteChartError)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert ng-show=\\\"!isCompleteChartError\\\" type=\\\"danger\\\">{{::'An error has occurred generating the patient chart and could not be loaded.' | translate}}</uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert ng-show=\\\"httpError.is403\\\" type=\\\"danger\\\">{{::'You do not have access to download the patient chart.' | translate}}</uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-show=\\\"!loadingCompleteChart && isCompleteChartError\\\" name=\\\"complete-chart-error-div\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-bind-html=\\\"model.CompleteChartErrorMessageHtml\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-footer hidden-print\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class = \\\"col-xs-2\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"displayPrintButton\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button type=\\\"button\\\" class=\\\"btn btn-default1 btn-lg\\\" ng-click=\\\"print()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'Print' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button type=\\\"button\\\" class=\\\"btn btn-default2 btn-lg\\\" ng-click=\\\"ok()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'Close' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"!displayPrintButton\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-8\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button type=\\\"button\\\" class=\\\"btn btn-default1 btn-lg\\\" ng-click=\\\"ok()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'Close' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class = \\\"col-xs-2\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/modals/immunizationModal.html',\r\n    \"<div class=\\\"modal-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <ap-printable-practice-info></ap-printable-practice-info>\\r\" +\r\n    \"\\n\" +\r\n    \"    <ap-printable-patient-info></ap-printable-patient-info>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"!model.PatientImmunizations.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        {{::'There are no Immunizations' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"model.PatientImmunizations.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <ap-immunizations-card\\r\" +\r\n    \"\\n\" +\r\n    \"                patient-immunizations=\\\"model.PatientImmunizations\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        </ap-immunizations-card>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"modal-footer hidden-print\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-2\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <button type=\\\"button\\\" class=\\\"btn btn-default1 btn-lg\\\" ng-click=\\\"print()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Print' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <button type=\\\"button\\\" class=\\\"btn btn-default btn-lg\\\" ng-click=\\\"ok()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Close' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-2\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/modals/labResultPrintDownloadModal.html',\r\n    \"<div class=\\\"modal-dialog-report\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-header hidden-print\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"cancel()\\\"><span>&times;</span></button>\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"modal-subtitle\\\">{{attachmentInfo.Description}} : {{attachmentInfo.Name}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loadingLabResult || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loadingLabResult\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loadingLabResult && (isImage || isHtml || isText)\\\" id=\\\"my-lab-result\\\" name=\\\"my-lab-result\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <iframe ng-src=\\\"{{model.LabResultData}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            </iframe>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"              <span>{{'Unable to view? Download ' | translate}}<a\\r\" +\r\n    \"\\n\" +\r\n    \"                      ap-save-pdf-to-file=\\\"{{model.ByteArray}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                      file-name=\\\"{{model.PdfFileName}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                      content-type=\\\"{{model.ContentType}}\\\">{{'here.' | translate}}</a></span>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-show=\\\"!isHtml && !isText && !isImage && !loadingAttachment && !$root.httpError\\\" name=\\\"viewer-unsupported\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <span ng-show=\\\"attachmentInfo.Extension\\\" class=\\\"warning\\\">{{::'Attachment type is not supported' | translate}} ({{attachmentInfo.Extension}}).</span>\\r\" +\r\n    \"\\n\" +\r\n    \"            <span ng-show=\\\"!attachmentInfo.Extension\\\" class=\\\"warning\\\">{{::'Attachment type is not known and cannot be displayed.' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-footer hidden-print\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class = \\\"col-xs-2\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"displayPrintButton\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button type=\\\"button\\\" class=\\\"btn btn-default1 btn-lg\\\" ng-click=\\\"print()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Print' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button type=\\\"button\\\" class=\\\"btn btn-default2 btn-lg\\\" ng-click=\\\"ok()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Close' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"!displayPrintButton\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-8\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button type=\\\"button\\\" class=\\\"btn btn-default1 btn-lg\\\" ng-click=\\\"ok()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Close' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class = \\\"col-xs-2\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/modals/observationOrderPrintDownloadModal.html',\r\n    \"<div class=\\\"modal-dialog-report\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-header hidden-print\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"cancel()\\\"><span>&times;</span></button>\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"modal-subtitle\\\">{{resultInfo.Description}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loadingLabResult || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loadingLabResult\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loadingLabResult\\\" id=\\\"my-observation-order-result\\\" name=\\\"my-observation-order-result\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <iframe ng-src=\\\"{{model.ObservationOrderData}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            </iframe>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"              <span>{{'Unable to view? Download ' | translate}}<a\\r\" +\r\n    \"\\n\" +\r\n    \"                      ap-save-pdf-to-file=\\\"{{model.ByteArray}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                      file-name=\\\"{{model.PdfFileName}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                      content-type=\\\"{{model.ContentType}}\\\">{{'here.' | translate}}</a></span>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-footer hidden-print\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class = \\\"col-xs-2\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"displayPrintButton\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button type=\\\"button\\\" class=\\\"btn btn-default1 btn-lg\\\" ng-click=\\\"print()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'Print' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button type=\\\"button\\\" class=\\\"btn btn-default2 btn-lg\\\" ng-click=\\\"ok()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'Close' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"!displayPrintButton\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-8\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button type=\\\"button\\\" class=\\\"btn btn-default1 btn-lg\\\" ng-click=\\\"ok()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'Close' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class = \\\"col-xs-2\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/modals/pharmacySearch.html',\r\n    \"<div class=\\\"modal-default\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"cancel()\\\"><span>&times;</span></button>\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"modal-subtitle\\\">{{::'Preferred Pharmacy' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-body modal-max-height\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <label class=\\\"control-label\\\">{{::'Current:' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\" id=\\\"currentPharmaciesList\\\" ng-repeat=\\\"pharmacy in pharmacies track by $index\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12 col-md-2\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{pharmacy.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12 col-md-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div>{{pharmacy.Address.Address1}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div>{{pharmacy.Address.Address2}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-2 col-md-1\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{pharmacy.Address.State}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-3 col-md-2\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{pharmacy.Address.Zip}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-4 col-md-2\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{pharmacy.Phone.PhoneNumber | tel}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-3 col-md-2\\\" ng-click=\\\"removePharmacy($index)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <i class=\\\"fa fa-minus-circle\\\"></i>&nbsp;{{::'Remove' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           id=\\\"searchZip\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           name=\\\"searchZip\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ng-model=\\\"searchPharmaciesParams.Zip\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ng-change=\\\"submitZip()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           placeholder=\\\"Zip Code\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           id=\\\"searchPhoneNumber\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           name=\\\"searchPhoneNumber\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ng-model=\\\"searchPharmaciesParams.PhoneNumber\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ng-change=\\\"submitPhoneNumber()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           placeholder=\\\"Phone Number\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button id=\\\"search-pharmacies-btn\\\" class=\\\"btn btn-default1\\\" ng-click=\\\"searchPharmacies()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{'Search Pharmacy' |translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <!--<div class=\\\"panel panel-results\\\">-->\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-show=\\\"noResults\\\">{{::'No Results Found' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-repeat=\\\"pharmacy in pharmacyResults\\\" ng-if=\\\"pharmacy\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-md-2\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{pharmacy.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-md-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>{{pharmacy.Address.Address1}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>{{pharmacy.Address.Address2}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-2 col-md-1\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{pharmacy.Address.State}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-3 col-md-2\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{pharmacy.Address.Zip}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-4 col-md-2\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{pharmacy.Phone.PhoneNumber}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-3 col-md-2\\\" ng-click=\\\"addPharmacy($index, pharmacy)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <i class=\\\"fa fa-plus-circle\\\"></i>&nbsp;{{::'Add' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-footer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-primary text-center btn-lg\\\" id=\\\"ok-btn\\\" ng-click=\\\"ok()\\\">{{::'OK' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-default2 text-center btn-lg\\\" id=\\\"cancel-btn\\\" ng-click=\\\"cancel()\\\">{{::'Cancel' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/myChart.html',\r\n    \"<div class=\\\"container-fluid container-flush\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel panel-primary panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-header ap-mychart-border hidden-print\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <img class=\\\"rounded-corner-md border-width-md extra-dark-grey-border list-item-thumbnail ap-mychart-align-left\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    lazy-src=\\\"{{myChart.User.Id | apPatientPortalThumbnailSrc:83:82}}\\\" endpoint-base='patient' alt=\\\"patient-image\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-title ap-mychart-title\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"font-patient-name\\\">{{::myChart.User.FullName}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-if=\\\"Date\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-date-formatter date=\\\"Date\\\" format=\\\"long-date\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>({{myChart.User.Age}})</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-body col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-4 col-sm-3 col-md-3 col-lg-2 col-flush-left\\\" ng-if=\\\"ShowSidebar\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"ap-mychart-nav ap-mychart-align-left hidden-print\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-click=\\\"expandMedicalDetails()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-class=\\\"(!collapseMedicalHistory)?'ap-mychart-nav-focus':''\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label>{{::'Medical History' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <i ng-show=\\\"collapseMedicalHistory\\\" class=\\\"pull-right fa fa-caret-down\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <uib-tabset class=\\\"list-unstyled\\\" vertical=\\\"true\\\" uib-collapse=\\\"collapseMedicalHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <uib-tab ng-show=\\\"myChart.Config.ViewClinicalSummary.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     data-transition-to=\\\"{appRoute: myChart.Config.ViewClinicalSummary.Route, opts : {id: myChart.User.Id}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <uib-tab-heading id=\\\"myChart.Config.ViewClinicalSummary.Id\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{:: 'Visit Summaries' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </uib-tab-heading>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </uib-tab>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <uib-tab ng-show=\\\"myChart.Config.ViewDocuments.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     data-transition-to=\\\"{appRoute: myChart.Config.ViewDocuments.Route, opts : {id: myChart.User.Id}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <uib-tab-heading id=\\\"myChart.Config.ViewDocuments.Id\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{:: 'Documents' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </uib-tab-heading>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </uib-tab>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <uib-tab ng-show=\\\"myChart.Config.ViewProblems.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     data-transition-to=\\\"{appRoute: myChart.Config.ViewProblems.Route, opts : {id: myChart.User.Id}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <uib-tab-heading id=\\\"myChart.Config.ViewProblems.Id\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{:: 'Problems' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </uib-tab-heading>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </uib-tab>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <uib-tab ng-show=\\\"myChart.Config.ViewMedications.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     data-transition-to=\\\"{appRoute: myChart.Config.ViewMedications.Route, opts : {id: myChart.User.Id}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <uib-tab-heading id=\\\"myChart.Config.ViewMedications.Id\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{:: 'Medications' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </uib-tab-heading>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </uib-tab>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <uib-tab ng-show=\\\"myChart.Config.ViewProcedures.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     data-transition-to=\\\"{appRoute: myChart.Config.ViewProcedures.Route, opts : {id: myChart.User.Id}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <uib-tab-heading id=\\\"myChart.Config.ViewProcedures.Id\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{:: 'Procedures' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </uib-tab-heading>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </uib-tab>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <uib-tab ng-show=\\\"myChart.Config.ViewLabResults.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     data-transition-to=\\\"{appRoute: myChart.Config.ViewLabResults.Route, opts : {id: myChart.User.Id}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <uib-tab-heading id=\\\"myChart.Config.ViewLabResults.Id\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{:: 'Test Results' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </uib-tab-heading>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </uib-tab>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <uib-tab ng-show=\\\"myChart.Config.ViewImmunizations.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     data-transition-to=\\\"{appRoute: myChart.Config.ViewImmunizations.Route, opts : {id: myChart.User.Id}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <uib-tab-heading id=\\\"myChart.Config.ViewImmunizations.Id\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{:: 'Immunizations' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </uib-tab-heading>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </uib-tab>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <uib-tab ng-show=\\\"myChart.Config.ViewEducationMaterial.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     data-transition-to=\\\"{appRoute: myChart.Config.ViewEducationMaterial.Route, opts : {id: myChart.User.Id}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <uib-tab-heading id=\\\"myChart.Config.ViewEducationMaterial.Id\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{:: 'Educational Material' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </uib-tab-heading>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </uib-tab>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <uib-tab ng-show=\\\"myChart.Config.ViewMedicationAllergies.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     data-transition-to=\\\"{appRoute: myChart.Config.ViewMedicationAllergies.Route, opts : {id: myChart.User.Id}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <uib-tab-heading id=\\\"myChart.Config.ViewMedicationAllergies.Id\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{:: 'Medication Allergies' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </uib-tab-heading>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </uib-tab>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </uib-tabset>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"ap-mychart-nav-divider\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-click=\\\"expandPersonalDetails()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                 data-transition-to=\\\"{appRoute: myChart.Config.UpdateDemographics.Route, opts : {id: myChart.User.Id}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-class=\\\"(!collapsePersonalDetails)?'ap-mychart-nav-focus':''\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label\\r\" +\r\n    \"\\n\" +\r\n    \"                                           id=\\\"myChart.Config.UpdateDemographics.Id\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{::'Personal Details' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <i ng-show=\\\"collapsePersonalDetails\\\" class=\\\"pull-right fa fa-caret-down\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <uib-tabset verical=\\\"true\\\" uib-collapse=\\\"collapsePersonalDetails\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <uib-tab>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <uib-tab-heading>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{::'Patient Overview' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </uib-tab-heading>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </uib-tab>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </uib-tabset>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"ap-mychart-nav-divider\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"ap-mychart-nav-focus\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <label>{{::'Actions' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button ng-show=\\\"myChart.Config.AllowGenerateCCD.IsActive\\\" class=\\\"btn btn-default2 btn-overflow\\\" id=\\\"myChart_CCDBtn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    data-transition-to=\\\"{appRoute: 'shareCCD'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Continuity Care Document' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button ng-show=\\\"myChart.Config.ViewCompleteChart.IsActive\\\" class=\\\"btn btn-default2 btn-overflow\\\" id=\\\"myChart_DownloadChartBtn\\\" ng-click=\\\"viewCompleteChartImage()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'View Complete Chart' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-class=\\\"(ShowSidebar)?'col-xs-8 col-sm-9 col-md-9 col-lg-10 col-flush-right':'col-xs-12 col-flush'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"container-fluid container-flush\\\" ui-view></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'An error has occurred and My Chart could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'You do not have access to My Chart.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/myChartMobile.html',\r\n    \"<div class=\\\"container-fluid container-flush hidden-print\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-mobile panel-flush\\\" ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-title text-uppercase text-center-vert\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <img class=\\\"toolbar-svg chart\\\" src=\\\"images/spacer.png\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <span class=\\\"title-text\\\">{{::\\\"Chart\\\" | translate }}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-header patient-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <img class=\\\"rounded-corner-md border-width-md extra-dark-grey-border list-item-thumbnail\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 lazy-src=\\\"{{myChart.User.Id | apPatientPortalThumbnailSrc:83:82}}\\\" endpoint-base='patient' alt=\\\"patient-image\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-patient\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <h2>{{::myChart.User.FullName}}</h2>\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-date-formatter date=\\\"{{::Date}}\\\" format=\\\"long-date\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                <span>({{myChart.User.Age}})</span>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-body col-xs-12 col-xs-flush\\\" ng-if=\\\"ShowSidebar\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div id=\\\"mychart\\\" class=\\\"container-fluid container-flush\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"tile\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-show=\\\"myChart.Config.ViewClinicalSummary.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-include=\\\"'/mychart/views/mobile/visitSummary.html'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-controller=\\\"VisitSummaryCtrl\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-init=\\\"tileState.isCollapsed = !openPersonalDetails\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"tile\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-show=\\\"myChart.Config.ViewProblems.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-include=\\\"'/mychart/views/mobile/problems.html'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-controller=\\\"ProblemsMobileCtrl\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"tile\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-show=\\\"myChart.Config.ViewMedications.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-include=\\\"'/mychart/views/mobile/prescriptionsList.html'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-controller=\\\"RxRefillMobileChartCtrl\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"tile\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-show=\\\"myChart.Config.ViewProcedures.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-include=\\\"'/mychart/views/mobile/procedures.html'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-controller=\\\"ProceduresMobileCtrl\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"tile\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-show=\\\"myChart.Config.ViewLabResults.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-include=\\\"'/mychart/views/mobile/labResults.html'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-controller=\\\"LabResultsMobileCtrl\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"tile\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-show=\\\"myChart.Config.ViewImmunizations.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-include=\\\"'/mychart/views/mobile/immunizations.html'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-controller=\\\"ImmunizationsMobileCtrl\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"tile\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-show=\\\"myChart.Config.ViewEducationMaterial.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-include=\\\"'/mychart/views/mobile/referenceMaterial.html'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-controller=\\\"ReferenceMaterialMobileCtrl\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"tile\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-show=\\\"myChart.Config.ViewMedicationAllergies.IsActive\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-include=\\\"'/mychart/views/mobile/medicationAllergies.html'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-controller=\\\"MedicationAllergiesMobileCtrl\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"tile\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-include=\\\"'/mychart/views/mobile/personalDetails.html'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-controller=\\\"PersonalDetailsMobileCtrl\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-init=\\\"openPersonalDetails && toggleState()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"tile\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-6 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button class=\\\"btn btn-lg btn-default btn-block\\\" id=\\\"myChart_CCDBtn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            data-transition-to=\\\"{appRoute: 'shareCCD'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Continuity Care Document' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-6 col-flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button class=\\\"btn btn-lg btn-default btn-block\\\" id=\\\"myChart_DownloadChartBtn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    ng-click=\\\"displayCompleteChart()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <i class=\\\"fa fa-download\\\"></i> {{::'Download Chart' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-body col-xs-12\\\" ng-if=\\\"!ShowSidebar\\\" ui-view>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'An error has occurred and My Chart could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'You do not have access to My Chart.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/patientDocuments.html',\r\n    \"<ap-patient-documents></ap-patient-documents>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/personalDetails.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <form name=\\\"editPatientDetailsForm\\\" ng-submit=\\\"saveUpdateDetailsRequest(editPatientDetailsForm)\\\" novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel panel-demo chart-label\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-heading panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-title\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Patient Overview' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button id=\\\"save-details-btn\\\" class=\\\"btn btn-default2\\\" ng-if=\\\"edit\\\" type=\\\"submit\\\" ng-disabled=\\\"saving || !editPatientDetailsForm.$dirty\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Save' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ng-if=\\\"saving\\\"><ap-spinner></ap-spinner></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button type=button id=\\\"edit-details-btn\\\" class=\\\"btn btn-default2\\\" ng-show=\\\"config.UpdateDemographics.IsActive\\\" ng-if=\\\"!edit\\\" ng-click=\\\"editDetails()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Edit' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button type=button id=\\\"cancel-details-btn\\\" class=\\\"btn btn-default2\\\" ng-if=\\\"edit\\\" ng-click=\\\"cancelEdit()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Cancel' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-include=\\\"'/mychart/views/personalDetailsCommon.html'\\\" />\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"false\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Medication Allergies' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"pull-right\\\"><label class=\\\"control-label\\\">{{::'Edit' | translate}}</label></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"false\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Family Medication History' | translate}}<span class=\\\"pull-right\\\"><label class=\\\"control-label\\\">{{::'Edit' | translate}}</label></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"false\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Social History' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"pull-right\\\"><label class=\\\"control-label\\\">{{::'Edit' | translate}}</label></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </form>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center\\\" ng-if=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-if=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'An error has occurred and the patient info could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-if=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'You do not have access to this patient\\\\'s info.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/personalDetailsCommon.html',\r\n    \"            <div ng-if=\\\"!loading && !httpError\\\" class=\\\"panel-body panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 col-md-6 col-xs-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Personal Details' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-class=\\\"(edit)? 'col-xs-12 col-md-12 col-xs-flush' : 'col-xs-12 col-md-6 col-xs-flush-left'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"!edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"control-label\\\">{{::'SSN' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{patientDetail.SocialSecurityNumber | apSsnFilter}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <span ng-if=\\\"!patientDetail.SocialSecurityNumber\\\">{{::'None' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"form-group\\\" ng-if=\\\"edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"control-label\\\">{{::'SSN' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <input class=\\\"form-control\\\" id=\\\"socialSecurityNumber\\\" name=\\\"socialSecurityNumber\\\" ng-model=\\\"updateDetailsRequestDto.SocialSecurityNumber\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    type=\\\"text\\\" placeholder=\\\"XXX-XX-XXXX\\\"  ng-pattern=\\\"ssnRegEx\\\" ap-ssn-field ap-required>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <label class=\\\"control-label\\\">{{::'Phone No.' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"!edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"row\\\" ng-if=\\\"patientDetail.PhoneNumber1\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-12 col-md-12 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                {{patientDetail.PhoneNumber1Type.Description}}: {{patientDetail.PhoneNumber1 | tel}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <p class=\\\"form-control-static\\\" ng-if=\\\"!hasPhoneNumber\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{::'None' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"row\\\" ng-if=\\\"edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-12 col-md-6 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <select class=\\\"form-control arrow-dropdown\\\" name=\\\"phoneNumber1Type\\\" ng-model=\\\"updateDetailsRequestDto.PhoneNumber1Type\\\" ng-options=\\\"phoneType.Description for phoneType in phoneTypes\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                ap-metadata>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </select>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-12 col-md-6 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <input class=\\\"form-control\\\" id=\\\"phoneNumber1\\\" name=\\\"phoneNumber1\\\" ng-model=\\\"updateDetailsRequestDto.PhoneNumber1\\\" type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                placeholder=\\\"(XXX)XXX-XXXX\\\" ng-pattern=\\\"phoneRegEx\\\" ap-required>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"edit\\\" class=\\\"btn-spacing\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <button type=button id=\\\"show-phonedetails-btn\\\" class=\\\"btn btn-default2\\\" ng-click=\\\"addNumbers()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{::' Additional Phone Numbers' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"plusPhone && edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"additionalPhoneNum\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"row\\\" ng-if=\\\"!edit && patientDetail.PhoneNumber2\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-12 col-md-12 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                {{patientDetail.PhoneNumber2Type.Description}}: {{patientDetail.PhoneNumber2 | tel}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"row\\\" ng-if=\\\"edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-6 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <select class=\\\"form-control arrow-dropdown\\\" name=\\\"phoneNumber2Type\\\" ng-model=\\\"updateDetailsRequestDto.PhoneNumber2Type\\\" ng-options=\\\"phoneType.Description for phoneType in phoneTypes\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                ap-metadata>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </select>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-6 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <input class=\\\"form-control\\\" id=\\\"phoneNumber2\\\" name=\\\"phoneNumber2\\\" ng-model=\\\"updateDetailsRequestDto.PhoneNumber2\\\" type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                placeholder=\\\"(XXX)XXX-XXXX\\\" ng-pattern=\\\"phoneRegEx\\\" ap-required>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"!edit && patientDetail.PhoneNumber3\\\" class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 col-md-12 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{patientDetail.PhoneNumber3Type.Description}}: {{patientDetail.PhoneNumber3 | tel}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <br/>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"edit\\\" class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-6 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <select class=\\\"form-control arrow-dropdown\\\" name=\\\"phoneNumber3Type\\\" ng-model=\\\"updateDetailsRequestDto.PhoneNumber3Type\\\" ng-options=\\\"phoneType.Description for phoneType in phoneTypes\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                ap-metadata>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </select>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-6 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <input class=\\\"form-control\\\" id=\\\"phoneNumber3\\\" name=\\\"phoneNumber3\\\" ng-model=\\\"updateDetailsRequestDto.PhoneNumber3\\\" type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            placeholder=\\\"(XXX)XXX-XXXX\\\" ng-pattern=\\\"phoneRegEx\\\" ap-required>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"row\\\" ng-if=\\\"!edit && patientDetail.PhoneNumber4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-2 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{patientDetail.PhoneNumber4Type.Description}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-1 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <p class=\\\"form-control-static\\\">:</p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-9 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{patientDetail.PhoneNumber4 | tel}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <br/>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"row\\\" ng-if=\\\"edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-6 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <select class=\\\"form-control arrow-dropdown\\\" name=\\\"phoneNumber4Type\\\" ng-model=\\\"updateDetailsRequestDto.PhoneNumber4Type\\\" ng-options=\\\"phoneType.Description for phoneType in phoneTypes\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                ap-metadata>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </select>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-6 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <input class=\\\"form-control\\\" id=\\\"phoneNumber4\\\" name=\\\"phoneNumber4\\\" ng-model=\\\"updateDetailsRequestDto.PhoneNumber4\\\" type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                placeholder=\\\"(XXX)XXX-XXXX\\\" ng-pattern=\\\"phoneRegEx\\\" ap-required>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                <label class=\\\"control-label\\\">{{::'Email' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"!edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span ng-if=\\\"!hasEmailAddress\\\">{{::'None' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <p class=\\\"label_wrap\\\">{{patientDetail.EmailAddress1}}</p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"form-group\\\" ng-if=\\\"edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <input class=\\\"form-control label_wrap\\\" id=\\\"emailAddress1\\\" name=\\\"EmailAddress1\\\" ng-model=\\\"updateDetailsRequestDto.EmailAddress1\\\" type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    placeholder=\\\"Email Address 1\\\" ap-metadata>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"!edit\\\" ng-if=\\\"patientDetail.EmailAddress2\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <p class=\\\"label_wrap\\\">{{patientDetail.EmailAddress2}}</p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"form-group\\\" ng-if=\\\"edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <input class=\\\"form-control label_wrap\\\" id=\\\"emailAddress2\\\" name=\\\"EmailAddress2\\\" ng-model=\\\"updateDetailsRequestDto.EmailAddress2\\\" type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    placeholder=\\\"Email Address 2\\\" ap-metadata>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"!edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"control-label\\\">{{::'Address' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{patientDetail.Address1.Address1}},\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div ng-if=\\\"patientDetail.Address1.Address2 && !edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{patientDetail.Address1.Address2}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div ng-if=\\\"!edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{patientDetail.Address1.City}}, {{patientDetail.Address1.State}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div ng-if=\\\"patientDetail.Address1.Country && !edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{patientDetail.Address1.Country}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div ng-if=\\\"patientDetail.Address1.Zip && !edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{patientDetail.Address1.Zip}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"form-group\\\" ng-if=\\\"edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"control-label\\\">{{::'Address' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <input class=\\\"form-control\\\" id=\\\"addressLine1\\\" name=\\\"Address1\\\" ng-model=\\\"updateDetailsRequestDto.Address1.Address1\\\" type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    placeholder=\\\"Address Line 1\\\" ap-metadata>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"form-group\\\" ng-if=\\\"edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <input class=\\\"form-control\\\" id=\\\"addressLine2\\\" name=\\\"Address2\\\" ng-model=\\\"updateDetailsRequestDto.Address1.Address2\\\" type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    placeholder=\\\"Address Line 2\\\" ap-metadata>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"row\\\" ng-if=\\\"edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 col-md-6 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <input class=\\\"form-control\\\" id=\\\"addressCity\\\" name=\\\"City\\\" ng-model=\\\"updateDetailsRequestDto.Address1.City\\\" type=\\\"text\\\" placeholder=\\\"City\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            ap-metadata>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 col-md-6 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <input class=\\\"form-control\\\" id=\\\"addressState\\\" name=\\\"State\\\" maxlength=\\\"2\\\" ng-pattern=\\\"/^[a-zA-Z]*$/\\\" ng-model=\\\"updateDetailsRequestDto.Address1.State\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            type=\\\"text\\\" placeholder=\\\"State e.g: TX,CA,MN\\\" ap-metadata>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <p ng-show=\\\"editPatientDetailsForm.State.$error.pattern\\\" class=\\\"help-block\\\">No special characters</p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"form-group\\\" ng-if=\\\"edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <input class=\\\"form-control\\\" id=\\\"addressZip\\\" name=\\\"Zip\\\" ng-model=\\\"updateDetailsRequestDto.Address1.Zip\\\" type=\\\"text\\\" placeholder=\\\"Zip Code\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    ap-metadata>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"form-group\\\" ng-if=\\\"edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <input class=\\\"form-control\\\" id=\\\"addressCountry\\\" name=\\\"Country\\\" ng-model=\\\"updateDetailsRequestDto.Address1.Country\\\" type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    placeholder=\\\"Country\\\" ap-metadata>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <span ng-if=\\\"!patientDetail.Address1.Address1\\\">{{::'None' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-class=\\\"(edit)? 'col-xs-12 col-md-12 col-xs-flush' : 'col-xs-12 col-md-6 col-xs-flush'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"!edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"control-label\\\">{{::'Gender' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{patientDetail.Gender.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <span ng-if=\\\"!patientDetail.Gender.Name\\\">{{::'None' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"form-group\\\" ng-if=\\\"edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"control-label\\\">{{::'Gender' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <select class=\\\"form-control arrow-dropdown\\\" name=\\\"GenderType\\\" ng-model=\\\"updateDetailsRequestDto.Gender\\\" ng-options=\\\"genderType.Name for genderType in genderTypes\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ap-metadata>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </select>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"!edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"control-label\\\">{{::'Marital Status' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{patientDetail.MaritalStatus.Description}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <span ng-if=\\\"!patientDetail.MaritalStatus.Description\\\">{{::'None' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"form-group\\\" ng-if=\\\"edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"control-label\\\">{{::'Marital Status' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <select class=\\\"form-control arrow-dropdown\\\" name=\\\"MaritalStatusType\\\" ng-model=\\\"updateDetailsRequestDto.MaritalStatus\\\" ng-options=\\\"maritalStatusType.Description for maritalStatusType in maritalStatusTypes | orderBy:'Description' \\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ap-metadata>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </select>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"!edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"control-label\\\">{{::'Race' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{patientDetail.Race.Description}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <span ng-if=\\\"!patientDetail.Race.Description\\\">{{::'None' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"form-group\\\" ng-if=\\\"edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"control-label\\\">{{::'Race' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <select class=\\\"form-control arrow-dropdown\\\" name=\\\"RaceType\\\" ng-model=\\\"updateDetailsRequestDto.Race\\\" ng-options=\\\"raceType.Description for raceType in raceTypes | orderBy:'Description'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ap-metadata>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </select>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"!edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"control-label\\\">{{::'Ethnicity' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <span ng-repeat=\\\"ethnicity in patientDetail.Ethnicity\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{::ethnicity.Description}}<span ng-if=\\\"$index+1 < patientDetail.Ethnicity.length\\\">,</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <span ng-if=\\\"!patientDetail.Ethnicity.length\\\">{{::'None' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"form-group\\\" ng-if=\\\"edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"control-label\\\">{{::'Ethnicity' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <ap-multi-select-list-item\\r\" +\r\n    \"\\n\" +\r\n    \"                                        class=\\\"btn-multi-select\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        id=\\\"ethnicitySelect\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        collection=\\\"ethnicityTypes\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-model=\\\"updateDetailsRequestDto.Ethnicity\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ap-metadata>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </ap-multi-select-list-item>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"!edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"control-label\\\">{{::'Language' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{patientDetail.Language.Description}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <span ng-if=\\\"!patientDetail.Language.Description\\\">{{::'None' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"form-group\\\" ng-if=\\\"edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"control-label\\\">{{::'Language' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <select class=\\\"form-control arrow-dropdown\\\" name=\\\"LanguageType\\\" ng-model=\\\"updateDetailsRequestDto.Language\\\" ng-options=\\\"languageType.Description for languageType in languageTypes | orderBy:'Description'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ap-metadata>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </select>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Driver\\\\'s License'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-12 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <p class=\\\"form-control-static\\\" ng-if=\\\"!edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{patientDetail.DriversLicenseNumber}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <span ng-if=\\\"!patientDetail.DriversLicenseNumber\\\">{{::'None' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"form-group\\\" ng-if=\\\"edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <input class=\\\"form-control\\\"  id=\\\"driversLicenseNumber\\\" name=\\\"DriversLicenseNumber\\\" ng-model=\\\"updateDetailsRequestDto.DriversLicenseNumber\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        type=\\\"text\\\" placeholder=\\\"Drivers License Number\\\" ap-metadata>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"control-label\\\" ng-if=\\\"!edit\\\" ng-if=\\\"patientDetail.DriversLicenseState\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{patientDetail.DriversLicenseState}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"form-group\\\" ng-if=\\\"edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <input class=\\\"form-control\\\" id=\\\"driversLicenseState\\\" name=\\\"DriversLicenseState\\\" maxlength=\\\"2\\\" ng-pattern=\\\"/^[a-zA-Z]*$/\\\" ng-model=\\\"updateDetailsRequestDto.DriversLicenseState\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        type=\\\"text\\\" placeholder=\\\"Drivers License State e.g: TX,CA,MN\\\" required ap-metadata>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <p ng-show=\\\"editPatientDetailsForm.DriversLicenseState.$error.pattern\\\" class=\\\"help-block\\\">No special characters</p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 col-md-6 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Emergency Contact' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-12 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div ng-repeat=\\\"contact in patientDetail.Contacts\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <span>{{::contact.FirstName}}&nbsp;{{::contact.LastName}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                {{::contact.PhoneNumber1.PhoneNumber}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <span ng-if=\\\"!contact.PhoneNumber1.PhoneNumber\\\">{{::'Unknown' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <label class=\\\"control-label\\\">{{::'Primary No.' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <p class=\\\"form-control-static\\\" ng-if=\\\"contact.PhoneNumber2.PhoneNumber\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                {{::contact.PhoneNumber2.PhoneNumber}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <label class=\\\"control-label\\\">{{::'Secondary No.' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <span ng-if=\\\"!patientDetail.Contacts\\\">{{::'None' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Pharmacies' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-if=\\\"!edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-repeat=\\\"pharmacy in patientDetail.Pharmacies track by $index\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div ng-if=\\\"$index==0\\\" class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-12 col-sm-6 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div class=\\\"personal-details-map\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <ap-google-maps name=\\\"pharmacy.Name\\\" address=\\\"pharmacy.Address.Address1\\\" city=\\\"pharmacy.Address.City\\\" state=\\\"pharmacy.Address.State\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                zip=\\\"pharmacy.Address.Zip\\\" height=\\\"135\\\" width=\\\"200\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </ap-google-maps>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-12 col-sm-6 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <label class=\\\"control-label\\\">{{::'Preferred Pharmacy' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                {{pharmacy.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <span ng-if=\\\"!pharmacy.Name\\\">{{::'None' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <div>{{pharmacy.Address.Address1}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <div ng-if=\\\"pharmacy.Address.Address2\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{pharmacy.Address.Address2}},&nbsp;{{pharmacy.Address.State}}&nbsp;{{pharmacy.Address.Zip}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <div ng-if=\\\"!pharmacy.Address.Address2\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{pharmacy.Address.State}}&nbsp;{{pharmacy.Address.Zip}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <div>{{::'p.' | translate}}&nbsp;{{pharmacy.Phone.PhoneNumber | tel}}<span ng-if=\\\"!pharmacy.Phone.PhoneNumber\\\">{{::'None' | translate}}</span></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <span ng-if=\\\"!pharmacy.Address.Address1\\\">{{::'None' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <span ng-if=\\\"!patientDetail.Pharmacies\\\">{{::'None' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div ng-if=\\\"$index!=0\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div class=\\\"col-xs-12 col-sm-4 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{pharmacy.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <span ng-if=\\\"!pharmacy.Name\\\">{{::'None' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div class=\\\"col-xs-12 col-sm-4 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <div class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div>{{pharmacy.Address.Address1}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div ng-if=\\\"pharmacy.Address.Address2\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        {{pharmacy.Address.Address2}},&nbsp;{{pharmacy.Address.State}}&nbsp;{{pharmacy.Address.Zip}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <span ng-if=\\\"!pharmacy.Address.Address1\\\">{{::'None' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div class=\\\"col-xs-12 col-sm-4 col-flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <div class=\\\"form-control-static\\\"><div class=\\\"pharmacies\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{::'p.' | translate}}&nbsp;{{pharmacy.Phone.PhoneNumber | tel}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <span ng-if=\\\"!pharmacy.Phone.PhoneNumber\\\">{{::'None' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span ng-if=\\\"!patientDetail.Pharmacies\\\">{{::'None' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-if=\\\"edit\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"row\\\" id=\\\"currentPharmaciesList\\\" ng-repeat=\\\"pharmacy in updateDetailsRequestDto.Pharmacies track by $index\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 col-md-6 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                       <strong>{{pharmacy.Name}}</strong>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 col-md-6 col-flush\\\" ng-click=\\\"removePharmacy($index, pharmacy)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <i class=\\\"fa fa-minus-circle\\\"></i>&nbsp;&nbsp;{{::'Remove' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 col-md-6 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div>{{pharmacy.Address.Address1}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 col-md-6 col-flush-left\\\" ng-if=\\\"pharmacy.Address.Address2\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div>{{pharmacy.Address.Address2}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 col-md-12 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div>{{pharmacy.Address.State}} , {{pharmacy.Address.Zip}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 col-md-12 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div>{{pharmacy.Phone.PhoneNumber | tel}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"btn-spacing\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <button type=button id=\\\"add-pharmacies-btn\\\" class=\\\"btn btn-default2\\\" ng-click=\\\"open()\\\">{{'Add/Search Pharmacies' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{::'Insurance Details' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <p class=\\\"form-control-static\\\"><strong>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                {{patientDetail.Insurance.InsuranceCarrier.Name}} {{patientDetail.Insurance.InsurancePlan.Name}}</strong>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <span ng-if=\\\"!patientDetail.Insurance.InsuranceCarrier.Name\\\">{{::'None' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div ng-if=\\\"patientDetail.Insurance.InsuranceCarrier.Name\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div class=\\\"col-xs-12 col-md-4 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        <label class=\\\"control-label\\\">{{::'Primary' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div class=\\\"col-xs-12 col-md-8 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            {{patientDetail.Insurance.PrimaryAccountHolderFirstName}}&nbsp;{{patientDetail.Insurance.PrimaryAccountHolderLastName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div class=\\\"col-xs-12 col-md-4 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        <label class=\\\"control-label\\\">{{::'Member Id.' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div class=\\\"col-xs-12 col-md-8 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            {{patientDetail.Insurance.PlanMemberId}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div class=\\\"col-xs-12 col-md-4 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        <label class=\\\"control-label\\\">{{::'Group Id.' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <div class=\\\"col-xs-12 col-md-8 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        <p class=\\\"form-control-static\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            {{patientDetail.Insurance.PlanGroupId}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/prescriptionsList.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-default panel-flush table-responsive\\\" id=\\\"presriptions-panel\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Prescriptions' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            <span class=\\\"header-menu pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"dropdown-primary\\\" uib-dropdown>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button class=\\\"btn btn-default\\\" type=\\\"button\\\" id=\\\"recent-filter-btn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            uib-dropdown-toggle>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>{{::'View' | translate }}&nbsp;&nbsp;</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"title-text\\\">{{ activeFilter.Name | translate }}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"caret\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ul class=\\\"dropdown-menu dropdown-menu-right\\\" uib-dropdown-menu role=\\\"menu\\\" id=\\\"medFilter\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <li class=\\\"clickable\\\" role=\\\"presentation\\\" ng-repeat=\\\"medFilter in medFilters\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <a id=\\\"day-filter-item-{{medFilter.Id}}\\\" role=\\\"menuitem\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                               ng-click=\\\"updateFilteredPrescriptions(medFilter)\\\">{{ ::medFilter.Name | translate }}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </span>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !httpError\\\" class=\\\"panel-body table-responsive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"!filteredPrescriptions.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'No prescriptions were found' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <table id=\\\"prescriptions-table\\\" class=\\\"table table-striped\\\" ng-if=\\\"filteredPrescriptions.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <thead>\\r\" +\r\n    \"\\n\" +\r\n    \"                <tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <th>{{::'Drug + Directions' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <th>{{::'Status' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <th>{{::'Duration' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <th ng-if=\\\"featureList.RequestRxRefills.IsActive\\\">{{::'Request Refill' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                </tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                </thead>\\r\" +\r\n    \"\\n\" +\r\n    \"                <tbody>\\r\" +\r\n    \"\\n\" +\r\n    \"                <tr ng-repeat=\\\"med in filteredPrescriptions\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"column-text\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::med.DrugName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"column-subtext\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::med.Instructions}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::med.IsActive ? dateDiff(med.EndDate) : ''}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"column-text\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label>{{::'Start' | translate}}&nbsp;</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ap-date-formatter date=\\\"{{::med.StartDate}}\\\" format=\\\"long-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"column-text\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label>{{::'End' | translate}}&nbsp;</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ap-date-formatter date=\\\"{{::med.EndDate}}\\\" format=\\\"long-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <td ng-if=\\\"featureList.RequestRxRefills.IsActive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"pull-right\\\" ng-if=\\\"!med.RefillRequestPending && !med.IsDiscontinued && med.ProviderId\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button class=\\\"btn btn-lg-height btn-default1\\\" ng-click=\\\"medSelect(med)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    data-transition-to=\\\"{appRoute: 'rxrefill'}\\\">{{::'Request Refill' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"pull-right\\\" ng-if=\\\"med.IsDiscontinued\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"btn-height flexbox flexbox-horizontal-center\\\"><span\\r\" +\r\n    \"\\n\" +\r\n    \"                                    class=\\\"btn-width pending text-center\\\">{{'Discontinued' | translate}}</span></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"pull-right\\\" ng-if=\\\"med.RefillRequestPending\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button class=\\\"btn btn-lg-height btn-default1 btn-minpadding\\\" ng-click=\\\"medSelect(med)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    data-transition-to=\\\"{appRoute: 'rxrefill'}\\\"><span class=\\\"lime-green\\\">{{'Refill Requested' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"pending text-center\\\">{{'Pending Review' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"pull-right\\\" ng-if=\\\"!med.ProviderId\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"btn-height flexbox flexbox-horizontal-center\\\"><span\\r\" +\r\n    \"\\n\" +\r\n    \"                                    class=\\\"btn-width pending text-center\\\">{{'Please contact office to process.' | translate}}</span></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                </tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                </tbody>\\r\" +\r\n    \"\\n\" +\r\n    \"            </table>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'An error has occurred and the patient medications could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak translate>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'You do not have access to this patient\\\\'s medications.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/problems.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-default panel-flush table-responsive\\\" id=\\\"problems-panel\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Problems' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"header-menu pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"dropdown-primary\\\" uib-dropdown>\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-default\\\" type=\\\"button\\\" id=\\\"active-filter-btn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        uib-dropdown-toggle>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span>{{::'View' | translate }}&nbsp;&nbsp;</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"title-text\\\">{{ problem.activeName | translate }}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"caret\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                <ul class=\\\"dropdown-menu dropdown-menu-right\\\" uib-dropdown-menu role=\\\"menu\\\" id=\\\"activeFilter\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <li class=\\\"clickable\\\" role=\\\"presentation\\\" ng-repeat=\\\"activeFilter in activeFilters\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <a id=\\\"active-filter-item-{{activeFilter.Id}}\\\" role=\\\"menuitem\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                           ng-click=\\\"update(activeFilter.Id)\\\">{{ ::activeFilter.Name | translate }}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !httpError\\\" class=\\\"table-responsive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"!filteredProblems.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'No problems were found' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <table id=\\\"problems-table\\\" class=\\\"table ap-problems-table\\\" ng-if=\\\"filteredProblems.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <thead>\\r\" +\r\n    \"\\n\" +\r\n    \"                <tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <th>{{::'Disease' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <th>{{::'Date' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <th>{{::'Status' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <th>{{::'Duration' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <th>{{::'Notes' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                </tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                </thead>\\r\" +\r\n    \"\\n\" +\r\n    \"                <tbody>\\r\" +\r\n    \"\\n\" +\r\n    \"                <tr ng-class=\\\"{'clickable' : prob.Notes}\\\" ng-click=\\\"hidden(prob)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    ng-repeat-start=\\\"prob in filteredProblems\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{prob.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ap-date-formatter date=\\\"{{prob.Date}}\\\" format=\\\"long-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{prob.IsActive ? ('Active' | translate) : ('Not Active' | translate)}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{prob.Duration ? prob.Duration : '-----'}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-if=\\\"!prob.Notes\\\">-----</span>\\r\" +\r\n    \"\\n\" +\r\n    \"            <span ng-if=\\\"prob.Notes && prob.Show\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"              {{::'Hide' | translate}}&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"              <i class=\\\"fa fa-angle-double-up\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"            </span>\\r\" +\r\n    \"\\n\" +\r\n    \"            <span ng-if=\\\"prob.Notes && !prob.Show\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"              {{::'View' | translate}}&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"              <i class=\\\"fa fa-angle-double-down\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"            </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                </tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                <tr ng-show=\\\"prob.Show\\\" ng-repeat-end>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <td class=\\\"ap-problems-notes\\\" colspan=\\\"5\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{prob.Notes}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                </tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                </tbody>\\r\" +\r\n    \"\\n\" +\r\n    \"            </table>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-cloak ng-show=\\\"httpError.unhandled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'An error has occurred and the patient info could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-cloak ng-show=\\\"httpError.is403\\\" translate>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'You do not have access to this patient\\\\'s info.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/procedures.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div id=\\\"procedures-panel\\\" class=\\\"panel panel-default panel-flush table-responsive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Procedures' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !httpError\\\" class=\\\"table-responsive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"!procedures.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'No procedures were found' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <table id=\\\"procedures-table\\\" class=\\\"table table-striped\\\" ng-if=\\\"procedures.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <thead>\\r\" +\r\n    \"\\n\" +\r\n    \"                <tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <th>{{::'Procedure' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <th>{{::'Date' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <th>{{::'Description' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <th>{{::'Notes' | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                </tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                </thead>\\r\" +\r\n    \"\\n\" +\r\n    \"                <tbody>\\r\" +\r\n    \"\\n\" +\r\n    \"                <tr ng-repeat=\\\"proc in procedures\\\" ng-click=\\\"hidden(proc)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    ng-class=\\\"{'clickable' : proc.Notes || proc.Long}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <td>{{::proc.Name}}</td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ap-date-formatter date=\\\"{{proc.VisitDate}}\\\" format=\\\"long-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"desc-container\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"ng-hide overflow-ellipsis\\\" ng-class=\\\"{'overflow-ellipsis': !proc.Show}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                 ng-show=\\\"proc.Description\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <span>{{::proc.Description}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"smaller\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ng-if=\\\"!proc.Notes && !proc.Long\\\">-----</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                  <span ng-if=\\\"(proc.Notes || proc.Long) && proc.Show\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Hide' | translate}}&nbsp;<i class=\\\"fa fa-angle-double-up\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                  </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                  <span ng-if=\\\"(proc.Notes || proc.Long) && !proc.Show\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'View' | translate}}&nbsp;<i class=\\\"fa fa-angle-double-down\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                  </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                </tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                </tbody>\\r\" +\r\n    \"\\n\" +\r\n    \"            </table>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12\\\" ng-if=\\\"false\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-10\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    Viewing&nbsp;<u><a href=\\\"#\\\" onClick=\\\"return false;\\\">{{procedures.length}} Diagnosis</a></u>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <a href=\\\"#\\\" onClick=\\\"return false;\\\">&lt;</a>&nbsp;<a\\r\" +\r\n    \"\\n\" +\r\n    \"                        href=\\\"#\\\" onClick=\\\"return false;\\\">1</a>&nbsp;<a\\r\" +\r\n    \"\\n\" +\r\n    \"                        href=\\\"#\\\" onClick=\\\"return false;\\\">&gt;</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'An error has occurred and the patient info could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak translate>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'You do not have access to this patient\\\\'s info.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/referenceMaterial.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div id=\\\"reference-material-panel\\\" class=\\\"panel panel-default panel-flush\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"         ng-class=\\\"(isModalDisplayed)?'hidden-print':''\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Educational Material' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            <span class=\\\"header-menu pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"dropdown-primary\\\" uib-dropdown>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button class=\\\"btn btn-default\\\" type=\\\"button\\\" id=\\\"vaccinecardtype-filter-btn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            uib-dropdown-toggle>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{ 'Language' | translate }}&nbsp;&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"title-text\\\">{{ model.ActiveLanguage.Description }}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"caret\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ul class=\\\"dropdown-menu dropdown-menu-right\\\" uib-dropdown-menu>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <li class=\\\"clickable\\\" role=\\\"presentation\\\" ng-repeat=\\\"language in model.LanguageOptions\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <a ng-if=\\\"language\\\" role=\\\"menuitem\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                               ng-click=\\\"updateActiveLanguage(language)\\\">{{ ::language.Description }}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </span>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"!model.EducationalMaterial.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'No Educational Material found.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <table id=\\\"reference-material-table\\\" class=\\\"table table-striped\\\" ng-if=\\\"model.EducationalMaterial.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <thead>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <th>{{::\\\"Description\\\" | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <th>{{::\\\"Available Languages\\\" | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <th></th>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <th></th>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                </thead>\\r\" +\r\n    \"\\n\" +\r\n    \"                <tbody>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <tr ng-repeat=\\\"formGroup in model.EducationalMaterial track by $index\\\" ng-if=\\\"formGroup\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>{{::formGroup.GroupName}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ng-repeat=\\\"refForm in formGroup.Forms track by $index\\\">{{::refForm.Language.Description}}<span\\r\" +\r\n    \"\\n\" +\r\n    \"                                    ng-if=\\\"!$last\\\">,&nbsp;</span></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-1 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <i class=\\\"fa fa-file fa-lg\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-11 col-flush float-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 column-text\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <a ng-click=\\\"viewReferenceMaterial(formGroup.GroupName, formGroup.Forms)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <span class=\\\"underline-text\\\">{{::'View Form' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </a>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 column-subtext\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{::attachmentInfo.Extension | uppercase}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button ap-save-to-file=\\\"downloadForm(formGroup)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    file-name=\\\"{{formGroup.GroupName}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    ><i ng-show=\\\"!formGroup.Downloading\\\" class=\\\"fa fa-download\\\"></i><ap-spinner ng-show=\\\"formGroup.Downloading\\\"></ap-spinner></button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                </tbody>\\r\" +\r\n    \"\\n\" +\r\n    \"            </table>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'An error has occurred and the patient info could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak translate>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'You do not have access to this patient\\\\'s info.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/shareCCD.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-share chart-label\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-heading panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-title text-center\\\">{{::'Continuity Care Document' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !httpError\\\" class=\\\"panel-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"ap-checkbox-flush ap-checkbox-center-h\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <input type=\\\"checkbox\\\" id=\\\"full-history\\\" ng-model=\\\"vm.fullHistory\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                ap-checkbox-label=\\\"{{'Complete History' | translate}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button class=\\\"btn btn-primary btn-add-padding\\\" ng-click=\\\"getCcdHtml()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Refresh' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button class=\\\"btn btn-default1 btn-add-padding\\\" ng-click=\\\"transmitModal()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Transmit' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button class=\\\"btn btn-default btn-add-padding\\\" ng-click=\\\"viewAccessLog()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'View Access Log' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-6 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <label class=\\\"control-label\\\" for=\\\"ccd-start-date\\\">{{::'From' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <input class=\\\"form-control label_wrap\\\" \\r\" +\r\n    \"\\n\" +\r\n    \"                        id=\\\"ccd-start-date\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        type=\\\"date\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        min=\\\"1900-01-01\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        max=\\\"9998-12-31\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-model=\\\"vm.startDate\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-disabled=\\\"vm.fullHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-6 col-flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <label class=\\\"control-label\\\" for=\\\"ccd-end-date\\\">{{::'To' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <input class=\\\"form-control label_wrap\\\" \\r\" +\r\n    \"\\n\" +\r\n    \"                        id=\\\"ccd-end-date\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        type=\\\"date\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        min=\\\"1900-01-01\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        max=\\\"9998-12-31\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-model=\\\"vm.endDate\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-disabled=\\\"vm.fullHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            \\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-if=\\\"loadingCcd\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\" ng-if=\\\"!loadingCcd\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-subheading flexbox flexbox-horizontal-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Document Preview' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"flexbox-pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button class=\\\"btn btn-default\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                ng-disabled=\\\"loadingHtml\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                ap-save-string-to-file=\\\"downloadHtml()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                file-name=\\\"{{model.ccdFileName}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <span class=\\\"ng-hide\\\" ng-show=\\\"loadingHtml\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <ap-spinner></ap-spinner></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span><i class=\\\"fa fa-download\\\"></i></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Html' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button class=\\\"btn btn-default\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            ng-disabled=\\\"loadingXml\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            ap-save-string-to-file=\\\"downloadCDA()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            file-name=\\\"{{model.xmlFileName}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span class=\\\"ng-hide\\\" ng-show=\\\"loadingXml\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <ap-spinner></ap-spinner></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span><i class=\\\"fa fa-download\\\"></i></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'CDA' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"!loadingCcd\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ap-dynamic-frame\\r\" +\r\n    \"\\n\" +\r\n    \"                    html=\\\"model.chartHtml\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    loading-Url=\\\"model.loadingUrl\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    </ap-dynamic-frame>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>            \\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center\\\" ng-if=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-if=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'An error has occurred and the patient info could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-if=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'You do not have access to this patient\\\\'s info.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mychart/views/visitSummary.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div id=\\\"visit-summary-panel\\\" class=\\\"panel panel-default panel-flush\\\" ng-class=\\\"(isModalDisplayed)?'hidden-print':''\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Visit Summary' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !httpError\\\" class=\\\"table-responsive\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"!visits.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'No completed Visit Summaries were found' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <table id=\\\"visit-summary-table\\\" class=\\\"table table-striped\\\" ng-if=\\\"visits.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <thead>\\r\" +\r\n    \"\\n\" +\r\n    \"                <tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <th>{{::\\\"Date\\\" | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <th>{{::\\\"Clinical Note Type\\\" | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <th>{{::\\\"Diagnoses\\\" | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <th>{{::\\\"Provider\\\" | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <th>{{::\\\"Summary\\\" | translate}}</th>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <th></th>\\r\" +\r\n    \"\\n\" +\r\n    \"                </tr>\\r\" +\r\n    \"\\n\" +\r\n    \"                </thead>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <tr ng-repeat=\\\"visit in visits\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ap-date-formatter date=\\\"{{::visit.Date}}\\\" format=\\\"long-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </td>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"column-text\\\">{{::visit.ClinicalNoteTypeName}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </td>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"column-text\\\" ng-repeat=\\\"diagnoses in ::visit.Diagnoses\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::diagnoses.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </td>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"column-text\\\">{{::visit.Provider}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </td>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-1 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <i class=\\\"fa fa-file fa-lg\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-11 col-flush float-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12 column-text\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <a ng-click=\\\"viewVisitSummary(visit.VisitId, visit.Date)\\\"><u>{{::'View Summary' | translate}}</u></a>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </td>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <td>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button ap-save-to-file=\\\"downloadVisitSummaryByVisit(visit, visit.Date)\\\"><i ng-show=\\\"!visit.Downloading\\\" class=\\\"fa fa-download\\\"></i><ap-spinner ng-show=\\\"visit.Downloading\\\"></ap-spinner></button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </td>\\r\" +\r\n    \"\\n\" +\r\n    \"                </tr>\\r\" +\r\n    \"\\n\" +\r\n    \"            </table>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'An error has occurred and the patient info could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak translate>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'You do not have access to this patient\\\\'s info.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\n}]);\n","(function(angular){\r\n    'use strict';\r\n\r\n    angular.module('mychart').component('apPrintablePatientInfo', {\r\n        templateUrl: '/mychart/views/components/apPrintablePatientInfo.html',\r\n        controllerAs: 'vm',\r\n        controller: [\r\n            'MyChartService',\r\n            'PatientPortalStorageRepository',\r\n            ApPrintablePatientInfo,\r\n        ],\r\n    });\r\n\r\n    function ApPrintablePatientInfo(\r\n        MyChartService,\r\n        PatientPortalStorageRepository\r\n    ) {\r\n        var vm = this;\r\n        vm.fullName = null;\r\n        vm.age = null;\r\n        vm.birthDate = null;\r\n\r\n        activate();\r\n\r\n        function activate() {\r\n            var patient = PatientPortalStorageRepository.getActivePatient();\r\n            MyChartService.getDetails(patient.id).then(function(details) {\r\n                if(details) {\r\n                    vm.fullName = details.FirstName + ' ' + details.LastName;\r\n                    vm.age = details.Age;\r\n                    vm.birthDate = details.DateOfBirth;\r\n                }\r\n            });\r\n        }\r\n    }\r\n\r\n})(window.angular);","angular.module('mychart').controller('ChartConsentCtrl',\r\n    ['_', '$scope', 'TransitionManager', '$stateParams', 'PatientPortalStorageRepository', 'ConsentService', 'aprgettext', 'toaster',\r\n        function (_, $scope, TransitionManager, $stateParams, PatientPortalStorageRepository, ConsentService, gettext, toaster) {\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n\r\n            var activePatientId = PatientPortalStorageRepository.getActivePatient().id;\r\n            var requestedChartRoute = $stateParams.redirectRoute;\r\n\r\n            $scope.model = {\r\n                PatientChartConsent: '',\r\n                AgreeCheckboxText: gettext('I have read the consent form and the above information and I accept the conditions.'),\r\n                ConsentWarningMessage: gettext('Please indicate that you agree with this consent form and press the Agree button to proceed.')\r\n            };\r\n\r\n            ConsentService\r\n                .getChartConsent(activePatientId)\r\n                .then(function (data) {\r\n                    $scope.removeHttpError();\r\n                    $scope.model.PatientChartConsent = data;\r\n                })\r\n                .catch(function (response) {\r\n                    $scope.addHttpError(response);\r\n                })\r\n                .finally(function () {\r\n                    $scope.loading = false;\r\n                });\r\n\r\n            $scope.disagreeToConsent = function () {\r\n                TransitionManager.transition({appRoute: 'dashboard'}, true);\r\n            };\r\n\r\n\r\n            $scope.submitForm = function () {\r\n                if ($scope.chartConsentForm.$invalid) {\r\n                    return;\r\n                }\r\n\r\n                // $submitted flag\r\n                $scope.submitted = true;\r\n\r\n                ConsentService\r\n                    .postChartConsent(activePatientId)\r\n                    .then(function () {\r\n                        $scope.$emit('ShowChartSidebar:updated', true);  // fire event up to MyChartCtrl to show the side bar\r\n                        var transition = {\r\n                            appRoute: requestedChartRoute,\r\n                            opts: {\r\n                                id: activePatientId,\r\n                            },\r\n                        };\r\n                        TransitionManager.transition(transition, true);\r\n                    })\r\n                    .catch(function () {\r\n                        toaster.pop('error', '', gettext('An error occurred during saving'));\r\n                    });\r\n\r\n                $scope.submitted = false;\r\n            };\r\n\r\n        }]);","(function () {\r\n    'use strict';\r\n    var ImmunizationsBaseCtrl = function (autoInit) {\r\n        return function ($q, $scope, $stateParams, MyChartService, DateUtilities, $modal, PatientPortalStorageRepository) {\r\n            $scope.loadingStartup = true;\r\n            $scope.loadingVaccineCard = false; // starts as false due to mobile view\r\n            $scope.model = {\r\n                PatientImmunizations: null,\r\n                ImmunizationsExist: '',\r\n                SelectedVaccineCard: '',\r\n                VaccineCardList: {\r\n                    Adult: '',\r\n                    Pediatric: '',\r\n                    Misc: ''\r\n                }\r\n            };\r\n\r\n            var activePatient = PatientPortalStorageRepository.getActivePatient();\r\n            var loginUser = PatientPortalStorageRepository.getLoginUser(),\r\n                reportRequestDto = {\r\n                    PatientId: activePatient.id,\r\n                    LoginUserId: loginUser.id,\r\n                    LoginUserName: loginUser.name\r\n                };\r\n\r\n            function initialize() {\r\n                $scope.loadingStartup = true;\r\n                $scope.removeHttpError();\r\n                var activePatientId = PatientPortalStorageRepository.getActivePatient().id;\r\n\r\n                var getDetailsPromise = MyChartService.getDetails(activePatientId);\r\n                var getMyChartConfigPromise = MyChartService.getMyChartConfig();\r\n\r\n                $q.all([getDetailsPromise, getMyChartConfigPromise]).then(function (results) {\r\n                    var details = results[0];\r\n                    var data = results[1];\r\n\r\n                    $scope.model.VaccineCardList.Adult = {\r\n                        Name: 'Adult',\r\n                        Id: data.ViewImmunizations.Config.Adult,\r\n                    };\r\n                    $scope.model.VaccineCardList.Pediatric = {\r\n                        Name: 'Pediatric',\r\n                        Id: data.ViewImmunizations.Config.Pediatric,\r\n                    };\r\n                    if (data.ViewImmunizations.Config.Misc) {\r\n                        $scope.model.VaccineCardList.Pediatric = {\r\n                            Name: 'Misc',\r\n                            Id: data.ViewImmunizations.Config.Misc,\r\n                        };\r\n                    }\r\n                    var patientAge = DateUtilities.getPersonAge(new Date(details.DateOfBirth).toLocaleDateString()).age;\r\n                    var vaccineCardType = (patientAge > 18) ? $scope.model.VaccineCardList.Adult : $scope.model.VaccineCardList.Pediatric;\r\n                    loadVaccineCard(vaccineCardType);\r\n                    auditImmunization(reportRequestDto);\r\n                })\r\n                .catch(function (response) {\r\n                    $scope.addHttpError(response);\r\n                })\r\n                .finally(function () {\r\n                    $scope.loadingStartup = false;\r\n                });\r\n            }\r\n\r\n            function loadVaccineCard(vaccineCardType) {\r\n                $scope.loadingVaccineCard = true;\r\n                $scope.removeHttpError();\r\n                $scope.model.SelectedVaccineCard = vaccineCardType;\r\n                MyChartService.getImmunizations(activePatient.id, vaccineCardType.Id)\r\n                    .then(function (data) {\r\n                        $scope.model.PatientImmunizations = _.forEach(data.Results, function (vaccineTypeList) {\r\n                            if (vaccineTypeList.Immunizations.length === 0) {\r\n                                vaccineTypeList.Immunizations.push({\r\n                                    Name: '',\r\n                                    AdministeredDate: null,\r\n                                    Details: ''\r\n                                });\r\n                            } else {\r\n                                $scope.model.ImmunizationsExist = true;\r\n                            }\r\n                        });\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loadingVaccineCard = false;\r\n                    });\r\n            }\r\n\r\n            function auditImmunization(reportRequestDto) {\r\n                MyChartService.auditImmunizationLogging(reportRequestDto);\r\n            }\r\n\r\n            function viewModal() {\r\n                $scope.modalPrint = true;\r\n                var modalInstance = $modal.open({\r\n                    templateUrl: '/mychart/views/modals/immunizationModal.html',\r\n                    controller: 'ImmunizationModalCtrl',\r\n                    scope: $scope,\r\n                    resolve: {\r\n                        patientImmunizations: function () {\r\n                            return $scope.model.PatientImmunizations;\r\n                        }\r\n                    }\r\n                });\r\n\r\n                modalInstance.result.then(function () {\r\n                    $scope.modalPrint = false;\r\n                });\r\n            }\r\n\r\n            $scope.tileState = {\r\n                isCollapsed: undefined\r\n            };\r\n            $scope.toggleState = function toggleState() {\r\n                if ($scope.tileState.isCollapsed === undefined) {\r\n                    initialize();\r\n                    $scope.tileState.isCollapsed = false;\r\n                }\r\n                else\r\n                    $scope.tileState.isCollapsed = !$scope.tileState.isCollapsed;\r\n            };\r\n\r\n            $scope.auditImmunzation = auditImmunization;\r\n            $scope.loadVaccineCard = loadVaccineCard;\r\n            $scope.viewModal = viewModal;\r\n\r\n            if (autoInit) {\r\n                initialize();\r\n            }\r\n        };\r\n    };\r\n    //The desktop controller automatically loads the data; the mobile one waits until the user expands that section\r\n    var ImmunizationsCtrl = new ImmunizationsBaseCtrl(true);\r\n    var ImmunizationsMobileCtrl = new ImmunizationsBaseCtrl(false);\r\n    angular.module('mychart').controller('ImmunizationsCtrl',\r\n        ['$q', '$scope', '$stateParams', 'MyChartService', 'DateUtilities', '$uibModal', 'PatientPortalStorageRepository',\r\n            ImmunizationsCtrl]);\r\n    angular.module('mychart').controller('ImmunizationsMobileCtrl',\r\n        ['$q', '$scope', '$stateParams', 'MyChartService', 'DateUtilities', '$uibModal', 'PatientPortalStorageRepository',\r\n            ImmunizationsMobileCtrl]);\r\n})();","(function () {\r\n    'use strict';\r\n    var LabResultsBaseCtrl = function (autoInit) {\r\n        return function ($scope, $stateParams, MyChartService, PatientPortalStorageRepository, $modal, PersonRepository, PatientAttachmentRepository, gettext, toaster, BrowserService) {\r\n            $scope.loading = false;\r\n            $scope.isModalDisplayed = false;\r\n\r\n            var activePatient = PatientPortalStorageRepository.getActivePatient(),\r\n                loginUser = PatientPortalStorageRepository.getLoginUser(),\r\n                reportRequestDto = {\r\n                    PatientId: activePatient.id,\r\n                    LoginUserId: loginUser.id,\r\n                    LoginUserName: loginUser.name\r\n                };\r\n\r\n            function initialize() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n                MyChartService\r\n                    .getLabResults(activePatient.id)\r\n                    .then(function (data) {\r\n                        $scope.labResults = _(data.plain()).map(function (entry) {\r\n                            if (entry.AttachmentInfos.length) {\r\n                                entry.AttachmentInfos = _(entry.AttachmentInfos).map(function (attachmentInfo) {\r\n                                    return _.assign(attachmentInfo, {Downloading: false});\r\n                                }).value();\r\n                                return entry;\r\n                            } else {\r\n                                entry.Result = _.assign(entry.Result, {Downloading: false});\r\n                                return entry;\r\n                            }\r\n                        }).value();\r\n                        auditLabResults();\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n\r\n            function viewLabResultAttachment(description, attachmentInfo) {\r\n                $scope.isModalDisplayed = true;\r\n\r\n                var modalConfig = {\r\n                    Title: description,\r\n                    PatientId: activePatient.id,\r\n                    DocumentId: attachmentInfo.AttachmentUid,\r\n                    DocumentLoad: getLabResultAttachment,\r\n                    DocumentDownload: downloadLabResultAttachmentOriginalFormat,\r\n                    DisableInlinePdf: !BrowserService.supportsInlinePdf(),\r\n                };\r\n\r\n                var modalInstance = $modal.open({\r\n                    templateUrl: '/app/views/viewDocumentModal.html',\r\n                    controller: 'ViewDocumentModalCtrl',\r\n                    windowClass: 'modal-full',\r\n                    resolve: {\r\n                        modalConfig: function () {\r\n                            return modalConfig;\r\n                        }\r\n                    }\r\n                });\r\n\r\n                modalInstance.result.then(function () {\r\n                    $scope.isModalDisplayed = false;\r\n                });\r\n            }\r\n            \r\n            function getLabResultAttachment(documentId, requestSettings) {\r\n                return PatientAttachmentRepository.getAttachment(documentId, activePatient.id, requestSettings)\r\n                    .then(function (data) {\r\n                        auditLabResults();\r\n                        return data;\r\n                    });\r\n            }\r\n\r\n            function downloadLabResultAttachmentOriginalFormat(documentId) {\r\n                return PatientAttachmentRepository.getAttachmentRetainOriginalFormat(documentId, activePatient.id)\r\n                    .then(function (data) {\r\n                        auditLabResults();\r\n                        return data;\r\n                    });\r\n            }\r\n\r\n            function downloadLabResultAttachment(description, attachmentInfo) {\r\n                attachmentInfo.Downloading = true;\r\n                return PersonRepository.getAttachment(activePatient.id, attachmentInfo.AttachmentUid)\r\n                    .then(function (data) {\r\n                        auditLabResults();\r\n                        return {Data: data.Data, Extension: data.Extension, FileName: description + '_' + activePatient.firstName + activePatient.lastName};\r\n                    })\r\n                    .catch(function () {\r\n                        toaster.pop('error', '', gettext('An error occurred while downloading'));\r\n                    })\r\n                    .finally(function () {\r\n                        attachmentInfo.Downloading = false;\r\n                    });\r\n            }\r\n\r\n            function viewLabResultObservation(description, resultId) {\r\n                $scope.isModalDisplayed = true;\r\n\r\n                var modalConfig = {\r\n                    Title: description,\r\n                    DownloadFileName: '',\r\n                    PatientId: activePatient.id,\r\n                    DocumentId: resultId,\r\n                    DocumentLoad: getObservationOrderPdf,\r\n                    DocumentDownload: getObservationOrderPdf,\r\n                    DisableInlinePdf: !BrowserService.supportsInlinePdf(),\r\n                };\r\n\r\n                var modalInstance = $modal.open({\r\n                    templateUrl: '/app/views/viewDocumentModal.html',\r\n                    controller: 'ViewDocumentModalCtrl',\r\n                    windowClass: 'modal-full',\r\n                    resolve: {\r\n                        modalConfig: function () {\r\n                            return modalConfig;\r\n                        }\r\n                    }\r\n                });\r\n\r\n                modalInstance.result.then(function () {\r\n                    $scope.isModalDisplayed = false;\r\n                });\r\n            }\r\n\r\n            function getObservationOrderPdf(documentId) {\r\n                return PersonRepository.getObservationOrderPdf(activePatient.id, documentId)\r\n                    .then(function (data) {\r\n                        auditLabResults();\r\n                        return data;\r\n                    });\r\n            }\r\n\r\n            function downloadLabResultObservation(labResult) {\r\n                labResult.Downloading = true;\r\n                return PersonRepository.getObservationOrderPdf(activePatient.id, labResult.Id)\r\n                    .then(function (data) {\r\n                        auditLabResults();\r\n                        return {Data: data.Data, Extension: 'pdf', FileName: labResult.Description + '_' + activePatient.firstName + activePatient.lastName};\r\n                    })\r\n                    .catch(function () {\r\n                        toaster.pop('error', '', gettext('An error occurred while downloading'));\r\n                    })\r\n                    .finally(function () {\r\n                        labResult.Downloading = false;\r\n                    });\r\n            }\r\n\r\n            function auditLabResults() {\r\n                MyChartService.auditLabResultsLogging(reportRequestDto);\r\n            }\r\n\r\n            $scope.tileState = {\r\n                isCollapsed: undefined\r\n            };\r\n\r\n            function toggleState() {\r\n                if ($scope.tileState.isCollapsed === undefined) {\r\n                    initialize();\r\n                    $scope.tileState.isCollapsed = false;\r\n                }\r\n                else\r\n                    $scope.tileState.isCollapsed = !$scope.tileState.isCollapsed;\r\n            }\r\n\r\n            if(autoInit) {\r\n                initialize();\r\n            }\r\n\r\n            $scope.viewLabResultAttachment = viewLabResultAttachment;\r\n            $scope.getLabResultAttachment = getLabResultAttachment;\r\n            $scope.downloadLabResultObservation = downloadLabResultObservation;\r\n            $scope.viewLabResultObservation = viewLabResultObservation;\r\n            $scope.downloadLabResultAttachment = downloadLabResultAttachment;\r\n            $scope.getObservationOrderPdf = getObservationOrderPdf;\r\n            $scope.toggleState = toggleState;\r\n        };\r\n    };\r\n    var LabResultsCtrl = new LabResultsBaseCtrl(true);\r\n    var LabResultsMobileCtrl = new LabResultsBaseCtrl(false);\r\n\r\n    angular.module('mychart').controller('LabResultsCtrl',\r\n        ['$scope', '$stateParams', 'MyChartService', 'PatientPortalStorageRepository', '$uibModal', 'PersonRepository', 'PatientAttachmentRepository', 'aprgettext', 'toaster',\r\n        'BrowserService',\r\n            LabResultsCtrl]);\r\n    angular.module('mychart').controller('LabResultsMobileCtrl',\r\n        ['$scope', '$stateParams', 'MyChartService', 'PatientPortalStorageRepository', '$uibModal', 'PersonRepository', 'PatientAttachmentRepository', 'aprgettext', 'toaster',\r\n        'BrowserService',\r\n            LabResultsMobileCtrl]);\r\n})();","(function () {\r\n    'use strict';\r\n    var MedicationAllergiesBaseCtrl = function (autoInit) {\r\n        return function (_, $scope, $stateParams, MyChartService, PatientPortalStorageRepository) {\r\n\r\n            var activePatient = PatientPortalStorageRepository.getActivePatient();\r\n            var loginUser = PatientPortalStorageRepository.getLoginUser(),\r\n                reportRequestDto = {\r\n                    PatientId: activePatient.id,\r\n                    LoginUserId: loginUser.id,\r\n                    LoginUserName: loginUser.name\r\n                };\r\n\r\n            $scope.model = {\r\n                MedicationAllergies: null\r\n\r\n            };\r\n\r\n            function auditMedicationAllergies(reportRequestDto) {\r\n                MyChartService.auditMedicationAllergiesLogging(reportRequestDto);\r\n            }\r\n\r\n            function initialize() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n                MyChartService\r\n                    .getMedicationAllergies(activePatient.id)\r\n                    .then(function (data) {\r\n                        $scope.model.MedicationAllergies = data.plain();\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n                auditMedicationAllergies(reportRequestDto);\r\n            }\r\n\r\n            $scope.tileState = {\r\n                isCollapsed: undefined\r\n            };\r\n\r\n            function toggleState() {\r\n                if ($scope.tileState.isCollapsed === undefined) {\r\n                    initialize();\r\n                    $scope.tileState.isCollapsed = false;\r\n                }\r\n                else\r\n                    $scope.tileState.isCollapsed = !$scope.tileState.isCollapsed;\r\n            }\r\n\r\n            if (autoInit) {\r\n                initialize();\r\n            }\r\n\r\n            $scope.auditMedicationAllergies = auditMedicationAllergies;\r\n            $scope.toggleState = toggleState;\r\n        };\r\n    };\r\n\r\n    var MedicationAllergiesCtrl = new MedicationAllergiesBaseCtrl(true);\r\n    var MedicationAllergiesMobileCtrl = new MedicationAllergiesBaseCtrl(false);\r\n\r\n    angular.module('mychart').controller('MedicationAllergiesCtrl',\r\n        ['_', '$scope', '$stateParams', 'MyChartService', 'PatientPortalStorageRepository',\r\n            MedicationAllergiesCtrl]);\r\n    angular.module('mychart').controller('MedicationAllergiesMobileCtrl',\r\n        ['_', '$scope', '$stateParams', 'MyChartService', 'PatientPortalStorageRepository',\r\n            MedicationAllergiesMobileCtrl]);\r\n})();"," (function() {\r\n    'use strict';\r\n    var MyChartBaseCtrl = function (destinationRoutePrefix, chartConsentRoute) {\r\n        return function($scope, $q, MyChartService, PatientPortalStorageRepository, $modal, ConsentService, TransitionManager, $state, PersonRepository, gettext, toaster, BrowserService)\r\n        {\r\n            $scope.loading = false;\r\n            $scope.ShowSidebar = false;\r\n            $scope.collapseMedicalHistory = false;\r\n            $scope.collapsePersonalDetails = true;\r\n            $scope.myChart = {\r\n                'User': {FullName: '', Id: '', Age: ''},\r\n                'Config': ''\r\n            };\r\n\r\n            var activePatient = PatientPortalStorageRepository.getActivePatient(),\r\n                loginUser = PatientPortalStorageRepository.getLoginUser(),\r\n                reportRequestDto = {\r\n                    PatientId: activePatient.id,\r\n                    LoginUserId: loginUser.id,\r\n                    LoginUserName: loginUser.name\r\n                };\r\n            var isPatientChartAccepted = false;\r\n\r\n            var updateUsageMetricDto = {\r\n                MetricTypeName: '170.315(e)(1) - View, Download, and Transmit to 3rd Party',\r\n                MetricSubTypeName: 'Success',\r\n                IncrementFactor: 1,\r\n            };\r\n\r\n            $scope.expandPersonalDetails = function () {\r\n                $scope.collapseMedicalHistory = true;\r\n                $scope.collapsePersonalDetails = false;\r\n            };\r\n            $scope.expandMedicalDetails = function () {\r\n                $scope.collapseMedicalHistory = false;\r\n                $scope.collapsePersonalDetails = true;\r\n            };\r\n\r\n            function loadMyChart() {\r\n                return MyChartService.loadMyChart(activePatient.id)\r\n                    .then(function (data) {\r\n                        var details = data[0],\r\n                            config = data[1];\r\n\r\n                        $scope.myChart.User.FullName = details.FirstName + ' ' + details.LastName;\r\n                        $scope.myChart.User.Id = details.Id;\r\n                        $scope.myChart.User.Age = details.Age;\r\n                        $scope.Date = details.DateOfBirth;\r\n                        $scope.FirstName = details.FirstName;\r\n                        $scope.LastName = details.LastName;\r\n\r\n                        $scope.myChart.Config = config;\r\n                    });\r\n            }\r\n\r\n            function getPatientChartAccepted() {\r\n                return ConsentService.isChartConsentAccepted(activePatient.id)\r\n                    .then(function (data) {\r\n                        isPatientChartAccepted = data;\r\n                        $scope.ShowSidebar = isPatientChartAccepted;\r\n                    });\r\n            }\r\n\r\n\r\n\r\n            function loadController() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n\r\n                var loadMyChartPromise = loadMyChart();\r\n                var getPatientChartAcceptedPromise = getPatientChartAccepted();\r\n\r\n                $q.all([getPatientChartAcceptedPromise, loadMyChartPromise]).then(function() {\r\n                    if (!isPatientChartAccepted) {\r\n                        var currentName = $state.current.name;\r\n                        var destinationRoute = currentName.replace(destinationRoutePrefix, '');\r\n                        TransitionManager.transition({appRoute: chartConsentRoute, opts: {redirectRoute: destinationRoute}});\r\n                    }\r\n                }).catch(function (response) {\r\n                    $scope.addHttpError(response);\r\n                }).finally(function () {\r\n                    $scope.loading = false;\r\n                });\r\n            }\r\n            loadController();\r\n\r\n\r\n            function displayCompleteChart() {\r\n                //use with pdf viewer\r\n                $scope.isModalDisplayed = true;\r\n                auditChartResults();\r\n\r\n                var modalInstance = $modal.open({\r\n                    templateUrl: '/mychart/views/modals/completeChartModal.html',\r\n                    controller: 'CompleteChartModalCtrl',\r\n                    size: 'lg',\r\n                    resolve: {\r\n                        activePatient: function() {\r\n                            return PatientPortalStorageRepository.getActivePatient();\r\n                        }\r\n                    }\r\n                });\r\n\r\n                modalInstance.result.then(function () {\r\n                    $scope.isModalDisplayed = false;\r\n                });\r\n            }\r\n\r\n            function viewCompleteChartImage() {\r\n                $scope.isModalDisplayed = true;\r\n                auditChartResults();\r\n\r\n                var modalConfig = {\r\n                    Title: gettext('Complete Chart'),\r\n                    DownloadFileName: activePatient.firstName + activePatient.lastName + '_CompleteChart.pdf',\r\n                    DocumentId: activePatient.id,\r\n                    DocumentLoad: getCompleteChartImage,\r\n                    DocumentDownload: downloadCompleteChart,\r\n                    DisableInlinePdf: !BrowserService.supportsInlinePdf(),\r\n                };\r\n\r\n                var modalInstance = $modal.open({\r\n                    templateUrl: '/app/views/viewDocumentModal.html',\r\n                    controller: 'ViewDocumentModalCtrl',\r\n                    windowClass: 'modal-full',\r\n                    resolve: {\r\n                        modalConfig: function () {\r\n                            return modalConfig;\r\n                        }\r\n                    }\r\n                });\r\n\r\n                modalInstance.result.then(function () {\r\n                    $scope.isModalDisplayed = false;\r\n                });\r\n            }\r\n\r\n            // this function is called with a documentId, but it's not being used here,\r\n            // since the repository call below only needs the patient id\r\n            function getCompleteChartImage(documentId, requestSettings) {\r\n                var patientId = activePatient.id;\r\n                return PersonRepository.getCompleteChartImage(patientId, requestSettings);\r\n            }\r\n\r\n            // this function is called with a documentId, but it's not necessary here,\r\n            // since the repository call below only needs the patient id\r\n            function downloadCompleteChart() {\r\n                var patientId = activePatient.id;\r\n                var usageMetricSubTypeName = 'Success';\r\n                auditChartResults();\r\n                return PersonRepository.getCompleteChart(patientId)\r\n                    .then(function (data) {\r\n                        return {Data: data.Data, Extension: 'pdf', FileName: 'CompleteChart' + '_' + activePatient.fullName};\r\n                    })\r\n                    .catch(function () {\r\n                        usageMetricSubTypeName = 'Failure';\r\n                        toaster.pop('error', '', gettext('An error occurred while downloading'));\r\n                    })\r\n                    .finally(function () {\r\n                        updateUsageMetric(usageMetricSubTypeName);\r\n                    });\r\n            }\r\n\r\n            var showChartSidebarListener = $scope.$on('ShowChartSidebar:updated', function (event, data) {\r\n                $scope.ShowSidebar = data;\r\n            });\r\n\r\n            $scope.$on('$destroy', function() {\r\n                showChartSidebarListener();  // un-subscribed listener event\r\n            });\r\n\r\n            function auditChartResults() {\r\n                MyChartService.auditChartLogging(reportRequestDto);\r\n            }\r\n\r\n            function updateUsageMetric(metricSubTypeName) {\r\n                updateUsageMetricDto.MetricSubTypeName = metricSubTypeName;\r\n                MyChartService.usageMetricLogging(updateUsageMetricDto);\r\n            }            \r\n\r\n            $scope.displayCompleteChart = displayCompleteChart;\r\n            $scope.viewCompleteChartImage = viewCompleteChartImage;\r\n        };\r\n    };\r\n    var MyChartCtrl = new MyChartBaseCtrl('myChart.', 'chartConsent');\r\n    var MyChartMobileCtrl = function ($scope, $q, MyChartService, PatientPortalStorageRepository, $modal, ConsentService, TransitionManager, $state, PersonRepository, gettext, toaster) {\r\n        new MyChartBaseCtrl('myChartMobile.', 'chartMobileConsent').call(this, $scope, $q, MyChartService, PatientPortalStorageRepository, $modal, ConsentService, TransitionManager, $state, PersonRepository, gettext, toaster);\r\n        $scope.openPersonalDetails = $state.params.openPD === 'true';\r\n    };\r\n    angular.module('mychart').controller('MyChartCtrl',\r\n        ['$scope', '$q', 'MyChartService', 'PatientPortalStorageRepository', '$uibModal', 'ConsentService', 'TransitionManager', '$state', 'PersonRepository', 'aprgettext', 'toaster',\r\n        'BrowserService',\r\n            MyChartCtrl]);\r\n    angular.module('mychart').controller('MyChartMobileCtrl',\r\n        ['$scope', '$q', 'MyChartService', 'PatientPortalStorageRepository', '$uibModal', 'ConsentService', 'TransitionManager', '$state', 'PersonRepository', 'aprgettext', 'toaster',\r\n        'BrowserService',\r\n            MyChartMobileCtrl]);\r\n })();\r\n","(function() {\r\n    'use strict';\r\n\r\n    angular.module('mychart').controller('PatientDocumentsCtrl', [\r\n        PatientDocumentsCtrl\r\n    ]);\r\n\r\n    function PatientDocumentsCtrl(\r\n    ) {\r\n        console.log('WORKING');\r\n\r\n        var vm = this;\r\n\r\n        vm.loading = false;\r\n        vm.context = null;\r\n    }\r\n\r\n})();","(function() {\r\n    'use strict';\r\n    var PersonalDetailsBaseCtrl = function (autoInit) {\r\n        return function ($scope, $stateParams, $modal, $filter, MyChartService, ListService, toaster, gettext, $log, PatientPortalStorageRepository) {\r\n            $scope.loading = false;\r\n            $scope.edit = false;\r\n            $scope.plusPhone = false;\r\n            $scope.hasPhoneNumber = false;\r\n            $scope.hasEmailAddress = false;\r\n            $scope.updateDemographicsRequestDto = null;\r\n            $scope.phoneRegEx = /\\(?\\d{3}(-|\\))?\\s?\\d{3}-?\\d{4}$/;\r\n            $scope.ssnRegEx = /^\\d{3}-?\\d{2}-?\\d{4}$/;\r\n\r\n            var activePatient = PatientPortalStorageRepository.getActivePatient();\r\n            var loginUser = PatientPortalStorageRepository.getLoginUser(),\r\n                reportRequestDto = {\r\n                    PatientId: activePatient.id,\r\n                    LoginUserId: loginUser.id,\r\n                    LoginUserName: loginUser.name\r\n                };\r\n\r\n            var genderList = ListService.getList('genders', $scope, 'genderTypes'),\r\n                languageList = ListService.getList('languagelist', $scope, 'languageTypes'),\r\n                raceList = ListService.getList('racelist', $scope, 'raceTypes'),\r\n                maritalStatusList = ListService.getList('maritalstatuslist', $scope, 'maritalStatusTypes'),\r\n                phoneTypeList = ListService.getList('phonetype', $scope, 'phoneTypes');\r\n            ListService.getList('ethnicitylist', $scope, 'ethnicityTypes');\r\n\r\n            function cancelEdit() {\r\n                $scope.updateDetailsRequestDto = null;\r\n                $scope.edit = !$scope.edit;\r\n                $scope.plusPhone = false;\r\n                $scope.editPatientDetailsForm.$setPristine();\r\n            }\r\n\r\n            function phoneNumberFormat(input) {\r\n                return $filter('tel')(input);\r\n            }\r\n\r\n            function addNumbers(){\r\n                $scope.plusPhone = !$scope.plusPhone;\r\n            }\r\n\r\n            function editDetails() {\r\n                $scope.edit = !$scope.edit;\r\n\r\n                var dto = $scope.updateDetailsRequestDto = _.cloneDeep($scope.patientDetail);\r\n\r\n                genderList.then(function (data) {\r\n                    dto.Gender = _.find(data, {Id: dto.Gender && dto.Gender.Id});\r\n                });\r\n                languageList.then(function (data) {\r\n                    dto.Language = _.find(data, {Id: dto.Language && dto.Language.Id});\r\n                });\r\n                raceList.then(function (data) {\r\n                    dto.Race = _.find(data, {Id: dto.Race && dto.Race.Id});\r\n                });\r\n                maritalStatusList.then(function (data) {\r\n                    dto.MaritalStatus = _.find(data, {Id: dto.MaritalStatus && dto.MaritalStatus.Id});\r\n                });\r\n                phoneTypeList.then(function (data) {\r\n                    dto.PhoneNumber1Type = _.find(data, {Id: dto.PhoneNumber1Type && dto.PhoneNumber1Type.Id});\r\n                    dto.PhoneNumber2Type = _.find(data, {Id: dto.PhoneNumber2Type && dto.PhoneNumber2Type.Id});\r\n                    dto.PhoneNumber3Type = _.find(data, {Id: dto.PhoneNumber3Type && dto.PhoneNumber3Type.Id});\r\n                    dto.PhoneNumber4Type = _.find(data, {Id: dto.PhoneNumber4Type && dto.PhoneNumber4Type.Id});\r\n                });\r\n            }\r\n\r\n            function saveUpdateDetailsRequest(theForm) {\r\n                if ((theForm || $scope.editPatientDetailsForm).$valid) {\r\n                    $scope.saving = true;\r\n                    $scope.updateDetailsRequestDto.PhoneNumber1 = phoneNumberFormat($scope.updateDetailsRequestDto.PhoneNumber1);\r\n                    $scope.updateDetailsRequestDto.PhoneNumber2 = phoneNumberFormat($scope.updateDetailsRequestDto.PhoneNumber2);\r\n                    $scope.updateDetailsRequestDto.PhoneNumber3 = phoneNumberFormat($scope.updateDetailsRequestDto.PhoneNumber3);\r\n                    $scope.updateDetailsRequestDto.PhoneNumber4 = phoneNumberFormat($scope.updateDetailsRequestDto.PhoneNumber4);\r\n\r\n                    MyChartService.updateDetails(activePatient.id, $scope.updateDetailsRequestDto)\r\n                        .then(function (data) {\r\n                            updateScope(data.plain());\r\n                            $scope.edit = !$scope.edit;\r\n                            (theForm || $scope.editPatientDetailsForm).$setPristine();\r\n                            toaster.pop('success', '', gettext('Update request sent successfully.'));\r\n                        })\r\n                        .catch(function (response) {\r\n                            $log.error(response);\r\n                            toaster.pop('error', '', gettext('An error has occurred. Update request was not saved.'));\r\n                        })\r\n                        .finally(function () {\r\n                            $scope.saving = false;\r\n                        });\r\n                }\r\n                else {\r\n                    toaster.pop('warning', '', gettext('Patient is not valid and cannot be saved. Please correct all issues before saving the request.'));\r\n                }\r\n\r\n                $scope.editPatientDetailsForm.$setPristine();\r\n            }\r\n\r\n            function updateScope(data) {\r\n                $scope.patientDetail = data;\r\n                if (data.PhoneNumber1 || data.PhoneNumber2 ||\r\n                    data.PhoneNumber3 || data.PhoneNumber4) {\r\n                    $scope.hasPhoneNumber = true;\r\n                }\r\n                if (data.EmailAddress1 || data.EmailAddress2) {\r\n                    $scope.hasEmailAddress = true;\r\n                }\r\n            }\r\n\r\n            function removePharmacy(index) {\r\n                $scope.updateDetailsRequestDto.Pharmacies.splice(index, 1);\r\n                $scope.editPatientDetailsForm.$setDirty();\r\n            }\r\n\r\n            function open() {\r\n\r\n                var modalInstance = $modal.open({\r\n                    templateUrl: '/mychart/views/modals/pharmacySearch.html',\r\n                    controller: 'PharmacyModalCtrl',\r\n                    size: 'lg',\r\n                    resolve: {\r\n                        pharmacies: function () {\r\n                            return $scope.updateDetailsRequestDto.Pharmacies;\r\n                        }\r\n                    }\r\n                });\r\n\r\n                modalInstance.result.then(function (pharmacies) {\r\n                    $scope.updateDetailsRequestDto.Pharmacies = pharmacies;\r\n                    $scope.editPatientDetailsForm.$setDirty();\r\n                });\r\n            }\r\n\r\n            function auditDemographics(reportRequestDto) {\r\n                MyChartService.auditDemographicsLogging(reportRequestDto);\r\n            }\r\n\r\n            function initialize() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n                MyChartService.getPatientDetailsMetadata($scope);\r\n                MyChartService.loadMyChart(activePatient.id)\r\n                    .then(function (data) {\r\n                        updateScope(data[0]);\r\n                        $scope.config = data[1];\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n                auditDemographics(reportRequestDto);\r\n            }\r\n            \r\n            $scope.tileState = {\r\n                isCollapsed: undefined                \r\n            };\r\n            $scope.toggleState = function() {\r\n                if($scope.tileState.isCollapsed === undefined)\r\n                {\r\n                    initialize();\r\n                    $scope.tileState.isCollapsed = false;\r\n                }\r\n                else\r\n                    $scope.tileState.isCollapsed = !$scope.tileState.isCollapsed;\r\n            };\r\n\r\n            $scope.addNumbers = addNumbers;\r\n            $scope.auditDemographics = auditDemographics;\r\n            $scope.cancelEdit = cancelEdit;\r\n            $scope.editDetails = editDetails;\r\n            $scope.open = open;\r\n            $scope.removePharmacy = removePharmacy;\r\n            $scope.saveUpdateDetailsRequest = saveUpdateDetailsRequest;\r\n\r\n            if(autoInit) {\r\n                initialize();\r\n            }\r\n        };\r\n    };\r\n\r\n    var PersonalDetailsCtrl = new PersonalDetailsBaseCtrl(true);\r\n    var PersonalDetailsMobileCtrl = new PersonalDetailsBaseCtrl(false);\r\n    \r\n    angular.module('mychart').controller('PersonalDetailsCtrl',\r\n        ['$scope', '$stateParams', '$uibModal', '$filter', 'MyChartService', 'ListService', 'toaster', 'aprgettext', '$log', 'PatientPortalStorageRepository',\r\n            PersonalDetailsCtrl]);\r\n    angular.module('mychart').controller('PersonalDetailsMobileCtrl',\r\n        ['$scope', '$stateParams', '$uibModal', '$filter', 'MyChartService', 'ListService', 'toaster', 'aprgettext', '$log', 'PatientPortalStorageRepository',\r\n            PersonalDetailsMobileCtrl]);\r\n})();\r\n\r\n\r\n","(function() {\r\n    'use strict';\r\n    var ProblemsBaseCtrl = function (autoInit) {\r\n        return function (_, $scope, $stateParams, MyChartService, PatientPortalStorageRepository) {\r\n            $scope.name = 'Problems';\r\n            $scope.loading = false;\r\n            $scope.problem = {active: 1, activeName: 'Active'};\r\n            $scope.activeFilters = [\r\n              { Id: 0, Name: 'All' },\r\n              { Id: 1, Name: 'Active' },\r\n              { Id: 2, Name: 'Not Active' }  \r\n            ];\r\n\r\n            var activePatientId = PatientPortalStorageRepository.getActivePatient().id;\r\n\r\n            $scope.hidden = function hidden(prob) {\r\n                if (prob.Notes) {\r\n                    prob.Show = !prob.Show;\r\n                }\r\n            };\r\n\r\n            $scope.update = function update(newFilterId) {\r\n                $scope.problem.active = newFilterId;\r\n                $scope.problem.activeName = _.find($scope.activeFilters, { Id: newFilterId }).Name;\r\n                var activeProblems = _.filter($scope.problems, function (item) {\r\n                    if (Number($scope.problem.active) === 0) {\r\n                        return true;\r\n                    }\r\n                    else if (Number($scope.problem.active) === 1) {\r\n                        return !!item.IsActive;\r\n                    }\r\n                    else if (Number($scope.problem.active) === 2) {\r\n                        return !item.IsActive;\r\n                    }\r\n                });\r\n                $scope.filteredProblems = activeProblems;\r\n                $scope.numprobs = activeProblems.length;\r\n            };\r\n\r\n            function initialize() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n                MyChartService\r\n                    .getProblems(activePatientId)\r\n                    .then(function (data) {\r\n                        $scope.problems = _.map(data, function (element) {\r\n                            return _.assignIn(element, {Show: false});\r\n                        });\r\n                        $scope.update($scope.problem.active);\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n            \r\n            $scope.tileState = {\r\n                isCollapsed: undefined                \r\n            };\r\n            $scope.toggleState = function() {\r\n                if($scope.tileState.isCollapsed === undefined)\r\n                {\r\n                    initialize();\r\n                    $scope.tileState.isCollapsed = false;\r\n                }\r\n                else\r\n                    $scope.tileState.isCollapsed = !$scope.tileState.isCollapsed;\r\n            };\r\n\r\n            if(autoInit) {\r\n                initialize();\r\n            }\r\n        };\r\n    };\r\n\r\n    var ProblemsCtrl = new ProblemsBaseCtrl(true);\r\n    var ProblemsMobileCtrl = new ProblemsBaseCtrl(false);\r\n    \r\n    angular.module('mychart').controller('ProblemsCtrl',\r\n        ['_', '$scope', '$stateParams', 'MyChartService', 'PatientPortalStorageRepository',\r\n        ProblemsCtrl]);\r\n    angular.module('mychart').controller('ProblemsMobileCtrl',\r\n        ['_', '$scope', '$stateParams', 'MyChartService', 'PatientPortalStorageRepository',\r\n        ProblemsMobileCtrl]);\r\n})();","(function() {\r\n    'use strict';\r\n    var ProceduresBaseCtrl = function (autoInit) {\r\n        return function (_, $scope, $stateParams, MyChartService, PatientPortalStorageRepository) {\r\n            $scope.name = 'Procedures';\r\n            $scope.loading = false;\r\n\r\n            var activePatient = PatientPortalStorageRepository.getActivePatient();\r\n            var loginUser = PatientPortalStorageRepository.getLoginUser(),\r\n                reportRequestDto = {\r\n                    PatientId: activePatient.id,\r\n                    LoginUserId: loginUser.id,\r\n                    LoginUserName: loginUser.name\r\n                };\r\n\r\n            $scope.hidden = function hidden(proc) {\r\n                if (proc.Notes || proc.Long) {\r\n                    proc.Show = !proc.Show;\r\n                }\r\n            };\r\n\r\n            function initialize() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n                MyChartService\r\n                    .getProcedures(activePatient.id)\r\n                    .then(function (data) {\r\n                        $scope.procedures = _.map(data, function (element, index) {\r\n                            return _.assignIn(element, {\r\n                                Id: index, // since the getProcedures call does not return a uniquely identifying property ...\r\n                                Show: false,\r\n                                //todo: find different solution than hard coding 55 as the length of the description\r\n                                Long: element.Description ? element.Description.length > 55 : false\r\n                                });\r\n                        });\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n                auditProcedures(reportRequestDto);\r\n            }\r\n\r\n            function auditProcedures(reportRequestDto) {\r\n                MyChartService.auditProceduresLogging(reportRequestDto);\r\n            }\r\n\r\n            $scope.tileState = {\r\n                isCollapsed: undefined                \r\n            };\r\n            $scope.toggleState = function() {\r\n                if($scope.tileState.isCollapsed === undefined)\r\n                {\r\n                    initialize();\r\n                    $scope.tileState.isCollapsed = false;\r\n                }\r\n                else\r\n                    $scope.tileState.isCollapsed = !$scope.tileState.isCollapsed;\r\n            };\r\n\r\n            $scope.auditProcedures = auditProcedures;\r\n\r\n            if(autoInit) {\r\n                initialize();  \r\n            }\r\n        };\r\n    };\r\n\r\n    var ProceduresCtrl = new ProceduresBaseCtrl(true);\r\n    var ProceduresMobileCtrl = function (_, $scope, $stateParams, MyChartService, PatientPortalStorageRepository, $modal) {\r\n        new ProceduresBaseCtrl(false).call(this, _, $scope, $stateParams, MyChartService, PatientPortalStorageRepository);\r\n        $scope.viewModal = function(procId) {\r\n            var modalInstance = $modal.open({\r\n                templateUrl: '/mychart/views/mobile/genericModal.html',\r\n                controller: 'GenericModalCtrl',\r\n                scope: $scope,\r\n                resolve: {\r\n                    canPrint: function() {\r\n                        return false;\r\n                    },\r\n                    modalContent: function () {\r\n                        var procedure = _.find($scope.procedures, { Id: procId });\r\n                        var modalContent =\r\n                                '<div>' + new Date(procedure.VisitDate).toLocaleDateString() + '</div>' +\r\n                                '<div>' + procedure.Name + '</div>' +\r\n                                '<div>' + procedure.Description + '</div>';\r\n                        return modalContent;\r\n                    }\r\n                }\r\n            });\r\n            modalInstance.result.then(function() {\r\n            });\r\n        };\r\n    };\r\n    \r\n    angular.module('mychart').controller('ProceduresCtrl',\r\n        ['_', '$scope', '$stateParams', 'MyChartService', 'PatientPortalStorageRepository',\r\n            ProceduresCtrl]);\r\n    angular.module('mychart').controller('ProceduresMobileCtrl',\r\n        ['_', '$scope', '$stateParams', 'MyChartService', 'PatientPortalStorageRepository', '$uibModal',\r\n            ProceduresMobileCtrl]);\r\n})();\r\n","(function () {\r\n    'use strict';\r\n    var ReferenceMaterialBaseCtrl = function (autoInit) {\r\n        return function ($scope, $stateParams, MyChartService, PatientPortalStorageRepository, $modal, LanguageFactory, PersonRepository, PatientAttachmentRepository, toaster, gettext, BrowserService) {\r\n            $scope.loading = false;\r\n            $scope.isModalDisplayed = false;\r\n\r\n            var activePatient = PatientPortalStorageRepository.getActivePatient(),\r\n                loginUser = PatientPortalStorageRepository.getLoginUser(),\r\n                activeLanguage = LanguageFactory.getActiveLanguage(),\r\n                reportRequestDto = {\r\n                    PatientId: activePatient.id,\r\n                    LoginUserId: loginUser.id,\r\n                    LoginUserName: loginUser.name\r\n                };\r\n\r\n            $scope.model = {\r\n                EducationalMaterial: null,\r\n                LanguageOptions: null,\r\n                ActiveLanguage: {\r\n                    Id: '',\r\n                    Description: ''\r\n                },\r\n                ActivatePatient: activePatient\r\n            };\r\n\r\n            function initialize() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n                MyChartService\r\n                    .getReferenceMaterial(reportRequestDto)\r\n                    .then(function (data) {\r\n                        auditEducationMaterials(reportRequestDto);\r\n                        $scope.model.EducationalMaterial = _(data.EducationalMaterial).map(function (entry) {\r\n                            return _.assign(entry, {Downloading: false});\r\n                        }).value();\r\n\r\n                        $scope.model.LanguageOptions = data.Languages;\r\n                        if (data.Languages && data.Languages.length && activeLanguage) {\r\n                            $scope.model.ActiveLanguage = _.find(data.Languages, {Description: activeLanguage.name}) || data.Languages[0];\r\n                        }\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n\r\n            function viewReferenceMaterial(description, eduForms) {\r\n                $scope.isModalDisplayed = true;\r\n                var selectedEduForm = _.find(eduForms, function (form) {\r\n                    return form.Language.Id === $scope.model.ActiveLanguage.Id;\r\n                });\r\n                selectedEduForm = selectedEduForm || eduForms[0];\r\n\r\n                var modalConfig = {\r\n                    Title: description,\r\n                    DownloadFileName: description,\r\n                    PatientId: activePatient.id,\r\n                    DocumentId: selectedEduForm.AttachmentId,\r\n                    DocumentLoad: getReferenceMaterial,\r\n                    DocumentDownload: downloadReferenceMaterial,\r\n                    DisableInlinePdf: !BrowserService.supportsInlinePdf(),\r\n                };\r\n\r\n                var modalInstance = $modal.open({\r\n                    templateUrl: '/app/views/viewDocumentModal.html',\r\n                    controller: 'ViewDocumentModalCtrl',\r\n                    windowClass: 'modal-full',\r\n                    resolve: {\r\n                        modalConfig: function () {\r\n                            return modalConfig;\r\n                        }\r\n                    }\r\n                });\r\n\r\n                modalInstance.result.then(function () {\r\n                    $scope.isModalDisplayed = false;\r\n                });\r\n            }\r\n\r\n            function getReferenceMaterial(documentId, requestSettings) {\r\n                return PatientAttachmentRepository.getAttachment(documentId, activePatient.id, requestSettings)\r\n                    .then(function (data) {\r\n                        auditEducationMaterials(reportRequestDto);\r\n                        return data;\r\n                    });\r\n            }\r\n\r\n            function downloadReferenceMaterial(documentId) {\r\n                return PatientAttachmentRepository.getAttachmentRetainOriginalFormat(documentId, activePatient.id)\r\n                    .then(function (data) {\r\n                        auditEducationMaterials(reportRequestDto);\r\n                        return data;\r\n                    });\r\n            }\r\n\r\n            function updateActiveLanguage(language, mobile) {\r\n                $scope.model.ActiveLanguage = language;\r\n                if (mobile) {\r\n                    $scope.isCollapsed = false;\r\n                }\r\n            }\r\n\r\n            function auditEducationMaterials() {\r\n                MyChartService.auditEducationMaterialLogging(reportRequestDto);\r\n            }\r\n\r\n            function downloadFormFromModal(documentId) {\r\n                return PersonRepository.getReferenceMaterialAttachment(activePatient.id, documentId)\r\n                    .then(function (data) {\r\n                        auditEducationMaterials(reportRequestDto);\r\n                        return data;\r\n                    });\r\n            }\r\n\r\n            function downloadForm(formGroup) {\r\n                formGroup.Downloading = true;\r\n                var selectedEduForm = _.find(formGroup.Forms, function (form) {\r\n                    return form.Language.Id === $scope.model.ActiveLanguage.Id;\r\n                });\r\n                selectedEduForm = selectedEduForm || formGroup.Forms[0];\r\n                return PersonRepository.getReferenceMaterialAttachment(activePatient.id, selectedEduForm.AttachmentId)\r\n                    .then(function (data) {\r\n                        MyChartService.auditEducationMaterialLogging(reportRequestDto);\r\n                        return data;\r\n                    })\r\n                    .catch(function () {\r\n                        toaster.pop('error', '', gettext('An error occurred while downloading'));\r\n                    })\r\n                    .finally(function () {\r\n                        formGroup.Downloading = false;\r\n                    });\r\n            }\r\n\r\n            $scope.viewReferenceMaterial = viewReferenceMaterial;\r\n            $scope.updateActiveLanguage = updateActiveLanguage;\r\n            $scope.downloadFormFromModal = downloadFormFromModal;\r\n            $scope.getReferenceMaterial = getReferenceMaterial;\r\n            $scope.downloadForm = downloadForm;\r\n\r\n            $scope.tileState = {\r\n                isCollapsed: undefined\r\n            };\r\n            $scope.toggleState = function () {\r\n                if ($scope.tileState.isCollapsed === undefined) {\r\n                    initialize();\r\n                    $scope.tileState.isCollapsed = false;\r\n                }\r\n                else\r\n                    $scope.tileState.isCollapsed = !$scope.tileState.isCollapsed;\r\n            };\r\n\r\n            if (autoInit) {\r\n                initialize();\r\n            }\r\n        };\r\n    };\r\n\r\n    var ReferenceMaterialCtrl = new ReferenceMaterialBaseCtrl(true);\r\n    var ReferenceMaterialMobileCtrl = new ReferenceMaterialBaseCtrl(false);\r\n\r\n    angular.module('mychart').controller('ReferenceMaterialCtrl',\r\n        ['$scope', '$stateParams', 'MyChartService', 'PatientPortalStorageRepository', '$uibModal', 'LanguageFactory', 'PersonRepository', 'PatientAttachmentRepository', 'toaster', 'aprgettext',\r\n        'BrowserService',\r\n            ReferenceMaterialCtrl]);\r\n    angular.module('mychart').controller('ReferenceMaterialMobileCtrl',\r\n        ['$scope', '$stateParams', 'MyChartService', 'PatientPortalStorageRepository', '$uibModal', 'LanguageFactory', 'PersonRepository', 'PatientAttachmentRepository', 'toaster', 'aprgettext',\r\n        'BrowserService',\r\n            ReferenceMaterialMobileCtrl]);\r\n})();","angular.module('mychart').controller('ShareCCDCtrl',\r\n    ['$scope', 'PatientPortalStorageRepository', 'ChartRepository', '$sce', '$location', 'toaster', 'aprgettext', '$log', '$uibModal',\r\n        function ($scope, PatientPortalStorageRepository, ChartRepository, $sce, $location, toaster, gettext, $log, $modal) {\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n            $scope.loadingHtml = false;\r\n            $scope.loadingXml = false;\r\n            $scope.vm = {\r\n                startDate: '',\r\n                endDate: '',\r\n                fullHistory: true\r\n            };           \r\n\r\n            var path = $location.path();\r\n\r\n            var activePatient = PatientPortalStorageRepository.getActivePatient(),\r\n                loginUser = PatientPortalStorageRepository.getLoginUser(),\r\n                reportRequestDto = {\r\n                    PatientId: activePatient.id,\r\n                    LoginUserId: loginUser.id,\r\n                    LoginUserName: loginUser.name\r\n                },\r\n                ccdHtml;\r\n            $scope.model = {\r\n                chartHtml: '',\r\n                loadingUrl: '',\r\n                xmlFileName: activePatient.firstName + activePatient.lastName + '_CDA.xml',\r\n                ccdFileName: activePatient.firstName + activePatient.lastName + '_CCD.html'\r\n            };\r\n\r\n            function downloadCDA() {\r\n                $scope.loadingXml = true;\r\n\r\n                var startDate = null;\r\n                var endDate = null;\r\n                \r\n                if (!$scope.vm.fullHistory){\r\n                    startDate = ($scope.vm.startDate) ? moment($scope.vm.startDate).hour(0).minute(0).second(0).toDate() : null;\r\n                    endDate = ($scope.vm.endDate) ? moment($scope.vm.endDate).hour(0).minute(0).second(0).toDate() : null;\r\n                }\r\n                var dateFilter = {\r\n                    startDate: startDate,\r\n                    endDate: endDate\r\n                };\r\n\r\n                return ChartRepository.getCDAXml(reportRequestDto.PatientId, dateFilter)\r\n                    .then(function (data) {\r\n                        if (data) {\r\n                            return data.StringResult;\r\n                        }\r\n                    })\r\n                    .catch(function (response) {\r\n                        $log.error(response);\r\n                        toaster.pop('error', '', gettext('An error has occurred. Unable to download CDA.'));\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loadingXml = false;\r\n                    });\r\n            }\r\n\r\n            function downloadHtml() {\r\n                $scope.loadingHtml = true;\r\n                return ChartRepository.postCCDHtmlDownloaded(reportRequestDto)\r\n                    .then(function () {\r\n                        return ccdHtml;\r\n                    })\r\n                    .catch(function (response) {\r\n                        $log.error(response);\r\n                        toaster.pop('error', '', gettext('An error has occurred. Unable to download Html.'));\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loadingHtml = false;\r\n                    });\r\n            }\r\n\r\n            function viewAccessLog() {\r\n                $modal.open({\r\n                    templateUrl: '/mychart/views/modals/ccdAccessLog.html',\r\n                    controller: 'CcdAccessLogModalCtrl',\r\n                    size: 'lg',\r\n                    resolve: {\r\n                        patientId: function () {\r\n                            return activePatient.id;\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n\r\n            function transmitModal() {\r\n                var startDate = null;\r\n                var endDate = null;\r\n                \r\n                if (!$scope.vm.fullHistory){\r\n                    startDate = ($scope.vm.startDate) ? moment($scope.vm.startDate).hour(0).minute(0).second(0).toDate() : null;\r\n                    endDate = ($scope.vm.endDate) ? moment($scope.vm.endDate).hour(0).minute(0).second(0).toDate() : null;\r\n                }\r\n                reportRequestDto.startDate = startDate;\r\n                reportRequestDto.endDate = endDate;\r\n                var modalInstance = $modal.open({\r\n                    templateUrl: '/mychart/views/modals/ccdTransmit.html',\r\n                    controller: 'CcdTransmitModalCtrl',\r\n                    size: 'lg',\r\n                    resolve: {\r\n                        requestDto: function () {\r\n                            return reportRequestDto;\r\n                        }\r\n                    }\r\n                });\r\n\r\n                modalInstance.result.then(function () {\r\n                    //todo open a success toaster\r\n                });\r\n            }\r\n\r\n            function getCcdHtml() {                \r\n                $scope.loadingCcd = true;\r\n                var startDate = null;\r\n                var endDate = null;\r\n                \r\n                if (!$scope.vm.fullHistory){\r\n                    startDate = ($scope.vm.startDate) ? moment($scope.vm.startDate).hour(0).minute(0).second(0).toDate() : null;\r\n                    endDate = ($scope.vm.endDate) ? moment($scope.vm.endDate).hour(0).minute(0).second(0).toDate() : null;\r\n                }\r\n                var dateFilter = {\r\n                    startDate: startDate,\r\n                    endDate: endDate\r\n                };\r\n                ChartRepository.getCCDHtml(reportRequestDto.PatientId, dateFilter)\r\n                .then(function (data) {\r\n                    $scope.removeHttpError();\r\n                    if (data) {\r\n                        ccdHtml = data.StringResult;\r\n                        $scope.model.chartHtml = $sce.trustAsHtml(ccdHtml);\r\n                        var absPath = $location.absUrl(),\r\n                            partial = $location.path(),\r\n                            newPartial = '/loadingDocument/';\r\n                        $scope.model.loadingUrl = absPath.replace(partial, newPartial);\r\n                    }\r\n                })\r\n                .catch(function (response) {\r\n                    $scope.addHttpError(response);\r\n                })\r\n                .finally(function () {\r\n                    $scope.loadingCcd = false;\r\n                    $scope.loading = false;\r\n                });\r\n            }\r\n            getCcdHtml();\r\n\r\n            $scope.getCcdHtml = getCcdHtml;\r\n            $scope.downloadCDA = downloadCDA;\r\n            $scope.downloadHtml = downloadHtml;\r\n            $scope.viewAccessLog = viewAccessLog;\r\n            $scope.transmitModal = transmitModal;\r\n            $scope.path = path;\r\n        }]);","angular.module('mychart').controller('VisitSummaryCtrl',\r\n    [\r\n        '_', \r\n        '$scope', \r\n        'MyChartService', \r\n        'PatientPortalStorageRepository', \r\n        '$uibModal', \r\n        'PersonRepository', \r\n        'moment', \r\n        'aprgettext', \r\n        'toaster',\r\n        'BrowserService',\r\n        'WebDocumentHelper',\r\n        function (\r\n            _, \r\n            $scope, \r\n            MyChartService, \r\n            PatientPortalStorageRepository, \r\n            $modal, \r\n            PersonRepository, \r\n            moment, \r\n            gettext, \r\n            toaster,\r\n            BrowserService,\r\n            WebDocumentHelper\r\n        ) {\r\n            'use strict';\r\n\r\n            $scope.name = 'VisitSummary';\r\n            $scope.numVisits = 0;\r\n            $scope.loading = true;\r\n            $scope.selectedVisit = {\r\n                Id: null,\r\n                FileName: 'VisitSummary'\r\n            };\r\n\r\n            var activePatient = PatientPortalStorageRepository.getActivePatient();\r\n            var loginUser = PatientPortalStorageRepository.getLoginUser(),\r\n                reportRequestDto = {\r\n                    PatientId: activePatient.id,\r\n                    LoginUserId: loginUser.id,\r\n                    LoginUserName: loginUser.name\r\n                };\r\n\r\n            var updateUsageMetricDto = {\r\n                MetricTypeName: '170.315(e)(1) - View, Download, and Transmit to 3rd Party',\r\n                MetricSubTypeName: 'Success',\r\n                IncrementFactor: 1,\r\n            };\r\n\r\n            function onLoad() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n\r\n                var usageMetricSubTypeName = 'Success';\r\n                MyChartService\r\n                    .getVisitSummaries(activePatient.id)\r\n                    .then(function (data) {\r\n                        $scope.visits = _(data.plain()).map(function (entry) {\r\n                            return _.assign(entry, {Downloading : false});\r\n                        }).value();\r\n                        $scope.numVisits = data.length;\r\n                    })\r\n                    .catch(function (response) {\r\n                        usageMetricSubTypeName = 'Failure';\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        updateUsageMetric(usageMetricSubTypeName);\r\n                        $scope.loading = false;\r\n                    });\r\n                auditMedicalHistory(reportRequestDto);\r\n            }\r\n\r\n            function viewVisitSummary(visitId, visitDate) {\r\n                auditClinicalSummary(reportRequestDto);\r\n                $scope.isModalDisplayed = true;\r\n\r\n                var modalConfig = {\r\n                    Title: gettext('Visit Summary: ') + moment(visitDate).format('LL'),\r\n                    DownloadFileName: activePatient.firstName + activePatient.lastName + '_VisitSummary',\r\n                    PatientId: activePatient.id,\r\n                    DocumentId: visitId,\r\n                    DocumentLoad: getVisitSummary,\r\n                    DocumentDownload: downloadVisitSummary,\r\n                    GetStaticUrl: getVisitSummaryUrl,\r\n                    HasStaticUrl: true,\r\n                    DisableInlinePdf: !BrowserService.supportsInlinePdf(),\r\n                    DocumentHelper: WebDocumentHelper\r\n                };\r\n\r\n                var modalInstance = $modal.open({\r\n                    templateUrl: '/app/views/viewDocumentModal.html',\r\n                    controller: 'ViewDocumentModalCtrl',\r\n                    windowClass: 'modal-full',\r\n                    resolve: {\r\n                        modalConfig: function () {\r\n                            return modalConfig;\r\n                        }\r\n                    }\r\n                });\r\n\r\n                modalInstance.result.then(function () {\r\n                    $scope.isModalDisplayed = false;\r\n                });\r\n            }\r\n\r\n            function getVisitSummary(documentId){\r\n                return PersonRepository.getVisitSummary(activePatient.id, documentId);\r\n            }\r\n\r\n            function getVisitSummaryUrl(documentId) {\r\n                return PersonRepository.getVisitSummaryUrl(activePatient.id, documentId);\r\n            }\r\n\r\n            function downloadVisitSummary(documentId){\r\n                auditClinicalSummary(reportRequestDto);\r\n                var usageMetricSubTypeName = 'Success';\r\n                return PersonRepository.getVisitSummary(activePatient.id, documentId)\r\n                    .then(function (data) {\r\n                        return {Data: data.Data, Extension: 'pdf'};\r\n                    })\r\n                    .catch(function () {\r\n                        usageMetricSubTypeName = 'Failure';\r\n                        toaster.pop('error', '', gettext('An error occurred while downloading'));\r\n                    })\r\n                    .finally(function () {\r\n                        updateUsageMetric(usageMetricSubTypeName);\r\n                    });                    \r\n            }\r\n\r\n            function downloadVisitSummaryByVisit(visit, visitDate){\r\n                auditClinicalSummary(reportRequestDto);\r\n                visit.Downloading = true;\r\n                $scope.selectedVisit.FileName += moment(visitDate).format('l');\r\n                $scope.selectedVisit.Id = visit.VisitId;\r\n\r\n                var usageMetricSubTypeName = 'Success';\r\n                return PersonRepository.getVisitSummary(activePatient.id, visit.VisitId)\r\n                    .then(function (data) {\r\n                        return {Data: data.Data, FileName: $scope.selectedVisit.FileName, Extension: 'pdf'};\r\n                    })\r\n                    .catch(function () {\r\n                        usageMetricSubTypeName = 'Failure';\r\n                        toaster.pop('error', '', gettext('An error occurred while downloading'));\r\n                    })\r\n                    .finally(function() {\r\n                        updateUsageMetric(usageMetricSubTypeName);\r\n                        visit.Downloading = false;\r\n                    });\r\n            }\r\n\r\n            function auditMedicalHistory(reportRequestDto) {\r\n                MyChartService.auditMedicalHistoryLogging(reportRequestDto);\r\n            }\r\n\r\n            function auditClinicalSummary(reportRequestDto) {\r\n                MyChartService.auditClinicalSummaryLogging(reportRequestDto);\r\n            }\r\n\r\n            function updateUsageMetric(metricSubTypeName) {\r\n                updateUsageMetricDto.MetricSubTypeName = metricSubTypeName;\r\n                MyChartService.usageMetricLogging(updateUsageMetricDto);\r\n            }            \r\n\r\n            onLoad();\r\n            $scope.auditClinicalSummary = auditClinicalSummary;\r\n            $scope.auditMedicalHistory = auditMedicalHistory;\r\n            $scope.viewVisitSummary = viewVisitSummary;\r\n            $scope.downloadVisitSummary = downloadVisitSummary;\r\n            $scope.downloadVisitSummaryByVisit = downloadVisitSummaryByVisit;\r\n        }]);","angular.module('mychart').controller('CcdAccessLogModalCtrl',\r\n    ['$scope', '$uibModalInstance', 'ChartRepository', 'patientId',\r\n        function ($scope, $modalInstance, ChartRepository, patientId) {\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n            $scope.model = {\r\n                AccessLog: ''\r\n            };\r\n\r\n            ChartRepository.getAccessLog(patientId)\r\n                .then(function (data) {\r\n                    $scope.removeHttpError();\r\n                    $scope.model.AccessLog = data;\r\n                })\r\n                .catch(function (response) {\r\n                    $scope.addHttpError(response);\r\n                })\r\n                .finally(function () {\r\n                    $scope.loading = false;\r\n                });\r\n\r\n            function ok() {\r\n                $modalInstance.close('ok');\r\n            }\r\n\r\n            function cancel() {\r\n                $modalInstance.dismiss('cancel');\r\n            }\r\n\r\n            $scope.ok = ok;\r\n            $scope.cancel = cancel;\r\n        }]);\r\n","angular.module('mychart').controller('CcdTransmitModalCtrl',\r\n    ['$scope', '$uibModalInstance', 'ChartRepository', 'requestDto', 'toaster', 'aprgettext', '$log',\r\n        function ($scope, $modalInstance, ChartRepository, requestDto, toaster, gettext, $log) {\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n            $scope.canSendDirectMail = false;\r\n            $scope.transmitting = false;\r\n            $scope.isConfigured = false;\r\n            $scope.model = {\r\n                DirectMailUser: '',\r\n                DocumentTypeList: [\r\n                    {Type: 'HTML'},\r\n                    {Type: 'XML'}\r\n                ],\r\n                SendTypeList: [\r\n                    {\r\n                        Type: 'Direct Mail',\r\n                        Enabled: false\r\n                    },\r\n                    {\r\n                        Type: 'Email',\r\n                        Enabled: false\r\n                    }\r\n                ],\r\n                DocumentType: '',\r\n                ProviderId: '',\r\n                DirectMailAddressTo: '',\r\n                Email:'',\r\n                SendType: '',\r\n                Subject: '',\r\n                Message: ''\r\n            };\r\n\r\n            function initialize() {\r\n                $scope.removeHttpError();\r\n                $scope.model.SendType = $scope.model.SendTypeList[1];\r\n                ChartRepository.getTransferCcdMetadata($scope);\r\n                ChartRepository.getTransmitCcdConfig(requestDto.PatientId)\r\n                    .then(function (data) {\r\n                        if (data && data.DirectMailConfig && data.DirectMailConfig.DirectMailAddress) {\r\n                            $scope.model.DirectMailUser = data.DirectMailConfig;\r\n                            $scope.model.SendTypeList[0].Enabled = true;\r\n                            $scope.model.SendType = $scope.model.SendTypeList[0];\r\n                        }\r\n                        $scope.model.SendTypeList[1].Enabled = data.EmailEnabled;\r\n                        if ($scope.model.SendTypeList[0].Enabled || $scope.model.SendTypeList[1].Enabled) {\r\n                            $scope.isConfigured = true;\r\n                        }\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n            initialize();\r\n\r\n            function submitTransferRequest() {\r\n                if ($scope.transmitCcdForm.$valid) {\r\n                    $scope.transmitting = true;\r\n                    var transferRequestDto = {\r\n                        PatientId: requestDto.PatientId,\r\n                        LoginUserId: requestDto.LoginUserId,\r\n                        LoginUserName: requestDto.LoginUserName,\r\n                        DocumentType: $scope.model.DocumentType && $scope.model.DocumentType.Type,\r\n                        Subject: $scope.model.Subject,\r\n                        Message: $scope.model.Message,\r\n                        DirectMailAddressFrom: $scope.model.DirectMailUser.DirectMailAddress,\r\n                        ToName: $scope.model.ToName,\r\n                        ProviderId: $scope.model.DirectMailUser.ProviderId,\r\n                        DirectMailAddressTo: ($scope.model.SendType.Type === 'Direct Mail') ? $scope.model.DirectMailAddressTo : null,\r\n                        Email: ($scope.model.SendType.Type === 'Email') ? $scope.model.Email : null,\r\n                        StartDate: requestDto.startDate,\r\n                        EndDate: requestDto.endDate\r\n                    };\r\n\r\n                    ChartRepository.postTransmitRequest(transferRequestDto)\r\n                        .then(function (data) {\r\n                            $scope.model.AccessLog = data;\r\n                            toaster.pop('success', '', gettext('CCD was sent successfully.'));\r\n                            ok();\r\n                        })\r\n                        .catch(function (response) {\r\n                            $log.error(response);\r\n                            toaster.pop('error', '', gettext('An error has occurred. CCD was not sent.'));\r\n                        })\r\n                        .finally(function () {\r\n                            $scope.transmitting = false;\r\n                        });\r\n                }\r\n            }\r\n\r\n            function ok() {\r\n                $modalInstance.close('ok');\r\n            }\r\n\r\n            function cancel() {\r\n                $modalInstance.dismiss('cancel');\r\n            }\r\n\r\n            $scope.submitTransferRequest = submitTransferRequest;\r\n            $scope.ok = ok;\r\n            $scope.cancel = cancel;\r\n        }]);\r\n","angular.module('mychart').controller('CompleteChartModalCtrl',\r\n    ['$scope', '$uibModalInstance', '$sce', '$window', 'PersonRepository', 'MyMessagesService', 'activePatient',\r\n        function ($scope, $modalInstance, $sce, $window, PersonRepository, MyMessagesService, activePatient) {\r\n            'use strict';\r\n\r\n            $scope.activePatient = activePatient;\r\n\r\n            $scope.loadingCompleteChart = true;\r\n            $scope.displayPrintButton = false;\r\n\r\n            $scope.isCompleteChartError = false;\r\n            $scope.completeChartErrorMessage = '';\r\n\r\n            $scope.model = {\r\n                CompleteChartData: '',\r\n                PatientId: '',\r\n                FullName: activePatient.fullName\r\n            };\r\n\r\n            function loadCompleteChart() {\r\n                $scope.loadingCompleteChart = true;\r\n                $scope.removeHttpError();\r\n\r\n                PersonRepository.getCompleteChart($scope.activePatient.id)\r\n                    .then(function (data) {\r\n                        var completeChartUrl = 'data:application/pdf;base64,' + data.PatientChart;\r\n                        //var completeChartUrl = 'data:application/pdf,' + data.PatientChart;\r\n                        $scope.model.CompleteChartData = $sce.trustAsResourceUrl(completeChartUrl);\r\n                        $scope.model.PatientId = data.PatientId;\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                        $scope.isCompleteChartError = true;\r\n                        $scope.model.CompleteChartErrorMessageHtml = $sce.trustAsHtml(MyMessagesService.replaceLineBreaksWithHtmlLineBreak(response.data));\r\n                    })\r\n                    .finally(function() {\r\n                        $scope.loadingCompleteChart = false;\r\n                    });\r\n            }\r\n\r\n            function ok() {\r\n                $modalInstance.close('ok');\r\n            }\r\n\r\n            function cancel() {\r\n                $modalInstance.dismiss('cancel');\r\n            }\r\n\r\n            function print() {\r\n                $window.print();\r\n            }\r\n\r\n\r\n            $scope.ok = ok;\r\n            $scope.cancel = cancel;\r\n            $scope.print = print;\r\n\r\n            loadCompleteChart();\r\n        }]);","angular.module('mychart').controller('GenericModalCtrl',\r\n    ['$scope', '$uibModalInstance', '$window', '$sce', 'modalContent', 'canPrint',\r\n        function ($scope, $modalInstance, $window, $sce, modalContent, canPrint) {\r\n            'use strict';\r\n            \r\n            $scope.modalContent = $sce.trustAsHtml(modalContent);\r\n            $scope.canPrint = canPrint;\r\n\r\n            function ok() {\r\n                $modalInstance.close('ok');\r\n            }\r\n\r\n            function cancel() {\r\n                $modalInstance.dismiss('cancel');\r\n            }\r\n\r\n            function print() {\r\n                $window.print();\r\n            }\r\n\r\n            $scope.print = print;\r\n            $scope.ok = ok;\r\n            $scope.cancel = cancel;\r\n        }]);\r\n","angular.module('mychart').controller('ImmunizationModalCtrl',\r\n    ['$scope', '$uibModalInstance', '$window', 'patientImmunizations',\r\n        function ($scope, $modalInstance, $window, patientImmunizations) {\r\n            'use strict';\r\n\r\n            $scope.model = {\r\n                PatientImmunizations: patientImmunizations\r\n            };\r\n\r\n            function ok() {\r\n                $modalInstance.close('ok');\r\n            }\r\n\r\n            function cancel() {\r\n                $modalInstance.dismiss('cancel');\r\n            }\r\n\r\n            function print() {\r\n                $window.print();\r\n            }\r\n\r\n            $scope.print = print;\r\n            $scope.ok = ok;\r\n            $scope.cancel = cancel;\r\n        }]);\r\n","angular.module('mychart').controller('LabResultPrintDownloadModalCtrl',\r\n    ['$scope', '$uibModalInstance', '$sce', '$window', 'PersonRepository', 'attachmentInfo',\r\n        function ($scope, $modalInstance, $sce, $window, PersonRepository, attachmentInfo) {\r\n            'use strict';\r\n\r\n            var imageFormats = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'pdf', 'rtf', 'doc', 'docx', 'tif', 'tiff'];\r\n            var htmlFormats = ['html', 'htm'];\r\n            var textFormats = ['txt'];\r\n\r\n            $scope.attachmentInfo = attachmentInfo;\r\n\r\n            $scope.loadingLabResult = true;\r\n            $scope.displayPrintButton = false;\r\n\r\n            $scope.model = {\r\n                LabResultData: '',\r\n                PdfFileName: attachmentInfo.ActivePatient.firstName + attachmentInfo.ActivePatient.lastName + '_TestResult.pdf',\r\n                ByteArray: '',\r\n                ContentType: ''\r\n            };\r\n\r\n            function loadResult() {\r\n                $scope.loadingLabResult = true;\r\n                $scope.removeHttpError();\r\n\r\n                $scope.isImage = _.includes(imageFormats, attachmentInfo.Extension.toLowerCase());\r\n                $scope.isHtml = _.includes(htmlFormats, attachmentInfo.Extension.toLowerCase());\r\n                $scope.isText = _.includes(textFormats, attachmentInfo.Extension.toLowerCase());\r\n\r\n                if (!$scope.isImage && !$scope.isHtml && !$scope.isText)\r\n                {\r\n                    $scope.loadingLabResult = false;\r\n                    return;\r\n                }\r\n\r\n                PersonRepository.getAttachmentPdf(attachmentInfo.ActivePatient.id,  attachmentInfo.AttachmentUid)\r\n                    .then(function (data) {\r\n                        var labResultUrl = 'data:' + data.ContentType + ';base64,' + data.ByteArray;\r\n                        $scope.model.LabResultData = $sce.trustAsResourceUrl(labResultUrl);\r\n                        $scope.model.ByteArray = data.ByteArray;\r\n                        $scope.model.ContentType = data.ContentType;\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function() {\r\n                        $scope.loadingLabResult = false;\r\n                    });\r\n            }\r\n\r\n            function ok() {\r\n                $modalInstance.close('ok');\r\n            }\r\n\r\n            function cancel() {\r\n                $modalInstance.dismiss('cancel');\r\n            }\r\n\r\n            function print() {\r\n                $window.print();\r\n            }\r\n\r\n\r\n            $scope.ok = ok;\r\n            $scope.cancel = cancel;\r\n            $scope.print = print;\r\n\r\n            loadResult();\r\n        }]);","angular.module('mychart').controller('ObservationOrderPrintDownloadModalCtrl',\r\n    ['$scope', '$uibModalInstance', '$sce', '$window', 'PersonRepository', 'resultInfo',\r\n        function ($scope, $modalInstance, $sce, $window, PersonRepository, resultInfo) {\r\n            'use strict';\r\n\r\n            $scope.resultInfo = resultInfo;\r\n\r\n            $scope.loadingLabResult = true;\r\n            $scope.displayPrintButton = false;\r\n\r\n            $scope.model = {\r\n                ObservationOrderData: '',\r\n                PdfFileName: resultInfo.ActivePatient.firstName + resultInfo.ActivePatient.lastName + '_ObservationOrder.pdf',\r\n                ByteArray: '',\r\n                ContentType: ''\r\n            };\r\n\r\n            function loadResult() {\r\n                $scope.loadingLabResult = true;\r\n                $scope.removeHttpError();\r\n                PersonRepository.getObservationOrderPdf(resultInfo.ActivePatient.id,  resultInfo.ResultId)\r\n                    .then(function (data) {\r\n                        var observationOrderUrl = 'data:' + data.ContentType + ';base64,' + data.ByteArray;\r\n                        $scope.model.ObservationOrderData = $sce.trustAsResourceUrl(observationOrderUrl);\r\n                        $scope.model.ByteArray = data.ByteArray;\r\n                        $scope.model.ContentType = data.ContentType;\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function() {\r\n                        $scope.loadingLabResult = false;\r\n                    });\r\n            }\r\n\r\n            function ok() {\r\n                $modalInstance.close('ok');\r\n            }\r\n\r\n            function cancel() {\r\n                $modalInstance.dismiss('cancel');\r\n            }\r\n\r\n            function print() {\r\n                $window.print();\r\n            }\r\n\r\n\r\n            $scope.ok = ok;\r\n            $scope.cancel = cancel;\r\n            $scope.print = print;\r\n\r\n            loadResult();\r\n        }]);","angular.module('mychart').controller('PharmacyModalCtrl',\r\n    ['_', '$scope', '$stateParams', '$uibModalInstance', 'MyChartService', 'toaster', 'aprgettext', 'pharmacies', 'debounce',\r\n        function (_, $scope, $stateParams, $modalInstance, MyChartService, toaster, gettext, pharmacies, debounce) {\r\n            'use strict';\r\n\r\n            $scope.pharmacies = _.cloneDeep(pharmacies) || [];\r\n            $scope.searchPharmaciesParams = {\r\n                Zip: '',\r\n                PhoneNumber: ''\r\n            };\r\n\r\n            $scope.pharmacyResults = [];\r\n            $scope.noResults = false;\r\n            \r\n            function ok() {\r\n                $modalInstance.close($scope.pharmacies);\r\n            }\r\n\r\n            function cancel() {\r\n                $modalInstance.dismiss('cancel');\r\n            }\r\n           \r\n           function searchPharmacies(zip, phoneNumber) {\r\n                if (!zip) {\r\n                    zip = $scope.searchPharmaciesParams.Zip;\r\n                }\r\n                if (!phoneNumber) {\r\n                    phoneNumber = $scope.searchPharmaciesParams.PhoneNumber;\r\n                }\r\n               \r\n                MyChartService.searchPharmacies(zip, phoneNumber)\r\n                    .then(function (data) {\r\n                        $scope.pharmacyResults = data.plain();\r\n                        $scope.noResults = data.length === 0;\r\n                    });\r\n            }\r\n\r\n            function addPharmacy(index, pharmacy) {\r\n                if (_.find($scope.pharmacies, {PharmacyId: pharmacy.PharmacyId})) {\r\n                    toaster.pop('warning', '', gettext('This is already a preferred pharmacy.'));\r\n                } else {\r\n                    $scope.pharmacies.push(pharmacy);\r\n                    $scope.pharmacyResults.splice(index, 1);\r\n                }\r\n            }\r\n\r\n            function removePharmacy(index, pharmacy) {\r\n                $scope.pharmacies.splice(index, 1);\r\n                $scope.pharmacyResults.unshift(pharmacy);\r\n                $scope.noResults = false;\r\n            }\r\n\r\n            function submitZip() {\r\n                debounce(750, function submitZip() {\r\n                    if ($scope.searchPharmaciesParams.Zip.length > 4) {\r\n                        $scope.searchPharmacies();\r\n                    }\r\n                });\r\n            }\r\n\r\n            function submitPhoneNumber (){\r\n                debounce(750, function submitZip() {\r\n                    var tempPhoneNumber = $scope.searchPharmaciesParams.PhoneNumber,\r\n                        value = tempPhoneNumber.toString().trim().replace(/[^0-9]/g, '');\r\n\r\n                    if (value.length > 9) {\r\n                        $scope.searchPharmacies(null, value);\r\n                    }\r\n                });\r\n            } \r\n\r\n            $scope.ok = ok;\r\n            $scope.cancel = cancel;\r\n            $scope.searchPharmacies = searchPharmacies;\r\n            $scope.addPharmacy = addPharmacy;\r\n            $scope.submitZip = submitZip;\r\n            $scope.removePharmacy = removePharmacy;\r\n            $scope.submitPhoneNumber = submitPhoneNumber;\r\n        }]);\r\n","angular.module('mychart').controller('ReferenceMaterialPrintDownloadModalCtrl',\r\n    ['$scope', '$uibModalInstance', 'attachmentInfo',\r\n        function ($scope, $modalInstance, attachmentInfo) {\r\n            'use strict';\r\n\r\n            $scope.attachmentInfo = attachmentInfo;\r\n            $scope.loadingLabResult = false;\r\n\r\n            function ok() {\r\n                $modalInstance.close('ok');\r\n            }\r\n\r\n            function cancel() {\r\n                $modalInstance.dismiss('cancel');\r\n            }\r\n\r\n            $scope.ok = ok;\r\n            $scope.cancel = cancel;\r\n        }]);","angular.module('mychart').directive('apImmunizationsCard',\r\n    [\r\n        function () {\r\n            'use strict';\r\n\r\n            function link($scope) {\r\n                function getRoutineDoses(routineDoses, length) {\r\n                    if (routineDoses > length)\r\n                        return new Array(routineDoses - length);\r\n                    else {\r\n                        return [];\r\n                    }\r\n                }\r\n\r\n                function rowSpanCal(routineDoses, vaccineCount) {\r\n                    return (routineDoses > vaccineCount) ? routineDoses : vaccineCount;\r\n                }\r\n\r\n                $scope.getRoutineDoses = getRoutineDoses;\r\n                $scope.rowSpanCal = rowSpanCal;\r\n            }\r\n\r\n            return {\r\n                restrict: 'EA',\r\n                templateUrl: '/mychart/views/directives/apImmunizationsCard.html',\r\n                scope: {\r\n                    patientImmunizations: '=patientImmunizations'\r\n                },\r\n                link: link\r\n            };\r\n        }]);","angular.module('mychart').factory('ChartRepository',\r\n    ['AprimaRestangular', 'MetadataRepository', function (AprimaRestangular, MetadataRepository) {\r\n        'use strict';\r\n\r\n        var getAccessLog = function getAccessLog(uid) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('chart/' + uid + '/ccd/access-log').get();\r\n        };\r\n\r\n        var getDirectMailUsers = function getDirectMailUsers(uid){\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('chart/' + uid + '/ccd/provider-list').get();\r\n        };\r\n\r\n        var postTransmitRequest = function postTransmitRequest(transferDto){\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('chart/' + transferDto.PatientId + '/uscdiccd/transfer').customPOST(transferDto);\r\n        };\r\n\r\n        function getCCDHtml(patientId, dateFilter) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('chart/' + patientId + '/uscdiccd').customGET('html', dateFilter);\r\n        }\r\n\r\n        function postCCDHtmlDownloaded(reportRequestDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('chart/' + reportRequestDto.PatientId + '/ccd/html').customPOST(reportRequestDto);\r\n        }\r\n\r\n        function getCDAXml(patientId, dateFilter) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('chart/' + patientId + '/uscdiccd').customGET('xml', dateFilter);\r\n        }\r\n\r\n        function getTransferCcdMetadata($scope) {\r\n            return MetadataRepository.getMetadata('transfer-ccd', $scope);\r\n        }\r\n\r\n        function getTransmitCcdConfig(patientId){\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('chart/' + patientId + '/ccd/transfer-config').get();\r\n        }\r\n\r\n\r\n\r\n\r\n        return {\r\n            getAccessLog: getAccessLog,\r\n            getDirectMailUsers: getDirectMailUsers,\r\n            postTransmitRequest: postTransmitRequest,\r\n            getCCDHtml: getCCDHtml,\r\n            postCCDHtmlDownloaded: postCCDHtmlDownloaded,\r\n            getCDAXml: getCDAXml,\r\n            getTransferCcdMetadata: getTransferCcdMetadata,\r\n            getTransmitCcdConfig: getTransmitCcdConfig,\r\n\r\n        };\r\n    }]);\r\n\r\n","angular.module('mychart').factory('MyChartService',\r\n    ['GuidList', 'PatientSettingsService', 'PersonRepository', '$q', 'aprgettext', 'ConsentService',\r\n        function MyChartService(GuidList, PatientSettingsService, PersonRepository, $q, gettext, ConsentService) {\r\n            'use strict';\r\n\r\n            var myChartConfigList,\r\n                userId,\r\n                patientDetails,\r\n                userFullName,\r\n                immunizations = {\r\n                    Results: '',\r\n                    VaccineCardTypeId: ''\r\n                },\r\n                documents,\r\n                problems,\r\n                procedures,\r\n                labResults,\r\n                newLabResults,\r\n                visitSummaries,\r\n                appointments,\r\n                referenceMaterial,\r\n                medicationAllergies,\r\n                mychartServiceUserId;\r\n\r\n            function createUpdateDetailsDto() {\r\n                return _.cloneDeep(patientDetails).value();\r\n            }\r\n\r\n            function getMyChartConfig() {\r\n                if (!myChartConfigList) {\r\n                    var featureList = PatientSettingsService.getPatientFeatures();\r\n                    myChartConfigList = {\r\n                        'PatientDocuments': {'Name': 'View Patient Documents', Id: 'mychart_documents', LabelName: gettext('Problems'), Route: 'myChartPatientDocuments', IsActive: featureList.ViewMedicalHistory.IsActive},\r\n                        'ViewClinicalSummary': {'Name': 'View Clinical Summary', 'Uid': GuidList.FeatureList.ViewClinicalSummary,\r\n                            Id: 'mychart_visitsummaries', LabelName: gettext('Visit Summaries'), Route: 'myChartVisitSummary',\r\n                            'IsActive': featureList.ViewClinicalSummary.IsActive},\r\n                        'ViewDocuments': {'Name': 'View Documents', 'Uid': GuidList.FeatureList.ViewDocuments,\r\n                            Id: 'mychart_documents', LabelName: gettext('Documents'), Route: 'myChartDocuments',\r\n                            'IsActive': featureList.ViewDocuments.IsActive},\r\n                        'ViewProblems': {Id: 'mychart_problems', LabelName: gettext('Problems'), Route: 'myChartProblems', IsActive: featureList.ViewMedicalHistory.IsActive},\r\n                        'ViewMedications': {'Name': 'View Medications', 'Uid': GuidList.FeatureList.ViewMedications,\r\n                            Id: 'mychart_prescriptions', LabelName: gettext('Prescriptions'), Route: 'myChartPrescriptions',\r\n                            'IsActive': featureList.ViewMedications.IsActive},\r\n                        'ViewProcedures': {'Name': 'View Procedures', 'Uid': GuidList.FeatureList.ViewProcedures,\r\n                            Id: 'mychart_procedures', LabelName: gettext('Procedures'), Route: 'myChartProcedures',\r\n                            'IsActive': featureList.ViewProcedures.IsActive},\r\n                        'ViewImmunizations': {\r\n                            Name: 'View Immunizations',\r\n                            Uid: GuidList.FeatureList.ViewImmunizations,\r\n                            Id: 'mychart_immunizations',\r\n                            LabelName: gettext('Immunizations'),\r\n                            Route: 'myChartImmunizations',\r\n                            IsActive: featureList.ViewImmunizations.IsActive,\r\n                            Config: {\r\n                                Pediatric: featureList.ViewImmunizations.ImmunizationsConfig && featureList.ViewImmunizations.ImmunizationsConfig.Pediatric,\r\n                                Adult: featureList.ViewImmunizations.ImmunizationsConfig && featureList.ViewImmunizations.ImmunizationsConfig.Adult,\r\n                                Misc: featureList.ViewImmunizations.ImmunizationsConfig &&featureList.ViewImmunizations.ImmunizationsConfig.Misc\r\n                            }\r\n                        },\r\n                        'ViewLabResults': {'Name': 'View Test Results', 'Uid': GuidList.FeatureList.ViewLabTestResults,\r\n                            Id: 'mychart_labresults', LabelName: gettext('Test Results'), Route: 'myChartLabResults',\r\n                            'IsActive': featureList.ViewLabTestResults.IsActive},\r\n                        'ViewEducationMaterial': {'Name': 'View Education Material', 'Uid': GuidList.FeatureList.ViewEducationMaterial,\r\n                            Id: 'mychart_referencematerial', LabelName: gettext('Educational Material'), Route: 'myChartReferenceMaterial',\r\n                            'IsActive': featureList.ViewEducationMaterial.IsActive},\r\n                        'UpdateDemographics': {'Name': 'Update Demographics', 'Uid': GuidList.FeatureList.UpdateDemographics,\r\n                            Id: 'mychart_personaldetails', LabelName: gettext('Personal Details'), Route: 'myChartPersonalDetails',\r\n                            'IsActive': featureList.UpdateDemographics.IsActive},\r\n                        'UpdateInsurance': featureList.UpdateInsurance,\r\n                        'ViewMedicationAllergies': {'Name': 'View Medication Allergies', 'Uid': GuidList.FeatureList.ViewMedicationAllergies,\r\n                            Id: 'mychart_medicationallergies', LabelName: gettext('Medication Allergies'), Route: 'myChartMedicationAllergies',\r\n                            'IsActive': featureList.ViewMedicationAllergies.IsActive},\r\n                        'RequestRxRefills': featureList.RequestRxRefills,\r\n                        'ViewCompleteChart': featureList.ViewCompleteChart,\r\n                        'AllowGenerateCCD' : featureList.AllowGenerateCCD\r\n                    };\r\n                }\r\n                return $q.when(myChartConfigList);\r\n            }\r\n\r\n            function getDetails(patientId, forceUpdate) {\r\n                if (patientId !== mychartServiceUserId) {\r\n                    resetMyChart(patientId);\r\n                }\r\n                if (!patientDetails || forceUpdate) {\r\n                    return PersonRepository.getDetails(patientId)\r\n                        .then(function (data) {\r\n                            patientDetails = data;\r\n                            return patientDetails;\r\n                        });\r\n                } else {\r\n                    return $q.when(patientDetails);\r\n                }\r\n            }\r\n\r\n            function getPatientDetailsMetadata($scope) {\r\n                return PersonRepository.getPatientDetailsMetadata($scope);\r\n            }\r\n\r\n            function updateDetails(userId, dto) {\r\n                return PersonRepository.updateDetails(userId, dto)\r\n                    .then(function (data) {\r\n                        patientDetails = data;\r\n                        return patientDetails;\r\n                    });\r\n            }\r\n\r\n            function searchPharmacies(zip, phoneNumber) {\r\n                return PersonRepository.searchPharmacies(mychartServiceUserId, zip, phoneNumber);\r\n            }\r\n\r\n            function loadMyChart(patientId) {\r\n                return $q.all([getDetails(patientId), getMyChartConfig()]);\r\n            }           \r\n\r\n            function getImmunizations(patientId, vaccineCardTypeId, forceRefresh) {\r\n                if (patientId !== mychartServiceUserId) {\r\n                    resetMyChart(patientId);\r\n                }\r\n\r\n                if (!immunizations || immunizations.VaccineCardTypeId !== vaccineCardTypeId || forceRefresh) {\r\n                    return PersonRepository.getImmunizations(patientId, vaccineCardTypeId)\r\n                        .then(function (data) {\r\n                            immunizations.Results = data;\r\n                            immunizations.VaccineCardTypeId = vaccineCardTypeId;\r\n                            return immunizations;\r\n                        });\r\n                }\r\n\r\n                return $q.when(immunizations);\r\n            }\r\n\r\n            function getProblems(patientId) {\r\n                if (patientId !== mychartServiceUserId) {\r\n                    resetMyChart(patientId);\r\n                }\r\n                if (!problems) {\r\n                    return PersonRepository.getProblems(patientId)\r\n                        .then(function (data) {\r\n                            problems = data;\r\n                            return problems;\r\n                        });\r\n                } else {\r\n                    return $q.when(problems);\r\n                }\r\n            }\r\n\r\n            function getProcedures(patientId) {\r\n                if (patientId !== mychartServiceUserId) {\r\n                    resetMyChart(patientId);\r\n                }\r\n                if (!procedures) {\r\n                    return PersonRepository.getProcedures(patientId)\r\n                        .then(function (data) {\r\n                            procedures = data;\r\n                            return procedures;\r\n                        });\r\n                } else {\r\n                    return $q.when(procedures);\r\n                }\r\n            }\r\n\r\n            function getNewLabResults(patientId) {\r\n                if (patientId !== mychartServiceUserId) {\r\n                    resetMyChart(patientId);\r\n                }\r\n                return PersonRepository.getNewLabResults(patientId)\r\n                    .then(function (data) {\r\n                        newLabResults = data;\r\n                        return newLabResults;\r\n                    });\r\n            }\r\n\r\n            function getLabResults(patientId) {\r\n                if (patientId !== mychartServiceUserId) {\r\n                    resetMyChart(patientId);\r\n                }\r\n                if (!labResults) {\r\n                    return PersonRepository.getLabResults(patientId)\r\n                        .then(function (data) {\r\n                            labResults = data;\r\n                            return labResults;\r\n                        });\r\n                } else {\r\n                    return $q.when(labResults);\r\n                }\r\n            }\r\n\r\n            function getVisitSummaries(patientId) {\r\n                if (patientId !== mychartServiceUserId) {\r\n                    resetMyChart(patientId);\r\n                }\r\n                if (!visitSummaries) {\r\n                    return PersonRepository.getVisitSummaries(patientId)\r\n                        .then(function (data) {\r\n                            visitSummaries = data;\r\n                            return visitSummaries;\r\n                        });\r\n                } else {\r\n                    return $q.when(visitSummaries);\r\n                }\r\n            }\r\n\r\n            function getAppointments(patientId) {\r\n                if (patientId !== mychartServiceUserId) {\r\n                    resetMyChart(patientId);\r\n                }\r\n                if (!appointments) {\r\n                    return PersonRepository.getAppointments(patientId)\r\n                        .then(function (data) {\r\n                            appointments = data;\r\n                            return appointments;\r\n                        });\r\n                } else {\r\n                    return $q.when(appointments);\r\n                }\r\n            }\r\n\r\n            function getReferenceMaterial(reportRequestDto) {\r\n                if (reportRequestDto.PatientId !== mychartServiceUserId) {\r\n                    resetMyChart(reportRequestDto.PatientId);\r\n                }\r\n                if (!referenceMaterial) {\r\n                    return PersonRepository.getReferenceMaterial(reportRequestDto)\r\n                        .then(function (data) {\r\n                            referenceMaterial = data;\r\n                            return referenceMaterial;\r\n                        });\r\n                } else {\r\n                    return $q.when(referenceMaterial);\r\n                }\r\n            }\r\n\r\n            function getMedicationAllergies(patientId) {\r\n                if (patientId !== mychartServiceUserId) {\r\n                    resetMyChart(patientId);\r\n                }\r\n                if (!medicationAllergies) {\r\n                    return PersonRepository.getMedicationAllergies(patientId)\r\n                        .then(function (data) {\r\n                            medicationAllergies = data;\r\n                            return medicationAllergies;\r\n                        });\r\n                } else {\r\n                    return $q.when(medicationAllergies);\r\n                }\r\n            }\r\n\r\n            function getBilling(patientId) {\r\n                return PersonRepository.getBilling(patientId)\r\n                    .then(function (data) {\r\n                        return data;\r\n                    });\r\n            }\r\n\r\n            function getFemaleThumbnailSrc(height, width) {\r\n                if (height && !width) {\r\n                    width = height;\r\n                }\r\n\r\n                var url = 'person/thumbnail/?type=female';\r\n\r\n                if (height) {\r\n                    url += '&height=' + height + '&width=' + width;\r\n                }\r\n\r\n                return url;\r\n            }\r\n\r\n            function getMaleThumbnailSrc(height, width) {\r\n                if (height && !width) {\r\n                    width = height;\r\n                }\r\n\r\n                var url = 'person/thumbnail/?type=male';\r\n\r\n                if (height) {\r\n                    url += '&height=' + height + '&width=' + width;\r\n                }\r\n\r\n                return url;\r\n            }\r\n\r\n            function clearAll() {\r\n                userId = null;\r\n                patientDetails = null;\r\n                userFullName = null;\r\n                immunizations = {\r\n                    Results: '',\r\n                    VaccineCardTypeId: ''\r\n                };\r\n                documents = null;\r\n                problems = null;\r\n                procedures = null;\r\n                labResults = null;\r\n                newLabResults = null;\r\n                visitSummaries = null;\r\n                appointments = null;\r\n                referenceMaterial = null;\r\n                medicationAllergies = null;\r\n\r\n                ConsentService.clearChartConsent();\r\n            }\r\n\r\n            function setBillingServiceUserId(patientId){\r\n                mychartServiceUserId = patientId;\r\n            }\r\n\r\n            function resetMyChart(patientId){\r\n                clearAll();\r\n                setBillingServiceUserId(patientId);\r\n            }\r\n\r\n            function auditImmunizationLogging(requestReportDto) {\r\n                return PersonRepository.postImmunizationAudit(requestReportDto);\r\n            }\r\n\r\n            function auditClinicalSummaryLogging(requestReportDto) {\r\n                return PersonRepository.postClinicalSummaryAudit(requestReportDto);\r\n            }\r\n\r\n            function auditDemographicsLogging(requestReportDto) {\r\n                return PersonRepository.postDemographicsAudit(requestReportDto);\r\n            }\r\n\r\n            function auditLabResultsLogging(requestReportDto) {\r\n                return PersonRepository.postLabResultAudit(requestReportDto);\r\n            }\r\n\r\n            function auditMedicalHistoryLogging(requestReportDto) {\r\n                return PersonRepository.postMedicalHistoryAudit(requestReportDto);\r\n            }\r\n\r\n            function auditMedicationAllergiesLogging(requestReportDto) {\r\n                return PersonRepository.postMedicationAllergiesAudit(requestReportDto);\r\n            }\r\n\r\n            function auditProceduresLogging(requestReportDto) {\r\n                return PersonRepository.postProcedureAudit(requestReportDto);\r\n            }\r\n\r\n            function auditEducationMaterialLogging(requestReportDto) {\r\n                return PersonRepository.postEducationalMaterialAudit(requestReportDto);\r\n            }\r\n\r\n            function auditChartLogging(requestReportDto) {\r\n                return PersonRepository.postChartAudit(requestReportDto);\r\n            }\r\n\r\n            function usageMetricLogging(updateUsageMetricDto) {\r\n                return PersonRepository.postUsageMetricUpdate(updateUsageMetricDto);\r\n            }            \r\n\r\n            return {\r\n                loadMyChart: loadMyChart,\r\n                getMyChartConfig: getMyChartConfig,\r\n                getDetails: getDetails,\r\n                getPatientDetailsMetadata: getPatientDetailsMetadata,\r\n                updateDetails: updateDetails,\r\n                createUpdateDetailsDto: createUpdateDetailsDto,\r\n                getImmunizations: getImmunizations,\r\n                getProblems: getProblems,\r\n                getProcedures: getProcedures,\r\n                getNewLabResults: getNewLabResults,\r\n                getLabResults: getLabResults,\r\n                getVisitSummaries: getVisitSummaries,\r\n                getAppointments: getAppointments,\r\n                searchPharmacies: searchPharmacies,\r\n                getBilling: getBilling,\r\n                getReferenceMaterial: getReferenceMaterial,\r\n                getMedicationAllergies: getMedicationAllergies,\r\n                getFemaleThumbnailSrc: getFemaleThumbnailSrc,\r\n                getMaleThumbnailSrc: getMaleThumbnailSrc,\r\n                clearAll: clearAll,\r\n                auditImmunizationLogging: auditImmunizationLogging,\r\n                auditClinicalSummaryLogging : auditClinicalSummaryLogging,\r\n                auditDemographicsLogging : auditDemographicsLogging,\r\n                auditLabResultsLogging : auditLabResultsLogging,\r\n                auditMedicalHistoryLogging :  auditMedicalHistoryLogging,\r\n                auditMedicationAllergiesLogging : auditMedicationAllergiesLogging,\r\n                auditProceduresLogging : auditProceduresLogging,\r\n                auditEducationMaterialLogging : auditEducationMaterialLogging,\r\n                auditChartLogging : auditChartLogging,\r\n                usageMetricLogging: usageMetricLogging\r\n            };\r\n        }]);\r\n","angular.module('mychart')\r\n    .factory('PatientAttachmentRepository', ['AprimaRestangular', 'AprimaAnalytics', function (aprimaRestangular, AprimaAnalytics) {\r\n        'use strict';\r\n\r\n        var getAttachment = function (attachmentId, patientId, requestSettings, applicationComponent, disableInLinePdf) {\r\n            var timing = AprimaAnalytics.startTiming(applicationComponent || 'AttachmentRepository', 'api', 'getAttachment');\r\n            var inlinePDF = (disableInLinePdf) ? false : true;\r\n        \tvar queryString = '?page=' + requestSettings.page + '&height=' + requestSettings.height + '&width=' + requestSettings.width + '&inLinePDF=' + inlinePDF;\r\n\r\n            return aprimaRestangular.get('patient').one('patients/' + patientId +'/attachments/' + attachmentId + queryString).get().finally(timing.stop);\r\n        };\r\n\r\n        var getAttachmentStaticUrl = function (attachmentId, patientId, applicationComponent) {\r\n            var timing = AprimaAnalytics.startTiming(applicationComponent || 'AttachmentRepository', 'api', 'getAttachmentStaticUrl');\r\n\r\n            return aprimaRestangular.get('patient').one('patients/' + patientId +'/attachments-url/' + attachmentId).get().finally(timing.stop);\r\n        };\r\n\r\n        var getAttachmentRetainOriginalFormat = function (attachmentId, patientId, applicationComponent) {\r\n            var timing = AprimaAnalytics.startTiming(applicationComponent || 'AttachmentRepository', 'api', 'getAttachmentRetainOriginalFormat');\r\n            var queryString = '?retainoriginalformat=true';\r\n            return aprimaRestangular.get('patient').one('patients/' + patientId +'/attachments/' + attachmentId + queryString).get().finally(timing.stop);\r\n        };\r\n\r\n        return {\r\n            getAttachment: getAttachment,\r\n            getAttachmentStaticUrl: getAttachmentStaticUrl,\r\n            getAttachmentRetainOriginalFormat: getAttachmentRetainOriginalFormat\r\n        };\r\n\r\n    }]);\r\n","angular.module('mychart').factory('PersonRepository',\r\n    ['AprimaRestangular', 'MetadataRepository', function (AprimaRestangular, MetadataRepository) {\r\n        'use strict';\r\n\r\n        var getDetails = function getDetails(uid) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + uid + '/details').get();\r\n        };\r\n\r\n        var updateDetails = function updateDetails(uid, request) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + uid + '/details').customPUT(request);\r\n        };\r\n\r\n        var getPatientDetailsMetadata = function getPatientDetailsMetadata($scope) {\r\n            return MetadataRepository.getMetadata('patientdetails', $scope);\r\n        };\r\n\r\n        var getPatient = function getPatient(uid) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person', uid).get();\r\n        };\r\n\r\n        var searchPharmacies = function searchPharmacies(uid, zip, phoneNumber){\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person', uid).customGET( 'pharmacy', {zip:zip, phoneNumber:phoneNumber});\r\n        };\r\n\r\n\r\n        var getImmunizations = function getImmunizations(uid, typeUid) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + uid + '/immunizations').get({immunizationType: typeUid});\r\n        };\r\n\r\n        var getProblems = function getProblems(uid) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + uid + '/problems').get();\r\n        };\r\n\r\n        var getProcedures = function getProcedures(uid) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + uid + '/procedures').get();\r\n        };\r\n\r\n        function getLabResults(uid) {\r\n        var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + uid + '/labresults').get();\r\n        }\r\n\r\n        function getNewLabResults(uid) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + uid + '/labresults?newlabs=true').get();\r\n        }\r\n\r\n        function getRemarks(uid) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + uid + '/remarks').get();\r\n        }\r\n\r\n        function getRecentVisits(uid) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + uid + '/recentvisits').get();\r\n        }\r\n\r\n        var getAppointments = function getRecentVisits(uid) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + uid + '/appointments').get();\r\n        };\r\n\r\n        function getOrders(uid) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + uid + '/orders').get();\r\n        }\r\n\r\n        function getHealthMaintenanceReminders(uid) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + uid + '/healthmaintenancereminders').get();\r\n        }\r\n\r\n        function getBilling(uid) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + uid + '/billing').get();\r\n        }\r\n\r\n        function getReferenceMaterial(reportRequestDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + reportRequestDto.PatientId).customGET('reference-material', reportRequestDto);\r\n        }\r\n\r\n        function getMedicationAllergies(patientId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + patientId + '/medication-allergies').get();\r\n        }\r\n\r\n        function getAttachmentPdf(userId, attachmentId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + userId + '/attachment-pdf/' + attachmentId).get();\r\n        }\r\n\r\n        function getReferenceMaterialAttachment(userId, attachmentId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + userId + '/reference-material-attachment/' + attachmentId).get();\r\n        }\r\n\r\n        function getAttachment(userId, attachmentId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + userId + '/attachment/' + attachmentId).get();\r\n        }\r\n\r\n        function getObservationOrderPdf(userId, resultId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + userId + '/observation-order-pdf/' + resultId).get();\r\n        }\r\n\r\n        function getObservationOrderPdfImage(userId, resultId, requestSettings) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            var queryString = '?page=' + requestSettings.page + '&height=' + requestSettings.height + '&width=' + requestSettings.width;\r\n\r\n            return restangular.one('person/' + userId + '/observation-order-pdf/' + resultId + queryString).get();\r\n        }\r\n\r\n        function getCCDHtml(reportRequestDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + reportRequestDto.PatientId + '/ccd').customGET('html', reportRequestDto);\r\n        }\r\n\r\n        function postCCDHtmlDownloaded(reportRequestDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + reportRequestDto.PatientId + '/ccd/html').customPOST(reportRequestDto);\r\n        }\r\n\r\n        function getCDAXml(reportRequestDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + reportRequestDto.PatientId + '/ccd').customGET('xml', reportRequestDto);\r\n        }\r\n\r\n        function getCompleteChart(userId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + userId + '/complete-chart').get();\r\n        }\r\n\r\n        function getCompleteChartImage(userId, requestSettings) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            var queryString = '?page=' + requestSettings.page + '&height=' + requestSettings.height + '&width=' + requestSettings.width;\r\n            return restangular.one('person/' + userId + '/complete-chart/' + queryString).get();\r\n        }\r\n\r\n        function getVisitSummary(userId, visitId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + userId + '/visit-summary/' + visitId).get();\r\n        }\r\n\r\n        function getVisitSummaryImage (userId, visitId, requestSettings) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            var queryString = '?page=' + requestSettings.page + '&height=' + requestSettings.height + '&width=' + requestSettings.width;\r\n\r\n            return restangular.one('person/' + userId + '/visit-summary/' + visitId + queryString).get();\r\n        }\r\n\r\n        function getVisitSummaryUrl(patientId, visitId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + patientId + '/visit-summary-url/' + visitId).get();\r\n        }\r\n\r\n        function getVisitSummaries (userId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('person/' + userId + '/visit-summaries').get();\r\n        }\r\n\r\n        function postImmunizationAudit(reportRequestDto){\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one( 'audit-patient-access/' + reportRequestDto.PatientId + '/immunizations').customPOST(reportRequestDto);\r\n        }\r\n\r\n        function postClinicalSummaryAudit(reportRequestDto){\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one( 'audit-patient-access/' + reportRequestDto.PatientId + '/clinical-summary').customPOST(reportRequestDto);\r\n        }\r\n\r\n        function postDemographicsAudit(reportRequestDto){\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one( 'audit-patient-access/' + reportRequestDto.PatientId + '/demographics').customPOST(reportRequestDto);\r\n        }\r\n\r\n        function postLabResultAudit(reportRequestDto){\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one( 'audit-patient-access/' + reportRequestDto.PatientId + '/lab-results').customPOST(reportRequestDto);\r\n        }\r\n\r\n        function postMedicalHistoryAudit(reportRequestDto){\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one( 'audit-patient-access/' + reportRequestDto.PatientId + '/medical-history').customPOST(reportRequestDto);\r\n        }\r\n\r\n        function postMedicationAllergiesAudit(reportRequestDto){\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one( 'audit-patient-access/' + reportRequestDto.PatientId + '/medication-allergies').customPOST(reportRequestDto);\r\n        }\r\n\r\n        function postProcedureAudit(reportRequestDto){\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one( 'audit-patient-access/' + reportRequestDto.PatientId + '/procedures').customPOST(reportRequestDto);\r\n        }\r\n\r\n        function postEducationalMaterialAudit(reportRequestDto){\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one( 'audit-patient-access/' + reportRequestDto.PatientId + '/educational-material').customPOST(reportRequestDto);\r\n        }\r\n\r\n        function postChartAudit(reportRequestDto){\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one( 'audit-patient-access/' + reportRequestDto.PatientId + '/complete-chart').customPOST(reportRequestDto);\r\n        }\r\n\r\n        function postUsageMetricUpdate(updateUsageMetricDto){\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one( 'usage-metric/metric-update').customPOST(updateUsageMetricDto);\r\n        }\r\n\r\n        return {\r\n            getDetails: getDetails,\r\n            getPatientDetailsMetadata: getPatientDetailsMetadata,\r\n            updateDetails: updateDetails,\r\n            getImmunizations: getImmunizations,\r\n            getPatient: getPatient,\r\n            searchPharmacies: searchPharmacies,\r\n            getAppointments: getAppointments,\r\n            getProblems: getProblems,\r\n            getProcedures: getProcedures,\r\n            getLabResults: getLabResults,\r\n            getNewLabResults: getNewLabResults,\r\n            getRemarks: getRemarks,\r\n            getRecentVisits: getRecentVisits,\r\n            getOrders: getOrders,\r\n            getVisitSummaries: getVisitSummaries,\r\n            getHealthMaintenanceReminders: getHealthMaintenanceReminders,\r\n            getBilling: getBilling,\r\n            getReferenceMaterial: getReferenceMaterial,\r\n            getMedicationAllergies: getMedicationAllergies,\r\n            getAttachmentPdf: getAttachmentPdf,\r\n            getAttachment: getAttachment,\r\n            getObservationOrderPdf: getObservationOrderPdf,\r\n            getObservationOrderPdfImage: getObservationOrderPdfImage,\r\n            getCompleteChart: getCompleteChart,\r\n            getCompleteChartImage: getCompleteChartImage,\r\n            getCCDHtml: getCCDHtml,\r\n            postCCDHtmlDownloaded: postCCDHtmlDownloaded,\r\n            getCDAXml: getCDAXml,\r\n            getVisitSummary: getVisitSummary,\r\n            getVisitSummaryImage: getVisitSummaryImage,\r\n            getVisitSummaryUrl: getVisitSummaryUrl,\r\n            getReferenceMaterialAttachment: getReferenceMaterialAttachment,\r\n            postImmunizationAudit : postImmunizationAudit,\r\n            postClinicalSummaryAudit : postClinicalSummaryAudit,\r\n            postDemographicsAudit : postDemographicsAudit,\r\n            postLabResultAudit : postLabResultAudit,\r\n            postMedicalHistoryAudit : postMedicalHistoryAudit,\r\n            postMedicationAllergiesAudit : postMedicationAllergiesAudit,\r\n            postProcedureAudit : postProcedureAudit,\r\n            postEducationalMaterialAudit : postEducationalMaterialAudit,\r\n            postChartAudit : postChartAudit,\r\n            postUsageMetricUpdate: postUsageMetricUpdate\r\n        };\r\n    }]);\r\n\r\n","angular.module('mymessages', [\r\n    //third party\r\n    'angularLocalStorage',\r\n    'gettext',\r\n    'headroom',\r\n    'lodash',\r\n    'ngAnimate',\r\n    'ngTouch',\r\n    'restangular',\r\n    'toaster',\r\n    'ui.bootstrap',\r\n    'ui.router',\r\n    'apEasyScroller',\r\n\r\n    'app',\r\n    'mychart',\r\n\r\n    'aprima-core',\r\n    'aprima-bridge',\r\n    'aprima-config',\r\n    'aprima-legacy-common',\r\n    'aprima-provider-api',\r\n    'aprima-patient-api'\r\n\r\n]);","angular.module('mymessages').config(['AppRoutesProvider', '$stateProvider', '$urlRouterProvider',\r\n    function (AppRoutesProvider, $stateProvider) {\r\n        'use strict';\r\n\r\n        var portalSettings = { toolbarItem: 'messages' };\r\n\r\n        var appRoutes = {\r\n            'myMessages': {\r\n                state: 'myMessages',\r\n                route: '/my-messages',\r\n                portalSettings: portalSettings\r\n            },\r\n            'myMessagesNewMessage': {\r\n                state: 'myMessages.myMessagesNewMessage',\r\n                route: '/new-message',\r\n                portalSettings: portalSettings\r\n            },\r\n            'myMessagesDisplayMessages': {\r\n                state: 'myMessages.myMessagesDisplayMessages',\r\n                route: '/display-messages/:displayMode',\r\n                portalSettings: portalSettings\r\n            },\r\n            'myMessagesDisplayMessageThread': {\r\n                state: 'myMessages.myMessagesDisplayMessageThread',\r\n                route: '/display-message-thread/:displayMode?id?updateNotification',\r\n                portalSettings: portalSettings\r\n            },\r\n            'myMessagesMobile': {\r\n                state: 'myMessagesMobile',\r\n                route: '/my-messages-mobile/:displayMode',\r\n                portalSettings: portalSettings\r\n            },\r\n            'myMessagesMobileNewMessage': {\r\n                state: 'myMessagesMobile.myMessagesNewMessage',\r\n                route: '/new-message',\r\n                portalSettings: portalSettings\r\n            },\r\n            'myMessagesMobileDisplayMessageThread': {\r\n                state: 'myMessagesMobile.myMessagesDisplayMessageThread',\r\n                route: '/display-message-thread/:displayMode?id?updateNotification',\r\n                portalSettings: portalSettings\r\n            }\r\n        };\r\n\r\n        AppRoutesProvider.setupAppRoutes(appRoutes);\r\n\r\n        $stateProvider\r\n            .state(appRoutes.myMessages.state, {\r\n                url: appRoutes.myMessages.route,\r\n                templateUrl: '/mymessages/views/myMessages.html',\r\n                controller: 'MyMessagesCtrl',\r\n                description: '/myMessages',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Messages'); }\r\n                }\r\n            })\r\n            .state(appRoutes.myMessagesNewMessage.state, {\r\n                url: appRoutes.myMessagesNewMessage.route,\r\n                templateUrl: '/mymessages/views/newMessage.html',\r\n                controller: 'NewMessageCtrl',\r\n                description: '/NewMessages'\r\n            })\r\n            .state(appRoutes.myMessagesDisplayMessages.state, {\r\n                url: appRoutes.myMessagesDisplayMessages.route,\r\n                templateUrl: '/mymessages/views/displayMessages.html',\r\n                controller: 'DisplayMessagesCtrl',\r\n                description: '/DisplayMessages'\r\n            })\r\n            .state(appRoutes.myMessagesDisplayMessageThread.state, {\r\n                url: appRoutes.myMessagesDisplayMessageThread.route,\r\n                templateUrl: '/mymessages/views/displayMessageThread.html',\r\n                controller: 'DisplayMessageThreadCtrl',\r\n                description: '/DisplayMessageThread'\r\n            })\r\n            .state(appRoutes.myMessagesMobile.state, {\r\n                url: appRoutes.myMessagesMobile.route,\r\n                templateUrl: '/mymessages/views/myMessagesMobile.html',\r\n                params: { folder: 'inbox' },\r\n                controller: 'MyMessagesMobileCtrl',\r\n                description: '/myMessagesMobile'\r\n            })\r\n            .state(appRoutes.myMessagesMobileNewMessage.state, {\r\n                url: appRoutes.myMessagesMobileNewMessage.route,\r\n                templateUrl: '/mymessages/views/newMessage.html',\r\n                controller: 'NewMessageMobileCtrl',\r\n                description: '/NewMessages'\r\n            })\r\n            .state(appRoutes.myMessagesMobileDisplayMessageThread.state, {\r\n                url: appRoutes.myMessagesMobileDisplayMessageThread.route,\r\n                templateUrl: '/mymessages/views/displayMessageThread.html',\r\n                controller: 'DisplayMessageThreadMobileCtrl',\r\n                description: '/DisplayMessageThread'\r\n            });\r\n    }]);","angular.module('mymessages').run(['$templateCache', function($templateCache) {\n  'use strict';\r\n\r\n  $templateCache.put('/mymessages/views/displayMessageThread.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-secondary panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"messageThread.NumberOfMessages > 0\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{ ::messageThread.Messages[0].MessageHeaderText }}&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-if=\\\"messageThread.NumberOfMessages > 1\\\">({{ ::messageThread.NumberOfMessages }})</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row panel-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"row panel-row clickable\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             ng-repeat=\\\"msg in messageThread.Messages\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             ng-click=\\\"msg.IsCollapsed = !msg.IsCollapsed\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-2 col-md-1 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <img class=\\\"ap-dashboard-message-photo extra-dark-grey-border border-width-md rounded-corner-md\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     lazy-src=\\\"{{::thumbnailSrc}}\\\" endpoint-base='patient'>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-10 col-md-11 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span ng-if=\\\"msg.FromName !== null\\\">{{::'From' | translate}}&nbsp;:&nbsp;{{::msg.FromName}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span ap-date-formatter date=\\\"{{::msg.CreateDateTime}}\\\" format=\\\"date-time\\\" class=\\\"pull-right\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"overflow-ellipsis ng-hide\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-show=\\\"msg.IsCollapsed\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-bind-html=\\\"msg.MessageBodyTextNoLineBreaks\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div uib-collapse=\\\"msg.IsCollapsed\\\" ng-bind-html=\\\"msg.MessageBodyText\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <a  class=\\\"clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <span ng-show ng-hide=\\\"!msg.IsCollapsed\\\">Expand</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <span ng-show ng-hide=\\\"msg.IsCollapsed\\\">Collapse</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <i ng-class=\\\"{'ap-chevron-down-blue' : msg.IsCollapsed, 'ap-chevron-up-blue' : !msg.IsCollapsed}\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </a>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <form name=\\\"replyMessageForm\\\" id=\\\"reply-message-form\\\" ng-show ng-hide=\\\"!allowReply\\\" ng-submit=\\\"replyToMessage(replyMessageForm)\\\" class=\\\"ap-margin-top-15\\\" novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-2 col-md-1 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <img class=\\\"ap-dashboard-message-photo extra-dark-grey-border border-width-md rounded-corner-md\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                         lazy-src=\\\"{{::thumbnailSrc}}\\\" endpoint-base='patient'>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-10 col-md-11 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div ng-class=\\\"{ 'has-error' : (replyMessageForm.MessageBody.$invalid && (replyMessageForm.MessageBody.$dirty || replyMessageForm.isSubmitted))}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                       <textarea\\r\" +\r\n    \"\\n\" +\r\n    \"                                               class=\\\"form-control ap-margin-bottom-10\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                               name=\\\"MessageBody\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                               id=\\\"message-body\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                               ng-model=\\\"portalMessage.Message\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                               placeholder=\\\"Reply here\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                               rows=\\\"5\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                               ap-required=\\\"metadata.Fields.Message.IsRequired\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                               ng-disabled=\\\"replying\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </textarea>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <button id=\\\"send-msg-btn\\\" type=\\\"submit\\\" class=\\\"btn btn-primary btn-lg pull-right\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                ng-disabled=\\\"replying\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <span ng-show=\\\"replying\\\"><ap-spinner></ap-spinner></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{::'SEND' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </form>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <a id=\\\"display-messages-bottom\\\"></a>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\" ng-if=\\\"messageThread.NumberOfMessages <= 0\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12 text-center text-center-vert\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span>{{::'No messages found.' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\" ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'An error has occurred and messages could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{ ::'You do not have access to view patient Messages.' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mymessages/views/displayMessages.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-secondary panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{ ::panelHeadingText }}\\r\" +\r\n    \"\\n\" +\r\n    \"            <!-- <span ng-if=\\\"displayMessages.NumberOfMessages > 1\\\">({{ displayMessages.NumberOfMessages }})</span> -->\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <span class=\\\"header-menu pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"dropdown-primary\\\" uib-dropdown>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button class=\\\"btn btn-default flush-right\\\" type=\\\"button\\\" id=\\\"subtype-filter-btn\\\" uib-dropdown-toggle>\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{ 'Filter' | translate }}&nbsp;&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"title-text\\\">{{ selectedMessageSubTypeName }}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"caret\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ul class=\\\"dropdown-menu dropdown-menu-right\\\" uib-dropdown-menu role=\\\"menu\\\" id=\\\"messageSubTypeFilter\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <li class=\\\"clickable\\\" role=\\\"presentation\\\" ng-repeat=\\\"messageSubType in messageSubTypes\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <a id=\\\"subtype-filter-item-{{messageSubType.Id}}\\\" role=\\\"menuitem\\\" tabindex=\\\"messageSubType.Index\\\" ng-click=\\\"filterMessages(messageSubType.Id)\\\">{{ ::messageSubType.Name }}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </span>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row panel-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div id=\\\"no-messages-found-div\\\" class=\\\"text-center text-center-vert\\\" ng-if=\\\"displayMessages.NumberOfMessages <= 0\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>{{::'No messages found.' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row panel-row clickable\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                         id=\\\"message-{{msg.MessageId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                         ng-repeat=\\\"msg in displayMessages.Messages\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                         ng-click=\\\"displayMessageThread(msg)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-10 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <img class=\\\"ap-dashboard-message-photo extra-dark-grey-border border-width-md rounded-corner-md\\\" ng-if=\\\"!displaySentMessages\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                 lazy-src=\\\"{{::thumbnailSrc}}\\\" endpoint-base='patient'>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <img class=\\\"ap-dashboard-message-photo extra-dark-grey-border border-width-md rounded-corner-md\\\" ng-if=\\\"displaySentMessages\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                 lazy-src=\\\"{{msg.PersonId | apPatientPortalThumbnailSrc:50:50}}\\\" endpoint-base='patient'>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"ap-dashboard-message-text\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <p ng-if=\\\"msg.NewMessage === true\\\" class=\\\"ap-font-bold ap-dashboard-message-text-row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span ng-if=\\\"msg.FromName !== null\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{::'From' | translate}} &nbsp;:&nbsp; {{msg.FromName}}&nbsp;&nbsp;|&nbsp;&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{msg.MessageHeaderText}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <p ng-if=\\\"!msg.NewMessage\\\" class=\\\"ap-dashboard-message-text-row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span ng-if=\\\"msg.FromName !== null\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{::'From' | translate}} &nbsp;:&nbsp; {{msg.FromName}}&nbsp;&nbsp;|&nbsp;&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{msg.MessageHeaderText}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <p class=\\\"ap-dashboard-message-text-row\\\" ng-bind-html=\\\"msg.MessageBodyText\\\"></p>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-2 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <span class=\\\"pull-right\\\" ap-date-formatter date=\\\"{{msg.CreateDateTime}}\\\" format=\\\"date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <span class=\\\"pull-right\\\" ap-date-formatter date=\\\"{{msg.CreateDateTime}}\\\" format=\\\"time\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row\\\" ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'An error has occurred and messages could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{ ::'You do not have access to view patient Messages.' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mymessages/views/myMessages.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-primary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !httpError\\\" class=\\\"panel-body panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-subheading-messages\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <span ng-if=\\\"model.subMessageText\\\">{{model.subMessageText}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                <span ng-if=\\\"!model.subMessageText\\\">{{::'If this is an emergency, call 911. Messages are for non-urgent correspondence.' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-3 col-md-2 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"ap-mymessages-nav\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ul class=\\\"list-unstyled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <li>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button id=\\\"messages-new-message-btn\\\" class=\\\"btn btn-default1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    data-transition-to=\\\"{appRoute: 'myMessagesNewMessage'}\\\">{{::'Compose New' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"ap-mymessages-nav-divider\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <uib-tabset class=\\\"list-unstyled\\\" vertical=\\\"true\\\" uib-collapse=\\\"false\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <uib-tab id=\\\"messages-inbox-btn\\\" ng-click=\\\"messageLinkSelected('messages-inbox-btn')\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             data-transition-to=\\\"{appRoute: 'myMessagesDisplayMessages', opts: {displayMode: 'received'}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <uib-tab-heading>\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Inbox' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </uib-tab-heading>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </uib-tab>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <uib-tab id=\\\"messages-sent-btn\\\" ng-click=\\\"messageLinkSelected('messages-sent-btn')\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             data-transition-to=\\\"{appRoute: 'myMessagesDisplayMessages', opts: {displayMode: 'send'}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <uib-tab-heading>\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Sent' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </uib-tab-heading>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </uib-tab>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </uib-tabset>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-9 col-md-10 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"container-fluid container-flush\\\" ui-view></div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'An error has occurred and the patient messages could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{ ::'You do not have access to view patient Messages.' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mymessages/views/myMessagesMobile.html',\r\n    \"<div class=\\\"container-fluid container-flush hidden-print\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-mobile\\\" ng-if=\\\"!httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-title text-uppercase\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <img class=\\\"toolbar-svg messages\\\" src=\\\"images/spacer.png\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <span class=\\\"title-text\\\">{{::\\\"Messages\\\" | translate }}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-notice\\\" ng-if=\\\"!isInSubstate()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <h6 class=\\\"text-uppercase\\\" ng-if=\\\"!mobileModel.subMessageText\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <b>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::\\\"If this is an emergency, call 911.\\\" | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </b>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <BR>\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::\\\"Messages are for non-urgent correspondence.\\\" | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                </h6>\\r\" +\r\n    \"\\n\" +\r\n    \"                <h6 class=\\\"text-uppercase\\\" ng-if=\\\"mobileModel.subMessageText\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <b>{{mobileModel.subMessageText}}</b>\\r\" +\r\n    \"\\n\" +\r\n    \"                </h6>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\" ng-if=\\\"isInSubstate()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-6 col-xs-flush mobile-back-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button class=\\\"btn btn-icon\\\" type=\\\"button\\\" id=\\\"messages-back\\\" ng-click=\\\"goBackToMessages();\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span><i class=\\\"fa fa-caret-left\\\" /></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>{{:: \\\"Back\\\" | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-body col-xs-12 col-xs-flush\\\" ng-if=\\\"isInSubstate()\\\" ui-view>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-body col-xs-12 col-xs-flush\\\" ng-if=\\\"!isInSubstate()\\\" ng-init=\\\"changeFolder();\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"container-fluid container-flush\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div id=\\\"my-messages-panel\\\" class=\\\"panel panel-tile-secondary panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"icon-group text-center-vert pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span class=\\\"clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <span class=\\\"header-menu\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span class=\\\"dropdown-primary\\\" uib-dropdown>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <button class=\\\"btn btn-default btn-icon btn-nowrap\\\" type=\\\"button\\\" id=\\\"message-filter-btn\\\" uib-dropdown-toggle>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <i class=\\\"fa fa-filter\\\" />\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <span class=\\\"caret\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <ul class=\\\"dropdown-menu dropdown-menu-right\\\" uib-dropdown-menu role=\\\"menu\\\" id=\\\"messageSubTypeFilter\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <li class=\\\"clickable\\\" role=\\\"presentation\\\" ng-repeat=\\\"messageSubType in messageSubTypes\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <a id=\\\"message-filter-item-{{messageSubType.Id}}\\\" role=\\\"menuitem\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                   ng-click=\\\"filterMessages(messageSubType.Id)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        <i class=\\\"fa fa-filter\\\" ng-if=\\\"selectedMessageSubTypeName == messageSubType.Name\\\" />\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        &nbsp;{{::messageSubType.Name | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </a>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span class=\\\"clickable\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                         ng-click=\\\"composeNewMessage();\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <i class=\\\"fa fa-pencil\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"icon-group pull-right ng-hide\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <ap-spinner></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"folder-dropdown\\\" uib-dropdown>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <button class=\\\"btn btn-header btn-nopadding\\\" type=\\\"button\\\" id=\\\"message-folders-context-menu\\\" uib-dropdown-toggle>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <span class=\\\"panel-title\\\">{{selectedFolder.Name | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <span class=\\\"caret\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <ul class=\\\"dropdown-menu dropdown-menu-right\\\" uib-dropdown-menu role=\\\"menu\\\" aria-labelledby=\\\"message-folders-context-menu\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <li role=\\\"presentation\\\" ng-repeat=\\\"folder in folders track by folder.Key\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <a id=\\\"message-folder-{{::folder.Key}}\\\" role=\\\"menuitem\\\" tabindex=\\\"{{::$index}}\\\" data-transition-to=\\\"{appRoute: 'myMessagesMobile', opts: { folder: folder.Key }}\\\">{{::folder.Name | translate}}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <ul class=\\\"list-group list-group-fixed-height\\\" ng-show=\\\"!loading && !displayMessages.Messages.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <li class=\\\"list-group-item\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 text-center-vert text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <span>{{::'No messages found.' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <ul class=\\\"list-group list-group-fixed-height\\\" ng-show=\\\"!loading && displayMessages.Messages.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <li ng-repeat=\\\"message in displayMessages.Messages track by $index\\\" class=\\\"list-group-item\\\" ng-click=\\\"displayMessageThreadMobile(message)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"list-item-col-xs list-item-sub-heading overflow-ellipsis text-center-vert pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"text-center-vert pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <span class=\\\"clickable\\\"><i class=\\\"fa fa-caret-right\\\"></i></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"list-item\\\" ng-class=\\\"{'ap-message-unread': message.NewMessage }\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"list-item-details ap-message-sender overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{::message.FromName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"list-item-details overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{::message.MessageHeaderText}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"list-item-heading-small overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{::message.MessageBodyText}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{ ::'An error has occurred and Messages could not be loaded.' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak translate>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{ ::'You do not have access to Messages.' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/mymessages/views/newMessage.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-secondary panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-heading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{ ::'Compose New Message' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <form name=\\\"portalMessageForm\\\" novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"form-group ap-margin-top-15\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             ng-class=\\\"{ 'has-error' : (portalMessageForm.ProviderOrServiceSite.$invalid && (portalMessageForm.ProviderOrServiceSite.$dirty || portalMessageForm.isSubmitted))}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label class=\\\"control-label\\\">{{::routeTypeString}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <select class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        name=\\\"ProviderOrServiceSite\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        id=\\\"provider-or-servicesite-select\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-change=\\\"selectedProviderOrServiceSiteChanged()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-model=\\\"portalMessage.ProviderOrServiceSiteId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-options=\\\"messageSetting.ProviderOrServiceSiteId as messageSetting.Name for messageSetting in messageSettings\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ap-required=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-disabled=\\\"sending\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                </select>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             ng-class=\\\"{ 'has-error' : (portalMessageForm.MessageSubType.$invalid && (portalMessageForm.MessageSubType.$dirty || portalMessageForm.isSubmitted))}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label class=\\\"control-label\\\">{{'Message Type' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <select class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        name=\\\"MessageSubType\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        id=\\\"message-sub-type-select\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-model=\\\"portalMessage.SubTypeId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-options=\\\"messageSubType.Id as messageSubType.Name for messageSubType in messageSubTypes\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ap-required=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-disabled=\\\"sending\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                </select>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             ng-class=\\\"{ 'has-error' : (portalMessageForm.Header.$invalid && (portalMessageForm.Header.$dirty || portalMessageForm.isSubmitted))}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label class=\\\"control-label\\\">{{::'Subject'| translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <input type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   name=\\\"Header\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   id=\\\"message-header\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-model=\\\"portalMessage.Header\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ap-required=\\\"metadata.Fields.Header.IsRequired\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-disabled=\\\"sending\\\" />\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-if=\\\"portalMessage.SubTypeId == patientAttachmentSubtype \\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <label class=\\\"control-label\\\">{{::'Upload an Attachment' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                           <ap-message-attachment\\r\" +\r\n    \"\\n\" +\r\n    \"                                attachment-dto-list = \\\"AttachmentList.attachmentDtoList\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        </ap-message-attachment>\\r\" +\r\n    \"\\n\" +\r\n    \"                       </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"row text-danger\\\"  ng-if=\\\"AttachmentList.validationMessage.length > 0 && AttachmentList.attachmentDtoList.length === 0\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12\\\" id=\\\"divValidationMessage\\\" name=\\\"divValidationMessage\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{ AttachmentList.validationMessage }}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"form-group ap-margin-bottom-10\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             ng-class=\\\"{ 'has-error' : (portalMessageForm.MessageBody.$invalid && (portalMessageForm.MessageBody.$dirty || portalMessageForm.isSubmitted))}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label class=\\\"control-label\\\">{{'Message' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <textarea\\r\" +\r\n    \"\\n\" +\r\n    \"                                   class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   name=\\\"MessageBody\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   id=\\\"message-body\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-model=\\\"portalMessage.Message\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   placeholder=\\\"Message here\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   rows=\\\"5\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ap-required=\\\"metadata.Fields.Message.IsRequired\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-disabled=\\\"sending\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            </textarea>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-6 col-xs-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button id=\\\"cancel-msg-btn\\\" class=\\\"btn btn-default2 btn-lg pull-left\\\" ng-disabled=\\\"sending\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                data-transition-to=\\\"{appRoute: returnRoute, opts: returnOpts }\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'CANCEL' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-6 col-xs-flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button id=\\\"send-msg-btn\\\" class=\\\"btn btn-primary btn-lg pull-right\\\" ng-disabled=\\\"sending\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                ng-click=\\\"sendMessage(portalMessageForm)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ng-show=\\\"sending\\\"><ap-spinner></ap-spinner></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'SEND' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                </form>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'An error has occurred and messages could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{ ::'You do not have access to view patient Messages.' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\n}]);\n","(function() {\r\n    'use strict';\r\n    var DisplayMessageThreadBaseCtrl = function (returnRoute, returnOpts) {\r\n        return function ($scope, $stateParams, $sce, $anchorScroll, $location, PatientPortalStorageRepository, MyMessagesRepository, MyMessagesService, $log, TransitionManager, toaster, gettext, MetadataRepository, NotificationService, MyChartService) {\r\n            $scope.loading = false;\r\n            $scope.replying = false;\r\n\r\n            $scope.thumbnailSrc = MyChartService.getMaleThumbnailSrc(50,50);\r\n\r\n            $scope.messageThread = {\r\n                Messages: null,\r\n                NumberOfMessages: 0,\r\n                DisplayMode: ''\r\n            };\r\n            var activePatient = PatientPortalStorageRepository.getActivePatient();\r\n\r\n            var updateNotifications = false;\r\n\r\n            if ($stateParams.displayMode.toUpperCase() === 'RECEIVED') {\r\n                $scope.panelHeadingText = gettext('Received Messages');\r\n                $scope.allowReply = true;\r\n                $scope.messageThread.DisplayMode = 'Received';\r\n\r\n                if ($stateParams.updateNotification && $stateParams.updateNotification.toUpperCase() === 'TRUE') {\r\n                        updateNotifications = true;\r\n                }\r\n            }\r\n            else if ($stateParams.displayMode.toUpperCase() === 'SEND') {\r\n                $scope.panelHeadingText = gettext('Sent Messages');\r\n                $scope.allowReply = false;\r\n                $scope.messageThread.DisplayMode = 'Send';\r\n            }\r\n            else {\r\n                $scope.panelHeadingText = gettext('Unknown display mode - ') + $stateParams.displayMode;\r\n                $scope.allowReply = false;\r\n                $scope.messageThread.DisplayMode = 'Unknown';\r\n            }\r\n\r\n            $scope.portalMessage = {\r\n                Message: ''\r\n            };\r\n\r\n            function loadView() {\r\n                if ($scope.messageThread.DisplayMode.toUpperCase() !== 'UNKNOWN') {\r\n                    $scope.loading = true;\r\n                    $scope.removeHttpError();\r\n                    MyMessagesRepository\r\n                        .getMessageThreadMessages(activePatient.id, $stateParams.id)\r\n                        .then(function (data) {\r\n                            $scope.messageThread.Messages = _(data)\r\n                                .forEach(function (msg) {\r\n                                    msg.MessageHeaderText = MyMessagesService.cleanMessageHeader(msg.MessageHeaderText);\r\n                                    msg.MessageBodyTextNoLineBreaks = $sce.trustAsHtml(MyMessagesService.removeLineBreaks(msg.MessageBodyText));\r\n                                    msg.MessageBodyText = $sce.trustAsHtml(msg.MessageBodyText);\r\n                                    msg.IsCollapsed = true;\r\n                                });\r\n\r\n                            $scope.messageThread.NumberOfMessages = $scope.messageThread.Messages.length;\r\n\r\n                            if ($scope.messageThread.NumberOfMessages > 0) {\r\n                                $scope.messageThread.Messages[$scope.messageThread.NumberOfMessages - 1].IsCollapsed = false;\r\n\r\n                                return MyMessagesService.getMessageSettings(activePatient.id)\r\n                                    .then(function (data) {\r\n                                        var msgSetting = _.find(data[0].MessageSubTypes, { Id: $scope.messageThread.Messages[0].MessageSubTypeId });\r\n                                        if (msgSetting) {\r\n                                            $scope.allowReply = (msgSetting.CanBeSentByPatient && !msgSetting.SystemMessage);\r\n                                        }\r\n                                    });\r\n                            }\r\n                            else {\r\n                                $scope.allowReply = false;\r\n                            }\r\n\r\n                            if (updateNotifications) {\r\n                                updateNotifications = false;\r\n                                NotificationService.updateNotifications();\r\n                            }\r\n                        })\r\n                        .catch(function (response) {\r\n                            $scope.addHttpError(response);\r\n                        })\r\n                        .finally(function () {\r\n                            $scope.loading = false;\r\n                            $location.hash('display-messages-bottom');\r\n                            $anchorScroll();\r\n                        });\r\n                }\r\n\r\n                MetadataRepository.getMetadata('createportalmessage', $scope);\r\n            }\r\n\r\n            $scope.replyToMessage = function replyToMessage(form) {\r\n                if (! $scope.allowReply) {\r\n                    return;\r\n                }\r\n\r\n                form.isSubmitted = true;\r\n\r\n                if (form.$valid) {\r\n                    $scope.replying = true;\r\n\r\n                    var newMessage  = {\r\n                        MessageBody: MyMessagesService.replaceLineBreaksWithHtmlLineBreak($scope.portalMessage.Message),\r\n                        ParentMessageId: $stateParams.id,\r\n                        PatientId: activePatient.id\r\n                    };\r\n\r\n                    MyMessagesRepository\r\n                        .replyToMessage(activePatient.id, newMessage)\r\n                        .then(function () {\r\n                            TransitionManager.transition({appRoute: returnRoute, opts: returnOpts });\r\n                            toaster.pop('success', '', gettext('Message sent successfully.'));\r\n                        })\r\n                        .catch(function () {\r\n                            toaster.pop('error', '', gettext('An error has occurred and the Message was not sent.'));\r\n                        })\r\n                        .finally(function () {\r\n                            $scope.replying = false;\r\n                        });\r\n                }\r\n            };\r\n\r\n            loadView();\r\n        };\r\n    };\r\n    var DisplayMessageThreadCtrl = new DisplayMessageThreadBaseCtrl('myMessagesDisplayMessages', { displayMode: 'received' });\r\n    var DisplayMessageThreadMobileCtrl = new DisplayMessageThreadBaseCtrl('myMessagesMobile', { folder: 'inbox' });\r\n    angular.module('mymessages').controller('DisplayMessageThreadCtrl',\r\n    ['$scope', '$stateParams', '$sce', '$anchorScroll', '$location', 'PatientPortalStorageRepository', 'MyMessagesRepository', 'MyMessagesService', '$log', 'TransitionManager', 'toaster', 'aprgettext', 'MetadataRepository', 'NotificationService', 'MyChartService',\r\n        DisplayMessageThreadCtrl]);\r\n    angular.module('mymessages').controller('DisplayMessageThreadMobileCtrl',\r\n    ['$scope', '$stateParams', '$sce', '$anchorScroll', '$location', 'PatientPortalStorageRepository', 'MyMessagesRepository', 'MyMessagesService', '$log', 'TransitionManager', 'toaster', 'aprgettext', 'MetadataRepository', 'NotificationService', 'MyChartService',\r\n        DisplayMessageThreadMobileCtrl]);\r\n})();","(function() {\r\n    'use strict';\r\n    var MessageDisplayBaseCtrl = function MessageDisplayBaseCtrl(autoInit) {\r\n        return function MessageDisplayBase($scope, $sce, $stateParams, PatientPortalStorageRepository, TransitionManager, MyMessagesRepository, MyMessagesService, MyChartService, gettext) {\r\n            $scope.loading = false;\r\n\r\n            var displayReceiveMessages = $stateParams.displayMode.toUpperCase() === 'RECEIVED';\r\n\r\n            $scope.displaySentMessages = false;\r\n            $scope.thumbnailSrc = MyChartService.getMaleThumbnailSrc(50,50);\r\n\r\n            $scope.displayMessages = {\r\n                Messages: null,\r\n                NumberOfMessages: 0\r\n            };\r\n            \r\n            $scope.displayMessageThreadRoute = 'myMessagesDisplayMessageThread';\r\n\r\n            $scope.messageFilter = {\r\n                MessageSubTypeId: '00000000-0000-0000-0000-000000000000',\r\n                SearchSendReceivedMessages: '',\r\n                SortDirection: 'desc',\r\n                NumberOfMessages: 250,\r\n                SearchNewOldMessages: 'Both'\r\n            };\r\n\r\n            var activePatient = PatientPortalStorageRepository.getActivePatient();\r\n\r\n            function getMessageSettings() {\r\n                return MyMessagesService.getMessageSettings(activePatient.id)\r\n                    .then(function (data) {\r\n                        var msgSubTypes;\r\n                        var defaultSettings = data[0];\r\n\r\n                        if (displayReceiveMessages) {\r\n                            msgSubTypes = _(defaultSettings.MessageSubTypes)\r\n                                .filter({ 'Enabled' : true, 'CanBeReceivedByPatient' : true })\r\n                                .value();\r\n                        } else {\r\n                            msgSubTypes = _(defaultSettings.MessageSubTypes)\r\n                                .filter({ 'Enabled' : true, 'CanBeSentByPatient' : true, 'SystemMessage': false })\r\n                                .value();\r\n                        }\r\n\r\n                        msgSubTypes.push(\r\n                            {\r\n                                Enabled: true,\r\n                                Id: '00000000-0000-0000-0000-000000000000',\r\n                                Name: gettext('All Messages'),\r\n                                SystemMessage: false\r\n                            });\r\n\r\n                        $scope.messageSubTypes = msgSubTypes;\r\n                        $scope.selectedMessageSubTypeName = 'All Messages';\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response, '', 'listData');\r\n                    });\r\n            }\r\n\r\n            $scope.getMessages = function(messageFilter) {\r\n                if ($scope.messageFilter.SearchSendReceivedMessages.toUpperCase() === 'UNKNOWN') {\r\n                    return;\r\n                }\r\n\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n                MyMessagesRepository\r\n                    .getMessages(activePatient.id, messageFilter)\r\n                    .then(function (data) {\r\n                        $scope.displayMessages.Messages = _(data)\r\n                            .forEach(function (msg) {\r\n                                msg.MessageHeaderText = MyMessagesService.cleanMessageHeader(msg.MessageHeaderText);\r\n                                msg.MessageBodyText = $sce.trustAsHtml(MyMessagesService.removeLineBreaks(msg.MessageBodyText));\r\n\r\n                                if ($scope.messageFilter.SearchSendReceivedMessages.toUpperCase() === 'RECEIVED') {\r\n                                    if (msg.LastReadByPortalDate == null) {\r\n                                        msg.NewMessage = true;\r\n                                    }\r\n                                    else {\r\n                                        msg.NewMessage = false;\r\n                                    }\r\n                                }\r\n                            });\r\n                        $scope.displayMessages.NumberOfMessages = $scope.displayMessages.Messages.length;\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n            };\r\n            \r\n            function initialize() {\r\n                if ($stateParams.displayMode.toUpperCase() === 'RECEIVED') {\r\n                    $scope.panelHeadingText = gettext('Inbox'); //gettext('Received Messages');\r\n                    $scope.messageFilter.SearchSendReceivedMessages = 'Received';\r\n                    $scope.displaySentMessages = false;\r\n                }\r\n                else if ($stateParams.displayMode.toUpperCase() === 'SEND') {\r\n                    $scope.panelHeadingText = gettext('Sent Messages');\r\n                    $scope.messageFilter.SearchSendReceivedMessages = 'Send';\r\n                    $scope.displaySentMessages = true;\r\n                }\r\n                else {\r\n                    $scope.panelHeadingTest = 'Unknown display mode - ' + $stateParams.displayMode;\r\n                    $scope.messageFilter.SearchSendReceivedMessages = 'Unknown';\r\n                    $scope.displaySentMessages = false;\r\n                }\r\n                $scope.getMessages($scope.messageFilter);\r\n            }\r\n\r\n            $scope.filterMessages = function filterMessages(id) {\r\n                $scope.loading = true;\r\n\r\n                var selectedItem = _.find($scope.messageSubTypes, {Id: id});\r\n                $scope.selectedMessageSubTypeName = selectedItem.Name;     //$scope.messageSubTypes[Index].Name;\r\n                $scope.messageFilter.MessageSubTypeId = selectedItem.Id;   //$scope.messageSubTypes[Index].Id;\r\n                $scope.messageFilter.SortDirection = 'desc';\r\n\r\n                $scope.getMessages($scope.messageFilter);\r\n            };\r\n\r\n            $scope.displayMessageThread = function displayMessageThread(message) {\r\n                if ($scope.messageFilter.SearchSendReceivedMessages.toUpperCase() === 'RECEIVED') {\r\n                    TransitionManager.transition({appRoute: $scope.displayMessageThreadRoute, opts: {displayMode: 'received', id: message.MessageId, updateNotification: message.NewMessage}});\r\n                }\r\n                else {\r\n                    TransitionManager.transition({appRoute: $scope.displayMessageThreadRoute, opts: {displayMode: 'send', id: message.MessageId}});\r\n                }\r\n            };\r\n\r\n            $scope.onLoad = function() {\r\n                getMessageSettings();\r\n\r\n                if(autoInit)\r\n                    initialize();\r\n            };\r\n            \r\n            $scope.onLoad();\r\n        };\r\n    };\r\n    var DisplayMessagesCtrl = new MessageDisplayBaseCtrl(true);\r\n    var MyMessagesMobileCtrl = function ($scope, $sce, $stateParams, PatientPortalStorageRepository, TransitionManager, MyMessagesRepository, MyMessagesService, MyChartService, gettext, _, $state, ContentAttributeService) {\r\n        new MessageDisplayBaseCtrl(false).call(this, $scope, $sce, $stateParams, PatientPortalStorageRepository, TransitionManager, MyMessagesRepository, MyMessagesService, MyChartService, gettext);\r\n        $scope.isInSubstate = function isInSubState() {\r\n            return !$state.is('myMessagesMobile');\r\n        };\r\n        $scope.displayMessageThreadRoute = 'myMessagesMobileDisplayMessageThread';\r\n        $scope.folders = [\r\n              {\r\n                  Key: 'inbox',\r\n                  Name: 'Inbox',\r\n                  Filter: 'Received'\r\n              },\r\n              {\r\n                  Key: 'outbox',\r\n                  Name: 'Sent',\r\n                  Filter: 'Send'\r\n              }\r\n        ];\r\n        $scope.selectedFolder = undefined;\r\n\r\n        $scope.mobileModel = {\r\n            subMessageText: ''\r\n        };\r\n\r\n        ContentAttributeService.getMessageSubHeading(false)\r\n            .then(function(data) {\r\n                $scope.mobileModel.subMessageText = data;\r\n            })\r\n            .catch(function () {\r\n                $scope.mobileModel.subMessageText = '';\r\n            });\r\n\r\n        $scope.changeFolder = function changeFolder(folderKey) {\r\n            $scope.selectedFolder = _.find($scope.folders, { Key: folderKey || $stateParams.folder }) || $scope.selectedFolder || $scope.folders[0];\r\n            $scope.messageFilter.SearchSendReceivedMessages = $scope.selectedFolder.Filter;\r\n            $scope.getMessages($scope.messageFilter);\r\n        };\r\n        $scope.composeNewMessage = function composeNewMessage() {\r\n            $scope.inSubState = true;\r\n            TransitionManager.transition({ appRoute: 'myMessagesMobileNewMessage' });  \r\n        };\r\n        \r\n        $scope.displayMessageThreadMobile = function displayMessageThreadMobile(message) {\r\n            $scope.inSubState = true;\r\n            $scope.displayMessageThread(message);  \r\n        };\r\n        \r\n        $scope.goBackToMessages = function goBackToMessages() {\r\n            $scope.inSubState = false;\r\n            TransitionManager.transition({ appRoute: 'myMessagesMobile' });  \r\n        };\r\n    };\r\n    angular.module('mymessages').controller('DisplayMessagesCtrl',\r\n        ['$scope', '$sce', '$stateParams', 'PatientPortalStorageRepository', 'TransitionManager', 'MyMessagesRepository', 'MyMessagesService', 'MyChartService', 'aprgettext',\r\n            DisplayMessagesCtrl]);\r\n    angular.module('mymessages').controller('MyMessagesMobileCtrl',\r\n        ['$scope', '$sce', '$stateParams', 'PatientPortalStorageRepository', 'TransitionManager', 'MyMessagesRepository', 'MyMessagesService', 'MyChartService', 'aprgettext', '_', '$state', 'ContentAttributeService',\r\n            MyMessagesMobileCtrl]);\r\n})();","angular.module('mymessages').controller('MyMessagesCtrl',\r\n    ['$scope', '$location', '$state', 'ContentAttributeService',\r\n        function ($scope, $location, $state, ContentAttributeService) {\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n\r\n            $scope.model = {\r\n                subMessageText: ''\r\n            };\r\n\r\n            $scope.messageLinkSelected = function(linkId) {\r\n                if (linkId === 'messages-inbox-btn') {\r\n                    if ($location.path() === '/my-messages/display-messages/received') {\r\n                        $state.reload();\r\n                    }\r\n                } else if (linkId === 'messages-sent-btn') {\r\n                    //$scope.myMessages.DisplayCriteriaMenu = false;\r\n                }\r\n            };\r\n\r\n            function getMessageSubHeading() {\r\n                ContentAttributeService.getMessageSubHeading(false)\r\n                    .then(function(data) {\r\n                        $scope.model.subMessageText = data;\r\n                    })\r\n                    .catch(function () {\r\n                        $scope.model.subMessageText = '';\r\n                    });\r\n            }\r\n\r\n            function onLoad() {\r\n                getMessageSubHeading();\r\n            }\r\n            onLoad();\r\n\r\n            $scope.loading = false;\r\n        }]);","(function () {\r\n    'use strict';\r\n    var NewMessageBaseCtrl = function (returnRoute, returnOpts) {\r\n        return function ($scope, $q, PatientPortalStorageRepository, MessageRepository, ListService, gettext, TransitionManager, toaster, MyMessagesService, MyMessagesRepository, GuidList) {\r\n            $scope.loading = false;\r\n            $scope.sending = false;\r\n            $scope.patientAttachmentSubtype = GuidList.MessageSubType.PatientAttachment;\r\n\r\n            $scope.messageSettings = null;\r\n            $scope.messageSubTypes = null;\r\n\r\n            $scope.routeTypeString = null;\r\n\r\n            $scope.portalMessage = {\r\n                UrgencyId: null,\r\n                RouteType: 'Service Site',\r\n                ProviderOrServiceSiteId: null,\r\n                SubTypeId: null,\r\n                Header: '',\r\n                Message: ''\r\n            };\r\n\r\n            $scope.AttachmentList=\r\n            {\r\n               attachmentDtoList : $scope.attachmentDtoList,\r\n                validationMessage : ''\r\n            };\r\n\r\n            $scope.returnRoute = returnRoute;\r\n            $scope.returnOpts = returnOpts;\r\n\r\n            var activePatient = PatientPortalStorageRepository.getActivePatient();\r\n\r\n            function getUrgencyList() {\r\n                return ListService.getList('urgencies')\r\n                    .then(function (urgencyList) {\r\n                        $scope.urgencies = urgencyList;\r\n                        var defaultUrgency = _.find(urgencyList, {IsDefault: true});\r\n                        if (!_.isUndefined(defaultUrgency)) {\r\n                            $scope.portalMessage.UrgencyId = defaultUrgency.Id;\r\n                        }\r\n                    });\r\n            }\r\n\r\n\r\n            function getMessageSettings() {\r\n                return MyMessagesService.getMessageSettings(activePatient.id)\r\n                    .then(function (data) {\r\n                        $scope.messageSettings = data;\r\n                    });\r\n            }\r\n\r\n            function getAttachmentConfig()\r\n            {\r\n               return MyMessagesService.isAttachmentAllowed();\r\n            }\r\n\r\n            function loadView() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n                var urgencyListPromise = getUrgencyList();\r\n                var messageSettingsPromise = getMessageSettings();\r\n\r\n                $q.all([urgencyListPromise, messageSettingsPromise]).then(function () {\r\n                    MessageRepository.getPortalMessageMetadata($scope);\r\n\r\n                    if ($scope.messageSettings && $scope.messageSettings.length > 0) {\r\n                        $scope.portalMessage.RouteType = $scope.messageSettings[0].RouteType;\r\n                        if ($scope.messageSettings[0].RouteType.toLowerCase() === 'practice') {\r\n                            $scope.routeTypeString = gettext('Practice');\r\n                        } else if ($scope.messageSettings[0].RouteType.toLowerCase() === 'servicesite') {\r\n                            $scope.routeTypeString = gettext('Service Site');\r\n                        } else if ($scope.messageSettings[0].RouteType.toLowerCase() === 'provider'){\r\n                            $scope.routeTypeString = gettext('Provider');\r\n                        } else {\r\n                            $scope.routeTypeString = gettext('Unknown');\r\n                        }\r\n\r\n                        var defaultSettingsItem = _($scope.messageSettings)\r\n                            .filter({'DefaultRoutingItem': true})\r\n                            .value();\r\n\r\n                        if (defaultSettingsItem && defaultSettingsItem.length > 0) {\r\n                            defaultSettingsItem = defaultSettingsItem[0];\r\n                        }\r\n                        else {\r\n                            defaultSettingsItem = $scope.messageSettings[0];\r\n                        }\r\n\r\n                        $scope.portalMessage.ProviderOrServiceSiteId = defaultSettingsItem.ProviderOrServiceSiteId;\r\n\r\n                        $scope.messageSubTypes = _(defaultSettingsItem.MessageSubTypes)\r\n                            .filter({'SystemMessage': false, 'Enabled': true})\r\n                            .value();\r\n\r\n                        if ($scope.messageSubTypes && $scope.messageSubTypes.length > 0) {\r\n                            var defaultItem = _.find($scope.messageSubTypes, {Id: '9af1089b-e98b-4758-80f8-0435b143426d'});\r\n                            $scope.portalMessage.SubTypeId = (defaultItem) ? defaultItem.Id : $scope.messageSubTypes[0].Id;\r\n\r\n                            if(!getAttachmentConfig()) {\r\n                                $.each($scope.messageSubTypes, function (i) {\r\n                                    if ($scope.messageSubTypes[i].Id === '584c539b-2874-44c9-9f86-6f0902044f5e'){\r\n                                        $scope.messageSubTypes.splice(i, 1);\r\n                                        return false;\r\n                                    }\r\n                                });\r\n                            }\r\n                        }\r\n                    }\r\n                }).catch(function (response) {\r\n                    $scope.addHttpError(response, '', 'listData');\r\n                }).finally(function () {\r\n                    $scope.loading = false;\r\n                });\r\n            }\r\n\r\n            $scope.selectedProviderOrServiceSiteChanged = function selectedProviderOrServiceSiteChanged() {\r\n                var selectedMessageSettingsItem = _($scope.messageSettings)\r\n                    .filter({'ProviderOrServiceSiteId': $scope.portalMessage.ProviderOrServiceSiteId})\r\n                    .value();\r\n\r\n                if (selectedMessageSettingsItem && selectedMessageSettingsItem.length) {\r\n                    $scope.messageSubTypes = _(selectedMessageSettingsItem[0].MessageSubTypes)\r\n                        .filter({'SystemMessage': false, 'Enabled': true})\r\n                        .value();\r\n\r\n                    if ($scope.messageSubTypes && $scope.messageSubTypes.length > 0) {\r\n                        $scope.portalMessage.SubTypeId = $scope.messageSubTypes[0].Id;\r\n                    }\r\n                }\r\n            };\r\n\r\n\r\n            $scope.sendMessage = function sendMessage(form) {\r\n                form.isSubmitted = true;\r\n\r\n                if($scope.portalMessage.SubTypeId === '584c539b-2874-44c9-9f86-6f0902044f5e' && $scope.AttachmentList.attachmentDtoList.length === 0)\r\n                {\r\n                    $scope.AttachmentList.validationMessage = '* Please select an attachment to send. ';\r\n                    form.$valid = false;\r\n                }\r\n                if (form.$valid) {\r\n                    $scope.sending = true;\r\n\r\n                    var selectedMessageSubType = _.find($scope.messageSubTypes, {Id: $scope.portalMessage.SubTypeId});\r\n\r\n                    var newMessage = {\r\n                        PatientId: activePatient.id,\r\n                        UrgencyId: $scope.portalMessage.UrgencyId,\r\n                        ProviderOrServiceSiteId: $scope.portalMessage.ProviderOrServiceSiteId,\r\n                        RouteType: $scope.portalMessage.RouteType,\r\n                        SubTypeId: $scope.portalMessage.SubTypeId,\r\n                        Header: selectedMessageSubType.Name + ' - ' + $scope.portalMessage.Header,\r\n                        Message: MyMessagesService.replaceLineBreaksWithHtmlLineBreak($scope.portalMessage.Message),\r\n                        Status: 'Incomplete',\r\n                        AttachmentDto : $scope.AttachmentList.attachmentDtoList\r\n                    };\r\n\r\n                    MyMessagesRepository\r\n                        .createMessage(activePatient.id, newMessage)\r\n                        .then(function () {\r\n                            TransitionManager.transition({appRoute: returnRoute, opts: returnOpts });\r\n                            toaster.pop('success', '', gettext('Message sent successfully.'));\r\n                        })\r\n                        .catch(function () {\r\n                            toaster.pop('error', '', gettext('An error has occurred and the Message was not sent.'));\r\n                        })\r\n                        .finally(function () {\r\n                            $scope.sending = false;\r\n                        });\r\n                }\r\n            };\r\n\r\n            loadView();\r\n        };\r\n    };\r\n\r\n    var NewMessageCtrl = new NewMessageBaseCtrl('myMessagesDisplayMessages', { displayMode: 'received' });\r\n    var NewMessageMobileCtrl = new NewMessageBaseCtrl('myMessagesMobile', { folder: 'inbox' });\r\n    angular.module('mymessages').controller('NewMessageCtrl',\r\n        ['$scope', '$q', 'PatientPortalStorageRepository', 'MessageRepository', 'ListService', 'aprgettext', 'TransitionManager', 'toaster', 'MyMessagesService', 'MyMessagesRepository', 'GuidList',\r\n            NewMessageCtrl]);\r\n    angular.module('mymessages').controller('NewMessageMobileCtrl',\r\n        ['$scope', '$q', 'PatientPortalStorageRepository', 'MessageRepository', 'ListService', 'aprgettext', 'TransitionManager', 'toaster', 'MyMessagesService', 'MyMessagesRepository', 'GuidList',\r\n            NewMessageMobileCtrl]);\r\n})();","angular.module('mymessages').factory('MyMessagesService',\r\n    ['$sce', '$q', 'aprgettext', 'PatientPortalStorageRepository', 'MyMessagesRepository', 'storage','PatientSettingsService',\r\n        function ($sce, $q, gettext, PatientPortalStorageRepository, MyMessagesRepository, storage, PatientSettingsService) {\r\n\r\n            'use strict';\r\n\r\n            function setMessageSettingsStorage(settings, patientId) {\r\n                storage.set('messageSettings' + patientId, settings);\r\n            }\r\n\r\n            function getMessageSettingsStorage(patientId) {\r\n                return storage.get('messageSettings' + patientId);\r\n            }\r\n\r\n            function  isAttachmentAllowed()\r\n            {\r\n                var featureList = PatientSettingsService.getPatientFeatures();\r\n                return featureList.PatientMessageAttachment.IsActive;\r\n            }\r\n\r\n\r\n\r\n            function indexAppointmentsQuestion() { return 0; }\r\n            function indexBillingQuestion() { return 1; }\r\n            function indexDemographicsQuestion() { return 2; }\r\n            function indexGeneralQuestion() { return 3; }\r\n            function indexLoginAssistanceQuestion() { return 4; }\r\n            function indexPrescriptionRxQuestion() { return 5; }\r\n            function indexAllMessages() { return 6; }\r\n\r\n            function getMessageSubTypes() {\r\n                var messageSubTypes = [\r\n                    {Id: 'FD4E2C5D-29C6-4A51-BD20-551D6ED90843', Index: indexAppointmentsQuestion(), Name: gettext('Appointments Question')},\r\n                    {Id: '73366BA8-0149-47E0-875B-CB12BB4CB250', Index: indexBillingQuestion(), Name: gettext('Billing Question')},\r\n                    {Id: 'DFFB40D0-2318-41A9-8EEF-94C58BABB9B9', Index: indexDemographicsQuestion(), Name: gettext('Demographics Question')},\r\n                    {Id: '9AF1089B-E98B-4758-80F8-0435B143426D', Index: indexGeneralQuestion(), Name: gettext('General Question')},\r\n                    {Id: 'ECA5B8A3-8371-4C08-BF43-386BAC737D3F', Index: indexLoginAssistanceQuestion(), Name: gettext('Login Assistance Question')},\r\n                    {Id: 'E94B7146-407D-4F92-A393-DE8429B7BFBF', Index: indexPrescriptionRxQuestion(), Name: gettext('Prescription Rx Question')},\r\n                    {Id: '00000000-0000-0000-0000-000000000000', Index: indexAllMessages(), Name: gettext('All Messages')}\r\n                ];\r\n\r\n                return messageSubTypes;\r\n            }\r\n\r\n\r\n            function cleanMessageHeader(text) {\r\n                var returnText = text.replace('Patient Question -', '');\r\n                returnText = returnText.replace('Patient Message -', '');\r\n\r\n                var re = new RegExp('RE :', 'g');\r\n                returnText = returnText.replace(re, 're :');\r\n\r\n                returnText = returnText.trim();\r\n                return returnText;\r\n            }\r\n\r\n\r\n            function removeLineBreaks(text) {\r\n                var returnText = text;\r\n\r\n                var re = new RegExp('\\r', 'g');\r\n                returnText = returnText.replace(re, '');\r\n\r\n                re = new RegExp('\\n', 'g');\r\n                returnText = returnText.replace(re, '');\r\n\r\n                re = new RegExp('<br>', 'g');\r\n                returnText = returnText.replace(re, ' ');\r\n\r\n                re = new RegExp('<br/>', 'g');\r\n                returnText = returnText.replace(re, ' ');\r\n\r\n                re = new RegExp('<p>', 'g');\r\n                returnText = returnText.replace(re, '');\r\n\r\n                re = new RegExp('</p>', 'g');\r\n                returnText = returnText.replace(re, ' ');\r\n\r\n                return returnText;\r\n            }\r\n\r\n\r\n            function replaceLineBreaksWithHtmlLineBreak(text) {\r\n                var returnText = text;\r\n\r\n                var re = new RegExp('\\r\\n', 'g');\r\n                returnText = returnText.replace(re, '<br/>');\r\n\r\n                re = new RegExp('\\n', 'g');\r\n                returnText = returnText.replace(re, '<br/>');\r\n\r\n                return returnText;\r\n            }\r\n\r\n            function getNewMessages() {\r\n                var activePatient = PatientPortalStorageRepository.getActivePatient();\r\n                var messageFilter = {\r\n                    MessageSubTypeId: '00000000-0000-0000-0000-000000000000',  // pass null\r\n                    SearchSendReceivedMessages: 'Received',\r\n                    SortDirection: 'desc',\r\n                    NumberOfMessages: 250,\r\n                    SearchNewOldMessages: 'New'\r\n                };\r\n\r\n                return MyMessagesRepository\r\n                    .getMessages(activePatient.id, messageFilter)\r\n                    .then(function (data) {\r\n                        var messages = _(data)\r\n                            .forEach(function (msg) {\r\n                                msg.MessageHeaderText = cleanMessageHeader(msg.MessageHeaderText);\r\n                                msg.MessageBodyText = $sce.trustAsHtml(removeLineBreaks(msg.MessageBodyText));\r\n\r\n                                if (msg.LastReadByPortalDate == null) {\r\n                                    msg.NewMessage = true;\r\n                                }\r\n                                else {\r\n                                    msg.NewMessage = false;\r\n                                }\r\n                            });\r\n                        return messages;\r\n                    });\r\n            }\r\n\r\n            function getMessageSettings(userId) {\r\n                var messageSettings = getMessageSettingsStorage(userId);\r\n\r\n                if (messageSettings != null) {\r\n                    return $q.when(messageSettings);\r\n                } else {\r\n                    return MyMessagesRepository\r\n                        .getMessageSettings(userId)\r\n                        .then(function (data) {\r\n                            setMessageSettingsStorage(data, userId);\r\n                            return data;\r\n                        });\r\n                }\r\n            }\r\n\r\n\r\n            return {\r\n                cleanMessageHeader: cleanMessageHeader,\r\n                removeLineBreaks: removeLineBreaks,\r\n                replaceLineBreaksWithHtmlLineBreak: replaceLineBreaksWithHtmlLineBreak,\r\n                getMessageSubTypes: getMessageSubTypes,\r\n                indexAllMessages: indexAllMessages,\r\n                indexGeneralQuestion: indexGeneralQuestion,\r\n                getNewMessages: getNewMessages,\r\n                getMessageSettings: getMessageSettings,\r\n                isAttachmentAllowed : isAttachmentAllowed\r\n            };\r\n\r\n    }]);","angular.module('mymessages').factory('MyMessagesRepository',\r\n    ['AprimaRestangular', function (AprimaRestangular) {\r\n            'use strict';\r\n\r\n\r\n        //[Route(\"api/patient/v1/patients/{patientId:Guid}/messages/{messageId:Guid}/messages\")]\r\n        function getMessageThreadMessages(userId, messageId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('patients/' + userId + '/messages/' + messageId + '/messages').get();\r\n        }\r\n\r\n\r\n        //[Route(\"api/patient/v1/patients/{userId:Guid}/messages\")]\r\n        function getMessages(userId, messageFilter) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('patients/' + userId).customGET('messages', messageFilter);\r\n        }\r\n\r\n        //  [Route(\"api/patient/v1/settings/{userId:guid}/message-settings\")]\r\n        function getMessageSettings(userId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('settings/' + userId + '/message-settings').get();\r\n        }\r\n\r\n        function createMessage(userId, message) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('messages/' + userId + '/create').customPOST(message);\r\n        }\r\n\r\n        function replyToMessage(userId, message) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('messages/' + userId + '/reply').customPUT(message);\r\n        }\r\n\r\n        return {\r\n            getMessages: getMessages,\r\n            getMessageThreadMessages: getMessageThreadMessages,\r\n            getMessageSettings: getMessageSettings,\r\n            createMessage: createMessage,\r\n            replyToMessage: replyToMessage\r\n        };\r\n\r\n    }]);","angular.module('myappointments', [\r\n    //third party\r\n    'angularLocalStorage',\r\n    'gettext',\r\n    'headroom',\r\n    'lodash',\r\n    'ngAnimate',\r\n    'ngTouch',\r\n    'restangular',\r\n    'toaster',\r\n    'ui.bootstrap',\r\n    'ui.router',\r\n    'apEasyScroller',\r\n\r\n    'app',\r\n\r\n    'aprima-core',\r\n    'aprima-bridge',\r\n    'aprima-config',\r\n    'aprima-legacy-common',\r\n    'aprima-provider-api',\r\n    'aprima-patient-api',\r\n    'aprima-utils'\r\n]);","angular.module('myappointments').config(['AppRoutesProvider', '$stateProvider', '$urlRouterProvider',\r\n    function (AppRoutesProvider, $stateProvider) {\r\n        'use strict';\r\n\r\n        var portalSettings = { toolbarItem: 'appointments' };\r\n\r\n        var appRoutes = {\r\n            'myAppointments': {\r\n                state: 'myAppointments',\r\n                route: '/my-appointments',\r\n                portalSettings: portalSettings\r\n            },\r\n            'editRequestedAppointment': {\r\n                state: 'editRequestedAppointment',\r\n                route: '/requested-appointment-edit',\r\n                portalSettings: portalSettings\r\n            },\r\n            'addRequestedAppointment': {\r\n                state: 'addRequestedAppointment',\r\n                route: '/requested-appointment-add',\r\n                portalSettings: portalSettings\r\n            },\r\n            'confirmRequestedAppointment': {\r\n                state: 'confirmRequestedAppointment',\r\n                route: '/requested-appointment-confirm',\r\n                portalSettings: portalSettings\r\n            }\r\n        };\r\n\r\n        AppRoutesProvider.setupAppRoutes(appRoutes);\r\n\r\n        $stateProvider\r\n            .state(appRoutes.myAppointments.state, {\r\n                url: appRoutes.myAppointments.route,\r\n                templateUrl: '/myappointments/views/myAppointments.html',\r\n                controller: 'MyAppointmentsCtrl',\r\n                description: '/myAppointments',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Appointments'); }\r\n                }\r\n            })\r\n            .state(appRoutes.editRequestedAppointment.state, {\r\n                url: appRoutes.editRequestedAppointment.route,\r\n                templateUrl: '/myappointments/views/scheduleAppointment.html',\r\n                controller: 'ScheduleAppointmentCtrl',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Schedule An Appointment'); }\r\n                }\r\n            })\r\n            .state(appRoutes.addRequestedAppointment.state, {\r\n                url: appRoutes.addRequestedAppointment.route,\r\n                templateUrl: '/myappointments/views/scheduleAppointment.html',\r\n                controller: 'ScheduleAppointmentCtrl',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Schedule An Appointment'); }\r\n                }\r\n            })\r\n            .state(appRoutes.confirmRequestedAppointment.state, {\r\n                url: appRoutes.confirmRequestedAppointment.route,\r\n                templateUrl: '/myappointments/views/confirmAppointment.html',\r\n                controller: 'ConfirmAppointmentCtrl',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Appointments'); }\r\n                }\r\n            });\r\n    }]);","angular.module('myappointments').run(['$templateCache', function($templateCache) {\n  'use strict';\r\n\r\n  $templateCache.put('/myappointments/views/confirmAppointment.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-primary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-heading-appointments panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Your appointment has been requested.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center ap-margin-bottom-15\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{:: 'Your request has been sent to the staff for review.  You will receive a message once the status of the request has been updated.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-3 col col-xs-flush\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-6 ap-confirm-content-area\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"ap-appointment-text\\\" style=\\\"color: #515C66; font-size: 16pt; font-family: 'Helvetica Neue Bold', sans-serif;\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <ap-date-formatter date=\\\"{{appointment.RequestDateTime}}\\\" format=\\\"monthname-dayofmonth\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"ap-appointment-text ap-border-bottom\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            @ <ap-date-formatter date=\\\"{{appointment.RequestDateTime}}\\\" format=\\\"time\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"ap-appointment-text\\\" style=\\\"color: #515C66; font-size: 14pt; font-family: 'Helvetica Neue Bold', sans-serif;\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::appointment.AppointmentTypeName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"ap-appointment-text\\\" style=\\\"color: #515C66; font-size: 11pt; font-family: 'Helvetica Neue Bold', sans-serif;\\\" ng-if=\\\"appointment.AppointmentTypeDescription\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::appointment.AppointmentTypeDescription}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"ap-calendar-text\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::appointment.CalendarDescription }}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"ap-appointment-text\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::appointment.Reason}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"ap-practice-text\\\" ng-if=\\\"pendingAppointment.VisitLocation.Address1 && pendingAppointment.VisitLocation.City && pendingAppointment.VisitLocation.State && pendingAppointment.VisitLocation.Zip\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::appointmentLocation.Name}}  {{::appointmentLocation.Address1}} | {{::appointmentLocation.City}}, {{::appointmentLocation.State}}  {{::appointmentLocation.Zip}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"ap-appointment-text\\\" ng-if=\\\"appointmentLocationDefined\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <ap-google-maps ng-if=\\\"appointmentLocationDefined\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    address=\\\"appointmentLocation.Address1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    city=\\\"appointmentLocation.City\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    state=\\\"appointmentLocation.State\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    zip=\\\"appointmentLocation.Zip\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            </ap-google-maps>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <!--<button-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <!--id=\\\"add-to-calendar-btn\\\"-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <!--class=\\\"btn btn-default2 btn-lg pull-left\\\"-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <!--data-transition-to=\\\"{appRoute: 'myAppointments'}\\\">-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                <!--{{::'Add To Calendar' | translate}}-->\\r\" +\r\n    \"\\n\" +\r\n    \"                            <!--</button>-->\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button\\r\" +\r\n    \"\\n\" +\r\n    \"                                    id=\\\"done-btn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    class=\\\"btn btn-primary btn-lg pull-right\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    data-transition-to=\\\"{appRoute: 'myAppointments'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Done' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-3 col col-xs-flush\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'An error has occurred and the confirmation page could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'You do not have access to this patient\\\\'s appointments.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/myappointments/views/myAppointments.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-primary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !httpError\\\" class=\\\"panel-body panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center ap-margin-bottom-30\\\" ng-if=\\\"!pendingAppointment && canRequestAppointments\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <span>{{::'Request a new appointment?' | translate}}</span>&nbsp;&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button id=\\\"request-new-appointment-btn\\\" class=\\\"btn btn-default1\\\" ng-click=\\\"requestNewAppointment()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'Book Now' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                </span>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-subheading\\\" ng-if=\\\"pendingAppointment\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Pending Appointments' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row panel-row ap-margin-bottom-30\\\" id=\\\"pending-appointments-{{pendingAppointment.MessageId}}\\\" ng-if=\\\"pendingAppointment\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12 col-xs-flush col-sm-6 col-md-5\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 col-xs-flush col-sm-6 col-md-5\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-date-formatter date=\\\"{{pendingAppointment.StartDateTime}}\\\" format=\\\"date-time\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <!--<div class=\\\"col-xs-6 col-xs-flush col-md-4\\\">-->\\r\" +\r\n    \"\\n\" +\r\n    \"                        <!--{{::'Add to Calendar' | translate}}-->\\r\" +\r\n    \"\\n\" +\r\n    \"                    <!--</div>-->\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-6 col-xs-flush col-md-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                       <a  ng-click=\\\"loadMap(pendingAppointment)\\\" class=\\\"clickable\\\" data-toggle=\\\"modal\\\" data-target=\\\"#VisitMap-{{pendingAppointment.MessageId}}\\\">{{::'Display Map' | translate}}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-9 col-xs-flush col-sm-6 col-md-5 \\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{pendingAppointment.AppointmentType.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-click = \\\"toggleFullAppointmentDescriptionPending()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"!fullAppointmentDescriptionPending\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{ pendingAppointment.AppointmentType.Description | limitTo: limitTo}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"fullAppointmentDescriptionPending\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"label_wrap\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{ pendingAppointment.AppointmentType.Description }}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-if=\\\"pendingAppointment.Provider.Name\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{pendingAppointment.Provider.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-if=\\\"pendingAppointment.VisitLocation.Name\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{pendingAppointment.VisitLocation.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-if=\\\"pendingAppointment.VisitLocation.Address1 && pendingAppointment.VisitLocation.City && pendingAppointment.VisitLocation.State && pendingAppointment.VisitLocation.Zip\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{pendingAppointment.VisitLocation.Address1}} | {{pendingAppointment.VisitLocation.City}}, {{pendingAppointment.VisitLocation.State}}  {{pendingAppointment.VisitLocation.Zip}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-if=\\\"pendingAppointment.VisitLocation.PhoneNumber\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'p.' | translate }} {{pendingAppointment.VisitLocation.PhoneNumber}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12 col-xs-flush col-sm-3 col-md-2\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button class=\\\"btn btn-default1 pull-right\\\" ng-click=\\\"rescheduleRequestedAppointment()\\\" ng-if=\\\"canRequestAppointments\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::' Reschedule ' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"modal fade\\\" id=\\\"VisitMap-{{pendingAppointment.MessageId}}\\\" tabindex=\\\"-1\\\" role=\\\"dialog\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"modal-dialog\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"modal-content\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"modal-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"modal\\\"><span>&times;</span></button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <h4 class=\\\"modal-title\\\">{{::'Patient Visit Map' | translate}}</h4>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"modal-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <ap-google-maps ng-if=\\\"pendingAppointment.mapLoaded\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        address=\\\"pendingAppointment.VisitLocation.Address1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        city=\\\"pendingAppointment.VisitLocation.City\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        state=\\\"pendingAppointment.VisitLocation.State\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        zip=\\\"pendingAppointment.VisitLocation.Zip\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                </ap-google-maps>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"modal-footer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-8 text-align-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{pendingAppointment.Provider.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{pendingAppointment.VisitLocation.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{pendingAppointment.VisitLocation.Address1}} | {{pendingAppointment.VisitLocation.City}}, {{pendingAppointment.VisitLocation.State}}  {{pendingAppointment.VisitLocation.Zip}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{pendingAppointment.VisitLocation.PhoneNumber}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <button type=\\\"button\\\" class=\\\"btn btn-default ap-btn-dismiss-modal\\\" data-dismiss=\\\"modal\\\">Close</button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Upcoming Appointments' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div id=\\\"no-upcoming-appointments-div\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 class=\\\"text-center ap-margin-bottom-30\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 ng-if=\\\"!upcomingAppointments.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'No upcoming appointments scheduled.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"upcomingAppointments.length\\\" class=\\\"ap-margin-bottom-30\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row panel-row\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     id=\\\"upcoming-appointment-{{appt.AppointmentId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-repeat=\\\"appt in upcomingAppointments\\\" ng-if=\\\"!appt.AppointmentStatus.IsCanceledStatus\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 col-xs-flush col-sm-6 col-md-5\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-xs-flush col-sm-6 col-md-5\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <ap-date-formatter date=\\\"{{appt.StartDateTime}}\\\" format=\\\"date-time\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <!--<div class=\\\"col-xs-6 col-xs-flush col-md-4\\\">-->\\r\" +\r\n    \"\\n\" +\r\n    \"                            <!--{{::'Add to Calendar' | translate}}-->\\r\" +\r\n    \"\\n\" +\r\n    \"                        <!--</div>-->\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-6 col-xs-flush col-md-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <a ng-click=\\\"loadMap(appt)\\\" class=\\\"clickable\\\" data-toggle=\\\"modal\\\" data-target=\\\"#VisitMap-{{appt.AppointmentId}}\\\">{{::'Display Map' | translate}}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-9 col-xs-flush col-sm-6 col-md-5\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{appt.AppointmentType.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ng-if=\\\"appt.IsAppointmentToday\\\">({{appt.AppointmentStatus.Description}})</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-click = \\\"toggleFullAppointmentDescription(appt)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-if=\\\"!appt.fullAppointmentDescription\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{ appt.AppointmentType.Description | limitTo: limitTo}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-if=\\\"appt.fullAppointmentDescription\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"label_wrap\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{ appt.AppointmentType.Description }}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{appt.Provider.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{appt.VisitLocation.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{appt.VisitLocation.Address1}} | {{appt.VisitLocation.City}}, {{appt.VisitLocation.State}}  {{appt.VisitLocation.Zip}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'p.' | translate }} {{appt.VisitLocation.PhoneNumber}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 col-xs-flush col-sm-3 col-md-2\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button class=\\\"btn btn-default1 pull-right\\\" ng-show=\\\"appt.CanCheckIn && canCheckInFeature && !loading\\\" ng-click=\\\"appointmentCheckIn(appt)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Check In Now' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"modal fade\\\" id=\\\"VisitMap-{{appt.AppointmentId}}\\\" tabindex=\\\"-1\\\" role=\\\"dialog\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"modal-dialog\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"modal-content\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"modal-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"modal\\\"><span>&times;</span></button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <h4 class=\\\"modal-title\\\" id=\\\"myModalLabel\\\">{{::'Patient Visit Map' | translate}}</h4>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"modal-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <ap-google-maps ng-if=\\\"appt.mapLoaded\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        address=\\\"appt.VisitLocation.Address1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        city=\\\"appt.VisitLocation.City\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        state=\\\"appt.VisitLocation.State\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        zip=\\\"appt.VisitLocation.Zip\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </ap-google-maps>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"modal-footer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-8 text-align-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                {{appt.Provider.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                {{appt.VisitLocation.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                {{appt.VisitLocation.Address1}} | {{appt.VisitLocation.City}}, {{appt.VisitLocation.State}}  {{appt.VisitLocation.Zip}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                {{appt.VisitLocation.PhoneNumber}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <button type=\\\"button\\\" class=\\\"btn btn-default ap-btn-dismiss-modal\\\" data-dismiss=\\\"modal\\\">Close</button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Previously Scheduled Appointments' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div id=\\\"no-previous-appointments-div\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 class=\\\"text-center\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 ng-if=\\\"!previousAppointments.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'No previously scheduled appointments found.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row panel-row\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 id=\\\"previous-appointment-{{appt.AppointmentId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 ng-repeat=\\\"appt in previousAppointments\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12 col-xs-flush col-sm-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-date-formatter date=\\\"{{appt.StartDateTime}}\\\" format=\\\"date-time\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-if=\\\"appt.AppointmentStatus.IsCanceledStatus\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                         ({{appt.AppointmentStatus.Description}})\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12 col-xs-flush col-sm-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{appt.AppointmentType.Description}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{appt.Provider.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12 col-xs-flush col-sm-5\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{appt.VisitLocation.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{appt.VisitLocation.Address1}}&nbsp;|&nbsp;{{appt.VisitLocation.City}},&nbsp;{{appt.VisitLocation.State}}&nbsp;&nbsp;{{appt.VisitLocation.Zip}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'An error has occurred and the patient appointments could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'You do not have access to this patient\\\\'s appointments.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/myappointments/views/scheduleAppointment.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-primary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-heading-appointments panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Schedule An Appointment' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center ap-margin-bottom-15\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{:: 'Fill out the appointment request below to request a new appointment and we will send it over to the practice for review and confirmation.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <form name=\\\"appointmentRequestForm\\\" novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'Details' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row panel-row-no-border-bottom\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                 ng-class=\\\"{ 'has-error' : (appointmentRequestForm.Calendar.$invalid\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                && (appointmentRequestForm.Calendar.$dirty\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                        || appointmentRequestForm.isSubmitted))}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <label class=\\\"control-label\\\">{{::'Select a Calendar' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <select\\r\" +\r\n    \"\\n\" +\r\n    \"                                        class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        name=\\\"Calendar\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-change=\\\"selectedCalendarChanged()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-model=\\\"appointment.Calendar.Id\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-disabled=\\\"sending\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ap-required=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-options=\\\"calendar.Id as calendar.Description for calendar in patientCalendars\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </select>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row panel-row-no-border-bottom\\\" ng-show=\\\"appointmentLocationDefined\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-sm-4 col-md-5 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <ap-google-maps ng-if=\\\"appointmentLocationDefined\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    address=\\\"appointmentLocation.Address1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    city=\\\"appointmentLocation.City\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    state=\\\"appointmentLocation.State\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    zip=\\\"appointmentLocation.Zip\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            </ap-google-maps>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-sm-4 col-md-5\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label class=\\\"control-label\\\">{{::'Location Details' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{appointmentLocation.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{appointmentLocation.Address1}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{appointmentLocation.Address2}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{appointmentLocation.City}},&nbsp;{{appointmentLocation.State}}&nbsp;&nbsp;{{appointmentLocation.Zip}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-if=\\\"appointmentLocation.PhoneNumber\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12 col-sm-4 col-md-2 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'p.' | translate }} {{appointmentLocation.PhoneNumber}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row panel-row-no-border-bottom\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                 ng-class=\\\"{ 'has-error' : (appointmentRequestForm.AppointmentType.$invalid\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                && (appointmentRequestForm.AppointmentType.$dirty\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                        || appointmentRequestForm.isSubmitted))}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <label class=\\\"control-label\\\">{{::'Select an appointment type' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <select\\r\" +\r\n    \"\\n\" +\r\n    \"                                        class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        name=\\\"AppointmentType\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-model=\\\"appointment.AppointmentType.Id\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-change=\\\"selectedAppointmentTypeChanged()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-disabled=\\\"sending\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ap-required=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-options=\\\"apptType.Id as apptType.Name for apptType in patientAppointmentTypes\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </select>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"selectedAppointmentTypeDescription\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"control-label\\\">{{::'Appointment Description' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"secondary-text-semi-bold-light\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"label_wrap\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                {{selectedAppointmentTypeDescription}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row panel-row-no-border-bottom\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            ng-class=\\\"{ 'has-error' : (appointmentRequestForm.Reason.$invalid\\r\" +\r\n    \"\\n\" +\r\n    \"                            && (appointmentRequestForm.Reason.$dirty\\r\" +\r\n    \"\\n\" +\r\n    \"                                    || appointmentRequestForm.isSubmitted))}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            >\\r\" +\r\n    \"\\n\" +\r\n    \"                                <label class=\\\"control-label\\\">{{::'Reason for the appointment' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <textarea\\r\" +\r\n    \"\\n\" +\r\n    \"                                        class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        name=\\\"AppointmentReason\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-model=\\\"appointment.Reason\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        placeholder=\\\"Appointment reason here\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-disabled=\\\"sending\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ap-required=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        rows=\\\"3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </textarea>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row panel-row-no-border-bottom\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Timing' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row panel-row-no-border-bottom\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-sm-6 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                 ng-class=\\\"{ 'has-error' : (appointmentRequestForm.RequestDate.$invalid && (appointmentRequestForm.RequestDate.$dirty || appointmentRequestForm.isSubmitted))}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <label class=\\\"control-label\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{:: 'Select a date and the available times will be listed.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    &nbsp;<span class=\\\"fa fa-asterisk\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"ap-datepicker\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <uib-datepicker\\r\" +\r\n    \"\\n\" +\r\n    \"                                        name=\\\"RequestDate\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-change=\\\"datePickerChanged()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-model=\\\"datePicker.selectedDate\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-disabled=\\\"sending\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        datepicker-options=\\\"datepickerOptions\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        class=\\\"well well-sm\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </uib-datepicker>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-sm-6 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                 ng-class=\\\"{ 'has-error' : (selectedTimeSlotInvalid && appointmentRequestForm.isSubmitted)}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <label class=\\\"control-label\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{::'Available Times' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    &nbsp;<span class=\\\"fa fa-asterisk\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-show=\\\"loadingAppointmentSlots\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <ap-spinner size=\\\"2\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"appointment.Calendar.TimeZone\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"form-group timezone\\\">{{appointment.Calendar.TimeZone}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div id=\\\"no-open-appointment-slots-div\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-if=\\\"!openAppointmentSlots.length && !loadingAppointmentSlots\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"control-label\\\">{{::'None Available.' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"panel-open-appointment-slots\\\" ng-disabled=\\\"sending\\\" ng-if=\\\"!loadingAppointmentSlots\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"ap-radio-wrapper ap-timeslot-item\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                         scroll-to=\\\"apptSlot.Selected\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                         ng-repeat=\\\"apptSlot in openAppointmentSlots track by $index\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <input type=\\\"radio\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                               name=\\\"SelectedTimeSlot\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                               id=\\\"selected-time-{{$index}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                               ng-value=\\\"apptSlot.StartDate\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                               ng-model=\\\"appointment.RequestDateTime\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                               ng-click=\\\"SelectedTimeSlotClick()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                               ng-disabled=\\\"sending\\\"/>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <label for=\\\"selected-time-{{$index}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <ap-date-formatter date=\\\"{{apptSlot.StartDate}}\\\" format=\\\"time\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{::'Selected Appointment Time: ' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div ng-if=\\\"appointment.RequestDateTime\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <ap-date-formatter date=\\\"{{appointment.RequestDateTime}}\\\" format=\\\"date-time\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div ng-if=\\\"appointment.Calendar.TimeZone\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"form-group timezone-inline\\\">{{appointment.Calendar.TimeZone}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div ng-if=\\\"!appointment.RequestDateTime && openAppointmentSlots.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{::'Please select an appointment time.'}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row panel-row-no-border-bottom\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button\\r\" +\r\n    \"\\n\" +\r\n    \"                                id=\\\"cancel-btn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                class=\\\"btn btn-default2 btn-lg pull-left\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                ng-disabled=\\\"sending\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                data-transition-to=\\\"{appRoute: 'myAppointments'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{::'Cancel' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button\\r\" +\r\n    \"\\n\" +\r\n    \"                                id=\\\"request-appointment-btn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                class=\\\"btn btn-primary btn-lg pull-right\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                ng-disabled=\\\"sending\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                ng-click=\\\"requestAppointment(appointmentRequestForm)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span ng-show=\\\"sending\\\"><ap-spinner></ap-spinner></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{::'Request Appointment' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </form>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'An error has occurred and the patient appointments could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'You do not have access to this patient\\\\'s appointments.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\n}]);\n","angular.module('myappointments').controller('ConfirmAppointmentCtrl',\r\n    ['$scope', '$q', 'ListService', 'MyAppointmentsService',\r\n        function ($scope, $q, ListService, MyAppointmentsService) {\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n\r\n            $scope.appointment = {\r\n                CalendarDescription: '',\r\n                AppointmentTypeDescription: '',\r\n                AppointmentName: '',\r\n                RequestDateTime: null,\r\n                Reason: '',\r\n                AppointmentType: { Id: ''}\r\n            };\r\n\r\n            $scope.appointmentLocation = {\r\n                Id: '',\r\n                Name: '',\r\n                GoogleMapsUrl: '',\r\n                Address1: '',\r\n                Address2: '',\r\n                City: '',\r\n                State: '',\r\n                Zip: '',\r\n                PhoneNumber: ''\r\n            };\r\n\r\n\r\n            function loadPage() {\r\n                var calendarList = ListService.getList('calendar', $scope, 'calendars');\r\n                var serviceSiteList = ListService.getList('servicesite', $scope, 'serviceSites');\r\n                var appointmentTypeList = ListService.getList('appointmenttype', $scope, 'appointmentType');\r\n\r\n                $q.all([calendarList, serviceSiteList, appointmentTypeList]).then(function () {\r\n                    var requestedAppointment = MyAppointmentsService.getRequestedAppointment();\r\n\r\n                    var appointmentType = _.find($scope.appointmentType, {Id: requestedAppointment.AppointmentType.Id});\r\n                    $scope.appointment.AppointmentTypeDescription = appointmentType.Description;\r\n                    $scope.appointment.AppointmentTypeName = appointmentType.Name;\r\n                    $scope.appointment.RequestDateTime = requestedAppointment.RequestDateTime;\r\n                    $scope.appointment.Reason = requestedAppointment.Reason;\r\n                    $scope.appointment.CalendarDescription = requestedAppointment.Calendar.Description;\r\n\r\n                    var selectedCalendar = _.find($scope.calendars, {Id: requestedAppointment.Calendar.Id});\r\n                    var serviceSite = _.find($scope.serviceSites, {Id: selectedCalendar.DefaultServiceSiteId});\r\n                    selectAppointmentLocation(serviceSite);\r\n\r\n                    MyAppointmentsService.clearRequestedAppointment();\r\n                    $scope.loading = false;\r\n                });\r\n\r\n            }\r\n            loadPage();\r\n\r\n\r\n            function selectAppointmentLocation(serviceSite) {\r\n                if (serviceSite) {\r\n                    $scope.appointmentLocation.Id = serviceSite.Id;\r\n                    $scope.appointmentLocation.Name = serviceSite.Description;\r\n                    $scope.appointmentLocation.Address1 = serviceSite.Address.Address1;\r\n                    $scope.appointmentLocation.Address2 = serviceSite.Address.Address2;\r\n                    $scope.appointmentLocation.City = serviceSite.Address.City;\r\n                    $scope.appointmentLocation.State = serviceSite.Address.State;\r\n                    $scope.appointmentLocation.Zip = serviceSite.Address.Zip;\r\n                    $scope.appointmentLocation.PhoneNumber = serviceSite.PhoneNumber.PhoneNumber;\r\n                    $scope.appointmentLocationDefined = true;\r\n                }\r\n            }\r\n\r\n        }]);","angular.module('myappointments').controller('MyAppointmentsCtrl',\r\n    ['$scope', '$q', '$sce', '$log', 'TransitionManager', 'PatientPortalStorageRepository', 'MyAppointmentsRepository', 'MyAppointmentsService', 'NotificationService', 'toaster', 'aprgettext', 'PatientSettingsService',\r\n        function ($scope, $q, $sce, $log, TransitionManager, PatientPortalStorageRepository, MyAppointmentsRepository, MyAppointmentsService, NotificationService, toaster, gettext, PatientSettingsService) {\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n            $scope.upcomingAppointments = [];\r\n            $scope.previousAppointments = [];\r\n            $scope.pendingAppointment = null;\r\n            $scope.fullAppointmentDescription = false;\r\n            $scope.limitTo = 120;\r\n\r\n            $scope.searchFilter = {\r\n                StartDate: '1/1/1800',\r\n                EndDate: '12/31/9999',\r\n                SortDirection: 'desc',\r\n                FetchLimit: 250\r\n            };\r\n\r\n            var featureList = PatientSettingsService.getPatientFeatures();\r\n            $scope.canRequestAppointments = featureList.RequestAppointments.IsActive;\r\n            $scope.canViewAppointments = featureList.ViewAppointments.IsActive;\r\n            $scope.canCheckInFeature = featureList.CheckIn.IsActive;\r\n            featureList = null;\r\n\r\n            var activePatient = PatientPortalStorageRepository.getActivePatient();\r\n\r\n            function isUpcomingAppointment(appointmentDateTime, minUpcomingAppointmentDateTime) {\r\n                if (!appointmentDateTime) {\r\n                    return false;\r\n                }\r\n\r\n                var diff = moment(appointmentDateTime).diff(moment(minUpcomingAppointmentDateTime), 'days');\r\n                return (diff >= 0);\r\n            }\r\n\r\n            function createAppointmentLists(appointments) {\r\n                var minUpcomingAppointmentDateTime = moment().subtract(1, 'hours');\r\n                var appointmentLists = _.partition(appointments, function (item) {\r\n                    return isUpcomingAppointment(item.StartDateTime, minUpcomingAppointmentDateTime) && \r\n                        !item.AppointmentStatus.IsCanceledStatus;\r\n                });\r\n\r\n                $scope.upcomingAppointments = _(appointmentLists[0])\r\n                    .map(function(property){\r\n                        return _.assignIn(property , { mapLoaded: false, fullAppointmentDescription: false });\r\n                    })\r\n                    .sortBy('StartDateTime')\r\n                    .forEach(function (item) {\r\n                        item.CanReschedule = false;\r\n\r\n                        // Can check in 1 hour early to 1 hour late\r\n                        // Appointment Status cannot be Canceled, Discharged or Checked In\r\n                        item.CanCheckIn = false;\r\n                        item.CanCancel = !(MyAppointmentsService.isCheckIn(item.AppointmentStatus.Id) || item.AppointmentStatus.IsCanceledStatus || MyAppointmentsService.isDischarged(item.AppointmentStatus.Id));\r\n                        if (moment(item.StartDateTime).isBetween(moment().subtract(1, 'hours'), moment().add(1, 'hours'))) {\r\n                            if (item.CanCancel)  {\r\n                                item.CanCheckIn = true;\r\n                            }\r\n                        }\r\n\r\n                        item.IsAppointmentToday = false;\r\n                        if (MyAppointmentsService.isAppointmentToday(item.StartDateTime)) {\r\n                            item.IsAppointmentToday = true;\r\n                        }\r\n\r\n                    });\r\n                \r\n                $scope.previousAppointments = appointmentLists[1];\r\n            }\r\n\r\n            function getPatientAppointments(searchFilter) {\r\n                $scope.loading = true;\r\n                return MyAppointmentsRepository\r\n                    .getAppointments(activePatient.id, searchFilter)\r\n                    .then(function (data) {\r\n                        createAppointmentLists(data);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n\r\n            function createPendingAppointments(pendingAppts) {\r\n                if (pendingAppts) {\r\n                    _.assignIn(pendingAppts, { mapLoaded: false });\r\n                    $scope.pendingAppointment = pendingAppts;\r\n                    $scope.pendingAppointment.CanReschedule = true;\r\n                    //$log.log('pending appointment requests:');\r\n                    //$log.log($scope.pendingAppointment);\r\n                }\r\n                else {\r\n                    $scope.pendingAppointment = null;\r\n                }\r\n            }\r\n\r\n            function getPendingAppointments() {\r\n                return MyAppointmentsRepository\r\n                    .getPendingAppointmentRequest(activePatient.id)\r\n                    .then(function (pendingAppts) {\r\n                        createPendingAppointments(pendingAppts);\r\n                    });\r\n            }\r\n            \r\n            function loadPage() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n\r\n                if (!$scope.canViewAppointments) {\r\n                    toaster.pop('warning', '', gettext('The View Appointments feature is not enabled.'));\r\n                    TransitionManager.transition({appRoute: 'dashboard'});\r\n                    return;\r\n                }\r\n\r\n                activePatient = PatientPortalStorageRepository.getActivePatient();\r\n\r\n                var pendingAppointmentsPromise = getPendingAppointments();\r\n                var bookedAppointmentsPromise = getPatientAppointments($scope.searchFilter);\r\n                $q.all([pendingAppointmentsPromise, bookedAppointmentsPromise]).catch(function (response) {\r\n                    $scope.addHttpError(response);\r\n                }).finally(function () {\r\n                    $scope.loading = false;\r\n                });\r\n            }\r\n            loadPage();\r\n\r\n            $scope.toggleFullAppointmentDescriptionPending = function toggleFullAppointmentDescriptionPending()\r\n            {\r\n                $scope.fullAppointmentDescriptionPending = !$scope.fullAppointmentDescriptionPending;\r\n            };\r\n\r\n            $scope.toggleFullAppointmentDescription = function toggleFullAppointmentDescription(appt)\r\n            {\r\n                appt.fullAppointmentDescription = !appt.fullAppointmentDescription;\r\n                console.log(appt.fullAppointmentDescription);\r\n            };\r\n\r\n            $scope.requestNewAppointment = function requestNewAppointment() {\r\n                MyAppointmentsService.clearRequestedAppointment();\r\n                TransitionManager.transition({appRoute: 'addRequestedAppointment'});\r\n            };\r\n\r\n            $scope.rescheduleRequestedAppointment = function rescheduleRequestedAppointment() {\r\n                var requestedAppointment = {\r\n                    Message: { Id: $scope.pendingAppointment.MessageId},\r\n                    Calendar: { Id: $scope.pendingAppointment.Calendar.Id, Description: ''},\r\n                    AppointmentType: { Id: $scope.pendingAppointment.AppointmentType.Id},\r\n                    RequestDateTime: $scope.pendingAppointment.StartDateTime,\r\n                    Reason: $scope.pendingAppointment.Reason\r\n                };\r\n                MyAppointmentsService.cacheRequestedAppointment(requestedAppointment);\r\n                TransitionManager.transition({appRoute: 'editRequestedAppointment'});\r\n            };\r\n\r\n            $scope.appointmentCheckIn = function appointmentCheckIn(appointment) {\r\n                MyAppointmentsRepository\r\n                    .changeAppointmentStatus(appointment.PatientId, appointment.AppointmentId, 'CD2A0578-0C89-4151-B4E9-66ED9D5B4995')\r\n                    .then(function () {\r\n                        getPatientAppointments($scope.searchFilter);\r\n                        toaster.pop('success', '', gettext('Appointment check in is successful.'));\r\n                        NotificationService.updateNotifications();\r\n                    })\r\n                    .catch(function () {\r\n                        toaster.pop('error', '', gettext('An error occurred updating the appointment.'));\r\n                    });\r\n            };\r\n\r\n            //$scope.appointmentCancel = function appointmentCancel(appointment) {\r\n            //    alert('Cancel appointment not implemented, yet.  ' + appointment);\r\n            //};\r\n\r\n            $scope.loadMap = function toggleShow(appt){\r\n               appt.mapLoaded = true;\r\n            };\r\n\r\n        }]);","angular.module('myappointments').controller('ScheduleAppointmentCtrl',\r\n    ['$scope', '$q', '$log', 'ListService', 'MyAppointmentsRepository', 'MyAppointmentsService', 'PatientPortalStorageRepository', 'AppointmentRepository', 'toaster','aprgettext', 'TransitionManager',\r\n        function ($scope, $q, $log, ListService, MyAppointmentsRepository, MyAppointmentsService, PatientPortalStorageRepository, AppointmentRepository, toaster, gettext, TransitionManager) {\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n\r\n            $scope.patientCalendars = [];\r\n            $scope.patientAppointmentTypes = [];\r\n            $scope.openAppointmentSlots = [];\r\n            $scope.selectedTimeSlotInvalid = false;\r\n\r\n            $scope.datepickerOptions = {\r\n                minDate: moment().toDate(),\r\n                maxDate: moment().add(1, 'years').toDate(),\r\n                showWeeks: false,\r\n                minMode: 'day',\r\n                maxMode: 'day'\r\n            };\r\n\r\n            $scope.appointment = {\r\n                Calendar: { Id: '', Description: ''},\r\n                AppointmentType: { Id: ''},\r\n                RequestDateTime: null,\r\n                Reason: ''\r\n            };\r\n            $scope.datePicker = { selectedDate: ''};\r\n\r\n            $scope.appointmentLocation = {\r\n                Id: '',\r\n                Name: '',\r\n                GoogleMapsUrl: '',\r\n                Address1: '',\r\n                Address2: '',\r\n                City: '',\r\n                State: '',\r\n                Zip: '',\r\n                PhoneNumber: ''\r\n            };\r\n            $scope.appointmentLocationDefined = false;\r\n            var activePatient = PatientPortalStorageRepository.getActivePatient();\r\n            var myTimeZone;\r\n\r\n            function loadPage() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n                activePatient = PatientPortalStorageRepository.getActivePatient();\r\n                var calendarList = ListService.getList('calendar', $scope, 'calendars');\r\n                var serviceSiteList = ListService.getList('servicesite', $scope, 'serviceSites');\r\n                var appointmentTypeList = ListService.getList('appointmenttype', $scope, 'appointmentType');\r\n                var loadTimeZonePromise = loadTimeZone();\r\n\r\n                $q.all([calendarList, serviceSiteList, appointmentTypeList, loadTimeZonePromise]).then(function () {\r\n                    if ($scope.calendars) {\r\n                        $scope.patientCalendars = _($scope.calendars)\r\n                            .filter({'AllowPatientRequest': true})\r\n                            .value();\r\n                    }\r\n\r\n                    if ($scope.appointmentType) {\r\n                        $scope.patientAppointmentTypes = _($scope.appointmentType)\r\n                            .filter({'AllowPatientRequest': true})\r\n                            .value();\r\n                    }\r\n\r\n                    if (MyAppointmentsService.isNewRequestedAppointment()) {\r\n                        if ($scope.patientCalendars) {\r\n                            $scope.appointment.Calendar.Id = $scope.patientCalendars[0].Id;\r\n                        }\r\n                        if ($scope.patientAppointmentTypes) {\r\n                            $scope.appointment.AppointmentType.Id = $scope.patientAppointmentTypes[0].Id;\r\n                            $scope.selectedAppointmentTypeDescription = $scope.patientAppointmentTypes[0].Description;\r\n                        }\r\n                        $scope.datePicker.selectedDate = new Date();\r\n                    }\r\n                    else {\r\n                        var requestedAppointment = MyAppointmentsService.getRequestedAppointment();\r\n                        var appointmentType = _.find($scope.appointmentType, {Id: requestedAppointment.AppointmentType.Id});\r\n\r\n                        $scope.appointment.Calendar.Id = requestedAppointment.Calendar.Id;\r\n                        $scope.appointment.AppointmentType.Id = requestedAppointment.AppointmentType.Id;\r\n                        $scope.selectedAppointmentTypeDescription = appointmentType.Description;\r\n                        $scope.appointment.Reason = requestedAppointment.Reason;\r\n                        $scope.appointment.RequestDateTime = requestedAppointment.RequestDateTime;  // bound to appointment slot in view\r\n                        $scope.datePicker.selectedDate = requestedAppointment.RequestDateTime;      // bound to selected datepicker date in view\r\n\r\n                        MyAppointmentsService.clearRequestedAppointment();\r\n                    }\r\n\r\n                    assignTimeZone();\r\n                    selectAppointmentLocation();\r\n                    populateOpenAppointmentSlots($scope.datePicker.selectedDate, $scope.appointment.RequestDateTime);\r\n\r\n                    MyAppointmentsRepository.getAppointmentRequestMetadata($scope);\r\n                }).catch(function (response) {\r\n                    $scope.addHttpError(response);\r\n                }).finally(function () {\r\n                    $scope.loading = false;\r\n                });\r\n            }\r\n            loadPage();\r\n\r\n            function loadTimeZone() {\r\n                return MyAppointmentsRepository\r\n                    .getTimeZone()\r\n                    .then(function (data) {\r\n                        myTimeZone = data;\r\n                    });\r\n            }\r\n\r\n            function assignTimeZone() {\r\n                _.forEach($scope.patientCalendars, function(calendar) {\r\n                    if(calendar.TimeZone === null) {\r\n                        calendar.TimeZone = myTimeZone.StandardName;\r\n                    }\r\n                });\r\n            }\r\n\r\n            function clearAppointmentLocation() {\r\n                $scope.appointmentLocationDefined = false;\r\n                $scope.appointmentLocation.Id = '';\r\n                $scope.appointmentLocation.Name = '';\r\n                $scope.appointmentLocation.GoogleMapsUrl = '';\r\n                $scope.appointmentLocation.Address1 = '';\r\n                $scope.appointmentLocation.Address2 = '';\r\n                $scope.appointmentLocation.City = '';\r\n                $scope.appointmentLocation.State = '';\r\n                $scope.appointmentLocation.Zip = '';\r\n                $scope.appointmentLocation.PhoneNumber = '';\r\n            }\r\n            function selectAppointmentLocation() {\r\n                clearAppointmentLocation();\r\n                var selectedCalendar = _.find($scope.patientCalendars, {Id: $scope.appointment.Calendar.Id});\r\n                if (selectedCalendar && selectedCalendar.DefaultServiceSiteId) {\r\n                    var serviceSite = _.find($scope.serviceSites, {Id: selectedCalendar.DefaultServiceSiteId});\r\n                    if (serviceSite) {\r\n                        $scope.appointmentLocation.Id = (serviceSite.Id) ? serviceSite.Id : '';\r\n                        $scope.appointmentLocation.Name = (serviceSite.Description) ? serviceSite.Description : '';\r\n                        if(serviceSite.Address)\r\n                        {\r\n                            if(serviceSite.Address.Address1) {\r\n                                $scope.appointmentLocation.Address1 = serviceSite.Address.Address1;\r\n                                $scope.appointmentLocationDefined = true;\r\n                            }\r\n                            $scope.appointmentLocation.Address2 = (serviceSite.Address.Address2) ? serviceSite.Address.Address2 : '';\r\n                            $scope.appointmentLocation.City = (serviceSite.Address.City) ? serviceSite.Address.City : '';\r\n                            $scope.appointmentLocation.State = (serviceSite.Address.State) ? serviceSite.Address.State : '';\r\n                            $scope.appointmentLocation.Zip = (serviceSite.Address.Zip) ? serviceSite.Address.Zip : '';\r\n                        }\r\n                        if(serviceSite.PhoneNumber)\r\n                        {\r\n                            $scope.appointmentLocation.PhoneNumber = (serviceSite.PhoneNumber.PhoneNumber) ? serviceSite.PhoneNumber.PhoneNumber : '';\r\n                        }\r\n\r\n                    }\r\n                }\r\n            }\r\n\r\n            function populateOpenAppointmentSlots(selectedDate, selectedTime) {\r\n                $scope.loadingAppointmentSlots = true;\r\n                $scope.removeHttpError();\r\n                var startDate = moment(selectedDate).hour(0).minute(0).second(0).toDate();\r\n                var endDate = moment(startDate).add(1, 'days').hour(0).minute(0).second(0).toDate();\r\n\r\n\r\n                if ($scope.appointment.AppointmentType.Id) {\r\n                    var selectedCalendar = _.find($scope.patientCalendars, {Id: $scope.appointment.Calendar.Id});\r\n                    if (selectedCalendar) {\r\n                        $scope.appointment.Calendar.Description = (selectedCalendar.Description) ? selectedCalendar.Description : '';\r\n                        $scope.appointment.Calendar.TimeZone = (selectedCalendar.TimeZone) ? selectedCalendar.TimeZone : '';\r\n                        var searchFilter = {\r\n                            StartDate: startDate,\r\n                            EndDate: endDate,\r\n                            AppointmentTypeId: $scope.appointment.AppointmentType.Id\r\n                        };\r\n\r\n                        MyAppointmentsRepository\r\n                            .getAppointmentsOpenTimeSlots(activePatient.id, selectedCalendar.Id, searchFilter)\r\n                            .then(function (data) {\r\n                                $scope.openAppointmentSlots = _(data)\r\n                                    .forEach(function (item) {\r\n                                        item.Selected = false;\r\n                                        if (selectedTime) {\r\n                                            if (moment(selectedTime).isSame(item.StartDate)) {\r\n                                                item.Selected = true;\r\n                                            }\r\n                                        }\r\n                                    });\r\n                            })\r\n                            .catch(function (response) {\r\n                                $scope.addHttpError(response);\r\n                            })\r\n                            .finally(function () {\r\n                                $scope.loadingAppointmentSlots = false;\r\n                            });\r\n                    }\r\n                }\r\n            }\r\n\r\n\r\n            $scope.selectedCalendarChanged = function selectedCalendarChanged() {\r\n                selectAppointmentLocation();\r\n                populateOpenAppointmentSlots($scope.datePicker.selectedDate);\r\n                $scope.appointment.RequestDateTime = null;\r\n                $scope.selectedTimeSlotInvalid = false;\r\n            };\r\n\r\n\r\n            $scope.selectedAppointmentTypeChanged = function selectedAppointmentTypeChanged() {\r\n                populateOpenAppointmentSlots($scope.datePicker.selectedDate);\r\n                $scope.appointment.RequestDateTime = null;\r\n                $scope.selectedTimeSlotInvalid = false;\r\n                var selectedApptType = _.find(($scope.patientAppointmentTypes),\r\n                    {'Id': $scope.appointment.AppointmentType.Id});\r\n                $scope.selectedAppointmentTypeDescription = (selectedApptType) ? selectedApptType.Description : '';\r\n            };\r\n\r\n\r\n            $scope.datePickerChanged = function datePickerChanged() {\r\n                populateOpenAppointmentSlots($scope.datePicker.selectedDate);\r\n                $scope.appointment.RequestDateTime = null;\r\n                $scope.selectedTimeSlotInvalid = false;\r\n            };\r\n\r\n            $scope.SelectedTimeSlotClick = function SelectedTimeSlotClick() {\r\n                $scope.selectedTimeSlotInvalid = !$scope.appointment.RequestDateTime;\r\n            };\r\n\r\n            function validateRequestDate(form) {\r\n                if (!$scope.datePicker.selectedDate) {\r\n                    form.RequestDate.$invalid = true;\r\n                    form.RequestDate.$dirty = true;\r\n                }\r\n                else {\r\n                    form.RequestDate.$invalid = false;\r\n                }\r\n            }\r\n\r\n            function validateSelectedTimeSlot() {\r\n                $scope.selectedTimeSlotInvalid = !$scope.appointment.RequestDateTime;\r\n\r\n                //if (!$scope.appointment.RequestDateTime) {\r\n                //    form.SelectedTimeSlot.$invalid = true;\r\n                //    form.SelectedTimeSlot.$dirty = true;\r\n                //}\r\n                //else {\r\n                //    form.SelectedTimeSlot.$invalid = false;\r\n                //}\r\n            }\r\n\r\n            function validateAppointmentReason(form) {\r\n                if (!$scope.appointment.Reason) {\r\n                    form.AppointmentReason.$invalid = true;\r\n                    form.AppointmentReason.$dirty = true;\r\n                }\r\n                else {\r\n                    form.AppointmentReason.$invalid = false;\r\n                }\r\n            }\r\n\r\n            function isFormValid(form) {\r\n                if ($scope.selectedTimeSlotInvalid  || form.RequestDate.$invalid || form.AppointmentReason.$invalid) {\r\n                    form.$valid = false;\r\n                }\r\n                else {\r\n                    form.$valid = true;\r\n                }\r\n            }\r\n\r\n            $scope.requestAppointment = function requestAppointment(form) {\r\n                form.isSubmitted = true;\r\n\r\n                validateRequestDate(form);\r\n                validateSelectedTimeSlot();\r\n                validateAppointmentReason(form);\r\n                isFormValid(form);\r\n\r\n                if (form.$valid) {\r\n                    $scope.sending = true;\r\n\r\n                    var apptRequest = {\r\n                        AppointmentTypeId: $scope.appointment.AppointmentType.Id,\r\n                        CalendarId: $scope.appointment.Calendar.Id,\r\n                        Reason: $scope.appointment.Reason,\r\n                        RequestDateTime: $scope.appointment.RequestDateTime\r\n                    };\r\n\r\n                    MyAppointmentsRepository\r\n                        .requestAppointment(activePatient.id, apptRequest)\r\n                        .then(function () {\r\n                            MyAppointmentsService.clearRequestedAppointment();\r\n                            var requestedAppointment = {\r\n                                Message: {Id: ''},\r\n                                Calendar: {\r\n                                    Id: $scope.appointment.Calendar.Id,\r\n                                    Description: $scope.appointment.Calendar.Description\r\n                                },\r\n                                AppointmentType: {Id: $scope.appointment.AppointmentType.Id},\r\n                                RequestDateTime: $scope.appointment.RequestDateTime,\r\n                                Reason: $scope.appointment.Reason\r\n                            };\r\n                            MyAppointmentsService.cacheRequestedAppointment(requestedAppointment);\r\n\r\n                            TransitionManager.transition({appRoute: 'confirmRequestedAppointment'});\r\n                            //toaster.pop('success', '', gettext('Appointment request sent successfully.'));\r\n                        })\r\n                        .catch(function () {\r\n                            toaster.pop('error', '', gettext('An error has occurred and the appointment request was not sent.'));\r\n                        })\r\n                        .finally(function () {\r\n                            $scope.sending = false;\r\n                        });\r\n                }\r\n                else {\r\n                    if ($scope.selectedTimeSlotInvalid) {\r\n                        toaster.pop('warning', '', gettext('An appointment time must be selected in order to request an Appointment.'));\r\n                    }\r\n                    else if (form.RequestDate.$invalid) {\r\n                        toaster.pop('warning', '', gettext('An appointment date must be selected in order to request an Appointment.'));\r\n                    }\r\n                    else if (form.AppointmentReason.$invalid) {\r\n                        toaster.pop('warning', '', gettext('An appointment reason must be entered in order to request an Appointment.'));\r\n                    }\r\n                }\r\n            };\r\n        }]);","angular.module('myappointments').factory('MyAppointmentsRepository',\r\n    ['AprimaRestangular', 'MetadataRepository', function (AprimaRestangular, MetadataRepository) {\r\n        'use strict';\r\n        \r\n        function changeAppointmentStatus(patientId, appointmentId, statusId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('patients/' + patientId + '/appointments/status/' + appointmentId + '/' + statusId).customPUT();\r\n        }\r\n\r\n        function updateAppointment(appt) {\r\n            var patientId = appt.Patient.Id;\r\n            var appointmentId = appt.Id;\r\n\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('patients/' + patientId + '/appointments/' + appointmentId).customPUT(appt);\r\n        }\r\n\r\n        function getAppointment(patientId, appointmentId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('patients/' + patientId + '/appointments/' + appointmentId).get();\r\n        }\r\n\r\n        function getAppointments(userId, searchFilter) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('patients/' + userId).customGET('appointments', searchFilter);\r\n        }\r\n\r\n        function getPendingAppointments(userId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('patients/' + userId + '/pendingappointments').get();\r\n        }\r\n\r\n        //[Route(\"api/patient/v1/patients/{userId:Guid}/pendingappointmentrequest\")]\r\n        function getPendingAppointmentRequest(userId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('patients/' + userId + '/pendingappointmentrequest').get();\r\n        }\r\n\r\n        function getAppointmentsOpenTimeSlots(userId, calendarId, searchFilter) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('patients/' + userId + '/calendars/' + calendarId).customGET('opentemplateslots', searchFilter);\r\n        }\r\n\r\n        function requestAppointment(userId, appt) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('patients/' + userId + '/appointmentrequest').customPUT(appt);\r\n        }\r\n\r\n        function getAppointmentRequestMetadata($scope) {\r\n            return MetadataRepository.getMetadata('patientappointmentrequest', $scope);\r\n        }\r\n\r\n        function getTimeZone() {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('patients/timezone').get();\r\n        }\r\n\r\n        return {\r\n            changeAppointmentStatus: changeAppointmentStatus,\r\n            getAppointments: getAppointments,\r\n            getPendingAppointments: getPendingAppointments,\r\n            getPendingAppointmentRequest: getPendingAppointmentRequest,\r\n            getAppointmentsOpenTimeSlots: getAppointmentsOpenTimeSlots,\r\n            requestAppointment: requestAppointment,\r\n            getAppointment: getAppointment,\r\n            updateAppointment: updateAppointment,\r\n            getAppointmentRequestMetadata: getAppointmentRequestMetadata,\r\n            getTimeZone : getTimeZone\r\n        };\r\n\r\n    }]);","angular.module('myappointments').factory('MyAppointmentsService',\r\n    [ function () {\r\n        'use strict';\r\n\r\n        var requestedAppointment = {\r\n            Message: { Id: ''},\r\n            Calendar: { Id: '', Description: ''},\r\n            AppointmentType: { Id: ''},\r\n            RequestDateTime: '',\r\n            Reason: ''\r\n        };\r\n\r\n        var newRequestedAppointment = true;\r\n\r\n        function cacheRequestedAppointment(appointment) {\r\n            requestedAppointment.Message.Id = appointment.Message.Id;\r\n            requestedAppointment.Calendar.Id = appointment.Calendar.Id;\r\n            requestedAppointment.Calendar.Description = appointment.Calendar.Description;\r\n            requestedAppointment.AppointmentType.Id = appointment.AppointmentType.Id;\r\n            requestedAppointment.RequestDateTime = appointment.RequestDateTime;\r\n            requestedAppointment.Reason = appointment.Reason;\r\n            newRequestedAppointment = false;\r\n        }\r\n\r\n        function getRequestedAppointment() {\r\n            return requestedAppointment;\r\n        }\r\n\r\n        function clearRequestedAppointment() {\r\n            requestedAppointment.Message.Id = '';\r\n            requestedAppointment.Calendar.Id = '';\r\n            requestedAppointment.Calendar.Description = '';\r\n            requestedAppointment.AppointmentType.Id = '';\r\n            requestedAppointment.RequestDateTime = '';\r\n            requestedAppointment.Reason = '';\r\n            newRequestedAppointment = true;\r\n            //providerName = '';  // get rid of providerName\r\n        }\r\n\r\n        function isNewRequestedAppointment() {\r\n            return newRequestedAppointment;\r\n        }\r\n\r\n\r\n        function isCheckIn(appointmentStatusId) {\r\n            return appointmentStatusId.toUpperCase() === 'CD2A0578-0C89-4151-B4E9-66ED9D5B4995';\r\n        }\r\n\r\n        function isDischarged(appointmentStatusId) {\r\n            return appointmentStatusId.toUpperCase() === '31886389-631F-4D03-BC28-B4DB87E9B172';\r\n        }\r\n\r\n        function isAppointmentToday(appointmentDateTime) {\r\n            if (!appointmentDateTime) {\r\n                return false;\r\n            }\r\n\r\n            var diff = moment(appointmentDateTime).diff(moment(), 'days');\r\n            return (diff === 0);\r\n        }\r\n\r\n\r\n        return {\r\n            cacheRequestedAppointment: cacheRequestedAppointment,\r\n            getRequestedAppointment: getRequestedAppointment,\r\n            clearRequestedAppointment: clearRequestedAppointment,\r\n            isNewRequestedAppointment: isNewRequestedAppointment,\r\n            isCheckIn: isCheckIn,\r\n            isDischarged: isDischarged,\r\n            isAppointmentToday: isAppointmentToday\r\n        };\r\n\r\n    }]);","angular.module('dashboard', [\r\n    //third party\r\n    'angularLocalStorage',\r\n    'gettext',\r\n    'headroom',\r\n    'lodash',\r\n    'ngAnimate',\r\n    'ngTouch',\r\n    'restangular',\r\n    'toaster',\r\n    'ui.bootstrap',\r\n    'ui.router',\r\n    'apEasyScroller',\r\n\r\n    'aprima-core',\r\n    'aprima-bridge',\r\n    'aprima-config',\r\n    'aprima-legacy-common',\r\n    'aprima-provider-api',\r\n    'aprima-patient-api',\r\n    'aprima-utils'\r\n]);","angular.module('dashboard').config(['AppRoutesProvider', '$stateProvider',\r\n    function (AppRoutesProvider, $stateProvider) {\r\n        'use strict';\r\n\r\n        var portalSettings = { toolbarItem: 'welcome' };\r\n\r\n        var appRoutes = {\r\n            'dashboard': {\r\n                state: 'dashboard',\r\n                route: '/dashboard',\r\n                portalSettings: portalSettings\r\n            }\r\n        };\r\n\r\n        AppRoutesProvider.setupAppRoutes(appRoutes);\r\n\r\n        $stateProvider\r\n            .state(appRoutes.dashboard.state, {\r\n                url: appRoutes.dashboard.route,\r\n                templateUrl: '/dashboard/views/dashboard.html',\r\n                controller: 'DashboardCtrl',\r\n                description: '/Dashboard',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Welcome'); }\r\n                }\r\n            });\r\n    }]);","angular.module('dashboard').run(['$templateCache', function($templateCache) {\n  'use strict';\r\n\r\n  $templateCache.put('/dashboard/views/alerts.html',\r\n    \"<div class=\\\"row\\\" ng-cloak ng-if=\\\"labs.length &&  displayLabResults ||  messages.length && displayMessages \\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel panel-tile panel-flush rounded-corner-sm\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-heading tile-rounded-corner-top\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                ng-click=\\\"updateCollapseState()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                ng-class=\\\"{'tile-rounded-corner-bottom': tile.IsCollapsed}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"pull-right panel-collapser clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-if=\\\"tile.IsCollapsed\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-expand\\\" alt=\\\"arrow-expand\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-if=\\\"!tile.IsCollapsed\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-collapse\\\" alt=\\\"arrow-collapse\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"pull-right ng-hide\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ap-spinner></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-title clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <img src=\\\"images/spacer.png\\\" class=\\\"alert-icon alert-svg\\\" alt=\\\"alert\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{ ::'ALERTS' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div uib-collapse=\\\"tile.IsCollapsed\\\" class=\\\"panel-dashboard-tile-content-area\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div id=\\\"alerts-messages-div\\\" ng-if=\\\"messages.length && displayMessages\\\" ng-class=\\\"(labs.length) ? 'ap-margin-bottom-20' : ''\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"panel-subheading-dashboard\\\">{{::'New Messages' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"row panel-row clickable\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             id=\\\"alert-message-{{msg.MessageId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             ng-repeat=\\\"msg in messages\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             ng-click=\\\"displayAlertMessageThread(msg)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-9\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"ap-dashboard-message\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <img class=\\\"ap-dashboard-message-photo extra-dark-grey-border border-width-md rounded-corner-md\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                         lazy-src=\\\"{{::thumbnailSrc}}\\\" endpoint-base='patient'>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"ap-dashboard-message-text\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <p class=\\\"ap-dashboard-message-text-row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <span ng-if=\\\"msg.FromName !== null\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                {{msg.FromName}}&nbsp;&nbsp;|&nbsp;&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{msg.MessageHeaderText}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <p class=\\\"ap-dashboard-message-text-row\\\" ng-bind-html=\\\"msg.MessageBodyText\\\"></p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span class=\\\"pull-right\\\" ap-date-formatter date=\\\"{{msg.CreateDateTime}}\\\" format=\\\"date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span class=\\\"pull-right\\\" ap-date-formatter date=\\\"{{msg.CreateDateTime}}\\\" format=\\\"time\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div id=\\\"alerts-labs-div\\\" ng-if=\\\"labs.length && displayLabResults\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"panel-subheading-dashboard\\\">{{::'New Test Results' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"row panel-row clickable\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             id=\\\"alert-lab-{{lab.Result.Id}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             ng-repeat=\\\"lab in labs\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             ng-click=\\\"displayAlertMyChartLabs()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-9\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"overflow-ellipsis column-text\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{lab.Result.Description}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"overflow-ellipsis column-subtext\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{::lab.Result.AttachmentType}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span class=\\\"pull-right\\\" ap-date-formatter date=\\\"{{lab.Result.ResultDateTime}}\\\" format=\\\"date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span class=\\\"pull-right\\\" ap-date-formatter date=\\\"{{lab.Result.ResultDateTime}}\\\" format=\\\"time\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                \\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'An error has occurred and the Alerts dashboard tile could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'You do not have access to the Alerts dashboard tile.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/dashboard/views/appointments.html',\r\n    \"<div class=\\\"row\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel panel-tile panel-flush rounded-corner-sm\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-heading tile-rounded-corner-top\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 hm-propagation=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 ng-click=\\\"updateCollapseState()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 ng-class=\\\"{'tile-rounded-corner-bottom': tile.IsCollapsed}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"pull-right panel-collapser clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-if=\\\"tile.IsCollapsed\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-expand\\\" alt=\\\"arrow-expand\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-if=\\\"!tile.IsCollapsed\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-collapse\\\" alt=\\\"arrow-collapse\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"pull-right ng-hide\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ap-spinner></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-default2 visible-xs visible-sm pull-right-inline\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        hm-stop-propagation=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        data-transition-to=\\\"{appRoute: 'myAppointments'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'View' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-default2 hidden-xs hidden-sm pull-right-inline\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        hm-stop-propagation=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        data-transition-to=\\\"{appRoute: 'myAppointments'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'View Appointments' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-title clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <img src=\\\"images/spacer.png\\\" class=\\\"tile-icon tile-appointments\\\" alt=\\\"appointments-tile\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{ ::'UPCOMING APPOINTMENTS' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div uib-collapse=\\\"tile.IsCollapsed\\\" class=\\\"panel-dashboard-tile-content-area\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div id=\\\"no-upcoming-appointments-div\\\" ng-if=\\\"!appointments.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{:: 'No upcoming appointments are scheduled.' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row panel-row\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                         id=\\\"upcoming-appointment-{{appt.AppointmentId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                         ng-repeat=\\\"appt in appointments\\\" ng-if=\\\"!appt.AppointmentStatus.IsCanceledStatus\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <ap-date-formatter date=\\\"{{appt.StartDateTime}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                format=\\\"monthname-dayofmonth\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                @\\r\" +\r\n    \"\\n\" +\r\n    \"                                <ap-date-formatter date=\\\"{{appt.StartDateTime}}\\\" format=\\\"time\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <!--<div>-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                <!--{{::'Add to Calendar' | translate}}-->\\r\" +\r\n    \"\\n\" +\r\n    \"                            <!--</div>-->\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-7 col-sm-5\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{appt.AppointmentType.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                <span ng-if=\\\"appt.IsAppointmentToday\\\">&nbsp;&nbsp;({{appt.AppointmentStatus.Description}})</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"appt.AppointmentType.Description\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{ appt.AppointmentType.Description | limitTo: limitTo}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{appt.Provider.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <a class=\\\"clickable\\\" data-toggle=\\\"modal\\\" data-target=\\\"#VisitMap-{{appt.AppointmentId}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{appt.VisitLocation.Name}}&nbsp;&nbsp;{{appt.VisitLocation.Address1}} |\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{appt.VisitLocation.City}}, {{appt.VisitLocation.State}} {{appt.VisitLocation.Zip}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </a>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-2 col-xs-flush col-sm-4 col-sm-reset-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button class=\\\"btn btn-default1 pull-right\\\" ng-show=\\\"appt.CanCheckIn && canCheckInFeature && !loading\\\" ng-click=\\\"appointmentCheckIn(appt)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Check In Now' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"modal fade\\\" id=\\\"VisitMap-{{appt.AppointmentId}}\\\" tabindex=\\\"-1\\\" role=\\\"dialog\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"modal-dialog\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"modal-content\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"modal-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"modal\\\"><span>&times;</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <h4 class=\\\"modal-title\\\" id=\\\"myModalLabel\\\">{{::'Patient Visit Map' |\\r\" +\r\n    \"\\n\" +\r\n    \"                                            translate}}</h4>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"modal-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <ap-google-maps\\r\" +\r\n    \"\\n\" +\r\n    \"                                                address=\\\"appt.VisitLocation.Address1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                city=\\\"appt.VisitLocation.City\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                state=\\\"appt.VisitLocation.State\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                zip=\\\"appt.VisitLocation.Zip\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </ap-google-maps>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"modal-footer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div class=\\\"col-xs-8 text-align-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{appt.Provider.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{appt.VisitLocation.Name}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{appt.VisitLocation.Address1}} | {{appt.VisitLocation.City}},\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{appt.VisitLocation.State}} {{appt.VisitLocation.Zip}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{appt.VisitLocation.PhoneNumber}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div class=\\\"col-xs-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <button type=\\\"button\\\" class=\\\"btn btn-default\\\" data-dismiss=\\\"modal\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    Close\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'An error has occurred and the Upcoming Appointments dashboard tile could not be loaded.' |\\r\" +\r\n    \"\\n\" +\r\n    \"                        translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'You do not have access to the Upcoming Appointments dashboard tile.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/dashboard/views/billing.html',\r\n    \"<div class=\\\"row\\\" ng-cloak ng-if=\\\"model.owesUsMoney\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel panel-tile panel-flush rounded-corner-sm\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-heading tile-rounded-corner-top\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 hm-propagation=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 ng-click=\\\"updateCollapseState()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 ng-class=\\\"{'tile-rounded-corner-bottom': tile.IsCollapsed}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"pull-right panel-collapser clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-if=\\\"tile.IsCollapsed\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-expand\\\" alt=\\\"tile-expand\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-if=\\\"!tile.IsCollapsed\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-collapse\\\" alt=\\\"tile-collapse\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"pull-right ng-hide\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ap-spinner></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-default2 visible-xs visible-sm pull-right-inline\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        hm-stop-propagation=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        data-transition-to=\\\"{appRoute: 'billing'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'View' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-default2 hidden-xs hidden-sm pull-right-inline\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        hm-stop-propagation=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        data-transition-to=\\\"{appRoute: 'billing'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'View Billing' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-title clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <img src=\\\"images/spacer.png\\\" class=\\\"tile-icon tile-billing\\\" alt=\\\"tile-billing\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{ ::'TOTAL RESPONSIBLE PARTY BALANCE' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div uib-collapse=\\\"tile.IsCollapsed\\\" class=\\\"panel-dashboard-tile-content-area\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row panel-row\\\" ng-if=\\\"!model.DepositByFinancialCenterEnabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{ ::model.PersonBalanceAll | currency }}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <ap-date-formatter date=\\\"{{model.Date}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                               format=\\\"long-date\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button ng-show=\\\"makeAPaymentButtonEnabled\\\" ng-click=\\\"makeGenericOnlinePayment()\\\" class=\\\"btn btn-default1 pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <span class=\\\"ng-hide\\\" ng-show=\\\"transitioning\\\"><ap-spinner></ap-spinner></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Make A Payment' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-if=\\\"model.DepositByFinancialCenterEnabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"row panel-row-no-border-bottom\\\" ng-repeat=\\\"balance in model.FinancialCenterBalances\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-6 col-md-4 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{balance.FinancialCenterName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-6 col-md-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{balance.Balance | currency}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12 col-md-4 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"align-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <button ng-show=\\\"makeAPaymentButtonEnabled\\\" class=\\\"btn btn-default1\\\" ng-click=\\\"makeSpecificOnlinePayment({{balance}})\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{::'Make Online Payment' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'An error has occurred and the Patient Billing dashboard tile could not be loaded.' |\\r\" +\r\n    \"\\n\" +\r\n    \"                        translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'You do not have access to the Patient Billing dashboard tile.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/dashboard/views/chart.html',\r\n    \"<div class=\\\"row\\\" ng-cloak ng-if=\\\"labs.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel panel-tile panel-flush rounded-corner-sm\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-heading tile-rounded-corner-top\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 hm-propagation=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 ng-click=\\\"updateCollapseState()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 ng-class=\\\"{'tile-rounded-corner-bottom': tile.IsCollapsed}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"pull-right panel-collapser clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-if=\\\"tile.IsCollapsed\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-expand\\\" alt=\\\"tile-expand\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-if=\\\"!tile.IsCollapsed\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-collapse\\\" alt=\\\"tile-collapse\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"pull-right ng-hide\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ap-spinner></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-default2 visible-xs visible-sm pull-right-inline\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        hm-stop-propagation=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        data-transition-to=\\\"{appRoute: 'myChartVisitSummary'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'View' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-default2 hidden-xs hidden-sm pull-right-inline\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        hm-stop-propagation=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        data-transition-to=\\\"{appRoute: 'myChartVisitSummary'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'View Chart' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-title clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <img src=\\\"images/spacer.png\\\" class=\\\"tile-icon chart-selected\\\" alt=\\\"chart-selected\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{ ::'CHART UPDATES' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div uib-collapse=\\\"tile.IsCollapsed\\\" class=\\\"panel-dashboard-tile-content-area\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div id=\\\"no-labs-div\\\" ng-if=\\\"!labs.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'No new test results were found.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div id=\\\"labs-div\\\" ng-if=\\\"labs.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"panel-subheading-dashboard\\\">{{::'New Test Results' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"row panel-row clickable\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             id=\\\"lab-{{lab.Result.Id}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             ng-repeat=\\\"lab in labs\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             ng-click=\\\"displayMyChartLabs()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-9\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{lab.Result.Description}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{::lab.Result.AttachmentType}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span class=\\\"pull-right\\\" ap-date-formatter date=\\\"{{lab.Result.ResultDateTime}}\\\" format=\\\"date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span class=\\\"pull-right\\\" ap-date-formatter date=\\\"{{lab.Result.ResultDateTime}}\\\" format=\\\"time\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'An error has occurred and the Chart Updates dashboard tile could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'You do not have access to the Chart Updates dashboard tile.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/dashboard/views/dashboard.html',\r\n    \"<div id=\\\"dashboard\\\" class=\\\"container-fluid container-flush\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-primary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12 col-xs-flush col-md-2\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"dashboard-tile row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-3 col-md-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"panel-photo-dashboard col-md-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <img lazy-src=\\\"{{::patient.userId | apPatientPortalThumbnailSrc:150:150}}\\\" endpoint-base='patient' alt=\\\"patient-image\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-9 col-md-12 col-xs-flush pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"dashboard-patient col-xs-12 col-xs-flush\\\">{{'Patient'|translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"dashboard-name col-xs-12 col-xs-flush\\\"><span class=\\\"dashboard-name\\\">{{::patient.name}}</span></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"dashboard-date col-xs-12 col-xs-flush\\\"><ap-date-formatter date=\\\"{{patient.birthDate}}\\\" format=\\\"long-date\\\"></ap-date-formatter></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row\\\" ng-if=\\\"patient.providerName\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"dashboard-patient col-xs-12 col-xs-flush\\\">{{'Provider'|translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"dashboard-date col-xs-12 col-xs-flush dashboard-font\\\">{{::patient.providerName}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row\\\" ng-if=\\\"patient.serviceSite\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"dashboard-patient col-xs-12 col-xs-flush\\\">{{'Service Site'|translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"dashboard-date col-xs-12 col-xs-flush dashboard-font\\\">{{::patient.serviceSite}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"dashboard-date col-xs-12 col-xs-flush dashboard-font\\\" ng-if=\\\"patient.serviceSiteAddress1\\\">{{::patient.serviceSiteAddress1}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"dashboard-date col-xs-12 col-xs-flush dashboard-font\\\" ng-if=\\\"patient.serviceSiteAddress2\\\">{{::patient.serviceSiteAddress2}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"dashboard-date col-xs-12 col-xs-flush dashboard-font\\\" ng-if=\\\"patient.serviceSiteLocation\\\">{{::patient.serviceSiteLocation}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"dashboard-date col-xs-12 col-xs-flush dashboard-font\\\" ng-if=\\\"patient.serviceSitePhoneNumber\\\">{{::patient.serviceSitePhoneNumber}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row\\\" ng-if=\\\"showLinkPersonalHealthApp\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div id=\\\"personal-health-app-link\\\" class=\\\"dashboard-patient col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <a ng-click=\\\"showPersonalHealthAppModal()\\\"><u>{{::'Link a Personal Health App'|translate}}</u></a>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12 col-md-10 flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-repeat=\\\"tile in activeTiles\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-switch=\\\"tile.Name\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-switch-when=\\\"Alerts\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div id=\\\"dashboard-tile-{{$index}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-include=\\\"'/dashboard/views/alerts.html'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-controller=\\\"AlertsDashboardCtrl\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-init=\\\"load(tile)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-switch-when=\\\"Forms\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div id=\\\"dashboard-tile-{{$index}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-include=\\\"'/dashboard/views/forms.html'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-controller=\\\"FormsDashboardCtrl\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-init=\\\"load(tile)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-switch-when=\\\"Messages\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div id=\\\"dashboard-tile-{{$index}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-include=\\\"'/dashboard/views/messages.html'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-controller=\\\"MessagesDashboardCtrl\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-init=\\\"load(tile)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-switch-when=\\\"Chart\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div id=\\\"dashboard-tile-{{$index}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-include=\\\"'/dashboard/views/chart.html'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-controller=\\\"ChartDashboardCtrl\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-init=\\\"load(tile)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-switch-when=\\\"Prescriptions\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div id=\\\"dashboard-tile-{{$index}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-include=\\\"'/dashboard/views/prescriptions.html'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-controller=\\\"PrescriptionsDashboardCtrl\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-init=\\\"load(tile)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-switch-when=\\\"Appointments\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div id=\\\"dashboard-tile-{{$index}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-include=\\\"'/dashboard/views/appointments.html'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-controller=\\\"AppointmentsDashboardCtrl\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-init=\\\"load(tile)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-switch-when=\\\"Billing\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div id=\\\"dashboard-tile-{{$index}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-include=\\\"'/dashboard/views/billing.html'\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-controller=\\\"BillingDashboardCtrl\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     ng-init=\\\"load(tile)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'An error has occurred and the patient dashboard could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'You do not have access to the patient dashboard.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-if=\\\"(!activeTiles || !activeTiles.length)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"panel panel-default panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"panel-body text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <uib-alert type=\\\"warning\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{::'Your dashboard does not have any tiles configured.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/dashboard/views/forms.html',\r\n    \"<div class=\\\"row\\\" ng-cloak ng-if=\\\"incompleteFormsList.length || practiceFormsList.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel panel-tile panel-flush rounded-corner-sm\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-heading tile-rounded-corner-top\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 hm-propagation=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 ng-click=\\\"updateCollapseState()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 ng-class=\\\"{'tile-rounded-corner-bottom': tile.IsCollapsed}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"pull-right panel-collapser clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-if=\\\"tile.IsCollapsed\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-expand\\\" alt=\\\"tile-expand\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-if=\\\"!tile.IsCollapsed\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-collapse\\\" alt=\\\"tile-collapse\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"pull-right ng-hide\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ap-spinner></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-default2 visible-xs visible-sm pull-right-inline\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        hm-stop-propagation=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        data-transition-to=\\\"{appRoute: 'forms'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'View' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-default2 hidden-xs hidden-sm pull-right-inline\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        hm-stop-propagation=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        data-transition-to=\\\"{appRoute: 'forms'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'View Forms' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-title clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <img src=\\\"images/spacer.png\\\" class=\\\"tile-icon forms-selected\\\" alt=\\\"forms-selected\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{ ::'FORM UPDATES' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div uib-collapse=\\\"tile.IsCollapsed\\\" class=\\\"panel-dashboard-tile-content-area\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div id=\\\"forms-questionnaires-div\\\" ng-if=\\\"incompleteFormsList.length\\\" ng-class=\\\"(practiceFormsList.length) ? 'ap-margin-bottom-20' : ''\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"panel-subheading-dashboard\\\">{{::'Incomplete Questionnaires' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"row panel-row\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             id=\\\"form-{{incompleteForm.QuestionnaireId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             ng-repeat=\\\"incompleteForm in incompleteFormsList track by $index\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div>{{ incompleteForm.QuestionnaireName }}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <!--<div>-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <!--{{ ::'Last Edited' | translate }}-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <!--<ap-date-formatter date=\\\"{{incompleteForm.LastModifiedByPatient}}\\\" format=\\\"monthname-dayofmonth\\\"></ap-date-formatter>-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <!--<span class=\\\"ap-dashboard-form-datetime-separator\\\">*</span>-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <!--<ap-date-formatter date=\\\"{{incompleteForm.LastModifiedByPatient}}\\\" format=\\\"time\\\"></ap-date-formatter>-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                <!--</div>-->\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{::'Assigned' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <ap-date-formatter date=\\\"{{incompleteForm.EffectDate}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       format=\\\"long-date\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"!incompleteForm.LastModifiedByPatient\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{::'New' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"incompleteForm.LastModifiedByPatient\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div>{{::'In Progress' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{::'Last Edited' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <ap-date-formatter date=\\\"{{incompleteForm.LastModifiedByPatient}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                       format=\\\"date-time\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <button\\r\" +\r\n    \"\\n\" +\r\n    \"                                        class=\\\"btn btn-default1 pull-right\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        data-toggle=\\\"modal\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-click=\\\"openPatientQuestionnaire(incompleteForm)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{::'Complete Form' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div id=\\\"forms-practiceforms-div\\\" ng-if=\\\"practiceFormsList.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"panel-subheading-dashboard\\\">{{::'New Practice Forms' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"row panel-row clickable\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             id=\\\"practice-form-{{practiceForm.RelPracticeFormPatientId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             ng-repeat=\\\"practiceForm in practiceFormsList track by $index\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             ng-click=\\\"displayForms()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-9\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"overflow-ellipsis column-text\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{practiceForm.PracticeFormName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"overflow-ellipsis column-subtext\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span>{{practiceForm.AttachmentTypeName}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span class=\\\"pull-right\\\" ap-date-formatter date=\\\"{{practiceForm.EffectDate}}\\\" format=\\\"date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span class=\\\"pull-right\\\" ap-date-formatter date=\\\"{{practiceForm.EffectDate}}\\\" format=\\\"time\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'An error has occurred and the Forms dashboard tile could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'You do not have access to the Forms dashboard tile.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/dashboard/views/messages.html',\r\n    \"<div class=\\\"row\\\" ng-cloak ng-if=\\\"messages.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel panel-tile panel-flush rounded-corner-sm\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-heading tile-rounded-corner-top\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 hm-propagation=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 ng-click=\\\"updateCollapseState()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 ng-class=\\\"{'tile-rounded-corner-bottom': tile.IsCollapsed}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"pull-right panel-collapser clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-if=\\\"tile.IsCollapsed\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-expand\\\" alt=\\\"tile-expand\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-if=\\\"!tile.IsCollapsed\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-collapse\\\" alt=\\\"tile-collapse\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"pull-right ng-hide\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ap-spinner></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-default2 visible-xs visible-sm pull-right-inline\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        hm-stop-propagation=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        data-transition-to=\\\"{appRoute: 'myMessagesMobile', opts: {folder: 'inbox'}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'View' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-default2 hidden-xs hidden-sm pull-right-inline\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        hm-stop-propagation=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        data-transition-to=\\\"{appRoute: 'myMessagesDisplayMessages', opts: {displayMode: 'received'}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'View Messages' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-title clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <img src=\\\"images/spacer.png\\\" class=\\\"tile-icon messages-selected\\\" alt=\\\"messages-selected\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{ ::'NEW MESSAGES' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div uib-collapse=\\\"tile.IsCollapsed\\\" class=\\\"panel-dashboard-tile-content-area\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div id=\\\"no-messages-div\\\" ng-if=\\\"!messages.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'No new messages were found.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row panel-row clickable\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                         id=\\\"message-{{msg.MessageId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                         ng-repeat=\\\"msg in messages\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                         ng-click=\\\"displayMessageThread(msg)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-9\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"ap-dashboard-message\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <img class=\\\"ap-dashboard-message-photo extra-dark-grey-border border-width-md rounded-corner-md\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                     lazy-src=\\\"{{::thumbnailSrc}}\\\" endpoint-base='patient'>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"ap-dashboard-message-text\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <p class=\\\"ap-dashboard-message-text-row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <span ng-if=\\\"msg.FromName !== null\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{msg.FromName}}&nbsp;&nbsp;|&nbsp;&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{msg.MessageHeaderText}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <p class=\\\"ap-dashboard-message-text-row\\\" ng-bind-html=\\\"msg.MessageBodyText\\\"></p>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <span class=\\\"pull-right\\\" ap-date-formatter date=\\\"{{msg.CreateDateTime}}\\\" format=\\\"date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <span class=\\\"pull-right\\\" ap-date-formatter date=\\\"{{msg.CreateDateTime}}\\\" format=\\\"time\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'An error has occurred and the New Messages dashboard tile could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'You do not have access to the New Messages dashboard tile.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/dashboard/views/prescriptions.html',\r\n    \"<div class=\\\"row\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-12 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel panel-tile panel-flush rounded-corner-sm\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-heading tile-rounded-corner-top\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 hm-propagation=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 ng-click=\\\"updateCollapseState()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 ng-class=\\\"{'tile-rounded-corner-bottom': tile.IsCollapsed}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"pull-right panel-collapser clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <!--<span ng-class=\\\"{'ap-chevron-down-blue': tile.IsCollapsed, 'ap-chevron-up-blue': !tile.IsCollapsed}\\\"></span>-->\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-if=\\\"tile.IsCollapsed\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-expand\\\" alt=\\\"tile-expand\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span ng-if=\\\"!tile.IsCollapsed\\\"><img src=\\\"images/spacer.png\\\" class=\\\"tile-arrow tile-collapse\\\" alt=\\\"tile-collapse\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"pull-right ng-hide\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ap-spinner></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-default2 visible-xs visible-sm pull-right-inline\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        hm-stop-propagation=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        data-transition-to=\\\"{appRoute: 'prescriptionsMobile'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'View' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-default2 hidden-xs hidden-sm pull-right-inline\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        hm-stop-propagation=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        data-transition-to=\\\"{appRoute: 'prescriptions'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'View Prescriptions' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-title clickable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <img src=\\\"images/spacer.png\\\" class=\\\"tile-icon prescriptions-selected\\\" alt=\\\"prescriptions-selected\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{ ::'RECENT PRESCRIPTIONS' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div uib-collapse=\\\"tile.IsCollapsed\\\" class=\\\"panel-dashboard-tile-content-area\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div id=\\\"no-medications-div\\\" ng-if=\\\"!medicationsExist\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'No recent prescriptions were found.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div id=\\\"medication-{{med.RelPatientMedicationId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                         class=\\\"row panel-row\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                         ng-repeat=\\\"med in currentPrescriptions\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-xs-flush col-md-5\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::med.DrugName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12 smaller\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::med.Instructions}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-md-4 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row-item col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-2 smaller\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{::'Start' | translate}}&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-10\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span ap-date-formatter date=\\\"{{::med.StartDate}}\\\" format=\\\"long-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row-item col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-2 smaller\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{::'End' | translate}}&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-10\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span ap-date-formatter date=\\\"{{::med.EndDate}}\\\" format=\\\"long-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-md-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"pull-right\\\" ng-if=\\\"!med.RefillRequestPending && !med.IsDiscontinued && med.ProviderId\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <button class=\\\"btn btn-lg-height btn-default1\\\" ng-click=\\\"medSelect(med)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        data-transition-to=\\\"{appRoute: 'rxrefill'}\\\">{{'Request Refill' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"pull-right\\\" ng-if=\\\"med.IsDiscontinued\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"btn-height flexbox flexbox-horizontal-center\\\"><span\\r\" +\r\n    \"\\n\" +\r\n    \"                                        class=\\\"btn-width pending text-center\\\">{{'Discontinued' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"pull-right\\\" ng-if=\\\"med.RefillRequestPending\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <button class=\\\"btn btn-lg-height btn-default1 btn-minpadding\\\" ng-click=\\\"medSelect(med)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        data-transition-to=\\\"{appRoute: 'rxrefill'}\\\"><span class=\\\"lime-green\\\">{{'Refill Requested' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"pending text-center\\\">{{'Pending Review' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"pull-right\\\" ng-if=\\\"!med.ProviderId\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"btn-height flexbox flexbox-horizontal-center\\\"><span\\r\" +\r\n    \"\\n\" +\r\n    \"                                        class=\\\"btn-width pending text-center\\\">{{'Please contact office to process.' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'An error has occurred and the Recent Prescriptions dashboard tile could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'You do not have access to the Recent Prescriptions dashboard tile.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\n}]);\n","angular.module('dashboard').controller('AlertsDashboardCtrl',\r\n    ['$scope', '$q', 'TransitionManager', 'MyMessagesService', 'MyChartService', 'DashboardService', 'PatientPortalStorageRepository', 'PatientSettingsRepository',\r\n        function ($scope, $q, TransitionManager, MyMessagesService, MyChartService, DashboardService, PatientPortalStorageRepository, PatientSettingsRepository) {\r\n\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n\r\n            $scope.thumbnailSrc = MyChartService.getMaleThumbnailSrc(50,50);\r\n            $scope.labs = null;\r\n            $scope.messages = null;\r\n            $scope.myChart = {'Config': ''};\r\n            $scope.displayLabResults = PatientSettingsRepository.getFeatureList().ViewLabTestResults.IsActive;\r\n            $scope.displayMessages = PatientSettingsRepository.getFeatureList().SendReceiveMessages.IsActive;\r\n\r\n            var activePatientId = PatientPortalStorageRepository.getActivePatient().id;\r\n\r\n            function getNewLabResults() {\r\n                return MyChartService\r\n                    .getNewLabResults(activePatientId)\r\n                    .then(function (data) {\r\n                        $scope.labs = data;\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    });\r\n            }\r\n\r\n            function getMyChartConfig() {\r\n                return MyChartService\r\n                    .getMyChartConfig()\r\n                    .then(function (config) {\r\n                        $scope.myChart.Config = config;\r\n                    });\r\n            }\r\n\r\n            function getNewMessages() {\r\n                return MyMessagesService\r\n                    .getNewMessages()\r\n                    .then(function (data) {\r\n                        $scope.messages = data;\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    });\r\n            }\r\n\r\n\r\n            $scope.load = function(tile) {\r\n                $scope.tile = tile;\r\n\r\n                loadPage();\r\n            };\r\n\r\n            function loadPage() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n                activePatientId = PatientPortalStorageRepository.getActivePatient().id;\r\n\r\n                var messagesPromise = getNewMessages();\r\n                var labsPromise = getNewLabResults();\r\n                var chartConfigPromise = getMyChartConfig();\r\n\r\n                $q.all([messagesPromise, labsPromise, chartConfigPromise]).then(function () {\r\n                    $scope.loading = false;\r\n                });\r\n            }\r\n\r\n            $scope.updateCollapseState = function updateCollapseState()\r\n            {\r\n                $scope.tile.IsCollapsed = !$scope.tile.IsCollapsed;\r\n                DashboardService.setPatientDashboardTileState($scope.tile);\r\n            };\r\n\r\n            $scope.displayAlertMessageThread = function displayAlertMessageThread(message) {\r\n                TransitionManager.transition({appRoute: 'myMessagesDisplayMessageThread', opts: {displayMode: 'received', id: message.MessageId, updateNotification: message.NewMessage}});\r\n            };\r\n\r\n            $scope.displayAlertMyChartLabs = function displayAlertMyChartLabs() {\r\n                TransitionManager.transition({appRoute: $scope.myChart.Config.ViewLabResults.Route, opts: {id: activePatientId}});\r\n            };\r\n\r\n        }\r\n    ]\r\n);","angular.module('dashboard').controller('AppointmentsDashboardCtrl',\r\n    ['$scope', 'MyAppointmentsRepository', 'MyAppointmentsService', 'DashboardService', 'NotificationService', 'toaster', 'aprgettext', 'PatientPortalStorageRepository', 'PatientSettingsService',\r\n        function ($scope, MyAppointmentsRepository, MyAppointmentsService, DashboardService, NotificationService, toaster, gettext, PatientPortalStorageRepository, PatientSettingsService) {\r\n\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n            $scope.appointments = [];\r\n            var activePatientId = PatientPortalStorageRepository.getActivePatient().id;\r\n            $scope.limitTo = 100;\r\n\r\n            var featureList = PatientSettingsService.getPatientFeatures();\r\n            $scope.canCheckInFeature = featureList.CheckIn.IsActive;\r\n\r\n\r\n            function createAppointmentLists(appointments) {\r\n                $scope.appointments = _(appointments)\r\n                    .forEach(function (item) {\r\n                        item.CanReschedule = false;\r\n\r\n                        // Can check in 1 hour early to 1 hour late\r\n                        // Appointment Status cannot be Canceled, Discharged or Checked In\r\n                        item.CanCheckIn = false;\r\n                        item.CanCancel = !(MyAppointmentsService.isCheckIn(item.AppointmentStatus.Id) || item.AppointmentStatus.IsCanceledStatus || MyAppointmentsService.isDischarged(item.AppointmentStatus.Id));\r\n                        if (moment(item.StartDateTime).isBetween(moment().subtract(1, 'hours'), moment().add(1, 'hours'))) {\r\n                            if (item.CanCancel)  {\r\n                                item.CanCheckIn = true;\r\n                            }\r\n                        }\r\n\r\n                        item.IsAppointmentToday = false;\r\n                        if (MyAppointmentsService.isAppointmentToday(item.StartDateTime)) {\r\n                            item.IsAppointmentToday = true;\r\n                        }\r\n\r\n                    });\r\n            }\r\n\r\n            $scope.load = function load(tile) {\r\n                $scope.tile = tile;\r\n                loadPage();\r\n            };\r\n\r\n            function loadPage() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n\r\n                var searchFilter = {\r\n                    StartDate: moment().format('MM/DD/YYYY'),\r\n                    EndDate: '12/31/9999',\r\n                    SortDirection: 'asc',\r\n                    FetchLimit: 250\r\n                };\r\n\r\n                MyAppointmentsRepository\r\n                    .getAppointments(activePatientId, searchFilter)\r\n                    .then(function (data) {\r\n                        createAppointmentLists(data);\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n\r\n\r\n            $scope.appointmentCheckIn = function appointmentCheckIn(appointment) {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n\r\n                MyAppointmentsRepository\r\n                    .changeAppointmentStatus(appointment.PatientId, appointment.AppointmentId, 'CD2A0578-0C89-4151-B4E9-66ED9D5B4995')\r\n                    .then(function () {\r\n                        toaster.pop('success', '', gettext('Appointment check in is successful.'));\r\n                        NotificationService.updateNotifications();\r\n                        loadPage();\r\n                    })\r\n                    .catch(function () {\r\n                        toaster.pop('error', '', gettext('An error occurred updating the appointment.'));\r\n                    })\r\n                    .finally(function() {\r\n                        $scope.loading = false;\r\n                    });\r\n            };\r\n\r\n\r\n            $scope.updateCollapseState = function updateCollapseState()\r\n            {\r\n                $scope.tile.IsCollapsed = !$scope.tile.IsCollapsed;\r\n                DashboardService.setPatientDashboardTileState($scope.tile);\r\n            };\r\n\r\n\r\n            //$scope.appointmentCancel = function appointmentCancel(appointment) {\r\n            //    alert('Cancel appointment not implemented, yet.  ' + appointment);\r\n            //};\r\n\r\n        }\r\n    ]\r\n);","angular.module('dashboard').controller('BillingDashboardCtrl',\r\n                ['$scope', 'BillingService', 'DashboardService', 'TransitionManager', 'PatientPortalStorageRepository',\r\n        function ($scope,   BillingService,   DashboardService,   TransitionManager,   PatientPortalStorageRepository) {\r\n\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n\r\n            $scope.makeAPaymentButtonEnabled = false;\r\n            $scope.model = {\r\n                Date: '',\r\n                PersonBalanceAll: '',\r\n                ConsentAnnual: '',\r\n                owesUsMoney: false\r\n            };\r\n\r\n            var loginUserId = PatientPortalStorageRepository.getLoginUser().id;\r\n\r\n            $scope.load = function (tile) {\r\n                $scope.loading = true;\r\n                $scope.tile = tile;\r\n\r\n                loadPage();\r\n            };\r\n\r\n            function loadPage() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n                loginUserId = PatientPortalStorageRepository.getLoginUser().id;\r\n\r\n                var requestDto = {\r\n                    LoginUserPatientId: loginUserId,\r\n                    RemoteSessionId: loginUserId + new Date().toLocaleDateString()\r\n                };\r\n\r\n                BillingService.getBillingAccount(requestDto)\r\n                    .then(function (billingAccountDto) {\r\n                        $scope.model.PersonBalanceAll = billingAccountDto.PersonBalanceAll;\r\n                        $scope.model.owesUsMoney = $scope.model.PersonBalanceAll > 0;\r\n                        $scope.model.Date = billingAccountDto.Date;\r\n                        $scope.model.ConsentAnnual = billingAccountDto.ConsentAnnual;\r\n                        $scope.model.DepositByFinancialCenterEnabled = billingAccountDto.DepositByFinancialCenterEnabled;\r\n                        $scope.model.MerchantIdByFinancialCenterEnabled = billingAccountDto.MerchantIdByFinancialCenterEnabled;\r\n                        $scope.model.DefaultMerchantId = billingAccountDto.DefaultMerchantId;\r\n                        $scope.model.FinancialCenterBalances = billingAccountDto.FinancialCenterBalances;\r\n                        $scope.model.ShowMultipleFinancialCenters = (!!$scope.model.FinancialCenterBalances && $scope.model.FinancialCenterBalances.length > 1);\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.makeAPaymentButtonEnabled = BillingService.getViewMakeAPaymentFeatureFlag();\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n\r\n            function makeSpecificOnlinePayment(balance) {\r\n                if ($scope.model.ConsentAnnual && $scope.model.ConsentAnnual.CardType) {\r\n                    if($scope.statementsOnly) {\r\n                        TransitionManager.transition({appRoute: 'paymentOptionsStatementsOnly',\r\n                            opts: {amount: balance.Balance, merchantId: balance.MerchantId, financialCenterUid: balance.FinancialCenterUid }});\r\n                    } else {\r\n                        TransitionManager.transition({appRoute: 'paymentOptions',\r\n                            opts: {amount: balance.Balance, merchantId: balance.MerchantId, financialCenterUid: balance.FinancialCenterUid }});\r\n                    }\r\n                } else {\r\n                    if($scope.statementsOnly) {\r\n                        TransitionManager.transition({appRoute: 'paymentFromNewCardStatementsOnly',\r\n                            opts: {amount: balance.Balance, merchantId: balance.MerchantId, financialCenterUid: balance.FinancialCenterUid }});\r\n                    } else {\r\n                        TransitionManager.transition({\r\n                            appRoute: 'paymentFromNewCard',\r\n                            opts: {amount: balance.Balance, merchantId: balance.MerchantId, financialCenterUid: balance.FinancialCenterUid }\r\n                        });\r\n                    }\r\n                }\r\n            }\r\n\r\n            function makeGenericOnlinePayment() {\r\n                if ($scope.model.ConsentAnnual && $scope.model.ConsentAnnual.CardType) {\r\n                    if($scope.statementsOnly) {\r\n                        TransitionManager.transition({appRoute: 'paymentOptionsStatementsOnly', opts: {amount: $scope.model.PersonBalanceAll, merchantId: $scope.model.DefaultMerchantId, financialCenterUid: $scope.model.FinancialCenterUid }});\r\n                    } else {\r\n                        TransitionManager.transition({appRoute: 'paymentOptions', opts: {amount: $scope.model.PersonBalanceAll, merchantId: $scope.model.DefaultMerchantId, financialCenterUid: $scope.model.FinancialCenterUid }});\r\n                    }\r\n                } else {\r\n                    if($scope.statementsOnly) {\r\n                        TransitionManager.transition({appRoute: 'paymentFromNewCardStatementsOnly', opts: {amount: $scope.model.PersonBalanceAll, merchantId: $scope.model.DefaultMerchantId, financialCenterUid: $scope.model.FinancialCenterUid }});\r\n                    } else {\r\n                        TransitionManager.transition({appRoute: 'paymentFromNewCard', opts: {amount: $scope.model.PersonBalanceAll, merchantId: $scope.model.DefaultMerchantId, financialCenterUid: $scope.model.FinancialCenterUid }});\r\n                    }\r\n                }\r\n            }\r\n\r\n            $scope.updateCollapseState = function updateCollapseState() {\r\n                $scope.tile.IsCollapsed = !$scope.tile.IsCollapsed;\r\n                DashboardService.setPatientDashboardTileState($scope.tile);\r\n            };\r\n            $scope.makeSpecificOnlinePayment = makeSpecificOnlinePayment;\r\n            $scope.makeGenericOnlinePayment = makeGenericOnlinePayment;\r\n        }\r\n    ]\r\n);","angular.module('dashboard').controller('ChartDashboardCtrl',\r\n    ['$scope', '$q', 'TransitionManager', 'MyChartService', 'DashboardService', 'PatientPortalStorageRepository',\r\n        function ($scope, $q, TransitionManager, MyChartService, DashboardService, PatientPortalStorageRepository) {\r\n\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n\r\n            $scope.labs = null;\r\n            $scope.myChart = {'Config': ''};\r\n\r\n            var activePatientId = PatientPortalStorageRepository.getActivePatient().id;\r\n\r\n            function getNewLabResults() {\r\n                return MyChartService\r\n                    .getNewLabResults(activePatientId)\r\n                    .then(function (data) {\r\n                        $scope.labs = data;\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    });\r\n            }\r\n\r\n            function getMyChartConfig() {\r\n                return MyChartService\r\n                    .getMyChartConfig()\r\n                    .then(function (config) {\r\n                        $scope.myChart.Config = config;\r\n                    });\r\n            }\r\n\r\n            $scope.load = function(tile) {\r\n                $scope.tile = tile;\r\n\r\n                loadPage();\r\n            };\r\n\r\n            function loadPage() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n\r\n                activePatientId = PatientPortalStorageRepository.getActivePatient().id;\r\n                var labsPromise = getNewLabResults();\r\n                var chartConfigPromise = getMyChartConfig();\r\n\r\n                $q.all([labsPromise, chartConfigPromise]).then(function () {\r\n                    $scope.loading = false;\r\n                });\r\n            }\r\n\r\n            $scope.updateCollapseState = function updateCollapseState()\r\n            {\r\n                $scope.tile.IsCollapsed = !$scope.tile.IsCollapsed;\r\n                DashboardService.setPatientDashboardTileState($scope.tile);\r\n            };\r\n\r\n            $scope.displayMyChartLabs = function displayMyChartLabs() {\r\n                TransitionManager.transition({appRoute: $scope.myChart.Config.ViewLabResults.Route, opts: {id: activePatientId}});\r\n            };\r\n        }\r\n    ]\r\n);","angular.module('dashboard').controller('DashboardCtrl',\r\n    ['$scope', '$uibModal', 'DashboardService', 'MyChartService', 'PatientPortalStorageRepository', 'ApPersonalHealthAppsModalService',\r\n        function ($scope, $modal, DashboardService, MyChartService, PatientPortalStorageRepository, ApPersonalHealthAppsModalService) {\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n            $scope.showLinkPersonalHealthApp = true;\r\n\r\n            $scope.today = new Date();\r\n\r\n            var baseId = 'dashboard';\r\n            var isPatientRegisteredForFHIR = false;\r\n            var patientId = '';\r\n\r\n            function loadPage() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n                var activePatient = PatientPortalStorageRepository.getActivePatient();\r\n                patientId = activePatient.id;\r\n                isPatientRegisteredForFHIR = false;\r\n\r\n                $scope.activeTiles = _(DashboardService.getPatientDashboardFeatures())\r\n                    .filter('IsActive')\r\n                    .sortBy('DisplayOrder')\r\n                    .value();\r\n\r\n                MyChartService.getDetails(activePatient.id)\r\n                    .then(function (data) {\r\n                        $scope.patient = {\r\n                            userId: activePatient.id,\r\n                            name: activePatient.fullName,\r\n                            birthDate: data.DateOfBirth,\r\n                            providerName: data.PrimaryProviderName,\r\n                            serviceSite: data.PrimaryProviderServiceSite,\r\n                            serviceSitePhoneNumber: data.PrimaryProviderServiceSitePhoneNumber,\r\n                            serviceSiteAddress1: data.PrimaryProviderServiceSiteAddress1,\r\n                            serviceSiteAddress2: data.PrimaryProviderServiceSiteAddress2,\r\n                            serviceSiteLocation: data.PrimaryProviderServiceSiteLocation\r\n                        };\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n            loadPage();\r\n            $scope.showPersonalHealthAppModal = showPersonalHealthAppModal;\r\n\r\n            var notificationListener = $scope.$on('Notification:updated', function () {\r\n                loadPage();\r\n            });\r\n\r\n            $scope.$on('$destroy', function () {\r\n                notificationListener();\r\n            });\r\n\r\n            function showPersonalHealthAppModal() {\r\n                ApPersonalHealthAppsModalService.openModal(baseId, patientId, isPatientRegisteredForFHIR)\r\n                    .then(function(result) {\r\n                        if (result.isSuccess) {\r\n                            isPatientRegisteredForFHIR = result.resultValue;\r\n                        }\r\n                    });\r\n            }\r\n        }\r\n    ]\r\n);","angular.module('dashboard').controller('FormsDashboardCtrl',\r\n    ['$scope', '$q', 'TransitionManager', 'FormsRepository', 'DashboardService', 'PatientPortalStorageRepository',\r\n        function ($scope, $q, TransitionManager, FormsRepository, DashboardService, PatientPortalStorageRepository) {\r\n\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n\r\n            $scope.incompleteFormsList = null;\r\n            $scope.practiceFormsList = null;\r\n\r\n            var activePatientId = PatientPortalStorageRepository.getActivePatient().id;\r\n\r\n            function getAssignedQuestionnaires() {\r\n                return FormsRepository\r\n                    .getAssignedQuestionnaires(activePatientId)\r\n                    .then(function (data) {\r\n                        var assignedForms = data;\r\n\r\n                        $scope.incompleteFormsList = _(assignedForms)\r\n                            .filter({'IsComplete' : false})\r\n                            .sortBy('PercentComplete')\r\n                            .value();\r\n                    });\r\n            }\r\n\r\n            function getAssignedPracticeForms() {\r\n                var searchCriteria = {\r\n                    IncludeOnlyUnviewedForms : true\r\n                };\r\n\r\n                return FormsRepository\r\n                    .getAssignedPracticeForms(activePatientId, searchCriteria)\r\n                    .then(function (data) {\r\n                        $scope.practiceFormsList = data;\r\n                    });\r\n            }\r\n\r\n            $scope.load = function(tile) {\r\n                $scope.tile = tile;\r\n\r\n                loadPage();\r\n            };\r\n\r\n            function loadPage() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n                activePatientId = PatientPortalStorageRepository.getActivePatient().id;\r\n\r\n                var assignedQuestionnairesPromise = getAssignedQuestionnaires();\r\n                var assignedPracticeFormsPromise = getAssignedPracticeForms();\r\n\r\n                $q.all([assignedQuestionnairesPromise, assignedPracticeFormsPromise]).then(function() {\r\n                    $scope.loading = false;\r\n                })\r\n                .catch(function (response) {\r\n                    $scope.addHttpError(response);\r\n                });\r\n            }\r\n\r\n            function displayForms() {\r\n                TransitionManager.transition({appRoute: 'forms'});\r\n            }\r\n\r\n            function updateCollapseState()\r\n            {\r\n                $scope.tile.IsCollapsed = !$scope.tile.IsCollapsed;\r\n                DashboardService.setPatientDashboardTileState($scope.tile);\r\n            }\r\n\r\n            function openPatientQuestionnaire(form) {\r\n                TransitionManager.transition({appRoute: 'patientQuestionnaire', opts: {relSurveyPatientId: form.RelSurveyPatientId, patientId: form.PatientId, questionnaireId: form.QuestionnaireId}});\r\n            }\r\n\r\n\r\n            $scope.updateCollapseState = updateCollapseState;\r\n            $scope.displayForms = displayForms;\r\n            $scope.openPatientQuestionnaire = openPatientQuestionnaire;\r\n        }\r\n    ]\r\n);","angular.module('dashboard').controller('MessagesDashboardCtrl',\r\n    ['$scope', '$q', 'TransitionManager', 'MyMessagesService', 'MyChartService', 'DashboardService',\r\n        function ($scope, $q, TransitionManager, MyMessagesService, MyChartService, DashboardService) {\r\n\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n\r\n            $scope.thumbnailSrc = MyChartService.getMaleThumbnailSrc(50,50);\r\n            $scope.messages = null;\r\n            $scope.myChart = {'Config': ''};\r\n\r\n\r\n            function getMyChartConfig() {\r\n                return MyChartService\r\n                    .getMyChartConfig()\r\n                    .then(function (config) {\r\n                        $scope.myChart.Config = config;\r\n                    });\r\n            }\r\n\r\n            function getNewMessages() {\r\n                return MyMessagesService\r\n                    .getNewMessages()\r\n                    .then(function (data) {\r\n                        $scope.messages = data;\r\n                    });\r\n            }\r\n\r\n            $scope.load = function(tile) {\r\n                $scope.tile = tile;\r\n\r\n                loadPage();\r\n            };\r\n\r\n            function loadPage() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n                var messagesPromise = getNewMessages();\r\n                var chartConfigPromise = getMyChartConfig();\r\n\r\n                $q.all([messagesPromise, chartConfigPromise]).catch(function (response) {\r\n                    $scope.addHttpError(response);\r\n                }).finally(function () {\r\n                    $scope.loading = false;\r\n                });\r\n            }\r\n\r\n            $scope.updateCollapseState = function updateCollapseState()\r\n            {\r\n                $scope.tile.IsCollapsed = !$scope.tile.IsCollapsed;\r\n                DashboardService.setPatientDashboardTileState($scope.tile);\r\n            };\r\n\r\n            $scope.displayMessageThread = function displayMessageThread(message) {\r\n                TransitionManager.transition({appRoute: 'myMessagesDisplayMessageThread', opts: {displayMode: 'received', id: message.MessageId, updateNotification: message.NewMessage}});\r\n            };\r\n\r\n        }\r\n    ]\r\n);","angular.module('dashboard').controller('PrescriptionsDashboardCtrl',\r\n    ['$scope', 'RxRefillRepository', 'PatientPortalStorageRepository', 'PrescriptionService', 'DashboardService',\r\n        function ($scope, RxRefillRepository, PatientPortalStorageRepository, PrescriptionService, DashboardService) {\r\n\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n            \r\n            $scope.load = function(tile) {\r\n                $scope.tile = tile;\r\n\r\n                loadPage();\r\n            };\r\n\r\n            function loadPage() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n                var activePatientId = PatientPortalStorageRepository.getActivePatient().id;\r\n\r\n                RxRefillRepository\r\n                    .getRxRefills(activePatientId, true)\r\n                    .then(function (data) {\r\n                        //prescriptions.html\r\n                        var splitPrescriptions = _.partition(data.Medications, function (item) {\r\n                            return PrescriptionService.dateFilter(item.EndDate, PrescriptionService.medFilters[1].Days);\r\n                        });\r\n                        $scope.currentPrescriptions = splitPrescriptions[0];\r\n                        $scope.previousPrescriptions = splitPrescriptions[1];\r\n                        \r\n                        $scope.medicationsExist = $scope.currentPrescriptions ? !!$scope.currentPrescriptions.length : false;\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n\r\n            $scope.medSelect = function medSelect(med) {\r\n                PrescriptionService.setSelectedMedId(med.RelPatientMedicationId);\r\n            };\r\n\r\n            $scope.updateCollapseState = function updateCollapseState() {\r\n                $scope.tile.IsCollapsed = !$scope.tile.IsCollapsed;\r\n                DashboardService.setPatientDashboardTileState($scope.tile);\r\n            };\r\n\r\n        }\r\n    ]\r\n);","angular.module('dashboard').factory('DashboardRepository',\r\n    ['AprimaRestangular', 'storage',\r\n        function (AprimaRestangular, storage) {\r\n            'use strict';\r\n\r\n            var patientDashboardFeatures = function() {\r\n                return AprimaRestangular.get('patient').one('settings/dashboardsettings/').get();\r\n            };\r\n            var setDashboardFeatureList = function (value){\r\n                return storage.set('dashboardFeatureList', value);\r\n            };\r\n            var getDashboardFeatureList = function () {\r\n                return storage.get('dashboardFeatureList');\r\n            };\r\n\r\n            return{\r\n                patientDashboardFeatures: patientDashboardFeatures,\r\n                setDashboardFeatureList: setDashboardFeatureList,\r\n                getDashboardFeatureList: getDashboardFeatureList\r\n            };\r\n    }]);","angular.module('dashboard').factory('DashboardService',\r\n    ['DashboardRepository',\r\n        function(DashboardRepository) {\r\n            'use strict';\r\n\r\n            var loadPatientDashboardFeatures = function () {\r\n                return DashboardRepository\r\n                    .patientDashboardFeatures()\r\n                    .then(function (repositorySettings) {\r\n                        var localSettings = DashboardRepository.getDashboardFeatureList();\r\n                        if (!localSettings) {\r\n                            DashboardRepository.setDashboardFeatureList(repositorySettings);\r\n                        }\r\n                        else {\r\n                            var updatedRepositorySettings = _(repositorySettings)\r\n                                .forEach(function (repositoryItem) {\r\n                                    var localSettingsItem = _.find(localSettings, {Id: repositoryItem.Id});\r\n                                    if (localSettingsItem) {\r\n                                        repositoryItem.IsCollapsed = localSettingsItem.IsCollapsed;\r\n                                    }\r\n                                });\r\n\r\n                            DashboardRepository.setDashboardFeatureList(updatedRepositorySettings);\r\n                        }\r\n                    });\r\n            };\r\n\r\n            var setPatientDashboardTileState = function (dashboardTile) {\r\n                if (dashboardTile) {\r\n                    var localSettings = DashboardRepository.getDashboardFeatureList();\r\n\r\n                    if (localSettings) {\r\n                        var localSettingsItem = _.find(localSettings, {Id: dashboardTile.Id});\r\n\r\n                        if (localSettingsItem) {\r\n                            localSettingsItem.IsCollapsed = dashboardTile.IsCollapsed;\r\n                            DashboardRepository.setDashboardFeatureList(localSettings);\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n\r\n            var getPatientDashboardFeatures = function (){\r\n                return DashboardRepository.getDashboardFeatureList();\r\n            };\r\n\r\n            var setPatientDashboardFeatures = function (dashboardSettings) {\r\n                DashboardRepository.setDashboardFeatureList(dashboardSettings);\r\n            };\r\n\r\n            return {\r\n                loadPatientDashboardFeatures: loadPatientDashboardFeatures,\r\n                getPatientDashboardFeatures: getPatientDashboardFeatures,\r\n                setPatientDashboardFeatures: setPatientDashboardFeatures,\r\n                setPatientDashboardTileState: setPatientDashboardTileState\r\n            };\r\n\r\n        }\r\n    ]);","angular.module('forms', [\r\n    //third party\r\n    'angularLocalStorage',\r\n    'gettext',\r\n    'headroom',\r\n    'lodash',\r\n    'ngAnimate',\r\n    'ngTouch',\r\n    'restangular',\r\n    'toaster',\r\n    'ui.bootstrap',\r\n    'ui.router',\r\n    'apEasyScroller',\r\n    'ngMessages',\r\n\r\n    'app',\r\n\r\n    'aprima-core',\r\n    'aprima-bridge',\r\n    'aprima-config',\r\n    'aprima-legacy-common',\r\n    'aprima-provider-api',\r\n    'aprima-patient-api',\r\n    'aprima-utils'\r\n])\r\n    .constant('FormsId', {\r\n        TimeFrameId: {\r\n            Clear: '00000000-0000-0000-0000-000000000000',\r\n            Calendar: '2A65CC34-B700-4BE1-BC0C-BC3947ABDBB4',\r\n            DaysAgo: 'E21ED176-0B54-401C-9FD9-F4376AA1B8B6',\r\n            WeeksAgo: 'C887168A-B5E3-4547-B8C7-190555956062',\r\n            MonthsAgo: '10051306-DC98-45A3-B9BB-9C1C1FD06FC2',\r\n            YearsAgo: 'D903B3D9-796E-45F2-BE6F-EC676863C0B5',\r\n            Childhood: '4CE23CF0-C9BB-4016-900F-76A567A3C82C',\r\n            Teenager: '3FF31D6D-0706-429D-9ACF-C54E081ECD29',\r\n            Birth: '86317D78-C519-4FE3-8F02-B794FFB00357'\r\n        },\r\n        HistoryGroupId: {\r\n            ProblemDiagnosis: '0238A133-904E-4E49-BDBA-4EB3CB3B39A7',\r\n            Family: 'A3FAF896-B328-4364-9621-012F8C6643BB',\r\n            Immunization: '00000000-0000-0000-0000-000000000111'\r\n        },\r\n        ModalInstanceReturnId: {\r\n            Accept: 'accept',\r\n            Cancel: 'cancel'\r\n        }\r\n    });","angular.module('myappointments').config(['AppRoutesProvider', '$stateProvider', '$urlRouterProvider',\r\n    function (AppRoutesProvider, $stateProvider) {\r\n        'use strict';\r\n\r\n        var portalSettings = { toolbarItem: 'forms' };\r\n\r\n        var appRoutes = {\r\n            'forms': {\r\n                state: 'forms',\r\n                route: '/forms',\r\n                portalSettings: portalSettings\r\n            },\r\n            'completeForm': {\r\n                state: 'completeforms',\r\n                route: '/complete-form/:relSurveyPatientId?patientId?questionnaireId',\r\n                portalSettings: portalSettings\r\n            },\r\n            'confirmForm': {\r\n                state: 'confirmforms',\r\n                route: '/confirm-form/',\r\n                portalSettings: portalSettings\r\n            },\r\n            'patientQuestionnaire': {\r\n                state: 'patientquestionnaire',\r\n                route: '/patient-questionnaire/:relSurveyPatientId?patientId?questionnaireId',\r\n                portalSettings: portalSettings\r\n            }\r\n        };\r\n\r\n        AppRoutesProvider.setupAppRoutes(appRoutes);\r\n\r\n        $stateProvider\r\n            .state(appRoutes.forms.state, {\r\n                url: appRoutes.forms.route,\r\n                templateUrl: '/forms/views/forms.html',\r\n                controller: 'FormsCtrl',\r\n                description: '/forms',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Forms'); }\r\n                }\r\n            })\r\n            .state(appRoutes.completeForm.state, {\r\n                url: appRoutes.completeForm.route,\r\n                templateUrl: '/forms/views/completeForm.html',\r\n                controller: 'CompleteFormCtrl',\r\n                description: '/CompleteForm',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Forms'); }\r\n                }\r\n            })\r\n            .state(appRoutes.confirmForm.state, {\r\n                url: appRoutes.confirmForm.route,\r\n                templateUrl: '/forms/views/confirmForm.html',\r\n                controller: 'ConfirmFormCtrl',\r\n                description: '/ConfirmForm',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Forms'); }\r\n                }\r\n            })\r\n            .state(appRoutes.patientQuestionnaire.state, {\r\n                url: appRoutes.patientQuestionnaire.route,\r\n                templateUrl: '/forms/views/patientQuestionnaire.html',\r\n                controller: 'PatientQuestionnaireCtrl',\r\n                description: '/PatientQuestionnaire',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Forms'); }\r\n                }\r\n            });\r\n    }]);","angular.module('forms').run(['$templateCache', function($templateCache) {\n  'use strict';\r\n\r\n  $templateCache.put('/forms/views/completeForm.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-questionnaire\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <form name=\\\"completeQuestionnaireForm\\\" novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"!loading && !httpError\\\" class=\\\"panel-body panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"questionnaire.questionnaireDetails.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"panel-subheading-no-border-bottom\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span>{{ ::questionnaire.questionnaireName }}&nbsp;&nbsp;completeForm.hgml</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"pull-right forms-sections-navigation\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{ ::'Section' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{ questionnaireSections.currentSectionNumber }}\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{ ::'of' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{ questionnaireSections.sections.length }}\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ng-if=\\\"questionnaireSections.sections.length > 1\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <span class=\\\"clickable prev-nav\\\" ng-click=\\\"navMovePrevious()\\\">{{::'Prev' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <span ng-repeat=\\\"section in questionnaireSections.sections | filter: { Visible: true }\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span class=\\\"clickable section-numbers\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                          ng-click=\\\"displaySection(section)\\\">{{ section.SectionNumber }}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <span class=\\\"clickable next-nav\\\" type=\\\"submit\\\" ng-click=\\\"navMoveNext()\\\">{{::'Next' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <!-- <div class=\\\"forms-padding-top-10\\\"></div> -->\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{ questionnaireSections.currentSectionNumber }}.\\r\" +\r\n    \"\\n\" +\r\n    \"                        &nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{ questionnaireSections.currentSectionName }}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row row-question form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                         ng-repeat=\\\"question in questionnaireSections.sections[questionnaireSections.currentSectionNumber - 1].Questions\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                         ng-class=\\\"{ 'has-error': (completeQuestionnaireForm['SurveyQuestionId_'+question.SurveyQuestionId].$invalid\\r\" +\r\n    \"\\n\" +\r\n    \"                                                        && (completeQuestionnaireForm['SurveyQuestionId_'+question.SurveyQuestionId].$dirty\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                || completeQuestionnaireForm.isSubmitted))}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-form-question question=\\\"question\\\" form=\\\"completeQuestionnaireForm\\\"></ap-form-question>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-switch=\\\"(question.SurveyControlTypeName | uppercase)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-switch-when=\\\"RADIOBUTTON\\\" class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-4 row-answer\\\"  ng-repeat=\\\"answer in question.Answers\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <ap-form-answer-radiobutton question=\\\"question\\\" answer=\\\"answer\\\" form=\\\"completeQuestionnaireForm\\\"></ap-form-answer-radiobutton>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-switch-when=\\\"CHECKBOX\\\" class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-4 row-answer\\\"  ng-repeat=\\\"answer in question.Answers\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <ap-form-answer-checkbox question=\\\"question\\\" answer=\\\"answer\\\"></ap-form-answer-checkbox>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-switch-when=\\\"TEXT\\\" class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-12 row-answer\\\"  ng-repeat=\\\"answer in question.Answers\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <ap-form-answer-text question=\\\"question\\\" answer=\\\"answer\\\"></ap-form-answer-text>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-switch-when=\\\"TIMEFRAME\\\" class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-12 row-answer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <ap-form-answer-timeframe question=\\\"question\\\"></ap-form-answer-timeframe>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-switch-when=\\\"NUMERIC\\\" class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-12 row-answer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <ap-form-answer-numeric question=\\\"question\\\"></ap-form-answer-numeric>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-switch-when=\\\"DATE\\\" class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-12 row-answer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <ap-form-answer-date question=\\\"question\\\"></ap-form-answer-date>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"forms-footer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button id=\\\"finish-later-btn\\\" class=\\\"btn btn-default2 pull-left\\\" data-transition-to=\\\"{appRoute: 'forms'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{:: 'Finish later' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button id=\\\"next-section-btn\\\" type=\\\"submit\\\" name=\\\"next_section_btn\\\" class=\\\"btn btn-primary pull-right\\\" ng-click=\\\"navMoveNext()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Next : ' | translate}} &nbsp; {{questionnaireSections.nextSectionName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div id=\\\"no-questionnaire-details-div\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     class=\\\"text-center\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-if=\\\"!questionnaire.questionnaireDetails.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'Questionnaire was not found.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        </form>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'An error has occurred and the patient questionnaire could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'You do not have access to view patient questionnaires.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/forms/views/confirmForm.html',\r\n    \"<div class=\\\"panel panel-questionnaire\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"!loading && !httpError\\\" class=\\\"panel-body panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-heading-confirm-forms\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Your form has been submitted.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-confirm\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Thank you for filling out your ' | translate}} {{::questionnaire.questionnaireName}} {{::' form.  These details'}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-confirm\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'have been added to your account and will help us provide you' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-confirm ap-margin-bottom-30\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'more tailored care.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <button id=\\\"done-btn\\\" class=\\\"btn btn-primary\\\" data-transition-to=\\\"{appRoute: 'forms'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Done' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'An error has occurred and the patient questionnaire could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'You do not have access to view patient questionnaires.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/forms/views/directives/apFormAnswerCheckbox.html',\r\n    \"<span class=\\\"pull-left answer-control\\\" ng-init=\\\"cbControlId = 'cbSurveyAnswerId_' + answer.SurveySectionId + '_' + answer.SurveyQuestionId + '_' + answer.SurveyAnswerId\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"<!--\\r\" +\r\n    \"\\n\" +\r\n    \"    <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           type=\\\"checkbox\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           name=\\\"SurveyQuestionId_{{answer.SurveyQuestionId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           id=\\\"{{cbControlId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           ng-model=\\\"answer.SelectedAnswer\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           ng-change=\\\"answerChanged()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           ng-disabled=\\\"!question.QuestionEnabled\\\"/>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <label ng-class=\\\"(question.QuestionEnabled) ? 'control-enabled' : 'control-disabled'\\\" for=\\\"{{cbControlId}}\\\"></label>\\r\" +\r\n    \"\\n\" +\r\n    \"    <label ng-class=\\\"(question.QuestionEnabled) ? 'control-enabled' : 'control-disabled'\\\" for=\\\"{{cbControlId}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        &nbsp;&nbsp;{{answer.SurveyAnswerLabel}}\\r\" +\r\n    \"\\n\" +\r\n    \"    </label>\\r\" +\r\n    \"\\n\" +\r\n    \"-->\\r\" +\r\n    \"\\n\" +\r\n    \"    <label class=\\\"label_wrap\\\" for=\\\"{{cbControlId}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <input type=\\\"checkbox\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               name=\\\"SurveyQuestionId_{{answer.SurveyQuestionId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               id=\\\"{{cbControlId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-model=\\\"answer.SelectedAnswer\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-change=\\\"answerChanged()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-disabled=\\\"!question.QuestionEnabled\\\"/>\\r\" +\r\n    \"\\n\" +\r\n    \"        <span ng-class=\\\"(question.QuestionEnabled) ? 'control-enabled' : 'control-disabled'\\\">&nbsp;&nbsp;{{answer.SurveyAnswerLabel}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"(answer.SurveyRequiresExplanation)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"         class=\\\"answer-control-explanation\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"         ng-class=\\\"{ 'has-error' : form['SurveyQuestionId_' + answer.SurveyQuestionId + '_SurveyAnswerId_' + answer.SurveyAnswerId + '_Explanation'].$invalid && form.isSubmitted}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <textarea\\r\" +\r\n    \"\\n\" +\r\n    \"                class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                name=\\\"SurveyQuestionId_{{answer.SurveyQuestionId}}_SurveyAnswerId_{{answer.SurveyAnswerId}}_Explanation\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                id=\\\"{{cbControlId}}_Explanation\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                ng-model=\\\"answer.SurveyExplanation\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                placeholder=\\\"{{ explanationPlaceHolder.Text }}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                rows=\\\"2\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                ng-change=\\\"explanationTextChanged()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                ng-required=\\\"(answer.SelectedAnswer === true)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                ng-disabled=\\\"(answer.SelectedAnswer === false)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        </textarea>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</span>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/forms/views/directives/apFormAnswerDate.html',\r\n    \"<p class=\\\"input-group\\\" ng-init=\\\"diControlId = 'diControlId_' + question.SurveySectionId + '_' + question.SurveyQuestionId\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <input type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           name=\\\"SurveyQuestionId_{{question.SurveyQuestionId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           id=\\\"{{diControlId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           placeholder=\\\"{{:: 'Click to select date' | translate}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           ng-model=\\\"question.SelectedAnswerText\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           ng-click=\\\"openDatePicker($event)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           is-open=\\\"datePopup.Opened\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           min-date=\\\"minDate\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           max-date=\\\"maxDate\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           current-text=\\\"Today\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           clear-text=\\\"Clear\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           close-text=\\\"Close\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           show-button-bar=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           close-on-date-selection=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           on-open-focus=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           uib-datepicker-popup=\\\"MMMM dd, yyyy\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           ng-required=\\\"(question.QuestionEnabled && question.QuestionRequireAnswer)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           ng-readonly=\\\"true\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <span class=\\\"input-group-btn\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"btn btn-default\\\" ng-click=\\\"openDatePicker($event)\\\"><i class=\\\"fa fa-calendar\\\"></i></button>\\r\" +\r\n    \"\\n\" +\r\n    \"    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"</p>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/forms/views/directives/apFormAnswerNumeric.html',\r\n    \"<span ng-init=\\\"niControlId = 'niControlId_' + question.SurveySectionId + '_' + question.SurveyQuestionId\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           type=\\\"number\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           name=\\\"SurveyQuestionId_{{question.SurveyQuestionId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           id=\\\"{{niControlId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           ng-model=\\\"question.SelectedAnswerText\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           placeholder=\\\"{{ ::'Answer here' | translate}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           ng-blur=\\\"answerChanged()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           ng-required=\\\"(question.QuestionEnabled && question.QuestionRequireAnswer)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           ng-disabled=\\\"!question.QuestionEnabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"</span>\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"answer-numeric-further-information\\\">{{'Please enter a number' | translate}}</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/forms/views/directives/apFormAnswerRadiobutton.html',\r\n    \"<span class=\\\"pull-left answer-control\\\" ng-init=\\\"rbControlId = 'rbSurveyAnswerId_' + answer.SurveySectionId + '_' + answer.SurveyQuestionId + '_' + answer.SurveyAnswerId\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"<!--\\r\" +\r\n    \"\\n\" +\r\n    \"    <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           type=\\\"radio\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           name=\\\"SurveyQuestionId_{{answer.SurveyQuestionId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           id=\\\"{{rbControlId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           ng-model=\\\"question.SelectedAnswerId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           ng-value=\\\"answer.SurveyAnswerId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           ng-change=\\\"answerChanged()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           ng-required=\\\"(!question.SectionOptional && !question.QuestionOptional)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"           ng-disabled=\\\"!question.QuestionEnabled\\\"/>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <label for=\\\"{{rbControlId}}\\\" ng-class=\\\"(question.QuestionEnabled) ? 'control-enabled' : 'control-disabled'\\\"></label>\\r\" +\r\n    \"\\n\" +\r\n    \"    <label for=\\\"{{rbControlId}}\\\" ng-class=\\\"(question.QuestionEnabled) ? 'control-enabled' : 'control-disabled'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        &nbsp;&nbsp;{{answer.SurveyAnswerLabel}}\\r\" +\r\n    \"\\n\" +\r\n    \"    </label>\\r\" +\r\n    \"\\n\" +\r\n    \"-->\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"label_wrap ap-radio-wrapper ap-radio-tight\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               type=\\\"radio\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               name=\\\"SurveyQuestionId_{{answer.SurveyQuestionId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               id=\\\"{{rbControlId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-model=\\\"question.SelectedAnswerId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-value=\\\"answer.SurveyAnswerId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-change=\\\"answerChanged()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ap-required=\\\"( (question.QuestionEnabled && question.QuestionRequireAnswer) )\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-disabled=\\\"!question.QuestionEnabled\\\"/>\\r\" +\r\n    \"\\n\" +\r\n    \"        <label for=\\\"{{rbControlId}}\\\" ng-class=\\\"(question.QuestionEnabled) ? 'control-enabled' : 'control-disabled'\\\">{{answer.SurveyAnswerLabel}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"(answer.SurveyRequiresExplanation && (question.SelectedAnswerId === answer.SurveyAnswerId))\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"         class=\\\"answer-control-explanation\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"         ng-class=\\\"{ 'has-error' : !question.RequiredFieldsPopulated && form.isSubmitted}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <label hidden for=\\\"{{rbControlId}}_Explanation\\\">{{'Explanation' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"        <textarea\\r\" +\r\n    \"\\n\" +\r\n    \"            class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            name=\\\"SurveyQuestionId_{{answer.SurveyQuestionId}}_ExplanationRequired\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            id=\\\"{{rbControlId}}_Explanation\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            ng-model=\\\"answer.SurveyExplanation\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            placeholder=\\\"{{ 'Required Explanation here' | translate }}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            rows=\\\"2\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            ng-change=\\\"explanationTextChanged()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            ap-required=\\\"(question.SelectedAnswerId === answer.SurveyAnswerId) && (answer.SurveyRequiresExplanation)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"            ng-disabled=\\\"(question.SelectedAnswerId !== answer.SurveyAnswerId)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        </textarea>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</span>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/forms/views/directives/apFormAnswerText.html',\r\n    \"<span ng-init=\\\"taControlId = 'taControlId' + question.SurveySectionId + '_' + question.SurveyQuestionId\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <label hidden for=\\\"{{taControlId}}\\\">{{'Answer Here' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"    <textarea\\r\" +\r\n    \"\\n\" +\r\n    \"        class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"        name=\\\"SurveyQuestionId_{{question.SurveyQuestionId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"        id=\\\"{{taControlId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"        ng-model=\\\"question.SelectedAnswerText\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"        placeholder=\\\"{{ ::'Answer here' | translate}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"        ng-blur=\\\"answerChanged()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"        ng-required=\\\"(question.QuestionEnabled && question.QuestionRequireAnswer)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"        rows=\\\"5\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"        ng-disabled=\\\"!question.QuestionEnabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    </textarea>\\r\" +\r\n    \"\\n\" +\r\n    \"</span>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/forms/views/directives/apFormAnswerTimeframe.html',\r\n    \"<div class=\\\"row-answer\\\" ng-init=\\\"tfControlId = 'tfControlId_' + question.SurveySectionId + '_' + question.SurveyQuestionId\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <span ng-class=\\\"(question.QuestionEnabled) ? 'text-enabled' : 'text-disabled'\\\">{{ :: 'Time Frame:' | translate }}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"    &nbsp;&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"        <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               name=\\\"SurveyQuestionId_{{question.SurveyQuestionId}}_QuestionRequired\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               id=\\\"{{tfControlId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-model=\\\"question.SelectedAnswerText\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               placeholder=\\\"{{ (question.QuestionEnabled && question.QuestionRequireAnswer) ? timeframeText.TextPlaceHolder : timeframeText.TextPlaceHolderRequired }}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-blur=\\\"answerChanged()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ap-required=\\\"question.QuestionEnabled && question.QuestionRequireAnswer\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-disabled=\\\"!question.QuestionEnabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"row-answer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <span ng-class=\\\"(question.QuestionEnabled) ? 'text-enabled' : 'text-disabled'\\\">{{ :: 'Please select the time format for your answer.' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"row-answer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <fieldset>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-4 row-answer\\\"  ng-repeat=\\\"answer in question.Answers\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-form-answer-radiobutton question=\\\"question\\\" answer=\\\"answer\\\" selected-button-callback=\\\"selectedButtonCallback(selectedUid)\\\"></ap-form-answer-radiobutton>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </fieldset>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/forms/views/directives/apFormQuestion.html',\r\n    \"<label ng-class=\\\"(question.QuestionEnabled) ? 'text-question-enabled' : 'text-question-disabled'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    {{ question.QuestionNumber }}.&nbsp;&nbsp;{{ question.SurveyQuestionLabel }}\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <span class=\\\"forms-question-validation-error\\\" ng-if=\\\"!question.QuestionEnabled\\\">{{'Question Disabled' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <span ng-if=\\\"(\\r\" +\r\n    \"\\n\" +\r\n    \"                    (question.QuestionEnabled && question.QuestionRequireAnswer)\\r\" +\r\n    \"\\n\" +\r\n    \"                 )\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"          ng-class=\\\"{ 'has-error control-label' : (!question.RequiredFieldsPopulated || form['SurveyQuestionId_'+ question.SurveyQuestionId].$invalid) && form.isSubmitted}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        &nbsp;<span class=\\\"fa fa-asterisk\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <span ng-if=\\\"(  (question.QuestionEnabled && question.QuestionRequireAnswer && (form['SurveyQuestionId_'+ question.SurveyQuestionId].$invalid || !question.RequiredFieldsPopulated)\\r\" +\r\n    \"\\n\" +\r\n    \"                        && (form.isSubmitted || form['SurveyQuestionId_' + question.SurveyQuestionId].$dirty || !question.RequiredFieldsPopulated))\\r\" +\r\n    \"\\n\" +\r\n    \"                      ||\\r\" +\r\n    \"\\n\" +\r\n    \"                    (question.QuestionEnabled && question.QuestionRequireAnswer && form['SurveyQuestionId_'+ question.SurveyQuestionId + '_QuestionRequired'].$invalid\\r\" +\r\n    \"\\n\" +\r\n    \"                         && (form.isSubmitted || form['SurveyQuestionId_' + question.SurveyQuestionId + '_QuestionRequired'].$dirty))\\r\" +\r\n    \"\\n\" +\r\n    \"                 )\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"          class=\\\"control-label forms-question-validation-error\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"          ng-class=\\\"{ 'has-error' : !question.RequiredFieldsPopulated && form.isSubmitted}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        {{ 'Please enter required field.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"</label>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/forms/views/directives/apFormQuestionFamilyHistory.html',\r\n    \"<label class=\\\"text-question-enabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    {{ 'Please enter family history' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"row-item col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-3 col-flush\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-3 col-flush\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-4 col-flush\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-2 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <button class=\\\"btn btn-default1 pull-right\\\" ng-click=\\\"addFamilyHistoryInformation()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Add Family History' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"row-item col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-3 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{:: 'Relationship' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-3 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{:: 'Name' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-4 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Disease' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-2 col-flush\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"body-line col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!questionnaireSection.FamilyHistoryAnswers.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{:: 'Please enter family history.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"striped col-xs-12\\\" ng-repeat=\\\"familyHistoryAnswer in questionnaireSection.FamilyHistoryAnswers\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-3 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{familyHistoryAnswer.RelationshipName}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-3 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{familyHistoryAnswer.FirstName}} {{familyHistoryAnswer.LastName}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-4 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-repeat=\\\"problemHistoryAnswer in familyHistoryAnswer.ProblemHistoryAnswers | filter: {Selected: 'true'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{problemHistoryAnswer.DiseaseName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-2 col-flush center-text\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-default1\\\" ng-click=\\\"EditFamilyHistoryAnswer(familyHistoryAnswer)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{'Edit' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-default1\\\" ng-click=\\\"DeleteFamilyHistoryAnswer(familyHistoryAnswer)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{'Delete' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/forms/views/directives/apFormQuestionImmunizationHistory.html',\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"<div ng-if=\\\"adultVaccineList.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <label class=\\\"text-question-enabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        {{ 'Please enter an onset date for each adult immunization you have had.' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"    </label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"history-primary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"history-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row ap-margin-bottom-30\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row-item col-xs-12 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-6 col-striped-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label class=\\\"label-text\\\">{{::'Adult Immunization' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-6 col-striped-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label class=\\\"label-text\\\">{{::'Onset Date' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"body-line col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-if=\\\"!adultVaccineList.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'There are no adult immunizations associated with Patient Immunization History section.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 col-flush\\\" ng-repeat=\\\"immunizationsAdult in questionnaireSection.ImmunizationHistoryAnswers.ImmunizationAdultAnswers\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"striped col-xs-12 col-flush\\\" ng-repeat=\\\"immunizationAnswer in immunizationsAdult.ImmunizationAnswers\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-6 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <input type=\\\"checkbox\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                           class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                           name=\\\"adult_immunization_selected_{{immunizationAnswer.VaccineAdminItemId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                           id=\\\"adult_immunization_selected_{{immunizationAnswer.VaccineAdminItemId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                           ng-model=\\\"immunizationAnswer.Selected\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"label-text\\\" for=\\\"adult_immunization_selected_{{immunizationAnswer.VaccineAdminItemId}}\\\">&nbsp;&nbsp;{{ immunizationAnswer.VaccineName }}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-6 col-flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <ap-time-frame\\r\" +\r\n    \"\\n\" +\r\n    \"                                            time-frame-id=\\\"immunizationsAdult.VaccineAdminId + '_' + immunizationAnswer.VaccineAdminItemId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            time-frame-answer=\\\"immunizationAnswer.OnsetTimeFrame\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            time-frame-selected-callback=\\\"adultTimeFrameSelectedCallback(timeFrameId,onsetTimeFrameId)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            required>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </ap-time-frame>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-12 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"row form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <label class=\\\"control-label\\\">{{:: 'Notes' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <textarea\\r\" +\r\n    \"\\n\" +\r\n    \"                                                class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                id=\\\"notes_adult_{{immunizationAnswer.VaccineAdminItemId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                name=\\\"notes_adult_{{immunizationAnswer.VaccineAdminItemId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                ng-model=\\\"immunizationAnswer.Notes\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                placeholder=\\\"{{ ::'Notes here' | translate }}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                rows=\\\"1\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </textarea>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"<div ng-if=\\\"pediatricVaccineList.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <label class=\\\"text-question-enabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        {{ 'Please enter an onset date for each pediatric immunization you have had.' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"    </label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"history-primary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"history-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row-item col-xs-12 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-6 col-striped-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label class=\\\"label-text\\\">{{::'Pediatric Immunization' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-6 col-striped-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label class=\\\"label-text\\\">{{::'Onset Date' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"body-line col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-if=\\\"!pediatricVaccineList.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'There are no pediatric immunizations associated with Patient Immunization History section.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 col-flush\\\" ng-repeat=\\\"immunizationsPediatric in questionnaireSection.ImmunizationHistoryAnswers.ImmunizationPediatricAnswers\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"striped col-xs-12 col-flush\\\" ng-repeat=\\\"immunizationAnswer in immunizationsPediatric.ImmunizationAnswers\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-6 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <input type=\\\"checkbox\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                           class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                           name=\\\"pediatric_immunization_selected_{{immunizationAnswer.VaccineAdminItemId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                           id=\\\"pediatric_immunization_selected_{{immunizationAnswer.VaccineAdminItemId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                           ng-model=\\\"immunizationAnswer.Selected\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"label-text\\\" for=\\\"pediatric_immunization_selected_{{immunizationAnswer.VaccineAdminItemId}}\\\">&nbsp;&nbsp;{{ immunizationAnswer.VaccineName }}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-6 col-flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <ap-time-frame\\r\" +\r\n    \"\\n\" +\r\n    \"                                        time-frame-id=\\\"immunizationsPediatric.VaccineAdminId + '_' + immunizationAnswer.VaccineAdminItemId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        time-frame-answer=\\\"immunizationAnswer.OnsetTimeFrame\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        time-frame-selected-callback=\\\"pediatricTimeFrameSelectedCallback(timeFrameId,onsetTimeFrameId)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        required>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </ap-time-frame>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-12 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"row form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <label class=\\\"control-label\\\">{{:: 'Notes' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <textarea\\r\" +\r\n    \"\\n\" +\r\n    \"                                                class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                id=\\\"notes_pediatric_{{immunizationAnswer.VaccineAdminItemId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                name=\\\"notes_pediatric_{{immunizationAnswer.VaccineAdminItemId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                ng-model=\\\"immunizationAnswer.Notes\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                placeholder=\\\"{{ ::'Notes here' | translate }}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                rows=\\\"1\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </textarea>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/forms/views/directives/apFormQuestionPatientProblemHistory.html',\r\n    \"<label class=\\\"text-question-enabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    {{ ::'Please enter an onset date for each disease that you have had.' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"history-primary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"history-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row-item col-xs-12 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-6 col-striped-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <label class=\\\"label-text\\\">{{:: 'Disease' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-6 col-striped-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <label class=\\\"label-text\\\">{{:: 'Onset Date' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-12 body-line\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"!findTableItemsProblemHx.length &&  !questionnaireSection.ProblemHistoryAnswers.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'There are no diseases associated with Patient Problem History section.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"striped col-xs-12 col-flush\\\" ng-repeat=\\\"problemHistoryAnswer in questionnaireSection.ProblemHistoryAnswers\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-6 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <input type=\\\"checkbox\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   name=\\\"disease_selected_{{problemHistoryAnswer.ProblemHistoryAnswerId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   id=\\\"disease_selected_{{problemHistoryAnswer.ProblemHistoryAnswerId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-model=\\\"problemHistoryAnswer.Selected\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-disabled=\\\"problemHistoryAnswer.CameFromPatientChart\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label class=\\\"label-text\\\" \\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-class=\\\"problemHistoryAnswer.CameFromPatientChart ? 'disabled' : ''\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   for=\\\"disease_selected_{{problemHistoryAnswer.ProblemHistoryAnswerId}}\\\">&nbsp;&nbsp;{{ problemHistoryAnswer.DiseaseName }}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ng-show=\\\"problemHistoryAnswer.CameFromPatientChart\\\">&nbsp;{{'(Already On Chart)' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-6 col-flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <ap-time-frame\\r\" +\r\n    \"\\n\" +\r\n    \"                                    time-frame-id=\\\"problemHistoryAnswer.ProblemHistoryAnswerId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    time-frame-answer=\\\"problemHistoryAnswer.OnsetTimeFrame\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    time-frame-selected-callback=\\\"timeFrameSelectedCallback(timeFrameId,onsetTimeFrameId)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    disabled=\\\"problemHistoryAnswer.CameFromPatientChart\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    required>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </ap-time-frame>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <label class=\\\"control-label\\\">{{:: 'Notes' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <textarea\\r\" +\r\n    \"\\n\" +\r\n    \"                                        class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        id=\\\"notes_{{problemHistoryAnswer.ProblemHistoryAnswerId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        name=\\\"notes_{{problemHistoryAnswer.ProblemHistoryAnswerId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-model=\\\"problemHistoryAnswer.Notes\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        placeholder=\\\"{{ ::'Notes here' | translate }}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ng-disabled=\\\"problemHistoryAnswer.CameFromPatientChart\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        rows=\\\"1\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                </textarea>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/forms/views/directives/apTimeFrame.html',\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"<!--\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-2 col-flush\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-4 col-flush\\\">showDatePicker = {{ datePickerModel.showDatePicker ? 'hello' : 'goodbye' }}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-6 col-flush\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"-->\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-2 col-flush\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-4 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <input ng-if=\\\"timeFrameInputIsVisible\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               id=\\\"{{tfInputCtrlId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               name=\\\"{{tfInputCtrlId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-model=\\\"timeFrameAnswer.OnsetTimeFrameValue\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               type=\\\"number\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-min=\\\"1\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-max=\\\"99\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-maxlength=\\\"2\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               placeholder=\\\"{{:: 'Number of ' | translate}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-required=\\\"true\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <input ng-if=\\\"calendarInputIsVisible\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               name=\\\"{{calInputCtrlId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               id=\\\"{{calInputCtrlId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-model=\\\"timeFrameAnswer.OnsetTimeFrameDate\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-click=\\\"datePickerModel.showDatePicker=true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               is-open=\\\"datePickerModel.showDatePicker ? true : false\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               min-date=\\\"minDate\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               max-date=\\\"maxDate\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               current-text=\\\"Today\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               clear-text=\\\"Clear\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               close-text=\\\"Done\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               show-button-bar=\\\"false\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               close-on-date-selection=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               on-open-focus=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               uib-datepicker-popup=\\\"MMM dd, yyyy\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-required=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-readonly=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               ng-change=\\\"datePickerChanged()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"               type=\\\"text\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-6 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <select class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    ng-disabled=\\\"disabled\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    name=\\\"{{tfSelCtrlId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    id=\\\"{{tfSelCtrlId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    ng-model=\\\"timeFrameAnswer.OnsetTimeFrameId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    ng-change=\\\"timeFrameTypeChanged()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    ng-options=\\\"timeFrameType.TimeFrameId as timeFrameType.Name for timeFrameType in timeFrameTypes\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    ap-set-focus-event=\\\"change\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    ap-set-focus-id=\\\"{{tfInputCtrlId}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            </select>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"row\\\" ng-if=\\\"formRef[tfInputCtrlId].$error && formRef.isSubmitted\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-2\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-10 col-flush text-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-messages=\\\"formRef[tfInputCtrlId].$error\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             class=\\\"has-error\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-message=\\\"max\\\">{{:: 'Please enter a number less than 100.' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-message=\\\"min\\\">{{:: 'Please enter a number greater than 0.' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-message=\\\"maxlength\\\">{{:: 'Number of cannot exceed 2 characters.' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"timeFrameInputIsVisible\\\" ng-message=\\\"required\\\">{{:: 'Please enter a value.' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"<div class=\\\"row\\\" ng-if=\\\"formRef[calInputCtrlId].$error && formRef.isSubmitted\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-2\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"col-xs-10 col-flush text-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-messages=\\\"formRef[calInputCtrlId].$error\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"             class=\\\"has-error\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-message=\\\"required\\\">{{:: 'Please enter a date.' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/forms/views/forms.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div id=\\\"form-results-panel\\\" class=\\\"panel panel-primary\\\" ng-class=\\\"(isModalDisplayed) ? 'hidden-print' : ''\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !httpError\\\" class=\\\"panel-body panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Incomplete Forms' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div id=\\\"no-incomplete-forms-div\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 class=\\\"text-center\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 ng-if=\\\"!incompleteForms.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'No incomplete forms found.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"ap-margin-bottom-50\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row panel-row\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     id=\\\"incomplete-form-{{incompleteForm.RelSurveyPatientId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-repeat=\\\"incompleteForm in incompleteForms track by $index\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-4 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div>{{incompleteForm.QuestionnaireName}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Assigned' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            <ap-date-formatter date=\\\"{{incompleteForm.EffectDate}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                               format=\\\"long-date\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-4 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-if=\\\"!incompleteForm.LastModifiedByPatient\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'New' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-if=\\\"incompleteForm.LastModifiedByPatient\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>{{::'In Progress' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Last Edited' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            <ap-date-formatter date=\\\"{{incompleteForm.LastModifiedByPatient}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                               format=\\\"date-time\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-4 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button class=\\\"btn btn-default1 pull-right\\\" ng-click=\\\"openPatientQuestionnaire(incompleteForm)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Complete Form' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Completed Forms' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div id=\\\"no-complete-forms-div\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 class=\\\"text-center\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 ng-if=\\\"!completedForms.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'No completed forms found.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"ap-margin-bottom-50\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row panel-row\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 id=\\\"complete-form-{{completedForm.RelSurveyPatientId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 ng-repeat=\\\"completedForm in completedForms track by $index\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-4 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div>{{completedForm.QuestionnaireName}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Assigned' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            <ap-date-formatter date=\\\"{{completedForm.EffectDate}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                               format=\\\"long-date\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-4 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-if=\\\"completedForm.LastModifiedByPatient\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Submitted' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            <ap-date-formatter date=\\\"{{completedForm.LastModifiedByPatient}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                               format=\\\"date-time\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-4 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button class=\\\"btn btn-default1 pull-right\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                ng-click=\\\"openPatientQuestionnaire(completedForm)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'Edit Form' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Practice Forms' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <span class=\\\"header-menu pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"dropdown-primary\\\" uib-dropdown>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button class=\\\"btn btn-default flush-right\\\" type=\\\"button\\\" id=\\\"subtype-filter-btn\\\" uib-dropdown-toggle>\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{ 'Filter' | translate }}&nbsp;&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"title-text\\\">{{ selectedFilterForm }}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span class=\\\"caret\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ul class=\\\"dropdown-menu-right\\\" uib-dropdown-menu role=\\\"menu\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <li class=\\\"clickable\\\" role=\\\"presentation\\\" ng-repeat=\\\"filter in filterForm\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <a role=\\\"menuitem\\\" ng-click=\\\"filterPracticeForm(filter)\\\">{{ ::filter.Name }}</a>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </li>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </ul>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </span>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div id=\\\"no-practice-forms-div\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 class=\\\"text-center\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 ng-if=\\\"!practiceFormsList.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'No practice forms found.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row panel-row\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 id=\\\"practice-form-{{practiceFormsList.RelPracticeFormPatientId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                 ng-repeat=\\\"practiceForm in practiceFormsList track by $index\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"overflow-ellipsis col-xs-flush column-text col-xs-12 col-md-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{practiceForm.PracticeFormName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-class=\\\"(!practiceForm.isComplete) ? 'col-xs-12 col-xs-flush col-md-2' : 'col-xs-12 col-xs-flush col-md-3'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"overflow-ellipsis column-subtext\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span>{{practiceForm.AttachmentTypeName}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-class=\\\"(!practiceForm.isComplete) ? 'col-xs-12 col-xs-flush col-md-5' : 'col-xs-12 col-xs-flush col-md-9'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-class=\\\"(!practiceForm.isComplete) ? 'col-xs-12 col-xs-flush col-md-6 center-text' : 'col-xs-12 col-xs-flush col-md-5'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ap-date-formatter date=\\\"{{practiceForm.EffectDate}}\\\" format=\\\"long-date\\\"></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-class=\\\"(!practiceForm.isComplete) ? 'col-xs-6 col-xs-flush col-md-3' : 'col-xs-6 col-xs-flush col-md-4'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button class=\\\"btn btn-default1\\\" ng-click=\\\"viewPracticeFormAttachment(practiceForm)\\\">{{:: 'View' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-class=\\\"(!practiceForm.isComplete) ? 'col-xs-6 col-xs-flush col-md-1' : 'col-xs-6 col-xs-flush col-md-2'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <button ap-save-to-file=\\\"downloadPracticeFormAttachment(practiceForm)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <i ng-show=\\\"!practiceForm.Downloading\\\" class=\\\"fa fa-download\\\"></i>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <ap-spinner ng-show=\\\"practiceForm.Downloading\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"!practiceForm.Downloaded && !practiceForm.isComplete\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 col-xs-flush col-md-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"secondary-text-semi-bold-light\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"label_wrap\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Please download and complete this form.'| translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                                <br/> {{::'Then upload your completed form.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"practiceForm.Downloaded && practiceForm.isPending\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 col-xs-flush col-md-5\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"secondary-text-semi-bold-light\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"label_wrap\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Upload successful.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                <br/> {{:: 'If you make changes to the form, you may upload it again.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-form-attachment ng-click=\\\"assignUploadForm(practiceForm)\\\" practice-form= 'practiceForm' attachment-dto= \\\"AttachmentList.attachmentDto\\\" sending=\\\"practiceForm.Uploading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        </ap-form-attachment>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"practiceForm.Downloaded && !practiceForm.isPending\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 col-xs-flush col-md-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"secondary-text-semi-bold-light\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"label_wrap\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Please complete the form.'| translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                                <br/> {{::'Then upload your completed form.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-form-attachment ng-click=\\\"assignUploadForm(practiceForm)\\\" practice-form= 'practiceForm' attachment-dto= \\\"AttachmentList.attachmentDto\\\" sending=\\\"practiceForm.Uploading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        </ap-form-attachment>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'An error has occurred and the patient questionnaire could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'You do not have access to view patient questionnaires.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/forms/views/patientQuestionnaire.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-questionnaire\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <form name=\\\"patientQuestionnaireForm\\\" novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-show=\\\"loadingSection.loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"text-loading-section\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{ ::'Loading Questionnaire Section' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-show=\\\"savingQuestionnaire\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"text-loading-section\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{ ::'Saving Patient Questionnaire' | translate }}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-show=\\\"!httpError && !loadingSection.loading && !savingQuestionnaire\\\" class=\\\"panel-body panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <!-- TODO : Move section navigation into a custom directive ??? -->\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-subheading-no-border-bottom\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span>{{ ::patientQuestionnaire.Questionnaire.SurveyName }}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span class=\\\"pull-right forms-sections-navigation\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{ ::'Section' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{ navigationSectionParams.currentSectionNumber }}\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{ ::'of' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{ patientQuestionnaire.Questionnaire.Sections.length }}\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-if=\\\"patientQuestionnaire.Questionnaire.Sections.length > 1\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span class=\\\"clickable prev-nav\\\" ng-click=\\\"navMovePrevious()\\\">{{::'Prev' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ng-repeat=\\\"section in patientQuestionnaire.Questionnaire.Sections | filter: { Visible: true }\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <span ng-click=\\\"displaySection(section)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span ng-class=\\\"(section.SectionNumber === navigationSectionParams.currentSectionNumber)\\r\" +\r\n    \"\\n\" +\r\n    \"                                        ? 'clickable section-numbers section-number-current' : 'clickable section-numbers'\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{ section.SectionNumber }}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span class=\\\"clickable next-nav\\\" ng-click=\\\"navMoveNext()\\\">{{::'Next' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"forms-header-validation-error\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-if=\\\"patientQuestionnaireForm.$invalid && patientQuestionnaireForm.isSubmitted\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{ ::'Please correct form.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <!--  <div class=\\\"forms-padding-top-10\\\"></div>  -->\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{ navigationSectionParams.currentSectionNumber }}.\\r\" +\r\n    \"\\n\" +\r\n    \"                    &nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{ navigationSectionParams.currentSectionName }}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row row-question form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-if=\\\"!patientQuestionnaire.Questionnaire.Sections[navigationSectionParams.currentSectionNumber - 1].ContainsPatientHxQuestion\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-repeat=\\\"question in patientQuestionnaire.Questionnaire.Sections[navigationSectionParams.currentSectionNumber - 1].Questions\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-class=\\\"{ 'has-error' : (patientQuestionnaireForm['SurveyQuestionId_' + question.SurveyQuestionId].$invalid\\r\" +\r\n    \"\\n\" +\r\n    \"                                                   && (patientQuestionnaireForm['SurveyQuestionId_' + question.SurveyQuestionId].$dirty\\r\" +\r\n    \"\\n\" +\r\n    \"                                                         || patientQuestionnaireForm.isSubmitted))}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-init=\\\"loadingSection.loading=!$last\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ap-form-question question=\\\"question\\\" form=\\\"patientQuestionnaireForm\\\"></ap-form-question>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-switch=\\\"(question.SurveyControlTypeName | uppercase)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"<!--\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-switch-when=\\\"RADIOBUTTON\\\" class=\\\"row\\\" ng-show=\\\"question.QuestionEnabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-6 col-sm-6 col-md-6 col-lg-6 row-answer\\\"  ng-repeat=\\\"answer in question.Answers\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <ap-form-answer-radiobutton\\r\" +\r\n    \"\\n\" +\r\n    \"                                        question=\\\"question\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        answer=\\\"answer\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        last-question=\\\"{{$last}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                </ap-form-answer-radiobutton>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"-->\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-switch-when=\\\"RADIOBUTTON\\\" ng-show=\\\"question.QuestionEnabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <fieldset>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-repeat=\\\"answer in question.Answers\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"row\\\" ng-if=\\\"$even\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-6 col-sm-6 col-md-6 col-lg-6 row-answer\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            ng-repeat=\\\"ans in [question.Answers[$index],question.Answers[$index + 1]]\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            ng-if=\\\"ans\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <ap-form-answer-radiobutton\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    form=\\\"patientQuestionnaireForm\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    question=\\\"question\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    answer=\\\"ans\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    last-question=\\\"{{$last}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </ap-form-answer-radiobutton>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </fieldset>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"<!--\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-switch-when=\\\"CHECKBOX\\\" class=\\\"row\\\" ng-show=\\\"question.QuestionEnabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12 col-sm-12 col-md-6 col-lg-4 row-answer\\\"  ng-repeat=\\\"answer in question.Answers\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <ap-form-answer-checkbox\\r\" +\r\n    \"\\n\" +\r\n    \"                                        question=\\\"question\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        answer=\\\"answer\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        last-question=\\\"{{$last}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                </ap-form-answer-checkbox>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"-->\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-switch-when=\\\"CHECKBOX\\\" ng-show=\\\"question.QuestionEnabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-repeat=\\\"answer in question.Answers\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"row\\\" ng-if=\\\"$even\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-6 col-sm-6 col-md-6 col-lg-6 row-answer\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                         ng-repeat=\\\"ans in [question.Answers[$index],question.Answers[$index + 1]]\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                         ng-if=\\\"ans\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <ap-form-answer-checkbox\\r\" +\r\n    \"\\n\" +\r\n    \"                                                form=\\\"patientQuestionnaireForm\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                question=\\\"question\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                answer=\\\"ans\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                last-question=\\\"{{$last}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </ap-form-answer-checkbox>\\r\" +\r\n    \"\\n\" +\r\n    \"                                     </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-switch-when=\\\"TEXT\\\" class=\\\"row\\\" ng-show=\\\"question.QuestionEnabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12 row-answer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <ap-form-answer-text\\r\" +\r\n    \"\\n\" +\r\n    \"                                        question=\\\"question\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        answer=\\\"question.Answers[0]\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        last-question=\\\"{{$last}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                </ap-form-answer-text>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-switch-when=\\\"TIMEFRAME\\\" class=\\\"row\\\" ng-show=\\\"question.QuestionEnabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12 row-answer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <ap-form-answer-timeframe\\r\" +\r\n    \"\\n\" +\r\n    \"                                        form=\\\"patientQuestionnaireForm\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        question=\\\"question\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        last-question=\\\"{{$last}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                </ap-form-answer-timeframe>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-switch-when=\\\"NUMERIC\\\" class=\\\"row\\\" ng-show=\\\"question.QuestionEnabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12 row-answer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <ap-form-answer-numeric\\r\" +\r\n    \"\\n\" +\r\n    \"                                        question=\\\"question\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        answers=\\\"question.Answers\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        last-question=\\\"{{$last}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                </ap-form-answer-numeric>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-switch-when=\\\"DATE\\\" class=\\\"row\\\" ng-show=\\\"question.QuestionEnabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-4 row-answer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <ap-form-answer-date\\r\" +\r\n    \"\\n\" +\r\n    \"                                        question=\\\"question\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        answer=\\\"question.Answers[0]\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                        last-question=\\\"{{$last}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                </ap-form-answer-date>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-8\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row row-question form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-if=\\\"patientQuestionnaire.Questionnaire.Sections[navigationSectionParams.currentSectionNumber - 1].ContainsPatientHxQuestion\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-init=\\\"loadingSection.loading=true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-switch=\\\"(patientQuestionnaire.Questionnaire.Sections[navigationSectionParams.currentSectionNumber - 1].HistoryGroupId | uppercase)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-switch-when=\\\"0238A133-904E-4E49-BDBA-4EB3CB3B39A7\\\" class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 row-answer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <ap-form-question-patient-problem-history\\r\" +\r\n    \"\\n\" +\r\n    \"                                questionnaire-section-id=\\\"patientQuestionnaire.Questionnaire.Sections[navigationSectionParams.currentSectionNumber - 1].SurveySectionId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                questionnaire-section=\\\"patientQuestionnaire.Questionnaire.Sections[navigationSectionParams.currentSectionNumber - 1]\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                loading=\\\"loadingSection.loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            </ap-form-question-patient-problem-history>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-switch-when=\\\"A3FAF896-B328-4364-9621-012F8C6643BB\\\" class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 row-answer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <ap-form-question-family-history\\r\" +\r\n    \"\\n\" +\r\n    \"                                    questionnaire-section-id=\\\"patientQuestionnaire.Questionnaire.Sections[navigationSectionParams.currentSectionNumber - 1].SurveySectionId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    questionnaire-section=\\\"patientQuestionnaire.Questionnaire.Sections[navigationSectionParams.currentSectionNumber - 1]\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    loading=\\\"loadingSection.loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            </ap-form-question-family-history>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-switch-when=\\\"00000000-0000-0000-0000-000000000111\\\" class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 row-answer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <ap-form-question-immunization-history\\r\" +\r\n    \"\\n\" +\r\n    \"                                    questionnaire-section-id=\\\"patientQuestionnaire.Questionnaire.Sections[navigationSectionParams.currentSectionNumber - 1].SurveySectionId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    questionnaire-section=\\\"patientQuestionnaire.Questionnaire.Sections[navigationSectionParams.currentSectionNumber - 1]\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    loading=\\\"loadingSection.loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            </ap-form-question-immunization-history>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"forms-footer-validation-error\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                     ng-if=\\\"patientQuestionnaireForm.$invalid && patientQuestionnaireForm.isSubmitted\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{:: 'Please correct form.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"forms-footer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button id=\\\"finish-later-btn\\\" class=\\\"btn btn-default1 pull-left\\\" ng-click=\\\"submitQuestionnaire('FINISH-LATER')\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{:: 'Finish later' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button id=\\\"next-section-btn\\\" name=\\\"next_section_btn\\\" class=\\\"btn btn-primary pull-right\\\" ng-click=\\\"navMoveNext()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{:: 'Next : ' | translate}} &nbsp; {{navigationSectionParams.nextSectionName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </form>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'An error has occurred and the patient questionnaire could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'You do not have access to view patient questionnaires.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/forms/views/updateFamilyHistoryModal.html',\r\n    \"<div class=\\\"modal-content modal-primary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <form name=\\\"familyHistoryForm\\\" novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"modal-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"cancel()\\\"><span>&times;</span></button>\\r\" +\r\n    \"\\n\" +\r\n    \"            <h4 class=\\\"modal-title\\\">{{::'Patient Family History' | translate}}</h4>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"modal-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-6 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <label class=\\\"control-label\\\">{{:: 'Relationship' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <select class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    name=\\\"relationshipSelect\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    id=\\\"relationshipSelect\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    ng-model=\\\"FamilyHistoryAnswer.RelationshipId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    ng-change=\\\"relationshipSelect()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    ng-required=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    ng-options=\\\"relationshipType.ItemId as relationshipType.Name for relationshipType in familyHxRelationshipList | filter: {IsVisible: true}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            </select>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row\\\" ng-if=\\\"familyHistoryForm.relationshipSelect.$error && familyHistoryForm.isSubmitted\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-messages=\\\"familyHistoryForm.relationshipSelect.$error\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                             class=\\\"has-error\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-message=\\\"required\\\">{{:: 'Please select family relationship.' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"ap-radio-wrapper ap-radio-inline ap-radio-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   type=\\\"radio\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   name=\\\"relationshipQualifier\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   id=\\\"isMaternal\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-model=\\\"Model.RelationshipQualifier\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-value=\\\"RelationshipQualifier.isMaternal\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label for=\\\"isMaternal\\\">{{:: 'Maternal' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"ap-radio-wrapper ap-radio-inline ap-radio-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   type=\\\"radio\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   name=\\\"relationshipQualifier\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   id=\\\"isPaternal\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-model=\\\"Model.RelationshipQualifier\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-value=\\\"RelationshipQualifier.isPaternal\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label for=\\\"isPaternal\\\">{{:: 'Paternal' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"ap-radio-wrapper ap-radio-inline ap-radio-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   type=\\\"radio\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   name=\\\"relationshipQualifier\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   id=\\\"isUnknown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-model=\\\"Model.RelationshipQualifier\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-value=\\\"RelationshipQualifier.isUnknown\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label for=\\\"isUnknown\\\">{{:: 'Unknown' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"ap-radio-wrapper ap-radio-inline ap-radio-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   type=\\\"radio\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   name=\\\"relationshipQualifier\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   id=\\\"isNone\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-model=\\\"Model.RelationshipQualifier\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                   ng-value=\\\"RelationshipQualifier.none\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <label for=\\\"isNone\\\">{{:: 'None' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <label class=\\\"control-label\\\">{{:: 'First Name' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                               id=\\\"firstName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                               name=\\\"firstName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                               ng-model=\\\"FamilyHistoryAnswer.FirstName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                               type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                               placeholder=\\\"First name goes here\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <label class=\\\"control-label\\\">{{:: 'Last Name' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                               id=\\\"lastName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                               name=\\\"lastName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                               ng-model=\\\"FamilyHistoryAnswer.LastName\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                               type=\\\"text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                               placeholder=\\\"Last name goes here\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-6 col-flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row form-group text-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <label class=\\\"control-label\\\">{{:: 'Birthdate' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-time-frame\\r\" +\r\n    \"\\n\" +\r\n    \"                            time-frame-id=\\\"Model.TimeFrameIdBirthdate\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            time-frame-answer=\\\"FamilyHistoryAnswer.BirthDateTimeFrame\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            time-frame-selected-callback=\\\"\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            required>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </ap-time-frame>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row form-group text-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <label class=\\\"control-label\\\">{{:: 'Death Date' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-time-frame\\r\" +\r\n    \"\\n\" +\r\n    \"                                time-frame-id=\\\"Model.TimeFrameIdDeathdate\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                time-frame-answer=\\\"FamilyHistoryAnswer.DeathDateTimeFrame\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                time-frame-selected-callback=\\\"\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                required>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </ap-time-frame>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row ap-margin-bottom-20\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <label class=\\\"control-label\\\">{{:: 'Notes' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <textarea\\r\" +\r\n    \"\\n\" +\r\n    \"                            class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            id=\\\"notes\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            name=\\\"notes\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            ng-model=\\\"FamilyHistoryAnswer.Notes\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            placeholder=\\\"{{ ::'Notes here' | translate }}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            rows=\\\"2\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        </textarea>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <!-- <div class=\\\"forms-vertical-space-20\\\"></div> -->\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12 col-flush family-history-line\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"family-history-problem-header row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <h4 class=\\\"modal-title\\\">{{:: 'Please select all that apply.' | translate}}</h4>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-6 col-striped-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <span class=\\\"pull-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"label-text\\\">{{:: 'Disease' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-6 col-striped-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <span class=\\\"pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"label-text\\\">{{:: 'Onset Date' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 body-line\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-if=\\\"!FamilyHistoryAnswer.ProblemHistoryAnswers.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            {{::'There are no diseases associated with the Patient Family History section.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"striped col-xs-12 col-flush\\\" ng-repeat=\\\"problemHistoryAnswer in FamilyHistoryAnswer.ProblemHistoryAnswers\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-6 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <input type=\\\"checkbox\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                           class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                           name=\\\"disease_selected_{{problemHistoryAnswer.ProblemHistoryAnswerId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                           id=\\\"disease_selected_{{problemHistoryAnswer.ProblemHistoryAnswerId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                           ng-model=\\\"problemHistoryAnswer.Selected\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                           ng-disabled=\\\"problemHistoryAnswer.CameFromPatientChart\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <label class=\\\"label-text\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                           ng-class=\\\"problemHistoryAnswer.CameFromPatientChart ? 'disabled' : ''\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                           for=\\\"disease_selected_{{problemHistoryAnswer.ProblemHistoryAnswerId}}\\\">&nbsp;&nbsp;{{ problemHistoryAnswer.DiseaseName }}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <span ng-show=\\\"problemHistoryAnswer.CameFromPatientChart\\\">&nbsp;{{'(Already On Chart)' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-6 col-flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <ap-time-frame\\r\" +\r\n    \"\\n\" +\r\n    \"                                            time-frame-id=\\\"problemHistoryAnswer.ProblemHistoryAnswerId\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            time-frame-answer=\\\"problemHistoryAnswer.OnsetTimeFrame\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            time-frame-selected-callback=\\\"timeFrameSelectedCallback(timeFrameId,onsetTimeFrameId)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            disabled=\\\"problemHistoryAnswer.CameFromPatientChart\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            required>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </ap-time-frame>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-12 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"row form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <label class=\\\"control-label\\\">{{:: 'Notes' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <textarea\\r\" +\r\n    \"\\n\" +\r\n    \"                                            class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            id=\\\"notes_{{problemHistoryAnswer.ProblemHistoryAnswerId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            name=\\\"notes_{{problemHistoryAnswer.ProblemHistoryAnswerId}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            ng-model=\\\"problemHistoryAnswer.Notes\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            placeholder=\\\"{{ ::'Notes here' | translate }}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            ng-disabled=\\\"problemHistoryAnswer.CameFromPatientChart\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                            rows=\\\"1\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </textarea>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loadingModal || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loadingReceipt\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"modal-footer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class = \\\"col-xs-2\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button type=\\\"button\\\" class=\\\"btn btn-default1\\\" ng-click=\\\"cancel()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{:: 'Cancel' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <button class=\\\"btn btn-primary\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                            ng-click=\\\"accept()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{::'Update History' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"has-error text-center\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                         ng-if=\\\"familyHistoryForm.$invalid && familyHistoryForm.isSubmitted\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        {{ ::'Please correct form.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class = \\\"col-xs-2\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    </form>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\n}]);\n","angular.module('forms').controller('CompleteFormCtrl',\r\n    ['$scope', '$stateParams', 'toaster', 'aprgettext', 'LocalStorageRepository', 'FormsRepository', 'FormsService', 'TransitionManager',\r\n        function ($scope, $stateParams, toaster, gettext, LocalStorageRepository, FormsRepository, FormsService, TransitionManager) {\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n\r\n            $scope.questionnaire = {\r\n                relSurveyPatientId: null,\r\n                patientId: null,\r\n                questionnaireId: null,\r\n                questionnaireName: '',\r\n                questionnaireDetails: null\r\n            };\r\n\r\n            // Unique SurveySectionUid + SurveyQuestionUid + SurveyAnswerUid\r\n            $scope.questionnaireSections = {\r\n                sections: null,\r\n                currentSectionNumber: 0,\r\n                currentSectionId: null,\r\n                currentSectionName: '',\r\n                nextSectionName: '',\r\n                firstSectionNumber: 0,\r\n                lastSectionNumber: 0,\r\n                maxNavigationItems: 5\r\n            };\r\n\r\n\r\n            if ($stateParams.relSurveyPatientId) {\r\n                $scope.questionnaire.relSurveyPatientId = $stateParams.relSurveyPatientId;\r\n            }\r\n            if ($stateParams.patientId) {\r\n                $scope.questionnaire.patientId = $stateParams.patientId;\r\n            }\r\n            if ($stateParams.questionnaireId) {\r\n                $scope.questionnaire.questionnaireId = $stateParams.questionnaireId;\r\n            }\r\n\r\n            function loadPage() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n\r\n                FormsRepository\r\n                    .getQuestionnaireDetails(LocalStorageRepository.getUserID(), $scope.questionnaire.relSurveyPatientId)\r\n                    .then(function (data) {\r\n                        $scope.questionnaire.questionnaireDetails = data;\r\n                        $scope.questionnaire.questionnaireName = data[0].SurveyName;\r\n\r\n                        var sectionNumber = 0;\r\n                        $scope.questionnaireSections.sections = _($scope.questionnaire.questionnaireDetails)\r\n                            .sortBy('SectionDisplayOrder', 'QuestionDisplayOrder', 'SurveyAnswerGroupSurveyAnswerDisplayOrder')\r\n                            .groupBy('SurveySectionId')\r\n                            .map(function (surveySectionQuestions) {\r\n                                var surveySection = surveySectionQuestions[0];\r\n                                return {\r\n                                    SurveySectionId: surveySection.SurveySectionId,\r\n                                    SectionNumber: ++sectionNumber,\r\n                                    SurveySectionName: surveySection.SurveySectionName,\r\n                                    DisplayOrder: surveySection.SectionDisplayOrder,\r\n                                    Visible: (sectionNumber <= $scope.questionnaireSections.maxNavigationItems) ? true : false,\r\n                                    Questions: createQuestionList(surveySectionQuestions)\r\n                                };\r\n                            })\r\n                            .value();\r\n\r\n\r\n                        if ($scope.questionnaireSections.sections && $scope.questionnaireSections.sections.length) {\r\n                            $scope.questionnaireSections.currentSectionNumber = 1;\r\n                            $scope.questionnaireSections.currentSectionId = $scope.questionnaireSections.sections[0].SurveySectionId;\r\n                            $scope.questionnaireSections.currentSectionName = $scope.questionnaireSections.sections[0].SurveySectionName;\r\n                            $scope.questionnaireSections.firstSectionNumber = 1;\r\n\r\n                            $scope.questionnaireSections.lastSectionNumber =\r\n                                $scope.questionnaireSections.sections.length > $scope.questionnaireSections.maxNavigationItems ? $scope.questionnaireSections.maxNavigationItems\r\n                                    : $scope.questionnaireSections.sections.length;\r\n\r\n                            $scope.questionnaireSections.nextSectionName = getNextSectionName();\r\n                        }\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n\r\n\r\n                        FormsRepository\r\n                            .getPatientQuestionnaire(LocalStorageRepository.getUserID(), $scope.questionnaire.relSurveyPatientId)\r\n                            .then(function (data) {\r\n                                $scope.patientQuestionnaire = data;\r\n                            })\r\n                            .finally(function() {\r\n                                console.log($scope.questionnaireSections);\r\n                                console.log($scope.patientQuestionnaire);\r\n                                console.log('pause');\r\n                            });\r\n\r\n\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n            loadPage();\r\n\r\n\r\n            function createQuestionList(sectionQuestions) {\r\n                var questionNumber = 0;\r\n\r\n                var questions = _(sectionQuestions)\r\n                    .groupBy('SurveyQuestionId')\r\n                    .map(function (sectionQuestionAnswers) {\r\n                        var sectionQuestionAnswer = sectionQuestionAnswers[0];\r\n\r\n                        var question = {\r\n                            QuestionNumber: ++questionNumber,\r\n                            SurveySectionId: sectionQuestionAnswer.SurveySectionId,\r\n                            SurveyQuestionId: sectionQuestionAnswer.SurveyQuestionId,\r\n                            SurveyQuestionLabel: sectionQuestionAnswer.SurveyQuestionLabel,\r\n                            SectionOptional: sectionQuestionAnswer.SectionOptional,\r\n                            QuestionOptional: sectionQuestionAnswer.QuestionOptional,\r\n                            SurveyControlTypeId: sectionQuestionAnswer.SurveyControlTypeId,\r\n                            SurveyControlTypeName: sectionQuestionAnswer.SurveyControlTypeName,\r\n                            SelectedAnswerId: getSelectedAnswerId(sectionQuestionAnswer.SurveySectionId, sectionQuestionAnswer.SurveyQuestionId, sectionQuestionAnswer.SurveyControlTypeId),\r\n                            QuestionEnabled: isQuestionEnabled(sectionQuestionAnswer),\r\n                            Answers: createAnswerList(sectionQuestionAnswers),\r\n                            AnswersThatTriggerThisQuestion: getAnswersThatTriggerThisQuestion(sectionQuestionAnswer)\r\n                        };\r\n\r\n                        question.HasAnswersThatTriggerThisQuestion = false;\r\n                        if (question.AnswersThatTriggerThisQuestion !== null) {\r\n                            if (question.AnswersThatTriggerThisQuestion.length > 0) {\r\n                                if (question.AnswersThatTriggerThisQuestion[0] !== '00000000-0000-0000-0000-000000000000') {\r\n                                    question.HasAnswersThatTriggerThisQuestion = true;\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        return question;\r\n                    })\r\n                    .value();\r\n\r\n                return questions;\r\n            }\r\n\r\n\r\n            function getAnswersThatTriggerThisQuestion(question) {\r\n                /*\r\n                    select SurveySectionUid, SurveyQuestionUid, SurveyAnswerUid\r\n                    from details\r\n                    where TriggeringSurveyQuestionUid\r\n                    SurveySectionUid\r\n                */\r\n                var answers = _($scope.questionnaire.questionnaireDetails)\r\n                    .filter({\r\n                        SurveySectionId: question.SurveySectionId,\r\n                        QuestionIdToTrigger: question.SurveyQuestionId\r\n                    })\r\n                    .map(function (answer) {\r\n                        return {\r\n                            SurveySectionId: answer.SurveySectionId,\r\n                            SurveyQuestionId: answer.SurveyQuestionId,\r\n                            SurveyAnswerId: answer.SurveyAnswerId\r\n                        };\r\n                    })\r\n                    .value();\r\n\r\n                return answers;\r\n            }\r\n\r\n\r\n            function isQuestionEnabled(question) {\r\n                if (!question.QuestionOptional) {\r\n                    // QuestionOptional means the question is dependent on another questions answer to be selected in order to be enabled.\r\n                    return true;\r\n                }\r\n\r\n                var answer = _($scope.questionnaire.questionnaireDetails)\r\n                    .filter({\r\n                        SurveySectionId: question.SurveySectionId,\r\n                        QuestionIdToTrigger: question.SurveyQuestionId,\r\n                        SelectedAnswer : true\r\n                    }).head();\r\n\r\n                return answer === undefined ? false : answer.SelectedAnswer;\r\n            }\r\n\r\n\r\n            function getSelectedAnswerId(surveySectionId, surveyQuestionId, surveyControlTypeId) {\r\n                var selectedAnswer = null;\r\n\r\n                if (surveyControlTypeId && surveyControlTypeId.toUpperCase() === 'EC316E58-2265-4C2A-8E93-EA1D15143B0D') {\r\n                    // radio button\r\n                    selectedAnswer = _($scope.questionnaire.questionnaireDetails)\r\n                        .filter({\r\n                            SurveySectionId: surveySectionId,\r\n                            SurveyQuestionId: surveyQuestionId,\r\n                            SelectedAnswer : true\r\n                        }).head();\r\n                }\r\n\r\n                return selectedAnswer && selectedAnswer.SurveyAnswerId;\r\n            }\r\n\r\n\r\n            function createAnswerList(sectionQuestionAnswers) {\r\n                var myAnswers = _(sectionQuestionAnswers)\r\n                    .groupBy('SurveyAnswerId')\r\n                    .map(function (answers) {\r\n                        var answer = answers[0];\r\n                        return {\r\n                            SurveySectionId: answer.SurveySectionId,\r\n                            SurveyQuestionId: answer.SurveyQuestionId,\r\n                            QuestionOptional: answer.QuestionOptional,\r\n                            SurveyAnswerId: answer.SurveyAnswerId,\r\n                            SurveyControlTypeId: answer.SurveyControlTypeId,\r\n                            SurveyAnswerLabel: answer.SurveyAnswerLabel,\r\n                            SelectedAnswer: answer.SelectedAnswer,\r\n                            SurveyResponseAnswerText: answer.SurveyResponseAnswerText,\r\n                            QuestionsToTrigger: _(answers).map(function (answer) {\r\n                                    return { QuestionId: answer.QuestionIdToTrigger };\r\n                                }\r\n                            ).value()\r\n                        };\r\n                    })\r\n                    .value();\r\n\r\n                return myAnswers;\r\n            }\r\n\r\n\r\n            function submitQuestionnaire() {\r\n                //var questionnaire = $scope.questionnaire.questionnaireDetails;\r\n                // TODO - call forms repository to complete form\r\n                var completedForm = {\r\n                    Form: { Id: $scope.questionnaire.relSurveyPatientId, Name: $scope.questionnaire.questionnaireName},\r\n                    Patient: { Id: $scope.questionnaire.patientId}\r\n                };\r\n                FormsService.cacheCompletedForm(completedForm);\r\n                TransitionManager.transition({appRoute: 'confirmForm'});\r\n            }\r\n\r\n\r\n            function getCurrentSectionName() {\r\n                // Sections collection is zero based.  Section Number is 1 based.\r\n                if ($scope.questionnaireSections.currentSectionNumber > 0) {\r\n                    return $scope.questionnaireSections.sections[$scope.questionnaireSections.currentSectionNumber - 1].SurveySectionName;\r\n                }\r\n            }\r\n\r\n\r\n            function getNextSectionName() {\r\n                // Sections collection is zero based.  Section Number is 1 based.\r\n                if ($scope.questionnaireSections.currentSectionNumber < $scope.questionnaireSections.sections.length) {\r\n                    return $scope.questionnaireSections.sections[$scope.questionnaireSections.currentSectionNumber].SurveySectionName;\r\n                }\r\n                else {\r\n                    return 'Submit Form';\r\n                }\r\n            }\r\n\r\n\r\n            $scope.navMoveNext = function navMoveNext() {\r\n                $scope.completeQuestionnaireForm.isSubmitted = true;\r\n                if (!$scope.completeQuestionnaireForm.$valid) {\r\n                    return;\r\n                }\r\n\r\n                $scope.completeQuestionnaireForm.isSubmitted = false;\r\n                if ($scope.questionnaireSections.currentSectionNumber === $scope.questionnaireSections.sections.length) {\r\n                    return submitQuestionnaire();\r\n                }\r\n\r\n                var curSectionNumber = $scope.questionnaireSections.currentSectionNumber;\r\n                var numOfSections = $scope.questionnaireSections.sections.length;\r\n\r\n                if (curSectionNumber > 0 && curSectionNumber < numOfSections) {\r\n                    $scope.questionnaireSections.currentSectionNumber = ++curSectionNumber;\r\n                    $scope.questionnaireSections.currentSectionName = getCurrentSectionName();\r\n\r\n                    if (curSectionNumber > $scope.questionnaireSections.lastSectionNumber)\r\n                    {\r\n                        $scope.questionnaireSections.firstSectionNumber++;\r\n                        $scope.questionnaireSections.lastSectionNumber++;\r\n                        _.forEach($scope.questionnaireSections.sections, function (section) {\r\n                            if ((section.SectionNumber >= $scope.questionnaireSections.firstSectionNumber) &&\r\n                                (section.SectionNumber <= $scope.questionnaireSections.lastSectionNumber))  {\r\n                                section.Visible = true;\r\n                            }\r\n                            else {\r\n                                section.Visible = false;\r\n                            }\r\n                        });\r\n                    }\r\n\r\n                    $scope.questionnaireSections.nextSectionName = getNextSectionName();\r\n                }\r\n            };\r\n\r\n\r\n            $scope.navMovePrevious = function navMovePrevious() {\r\n                $scope.completeQuestionnaireForm.isSubmitted = false;\r\n\r\n                var curSectionNumber = $scope.questionnaireSections.currentSectionNumber;\r\n\r\n                if (curSectionNumber > 1) {\r\n                    $scope.questionnaireSections.currentSectionNumber = --curSectionNumber;\r\n                    $scope.questionnaireSections.currentSectionName = getCurrentSectionName();\r\n\r\n                    if (curSectionNumber < $scope.questionnaireSections.firstSectionNumber) {\r\n                        $scope.questionnaireSections.firstSectionNumber--;\r\n                        $scope.questionnaireSections.lastSectionNumber--;\r\n                        _.forEach($scope.questionnaireSections.sections, function (section) {\r\n                            if ((section.SectionNumber >= $scope.questionnaireSections.firstSectionNumber) &&\r\n                                (section.SectionNumber <= $scope.questionnaireSections.lastSectionNumber))  {\r\n                                section.Visible = true;\r\n                            }\r\n                            else {\r\n                                section.Visible = false;\r\n                            }\r\n                        });\r\n                    }\r\n\r\n                    $scope.questionnaireSections.nextSectionName = getNextSectionName();\r\n                }\r\n            };\r\n\r\n\r\n            $scope.displaySection = function displaySection(section) {\r\n                if (section.SectionNumber === $scope.questionnaireSections.currentSectionNumber) {\r\n                    // User is wanting to page to current section\r\n                    $scope.completeQuestionnaireForm.isSubmitted = false;\r\n                    return;\r\n                }\r\n                else if (section.SectionNumber < $scope.questionnaireSections.currentSectionNumber) {\r\n                    // User is wanting to page to a previous section.  Don't have to fill out section is moving to a previous one,\r\n                    $scope.completeQuestionnaireForm.isSubmitted = false;\r\n                    $scope.questionnaireSections.currentSectionNumber = section.SectionNumber;\r\n                    $scope.questionnaireSections.currentSectionName = getCurrentSectionName();\r\n                    $scope.questionnaireSections.nextSectionName = getNextSectionName();\r\n                    return;\r\n                }\r\n\r\n                // User is wanting to page to next section\r\n                if (!$scope.completeQuestionnaireForm.$valid) {\r\n                    // View is not valid.\r\n                    $scope.completeQuestionnaireForm.isSubmitted = true;\r\n                    return;\r\n                }\r\n                else {\r\n                    // View is valid.\r\n                    $scope.completeQuestionnaireForm.isSubmitted = false;\r\n                    $scope.questionnaireSections.currentSectionNumber = section.SectionNumber;\r\n                    $scope.questionnaireSections.currentSectionName = getCurrentSectionName();\r\n                    $scope.questionnaireSections.nextSectionName = getNextSectionName();\r\n                    return;\r\n                }\r\n            };\r\n\r\n        }]);","angular.module('forms').controller('ConfirmFormCtrl',\r\n    ['$scope', 'FormsService',\r\n        function ($scope, FormsService) {\r\n            'use strict';\r\n\r\n            $scope.loading = true;\r\n\r\n            $scope.questionnaire = {\r\n                relSurveyPatientId: null,\r\n                patientId: null,\r\n                questionnaireName: ''\r\n            };\r\n\r\n            function loadPage() {\r\n                $scope.loading = true;\r\n\r\n                var completedForm = FormsService.getCompletedForm();\r\n\r\n                $scope.questionnaire.relSurveyPatientId = completedForm.Form.Id;\r\n                $scope.questionnaire.questionnaireName = completedForm.Form.Name;\r\n                $scope.questionnaire.patientId = completedForm.Patient.Id;\r\n\r\n                FormsService.clearCompletedForm();\r\n                $scope.loading = false;\r\n            }\r\n            loadPage();\r\n\r\n        }]);","angular.module('forms').controller('FormsCtrl',\r\n    [\r\n        '$scope', \r\n        '$q', \r\n        '$uibModal', \r\n        'TransitionManager', \r\n        'LocalStorageRepository', \r\n        'NotificationService', \r\n        'FormsRepository',\r\n        'PatientPortalStorageRepository',\r\n        'toaster', \r\n        'aprgettext',\r\n        'BrowserService',\r\n        function (\r\n            $scope, \r\n            $q, \r\n            $modal, \r\n            TransitionManager, \r\n            LocalStorageRepository, \r\n            NotificationService, \r\n            FormsRepository, \r\n            PatientPortalStorageRepository, \r\n            toaster, \r\n            gettext,\r\n            BrowserService\r\n        ) {\r\n\r\n            'use strict';\r\n\r\n            $scope.loading = false;\r\n            $scope.isModalDisplayed = false;\r\n\r\n            $scope.practiceFormsList = null;\r\n            $scope.practiceForm = null;\r\n            $scope.activeList = [];\r\n            $scope.completeList = [];\r\n            $scope.masterList = [];\r\n            $scope.selectedFilterForm = 'Active';\r\n            $scope.filterForm = [ { Name: 'Active', Id: 0 }, {Name: 'Complete', Id: 1 }];\r\n\r\n            var selectedPracticeForm = null;\r\n            var activePatient = PatientPortalStorageRepository.getActivePatient();\r\n\r\n            $scope.AttachmentList=\r\n            {\r\n                attachmentDto : $scope.attachmentDto\r\n            };\r\n\r\n            function filterPracticeForm(filter)\r\n            {\r\n                if(filter.Id === 0)\r\n                {\r\n                    $scope.practiceFormsList = $scope.activeList;\r\n                    $scope.selectedFilterForm = filter.Name;\r\n                }\r\n                if(filter.Id === 1)\r\n                {\r\n                    $scope.practiceFormsList = $scope.completeList;\r\n                    $scope.selectedFilterForm = filter.Name;\r\n                }\r\n            }\r\n\r\n            function openPatientQuestionnaire(form) {\r\n                TransitionManager.transition({appRoute: 'patientQuestionnaire', opts: {relSurveyPatientId: form.RelSurveyPatientId, patientId: form.PatientId, questionnaireId: form.QuestionnaireId}});\r\n            }\r\n\r\n            function viewPracticeFormAttachment(practiceForm) {\r\n                $scope.isModalDisplayed = true;\r\n                selectedPracticeForm = practiceForm;\r\n\r\n                var modalConfig = {\r\n                    Title: practiceForm.PracticeFormName,\r\n                    PatientId: practiceForm.PersonId,\r\n                    DocumentId: practiceForm.AttachmentId,\r\n                    DocumentLoad: getPracticeFormAttachmentImage,\r\n                    DisableInlinePdf: !BrowserService.supportsInlinePdf(),\r\n                };\r\n\r\n                var modalInstance = $modal.open({\r\n                    templateUrl: '/app/views/viewDocumentModal.html',\r\n                    controller: 'ViewDocumentModalCtrl',\r\n                    windowClass: 'modal-full',\r\n                    resolve: {\r\n                        modalConfig: function () {\r\n                            return modalConfig;\r\n                        }\r\n                    }\r\n                });\r\n\r\n                modalInstance.result.then(function () {\r\n                    $scope.isModalDisplayed = false;\r\n                    selectedPracticeForm = null;\r\n                });\r\n            }\r\n\r\n            function getPracticeFormAttachmentImage(documentId, requestSettings) {\r\n                return FormsRepository.getPracticeFormImage(selectedPracticeForm.PersonId, documentId, selectedPracticeForm.RelPracticeFormPatientId, requestSettings)\r\n                    .then(function (data) {\r\n                        return data;\r\n                });\r\n            }\r\n\r\n            function updatePracticeFormDownloadDate(practiceForm) {\r\n                var updateDto = {\r\n                    RelPracticeFormPatientId : practiceForm.RelPracticeFormPatientId\r\n                };\r\n\r\n                return FormsRepository.updatePracticeFormDownloadDate(practiceForm.PersonId, practiceForm.AttachmentId, updateDto)\r\n                    .catch(function () {\r\n                        toaster.pop('error', '', gettext('An error occurred while uploading the practice form'));\r\n                    });\r\n            }\r\n\r\n            function downloadPracticeFormAttachment(practiceForm) {\r\n                practiceForm.Downloading = true;\r\n                practiceForm.Downloaded = true;\r\n                practiceForm.Uploaded = false;\r\n                updatePracticeFormDownloadDate(practiceForm);\r\n                return FormsRepository.getPracticeFormAttachment(practiceForm.PersonId, practiceForm.AttachmentId, practiceForm.RelPracticeFormPatientId)\r\n                    .then(function (data) {\r\n                        return {Data: data.Data, Extension: data.Extension, FileName: practiceForm.PracticeFormName + '_' + activePatient.firstName + activePatient.lastName};\r\n                    })\r\n                    .catch(function () {\r\n                        toaster.pop('error', '', gettext('An error occurred while downloading the practice form'));\r\n                    })\r\n                    .finally(function () {\r\n                        practiceForm.Downloading = false;\r\n                    });\r\n            }\r\n\r\n            function getAssignedQuestionnaires() {\r\n                return FormsRepository\r\n                    .getAssignedQuestionnaires(PatientPortalStorageRepository.getActivePatient().id)\r\n                    .then(function (data) {\r\n                        $scope.incompleteForms = _(data)\r\n                            .filter({'IsComplete' : false})\r\n                            .sortBy('PercentComplete')\r\n                            .value();\r\n\r\n                        $scope.completedForms = _(data)\r\n                            .filter({'IsComplete' : true})\r\n                            .sortBy('PercentComplete')\r\n                            .value();\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    });\r\n            }\r\n\r\n            function getAssignedPracticeForms() {\r\n                var searchCriteria = {\r\n                    IncludeOnlyUnviewedForms : false\r\n                };\r\n\r\n                return FormsRepository\r\n                    .getAssignedPracticeForms(PatientPortalStorageRepository.getActivePatient().id, searchCriteria)\r\n                    .then(function (data) {\r\n                        $scope.masterList = _.map(data, function (entry) {\r\n                            return _.assignIn(entry, { Downloading : false, Downloaded: false, Uploading: false, Uploaded: false, isPending : false, isComplete: false});\r\n                        });\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    });\r\n\r\n            }\r\n\r\n            function createLists()\r\n            {\r\n                if($scope.masterList.length)\r\n                {\r\n                    $scope.completeList =  _($scope.masterList)\r\n                        .filter({'Approved' : true})\r\n                        .sortBy('EffectDate')\r\n                        .value();\r\n\r\n                    $scope.activeList = _($scope.masterList)\r\n                        .filter({'Approved' : false})\r\n                        .sortBy('EffectDate')\r\n                        .value();\r\n\r\n\r\n                    if($scope.activeList)\r\n                    {\r\n                         _.forEach($scope.activeList,function (form) {\r\n                                if(form.LastUploadedByPortalDate !== null && !form.Rejected)\r\n                                {\r\n                                    form.Downloaded = true;\r\n                                    form.isPending = true;\r\n                                    form.Uploaded = true;\r\n                                }\r\n                        });\r\n                    }\r\n\r\n                    if(typeof $scope.completeList !== 'undefined')\r\n                    {\r\n                             _.forEach($scope.completeList,function (form) {\r\n                                 form.isComplete = true;\r\n                        });\r\n                    }\r\n\r\n                $scope.practiceFormsList = $scope.activeList;\r\n                }\r\n            }\r\n                function assignUploadForm(practiceForm) {\r\n                    $scope.uploadForm = practiceForm;\r\n                }\r\n\r\n            $scope.$on('createMessage', function () {\r\n            $scope.uploadForm.Uploading = true;\r\n            // $scope.sending = true;\r\n\r\n                var model = {\r\n                    PatientId: activePatient.id,\r\n                    UrgencyId: 'C2A64D38-3BE1-4F8A-8947-EF9E9AD861A4',\r\n                    SubTypeId: 'E6B12F40-A396-41A8-B1FD-F4A2567141C0',\r\n                    MessageTypeId: 'D8799AE1-D76C-4DEF-B7CD-1D89955A7446',\r\n                    Header: $scope.uploadForm.AttachmentTypeName + ' uploaded form from ' + activePatient.fullName + ' needs approval',\r\n                    Message: null,\r\n                    Status: 'Incomplete',\r\n                    Notes: '',\r\n                    AttachmentDto :   $scope.AttachmentList.attachmentDto,\r\n                    PracticeFormId: $scope.uploadForm.PracticeFormId,\r\n                    RelPracticeFormPatientId : $scope.uploadForm.RelPracticeFormPatientId,\r\n                    AttachmentGroupId : $scope.uploadForm.AttachmentGroupId,\r\n                    AttachmentTypeId : $scope.uploadForm.AttachmentTypeId\r\n                };\r\n\r\n                FormsRepository\r\n                .createApprovalMessage(activePatient.id, model)\r\n                .then(function () {\r\n                    $scope.uploadForm.isPending = true;\r\n                    toaster.pop('success', '', gettext('Upload sent successfully.'));\r\n                    var uploadDto = { RelPracticeFormPatientId : $scope.uploadForm.RelPracticeFormPatientId};\r\n                    FormsRepository.updatePracticeFormUploadDate(activePatient.id, $scope.uploadForm.AttachmentId, uploadDto);\r\n                    NotificationService.updateNotifications();\r\n                 })\r\n                    .catch(function () {\r\n                        toaster.pop('error', '', gettext('An error has occurred and the Form was not uploaded.'));\r\n                    })\r\n                    .finally(function () {\r\n                    //    $scope.sending = false;\r\n                       $scope.uploadForm.Uploading = false;\r\n                    });\r\n            });\r\n\r\n            $scope.load = function(tile) {\r\n                $scope.tile = tile;\r\n\r\n                loadPage();\r\n            };\r\n\r\n\r\n            function loadPage() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n\r\n                var assignedQuestionnairesPromise = getAssignedQuestionnaires();\r\n                var assignedPracticeFormsPromise = getAssignedPracticeForms();\r\n\r\n                $q.all([assignedQuestionnairesPromise, assignedPracticeFormsPromise]).then(function() {\r\n                    createLists();\r\n                }).finally(function () {\r\n                    $scope.loading = false;\r\n                });\r\n            }\r\n            loadPage();\r\n\r\n\r\n            $scope.openPatientQuestionnaire = openPatientQuestionnaire;\r\n            $scope.viewPracticeFormAttachment = viewPracticeFormAttachment;\r\n            $scope.getPracticeFormAttachmentImage = getPracticeFormAttachmentImage;\r\n            $scope.downloadPracticeFormAttachment = downloadPracticeFormAttachment;\r\n            $scope.updatePracticeFormDownloadDate = updatePracticeFormDownloadDate;\r\n            $scope.assignUploadForm = assignUploadForm;\r\n            $scope.filterPracticeForm = filterPracticeForm;\r\n        }\r\n    ]\r\n);","angular.module('forms').controller('PatientQuestionnaireCtrl',\r\n    ['$scope', '$timeout', '$stateParams', 'toaster', 'aprgettext', 'PatientPortalStorageRepository', 'FormsRepository', 'FormsService', 'TransitionManager', 'FormsId',\r\n        function ($scope, $timeout, $stateParams, toaster, gettext, PatientPortalStorageRepository, FormsRepository, FormsService, TransitionManager, FormsId) {\r\n            'use strict';\r\n\r\n            $scope.hxQuestion = {\r\n                isPatientHxQuestion: false,\r\n                isPatientProblemDiagnosisHxQuestion: false,\r\n                isFamilyProblemHxQuestion: false,\r\n                isImmunizationHxQuestion: false\r\n            };\r\n\r\n            $scope.savingQuestionnaire = false;\r\n            $scope.loadingSection = { loading: false};\r\n            $scope.patientQuestionnaire = null;\r\n\r\n            // TODO : Move section navigation into a custom directive ???\r\n            $scope.navigationSectionParams = {\r\n                currentSectionNumber: 0,\r\n                currentSectionName: '',\r\n                nextSectionName: '',\r\n                firstSectionNumber: 0,\r\n                lastSectionNumber: 0,\r\n                maxNavigationItems: 5\r\n            };\r\n\r\n\r\n            function loadPage() {\r\n                $scope.loadingSection.loading = true;\r\n                $scope.removeHttpError();\r\n\r\n                FormsService.removeLocalStorageKeys('subfindtableitems');\r\n\r\n\r\n                FormsRepository\r\n                .getPatientQuestionnaire(PatientPortalStorageRepository.getActivePatient().id, $stateParams.relSurveyPatientId)\r\n                .then(function (data) {\r\n                    $scope.patientQuestionnaire = data;\r\n                    //console.log($scope.patientQuestionnaire);\r\n\r\n                    if ($scope.patientQuestionnaire && $scope.patientQuestionnaire.Questionnaire && $scope.patientQuestionnaire.Questionnaire.Sections) {\r\n                        initializeSectionNavigation();\r\n                        var containsPatientHxQuestion = $scope.patientQuestionnaire.Questionnaire.Sections[$scope.navigationSectionParams.currentSectionNumber - 1].ContainsPatientHxQuestion;\r\n                        $scope.loadingSection.loading = !containsPatientHxQuestion;\r\n                    } else {\r\n                        $scope.loadingSection.loading = false;\r\n                    }\r\n                })\r\n                .catch(function (response) {\r\n                    $scope.addHttpError(response);\r\n                    $scope.loadingSection.loading = false;\r\n                });\r\n            }\r\n            loadPage();\r\n\r\n\r\n            function initializeSectionNavigation() {\r\n                _.forEach($scope.patientQuestionnaire.Questionnaire.Sections, function(section) {\r\n                    section.Visible = section.SectionNumber <= $scope.navigationSectionParams.maxNavigationItems;\r\n\r\n                    _.forEach(section.Questions, function(question) {\r\n                        question.RequiredFieldsPopulated = true;\r\n                    });\r\n                });\r\n\r\n                $scope.navigationSectionParams.currentSectionNumber = 1;\r\n                $scope.navigationSectionParams.currentSectionName = $scope.patientQuestionnaire.Questionnaire.Sections[0].SurveySectionName;\r\n                $scope.navigationSectionParams.firstSectionNumber = 1;\r\n\r\n                if ($scope.patientQuestionnaire.Questionnaire.Sections.length > $scope.navigationSectionParams.maxNavigationItems) {\r\n                    $scope.navigationSectionParams.lastSectionNumber = $scope.navigationSectionParams.maxNavigationItems;\r\n                } else {\r\n                    $scope.navigationSectionParams.lastSectionNumber = $scope.patientQuestionnaire.Questionnaire.Sections.length;\r\n                }\r\n\r\n                $scope.navigationSectionParams.nextSectionName = getNextSectionName();\r\n            }\r\n\r\n\r\n            function getNextSectionName() {\r\n                // Sections collection is zero based.  Section Number is 1 based.\r\n                if ($scope.navigationSectionParams.currentSectionNumber < $scope.patientQuestionnaire.Questionnaire.Sections.length) {\r\n                    return $scope.patientQuestionnaire.Questionnaire.Sections[$scope.navigationSectionParams.currentSectionNumber].SurveySectionName;\r\n                }\r\n                else {\r\n                    return 'Submit Form';\r\n                }\r\n            }\r\n\r\n\r\n            function getCurrentSectionName() {\r\n                // Sections collection is zero based.  Section Number is 1 based.\r\n                if ($scope.navigationSectionParams.currentSectionNumber > 0) {\r\n                    return $scope.patientQuestionnaire.Questionnaire.Sections[$scope.navigationSectionParams.currentSectionNumber - 1].SurveySectionName;\r\n                }\r\n            }\r\n\r\n\r\n            function validateCheckboxQuestions() {\r\n                var curQuestions = $scope.patientQuestionnaire.Questionnaire.Sections[$scope.navigationSectionParams.currentSectionNumber - 1].Questions;\r\n                var curCheckboxQuestions = _.filter(curQuestions, function(question) {\r\n                    return question.QuestionEnabled === true && question.SurveyControlTypeName.toUpperCase() === 'CHECKBOX';\r\n                });\r\n                if (curCheckboxQuestions && curCheckboxQuestions.length > 0) {\r\n                    var checkboxQuestionsHaveAnswers = true;\r\n\r\n                    _.forEach(curCheckboxQuestions, function(checkboxQuestion) {\r\n                        if (checkboxQuestion.QuestionEnabled && checkboxQuestion.QuestionRequireAnswer) {\r\n                            var selectedAnswer = _.find(checkboxQuestion.Answers, function(answer) {\r\n                                return answer.SelectedAnswer === true;\r\n                            });\r\n                            if (!selectedAnswer) {\r\n                                checkboxQuestion.RequiredFieldsPopulated = false;\r\n                                checkboxQuestionsHaveAnswers = false;\r\n                            }\r\n                        }\r\n                    });\r\n\r\n                    if (!checkboxQuestionsHaveAnswers) {\r\n                        $scope.patientQuestionnaireForm.$valid = false;\r\n                        $scope.patientQuestionnaireForm.$invalid = true;\r\n                        return;\r\n                    }\r\n                }\r\n            }\r\n\r\n\r\n            $scope.submitQuestionnaire = function submitQuestionnaire(finishLater) {\r\n                $scope.savingQuestionnaire = true;\r\n\r\n                // For each History Section, remove Problem History Answer items that are not selected.\r\n                // This is will eliminate unneeded items from the respective collections.\r\n                var patientHistorySections = _.filter($scope.patientQuestionnaire.Questionnaire.Sections, {ContainsPatientHxQuestion: true});\r\n                if (patientHistorySections) {\r\n                    var unselectedItems = [];\r\n\r\n                    _.forEach(patientHistorySections, function(historySection) {\r\n                       if (historySection.HistoryGroupId.toUpperCase() === FormsId.HistoryGroupId.ProblemDiagnosis)  {\r\n                           unselectedItems = _.filter(historySection.ProblemHistoryAnswers, {Selected: false});\r\n                           _.forEach(unselectedItems, function(removeObj) {\r\n                               _.pull(historySection.ProblemHistoryAnswers, removeObj);\r\n                           });\r\n                       } else if (historySection.HistoryGroupId.toUpperCase() === FormsId.HistoryGroupId.Family) {\r\n                           _.forEach(historySection.FamilyHistoryAnswers, function(familyHxAnswer) {\r\n                               unselectedItems = _.filter(familyHxAnswer.ProblemHistoryAnswers, {Selected: false});\r\n                               _.forEach(unselectedItems, function(removeObj) {\r\n                                   _.pull(familyHxAnswer.ProblemHistoryAnswers, removeObj);\r\n                               });\r\n                           });\r\n                       } else if (historySection.HistoryGroupId.toUpperCase() === FormsId.HistoryGroupId.Immunization) {\r\n                           if (historySection.ImmunizationHistoryAnswers.ImmunizationAdultAnswers && historySection.ImmunizationHistoryAnswers.ImmunizationAdultAnswers.length > 0) {\r\n                               unselectedItems = _.filter(historySection.ImmunizationHistoryAnswers.ImmunizationAdultAnswers[0].ImmunizationAnswers, {Selected: false});\r\n                               _.forEach(unselectedItems, function(removeObj) {\r\n                                   _.pull(historySection.ImmunizationHistoryAnswers.ImmunizationAdultAnswers[0].ImmunizationAnswers, removeObj);\r\n                               });\r\n                           }\r\n\r\n                           if (historySection.ImmunizationHistoryAnswers.ImmunizationPediatricAnswers && historySection.ImmunizationHistoryAnswers.ImmunizationPediatricAnswers.length > 0) {\r\n                               unselectedItems = _.filter(historySection.ImmunizationHistoryAnswers.ImmunizationPediatricAnswers[0].ImmunizationAnswers, {Selected: false});\r\n                               _.forEach(unselectedItems, function(removeObj) {\r\n                                   _.pull(historySection.ImmunizationHistoryAnswers.ImmunizationPediatricAnswers[0].ImmunizationAnswers, removeObj);\r\n                               });\r\n                           }\r\n                       }\r\n                    });\r\n                }\r\n\r\n                if (finishLater === 'FINISH-LATER')  {\r\n                    $scope.patientQuestionnaire.Completed = false;\r\n                } else {\r\n                    $scope.patientQuestionnaire.Completed = true;\r\n                }\r\n\r\n                FormsRepository.putPatientQuestionnaire($scope.patientQuestionnaire)\r\n                    .then(function () {\r\n                        if ($scope.patientQuestionnaire.Completed)  {\r\n                            var completedForm = {\r\n                                Form: { Id: $scope.patientQuestionnaire.RelSurveyPatientId, Name: $scope.patientQuestionnaire.Questionnaire.SurveyName},\r\n                                Patient: { Id: $scope.patientQuestionnaire.PatientId}\r\n                            };\r\n\r\n                            FormsService.cacheCompletedForm(completedForm);\r\n                            TransitionManager.transition({appRoute: 'confirmForm'});\r\n                        } else {\r\n                            toaster.pop('success', '', gettext('Your questionnaire answers have been saved and can be completed later.'));\r\n                            TransitionManager.transition({appRoute: 'forms'});\r\n                        }\r\n                    })\r\n                    .catch(function () {\r\n                        toaster.pop('error', '', gettext('The patient form was not saved.  Please try again or contact your practice for further assistance.'));\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.savingQuestionnaire = false;\r\n                    });\r\n            };\r\n\r\n\r\n            $scope.navMoveNext = function navMoveNext() {\r\n                $scope.patientQuestionnaireForm.isSubmitted = true;\r\n                validateCheckboxQuestions();\r\n\r\n                if (!$scope.patientQuestionnaireForm.$valid) {\r\n                    return;\r\n                }\r\n\r\n                $scope.patientQuestionnaireForm.isSubmitted = false;\r\n\r\n                var curSectionNumber = $scope.navigationSectionParams.currentSectionNumber;\r\n                var numOfSections = $scope.patientQuestionnaire.Questionnaire.Sections.length;\r\n\r\n                if (curSectionNumber ===  numOfSections) {\r\n                    return $scope.submitQuestionnaire();\r\n                }\r\n\r\n                if ((curSectionNumber > 0) && (curSectionNumber < numOfSections)) {\r\n                    $scope.loadingSection.loading = true;\r\n\r\n                    $timeout(function() {\r\n                        $scope.navigationSectionParams.currentSectionNumber = ++curSectionNumber;\r\n                        $scope.navigationSectionParams.currentSectionName = getCurrentSectionName();\r\n\r\n                        if (curSectionNumber > $scope.navigationSectionParams.lastSectionNumber)\r\n                        {\r\n                            $scope.navigationSectionParams.firstSectionNumber++;\r\n                            $scope.navigationSectionParams.lastSectionNumber++;\r\n                            _.forEach($scope.patientQuestionnaire.Questionnaire.Sections, function (section) {\r\n                                if ((section.SectionNumber >= $scope.navigationSectionParams.firstSectionNumber) &&\r\n                                    (section.SectionNumber <= $scope.navigationSectionParams.lastSectionNumber))  {\r\n                                    section.Visible = true;\r\n                                }\r\n                                else {\r\n                                    section.Visible = false;\r\n                                }\r\n                            });\r\n                        }\r\n\r\n                        $scope.navigationSectionParams.nextSectionName = getNextSectionName();\r\n                    }, 0, true);\r\n                }\r\n            };\r\n\r\n\r\n            $scope.navMovePrevious = function navMovePrevious() {\r\n                // Should always be able to move back to the previous section, even if current section is not valid.\r\n/*\r\n                $scope.patientQuestionnaireForm.isSubmitted = true;\r\n                if (!$scope.patientQuestionnaireForm.$valid) {\r\n                    return;\r\n                }\r\n*/\r\n\r\n                $scope.patientQuestionnaireForm.isSubmitted = false;\r\n\r\n                var curSectionNumber = $scope.navigationSectionParams.currentSectionNumber;\r\n\r\n                if (curSectionNumber > 1) {\r\n                    $scope.loadingSection.loading = true;\r\n\r\n                    $timeout(function() {\r\n                        $scope.navigationSectionParams.currentSectionNumber = --curSectionNumber;\r\n                        $scope.navigationSectionParams.currentSectionName = getCurrentSectionName();\r\n\r\n                        if (curSectionNumber < $scope.navigationSectionParams.firstSectionNumber) {\r\n                            $scope.navigationSectionParams.firstSectionNumber--;\r\n                            $scope.navigationSectionParams.lastSectionNumber--;\r\n                            _.forEach($scope.patientQuestionnaire.Questionnaire.Sections, function (section) {\r\n                                if ((section.SectionNumber >= $scope.navigationSectionParams.firstSectionNumber) &&\r\n                                    (section.SectionNumber <= $scope.navigationSectionParams.lastSectionNumber))  {\r\n                                    section.Visible = true;\r\n                                }\r\n                                else {\r\n                                    section.Visible = false;\r\n                                }\r\n                            });\r\n                        }\r\n\r\n                        $scope.navigationSectionParams.nextSectionName = getNextSectionName();\r\n                    }, 0, true);\r\n                }\r\n            };\r\n\r\n\r\n            $scope.displaySection = function displaySection(section) {\r\n                var curSectionNumber = $scope.navigationSectionParams.currentSectionNumber;\r\n\r\n                if (section.SectionNumber === curSectionNumber) {\r\n                    // User is wanting to page to current section\r\n                    $scope.patientQuestionnaireForm.isSubmitted = false;\r\n                    return;\r\n                }\r\n\r\n/*\r\n                if (section.SectionNumber > curSectionNumber) {\r\n                    // Cannot skip ahead\r\n                    return;\r\n                }\r\n*/\r\n\r\n                validateCheckboxQuestions();\r\n\r\n                if ((section.SectionNumber < curSectionNumber) || ($scope.patientQuestionnaireForm.$valid)) {\r\n                    // User is wanting to page to a previous section or form is valid.  Page to respective section.\r\n                    $scope.patientQuestionnaireForm.isSubmitted = false;\r\n                    $scope.loadingSection.loading = true;\r\n\r\n                    $timeout(function() {\r\n                        $scope.navigationSectionParams.currentSectionNumber = section.SectionNumber;\r\n                        $scope.navigationSectionParams.currentSectionName = getCurrentSectionName();\r\n                        $scope.navigationSectionParams.nextSectionName = getNextSectionName();\r\n                    }, 0, true);\r\n                    return;\r\n                }\r\n\r\n                // User is wanting to page to next section and view is not valid\r\n                $scope.patientQuestionnaireForm.isSubmitted = true;\r\n            };\r\n\r\n        }]);","angular.module('forms').controller('UpdateFamilyHistoryModalCtrl',\r\n    ['$q', '$scope', '$uibModalInstance', 'ListService', 'FamilyHxRelationshipId', 'FamilyHistoryAnswer', 'HistoryRelationshipList', 'FormsId',\r\n        function ($q, $scope, $modalInstance, ListService, FamilyHxRelationshipId, FamilyHistoryAnswer, HistoryRelationshipList, FormsId) {\r\n            'use strict';\r\n\r\n            $scope.loadingModal = true;\r\n\r\n            $scope.FamilyHistoryAnswer = FamilyHistoryAnswer;\r\n\r\n            $scope.familyHxRelationshipList = '';\r\n            $scope.Model = {\r\n                TimeFrameIdBirthdate: 'birthdate',\r\n                TimeFrameIdDeathdate: 'deathdate',\r\n                RelationshipQualifier: 4\r\n            };\r\n\r\n            $scope.RelationshipQualifier = {\r\n                isMaternal: 1,\r\n                isPaternal: 2,\r\n                isUnknown: 3,\r\n                none: 4\r\n            };\r\n            $scope.Model.RelationshipQualifier = $scope.RelationshipQualifier.none;\r\n\r\n\r\n            function loadModal() {\r\n                if ($scope.FamilyHistoryAnswer.IsRelationshipMaternal === true) {\r\n                    $scope.Model.RelationshipQualifier = $scope.RelationshipQualifier.isMaternal;\r\n                } else if ($scope.FamilyHistoryAnswer.IsRelationshipPaternal === true) {\r\n                    $scope.Model.RelationshipQualifier = $scope.RelationshipQualifier.isPaternal;\r\n                } else if ($scope.FamilyHistoryAnswer.IsRelationshipUnknown === true) {\r\n                    $scope.Model.RelationshipQualifier = $scope.RelationshipQualifier.isUnknown;\r\n                } else {\r\n                    $scope.Model.RelationshipQualifier = $scope.RelationshipQualifier.none;\r\n                }\r\n\r\n                $scope.familyHxRelationshipList = HistoryRelationshipList;\r\n                $scope.loadingModal = false;\r\n            }\r\n            loadModal();\r\n\r\n\r\n            $scope.relationshipSelect = function relationshipSelect() {\r\n                var selectedRelationship = _.find($scope.familyHxRelationshipList, {ItemId: FamilyHistoryAnswer.RelationshipId});\r\n                if (selectedRelationship) {\r\n                    FamilyHistoryAnswer.RelationshipName = selectedRelationship.Name;\r\n                }\r\n            };\r\n\r\n\r\n            $scope.timeFrameSelectedCallback = function timeFrameSelectedCallback(timeFrameId, onsetTimeFrameId) {\r\n                var problemHistoryAnswer = _.find($scope.FamilyHistoryAnswer.ProblemHistoryAnswers, {ProblemHistoryAnswerId: timeFrameId});\r\n                if (problemHistoryAnswer) {\r\n                    if ((onsetTimeFrameId.toUpperCase() === FormsId.TimeFrameId.Clear) || (onsetTimeFrameId === '')) {\r\n                        problemHistoryAnswer.Selected = false;\r\n                        problemHistoryAnswer.Notes = '';\r\n                    } else {\r\n                        problemHistoryAnswer.Selected = true;\r\n                    }\r\n                }\r\n            };\r\n\r\n\r\n            $scope.accept = function accept() {\r\n                $scope.familyHistoryForm.isSubmitted = true;\r\n                if (!$scope.familyHistoryForm.$valid) {\r\n                    return;\r\n                }\r\n\r\n                $scope.FamilyHistoryAnswer.IsRelationshipMaternal = false;\r\n                $scope.FamilyHistoryAnswer.IsRelationshipPaternal = false;\r\n                $scope.FamilyHistoryAnswer.IsRelationshipUnknown  = false;\r\n\r\n                if ($scope.Model.RelationshipQualifier === $scope.RelationshipQualifier.isMaternal) {\r\n                    $scope.FamilyHistoryAnswer.IsRelationshipMaternal = true;\r\n                } else if ($scope.Model.RelationshipQualifier === $scope.RelationshipQualifier.isPaternal) {\r\n                    $scope.FamilyHistoryAnswer.IsRelationshipPaternal = true;\r\n                } else if ($scope.Model.RelationshipQualifier === $scope.RelationshipQualifier.isUnknown) {\r\n                    $scope.FamilyHistoryAnswer.IsRelationshipUnknown  = true;\r\n                }\r\n\r\n                $scope.familyHistoryForm.isSubmitted = false;\r\n                $modalInstance.close(FormsId.ModalInstanceReturnId.Accept);\r\n            };\r\n\r\n\r\n            $scope.cancel = function cancel() {\r\n                $modalInstance.dismiss(FormsId.ModalInstanceReturnId.Cancel);\r\n            };\r\n        }\r\n    ]\r\n);","angular.module('forms').directive('apFormAnswerCheckbox',\r\n    ['$rootScope', 'aprgettext',\r\n        function ($rootScope, gettext) {\r\n            'use strict';\r\n\r\n            return {\r\n                restrict: 'E',\r\n                templateUrl: '/forms/views/directives/apFormAnswerCheckbox.html',\r\n                scope: {\r\n                    // Use '@' for one way binding.  String value is returned.\r\n                    // Use '=' for two way binding.  An object is returned.\r\n                    // Use '&' for a method.\r\n                    form: '=form',\r\n                    question: '=question',\r\n                    answer: '=answer',\r\n                    lastQuestion: '@lastQuestion'\r\n                },\r\n                controller: function($scope) {\r\n\r\n                    $scope.explanationPlaceHolder = {\r\n                        Text : ''\r\n                    };\r\n\r\n                    function enableQuestionsForSelectedAnswer(enableQuestion) {\r\n                        var answer = $scope.answer;\r\n\r\n                        // if answer.QuestionsToTrigger collection is empty, do not fire enable event\r\n                        _.forEach(answer.QuestionsToTrigger, function(questionToEnable) {\r\n                            if (questionToEnable !== '00000000-0000-0000-0000-000000000000') {\r\n                                $rootScope.$broadcast('FormAnswerChanged',\r\n                                    {\r\n                                        EnableQuestion: enableQuestion,\r\n                                        QuestionIdToTrigger: questionToEnable\r\n                                    });\r\n                            }\r\n                        });\r\n                    }\r\n\r\n\r\n                    $scope.answerChanged = function answerChanged() {\r\n                        enableQuestionsForSelectedAnswer($scope.answer.SelectedAnswer);\r\n\r\n                        if ($scope.answer.SelectedAnswer === true ) {\r\n                            $scope.explanationPlaceHolder.Text = gettext('Required Explanation here');\r\n                        } else {\r\n                            $scope.explanationPlaceHolder.Text = '';\r\n                        }\r\n\r\n                        if ($scope.answer.SurveyRequiresExplanation === false) {\r\n                            $scope.explanationTextChanged();\r\n                        }\r\n                    };\r\n\r\n\r\n                    $scope.explanationTextChanged = function explanationTextChanged() {\r\n                        $rootScope.$broadcast('ExplanationTextChanged',\r\n                            {\r\n                                SurveyAnswerId: $scope.answer.SurveyAnswerId,\r\n                                SurveyQuestionId: $scope.answer.SurveyQuestionId\r\n                            }\r\n                        );\r\n                    };\r\n\r\n\r\n                    function loadView() {\r\n                    }\r\n                    loadView();\r\n                }\r\n            };\r\n        }\r\n    ]\r\n);","angular.module('forms').directive('apFormAnswerDate',\r\n    ['$rootScope',\r\n        function () {\r\n            'use strict';\r\n\r\n            return {\r\n                restrict: 'E',\r\n                templateUrl: '/forms/views/directives/apFormAnswerDate.html',\r\n                scope: {\r\n                    // Use '@' for one way binding.  String value is returned.\r\n                    // Use '=' for two way binding.  An object is returned.\r\n                    // Use '&' for a method.\r\n                    question: '=question',\r\n                    answer: '=answer',\r\n                    lastQuestion: '@lastQuestion'\r\n                },\r\n                controller: function($scope) {\r\n\r\n                    $scope.datePopup = {\r\n                        Opened: false\r\n                    };\r\n\r\n                    $scope.minDate = moment().subtract(100, 'year');\r\n                    $scope.maxDate = moment().add(5, 'year');\r\n\r\n                    $scope.openDatePicker = function openDatePicker($event) {\r\n                        $event.preventDefault();\r\n                        $scope.datePopup.Opened = true;\r\n                    };\r\n\r\n                    function loadView() {\r\n                        $scope.question.SelectedAnswerId = $scope.answer.SurveyAnswerId;\r\n                    }\r\n                    loadView();\r\n                }\r\n            };\r\n        }\r\n    ]\r\n);","angular.module('forms').directive('apFormAnswerNumeric',\r\n    ['$rootScope',\r\n        function ($rootScope) {\r\n            'use strict';\r\n\r\n            return {\r\n                restrict: 'E',\r\n                templateUrl: '/forms/views/directives/apFormAnswerNumeric.html',\r\n                scope: {\r\n                    // Use '@' for one way binding.  String value is returned.\r\n                    // Use '=' for two way binding.  An object is returned.\r\n                    // Use '&' for a method.\r\n                    question: '=question',\r\n                    answers: '=answers',\r\n                    lastQuestion: '@lastQuestion'\r\n                },\r\n                controller: function($scope) {\r\n\r\n                    function updateEnteredAnswer() {\r\n                        var answerText = String($scope.question.SelectedAnswerText);\r\n                        if (answerText === 'undefined') {\r\n                            answerText = '';\r\n                            $scope.question.SelectedAnswerText = '';\r\n                        }\r\n                        $scope.question.SelectedAnswerId = '00000000-0000-0000-0000-000000000000';\r\n\r\n                        if (answerText.length > 0) {\r\n                            _.forEach($scope.answers, function(answer) {\r\n                                if (answer.SurveyAnswerLabel === answerText) {\r\n                                    $scope.question.SelectedAnswerId = answer.SurveyAnswerId;\r\n                                }\r\n                            });\r\n\r\n                            $scope.question.SelectedAnswerText = Number($scope.question.SelectedAnswerText);\r\n                        }\r\n                    }\r\n\r\n\r\n                    function enableQuestionsForSelectedAnswer(enableQuestion, answerText) {\r\n                        _.forEach($scope.answers, function(answer) {\r\n                            _.forEach(answer.QuestionsToTrigger, function(questionToEnable) {\r\n                                var fireEvent = false;\r\n\r\n                                if (questionToEnable !== '00000000-0000-0000-0000-000000000000') {\r\n                                    if (enableQuestion) {\r\n                                        if (answer.SurveyAnswerLabel === answerText) {\r\n                                            fireEvent = true;\r\n                                        }\r\n                                    } else {\r\n                                        fireEvent = true;\r\n                                    }\r\n                                }\r\n\r\n                                if (fireEvent === true) {\r\n                                    $rootScope.$broadcast('FormAnswerChanged',\r\n                                        {\r\n                                            EnableQuestion: enableQuestion,\r\n                                            QuestionIdToTrigger: questionToEnable\r\n                                        });\r\n                                }\r\n                            });\r\n                        });\r\n                    }\r\n\r\n\r\n                    $scope.answerChanged = function answerChanged() {\r\n                        updateEnteredAnswer();\r\n\r\n                        var enableQuestion = false;\r\n                        if ($scope.question.SelectedAnswerText > 0) {\r\n                            enableQuestion = true;\r\n                        }\r\n\r\n                        enableQuestionsForSelectedAnswer(enableQuestion, $scope.question.SelectedAnswerText);\r\n                    };\r\n\r\n\r\n                    function loadView() {\r\n                        updateEnteredAnswer();\r\n                    }\r\n                    loadView();\r\n                }\r\n            };\r\n        }\r\n    ]\r\n);","angular.module('forms').directive('apFormAnswerRadiobutton',\r\n    ['$rootScope',\r\n        function ($rootScope) {\r\n            'use strict';\r\n\r\n            return {\r\n                restrict: 'E',\r\n                templateUrl: '/forms/views/directives/apFormAnswerRadiobutton.html',\r\n                scope: {\r\n                    // Use '@' for one way binding.  String value is returned.\r\n                    // Use '=' for two way binding.  An object is returned.\r\n                    // Use '&' for a method.\r\n                    form: '=form',\r\n                    question: '=question',\r\n                    answer: '=answer',\r\n                    lastQuestion: '@lastQuestion',\r\n                    selectedButtonCallback: '&selectedButtonCallback'\r\n                },\r\n                controller: function($scope) {\r\n\r\n                    function disableTriggeredQuestions() {\r\n                        var answer = $scope.answer;\r\n                        var question = $scope.question;\r\n                        var questionsToDisable = [];\r\n\r\n                        _.forEach(question.Answers, function(curAnswer) {\r\n                            if (curAnswer.SurveyAnswerId !== answer.SurveyAnswerId) {\r\n                                // if answer.QuestionsToTrigger collection is empty, do not add questionId to array\r\n                                _.forEach(curAnswer.QuestionsToTrigger, function(questionToDisable) {\r\n                                    if (questionToDisable !== '00000000-0000-0000-0000-000000000000') {\r\n                                        if (questionsToDisable.indexOf(questionToDisable) === -1) {\r\n                                            questionsToDisable.push(questionToDisable);\r\n                                        }\r\n                                    }\r\n                                });\r\n                            }\r\n                        });\r\n\r\n                        //console.log('Questions to disable : ' + questionsToDisable);\r\n                        if (questionsToDisable.length <= 0) {\r\n                            // No questions to enable or disable.  Therefore, do not fire disable question event.\r\n                            return;\r\n                        }\r\n\r\n                        _.forEach(questionsToDisable, function(questionId) {\r\n                            $rootScope.$broadcast('FormAnswerChanged',\r\n                                {\r\n                                    EnableQuestion: false,\r\n                                    QuestionIdToTrigger: questionId\r\n                                });\r\n                        });\r\n                    }\r\n\r\n\r\n                    function enableQuestionsForSelectedAnswer() {\r\n                        var answer = $scope.answer;\r\n\r\n                        // if answer.QuestionsToTrigger collection is empty, do not fire enable event\r\n                        _.forEach(answer.QuestionsToTrigger, function(questionToEnable) {\r\n                            if (questionToEnable !== '00000000-0000-0000-0000-000000000000') {\r\n                                $rootScope.$broadcast('FormAnswerChanged',\r\n                                    {\r\n                                        EnableQuestion: true,\r\n                                        QuestionIdToTrigger: questionToEnable\r\n                                    });\r\n                            }\r\n                        });\r\n                    }\r\n\r\n\r\n                    $scope.answerChanged = function answerChanged() {\r\n                        disableTriggeredQuestions();\r\n                        enableQuestionsForSelectedAnswer();\r\n\r\n                        if ($scope.answer.SurveyAnswerId === $scope.question.SelectedAnswerId) {\r\n                            if ($scope.answer.SurveyRequiresExplanation === true) {\r\n                                if ((!$scope.answer.SurveyExplanation || $scope.answer.SurveyExplanation.length <= 0) && $scope.question.RequiredFieldsPopulated === true ) {\r\n                                    $scope.question.RequiredFieldsPopulated = false;\r\n                                }\r\n                            }\r\n                            else {\r\n                                if ($scope.question.RequiredFieldsPopulated === false) {\r\n                                    $scope.question.RequiredFieldsPopulated = true;\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        var selectedUid = $scope.question.SelectedAnswerId;\r\n                        $scope.selectedButtonCallback(selectedUid);\r\n                    };\r\n\r\n\r\n                    $scope.explanationTextChanged = function explanationTextChanged() {\r\n                        $rootScope.$broadcast('ExplanationTextChanged',\r\n                            {\r\n                                SurveyAnswerId: $scope.answer.SurveyAnswerId,\r\n                                SurveyQuestionId: $scope.answer.SurveyQuestionId\r\n                            }\r\n                        );\r\n                    };\r\n\r\n\r\n                    function loadView() {\r\n                    }\r\n                    loadView();\r\n                }\r\n            };\r\n        }\r\n    ]\r\n);","angular.module('forms').directive('apFormAnswerText',\r\n    ['$rootScope',\r\n        function ($rootScope) {\r\n            'use strict';\r\n\r\n            return {\r\n                restrict: 'E',\r\n                templateUrl: '/forms/views/directives/apFormAnswerText.html',\r\n                scope: {\r\n                    // Use '@' for one way binding.  String value is returned.\r\n                    // Use '=' for two way binding.  An object is returned.\r\n                    // Use '&' for a method.\r\n                    question: '=question',\r\n                    answer: '=answer',\r\n                    lastQuestion: '@lastQuestion'\r\n                },\r\n                controller: function($scope) {\r\n\r\n                    function enableQuestionsForSelectedAnswer(enableQuestion) {\r\n                        var answer = $scope.answer;\r\n\r\n                        // if answer.QuestionsToTrigger collection is empty, do not fire enable event\r\n                        _.forEach(answer.QuestionsToTrigger, function(questionToEnable) {\r\n                            if (questionToEnable !== '00000000-0000-0000-0000-000000000000') {\r\n                                $rootScope.$broadcast('FormAnswerChanged',\r\n                                    {\r\n                                        EnableQuestion: enableQuestion,\r\n                                        QuestionIdToTrigger: questionToEnable\r\n                                    });\r\n                            }\r\n                        });\r\n                    }\r\n\r\n\r\n                    $scope.answerChanged = function answerChanged() {\r\n                        var enableQuestion = false;\r\n                        if ($scope.question.SelectedAnswerText > 0) {\r\n                            enableQuestion = true;\r\n                        }\r\n                        enableQuestionsForSelectedAnswer(enableQuestion);\r\n                    };\r\n\r\n\r\n                    function loadView() {\r\n                        $scope.question.SelectedAnswerId = $scope.answer.SurveyAnswerId;\r\n                    }\r\n                    loadView();\r\n                }\r\n            };\r\n        }\r\n    ]\r\n);","angular.module('forms').directive('apFormAnswerTimeframe',\r\n    ['aprgettext',\r\n        function (gettext) {\r\n            'use strict';\r\n\r\n            return {\r\n                restrict: 'E',\r\n                templateUrl: '/forms/views/directives/apFormAnswerTimeframe.html',\r\n                scope: {\r\n                    // Use '@' for one way binding.  String value is returned.\r\n                    // Use '=' for two way binding.  An object is returned.\r\n                    // Use '&' for a method.\r\n                    form: '=form',\r\n                    question: '=question',\r\n                    lastQuestion: '@lastQuestion'\r\n                },\r\n                controller: function($scope) {\r\n                    var formAnswerChangedListener = null;\r\n\r\n                    $scope.timeframeText = {\r\n                        TextPlaceHolder : gettext('Time frame answer here'),\r\n                        TextPlaceHolderRequired : gettext('Required Time Frame answer here')\r\n                    };\r\n\r\n\r\n                    function formAnswerChanged(eventData) {\r\n                        if ($scope.question.SurveyQuestionId === eventData.QuestionIdToTrigger) {\r\n                            //var formElement = angular.element(document.getElementById($scope.form['SurveyQuestionId_' + $scope.question.SurveyQuestionId]));\r\n\r\n                            if (eventData.EnableQuestion === true && $scope.question.QuestionRequireAnswer === true) {\r\n                                //$scope.timeframeText.TextPlaceHolder = gettext('Required Time Frame answer here');\r\n                                //$scope.timeframeText.IsRequired = true;\r\n                                //formElement.$invalid = true;\r\n                            } else {\r\n                                //$scope.timeframeText.TextPlaceHolder = gettext('Time frame answer here');\r\n                                //$scope.timeframeText.IsRequired = false;\r\n                                //formElement.$invalid = false;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    $scope.$on('$destroy', function() {\r\n                        if (formAnswerChangedListener !== null) {\r\n                            formAnswerChangedListener();\r\n                        }\r\n                    });\r\n\r\n                    $scope.answerChanged = function answerChanged() {\r\n                        // Selecting time format radio button handles enabling QuestionsToTrigger\r\n                    };\r\n\r\n                    $scope.selectedButtonCallback = function selectedButtonCallback(selectedId) {\r\n                        if (selectedId !== null && selectedId !== undefined) {\r\n\r\n                        }\r\n                        //$scope.timeframeText.TextPlaceHolder = gettext('Required Time Frame answer here');\r\n                        //$scope.timeframeText.IsRequired = true;\r\n                    };\r\n\r\n                    function loadView() {\r\n                        if ($scope.question.HasAnswersThatTriggerThisQuestion === true) {\r\n                            formAnswerChangedListener = $scope.$on('FormAnswerChanged', function(event, data) {\r\n                                formAnswerChanged(data);\r\n                            });\r\n                        }\r\n                    }\r\n                    loadView();\r\n                }\r\n            };\r\n        }\r\n    ]\r\n);","angular.module('forms').directive('apFormQuestion',\r\n    [\r\n        function () {\r\n            'use strict';\r\n\r\n            return {\r\n                restrict: 'E',\r\n                templateUrl: '/forms/views/directives/apFormQuestion.html',\r\n                scope: {\r\n                    // Use '@' for one way binding.  String value is returned.\r\n                    // Use '=' for two way binding.  An object is returned.\r\n                    // Use '&' for a method.\r\n                    question: '=question',\r\n                    form: '=form'\r\n                },\r\n                controller: function($scope) {\r\n                    var formAnswerChangedListener = null;\r\n                    var formAnswerExplanationTextChangedListener = null;\r\n\r\n\r\n                    function formAnswerChanged(eventData) {\r\n                        if ($scope.question.SurveyQuestionId === eventData.QuestionIdToTrigger) {\r\n                            //console.log((eventData.EnableQuestion ? 'Enable ' : 'Disable ') + 'question ' + $scope.question.QuestionNumber);\r\n                            $scope.question.QuestionEnabled = eventData.EnableQuestion;  // $scope.question.QuestionEnabled is bound to ng-disabled on the answer templete.\r\n                            $scope.question.QuestionRequireAnswer = eventData.EnableQuestion;\r\n\r\n                            if ($scope.question.QuestionEnabled === false) {\r\n                                $scope.question.SelectedAnswerId = null;\r\n                                $scope.question.SelectedAnswerText = '';\r\n\r\n                                _.forEach($scope.question.Answers, function(answer) {\r\n                                    answer.SelectedAnswer = false;\r\n                                    answer.SurveyResponseAnswerText = '';\r\n                                });\r\n                            }\r\n                        }\r\n                    }\r\n\r\n\r\n                    function formAnswerExplanationTextChanged(eventData) {\r\n                        if (eventData.SurveyQuestionId !== $scope.question.SurveyQuestionId) {\r\n                            return;\r\n                        }\r\n\r\n                        if ($scope.question.QuestionEnabled !== true) {\r\n                            return;\r\n                        }\r\n\r\n                        $scope.question.RequiredFieldsPopulated = isRequiredExplanationTextPopulated();\r\n                    }\r\n\r\n\r\n                    $scope.$on('$destroy', function() {\r\n                        if (formAnswerChangedListener !== null) {\r\n                            formAnswerChangedListener();\r\n                        }\r\n                        if (formAnswerExplanationTextChangedListener !== null) {\r\n                            formAnswerExplanationTextChangedListener();\r\n                        }\r\n                    });\r\n\r\n\r\n                    function loadView() {\r\n                        // TODO : Remove boolean flag.  Check if collection is empty or not.\r\n                        if ($scope.question.HasAnswersThatTriggerThisQuestion === true) {\r\n                            //console.log('Has Listener : ' + $scope.question.QuestionNumber);\r\n                            formAnswerChangedListener = $scope.$on('FormAnswerChanged', function(event, data) {\r\n                                formAnswerChanged(data);\r\n                            });\r\n                        }\r\n\r\n                        formAnswerExplanationTextChangedListener = $scope.$on('ExplanationTextChanged', function(event, data) {\r\n                            formAnswerExplanationTextChanged(data);\r\n                        });\r\n                    }\r\n                    loadView();\r\n\r\n\r\n                    function isRequiredExplanationTextPopulated() {\r\n                        var isTextPopulated = false;\r\n                        var unselectedAnswers;\r\n\r\n                        if ($scope.question.SurveyControlTypeName.toUpperCase() === 'RADIOBUTTON') {\r\n                            if ($scope.question.SelectedAnswerId === null) return false;\r\n\r\n                            unselectedAnswers = _.filter($scope.question.Answers, function(answer) {\r\n                                return answer.SurveyAnswerId !== $scope.question.SelectedAnswerId;\r\n                            });\r\n                            if (unselectedAnswers) {\r\n                                _.forEach(unselectedAnswers, function (answer) {\r\n                                    answer.SurveyExplanation = '';\r\n                                });\r\n                            }\r\n\r\n                            var selectedAnswer = _.find($scope.question.Answers, function(answer) {\r\n                                return (answer.SurveyAnswerId === $scope.question.SelectedAnswerId && answer.SurveyRequiresExplanation === true && !!answer.SurveyExplanation && answer.SurveyExplanation.length > 0);\r\n                            });\r\n                            if (selectedAnswer) {\r\n                                isTextPopulated = true;\r\n                            }\r\n                        }\r\n                        else if ($scope.question.SurveyControlTypeName.toUpperCase() === 'CHECKBOX') {\r\n                            unselectedAnswers = _.filter($scope.question.Answers, function(answer) {\r\n                                return answer.SelectedAnswer === false;\r\n                            });\r\n                            if (unselectedAnswers) {\r\n                                _.forEach(unselectedAnswers, function (answer) {\r\n                                    answer.SurveyExplanation = '';\r\n                                });\r\n                            }\r\n\r\n                            var selectedAnswers = _.filter($scope.question.Answers, function(answer) {\r\n                                return (answer.SelectedAnswer === true && answer.SurveyRequiresExplanation === true && (!answer.SurveyExplanation || answer.SurveyExplanation.length <= 0));\r\n                            });\r\n                            if (selectedAnswers && selectedAnswers.length > 0) {\r\n                                isTextPopulated = false;\r\n                            } else {\r\n                                isTextPopulated = true;\r\n                            }\r\n                        }\r\n\r\n                        return isTextPopulated;\r\n                    }\r\n\r\n                }\r\n            };\r\n        }\r\n    ]\r\n);","angular.module('forms').directive('apFormQuestionFamilyHistory',[\r\n        '$q',\r\n        '$rootScope',\r\n        '$uibModal',\r\n        'FormsId',\r\n        'FormsService',\r\n        'ListService',\r\n        function (\r\n            $q,\r\n            $rootScope,\r\n            $modal,\r\n            FormsId,\r\n            FormsService,\r\n            ListService\r\n            ) {\r\n            'use strict';\r\n\r\n            return {\r\n                restrict: 'E',\r\n                templateUrl: '/forms/views/directives/apFormQuestionFamilyHistory.html',\r\n                scope: {\r\n                    // Use '@' for one way binding.  String value is returned.\r\n                    // Use '=' for two way binding.  An object is returned.\r\n                    // Use '&' for a method.\r\n                    questionnaireSectionId: '=questionnaireSectionId',\r\n                    questionnaireSection: '=questionnaireSection',\r\n                    loading: '=loading'\r\n                },\r\n                controller: function apFormQuestionFamilyHistoryCtrl($scope) {\r\n                    $scope.currentSectionId = '';\r\n\r\n                    var historyRelationshipList = '';\r\n                    var familyHxRelationshipList = '';\r\n\r\n\r\n                    $scope.$watch('questionnaireSectionId', function() {\r\n                        if ($scope.currentSectionId === '') {\r\n                            return;\r\n                        }\r\n\r\n                        if ($scope.currentSectionId !== $scope.questionnaireSectionId) {\r\n                            loadView();\r\n                        }\r\n                    });\r\n\r\n\r\n                    function getFamilyHxProblemList(familyHxProblemId) {\r\n                        return ListService.getList('subfindtableitems/family-history-problem/' + familyHxProblemId)\r\n                            .then(function (data) {\r\n                                $scope.familyHxProblemList = data;\r\n                            });\r\n                    }\r\n\r\n\r\n                    function getHistoryRelationshipList() {\r\n                        return ListService.getList('history-relationship')\r\n                            .then(function (data) {\r\n                                historyRelationshipList = data;\r\n                            });\r\n                    }\r\n\r\n\r\n                    function getFamilyHxRelationshipList(subFindTableId) {\r\n                        return ListService.getList('subfindtableitems/family-history-relationship/' + subFindTableId)\r\n                            .then(function (data) {\r\n                                familyHxRelationshipList = _(data)\r\n                                    .forEach(function (item) {\r\n                                        item.IsVisible = true;\r\n                                    });\r\n                            });\r\n                    }\r\n\r\n\r\n                    function setAllfamilyHxRelationshipListItemsToVisible() {\r\n                        _.forEach(familyHxRelationshipList, function(item) {\r\n                            item.IsVisible = true;\r\n                        });\r\n                    }\r\n\r\n\r\n                    function setFamilyHxRelationshipListBasedOnMultipleUsage(patientFamilyHistoryId) {\r\n                        _.forEach($scope.questionnaireSection.FamilyHistoryAnswers, function(fhAnswer) {\r\n                            if (fhAnswer.PatientFamilyHistoryId !== patientFamilyHistoryId) {\r\n                                var hxRelationshipItem =  _.find(historyRelationshipList, {Id: fhAnswer.RelationshipId});\r\n                                if (hxRelationshipItem && hxRelationshipItem.AllowMultipleUsage === false) {\r\n                                    var familyHxRelationshipItem = _.find(familyHxRelationshipList, {ItemId: hxRelationshipItem.Id});\r\n                                    if (familyHxRelationshipItem) {\r\n                                        familyHxRelationshipItem.IsVisible = false;\r\n                                    }\r\n                                }\r\n                            }\r\n                        });\r\n                    }\r\n\r\n\r\n                    function loadView() {\r\n                        $rootScope.setupDirectiveScope($scope);\r\n                        $scope.removeHttpError();\r\n                        var familyHxProblemListPromise = getFamilyHxProblemList($scope.questionnaireSection.FamilyHxProblemSubFindTableId);\r\n                        var historyRelationshipListPromise = getHistoryRelationshipList();\r\n                        var familyHxRelationshipListPromise = getFamilyHxRelationshipList($scope.questionnaireSection.FamilyHxRelationshipSubFindTableId);\r\n\r\n                        $q.all([familyHxProblemListPromise, historyRelationshipListPromise, familyHxRelationshipListPromise]).then(function () {\r\n                            $scope.currentSectionId = $scope.questionnaireSectionId;\r\n\r\n                            _.forEach($scope.questionnaireSection.FamilyHistoryAnswers, function(familyHistoryAnswer) {\r\n                                var selectedRelationship = _.find(familyHxRelationshipList, {ItemId: familyHistoryAnswer.RelationshipId});\r\n                                if (selectedRelationship === undefined) {\r\n                                    var relationshipToAdd = _.find(historyRelationshipList, {Id: familyHistoryAnswer.RelationshipId});\r\n                                    if (relationshipToAdd) {\r\n                                        var newItem = {\r\n                                            ItemId: relationshipToAdd.Id,\r\n                                            Name: relationshipToAdd.Name,\r\n                                            SubFindTableId: '00000000-0000-0000-0000-000000000000',\r\n                                            SubFindTableItemId: '00000000-0000-0000-0000-000000000000',\r\n                                            IsVisible: true\r\n                                        };\r\n                                        familyHxRelationshipList.push(newItem);\r\n                                    }\r\n                                }\r\n                            });\r\n                        }).catch(function (response) {\r\n                            $scope.addHttpError(response, '', 'listData');\r\n                        }).finally(function () {\r\n                            $scope.loading = false;\r\n                        });\r\n                    }\r\n                    loadView();\r\n\r\n\r\n                    function getNewProblemHistoryAnswers(problemHistoryAnswers) {\r\n                        _.forEach($scope.familyHxProblemList, function(findTableItem) {\r\n                            problemHistoryAnswers\r\n                                .push(FormsService.getNewProblemHistoryAnswer(\r\n                                    findTableItem.SubFindTableItemId,                // PK for SubFindTableTime table\r\n                                    $scope.questionnaireSection.HistoryGroupId,\r\n                                    findTableItem.ItemId,                            // disease Id\r\n                                    findTableItem.Name));                            // disease name\r\n                        });\r\n                    }\r\n\r\n\r\n                    $scope.addFamilyHistoryInformation = function addFamilyHistoryInformation() {\r\n                        setAllfamilyHxRelationshipListItemsToVisible();\r\n                        setFamilyHxRelationshipListBasedOnMultipleUsage('0');\r\n\r\n                        var familyHistoryAnswer = FormsService.getNewFamilyHistoryAnswer();\r\n                        getNewProblemHistoryAnswers(familyHistoryAnswer.ProblemHistoryAnswers);\r\n\r\n                        var modalInstance = $modal.open({\r\n                            templateUrl: '/forms/views/updateFamilyHistoryModal.html',\r\n                            controller:  'UpdateFamilyHistoryModalCtrl',\r\n                            scope: $scope,\r\n                            //size: 'lg',\r\n                            windowClass: 'modal-full',\r\n                            resolve: {\r\n                                FamilyHxRelationshipId: function() {\r\n                                    return $scope.questionnaireSection.FamilyHxRelationshipSubFindTableId;\r\n                                },\r\n                                FamilyHistoryAnswer: function() {\r\n                                    return familyHistoryAnswer;\r\n                                },\r\n                                HistoryRelationshipList: function() {\r\n                                    return familyHxRelationshipList;\r\n                                }\r\n                            }\r\n                        });\r\n\r\n                        modalInstance.result.then(function (result) {\r\n                            if (result === FormsId.ModalInstanceReturnId.Accept) {\r\n                                $scope.questionnaireSection.FamilyHistoryAnswers.push(familyHistoryAnswer);\r\n                            }\r\n                        });\r\n                    };\r\n\r\n\r\n                    $scope.EditFamilyHistoryAnswer = function EditFamilyHistoryAnswer(familyHistoryAnswer) {\r\n                        setAllfamilyHxRelationshipListItemsToVisible();\r\n                        setFamilyHxRelationshipListBasedOnMultipleUsage(familyHistoryAnswer.PatientFamilyHistoryId);\r\n\r\n                        $modal.open({\r\n                            templateUrl: '/forms/views/updateFamilyHistoryModal.html',\r\n                            controller:  'UpdateFamilyHistoryModalCtrl',\r\n                            scope: $scope,\r\n                            //size: 'lg',\r\n                            windowClass: 'modal-full',\r\n                            resolve: {\r\n                                FamilyHxRelationshipId: function() {\r\n                                    return $scope.questionnaireSection.FamilyHxRelationshipSubFindTableId;\r\n                                },\r\n                                FamilyHistoryAnswer: function() {\r\n                                    return familyHistoryAnswer;\r\n                                },\r\n                                HistoryRelationshipList: function() {\r\n                                    return familyHxRelationshipList;\r\n                                }\r\n                            }\r\n                        });\r\n                    };\r\n\r\n\r\n                    $scope.DeleteFamilyHistoryAnswer = function DeleteFamilyHistoryAnswer(familyHistoryAnswer) {\r\n                        _.pull($scope.questionnaireSection.FamilyHistoryAnswers, familyHistoryAnswer);\r\n                    };\r\n\r\n                }\r\n            };\r\n        }\r\n    ]\r\n);","angular.module('forms').directive('apFormQuestionImmunizationHistory',[\r\n        '$q',\r\n        '$rootScope',\r\n        'FormsId',\r\n        'FormsService',\r\n        'ListService',\r\n        function (\r\n            $q,\r\n            $rootScope,\r\n            FormsId,\r\n            FormsService,\r\n            ListService\r\n            ) {\r\n            'use strict';\r\n\r\n            return {\r\n                restrict: 'E',\r\n                templateUrl: '/forms/views/directives/apFormQuestionImmunizationHistory.html',\r\n                scope: {\r\n                    // Use '@' for one way binding.  String value is returned.\r\n                    // Use '=' for two way binding.  An object is returned.\r\n                    // Use '&' for a method.\r\n                    questionnaireSectionId: '=questionnaireSectionId',\r\n                    questionnaireSection: '=questionnaireSection',\r\n                    loading: '=loading'\r\n                },\r\n                controller: function($scope) {\r\n                    $scope.currentSectionId = '';\r\n                    $scope.adultVaccineList = '';\r\n                    $scope.pediatricVaccineList = '';\r\n\r\n                    $scope.$watch('questionnaireSectionId', function() {\r\n                        if ($scope.currentSectionId === '') {\r\n                            return;\r\n                        }\r\n\r\n                        if ($scope.currentSectionId !== $scope.questionnaireSectionId) {\r\n                            loadView();\r\n                        }\r\n                    });\r\n\r\n\r\n                    function getAdultVaccineList(subFindTableId) {\r\n                        return ListService.getList('subfindtableitems/patient-history-vaccine-adult/' + subFindTableId)\r\n                            .then(function (data) {\r\n                                $scope.adultVaccineList = data;\r\n\r\n                                if ($scope.questionnaireSection.ImmunizationHistoryAnswers.ImmunizationAdultAnswers.length <= 0) {\r\n                                    _.forEach($scope.adultVaccineList, function(vaccineCard) {\r\n                                        $scope.questionnaireSection.ImmunizationHistoryAnswers.ImmunizationAdultAnswers\r\n                                            .push(FormsService.getNewImmunizationHistoryAnswer(\r\n                                                true,\r\n                                                false,\r\n                                                vaccineCard));\r\n                                    });\r\n                                }\r\n                            });\r\n                    }\r\n\r\n\r\n                    function getPediatricVaccineList(subFindTableId) {\r\n                        return ListService.getList('subfindtableitems/patient-history-vaccine-pediatric/' + subFindTableId)\r\n                            .then(function (data) {\r\n                                $scope.pediatricVaccineList = data;\r\n\r\n                                if ($scope.questionnaireSection.ImmunizationHistoryAnswers.ImmunizationPediatricAnswers.length <= 0) {\r\n                                    _.forEach($scope.pediatricVaccineList, function(vaccineCard) {\r\n                                        $scope.questionnaireSection.ImmunizationHistoryAnswers.ImmunizationPediatricAnswers\r\n                                            .push(FormsService.getNewImmunizationHistoryAnswer(\r\n                                                false,          // IsAdultCard\r\n                                                true,           // IsPediatricCard\r\n                                                vaccineCard));\r\n                                    });\r\n                                }\r\n                            });\r\n                    }\r\n\r\n\r\n                    function loadView() {\r\n                        $rootScope.setupDirectiveScope($scope);\r\n                        $scope.removeHttpError();\r\n                        var adultVaccineListPromise = getAdultVaccineList($scope.questionnaireSection.AdultVaccineAdminSubFindTableId);\r\n                        var pediatricVaccineListPromise = getPediatricVaccineList($scope.questionnaireSection.PediatricVaccineAdminSubFindTableId);\r\n\r\n                        $q.all([adultVaccineListPromise, pediatricVaccineListPromise]).then(function () {\r\n                            $scope.currentSectionId = $scope.questionnaireSectionId;\r\n                        }).catch(function (response) {\r\n                            $scope.addHttpError(response, '', 'listData');\r\n                        }).finally(function () {\r\n                            $scope.loading = false;\r\n                        });\r\n                    }\r\n                    loadView();\r\n\r\n\r\n                    $scope.adultTimeFrameSelectedCallback = function adultTimeFrameSelectedCallback(timeFrameId, onsetTimeFrameId) {\r\n                        var ids = timeFrameId.split('_');\r\n                        if (ids.length === 2) {\r\n                            var vaccineAdminId = ids[0];\r\n                            var vaccineAdminItemId = ids[1];\r\n\r\n                            var immunizationCard = _.find($scope.questionnaireSection.ImmunizationHistoryAnswers.ImmunizationAdultAnswers, {VaccineAdminId: vaccineAdminId});\r\n                            if (immunizationCard) {\r\n                                var immunizationItem = _.find(immunizationCard.ImmunizationAnswers, {VaccineAdminItemId: vaccineAdminItemId});\r\n                                if (immunizationItem) {\r\n                                    if ((onsetTimeFrameId.toUpperCase() === FormsId.TimeFrameId.Clear) || (onsetTimeFrameId === '')) {\r\n                                        immunizationItem.Selected = false;\r\n                                        immunizationItem.Notes = '';\r\n                                    } else {\r\n                                        immunizationItem.Selected = true;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    };\r\n\r\n\r\n                    $scope.pediatricTimeFrameSelectedCallback = function pediatricTimeFrameSelectedCallback(timeFrameId, onsetTimeFrameId) {\r\n                        var ids = timeFrameId.split('_');\r\n                        if (ids.length === 2) {\r\n                            var vaccineAdminId = ids[0];\r\n                            var vaccineAdminItemId = ids[1];\r\n\r\n                            var immunizationCard = _.find($scope.questionnaireSection.ImmunizationHistoryAnswers.ImmunizationPediatricAnswers, {VaccineAdminId: vaccineAdminId});\r\n                            if (immunizationCard) {\r\n                                var immunizationItem = _.find(immunizationCard.ImmunizationAnswers, {VaccineAdminItemId: vaccineAdminItemId});\r\n                                if (immunizationItem) {\r\n                                    if ((onsetTimeFrameId.toUpperCase() === FormsId.TimeFrameId.Clear) || (onsetTimeFrameId === '')) {\r\n                                        immunizationItem.Selected = false;\r\n                                        immunizationItem.Notes = '';\r\n                                    } else {\r\n                                        immunizationItem.Selected = true;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    };\r\n\r\n                }\r\n            };\r\n        }\r\n    ]\r\n);","angular.module('forms').directive('apFormQuestionPatientProblemHistory',[\r\n        '$q',\r\n        '$rootScope',\r\n        'FormsId',\r\n        'FormsService',\r\n        'ListService',\r\n        function (\r\n            $q,\r\n            $rootScope,\r\n            FormsId,\r\n            FormsService,\r\n            ListService\r\n            ) {\r\n            'use strict';\r\n\r\n            return {\r\n                restrict: 'E',\r\n                templateUrl: '/forms/views/directives/apFormQuestionPatientProblemHistory.html',\r\n                scope: {\r\n                    // Use '@' for one way binding.  String value is returned.\r\n                    // Use '=' for two way binding.  An object is returned.\r\n                    // Use '&' for a method.\r\n                    questionnaireSectionId: '=questionnaireSectionId',\r\n                    questionnaireSection: '=questionnaireSection',\r\n                    loading: '=loading'\r\n                },\r\n                controller: function($scope) {\r\n                    $scope.findTableItemsProblemHx = '';\r\n                    $scope.currentSectionId = '';\r\n\r\n                    $scope.$watch('questionnaireSectionId', function() {\r\n                        if ($scope.currentSectionId === '') {\r\n                            return;\r\n                        }\r\n\r\n                        if ($scope.currentSectionId !== $scope.questionnaireSectionId) {\r\n                            loadView();\r\n                        }\r\n                    });\r\n\r\n\r\n                    function getFindTableItemsProblemHx(subFindTableId) {\r\n                        return ListService.getList('subfindtableitems/patient-history-problem/' + subFindTableId)\r\n                            .then(function (data) {\r\n                                $scope.findTableItemsProblemHx = data;\r\n\r\n                                if ($scope.questionnaireSection.ProblemHistoryAnswers.length <= 0) {\r\n                                    _.forEach($scope.findTableItemsProblemHx, function(findTableItem) {\r\n                                        $scope.questionnaireSection.ProblemHistoryAnswers\r\n                                            .push(FormsService.getNewProblemHistoryAnswer(\r\n                                                findTableItem.SubFindTableItemId,              // PK for SubFindTableItem table\r\n                                                $scope.questionnaireSection.HistoryGroupId,\r\n                                                findTableItem.ItemId,                          // diseaseId\r\n                                                findTableItem.Name));                          // disease name\r\n                                    });\r\n                                }\r\n                            });\r\n                    }\r\n\r\n\r\n                    function loadView() {\r\n                        $rootScope.setupDirectiveScope($scope);\r\n                        $scope.removeHttpError();\r\n                        var findTableItemsProblemHxPromise = getFindTableItemsProblemHx($scope.questionnaireSection.ProblemHxSubFindTableId);\r\n\r\n                        $q.all([findTableItemsProblemHxPromise]).then(function () {\r\n                            $scope.currentSectionId = $scope.questionnaireSectionId;\r\n                        }).catch(function (response) {\r\n                            $scope.addHttpError(response, '', 'listData');\r\n                        }).finally(function () {\r\n                            $scope.loading = false;\r\n                        });\r\n                    }\r\n                    loadView();\r\n\r\n\r\n                    $scope.timeFrameSelectedCallback = function timeFrameSelectedCallback(timeFrameId, onsetTimeFrameId) {\r\n                        var problemHistoryAnswer = _.find($scope.questionnaireSection.ProblemHistoryAnswers, {ProblemHistoryAnswerId: timeFrameId});\r\n                        if (problemHistoryAnswer) {\r\n                            if ((onsetTimeFrameId.toUpperCase() === FormsId.TimeFrameId.Clear) || (onsetTimeFrameId === '')) {\r\n                                problemHistoryAnswer.Selected = false;\r\n                                problemHistoryAnswer.Notes = '';\r\n                            } else {\r\n                                problemHistoryAnswer.Selected = true;\r\n                            }\r\n                        }\r\n                    };\r\n\r\n                }\r\n            };\r\n        }\r\n    ]\r\n);","angular.module('forms').directive('apSetFocusEvent',\r\n    ['$timeout', '$window',\r\n        function ($timeout, $window) {\r\n            'use strict';\r\n\r\n            return {\r\n                restrict: 'A',\r\n                link: function (scope, element, attrs) {\r\n                    element.on(attrs.apSetFocusEvent, function () {\r\n                        setFocus(attrs.apSetFocusId);\r\n                    });\r\n\r\n                    scope.$on('$destroy', function () {\r\n                        element.off(attrs.apSetFocusEvent);\r\n                    });\r\n\r\n                    function setFocus(id) {\r\n                        $timeout(function () {\r\n                            var element = $window.document.getElementById(id);\r\n                            if (element) {\r\n                                element.focus();\r\n                                /*\r\n                                 if (element.setSelectionRange) {\r\n                                    element.setSelectionRange(0, 0);\r\n                                 } else if (element.createTextRange) {\r\n                                     var range = element.createTextRange();\r\n                                     range.moveStart('character', 0);\r\n                                     range.select();\r\n                                 }\r\n                                 */\r\n                            }\r\n                        });\r\n                    }\r\n                }\r\n            };\r\n        }\r\n    ]\r\n);","angular.module('forms').directive('apTimeFrame',\r\n    ['$q', 'ListService', 'FormsService', 'FormsId',\r\n        function ($q, ListService, FormsService, FormsId) {\r\n            'use strict';\r\n\r\n            return {\r\n                restrict: 'E',\r\n                templateUrl: '/forms/views/directives/apTimeFrame.html',\r\n                scope: {\r\n                    // Use '@' for one way binding.  String value is returned.\r\n                    // Use '=' for two way binding.  An object is returned.\r\n                    // Use '&' for a method.\r\n                    timeFrameId: '=timeFrameId',\r\n                    timeFrameAnswer: '=timeFrameAnswer',\r\n                    timeFrameSelectedCallback: '&timeFrameSelectedCallback',\r\n                    disabled: '=?'\r\n                },\r\n                // use link - use jquery to get a reference to the parent form tag.  then, save reference to $scope.\r\n                // link 4th param $error\r\n                require: '^form',\r\n                link: function(scope, element, attrs, formCtrl) {\r\n                    scope.formRef = formCtrl;\r\n                },\r\n                controller: function($scope) {\r\n                    $scope.tfInputCtrlId  = 'tfInput_'  + $scope.timeFrameId;\r\n                    $scope.calInputCtrlId = 'calInput_' + $scope.timeFrameId;\r\n                    $scope.tfSelCtrlId    = 'tfSel_'    + $scope.timeFrameId;\r\n\r\n                    if ($scope.timeFrameAnswer.OnsetTimeFrameId === FormsId.TimeFrameId.Clear) {\r\n                        $scope.timeFrameAnswer.OnsetTimeFrameId = '';\r\n                    }\r\n                    if ($scope.timeFrameAnswer.OnsetTimeFrameValue !== '') {\r\n                        $scope.timeFrameAnswer.OnsetTimeFrameValue = parseInt($scope.timeFrameAnswer.OnsetTimeFrameValue);\r\n                    }\r\n\r\n                    $scope.timeFrameInputIsVisible = FormsService.timeFrameInputIsVisible($scope.timeFrameAnswer.OnsetTimeFrameId);\r\n                    $scope.calendarInputIsVisible  = FormsService.calendarInputIsVisible($scope.timeFrameAnswer.OnsetTimeFrameId);\r\n\r\n                    $scope.datePickerModel = {\r\n                        showDatePicker: false\r\n                    };\r\n\r\n                    $scope.minDate = moment().subtract(100, 'year');\r\n                    $scope.maxDate = moment();\r\n\r\n\r\n                    function loadView() {\r\n                        var timeFramesPromise = ListService.getList('timeframes', $scope, 'timeFrameTypes');\r\n\r\n                        $q.all([timeFramesPromise]).then(function () {\r\n                            _.remove($scope.timeFrameTypes, {Name: '_'});\r\n                            _.remove($scope.timeFrameTypes, {Name: 'Clear'});\r\n\r\n                            var timeFrameEntryClear = {\r\n                                TimeFrameId : FormsId.TimeFrameId.Clear,\r\n                                Name: '--- Clear Selection ---',\r\n                                Notes: '',\r\n                                DefaultValue: '',\r\n                                UseBirthDate: false,\r\n                                AddToDate: false,\r\n                                TimespanUnitType: 0,\r\n                                TimespanUnitTypeName: '',\r\n                                DisplayOrder: -1\r\n                            };\r\n                            $scope.timeFrameTypes.unshift(timeFrameEntryClear);\r\n                        });\r\n                    }\r\n                    loadView();\r\n\r\n\r\n                    $scope.datePickerChanged = function datePickerChanged() {\r\n                        $scope.datePickerModel.showDatePicker = false;\r\n                    };\r\n\r\n\r\n                    $scope.timeFrameTypeChanged = function timeFrameTypeChanged() {\r\n                        if ($scope.timeFrameAnswer.OnsetTimeFrameId.toUpperCase() === FormsId.TimeFrameId.Clear) {\r\n                            // --- Clear Selection ---\r\n                            $scope.timeFrameAnswer.OnsetTimeFrameId = '';\r\n                            $scope.timeFrameAnswer.OnsetTimeFrameValue = '';\r\n                            $scope.timeFrameAnswer.OnsetTimeFrameDate = '';\r\n                            $scope.timeFrameAnswer.OnsetTimeFrameAnswer = '';\r\n                            $scope.timeFrameInputIsVisible = false;\r\n                            $scope.calendarInputIsVisible = false;\r\n                            $scope.datePickerModel.showDatePicker = false;\r\n\r\n                            $scope.timeFrameSelectedCallback({\r\n                                timeFrameId: $scope.timeFrameId,\r\n                                onsetTimeFrameId: $scope.timeFrameAnswer.OnsetTimeFrameId\r\n                            });\r\n\r\n                            return;\r\n                        }\r\n\r\n                        $scope.timeFrameAnswer.OnsetTimeFrameAnswer = '';\r\n                        var timeFrameItem = _.find($scope.timeFrameTypes, {TimeFrameId: $scope.timeFrameAnswer.OnsetTimeFrameId});\r\n                        if (timeFrameItem) {\r\n                            $scope.timeFrameAnswer.OnsetTimeFrameAnswer = timeFrameItem.Name;\r\n                        }\r\n\r\n                        if ($scope.timeFrameAnswer.OnsetTimeFrameId.toUpperCase() === FormsId.TimeFrameId.Calendar) {\r\n                            $scope.timeFrameAnswer.OnsetTimeFrameValue = '';\r\n                            $scope.timeFrameAnswer.OnsetTimeFrameDate = '';\r\n                            $scope.timeFrameInputIsVisible = false;\r\n                            $scope.calendarInputIsVisible = true;\r\n                            $scope.datePickerModel.showDatePicker = true;\r\n\r\n                            $scope.timeFrameSelectedCallback({\r\n                                timeFrameId: $scope.timeFrameId,\r\n                                onsetTimeFrameId: $scope.timeFrameAnswer.OnsetTimeFrameId\r\n                            });\r\n\r\n                            return;\r\n                        }\r\n\r\n                        $scope.calendarInputIsVisible = false;\r\n                        $scope.datePickerModel.showDatePicker = false;\r\n\r\n                        var isTimeFrameInputVisible = true;\r\n\r\n                        if ($scope.timeFrameAnswer.OnsetTimeFrameId.toUpperCase() === FormsId.TimeFrameId.DaysAgo) {\r\n                            isTimeFrameInputVisible = true;\r\n                        }\r\n                        else if ($scope.timeFrameAnswer.OnsetTimeFrameId.toUpperCase() === FormsId.TimeFrameId.WeeksAgo) {\r\n                            isTimeFrameInputVisible = true;\r\n                        }\r\n                        else if ($scope.timeFrameAnswer.OnsetTimeFrameId.toUpperCase() === FormsId.TimeFrameId.MonthsAgo) {\r\n                            isTimeFrameInputVisible = true;\r\n                        }\r\n                        else if ($scope.timeFrameAnswer.OnsetTimeFrameId.toUpperCase() === FormsId.TimeFrameId.YearsAgo) {\r\n                            isTimeFrameInputVisible = true;\r\n                        }\r\n                        else if ($scope.timeFrameAnswer.OnsetTimeFrameId.toUpperCase() === FormsId.TimeFrameId.Childhood) {\r\n                            isTimeFrameInputVisible = false;\r\n                        }\r\n                        else if ($scope.timeFrameAnswer.OnsetTimeFrameId.toUpperCase() === FormsId.TimeFrameId.Teenager) {\r\n                            isTimeFrameInputVisible = false;\r\n                        }\r\n                        else if ($scope.timeFrameAnswer.OnsetTimeFrameId.toUpperCase() === FormsId.TimeFrameId.Birth) {\r\n                            isTimeFrameInputVisible = false;\r\n                        }\r\n\r\n                        $scope.timeFrameAnswer.OnsetTimeFrameValue = '';\r\n                        $scope.timeFrameAnswer.OnsetTimeFrameDate = '';\r\n                        $scope.timeFrameInputIsVisible = isTimeFrameInputVisible;\r\n\r\n                        $scope.timeFrameSelectedCallback({\r\n                            timeFrameId: $scope.timeFrameId,\r\n                            onsetTimeFrameId: $scope.timeFrameAnswer.OnsetTimeFrameId\r\n                        });\r\n                    };\r\n\r\n                }\r\n            };\r\n        }\r\n    ]\r\n);","angular.module('forms').factory('FormsRepository',\r\n    ['AprimaRestangular', function (AprimaRestangular) {\r\n        'use strict';\r\n\r\n        function getAssignedQuestionnaires(userId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('patients/' + userId + '/questionnaires-assigned').get();\r\n        }\r\n\r\n        function getQuestionnaireDetails(userId, relSurveyPatientId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('patients/' + userId + '/questionnaire-view-details/' + relSurveyPatientId).get();\r\n        }\r\n\r\n        function getPatientQuestionnaire(userId, relSurveyPatientId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('patients/' + userId + '/questionnaire/' + relSurveyPatientId).get();\r\n        }\r\n\r\n        function putPatientQuestionnaire(patientQuestionnaireDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular\r\n                .one('patients/' + patientQuestionnaireDto.PatientId + '/questionnaire/' + patientQuestionnaireDto.RelSurveyPatientId)\r\n                .customPUT(patientQuestionnaireDto);\r\n        }\r\n\r\n        function getAssignedPracticeForms(userId, searchCriteriaDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('patients/' + userId).customGET('forms', searchCriteriaDto);\r\n        }\r\n\r\n\r\n        function getPracticeFormAttachment(patientId, attachmentId, relPracticeFormPatientId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            var queryString = '?relPracticeFormPatientId=' + relPracticeFormPatientId;\r\n            return restangular.one('patients/' + patientId + '/forms-attachment/' + attachmentId + queryString).get();\r\n        }\r\n\r\n\r\n        function getPracticeFormImage(patientId, attachmentId, relPracticeFormPatientId, requestSettings) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            var queryString = '?relPracticeFormPatientId=' + relPracticeFormPatientId + '&height=' + requestSettings.height + '&width=' + requestSettings.width + '&page=' + requestSettings.page;\r\n            return restangular.one('patients/' + patientId + '/forms-attachment/' + attachmentId + queryString).get();\r\n        }\r\n\r\n        // [Route(\"api/patient/v1/patients/{patientId:guid}/forms-attachment/{attachmentId:guid}/update-download-date\"/)]\r\n        function updatePracticeFormDownloadDate(patientId, attachmentId, updateDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular\r\n                .one('patients/' + patientId + '/forms-attachment/' + attachmentId + '/update-download-date')\r\n                .customPUT(updateDto);\r\n        }\r\n\r\n        //[Route(\"api/patient/v1/patients/{patientId:guid}/forms-attachment/{attachmentId:guid}/update-upload-date\")]\r\n        function updatePracticeFormUploadDate(patientId, attachmentId, updateDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular\r\n                .one('patients/' + patientId + '/forms-attachment/' + attachmentId + '/update-upload-date')\r\n                .customPUT(updateDto);\r\n        }\r\n\r\n\r\n        //[Route(\"api/patient/v1/patients/{patientId:guid}/forms-attachment/{attachmentId:guid}/create-approval\")]\r\n        function createApprovalMessage(patientId, model) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular\r\n                .one('patients/' + patientId + '/forms-attachment/create-approval')\r\n                .customPOST(model);\r\n        }\r\n\r\n\r\n        return {\r\n            getAssignedQuestionnaires: getAssignedQuestionnaires,\r\n            getPatientQuestionnaire: getPatientQuestionnaire,\r\n            getQuestionnaireDetails: getQuestionnaireDetails,\r\n            putPatientQuestionnaire: putPatientQuestionnaire,\r\n            getAssignedPracticeForms: getAssignedPracticeForms,\r\n            getPracticeFormAttachment: getPracticeFormAttachment,\r\n            updatePracticeFormDownloadDate: updatePracticeFormDownloadDate,\r\n            updatePracticeFormUploadDate: updatePracticeFormUploadDate,\r\n            getPracticeFormImage: getPracticeFormImage,\r\n            createApprovalMessage : createApprovalMessage\r\n        };\r\n\r\n    }]);","angular.module('forms').factory('FormsService',\r\n    ['FormsId', 'storage',\r\n        function (FormsId, storage) {\r\n            'use strict';\r\n\r\n            var completedForm = {\r\n                Form: {Id: '', Name: ''},\r\n                Patient: {Id: ''}\r\n            };\r\n\r\n            function timeFrameInputIsVisible(timeFrameId) {\r\n                if (timeFrameId && timeFrameId.toUpperCase() === FormsId.TimeFrameId.DaysAgo) {\r\n                    return true;\r\n                }\r\n                if (timeFrameId && timeFrameId.toUpperCase() === FormsId.TimeFrameId.WeeksAgo) {\r\n                    return true;\r\n                }\r\n                if (timeFrameId && timeFrameId.toUpperCase() === FormsId.TimeFrameId.MonthsAgo) {\r\n                    return true;\r\n                }\r\n                if (timeFrameId && timeFrameId.toUpperCase() === FormsId.TimeFrameId.YearsAgo) {\r\n                    return true;\r\n                }\r\n                return false;\r\n            }\r\n\r\n            function calendarInputIsVisible(timeFrameId) {\r\n                if (timeFrameId.toUpperCase() === FormsId.TimeFrameId.Calendar) {\r\n                    return true;\r\n                } else {\r\n                    return false;\r\n                }\r\n            }\r\n\r\n            function cacheCompletedForm(cacheForm) {\r\n                completedForm.Form.Id = cacheForm.Form.Id;\r\n                completedForm.Form.Name = cacheForm.Form.Name;\r\n                completedForm.Patient.Id = cacheForm.Patient.Id;\r\n            }\r\n\r\n            function clearCompletedForm() {\r\n                completedForm.Form.Id = '';\r\n                completedForm.Form.Name = '';\r\n                completedForm.Patient.Id = '';\r\n            }\r\n\r\n            function getCompletedForm() {\r\n                return completedForm;\r\n            }\r\n\r\n            function getNewProblemHistoryAnswer(problemHistoryAnswerId, historyGroupId, diseaseId, name) {\r\n                var problemHistoryAnswer = {\r\n                    CameFromPatientChart: false,\r\n                    ProblemHistoryAnswerId: problemHistoryAnswerId,\r\n                    HistoryGroupId: historyGroupId,\r\n                    DiseaseId: diseaseId,\r\n                    DiseaseName: name,\r\n                    Selected: false,\r\n                    CauseOfDeath: false,\r\n                    Denies: false,\r\n                    OnsetTimeFrame: {\r\n                        OnsetTimeFrameId: '',\r\n                        OnsetTimeFrameValue: '',\r\n                        OnsetTimeFrameDate: '',\r\n                        OnsetTimeFrameAnswer: ''\r\n                    }\r\n                };\r\n\r\n                return problemHistoryAnswer;\r\n            }\r\n\r\n            function getNewFamilyHistoryAnswer() {\r\n                var familyHistoryAnswer = {\r\n                    CameFromPatientChart: false,\r\n                    RelationshipId: '',\r\n                    RelationshipName: '',\r\n                    IsRelationshipMaternal: '',\r\n                    IsRelationshipPaternal: '',\r\n                    IsRelationshipUnknown: '',\r\n                    FirstName: '',\r\n                    LastName: '',\r\n                    BirthDateTimeFrame: {\r\n                        OnsetTimeFrameId: '',\r\n                        OnsetTimeFrameValue: '',\r\n                        OnsetTimeFrameDate: ''\r\n                    },\r\n                    DeathDateTimeFrame: {\r\n                        OnsetTimeFrameId: '',\r\n                        OnsetTimeFrameValue: '',\r\n                        OnsetTimeFrameDate: ''\r\n                    },\r\n                    NoKnownDiseases: false,\r\n                    ProblemHistoryAnswers: []\r\n                };\r\n\r\n                return familyHistoryAnswer;\r\n            }\r\n\r\n            function getNewImmunizationHistoryAnswer(isAdultCard, isPediatricCard, vaccineCard) {\r\n                var immunizationCard = {\r\n                    IsAdultCard: isAdultCard,\r\n                    IsPediatricCard: isPediatricCard,\r\n                    ImmunizationAnswers: []\r\n                };\r\n\r\n                if (vaccineCard) {\r\n                    immunizationCard.VaccineAdminId = vaccineCard.VaccineAdminId;\r\n                    immunizationCard.VaccineAdminName = vaccineCard.Name;\r\n                    immunizationCard.Inactive = vaccineCard.Inactive;\r\n\r\n                    if (vaccineCard.PatientImmunizationCardItems) {\r\n                        _.forEach(vaccineCard.PatientImmunizationCardItems, function (vaccineItem) {\r\n                            var item = {\r\n                                VaccineAdminItemId: vaccineItem.VaccineAdminItemId,\r\n                                VaccineId: vaccineItem.VaccineId,\r\n                                VaccineName: vaccineItem.PatientImmunization.Name,\r\n                                VaccineInactive: vaccineItem.PatientImmunization.Inactive,\r\n                                TypeofVaccineId: vaccineItem.TypeofVaccineId,\r\n                                DisplayOrder: vaccineItem.DisplayOrder,\r\n                                Inactive: vaccineItem.Inactive,\r\n                                Selected: false,\r\n                                OnsetTimeFrame: {\r\n                                    OnsetTimeFrameId: '',\r\n                                    OnsetTimeFrameValue: '',\r\n                                    OnsetTimeFrameDate: ''\r\n                                },\r\n                                VaccineAdminIdVaccineAdminItemId: vaccineCard.VaccineAdminId + '_' + vaccineItem.VaccineAdminItemId\r\n                            };\r\n                            immunizationCard.ImmunizationAnswers.push(item);\r\n                        });\r\n                    }\r\n                }\r\n\r\n                return immunizationCard;\r\n            }\r\n\r\n            function removeLocalStorageKeys(startsWith) {\r\n                if (startsWith.length === 0) {\r\n                    return;\r\n                }\r\n\r\n                var len = startsWith.length;\r\n                _.forEach(storage.getKeys(), function(key) {\r\n                    if (key.substring(0, len) === startsWith) {\r\n                        storage.remove(key);\r\n                    }\r\n                });\r\n            }\r\n\r\n            return {\r\n                getCompletedForm: getCompletedForm,\r\n                cacheCompletedForm: cacheCompletedForm,\r\n                clearCompletedForm: clearCompletedForm,\r\n                timeFrameInputIsVisible: timeFrameInputIsVisible,\r\n                calendarInputIsVisible: calendarInputIsVisible,\r\n                getNewProblemHistoryAnswer: getNewProblemHistoryAnswer,\r\n                getNewFamilyHistoryAnswer: getNewFamilyHistoryAnswer,\r\n                getNewImmunizationHistoryAnswer: getNewImmunizationHistoryAnswer,\r\n                removeLocalStorageKeys: removeLocalStorageKeys\r\n            };\r\n\r\n        }]);","angular.module('billing', [\r\n    //third party\r\n    'angularLocalStorage',\r\n    'gettext',\r\n    'headroom',\r\n    'lodash',\r\n    'ngAnimate',\r\n    'ngTouch',\r\n    'ngMessages',\r\n    'restangular',\r\n    'toaster',\r\n    'ui.bootstrap',\r\n    'ui.router',\r\n    'apEasyScroller',\r\n\r\n    'aprima-core',\r\n    'aprima-bridge',\r\n    'aprima-config',\r\n    'aprima-legacy-common',\r\n    'aprima-provider-api',\r\n    'aprima-patient-api',\r\n    'aprima-utils'\r\n]);","angular.module('billing').config(['AppRoutesProvider', '$stateProvider',\r\n    function (AppRoutesProvider, $stateProvider) {\r\n        'use strict';\r\n\r\n        var portalSettings = { toolbarItem: 'billing' };\r\n\r\n        var appRoutes = {\r\n            'billing': {\r\n                state: 'navigationBilling',\r\n                route: '/navigationBilling',\r\n                portalSettings: portalSettings\r\n            },\r\n            'paymentOptions': {\r\n                state: 'paymentOptions',\r\n                route: '/paymentOptions/:amount/:merchantId?financialCenterUid',\r\n                portalSettings: portalSettings\r\n            },\r\n            'paymentFromConsent': {\r\n                state: 'paymentOptions.paymentFromConsent',\r\n                route: '/paymentFromConsent/:consentId',\r\n                portalSettings: portalSettings\r\n            },\r\n            'paymentFromNewCard': {\r\n                state: 'paymentOptions.paymentFromNewCard',\r\n                route: '/paymentFromNewCard',\r\n                portalSettings: portalSettings\r\n            },\r\n            'transactionComplete': {\r\n                state: 'transactionComplete',\r\n                route: '/transactionComplete/',\r\n                portalSettings: {\r\n                    hideHeader: true,\r\n                    hideToolbar: true,\r\n                    hideFooter: true\r\n                }\r\n            },\r\n            'paymentSummary': {\r\n                state: 'paymentSummary',\r\n                route: '/paymentSummary/:txId',\r\n                portalSettings: portalSettings\r\n            },\r\n            //statements only routes//\r\n            'paymentStatementsOnly': {\r\n                state: 'paymentStatementsOnly',\r\n                route: '/paymentStatementsOnly',\r\n                portalSettings: {\r\n                    hideHeader: true,\r\n                    hideToolbar: true,\r\n                    hideFooter: false\r\n                }\r\n            },\r\n            'paymentFromNewCardStatementsOnly': {\r\n                state: 'paymentOptionsStatementsOnly.paymentFromNewCardStatementsOnly',\r\n                route: '/paymentFromNewCardStatementsOnly',\r\n                portalSettings: {\r\n                    hideHeader: true,\r\n                    hideToolbar: true,\r\n                    hideFooter: false\r\n                }\r\n            },\r\n            'paymentOptionsStatementsOnly': {\r\n                state: 'paymentOptionsStatementsOnly',\r\n                route: '/paymentOptionsStatementsOnly/:amount/:merchantId?financialCenterUid',\r\n                portalSettings: {\r\n                    hideHeader: true,\r\n                    hideToolbar: true,\r\n                    hideFooter: false\r\n                }\r\n            },\r\n            'paymentFromConsentStatementsOnly': {\r\n                state: 'paymentOptionsStatementsOnly.paymentFromConsentStatementsOnly',\r\n                route: '/paymentFromConsentStatementsOnly/:consentId',\r\n                portalSettings: {\r\n                    hideHeader: true,\r\n                    hideToolbar: true,\r\n                    hideFooter: false\r\n                }\r\n            },\r\n            'paymentSummaryStatementsOnly': {\r\n                state: 'paymentSummaryStatementsOnly',\r\n                route: '/paymentSummaryStatementsOnly/:txId',\r\n                portalSettings: {\r\n                    hideHeader: true,\r\n                    hideToolbar: true,\r\n                    hideFooter: false\r\n                }\r\n            }\r\n        };\r\n\r\n        AppRoutesProvider.setupAppRoutes(appRoutes);\r\n\r\n        $stateProvider\r\n            .state(appRoutes.billing.state, {\r\n                url: appRoutes.billing.route,\r\n                templateUrl: '/billing/views/billing.html',\r\n                controller: 'BillingCtrl',\r\n                description: '/Billing',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Billing'); }\r\n                }\r\n            })\r\n            .state(appRoutes.paymentOptions.state, {\r\n                url: appRoutes.paymentOptions.route,\r\n                templateUrl: '/billing/views/paymentOptions.html',\r\n                controller: 'PaymentOptionsCtrl',\r\n                description: '/Billing',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Make A Payment'); }\r\n                }\r\n            })\r\n            .state(appRoutes.paymentFromConsent.state, {\r\n                url: appRoutes.paymentFromConsent.route,\r\n                templateUrl: '/billing/views/partials/paymentFromConsent.html',\r\n                controller: 'PaymentFromConsentCtrl',\r\n                description: '/Billing'\r\n            })\r\n            .state(appRoutes.paymentFromNewCard.state, {\r\n                url: appRoutes.paymentFromNewCard.route,\r\n                templateUrl: '/billing/views/partials/paymentFromNewCard.html',\r\n                controller: 'PaymentFromNewCardCtrl',\r\n                description: '/Billing'\r\n            })\r\n            .state(appRoutes.transactionComplete.state, {\r\n                url: appRoutes.transactionComplete.route,\r\n                templateUrl: '/billing/views/transactionComplete.html',\r\n                controller: 'TransactionCompleteCtrl',\r\n                description: '/Billing'\r\n            })\r\n            .state(appRoutes.paymentSummary.state, {\r\n                url: appRoutes.paymentSummary.route,\r\n                templateUrl: '/billing/views/paymentSummary.html',\r\n                controller: 'PaymentSummaryCtrl',\r\n                description: '/Billing',\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Make A Payment'); }\r\n                }\r\n            })\r\n            ///statements only routes///\r\n            .state(appRoutes.paymentSummaryStatementsOnly.state, {\r\n                url: appRoutes.paymentSummaryStatementsOnly.route,\r\n                templateUrl: '/billing/views/paymentSummary.html',\r\n                controller: 'PaymentSummaryCtrl',\r\n                description: '/Billing',\r\n                alternativeLoginRoute : true,\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Make A Payment'); }\r\n                }\r\n            })\r\n            .state(appRoutes.paymentStatementsOnly.state, {\r\n                url: appRoutes.paymentStatementsOnly.route,\r\n                templateUrl: '/billing/views/paymentStatementsOnly.html',\r\n                controller: 'BillingCtrl',\r\n                description: '/Billing',\r\n                alternativeLoginRoute : true\r\n            })\r\n            .state(appRoutes.paymentFromNewCardStatementsOnly.state, {\r\n                url: appRoutes.paymentFromNewCardStatementsOnly.route,\r\n                templateUrl: '/billing/views/partials/paymentFromNewCard.html',\r\n                controller: 'PaymentFromNewCardCtrl',\r\n                description: '/Billing',\r\n                alternativeLoginRoute : true\r\n            })\r\n            .state(appRoutes.paymentOptionsStatementsOnly.state, {\r\n                url: appRoutes.paymentOptionsStatementsOnly.route,\r\n                templateUrl: '/billing/views/paymentOptions.html',\r\n                controller: 'PaymentOptionsCtrl',\r\n                description: '/Billing',\r\n                alternativeLoginRoute : true,\r\n                resolve: {\r\n                    $title: function (gettextCatalog) { return gettextCatalog.getString('Make A Payment'); }\r\n                }\r\n            })\r\n            .state(appRoutes.paymentFromConsentStatementsOnly.state, {\r\n                url: appRoutes.paymentFromConsentStatementsOnly.route,\r\n                templateUrl: '/billing/views/partials/paymentFromConsent.html',\r\n                controller: 'PaymentFromConsentCtrl',\r\n                description: '/Billing',\r\n                alternativeLoginRoute : true\r\n            })\r\n        ;\r\n    }]);","angular.module('billing').run(['$templateCache', function($templateCache) {\n  'use strict';\r\n\r\n  $templateCache.put('/billing/views/billing.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-primary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-body panel-flush\\\" ng-class=\\\"(modalPrint)?'hidden-print':''\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-subheading-messages\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <span>{{::'This information is associated to you (' + loginUser.fullName + ') as a responsible party.' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"viewMakeAPaymentFeature\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-subheading\\\" >\\r\" +\r\n    \"\\n\" +\r\n    \"                    <span >{{::'Total Responsible Party Balance' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"text-center\\\" ng-if=\\\"loadingBillingAccount\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"!loadingBillingAccount\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"row panel-row-no-border-bottom\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-6 col-md-4 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"large-description\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <ap-date-formatter date=\\\"{{model.Date}}\\\" format=\\\"long-abb-date\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-6 col-md-4 col-flush text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"large-description\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Total Responsible Party Balance' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"large-date\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::model.PersonBalanceAll | currency}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"col-xs-12 col-md-4 col-flush\\\" ng-if=\\\"!model.DepositByFinancialCenterEnabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"align-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <button class=\\\"btn btn-primary\\\" ng-click=\\\"makeGenericOnlinePayment()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{::'Make Online Payment' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"body-text\\\" ng-show=\\\"model.ConsentAnnual.CardType\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{::'You have a card on file:' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{model.ConsentAnnual.CardType}}&nbsp;{{model.ConsentAnnual.ExpDate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-if=\\\"model.DepositByFinancialCenterEnabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"row panel-row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-6 col-md-4 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"large-description\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    Financial Centers\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-6 col-md-4 text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"large-description\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    Statement Balances\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"row panel-row-no-border-bottom\\\" ng-repeat=\\\"balance in model.FinancialCenterBalances\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-6 col-md-4 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"large-description\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{balance.FinancialCenterName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-6 col-md-4 text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"large-description\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{balance.Balance | currency}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12 col-md-4 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"align-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <button class=\\\"btn btn-primary\\\" ng-click=\\\"makeSpecificOnlinePayment({{balance}})\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{::'Make Online Payment' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"body-text\\\" ng-show=\\\"model.ConsentAnnual.CardType\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{::'You have a card on file:' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{model.ConsentAnnual.CardType}}&nbsp;{{model.ConsentAnnual.ExpDate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"viewMakeAPaymentFeature\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-subheading panel-no-pending-appointments-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Pending Payments' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-if=\\\"loadingPaymentHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"text-center\\\" ng-if=\\\"loadingPaymentHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-if=\\\"!loadingPaymentHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"body-text\\\" ng-if=\\\"!model.PaymentHistory.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{'No pending payments' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"panel-list-padding\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-repeat=\\\"payment in model.PaymentHistory\\\" class=\\\"row panel-row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-10 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-6 col-md-8 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div class=\\\"col-xs-12 col-xs-flush col-md-5\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <ap-date-formatter date=\\\"{{::payment.Date}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                       format=\\\"short-date\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div class=\\\"col-xs-12 col-xs-flush col-md-7 text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{::payment.LastName}},&nbsp;{{::payment.FirstName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    {{::payment.SourceOfPayment}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-6 col-md-4 col-flush text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{::payment.Amount | currency}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-2 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <button class=\\\"btn btn-default1 pull-right\\\" ng-click=\\\"viewReceipt(payment.TxId)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{::'View' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"viewLedgerFeature || viewStatementFeature\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Reports' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row panel-row-no-border-bottom\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 col-flush text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button class=\\\"btn btn-default1\\\" ng-if=\\\"viewLedgerFeature && ledgerAvailable\\\" ng-click=\\\"viewLedgerPdf()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{'View Ledger' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <span ng-if=\\\"!ledgerAvailable\\\">{{::'No ledger found' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"viewStatementFeature\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-subheading panel-no-pending-appointments-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Statement History' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-if=\\\"loadingStatementHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"text-center\\\" ng-if=\\\"loadingStatementHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-if=\\\"!loadingStatementHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"body-text\\\" ng-if=\\\"!model.StatementHistory.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{'No statements found' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-repeat=\\\"statement in model.StatementHistory\\\" class=\\\"row panel-row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-md-3 col-xs-2 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <ap-date-formatter date=\\\"{{::statement.Date}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                           format=\\\"short-date\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-md-3 col-xs-3 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{::statement.FinancialCenterName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-md-2 col-xs-2 col-flush text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{::statement.Balance | currency}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-md-3 col-xs-4 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"row\\\" ng-show=\\\"statement.IsViewable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                                <i class=\\\"fa fa-file fa-lg\\\"></i>&nbsp;\\r\" +\r\n    \"\\n\" +\r\n    \"                                                    <a ng-click=\\\"viewStatementHistoryItem(statement)\\\"><u>{{::'View Statement' | translate}}</u></a>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </span>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div ng-show=\\\"!statement.IsViewable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{::'Unavailable' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-md-1 col-xs-1 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <button ap-save-to-file=\\\"downloadStatementHistoryItem(statement)\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                ><i ng-show=\\\"!statement.Downloading\\\" class=\\\"fa fa-download\\\"></i><ap-spinner ng-show=\\\"statement.Downloading\\\"></ap-spinner></button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'An error has occurred and the patient billing could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'You do not have access to this patient\\\\'s billing.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/billing/views/modals/confirmPaymentModal.html',\r\n    \"<div class=\\\"modal-content\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"cancel()\\\"><span>&times;</span></button>\\r\" +\r\n    \"\\n\" +\r\n    \"        <h4 class=\\\"modal-title\\\">{{::'Payment Summary' | translate}}</h4>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6 text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <label>{{'Card Type' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <p>{{consentAnnual.CardType}}</p>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6 text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <label>{{'Mask' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <p>{{consentAnnual.Mask}}</p>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6 text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <label>{{'Exp Date' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <p>{{consentAnnual.ExpDate}}</p>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6 text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <label>{{'Amount' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <p>{{chargeAmount | currency}}</p>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-footer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <button type=\\\"button\\\" class=\\\"btn btn-default btn-lg pull-left\\\" ng-click=\\\"cancel()\\\">{{::'Close' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6 col-flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <button\\r\" +\r\n    \"\\n\" +\r\n    \"                        class=\\\"btn btn-primary btn-lg pull-right\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-disabled=\\\"sending\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-click=\\\"accept()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Submit Payment' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/billing/views/modals/ledgerModal.html',\r\n    \"<div class=\\\"modal-dialog-report\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"cancel()\\\"><span>&times;</span></button>\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"modal-subtitle\\\">{{'Ledger' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loadingLedger\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loadingLedger\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loadingLedger\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <iframe ng-src=\\\"{{model.LedgerData}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            </iframe>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <span>{{'Unable to view? Download ' | translate}}<a\\r\" +\r\n    \"\\n\" +\r\n    \"                    ap-save-pdf-to-file=\\\"{{model.ByteArray}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    file-name=\\\"{{model.PdfFileName}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    content-type=\\\"{{model.ContentType}}\\\">{{'here.' | translate}}</a></span>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-footer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"btn btn-default2 btn-lg\\\" ng-click=\\\"ok()\\\">{{::'Close' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/billing/views/modals/receiptModal.html',\r\n    \"<div class=\\\"modal-dialog modal-dialog-print\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-body\\\" ng-if=\\\"!loadingReceipt\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"cancel()\\\"><span>&times;</span></button>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"receipt-margin\\\" ng-bind-html=\\\"model.ReceiptHtml\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-show=\\\"!model.ReceiptHtml\\\">{{'Error generating receipt.' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"loadingReceipt\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center\\\" ng-show=\\\"loadingReceipt\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-footer hidden-print\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <button type=\\\"button\\\" class=\\\"btn btn-default1 btn-lg pull-left\\\" ng-click=\\\"print()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Print' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"col-xs-6 col-flush-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <button type=\\\"button\\\" class=\\\"btn btn-default btn-lg pull-right\\\" ng-click=\\\"ok()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Close' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/billing/views/modals/statementModal.html',\r\n    \"<div class=\\\"modal-dialog-report\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-header\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"cancel()\\\"><span>&times;</span></button>\\r\" +\r\n    \"\\n\" +\r\n    \"        <span class=\\\"modal-subtitle\\\">{{'Statement' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loadingStatement\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loadingStatement\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loadingStatement\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <iframe ng-src=\\\"{{model.StatementData}}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            </iframe>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"              <span>{{'Unable to view? Download ' | translate}}<a\\r\" +\r\n    \"\\n\" +\r\n    \"                      ap-save-pdf-to-file=\\\"{{model.ByteArray}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                      file-name=\\\"{{model.PdfFileName}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                      content-type=\\\"{{model.ContentType}}\\\">{{'here.' | translate}}</a></span>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"modal-footer\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <button type=\\\"button\\\" class=\\\"btn btn-default2 btn-lg\\\" ng-click=\\\"ok()\\\">{{::'Close' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/billing/views/partials/paymentFromConsent.html',\r\n    \"<form name=\\\"paymentFromConsentForm\\\" ng-submit=\\\"submit()\\\" novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"!loadingBillingAccount && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-12 col-md-8 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"form-group\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    ng-class=\\\"{ 'has-error' : (paymentFromConsentForm.ChargeAmount.$invalid\\r\" +\r\n    \"\\n\" +\r\n    \"                                                            && (paymentFromConsentForm.ChargeAmount.$dirty\\r\" +\r\n    \"\\n\" +\r\n    \"                                                                    || paymentFromConsentForm.isSubmitted))}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <label class=\\\"control-label\\\">{{::'Enter payment amount' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                <input class=\\\"form-control\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        id=\\\"ChargeAmount\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        name=\\\"ChargeAmount\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-model=\\\"payment.ChargeAmount\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-pattern=\\\"chargeRegEx\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-required=\\\"true\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        ng-max=\\\"maxPaymentAmount\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        type=\\\"number\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        >\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-messages=\\\"paymentFromConsentForm.ChargeAmount.$error\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                        class=\\\"has-error\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-message=\\\"required\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-message=\\\"pattern\\\">{{'Invalid amount' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div ng-message=\\\"max\\\">{{'Amount exceeds remaining amount or per charge limit' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-4 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <button\\r\" +\r\n    \"\\n\" +\r\n    \"                    id=\\\"cancel-btn\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    class=\\\"btn btn-default2 btn-lg pull-left\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    ng-disabled=\\\"sending\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    data-transition-to=\\\"{appRoute: 'billing'}\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'Cancel' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-4\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <button type=\\\"submit\\\" class=\\\"btn btn-primary btn-lg pull-right\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                    ng-disabled=\\\"sending\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <span class=\\\"ng-hide\\\" ng-show=\\\"submitPaymentLoading\\\"><ap-spinner></ap-spinner></span>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{'Review Payment' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div ng-if=\\\"!loadingBillingAccount\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <ap-confirm-payment\\r\" +\r\n    \"\\n\" +\r\n    \"                post-method=\\\"postPayment\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                consent-annual=\\\"payment.ConsentAnnual\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                charge-amount=\\\"payment.ChargeAmount\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                ></ap-confirm-payment>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</form>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"<div ng-if=\\\"loadingBillingAccount || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"text-center\\\" ng-show=\\\"loadingBillingAccount\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"        {{\\\"An error has occurred and make a payment could not be loaded.\\\" | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"        {{\\\"You do not have access to make a payment online.\\\"| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/billing/views/partials/paymentFromNewCard.html',\r\n    \"<div ng-if=\\\"!loadingBillingAccount && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <form name=\\\"appointmentRequestForm\\\" novalidate>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"col-xs-12 col-md-8 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <label class=\\\"control-label\\\">{{::'Enter Payment Details' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"!loadingUrl\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <ap-payment-frame [url]=\\\"model.OneTimePaymentUrl\\\" (apply-payment)=\\\"redirectUrlPostBack($event)\\\"></ap-payment-frame>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div ng-if=\\\"loadingUrl\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"text-center\\\" ng-show=\\\"loadingUrl\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </form>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\\r\" +\r\n    \"\\n\" +\r\n    \"<div ng-if=\\\"loadingBillingAccount || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"text-center\\\" ng-show=\\\"loadingBillingAccount\\\"><ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"        {{\\\"An error has occurred and the page could not be loaded.\\\" | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"    <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"        {{\\\"You do not have access to this page.\\\"| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"    </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/billing/views/paymentOptions.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t<div class=\\\"panel panel-primary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t<div class=\\\"panel-heading-appointments panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Make A Payment' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t<div ng-if=\\\"!loadingBillingAccount && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t<div class=\\\"panel-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t<div class=\\\"panel-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Statement' | translate}}&nbsp:&nbsp<ap-date-formatter date=\\\"{{model.Date}}\\\" format=\\\"long-abb-date\\\"/>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t<div class=\\\"row panel-row-no-border-bottom\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t<div class=\\\"col-xs-12 col-md-3 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t<div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t<label>{{::'Balance' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t<p class=\\\"large-date\\\">{{::model.PersonBalanceAll | currency}}</p>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t<div class=\\\"col-xs-12 col-md-9 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t<div class=\\\"form-group\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t<label class=\\\"control-label\\\">{{::'Select payment method' | translate}}</label>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t<select class=\\\"form-control arrow-dropdown\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tname=\\\"PaymentMethod\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tng-model=\\\"model.PaymentMethodSelect\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tng-change=\\\"paymentMethodSelected()\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tng-options=\\\"method.Name for method in PaymentMethodList\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t</select>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t<div class=\\\"row panel-row-no-border-bottom\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t<div class=\\\"col-xs-12 col-md-4 col-flush-left\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t<div ng-if=\\\"viewMakeAPaymentFeature\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t<div class=\\\"panel-subheading panel-no-pending-appointments-subheading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t{{::'Pending Payments' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t<div ng-if=\\\"loadingPaymentHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t<div class=\\\"text-center\\\" ng-if=\\\"loadingPaymentHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t<ap-spinner size=\\\"3\\\"/>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t<div ng-if=\\\"!loadingPaymentHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t<div class=\\\"body-text\\\" ng-if=\\\"!model.PaymentHistory.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t{{'No pending payments' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t<div class=\\\"panel-list-padding\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t<div ng-repeat=\\\"payment in model.PaymentHistory\\\" class=\\\"row panel-row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<div class=\\\"col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<div class=\\\"col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<div class=\\\"col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<ap-date-formatter date=\\\"{{::payment.Date}}\\\" format=\\\"short-date\\\"/>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<div class=\\\"col-xs-flush text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{{::payment.LastName}},&nbsp;{{::payment.FirstName}}\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{{::payment.SourceOfPayment}}\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<div class=\\\"col-xs-flush text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{{::payment.Amount | currency}}\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t<div class=\\\"container-fluid container-flush\\\" ui-view>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t<div ng-if=\\\"loadingBillingAccount || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t<div class=\\\"text-center\\\" ng-show=\\\"loadingBillingAccount\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t\\t<ap-spinner size=\\\"3\\\"/>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t<uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{\\\"An error has occurred and billing could not be loaded.\\\" | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t</uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t<uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"        {{\\\"You do not have access to billing.\\\"| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t\\t</uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\t</div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/billing/views/paymentStatementsOnly.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div id=\\\"form-results-panel\\\" class=\\\"panel panel-primary\\\" ng-class=\\\"(isModalDisplayed) ? 'hidden-print' : ''\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <h1 class=\\\"large-description-40 text-center\\\"> {{::'Statements' | translate}}</h1>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !httpError\\\" class=\\\"panel-body panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"col-xs-12 col-md-12 col-flush pull-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"align-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"body-text\\\" ng-show=\\\"model.ConsentAnnual.CardType\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'You have a card on file:' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{model.ConsentAnnual.CardType}}&nbsp;{{model.ConsentAnnual.ExpDate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"viewMakeAPaymentFeature\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-subheading panel-no-pending-appointments-subheading padding-top large\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <h1 class=\\\"large-description  center-text-small ng-binding\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-if=\\\"model.DepositByFinancialCenterEnabled\\\">{{::'Balances' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <span ng-if=\\\"!model.DepositByFinancialCenterEnabled\\\">{{::'Total Balance' | translate}}</span>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </h1>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row\\\" ng-if=\\\"!model.DepositByFinancialCenterEnabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-if=\\\"loadingPaymentHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"text-center\\\" ng-if=\\\"loadingPaymentHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-if=\\\"!loadingBillingAccount\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"col-xs-12 col-md-12 center-text center-text small\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-12 col-md-6 col-flush text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"large-date\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{::model.PersonBalanceAll | currency}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-12 col-md-6 center-text small\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <button class=\\\"btn btn-primary btn-lg btn-minpadding ap-margin-top-15\\\" ng-click=\\\"makeGenericOnlinePayment()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{::'Make Online Payment' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row\\\" ng-if=\\\"model.DepositByFinancialCenterEnabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-if=\\\"loadingPaymentHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"text-center\\\" ng-if=\\\"loadingPaymentHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-if=\\\"!loadingBillingAccount\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"row panel-row-no-border-bottom\\\" ng-repeat=\\\"balance in model.FinancialCenterBalances\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-6 col-md-4 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"large-description\\\">{{balance.FinancialCenterName}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-6 col-md-4 text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"large-description\\\">{{balance.Balance | currency}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-12 col-md-4 col-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"align-right\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <button class=\\\"btn btn-primary\\\" ng-click=\\\"makeSpecificOnlinePayment({{balance}})\\\">{{::'Make Online Payment' | translate}}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"body-text\\\" ng-show=\\\"model.ConsentAnnual.CardType\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div>{{::'You have a card on file:' | translate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div>{{model.ConsentAnnual.CardType}}&nbsp;{{model.ConsentAnnual.ExpDate}}</div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-subheading panel-no-pending-appointments-subheading padding-top large\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <h1 class=\\\"large-description center-text-small ng-binding\\\">{{::'Pending Payments' | translate}}</h1>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-if=\\\"loadingPaymentHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"text-center\\\" ng-if=\\\"loadingPaymentHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-if=\\\"!loadingPaymentHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"large-body-description center-text-small\\\" ng-if=\\\"!model.PaymentHistory.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{'No pending payments' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-repeat=\\\"payment in model.PaymentHistory\\\" class=\\\"row panel-row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-12 col-md-2 center-text center-text small col-flush large-body-description\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <ap-date-formatter date=\\\"{{::payment.Date}}\\\" format=\\\"short-date\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-12 col-md-5 col-flush text-center large-body-description\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"overflow-ellipsis\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{::payment.LastName}},&nbsp;{{::payment.FirstName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        {{::payment.SourceOfPayment}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-12 col-md-2 col-flush large-body-description text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{::payment.Amount | currency}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-12 col-md-2 col-xs-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <button class=\\\"btn btn-lg btn-primary btn-minpadding\\\" ng-click=\\\"viewReceipt(payment.TxId)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{::'View Receipt' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div ng-if=\\\"viewStatementFeature\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"panel-subheading panel-no-pending-appointments-subheading padding-top large\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <h1 class=\\\"large-description  center-text-small\\\"> {{::'Statement History' | translate}}</h1>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 padding-top large\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-if=\\\"loadingStatementHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"text-center\\\" ng-if=\\\"loadingStatementHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div ng-if=\\\"!loadingStatementHistory\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div class=\\\"large-description center-text\\\" ng-if=\\\"!model.StatementHistory.length\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{'No statements found' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <div ng-repeat=\\\"statement in model.StatementHistory\\\" class=\\\"row panel-row\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-12 col-md-2 center-text center-text-small col-flush large-body-description\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <ap-date-formatter date=\\\"{{::statement.Date}}\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                                           format=\\\"short-date\\\"></ap-date-formatter>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-if=\\\"model.DepositByFinancialCenterEnabled\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div ng-if=\\\"statement.FinancialCenterName\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-12 col-md-3 col-flush text-center large-body-description\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{::statement.FinancialCenterName}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div ng-if=\\\"!statement.FinancialCenterName\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"col-xs-12 col-md-3 col-flush text-center \\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            {{'Unavailable' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div class=\\\"col-xs-12 col-md-2 col-flush center-text center-text-small large-body-description\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    {{::statement.Balance | currency}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                <div ng-show=\\\"statement.IsViewable\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 col-md-2\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                        <div class=\\\"text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <button class=\\\"btn btn-lg btn-primary btn-minpadding\\\" ng-click=\\\"viewStatementHistoryItem(statement)\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                                {{::'View Statement' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    <div class=\\\"col-xs-12 col-md-3\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <button class=\\\"btn btn-lg btn-primary btn-minpadding\\\" ap-save-to-file=\\\"downloadStatementHistoryItem(statement)\\\" ng-hide=\\\"statement.Downloading\\\">{{::'Download Statement' | translate }}</button>\\r\" +\r\n    \"\\n\" +\r\n    \"                                            <div ng-show=\\\"!statement.Downloading\\\"></div><ap-spinner ng-show=\\\"statement.Downloading\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"                                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"            <div>\\r\" +\r\n    \"\\n\" +\r\n    \"                <button class=\\\"btn btn-default2 btn-lg ap-margin-top-15 .ap-margin-bottom-10 clickable\\\" ng-click=\\\"logOff()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    {{::'Sign Out' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                </button>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/billing/views/paymentSummary.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-primary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class = \\\"hidden-print\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-heading-appointments panel-flush\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Your payment has been submitted.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{:: 'Your pending payments can be viewed from the main Billing page.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"!loading && !httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"panel-body\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <div class=\\\"row panel-row-no-border-bottom\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-3\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-12 ap-confirm-content-area\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"receipt-padding\\\" ng-bind-html=\\\"model.ReceiptHtml\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                        <div class=\\\"hidden-print\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button\\r\" +\r\n    \"\\n\" +\r\n    \"                                    class=\\\"btn btn-primary pull-right\\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    ng-click=\\\"done()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Done' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                            <button\\r\" +\r\n    \"\\n\" +\r\n    \"                                    class=\\\"btn \\\"\\r\" +\r\n    \"\\n\" +\r\n    \"                                    ng-click=\\\"print()\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                                {{::'Print' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"                            </button>\\r\" +\r\n    \"\\n\" +\r\n    \"                        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"                    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"                    <div class=\\\"col-xs-3\\\"></div>\\r\" +\r\n    \"\\n\" +\r\n    \"                </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"        <div ng-if=\\\"loading || httpError\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <div class=\\\"text-center\\\" ng-show=\\\"loading\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"                <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"            </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.unhandled\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'An error has occurred and the confirmation page could not be loaded.' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"            <uib-alert type=\\\"danger\\\" ng-show=\\\"httpError.is403\\\" ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"                {{::'You do not have access to this patient\\\\'s appointments.'| translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"            </uib-alert>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\r\n\r\n  $templateCache.put('/billing/views/transactionComplete.html',\r\n    \"<div ng-cloak>\\r\" +\r\n    \"\\n\" +\r\n    \"    <div class=\\\"panel panel-primary\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"panel-heading-appointments\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            {{::'Transaction Complete' | translate}}\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"        <div class=\\\"text-center\\\">\\r\" +\r\n    \"\\n\" +\r\n    \"            <p>{{'You will be redirected shortly...'| translate}}</p>\\r\" +\r\n    \"\\n\" +\r\n    \"            <ap-spinner size=\\\"3\\\"></ap-spinner>\\r\" +\r\n    \"\\n\" +\r\n    \"        </div>\\r\" +\r\n    \"\\n\" +\r\n    \"    </div>\\r\" +\r\n    \"\\n\" +\r\n    \"</div>\"\r\n  );\r\n\n}]);\n","angular.module('billing').controller('BillingCtrl',\r\n             [ '$scope', 'BillingRepository', 'PatientPortalStorageRepository', 'BillingService', 'TransitionManager', '$uibModal', 'aprgettext', '$state', 'LocalStorageRepository', 'LogOffService', 'AppRoutes',  'toaster', '$q', 'BrowserService',\r\n    function ( $scope,    BillingRepository,   PatientPortalStorageRepository,   BillingService,   TransitionManager,   $modal,      gettext,      $state,   LocalStorageRepository,   LogOffService,   AppRoutes,    toaster,   $q,   BrowserService)\r\n    {\r\n            'use strict';\r\n\r\n            $scope.loginUser = PatientPortalStorageRepository.getLoginUser();\r\n            $scope.loadingPaymentHistory = true;\r\n            $scope.loadingBillingAccount = true;\r\n            $scope.loadingReceipt = true;\r\n            $scope.loadingStatementHistory = true;\r\n            $scope.viewMakeAPaymentFeature = true;\r\n            $scope.viewLedgerFeature = true;\r\n            $scope.viewStatementFeature = true;\r\n            $scope.modalPrint = false;\r\n            $scope.model = {\r\n                Date: '',\r\n                PersonBalanceAll: '',\r\n                DepositByFinancialCenterEnabled: false,\r\n                MerchantIdByFinancialCenterEnabled: false,\r\n                DefaultMerchantId: '',\r\n                FinancialCenterBalances: [],\r\n                ShowMultipleFinancialCenters: false,\r\n                ConsentAnnual: {\r\n                    Mask: '',\r\n                    CardType: '',\r\n                    ExpDate: '',\r\n                    ConsentId: '',\r\n                    RemainingInConsent: '',\r\n                    PerChargeLimit: ''\r\n                },\r\n                PaymentHistory: [],\r\n                StatementHistory: [],\r\n                ReceiptHtml: '',\r\n                ActiveTxId: '',\r\n            };\r\n\r\n            function loadPage() {\r\n                $scope.loginUser = PatientPortalStorageRepository.getLoginUser();\r\n                $scope.viewMakeAPaymentFeature = BillingService.getViewMakeAPaymentFeatureFlag();\r\n                $scope.viewLedgerFeature = BillingService.getViewLedgerFeatureFlag();\r\n                $scope.viewStatementFeature = BillingService.getViewStatementFeatureFlag();\r\n                $scope.ledgerAvailable = PatientPortalStorageRepository.getIsAccountResponsiblePartyForPatient();\r\n\r\n                //determine whether this is statement only\r\n                $scope.statementsOnly =  $state.current.alternativeLoginRoute;\r\n\r\n                $scope.removeHttpError();\r\n                var promises = [];\r\n                if ($scope.viewStatementFeature) {\r\n                    promises.push(loadStatementHistory());\r\n                }\r\n\r\n                if ($scope.viewMakeAPaymentFeature) {\r\n                    promises.push(loadBillingAccount());\r\n                    promises.push(loadPaymentHistory());\r\n                }\r\n\r\n                if (!promises.length) {\r\n                    return;\r\n                }\r\n\r\n                $q.all(promises).catch(function (response) {\r\n                    $scope.addHttpError(response);\r\n                });\r\n            }\r\n\r\n            function loadBillingAccount() {\r\n                $scope.loadingBillingAccount = true;\r\n                var requestDto = {\r\n                    LoginUserPatientId: $scope.loginUser.id,\r\n                    RemoteSessionId: $scope.loginUser.id + new Date().toLocaleDateString()\r\n                };\r\n\r\n            // AccountBalanceDto\r\n            //     decimal: PersonBalanceAll\r\n            //     DateTime: Date\r\n            //     Boolean: DepositByFinancialCenterEnabled\r\n            //     Boolean: MerchantIdByFinancialCenterEnabled\r\n            //     Int32: DefaultMerchantId\r\n            //     IEnumerable<FinancialCenterBalanceDto>: FinancialCenterBalances\r\n            // FinancialCenterBalanceDto\r\n            //     decimal: Balance\r\n            //     Guid: FinancialCenterUid\r\n            //     String: FinancialCenterName\r\n            //     Int32: MerchantId\r\n                return BillingService\r\n                    .getBillingAccount(requestDto)\r\n                    .then(function (billingAccountDto) {\r\n                        $scope.model.PersonBalanceAll = billingAccountDto.PersonBalanceAll;\r\n                        $scope.model.Date = billingAccountDto.Date;\r\n                        $scope.model.ConsentAnnual = billingAccountDto.ConsentAnnual;\r\n                        $scope.model.DepositByFinancialCenterEnabled = billingAccountDto.DepositByFinancialCenterEnabled;\r\n                        $scope.model.MerchantIdByFinancialCenterEnabled = billingAccountDto.MerchantIdByFinancialCenterEnabled;\r\n                        $scope.model.DefaultMerchantId = billingAccountDto.DefaultMerchantId;\r\n                        $scope.model.FinancialCenterBalances = billingAccountDto.FinancialCenterBalances;\r\n                        $scope.model.ShowMultipleFinancialCenters = (!!$scope.model.FinancialCenterBalances && $scope.model.FinancialCenterBalances.length > 1);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loadingBillingAccount = false;\r\n                    });\r\n            }\r\n\r\n            function loadPaymentHistory() {\r\n                $scope.loadingPaymentHistory = true;\r\n                var requestDto = {\r\n                    LoginUserPatientId: $scope.loginUser.id,\r\n                    RemoteSessionId: $scope.loginUser.id + new Date().toLocaleDateString()\r\n                };\r\n\r\n                return BillingRepository\r\n                    .getPaymentHistory(requestDto)\r\n                    .then(function (paymentHistoryArray) {\r\n                        if (paymentHistoryArray) {\r\n                            $scope.model.PaymentHistory = _(paymentHistoryArray.plain()).map(function (entry) {\r\n                                return _.assign(entry, {Downloading : false});\r\n                            }).value();\r\n                        }\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loadingPaymentHistory = false;\r\n                    });\r\n            }\r\n\r\n            function loadStatementHistory() {\r\n                $scope.loadingStatementHistory = true;\r\n\r\n                return BillingService.getStatementHistory($scope.loginUser.id)\r\n                    .then(function (data) {\r\n                        $scope.model.StatementHistory = data;\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loadingStatementHistory = false;\r\n                    });\r\n            }\r\n            // , opts: {txId: data.TxId}\r\n            // :amount/:merchantId/:financialCenterUid\r\n            function makeSpecificOnlinePayment(balance) {\r\n                if ($scope.model.ConsentAnnual && $scope.model.ConsentAnnual.CardType) {\r\n                    if($scope.statementsOnly) {\r\n                        TransitionManager.transition({appRoute: 'paymentOptionsStatementsOnly',\r\n                            opts: {amount: balance.Balance, merchantId: balance.MerchantId, financialCenterUid: balance.FinancialCenterUid }});\r\n                    } else {\r\n                        TransitionManager.transition({appRoute: 'paymentOptions',\r\n                            opts: {amount: balance.Balance, merchantId: balance.MerchantId, financialCenterUid: balance.FinancialCenterUid }});\r\n                    }\r\n                } else {\r\n                    if($scope.statementsOnly) {\r\n                        TransitionManager.transition({appRoute: 'paymentFromNewCardStatementsOnly',\r\n                            opts: {amount: balance.Balance, merchantId: balance.MerchantId, financialCenterUid: balance.FinancialCenterUid }});\r\n                    } else {\r\n                        TransitionManager.transition({\r\n                            appRoute: 'paymentFromNewCard',\r\n                            opts: {amount: balance.Balance, merchantId: balance.MerchantId, financialCenterUid: balance.FinancialCenterUid }\r\n                        });\r\n                    }\r\n                }\r\n            }\r\n            function makeGenericOnlinePayment() {\r\n                if ($scope.model.ConsentAnnual && $scope.model.ConsentAnnual.CardType) {\r\n                    if($scope.statementsOnly) {\r\n                        TransitionManager.transition({appRoute: 'paymentOptionsStatementsOnly', opts: {amount: $scope.model.PersonBalanceAll, merchantId: $scope.model.DefaultMerchantId, financialCenterUid: $scope.model.FinancialCenterUid }});\r\n                    } else {\r\n                        TransitionManager.transition({appRoute: 'paymentOptions', opts: {amount: $scope.model.PersonBalanceAll, merchantId: $scope.model.DefaultMerchantId, financialCenterUid: $scope.model.FinancialCenterUid }});\r\n                    }\r\n                } else {\r\n                    if($scope.statementsOnly) {\r\n                        TransitionManager.transition({appRoute: 'paymentFromNewCardStatementsOnly', opts: {amount: $scope.model.PersonBalanceAll, merchantId: $scope.model.DefaultMerchantId, financialCenterUid: $scope.model.FinancialCenterUid }});\r\n                    } else {\r\n                        TransitionManager.transition({appRoute: 'paymentFromNewCard', opts: {amount: $scope.model.PersonBalanceAll, merchantId: $scope.model.DefaultMerchantId, financialCenterUid: $scope.model.FinancialCenterUid }});\r\n                    }\r\n                }\r\n            }\r\n\r\n            function viewReceipt(txId) {\r\n                $scope.modalPrint = true;\r\n                var modalInstance = $modal.open({\r\n                    templateUrl: '/billing/views/modals/receiptModal.html',\r\n                    controller: 'ReceiptModalCtrl',\r\n                    resolve: {\r\n                        loginUserId: function () {\r\n                            return $scope.loginUser.id;\r\n                        },\r\n                        txId: function () {\r\n                            return txId;\r\n                        }\r\n                    }\r\n                });\r\n\r\n                modalInstance.result.then(function () {\r\n                    $scope.modalPrint = false;\r\n                });\r\n            }\r\n\r\n            function viewStatement() {\r\n                //use with pdf viewer\r\n                $scope.modalPrint = true;\r\n                var modalInstance = $modal.open({\r\n                    templateUrl: '/billing/views/modals/statementModal.html',\r\n                    controller: 'StatementModalCtrl',\r\n                    size: 'lg',\r\n                    resolve: {\r\n                        loginUser: function () {\r\n                            return $scope.loginUser;\r\n                        }\r\n                    }\r\n                });\r\n\r\n                modalInstance.result.then(function () {\r\n                    $scope.modalPrint = false;\r\n                });\r\n            }\r\n\r\n            function viewLedger() {\r\n                //use with pdf viewer\r\n                $scope.modalPrint = true;\r\n                var modalInstance = $modal.open({\r\n                    templateUrl: '/billing/views/modals/ledgerModal.html',\r\n                    controller: 'LedgerModalCtrl',\r\n                    size: 'lg',\r\n                    resolve: {\r\n                        loginUser: function () {\r\n                            return $scope.loginUser;\r\n                        }\r\n                    }\r\n                });\r\n\r\n                modalInstance.result.then(function () {\r\n                    $scope.modalPrint = false;\r\n                });\r\n            }\r\n\r\n            function downloadLedger(documentId) {\r\n                documentId = $scope.loginUser.id;\r\n                return BillingRepository.getLedgerUrl(documentId)\r\n                    .then(function (data) {\r\n                        return {Data: data.Data, Extension: 'pdf', FileName: 'Ledger' + '_' + $scope.loginUser.fullName};\r\n                    });\r\n            }\r\n\r\n            function viewLedgerPdf() {\r\n                $scope.modalPrint = true;\r\n\r\n                var modalConfig = {\r\n                    Title: gettext('Ledger'),\r\n                    DownloadFileName: '',\r\n                    PatientId: $scope.loginUser.id,\r\n                    DocumentId: $scope.loginUser.id,\r\n                    DocumentLoad: getLedgerPdf,\r\n                    DocumentDownload: downloadLedger,\r\n                    DisableInlinePdf: !BrowserService.supportsInlinePdf(),\r\n                };\r\n\r\n                var modalInstance = $modal.open({\r\n                    templateUrl: '/app/views/viewDocumentModal.html',\r\n                    controller: 'ViewDocumentModalCtrl',\r\n                    windowClass: 'modal-full',\r\n                    resolve: {\r\n                        modalConfig: function () {\r\n                            return modalConfig;\r\n                        }\r\n                    }\r\n                });\r\n\r\n                modalInstance.result.then(function () {\r\n                    $scope.modalPrint = false;\r\n                });\r\n            }\r\n\r\n            function getLedgerPdf(documentId) { \r\n                documentId = $scope.loginUser.id; \r\n                return BillingRepository.getLedgerUrl(documentId); \r\n            }\r\n\r\n            function getStatementHistoryItemPdf(documentId) {\r\n                return BillingRepository.getStatementHistoryItemPdf($scope.loginUser.id, documentId);\r\n            }\r\n\r\n            function downloadStatementHistoryItem(historyItem) {\r\n                historyItem.Downloading = true;\r\n                return BillingRepository.getStatementHistoryItemPdf($scope.loginUser.id, historyItem.Id)\r\n                    .then(function (data) {\r\n                        return {Data: data.Data, Extension: 'pdf', FileName: 'Statement' + '_' + $scope.loginUser.fullName};\r\n                    })\r\n                    .catch(function () {\r\n                        toaster.pop('error', '', gettext('An error occurred while downloading the statement'));\r\n                    })\r\n                    .finally(function () {\r\n                        historyItem.Downloading = false;\r\n                    });\r\n            }\r\n\r\n            function viewStatementHistoryItem(statementHistoryItem) {\r\n                $scope.modalPrint = true;\r\n\r\n                var modalConfig = {\r\n                    Title: gettext('Statement: ') + moment(statementHistoryItem.Date).format('LL'),\r\n                    DownloadFileName: '',\r\n                    PatientId: $scope.loginUser.id,\r\n                    DocumentId: statementHistoryItem.Id,\r\n                    DocumentLoad: getStatementHistoryItemPdf,\r\n                    DocumentDownload: getStatementHistoryItemPdf,\r\n                    DisableInlinePdf: !BrowserService.supportsInlinePdf(),\r\n                };\r\n\r\n                var modalInstance = $modal.open({\r\n                    templateUrl: '/app/views/viewDocumentModal.html',\r\n                    controller: 'ViewDocumentModalCtrl',\r\n                    windowClass: 'modal-full',\r\n                    resolve: {\r\n                        modalConfig: function () {\r\n                            return modalConfig;\r\n                        }\r\n                    }\r\n                });\r\n\r\n                modalInstance.result.then(function () {\r\n                    $scope.modalPrint = false;\r\n                });\r\n            }\r\n\r\n            function logOff() {\r\n               // var statementId = LocalStorageRepository.getStatementId();\r\n                PatientPortalStorageRepository.removeFeatureList();\r\n                LogOffService.logoff().then(function () {\r\n                    TransitionManager.transition({ appRoute: AppRoutes.statementslogin.state});\r\n                });\r\n            }\r\n\r\n            $scope.viewStatement = viewStatement;\r\n            $scope.viewLedger = viewLedger;\r\n            $scope.viewLedgerPdf = viewLedgerPdf;\r\n            $scope.viewReceipt = viewReceipt;\r\n            $scope.makeSpecificOnlinePayment = makeSpecificOnlinePayment;\r\n            $scope.makeGenericOnlinePayment = makeGenericOnlinePayment;\r\n            $scope.viewStatementHistoryItem = viewStatementHistoryItem;\r\n            $scope.downloadStatementHistoryItem = downloadStatementHistoryItem;\r\n            $scope.logOff = logOff;\r\n            loadPage();\r\n        }\r\n    ]\r\n);\r\n\r\n","angular.module('billing').controller('PaymentFromConsentCtrl',\r\n                ['$scope', '$state','$stateParams', 'BillingRepository', 'PatientPortalStorageRepository', 'BillingService', 'toaster', 'aprgettext', 'TransitionManager', '$uibModal',\r\n        function ($scope,   $state,  $stateParams,   BillingRepository,   PatientPortalStorageRepository,   BillingService,   toaster,   gettext,      TransitionManager,   $modal) {\r\n\r\n            'use strict';\r\n\r\n            var loginUserId = PatientPortalStorageRepository.getLoginUser().id;\r\n            $scope.loadingPaymentHistory = true;\r\n            $scope.loadingBillingAccount = true;\r\n            $scope.submitPaymentLoading = false;\r\n            $scope.responsiblePartyBilling = [];\r\n            $scope.chargeRegEx = /^\\d*[.]?(\\d{0,2})?$/;\r\n            $scope.payment = {\r\n                HasCardOnFile: false,\r\n                ChargeAmount: '',\r\n                PersonBalanceAll: '',\r\n                ConsentAnnual: null\r\n            };\r\n\r\n            $scope.statementsOnly = getState();\r\n\r\n            function getState()\r\n            {\r\n                return $state.current.alternativeLoginRoute;\r\n            }\r\n\r\n            function loadPage() {\r\n                loginUserId = PatientPortalStorageRepository.getLoginUser().id;\r\n                loadBillingAccount();\r\n            }\r\n\r\n            function loadBillingAccount() {\r\n                $scope.loadingBillingAccount = true;\r\n                $scope.removeHttpError();\r\n                var requestDto = {\r\n                    LoginUserPatientId: loginUserId,\r\n                    RemoteSessionId: loginUserId + new Date().toLocaleDateString()\r\n                };\r\n\r\n                BillingService\r\n                    .getBillingAccount(requestDto)\r\n                    .then(function (billingAccountDto) {\r\n                        $scope.payment.PersonBalanceAll = billingAccountDto.PersonBalanceAll;\r\n                        if (billingAccountDto.ConsentAnnual) {\r\n                            $scope.payment.ConsentAnnual = billingAccountDto.ConsentAnnual;\r\n                            if (parseFloat($scope.payment.ConsentAnnual.PerChargeLimit) < parseFloat($scope.payment.ConsentAnnual.RemainingInConsent)) {\r\n                                $scope.maxPaymentAmount = $scope.payment.ConsentAnnual.PerChargeLimit;\r\n                            } else {\r\n                                $scope.maxPaymentAmount = $scope.payment.ConsentAnnual.RemainingInConsent;\r\n                            }\r\n                            $scope.payment.HasCardOnFile = true;\r\n                        }\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loadingBillingAccount = false;\r\n                    });\r\n            }\r\n\r\n            function submit() {\r\n                if ($scope.paymentFromConsentForm.$invalid) {\r\n                    return;\r\n                }\r\n\r\n                $scope.modalPrint = true;\r\n                var modalInstance = $modal.open({\r\n                    templateUrl: '/billing/views/modals/confirmPaymentModal.html',\r\n                    controller: 'ConfirmPaymentModalCtrl',\r\n                    resolve: {\r\n                        consentAnnual: function () {\r\n                            return $scope.payment.ConsentAnnual;\r\n                        },\r\n                        chargeAmount: function () {\r\n                            return $scope.payment.ChargeAmount;\r\n                        }\r\n                    }\r\n                });\r\n\r\n                modalInstance.result.then(function (result) {\r\n                    if (result === 'accept') {\r\n                        postPayment();\r\n                    }\r\n                });\r\n            }\r\n\r\n            function postPayment() {\r\n                $scope.submitPaymentLoading = true;\r\n                var consentAnnualRequestDto = {\r\n                    ConsentAnnualId: $stateParams.consentId,\r\n                    PaymentAmount: $scope.payment.ChargeAmount,\r\n                    ApplicationSubmittingPayment: '1', //enum SourceOfPayments.PatientPortal\r\n                    LoginUserPatientId: loginUserId,\r\n                    RemoteSessionId: loginUserId + new Date().toLocaleDateString(),\r\n                    FinancialCenter: $stateParams.financialCenterUid,\r\n                };\r\n\r\n                BillingRepository.postConsentAnnualPayment(consentAnnualRequestDto)\r\n                    .then(function (data) {\r\n                        $scope.statementsOnly = getState();\r\n                        if($scope.statementsOnly){\r\n                        TransitionManager.transition({appRoute: 'paymentSummaryStatementsOnly', opts: {txId: data.TxId}});\r\n                        }\r\n                        else {\r\n                            TransitionManager.transition({appRoute: 'paymentSummary', opts: {txId: data.TxId}});\r\n                        }\r\n                    })\r\n                    .catch(function (response) {\r\n                        toaster.pop('error', '', gettext('An error occurred while submitting the payment'));\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.submitPaymentLoading = false;\r\n                    });\r\n            }\r\n\r\n            $scope.postPayment = postPayment;\r\n            $scope.submit = submit;\r\n            loadPage();\r\n        }\r\n    ]);","angular.module('billing').controller('PaymentFromNewCardCtrl',\r\n                ['$scope','$state', '$stateParams', '$location', 'BillingRepository', 'PatientPortalStorageRepository', 'BillingService', '$sce', 'TransitionManager', 'toaster', 'aprgettext',\r\n        function ($scope,  $state,   $stateParams,   $location,   BillingRepository,   PatientPortalStorageRepository,   BillingService,   $sce,   TransitionManager,   toaster,   gettext) {\r\n\r\n            'use strict';\r\n\r\n            var loginUserId = PatientPortalStorageRepository.getLoginUser().id;\r\n            $scope.loadingBillingAccount = true;\r\n            $scope.model = {\r\n                HasCardOnFile: false,\r\n                PersonBalanceAll: $stateParams.amount,\r\n                FinancialCenterGuid: $stateParams.financialCenterUid,\r\n                MerchantId: $stateParams.merchantId,\r\n                OneTimePaymentUrl: '',\r\n                RedirectUrl: '',\r\n                ConsentAnnual: {\r\n                    Mask: '',\r\n                    CardType: '',\r\n                    ExpDate: '',\r\n                    ConsentId: '',\r\n                    RemainingInConsent: '',\r\n                    PerChargeLimit: ''\r\n                }\r\n            };\r\n\r\n            $scope.statementsOnly = getState();\r\n\r\n            function getState()\r\n            {\r\n                return  $state.current.alternativeLoginRoute;\r\n            }\r\n            function loadPage() {\r\n                loginUserId = PatientPortalStorageRepository.getLoginUser().id;\r\n                loadBillingAccount();\r\n            }\r\n\r\n            function loadBillingAccount() {\r\n                $scope.loadingBillingAccount = true;\r\n                $scope.removeHttpError();\r\n                var requestDto = {\r\n                    LoginUserPatientId: loginUserId,\r\n                    RemoteSessionId: ''\r\n                };\r\n\r\n                BillingService\r\n                    .getBillingAccount(requestDto)\r\n                    .then(function (billingAccountDto) {\r\n                        if (billingAccountDto.ConsentAnnual) {\r\n                            $scope.model.ConsentAnnual = billingAccountDto.ConsentAnnual;\r\n                            $scope.model.HasCardOnFile = true;\r\n                        }\r\n                        loadOneTimePayment();\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loadingBillingAccount = false;\r\n                    });\r\n            }\r\n\r\n            function loadOneTimePayment() {\r\n                $scope.loadingUrl = true;\r\n\r\n                var absPath = $location.absUrl(),\r\n                    partial = $location.path(),\r\n                    newPartial = '/transactionComplete/';\r\n                var absPathSplit = absPath.split('?')[0];\r\n                var redirectUrl = absPathSplit.replace(partial, newPartial);\r\n                var oneTimePaymentRequestDto = {\r\n                    Amount: $scope.model.PersonBalanceAll,\r\n                    RedirectUrl: redirectUrl,\r\n                    LoginUserPatientId: loginUserId,\r\n                    RemoteSessionId: loginUserId + new Date().toLocaleDateString(),\r\n                    FinancialCenterGuid: $scope.model.FinancialCenterGuid,\r\n                    MerchantId: $scope.model.MerchantId\r\n                };\r\n\r\n                BillingRepository\r\n                    .getOneTimePaymentUrl(oneTimePaymentRequestDto)\r\n                    .then(function (url) {\r\n                        if (url) {\r\n                            $scope.model.OneTimePaymentUrl = $sce.trustAsResourceUrl(url);\r\n                        }\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loadingUrl = false;\r\n                    });\r\n            }\r\n\r\n            function redirectUrlPostBack(url) {\r\n\r\n                var applyPaymentRequestDto = {\r\n                    PaymentResponseString: url,\r\n                    LoginUserPatientId: loginUserId,\r\n                    ApplicationSubmittingPayment: '1', //enum SourceOfPayments.PatientPortal\r\n                    RemoteSessionId: loginUserId + new Date().toLocaleDateString(),\r\n                    FinancialCenterGuid: $scope.model.FinancialCenterGuid\r\n                };\r\n                BillingRepository\r\n                    .postApplyPayment(applyPaymentRequestDto)\r\n                    .then(function (data) {\r\n                        $scope.statementsOnly = getState();\r\n                        if (data.IsCanceled) {\r\n                            toaster.pop('warn', '', gettext('Payment has been canceled.'));\r\n                            if($scope.statementsOnly)\r\n                            {\r\n                                TransitionManager.transition({appRoute: 'paymentStatementsOnly'});\r\n                            }\r\n                            else{\r\n                            TransitionManager.transition({appRoute: 'billing'});\r\n                            }\r\n                        } else {\r\n                            if($scope.statementsOnly) {\r\n                                TransitionManager.transition({appRoute: 'paymentSummaryStatementsOnly', opts: {txId: data.TxId}});\r\n                            }\r\n                            else{\r\n                                TransitionManager.transition({appRoute: 'paymentSummary', opts: {txId: data.TxId}});\r\n                            }\r\n                        }\r\n\r\n                    })\r\n                    .catch(function (response) {\r\n                        toaster.pop('error', '', gettext('An error occurred while submitting the payment'));\r\n                        $scope.addHttpError(response);\r\n                    });\r\n            }\r\n\r\n            $scope.redirectUrlPostBack = redirectUrlPostBack;\r\n            loadPage();\r\n        }\r\n    ]\r\n);"," angular.module('billing').controller('PaymentOptionsCtrl',\r\n                ['$scope','$state', '$stateParams', 'PatientPortalStorageRepository', 'BillingRepository', 'BillingService', 'TransitionManager', 'aprgettext',\r\n        function ($scope,  $state,   $stateParams,   PatientPortalStorageRepository,   BillingRepository,   BillingService,   TransitionManager,   gettext) {\r\n\r\n            'use strict';\r\n\r\n            var loginUserId = PatientPortalStorageRepository.getLoginUser().id;\r\n            $scope.loadingBillingAccount = true;\r\n            $scope.paymentMethodSelect = null;\r\n            $scope.viewMakeAPaymentFeature = true;\r\n            $scope.model = {\r\n                Date: '',\r\n                HasCardOnFile: false,\r\n                PaymentMethodSelect: '',\r\n                PersonBalanceAll: '',\r\n                ConsentAnnual: null,\r\n                PaymentHistory: [],\r\n            };\r\n            $scope.PaymentMethodList = [\r\n                {\r\n                    Name: gettext('Use A Different Card'),\r\n                    ConsentId: '0'\r\n                }\r\n            ];\r\n            $scope.model.PaymentMethodSelect = $scope.PaymentMethodList[0];\r\n            $scope.statementsOnly = getState();\r\n\r\n            function getState()\r\n            {\r\n                  return $state.current.alternativeLoginRoute;\r\n            }\r\n\r\n\r\n            function loadPage() {\r\n                loginUserId = PatientPortalStorageRepository.getLoginUser().id;\r\n                loadBillingAccount();\r\n                loadPaymentHistory();\r\n            }\r\n\r\n            function loadPaymentHistory() {\r\n                $scope.loadingPaymentHistory = true;\r\n                var requestDto = {\r\n                    LoginUserPatientId: loginUserId,\r\n                    RemoteSessionId: loginUserId + new Date().toLocaleDateString()\r\n                };\r\n\r\n                return BillingRepository\r\n                    .getPaymentHistory(requestDto)\r\n                    .then(function (paymentHistoryArray) {\r\n                        if (paymentHistoryArray) {\r\n                            $scope.model.PaymentHistory = _(paymentHistoryArray.plain()).map(function (entry) {\r\n                                return _.assign(entry, {Downloading : false});\r\n                            }).value();\r\n                        }\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loadingPaymentHistory = false;\r\n                    });\r\n            }\r\n\r\n            function loadBillingAccount() {\r\n                $scope.loadingBillingAccount = true;\r\n                $scope.removeHttpError();\r\n\r\n                var requestDto = {\r\n                    LoginUserPatientId: loginUserId,\r\n                    RemoteSessionId: loginUserId + new Date().toLocaleDateString()\r\n                };\r\n\r\n                BillingService\r\n                    .getBillingAccount(requestDto)\r\n                    .then(function (billingAccountDto) {\r\n                        $scope.model.PersonBalanceAll = $stateParams.amount;\r\n                        if (billingAccountDto.ConsentAnnual && billingAccountDto.ConsentAnnual.CardType) {\r\n                            $scope.model.ConsentAnnual = billingAccountDto.ConsentAnnual;\r\n                            $scope.PaymentMethodList = [\r\n                                {\r\n                                    Name: $scope.model.ConsentAnnual.CardType + ' ' + $scope.model.ConsentAnnual.Mask + ' ' + $scope.model.ConsentAnnual.ExpDate,\r\n                                    ConsentId: $scope.model.ConsentAnnual.ConsentId\r\n                                },\r\n                                {\r\n                                    Name: gettext('Use A Different Card'),\r\n                                    ConsentId: '0'\r\n                                }\r\n                            ];\r\n                            $scope.model.PaymentMethodSelect = null;\r\n                            $scope.model.HasCardOnFile = true;\r\n                            $scope.model.Date = billingAccountDto.Date;\r\n                        }\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loadingBillingAccount = false;\r\n                    });\r\n            }\r\n\r\n            function paymentMethodSelected() {\r\n                $scope.statementsOnly = getState();\r\n\r\n                if ($scope.model.PaymentMethodSelect.ConsentId && $scope.model.PaymentMethodSelect.ConsentId === '0') {\r\n                    if($scope.statementsOnly) {\r\n                        TransitionManager.transition({\r\n                            appRoute: 'paymentFromNewCardStatementsOnly',\r\n                            opts: {amount: $scope.model.PersonBalanceAll}\r\n                        });\r\n                    }\r\n                    else{\r\n                        TransitionManager.transition({appRoute: 'paymentFromNewCard'});\r\n                    }\r\n                }\r\n                else if ($scope.model.ConsentAnnual) {\r\n                    if($scope.statementsOnly) {\r\n                        TransitionManager.transition({\r\n                            appRoute: 'paymentFromConsentStatementsOnly',\r\n                            opts: {consentId: $scope.model.ConsentAnnual.ConsentId}\r\n                        });\r\n                    }\r\n                    else {\r\n                            TransitionManager.transition({\r\n                                appRoute: 'paymentFromConsent',\r\n                                opts: {consentId: $scope.model.ConsentAnnual.ConsentId}\r\n                            });\r\n                    }\r\n                }\r\n            }\r\n\r\n            $scope.paymentMethodSelected = paymentMethodSelected;\r\n            $scope.loadPaymentHistory = loadPaymentHistory;\r\n            loadPage();\r\n        }\r\n    ]\r\n);","angular.module('billing').controller('PaymentSummaryCtrl',\r\n    ['$scope','$state','$window', '$stateParams', '$sce', 'TransitionManager', 'PatientPortalStorageRepository', 'BillingService',\r\n        function ($scope,$state, $window, $stateParams, $sce, TransitionManager, PatientPortalStorageRepository, BillingService) {\r\n            'use strict';\r\n\r\n            var txId = $stateParams.txId;\r\n            var loginUserId = PatientPortalStorageRepository.getLoginUser().id;\r\n            $scope.loading = true;\r\n            $scope.model = {\r\n                ReceiptHtml: ''\r\n            };\r\n\r\n            $scope.statementsOnly = getState();\r\n\r\n            function getState()\r\n            {\r\n                return $state.current.alternativeLoginRoute;\r\n            }\r\n\r\n            function loadPaymentResult() {\r\n                $scope.loading = true;\r\n                $scope.removeHttpError();\r\n\r\n                loginUserId = PatientPortalStorageRepository.getLoginUser().id;\r\n                var receiptRequestDto = {\r\n                    TxId: txId,\r\n                    RecipientEnumText: 'CUST',\r\n                    LoginUserPatientId: loginUserId,\r\n                    RemoteSessionId: loginUserId + new Date().toLocaleDateString()\r\n                };\r\n\r\n                BillingService.getReceiptHtml(receiptRequestDto)\r\n                    .then(function (data) {\r\n                        if (data.ReceiptHtml) {\r\n                            $scope.model.ReceiptHtml = $sce.trustAsHtml(data.ReceiptHtml);\r\n                        } else {\r\n                            $scope.addHttpError('Receipt is null.');\r\n                        }\r\n                    })\r\n                    .catch(function (response) {\r\n                        $scope.addHttpError(response);\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loading = false;\r\n                    });\r\n            }\r\n\r\n            function done() {\r\n                if($scope.statementsOnly)\r\n                {\r\n                    TransitionManager.transition({appRoute: 'paymentStatementsOnly'});\r\n                }\r\n                else{\r\n                    TransitionManager.transition({appRoute: 'billing'});\r\n                }\r\n            }\r\n\r\n            function print() {\r\n                $window.print();\r\n            }\r\n\r\n            $scope.done = done;\r\n            $scope.print = print;\r\n            loadPaymentResult();\r\n        }]);","angular.module('billing').controller('TransactionCompleteCtrl',\r\n    ['$window',\r\n        function ($window) {\r\n            'use strict';\r\n\r\n            // right now this is just sent to a target of the same origin as this window\r\n            $window.parent.postMessage({\r\n                eventName: 'tc-redirectUrl',\r\n                data: $window.location.href,\r\n            }, $window.location.origin);\r\n\r\n        }]);","angular.module('billing').controller('ConfirmPaymentModalCtrl',\r\n    ['$scope', '$uibModalInstance', 'consentAnnual', 'chargeAmount',\r\n        function ($scope, $modalInstance, consentAnnual, chargeAmount) {\r\n            'use strict';\r\n\r\n            $scope.consentAnnual = consentAnnual;\r\n            $scope.chargeAmount = chargeAmount;\r\n            function accept() {\r\n                $modalInstance.close('accept');\r\n            }\r\n\r\n            function cancel() {\r\n                $modalInstance.dismiss('cancel');\r\n            }\r\n\r\n            $scope.accept = accept;\r\n            $scope.cancel = cancel;\r\n        }]);\r\n","angular.module('billing').controller('LedgerModalCtrl',\r\n    ['$scope', '$uibModalInstance', '$sce', '$window', 'BillingRepository', 'loginUser',\r\n        function ($scope, $modalInstance, $sce, $window, BillingRepository, loginUser) {\r\n            'use strict';\r\n\r\n            $scope.loadingLedger = true;\r\n            $scope.model = {\r\n                LedgerData: '',\r\n                PdfFileName: loginUser.fullName + '_Ledger.pdf',\r\n                Base64: '',\r\n                ContentType: ''\r\n            };\r\n\r\n            function loadLedger() {\r\n                BillingRepository.getLedgerUrl(loginUser.id)\r\n                    .then(function (data) {\r\n                        if (data) {\r\n                            var ledgerPdf = 'data:' + data.ContentType + ';base64,' + data.ByteArray;\r\n                            $scope.model.LedgerData = $sce.trustAsResourceUrl(ledgerPdf);\r\n                            $scope.model.ByteArray = data.ByteArray;\r\n                            $scope.model.ContentType = data.ContentType;\r\n                        }\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loadingLedger = false;\r\n                    });\r\n            }\r\n\r\n            function ok() {\r\n                $modalInstance.close('ok');\r\n            }\r\n\r\n            function cancel() {\r\n                $modalInstance.dismiss('cancel');\r\n            }\r\n\r\n            function print() {\r\n                $window.print();\r\n            }\r\n\r\n            $scope.print = print;\r\n            $scope.ok = ok;\r\n            $scope.cancel = cancel;\r\n\r\n            loadLedger();\r\n        }]);\r\n","angular.module('billing').controller('ReceiptModalCtrl',\r\n    ['$scope', '$uibModalInstance', '$window', 'BillingService', '$sce', 'loginUserId', 'txId',\r\n        function ($scope, $modalInstance, $window, BillingService, $sce, loginUserId, txId) {\r\n            'use strict';\r\n\r\n            $scope.loadingReceipt = true;\r\n            $scope.model = {\r\n                ReceiptHtml: ''\r\n            };\r\n\r\n            function loadReceipt() {\r\n                var receiptRequestDto = {\r\n                    TxId: txId,\r\n                    RecipientEnumText: 'CUST',\r\n                    LoginUserPatientId: loginUserId,\r\n                    RemoteSessionId: loginUserId + new Date().toLocaleDateString()\r\n                };\r\n\r\n                BillingService.getReceiptHtml(receiptRequestDto)\r\n                    .then(function (data) {\r\n                        if (data) {\r\n                            $scope.model.ReceiptHtml = $sce.trustAsHtml(data.ReceiptHtml);\r\n                        }\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loadingReceipt = false;\r\n                    });\r\n            }\r\n\r\n            function ok() {\r\n                $modalInstance.close('ok');\r\n            }\r\n\r\n            function cancel() {\r\n                $modalInstance.dismiss('cancel');\r\n            }\r\n\r\n            function print() {\r\n                $window.print();\r\n            }\r\n\r\n            $scope.print = print;\r\n            $scope.ok = ok;\r\n            $scope.cancel = cancel;\r\n\r\n            loadReceipt();\r\n        }]);\r\n","angular.module('billing').controller('StatementModalCtrl',\r\n    ['$scope', '$uibModalInstance', '$sce', '$window', 'BillingRepository', 'loginUser',\r\n        function ($scope, $modalInstance, $sce, $window, BillingRepository, loginUser) {\r\n            'use strict';\r\n\r\n            $scope.loadingStatement = true;\r\n            $scope.model = {\r\n                StatementData: '',\r\n                PdfFileName: loginUser.fullName + '_Statement.pdf',\r\n                Base64: '',\r\n                ContentType: ''\r\n            };\r\n\r\n            function loadStatement() {\r\n                BillingRepository.getStatementUrl(loginUser.id)\r\n                    .then(function (data) {\r\n                        if (data) {\r\n                            var statementPdf = 'data:' + data.ContentType + ';base64,' + data.ByteArray;\r\n                            $scope.model.StatementData = $sce.trustAsResourceUrl(statementPdf);\r\n                            $scope.model.ByteArray = data.ByteArray;\r\n                            $scope.model.ContentType = data.ContentType;\r\n                        }\r\n                    })\r\n                    .finally(function () {\r\n                        $scope.loadingStatement = false;\r\n                    });\r\n            }\r\n\r\n            function ok() {\r\n                $modalInstance.close('ok');\r\n            }\r\n\r\n            function cancel() {\r\n                $modalInstance.dismiss('cancel');\r\n            }\r\n\r\n            $scope.ok = ok;\r\n            $scope.cancel = cancel;\r\n\r\n            loadStatement();\r\n        }]);\r\n","angular.module('billing').factory('BillingRepository',\r\n    ['AprimaRestangular', function (AprimaRestangular) {\r\n        'use strict';\r\n\r\n        function getBillingAccount(billingRequestDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('billing/' + billingRequestDto.LoginUserPatientId + '/account').get(billingRequestDto);\r\n        }\r\n\r\n        function getOneTimePaymentUrl(oneTimePaymentUrlRequestDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('billing/one-time-payment-url').get(oneTimePaymentUrlRequestDto);\r\n        }\r\n\r\n        function getPaymentHistory(billingRequestDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('billing/' + billingRequestDto.LoginUserPatientId + '/payment-history').get(billingRequestDto);\r\n        }\r\n\r\n        function getReceipt(receiptRequestDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('billing/' + receiptRequestDto.LoginUserPatientId + '/receipt').get(receiptRequestDto);\r\n        }\r\n\r\n        function postConsentAnnualPayment(consentAnnualPaymentRequestDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('billing/' + consentAnnualPaymentRequestDto.LoginUserPatientId + '/consent-annual-payment/').customPOST(consentAnnualPaymentRequestDto);\r\n        }\r\n\r\n        function postApplyPayment(applyPaymentRequestDto) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('billing/' + applyPaymentRequestDto.LoginUserPatientId + '/apply-aprima-payment/').customPOST(applyPaymentRequestDto);\r\n        }\r\n\r\n        function getStatementUrl(userId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('billing/' + userId + '/statement').get();\r\n        }\r\n\r\n        var getStatementImage = function (loginUserId, requestSettings) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            var queryString = '?page=' + requestSettings.page + '&height=' + requestSettings.height + '&width=' + requestSettings.width;\r\n\r\n            return restangular.one('billing/' + loginUserId + '/statement' + queryString).get();\r\n        };\r\n\r\n        function getLedgerUrl(userId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('billing/' + userId + '/ledger').get();\r\n        }\r\n\r\n        var getLedgerImage = function (loginUserId, requestSettings) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            var queryString = '?page=' + requestSettings.page + '&height=' + requestSettings.height + '&width=' + requestSettings.width;\r\n\r\n            return restangular.one('billing/' + loginUserId + '/ledger' + queryString).get();\r\n        };\r\n\r\n        function getAccountBalance(userId){\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('billing/' + userId + '/balance').get();\r\n        }\r\n\r\n        function getStatementHistory(loginUserId) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('billing/' + loginUserId + '/statement-history').get();\r\n        }\r\n\r\n        var getStatementHistoryItemImage = function (loginUserId, statementBatchDetailUid, requestSettings) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            var queryString = '?page=' + requestSettings.page + '&height=' + requestSettings.height + '&width=' + requestSettings.width;\r\n\r\n            return restangular.one('billing/' + loginUserId + '/statement-history/' + statementBatchDetailUid + '/' + queryString).get();\r\n        };\r\n\r\n        var getStatementHistoryItemPdf = function (loginUserId, statementBatchDetailUid) {\r\n            var restangular = AprimaRestangular.get('patient');\r\n            return restangular.one('billing/' + loginUserId + '/statement-history/' + statementBatchDetailUid).get();\r\n        };\r\n\r\n        return{\r\n            getBillingAccount: getBillingAccount,\r\n            getPaymentHistory: getPaymentHistory,\r\n            getReceipt: getReceipt,\r\n            postConsentAnnualPayment: postConsentAnnualPayment,\r\n            postApplyPayment: postApplyPayment,\r\n            getOneTimePaymentUrl: getOneTimePaymentUrl,\r\n            getStatementUrl: getStatementUrl,\r\n            getStatementImage: getStatementImage,\r\n            getLedgerUrl: getLedgerUrl,\r\n            getLedgerImage: getLedgerImage,\r\n            getAccountBalance: getAccountBalance,\r\n            getStatementHistory: getStatementHistory,\r\n            getStatementHistoryItemImage: getStatementHistoryItemImage,\r\n            getStatementHistoryItemPdf: getStatementHistoryItemPdf\r\n        };\r\n    }]);\r\n\r\n","angular.module('billing').factory('BillingService',\r\n    ['$rootScope', 'BillingRepository', '$q', 'PatientSettingsService',\r\n        function ($rootScope, BillingRepository, $q, PatientSettingsService) {\r\n            'use strict';\r\n\r\n            var billingServiceUserId,\r\n                accountBalance,\r\n                billingAccount,\r\n                statementHistory,\r\n                viewMakeAPaymentFeature,\r\n                viewLedgerFeature,\r\n                viewStatementFeature,\r\n                receiptHtml = {\r\n                    TxId: '',\r\n                    Result: ''\r\n                };\r\n\r\n            var featureList = PatientSettingsService.getPatientFeatures();\r\n            viewMakeAPaymentFeature = featureList.MakeAPayment.IsActive;\r\n            viewLedgerFeature = featureList.ViewPatientLedger.IsActive;\r\n            viewStatementFeature = featureList.ViewPatientStatement.IsActive;\r\n\r\n            function getViewMakeAPaymentFeatureFlag() {\r\n                return viewMakeAPaymentFeature;\r\n            }\r\n\r\n            function getViewLedgerFeatureFlag() {\r\n                return viewLedgerFeature;\r\n            }\r\n\r\n            function getViewStatementFeatureFlag() {\r\n                return viewStatementFeature;\r\n            }\r\n\r\n            function getAccountBalance(userId) {\r\n                //only used when MakeAPaymentFeatureFlag is disabled\r\n                if (userId !== billingServiceUserId) {\r\n                    resetBillingService();\r\n                    setBillingServiceUserId(userId);\r\n                }\r\n\r\n                if (!accountBalance) {\r\n                    return BillingRepository.getAccountBalance(userId)\r\n                        .then(function (data) {\r\n                            accountBalance = data;\r\n                            return accountBalance;\r\n                        });\r\n                } else {\r\n                    return $q.when(accountBalance);\r\n                }\r\n            }\r\n\r\n            function getBillingAccount(requestDto) {\r\n                if (requestDto.LoginUserPatientId !== billingServiceUserId) {\r\n                    resetBillingService();\r\n                    setBillingServiceUserId(requestDto.LoginUserPatientId);\r\n                }\r\n\r\n                if (!billingAccount) {\r\n                    return BillingRepository.getBillingAccount(requestDto)\r\n                        .then(function (data) {\r\n                            billingAccount = data;\r\n                            return billingAccount;\r\n                        });\r\n                } else {\r\n                    return $q.when(billingAccount);\r\n                }\r\n            }\r\n\r\n            function getStatementHistory(loginUserId) {\r\n                if (loginUserId !== billingServiceUserId) {\r\n                    resetBillingService();\r\n                    setBillingServiceUserId(loginUserId);\r\n                }\r\n\r\n                if (!statementHistory) {\r\n                    return BillingRepository.getStatementHistory(loginUserId)\r\n                        .then(function (data) {\r\n                            statementHistory = data;\r\n                            return statementHistory;\r\n                        });\r\n                } else {\r\n                    return $q.when(statementHistory);\r\n                }\r\n            }\r\n\r\n            function setBillingServiceUserId(patientId) {\r\n                billingServiceUserId = patientId;\r\n            }\r\n\r\n            function resetBillingService() {\r\n                billingServiceUserId = null;\r\n                billingAccount = null;\r\n                accountBalance = null;\r\n                statementHistory = null;\r\n            }\r\n\r\n            function getReceiptHtml(receiptRequestDto) {\r\n                if (!receiptHtml || receiptRequestDto.TxId !== receiptHtml.TxId) {\r\n                    return BillingRepository.getReceipt(receiptRequestDto)\r\n                        .then(function (data) {\r\n                            receiptHtml.TxId = receiptRequestDto.TxId;\r\n                            receiptHtml.Result = data;\r\n                            return receiptHtml.Result;\r\n                        });\r\n                } else {\r\n                    return $q.when(receiptHtml.Result);\r\n                }\r\n            }\r\n\r\n            return {\r\n                getAccountBalance: getAccountBalance,\r\n                getBillingAccount: getBillingAccount,\r\n                getStatementHistory: getStatementHistory,\r\n                getReceiptHtml: getReceiptHtml,\r\n                getViewMakeAPaymentFeatureFlag: getViewMakeAPaymentFeatureFlag,\r\n                getViewLedgerFeatureFlag: getViewLedgerFeatureFlag,\r\n                getViewStatementFeatureFlag: getViewStatementFeatureFlag\r\n            };\r\n        }]);","angular.module('all', ['ngPatientPortal', 'aprima-legacy-common', 'app', 'rxrefills', 'mychart', 'mymessages', 'aprima-provider-api', 'aprima-core-ui', 'aprima-patient-api', 'aprima-utils', 'myappointments', 'dashboard', 'forms', 'billing', 'account']);\r\n\r\nangular.module('all').run([ 'CustomModuleRunService', function(CustomModuleRunService) {\r\n    'use strict';\r\n    CustomModuleRunService.add(\r\n    [ '$rootScope', 'AppRoutes', '_', 'LogOffService', 'TransitionManager', 'Idle', '$uibModalStack', '$log','$state', '$transitions',\r\n    function ($rootScope, AppRoutes, _, LogOffService, TransitionManager, Idle, $modalStack, $log, $state, $transitions) {\r\n\r\n        $rootScope.hideToolbar = true;\r\n\r\n        $transitions.onStart({}, function onTransitionStart(transition) {\r\n            var toState = transition.targetState() || {};\r\n            var toStateName = toState && toState.name() || '';\r\n            var appRoute = _.find(AppRoutes, {state: toStateName});\r\n            $rootScope.hideToolbar = !!(appRoute && appRoute.portalSettings && appRoute.portalSettings.hideToolbar);\r\n            $rootScope.hideFooter = !!(appRoute && appRoute.portalSettings && appRoute.portalSettings.hideFooter);\r\n            $rootScope.loginView = !!(appRoute && appRoute.state && (appRoute.state === 'login' || appRoute.state === 'statementslogin'));\r\n            if (!$rootScope.loginView){\r\n                $rootScope.$broadcast('IdleStartWatch');\r\n            }\r\n        });\r\n        \r\n        $transitions.onSuccess({}, function updateTitle(transition) {\r\n            var title = transition.injector().get('$title') || 'Patient Portal';\r\n            document.title = title;\r\n        });\r\n\r\n        // ng-idle event listeners\r\n        // Please see 'modules\\app\\app.js' for application timeout configuration and documentation.\r\n        //\r\n        // IdleTimeout - logout logic is implemented here\r\n        $rootScope.$on('IdleTimeout', function() {\r\n            $log.info('Idle timeout has expired.  Logging client out and transitioning to login view.  ' + moment().format('lll'));\r\n\r\n            // Has watch() been called and is watching for idleness\r\n            if (Idle.running()) {\r\n                Idle.unwatch();  // stop watching for idleness\r\n            }\r\n\r\n            closeOpenModals();\r\n\r\n            if($state.current.alternativeLoginRoute){\r\n                // Call log off service and go back to login view\r\n                    LogOffService.logoff().then(function () {\r\n                    TransitionManager.transition({appRoute: AppRoutes.statementslogin.state});\r\n                });\r\n            }\r\n            else {\r\n                // Call log off service and go back to login view\r\n                LogOffService.logoff().then(function () {\r\n                    TransitionManager.transition({appRoute: 'login'});\r\n                });\r\n            }\r\n        });\r\n\r\n        function closeOpenModals() {\r\n            // make sure any ui bootstrap modals are closed\r\n            $modalStack.dismissAll();\r\n\r\n            // make sure plain bootstrap modals are closed\r\n            angular.element('div.modal.in[role=dialog').removeClass('fade').modal('hide');\r\n        }\r\n\r\n        // IdleStartWatch - startup logic is implemented here\r\n        $rootScope.$on('IdleStartWatch', function() {\r\n            Idle.watch();  // start watching for idleness.  $broadcast() is located in LoginCtrl.js\r\n        });\r\n    }]);\r\n}]);\r\n","angular.module('all').config(['$urlRouterProvider', '$urlServiceProvider', 'AppRoutesProvider',\r\n    function ($urlRouterProvider, $urlServiceProvider, AppRoutesProvider) {\r\n\r\n        'use strict';\r\n\r\n        var appRoutes = AppRoutesProvider.getAppRoutes();\r\n\r\n        $urlRouterProvider\r\n            .when('', appRoutes.login.route)\r\n            .when('/', appRoutes.login.route);\r\n\r\n        $urlServiceProvider.deferIntercept();\r\n    }\r\n]\r\n);\r\n"]}