{"version":3,"sources":["portico-core-1.0.min.js","app.ts","Decorators/Controller.ts","Decorators/Inject.ts","Decorators/Service.ts","Models/Enterprise/BaseAccount.ts","Models/Gateway/GatewayEnums.ts","Models/Gateway/GatewayOther.ts","Models/Enterprise/Account.ts","Models/Enterprise/AccountAddress.ts","Models/Enterprise/AccountSession.ts","Models/Enterprise/Address.ts","Models/Enterprise/Application.ts","Models/Enterprise/Attestation.ts","Models/Enterprise/City.ts","Models/Enterprise/Contact.ts","Models/Enterprise/ContactPreference.ts","Models/Enterprise/Diagnosis.ts","Models/Enterprise/DiagnosisSession.ts","Models/Enterprise/Document.ts","Models/Enterprise/EmailAddress.ts","Models/Enterprise/EmailRequest.ts","Models/Enterprise/Enroll.ts","Models/Enterprise/Enrollment.ts","Models/Enterprise/EnrollmentCondition.ts","Models/Enterprise/EnrollmentEligibility.ts","Models/Enterprise/EnrollmentInput.ts","Models/Enterprise/EnrollmentVerification.ts","Models/Enterprise/Enterprise.ts","Models/Enterprise/ExternalId.ts","Models/Enterprise/FeedbackRequest.ts","Models/Enterprise/GlobalId.ts","Models/Enterprise/IntakeLayout.ts","Models/Enterprise/JanssenGECheck.ts","Models/Enterprise/LayoutSection.ts","Models/Enterprise/LayoutSectionQuestion.ts","Models/Enterprise/LinkedPayor.ts","Models/Enterprise/Ndc.ts","Models/Enterprise/OptionalService.ts","Models/Enterprise/Patient.ts","Models/Enterprise/PatientAccount.ts","Models/Enterprise/Payor.ts","Models/Enterprise/PayorCoverageArea.ts","Models/Enterprise/Pharmacy.ts","Models/Enterprise/PhoneNumber.ts","Models/Enterprise/PointOfContact.ts","Models/Enterprise/Prescriber.ts","Models/Enterprise/PrescriberLicense.ts","Models/Enterprise/Prescription.ts","Models/Enterprise/Program.ts","Models/Enterprise/ResponseModel.ts","Models/Enterprise/Site.ts","Models/Enterprise/SiteAccount.ts","Models/Enterprise/State.ts","Models/Enterprise/Survey.ts","Models/Enterprise/SurveyAnswer.ts","Models/Enterprise/SurveyQuestion.ts","Models/Enterprise/SurveySession.ts","Models/Enterprise/SurveySessionAnswer.ts","Models/Enterprise/Task.ts","Models/Enterprise/Tenant.ts","Models/Enterprise/User.ts","Models/Enterprise/UserProfile.ts","Models/Enterprise/VoiceMailOptIn.ts","Models/Enterprise/WebAddress.ts","Models/Pdf/AddDocumentRequestModel.ts","Models/Pdf/PdfContent.ts","Models/Pdf/PdfRequest.ts","Models/Pdf/Point.ts","Models/Pdf/XFontStyle.ts","Models/Legacy/AlternateCardId.ts","Models/Legacy/CardActivationRequestModel.ts","Models/Legacy/CardCreatedModel.ts","Models/Legacy/CardStatusResultModel.ts","Models/Legacy/ClientIdentifiersModel.ts","Models/Legacy/CreatePrescriberRequestModel.ts","Models/Legacy/CreatePrescriberResultModel.ts","Models/Legacy/CreateSiteRequestModel.ts","Models/Legacy/CreateSiteResultModel.ts","Models/Legacy/EnrollmentDemographicsModel.ts","Models/Legacy/EnrollmentHistoryModel.ts","Models/Legacy/EnrollmentInsVerRequestModel.ts","Models/Legacy/EnrollmentRequestModel.ts","Models/Legacy/EnrollmentResultModel.ts","Models/Legacy/EnrollmentUpdateRequestModel.ts","Models/Legacy/EnrollmentWithPdfResultModel.ts","Models/Legacy/GuardianInfoModel.ts","Models/Legacy/InsuranceVerificationModel.ts","Models/Legacy/IResponseModel.ts","Models/Legacy/IResponseModelCardStatusResultModel.ts","Models/Legacy/IResponseModelMemberNumberStatusResultModel.ts","Models/Legacy/IResponseModelMultiCardCreateResultModel.ts","Models/Legacy/IResponseModelReplaceCardResultModel.ts","Models/Legacy/Legacy.ts","Models/Legacy/LegacyEnums.ts","Models/Legacy/MemberNumberStatusResultModel.ts","Models/Legacy/MultiCardCreateResultModel.ts","Models/Legacy/PatientLookupRequestModel.ts","Models/Legacy/PatientLookupResultModel.ts","Models/Legacy/PatientSearchRecordModel.ts","Models/Legacy/PatientSearchRequestModel.ts","Models/Legacy/PatientSearchResultModel.ts","Models/Legacy/PhoneNumberModel.ts","Models/Legacy/ReplaceCardRequestModel.ts","Models/Legacy/ReplaceCardResultModel.ts","Models/Legacy/ResendCorrespondenceRequestModel.ts","Models/Legacy/ResendCorrespondenceResultModel.ts","Models/Legacy/ResponseModel.ts","Models/Legacy/ResponseModelCreatePrescriberResultModel.ts","Models/Legacy/ResponseModelCreateSiteResultModel.ts","Models/Legacy/ResponseModelEnrollmentResultModel.ts","Models/Legacy/ResponseModelEnrollmentWithPdfResultModel.ts","Models/Legacy/ResponseModelPatientLookupResultModel.ts","Models/Legacy/ResponseModelPatientSearchResultModel.ts","Models/Legacy/ResponseModelResendCorrespondenceResultModel.ts","Models/Legacy/ResponseModelVerifySurveyEntryResultModel.ts","Models/Legacy/SiteEnrollmentModel.ts","Models/Legacy/SurveyQuestionModel.ts","Models/Legacy/TerminateCardRequestModel.ts","Models/Legacy/UpdatePrescriberRequestModel.ts","Models/Legacy/UpdateSiteRequestModel.ts","Models/Legacy/VerifySurveyEntryRequestModel.ts","Models/Legacy/VerifySurveyEntryResultModel.ts","Models/Setup/DataColumn.ts","Models/Setup/DataGroup.ts","Models/Setup/DataGroupType.ts","Models/Setup/DataRow.ts","Models/Setup/DataTable.ts","Models/Setup/DataType.ts","Models/Setup/DataValue.ts","Models/Setup/Demo.ts","Models/Setup/Portal.ts","Models/Setup/PortalChild.ts","Models/Setup/PortalDataGroup.ts","Models/Setup/PortalGroup.ts","Models/Setup/Setup.ts","Models/AuthenticationRequest.ts","Models/AuthenticationResponse.ts","Models/ChangePasswordRequestModel.ts","Models/ChildSessionData.ts","Models/constants.ts","Models/enums.ts","Models/PorticoException.ts","Models/ProgramCardTypeInfo.ts","Models/SessionDetail.ts","Models/SessionDetailResponse.ts","Models/State.ts","ServiceBases/ServiceBase.ts","ServiceBases/LegacyService.ts","ServiceBases/ServiceInstance.ts","Services/Legacy/LegacyCardService/api/ActivateCardApi.ts","Services/Legacy/LegacyCardService/api/CreateCardApi.ts","Services/Legacy/LegacyCardService/api/MemberNumberStatusApi.ts","Services/Legacy/LegacyCardService/api/ReplaceCardApi.ts","Services/Legacy/LegacyCardService/api/TerminateCardApi.ts","Services/Legacy/LegacyEnrollmentService/api/BasicEnrollmentApi.ts","Services/Legacy/LegacyEnrollmentService/api/BasicEnrollmentWithPdfApi.ts","Services/Legacy/LegacyEnrollmentService/api/EnrollmentApi.ts","Services/Legacy/LegacyEnrollmentService/api/EnrollmentUpdateApi.ts","Services/Legacy/LegacyEnrollmentService/api/PatientSearchApi.ts","Services/Legacy/LegacyEnrollmentService/api/ResendCorrespondenceApi.ts","Services/Legacy/LegacyEnrollmentService/api/VerifySurveyAnswerApi.ts","Services/Legacy/LegacyEnrollmentService/api.module.ts","Services/Legacy/LegacyCardService/api.module.ts","Services/ActionService.ts","Services/ApiInterceptor.ts","Services/ApiService.ts","Services/AuthenticationService.ts","Services/AuthorizationService.ts","Services/ConversionService.ts","Services/DataService.ts","Services/DateService.ts","Services/DemoService.ts","Services/ErrorService.ts","Services/ModalService.ts","Services/PdfService.ts","Services/PorticoEvents.ts","Services/PorticoService.ts","Services/SessionDetailService.ts","Services/SpinnerOverrideService.ts","Services/StorageService.ts","Services/ToastrService.ts","Services/TokenService.ts","Services/Coupon/CouponService.ts","Services/Enterprise/AccountService.ts","Services/Enterprise/CaseService.ts","Services/Enterprise/ClaimService.ts","Services/Enterprise/DebitCardService.ts","Services/Enterprise/DiagnosisService.ts","Services/Enterprise/DocumentService.ts","Services/Enterprise/EmailService.ts","Services/Enterprise/EnrollmentService.ts","Services/Enterprise/EnterpriseService.ts","Services/Enterprise/HubService.ts","Services/Enterprise/IntakeService.ts","Services/Enterprise/LocationService.ts","Services/Enterprise/LocationServiceClient.ts","Services/Enterprise/MiscService.ts","Services/Enterprise/NoteService.ts","Services/Enterprise/PatientAccountService.ts","Services/Enterprise/PatientService.ts","Services/Enterprise/PayloadStagingService.ts","Services/Enterprise/PayorService.ts","Services/Enterprise/PharmacyService.ts","Services/Enterprise/PrescriberService.ts","Services/Enterprise/PrescriptionService.ts","Services/Enterprise/ProgramService.ts","Services/Enterprise/SessionService.ts","Services/Enterprise/SiteAccountService.ts","Services/Enterprise/SiteService.ts","Services/Enterprise/SurveyService.ts","Services/Enterprise/TenantService.ts","Services/Gateway/GatewayService.ts","Services/Legacy/LegacyService.ts","Services/Mappers/SurveyMapper.ts","Services/Setup/DataGroupService.ts","Services/Setup/DataGroupTypeService.ts","Services/Setup/DataRowService.ts","Services/Setup/DataTableService.ts","Services/Setup/DataTypeService.ts","Services/Setup/PortalChildService.ts","Services/Setup/PortalDataGroupService.ts","Services/Setup/PortalGroupService.ts","Services/Setup/PortalService.ts","Services/Setup/SetupService.ts","Services/Tfs/TfsBuildDefinitionService.ts","Services/Tfs/TfsBuildService.ts","Services/Tfs/TfsBuildViewDirective.ts","Services/Tfs/TfsPortalController.ts","Services/Tfs/TfsReleaseDefinitionService.ts","Services/Tfs/TfsReleaseService.ts","Services/Tfs/TfsReleaseViewDirective.ts","Services/Tfs/TfsService.ts","Directives/Content/TcContent.ts","Directives/Content/TcHtml.ts","Directives/Content/TcImage.ts","Directives/Content/TcModal.ts","Directives/Content/TcScript.ts","Directives/Content/TcStyle.ts","Directives/Input/TcButton.ts","Directives/Input/TcColorize.ts","Directives/Input/TcInput.ts","Directives/Input/TcMonaco.ts","Directives/Input/TcSelect.ts","Directives/Input/TcTextarea.ts","Directives/Input/TcTripleDate.ts","Directives/Input/TcTriplePhone.ts","Directives/Form/TcFocus.ts","Directives/Form/TcForm.ts","Directives/Form/TcFormMessage.ts","Directives/Pdf/TcDownload.ts","Directives/Pdf/TcPdfCard.ts","Directives/Pdf/TcPdfHtml.ts","Directives/Survey/TcConsent.ts","Directives/Survey/TcQuestion.ts","Directives/Survey/TcSurvey.ts","Filters/Highlight.ts","Filters/Phone.ts","Filters/Props.ts","Controllers/TestController.ts","Controllers/AppController.ts","Controllers/IntakeController.ts","Controllers/LayoutController.ts","Controllers/PageController.ts","Controllers/SectionController.ts","ie10-viewport-bug-workaround.ts"],"names":["isEither","obj","Portico","navigator","userAgent","match","msViewportStyle","document","createElement","appendChild","createTextNode","querySelector","app","angular","module","AppBootStrap","bootAngular","run","$interval","$log","$q","$rootScope","$transitions","$window","actionService","porticoService","$state","info","window","$","tooltip","selector","container","on","e","stopPropagation","currentTarget","addClass","removeClass","dataService","getDataValue","toLowerCase","authenticationService","hasSession","session","user","isExpiring","scope","element","getElementById","modalService","show2","temp","creating_session","createSession","then","state","ppid","encodeURI","fullRoute","psid","finally","onError","transition","ignored","error","type","stateChangeAction","eval","onStart","onSuccess","to","params","title","page","useSession","root","_","trimEnd","location","origin","pathname","router","stateService","href","name","touchSession","value","layout","features","difference","split","isAuthenticated","isAuthorized","includes","serverConstants","connectTo","setup","portal","body","scrollTop","documentElement","clear","css","remove","config","$controllerProvider","$localStorageProvider","$provide","$httpProvider","setKeyPrefix","setSerializer","toJson","setDeserializer","fromJson","interceptors","push","bootstrap","ready","Decorators","Controller","controller","target","Error","Inject","dependencies","_i","arguments","length","key","descriptor","$inject","Service","service","Models","Enterprise","BaseAccount","e_1","_a","e_2","_b","e_3","_c","e_4","_d","e_5","_e","e_6","_f","e_7","_g","e_8","_h","e_9","_j","e_10","_k","e_11","_l","e_12","_m","e_13","_o","e_14","_p","e_15","_q","e_16","_r","e_17","_s","e_18","_t","this","id","displayId","status","partyId","securePartyId","programId","assignedUser","lastModifiedBy","lastModifiedTime","accountAddresses","accountSessions","attestations","contacts","contactPreferences","externalIds","linkedPayors","notes","optionalServices","phoneNumbers","prescriptions","tasks","voiceMailOptIns","documentRelationships","payorRelationships","pharmacyRelationships","prescriberRelationships","siteRelationships","assignmentOfBenefitFlag","isIneligibleForMailInClaims","allowAutoReenroll","accountId","accountType","accountStatus","Date","toString","_u","__values","_v","next","done","accountAddress","AccountAddress","e_1_1","return","call","_w","_x","accountSession","AccountSession","e_2_1","_y","_z","attestation","Attestation","e_3_1","accountContacts","_0","_1","contact","Contact","e_4_1","_2","_3","contactPreference","ContactPreference","e_5_1","_4","_5","externalId","ExternalId","e_6_1","_6","_7","linkedPayor","LinkedPayor","e_7_1","_8","_9","optionalService","OptionalService","e_8_1","accountPhoneNumbers","_10","_11","phoneNumber","PhoneNumber","e_9_1","_12","_13","prescription","Prescription","e_10_1","_14","_15","voiceMailOptIn","VoiceMailOptIn","e_11_1","documents","_16","_17","documentRelationship","DocumentRelationship","e_12_1","_18","_19","payorRelationship","PayorRelationship","e_13_1","payors","_20","_21","role","_22","accountRelations","_23","relation","payorId","relatedId","roleType","order","coverageOrder","isPrimary","e_15_1","e_14_1","pharmacies","_24","_25","pharmacyRelationship","PharmacyRelationship","e_16_1","prescribers","_26","_27","prescriberRelationship","PrescriberRelationship","e_17_1","sites","_28","_29","siteRelationship","SiteRelationship","e_18_1","prototype","addAddress","index","addAttestation","addContact","addContactPreference","addDocument","relationship","addExternalId","addLinkedPayor","addOptionalService","addPayor","matches","filterPayors","payor","Payor","payorBenefit","PayorBenefit","addPharmacy","pharmacy","Pharmacy","addPhoneNumber","addPrescriber","prescriber","Prescriber","addSite","site","Site","addVoiceMailOptIn","filter","getDiagnosisSession","create","diagnosisSession","DiagnosisSession","getPayor","getSurveySession","surveyId","surveySession","SurveySession","getSurveySessionIds","surveySessionIds","surveysWithSurveySession","x","surveySessionId","map","srvy","removePayor","removePharmacy","removePrescriber","removeSite","mapToEnterpriseCoordinatorAccountUpsearchModel","Gateway","AccountStatus","AccountType","addresses","addr","receiverFirstName","receiverLastName","addressType","AddressType","addressOne","address1","addressTwo","address2","city","zip","country","cnt","RoleType","firstName","lastName","number","altPhoneNumber","cntpref","contactInfoType","isOptedIn","isPreferred","d","documentId","comment","expireExistingAccountRelationships","externalIdType","AccountExternalIdType","ph","phoneType","extension","isVoicemailOptedIn","voicemailOptInStatus","vm","phoneNumberId","isVmOptedIn","mapToEnterpriseCoordinatorAccountUpsearchModelWithFlags","canUpdate","canInsert","skipSearch","model","coverage","mapToEnterpriseCoordinatorPayorUpsearchModel","payorName","payorType","payorBin","bin","payorPcn","pcn","payorGroup","group","isPlaceholder","accountRoleType","accountRelationshipCoverageOrder","accountRelationshipIsPrimary","mapToEnterpriseCoordinatorAddress","emailAddresses","email","mapToEnterpriseCoordinatorEmailAddress","mapToEnterpriseCoordinatorPhoneUpsearchModel","webAddresses","webAddr","mapToEnterpriseCoordinatorWebAddress","dateOfBirth","get","policyHolderFirstName","policyHolderLastName","relationshipToPatient","phone","groupNumber","policyNumber","personCode","planType","planEffectiveDate","planExpirationDate","planTerminationDate","policyName","mapToEnterpriseCoordinatorPayorUpsearchModelWithFlags","e_19","pharmacyId","pointOfContacts","pointOfContact","PointOfContact","e_19_1","addPointOfContact","mapToEnterpriseCoordinatorPharmacyUpsearchModel","pharmacyName","nabp","npi","pharmacyType","PharmacyType","pharmacySpecialization","PharmacySpecialization","specialization","cntct","mapToEnterpriseCoordinatorContact","cntc","phoneNumberExtension","faxNumber","mapToEnterpriseCoordinatorPharmacyUpsearchModelWithFlags","prescriberId","mapToEnterpriseCoordinatorPrescriberUpsearchModel","middleName","suffix","nickname","nickName","taxId","prescriberLicenses","pl","prescriberLicenseId","licenseType","licenseNumber","extId","mapToEnterpriseCoordinatorExternalId","mapToEnterpriseCoordinatorPrescriberUpsearchModelWithFlags","e_20","siteId","e_20_1","mapToEnterpriseCoordinatorSiteUpsearchModel","siteRoleType","description","businessStartTime","moment","businessEndTime","globalIds","glbId","mapToEnterpriseCoordinatorGlobalId","jobTitle","emailAddress","preferredContactMethod","ContactInfoType","mapToEnterpriseCoordinatorSiteUpsearchModelWithFlags","NoteTypeCategory","CaseExternalIdType","SystemStatus","ContactInfoPurposeType","CaseCaseFollowUpSyncAction","CaseCaseFollowUpScenario","ActualType","ClaimJobType","DiagnosisType","DocumentStatus","DocumentGroupSource","DocumentGroupStatus","TransmissionType","EmailErrorCode","MessageContentType","TCSCommunicationType","TCSInsuranceType","TCSSource","TCSCommunicationOption","TCSPaymentType","TCSRelationshipType","TCSSiteType","TCSGileadCommOption","AlternateCardType","QueryStringMatch","TCSEligibilityStatus","EligibilityScope","EnrollmentType","EnrollmentStatus","EnrollmentEligibility","EnrollmentScenario","EnrollmentJobState","EnrollmentJobType","Gender","PayorType","ContactDatePreferenceType","ContactTimePreferenceType","ExternalIdType","PlanType","PrescriberLicenseType","EscoordJobType","Dpv","LocationCorrection","PartyExternalIdType","PharmacyJobType","ProgramPartyType","ProgramUsageType","AuthenticateStatus","Extauth2ValidateStatus","TCSDocumentType","Extauth2ChangePasswordStatus","Extauth2ProfileUpdateStatus","DebitCardMapStatus","ProcessorType","DebitCardVmcUsageRegion","EnrollPatientCaseInitiator","TcSystem","ClaimTypeCode","EnrollmentApiPaymentType","Services","models","Account","_super","_this","patient","Patient","__extends","addPatient","mapToEnterpriseCoordinatorAccountUpsearchRequestModel","canInsertAccount","canUpdateAccount","skipAccountSearch","canInsertParty","canUpdateParty","skipPartySearch","sourceId","accountDiagnosisSession","accountData","diagnosisSessionData","mapToEnterpriseCoordinatorDiagnosisSessionModel","hierarchyExternalIdTypes","patientData","mapToEnterpriseCoordinatorPatientUpsearchModelWithFlags","payorData","pr","pharmacyData","prescriberData","prescriptionData","p","mapToEnterpriseCoordinatorPrescriptionUpsearchModel","siteData","sr","surveySessionData","sessionDate","entityId","diagnoses","sessionId","diagnosis","Diagnosis","Address","addressId","Application","lifetime","attestationAttributeId","City","cityName","cityType","countyName","stateAbbr","stateName","psge","apigateway","enums","occupation","isActive","address","EmailAddress","webAddress","WebAddress","addEmailAddress","addWebAddress","contactId","contactType","occupationDescription","code","diagnosisId","diagnosisCode","diagnosisName","diagnosisDescription","diagnosisType","ids","codes","delimitedCodes","diagnosisIds","diagnosisCodes","Document","groupId","layoutCode","intakeLayoutId","typeId","source","fileName","createdBy","createDate","lastUpdatedBy","lastUpdateDate","numberOfPages","DocumentId","DocumentGroupId","DocumentLayoutCode","IntakeLayoutId","DocumentTypeId","DocumentSource","DocumentFileName","DocumentLocation","IsPrimary","CreatedBy","CreateDate","LastUpdatedBy","LastUpdateDate","NumberOfPages","language","emailAddressId","emailAddressType","EmailRequest","senderName","senderAddress","recipientFirstName","recipientLastName","recipientAddress","templaterName","parameters","EnrollRequestModel","accountCanInsert","accountCanUpdate","accountSkipSearch","partyCanInsert","partyCanUpdate","partySkipSearch","account","Enrollment","caseId","startDate","endDate","claimEligibilityDate","reEnrollmentEligibilityDate","householdSize","maxBenefit","memberNumber","paymentType","createdOn","updatedBy","updatedOn","EnrollmentCondition","categoryCode","ent","conditions","condition","EnrollmentInput","defaultPaymentType","eligibility","EnrollmentVerification","dob","eligibilityScope","patientAddressState","Enterprise_1","authentication","intakeLayout","layoutSection","ndcs","states","AuthenticationResponse","IntakeLayout","LayoutSection","forEach","ndc","Ndc","State","Id","FeedbackRequest","subject","canContact","GlobalId","globalIdTypeCode","globalId","intakeType","intakeLayoutCode","intakeLayoutDescription","docTypeId","generatedCaseTypeId","intakeLayoutSequence","layoutSections","surveyIds","surveys","survey","Survey","getLayoutSection","current","getLayoutSectionIndex","i","getSurveyByQuestionId","questionId","getSurveyQuestion","getSurveyAnswer","answerId","surveyQuestion","hasLayoutSection","JanssenGECheck","tcProgramId","gender","addressLine1","zipCode","uniqueId","layoutId","entityName","configurationDetails","questions","sequence","visited","configurationDetail","question","LayoutSectionQuestion","drugNumber","strengthDescription","programNdcXrefId","programPromotionXrefId","Name","DrugNumber","StrengthDescription","ProgramNdcXrefId","ProgramPromotionXrefId","ssn","primaryLanguageId","isUsResident","patientId","socialSecurityNumber","isNaN","utc","toDate","getTime","mapToEnterpriseCoordinatorPatientUpsearchModel","PatientAccount","party","mapToEnterpriseCoordinatorPatientAccountUpsearchRequestModel","PatientAccountRegistration","userName","password","ContactInfo","fax","sendEmail","coverageAreas","INS","coverageArea","PayorCoverageArea","isValidSearch","counter","timeZone","bestDaysToCall","bestTimeToCall","contactDatePreferenceType","contactTimePreferenceType","purpose","phoneId","phonePurpose","prescriberLicense","PrescriberLicense","addPrescriberLicense","mapToPrescriberUpsearchModel","daySupply","directions","ndcId","quantity","refills","signed","writtenOn","Program","tenantId","ResponseModel","json","data","results","isLegacyExternalResponse","legacyExternalResponse","ResponseModelType","ExternalLegacy","response","undefined","success","enterpriseResponse","Success","legacyResponse","Legacy","Standard","Object","defineProperty","enumerable","configurable","messages","Messages","Data","siteNote","prescriberSiteId","addGlobalId","Number","ext","glblId","mapToSiteUpsearchModel","SiteAccount","mapToEnterpriseCoordinatorSiteAccountUpsearchRequestModel","partyData","SiteAccountRegistration","portalId","siteAccount","surveyTypeId","surveyQuestions","questionsWithAnswers","SurveyQuestion","SurveyAnswer","answerTypeId","answerValue","dtmfTone","indicatesOptIn","triggersFulfillment","requiresAdvancedNavigation","nextQuestionId","answerCategoryId","answerCategoryCode","answerCategoryDescription","answersId","questionTypeId","questionText","audioFileName","isSurveyEntryPoint","isOptInQuestion","surveyAnswers","questionCategories","answers","surveyAnswer","sourceSystemId","surveySourceId","surveySessionAnswers","surveySessionAnswer","SurveySessionAnswer","getSurveySessionAnswers","isSurveySessionAnswer","setSurveySessionAnswers","answerIds","Task","closedBy","createdDate","updatedDate","typeCategory","typeCode","typeDescription","assignedUserId","dueDate","completionDate","isCompleted","resolution","Tenant","programs","program","User","userId","sid","userDomainId","active","UserProfile","secureId","roles","UserProfileRole","getRole","find","permissions","permission","UserProfilePermission","url","webAddressId","webAddressType","Pdf","AddDocumentRequestModel","PdfContent","style","XFontStyle","Regular","size","point","Point","font","color","content","PdfRequest","template","pdfContents","y","AlternateCardId","alternateCardNumber","cardAlternateIdType","toModel","CardActivationRequestModel","cardLastFourDigits","expirationDate","CardCreatedModel","cardActivationDate","cardEndDate","sponsorNumber","totalBenefitAmount","remainingBenefitAmount","totalPaidAmount","CardStatusResultModel","cardBalance","ClientIdentifiersModel","alternateId","alternateIdType","CreatePrescriberRequestModel","postalCode","item","PhoneNumberModel","CreatePrescriberResultModel","CreateSiteRequestModel","siteVerified","CreateSiteResultModel","EnrollmentDemographicsModel","personId","homePhone","mobilePhone","communicationTypes","EnrollmentHistoryModel","enrollmentId","enrollmentStartDate","enrollmentEndDate","enrollmentStatus","EnrollmentInsVerRequestModel","insuranceVerification","demographics","clientIdentifiers","InsuranceVerificationModel","SurveyQuestionModel","EnrollmentRequestModel","EnrollmentResultModel","EnrollmentUpdateRequestModel","EnrollmentWithPdfResultModel","base64PdfFile","GuardianInfoModel","namePrefix","nameSuffix","primaryPhoneNumber","insuranceType","payerName","payerPhone","payerMedicalId","IResponseModel","concat","IResponseModelCardStatusResultModel","IResponseModelMemberNumberStatusResultModel","MemberNumberStatusResultModel","IResponseModelMultiCardCreateResultModel","MultiCardCreateResultModel","IResponseModelReplaceCardResultModel","ReplaceCardResultModel","Legacy_1","AnswerType","QuestionType","CommunicationTypes","InsuranceType","NameMatchQueryTypeEnum","EligibilityStatusCode","CardAlternateIdTypeEnum","EligibilityStatusCodeEnum","CommunicationTypesEnum","PrescriberCommunicationTypeEnum","PrescriberCommunicationOptionEnum","CommunicationTypeEnum","CommunicationOptionEnum","PaymentTypeEnum","SiteTypeEnum","SiteCommunicationTypesEnum","SiteCommunicationOptionEnum","SourceIdEnum","RelationshipEnum","InsuranceTypeEnum","FirstNameQueryTypeEnum","LastNameQueryTypeEnum","PhoneTypeEnum","redemptions","memberNumberStatus","memberNumberStatusId","PatientLookupRequestModel","PatientLookupResultModel","enrollments","PatientSearchRecordModel","cardStartDate","eligibilityStatusCode","eligibilityStatusDescription","eligibilityDate","alternateCardIds","PatientSearchRequestModel","maxResults","skipRows","firstNameQueryType","lastNameQueryType","PatientSearchResultModel","countryCode","areaCode","ReplaceCardRequestModel","orderReferenceNumber","ResendCorrespondenceRequestModel","ResendCorrespondenceResultModel","oldOrderReferenceNumber","newOrderReferenceNumber","ResponseModelCreatePrescriberResultModel","ResponseModelCreateSiteResultModel","ResponseModelEnrollmentResultModel","ResponseModelEnrollmentWithPdfResultModel","ResponseModelPatientLookupResultModel","ResponseModelPatientSearchResultModel","ResponseModelResendCorrespondenceResultModel","ResponseModelVerifySurveyEntryResultModel","VerifySurveyEntryResultModel","SiteEnrollmentModel","siteType","siteCommunicationTypes","siteCommunicationOption","sitePayable","aobReceived","answerKey","answerText","TerminateCardRequestModel","terminateDate","UpdatePrescriberRequestModel","UpdateSiteRequestModel","VerifySurveyEntryRequestModel","isEligible","Setup","DataColumn","dataTableId","dataTypeId","isDeleted","charAt","DataGroup","dataGroupTypeId","isPrivate","dataRows","dataRow","DataRow","getDataRows","DataGroupType","priority","dataGroupId","dataValues","dataValue","DataValue","dataColumnId","dv","getValue","def","DataTable","dataColumns","dataColumn","getDataColumn","column","dc","DataType","dataRowId","Demo","brand","pharma","primary","secondary","square","shadow","logo","logoFile","Portal","portalGroupId","beginOn","endOn","settings","coreVersion","portalGroup","portalChildren","portalDataGroups","PortalGroup","portalChild","PortalChild","portalDataGroup","PortalDataGroup","childId","dataGroup","Setup_1","dataTables","dataTypes","demo","demos","templates","dataTable","dataType","AuthenticationRequest","PorticoAuthenticateStatus","NotAuthenticated","jwtToken","sessionDetail","SessionDetail","childSessionData","sucsess","Array","isArray","ChildSessionData","ChangePasswordRequestModel","jwt","TENANT_TC","GUID_EMPTY","DATA_GROUP_LNF_SHADOW","DATA_GROUP_LNF_SQUARE","DATA_GROUP_STANDARD_DEFAULT","DATA_GROUP_TYPE_PORTAL","DATA_GROUP_TYPE_TEMPLATE","PORTAL_GROUP_DEMO","KnownKeyNames","loggingLevel","tenant","legacyProgramSecureId","programType","templateId","JWT_STORAGE_KEY","SESSION_STORAGE_KEY","IS_CHILD_KEY","SESSION_ACTIVE","SESSION_EXPIRED","SESSION_EXPIRING","StorageType","LogLevel","AuthenticationAction","PorticoException","errorMessage","rawError","errorCode","dataDump","ProgramCardTypeInfo","cardTypes","parentPortalId","isParent","SessionDetailResponse","intake","section","spid","ssid","r2p","r2s","ServiceBase","$http","errorService","className","defaults","headers","common","createInstance","serviceUrl","ServiceInstance","requestToken","bind","getHttpConfig","token","startsWith","Authorization","EnterpriseServiceBase","tokenService","secureKeyId","getEnvironmentValue","LegacyService","__decorate","EntService","delegate","ctor","isString","spinner","substr","showSpinner","$get","resp","reject","hideSpinner","post","$post","put","$put","delete","$delete","normalizeUrl","when","merge","catch","handleError","methodName","logError","JSON","stringify","display","GET","POST","PUT","DELETE","CardService","Api","ActivateCardApi","webServiceUrls","legacyService","instance","legacyCard","request","replace","String","CreateCardApi","count","MemberNumberStatusApi","ReplaceCardApi","replaceRequest","TerminateCardApi","terminateRequest","EnrollmentService","BasicEnrollmentApi","legacyEnrollment","BasicEnrollmentWithPdfApi","EnrollmentApi","EnrollmentUpdateApi","PatientSearchApi","searchRequest","ResendCorrespondenceApi","VerifySurveyAnswerApi","surveyVerifyRequest","LegacyEnrollmentService","LegacyCardService","pms","Action","command","result","child","parent","previous","isAllowed","allowCommand","allowIf","allowElse","allowError","allowParent","ActionProcessor","_action","_promise","_stopped","begin","_add","else","self","end","if","expression","$eval","log","action","depth","callStack","promise","mode","v","$scope","stop","last","_last","indexOf","_execute","initDataTables","initDataTypes","initDemos","initDiagnoses","initIntakeLayout","initLayoutSection","initNdcs","initPortal","initStates","initSurveys","initTemplates","editPortal","demoService","edit","removePortal","savePortal","save","account_create","getProgramId","enterpriseService","accountService","account_createFromCase","caze","createFromCase","account_getPrescribers","getPrescribers","account_getSites","getSites","account_getTasks","getTasks","account_populate","account_savePrescriber","savePrescriber","account_saveSite","saveSite","account_saveTask","task","saveTask","account_diagnosis_populate","diagnosisService","populate","account_payor_add","account_payor_filter","account_payor_length","account_payor_populate","payorService","account_payor_remove","account_pharmacy_populate","pharmacyService","account_prescriber_add","account_prescriber_length","account_prescriber_populate","prescriberService","account_prescriber_remove","account_prescription_populate","prescriptionService","account_surveySession_populate","surveyService","populate_session","account_surveySession_answer_get","account_surveySession_answer_getValue","account_surveySession_answers_get","account_surveySession_answers_getValues","account_surveySession_answers_set","account_surveySession_answers_test","answer","account_user_activate","activate","activateUser","account_user_get","getUsers","account_user_save","saveUser","account_userRole_save","saveUserRole","authentication_authenticateAccount","authenticateAccount","authentication_authenticateUser","authenticateUser","authentication_changePassword","oldPassword","newPassword","changePassword","authentication_createSession","authentication_getCurrentUser","getCurrentUser","authentication_getPortalRoles","getPortalRoles","authentication_getPortalUsers","getPortalUsers","authentication_isEmailRegistered","isEmailRegistered","authentication_isExistingUser","isExistingUser","authentication_resetPassword","resetPassword","authentication_resetUserPassword","resetUserPassword","authentication_saveCurrentUser","saveCurrentUser","authentication_saveUser","authentication_touchSession","authentication_isAuthenticated","authentication_logOut","logOut","authorization_userProfile_get","authorizationService","getUserProfile","copy","claim_getAccumulator","date","claimService","getAccumulator","conversion_getCaseResponseModelToAccount","conversionService","convertGetCaseResponseModelToAccount","diagnosis_get","getByProgramId","document_createPdfFromAccount","document_upload","file","documentService","upload","hex","percent","element_show","show","elementShow","email_feedback","feedbackRequest","email_isUnsubscribed","emailService","isUnsubscribed","email_send","emailRequest","checkUnsubscribe","send","email_unsubscribe","username","unsubscribe","enrollment_create","enrollment","enrollmentService","hub_account_get","hubService","getAccount","hub_account_search","searchAccounts","hub_patient_get","getPatient","hub_patient_save","savePatient","hub_patient_search","searchPatients","intakeLayout_survey_populate","legacy_survey_checkAnswer","getEnvironmentId","enterprise","checkAnswer","legacy_survey_checkAnswers","questionIds","checkAnswers","legacy_basicEnrollment","enroll","legacy_checkMemberNumber","checkMN","modal_hide","hide","modal_hide_2","hide2","modal_show","modal_show_2","clazz","init","patient_get","patientService","patient_search","search","patientAccount_getAccount","patientAccountService","patientAccount_getCase","getCase","patientAccount_isPatientRegistered","registration","isPatientRegistered","patientAccount_patientRegistration","patientRegistration","payor_get","payor_search","stateCoverageArea","max","local","global","payor_benefit_get","getPayorBenefit","pharmacy_get","pharmacy_search","prescriber_create","prescriber_get","prescriber_remove","prescriber_search","prescription_getByAccountId","getByAccountId","prescription_ndc_list","getNdcList","program_id","getExistingPortalSession","sessionService","getExistingSession","session_touch","session_application_get","getApplication","session_application_save","application","saveApplication","setup_dataColumn_add","setupService","addDataColumn","setup_dataColumn_remove","removeDataColumn","setup_dataGroup_get","dataGroupTypeService","dataGroupTypes","promises","sort","a","b","dataGroupType","dataGroupService","getByDataGroupTypeId","all","dataGroups","setup_dataGroup_getByDataGroupTypeId","setup_dataGroup_getHistory","getHistory","setup_dataGroup_new","setup_dataGroup_remove","removeDataGroup","setup_dataGroup_save","saveDataGroup","setup_dataGroupType_get","setup_dataGroupType_getHistory","setup_dataGroupType_new","setup_dataGroupType_remove","removeDataGroupType","setup_dataGroupType_save","saveDataGroupType","setup_dataRow_getByDataGroupId","dataRowService","getByDataGroupId","setup_dataRow_getConflict","getConflict","setup_dataRow_getHistory","setup_dataRow_fix","fixDataRow","setup_dataRow_new","setup_dataRow_remove","removeDataRow","setup_dataRow_save","saveDataRow","setup_dataTable_get","dataTableService","setup_dataTable_getHistory","setup_dataTable_new","setup_dataTable_remove","removeDataTable","setup_dataTable_save","saveDataTable","setup_dataType_get","dataTypeService","setup_dataType_getHistory","setup_portal_get","portalGroupService","portalGroups","portalService","getByPortalGroupId","portals","setup_portal_getById","getById","setup_portal_getByPortalGroupId","setup_portal_getHistory","setup_portal_import","importPortal","setup_portal_new","setup_portal_remove","setup_portal_save","copyFrom","setup_portalChild_getByPortalId","portalChildService","getByPortalId","setup_portalChild_getHistory","setup_portalChild_new","setup_portalChild_remove","removePortalChild","setup_portalChild_save","savePortalChild","setup_portalDataGroup_flatten","flattenPortalDataGroups","setup_portalDataGroup_getByPortalId","portalDataGroupService","setup_portalDataGroup_getHistory","setup_portalDataGroup_new","setup_portalDataGroup_remove","removePortalDataGroup","setup_portalDataGroup_save","savePortalDataGroup","setup_portalGroup_get","setup_portalGroup_getById","setup_portalGroup_getHistory","setup_portalGroup_new","setup_portalGroup_remove","removePortalGroup","setup_portalGroup_save","savePortalGroup","site_create","siteService","site_get","site_getByPrescriberId","getByPrescriberId","site_remove","site_search","siteAccount_getAccount","siteAccountService","siteAccount_getCase","siteAccount_getCases","getCases","siteAccount_getParty","getParty","siteAccount_getSiteAccount","getSiteAccount","siteAccount_getSiteAccounts","getSiteAccounts","siteAccount_getWorkflows","includePayors","includePharmacies","includePrescribers","getWorkflows","siteAccount_searchAccounts","siteAccount_searchCases","daysInPastBegin","daysInPastEnd","searchByCreatedDate","workflowTypes","statusTypes","after","before","searchModel","createdBefore","createdAfter","endBefore","endAfter","searchBy","searchCases","siteAccount_searchWorkflows","searchWorkflows","options","survey_get","surveySession_save","saveSurveySession","addToastr","toastrService","add","clearAllToastr","clearAll","removeLastToastr","removeLast","user_create","createUser","ActionService","ApiInterceptor","$injector","httpUnauthorized","httpPreconditionFailed","httpForbidden","responseError","porticoEvents","unauthorizedEvent","requestError","rejection","loggedOutEvent","ApiService","getItem","endPoint","deferred","defer","req","method","apiPath","getStandardHeaders","resolve","searchItem","saveItem","message","deleteItem","x-requested-with","pme","AuthenticationService","storageService","edgeAuthenticationApi","dateService","jwtTokenName","jwtTokenKeyName","sessionKeyName","authenticateLoginAccountRequest","getPortalId","authenticationAuthenticateUser","buildRequest","AuthenticateAndCreateSession","authenticate","changeLoginRequest","authenticationChangePassword","CreateSession","authenticationGetCurrentUser","endpoint","u","sessionKey","Session","isBefore","subtract","sessionFeatures","authenticationIsEmailRegistered","IsExistingUser","warning","getReferenceId","isAfter","wipeLocalSessions","authenticationResetPassword","authenticationSaveCurrentUser","TouchSession","getJwt","expiredResponse","SessionExpired","SessionValid","newSession","updateCurrentSessionExpiration","saveNewSession","authResponse","AuthorizationService","ConversionService","aa","c","pn","ea","wa","diagnosisData","caseData","caseRelations","or","pd","partyRoleId","benefitData","pocs","pointOfContactData","poc","prescriptions_1","cp","prescriptionId","first","orderBy","sd","s","surveyData","sessionData","uniq","valueData","q","pm","pml","DataService","childFlagKeyName","legacy","perm","table","getDataTable","getDataRowValue","dt","getDataValues","values","dataColumn_1","environment","toNumber","getReferenceValue","getTenantId","DateService","utcDate","amount","unit","utcOffset","now","DemoService","$upload","getDetailsById","component","componentHtml","image","imageSource","reference","referenceId","squares","toUpperCase","shadows","details","pdg","saveDetails","ErrorService","callback","none","errorObj","record","verbose","join","logToServer","ModalState","Modal","actualId","version","html","returnTo","SHOW","ModalService","$compile","$timeout","modals","modal","findLast","m","HIDDEN","SHOWN","HIDE","_process","hasClass","ngInit","modal_1","one","focus","findLastIndex","modal_2","contents","PdfService","apiService","createDocumentServicePdf","createDocumentServicePdfFromSimpleDictionary","contentDictionary","contentPath","parse","pdfRequest","pdfContent","createHTMLDocumentServicePdf","PorticoEvents","callbacks","$broadcast","addDelegate","eventName","func","$on","removeDelegate","getOwnPropertyNames","getPrototypeOf","PorticoService","couponService","spinnerOverrideService","pdfService","sessionDetailService","serviceName","intakeService","getIntakeLayout","locationService","getStates","intakeLayout_1","surveyPromises_1","refresh","isUndefined","go","account_surveySession_get","surveyKey","questionKey","account_surveySession_answers_setProgramType","toJSON","documentData","documentName","portalName","FirstName","LastName","Contact_First_Name","Contact_Last_Name","Contact_Type","Sex","DOB","MemberNumber","surveys_1","surveys_1_1","text","concatvalue","answers_1","answers_1_1","createPdf","intakeLayout_get","intakeLayout_layoutSection_get","surveyPromises","location_states_get","temp_1","temp_1_1","clearLastToastr","r","parseInt","substring","g","Math","min","rh","floor","gh","bh","SessionDetailService","getSessionDetail","SpinnerOverrideService","withoutUntil","spinnerDisabled","StorageService","$localStorage","$sessionStorage","storageType","storageProvider","getStorageProvider","hasOwnProperty","Local","ToastrService","list","option","toastr","toast","TokenService","promiseCache","serviceDef","audienceId","storageKey","expiresOnUtc","withCredentials","accessToken","ps","MemberNumberCodeResponse","LegacyCheckMNCodes","CouponService","edgeCouponApi","extEnrollmentApi","extCardApi","memberNumberStatusGet","Expired","Activated","Inactive","getEnrollmentDetails","couponGetEnrollmentDetails","basicEnrollment","requestModel","mapper","Mappers","SurveyMapper","toLegacy","toCouponDemographics","basicEnrollmentCreate","enrollmentCreate","verifySurveyAnswer","legacyQuestion","toLegacySurveyQuestion","verifySurveyAnswerCreate","verifySurveyAnswers","every","z","AccountService","edgeAccountApi","accountActivateUser","accountGetPrescribers","accountGetSites","accountGetTasks","accountGetUsers","accountRemovePrescriber","accountRemoveSite","accountSavePrescriber","accountSaveSite","accountSaveTask","accountSaveUser","accountSaveUserRole","updateAccount","rel","accountSaveModel","accountUpdateAccount","CaseService","caseApi","getCaseTypeStatuses","caseTypeId","caseTypeStatusGetByProgramId","ClaimService","claimApi","getByMemberNumber","cam","DebitCardService","edgeDebitCardApi","getDebitCardDetail","debitCardGetDebitCardDetail","effectiveDate","vmcValidThroughDate","getLashPatientDebitCardLast4","patientLashId","debitCardGetLashPatientDebitCardLast4","DiagnosisService","diagnosisV3Api","programDiagnosisGetByProgramId","response_1","response_1_1","sessionDiagnosisGet","diagnosisGet","diagnosisTypes","currentDiagnoses","UNKN","maxRecordCount","currentDiagnosisCodes","diagnosisSearch","isInArray","searchValue","valueArray","findIndex","pmg","DocumentService","documentApi","documentGroupSource","TCPortal","documentGroupReceivedDate","templateData","templateName","author","overWriteExisting","documentStyles","documentStatus","documentOriginalFileName","faxAni","faxDns","pdfDocumentCreateByProgramId","documentGetByProgramId","EmailService","edgeEmailApi","emailIsUnsubscribed","check","fromName","fromAddress","emailName","deliveryType","messageContentType","Html","tag","emailSend","emailUnsubscribe","unsubscribeV2","sourceName","unsubscribeUnsubscribeBySourceName","edgeApi","edgeEnrollmentApi","checkMemberNumber","haveACard","checkForEnrollment","enrollmentCheckMemberNumber","enrollPatient","enrollRequestModel","shouldVerifyEligibility","payorCoverageAreas","enrollmentInput","caseInitiator","edgePatientEnrollmentRequestModel","overrideProgramId","patientEnrollmentEnrollPatient","benefitResult","queuedProcessingDate","getBestEnrollment","getBestEnrollmentRequestModel","enrollmentGetBestEnrollment","reenrollmentEligibilityDate","getBestEnrollmentV2","enrollmentGetBestEnrollmentsV2","EnterpriseService","caseService","debitCardService","locationServiceGateway","miscService","noteService","payloadStagingService","programService","gateway","HubService","edgeHubApi","hubV1GetAccount","hubV1GetPatient","patientUpsearchModel","hubV1SavePatient","hubV1SearchAccounts","searchAccountsWithExternalId","accountExternalIdType","hubV1SearchPatients","IntakeService","intakeV1LayoutApi","edgeIntakeApi","layoutGetByProgramId","layoutSectionGet","response2","layoutSurveyGet","hcpIntake","patientIntakeRequestModel","patientAccountUpsearch","intakeHcpIntake","isHcpIntakeAllowed","isIntakeAllowedRequest","intakeIsHcpIntakeAllowed","patientIntake","closeIntake","intakePatientIntake","LocationService","locationV1Api","getCities","getCitiesByZip","getSuggestedAddress","searchAddress","businessName","line1","line2","validAddress","hasMatches","returnAddresses_1","getAllStates","length_1","LocationServiceClient","MiscService","edgeTempApi","janssenGECheck","janssenGECheckRequestModel","tempJanssenGeCheck","NoteService","noteApi","getTask","taskId","taskGetByProgramId","taskIds","taskIds_1","taskIds_1_1","PatientAccountService","edgePatientAccountApi","patientAccountGetPatientAccount","getActiveEnrollments","patientAccountGetPatientActiveEnrollments","includeDiagnoses","includePrescriptions","includeSites","includeSurveys","patientAccountGetCase","creationTime","patientAccountRegistration","patientAccountIsPatientRegistered","patientAccountPatientRegistration","PatientService","patientApi","patientGetByTenantId","patientUpdateByTenantId","patientCreateByTenantId","patientSearchByTenantId","patients","patient_1","PayloadStagingService","payloadStagingApi","StagePayload","payloadStagePayload","PayorService","payorV4Api","payorV4GlobalApi","payorGetByTenantId","accountMedicalGet2","PBM","accountPharmacyGet2","getPlanTypes","planTypeGet","_loop_1","this_1","benefit","INSURANCEPROVIDER","payorUpdateByTenantId","payorCreateByTenantId","coverageAreaState","localPromise","payorSearchByTenantId","globalPromise","globalPayorSearchByTenantId","lp","gp","unionWith","payor_1","PharmacyService","pharmacyV2Api","pharmacyGetByTenantId","pharmacyUpsearchByTenantId","pharmacySearchByTenantId","pharmacy_1","PrescriberService","prescriberV3Api","prescriberGetByTenantId","prescriberUpsearchByTenantId","dea","DEANUMBER","NPINUMBER","stateLicenseId","STATELICENSENUMBER","prescriberTaxId","MEDICALID","prescriberSearchByTenantId","prescriber_1","PrescriptionService","prescriptionV1Api","accountPrescriptionGet","programIdByProgramId","ProgramService","programV2Api","SessionService","getSessionKeyName","existingSession","touchChildExpirations","getJwtKeyName","persistChildSessions","sessionStorage","childSession","childSessions","jwtName","sessionDetailName","SiteAccountService","edgeSiteAccountApi","cancelWorkflow","patientAccountId","workflowId","caseTypeStatusRelationshipId","reason","siteAccountCancelWorkflow","siteAccountGetAccount","siteAccountGetCase","siteAccountGetCases","siteAccountGetParty","siteAccountGetSiteAccount","sa","siteAccountGetWorkflows","workflowResponse","workflow","documentResponse","caseWorkflow","siteAccountSearchAccounts","patientAccount","account_1","searchCasesRequest","siteAccountSearchCases","intakeCase","workflows","w","searchWorkflowsRequest","siteAccountSearchWorkflows","siteRegistration","siteAccountRegistration","siteAccountUpsearch","siteAccountSiteRegistration","SiteService","siteV3Api","siteGetByTenantId","PrescriberSite","sitesByPrescriberGetByTenantId1","stateTaxId","siteUpsearchByTenantId","siteSearchByTenantId","site_1","SurveyService","surveyV2Api","fullSurveyGet","accountSession_1","fullSurveySessionGet3","surveyIds_1","surveyIds_1_1","surveySessionCreate2","request2","sessionValues","ssa","sessionValue","fullSurveySessionCreate2","TenantService","GatewayService","VueDI","Container","trialcard_apigateway","configure","registerSingleton","trialcard_authentication","OAUTH_TOKEN_PROVIDER","getToken","context","__awaiter","tokenName","__generator","registerInstance","trialcard_shared","AXIOS_CONFIGURATION","transformRequest","axios","default","X_TC_USERID","CardExtV1Api","CaseV3Api","ClaimV1Api","DiagnosisV3Api","DocumentV3Api","EdgeApi","EdgeAccountApi","EdgeAdminApi","EdgeAuthenticationApi","EdgeClaimApi","EdgeCouponApi","EdgeDebitCardApi","EdgeDocumentsApi","EdgeEmailApi","EdgeEnrollmentApi","EdgeHubApi","EdgeIntakeApi","EdgeMangoApi","EdgePatientAccountApi","EdgePatientEnrollmentApi","EdgePayloadStagingApi","EdgePlpApi","EdgeSiteAccountApi","EdgeTempApi","EdgeTokenApi","EmailV1Api","EnrollmentExtV2Api","EnrollmentV1Api","EscoordV1Api","IntakeV1Api","LocationV1Api","NotesV2Api","PatientV3Api","PayorV4Api","PayorV4GlobalApi","PharmacyV2Api","PharmacyV2GlobalApi","PrescriberV3Api","PrescriptionV1Api","ProgramV2Api","SiteV2Api","SiteV3Api","SurveyV2Api","SurveyV3Api","CardExtV1","CaseV3","ClaimV1","DiagnosisV3","DocumentV3","Edge","EdgeAccount","EdgeAdmin","EdgeAuthentication","EdgeClaim","EdgeCoupon","EdgeDebitCard","EdgeDocuments","EdgeEmail","EdgeEnrollment","EdgeHub","EdgeIntake","EdgeMango","EdgePatientAccount","EdgePatientEnrollment","EdgePayloadStaging","EdgePlp","EdgeSiteAccount","EdgeTemp","EdgeToken","EmailV1","EnrollmentExtV2","EnrollmentV1","EscoordV1","IntakeV1","LocationV1","NotesV2","PatientV3","PayorV4","PayorV4Global","PharmacyV2","PharmacyV2Global","PrescriberV3","PrescriptionV1","ProgramV2","SiteV2","SiteV3","SurveyV2","SurveyV3","leg","PorticoLegacyService","legacyCardService","legacyEnrollmentService","intakeExpired","toLegacyDemographics","isNil","format","legacySurvey","DataGroupService","dataGroups_1","dataGroups_1_1","dataGroups_2","dataGroups_2_1","DataGroupTypeService","response_2","response_2_1","DataRowService","clean","DataTableService","tsDataTable","DataTypeService","tsDataType","PortalChildService","portalChilds","PortalDataGroupService","PortalGroupService","PortalService","useStorage","timestamp","tsPortal","SetupService","splice","duplicate","pg","createDataRow","dr","dc2","copyAndSave_portalDetails","original","pdgPromise","opdg","copyAndSave_portalDataGroup","copyAndSave_dataGroup","dvc","drc","responses","pc","sorted","keepers","dataValues_1","Tfs","TfsBuildDefinitionService","project","tfsRequest","criteria","items","keys","builds","found","label","sent","revision","update","revisions","TfsBuildService","queue","timeline","changes","workItems","query","logs","artifacts","tags","addTag","removeTag","directive","build","bindToController","controllerAs","$attrs","tfsService","_links","web","sourceVersion","release","$parent","tfs","onRelease","sync","panel","panel-success","panel-info","panel-danger","panel-warning","$onInit","$watch","TfsPortalController","interval","cancel","hasBuild","buildDefinitionId","releaseDefinitionId","settingsString","isConfigured","updateBuildInformation","updateReleaseInformation","getLatestPorticoInformation","syncPortal","lastSuccessfulBuild","lastBuild","definitions","resultFilter","statusFilter","$top","__read","apply","definitionId","$expand","Set","releases","definition","TfsReleaseDefinitionService","vsrmRequest","TfsReleaseService","includeAllApprovals","updateEnvironment","releaseState","compareTo","sha","releaseUrl","definitionReference","commitUrl","successful","environments","artifact","porticoBuildDefinitionId","portico","porticoReleases","oldReleases","apiVersion","trim","vsrm","TfsService","porticoReleaseDefinitionId","buildDefinition","releaseDefinition","getBuildDefinitionTemplate","getReleaseDefinitionTemplate","searchText","createOrUpdateBuildDefinition","path","portalBuildDefinitionId","creating","variables","getPortalBuildDefinitionId","cloneDeep","buildNumberFormat","definitionType","documentQuality","repository","retentionRules","badgeEnabled","getPortalReleaseDefinitionId","createOrUpdateReleaseDefinition","cloneEnvironments","env","rank","demands","deployPhases","deployStep","environmentOptions","executionPolicy","postDeployApprovals","approvals","preDeployApprovals","queueId","retentionPolicy","schedules","portalReleaseDefinitionId","releaseNameFormat","__spread","alias","artifactSourceDefinitionUrl","triggers","artifactAlias","triggerConditions","sourceBranch","triggerType","possibleReleases","viewPortal","isOpen","Directives","TcContentController","$element","compile","link","$attr","$ctrl","require","restrict","TcHtmlController","_column","set","_schema","tcCurrent","fullKey","schema","tcParent","getHtml","getEditHtml","diff","$monaco","conflict","editRow","resolved","getDebugHtml","tcHtml","TcImageController","tcImage","TcModalController","click","close","headerColumn","headerValue","header","bodyColumn","bodyValue","footerColumn","footerValue","footer","tcModal","TcScriptController","fullHtml","tcScript","TcStyleController","tcStyle","TcButtonController","isDisabled","tcForm","disable","ngForm","$valid","onClick","$setSubmitted","disabled","validate","onInvalid","onDenied","tcButton","transclude","ITcColorizeController","TcColorizeController","$sce","lang","theme","tcColorize","trustAsHtml","monaco","editor","colorizeElement","ITcInputOptions","GoogleFormattedAddress","googleResponse","searchedBy","street_number","route","locality","administrative_area_level_1","postal_code","ITcInputController","TcInputController","onChange","checkbox","datePicker","zipLookup","googleAutoComplete","change","valueNone","$setValidity","cityKey","cn","stateKey","googleAutoCompleteForm","inputId","addressKey","adr","zipKey","zp","googleAutoCompleteConvertToFriendlyObject","place","address_components","types","l","short_name","formattedAddress","formatted_address","lat","geometry","lng","gPlace","google","maps","places","Autocomplete","componentRestrictions","event","addListener","$apply","getPlace","googleFormattedAddress","$filter","$stateParams","controlClass","dateOptions","groupClass","inputClass","labelClass","listLabel","listOptions","listTrackBy","listValue","mask","maskInclude","maxlength","maxlengthMessage","messageClass","minlength","minlengthMessage","pattern","patternMessage","placeholder","readonly","required","requiredMessage","rows","valueDefault","$transclude","tcInput","tcInputs","labelHtml","append","prepend","childAttrs","inputAttrs","inputHtml","transclusion","clone","each","node","textContent","outerHTML","inline","itemLabel","itemValue","innerHtml","labelAttrs","dateOptions_1","dateOptions_1_1","messageAttrs","messageHtml","messageItems","ITcMonacoController","TcMonacoController","dispose","diffEditor","innerHTML","sourceModel","createModel","tcMonaco","targetModel","ngModel","$viewValue","createDiffEditor","enableSplitViewResizing","renderSideBySide","setModel","modified","addEventListener","$render","getModifiedEditor","setValue","onDidChangeModelContent","$evalAsync","$setViewValue","lineNumbers","$formatters","isObject","TcSelectController","tcSelect","placeholderOption","TcTextareaController","tcTextarea","TcTripleDateController","year","getFullYear","years","months","days","_year","_month","_day","full","getMonth","getDate","month","day","$dirty","$setDirty","updateDays","placeholderMonth","placeholderDay","placeholderYear","tcTripleDate","TcTriplePhoneController","_area","_prefix","_line","select","tcTriplePhone","TcFocusController","tcFocus","TcFormController","unSubmit","$setUntouched","$setPristine","TcFormMessageController","tcFormMessage","TcDownloadController","tcDownload","TcPdfCardController","tcPdfCard","filename","queryString_1","pdfPath","htmlContents_1","TcPdfHtmlController","submit","styles","responseType","blob","Blob","msSaveOrOpenBlob","URL","createObjectURL","download","console","TcConsentController","FreeForm","MultipleChoiceMultiAnswer","tcConsent","TcQuestionController","tcQuestion","TcSurveyController","tcSurvey","Filters","phrase","t","RegExp","slice","props","out","itemMatches","prop","Controllers","TestController","medBenProgramId","testLegacySearchPatients","Contains","alert","testBasicEnrollmentApi","basicEnrollmentModel","Email","err","testBasicEnrollmentApiPdf","testEnrollment","enrollmentModel","testEnrollmentUpdate","createCard","replaceCard","terminateCard","AppController","$location","today","rootUrl","currentSession","setMinutes","getMinutes","IntakeController","LayoutController","PageController","SectionController","breadcrumbs","accountEdit","isActiveBreadcrumb","isBreadcrumb","isVisitedBreadcrumb"],"mappings":"AAAA;;;;;GCAA,SAASA,SAAiBC,GACtB,OAAO,EAGX,IAAUC,QCJAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCYAA,QCAAA,QCAAA,QCAAA,QCZAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCYAA,QCAAA,QCZAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCYAA,QCZAA,QCAAA,QCYAA,QCAAA,QCZAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,QCAAA,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,KAAKtI,YAAYiB,MAAM2mC,SAC1Bt/B,KAAKpJ,eAAe0oC,QAAQ,QAAS,CAAEI,IAAK1/B,KAAKtI,YAAYiB,MAAM+mC,MA4BnE,OAxBFwqD,EAAAnhF,UAAAshF,mBAAA,SAAmB/qD,GAClB,OAAOt/B,KAAKtI,YAAYiB,MAAM2mC,UAAYA,GAG3C4qD,EAAAnhF,UAAAuhF,aAAA,WAEC,MAAgB,QADFtqF,KAAKtI,YAAYC,aAAa,UAAW,eAAgBqI,KAAKtI,YAAYiB,MAAM2mC,UAI/F4qD,EAAAnhF,UAAAwhF,oBAAA,SAAoBjrD,GAGnB,IAFA,IAAM7d,EAAezhB,KAAKtI,YAAYu5C,WAAWxvB,aAExCgC,EAAI,EAAGA,EAAIhC,EAAawB,eAAe9lB,OAAQsmB,IAAK,CAC5D,IAAM/B,EAAgBD,EAAawB,eAAeQ,GAElD,GAAI/B,EAAclnB,OAASwF,KAAKtI,YAAYiB,MAAM2mC,QACjD,OAAO,EACD,GAAI5d,EAAclnB,OAAS8kC,EACjC,OAAO,EAIT,OAAO,GA7DI4qD,EAAiBlpD,WAAA,CAF1BrkC,EAAW,MAAO,qBACrBI,EAAO,SAAU,iBAAkB,cAAe,oBAAqB,gBAAiB,iBAAkB,oBAAqB,cAAe,mBAClImtF,GAAb,GAAa3B,EAAA2B,kBAAiBA,EAZb,CAAA70F,EAAAkzF,cAAAlzF,EAAAkzF,YAAW,KAA7B,CAAUlzF,UAAAA,QAAO","file":"portico-core-1.0.min.js","sourcesContent":[null,"function isEither(obj): obj is Partial {\r\n return true;\r\n}\r\n\r\nnamespace Portico {\r\n\r\n\timport pm = Portico.Models;\r\n\timport pmi = Portico.Models.Interfaces;\r\n import ps = Portico.Services;\r\n\r\n // Define the main app\r\n let app = angular.module('app', [\r\n 'colorpicker.module',\r\n 'ngFileUpload',\r\n 'ngStorage',\r\n 'ngDraggable',\r\n 'ui.select',\r\n 'ui.bootstrap',\r\n 'ui.mask',\r\n\t\t'ui.router',\r\n\t\t'ui.scrollpoint'\r\n ]);\r\n\r\n class AppBootStrap {\r\n static bootAngular() {\r\n app.run([\r\n\t\t\t\t'$interval',\r\n\t\t\t\t'$log',\r\n '$q',\r\n\t\t\t\t'$rootScope',\r\n\t\t\t\t'$transitions',\r\n '$window',\r\n\t\t\t\t'actionService',\r\n\t\t\t\t'porticoService',\r\n\t\t\t\t'$state', (\r\n\t\t\t\t\t$interval: angular.IIntervalService,\r\n\t\t\t\t\t$log: angular.ILogService,\r\n $q: angular.IQService,\r\n\t\t\t\t\t$rootScope: ng.IRootScopeService,\r\n\t\t\t\t\t$transitions: any,\r\n $window: angular.IWindowService,\r\n\t\t\t\t\tactionService: ps.IActionService,\r\n\t\t\t\t\tporticoService: ps.IPorticoService,\r\n $state: ng.ui.IStateService\r\n ) => {\r\n\t\t\t\t\t$log.info('App Started.');\r\n\t\t\t\t\t($rootScope).actionService = actionService;\r\n\t\t\t\t\t($rootScope).porticoService = porticoService;\r\n\r\n (window)[\"Promise\"] = $window[\"Promise\"] = $q; // added to support async/await\r\n\r\n $('body').tooltip({\r\n selector: '[data-toggle=\"tooltip\"]',\r\n container: 'body'\r\n });\r\n\r\n $(document).on('mouseover', 'tc-mode-edit', (e) => {\r\n e.stopPropagation();\r\n $(e.currentTarget).addClass('hover');\r\n });\r\n\r\n $(document).on('mouseout', 'tc-mode-edit', (e) => {\r\n e.stopPropagation();\r\n $(e.currentTarget).removeClass('hover');\r\n });\r\n\r\n //$(document).on('hidden.bs.modal', () => {\r\n // if ($('.modal-backdrop').length > 0) {\r\n // $('body').addClass('modal-open');\r\n // $('body').css('padding-right', '17px');\r\n // } else {\r\n // $('body').removeClass('modal-open');\r\n // $('body').css('padding-right', '0');\r\n // }\r\n //});\r\n\r\n\t\t\t\t\t$interval(() => {\r\n\t\t\t\t\t\tconst useSession = porticoService.dataService.getDataValue('Reference', 'Id', 'use-session', '').toLowerCase() === 'true';\r\n\r\n\t\t\t\t\t\tif (useSession) {\r\n\t\t\t\t\t\t\tif (porticoService.authenticationService.hasSession()) {\r\n\t\t\t\t\t\t\t\tif (porticoService.dataService.session.user &&\r\n\t\t\t\t\t\t\t\t\tporticoService.dataService.getDataValue('Modal', 'Body', 'session-warning') &&\r\n\t\t\t\t\t\t\t\t\tporticoService.authenticationService.isExpiring()) {\r\n\t\t\t\t\t\t\t\t\tconst scope = angular.element(document.getElementById('portico-app')).scope();\r\n\t\t\t\t\t\t\t\t\tporticoService.modalService.show2(scope, 'session-warning');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else if (!porticoService.dataService.temp.creating_session) {\r\n\t\t\t\t\t\t\t\tporticoService.dataService.temp.creating_session = true;\r\n\t\t\t\t\t\t\t\tporticoService.authenticationService.createSession().then(() => {\r\n\t\t\t\t\t\t\t\t\tif (porticoService.dataService.session.user) {\r\n\t\t\t\t\t\t\t\t\t\tporticoService.dataService.session.user = null;\r\n\t\t\t\t\t\t\t\t\t\tporticoService.state(null, 'layout', 'home', null, null, { ppid: encodeURI(porticoService.dataService.state.fullRoute || '/app/layout/home'), psid: 'session-expired' });\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}).finally(() => {\r\n\t\t\t\t\t\t\t\t\tporticoService.dataService.temp.creating_session = false;\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}, 60000);\r\n\r\n\t\t\t\t\t$transitions.onError({}, (transition) => {\r\n\t\t\t\t\t\tif (!transition.ignored() && transition.error().type !== 2) {\r\n\t\t\t\t\t\t\tconst stateChangeAction = porticoService.dataService.getDataValue('Resolve', 'Eval', 'stateChangeError');\r\n\r\n\t\t\t\t\t\t\tif (stateChangeAction) {\r\n\t\t\t\t\t\t\t\teval(stateChangeAction);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t//event.preventDefault();\r\n\t\t\t\t\t\t\tporticoService.state(null, 'layout', 'error');\r\n\t\t\t\t\t\t}\r\n });\r\n\r\n\t\t\t\t\t$transitions.onStart({}, (transition) => {\r\n\t\t\t\t\t\tconst stateChangeAction = porticoService.dataService.getDataValue('Resolve', 'Eval', 'stateChangeStart');\r\n\r\n\t\t\t\t\t\tif (stateChangeAction) {\r\n\t\t\t\t\t\t\teval(stateChangeAction);\r\n\t\t\t\t\t\t}\r\n });\r\n\r\n\t\t\t\t\t$transitions.onSuccess({}, (transition) => {\r\n\t\t\t\t\t\tconst to = transition.to();\r\n\t\t\t\t\t\tconst params = transition.params();\r\n\t\t\t\t\t\tconst stateChangeAction = porticoService.dataService.getDataValue('Resolve', 'Eval', 'stateChangeSuccess');\r\n const title = porticoService.dataService.getDataValue('Page', 'Title', porticoService.dataService.state.page);\r\n\t\t\t\t\t\tconst useSession = porticoService.dataService.getDataValue('Reference', 'Id', 'use-session', '').toLowerCase() === 'true';\r\n\r\n\t\t\t\t\t\tporticoService.dataService.state.root = _.trimEnd(window.location.origin + window.location.pathname, '/') + '/';\r\n\t\t\t\t\t\tporticoService.dataService.state.fullRoute = transition.router.stateService.href(to.name, params);\r\n\r\n\t\t\t\t\t\tif (to.name === 'app.layout.page' || to.name === 'app.layout.page.intake.section') {\r\n\t\t\t\t\t\t\t// this is only needed for sites that actually use session\r\n\t\t\t\t\t\t\tif (useSession) {\r\n\t\t\t\t\t\t\t\tporticoService.authenticationService.touchSession();\r\n\r\n\t\t\t\t\t\t\t\tif (to.name === 'app.layout.page') {\r\n\t\t\t\t\t\t\t\t\tlet value = null;\r\n\t\t\t\t\t\t\t\t\tif (!value) value = porticoService.dataService.getDataValue('Page', 'Features', `${params.app}.${params.layout}.${params.page}`);\r\n\t\t\t\t\t\t\t\t\tif (!value) value = porticoService.dataService.getDataValue('Page', 'Features', `${params.layout}.${params.page}`);\r\n\t\t\t\t\t\t\t\t\tif (!value) value = porticoService.dataService.getDataValue('Page', 'Features', `${params.page}`);\r\n\t\t\t\t\t\t\t\t\tif (!value) value = '';\r\n\r\n\t\t\t\t\t\t\t\t\tconst features = _.difference(value.split(','), ['']);\r\n\r\n\t\t\t\t\t\t\t\t\tif (!porticoService.authenticationService.hasSession()) {\r\n\t\t\t\t\t\t\t\t\t\tif (!porticoService.dataService.temp.creating_session) {\r\n\t\t\t\t\t\t\t\t\t\t\tporticoService.dataService.temp.creating_session = true;\r\n\t\t\t\t\t\t\t\t\t\t\t//event.preventDefault();\r\n\t\t\t\t\t\t\t\t\t\t\tporticoService.authenticationService.createSession().then(() => {\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (porticoService.dataService.session.user) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tporticoService.dataService.session.user = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (params.page !== 'home') {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tporticoService.state(null, 'layout', 'home', null, null, { ppid: encodeURI(porticoService.dataService.state.fullRoute), psid: 'session-expired' });\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}).finally(() => {\r\n\t\t\t\t\t\t\t\t\t\t\t\tporticoService.dataService.temp.creating_session = false;\r\n\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t} else if (!porticoService.authenticationService.isAuthenticated()) {\r\n\t\t\t\t\t\t\t\t\t\t//event.preventDefault();\r\n\t\t\t\t\t\t\t\t\t\tif (_.includes(features, 'Authenticated')) {\r\n\t\t\t\t\t\t\t\t\t\t\tif (params.page !== 'home') {\r\n\t\t\t\t\t\t\t\t\t\t\t\tporticoService.state(null, 'layout', 'home', null, null, { ppid: encodeURI(porticoService.dataService.state.fullRoute), psid: 'not-authenticated' });\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t} else if (!porticoService.authenticationService.isAuthorized(features)) {\r\n\t\t\t\t\t\t\t\t\t\t//event.preventDefault();\r\n\t\t\t\t\t\t\t\t\t\tif (params.page !== 'unauthorized') {\r\n\t\t\t\t\t\t\t\t\t\t\tporticoService.state(null, 'layout', 'unauthorized');\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n if (stateChangeAction) {\r\n eval(stateChangeAction);\r\n }\r\n\r\n\t\t\t\t\t\tif (porticoService.serverConstants.connectTo !== 'Prod') {\r\n\t\t\t\t\t\t\t//$window.document.title = `${porticoService.dataService.setup.portal.portalGroup.name} - ${porticoService.dataService.setup.portal.name} - ${porticoService.serverConstants.connectTo}`;\r\n\t\t\t\t\t\t\t$window.document.title = `${porticoService.dataService.setup.portal.name} - ${porticoService.serverConstants.connectTo}`;\r\n\t\t\t\t\t\t} else if (title) {\r\n\t\t\t\t\t\t\t$window.document.title = title;\r\n\t\t\t\t\t\t}\r\n\r\n // autoscroll to top\r\n document.body.scrollTop = 0;\r\n document.documentElement.scrollTop = 0;\r\n\r\n\t\t\t\t\t\t// remove modal backdrop\r\n\t\t\t\t\t\tporticoService.modalService.clear();\r\n $('body').removeClass('modal-open');\r\n $('.modal').css('display', 'none');\r\n $('.modal-backdrop').remove();\r\n });\r\n }\r\n ])\r\n .config([\r\n '$controllerProvider',\r\n '$localStorageProvider',\r\n '$provide',\r\n '$httpProvider', (\r\n $controllerProvider: angular.IControllerProvider,\r\n $localStorageProvider: ps.IStorageProvider,\r\n $provide: angular.auto.IProvideService,\r\n $httpProvider: angular.IHttpProvider\r\n ) => {\r\n // local storage configuration\r\n $localStorageProvider.setKeyPrefix('portico_');\r\n $localStorageProvider.setSerializer(angular.toJson);\r\n $localStorageProvider.setDeserializer(angular.fromJson);\r\n $httpProvider.interceptors.push('apiInterceptor');\r\n\r\n (app).$controllerProvider = $controllerProvider;\r\n (app).$provide = $provide;\r\n }\r\n ]);\r\n\r\n angular.bootstrap(document.body, ['app']);\r\n }\r\n }\r\n\r\n angular.element(document).ready(() => {\r\n AppBootStrap.bootAngular();\r\n });\r\n}","namespace Portico.Decorators {\r\n\r\n export function Controller(module: string, controller: string) {\r\n return function decorator(target: any) {\r\n if (!module || !controller) {\r\n throw new Error('@Controller(module, controller) must have module and controller names!');\r\n }\r\n\r\n angular.module(module).controller(controller, target);\r\n };\r\n }\r\n}","namespace Portico.Decorators {\r\n\r\n export function Inject(...dependencies: any[]) {\r\n return function decorator(target: any, key?: any, descriptor?: any) {\r\n // if it's true then we injecting dependencies into function and not Class constructor\r\n if (descriptor) {\r\n descriptor.value.$inject = dependencies;\r\n } else {\r\n target.$inject = dependencies;\r\n }\r\n };\r\n }\r\n}","namespace Portico.Decorators {\r\n\r\n export function Service(module: string, service: string) {\r\n return function decorator(target: any) {\r\n if (!module || !service) {\r\n throw new Error('@Service(module, service) must have module and service names!');\r\n }\r\n\r\n angular.module(module).service(service, target);\r\n };\r\n }\r\n}","namespace Portico.Models.Enterprise {\r\n\timport pmg = Portico.Models.Gateway;\r\n\timport psge = apigateway.enums;\r\n\timport psgm = apigateway.models;\r\n\r\n export interface IBaseAccount {\r\n\t\tid: number;\r\n\t\tdisplayId: string;\r\n\t\ttype: string;\r\n\t\tstatus: string;\r\n\t\tpartyId: number;\r\n\t\tsecurePartyId: string;\r\n\t\tprogramId: number;\r\n\t\tassignedUser: number;\r\n\t\tlastModifiedBy: number;\r\n\t\tlastModifiedTime: Date;\r\n\t\taccountAddresses: AccountAddress[];\r\n\t\taccountSessions: AccountSession[];\r\n\t\tattestations: Attestation[];\r\n\t\tcontacts: Contact[];\r\n\t\tcontactPreferences: ContactPreference[];\r\n\t\texternalIds: ExternalId[];\r\n\t\tlinkedPayors: LinkedPayor[];\r\n\t\tnotes: number[];\r\n\t\toptionalServices: OptionalService[];\r\n\t\tphoneNumbers: PhoneNumber[];\r\n\t\ttasks: number[];\r\n\t\tvoiceMailOptIns: VoiceMailOptIn[];\r\n\t\tdocumentRelationships: DocumentRelationship[];\r\n\t\tpayorRelationships: PayorRelationship[];\r\n\t\tpharmacyRelationships: PharmacyRelationship[];\r\n\t\tprescriberRelationships: PrescriberRelationship[];\r\n\t\tprescriptions: Prescription[];\r\n\t\tsiteRelationships: SiteRelationship[];\r\n\t\tassignmentOfBenefitFlag: boolean;\r\n\t\tisIneligibleForMailInClaims: boolean;\r\n\t\tallowAutoReenroll: boolean;\r\n\r\n\t\taddAddress(index?: number): AccountAddress;\r\n\t\taddAttestation(index?: number): Attestation;\r\n\t\taddContact(index?: number): Contact;\r\n\t\taddContactPreference(index?: number): ContactPreference;\r\n\t\taddDocument(index?: number): DocumentRelationship;\r\n\t\taddExternalId(index?: number): ExternalId;\r\n\t\taddLinkedPayor(index?: number): LinkedPayor;\r\n\t\taddOptionalService(index?: number): OptionalService;\r\n\t\taddPayor(role: psge.PayorType, index?: number): PayorRelationship;\r\n\t\taddPharmacy(index?: number): PharmacyRelationship;\r\n\t\taddPhoneNumber(index?: number): PhoneNumber;\r\n\t\taddPrescriber(index?: number): PrescriberRelationship;\r\n\t\taddSite(index?: number): SiteRelationship;\r\n\t\taddVoiceMailOptIn(index?: number): VoiceMailOptIn;\r\n\r\n\t\tfilterPayors(role: psge.PayorType): PayorRelationship[];\r\n\r\n\t\tgetDiagnosisSession(create?: boolean): DiagnosisSession;\r\n\t\tgetPayor(role: psge.PayorType, index: number): PayorRelationship;\r\n\t\tgetSurveySession(surveyId: number, create?: boolean): SurveySession;\r\n\t\tgetSurveySessionIds(): number[];\r\n\r\n\t\tremovePayor(relationship: PayorRelationship): void;\r\n\t\tremovePharmacy(relationship: PharmacyRelationship): void;\r\n\t\tremovePrescriber(relationship: PrescriberRelationship): void;\r\n\t\tremoveSite(relationship: SiteRelationship): void;\r\n\r\n\t\tmapToEnterpriseCoordinatorAccountUpsearchModel(): psgm.EnterpriseCoordinatorAccountServiceModelsAccountUpsearchModel;\r\n\t\tmapToEnterpriseCoordinatorAccountUpsearchModelWithFlags(canUpdate: boolean, canInsert: boolean, skipSearch: boolean): psgm.UpsearchModelEnterpriseCoordinatorAccountServiceModelsAccountUpsearchModel;\r\n\t}\r\n\r\n\texport class BaseAccount implements IBaseAccount {\r\n\t\tid: number;\r\n\t\tdisplayId: string;\r\n\t\ttype: string;\r\n\t\tstatus: string;\r\n\t\tpartyId: number;\r\n\t\tsecurePartyId: string;\r\n\t\tprogramId: number;\r\n\t\tassignedUser: number;\r\n\t\tlastModifiedBy: number;\r\n\t\tlastModifiedTime: Date;\r\n\t\taccountAddresses: AccountAddress[];\r\n\t\taccountSessions: AccountSession[];\r\n\t\tattestations: Attestation[];\r\n\t\tcontacts: Contact[];\r\n\t\tcontactPreferences: ContactPreference[];\r\n\t\texternalIds: ExternalId[];\r\n\t\tlinkedPayors: LinkedPayor[];\r\n\t\tnotes: number[];\r\n\t\toptionalServices: OptionalService[];\r\n\t\tphoneNumbers: PhoneNumber[];\r\n\t\tprescriptions: Prescription[];\r\n\t\ttasks: number[];\r\n\t\tvoiceMailOptIns: VoiceMailOptIn[];\r\n\t\tdocumentRelationships: DocumentRelationship[];\r\n\t\tpayorRelationships: PayorRelationship[];\r\n\t\tpharmacyRelationships: PharmacyRelationship[];\r\n\t\tprescriberRelationships: PrescriberRelationship[];\r\n\t\tsiteRelationships: SiteRelationship[];\r\n\t\tassignmentOfBenefitFlag: boolean;\r\n\t\tisIneligibleForMailInClaims: boolean;\r\n\t\tallowAutoReenroll: boolean;\r\n\r\n\t\tconstructor(obj?: IBaseAccount | any) {\r\n this.id = null;\r\n\t\t\tthis.displayId = null;\r\n this.type = null;\r\n this.status = null;\r\n\t\t\tthis.partyId = null;\r\n\t\t\tthis.securePartyId = null;\r\n\t\t\tthis.programId = null;\r\n this.assignedUser = null;\r\n this.lastModifiedBy = null;\r\n\t\t\tthis.lastModifiedTime = null;\r\n\t\t\tthis.accountAddresses = [];\r\n\t\t\tthis.accountSessions = [];\r\n\t\t\tthis.attestations = [];\r\n\t\t\tthis.contacts = [];\r\n\t\t\tthis.contactPreferences = [];\r\n\t\t\tthis.externalIds = [];\r\n\t\t\tthis.linkedPayors = [];\r\n\t\t\tthis.notes = [];\r\n\t\t\tthis.optionalServices = [];\r\n\t\t\tthis.phoneNumbers = [];\r\n\t\t\tthis.prescriptions = [];\r\n this.tasks = [];\r\n this.voiceMailOptIns = [];\r\n\t\t\tthis.documentRelationships = [];\r\n\t\t\tthis.payorRelationships = [];\r\n\t\t\tthis.pharmacyRelationships = [];\r\n\t\t\tthis.prescriberRelationships = [];\r\n\t\t\tthis.siteRelationships = [];\r\n\t\t\tthis.assignmentOfBenefitFlag = false;\r\n\t\t\tthis.isIneligibleForMailInClaims = false;\r\n\t\t\tthis.allowAutoReenroll = false\r\n\r\n\t\t\tif (obj) {\r\n this.id = obj.id || obj.accountId;\r\n\t\t\t\tthis.displayId = obj.displayId;\r\n this.type = obj.type || obj.accountType;\r\n this.status = obj.status || obj.accountStatus;\r\n\t\t\t\tthis.partyId = obj.partyId;\r\n\t\t\t\tthis.securePartyId = obj.securePartyId;\r\n\t\t\t\tthis.programId = obj.programId;\r\n\t\t\t\tthis.assignedUser = obj.assignedUser;\r\n\t\t\t\tthis.lastModifiedBy = obj.lastModifiedBy;\r\n\t\t\t\tthis.assignmentOfBenefitFlag = obj.assignmentOfBenefitFlag || false;\r\n\t\t\t\tthis.isIneligibleForMailInClaims = obj.isIneligibleForMailInClaims || false;\r\n\t\t\t\tthis.allowAutoReenroll = obj.allowAutoReenroll || false;\r\n\r\n\t\t\t\tif (obj.lastModifiedTime) {\r\n\t\t\t\t\tthis.lastModifiedTime = new Date(obj.lastModifiedTime.toString());\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.accountAddresses) {\r\n\t\t\t\t\tfor (const accountAddress of obj.accountAddresses) {\r\n\t\t\t\t\t\tthis.accountAddresses.push(new AccountAddress(accountAddress));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.accountSessions) {\r\n\t\t\t\t\tfor (const accountSession of obj.accountSessions) {\r\n\t\t\t\t\t\tthis.accountSessions.push(new AccountSession(accountSession));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.attestations) {\r\n\t\t\t\t\tfor (const attestation of obj.attestations) {\r\n\t\t\t\t\t\tthis.attestations.push(new Attestation(attestation));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.contacts || obj.accountContacts) {\r\n\t\t\t\t\tfor (const contact of obj.contacts || obj.accountContacts) {\r\n\t\t\t\t\t\tthis.contacts.push(new Contact(contact));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.contactPreferences) {\r\n\t\t\t\t\tfor (const contactPreference of obj.contactPreferences) {\r\n\t\t\t\t\t\tthis.contactPreferences.push(new ContactPreference(contactPreference));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.externalIds) {\r\n\t\t\t\t\tfor (const externalId of obj.externalIds) {\r\n\t\t\t\t\t\tthis.externalIds.push(new ExternalId(externalId));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.linkedPayors) {\r\n\t\t\t\t\tfor (const linkedPayor of obj.linkedPayors) {\r\n\t\t\t\t\t\tthis.linkedPayors.push(new LinkedPayor(linkedPayor));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.notes) {\r\n\t\t\t\t\tthis.notes = obj.notes;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.optionalServices) {\r\n\t\t\t\t\tfor (const optionalService of obj.optionalServices) {\r\n\t\t\t\t\t\tthis.optionalServices.push(new OptionalService(optionalService));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.phoneNumbers || obj.accountPhoneNumbers) {\r\n\t\t\t\t\tfor (const phoneNumber of obj.phoneNumbers || obj.accountPhoneNumbers) {\r\n\t\t\t\t\t\tthis.phoneNumbers.push(new PhoneNumber(phoneNumber));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.prescriptions) {\r\n\t\t\t\t\tfor (const prescription of obj.prescriptions) {\r\n\t\t\t\t\t\tthis.prescriptions.push(new Prescription(prescription));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.tasks) {\r\n\t\t\t\t\tthis.tasks = obj.tasks;\r\n\t\t\t\t}\r\n\r\n if (obj.voiceMailOptIns) {\r\n for (const voiceMailOptIn of obj.voiceMailOptIns) {\r\n this.voiceMailOptIns.push(new VoiceMailOptIn(voiceMailOptIn));\r\n }\r\n }\r\n\r\n\t\t\t\tif (obj.documentRelationships || obj.documents) {\r\n\t\t\t\t\tfor (const documentRelationship of obj.documentRelationships || obj.documents) {\r\n\t\t\t\t\t\tthis.documentRelationships.push(new DocumentRelationship(documentRelationship));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.payorRelationships) {\r\n\t\t\t\t\tfor (const payorRelationship of obj.payorRelationships) {\r\n\t\t\t\t\t\tthis.payorRelationships.push(new PayorRelationship(payorRelationship));\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (obj.payors) {\r\n\t\t\t\t\tfor (const role of obj.payors) {\r\n\t\t\t\t\t\tfor (const relation of role.accountRelations) {\r\n\t\t\t\t\t\t\tthis.payorRelationships.push(new PayorRelationship({ payorId: relation.relatedId, role: role.roleType, order: relation.coverageOrder, isPrimary: relation.isPrimary }));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n }\r\n\r\n\t\t\t\tif (obj.pharmacyRelationships || obj.pharmacies) {\r\n\t\t\t\t\tfor (const pharmacyRelationship of obj.pharmacyRelationships || obj.pharmacies) {\r\n\t\t\t\t\t\tthis.pharmacyRelationships.push(new PharmacyRelationship(pharmacyRelationship));\r\n }\r\n }\r\n\r\n\t\t\t\tif (obj.prescriberRelationships || obj.prescribers) {\r\n\t\t\t\t\tfor (const prescriberRelationship of obj.prescriberRelationships || obj.prescribers) {\r\n\t\t\t\t\t\tthis.prescriberRelationships.push(new PrescriberRelationship(prescriberRelationship));\r\n }\r\n }\r\n\r\n\t\t\t\tif (obj.siteRelationships || obj.sites) {\r\n\t\t\t\t\tfor (const siteRelationship of obj.siteRelationships || obj.sites) {\r\n\t\t\t\t\t\tthis.siteRelationships.push(new SiteRelationship(siteRelationship));\r\n }\r\n }\r\n\t\t\t}\r\n }\r\n\r\n\t\taddAddress(index: number = null): AccountAddress {\r\n\t\t\tconst length = this.accountAddresses.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.accountAddresses[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst accountAddress = new AccountAddress();\r\n\t\t\tthis.accountAddresses.push(accountAddress);\r\n\t\t\treturn accountAddress;\r\n\t\t}\r\n\r\n\t\taddAttestation(index: number = null): Attestation {\r\n\t\t\tconst length = this.attestations.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.attestations[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst attestation = new Attestation();\r\n\t\t\tthis.attestations.push(attestation);\r\n\t\t\treturn attestation;\r\n\t\t}\r\n\r\n\t\taddContact(index: number = null): Contact {\r\n\t\t\tconst length = this.contacts.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.contacts[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst contact = new Contact();\r\n\t\t\tthis.contacts.push(contact);\r\n\t\t\treturn contact;\r\n\t\t}\r\n\r\n\t\taddContactPreference(index: number = null): ContactPreference {\r\n\t\t\tconst length = this.contactPreferences.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.contactPreferences[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst contactPreference = new ContactPreference();\r\n\t\t\tthis.contactPreferences.push(contactPreference);\r\n\t\t\treturn contactPreference;\r\n\t\t}\r\n\r\n\t\taddDocument(index: number = null): DocumentRelationship {\r\n\t\t\tconst length = this.documentRelationships.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.documentRelationships[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst relationship = new DocumentRelationship();\r\n\t\t\tthis.documentRelationships.push(relationship);\r\n\t\t\treturn relationship;\r\n\t\t}\r\n\r\n\t\taddExternalId(index: number = null): ExternalId {\r\n\t\t\tconst length = this.externalIds.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.externalIds[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst externalId = new ExternalId();\r\n\t\t\tthis.externalIds.push(externalId);\r\n\t\t\treturn externalId;\r\n\t\t}\r\n\r\n\t\taddLinkedPayor(index: number = null): LinkedPayor {\r\n\t\t\tconst length = this.linkedPayors.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.linkedPayors[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst linkedPayor = new LinkedPayor();\r\n\t\t\tthis.linkedPayors.push(linkedPayor);\r\n\t\t\treturn linkedPayor;\r\n\t\t}\r\n\r\n\t\taddOptionalService(index: number = null): OptionalService {\r\n\t\t\tconst length = this.optionalServices.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.optionalServices[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst optionalService = new OptionalService();\r\n\t\t\tthis.optionalServices.push(optionalService);\r\n\t\t\treturn optionalService;\r\n\t\t}\r\n\r\n\t\taddPayor(role: psge.PayorType, index: number = null): PayorRelationship {\r\n\t\t\tconst matches = this.filterPayors(role);\r\n\r\n\t\t\tif (index && index < matches.length) {\r\n\t\t\t\treturn matches[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst relationship = new PayorRelationship({\r\n\t\t\t\trole: role,\r\n\t\t\t\torder: matches.length + 1,\r\n\t\t\t\tisPrimary: matches.length === 0,\r\n\t\t\t\tpayor: new Payor({ type: role }),\r\n\t\t\t\tpayorBenefit: new PayorBenefit()\r\n\t\t\t});\r\n\r\n\t\t\tthis.payorRelationships.push(relationship);\r\n\r\n\t\t\treturn relationship;\r\n\t\t}\r\n\r\n\t\taddPharmacy(index: number = null): PharmacyRelationship {\r\n\t\t\tconst length = this.pharmacyRelationships.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.pharmacyRelationships[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst relationship = new PharmacyRelationship({\r\n\t\t\t\tisPrimary: length === 0,\r\n\t\t\t\tpharmacy: new Pharmacy()\r\n\t\t\t});\r\n\r\n\t\t\tthis.pharmacyRelationships.push(relationship);\r\n\r\n\t\t\treturn relationship;\r\n\t\t}\r\n\r\n\t\taddPhoneNumber(index: number = null): PhoneNumber {\r\n\t\t\tconst length = this.phoneNumbers.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.phoneNumbers[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst phoneNumber = new PhoneNumber();\r\n\t\t\tthis.phoneNumbers.push(phoneNumber);\r\n\t\t\treturn phoneNumber;\r\n\t\t}\r\n\r\n\t\taddPrescriber(index: number = null): PrescriberRelationship {\r\n\t\t\tconst length = this.prescriberRelationships.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.prescriberRelationships[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst relationship = new PrescriberRelationship({\r\n\t\t\t\tisPrimary: length === 0,\r\n\t\t\t\tprescriber: new Prescriber()\r\n\t\t\t});\r\n\r\n\t\t\tthis.prescriberRelationships.push(relationship);\r\n\r\n\t\t\treturn relationship;\r\n\t\t}\r\n\r\n\t\taddSite(index: number = null): SiteRelationship {\r\n\t\t\tconst length = this.siteRelationships.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.siteRelationships[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst relationship = new SiteRelationship({\r\n\t\t\t\tisPrimary: length === 0,\r\n\t\t\t\tsite: new Site()\r\n\t\t\t});\r\n\r\n\t\t\tthis.siteRelationships.push(relationship);\r\n\r\n\t\t\treturn relationship;\r\n\t\t}\r\n\r\n\t\taddVoiceMailOptIn(index: number = null): VoiceMailOptIn {\r\n\t\t\tconst length = this.voiceMailOptIns.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.voiceMailOptIns[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst voiceMailOptIn = new VoiceMailOptIn();\r\n\t\t\tthis.voiceMailOptIns.push(voiceMailOptIn);\r\n\t\t\treturn voiceMailOptIn;\r\n\t\t}\r\n\r\n\t\tfilterPayors(role: psge.PayorType): PayorRelationship[] {\r\n\t\t\tlet matches = this.payorRelationships.filter((payorRelationship) => {\r\n\t\t\t\treturn payorRelationship.role === role;\r\n\t\t\t});\r\n\r\n\t\t\treturn matches;\r\n\t\t}\r\n\r\n\t\tgetDiagnosisSession(create: boolean = true): DiagnosisSession {\r\n\t\t\tconst accountSessions = this.accountSessions.filter((accountSession) => {\r\n\t\t\t\treturn !accountSession.id && accountSession.diagnosisSession;\r\n\t\t\t});\r\n\r\n\t\t\tif (accountSessions && accountSessions.length > 0) {\r\n\t\t\t\treturn accountSessions[0].diagnosisSession;\r\n\t\t\t}\r\n\r\n\t\t\tif (!create) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tconst diagnosisSession = new DiagnosisSession();\r\n\r\n\t\t\tconst accountSession = new AccountSession({\r\n\t\t\t\tdiagnosisSession: diagnosisSession\r\n\t\t\t});\r\n\r\n\t\t\tthis.accountSessions.push(accountSession);\r\n\r\n\t\t\treturn accountSession.diagnosisSession;\r\n\t\t}\r\n\r\n\t\tgetPayor(role: psge.PayorType, index: number): PayorRelationship {\r\n\t\t\tconst matches = this.filterPayors(role);\r\n\t\t\treturn index < matches.length ? matches[index] : null;\r\n\t\t}\r\n\r\n\t\tgetSurveySession(surveyId: number, create: boolean = true): SurveySession {\r\n\t\t\tconst accountSessions = this.accountSessions.filter((accountSession) => {\r\n\t\t\t\treturn !accountSession.id && accountSession.surveySession && accountSession.surveySession.surveyId === surveyId;\r\n\t\t\t});\r\n\r\n\t\t\tif (accountSessions && accountSessions.length > 0) {\r\n\t\t\t\treturn accountSessions[0].surveySession;\r\n\t\t\t}\r\n\r\n\t\t\tif (!create) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tconst surveySession = new SurveySession({\r\n\t\t\t\tsurveyId: surveyId\r\n\t\t\t});\r\n\r\n\t\t\tconst accountSession = new AccountSession({\r\n\t\t\t\tsurveyId: surveyId,\r\n\t\t\t\tsurveySession: surveySession\r\n\t\t\t});\r\n\r\n\t\t\tthis.accountSessions.push(accountSession);\r\n\r\n\t\t\treturn accountSession.surveySession;\r\n\t\t}\r\n\r\n\t\tgetSurveySessionIds(): number[] {\r\n\t\t\tvar surveySessionIds: number[] = [];\r\n\r\n\t\t\tif (this.accountSessions && this.accountSessions.length > 0) {\r\n\t\t\t\tvar surveysWithSurveySession = _.filter(this.accountSessions, x => { return x.surveySession && x.surveySession.surveySessionId });\r\n\r\n\t\t\t\tsurveySessionIds = _.map(surveysWithSurveySession as AccountSession[], srvy => {\r\n\t\t\t\t\treturn srvy.surveySession.surveySessionId\r\n\t\t\t\t})\r\n\t\t\t}\r\n\r\n\t\t\treturn surveySessionIds;\r\n\t\t}\r\n\r\n\t\tremovePayor(relationship: PayorRelationship): void {\r\n\t\t\tconst matches = this.payorRelationships.filter((payorRelationship) => {\r\n\t\t\t\treturn payorRelationship !== relationship;\r\n\t\t\t});\r\n\r\n\t\t\tthis.payorRelationships = matches;\r\n\t\t}\r\n\r\n\t\tremovePharmacy(relationship: PharmacyRelationship): void {\r\n\t\t\tconst matches = this.pharmacyRelationships.filter((pharmacyRelationship) => {\r\n\t\t\t\treturn pharmacyRelationship !== relationship;\r\n\t\t\t});\r\n\r\n\t\t\tthis.pharmacyRelationships = matches;\r\n\t\t}\r\n\r\n\t\tremovePrescriber(relationship: PrescriberRelationship): void {\r\n\t\t\tconst matches = this.prescriberRelationships.filter((prescriberRelationship) => {\r\n\t\t\t\treturn prescriberRelationship !== relationship;\r\n\t\t\t});\r\n\r\n\t\t\tthis.prescriberRelationships = matches;\r\n\t\t}\r\n\r\n\t\tremoveSite(relationship: SiteRelationship): void {\r\n\t\t\tconst matches = this.siteRelationships.filter((siteRelationship) => {\r\n\t\t\t\treturn siteRelationship !== relationship;\r\n\t\t\t});\r\n\r\n\t\t\tthis.siteRelationships = matches;\r\n\t\t}\r\n\r\n mapToEnterpriseCoordinatorAccountUpsearchModel(): psgm.EnterpriseCoordinatorAccountServiceModelsAccountUpsearchModel {\r\n return {\r\n accountId: this.id,\r\n accountStatus: Portico.Models.Gateway.AccountStatus[this.status],\r\n accountType: Portico.Models.Gateway.AccountType[this.type],\r\n\t\t\t\taddresses: this.accountAddresses ? _.map(this.accountAddresses, addr => {\r\n return {\r\n id: addr.id,\r\n receiverFirstName: addr.receiverFirstName,\r\n receiverLastName: addr.receiverLastName,\r\n addressType: Portico.Models.Gateway.AddressType[addr.type],\r\n addressOne: addr.address1,\r\n addressTwo: addr.address2,\r\n city: addr.city,\r\n state: addr.state,\r\n zip: addr.zip,\r\n country: addr.country\r\n } as psgm.EnterpriseCoordinatorAccountServiceModelsAccountAddressUpsearchModel\r\n }) : [],\r\n assignedUser: this.assignedUser,\r\n contacts: this.contacts ? _.map(this.contacts, cnt => {\r\n return {\r\n id: cnt.id,\r\n roleType: Portico.Models.Gateway.RoleType[cnt.type],\r\n firstName: cnt.firstName,\r\n lastName: cnt.lastName,\r\n phoneNumber: cnt.phoneNumbers && cnt.phoneNumbers.length > 0 ? cnt.phoneNumbers[0].number : [],\r\n altPhoneNumber: cnt.phoneNumbers && cnt.phoneNumbers.length > 1 ? cnt.phoneNumbers[1].number : [],\r\n } as psgm.EnterpriseCoordinatorAccountServiceModelsAccountContactUpsearchModel\r\n }) : [],\r\n contactPreferences: this.contactPreferences ? _.map(this.contactPreferences, cntpref => {\r\n return {\r\n contactInfoType: cntpref.contactInfoType,\r\n isOptedIn: cntpref.isOptedIn,\r\n isPreferred: cntpref.isPreferred\r\n } as psgm.EnterpriseCoordinatorAccountServiceModelsAccountContactPreferenceModel\r\n }) : [],\r\n documents: _.map(this.documentRelationships, d => {\r\n return {\r\n documentId: d.documentId,\r\n comment: d.comment\r\n } as psgm.EnterpriseCoordinatorCaseDocumentRelationshipModel\r\n }),\r\n\t\t\t\texpireExistingAccountRelationships: true,\r\n\t\t\t\texternalIds: this.externalIds ? _.map(this.externalIds, e => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\texternalIdType: typeof e.type === 'number' ? e.type : Portico.Models.Gateway.AccountExternalIdType[e.type],\r\n\t\t\t\t\t\texternalId: e.value\r\n\t\t\t\t\t} as psgm.EnterpriseCoordinatorAccountServiceModelsAccountExternalIdModel\r\n\t\t\t\t}) : [],\r\n\t\t\t\tphoneNumbers: this.phoneNumbers ? _.map(this.phoneNumbers, ph => {\r\n return {\r\n id: ph.id,\r\n phoneType: ph.type,\r\n phoneNumber: ph.number,\r\n extension: ph.extension,\r\n isVoicemailOptedIn: ph.isVoicemailOptedIn,\r\n isPrimary: ph.isPrimary\r\n } as psgm.EnterpriseCoordinatorAccountServiceModelsAccountPhoneUpsearchModel\r\n }) : [],\r\n notes: this.notes,\r\n\t\t\t\ttasks: this.tasks,\r\n\t\t\t\tvoicemailOptInStatus: this.voiceMailOptIns ? _.map(this.voiceMailOptIns, vm => {\r\n return {\r\n phoneNumberId: vm.phoneNumberId,\r\n isVmOptedIn: vm.isVmOptedIn\r\n\r\n } as psgm.EnterpriseCoordinatorAccountServiceModelsVoicemailOptInModel\r\n\t\t\t\t}) : [],\r\n\t\t\t\tassignmentOfBenefitFlag: this.assignmentOfBenefitFlag,\r\n\t\t\t\tallowAutoReenroll: this.allowAutoReenroll,\r\n } as psgm.EnterpriseCoordinatorAccountServiceModelsAccountUpsearchModel\r\n\t\t}\r\n\r\n\t\tmapToEnterpriseCoordinatorAccountUpsearchModelWithFlags(canUpdate: boolean, canInsert: boolean, skipSearch: boolean): psgm.UpsearchModelEnterpriseCoordinatorAccountServiceModelsAccountUpsearchModel {\r\n\t\t\treturn {\r\n\t\t\t\tcanUpdate: canUpdate,\r\n\t\t\t\tcanInsert: canInsert,\r\n\t\t\t\tskipSearch: skipSearch,\r\n\t\t\t\tmodel: this.mapToEnterpriseCoordinatorAccountUpsearchModel()\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\texport interface IDocumentRelationship {\r\n\t\tdocumentId: number;\r\n\t\tcomment: string;\r\n\t}\r\n\r\n\texport class DocumentRelationship implements IDocumentRelationship {\r\n\t\tdocumentId: number;\r\n\t\tcomment: string;\r\n\r\n\t\tconstructor(obj?: IDocumentRelationship) {\r\n\t\t\tthis.documentId = null;\r\n\t\t\tthis.comment = null;\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tthis.documentId = obj.documentId;\r\n\t\t\t\tthis.comment = obj.comment;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\texport interface IPayorRelationship {\r\n\t\tpayorId: number;\r\n\t\trole: psge.PayorType;\r\n\t\torder: number;\r\n\t\tisPrimary: boolean;\r\n\t\tpayor: Payor;\r\n\t\tpayorBenefit: PayorBenefit;\r\n\t\tcoverage: string;\r\n\r\n\t\tmapToEnterpriseCoordinatorPayorUpsearchModel(): psgm.EnterpriseCoordinatorPayorServiceModelsPayorUpsearchModel;\r\n\t\tmapToEnterpriseCoordinatorPayorUpsearchModelWithFlags(canUpdate: boolean, canInsert: boolean, skipSearch: boolean): psgm.UpsearchModelEnterpriseCoordinatorPayorServiceModelsPayorUpsearchModel;\r\n\t}\r\n\r\n\texport class PayorRelationship implements IPayorRelationship {\r\n\t\tpayorId: number;\r\n\t\trole: psge.PayorType;\r\n\t\torder: number;\r\n\t\tisPrimary: boolean;\r\n\t\tpayor: Payor;\r\n\t\tpayorBenefit: PayorBenefit;\r\n\t\tcoverage: string;\r\n\r\n\t\tconstructor(obj?: Partial) {\r\n\t\t\tthis.payorId = null;\r\n\t\t\tthis.role = null;\r\n\t\t\tthis.order = null;\r\n\t\t\tthis.isPrimary = null;\r\n\t\t\tthis.payor = null;\r\n\t\t\tthis.payorBenefit = null;\r\n\t\t\tthis.coverage = null;\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tthis.payorId = obj.payorId;\r\n\t\t\t\tthis.role = obj.role;\r\n\t\t\t\tthis.order = obj.order;\r\n\t\t\t\tthis.isPrimary = obj.isPrimary;\r\n\r\n\t\t\t\tif (obj.payor) {\r\n\t\t\t\t\tthis.payor = new Payor(obj.payor);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.payorBenefit) {\r\n\t\t\t\t\tthis.payorBenefit = new PayorBenefit(obj.payorBenefit);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.coverage = obj.coverage;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tmapToEnterpriseCoordinatorPayorUpsearchModel() : psgm.EnterpriseCoordinatorPayorServiceModelsPayorUpsearchModel {\r\n if (!this.payor) {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tpayorId: this.payorId\r\n\t\t\t\t} as psgm.EnterpriseCoordinatorPayorServiceModelsPayorUpsearchModel;\r\n\t\t\t}\r\n\r\n\t\t\treturn {\r\n\t\t\t\tpayorId: this.payor.id ? this.payor.id : this.payorId,\r\n\t\t\t\tpayorName: this.payor.name,\r\n\t\t\t\tpayorType: this.payor.type,\r\n\t\t\t\tpayorBin: this.payor.bin,\r\n\t\t\t\tpayorPcn: this.payor.pcn,\r\n\t\t\t\tpayorGroup: this.payor.group,\r\n\t\t\t\tisPlaceholder: this.payor.isPlaceholder,\r\n\t\t\t\taccountRoleType: this.payor.type,\r\n\t\t\t\taccountRelationshipCoverageOrder: this.order,\r\n\t\t\t\taccountRelationshipIsPrimary: this.isPrimary,\r\n\t\t\t\taddresses: this.payor.addresses ? _.map(this.payor.addresses, addr => {\r\n\t\t\t\t\treturn addr.mapToEnterpriseCoordinatorAddress();\r\n\t\t\t\t}) : [],\r\n\t\t\t\temailAddresses: this.payor.emailAddresses ? _.map(this.payor.emailAddresses, email => {\r\n\t\t\t\t\treturn email.mapToEnterpriseCoordinatorEmailAddress();\r\n\t\t\t\t}) : [],\r\n\t\t\t\tphoneNumbers: this.payor.phoneNumbers ? _.map(this.payor.phoneNumbers, ph => {\r\n\t\t\t\t\treturn ph.mapToEnterpriseCoordinatorPhoneUpsearchModel();\r\n\t\t\t\t}) : [],\r\n\t\t\t\twebAddresses: this.payor.webAddresses ? _.map(this.payor.webAddresses, webAddr => {\r\n\t\t\t\t\treturn webAddr.mapToEnterpriseCoordinatorWebAddress();\r\n\t\t\t\t}) : [],\r\n\t\t\t\tcontacts:[],\r\n\t\t\t\tpayorBenefit: {\r\n\t\t\t\t\tdateOfBirth: _.get(this, 'payorBenefit.dateOfBirth', null),\r\n\t\t\t\t\tpolicyHolderFirstName: _.get(this, 'payorBenefit.policyHolderFirstName', null),\r\n\t\t\t\t\tpolicyHolderLastName: _.get(this, 'payorBenefit.policyHolderLastName', null),\r\n\t\t\t\t\trelationshipToPatient: _.get(this, 'payorBenefit.relationshipToPatient', null),\r\n\t\t\t\t\tphone: _.get(this, 'payorBenefit.phone', null),\r\n\t\t\t\t\tgroupNumber: _.get(this, 'payorBenefit.groupNumber', null),\r\n\t\t\t\t\tpolicyNumber: _.get(this, 'payorBenefit.policyNumber', null),\r\n\t\t\t\t\tpersonCode: _.get(this, 'payorBenefit.personCode', null),\r\n\t\t\t\t\tplanType: _.get(this, 'payorBenefit.planType', null),\r\n\t\t\t\t\tplanEffectiveDate: _.get(this, 'payorBenefit.planEffectiveDate', null),\r\n\t\t\t\t\tplanExpirationDate: _.get(this, 'payorBenefit.planExpirationDate', null),\r\n\t\t\t\t\tplanTerminationDate: _.get(this, 'payorBenefit.planTerminationDate', null),\r\n\t\t\t\t\tpolicyName: _.get(this, 'payorBenefit.policyName', null),\r\n\t\t\t\t\tbin: _.get(this, 'payorBenefit.bin', null),\r\n\t\t\t\t\tpcn: _.get(this, 'payorBenefit.pcn', null)\r\n\t\t\t\t} as psgm.EnterpriseCoordinatorPayorServiceModelsPayorBenefitModel\r\n\t\t\t} as psgm.EnterpriseCoordinatorPayorServiceModelsPayorUpsearchModel;\r\n\t\t}\r\n\r\n\t\tmapToEnterpriseCoordinatorPayorUpsearchModelWithFlags(canUpdate: boolean, canInsert: boolean, skipSearch: boolean): psgm.UpsearchModelEnterpriseCoordinatorPayorServiceModelsPayorUpsearchModel {\r\n\t\t\treturn {\r\n\t\t\t\tcanUpdate: canUpdate,\r\n\t\t\t\tcanInsert: canInsert,\r\n\t\t\t\tskipSearch: skipSearch,\r\n\t\t\t\tmodel: this.mapToEnterpriseCoordinatorPayorUpsearchModel()\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\texport interface IPharmacyRelationship {\r\n\t\tpharmacyId: number;\r\n\t\tisPrimary: boolean;\r\n\t\tpharmacy: Pharmacy;\r\n\r\n\t\tpointOfContacts: PointOfContact[];\r\n\r\n\t\taddPointOfContact(index: number): PointOfContact;\r\n\t\tmapToEnterpriseCoordinatorPharmacyUpsearchModel(): psgm.EnterpriseCoordinatorPharmacyServiceModelsPharmacyUpsearchModel;\r\n\t\tmapToEnterpriseCoordinatorPharmacyUpsearchModelWithFlags(canUpdate: boolean, canInsert: boolean, skipSearch: boolean): psgm.UpsearchModelEnterpriseCoordinatorPharmacyServiceModelsPharmacyUpsearchModel;\r\n\t}\r\n\r\n\texport class PharmacyRelationship implements IPharmacyRelationship {\r\n\t\tpharmacyId: number;\r\n\t\tisPrimary: boolean;\r\n\t\tpharmacy: Pharmacy;\r\n\r\n pointOfContacts: PointOfContact[];\r\n\r\n\t\tconstructor(obj?: IPharmacyRelationship | any) {\r\n\t\t\tthis.pharmacyId = null;\r\n\t\t\tthis.isPrimary = null;\r\n this.pharmacy = null;\r\n this.pointOfContacts = []\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tthis.pharmacyId = obj.pharmacyId || obj.relatedId;\r\n this.isPrimary = obj.isPrimary;\r\n\r\n\t\t\t\tif (obj.pharmacy) {\r\n\t\t\t\t\tthis.pharmacy = new Pharmacy(obj.pharmacy);\r\n }\r\n if (obj.pointOfContacts) {\r\n for (const pointOfContact of obj.pointOfContacts) {\r\n this.pointOfContacts.push(new PointOfContact(pointOfContact));\r\n }\r\n }\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\taddPointOfContact(index: number = null): PointOfContact {\r\n\t\t\tconst length = this.pointOfContacts.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.pointOfContacts[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst pointOfContact = new PointOfContact();\r\n\t\t\tthis.pointOfContacts.push(pointOfContact);\r\n\t\t\treturn pointOfContact;\r\n\t\t}\r\n\r\n\t\tmapToEnterpriseCoordinatorPharmacyUpsearchModel() : psgm.EnterpriseCoordinatorPharmacyServiceModelsPharmacyUpsearchModel {\r\n\t\t\tif (!this.pharmacy) {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tpharmacyId: this.pharmacyId\r\n\t\t\t\t} as psgm.EnterpriseCoordinatorPharmacyServiceModelsPharmacyUpsearchModel;\r\n\t\t\t}\r\n\r\n\t\t\treturn {\r\n\t\t\t\tpharmacyId: this.pharmacyId ? this.pharmacyId : this.pharmacy.id,\r\n\t\t\t\tpharmacyName: this.pharmacy.name,\r\n\t\t\t\tnabp: this.pharmacy.nabp,\r\n\t\t\t\tnpi: this.pharmacy.npi,\r\n\t\t\t\tpharmacyType: Portico.Models.Gateway.PharmacyType[this.pharmacy.type],\r\n\t\t\t\tpharmacySpecialization: Portico.Models.Gateway.PharmacySpecialization[this.pharmacy.specialization],\r\n\t\t\t\taccountRelationshipIsPrimary: this.isPrimary,\r\n\t\t\t\taddresses: this.pharmacy.addresses ? _.map(this.pharmacy.addresses, addr => {\r\n\t\t\t\t\treturn addr.mapToEnterpriseCoordinatorAddress();\r\n\t\t\t\t}) : [],\r\n\t\t\t\tphoneNumbers: this.pharmacy.phoneNumbers ? _.map(this.pharmacy.phoneNumbers, ph => {\r\n\t\t\t\t\treturn ph.mapToEnterpriseCoordinatorPhoneUpsearchModel();\r\n\t\t\t\t}) : [],\r\n\t\t\t\temailAddresses: this.pharmacy.emailAddresses ? _.map(this.pharmacy.emailAddresses, email => {\r\n\t\t\t\t\treturn email.mapToEnterpriseCoordinatorEmailAddress();\r\n\t\t\t\t}) : [],\r\n\t\t\t\twebAddresses: this.pharmacy.webAddresses ? _.map(this.pharmacy.webAddresses, webAddr => {\r\n\t\t\t\t\treturn webAddr.mapToEnterpriseCoordinatorWebAddress();\r\n\t\t\t\t}) : [],\r\n\t\t\t\tcontacts: this.pharmacy.contacts ? _.map(this.pharmacy.contacts, cntct => {\r\n\t\t\t\t\treturn cntct.mapToEnterpriseCoordinatorContact();\r\n\t\t\t\t}) : [],\r\n\t\t\t\tpointOfContacts: this.pointOfContacts ? _.map(this.pointOfContacts, cntc => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tid: cntc.id,\r\n\t\t\t\t\t\tfirstName: cntc.firstName,\r\n\t\t\t\t\t\tlastName: cntc.lastName,\r\n\t\t\t\t\t\tphoneNumber: cntc.phoneNumber,\r\n\t\t\t\t\t\tphoneNumberExtension: cntc.phoneNumberExtension,\r\n\t\t\t\t\t\tfaxNumber: cntc.faxNumber\r\n\t\t\t\t\t} as psgm.EnterpriseCoordinatorPharmacyServiceModelsPharmacyPointOfContactUpsearchModel\r\n\t\t\t\t}) : []\r\n\t\t\t} as psgm.EnterpriseCoordinatorPharmacyServiceModelsPharmacyUpsearchModel;\r\n }\r\n\r\n\t\tmapToEnterpriseCoordinatorPharmacyUpsearchModelWithFlags(canUpdate: boolean, canInsert: boolean, skipSearch: boolean): psgm.UpsearchModelEnterpriseCoordinatorPharmacyServiceModelsPharmacyUpsearchModel {\r\n\t\t\treturn {\r\n\t\t\t\tcanUpdate: canUpdate,\r\n\t\t\t\tcanInsert: canInsert,\r\n\t\t\t\tskipSearch: skipSearch,\r\n\t\t\t\tmodel: this.mapToEnterpriseCoordinatorPharmacyUpsearchModel()\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\texport interface IPrescriberRelationship {\r\n\t\tprescriberId: number;\r\n\t\tisPrimary: boolean;\r\n\t\tprescriber: Prescriber;\r\n\r\n\t\tmapToEnterpriseCoordinatorPrescriberUpsearchModel(): psgm.EnterpriseCoordinatorPrescriberServiceModelsPrescriberUpsearchModel;\r\n\t\tmapToEnterpriseCoordinatorPrescriberUpsearchModelWithFlags(canUpdate: boolean, canInsert: boolean, skipSearch: boolean): psgm.UpsearchModelEnterpriseCoordinatorPrescriberServiceModelsPrescriberUpsearchModel;\r\n\t}\r\n\r\n\texport class PrescriberRelationship implements IPrescriberRelationship {\r\n\t\tprescriberId: number;\r\n\t\tisPrimary: boolean;\r\n\t\tprescriber: Prescriber;\r\n\r\n\t\tconstructor(obj?: IPrescriberRelationship | any) {\r\n\t\t\tthis.prescriberId = null;\r\n\t\t\tthis.isPrimary = null;\r\n\t\t\tthis.prescriber = null;\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tthis.prescriberId = obj.prescriberId || obj.relatedId;\r\n\t\t\t\tthis.isPrimary = obj.isPrimary;\r\n\r\n\t\t\t\tif (obj.prescriber) {\r\n\t\t\t\t\tthis.prescriber = new Prescriber(obj.prescriber);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tmapToEnterpriseCoordinatorPrescriberUpsearchModel() : psgm.EnterpriseCoordinatorPrescriberServiceModelsPrescriberUpsearchModel {\r\n if(!this.prescriber) {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tprescriberId: this.prescriberId\r\n\t\t\t\t} as psgm.EnterpriseCoordinatorPrescriberServiceModelsPrescriberUpsearchModel;\r\n\t\t\t}\r\n\r\n\t\t\treturn {\r\n\t\t\t\tprescriberId: this.prescriber.id ? this.prescriber.id : this.prescriberId,\r\n\t\t\t\tfirstName: this.prescriber.firstName,\r\n\t\t\t\tmiddleName: this.prescriber.middleName,\r\n\t\t\t\tlastName: this.prescriber.lastName,\r\n\t\t\t\tsuffix: this.prescriber.suffix,\r\n\t\t\t\tnickname: this.prescriber.nickName,\r\n\t\t\t\tnpi: this.prescriber.npi,\r\n\t\t\t\ttaxId: this.prescriber.taxId,\r\n\t\t\t\taccountRelationshipIsPrimary: this.isPrimary,\r\n\t\t\t\tprescriberLicenses: this.prescriber.prescriberLicenses ? _.map(this.prescriber.prescriberLicenses, pl => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tprescriberLicenseId: pl.prescriberLicenseId,\r\n\t\t\t\t\t\tlicenseType: pl.licenseType,\r\n\t\t\t\t\t\tlicenseNumber: pl.licenseNumber\r\n\t\t\t\t\t} as psgm.EnterpriseCoordinatorPrescriberServiceModelsPrescriberLicenseUpsearchModel\r\n\t\t\t\t}) : [],\r\n\t\t\t\texternalIds: this.prescriber.externalIds ? _.map(this.prescriber.externalIds, extId => {\r\n\t\t\t\t\treturn extId.mapToEnterpriseCoordinatorExternalId();\r\n\t\t\t\t}) : [],\r\n\t\t\t\taddresses: this.prescriber.addresses ? _.map(this.prescriber.addresses, addr => {\r\n\t\t\t\t\treturn addr.mapToEnterpriseCoordinatorAddress();\r\n\t\t\t\t}) : [],\r\n\t\t\t\tphoneNumbers: this.prescriber.phoneNumbers ? _.map(this.prescriber.phoneNumbers, ph => {\r\n\t\t\t\t\treturn ph.mapToEnterpriseCoordinatorPhoneUpsearchModel();\r\n\t\t\t\t}) : [],\r\n\t\t\t\temailAddresses: this.prescriber.emailAddresses ? _.map(this.prescriber.emailAddresses, email => {\r\n\t\t\t\t\treturn email.mapToEnterpriseCoordinatorEmailAddress();\r\n\t\t\t\t}) : []\r\n\t\t\t} as psgm.EnterpriseCoordinatorPrescriberServiceModelsPrescriberUpsearchModel;\r\n }\r\n\r\n\t\tmapToEnterpriseCoordinatorPrescriberUpsearchModelWithFlags(canUpdate: boolean, canInsert: boolean, skipSearch: boolean): psgm.UpsearchModelEnterpriseCoordinatorPrescriberServiceModelsPrescriberUpsearchModel {\r\n\t\t\treturn {\r\n\t\t\t\tcanUpdate: canUpdate,\r\n\t\t\t\tcanInsert: canInsert,\r\n\t\t\t\tskipSearch: skipSearch,\r\n\t\t\t\tmodel: this.mapToEnterpriseCoordinatorPrescriberUpsearchModel()\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\texport interface ISiteRelationship {\r\n\t\tsiteId: number;\r\n\t\tisPrimary: boolean;\r\n\t\tsite: Site;\r\n\r\n\t\tpointOfContacts: PointOfContact[];\r\n\r\n\t\taddPointOfContact(index: number): PointOfContact;\r\n\t\tmapToEnterpriseCoordinatorSiteUpsearchModel(): psgm.EnterpriseCoordinatorSiteServiceModelsSiteUpsearchModel;\r\n\t\tmapToEnterpriseCoordinatorSiteUpsearchModelWithFlags(canUpdate: boolean, canInsert: boolean, skipSearch: boolean): psgm.UpsearchModelEnterpriseCoordinatorSiteServiceModelsSiteUpsearchModel;\r\n\t}\r\n\r\n\texport class SiteRelationship implements ISiteRelationship {\r\n\t\tsiteId: number;\r\n\t\tisPrimary: boolean;\r\n\t\tsite: Site;\r\n\r\n pointOfContacts: PointOfContact[];\r\n\r\n\t\tconstructor(obj?: ISiteRelationship | any) {\r\n\t\t\tthis.siteId = null;\r\n\t\t\tthis.isPrimary = null;\r\n this.site = null;\r\n this.pointOfContacts = []\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tthis.siteId = obj.siteId || obj.relatedId;\r\n\t\t\t\tthis.isPrimary = obj.isPrimary;\r\n\r\n\t\t\t\tif (obj.site) {\r\n\t\t\t\t\tthis.site = new Site(obj.site);\r\n }\r\n\r\n if (obj.pointOfContacts) {\r\n for (const pointOfContact of obj.pointOfContacts) {\r\n this.pointOfContacts.push(new PointOfContact(pointOfContact));\r\n }\r\n }\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\taddPointOfContact(index: number = null): PointOfContact {\r\n\t\t\tconst length = this.pointOfContacts.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.pointOfContacts[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst pointOfContact = new PointOfContact();\r\n\t\t\tthis.pointOfContacts.push(pointOfContact);\r\n\t\t\treturn pointOfContact;\r\n\t\t}\r\n\r\n\t\tmapToEnterpriseCoordinatorSiteUpsearchModel() : psgm.EnterpriseCoordinatorSiteServiceModelsSiteUpsearchModel {\r\n\t\t\tif (!this.site) {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tsiteId: this.siteId\r\n\t\t\t\t} as psgm.EnterpriseCoordinatorSiteServiceModelsSiteUpsearchModel;\r\n\t\t\t}\r\n\r\n\t\t\treturn {\r\n\t\t\t\tsiteId: this.site.id ? this.site.id : this.siteId,\r\n\t\t\t\tsiteRoleType: this.site.roleType,\r\n\t\t\t\tdescription: this.site.description,\r\n\t\t\t\tnickName: this.site.nickName,\r\n\t\t\t\tbusinessStartTime: moment(this.site.businessStartTime),\r\n\t\t\t\tbusinessEndTime: moment(this.site.businessEndTime),\r\n\t\t\t\taccountRelationshipIsPrimary: this.isPrimary,\r\n\t\t\t\taddresses: this.site.addresses ? _.map(this.site.addresses, addr => {\r\n\t\t\t\t\treturn addr.mapToEnterpriseCoordinatorAddress();\r\n\t\t\t\t}) : [],\r\n\t\t\t\tcontacts: this.site.contacts ? _.map(this.site.contacts, cntct => {\r\n\t\t\t\t\treturn cntct.mapToEnterpriseCoordinatorContact();\r\n\t\t\t\t}) : [],\r\n\t\t\t\temailAddresses: this.site.emailAddresses ? _.map(this.site.emailAddresses, email => {\r\n\t\t\t\t\treturn email.mapToEnterpriseCoordinatorEmailAddress();\r\n\t\t\t\t}) : [],\r\n\t\t\t\texternalIds: this.site.externalIds? _.map(this.site.externalIds, extId => {\r\n\t\t\t\t\treturn extId.mapToEnterpriseCoordinatorExternalId();\r\n\t\t\t\t}) : [],\r\n\t\t\t\tglobalIds: this.site.globalIds? _.map(this.site.globalIds, glbId => {\r\n\t\t\t\t\treturn glbId.mapToEnterpriseCoordinatorGlobalId();\r\n\t\t\t\t}) : [],\r\n\t\t\t\tphoneNumbers: this.site.phoneNumbers ? _.map(this.site.phoneNumbers, ph => {\r\n\t\t\t\t\treturn ph.mapToEnterpriseCoordinatorPhoneUpsearchModel();\r\n\t\t\t\t}) : [],\r\n\t\t\t\tpointOfContacts: this.pointOfContacts ? _.map(this.pointOfContacts, cntc => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tid: cntc.id,\r\n\t\t\t\t\t\tfirstName: cntc.firstName,\r\n\t\t\t\t\t\tlastName: cntc.lastName,\r\n\t\t\t\t\t\tphoneNumber: cntc.phoneNumber,\r\n\t\t\t\t\t\tphoneNumberExtension: cntc.phoneNumberExtension,\r\n\t\t\t\t\t\tfaxNumber: cntc.faxNumber,\r\n\t\t\t\t\t\tjobTitle: cntc.jobTitle,\r\n\t\t\t\t\t\temailAddress: cntc.emailAddress,\r\n\t\t\t\t\t\tpreferredContactMethod: Portico.Models.Gateway.ContactInfoType[cntc.preferredContactMethod]\r\n\t\t\t\t\t} as psgm.EnterpriseCoordinatorSiteServiceModelsSitePointOfContactUpsearchModel\r\n\t\t\t\t}) : []\r\n\t\t\t} as psgm.EnterpriseCoordinatorSiteServiceModelsSiteUpsearchModel;\r\n }\r\n\r\n\t\tmapToEnterpriseCoordinatorSiteUpsearchModelWithFlags(canUpdate: boolean, canInsert: boolean, skipSearch: boolean): psgm.UpsearchModelEnterpriseCoordinatorSiteServiceModelsSiteUpsearchModel {\r\n\t\t\treturn {\r\n\t\t\t\tcanUpdate: canUpdate,\r\n\t\t\t\tcanInsert: canInsert,\r\n\t\t\t\tskipSearch: skipSearch,\r\n\t\t\t\tmodel: this.mapToEnterpriseCoordinatorSiteUpsearchModel()\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n}","namespace Portico.Models.Gateway {\r\n\r\nexport enum NoteTypeCategory {\r\n // NOTE\r\n NOTE = 1,\r\n // TASK\r\n TASK = 2,\r\n // EVENT\r\n EVENT = 3,\r\n // NDEF\r\n DefaultNoteType = 4,\r\n}\r\n\r\nexport enum RoleType {\r\n // UNKN\r\n UNKNOWN = 0,\r\n // PAT\r\n PATIENT = 1,\r\n // PSRB\r\n PRESCRIBER = 2,\r\n // INS\r\n INSURANCEPROVIDER = 3,\r\n // PBM\r\n PHARMACYBENEFITMANAGER = 4,\r\n // SEC\r\n SECONDARYCONTACT = 5,\r\n // MFT\r\n MANUFACTURER = 6,\r\n // EMP\r\n EMPLOYEE = 7,\r\n // CSR\r\n CUSTOMERSERVICEREP = 8,\r\n // PSRBSITE\r\n PRESCRIBERSITE = 9,\r\n // BRAND\r\n BRAND = 10,\r\n // CHLD\r\n CHILD = 11,\r\n // SCWRK\r\n SOCIALWORKER = 12,\r\n // FINREP\r\n FINANCIALREPRESENTATIVE = 13,\r\n // LGLREP\r\n LEGALREPRESENTATIVE = 14,\r\n // COR\r\n CORPORATE = 15,\r\n // PERCNT\r\n PERSONALCONTACT = 16,\r\n // SPOUSE\r\n SPOUSE = 17,\r\n // PARENT\r\n PARENT = 18,\r\n // HMHEALTH\r\n HOMEHEALTH = 19,\r\n // ALTCNT\r\n ALTERNATECONTACT = 20,\r\n // AUTOINJ\r\n AUTOINJURYPLAN = 21,\r\n // COMMPL\r\n COMMERCIALPLAN = 22,\r\n // FEDPL\r\n FEDERALEMPLOYEEPROGRAM = 23,\r\n // MEDAD\r\n MEDICAID = 24,\r\n // MDCRAD\r\n MEDICAREADVANTAGE = 25,\r\n // MDCRB\r\n MEDICAREB = 26,\r\n // MDCRD\r\n MEDICARED = 27,\r\n // MDGP\r\n MEDIGAP = 28,\r\n // VATC\r\n VADODTRICARE = 29,\r\n // WRKCMP\r\n WORKERSCOMPENSATION = 30,\r\n // PLAN\r\n PLAN = 31,\r\n // PAYER\r\n PAYER = 32,\r\n // DMEP\r\n DURABLEMEDICALEQUIPMENTPLAN = 33,\r\n // MCMP\r\n MANAGEDCAREMEDICAIDPLAN = 34,\r\n // SPAP\r\n STATEPHARMACYASSISTANCEPROGRAM = 35,\r\n // MEDAB\r\n MEDICAREPARTABPLAN = 36,\r\n // ADAP\r\n AIDSDRUGASSISTANCEPROGRAM = 37,\r\n // STPL\r\n STATEPLAN = 38,\r\n // PRVD\r\n PROVIDER = 39,\r\n // EPO\r\n EXCLUSIVEPROVIDERORGANIZATION = 40,\r\n // INDEM\r\n INDEMNITYINSURANCE = 41,\r\n // HMO\r\n HEALTHMAINTENANCEORGANIZATION = 42,\r\n // POSP\r\n POINTOFSERVICEPLAN = 43,\r\n // PPO\r\n PREFERREDPROVIDERORGANIZATION = 44,\r\n // SELF\r\n SELF = 45,\r\n // OFFCNT\r\n OFFICECONTACT = 46,\r\n // PHARM\r\n PHARMACY = 47,\r\n // MDCRA\r\n MEDICAREA = 48,\r\n // HOSP\r\n HOSPITAL = 49,\r\n // HOSPOP\r\n HOSPITALOUTPATIENT = 50,\r\n // INFCTR\r\n INFUSIONCENTER = 51,\r\n // RETPHAR\r\n RETAILPHARMACY = 52,\r\n // Foundation\r\n Foundation = 53,\r\n // SecSupp\r\n SecondarySupplemental = 54,\r\n // RegNurse\r\n RegisteredNurse = 55,\r\n // LicPractNurse\r\n LicensedPracticalNurse = 56,\r\n // CertNursingAsst\r\n CertifiedNursingAssistant = 57,\r\n // MedAsst\r\n MedicalAssistant = 58,\r\n // NatlHealthAgncy\r\n NationalHomeHealthAgency = 59,\r\n // IndlHealthAgncy\r\n IndependentHomeHealthAgency = 60,\r\n // Practice\r\n Practice = 61,\r\n // PDCI\r\n PerDiemContractIndividual = 62,\r\n // Employee\r\n Employee = 63,\r\n}\r\n\r\nexport enum ContactInfoType {\r\n // UNKN\r\n UNKNOWN = 0,\r\n // PHONE\r\n PHONE = 1,\r\n // MOBILE\r\n MOBILE = 2,\r\n // FAX\r\n FAX = 3,\r\n // WEB\r\n WEB = 4,\r\n // E-MAIL\r\n EMAIL = 5,\r\n // DNC\r\n DONOTCALL = 6,\r\n // FACEBOOK\r\n FACEBOOK = 7,\r\n // TWITTER\r\n TWITTER = 8,\r\n // LINKEDIN\r\n LINKEDIN = 9,\r\n // GOOGLEPLUS\r\n GOOGLEPLUS = 10,\r\n // YOUTUBE\r\n YOUTUBE = 11,\r\n // Text\r\n Text = 12,\r\n // Mail\r\n Mail = 13,\r\n}\r\n\r\nexport enum CaseExternalIdType {\r\n // ARXCID\r\n ARXCID = 1,\r\n // NPID\r\n NPID = 2,\r\n // TRANID\r\n TRANID = 3,\r\n // MemberNumber\r\n MemberNumber = 4,\r\n // Mig\r\n Mig = 5,\r\n // MedMemberID\r\n MedMemberID = 6,\r\n // PharMemberID\r\n PharMemberID = 7,\r\n // CaseMaskID\r\n CaseMaskID = 8,\r\n // TCClaimID\r\n TCClaimID = 9,\r\n // DispositionCode\r\n DispositionCode = 10,\r\n // ARXRxId\r\n ARXRxId = 11,\r\n // StgVirmedicaDFID\r\n StgVirmedicaDFID = 12,\r\n // TCEobID\r\n TCEobID = 13,\r\n // ThirdPartyId\r\n ThirdPartyId = 14,\r\n // CarePathId\r\n CarePathId = 15,\r\n // VRMResponseId\r\n VRMResponseId = 16,\r\n // VRMTransactionId\r\n VRMTransactionId = 17,\r\n // VRMBVId\r\n VRMBVId = 18,\r\n // VRMPatientId\r\n VRMPatientId = 19,\r\n // SiteAccountId\r\n SiteAccountId = 20,\r\n // OtbnStgVirmedicaDFID\r\n OtbnStgVirmedicaDFID = 21,\r\n}\r\n\r\nexport enum AddressType {\r\n // UNKNOWN\r\n UNKNOWN = 0,\r\n // CORPORATE HEADQUARTERS\r\n CORPORATEHEADQUARTERS = 1,\r\n // SALES OFFICE\r\n SALESOFFICE = 2,\r\n // RESIDENTIAL ADDRESS\r\n RESIDENTIALADDRESS = 3,\r\n // WORK ADDRESS\r\n WORKADDRESS = 4,\r\n // SEASONAL ADDRESS\r\n SEASONALADDRESS = 5,\r\n // MAILING ADDRESS\r\n MAILINGADDRESS = 6,\r\n // BILLING ADDRESS\r\n BILLINGADDRESS = 7,\r\n // SHIPPING ADDRESS\r\n SHIPPINGADDRESS = 8,\r\n}\r\n\r\nexport enum SystemStatus {\r\n // OTH\r\n OTHER = 0,\r\n // Open\r\n Open = 1,\r\n // Closed\r\n Closed = 2,\r\n}\r\n\r\nexport enum ContactInfoPurposeType {\r\n // UNKN\r\n UNKNOWN = 0,\r\n // MAIN\r\n MAIN = 1,\r\n // MKTG\r\n MARKETING = 2,\r\n // SALES\r\n SALES = 3,\r\n // CUSTSER\r\n CUSTOMERSERVICE = 4,\r\n // HOME\r\n HOME = 5,\r\n // WORK\r\n WORK = 6,\r\n // SEAS\r\n SEASONAL = 7,\r\n // OTHR\r\n OTHER = 8,\r\n}\r\n\r\nexport enum CaseCaseFollowUpSyncAction {\r\n // Sync from Case Entities from Account Entities\r\n SyncFromAccount = 0,\r\n // Complete\r\n SyncFromCase = 1,\r\n // Manually sync using case relationships in the CaseFollowUpResultModel\r\n Manual = 2,\r\n}\r\n\r\nexport enum CaseCaseFollowUpScenario {\r\n // Nothing/error route\r\n Undetermined = 0,\r\n // Create Workflow\r\n CreateCase = 1,\r\n}\r\n\r\nexport enum ActualType {\r\n // Standalone Case\r\n StandaloneCase = 1,\r\n // Workflow\r\n Workflow = 2,\r\n // Workflow Case (sub-case to a Workflow)\r\n WorkflowCase = 3,\r\n}\r\n\r\nexport enum ClaimJobType {\r\n // IMS Medical Claim Feed\r\n ImsClaimFeed = 1,\r\n // IMS Reconciliation (Payment Batch) Feed\r\n ImsReconciliationFeed = 2,\r\n}\r\n\r\nexport enum DiagnosisType {\r\n // UNKN\r\n UNKN = 0,\r\n // ICD9\r\n ICD9 = 1,\r\n // ICD10\r\n ICD10 = 2,\r\n // DSM4\r\n DSM4 = 3,\r\n // J-CODE\r\n JCODE = 4,\r\n // CPT Code\r\n CPTCode = 5,\r\n // Q-CODE\r\n QCODE = 6,\r\n}\r\n\r\nexport enum DocumentStatus {\r\n // UNKN\r\n UNKN = 0,\r\n // LOAD\r\n LOAD = 1,\r\n // PEND\r\n PEND = 2,\r\n // MISSINFO\r\n MISSINFO = 3,\r\n // PRCSED\r\n PRCSED = 4,\r\n // UNASGN\r\n UNASGN = 5,\r\n // NOTRD\r\n NOTRD = 6,\r\n // SKIP\r\n SKIP = 7,\r\n // EXP\r\n EXP = 8,\r\n // Sent\r\n Sent = 9,\r\n // Void\r\n Void = 10,\r\n // Submit\r\n Submit = 11,\r\n // Success\r\n Success = 12,\r\n // Failure\r\n Failure = 13,\r\n // Open\r\n Open = 14,\r\n // Requested\r\n Requested = 15,\r\n // Printed\r\n Printed = 16,\r\n // PrintFailed\r\n PrintFailed = 17,\r\n // NeedsReview\r\n NeedsReview = 18,\r\n // UnderReview\r\n UnderReview = 19,\r\n // DocumentRejected\r\n DocumentRejected = 20,\r\n // DocumentApproved\r\n DocumentApproved = 21,\r\n // SMSSucessfull\r\n SMSSucessfull = 22,\r\n // SMSFailure\r\n SMSFailure = 23,\r\n // PrintQueued\r\n PrintQueued = 24,\r\n // Resent\r\n Resent = 25,\r\n // Returned\r\n Returned = 26,\r\n // Acknowledged\r\n Acknowledged = 27,\r\n // Damaged\r\n Damaged = 28,\r\n // UnverifiedAddress\r\n UnverifiedAddress = 29,\r\n}\r\n\r\nexport enum DocumentGroupSource {\r\n // UNKN\r\n UNKN = 0,\r\n // WEB\r\n WEB = 1,\r\n // InMail\r\n InMail = 2,\r\n // Infax\r\n Infax = 3,\r\n // Inemail\r\n Inemail = 4,\r\n // FEED\r\n FEED = 5,\r\n // UPD\r\n UPD = 6,\r\n // OutMail\r\n OutMail = 7,\r\n // OutFax\r\n OutFax = 8,\r\n // OutEmail\r\n OutEmail = 9,\r\n // Mig\r\n Mig = 10,\r\n // Phone\r\n Phone = 11,\r\n // WebService\r\n WebService = 12,\r\n // DataFeed\r\n DataFeed = 13,\r\n // TCPortal\r\n TCPortal = 14,\r\n // SystemCreated\r\n SystemCreated = 15,\r\n // Mail\r\n Mail = 16,\r\n // Fax\r\n Fax = 17,\r\n // Email\r\n Email = 18,\r\n // SMS\r\n SMS = 19,\r\n}\r\n\r\nexport enum DocumentGroupStatus {\r\n // UNKN\r\n UNKN = 0,\r\n // LOAD\r\n LOAD = 1,\r\n // PEND\r\n PEND = 2,\r\n // MISSINFO\r\n MISSINFO = 3,\r\n // PRCSED\r\n PRCSED = 4,\r\n // UNASGN\r\n UNASGN = 5,\r\n // NOTRD\r\n NOTRD = 6,\r\n // SKIP\r\n SKIP = 7,\r\n // EXP\r\n EXP = 8,\r\n}\r\n\r\nexport enum TransmissionType {\r\n // INB\r\n INB = 1,\r\n // OUTB\r\n OUTB = 2,\r\n}\r\n\r\nexport enum EmailErrorCode {\r\n // No Error\r\n NoError = 0,\r\n // User Id Not Found\r\n UserIdNotFound = 1,\r\n // Bronto Error\r\n BrontoError = 2,\r\n // General Error\r\n GeneralError = 3,\r\n // Warning\r\n Warning = 100,\r\n}\r\n\r\nexport enum MessageContentType {\r\n // HTML\r\n Html = 1,\r\n // Text\r\n Text = 2,\r\n}\r\n\r\nexport enum TCSCommunicationType {\r\n // None\r\n None = 0,\r\n // Letter\r\n Letter = 1,\r\n // Email\r\n Email = 2,\r\n // SMS\r\n SMS = 4,\r\n // Phone\r\n Phone = 8,\r\n // Fax\r\n Fax = 16,\r\n}\r\n\r\nexport enum TCSInsuranceType {\r\n // Pharmacy\r\n Pharmacy = 1,\r\n // Medical\r\n Medical = 2,\r\n // Medical / Pharmacy\r\n Both = 3,\r\n}\r\n\r\nexport enum TCSSource {\r\n // Unknown\r\n Unknown = 0,\r\n // Janssen CarePath One Patient Portal\r\n Patient = 5,\r\n // Janssen CarePath One Provider Portal\r\n Provider = 6,\r\n // Janssen CarePath One Hub Portal\r\n Hub = 7,\r\n // Janssen CarePath One Express Portal\r\n Express = 8,\r\n // Opus Migration\r\n OpusMigration = 10,\r\n}\r\n\r\nexport enum TCSCommunicationOption {\r\n // Unspecified\r\n Unspecified = 0,\r\n // Opt-In\r\n OptIn = 1,\r\n // Opt-Out\r\n OptOut = 2,\r\n}\r\n\r\nexport enum TCSPaymentType {\r\n // None\r\n None = 0,\r\n // Check to Site\r\n CheckToSite = 1,\r\n // Check to Patient\r\n CheckToPatient = 2,\r\n // Debit Card\r\n DebitCard = 3,\r\n // Check Payable to Site\r\n CheckPayableToSite = 4,\r\n // Electronic Funds Transfer\r\n ElectricFundsTransfer = 5,\r\n}\r\n\r\nexport enum TCSRelationshipType {\r\n // Parent\r\n Parent = 0,\r\n // Legal Guardian\r\n LegalGuardian = 1,\r\n // Other\r\n Other = 2,\r\n}\r\n\r\nexport enum TCSSiteType {\r\n // None\r\n None = -1,\r\n // Facility\r\n Facility = 0,\r\n // Infusion\r\n Infusion = 1,\r\n // Pharmacy\r\n Pharmacy = 2,\r\n}\r\n\r\nexport enum TCSGileadCommOption {\r\n // Opt-In\r\n OptIn = 0,\r\n // Opt-Out\r\n OptOut = 1,\r\n}\r\n\r\nexport enum AlternateCardType {\r\n // Unknown\r\n Unknown = 0,\r\n // Previous Client ID\r\n PreviousClientId = 1,\r\n // Mobile #\r\n MobileNumber = 2,\r\n // Service Request #\r\n ServiceRequestNumber = 3,\r\n // 3rd Party ID\r\n ThirdPartyID = 4,\r\n}\r\n\r\nexport enum QueryStringMatch {\r\n // Exact\r\n Exact = 0,\r\n // Starts With\r\n StartsWith = 1,\r\n // Ends With\r\n EndsWith = 2,\r\n // Contains\r\n Contains = 3,\r\n}\r\n\r\nexport enum TCSEligibilityStatus {\r\n // Unknown\r\n Unknown = -1,\r\n // Member number valid, but patient ineligible at this time\r\n PatientIneligible = 0,\r\n // Eligible pending survey data\r\n EligiblePending = 1,\r\n // Pending enrollment\r\n PendingEnrollment = 2,\r\n // Member number invalid\r\n MemberNumberInvalid = 3,\r\n // Activation period expired\r\n ActivationPeriodExpired = 4,\r\n // Ready to activate\r\n ReadyToActivate = 5,\r\n // Transfer to TrialCard\r\n TransferToTrialcard = 6,\r\n}\r\n\r\nexport enum EligibilityScope {\r\n // All\r\n All = 4294967295,\r\n // Survey\r\n Survey = 1,\r\n // Patient\r\n Patient = 2,\r\n // Income\r\n Income = 4,\r\n}\r\n\r\nexport enum EnrollmentType {\r\n // If Membernumber type is Unknown\r\n Unknown = 0,\r\n // Medical MemberNumber\r\n Medical = 6,\r\n // Pharmacy MemberNumber\r\n Pharmacy = 7,\r\n}\r\n\r\nexport enum EnrollmentStatus {\r\n // Approved Enrollment Status\r\n Approved = 0,\r\n // Rejected Enrollment Status\r\n Rejected = 1,\r\n // Review Required Enrollment Status\r\n Review_Required = 2,\r\n // Case Processing After Review\r\n Review_Processing = 3,\r\n // Case Processing After Intake\r\n Intake_Processing = 4,\r\n // Disenrolled\r\n Disenrolled = 5,\r\n // Enrolled\r\n Enrolled = 6,\r\n // Canceled\r\n Canceled = 7,\r\n // Open\r\n Open = 8,\r\n // Unknown\r\n Unknown = -1,\r\n // EXPired\r\n EXP = 9,\r\n}\r\n\r\nexport enum EnrollmentEligibility {\r\n // didn't even try\r\n Undetermined = 0,\r\n // yes\r\n Passed = 1,\r\n // no\r\n Failed = 2,\r\n}\r\n\r\nexport enum EnrollmentScenario {\r\n // Nothing/error rout\r\n Undetermined = 0,\r\n // create a new initial enrollment or an enrollment after a time gap\r\n NewEnrollment = 1,\r\n // update an existing enrollment\r\n Update = 2,\r\n // end an existing enrollment early and create a new one for the remaining time \r\n KeyUpdate = 3,\r\n // create a new enrollment in the future, despite the patient having a current enrollment\r\n ReEnrollment = 4,\r\n // End all existing enrollments without creating anything new.\r\n DisEnrollment = 5,\r\n}\r\n\r\nexport enum EnrollmentJobState {\r\n // Running\r\n Running = 0,\r\n // Complete\r\n Complete = 1,\r\n // Error\r\n Error = 2,\r\n}\r\n\r\nexport enum EnrollmentJobType {\r\n // QP Enrollment Feed\r\n EnrollmentFeed = 1,\r\n}\r\n\r\nexport enum Gender {\r\n // UNKN\r\n UNKN = 0,\r\n // M\r\n M = 1,\r\n // F\r\n F = 2,\r\n // I\r\n I = 3,\r\n}\r\n\r\nexport enum AccountType {\r\n // PAT\r\n PATIENT = 1,\r\n // PRESCRIBER\r\n PRESCRIBER = 2,\r\n // SITE\r\n SITE = 3,\r\n}\r\n\r\nexport enum AccountStatus {\r\n // UNKN\r\n UNKNOWN = 0,\r\n // ACT\r\n ACTIVE = 1,\r\n // INACT\r\n INACTIVE = 2,\r\n}\r\n\r\nexport enum PayorType {\r\n // INS\r\n INS = 3,\r\n // PBM\r\n PBM = 4,\r\n // PAYER\r\n PAYER = 32,\r\n}\r\n\r\nexport enum PharmacyType {\r\n // OTH\r\n OTHER = 0,\r\n // RTL\r\n RETAIL = 1,\r\n // LAB\r\n LABORATORY = 2,\r\n // HOS\r\n HOSPITAL = 3,\r\n // MCO\r\n MANAGEDCAREORGINIZATION = 4,\r\n // RET\r\n RESIDENTIALTREATMENT = 5,\r\n}\r\n\r\nexport enum PharmacySpecialization {\r\n // OTH\r\n OTH = 0,\r\n // CRP\r\n CRP = 1,\r\n // SPR\r\n SPR = 2,\r\n // CMP\r\n CMP = 3,\r\n // HIT\r\n HIT = 4,\r\n // CLP\r\n CLP = 5,\r\n // MOP\r\n MOP = 6,\r\n // MCO\r\n MCO = 7,\r\n // IFT\r\n IFT = 8,\r\n // PRC\r\n PRC = 9,\r\n // NFS\r\n NFS = 10,\r\n}\r\n\r\nexport enum ContactDatePreferenceType {\r\n // UNKN\r\n UNKNOWN = 0,\r\n // DAY\r\n DAY = 1,\r\n // BTWDAY\r\n BETWEENDATES = 2,\r\n // HOLDY\r\n HOLIDAY = 3,\r\n // WKEND\r\n WEEKENDS = 4,\r\n // WKDAY\r\n WEEKDAYS = 5,\r\n}\r\n\r\nexport enum ContactTimePreferenceType {\r\n // UNKN\r\n UNKNOWN = 0,\r\n // TM\r\n TIMEOFTHEDAY = 1,\r\n // BTWTM\r\n BETWEENTIMES = 2,\r\n // ANYTM\r\n ANYTIME = 3,\r\n // BUSHR\r\n BUSINESSHOURS = 4,\r\n // EVNTM\r\n EVENINGTIMES = 5,\r\n}\r\n\r\nexport enum ExternalIdType {\r\n // UNKN\r\n UNKNOWN = 0,\r\n // MBRID\r\n MEMBERID = 1,\r\n // SSN\r\n SOCIALSECURITYNUMBERSSN = 2,\r\n // EIN\r\n FEDERALEMPLOYERIDENTIFICATIONNUMBEREIN = 3,\r\n // DL\r\n DRIVERSLICENSENUMBER = 4,\r\n // DEA\r\n DEANUMBER = 5,\r\n // NPI\r\n NPINUMBER = 6,\r\n // GRP\r\n GROUPID = 7,\r\n // EMP\r\n EMPLOYEEID = 8,\r\n // STLIC\r\n STATELICENSENUMBER = 9,\r\n // PCN\r\n PROCESSORCONTROLLERNUMBER = 10,\r\n // BIN\r\n BANKIDENTIFICATIONNUMBER = 11,\r\n // MEDID\r\n MEDICALID = 12,\r\n // ISGV\r\n ISGOVERNMENT = 13,\r\n // ARXCN\r\n ASSISTRXCASENUMBER = 14,\r\n // ISBENPL\r\n ISMEDICALBENEFIT = 15,\r\n // COVSTDT\r\n COVERAGESTARTDATE = 16,\r\n // COVENDDT\r\n COVERAGEENDDATE = 17,\r\n // PLYR\r\n PLANYEAR = 18,\r\n // VirmedicaPracId\r\n VirmedicaPraticeID = 19,\r\n // VirmedicaLocId\r\n VirmedicaLocationID = 20,\r\n // VirmedicaPrvdId\r\n VirmedicaProviderID = 21,\r\n // VirmedicaHCPPrvdId\r\n VirmedicaHCPProviderID = 22,\r\n // VMMasterPayerID\r\n VirmedicaMasterPayerID = 23,\r\n // VMPayerID\r\n VirmedicaPayerID = 24,\r\n // MaxRTEPayorID\r\n MaxRTEPayorID = 25,\r\n // PTAN\r\n ProviderTransactionAccessNumber = 26,\r\n}\r\n\r\nexport enum PlanType {\r\n // HMHEALTH\r\n HMHEALTH = 19,\r\n // AUTOINJ\r\n AUTOINJ = 21,\r\n // COMMPL\r\n COMMPL = 22,\r\n // FEDPL\r\n FEDPL = 23,\r\n // MEDAD\r\n MEDAD = 24,\r\n // MDCRAD\r\n MDCRAD = 25,\r\n // MDCRB\r\n MDCRB = 26,\r\n // MDCRD\r\n MDCRD = 27,\r\n // MDGP\r\n MDGP = 28,\r\n // VATC\r\n VATC = 29,\r\n // WRKCMP\r\n WRKCMP = 30,\r\n // PLAN\r\n PLAN = 31,\r\n // DMEP\r\n DMEP = 33,\r\n // MCMP\r\n MCMP = 34,\r\n // SPAP\r\n SPAP = 35,\r\n // MEDAB\r\n MEDAB = 36,\r\n // ADAP\r\n ADAP = 37,\r\n // STPL\r\n STPL = 38,\r\n // EPO\r\n EPO = 40,\r\n // INDEM\r\n INDEM = 41,\r\n // HMO\r\n HMO = 42,\r\n // POSP\r\n POSP = 43,\r\n // PPO\r\n PPO = 44,\r\n // MDCRA\r\n MDCRA = 48,\r\n // SecSupp\r\n SecSupp = 54,\r\n // Employee\r\n Employee = 63,\r\n}\r\n\r\nexport enum PrescriberLicenseType {\r\n // UNKNOWN\r\n UNKNOWN = 0,\r\n // DRUG ENFORCEMENT ADMINISTRATION NUMBER\r\n DRUGENFORCEMENTADMINISTRATIONNUMBER = 1,\r\n // STATE LICENSE ID\r\n STATELICENSEID = 2,\r\n // MEDICAID ID\r\n MEDICAIDID = 3,\r\n}\r\n\r\nexport enum EscoordJobType {\r\n // QP Enrollment Feed\r\n EnrollmentFeed = 1,\r\n}\r\n\r\nexport enum Dpv {\r\n // DPV unknown or not provided\r\n Unknown = 0,\r\n // Address is a valid mailing address\r\n Valid = 1,\r\n // Address is not in the DPV database of valid mailing addresses\r\n Invalid = 2,\r\n // Apartment or Rural Route Box invalid\r\n AptOrRrBoxInvalid = 3,\r\n // Apartment or Rural Route Box missing\r\n AptOrRrBoxMissing = 4,\r\n}\r\n\r\nexport enum LocationCorrection {\r\n // LACSLink conversion\r\n LacsLinkConversion = 1,\r\n // Derived primary number\r\n DerivedPrimaryNumber = 2,\r\n // City name determined by ZIP4 alternate\r\n CityDerivedFromZip4Alternate = 3,\r\n // Street name changed to preferred alias\r\n StreetNameChanged = 4,\r\n // Input ZIP4 retained\r\n Zip4Retained = 8,\r\n // Directional or Suffix changed\r\n DirectionalOrSuffixChanged = 9,\r\n // City changed\r\n CityChanged = 10,\r\n // Added unit designator and secondary number\r\n AddedUnitAndSecondaryNumber = 11,\r\n // Implied city based on ZIP\r\n CityDerivedFromZip = 12,\r\n // Modified primary or secondary number\r\n ModifiedPrimaryOrSecondaryNumber = 13,\r\n // Pre or post directional change\r\n PreOrPostDirectionalChange = 15,\r\n // City name changed\r\n CityNameChanged = 17,\r\n // Street suffix changed\r\n StreetSuffixChanged = 18,\r\n // Directional shift\r\n DirectionalShift = 19,\r\n // ZIP code changed\r\n ZipChanged = 22,\r\n // State changed\r\n StateChanged = 23,\r\n // Swapped Line 1 and Line 2\r\n SwappedLine1AndLine2 = 30,\r\n // Dropped invalid info in Line 2\r\n DroppedInvalidLine2 = 31,\r\n}\r\n\r\nexport enum PartyExternalIdType {\r\n // UNKN\r\n UNKNOWN = 0,\r\n // MBRID\r\n MEMBERID = 1,\r\n // SSN\r\n SOCIALSECURITYNUMBERSSN = 2,\r\n // EIN\r\n FEDERALEMPLOYERIDENTIFICATIONNUMBEREIN = 3,\r\n // DL\r\n DRIVERSLICENSENUMBER = 4,\r\n // DEA\r\n DEANUMBER = 5,\r\n // NPI\r\n NPINUMBER = 6,\r\n // GRP\r\n GROUPID = 7,\r\n // EMP\r\n EMPLOYEEID = 8,\r\n // STLIC\r\n STATELICENSENUMBER = 9,\r\n // PCN\r\n PROCESSORCONTROLLERNUMBER = 10,\r\n // BIN\r\n BANKIDENTIFICATIONNUMBER = 11,\r\n // MEDID\r\n MEDICALID = 12,\r\n // ISGV\r\n ISGOVERNMENT = 13,\r\n // ARXCN\r\n ASSISTRXCASENUMBER = 14,\r\n // ISBENPL\r\n ISMEDICALBENEFIT = 15,\r\n // COVSTDT\r\n COVERAGESTARTDATE = 16,\r\n // COVENDDT\r\n COVERAGEENDDATE = 17,\r\n // PLYR\r\n PLANYEAR = 18,\r\n // VirmedicaPracId\r\n VirmedicaPraticeID = 19,\r\n // VirmedicaLocId\r\n VirmedicaLocationID = 20,\r\n // VirmedicaPrvdId\r\n VirmedicaProviderID = 21,\r\n // VirmedicaHCPPrvdId\r\n VirmedicaHCPProviderID = 22,\r\n // VMMasterPayerID\r\n VirmedicaMasterPayerID = 23,\r\n // VMPayerID\r\n VirmedicaPayerID = 24,\r\n // MaxRTEPayorID\r\n MaxRTEPayorID = 25,\r\n // PTAN\r\n ProviderTransactionAccessNumber = 26,\r\n}\r\n\r\nexport enum PharmacyJobType {\r\n // Triage to Pharmacy Inbound Feed\r\n T2PInboundFeed = 1,\r\n}\r\n\r\nexport enum ProgramPartyType {\r\n // UNKN\r\n UNKNOWN = 0,\r\n // P\r\n PERSON = 1,\r\n // O\r\n ORGANIZATION = 2,\r\n // OTH\r\n OTHERS = 3,\r\n // Empty\r\n PlaceholderForNonentity = 4,\r\n}\r\n\r\nexport enum ProgramUsageType {\r\n // Hub\r\n Hub = 1,\r\n // Copay\r\n Copay = 2,\r\n // Pap\r\n PatientAssitanceProgram = 3,\r\n}\r\n\r\nexport enum AuthenticateStatus {\r\n // \r\n Valid = 'valid',\r\n // \r\n AccountNotFound = 'accountNotFound',\r\n // \r\n AccountDisabled = 'accountDisabled',\r\n // \r\n AccountLocked = 'accountLocked',\r\n // \r\n PasswordExpired = 'passwordExpired',\r\n // \r\n ServerError = 'serverError',\r\n // \r\n UserFound = 'userFound',\r\n // \r\n NotAuthenticated = 'notAuthenticated',\r\n // \r\n SessionExpired = 'sessionExpired',\r\n // \r\n SessionValid = 'sessionValid',\r\n // \r\n UserMustChangePassword = 'userMustChangePassword',\r\n}\r\n\r\nexport enum AccountExternalIdType {\r\n // \r\n UNKN = 0,\r\n // \r\n UBCHUBID = 1,\r\n // \r\n TrialCardHubId = 2,\r\n // \r\n MemberNumber = 3,\r\n // \r\n ADLDS = 4,\r\n // \r\n MedMemberID = 5,\r\n // \r\n PharMemberID = 6,\r\n // \r\n THIRDPARTYID = 7,\r\n // \r\n ARXRxId = 8,\r\n // \r\n CarePathId = 9,\r\n // \r\n VMIPatientId = 10,\r\n // \r\n PorticoPortalId = 11,\r\n // \r\n SiteAccountId = 12,\r\n // \r\n PatientMckId = 13,\r\n // \r\n RemsId = 14,\r\n}\r\n\r\nexport enum Extauth2ValidateStatus {\r\n // \r\n Valid = 0,\r\n // \r\n UserFound = 1,\r\n // \r\n Invalid = 2,\r\n // \r\n UserNotFound = 3,\r\n // \r\n AccountDisabled = 4,\r\n // \r\n AccountLocked = 5,\r\n // \r\n PasswordExpired = 6,\r\n // \r\n ServerError = 7,\r\n // \r\n UserMustChangePassword = 8,\r\n}\r\n\r\nexport enum TCSDocumentType {\r\n // \r\n None = 0,\r\n // \r\n Claim = 1,\r\n // \r\n Correspondence = 2,\r\n}\r\n\r\nexport enum Extauth2ChangePasswordStatus {\r\n // \r\n Success = 0,\r\n // \r\n Failed = 1,\r\n}\r\n\r\nexport enum Extauth2ProfileUpdateStatus {\r\n // \r\n Success = 0,\r\n // \r\n Failed = 1,\r\n}\r\n\r\nexport enum DebitCardMapStatus {\r\n // \r\n PENDING = 1,\r\n // \r\n ACTIVE = 2,\r\n // \r\n INACTIVE = 3,\r\n}\r\n\r\nexport enum ProcessorType {\r\n // \r\n I2C = 3,\r\n // \r\n Alegeus = 9,\r\n // \r\n TChek = 10,\r\n}\r\n\r\nexport enum DebitCardVmcUsageRegion {\r\n // \r\n Unknown = 0,\r\n // \r\n USA = 1,\r\n // \r\n international = 2,\r\n}\r\n\r\nexport enum EnrollPatientCaseInitiator {\r\n // \r\n patient = 'patient',\r\n // \r\n pharmacy = 'pharmacy',\r\n // \r\n provider = 'provider',\r\n}\r\n\r\nexport enum TcSystem {\r\n // \r\n plp = 'plp',\r\n // \r\n qp = 'qp',\r\n}\r\n\r\nexport enum ClaimTypeCode {\r\n // \r\n pha = 'pha',\r\n // \r\n med = 'med',\r\n}\r\n\r\nexport enum EnrollmentApiPaymentType {\r\n // \r\n debitcard = 'debitcard',\r\n // \r\n check = 'check',\r\n // \r\n virtualdebitcard = 'virtualdebitcard',\r\n // \r\n thirdpartyadjudication = 'thirdpartyadjudication',\r\n // \r\n sitecheckforpatient = 'sitecheckforpatient',\r\n // \r\n sitecheckforsite = 'sitecheckforsite',\r\n // \r\n efttosite = 'efttosite',\r\n // \r\n copaycard = 'copaycard',\r\n}\r\n}","namespace Portico.Services.Gateway.Models {\r\n export import models = Portico.Services.Gateway.Models;\r\n}","namespace Portico.Models.Enterprise {\r\n import psgm = apigateway.models;\r\n\r\n export interface IAccount extends IBaseAccount {\r\n patient: Patient;\r\n\r\n addPatient(): Patient;\r\n mapToEnterpriseCoordinatorAccountUpsearchRequestModel(\r\n canInsertAccount: boolean,\r\n canUpdateAccount: boolean,\r\n skipAccountSearch: boolean,\r\n canInsertParty: boolean,\r\n canUpdateParty: boolean,\r\n skipPartySearch: boolean,\r\n sourceId?: number\r\n );\r\n }\r\n\r\n export class Account extends BaseAccount implements IAccount {\r\n patient: Patient;\r\n\r\n constructor(obj?: IAccount | any) {\r\n super(obj);\r\n\r\n this.patient = new Patient();\r\n\r\n if (obj) {\r\n if (obj.patient) {\r\n this.patient = new Patient(obj.patient);\r\n }\r\n }\r\n }\r\n\r\n addPatient(): Patient {\r\n if (!this.patient) {\r\n this.patient = new Patient();\r\n }\r\n\r\n return this.patient;\r\n }\r\n\r\n mapToEnterpriseCoordinatorAccountUpsearchRequestModel(\r\n canInsertAccount: boolean,\r\n canUpdateAccount: boolean,\r\n skipAccountSearch: boolean,\r\n canInsertParty: boolean,\r\n canUpdateParty: boolean,\r\n skipPartySearch: boolean,\r\n sourceId: number\r\n ) {\r\n const accountDiagnosisSession = this.getDiagnosisSession(false);\r\n\r\n const accountUpsearchModel: psgm.EnterpriseCoordinatorAccountUpsearchRequestModel = {\r\n accountData: this.mapToEnterpriseCoordinatorAccountUpsearchModelWithFlags(\r\n canInsertAccount,\r\n canUpdateAccount,\r\n skipAccountSearch\r\n ),\r\n diagnosisSessionData: accountDiagnosisSession\r\n ? accountDiagnosisSession.mapToEnterpriseCoordinatorDiagnosisSessionModel()\r\n : null,\r\n hierarchyExternalIdTypes: [],\r\n patientData: this.patient\r\n ? this.patient.mapToEnterpriseCoordinatorPatientUpsearchModelWithFlags(\r\n canInsertParty,\r\n canUpdateParty,\r\n skipPartySearch\r\n )\r\n : null,\r\n payorData: this.payorRelationships\r\n ? _.map(this.payorRelationships, (pr) => {\r\n return pr.mapToEnterpriseCoordinatorPayorUpsearchModelWithFlags(\r\n canInsertParty,\r\n canUpdateParty,\r\n skipPartySearch\r\n );\r\n })\r\n : [],\r\n pharmacyData: this.pharmacyRelationships\r\n ? _.map(this.pharmacyRelationships, (pr) => {\r\n return pr.mapToEnterpriseCoordinatorPharmacyUpsearchModelWithFlags(\r\n canInsertParty,\r\n canUpdateParty,\r\n skipPartySearch\r\n );\r\n })\r\n : [],\r\n prescriberData: this.prescriberRelationships\r\n ? _.map(this.prescriberRelationships, (pr) => {\r\n return pr.mapToEnterpriseCoordinatorPrescriberUpsearchModelWithFlags(\r\n canInsertParty,\r\n canUpdateParty,\r\n skipPartySearch\r\n );\r\n })\r\n : [],\r\n prescriptionData: this.prescriptions\r\n ? _.map(this.prescriptions, (p) => {\r\n return p.mapToEnterpriseCoordinatorPrescriptionUpsearchModel();\r\n })\r\n : [],\r\n siteData: this.siteRelationships\r\n ? _.map(this.siteRelationships, (sr) => {\r\n return sr.mapToEnterpriseCoordinatorSiteUpsearchModelWithFlags(\r\n canInsertParty,\r\n canUpdateParty,\r\n skipPartySearch\r\n );\r\n })\r\n : [],\r\n sourceId: sourceId,\r\n surveySessionData: this.getSurveySessionIds(),\r\n };\r\n return accountUpsearchModel;\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\r\n\texport interface IAccountAddress {\r\n\t\tid: number;\r\n\t\ttype: string;\r\n\t\treceiverFirstName: string;\r\n\t\treceiverLastName: string;\r\n\t\taddress1: string;\r\n\t\taddress2: string;\r\n\t\tcity: string;\r\n\t\tstate: string;\r\n\t\tzip: string;\r\n\t\tcountry: string;\r\n }\r\n\r\n\texport class AccountAddress implements IAccountAddress {\r\n\t\tid: number;\r\n\t\ttype: string;\r\n\t\treceiverFirstName: string;\r\n\t\treceiverLastName: string;\r\n\t\taddress1: string;\r\n\t\taddress2: string;\r\n\t\tcity: string;\r\n\t\tstate: string;\r\n\t\tzip: string;\r\n\t\tcountry: string;\r\n\r\n\t\tconstructor(obj?: IAccountAddress) {\r\n\t\t\tthis.id = null;\r\n\t\t\tthis.type = null;\r\n\t\t\tthis.receiverFirstName = '';\r\n\t\t\tthis.receiverLastName = '';\r\n\t\t\tthis.address1 = '';\r\n\t\t\tthis.address2 = '';\r\n\t\t\tthis.city = '';\r\n\t\t\tthis.state = '';\r\n\t\t\tthis.zip = '';\r\n\t\t\tthis.country = 'US';\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tthis.id = obj.id || null;\r\n\t\t\t\tthis.type = obj.type || null;\r\n\t\t\t\tthis.receiverFirstName = obj.receiverFirstName || '';\r\n\t\t\t\tthis.receiverLastName = obj.receiverLastName || '';\r\n\t\t\t\tthis.address1 = obj.address1 || '';\r\n\t\t\t\tthis.address2 = obj.address2 || '';\r\n\t\t\t\tthis.city = obj.city || '';\r\n\t\t\t\tthis.state = obj.state || '';\r\n\t\t\t\tthis.zip = obj.zip || '';\r\n\t\t\t\tthis.country = obj.country || 'US';\r\n\t\t\t}\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\r\n\texport interface IAccountSession {\r\n\t\tid: number;\r\n\t\tsessionDate: Date;\r\n\t\tdocumentId: number;\r\n\t\tentityId: number;\r\n\t\tsurveyId: number;\r\n\t\tsurveySessionId: number;\r\n\r\n\t\tdiagnoses: Diagnosis[];\r\n\t\tdiagnosisSession: DiagnosisSession;\r\n\t\tsurveySession: SurveySession;\r\n\r\n\t\t//getSurveySessionAnswers: (questionId: number) => SurveySessionAnswer[];\r\n\t\t//isSurveyAnswer: (questionId: number, answerId: number) => boolean;\r\n }\r\n\r\n\texport class AccountSession implements IAccountSession {\r\n\t\tid: number;\r\n\t\tsessionDate: Date;\r\n\t\tdocumentId: number;\r\n\t\tentityId: number;\r\n\t\tsurveyId: number;\r\n\t\tsurveySessionId: number;\r\n\r\n\t\tdiagnoses: Diagnosis[];\r\n\t\tdiagnosisSession: DiagnosisSession;\r\n\t\tsurveySession: SurveySession;\r\n\r\n\t\tconstructor(obj?: IAccountSession | any) {\r\n\t\t\tthis.id = null;\r\n\t\t\tthis.sessionDate = null;\r\n\t\t\tthis.documentId = null;\r\n\t\t\tthis.entityId = null;\r\n\t\t\tthis.surveyId = null;\r\n\t\t\tthis.surveySessionId = null;\r\n\r\n\t\t\tthis.diagnoses = null;\r\n\t\t\tthis.diagnosisSession = null;\r\n\t\t\tthis.surveySession = null;\r\n\r\n if (obj) {\r\n\t\t\t\tthis.id = obj.id || obj.sessionId || null;\r\n\r\n\t\t\t\tif (obj.sessionDate) {\r\n\t\t\t\t\tthis.sessionDate = new Date(obj.sessionDate.toString());\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.documentId = obj.documentId || null;\r\n\t\t\t\tthis.entityId = obj.entityId || null;\r\n\t\t\t\tthis.surveyId = obj.surveyId || null;\r\n\t\t\t\tthis.surveySessionId = obj.surveySessionId || null;\r\n\r\n\t\t\t\tif (obj.diagnoses) {\r\n\t\t\t\t\tthis.diagnoses = [];\r\n\r\n\t\t\t\t\tfor (const diagnosis of obj.diagnoses) {\r\n\t\t\t\t\t\tthis.diagnoses.push(new Diagnosis(diagnosis));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.diagnosisSession) {\r\n\t\t\t\t\tthis.diagnosisSession = new DiagnosisSession(obj.diagnosisSession);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.surveySession) {\r\n\t\t\t\t\tthis.surveySession = new SurveySession(obj.surveySession);\r\n\t\t\t\t}\r\n }\r\n }\r\n\r\n\t\t//getSurveySessionAnswers(questionId: number): SurveySessionAnswer[] {\r\n\t\t//\tif (this.surveySession) {\r\n\t\t//\t\treturn this.surveySession.getSurveySessionAnswers(questionId);\r\n\t\t//\t}\r\n\r\n\t\t//\treturn [];\r\n\t\t//}\r\n\r\n\t\t//isSurveyAnswer(questionId: number, answerId: number): boolean {\r\n\t\t//\tif (this.surveySession) {\r\n\t\t//\t\treturn this.surveySession.isSurveyAnswer(questionId, answerId);\r\n\t\t//\t}\r\n\r\n\t\t//\treturn false;\r\n\t\t//}\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n import psgm = apigateway.models;\r\n\r\n export interface IAddress {\r\n id: number;\r\n\t\ttype: number | string;\r\n address1: string;\r\n address2: string;\r\n city: string;\r\n state: string;\r\n zip: string;\r\n country: string;\r\n }\r\n\r\n export interface IPartialAddress {\r\n address1: string;\r\n address2?: string;\r\n city: string;\r\n state: string;\r\n zip: string;\r\n }\r\n\r\n export class Address implements IAddress, IPartialAddress {\r\n id: number;\r\n\t\ttype: number | string;\r\n address1: string;\r\n address2: string;\r\n city: string;\r\n state: string;\r\n zip: string;\r\n country: string;\r\n\r\n constructor(obj?: IAddress | any) {\r\n this.id = null;\r\n this.type = null;\r\n this.address1 = '';\r\n this.address2 = '';\r\n this.city = '';\r\n this.state = '';\r\n this.zip = '';\r\n\t\t\tthis.country = 'US';\r\n\r\n if (obj) {\r\n this.id = obj.id || obj.addressId || null;\r\n\t\t\t\tthis.type = obj.type || obj.addressType || null;\r\n this.address1 = obj.address1 || obj.addressOne || '';\r\n\t\t\t\tthis.address2 = obj.address2 || obj.addressTwo || '';\r\n\t\t\t\tthis.city = obj.city || '';\r\n\t\t\t\tthis.state = obj.state || '';\r\n\t\t\t\tthis.zip = obj.zip || '';\r\n\t\t\t\tthis.country = obj.country || 'US';\r\n }\r\n }\r\n\r\n mapToEnterpriseCoordinatorAddress() : psgm.EnterpriseCoordinatorSharedAddressUpsearchModel {\r\n return {\r\n addressId: this.id,\r\n addressType: typeof this.type === 'number' ? this.type : Portico.Models.Gateway.AddressType[this.type],\r\n addressOne: this.address1,\r\n addressTwo: this.address2,\r\n city: this.city,\r\n state: this.state,\r\n zip: this.zip,\r\n country: this.country\r\n } as psgm.EnterpriseCoordinatorSharedAddressUpsearchModel\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\timport psgm = apigateway.models;\r\n\r\n export interface IApplication {\r\n\t\tname: string;\r\n description: string;\r\n lifetime: number;\r\n }\r\n\r\n\texport class Application implements IApplication {\r\n\t\tname: string;\r\n\t\tdescription: string;\r\n\t\tlifetime: number;\r\n\r\n constructor(obj?: IApplication | any) {\r\n\t\t\tthis.name = '';\r\n\t\t\tthis.description = '';\r\n\t\t\tthis.lifetime = 60;\r\n\r\n if (obj) {\r\n\t\t\t\tthis.name = obj.name || '';\r\n\t\t\t\tthis.description = obj.description || '';\r\n\t\t\t\tthis.lifetime = obj.lifetime || 60;\r\n }\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\r\n\texport interface IAttestation {\r\n\t\tattestationAttributeId: number;\r\n\t\tvalue: string;\r\n }\r\n\r\n\texport class Attestation implements IAttestation {\r\n\t\tattestationAttributeId: number;\r\n\t\tvalue: string;\r\n\r\n\t\tconstructor(obj?: IAttestation) {\r\n\t\t\tthis.attestationAttributeId = null;\r\n\t\t\tthis.value = '';\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tthis.attestationAttributeId = obj.attestationAttributeId || null;\r\n\t\t\t\tthis.value = obj.value || '';\r\n }\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\timport psgm = apigateway.models;\r\n\r\n export interface ICity {\r\n cityName: string;\r\n cityType: string;\r\n countyName: string;\r\n stateAbbr: string;\r\n stateName: string;\r\n }\r\n\r\n\texport class City implements ICity {\r\n\t\tcityName: string;\r\n\t\tcityType: string;\r\n\t\tcountyName: string;\r\n\t\tstateAbbr: string;\r\n\t\tstateName: string;\r\n\r\n\t\tconstructor(obj?: ICity | psgm.LocationCityModel) {\r\n\t\t\tthis.cityName = '';\r\n\t\t\tthis.cityType = '';\r\n\t\t\tthis.countyName = '';\r\n\t\t\tthis.stateAbbr = '';\r\n\t\t\tthis.stateName = '';\r\n\r\n\t\t\tif (isEither(obj)) {\r\n\t\t\t\tthis.cityName = obj.cityName || '';\r\n\t\t\t\tthis.cityType = obj.cityType || '';\r\n\t\t\t\tthis.countyName = obj.countyName || '';\r\n\t\t\t\tthis.stateAbbr = obj.stateAbbr || '';\r\n\t\t\t\tthis.stateName = obj.stateName || '';\r\n }\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\timport psge = apigateway.enums;\r\n\timport psgm = apigateway.models;\r\n\r\n export interface IContact {\r\n id: number;\r\n\t\ttype: string | number;\r\n firstName: string;\r\n lastName: string;\r\n\t\toccupation: string;\r\n\t\tisActive: boolean;\r\n\r\n\t\taddresses: Address[];\r\n\t\temailAddresses: EmailAddress[];\r\n\t\tphoneNumbers: PhoneNumber[];\r\n\t\twebAddresses: WebAddress[];\r\n\r\n\t\taddAddress(index?: number): Address;\r\n\t\taddEmailAddress(index?: number): EmailAddress;\r\n\t\taddPhoneNumber(index?: number): PhoneNumber;\r\n\t\taddWebAddress(index?: number): WebAddress;\r\n\t}\r\n\r\n export class Contact implements IContact {\r\n\t\tid: number;\r\n\t\ttype: string | number;\r\n\t\tfirstName: string;\r\n\t\tlastName: string;\r\n\t\toccupation: string;\r\n\t\tisActive: boolean;\r\n\r\n\t\taddresses: Address[];\r\n\t\temailAddresses: EmailAddress[];\r\n\t\tphoneNumbers: PhoneNumber[];\r\n\t\twebAddresses: WebAddress[];\r\n\r\n constructor(obj?: IContact) {\r\n this.id = null;\r\n\t\t\tthis.firstName = '';\r\n\t\t\tthis.lastName = '';\r\n\t\t\tthis.occupation = '';\r\n\t\t\tthis.isActive = true;\r\n\t\t\tthis.addresses = [];\r\n\t\t\tthis.emailAddresses = [];\r\n\t\t\tthis.phoneNumbers = [];\r\n\t\t\tthis.webAddresses = [];\r\n\r\n if (obj) {\r\n this.id = obj.id || null;\r\n this.firstName = obj.firstName || '';\r\n\t\t\t\tthis.lastName = obj.lastName || '';\r\n\t\t\t\tthis.occupation = obj.occupation || '';\r\n\t\t\t\tthis.isActive = obj.isActive || true;\r\n\r\n\t\t\t\tif (obj.addresses) {\r\n\t\t\t\t\tfor (const address of obj.addresses) {\r\n\t\t\t\t\t\tthis.addresses.push(new Address(address));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.emailAddresses) {\r\n\t\t\t\t\tfor (const emailAddress of obj.emailAddresses) {\r\n\t\t\t\t\t\tthis.emailAddresses.push(new EmailAddress(emailAddress));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.phoneNumbers) {\r\n\t\t\t\t\tfor (const phoneNumber of obj.phoneNumbers) {\r\n\t\t\t\t\t\tthis.phoneNumbers.push(new PhoneNumber(phoneNumber));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.webAddresses) {\r\n\t\t\t\t\tfor (const webAddress of obj.webAddresses) {\r\n\t\t\t\t\t\tthis.webAddresses.push(new WebAddress(webAddress));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n }\r\n }\r\n\r\n\t\taddAddress(index: number = null): Address {\r\n\t\t\tconst length = this.addresses.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.addresses[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst address = new Address();\r\n\t\t\tthis.addresses.push(address);\r\n\t\t\treturn address;\r\n\t\t}\r\n\r\n\t\taddEmailAddress(index: number = null): EmailAddress {\r\n\t\t\tconst length = this.emailAddresses.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.emailAddresses[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst emailAddress = new EmailAddress();\r\n\t\t\tthis.emailAddresses.push(emailAddress);\r\n\t\t\treturn emailAddress;\r\n\t\t}\r\n\r\n\t\taddPhoneNumber(index: number = null): PhoneNumber {\r\n\t\t\tconst length = this.phoneNumbers.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.phoneNumbers[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst phoneNumber = new PhoneNumber();\r\n\t\t\tthis.phoneNumbers.push(phoneNumber);\r\n\t\t\treturn phoneNumber;\r\n\t\t}\r\n\r\n\t\taddWebAddress(index: number = null): WebAddress {\r\n\t\t\tconst length = this.webAddresses.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.webAddresses[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst webAddress = new WebAddress();\r\n\t\t\tthis.webAddresses.push(webAddress);\r\n\t\t\treturn webAddress;\r\n\t\t}\r\n\r\n\t\tmapToEnterpriseCoordinatorContact() : psgm.EnterpriseCoordinatorSharedContactUpsearchModel {\r\n\t\t\treturn {\r\n\t\t\t\taddresses: this.addresses &&\r\n\t\t\t\t\tthis.addresses.length > 0\r\n\t\t\t\t\t? _.map(this.addresses, addr => {\r\n\t\t\t\t\t\treturn addr.mapToEnterpriseCoordinatorAddress();\r\n\t\t\t\t\t}) : [],\r\n\t\t\t\temailAddresses: this.emailAddresses &&\r\n\t\t\t\t\tthis.emailAddresses.length > 0\r\n\t\t\t\t\t? _.map( this.emailAddresses, email => {\r\n\t\t\t\t\t\treturn email.mapToEnterpriseCoordinatorEmailAddress();\r\n\t\t\t\t\t}) : [],\r\n\t\t\t\tphoneNumbers: this.phoneNumbers &&\r\n\t\t\t\t\tthis.phoneNumbers.length > 0\r\n\t\t\t\t\t? _.map( this.phoneNumbers, ph => {\r\n\t\t\t\t\t\treturn ph.mapToEnterpriseCoordinatorPhoneUpsearchModel();\r\n\t\t\t\t\t}) : [],\r\n\t\t\t\twebAddresses: this.webAddresses &&\r\n\t\t\t\t\tthis.webAddresses.length > 0\r\n\t\t\t\t\t? _.map( this.webAddresses, webAddr => {\r\n\t\t\t\t\t\treturn webAddr.mapToEnterpriseCoordinatorWebAddress();\r\n\t\t\t\t\t}) : [],\r\n\t\t\t\tcontactId: this.id,\r\n\t\t\t\tcontactType: typeof this.type === 'number' ? this.type : psge.RoleType[this.type],\r\n\t\t\t\tfirstName: this.firstName,\r\n\t\t\t\tlastName: this.lastName,\r\n\t\t\t\toccupationDescription: this.occupation\r\n\t\t\t} as psgm.EnterpriseCoordinatorSharedContactUpsearchModel\r\n }\r\n\t}\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\timport pmg = Portico.Models.Gateway;\r\n\r\n\texport interface IContactPreference {\r\n\t\tcontactInfoType: pmg.ContactInfoType;\r\n\t\tisOptedIn: boolean;\r\n\t\tisPreferred: boolean;\r\n }\r\n\r\n\texport class ContactPreference implements IContactPreference {\r\n\t\tcontactInfoType: pmg.ContactInfoType;\r\n\t\tisOptedIn: boolean;\r\n\t\tisPreferred: boolean;\r\n\r\n\t\tconstructor(obj?: IContactPreference) {\r\n\t\t\tthis.contactInfoType = null;\r\n\t\t\tthis.isOptedIn = false;\r\n\t\t\tthis.isPreferred = false;\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tthis.contactInfoType = obj.contactInfoType || null;\r\n\t\t\t\tthis.isOptedIn = obj.isOptedIn || false;\r\n\t\t\t\tthis.isPreferred = obj.isPreferred || false;\r\n }\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\timport psgm = apigateway.models;\r\n\r\n export interface IDiagnosis {\r\n\t\tid: number;\r\n\t\tcode: string;\r\n\t\tname: string;\r\n\t\tdescription: string;\r\n\t\ttype: string;\r\n }\r\n\r\n export class Diagnosis implements IDiagnosis {\r\n\t\tid: number;\r\n\t\tcode: string;\r\n\t\tname: string;\r\n\t\tdescription: string;\r\n\t\ttype: string;\r\n\r\n constructor(obj?: IDiagnosis | psgm.DiagnosisModel | any) {\r\n\t\t\tthis.id = null;\r\n\t\t\tthis.code = '';\r\n\t\t\tthis.name = '';\r\n\t\t\tthis.description = '';\r\n\t\t\tthis.type = null;\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tthis.id = obj.id || obj.diagnosisId || null;\r\n\t\t\t\tthis.code = obj.code || obj.diagnosisCode || '';\r\n\t\t\t\tthis.name = obj.name || obj.diagnosisName || '';\r\n\t\t\t\tthis.description = obj.description || obj.diagnosisDescription || '';\r\n\t\t\t\tthis.type = obj.type || obj.diagnosisType || null;\r\n }\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\timport psgm = apigateway.models;\r\n\r\n\texport interface IDiagnosisSession {\r\n ids: number[];\r\n codes: string[];\r\n\t\tdelimitedCodes: string;\r\n\r\n\t\tmapToEnterpriseCoordinatorDiagnosisSessionModel(): psgm.EnterpriseCoordinatorDiagnosisServiceModelsDiagnosisSessionModel;\r\n\t}\r\n\r\n\texport class DiagnosisSession implements IDiagnosisSession {\r\n ids: number[];\r\n codes: string[];\r\n delimitedCodes: string;\r\n\r\n\t\tconstructor(obj?: IDiagnosisSession) {\r\n this.ids = [];\r\n this.codes = [];\r\n this.delimitedCodes = null;\r\n\r\n if (obj) {\r\n this.ids = obj.ids;\r\n this.codes = obj.codes;\r\n\t\t\t\tthis.delimitedCodes = obj.delimitedCodes;\r\n }\r\n }\r\n\r\n\t\tmapToEnterpriseCoordinatorDiagnosisSessionModel(): psgm.EnterpriseCoordinatorDiagnosisServiceModelsDiagnosisSessionModel {\r\n\t\t\treturn {\r\n\t\t\t\tdiagnosisIds: this.ids,\r\n\t\t\t\tdiagnosisCodes: this.codes,\r\n\t\t\t\tdelimitedCodes: this.delimitedCodes\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\r\n export interface IDocument {\r\n id: number;\r\n\t\tgroupId: number;\r\n\t\tstatus: string;\r\n\t\tlayoutCode: string;\r\n\t\tintakeLayoutId: number;\r\n\t\ttypeId: number;\r\n\t\tsource: string;\r\n\t\tfileName: string;\r\n\t\tlocation: string;\r\n\t\tisPrimary: boolean;\r\n\t\tcreatedBy: number;\r\n\t\tcreateDate: Date;\r\n\t\tlastUpdatedBy: number;\r\n\t\tlastUpdateDate: Date;\r\n\t\tnumberOfPages: number;\r\n\t}\r\n\r\n export class Document implements IDocument {\r\n\t\tid: number;\r\n\t\tgroupId: number;\r\n\t\tstatus: string;\r\n\t\tlayoutCode: string;\r\n\t\tintakeLayoutId: number;\r\n\t\ttypeId: number;\r\n\t\tsource: string;\r\n\t\tfileName: string;\r\n\t\tlocation: string;\r\n\t\tisPrimary: boolean;\r\n\t\tcreatedBy: number;\r\n\t\tcreateDate: Date;\r\n\t\tlastUpdatedBy: number;\r\n\t\tlastUpdateDate: Date;\r\n\t\tnumberOfPages: number;\r\n\r\n constructor(obj?: IDocument | any) {\r\n\t\t\tthis.id = null;\r\n\t\t\tthis.groupId = null;\r\n\t\t\tthis.status = '';\r\n\t\t\tthis.layoutCode = '';\r\n\t\t\tthis.intakeLayoutId = null;\r\n\t\t\tthis.typeId = null;\r\n\t\t\tthis.source = '';\r\n\t\t\tthis.fileName = '';\r\n\t\t\tthis.location = '';\r\n\t\t\tthis.isPrimary = false;\r\n\t\t\tthis.createdBy = null;\r\n\t\t\tthis.createDate = null;\r\n\t\t\tthis.lastUpdatedBy = null;\r\n\t\t\tthis.lastUpdateDate = null;\r\n\t\t\tthis.numberOfPages = null;\r\n\r\n if (obj) {\r\n\t\t\t\tthis.id = obj.id || obj.DocumentId || null;\r\n\t\t\t\tthis.groupId = obj.groupId || obj.DocumentGroupId || null;\r\n\t\t\t\tthis.status = obj.status || obj.DocumentStatus || '';\r\n\t\t\t\tthis.layoutCode = obj.layoutCode || obj.DocumentLayoutCode || '';\r\n\t\t\t\tthis.intakeLayoutId = obj.intakeLayoutId || obj.IntakeLayoutId || null;\r\n\t\t\t\tthis.typeId = obj.typeId || obj.DocumentTypeId || null;\r\n\t\t\t\tthis.source = obj.source || obj.DocumentSource || '';\r\n\t\t\t\tthis.fileName = obj.fileName || obj.DocumentFileName || '';\r\n\t\t\t\tthis.location = obj.location || obj.DocumentLocation || '';\r\n\t\t\t\tthis.isPrimary = obj.isPrimary || obj.IsPrimary || false;\r\n\t\t\t\tthis.createdBy = obj.createdBy || obj.CreatedBy || null;\r\n\t\t\t\tthis.createDate = obj.createDate || obj.CreateDate || null;\r\n\t\t\t\tthis.lastUpdatedBy = obj.lastUpdatedBy || obj.LastUpdatedBy || null;\r\n\t\t\t\tthis.lastUpdateDate = obj.lastUpdateDate || obj.LastUpdateDate || null;\r\n\t\t\t\tthis.numberOfPages = obj.numberOfPages || obj.NumberOfPages || null;\r\n\t\t\t}\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n import psge = apigateway.enums;\r\n import psgm = apigateway.models;\r\n\r\n export interface IEmailAddress {\r\n id: number;\r\n type: number | string;\r\n address: string;\r\n language: string;\r\n }\r\n\r\n export class EmailAddress implements IEmailAddress {\r\n id: number;\r\n type: number | string;\r\n address: string;\r\n language: string;\r\n\r\n constructor(obj?: IEmailAddress | any) {\r\n this.id = null;\r\n this.type = null;\r\n this.address = '';\r\n this.language = '';\r\n\r\n if (obj) {\r\n\t\t\t\tthis.id = obj.id || obj.emailAddressId || null;\r\n\t\t\t\tthis.type = obj.type || obj.emailAddressType || null;\r\n\t\t\t\tthis.address = obj.address || '';\r\n this.language = obj.language || '';\r\n }\r\n }\r\n\r\n mapToEnterpriseCoordinatorEmailAddress() : psgm.EnterpriseCoordinatorSharedEmailAddressUpsearchModel {\r\n return {\r\n emailAddressId: this.id,\r\n emailAddressType: typeof this.type === 'number' ? this.type : psge.RoleType[this.type],\r\n address: this.address,\r\n language: this.language\r\n } as psgm.EnterpriseCoordinatorSharedEmailAddressUpsearchModel\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\timport psgm = apigateway.models;\r\n \r\n export interface IEmailRequest {\r\n\t\tsenderName: string;\r\n\t\tsenderAddress: string;\r\n\t\trecipientFirstName: string;\r\n\t\trecipientLastName: string;\r\n\t\trecipientAddress: string;\r\n\t\ttemplaterName: string;\r\n\t\tparameters: string;\r\n }\r\n\r\n\texport class EmailRequest implements IEmailRequest {\r\n\t\tsenderName: string;\r\n\t\tsenderAddress: string;\r\n\t\trecipientFirstName: string;\r\n\t\trecipientLastName: string;\r\n\t\trecipientAddress: string;\r\n\t\ttemplaterName: string;\r\n\t\tparameters: string;\r\n\r\n\t\tconstructor(obj?: IEmailRequest) {\r\n\t\t\tthis.senderName = null;\r\n\t\t\tthis.senderAddress = null;\r\n\t\t\tthis.recipientFirstName = null;\r\n\t\t\tthis.recipientLastName = null;\r\n\t\t\tthis.recipientAddress = null;\r\n\t\t\tthis.templaterName = null;\r\n\t\t\tthis.parameters = null;\r\n\r\n if (obj) {\r\n\t\t\t\tthis.senderName = obj.senderName;\r\n\t\t\t\tthis.senderAddress = obj.senderAddress;\r\n\t\t\t\tthis.recipientFirstName = obj.recipientFirstName;\r\n\t\t\t\tthis.recipientLastName = obj.recipientLastName;\r\n\t\t\t\tthis.recipientAddress = obj.recipientAddress;\r\n\t\t\t\tthis.templaterName = obj.templaterName;\r\n\t\t\t\tthis.parameters = obj.parameters;\r\n }\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n import pme = Portico.Models.Enterprise;\r\n\r\n export interface IEnrollRequestModel {\r\n accountCanUpdate: boolean;\r\n accountCanInsert: boolean;\r\n accountSkipSearch: boolean;\r\n partyCanUpdate: boolean;\r\n partyCanInsert: boolean;\r\n partySkipSearch: boolean;\r\n\t\taccount: pme.Account;\r\n\r\n\t\tmapToEnterpriseCoordinatorAccountUpsearchRequestModel(sourceId?: number);\r\n\t}\r\n\r\n\texport class EnrollRequestModel implements IEnrollRequestModel {\r\n\t\taccountCanInsert: boolean;\r\n\t\taccountCanUpdate: boolean;\r\n\t\taccountSkipSearch: boolean;\r\n\t\tpartyCanInsert: boolean;\r\n\t\tpartyCanUpdate: boolean;\r\n\t\tpartySkipSearch: boolean;\r\n\t\taccount: pme.Account;\r\n\r\n\t\tconstructor(obj?: IEnrollRequestModel) {\r\n\t\t\tthis.accountCanInsert = true;\r\n\t\t\tthis.accountCanUpdate = true;\r\n\t\t\tthis.accountSkipSearch = false;\r\n\t\t\tthis.partyCanInsert = true;\r\n\t\t\tthis.partyCanUpdate = true;\r\n\t\t\tthis.partySkipSearch = false;\r\n\t\t\tthis.account = null;\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tthis.accountCanUpdate = _.get(obj, 'accountCanUpdate', this.accountCanUpdate);\r\n\t\t\t\tthis.accountCanInsert = _.get(obj, 'accountCanInsert', this.accountCanInsert);\r\n\t\t\t\tthis.accountSkipSearch = _.get(obj, 'accountSkipSearch', this.accountSkipSearch);\r\n\t\t\t\tthis.partyCanUpdate = _.get(obj, 'partyCanUpdate', this.partyCanUpdate);\r\n\t\t\t\tthis.partyCanInsert = _.get(obj, 'partyCanInsert', this.partyCanInsert);\r\n\t\t\t\tthis.partySkipSearch = _.get(obj, 'partySkipSearch', this.partySkipSearch);\r\n\r\n\t\t\t\tif (obj.account) {\r\n\t\t\t\t\tthis.account = new Account(obj.account);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tmapToEnterpriseCoordinatorAccountUpsearchRequestModel(sourceId: number) {\r\n\t\t\treturn this.account.mapToEnterpriseCoordinatorAccountUpsearchRequestModel(this.accountCanInsert, this.accountCanUpdate, this.accountSkipSearch, this.partyCanInsert, this.partyCanUpdate, this.partySkipSearch, sourceId);\r\n\t\t}\r\n\t}\r\n}","namespace Portico.Models.Enterprise {\r\n\r\n import ent = Portico.Models.Enterprise;\r\n\r\n export interface IEnrollment {\r\n\t\tid: number;\r\n\t\tcaseId: number;\r\n startDate: Date;\r\n endDate: Date;\r\n claimEligibilityDate: Date;\r\n\t\treEnrollmentEligibilityDate: Date;\r\n\t\tstatus: EnrollmentEligibility;\r\n\t\thouseholdSize: number;\r\n isOptedIn: boolean;\r\n maxBenefit: string;\r\n memberNumber: string;\r\n\t\tpaymentType: string;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n\t\tupdatedBy: number;\r\n\t\tupdatedOn: Date;\r\n }\r\n\r\n export class Enrollment implements IEnrollment {\r\n\t\tid: number;\r\n\t\tcaseId: number;\r\n\t\tstartDate: Date;\r\n\t\tendDate: Date;\r\n\t\tclaimEligibilityDate: Date;\r\n\t\treEnrollmentEligibilityDate: Date;\r\n\t\tstatus: EnrollmentEligibility;\r\n\t\thouseholdSize: number;\r\n\t\tisOptedIn: boolean;\r\n\t\tmaxBenefit: string;\r\n\t\tmemberNumber: string;\r\n\t\tpaymentType: string;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n\t\tupdatedBy: number;\r\n\t\tupdatedOn: Date;\r\n\r\n constructor(obj?: IEnrollment) {\r\n this.id = null;\r\n\t\t\tthis.caseId = null;\r\n this.startDate = null;\r\n this.endDate = null;\r\n this.claimEligibilityDate = null;\r\n\t\t\tthis.reEnrollmentEligibilityDate = null;\r\n\t\t\tthis.status = null;\r\n\t\t\tthis.householdSize = null;\r\n this.isOptedIn = null;\r\n this.maxBenefit = null;\r\n this.memberNumber = null;\r\n this.paymentType = null;\r\n\t\t\tthis.createdBy = null;\r\n\t\t\tthis.createdOn = null;\r\n\t\t\tthis.updatedBy = null;\r\n\t\t\tthis.updatedOn = null;\r\n\r\n if (obj) {\r\n this.id = obj.id;\r\n\t\t\t\tthis.caseId = obj.caseId;\r\n this.startDate = obj.startDate;\r\n this.endDate = obj.endDate;\r\n this.claimEligibilityDate = obj.claimEligibilityDate;\r\n\t\t\t\tthis.reEnrollmentEligibilityDate = obj.reEnrollmentEligibilityDate;\r\n\t\t\t\tthis.status = obj.status;\r\n\t\t\t\tthis.householdSize = obj.householdSize;\r\n this.isOptedIn = obj.isOptedIn;\r\n this.maxBenefit = obj.maxBenefit;\r\n this.memberNumber = obj.memberNumber;\r\n this.paymentType = obj.paymentType;\r\n\t\t\t\tthis.createdBy = obj.createdBy;\r\n\t\t\t\tthis.createdOn = obj.createdOn;\r\n\t\t\t\tthis.updatedBy = obj.updatedBy;\r\n\t\t\t\tthis.updatedOn = obj.updatedOn;\r\n\t\t\t}\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\r\n export interface IEnrollmentCondition {\r\n\t\tcaseId: number;\r\n\t\tcategoryCode: string;\r\n code: string;\r\n description: string;\r\n }\r\n\r\n export class EnrollmentCondition implements IEnrollmentCondition {\r\n\t\tcaseId: number;\r\n\t\tcategoryCode: string;\r\n\t\tcode: string;\r\n\t\tdescription: string;\r\n\r\n constructor(obj?: IEnrollmentCondition) {\r\n\t\t\tthis.caseId = null;\r\n\t\t\tthis.categoryCode = null;\r\n\t\t\tthis.code = null;\r\n this.description = null;\r\n\r\n if (obj) {\r\n\t\t\t\tthis.caseId = obj.caseId;\r\n\t\t\t\tthis.categoryCode = obj.categoryCode;\r\n\t\t\t\tthis.code = obj.code;\r\n this.description = obj.description;\r\n }\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\r\n import ent = Portico.Models.Enterprise;\r\n\r\n export interface IEnrollmentEligibility {\r\n status: string;\r\n\t\tconditions: EnrollmentCondition[];\r\n }\r\n\r\n export class EnrollmentEligibility implements IEnrollmentEligibility {\r\n\t\tstatus: string;\r\n\t\tconditions: EnrollmentCondition[];\r\n\r\n constructor(obj?: IEnrollmentEligibility) {\r\n\t\t\tthis.status = null;\r\n\t\t\tthis.conditions = [];\r\n\r\n if (obj) {\r\n\t\t\t\tthis.status = obj.status;\r\n\r\n\t\t\t\tif (obj.conditions) {\r\n\t\t\t\t\tfor (const condition of obj.conditions) {\r\n\t\t\t\t\t\tthis.conditions.push(new ent.EnrollmentCondition(condition));\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n","namespace Portico.Models.Enterprise {\r\n\r\n import ent = Portico.Models.Enterprise;\r\n\r\n export interface IEnrollmentInput {\r\n\t\tdefaultPaymentType: string;\r\n\t\teligibility: EnrollmentVerification;\r\n\t\tisOptedIn: boolean;\r\n\t\tmemberNumber: string;\r\n }\r\n\r\n\texport class EnrollmentInput implements IEnrollmentInput {\r\n\t\tdefaultPaymentType: string;\r\n\t\teligibility: EnrollmentVerification;\r\n\t\tisOptedIn: boolean;\r\n\t\tmemberNumber: string;\r\n\r\n\t\tconstructor(obj?: IEnrollmentInput) {\r\n\t\t\tthis.defaultPaymentType = null;\r\n\t\t\tthis.eligibility = null;\r\n\t\t\tthis.isOptedIn = null;\r\n\t\t\tthis.memberNumber = null;\r\n\r\n if (obj) {\r\n\t\t\t\tthis.defaultPaymentType = obj.defaultPaymentType;\r\n\r\n\t\t\t\tif (obj.eligibility) {\r\n\t\t\t\t\tthis.eligibility = new EnrollmentVerification(obj.eligibility);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.isOptedIn = obj.isOptedIn;\r\n\t\t\t\tthis.memberNumber = obj.memberNumber;\r\n }\r\n }\r\n }\r\n}\r\n\r\n","namespace Portico.Models.Enterprise {\r\n\r\n import ent = Portico.Models.Enterprise;\r\n\r\n export interface IEnrollmentVerification {\r\n dob: Date;\r\n\t\teligibilityScope: string;\r\n memberNumber: string;\r\n\t\tpatientAddressState: string;\r\n surveySession: ent.SurveySession;\r\n }\r\n\r\n\texport class EnrollmentVerification implements IEnrollmentVerification {\r\n\t\tdob: Date;\r\n\t\teligibilityScope: string;\r\n\t\tmemberNumber: string;\r\n\t\tpatientAddressState: string;\r\n\t\tsurveySession: ent.SurveySession;\r\n\r\n\t\tconstructor(obj?: IEnrollmentVerification) {\r\n\t\t\tthis.dob = null;\r\n\t\t\tthis.eligibilityScope = null;\r\n\t\t\tthis.memberNumber = null;\r\n\t\t\tthis.patientAddressState = null;\r\n\t\t\tthis.surveySession = null;\r\n\r\n if (obj) {\r\n\t\t\t\tthis.dob = obj.dob;\r\n\t\t\t\tthis.eligibilityScope = obj.eligibilityScope;\r\n\t\t\t\tthis.memberNumber = obj.memberNumber;\r\n\t\t\t\tthis.patientAddressState = obj.patientAddressState;\r\n\r\n\t\t\t\tif (obj.surveySession) {\r\n\t\t\t\t\tthis.surveySession = new ent.SurveySession(obj.surveySession);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n","namespace Portico.Models.Enterprise {\r\n\r\n\texport interface IEnterprise {\r\n\t\t// intake data\r\n\t\tauthentication: AuthenticationResponse;\r\n\t\tintakeLayout: IntakeLayout;\r\n\t\tlayoutSection: LayoutSection;\r\n\r\n\t\t// list data\r\n\t\tdiagnoses: Diagnosis[];\r\n\t\tndcs: Ndc[];\r\n\t\tstates: State[];\r\n\t}\r\n\r\n\texport class Enterprise implements IEnterprise {\r\n\t\t// intake data\r\n\t\tauthentication: AuthenticationResponse;\r\n\t\tintakeLayout: IntakeLayout;\r\n\t\tlayoutSection: LayoutSection;\r\n\r\n\t\t// list data\r\n\t\tdiagnoses: Diagnosis[];\r\n\t\tndcs: Ndc[];\r\n\t\tstates: State[];\r\n\r\n\t\tconstructor(obj?: IEnterprise) {\r\n\t\t\tthis.authentication = null;\r\n\t\t\tthis.intakeLayout = null;\r\n\t\t\tthis.layoutSection = null;\r\n\r\n\t\t\tthis.diagnoses = null;\r\n\t\t\tthis.ndcs = null;\r\n\t\t\tthis.states = null;\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tif (obj.authentication) {\r\n\t\t\t\t\tthis.authentication = new AuthenticationResponse(obj.authentication);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.intakeLayout) {\r\n\t\t\t\t\tthis.intakeLayout = new IntakeLayout(obj.intakeLayout);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.layoutSection) {\r\n\t\t\t\t\tthis.layoutSection = new LayoutSection(obj.layoutSection);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.diagnoses) {\r\n\t\t\t\t\tobj.diagnoses.forEach((diagnosis) => {\r\n\t\t\t\t\t\tthis.diagnoses.push(new Diagnosis(diagnosis));\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.ndcs) {\r\n\t\t\t\t\tobj.ndcs.forEach((ndc) => {\r\n\t\t\t\t\t\tthis.ndcs.push(new Ndc(ndc));\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.states) {\r\n\t\t\t\t\tobj.states.forEach((state) => {\r\n\t\t\t\t\t\tthis.states.push(new State(state));\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n import psge = apigateway.enums;\r\n import psgm = apigateway.models;\r\n\r\n export interface IExternalId {\r\n id: number;\r\n type: number | string;\r\n value: string;\r\n }\r\n\r\n export class ExternalId implements IExternalId {\r\n id: number;\r\n type: number| string;\r\n value: string;\r\n\r\n constructor(obj?: IExternalId | any) {\r\n this.id = null;\r\n this.type = null;\r\n this.value = '';\r\n\r\n if (obj) {\r\n this.id = obj.id || obj.Id || null;\r\n\t\t\t\tthis.type = obj.type || obj.externalIdType || null;\r\n\t\t\t\tthis.value = obj.value || obj.externalId || '';\r\n }\r\n }\r\n\r\n mapToEnterpriseCoordinatorExternalId() : psgm.EnterpriseCoordinatorSharedExternalIdUpsearchModel {\r\n return {\r\n id: this.id,\r\n externalIdType: typeof this.type === 'number' ? this.type : psge.PartyExternalIdType[this.type],\r\n externalId: this.value\r\n } as psgm.EnterpriseCoordinatorSharedExternalIdUpsearchModel\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\timport psgm = apigateway.models;\r\n \r\n export interface IFeedbackRequest {\r\n\t\tname: string;\r\n\t\temail: string;\r\n\t\ttype: string;\r\n\t\tsubject: string;\r\n\t\tbody: string;\r\n\t\tcanContact: string;\r\n }\r\n\r\n\texport class FeedbackRequest implements IFeedbackRequest {\r\n\t\tname: string;\r\n\t\temail: string;\r\n\t\ttype: string;\r\n\t\tsubject: string;\r\n\t\tbody: string;\r\n\t\tcanContact: string;\r\n\r\n\t\tconstructor(obj?: IFeedbackRequest) {\r\n\t\t\tthis.name = '';\r\n\t\t\tthis.email = '';\r\n\t\t\tthis.type = '';\r\n\t\t\tthis.subject = '';\r\n\t\t\tthis.body = '';\r\n\t\t\tthis.canContact = '';\r\n\r\n if (obj) {\r\n\t\t\t\tthis.name = obj.name || '';\r\n\t\t\t\tthis.email = obj.email || '';\r\n\t\t\t\tthis.type = obj.type || '';\r\n\t\t\t\tthis.subject = obj.subject || '';\r\n\t\t\t\tthis.body = obj.body || '';\r\n\t\t\t\tthis.canContact = obj.canContact || '';\r\n }\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n import psgm = apigateway.models;\r\n\r\n export interface IGlobalId {\r\n id: number;\r\n type: string;\r\n value: string;\r\n }\r\n\r\n export class GlobalId implements IGlobalId {\r\n id: number;\r\n type: string;\r\n value: string;\r\n\r\n constructor(obj?: IGlobalId | any) {\r\n this.id = null;\r\n this.type = null;\r\n this.value = '';\r\n\r\n if(obj) {\r\n this.id = obj.id || obj.Id || null;\r\n this.type = obj.type || obj.globalIdTypeCode || null;\r\n this.value = obj.value || obj.globalId || '';\r\n }\r\n }\r\n\r\n mapToEnterpriseCoordinatorGlobalId() : psgm.EnterpriseCoordinatorSharedGlobalIdUpsearchModel {\r\n return {\r\n id: this.id,\r\n globalIdTypeCode : this.type,\r\n globalId : this.value\r\n } as psgm.EnterpriseCoordinatorSharedGlobalIdUpsearchModel\r\n }\r\n }\r\n}","namespace Portico.Models.Enterprise {\r\n import pmg = Portico.Models.Gateway;\r\n\r\n export interface IIntakeLayout {\r\n id: number;\r\n programId: number;\r\n intakeType: string;\r\n intakeLayoutCode: string;\r\n intakeLayoutDescription: string;\r\n docTypeId: number;\r\n generatedCaseTypeId: number;\r\n intakeLayoutSequence: number;\r\n layoutSections: LayoutSection[];\r\n surveyIds: number[];\r\n surveys: Survey[];\r\n\r\n\t\tgetLayoutSection(name: string, current?: string): LayoutSection;\r\n\t\tgetLayoutSectionIndex(name: string, current?: string): number;\r\n\t\tgetSurveyByQuestionId(questionId: number): Survey;\r\n\t\tgetSurveyAnswer(questionId: number, answerId: number): SurveyAnswer;\r\n\t\tgetSurveyQuestion(questionId: number): SurveyQuestion;\r\n\t\thasLayoutSection(name: string, current?: string): boolean;\r\n }\r\n\r\n export class IntakeLayout implements IIntakeLayout {\r\n id: number;\r\n programId: number;\r\n intakeType: string;\r\n intakeLayoutCode: string;\r\n intakeLayoutDescription: string;\r\n docTypeId: number;\r\n generatedCaseTypeId: number;\r\n intakeLayoutSequence: number;\r\n layoutSections: LayoutSection[];\r\n surveyIds: number[];\r\n surveys: Survey[];\r\n\r\n constructor(obj?: IIntakeLayout | any) {\r\n this.id = null;\r\n this.programId = null;\r\n this.intakeType = null;\r\n this.intakeLayoutCode = null;\r\n this.intakeLayoutDescription = null;\r\n this.docTypeId = null;\r\n this.generatedCaseTypeId = null;\r\n this.intakeLayoutSequence = null;\r\n this.layoutSections = null;\r\n this.surveyIds = null;\r\n this.surveys = null;\r\n\r\n if (obj) {\r\n this.id = obj.id;\r\n this.programId = obj.programId;\r\n this.intakeType = obj.intakeType;\r\n this.intakeLayoutCode = obj.intakeLayoutCode;\r\n this.intakeLayoutDescription = obj.intakeLayoutDescription;\r\n this.docTypeId = obj.docTypeId;\r\n this.generatedCaseTypeId = obj.generatedCaseTypeId;\r\n this.intakeLayoutSequence = obj.intakeLayoutSequence;\r\n this.layoutSections = [];\r\n this.surveyIds = [];\r\n this.surveys = [];\r\n\r\n if (obj.layoutSections) {\r\n for (const layoutSection of obj.layoutSections) {\r\n this.layoutSections.push(new LayoutSection(layoutSection));\r\n }\r\n }\r\n\r\n if (obj.surveyIds) {\r\n for (const surveyId of obj.surveyIds) {\r\n this.surveyIds.push(surveyId);\r\n }\r\n }\r\n\r\n if (obj.surveys) {\r\n for (const survey of obj.surveys) {\r\n this.surveys.push(new Survey(survey));\r\n }\r\n }\r\n }\r\n }\r\n\r\n\t\tgetLayoutSection(name: string, current: string = null): LayoutSection {\r\n\t\t\tconst index = this.getLayoutSectionIndex(name, current);\r\n\t\t\treturn index > -1 ? this.layoutSections[index] : null;\r\n\t\t}\r\n\r\n\t\tgetLayoutSectionIndex(name: string, current: string = null): number {\r\n\t\t\tif (name === 'first') {\r\n\t\t\t\treturn 0;\r\n\t\t\t} else if (name === 'previous') {\r\n\t\t\t\treturn this.getLayoutSectionIndex(current) - 1;\r\n\t\t\t} else if (name === 'next') {\r\n\t\t\t\treturn this.getLayoutSectionIndex(current) + 1;\r\n\t\t\t} else if (name === 'last') {\r\n\t\t\t\treturn this.layoutSections.length - 1;\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < this.layoutSections.length; i++) {\r\n\t\t\t\tconst layoutSection = this.layoutSections[i];\r\n\r\n\t\t\t\tif (layoutSection.name === name) {\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn -1;\r\n\t\t}\r\n\r\n\t\tgetSurveyByQuestionId(questionId: number): Survey {\r\n\t\t\tfor (let i = 0; i < this.surveys.length; i++) {\r\n\t\t\t\tconst survey = this.surveys[i];\r\n\t\t\t\tconst surveyQuestion = survey.getSurveyQuestion(questionId);\r\n\r\n\t\t\t\tif (surveyQuestion) {\r\n\t\t\t\t\treturn survey;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tgetSurveyAnswer(questionId: number, answerId: number): SurveyAnswer {\r\n\t\t\tconst surveyQuestion = this.getSurveyQuestion(questionId);\r\n\t\t\tconst surveyAnswer = surveyQuestion.getSurveyAnswer(answerId);\r\n\r\n\t\t\treturn surveyAnswer;\r\n\t\t}\r\n\r\n\t\tgetSurveyQuestion(questionId: number): SurveyQuestion {\r\n\t\t\tfor (let i = 0; i < this.surveys.length; i++) {\r\n\t\t\t\tconst survey = this.surveys[i];\r\n\t\t\t\tconst surveyQuestion = survey.getSurveyQuestion(questionId);\r\n\r\n\t\t\t\tif (surveyQuestion) {\r\n\t\t\t\t\treturn surveyQuestion;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\thasLayoutSection(name: string, current: string = null): boolean {\r\n\t\t\tconst index = this.getLayoutSectionIndex(name, current);\r\n\t\t\treturn index >= 0 && index < this.layoutSections.length;\r\n\t\t}\r\n }\r\n}","namespace Portico.Models.Enterprise {\r\n export interface IJanssenGECheck {\r\n tcProgramId: number;\r\n ndc: string;\r\n firstName: string;\r\n lastName: string;\r\n gender: string;\r\n dateOfBirth: string;\r\n addressLine1: string;\r\n city: string;\r\n state: string;\r\n zipCode: string;\r\n uniqueId: string;\r\n memberNumber: string;\r\n }\r\n\r\n export class JanssenGECheck implements IJanssenGECheck {\r\n tcProgramId: number;\r\n ndc: string;\r\n firstName: string;\r\n lastName: string;\r\n gender: string;\r\n dateOfBirth: string;\r\n addressLine1: string;\r\n city: string;\r\n state: string;\r\n zipCode: string;\r\n uniqueId: string;\r\n memberNumber: string;\r\n\r\n constructor(obj?: IJanssenGECheck) {\r\n this.tcProgramId = null;\r\n this.ndc = null\r\n this.firstName = null;\r\n this.lastName = null;\r\n this.gender = null;\r\n this.dateOfBirth = null;\r\n this.addressLine1 = null;\r\n this.city = null;\r\n this.state = null;\r\n this.zipCode = null;\r\n this.uniqueId = null;\r\n this.memberNumber = null;\r\n\r\n if (obj) {\r\n this.tcProgramId = obj.tcProgramId;\r\n this.ndc = obj.ndc;\r\n this.firstName = obj.firstName;\r\n this.lastName = obj.lastName;\r\n this.gender = obj.gender;\r\n this.dateOfBirth = obj.dateOfBirth;\r\n this.addressLine1 = obj.addressLine1;\r\n this.city = obj.city;\r\n this.state = obj.state;\r\n this.zipCode = obj.zipCode;\r\n this.uniqueId = obj.uniqueId;\r\n this.memberNumber = obj.memberNumber;\r\n }\r\n }\r\n }\r\n}","namespace Portico.Models.Enterprise {\r\n\r\n export interface ILayoutSection {\r\n id: number;\r\n layoutId: number;\r\n entityName: string;\r\n configurationDetails: string[];\r\n questions: LayoutSectionQuestion[];\r\n entityId: number;\r\n name: string;\r\n description: string;\r\n sequence: number;\r\n visited: boolean;\r\n }\r\n\r\n export class LayoutSection implements ILayoutSection {\r\n id: number;\r\n layoutId: number;\r\n entityName: string;\r\n configurationDetails: string[];\r\n questions: LayoutSectionQuestion[];\r\n entityId: number;\r\n name: string;\r\n description: string;\r\n sequence: number;\r\n visited: boolean;\r\n\r\n constructor(obj?: ILayoutSection | any) {\r\n this.id = null;\r\n this.layoutId = null;\r\n this.entityName = null;\r\n this.configurationDetails = [];\r\n this.questions = [];\r\n this.entityId = null;\r\n this.name = null;\r\n this.description = null;\r\n this.sequence = null;\r\n this.visited = false;\r\n\r\n if (obj) {\r\n this.id = obj.id;\r\n this.layoutId = obj.layoutId;\r\n\t\t\t\tthis.entityName = obj.entityName;\r\n\r\n\t\t\t\tif (obj.configurationDetails) {\r\n\t\t\t\t\tfor (const configurationDetail of obj.configurationDetails) {\r\n this.configurationDetails.push(configurationDetail);\r\n }\r\n }\r\n\r\n if (obj.questions) {\r\n\t\t\t\t\tfor (const question of obj.questions) {\r\n this.questions.push(new LayoutSectionQuestion(question));\r\n }\r\n }\r\n\r\n\t\t\t\tthis.entityId = obj.entityId;\r\n this.name = obj.name;\r\n this.description = obj.description;\r\n this.sequence = obj.sequence;\r\n this.visited = obj.visited;\r\n }\r\n }\r\n }\r\n}","namespace Portico.Models.Enterprise {\r\n\r\n export interface ILayoutSectionQuestion {\r\n id: number;\r\n questionId: number;\r\n sequence: number;\r\n }\r\n\r\n export class LayoutSectionQuestion implements ILayoutSectionQuestion {\r\n id: number;\r\n questionId: number;\r\n sequence: number;\r\n\r\n constructor(obj?: ILayoutSectionQuestion | any) {\r\n this.id = null;\r\n this.questionId = null;\r\n this.sequence = null;\r\n\r\n if (obj) {\r\n this.id = obj.id;\r\n this.questionId = obj.questionId;\r\n this.sequence = obj.sequence;\r\n }\r\n }\r\n }\r\n}","namespace Portico.Models.Enterprise {\r\n\r\n export interface ILinkedPayor {\r\n }\r\n\r\n\texport class LinkedPayor implements ILinkedPayor {\r\n\r\n\t\tconstructor(obj?: ILinkedPayor) {\r\n if (obj) {\r\n }\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n import pmg = Portico.Models.Gateway;\r\n\r\n export interface INdc {\r\n id: number;\r\n\t\tname: string;\r\n drugNumber: string;\r\n\t\tstrengthDescription: string;\r\n\t\tprogramNdcXrefId: number;\r\n\t\tprogramPromotionXrefId: number;\r\n }\r\n\r\n\texport class Ndc implements INdc {\r\n\t\tid: number;\r\n\t\tname: string;\r\n\t\tdrugNumber: string;\r\n\t\tstrengthDescription: string;\r\n\t\tprogramNdcXrefId: number;\r\n\t\tprogramPromotionXrefId: number;\r\n\r\n\t\tconstructor(obj?: INdc | any) {\r\n this.id = null;\r\n\t\t\tthis.name = '';\r\n\t\t\tthis.drugNumber = '';\r\n\t\t\tthis.strengthDescription = '';\r\n\t\t\tthis.programNdcXrefId = null;\r\n\t\t\tthis.programPromotionXrefId = null;\r\n\r\n if (obj) {\r\n\t\t\t\tthis.id = obj.id || obj.Id || null;\r\n\t\t\t\tthis.name = obj.name || obj.Name || '';\r\n\t\t\t\tthis.drugNumber = obj.drugNumber || obj.DrugNumber || '';\r\n\t\t\t\tthis.strengthDescription = obj.strengthDescription || obj.StrengthDescription || '';\r\n\t\t\t\tthis.programNdcXrefId = obj.programNdcXrefId || obj.ProgramNdcXrefId || null;\r\n\t\t\t\tthis.programPromotionXrefId = obj.programPromotionXrefId || obj.ProgramPromotionXrefId || null;\r\n }\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\r\n\texport interface IOptionalService {\r\n }\r\n\r\n\texport class OptionalService implements IOptionalService {\r\n\r\n\t\tconstructor(obj?: IOptionalService) {\r\n if (obj) {\r\n }\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\timport psge = apigateway.enums;\r\n\timport psgm = apigateway.models;\r\n\r\n export interface IPatient {\r\n\t\tid: string;\r\n ssn: string;\r\n firstName: string;\r\n middleName: string;\r\n lastName: string;\r\n suffix: string;\r\n nickName: string;\r\n gender: string;\r\n dateOfBirth: Date;\r\n primaryLanguageId: number;\r\n\t\tisUsResident: boolean;\r\n\t\thouseholdSize: number;\r\n\t\taddresses: Address[];\r\n\t\tcontacts: Contact[];\r\n emailAddresses: EmailAddress[];\r\n phoneNumbers: PhoneNumber[];\r\n\r\n\t\tmapToEnterpriseCoordinatorPatientUpsearchModel(): psgm.EnterpriseCoordinatorPatientServiceModelsPatientUpsearchModel;\r\n\t\tmapToEnterpriseCoordinatorPatientUpsearchModelWithFlags(canUpdate: boolean, canInsert: boolean, skipSearch: boolean): psgm.UpsearchModelEnterpriseCoordinatorPatientServiceModelsPatientUpsearchModel;\r\n\t}\r\n\r\n export class Patient implements IPatient {\r\n id: string;\r\n ssn: string;\r\n firstName: string;\r\n middleName: string;\r\n lastName: string;\r\n suffix: string;\r\n nickName: string;\r\n gender: string;\r\n dateOfBirth: Date;\r\n primaryLanguageId: number;\r\n\t\tisUsResident: boolean;\r\n\t\thouseholdSize: number;\r\n addresses: Address[];\r\n\t\tcontacts: Contact[];\r\n emailAddresses: EmailAddress[];\r\n phoneNumbers: PhoneNumber[];\r\n\r\n constructor(obj?: IPatient | any) {\r\n this.id = null;\r\n this.ssn = '';\r\n this.firstName = '';\r\n this.middleName = '';\r\n this.lastName = '';\r\n this.suffix = '';\r\n this.nickName = '';\r\n this.gender = null;\r\n this.dateOfBirth = null;\r\n\t\t\tthis.primaryLanguageId = null;\r\n\t\t\tthis.isUsResident = true;\r\n\t\t\tthis.householdSize = 0;\r\n\t\t\tthis.addresses = [];\r\n\t\t\tthis.contacts = [];\r\n this.emailAddresses = [];\r\n this.phoneNumbers = [];\r\n\r\n if (obj) {\r\n\t\t\t\tthis.id = obj.id || obj.patientId || null;\r\n\t\t\t\tthis.ssn = obj.ssn || obj.socialSecurityNumber || '';\r\n\t\t\t\tthis.firstName = obj.firstName || '';\r\n\t\t\t\tthis.middleName = obj.middleName || '';\r\n\t\t\t\tthis.lastName = obj.lastName || '';\r\n\t\t\t\tthis.suffix = obj.suffix || '';\r\n\t\t\t\tthis.nickName = obj.nickName || obj.nickname || '';\r\n\t\t\t\tthis.gender = isNaN(obj.gender) ? obj.gender : Portico.Models.Gateway.Gender[obj.gender];\r\n\t\t\t\tthis.primaryLanguageId = obj.primaryLanguageId || null;\r\n\t\t\t\tthis.isUsResident = obj.isUsResident || true;\r\n\t\t\t\tthis.householdSize = obj.householdSize || 0;\r\n\r\n if (obj.dateOfBirth) {\r\n\t\t\t\t\tthis.dateOfBirth = typeof obj.dateOfBirth === 'string' ? moment.utc(obj.dateOfBirth).toDate() : new Date(obj.dateOfBirth.getTime());\t\t\t\t\t\r\n }\r\n\r\n\t\t\t\tif (obj.addresses) {\r\n\t\t\t\t\tfor (const address of obj.addresses) {\r\n\t\t\t\t\t\tthis.addresses.push(new Address(address));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.contacts) {\r\n\t\t\t\t\tfor (const contact of obj.contacts) {\r\n\t\t\t\t\t\tthis.contacts.push(new Contact(contact));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n if (obj.emailAddresses) {\r\n for (const emailAddress of obj.emailAddresses) {\r\n this.emailAddresses.push(new EmailAddress(emailAddress));\r\n }\r\n }\r\n\r\n if (obj.phoneNumbers) {\r\n for (const phoneNumber of obj.phoneNumbers) {\r\n this.phoneNumbers.push(new PhoneNumber(phoneNumber));\r\n }\r\n }\r\n }\r\n }\r\n\r\n\t\tmapToEnterpriseCoordinatorPatientUpsearchModel(): psgm.EnterpriseCoordinatorPatientServiceModelsPatientUpsearchModel {\r\n\t\t\treturn {\r\n\t\t\t\tpatientId: this.id,\r\n\t\t\t\tfirstName: this.firstName,\r\n\t\t\t\tmiddleName: this.middleName ? this.middleName : \"\",\r\n\t\t\t\tlastName: this.lastName,\r\n\t\t\t\tsuffix: this.suffix ? this.suffix : \"\",\r\n\t\t\t\tnickname: this.nickName ? this.nickName : \"\",\r\n\t\t\t\tdateOfBirth: moment(this.dateOfBirth),\r\n\t\t\t\tgender: psge.Gender[this.gender],\r\n\t\t\t\tprimaryLanguageId: this.primaryLanguageId,\r\n\t\t\t\tisUsResident: this.isUsResident,\r\n\t\t\t\thouseholdSize: this.householdSize,\r\n\t\t\t\tsocialSecurityNumber: this.ssn,\r\n\t\t\t\taddresses: this.addresses ? _.map(this.addresses, addr => {\r\n\t\t\t\t\treturn addr.mapToEnterpriseCoordinatorAddress();\r\n\t\t\t\t}) : [],\r\n\t\t\t\temailAddresses: this.emailAddresses ? _.map(this.emailAddresses, email => {\r\n\t\t\t\t\treturn email.mapToEnterpriseCoordinatorEmailAddress();\r\n\t\t\t\t}) : [],\r\n\t\t\t\tphoneNumbers: this.phoneNumbers ? _.map(this.phoneNumbers, ph => {\r\n\t\t\t\t\treturn ph.mapToEnterpriseCoordinatorPhoneUpsearchModel();\r\n\t\t\t\t}) : []\r\n\t\t\t} as psgm.EnterpriseCoordinatorPatientServiceModelsPatientUpsearchModel;\r\n\t\t}\r\n\r\n\t\tmapToEnterpriseCoordinatorPatientUpsearchModelWithFlags(canUpdate: boolean, canInsert: boolean, skipSearch: boolean): psgm.UpsearchModelEnterpriseCoordinatorPatientServiceModelsPatientUpsearchModel {\r\n\t\t\treturn {\r\n\t\t\t\tcanUpdate: canUpdate,\r\n\t\t\t\tcanInsert: canInsert,\r\n\t\t\t\tskipSearch: skipSearch,\r\n\t\t\t\tmodel: this.mapToEnterpriseCoordinatorPatientUpsearchModel()\r\n\t\t\t};\r\n\t\t}\r\n }\r\n}","namespace Portico.Models.Enterprise {\r\n import pme = Portico.Models.Enterprise;\r\n import psgm = apigateway.models;\r\n \r\n export interface IPatientAccount extends IBaseAccount {\r\n party: Patient;\r\n }\r\n\r\n export class PatientAccount extends BaseAccount implements IPatientAccount {\r\n party: Patient;\r\n\r\n constructor(obj?: PatientAccount | any) {\r\n\t\t\tsuper(obj);\r\n\r\n\t\t\tthis.party = new Patient();\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tif (obj.party) {\r\n\t\t\t\t\tthis.party = new Patient(obj.party);\r\n\t\t\t\t}\r\n\t\t\t}\r\n }\r\n \r\n mapToEnterpriseCoordinatorPatientAccountUpsearchRequestModel(\r\n canInsertAccount: boolean, \r\n canUpdateAccount: boolean, \r\n skipAccountSearch: boolean,\r\n canInsertParty: boolean, \r\n canUpdateParty: boolean, \r\n skipPartySearch: boolean,\r\n sourceId: number,\r\n ) {\r\n const accountDiagnosisSession = this.getDiagnosisSession(false);\r\n const accountUpsearchModel: psgm.EnterpriseCoordinatorAccountUpsearchRequestModel = {\r\n sourceId,\r\n accountData: this.mapToEnterpriseCoordinatorAccountUpsearchModelWithFlags(canUpdateAccount, canInsertAccount, skipAccountSearch),\r\n patientData: this.party ? this.party.mapToEnterpriseCoordinatorPatientUpsearchModelWithFlags(canUpdateParty, canInsertParty, skipPartySearch) : null,\r\n diagnosisSessionData: accountDiagnosisSession ? accountDiagnosisSession.mapToEnterpriseCoordinatorDiagnosisSessionModel() : null,\r\n\t\t\t\thierarchyExternalIdTypes: [],\r\n payorData : this.payorRelationships ? _.map(this.payorRelationships, pr => {\r\n\t\t\t\t\treturn pr.mapToEnterpriseCoordinatorPayorUpsearchModelWithFlags(canInsertParty, canUpdateParty, skipPartySearch);\r\n }) : [],\r\n pharmacyData: this.pharmacyRelationships ? _.map(this.pharmacyRelationships, pr => {\r\n\t\t\t\t\treturn pr.mapToEnterpriseCoordinatorPharmacyUpsearchModelWithFlags(canInsertParty, canUpdateParty, skipPartySearch);\r\n }) : [],\r\n prescriberData: this.prescriberRelationships ? _.map(this.prescriberRelationships, pr => {\r\n\t\t\t\t\treturn pr.mapToEnterpriseCoordinatorPrescriberUpsearchModelWithFlags(canInsertParty, canUpdateParty, skipPartySearch);\r\n }) : [],\r\n prescriptionData: this.prescriptions ? _.map(this.prescriptions, p => {\r\n\t\t\t\t\treturn p.mapToEnterpriseCoordinatorPrescriptionUpsearchModel();\r\n\t\t\t\t}) : [],\r\n\t\t\t\tsiteData: this.siteRelationships ? _.map(this.siteRelationships, sr => {\r\n\t\t\t\t\treturn sr.mapToEnterpriseCoordinatorSiteUpsearchModelWithFlags(canInsertParty, canUpdateParty, skipPartySearch);\r\n\t\t\t\t}) : [],\r\n\t\t\t\tsurveySessionData: this.getSurveySessionIds()\r\n }\r\n return accountUpsearchModel;\r\n }\r\n }\r\n\r\n export interface IPatientAccountRegistration {\r\n\t\tuserName: string;\r\n\t\tpassword: string;\r\n\t\tfirstName: string;\r\n\t\tlastName: string;\r\n\t\tdob: Date;\r\n\t\tgender: number;\r\n\t\tzip: string;\r\n\t\tphone: ContactInfo;\r\n\t\tfax: ContactInfo;\r\n email: ContactInfo;\r\n\t\tsendEmail: boolean;\r\n }\r\n\r\n export class PatientAccountRegistration implements IPatientAccountRegistration{\r\n\t\tuserName: string;\r\n\t\tpassword: string;\r\n\t\tfirstName: string;\r\n\t\tlastName: string;\r\n\t\tdob: Date;\r\n\t\tgender: number;\r\n\t\tzip: string;\r\n\t\tphone: ContactInfo;\r\n\t\tfax: ContactInfo;\r\n\t\temail: ContactInfo;\r\n\t\tsendEmail: boolean;\r\n\r\n constructor(obj: IPatientAccountRegistration) {\r\n\t\t\tthis.userName = '';\r\n\t\t\tthis.password = '';\r\n\t\t\tthis.firstName = '';\r\n\t\t\tthis.lastName = '';\r\n\t\t\tthis.dob = null;\r\n\t\t\tthis.gender = null;\r\n\t\t\tthis.zip = '';\r\n\t\t\tthis.phone = new ContactInfo();\r\n\t\t\tthis.fax = new ContactInfo();\r\n\t\t\tthis.email = new ContactInfo();\r\n\t\t\tthis.sendEmail = false;\r\n\r\n\r\n if(obj) {\r\n\t\t\t\tthis.userName = obj.userName || '';\r\n\t\t\t\tthis.password = obj.password;\r\n\t\t\t\tthis.firstName = obj.firstName || '';\r\n\t\t\t\tthis.lastName = obj.lastName || '';\r\n\t\t\t\tthis.dob = obj.dob;\r\n\t\t\t\tthis.gender = obj.gender;\r\n\t\t\t\tthis.zip = obj.zip || '';\r\n \r\n if (obj.phone) {\r\n\t\t\t\t\tthis.phone = new ContactInfo(obj.phone);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.fax) {\r\n\t\t\t\t\tthis.fax = new ContactInfo(obj.fax);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.email) {\r\n\t\t\t\t\tthis.email = new ContactInfo(obj.email);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.sendEmail = obj.sendEmail;\r\n }\r\n }\r\n }\r\n}","namespace Portico.Models.Enterprise {\r\n\timport pmg = Portico.Models.Gateway;\r\n\timport psge = apigateway.enums;\r\n\timport psgm = apigateway.models;\r\n\r\n\tfunction isEither(obj): obj is Partial {\r\n\t\treturn true;\r\n\t}\r\n\r\n\r\n\texport interface IPayor {\r\n\t\tid: number;\r\n\t\tname: string;\r\n\t\tbin: string;\r\n\t\tgroup: string;\r\n\t\tisPlaceholder: boolean;\r\n\t\tpcn: string;\r\n\t\ttype: psge.PayorType; // pmg.PayorType\r\n\r\n\t\taddresses: Address[];\r\n\t\temailAddresses: EmailAddress[];\r\n\t\tphoneNumbers: PhoneNumber[];\r\n\t\twebAddresses: WebAddress[];\r\n\t\tcoverageAreas: PayorCoverageArea[];\r\n\r\n\t\taddAddress(index?: number): Address;\r\n\t\taddEmailAddress(index?: number): EmailAddress;\r\n\t\taddPhoneNumber(index?: number): PhoneNumber;\r\n\t\taddWebAddress(index?: number): WebAddress;\r\n\t\tisValidSearch(): boolean;\r\n\t}\r\n\r\n\t// function enumValue(type: T) : PropertyDecorator{\r\n\t// \treturn (target: Object, propertyKey: string) => {\r\n\t// \t\tconst key = `_${propertyKey}`;\r\n\t// \t\tObject.defineProperty(target, propertyKey, {\r\n\t// \t\t\tenumerable: true,\r\n\t// \t\t\tconfigurable: false,\r\n\t// \t\t\tget() {\r\n\t// \t\t\t\treturn this[key];\r\n\t// \t\t\t},\r\n\t// \t\t\tset(value: any) {\r\n\t// \t\t\t\tif (typeof value === 'number') {\r\n\t// \t\t\t\t\tthis[key] = value;\r\n\t// \t\t\t\t\treturn\r\n\t// \t\t\t\t}\r\n\t// \t\t\t\tthis[key] = type[value];\r\n\t// \t\t\t}\r\n\t// \t\t});\r\n\t// \t};\r\n\t// }\r\n\r\n\texport class Payor implements IPayor {\r\n\t\tid: number;\r\n\t\tname: string;\r\n\t\tbin: string;\r\n\t\tgroup: string;\r\n\t\tisPlaceholder: boolean;\r\n\t\tpcn: string;\r\n\t\t// @enumValue(pmg.RoleType)\r\n\t\t// type: keyof typeof pmg.RoleType | pmg.RoleType;\r\n\t\ttype: psge.PayorType; // pmg.PayorType\r\n\t\taddresses: Address[];\r\n\t\temailAddresses: EmailAddress[];\r\n\t\tphoneNumbers: PhoneNumber[];\r\n\t\twebAddresses: WebAddress[];\r\n\t\tcoverageAreas: PayorCoverageArea[];\r\n\r\n\t\tconstructor(obj?: Partial | psgm.PayorModel) {\r\n\t\t\tthis.id = null;\r\n\t\t\tthis.name = '';\r\n\t\t\tthis.bin = '';\r\n\t\t\tthis.group = '';\r\n\t\t\tthis.isPlaceholder = false;\r\n\t\t\tthis.pcn = '';\r\n\t\t\tthis.type = null;\r\n\t\t\tthis.addresses = [];\r\n\t\t\tthis.emailAddresses = [];\r\n\t\t\tthis.phoneNumbers = [];\r\n\t\t\tthis.webAddresses = [];\r\n\t\t\tthis.coverageAreas = [];\r\n\r\n\t\t\tif (isEither(obj)) {\r\n\t\t\t\tthis.id = obj.id || obj.payorId || null;\r\n\t\t\t\tthis.name = obj.name || obj.payorName || '';\r\n\t\t\t\tthis.bin = obj.bin || obj.payorBin || '';\r\n\t\t\t\tthis.group = obj.group || obj.payorGroup || '';\r\n\t\t\t\tthis.isPlaceholder = obj.isPlaceholder || false;\r\n\t\t\t\tthis.pcn = obj.pcn || obj.payorPcn || '';\r\n\t\t\t\tthis.type = obj.type || obj.payorType || psge.PayorType.INS; // pmg.PayorType.PAYER;\r\n\r\n\t\t\t\tif (obj.addresses) {\r\n\t\t\t\t\tfor (const address of obj.addresses) {\r\n\t\t\t\t\t\tthis.addresses.push(new Address(address));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.emailAddresses) {\r\n\t\t\t\t\tfor (const emailAddress of obj.emailAddresses) {\r\n\t\t\t\t\t\tthis.emailAddresses.push(new EmailAddress(emailAddress));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.phoneNumbers) {\r\n\t\t\t\t\tfor (const phoneNumber of obj.phoneNumbers) {\r\n\t\t\t\t\t\tthis.phoneNumbers.push(new PhoneNumber(phoneNumber));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.webAddresses) {\r\n\t\t\t\t\tfor (const webAddress of obj.webAddresses) {\r\n\t\t\t\t\t\tthis.webAddresses.push(new WebAddress(webAddress));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.coverageAreas) {\r\n\t\t\t\t\tfor (const coverageArea of obj.coverageAreas) {\r\n\t\t\t\t\t\tthis.coverageAreas.push(new PayorCoverageArea(coverageArea));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\taddAddress(index: number = null): Address {\r\n\t\t\tconst length = this.addresses.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.addresses[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst address = new Address();\r\n\t\t\tthis.addresses.push(address);\r\n\t\t\treturn address;\r\n\t\t}\r\n\r\n\t\taddEmailAddress(index: number = null): EmailAddress {\r\n\t\t\tconst length = this.emailAddresses.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.emailAddresses[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst emailAddress = new EmailAddress();\r\n\t\t\tthis.emailAddresses.push(emailAddress);\r\n\t\t\treturn emailAddress;\r\n\t\t}\r\n\r\n\t\taddPhoneNumber(index: number = null): PhoneNumber {\r\n\t\t\tconst length = this.phoneNumbers.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.phoneNumbers[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst phoneNumber = new PhoneNumber();\r\n\t\t\tthis.phoneNumbers.push(phoneNumber);\r\n\t\t\treturn phoneNumber;\r\n\t\t}\r\n\r\n\t\taddWebAddress(index: number = null): WebAddress {\r\n\t\t\tconst length = this.webAddresses.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.webAddresses[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst webAddress = new WebAddress();\r\n\t\t\tthis.webAddresses.push(webAddress);\r\n\t\t\treturn webAddress;\r\n\t\t}\r\n\r\n\t\tisValidSearch(): boolean {\r\n\t\t\tlet counter = 0;\r\n\r\n\t\t\tif (this.name) {\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\r\n\t\t\tif (this.addresses) {\r\n\t\t\t\tif (this.addresses[0].city) {\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this.addresses[0].state) {\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this.addresses[0].zip) {\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn counter >= 1;\r\n\t\t}\r\n\t}\r\n\r\n export interface IPayorBenefit {\r\n\t\t//accountId: number;\r\n\t\t//payorId: number;\r\n\t\t//name: string;\r\n\t\t//isPrimary: boolean;\r\n\t\t//coverageOrder: number;\r\n\t\t//createDate: Date;\r\n\t\tpolicyHolderFirstName: string;\r\n\t\tpolicyHolderLastName: string;\r\n\t\tdateOfBirth: Date;\r\n\t\trelationshipToPatient: string;\r\n\t\tphone: string;\r\n\t\tpersonCode: string;\r\n\t\tpolicyNumber: string;\r\n\t\tpolicyName: string;\r\n\t\tgroupNumber: string;\r\n\t\tbin: string;\r\n\t\tpcn: string;\r\n\t\tplanType: number;\r\n\t\tplanEffectiveDate: Date;\r\n\t\tplanExpirationDate: Date;\r\n\t\tplanTerminationDate: Date;\r\n\t}\r\n\r\n\texport class PayorBenefit implements IPayorBenefit {\r\n\t\t// accountId: number;\r\n\t\t// payorId: number;\r\n\t\t// name: string;\r\n\t\t// isPrimary: boolean;\r\n\t\t// coverageOrder: number;\r\n\t\t// createDate: Date;\r\n\t\tpolicyHolderFirstName: string;\r\n\t\tpolicyHolderLastName: string;\r\n\t\tdateOfBirth: Date;\r\n\t\trelationshipToPatient: string;\r\n\t\tphone: string;\r\n\t\tpersonCode: string;\r\n\t\tpolicyNumber: string;\r\n\t\tpolicyName: string;\r\n\t\tgroupNumber: string;\r\n\t\tbin: string;\r\n\t\tpcn: string;\r\n\t\tplanType: number; // string;\r\n\t\tplanEffectiveDate: Date;\r\n\t\tplanExpirationDate: Date;\r\n\t\tplanTerminationDate: Date;\r\n\r\n\t\tconstructor(obj?: IPayorBenefit | any) {\r\n\t\t\t// this.accountId = null;\r\n\t\t\t// this.payorId = null;\r\n\t\t\t// this.name = '';\r\n\t\t\t// this.isPrimary = false;\r\n\t\t\t// this.coverageOrder = 0;\r\n\t\t\t// this.createDate = null;\r\n\t\t\tthis.policyHolderFirstName = '';\r\n\t\t\tthis.policyHolderLastName = '';\r\n\t\t\tthis.dateOfBirth = null;\r\n\t\t\tthis.relationshipToPatient = '';\r\n\t\t\tthis.phone = '';\r\n\t\t\tthis.personCode = '';\r\n\t\t\tthis.policyNumber = '';\r\n\t\t\tthis.policyName = '';\r\n\t\t\tthis.groupNumber = '';\r\n\t\t\tthis.bin = '';\r\n\t\t\tthis.pcn = '';\r\n\t\t\tthis.planType = null;\r\n\t\t\tthis.planEffectiveDate = null;\r\n\t\t\tthis.planExpirationDate = null;\r\n\t\t\tthis.planTerminationDate = null;\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\t// this.accountId = obj.accountId || null;\r\n\t\t\t\t// this.payorId = obj.payorId || null;\r\n\t\t\t\t// this.name = obj.name || '';\r\n\t\t\t\t// this.isPrimary = obj.isPrimary || false;\r\n\t\t\t\t// this.coverageOrder = obj.coverageOrder || 0;\r\n\r\n\t\t\t\t//if (obj.createDate) {\r\n\t\t\t\t//\tthis.createDate = new Date(obj.createDate.toString());\r\n\t\t\t\t//}\r\n\r\n\t\t\t\tthis.policyHolderFirstName = obj.policyHolderFirstName || '';\r\n\t\t\t\tthis.policyHolderLastName = obj.policyHolderLastName || '';\r\n\r\n\t\t\t\tif (obj.dateOfBirth) {\r\n\t\t\t\t\tthis.dateOfBirth = new Date(obj.dateOfBirth.toString());\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.relationshipToPatient = (obj.relationshipToPatient || '').toString();\r\n\t\t\t\tthis.phone = obj.phone || '';\r\n\t\t\t\tthis.personCode = obj.personCode || '';\r\n\t\t\t\tthis.policyNumber = obj.policyNumber || '';\r\n\t\t\t\tthis.policyName = obj.policyName || obj.name || '';\r\n\t\t\t\tthis.groupNumber = obj.groupNumber || '';\r\n\t\t\t\tthis.bin = obj.bin || '';\r\n\t\t\t\tthis.pcn = obj.pcn || '';\r\n\t\t\t\tthis.planType = obj.planType || null;\r\n\r\n\t\t\t\tif (obj.planEffectiveDate) {\r\n\t\t\t\t\tthis.planEffectiveDate = new Date(obj.planEffectiveDate.toString());\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.planExpirationDate) {\r\n\t\t\t\t\tthis.planExpirationDate = new Date(obj.planExpirationDate.toString());\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.planTerminationDate) {\r\n\t\t\t\t\tthis.planTerminationDate = new Date(obj.planTerminationDate.toString());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n import pmg = Portico.Models.Gateway;\r\n import psgm = apigateway.models;\r\n\r\n export interface IPayorCoverageArea {\r\n state: string;\r\n externalIdType: pmg.ExternalIdType;\r\n externalId: string;\r\n }\r\n\r\n export class PayorCoverageArea implements IPayorCoverageArea {\r\n state: string;\r\n externalIdType: pmg.ExternalIdType;\r\n externalId: string;\r\n\r\n\t\tconstructor(obj?: IPayorCoverageArea | psgm.PayorCoverageAreaModel) {\r\n this.state = '';\r\n this.externalIdType = null;\r\n this.externalId = '';\r\n\r\n if (obj) {\r\n this.state = obj.state || '';\r\n\t\t\t\tthis.externalIdType = obj.externalIdType || null;\r\n\t\t\t\tthis.externalId = obj.externalId || '';\r\n }\r\n }\r\n }\r\n\r\n}","namespace Portico.Models.Enterprise {\r\n\r\n export interface IPharmacy {\r\n\t\tid: string;\r\n type: string;\r\n name: string;\r\n nabp: string;\r\n npi: string;\r\n\t\tspecialization: string;\r\n\r\n addresses: Address[];\r\n\t\tcontacts: Contact[];\r\n emailAddresses: EmailAddress[];\r\n phoneNumbers: PhoneNumber[];\r\n webAddresses: WebAddress[]; \r\n\r\n\t\taddAddress(index?: number): Address;\r\n\t\taddContact(index?: number): Contact;\r\n\t\taddEmailAddress(index?: number): EmailAddress;\r\n\t\taddPhoneNumber(index?: number): PhoneNumber;\r\n\t\taddWebAddress(index?: number): WebAddress;\r\n }\r\n\r\n export class Pharmacy implements IPharmacy {\r\n\t\tid: string;\r\n type: string;\r\n name: string;\r\n nabp: string;\r\n npi: string;\r\n\t\tspecialization: string;\r\n\r\n addresses: Address[];\r\n\t\tcontacts: Contact[];\r\n emailAddresses: EmailAddress[];\r\n phoneNumbers: PhoneNumber[];\r\n webAddresses: WebAddress[];\r\n\r\n constructor(obj?: IPharmacy | any) {\r\n this.id = null;\r\n this.type = null;\r\n this.name = '';\r\n this.nabp = '';\r\n this.npi = '';\r\n\t\t\tthis.specialization = '';\r\n\r\n this.addresses = [];\r\n this.contacts = [];\r\n this.emailAddresses = [];\r\n this.phoneNumbers = [];\r\n this.webAddresses = [];\r\n\r\n if (obj) {\r\n this.id = obj.id || obj.pharmacyId || null;\r\n\t\t\t\tthis.type = obj.type || obj.pharmacyType || null;\r\n this.name = obj.name || obj.pharmacyName || '';\r\n\t\t\t\tthis.nabp = obj.nabp || '';\r\n\t\t\t\tthis.npi = obj.npi || '';\r\n\t\t\t\tthis.specialization = obj.specialization || obj.pharmacySpecialization || '';\r\n\r\n if (obj.addresses) {\r\n for (const address of obj.addresses) {\r\n this.addresses.push(new Address(address));\r\n }\r\n }\r\n\r\n\t\t\t\tif (obj.contacts) {\r\n for (const contact of obj.contacts) {\r\n this.contacts.push(new Contact(contact));\r\n }\r\n\t\t\t\t}\r\n\r\n if (obj.emailAddresses) {\r\n for (const emailAddress of obj.emailAddresses) {\r\n this.emailAddresses.push(new EmailAddress(emailAddress));\r\n }\r\n }\r\n\r\n if (obj.phoneNumbers) {\r\n for (const phoneNumber of obj.phoneNumbers) {\r\n this.phoneNumbers.push(new PhoneNumber(phoneNumber));\r\n }\r\n }\r\n\r\n\t\t\t\tif (obj.webAddresses) {\r\n\t\t\t\t\tfor (const webAddress of obj.webAddresses) {\r\n\t\t\t\t\t\tthis.webAddresses.push(new WebAddress(webAddress));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n }\r\n }\r\n\r\n\t\taddAddress(index: number = null): Address {\r\n\t\t\tconst length = this.addresses.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.addresses[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst address = new Address();\r\n\t\t\tthis.addresses.push(address);\r\n\t\t\treturn address;\r\n\t\t}\r\n\r\n\t\taddContact(index: number = null): Contact {\r\n\t\t\tconst length = this.contacts.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.contacts[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst contact = new Contact();\r\n\t\t\tthis.contacts.push(contact);\r\n\t\t\treturn contact;\r\n\t\t}\r\n\r\n\t\taddEmailAddress(index: number = null): EmailAddress {\r\n\t\t\tconst length = this.emailAddresses.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.emailAddresses[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst emailAddress = new EmailAddress();\r\n\t\t\tthis.emailAddresses.push(emailAddress);\r\n\t\t\treturn emailAddress;\r\n\t\t}\r\n\r\n\t\taddPhoneNumber(index: number = null): PhoneNumber {\r\n\t\t\tconst length = this.phoneNumbers.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.phoneNumbers[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst phoneNumber = new PhoneNumber();\r\n\t\t\tthis.phoneNumbers.push(phoneNumber);\r\n\t\t\treturn phoneNumber;\r\n\t\t}\r\n\r\n\t\taddWebAddress(index: number = null): WebAddress {\r\n\t\t\tconst length = this.webAddresses.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.webAddresses[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst webAddress = new WebAddress();\r\n\t\t\tthis.webAddresses.push(webAddress);\r\n\t\t\treturn webAddress;\r\n\t\t}\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n import psge = apigateway.enums;\r\n import psgm = apigateway.models;\r\n\r\n export interface IPhoneNumber {\r\n id: number;\r\n type: number | string;\r\n number: string;\r\n extension: string;\r\n language: string;\r\n timeZone: string;\r\n bestDaysToCall: string;\r\n bestTimeToCall: string;\r\n\t\tcontactDatePreferenceType: number | string;\r\n\t\tcontactTimePreferenceType: number | string;\r\n\t\tpurpose: number | string;\r\n\t\tisVoicemailOptedIn: boolean;\r\n\t\tisPrimary: boolean;\r\n\r\n\t\tmapToEnterpriseCoordinatorPhoneUpsearchModel(): psgm.EnterpriseCoordinatorSharedPhoneUpsearchModel;\r\n\t}\r\n\r\n export class PhoneNumber implements IPhoneNumber {\r\n id: number;\r\n type: number | string;\r\n number: string;\r\n extension: string;\r\n language: string;\r\n timeZone: string;\r\n bestDaysToCall: string;\r\n bestTimeToCall: string;\r\n\t\tcontactDatePreferenceType: number | string;\r\n\t\tcontactTimePreferenceType: number | string;\r\n\t\tpurpose: number | string;\r\n\t\tisVoicemailOptedIn: boolean;\r\n\t\tisPrimary: boolean;\r\n\r\n constructor(obj?: IPhoneNumber | any) {\r\n this.id = null;\r\n this.type = null;\r\n this.number = '';\r\n\t\t\tthis.extension = '';\r\n\t\t\tthis.language = '';\r\n\t\t\tthis.timeZone = '';\r\n\t\t\tthis.bestDaysToCall = '';\r\n\t\t\tthis.bestTimeToCall = '';\r\n this.contactDatePreferenceType = null;\r\n this.contactTimePreferenceType = null;\r\n this.purpose = null;\r\n\t\t\tthis.isVoicemailOptedIn = false;\r\n\t\t\tthis.isPrimary = false;\r\n\r\n if (obj) {\r\n\t\t\t\tthis.id = obj.id || obj.phoneId || null;\r\n\t\t\t\tthis.type = obj.type || obj.phoneType || null;\r\n\t\t\t\tthis.number = obj.number || obj.phoneNumber || '';\r\n\t\t\t\tthis.extension = obj.extension || '';\r\n\t\t\t\tthis.language = obj.language || '';\r\n\t\t\t\tthis.timeZone = obj.timeZone || '';\r\n\t\t\t\tthis.bestDaysToCall = obj.bestDaysToCall || '';\r\n\t\t\t\tthis.bestTimeToCall = obj.bestTimeToCall || '';\r\n\t\t\t\tthis.contactDatePreferenceType = obj.contactDatePreferenceType || null;\r\n\t\t\t\tthis.contactTimePreferenceType = obj.contactTimePreferenceType || null;\r\n\t\t\t\tthis.purpose = obj.purpose || obj.phonePurpose || null;\r\n\t\t\t\tthis.isVoicemailOptedIn = obj.isVoicemailOptedIn || false;\r\n\t\t\t\tthis.isPrimary = obj.isPrimary || false;\r\n }\r\n }\r\n\r\n mapToEnterpriseCoordinatorPhoneUpsearchModel() : psgm.EnterpriseCoordinatorSharedPhoneUpsearchModel {\r\n return {\r\n phoneId: this.id,\r\n phoneType: typeof this.type === 'number' ? this.type : Portico.Models.Gateway.ContactInfoType[this.type],\r\n phonePurpose: typeof this.purpose === 'number'? this.purpose : Portico.Models.Gateway.ContactInfoPurposeType[this.purpose],\r\n phoneNumber: this.number,\r\n extension: this.extension,\r\n contactDatePreferenceType: typeof this.contactDatePreferenceType === 'number' ? this.contactDatePreferenceType : psge.ContactDatePreferenceType[this.contactDatePreferenceType],\r\n bestDaysToCall: this.bestDaysToCall,\r\n contactTimePreferenceType: typeof this.contactTimePreferenceType === 'number'? this.contactTimePreferenceType : psge.ContactTimePreferenceType[this.contactTimePreferenceType],\r\n bestTimeToCall: this.bestTimeToCall,\r\n language: this.language,\r\n timeZone: this.timeZone\r\n } as psgm.EnterpriseCoordinatorSharedPhoneUpsearchModel\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n import psgm = apigateway.models;\r\n\r\n export interface IPointOfContact {\r\n id: number;\r\n firstName: string;\r\n lastName: string;\r\n phoneNumber: string;\r\n phoneNumberExtension: string;\r\n faxNumber: string;\r\n //site point of contacts properties\r\n jobTitle: string;\r\n emailAddress: string;\r\n preferredContactMethod: string;\r\n }\r\n\r\n export class PointOfContact implements IPointOfContact {\r\n id: number;\r\n firstName: string;\r\n lastName: string;\r\n phoneNumber: string;\r\n phoneNumberExtension: string;\r\n faxNumber: string;\r\n //site point of contacts properties\r\n jobTitle: string;\r\n emailAddress: string;\r\n preferredContactMethod: string;\r\n\r\n\t\tconstructor(obj?: IPointOfContact | psgm.PharmacyPointOfContactModel | any) {\r\n this.id = null;\r\n this.firstName = '';\r\n this.lastName = '';\r\n this.phoneNumber = '';\r\n this.phoneNumberExtension = '';\r\n this.faxNumber = '';\r\n this.jobTitle = '';\r\n this.emailAddress = '';\r\n\t\t\tthis.preferredContactMethod = 'UNKNOWN';\r\n\r\n if (obj) {\r\n this.id = obj.id || null;\r\n\t\t\t\tthis.firstName = obj.firstName || '';\r\n\t\t\t\tthis.lastName = obj.lastName || '';\r\n\t\t\t\tthis.phoneNumber = obj.phoneNumber || '';\r\n\t\t\t\tthis.phoneNumberExtension = obj.phoneNumberExtension || '';\r\n\t\t\t\tthis.faxNumber = obj.faxNumber || '';\r\n\t\t\t\tthis.jobTitle = obj.jobTitle || '';\r\n\t\t\t\tthis.emailAddress = obj.emailAddress || '';\r\n\t\t\t\tthis.preferredContactMethod = obj.preferredContactMethod || 'UNKNOWN';\r\n }\r\n }\r\n }\r\n}","namespace Portico.Models.Enterprise {\r\n\timport psgm = apigateway.models;\r\n\r\n export interface IPrescriber {\r\n\t\tid: number | string;\r\n firstName: string;\r\n lastName: string;\r\n suffix: string;\r\n nickName: string;\r\n npi: string;\r\n\t\ttaxId: string;\r\n\r\n addresses: Address[];\r\n emailAddresses: EmailAddress[];\r\n externalIds: ExternalId[];\r\n phoneNumbers: PhoneNumber[];\r\n prescriberLicenses: PrescriberLicense[];\r\n // sites: Site[];\r\n\r\n\t\taddAddress(index?: number): Address;\r\n\t\taddEmailAddress(index?: number): EmailAddress;\r\n\t\taddExternalId(index?: number): ExternalId;\r\n\t\taddPhoneNumber(index?: number): PhoneNumber;\r\n\t\taddPrescriberLicense(index?: number): PrescriberLicense;\r\n\t\tisValidSearch(): boolean;\r\n\t\tmapToPrescriberUpsearchModel(): psgm.PrescriberUpsearchModel;\r\n\t}\r\n\r\n export class Prescriber implements IPrescriber {\r\n\t\tid: number | string;\r\n firstName: string;\r\n lastName: string;\r\n middleName: string;\r\n suffix: string;\r\n nickName: string;\r\n npi: string;\r\n\t\ttaxId: string;\r\n\r\n addresses: Address[];\r\n emailAddresses: EmailAddress[];\r\n externalIds: ExternalId[];\r\n phoneNumbers: PhoneNumber[];\r\n prescriberLicenses: PrescriberLicense[];\r\n // sites: Site[];\r\n\r\n constructor(obj?: IPrescriber | any) {\r\n this.id = null;\r\n this.firstName = '';\r\n this.lastName = '';\r\n this.middleName = '';\r\n this.suffix = '';\r\n this.nickName = '';\r\n this.npi = '';\r\n\t\t\tthis.taxId = '';\r\n\r\n this.externalIds = [];\r\n this.addresses = [];\r\n this.emailAddresses = [];\r\n\t\t\tthis.phoneNumbers = [];\r\n\t\t\tthis.prescriberLicenses = [];\r\n // this.sites = [];\r\n\r\n if (obj) {\r\n this.id = obj.id || obj.prescriberId || null;\r\n this.firstName = obj.firstName || '';\r\n this.lastName = obj.lastName || '';\r\n this.middleName = obj.middleName || '';\r\n this.suffix = obj.suffix || '';\r\n this.nickName = obj.nickName || '';\r\n this.npi = obj.npi || '';\r\n this.taxId = obj.taxId || '';\r\n\r\n if (obj.externalIds) {\r\n\t\t\t\t\tfor (const externalId of obj.externalIds) {\r\n this.externalIds.push(new ExternalId(externalId));\r\n }\r\n }\r\n\r\n\t\t\t\tif (obj.addresses) {\r\n\t\t\t\t\tfor (const address of obj.addresses) {\r\n this.addresses.push(new Address(address));\r\n }\r\n }\r\n\r\n\t\t\t\tif (obj.emailAddresses) {\r\n\t\t\t\t\tfor (const emailAddress of obj.emailAddresses) {\r\n this.emailAddresses.push(new EmailAddress(emailAddress));\r\n }\r\n }\r\n\r\n\t\t\t\tif (obj.phoneNumbers) {\r\n\t\t\t\t\tfor (const phoneNumber of obj.phoneNumbers) {\r\n\t\t\t\t\t\tthis.phoneNumbers.push(new PhoneNumber(phoneNumber));\r\n\t\t\t\t\t}\r\n }\r\n\r\n if (obj.prescriberLicenses) {\r\n for (const prescriberLicense of obj.prescriberLicenses) {\r\n this.prescriberLicenses.push(new PrescriberLicense(prescriberLicense));\r\n }\r\n }\r\n\r\n\t\t\t\t//if (obj.sites) {\r\n\t\t\t\t//\tfor (const site of obj.sites) {\r\n\t\t\t\t//\t\tthis.sites.push(new Site(site));\r\n\t\t\t\t//\t}\r\n\t\t\t\t//}\r\n }\r\n\t\t}\r\n\r\n\t\taddAddress(index: number = null): Address {\r\n\t\t\tconst length = this.addresses.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.addresses[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst address = new Address();\r\n\t\t\tthis.addresses.push(address);\r\n\t\t\treturn address;\r\n\t\t}\r\n\r\n\t\taddEmailAddress(index: number = null): EmailAddress {\r\n\t\t\tconst length = this.emailAddresses.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.emailAddresses[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst emailAddress = new EmailAddress();\r\n\t\t\tthis.emailAddresses.push(emailAddress);\r\n\t\t\treturn emailAddress;\r\n\t\t}\r\n\r\n\t\taddExternalId(index: number = null): ExternalId {\r\n\t\t\tconst length = this.externalIds.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.externalIds[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst externalId = new ExternalId();\r\n\t\t\tthis.externalIds.push(externalId);\r\n\t\t\treturn externalId;\r\n\t\t}\r\n\r\n\t\taddPhoneNumber(index: number = null): PhoneNumber {\r\n\t\t\tconst length = this.phoneNumbers.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.phoneNumbers[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst phoneNumber = new PhoneNumber();\r\n\t\t\tthis.phoneNumbers.push(phoneNumber);\r\n\t\t\treturn phoneNumber;\r\n\t\t}\r\n\r\n\t\taddPrescriberLicense(index: number = null): PrescriberLicense {\r\n\t\t\tconst length = this.prescriberLicenses.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.prescriberLicenses[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst prescriberLicense = new PrescriberLicense();\r\n\t\t\tthis.prescriberLicenses.push(prescriberLicense);\r\n\t\t\treturn prescriberLicense;\r\n\t\t}\r\n\r\n\t\tisValidSearch(): boolean {\r\n\t\t\tlet counter = 0;\r\n\r\n\t\t\tif (this.firstName) {\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\r\n\t\t\tif (this.lastName) {\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\r\n\t\t\tif (this.addresses) {\r\n\t\t\t\tif (this.addresses[0].city) {\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this.addresses[0].state) {\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this.addresses[0].zip) {\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn counter >= 1;\r\n\t\t}\r\n\r\n\t\tmapToPrescriberUpsearchModel(): psgm.PrescriberUpsearchModel {\r\n\t\t\treturn {\r\n\t\t\t\tprescriberId: this.id,\r\n\t\t\t\tfirstName: this.firstName,\r\n\t\t\t\tmiddleName: this.middleName,\r\n\t\t\t\tlastName: this.lastName,\r\n\t\t\t\tsuffix: this.suffix,\r\n\t\t\t\tnickname: this.nickName,\r\n\t\t\t\tnpi: this.npi,\r\n\t\t\t\ttaxId: this.taxId,\r\n\t\t\t\taccountRelationshipIsPrimary: false,\r\n\t\t\t\tprescriberLicenses: _.map(this.prescriberLicenses, pl => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tprescriberLicenseId: pl.prescriberLicenseId,\r\n\t\t\t\t\t\tlicenseType: typeof pl.licenseType === 'number' ? pl.licenseType : Portico.Models.Gateway.PrescriberLicenseType[pl.licenseType],\r\n\t\t\t\t\t\tlicenseNumber: pl.licenseNumber\r\n\t\t\t\t\t} as psgm.PrescriberLicenseUpsearchModel\r\n\t\t\t\t}),\r\n\t\t\t\texternalIds: this.externalIds &&\r\n\t\t\t\t\tthis.externalIds.length > 0\r\n\t\t\t\t\t? _.map(this.externalIds, extId => {\r\n\t\t\t\t\t\treturn ExternalId.prototype.mapToEnterpriseCoordinatorExternalId.call(extId);\r\n\t\t\t\t\t}) : [],\r\n\t\t\t\taddresses: this.addresses &&\r\n\t\t\t\t\tthis.addresses.length > 0\r\n\t\t\t\t\t? _.map(this.addresses, addr => {\r\n\t\t\t\t\t\treturn Address.prototype.mapToEnterpriseCoordinatorAddress.call(addr);\r\n\t\t\t\t\t}) : [],\r\n\t\t\t\tphoneNumbers: this.phoneNumbers &&\r\n\t\t\t\t\tthis.phoneNumbers.length > 0\r\n\t\t\t\t\t? _.map(this.phoneNumbers, ph => {\r\n\t\t\t\t\t\treturn PhoneNumber.prototype.mapToEnterpriseCoordinatorPhoneUpsearchModel.call(ph);\r\n\t\t\t\t\t}) : [],\r\n\t\t\t\temailAddresses: this.emailAddresses &&\r\n\t\t\t\t\tthis.emailAddresses.length > 0\r\n\t\t\t\t\t? _.map(this.emailAddresses, email => {\r\n\t\t\t\t\t\treturn EmailAddress.prototype.mapToEnterpriseCoordinatorEmailAddress.call(email);\r\n\t\t\t\t\t}) : []\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n import pmg = Portico.Models.Gateway;\r\n\r\n export interface IPrescriberLicense {\r\n prescriberLicenseId: number;\r\n licenseType: string | number;\r\n licenseNumber: string;\r\n }\r\n\r\n export class PrescriberLicense implements IPrescriberLicense {\r\n prescriberLicenseId: number;\r\n licenseType: string | number;\r\n licenseNumber: string;\r\n\r\n constructor(obj?: IPrescriberLicense | any) {\r\n this.prescriberLicenseId = null;\r\n this.licenseType = null;\r\n this.licenseNumber = '';\r\n\r\n if (obj) {\r\n this.prescriberLicenseId = obj.prescriberLicenseId || null;\r\n this.licenseType = obj.licenseType || null;\r\n this.licenseNumber = obj.licenseNumber || '';\r\n }\r\n }\r\n }\r\n}","namespace Portico.Models.Enterprise {\r\n import psgm = apigateway.models;\r\n\r\n export interface IPrescription {\r\n id: number;\r\n daySupply: number;\r\n directions: string;\r\n documentId: number;\r\n ndcId: number;\r\n prescriberId: number;\r\n quantity: number;\r\n refills: number;\r\n signed: boolean;\r\n\t\twrittenOn: Date;\r\n\t\t// signatures: Signature[];\r\n }\r\n\r\n export class Prescription implements IPrescription {\r\n id: number;\r\n daySupply: number;\r\n directions: string;\r\n documentId: number;\r\n ndcId: number;\r\n prescriberId: number;\r\n quantity: number;\r\n refills: number;\r\n signed: boolean;\r\n writtenOn: Date;\r\n\t\t// signatures: Signature[];\r\n\r\n\t\tconstructor(obj?: IPrescription | any) {\r\n this.id = null;\r\n this.daySupply = null;\r\n this.directions = '';\r\n this.documentId = null;\r\n this.ndcId = null;\r\n this.prescriberId = null;\r\n this.quantity = null;\r\n this.refills = null;\r\n this.signed = false;\r\n this.writtenOn = null;\r\n\t\t\t// this.signatures = [];\r\n\r\n if (obj) {\r\n this.id = obj.id || null;\r\n\t\t\t\tthis.daySupply = obj.daySupply || null;\r\n\t\t\t\tthis.directions = obj.directions || '';\r\n\t\t\t\tthis.documentId = obj.documentId || null;\r\n\t\t\t\tthis.ndcId = obj.ndcId || null;\r\n\t\t\t\tthis.prescriberId = obj.prescriberId || null;\r\n\t\t\t\tthis.quantity = obj.quantity || null;\r\n\t\t\t\tthis.refills = obj.refills || null;\r\n\t\t\t\tthis.signed = obj.signed || false;\r\n\r\n\t\t\t\tif (obj.writtenOn) {\r\n\t\t\t\t\tthis.writtenOn = new Date((obj.writtenOn).toString());\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//if (obj.signatures) {\r\n\t\t\t\t//\tfor (const signature of obj.signatures) {\r\n\t\t\t\t//\t\tthis.signatures.push(new Signature(signature));\r\n\t\t\t\t//\t}\r\n\t\t\t\t//}\r\n }\r\n }\r\n\r\n mapToEnterpriseCoordinatorPrescriptionUpsearchModel() : psgm.EnterpriseCoordinatorPrescriptionServiceModelsPrescriptionModel {\r\n\t\t\treturn {\r\n\t\t\t\tdocumentId: this.documentId,\r\n prescriberId: this.prescriberId,\r\n ndcId: this.ndcId,\r\n writtenOn: moment(this.writtenOn),\r\n daySupply: this.daySupply,\r\n refills: this.refills,\r\n quantity: this.quantity,\r\n directions: this.directions\r\n } as psgm.EnterpriseCoordinatorPrescriptionServiceModelsPrescriptionModel\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\r\n export interface IProgram {\r\n id: number;\r\n code: string;\r\n name: string;\r\n tenantId: number;\r\n }\r\n\r\n export class Program implements IProgram {\r\n id: number;\r\n code: string;\r\n name: string;\r\n tenantId: number;\r\n\r\n constructor(obj?: IProgram) {\r\n this.id = null;\r\n this.code = '';\r\n this.name = '';\r\n this.tenantId = null;\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tthis.id = obj.id || null;\r\n this.code = obj.code || '';\r\n this.name = obj.name || '';\r\n this.tenantId = obj.tenantId || null;\r\n }\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\timport IResponseModel = Portico.Models.Interfaces.IResponseModel;\r\n\timport IEnterpriseResponseModel = Portico.Models.Interfaces.IEnterpriseResponseModel;\r\n import ILegacyResponseModel = Portico.Models.Interfaces.ILegacyResponseModel;\r\n import ILegacyExternalResponseModel = Portico.Models.Interfaces.ILegacyExternalResponseModel;\r\n\r\n function isLegacyExternalResponse(json: any): json is ILegacyExternalResponseModel {\r\n return json && json.data && !!json.data.results;\r\n }\r\n\r\n export class ResponseModel {\r\n\t\tprivate response: IResponseModel;\r\n\t\tprivate enterpriseResponse: IEnterpriseResponseModel;\r\n private legacyResponse: ILegacyResponseModel;\r\n private legacyExternalResponse: ILegacyExternalResponseModel;\r\n private type: ResponseModelType;\r\n\r\n constructor(json: any) {\r\n if (isLegacyExternalResponse(json)) {\r\n this.legacyExternalResponse = json;\r\n this.type = ResponseModelType.ExternalLegacy;\r\n return;\r\n }\r\n\r\n\t\t\tthis.response = json as IResponseModel;\r\n\r\n\t\t\tif (this.response.success !== undefined) {\r\n\t\t\t\tthis.type = ResponseModelType.Standard;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis.enterpriseResponse = json as IEnterpriseResponseModel;\r\n\r\n\t\t\tif (this.enterpriseResponse.Success !== undefined) {\r\n\t\t\t\tthis.type = ResponseModelType.Enterprise;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis.legacyResponse = json as ILegacyResponseModel;\r\n\r\n if (this.legacyResponse.success !== undefined) {\r\n this.type = ResponseModelType.Legacy;\r\n return;\r\n }\r\n\r\n throw new Error('Unexpected data for ResponseModel.');\r\n }\r\n\r\n get success(): boolean {\r\n switch (this.type) {\r\n\t\t\t\tcase ResponseModelType.Standard:\r\n\t\t\t\t\treturn this.response.success;\r\n\t\t\t\tcase ResponseModelType.Enterprise:\r\n\t\t\t\t\treturn this.enterpriseResponse.Success;\r\n case ResponseModelType.Legacy:\r\n return this.legacyResponse.success;\r\n case ResponseModelType.ExternalLegacy:\r\n return this.legacyExternalResponse.success;\r\n default:\r\n return false;\r\n }\r\n }\r\n\r\n get messages(): string[] {\r\n switch (this.type) {\r\n case ResponseModelType.Standard:\r\n return this.response.messages;\r\n\t\t\t\tcase ResponseModelType.Enterprise:\r\n\t\t\t\t\treturn this.enterpriseResponse.Messages;\r\n case ResponseModelType.Legacy:\r\n return this.legacyResponse.messages;\r\n case ResponseModelType.ExternalLegacy:\r\n return this.legacyExternalResponse.messages;\r\n default:\r\n return [];\r\n }\r\n }\r\n\r\n get data(): TModel {\r\n switch (this.type) {\r\n case ResponseModelType.Standard:\r\n return this.response.data;\r\n\t\t\t\tcase ResponseModelType.Enterprise:\r\n\t\t\t\t\treturn this.enterpriseResponse.Data;\r\n case ResponseModelType.Legacy:\r\n return this.legacyResponse.data;\r\n case ResponseModelType.ExternalLegacy:\r\n return this.legacyExternalResponse.data.results;\r\n default:\r\n return undefined;\r\n }\r\n }\r\n }\r\n}","namespace Portico.Models.Enterprise {\r\n import pmg = Portico.Models.Gateway;\r\n\timport psge = apigateway.enums;\r\n\timport psgm = apigateway.models;\r\n\r\n export interface ISite {\r\n id: number | string;\r\n description: string;\r\n nickName: string;\r\n businessEndTime: Date;\r\n\t\tbusinessStartTime: Date;\r\n\t\troleType: psge.RoleType;\r\n\r\n addresses: Address[];\r\n\t\tcontacts: Contact[];\r\n emailAddresses: EmailAddress[];\r\n externalIds: ExternalId[];\r\n\t\tphoneNumbers: PhoneNumber[];\r\n\t\tglobalIds: GlobalId[];\r\n\r\n\t\taddAddress(index?: number): Address;\r\n\t\taddContact(index?: number): Contact;\r\n\t\taddEmailAddress(index?: number): EmailAddress;\r\n\t\taddExternalId(index?: number): ExternalId;\r\n\t\taddGlobalId(index?: number): GlobalId;\r\n\t\taddPhoneNumber(index?: number): PhoneNumber;\r\n\t\tisValidSearch(): boolean;\r\n\t\tmapToEnterpriseCoordinatorSiteUpsearchModel(): psgm.EnterpriseCoordinatorSiteServiceModelsSiteUpsearchBaseModel;\r\n\t\tmapToEnterpriseCoordinatorSiteUpsearchModelWithFlags(canUpdate: boolean, canInsert: boolean, skipSearch: boolean): psgm.UpsearchModelEnterpriseCoordinatorSiteServiceModelsSiteUpsearchBaseModel;\r\n\t\tmapToSiteUpsearchModel(): psgm.SiteUpsearchModel;\r\n\t}\r\n\r\n export class Site implements ISite {\r\n\t\tid: number | string;\r\n description: string;\r\n nickName: string;\r\n businessEndTime: Date;\r\n businessStartTime: Date;\r\n\t\troleType: psge.RoleType;\r\n\r\n addresses: Address[];\r\n\t\tcontacts: Contact[];\r\n emailAddresses: EmailAddress[];\r\n externalIds: ExternalId[];\r\n\t\tphoneNumbers: PhoneNumber[];\r\n\t\tglobalIds: GlobalId[];\r\n\t\tsiteNote: string;\r\n\r\n constructor(obj?: ISite | any) {\r\n this.id = null;\r\n this.description = '';\r\n this.nickName = '';\r\n this.businessEndTime = null;\r\n this.businessStartTime = null;\r\n\t\t\tthis.roleType = null;\r\n\r\n this.addresses = [];\r\n\t\t\tthis.contacts = [];\r\n this.emailAddresses = [];\r\n this.externalIds = [];\r\n\t\t\tthis.phoneNumbers = [];\r\n\t\t\tthis.globalIds = [];\r\n\t\t\tthis.siteNote = '';\r\n\r\n if (obj) {\r\n\t\t\t\tthis.id = obj.id || obj.prescriberSiteId || obj.siteId || null;\r\n\t\t\t\tthis.description = obj.description || obj.description || '';\r\n\t\t\t\tthis.nickName = obj.nickName || '';\r\n\t\t\t\tthis.roleType = obj.roleType || obj.siteRoleType || null;\r\n\t\t\t\tthis.siteNote = obj.siteNote || '';\r\n\r\n\t\t\t\tif (obj.businessEndTime) {\r\n\t\t\t\t\tthis.businessEndTime = new Date((obj.businessEndTime).toString());\r\n }\r\n\r\n\t\t\t\tif (obj.businessStartTime) {\r\n\t\t\t\t\tthis.businessStartTime = new Date((obj.businessStartTime).toString());\r\n }\r\n\r\n\t\t\t\tif (obj.addresses) {\r\n\t\t\t\t\tfor (const address of obj.addresses) {\r\n\t\t\t\t\t\tthis.addresses.push(new Address(address));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.contacts) {\r\n for (const contact of obj.contacts) {\r\n this.contacts.push(new Contact(contact));\r\n }\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.emailAddresses) {\r\n\t\t\t\t\tfor (const emailAddress of obj.emailAddresses) {\r\n\t\t\t\t\t\tthis.emailAddresses.push(new EmailAddress(emailAddress));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.externalIds) {\r\n\t\t\t\t\tfor (const externalId of obj.externalIds) {\r\n\t\t\t\t\t\tthis.externalIds.push(new ExternalId(externalId));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.phoneNumbers) {\r\n\t\t\t\t\tfor (const phoneNumber of obj.phoneNumbers) {\r\n\t\t\t\t\t\tthis.phoneNumbers.push(new PhoneNumber(phoneNumber));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.globalIds) {\r\n\t\t\t\t\tfor (const globalId of obj.globalIds) {\r\n\t\t\t\t\t\tthis.globalIds.push(new GlobalId(globalId));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n }\r\n }\r\n\r\n\t\taddAddress(index: number = null): Address {\r\n\t\t\tconst length = this.addresses.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.addresses[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst address = new Address();\r\n\t\t\tthis.addresses.push(address);\r\n\t\t\treturn address;\r\n\t\t}\r\n\r\n\t\taddContact(index: number = null): Contact {\r\n\t\t\tconst length = this.contacts.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.contacts[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst contact = new Contact();\r\n\t\t\tthis.contacts.push(contact);\r\n\t\t\treturn contact;\r\n\t\t}\r\n\r\n\t\taddEmailAddress(index: number = null): EmailAddress {\r\n\t\t\tconst length = this.emailAddresses.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.emailAddresses[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst emailAddress = new EmailAddress();\r\n\t\t\tthis.emailAddresses.push(emailAddress);\r\n\t\t\treturn emailAddress;\r\n\t\t}\r\n\r\n\t\taddExternalId(index: number = null): ExternalId {\r\n\t\t\tconst length = this.externalIds.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.externalIds[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst externalId = new ExternalId();\r\n\t\t\tthis.externalIds.push(externalId);\r\n\t\t\treturn externalId;\r\n\t\t}\r\n\r\n\t\taddGlobalId(index: number = null): GlobalId {\r\n\t\t\tconst length = this.globalIds.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.globalIds[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst globalId = new GlobalId();\r\n\t\t\tthis.globalIds.push(globalId);\r\n\t\t\treturn globalId;\r\n\t\t}\r\n\r\n\t\taddPhoneNumber(index: number = null): PhoneNumber {\r\n\t\t\tconst length = this.phoneNumbers.length;\r\n\r\n\t\t\tif (index && index < length) {\r\n\t\t\t\treturn this.phoneNumbers[index];\r\n\t\t\t}\r\n\r\n\t\t\tconst phoneNumber = new PhoneNumber();\r\n\t\t\tthis.phoneNumbers.push(phoneNumber);\r\n\t\t\treturn phoneNumber;\r\n\t\t}\r\n\r\n\t\tisValidSearch(): boolean {\r\n\t\t\tlet counter = 0;\r\n\r\n\t\t\tif (this.description) {\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\r\n\t\t\tif (this.addresses) {\r\n\t\t\t\tif (this.addresses[0].city) {\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this.addresses[0].state) {\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this.addresses[0].zip) {\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn counter >= 1;\r\n\t\t}\r\n\r\n\t\tmapToEnterpriseCoordinatorSiteUpsearchModel(): psgm.EnterpriseCoordinatorSiteServiceModelsSiteUpsearchBaseModel {\r\n\t\t\treturn {\r\n\t\t\t\tsiteId: Number(this.id),\r\n\t\t\t\tsiteRoleType: this.roleType,\r\n\t\t\t\tdescription: this.description,\r\n\t\t\t\tnickName: this.nickName,\r\n\t\t\t\tbusinessStartTime: moment(this.businessStartTime),\r\n\t\t\t\tbusinessEndTime: moment(this.businessEndTime),\r\n\t\t\t\taddresses: this.addresses ? _.map(this.addresses, addr => {\r\n\t\t\t\t\treturn Address.prototype.mapToEnterpriseCoordinatorAddress.call(addr);\r\n\t\t\t\t}) : [],\r\n\t\t\t\tcontacts: this.contacts ? _.map(this.contacts, cnt => {\r\n\t\t\t\t\treturn Contact.prototype.mapToEnterpriseCoordinatorContact.call(cnt);\r\n\t\t\t\t}) : [],\r\n\t\t\t\temailAddresses: this.emailAddresses ? _.map(this.emailAddresses, email => {\r\n\t\t\t\t\treturn EmailAddress.prototype.mapToEnterpriseCoordinatorEmailAddress.call(email);\r\n\t\t\t\t}) : [],\r\n\t\t\t\texternalIds: this.externalIds ? _.map(this.externalIds, ext => {\r\n\t\t\t\t\treturn ExternalId.prototype.mapToEnterpriseCoordinatorExternalId.call(ext);\r\n\t\t\t\t}) : [],\r\n\t\t\t\tglobalIds: this.globalIds ? _.map(this.globalIds, glblId => {\r\n\t\t\t\t\treturn GlobalId.prototype.mapToEnterpriseCoordinatorGlobalId.call(glblId);\r\n\t\t\t\t}) : [],\r\n\t\t\t\tphoneNumbers: this.phoneNumbers ? _.map(this.phoneNumbers, ph => {\r\n\t\t\t\t\treturn PhoneNumber.prototype.mapToEnterpriseCoordinatorPhoneUpsearchModel.call(ph);\r\n\t\t\t\t}) : []\r\n\t\t\t} as psgm.EnterpriseCoordinatorSiteServiceModelsSiteUpsearchBaseModel\r\n\t\t}\r\n\r\n\t\tmapToEnterpriseCoordinatorSiteUpsearchModelWithFlags(canUpdate: boolean, canInsert: boolean, skipSearch: boolean): psgm.UpsearchModelEnterpriseCoordinatorSiteServiceModelsSiteUpsearchBaseModel {\r\n\t\t\treturn {\r\n\t\t\t\tcanUpdate: canUpdate,\r\n\t\t\t\tcanInsert: canInsert,\r\n\t\t\t\tskipSearch: skipSearch,\r\n\t\t\t\tmodel: this.mapToEnterpriseCoordinatorSiteUpsearchModel()\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tmapToSiteUpsearchModel(): psgm.SiteUpsearchModel {\r\n\t\t\treturn {\r\n\t\t\t\tsiteId: this.id,\r\n\t\t\t\tsiteRoleType: this.roleType,\r\n\t\t\t\tsiteNote: this.siteNote,\r\n\t\t\t\tdescription: this.description,\r\n\t\t\t\tnickName: this.nickName,\r\n\t\t\t\tbusinessStartTime: moment(this.businessStartTime),\r\n\t\t\t\tbusinessEndTime: moment(this.businessEndTime),\r\n\t\t\t\taccountRelationshipIsPrimary: false,\r\n\t\t\t\taddresses: this.addresses ? _.map(this.addresses, addr => {\r\n\t\t\t\t\treturn Address.prototype.mapToEnterpriseCoordinatorAddress.call(addr);\r\n\t\t\t\t}) : [],\r\n\t\t\t\tcontacts: this.contacts ? _.map(this.contacts, cntct => {\r\n\t\t\t\t\treturn Contact.prototype.mapToEnterpriseCoordinatorContact.call(cntct);\r\n\t\t\t\t}) : [],\r\n\t\t\t\temailAddresses: this.emailAddresses ? _.map(this.emailAddresses, email => {\r\n\t\t\t\t\treturn EmailAddress.prototype.mapToEnterpriseCoordinatorEmailAddress.call(email);\r\n\t\t\t\t}) : [],\r\n\t\t\t\texternalIds: this.externalIds ? _.map(this.externalIds, extId => {\r\n\t\t\t\t\treturn ExternalId.prototype.mapToEnterpriseCoordinatorExternalId.call(extId);\r\n\t\t\t\t}) : [],\r\n\t\t\t\tglobalIds: this.globalIds ? _.map(this.globalIds, glblId => {\r\n\t\t\t\t\treturn GlobalId.prototype.mapToEnterpriseCoordinatorGlobalId.call(glblId);\r\n\t\t\t\t}) : [],\r\n\t\t\t\tphoneNumbers: this.phoneNumbers ? _.map(this.phoneNumbers, ph => {\r\n\t\t\t\t\treturn PhoneNumber.prototype.mapToEnterpriseCoordinatorPhoneUpsearchModel.call(ph);\r\n\t\t\t\t}) : [],\r\n\t\t\t\tpointOfContacts: [],\t\t\t\t\r\n\t\t\t};\r\n\t\t}\r\n }\r\n}\r\n\r\n","namespace Portico.Models.Enterprise {\r\n\timport psgm = apigateway.models;\r\n\r\n\texport interface ISiteAccount extends IBaseAccount {\r\n\t\tparty: Site;\r\n\r\n\t\tmapToEnterpriseCoordinatorSiteAccountUpsearchRequestModel(canInsertAccount: boolean, canUpdateAccount: boolean, skipAccountSearch: boolean, canInsertParty: boolean, canUpdateParty: boolean, skipPartySearch: boolean);\r\n\t}\r\n\r\n\texport class SiteAccount extends BaseAccount implements ISiteAccount {\r\n\t\tparty: Site;\r\n\r\n\t\tconstructor(obj?: ISiteAccount | any) {\r\n\t\t\tsuper(obj);\r\n\r\n\t\t\tthis.party = new Site();\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tif (obj.party) {\r\n\t\t\t\t\tthis.party = new Site(obj.party);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tmapToEnterpriseCoordinatorSiteAccountUpsearchRequestModel(canInsertAccount: boolean, canUpdateAccount: boolean, skipAccountSearch: boolean, canInsertParty: boolean, canUpdateParty: boolean, skipPartySearch: boolean) {\r\n\t\t\tconst accountDiagnosisSession = this.getDiagnosisSession(false);\r\n\r\n\t\t\tconst accountUpsearchModel: psgm.EnterpriseCoordinatorSiteAccountUpsearchRequestModel = {\r\n\t\t\t\taccountData: this.mapToEnterpriseCoordinatorAccountUpsearchModelWithFlags(canInsertAccount, canUpdateAccount, skipAccountSearch),\r\n\t\t\t\tdiagnosisSessionData: accountDiagnosisSession ? accountDiagnosisSession.mapToEnterpriseCoordinatorDiagnosisSessionModel() : null,\r\n\t\t\t\tpartyData: this.party ? this.party.mapToEnterpriseCoordinatorSiteUpsearchModelWithFlags(canInsertParty, canUpdateParty, skipPartySearch) : null,\r\n\t\t\t\tpayorData: this.payorRelationships ? _.map(this.payorRelationships, pr => {\r\n\t\t\t\t\treturn pr.mapToEnterpriseCoordinatorPayorUpsearchModelWithFlags(canInsertParty, canUpdateParty, skipPartySearch);\r\n\t\t\t\t}) : [],\r\n\t\t\t\tpharmacyData: this.pharmacyRelationships ? _.map(this.pharmacyRelationships, pr => {\r\n\t\t\t\t\treturn pr.mapToEnterpriseCoordinatorPharmacyUpsearchModelWithFlags(canInsertParty, canUpdateParty, skipPartySearch);\r\n\t\t\t\t}) : [],\r\n\t\t\t\tprescriberData: this.prescriberRelationships ? _.map(this.prescriberRelationships, pr => {\r\n\t\t\t\t\treturn pr.mapToEnterpriseCoordinatorPrescriberUpsearchModelWithFlags(canInsertParty, canUpdateParty, skipPartySearch);\r\n\t\t\t\t}) : [],\r\n\t\t\t\tprescriptionData: this.prescriptions ? _.map(this.prescriptions, p => {\r\n\t\t\t\t\treturn p.mapToEnterpriseCoordinatorPrescriptionUpsearchModel();\r\n\t\t\t\t}) : [],\r\n\t\t\t\tsiteData: this.siteRelationships ? _.map(this.siteRelationships, sr => {\r\n\t\t\t\t\treturn sr.mapToEnterpriseCoordinatorSiteUpsearchModelWithFlags(canInsertParty, canUpdateParty, skipPartySearch);\r\n\t\t\t\t}) : [],\r\n\t\t\t\tsurveySessionData: this.getSurveySessionIds()\r\n\t\t\t}\r\n\t\t\treturn accountUpsearchModel;\r\n\t\t}\r\n\t}\r\n\r\n\texport interface ISiteAccountRegistration {\r\n\t\tportalId: string;\r\n\t\tuserName: string;\r\n\t\tfirstName: string;\r\n\t\tlastName: string;\r\n\t\tphone: ContactInfo;\r\n\t\tfax: ContactInfo;\r\n\t\temail: ContactInfo;\r\n\t\tsiteAccount: SiteAccount;\r\n\t}\r\n\r\n\texport class SiteAccountRegistration implements ISiteAccountRegistration {\r\n\t\tportalId: string;\r\n\t\tuserName: string;\r\n\t\tfirstName: string;\r\n\t\tlastName: string;\r\n\t\tphone: ContactInfo;\r\n\t\tfax: ContactInfo;\r\n\t\temail: ContactInfo;\r\n\t\tsiteAccount: SiteAccount;\r\n\r\n\t\tconstructor(obj?: ISiteAccountRegistration) {\r\n\t\t\tthis.portalId = '';\r\n\t\t\tthis.userName = '';\r\n\t\t\tthis.firstName = '';\r\n\t\t\tthis.lastName = '';\r\n\t\t\tthis.phone = new ContactInfo();\r\n\t\t\tthis.fax = new ContactInfo();\r\n\t\t\tthis.email = new ContactInfo();\r\n\t\t\tthis.siteAccount = new SiteAccount();\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tthis.portalId = obj.portalId || '';\r\n\t\t\t\tthis.userName = obj.userName || '';\r\n\t\t\t\tthis.firstName = obj.firstName || '';\r\n\t\t\t\tthis.lastName = obj.lastName || '';\r\n\r\n\t\t\t\tif (obj.phone) {\r\n\t\t\t\t\tthis.phone = new ContactInfo(obj.phone);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.fax) {\r\n\t\t\t\t\tthis.fax = new ContactInfo(obj.fax);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.email) {\r\n\t\t\t\t\tthis.email = new ContactInfo(obj.email);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.siteAccount) {\r\n\t\t\t\t\tthis.siteAccount = new SiteAccount(obj.siteAccount);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\timport psgm = apigateway.models;\r\n\r\n export interface IState {\r\n id: number;\r\n code: string;\r\n description: string;\r\n }\r\n\r\n\texport class State implements IState {\r\n\t\tid: number;\r\n\t\tcode: string;\r\n\t\tdescription: string;\r\n\r\n\t\tconstructor(obj?: IState | psgm.LocationSharedStateModel) {\r\n this.id = null;\r\n\t\t\tthis.code = '';\r\n\t\t\tthis.description = '';\r\n\r\n\t\t\tif (isEither(obj)) {\r\n this.id = obj.id || null;\r\n\t\t\t\tthis.code = obj.code || '';\r\n\t\t\t\tthis.description = obj.description || '';\r\n }\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\r\n export interface ISurvey {\r\n description: string;\r\n surveyId: number | string;\r\n surveyTypeId: number;\r\n surveyQuestions: SurveyQuestion[];\r\n\r\n\t\tgetSurveyAnswer: (questionId: number, answerId: number) => SurveyAnswer;\r\n\t\tgetSurveyQuestion: (questionId: number) => SurveyQuestion;\r\n\t}\r\n\r\n export class Survey implements ISurvey {\r\n description: string;\r\n\t\tsurveyId: number | string;\r\n surveyTypeId: number;\r\n surveyQuestions: SurveyQuestion[];\r\n\r\n constructor(obj?: ISurvey | any) {\r\n this.description = null;\r\n this.surveyId = null;\r\n this.surveyTypeId = null;\r\n\t\t\tthis.surveyQuestions = [];\r\n\r\n if (obj) {\r\n this.description = obj.description || null;\r\n this.surveyId = obj.surveyId || null;\r\n this.surveyTypeId = obj.surveyTypeId || null;\r\n\r\n\t\t\t\tif (obj.surveyQuestions || obj.questionsWithAnswers) {\r\n\t\t\t\t\tfor (const surveyQuestion of obj.surveyQuestions || obj.questionsWithAnswers) {\r\n this.surveyQuestions.push(new SurveyQuestion(surveyQuestion));\r\n }\r\n }\r\n }\r\n\t\t}\r\n\r\n\t\tgetSurveyAnswer(questionId: number, answerId: number): SurveyAnswer {\r\n\t\t\tconst surveyQuestion = this.getSurveyQuestion(questionId);\r\n\t\t\tconst surveyAnswer = surveyQuestion.getSurveyAnswer(answerId);\r\n\r\n\t\t\treturn surveyAnswer;\r\n\t\t}\r\n\r\n\t\tgetSurveyQuestion(questionId: number): SurveyQuestion {\r\n\t\t\tfor (const surveyQuestion of this.surveyQuestions) {\r\n\t\t\t\tif (surveyQuestion.questionId === questionId) {\r\n\t\t\t\t\treturn surveyQuestion;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t}\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\r\n export interface ISurveyAnswer {\r\n answerId: number;\r\n answerTypeId: number;\r\n answerValue: string;\r\n dtmfTone: string;\r\n indicatesOptIn: boolean;\r\n triggersFulfillment: boolean;\r\n requiresAdvancedNavigation: boolean;\r\n nextQuestionId: number;\r\n\t\tuserName: string;\r\n\t\tanswerCategoryId: number;\r\n\t\tanswerCategoryCode: string;\r\n\t\tanswerCategoryDescription: string;\r\n }\r\n\r\n export class SurveyAnswer implements ISurveyAnswer {\r\n answerId: number;\r\n answerTypeId: number;\r\n answerValue: string;\r\n dtmfTone: string;\r\n indicatesOptIn: boolean;\r\n triggersFulfillment: boolean;\r\n requiresAdvancedNavigation: boolean;\r\n nextQuestionId: number;\r\n\t\tuserName: string;\r\n\t\tanswerCategoryId: number;\r\n\t\tanswerCategoryCode: string;\r\n\t\tanswerCategoryDescription: string;\r\n\r\n constructor(obj?: ISurveyAnswer | any) {\r\n this.answerId = null;\r\n this.answerTypeId = null;\r\n this.answerValue = null;\r\n this.dtmfTone = null;\r\n this.indicatesOptIn = null;\r\n this.triggersFulfillment = null;\r\n this.requiresAdvancedNavigation = null;\r\n this.nextQuestionId = null;\r\n\t\t\tthis.userName = null;\r\n\t\t\tthis.answerCategoryId = null;\r\n\t\t\tthis.answerCategoryCode = null;\r\n\t\t\tthis.answerCategoryDescription = null;\r\n\r\n if (obj) {\r\n\t\t\t\tthis.answerId = obj.answerId || obj.answersId || null;\r\n this.answerTypeId = obj.answerTypeId || null;\r\n this.answerValue = obj.answerValue || null;\r\n this.dtmfTone = obj.dtmfTone || null;\r\n this.indicatesOptIn = obj.indicatesOptIn || null;\r\n this.triggersFulfillment = obj.triggersFulfillment || null;\r\n this.requiresAdvancedNavigation = obj.requiresAdvancedNavigation || null;\r\n\t\t\t\tthis.nextQuestionId = obj.nextQuestionId || null;\r\n\t\t\t\tthis.userName = obj.userName || null;\r\n\t\t\t\tthis.answerCategoryId = obj.answerCategoryId || null;\r\n\t\t\t\tthis.answerCategoryCode = obj.answerCategoryCode || null;\r\n\t\t\t\tthis.answerCategoryDescription = obj.answerCategoryDescription || null;\r\n }\r\n }\r\n }\r\n}\r\n\r\n","namespace Portico.Models.Enterprise {\r\n\r\n export interface ISurveyQuestion {\r\n\t\tquestionId: number | string;\r\n questionTypeId: number;\r\n questionText: string;\r\n audioFileName: string;\r\n isSurveyEntryPoint: boolean;\r\n isOptInQuestion: boolean;\r\n surveyAnswers: SurveyAnswer[];\r\n\t\tquestionCategories: any[];\r\n\r\n\t\tgetSurveyAnswer: (answerId: number) => SurveyAnswer;\r\n\t}\r\n\r\n export class SurveyQuestion implements ISurveyQuestion {\r\n\t\tquestionId: number | string;\r\n questionTypeId: number;\r\n questionText: string;\r\n audioFileName: string;\r\n isSurveyEntryPoint: boolean;\r\n isOptInQuestion: boolean;\r\n surveyAnswers: SurveyAnswer[];\r\n\t\tquestionCategories: any[];\r\n\r\n constructor(obj?: ISurveyQuestion | any) {\r\n this.questionId = null;\r\n this.questionTypeId = null;\r\n this.questionText = null;\r\n this.audioFileName = null;\r\n this.isSurveyEntryPoint = null;\r\n this.isOptInQuestion = null;\r\n\t\t\tthis.surveyAnswers = [];\r\n\t\t\tthis.questionCategories = [];\r\n\r\n if (obj) {\r\n\t\t\t\tthis.questionId = obj.questionId || null;\r\n this.questionTypeId = obj.questionTypeId || null;\r\n\t\t\t\tthis.questionText = obj.questionText || null;\r\n this.audioFileName = obj.audioFileName || null;\r\n this.isSurveyEntryPoint = obj.isSurveyEntryPoint || null;\r\n this.isOptInQuestion = obj.isOptInQuestion || null;\r\n\r\n\t\t\t\tif (obj.surveyAnswers || obj.answers) {\r\n\t\t\t\t\tfor (const surveyAnswer of obj.surveyAnswers || obj.answers) {\r\n\t\t\t\t\t\tthis.surveyAnswers.push(new SurveyAnswer(surveyAnswer));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//if (obj.questionCategories) {\r\n\t\t\t\t//\tfor (const questionCategory of obj.questionCategories) {\r\n\t\t\t\t//\t\tthis.questionCategories.push(new QuestionCategory(questionCategory));\r\n\t\t\t\t//\t}\r\n\t\t\t\t//}\r\n }\r\n }\r\n\r\n\t\tgetSurveyAnswer(answerId: number): SurveyAnswer {\r\n\t\t\tconst matches = this.surveyAnswers.filter((surveyAnswer) => {\r\n\t\t\t\treturn surveyAnswer.answerId === answerId;\r\n\t\t\t});\r\n\r\n\t\t\treturn matches && matches.length > 0 ? matches[0] : null;\r\n\t\t}\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\r\n export interface ISurveySession {\r\n surveySessionId: number;\r\n surveyId: number;\r\n sourceSystemId: number;\r\n surveySourceId: number;\r\n surveySessionAnswers: SurveySessionAnswer[];\r\n\r\n\t\tgetSurveySessionAnswers(questionId: number): SurveySessionAnswer[];\r\n\t\tisSurveySessionAnswer(questionId: number, answerId: number): boolean;\r\n\t\tsetSurveySessionAnswers(questionId: number, answerIds: number[], answerValue: string): void;\r\n\t}\r\n\r\n export class SurveySession implements ISurveySession {\r\n surveySessionId: number;\r\n surveyId: number;\r\n sourceSystemId: number;\r\n surveySourceId: number;\r\n surveySessionAnswers: SurveySessionAnswer[];\r\n\r\n constructor(obj?: ISurveySession) {\r\n this.surveySessionId = null;\r\n this.surveyId = null;\r\n this.sourceSystemId = null;\r\n this.surveySourceId = null;\r\n this.surveySessionAnswers = [];\r\n\r\n if (obj) {\r\n this.surveySessionId = obj.surveySessionId || null;\r\n\t\t\t\tthis.surveyId = obj.surveyId || null;\r\n this.sourceSystemId = obj.sourceSystemId || null;\r\n this.surveySourceId = obj.surveySourceId || null;\r\n\r\n if (obj.surveySessionAnswers) {\r\n for (const surveySessionAnswer of obj.surveySessionAnswers) {\r\n this.surveySessionAnswers.push(new SurveySessionAnswer(surveySessionAnswer));\r\n }\r\n }\r\n }\r\n }\r\n \r\n\t\tpublic getSurveySessionAnswers(questionId: number): SurveySessionAnswer[] {\r\n\t\t\tconst surveySessionAnswers = this.surveySessionAnswers ? this.surveySessionAnswers.filter((surveySessionAnswer) => {\r\n\t\t\t\treturn surveySessionAnswer.questionId === questionId;\r\n\t\t\t}) : [];\r\n\r\n\t\t\treturn surveySessionAnswers;\r\n\t\t}\r\n\r\n\t\tpublic isSurveySessionAnswer(questionId: number, answerId: number): boolean {\r\n\t\t\tconst matches = this.surveySessionAnswers.filter((surveySessionAnswer) => {\r\n\t\t\t\treturn surveySessionAnswer.questionId === questionId && surveySessionAnswer.answerId === answerId;\r\n\t\t\t});\r\n\r\n\t\t\treturn matches && matches.length > 0;\r\n\t\t}\r\n\r\n\t\tpublic setSurveySessionAnswers(questionId: number, answerIds: number[], answerValue: string): void {\r\n\t\t\tthis.surveySessionAnswers = this.surveySessionAnswers.filter((surveySessionAnswer: SurveySessionAnswer) => {\r\n\t\t\t\treturn surveySessionAnswer.questionId !== questionId;\r\n\t\t\t});\r\n\r\n\t\t\tanswerIds.forEach((answerId) => {\r\n\t\t\t\tconst surveySessionAnswer = new SurveySessionAnswer({\r\n\t\t\t\t\tquestionId: questionId,\r\n\t\t\t\t\tanswerId: answerId,\r\n\t\t\t\t\tanswerValue: answerValue\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.surveySessionAnswers.push(surveySessionAnswer);\r\n\t\t\t});\r\n\t\t}\r\n }\r\n}","namespace Portico.Models.Enterprise {\r\n export interface ISurveySessionAnswer {\r\n questionId: number;\r\n answerId: number;\r\n answerValue: string;\r\n surveySessionId: number;\r\n }\r\n\r\n export class SurveySessionAnswer implements ISurveySessionAnswer {\r\n questionId: number;\r\n answerId: number;\r\n answerValue: string;\r\n surveySessionId: number;\r\n\r\n constructor(obj?: ISurveySessionAnswer) {\r\n this.questionId = null;\r\n this.answerId = null;\r\n this.answerValue = null;\r\n this.surveySessionId = null;\r\n\r\n if (obj) {\r\n\t\t\t\tthis.questionId = obj.questionId || null;\r\n\t\t\t\tthis.answerId = obj.answerId || null;\r\n\t\t\t\tthis.answerValue = obj.answerValue || null;\r\n this.surveySessionId = obj.surveySessionId || null;\r\n }\r\n }\r\n }\r\n}\r\n\r\n","namespace Portico.Models.Enterprise {\r\n\timport psgm = apigateway.models;\r\n\r\n\texport interface ITask {\r\n\t\tid: number;\r\n\t\tclosedBy: number;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedDate: string | Date;\r\n\t\tupdatedBy: number;\r\n\t\tupdatedDate: string | Date;\r\n\t\ttypeCategory: number;\r\n\t\ttypeCode: string;\r\n\t\ttypeDescription: string;\r\n\t\tconditions: any[];\r\n\t\taccountId: number;\r\n\t\tcaseId: number;\r\n\t\tassignedUserId: number;\r\n\t\tdueDate: string | Date;\r\n\t\tcompletionDate: string | Date;\r\n\t\tisCompleted: boolean;\r\n\t\tresolution: string;\r\n\t\tdocumentId: number;\r\n\t\ttypeId: number;\r\n\t\tsubject: string;\r\n\t\tbody: string;\r\n\t}\r\n\r\n\texport class Task implements ITask {\r\n\t\tid: number;\r\n\t\tclosedBy: number;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedDate: string | Date;\r\n\t\tupdatedBy: number;\r\n\t\tupdatedDate: string | Date;\r\n\t\ttypeCategory: number;\r\n\t\ttypeCode: string;\r\n\t\ttypeDescription: string;\r\n\t\tconditions: any[];\r\n\t\taccountId: number;\r\n\t\tcaseId: number;\r\n\t\tassignedUserId: number;\r\n\t\tdueDate: string | Date;\r\n\t\tcompletionDate: string | Date;\r\n\t\tisCompleted: boolean;\r\n\t\tresolution: string;\r\n\t\tdocumentId: number;\r\n\t\ttypeId: number;\r\n\t\tsubject: string;\r\n\t\tbody: string;\r\n\r\n constructor(obj?: ITask | any) {\r\n this.id = null;\r\n\t\t\tthis.closedBy = null;\r\n\t\t\tthis.createdBy = null;\r\n\t\t\tthis.createdDate = null;\r\n\t\t\tthis.updatedBy = null;\r\n\t\t\tthis.updatedDate = null;\r\n\t\t\tthis.typeCategory = null;\r\n\t\t\tthis.typeCode = '';\r\n\t\t\tthis.typeDescription = '';\r\n\t\t\tthis.conditions = [];\r\n\t\t\tthis.accountId = null;\r\n\t\t\tthis.caseId = null;\r\n\t\t\tthis.assignedUserId = null;\r\n\t\t\tthis.dueDate = null;\r\n\t\t\tthis.completionDate = null;\r\n\t\t\tthis.isCompleted = null;\r\n\t\t\tthis.resolution = '';\r\n\t\t\tthis.documentId = null;\r\n\t\t\tthis.typeId = null;\r\n\t\t\tthis.subject = '';\r\n\t\t\tthis.body = '';\r\n\r\n if (obj) {\r\n\t\t\t\tthis.id = obj.id || null;\r\n\t\t\t\tthis.closedBy = obj.closedBy || null;\r\n\t\t\t\tthis.createdBy = obj.createdBy || null;\r\n\t\t\t\tthis.createdDate = obj.createdDate || null;\r\n\t\t\t\tthis.updatedBy = obj.updatedBy || null;\r\n\t\t\t\tthis.updatedDate = obj.updatedDate || null;\r\n\t\t\t\tthis.typeCategory = obj.typeCategory || null;\r\n\t\t\t\tthis.typeCode = obj.typeCode || '';\r\n\t\t\t\tthis.typeDescription = obj.typeDescription || '';\r\n\r\n\t\t\t\tif (obj.conditions) {\r\n\t\t\t\t\tfor (const condition of obj.conditions) {\r\n\t\t\t\t\t\tthis.conditions.push(condition);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.accountId = obj.accountId || null;\r\n\t\t\t\tthis.caseId = obj.caseId || null;\r\n\t\t\t\tthis.assignedUserId = obj.assignedUserId || null;\r\n\t\t\t\tthis.dueDate = obj.dueDate || null;\r\n\t\t\t\tthis.completionDate = obj.completionDate || null;\r\n\t\t\t\tthis.isCompleted = obj.isCompleted || null;\r\n\t\t\t\tthis.resolution = obj.resolution || '';\r\n\t\t\t\tthis.documentId = obj.documentId || null;\r\n\t\t\t\tthis.typeId = obj.typeId || null;\r\n\t\t\t\tthis.subject = obj.subject || '';\r\n\t\t\t\tthis.body = obj.body || '';\r\n }\r\n }\r\n }\r\n}","namespace Portico.Models.Enterprise {\r\n\r\n export interface ITenant {\r\n id: number;\r\n name: string;\r\n\r\n programs: Program[];\r\n }\r\n\r\n export class Tenant implements ITenant {\r\n id: number;\r\n name: string;\r\n\r\n programs: Program[];\r\n\r\n constructor(obj?: ITenant) {\r\n this.id = null;\r\n this.name = '';\r\n\r\n this.programs = [];\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tthis.id = obj.id || null;\r\n this.name = obj.name || '';\r\n\r\n if (obj.programs) {\r\n for (const program of obj.programs) {\r\n this.programs.push(new Program(program));\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\timport psgm = apigateway.models;\r\n\r\n\texport interface IUser {\r\n\t\tuserId: number;\r\n\t\tuserName: string;\r\n\t\trole: string;\r\n\t\tfirstName: string;\r\n\t\tlastName: string;\r\n\t\tphone: ContactInfo;\r\n\t\tfax: ContactInfo;\r\n\t\temail: ContactInfo;\r\n\t\tsid: string;\r\n\t\taccountId: number;\r\n\t\tuserDomainId: number;\r\n\t\tactive: boolean;\r\n\t}\r\n\r\n\texport class User implements IUser {\r\n\t\tuserId: number;\r\n\t\tuserName: string;\r\n\t\trole: string;\r\n\t\tfirstName: string;\r\n\t\tlastName: string;\r\n\t\tphone: ContactInfo;\r\n\t\tfax: ContactInfo;\r\n\t\temail: ContactInfo;\r\n\t\tsid: string;\r\n\t\taccountId: number;\r\n\t\tuserDomainId: number;\r\n\t\tactive: boolean;\r\n\r\n\t\tconstructor(obj?: IUser | psgm.ScriptsAuthenticationGetCurrentUserGetCurrentUserResponseModel | any) {\r\n\t\t\tthis.userId = null;\r\n\t\t\tthis.userName = '';\r\n\t\t\tthis.role = null;\r\n\t\t\tthis.firstName = ''\r\n\t\t\tthis.lastName = '';\r\n\t\t\tthis.phone = new ContactInfo();\r\n\t\t\tthis.fax = new ContactInfo();\r\n\t\t\tthis.email = new ContactInfo();\r\n\t\t\tthis.sid = null;\r\n\t\t\tthis.accountId = null;\r\n\t\t\tthis.userDomainId = null;\r\n\t\t\tthis.active = false;\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tthis.userId = obj.userId || null;\r\n\t\t\t\tthis.userName = obj.userName || '';\r\n\t\t\t\tthis.role = obj.role || null;\r\n\t\t\t\tthis.firstName = obj.firstName || '';\r\n\t\t\t\tthis.lastName = obj.lastName || '';\r\n\r\n\t\t\t\tif (obj.phone) {\r\n\t\t\t\t\tthis.phone = new ContactInfo(obj.phone);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.fax) {\r\n\t\t\t\t\tthis.fax = new ContactInfo(obj.fax);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.email) {\r\n\t\t\t\t\tthis.email = new ContactInfo(obj.email);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.sid = obj.sid || null;\r\n\t\t\t\tthis.accountId = obj.accountId || null;\r\n\t\t\t\tthis.userDomainId = obj.userDomainId || null;\r\n\t\t\t\tthis.active = obj.active || false;\r\n }\r\n }\r\n\t}\r\n\r\n export interface IContactInfo {\r\n\t\tvalue: string;\r\n\t\tisPreferred: boolean;\r\n\t}\r\n\r\n\texport class ContactInfo implements IContactInfo {\r\n\t\tvalue: string;\r\n\t\tisPreferred: boolean;\r\n\r\n\t\tconstructor(obj?: IContactInfo | psgm.ScriptsAuthenticationGetCurrentUserGetCurrentUserContactInfoResponseModel) {\r\n\t\t\tthis.value = '';\r\n\t\t\tthis.isPreferred = false;\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tthis.value = obj.value || '';\r\n\t\t\t\tthis.isPreferred = obj.isPreferred || false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\texport interface IUserProfile {\r\n\t\tid: number;\r\n\t\tsecureId: string;\r\n\t\tfirstName: string;\r\n\t\tlastName: string;\r\n\t\temail: string;\r\n\t\troles: UserProfileRole[];\r\n\r\n\t\tgetRole(name: string);\r\n\t}\r\n\r\n\texport class UserProfile implements IUserProfile {\r\n\t\tid: number;\r\n\t\tsecureId: string;\r\n\t\tfirstName: string;\r\n\t\tlastName: string;\r\n\t\temail: string;\r\n\t\troles: UserProfileRole[];\r\n\r\n\t\tconstructor(obj?: IUserProfile) {\r\n\t\t\tthis.id = null;\r\n\t\t\tthis.secureId = null;\r\n\t\t\tthis.firstName = ''\r\n\t\t\tthis.lastName = '';\r\n\t\t\tthis.email = '';\r\n\t\t\tthis.roles = [];\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tthis.id = obj.id || null;\r\n\t\t\t\tthis.secureId = obj.secureId || null;\r\n\t\t\t\tthis.firstName = obj.firstName || '';\r\n\t\t\t\tthis.lastName = obj.lastName || '';\r\n\t\t\t\tthis.email = obj.email || '';\r\n\r\n\t\t\t\tif (obj.roles) {\r\n\t\t\t\t\tfor (const role of obj.roles) {\r\n\t\t\t\t\t\tthis.roles.push(new UserProfileRole(role));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n }\r\n\t\t}\r\n\r\n\t\tgetRole(name: string) {\r\n\t\t\treturn _.find(this.roles, (role) => {\r\n\t\t\t\treturn role.name === name;\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\texport interface IUserProfileRole {\r\n\t\tname: string;\r\n\t\tpermissions: UserProfilePermission[];\r\n\t}\r\n\r\n\texport class UserProfileRole implements IUserProfileRole {\r\n\t\tname: string;\r\n\t\tpermissions: UserProfilePermission[];\r\n\r\n\t\tconstructor(obj?: IUserProfileRole) {\r\n\t\t\tthis.name = '';\r\n\t\t\tthis.permissions = [];\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tthis.name = obj.name || '';\r\n\r\n\t\t\t\tif (obj.permissions) {\r\n\t\t\t\t\tfor (const permission of obj.permissions) {\r\n\t\t\t\t\t\tthis.permissions.push(new UserProfilePermission(permission));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\texport interface IUserProfilePermission {\r\n\t\tname: string;\r\n\t}\r\n\r\n\texport class UserProfilePermission implements IUserProfilePermission {\r\n\t\tname: string;\r\n\r\n\t\tconstructor(obj?: IUserProfilePermission) {\r\n\t\t\tthis.name = '';\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tthis.name = obj.name || '';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n\r\n export interface IVoiceMailOptIn {\r\n isVmOptedIn: boolean;\r\n phoneNumberId: number;\r\n }\r\n\r\n export class VoiceMailOptIn implements IVoiceMailOptIn {\r\n isVmOptedIn: boolean;\r\n phoneNumberId: number;\r\n\r\n constructor(obj?: IVoiceMailOptIn) {\r\n this.isVmOptedIn = false;\r\n this.phoneNumberId = null;\r\n\r\n\t\t\tif (obj) {\r\n\t\t\t\tthis.isVmOptedIn = obj.isVmOptedIn || false;\r\n this.phoneNumberId = obj.phoneNumberId || null;\r\n }\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Enterprise {\r\n import psge = apigateway.enums;\r\n import psgm = apigateway.models;\r\n\r\n export interface IWebAddress {\r\n id: number;\r\n type: number | string;\r\n url: string;\r\n }\r\n\r\n export class WebAddress implements IWebAddress {\r\n id: number;\r\n type: number | string;\r\n url: string;\r\n\r\n constructor(obj?: IWebAddress | any) {\r\n this.id = null;\r\n this.type = null;\r\n this.url = '';\r\n\r\n if (obj) {\r\n\t\t\t\tthis.id = obj.id || obj.webAddressId || null;\r\n\t\t\t\tthis.type = obj.type || obj.webAddressType || null;\r\n this.url = obj.url || '';\r\n }\r\n }\r\n\r\n mapToEnterpriseCoordinatorWebAddress() : psgm.EnterpriseCoordinatorSharedWebAddressUpsearchModel {\r\n return {\r\n webAddressId: this.id,\r\n webAddressType: psge.ContactInfoPurposeType[this.type],\r\n url: this.url\r\n } as psgm.EnterpriseCoordinatorSharedWebAddressUpsearchModel\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Pdf {\r\n export class AddDocumentRequestModel {\r\n public programId: number;\r\n public pdfRequest: PdfRequest;\r\n }\r\n}\r\n\r\n","namespace Portico.Models.Pdf {\r\n\r\n export class PdfContent {\r\n public page: number;\r\n public content: string;\r\n public font: string;\r\n public size: number;\r\n public style: XFontStyle;\r\n public color: string;\r\n public point: Point;\r\n\r\n constructor() {\r\n this.style = XFontStyle.Regular\r\n this.size = 16;\r\n this.point = new Point();\r\n this.font = 'Arial';\r\n this.color = '000000';\r\n this.page = 0;\r\n this.content = null;\r\n }\r\n }\r\n}","namespace Portico.Models.Pdf {\r\n export class PdfRequest {\r\n public fileName: string;\r\n public template: string;\r\n public pdfContents: PdfContent[];\r\n\r\n constructor() {\r\n this.fileName = null;\r\n this.template = null;\r\n this.pdfContents = [];\r\n }\r\n }\r\n}","namespace Portico.Models.Pdf {\r\n export class Point {\r\n public x: number;\r\n public y: number;\r\n\r\n constructor() {\r\n this.x = 0;\r\n this.y = 0;\r\n }\r\n }\r\n}","namespace Portico.Models.Pdf {\r\n export enum XFontStyle {\r\n Regular = 0,\r\n Bold = 1,\r\n Italic = 2,\r\n BoldItalic = Italic | Bold,\r\n Underline = 4,\r\n Strikeout = 8\r\n }\r\n }","namespace Portico.Models.Legacy {\r\n\r\n export class AlternateCardId {\r\n alternateCardNumber: string;\r\n cardAlternateIdType: CardAlternateIdTypeEnum;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.AlternateCardId){\r\n this.alternateCardNumber = null;\r\n this.cardAlternateIdType = null;\r\n\r\n if(obj){\r\n this.alternateCardNumber = obj.alternateCardNumber || null;\r\n this.cardAlternateIdType = obj.cardAlternateIdType || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.AlternateCardId {\r\n return {\r\n alternateCardNumber: this.alternateCardNumber,\r\n cardAlternateIdType: this.cardAlternateIdType,\r\n };\r\n }\r\n }\r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class CardActivationRequestModel {\r\n memberNumber: string;\r\n patientId: string;\r\n cardLastFourDigits: string;\r\n dateOfBirth: string;\r\n expirationDate: string;\r\n\r\n constructor(obj?: Portico.Services.Legacy.CardService.Models.CardActivationRequestModel){\r\n this.memberNumber = null;\r\n this.patientId = null;\r\n this.cardLastFourDigits = null;\r\n this.dateOfBirth = null;\r\n this.expirationDate = null;\r\n\r\n if(obj){\r\n this.memberNumber = obj.memberNumber || null;\r\n this.patientId = obj.patientId || null;\r\n this.cardLastFourDigits = obj.cardLastFourDigits || null;\r\n this.dateOfBirth = obj.dateOfBirth || null;\r\n this.expirationDate = obj.expirationDate || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.CardService.Models.CardActivationRequestModel {\r\n return {\r\n memberNumber: this.memberNumber,\r\n patientId: this.patientId,\r\n cardLastFourDigits: this.cardLastFourDigits,\r\n dateOfBirth: this.dateOfBirth,\r\n expirationDate: this.expirationDate,\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class CardCreatedModel {\r\n bin: string;\r\n cardActivationDate: Date;\r\n cardEndDate: Date;\r\n sponsorNumber: string;\r\n memberNumber: string;\r\n groupNumber: string;\r\n totalBenefitAmount: number;\r\n remainingBenefitAmount: number;\r\n totalPaidAmount: number;\r\n\r\n constructor(obj?: Portico.Services.Legacy.CardService.Models.CardCreatedModel){\r\n this.bin = null;\r\n this.cardActivationDate = null;\r\n this.cardEndDate = null;\r\n this.sponsorNumber = null;\r\n this.memberNumber = null;\r\n this.groupNumber = null;\r\n this.totalBenefitAmount = null;\r\n this.remainingBenefitAmount = null;\r\n this.totalPaidAmount = null;\r\n\r\n if(obj){\r\n this.bin = obj.bin || null;\r\n this.cardActivationDate = typeof obj.cardActivationDate === 'string' ? new Date(obj.cardActivationDate) : obj.cardActivationDate || null;\r\n this.cardEndDate = typeof obj.cardEndDate === 'string' ? new Date(obj.cardEndDate) : obj.cardEndDate || null;\r\n this.sponsorNumber = obj.sponsorNumber || null;\r\n this.memberNumber = obj.memberNumber || null;\r\n this.groupNumber = obj.groupNumber || null;\r\n this.totalBenefitAmount = obj.totalBenefitAmount || null;\r\n this.remainingBenefitAmount = obj.remainingBenefitAmount || null;\r\n this.totalPaidAmount = obj.totalPaidAmount || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.CardService.Models.CardCreatedModel {\r\n return {\r\n bin: this.bin,\r\n cardActivationDate: this.cardActivationDate,\r\n cardEndDate: this.cardEndDate,\r\n sponsorNumber: this.sponsorNumber,\r\n memberNumber: this.memberNumber,\r\n groupNumber: this.groupNumber,\r\n totalBenefitAmount: this.totalBenefitAmount,\r\n remainingBenefitAmount: this.remainingBenefitAmount,\r\n totalPaidAmount: this.totalPaidAmount,\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class CardStatusResultModel {\r\n memberNumber: string;\r\n cardActivationDate: Date;\r\n cardEndDate: Date;\r\n cardLastFourDigits: string;\r\n cardBalance: number;\r\n\r\n constructor(obj?: Portico.Services.Legacy.CardService.Models.CardStatusResultModel){\r\n this.memberNumber = null;\r\n this.cardActivationDate = null;\r\n this.cardEndDate = null;\r\n this.cardLastFourDigits = null;\r\n this.cardBalance = null;\r\n\r\n if(obj){\r\n this.memberNumber = obj.memberNumber || null;\r\n this.cardActivationDate = typeof obj.cardActivationDate === 'string' ? new Date(obj.cardActivationDate) : obj.cardActivationDate || null;\r\n this.cardEndDate = typeof obj.cardEndDate === 'string' ? new Date(obj.cardEndDate) : obj.cardEndDate || null;\r\n this.cardLastFourDigits = obj.cardLastFourDigits || null;\r\n this.cardBalance = obj.cardBalance || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.CardService.Models.CardStatusResultModel {\r\n return {\r\n memberNumber: this.memberNumber,\r\n cardActivationDate: this.cardActivationDate,\r\n cardEndDate: this.cardEndDate,\r\n cardLastFourDigits: this.cardLastFourDigits,\r\n cardBalance: this.cardBalance,\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class ClientIdentifiersModel {\r\n sourceId: string;\r\n alternateId: string;\r\n alternateIdType: string;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.ClientIdentifiersModel){\r\n this.sourceId = null;\r\n this.alternateId = null;\r\n this.alternateIdType = null;\r\n\r\n if(obj){\r\n this.sourceId = obj.sourceId || null;\r\n this.alternateId = obj.alternateId || null;\r\n this.alternateIdType = obj.alternateIdType || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.ClientIdentifiersModel {\r\n return {\r\n sourceId: this.sourceId,\r\n alternateId: this.alternateId,\r\n alternateIdType: this.alternateIdType,\r\n };\r\n }\r\n } \r\n}","/**\r\n * TC - Enrollment Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n *\r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Models.Legacy {\r\n import models = Portico.Models.Legacy;\r\n export class CreatePrescriberRequestModel {\r\n firstName: string;\r\n lastName: string;\r\n phoneNumbers: Array;\r\n address1: string;\r\n address2: string;\r\n city: string;\r\n country: string;\r\n state: string;\r\n postalCode: string;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.CreatePrescriberRequestModel){\r\n this.firstName = null;\r\n this.lastName = null;\r\n this.phoneNumbers = null;\r\n this.address1 = null;\r\n this.address2 = null;\r\n this.city = null;\r\n this.country = null;\r\n this.state = null;\r\n this.postalCode = null;\r\n\r\n if(obj){\r\n this.firstName = obj.firstName || null;\r\n this.lastName = obj.lastName || null;\r\n this.phoneNumbers = (obj.phoneNumbers || []).map(item => new models.PhoneNumberModel(item || null));\r\n this.address1 = obj.address1 || null;\r\n this.address2 = obj.address2 || null;\r\n this.city = obj.city || null;\r\n this.country = obj.country || null;\r\n this.state = obj.state || null;\r\n this.postalCode = obj.postalCode || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.CreatePrescriberRequestModel {\r\n return {\r\n firstName: this.firstName,\r\n lastName: this.lastName,\r\n phoneNumbers: this.phoneNumbers.map(item => item.toModel()),\r\n address1: this.address1,\r\n address2: this.address2,\r\n city: this.city,\r\n country: this.country,\r\n state: this.state,\r\n postalCode: this.postalCode,\r\n };\r\n }\r\n }\r\n}\r\n","/**\r\n * TC - Enrollment Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n *\r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Models.Legacy {\r\n import models = Portico.Models.Legacy;\r\n export class CreatePrescriberResultModel {\r\n prescriberId: string;\r\n firstName: string;\r\n lastName: string;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.CreatePrescriberResultModel){\r\n this.prescriberId = null;\r\n this.firstName = null;\r\n this.lastName = null;\r\n\r\n if(obj){\r\n this.prescriberId = obj.prescriberId || null;\r\n this.firstName = obj.firstName || null;\r\n this.lastName = obj.lastName || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.CreatePrescriberResultModel {\r\n return {\r\n prescriberId: this.prescriberId,\r\n firstName: this.firstName,\r\n lastName: this.lastName,\r\n };\r\n }\r\n }\r\n}\r\n","/**\r\n * TC - Enrollment Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n *\r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Models.Legacy {\r\n import models = Portico.Models.Legacy;\r\n export class CreateSiteRequestModel {\r\n siteVerified: boolean;\r\n name: string;\r\n phoneNumbers: Array;\r\n address1: string;\r\n address2: string;\r\n city: string;\r\n country: string;\r\n state: string;\r\n postalCode: string;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.CreateSiteRequestModel){\r\n this.siteVerified = null;\r\n this.name = null;\r\n this.phoneNumbers = null;\r\n this.address1 = null;\r\n this.address2 = null;\r\n this.city = null;\r\n this.country = null;\r\n this.state = null;\r\n this.postalCode = null;\r\n\r\n if(obj){\r\n this.siteVerified = obj.siteVerified || null;\r\n this.name = obj.name || null;\r\n this.phoneNumbers = (obj.phoneNumbers || []).map(item => new models.PhoneNumberModel(item || null));\r\n this.address1 = obj.address1 || null;\r\n this.address2 = obj.address2 || null;\r\n this.city = obj.city || null;\r\n this.country = obj.country || null;\r\n this.state = obj.state || null;\r\n this.postalCode = obj.postalCode || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.CreateSiteRequestModel {\r\n return {\r\n siteVerified: this.siteVerified,\r\n name: this.name,\r\n phoneNumbers: this.phoneNumbers.map(item => item.toModel()),\r\n address1: this.address1,\r\n address2: this.address2,\r\n city: this.city,\r\n country: this.country,\r\n state: this.state,\r\n postalCode: this.postalCode,\r\n };\r\n }\r\n }\r\n}\r\n","/**\r\n * TC - Enrollment Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n *\r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Models.Legacy {\r\n import models = Portico.Models.Legacy;\r\n export class CreateSiteResultModel {\r\n siteId: string;\r\n siteVerified: boolean;\r\n createDate: Date;\r\n lastUpdateDate: Date;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.CreateSiteResultModel){\r\n this.siteId = null;\r\n this.siteVerified = null;\r\n this.createDate = null;\r\n this.lastUpdateDate = null;\r\n\r\n if(obj){\r\n this.siteId = obj.siteId || null;\r\n this.siteVerified = obj.siteVerified || null;\r\n this.createDate = typeof obj.createDate === 'string' ? new Date(obj.createDate) : obj.createDate || null;\r\n this.lastUpdateDate = typeof obj.lastUpdateDate === 'string' ? new Date(obj.lastUpdateDate) : obj.lastUpdateDate || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.CreateSiteResultModel {\r\n return {\r\n siteId: this.siteId,\r\n siteVerified: this.siteVerified,\r\n createDate: this.createDate,\r\n lastUpdateDate: this.lastUpdateDate,\r\n };\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Legacy {\r\n \r\n export class EnrollmentDemographicsModel {\r\n personId: number;\r\n firstName: string;\r\n lastName: string;\r\n gender: string;\r\n dateOfBirth: string;\r\n email: string;\r\n homePhone: string;\r\n mobilePhone: string;\r\n address1: string;\r\n address2: string;\r\n city: string;\r\n state: string;\r\n postalCode: string;\r\n country: string;\r\n memberNumber: string;\r\n communicationTypes: CommunicationTypesEnum;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.EnrollmentDemographicsModel){\r\n this.personId = null;\r\n this.firstName = null;\r\n this.lastName = null;\r\n this.gender = null;\r\n this.dateOfBirth = null;\r\n this.email = null;\r\n this.homePhone = null;\r\n this.mobilePhone = null;\r\n this.address1 = null;\r\n this.address2 = null;\r\n this.city = null;\r\n this.state = null;\r\n this.postalCode = null;\r\n this.country = null;\r\n this.memberNumber = null;\r\n this.communicationTypes = null;\r\n\r\n if(obj){\r\n this.personId = obj.personId || null;\r\n this.firstName = obj.firstName || null;\r\n this.lastName = obj.lastName || null;\r\n this.gender = obj.gender || null;\r\n this.dateOfBirth = obj.dateOfBirth || null;\r\n this.email = obj.email || null;\r\n this.homePhone = obj.homePhone || null;\r\n this.mobilePhone = obj.mobilePhone || null;\r\n this.address1 = obj.address1 || null;\r\n this.address2 = obj.address2 || null;\r\n this.city = obj.city || null;\r\n this.state = obj.state || null;\r\n this.postalCode = obj.postalCode || null;\r\n this.country = obj.country || null;\r\n this.memberNumber = obj.memberNumber || null;\r\n this.communicationTypes = obj.communicationTypes || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.EnrollmentDemographicsModel {\r\n return {\r\n personId: this.personId,\r\n firstName: this.firstName,\r\n lastName: this.lastName,\r\n gender: this.gender,\r\n dateOfBirth: this.dateOfBirth,\r\n email: this.email,\r\n homePhone: this.homePhone,\r\n mobilePhone: this.mobilePhone,\r\n address1: this.address1,\r\n address2: this.address2,\r\n city: this.city,\r\n state: this.state,\r\n postalCode: this.postalCode,\r\n country: this.country,\r\n memberNumber: this.memberNumber,\r\n communicationTypes: this.communicationTypes,\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class EnrollmentHistoryModel {\r\n enrollmentId: string;\r\n claimEligibilityDate: Date;\r\n enrollmentStartDate: Date;\r\n enrollmentEndDate: Date;\r\n\t\tenrollmentStatus: string;\r\n\t\ttotalBenefitAmount: number;\r\n\t\tremainingBenefitAmount: number;\r\n\t\ttotalPaidAmount: number;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.EnrollmentHistoryModel){\r\n this.enrollmentId = null;\r\n this.claimEligibilityDate = null;\r\n this.enrollmentStartDate = null;\r\n this.enrollmentEndDate = null;\r\n\t\t\tthis.enrollmentStatus = null;\r\n\t\t\tthis.totalBenefitAmount = null;\r\n\t\t\tthis.remainingBenefitAmount = null;\r\n\t\t\tthis.totalPaidAmount = null;\r\n\r\n if(obj){\r\n this.enrollmentId = obj.enrollmentId || null;\r\n this.claimEligibilityDate = typeof obj.claimEligibilityDate === 'string' ? new Date(obj.claimEligibilityDate) : obj.claimEligibilityDate || null;\r\n this.enrollmentStartDate = typeof obj.enrollmentStartDate === 'string' ? new Date(obj.enrollmentStartDate) : obj.enrollmentStartDate || null;\r\n this.enrollmentEndDate = typeof obj.enrollmentEndDate === 'string' ? new Date(obj.enrollmentEndDate) : obj.enrollmentEndDate || null;\r\n\t\t\t\tthis.enrollmentStatus = obj.enrollmentStatus || null;\r\n\t\t\t\tthis.totalBenefitAmount = obj.totalBenefitAmount || null;\r\n\t\t\t\tthis.remainingBenefitAmount = obj.remainingBenefitAmount || null;\r\n\t\t\t\tthis.totalPaidAmount = obj.totalPaidAmount || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.EnrollmentHistoryModel {\r\n return {\r\n enrollmentId: this.enrollmentId,\r\n claimEligibilityDate: this.claimEligibilityDate,\r\n enrollmentStartDate: this.enrollmentStartDate,\r\n enrollmentEndDate: this.enrollmentEndDate,\r\n\t\t\t\tenrollmentStatus: this.enrollmentStatus,\r\n\t\t\t\ttotalBenefitAmount: this.totalBenefitAmount,\r\n\t\t\t\tremainingBenefitAmount: this.remainingBenefitAmount,\r\n\t\t\t\ttotalPaidAmount: this.totalPaidAmount\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class EnrollmentInsVerRequestModel {\r\n insuranceVerification: InsuranceVerificationModel;\r\n survey: Array;\r\n demographics: EnrollmentDemographicsModel;\r\n clientIdentifiers: ClientIdentifiersModel;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.EnrollmentInsVerRequestModel){\r\n this.insuranceVerification = null;\r\n this.survey = null;\r\n this.demographics = null;\r\n this.clientIdentifiers = null;\r\n\r\n if(obj){\r\n this.insuranceVerification = new InsuranceVerificationModel(obj.insuranceVerification || null);\r\n this.survey = (obj.survey || []).map(item => new SurveyQuestionModel(item || null));\r\n this.demographics = new EnrollmentDemographicsModel(obj.demographics || null);\r\n this.clientIdentifiers = new ClientIdentifiersModel(obj.clientIdentifiers || null);\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.EnrollmentInsVerRequestModel {\r\n return {\r\n insuranceVerification: this.insuranceVerification.toModel(),\r\n survey: this.survey.map(item => item.toModel()),\r\n demographics: this.demographics.toModel(),\r\n clientIdentifiers: this.clientIdentifiers.toModel(),\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n export class EnrollmentRequestModel {\r\n survey: Array;\r\n demographics: EnrollmentDemographicsModel;\r\n clientIdentifiers: ClientIdentifiersModel;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.EnrollmentRequestModel){\r\n this.survey = null;\r\n this.demographics = null;\r\n this.clientIdentifiers = null;\r\n\r\n if(obj){\r\n this.survey = (obj.survey || []).map(item => new SurveyQuestionModel(item || null));\r\n this.demographics = new EnrollmentDemographicsModel(obj.demographics || null);\r\n this.clientIdentifiers = new ClientIdentifiersModel(obj.clientIdentifiers || null);\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.EnrollmentRequestModel {\r\n return {\r\n survey: this.survey.map(item => item.toModel()),\r\n demographics: this.demographics.toModel(),\r\n clientIdentifiers: this.clientIdentifiers.toModel(),\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class EnrollmentResultModel {\r\n bin: string;\r\n cardActivationDate: Date;\r\n cardEndDate: Date;\r\n sponsorNumber: string;\r\n memberNumber: string;\r\n groupNumber: string;\r\n totalBenefitAmount: number;\r\n remainingBenefitAmount: number;\r\n totalPaidAmount: number;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.EnrollmentResultModel){\r\n this.bin = null;\r\n this.cardActivationDate = null;\r\n this.cardEndDate = null;\r\n this.sponsorNumber = null;\r\n this.memberNumber = null;\r\n this.groupNumber = null;\r\n this.totalBenefitAmount = null;\r\n this.remainingBenefitAmount = null;\r\n this.totalPaidAmount = null;\r\n\r\n if(obj){\r\n this.bin = obj.bin || null;\r\n this.cardActivationDate = typeof obj.cardActivationDate === 'string' ? new Date(obj.cardActivationDate) : obj.cardActivationDate || null;\r\n this.cardEndDate = typeof obj.cardEndDate === 'string' ? new Date(obj.cardEndDate) : obj.cardEndDate || null;\r\n this.sponsorNumber = obj.sponsorNumber || null;\r\n this.memberNumber = obj.memberNumber || null;\r\n this.groupNumber = obj.groupNumber || null;\r\n this.totalBenefitAmount = obj.totalBenefitAmount || null;\r\n this.remainingBenefitAmount = obj.remainingBenefitAmount || null;\r\n this.totalPaidAmount = obj.totalPaidAmount || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.EnrollmentResultModel {\r\n return {\r\n bin: this.bin,\r\n cardActivationDate: this.cardActivationDate,\r\n cardEndDate: this.cardEndDate,\r\n sponsorNumber: this.sponsorNumber,\r\n memberNumber: this.memberNumber,\r\n groupNumber: this.groupNumber,\r\n totalBenefitAmount: this.totalBenefitAmount,\r\n remainingBenefitAmount: this.remainingBenefitAmount,\r\n totalPaidAmount: this.totalPaidAmount,\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class EnrollmentUpdateRequestModel {\r\n demographics: EnrollmentDemographicsModel;\r\n clientIdentifiers: ClientIdentifiersModel;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.EnrollmentUpdateRequestModel){\r\n this.demographics = null;\r\n this.clientIdentifiers = null;\r\n\r\n if(obj){\r\n this.demographics = new EnrollmentDemographicsModel(obj.demographics || null);\r\n this.clientIdentifiers = new ClientIdentifiersModel(obj.clientIdentifiers || null);\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.EnrollmentUpdateRequestModel {\r\n return {\r\n demographics: this.demographics.toModel(),\r\n clientIdentifiers: this.clientIdentifiers.toModel(),\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class EnrollmentWithPdfResultModel {\r\n base64PdfFile: string;\r\n bin: string;\r\n cardActivationDate: Date;\r\n cardEndDate: Date;\r\n sponsorNumber: string;\r\n memberNumber: string;\r\n groupNumber: string;\r\n totalBenefitAmount: number;\r\n remainingBenefitAmount: number;\r\n totalPaidAmount: number;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.EnrollmentWithPdfResultModel){\r\n this.base64PdfFile = null;\r\n this.bin = null;\r\n this.cardActivationDate = null;\r\n this.cardEndDate = null;\r\n this.sponsorNumber = null;\r\n this.memberNumber = null;\r\n this.groupNumber = null;\r\n this.totalBenefitAmount = null;\r\n this.remainingBenefitAmount = null;\r\n this.totalPaidAmount = null;\r\n\r\n if(obj){\r\n this.base64PdfFile = obj.base64PdfFile || null;\r\n this.bin = obj.bin || null;\r\n this.cardActivationDate = typeof obj.cardActivationDate === 'string' ? new Date(obj.cardActivationDate) : obj.cardActivationDate || null;\r\n this.cardEndDate = typeof obj.cardEndDate === 'string' ? new Date(obj.cardEndDate) : obj.cardEndDate || null;\r\n this.sponsorNumber = obj.sponsorNumber || null;\r\n this.memberNumber = obj.memberNumber || null;\r\n this.groupNumber = obj.groupNumber || null;\r\n this.totalBenefitAmount = obj.totalBenefitAmount || null;\r\n this.remainingBenefitAmount = obj.remainingBenefitAmount || null;\r\n this.totalPaidAmount = obj.totalPaidAmount || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.EnrollmentWithPdfResultModel {\r\n return {\r\n base64PdfFile: this.base64PdfFile,\r\n bin: this.bin,\r\n cardActivationDate: this.cardActivationDate,\r\n cardEndDate: this.cardEndDate,\r\n sponsorNumber: this.sponsorNumber,\r\n memberNumber: this.memberNumber,\r\n groupNumber: this.groupNumber,\r\n totalBenefitAmount: this.totalBenefitAmount,\r\n remainingBenefitAmount: this.remainingBenefitAmount,\r\n totalPaidAmount: this.totalPaidAmount,\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class GuardianInfoModel {\r\n personId: number;\r\n namePrefix: string;\r\n firstName: string;\r\n middleName: string;\r\n lastName: string;\r\n nameSuffix: string;\r\n dateOfBirth: string;\r\n relationship: RelationshipEnum;\r\n primaryPhoneNumber: PhoneNumberModel;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.GuardianInfoModel){\r\n this.personId = null;\r\n this.namePrefix = null;\r\n this.firstName = null;\r\n this.middleName = null;\r\n this.lastName = null;\r\n this.nameSuffix = null;\r\n this.dateOfBirth = null;\r\n this.relationship = null;\r\n this.primaryPhoneNumber = null;\r\n\r\n if(obj){\r\n this.personId = obj.personId || null;\r\n this.namePrefix = obj.namePrefix || null;\r\n this.firstName = obj.firstName || null;\r\n this.middleName = obj.middleName || null;\r\n this.lastName = obj.lastName || null;\r\n this.nameSuffix = obj.nameSuffix || null;\r\n this.dateOfBirth = obj.dateOfBirth || null;\r\n this.relationship = obj.relationship || null;\r\n this.primaryPhoneNumber = new PhoneNumberModel(obj.primaryPhoneNumber || null);\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.GuardianInfoModel {\r\n return {\r\n personId: this.personId,\r\n namePrefix: this.namePrefix,\r\n firstName: this.firstName,\r\n middleName: this.middleName,\r\n lastName: this.lastName,\r\n nameSuffix: this.nameSuffix,\r\n dateOfBirth: this.dateOfBirth,\r\n relationship: this.relationship,\r\n primaryPhoneNumber: this.primaryPhoneNumber.toModel(),\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class InsuranceVerificationModel {\r\n insuranceType: InsuranceTypeEnum;\r\n payerName: string;\r\n payerPhone: string;\r\n bin: string;\r\n pcn: string;\r\n payerMedicalId: string;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.InsuranceVerificationModel){\r\n this.insuranceType = null;\r\n this.payerName = null;\r\n this.payerPhone = null;\r\n this.bin = null;\r\n this.pcn = null;\r\n this.payerMedicalId = null;\r\n\r\n if(obj){\r\n this.insuranceType = obj.insuranceType || null;\r\n this.payerName = obj.payerName || null;\r\n this.payerPhone = obj.payerPhone || null;\r\n this.bin = obj.bin || null;\r\n this.pcn = obj.pcn || null;\r\n this.payerMedicalId = obj.payerMedicalId || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.InsuranceVerificationModel {\r\n return {\r\n insuranceType: this.insuranceType,\r\n payerName: this.payerName,\r\n payerPhone: this.payerPhone,\r\n bin: this.bin,\r\n pcn: this.pcn,\r\n payerMedicalId: this.payerMedicalId,\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class IResponseModel {\r\n success: boolean;\r\n messages: Array;\r\n\r\n constructor(obj?: Portico.Services.Legacy.CardService.Models.IResponseModel){\r\n this.success = null;\r\n this.messages = null;\r\n\r\n if(obj){\r\n this.success = obj.success || null;\r\n this.messages = (obj.messages || []).concat();\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.CardService.Models.IResponseModel {\r\n return {\r\n success: this.success,\r\n messages: (this.messages || []).concat()\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class IResponseModelCardStatusResultModel {\r\n data: CardStatusResultModel;\r\n success: boolean;\r\n messages: Array;\r\n\r\n constructor(obj?: Portico.Services.Legacy.CardService.Models.IResponseModelCardStatusResultModel){\r\n this.data = null;\r\n this.success = null;\r\n this.messages = null;\r\n\r\n if(obj){\r\n this.data = new CardStatusResultModel(obj.data || null);\r\n this.success = obj.success || null;\r\n this.messages = (obj.messages || []).concat();\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.CardService.Models.IResponseModelCardStatusResultModel {\r\n return {\r\n data: this.data.toModel(),\r\n success: this.success,\r\n messages: (this.messages || []).concat()\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n\r\n export class IResponseModelMemberNumberStatusResultModel {\r\n success: boolean;\r\n messages: Array;\r\n\t\tdata: MemberNumberStatusResultModel\r\n constructor(obj?: Portico.Services.Legacy.CardService.Models.IResponseModelMemberNumberStatusResultModel) {\r\n this.success = null;\r\n this.messages = null;\r\n this.data = null;\r\n\r\n if (obj) {\r\n this.success = obj.success || false;\r\n this.messages = (obj.messages || []).concat();\r\n this.data = obj.data ? new MemberNumberStatusResultModel(obj.data || null):null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.CardService.Models.IResponseModelMemberNumberStatusResultModel {\r\n return {\r\n success: this.success,\r\n messages: (this.messages || []).concat(),\r\n\t\t\t\tdata: this.data ? this.data.toModel() : null\r\n };\r\n }\r\n }\r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class IResponseModelMultiCardCreateResultModel {\r\n data: MultiCardCreateResultModel;\r\n success: boolean;\r\n messages: Array;\r\n\r\n constructor(obj?: Portico.Services.Legacy.CardService.Models.IResponseModelMultiCardCreateResultModel){\r\n this.data = null;\r\n this.success = null;\r\n this.messages = null;\r\n\r\n if(obj){\r\n this.data = new MultiCardCreateResultModel(obj.data || null);\r\n this.success = obj.success || null;\r\n this.messages = (obj.messages || []).concat();\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.CardService.Models.IResponseModelMultiCardCreateResultModel {\r\n return {\r\n data: this.data.toModel(),\r\n success: this.success,\r\n messages: (this.messages || []).concat()\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class IResponseModelReplaceCardResultModel {\r\n data: ReplaceCardResultModel;\r\n success: boolean;\r\n messages: Array;\r\n\r\n constructor(obj?: Portico.Services.Legacy.CardService.Models.IResponseModelReplaceCardResultModel){\r\n this.data = null;\r\n this.success = null;\r\n this.messages = null;\r\n\r\n if(obj){\r\n this.data = new ReplaceCardResultModel(obj.data || null);\r\n this.success = obj.success || null;\r\n this.messages = (obj.messages || []).concat();\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.CardService.Models.IResponseModelReplaceCardResultModel {\r\n return {\r\n data: this.data.toModel(),\r\n success: this.success,\r\n messages: (this.messages || []).concat()\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n\texport type enrollmentInputType = EnrollmentResultModel;\r\n\r\n\texport interface ILegacy {\r\n\t\tenrollmentInput: enrollmentInputType; // todo: try to avoid doing this? this doesn't appear to be used anywhere.\r\n\t\tenrollmentInputEdit: enrollmentInputType; // todo: try to avoid doing this? this doesn't appear to be used anywhere.\r\n\t}\r\n\r\n\texport class Legacy implements ILegacy {\r\n\t\tenrollmentInput: enrollmentInputType;\r\n\t\tenrollmentInputEdit: enrollmentInputType;\r\n\r\n\t\tconstructor(obj?: ILegacy) {\r\n\t\t\tif (obj) {\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","namespace Portico.Models.Legacy {\r\n\r\n\texport enum AnswerType {\r\n\t\t// 1 Numeric\r\n\t\t// 2 Text\r\n\t\t// 3 Date\r\n\t\t// 4 Member Number\r\n\t\t// 5 Debit Card Account Number\r\n\t\tNumeric = 1,\r\n\t\tText = 2,\r\n\t\tDate = 3,\r\n\t\tMemberNumber = 4,\r\n\t\tDebitCardAccountNumber = 5\r\n\t}\r\n\texport enum QuestionType {\r\n\t\t// 1\tMember Number Collector\r\n\t\t// 2\tPatient Object Collector\r\n\t\t// 3\tDocument ID\r\n\t\t// 4\tDebit Card Number Collector\r\n\t\t// 5\tMultiple Choice\r\n\t\t// 6\tMultiple Choice Multi Answer\r\n\t\t// 7\tFree Form\r\n\t\t// 8\tDate\r\n\t\t// 9\tCampaign Member ID Collector\r\n\t\t// 10\tCampaign Stream ID Collector\r\n\t\tMemberNumberCollector = 1,\r\n\t\tPatientObjectCollector = 2,\r\n\t\tDocumentId = 3,\r\n\t\tDebitCardNumberCollector = 4,\r\n\t\tMultipleChoice = 5,\r\n\t\tMultipleChoiceMultipleAnswer = 6,\r\n\t\tFreeForm = 7,\r\n\t\tDate = 8,\r\n\t\tCampaignMemberIdCollector = 9,\r\n\t\tCampaignStreamIdCollector = 10\r\n\t}\r\n\r\n\texport enum CommunicationTypes {\r\n\t\tNone = 0,\r\n\t\tLetter = 1,\r\n\t\tEmail = 2,\r\n\t\tLetterEmail = 3,\r\n\t\tSms = 4,\r\n\t\tLetterSms = 5,\r\n\t\tEmailSms = 6,\r\n\t\tLetterEmailSms = 7,\r\n\t\tNUMBER_8 = 8\r\n\t}\r\n\r\n\texport enum InsuranceType {\r\n\t\tPharmacy = 1,\r\n\t\tMedical = 2,\r\n\t\tBoth = 3\r\n\t}\r\n\r\n\texport enum NameMatchQueryTypeEnum {\r\n\t\tExact = 0,\r\n\t\tStartsWith = 1,\r\n\t\tEndsWith = 2,\r\n\t\tContains = 3\r\n\t}\r\n\r\n\texport enum EligibilityStatusCode {\r\n\t\tValidButIneligible = 0,\r\n\t\tEligiblePendingSurvey = 1,\r\n\t\tPendingEnrollment = 2,\r\n\t\tInvalidMemberNumber = 3,\r\n\t\tExpiredActivationPeriod = 4,\r\n\t\tReadyToActivate = 5,\r\n\t\tTransferToTrialcard = 6\r\n\t}\r\n\r\n\texport enum CardAlternateIdTypeEnum {\r\n\t\tPreviousClientId = 1,\r\n\t\tMobileNumber = 2,\r\n\t\tServiceRequestNumber = 3,\r\n\t\tThirdPartyId = 4\r\n\t}\r\n\r\n\texport enum EligibilityStatusCodeEnum {\r\n\t\tNUMBER_0 = 0,\r\n\t\tNUMBER_1 = 1,\r\n\t\tNUMBER_2 = 2,\r\n\t\tNUMBER_3 = 3,\r\n\t\tNUMBER_4 = 4,\r\n\t\tNUMBER_5 = 5,\r\n\t\tNUMBER_6 = 6,\r\n\t\tNUMBER_MINUS_1 = -1\r\n\t}\r\n\texport enum CommunicationTypesEnum {\r\n\t\tNone = 0,\r\n\t\tLetter = 1,\r\n\t\tEmail = 2,\r\n\t\tLetterEmail = 3,\r\n\t\tSms = 4,\r\n\t\tLetterSms = 5,\r\n\t\tEmailSms = 6,\r\n\t\tLetterEmailSms = 7\r\n\t}\r\n\texport enum PrescriberCommunicationTypeEnum {\r\n\t\tNone = 0,\r\n\t\tLetter = 1,\r\n\t\tEmail = 2,\r\n\t\tLetterEmail = 3,\r\n\t\tSms = 4,\r\n\t\tLetterSms = 5,\r\n\t\tEmailSms = 6,\r\n\t\tLetterEmailSms = 7,\r\n\t\tNUMBER_8 = 8\r\n }\r\n export enum PrescriberCommunicationOptionEnum {\r\n NUMBER_0 = 0,\r\n NUMBER_1 = 1,\r\n NUMBER_2 = 2,\r\n }\r\n\texport enum CommunicationTypeEnum {\r\n\t\tNone = 0,\r\n\t\tLetter = 1,\r\n\t\tEmail = 2,\r\n\t\tLetterEmail = 3,\r\n\t\tSms = 4,\r\n\t\tLetterSms = 5,\r\n\t\tEmailSms = 6,\r\n\t\tLetterEmailSms = 7,\r\n\t\tNUMBER_8 = 8\r\n }\r\n export enum CommunicationOptionEnum {\r\n NUMBER_0 = 0,\r\n NUMBER_1 = 1,\r\n NUMBER_2 = 2,\r\n }\r\n\texport enum PaymentTypeEnum {\r\n\t\tNUMBER_0 = 0,\r\n\t\tNUMBER_1 = 1,\r\n\t\tNUMBER_2 = 2,\r\n\t\tNUMBER_3 = 3\r\n\t}\r\n\texport enum SiteTypeEnum {\r\n\t\tNUMBER_0 = 0,\r\n\t\tNUMBER_1 = 1,\r\n\t\tNUMBER_2 = 2\r\n\t}\r\n export enum SiteCommunicationTypesEnum {\r\n\t\tNUMBER_0 = 0,\r\n\t\tNUMBER_1 = 1,\r\n\t\tNUMBER_2 = 2,\r\n\t\tNUMBER_3 = 3,\r\n\t\tNUMBER_4 = 4,\r\n\t\tNUMBER_5 = 5,\r\n\t\tNUMBER_6 = 6,\r\n\t\tNUMBER_7 = 7,\r\n\t\tNUMBER_8 = 8\r\n }\r\n export enum SiteCommunicationOptionEnum {\r\n NUMBER_0 = 0,\r\n NUMBER_1 = 1,\r\n NUMBER_2 = 2,\r\n }\r\n export enum SourceIdEnum {\r\n NUMBER_0 = 0,\r\n NUMBER_5 = 6,\r\n NUMBER_6 = 5,\r\n NUMBER_7 = 7,\r\n }\r\n\texport enum RelationshipEnum {\r\n NUMBER_0 = 0,\r\n NUMBER_1 = 1,\r\n NUMBER_2 = 2\r\n\t}\r\n\texport enum InsuranceTypeEnum {\r\n NUMBER_1 = 1,\r\n NUMBER_2 = 2,\r\n NUMBER_3 = 3\r\n\t}\r\n\texport enum FirstNameQueryTypeEnum {\r\n\t\tExact = 0,\r\n\t\tStartsWith = 1,\r\n\t\tEndsWith = 2,\r\n\t\tContains = 3\r\n\t}\r\n\texport enum LastNameQueryTypeEnum {\r\n\t\tExact = 0,\r\n\t\tStartsWith = 1,\r\n\t\tEndsWith = 2,\r\n\t\tContains = 3\r\n }\r\n export enum PhoneTypeEnum {\r\n NUMBER_0 = 0,\r\n NUMBER_1 = 1,\r\n NUMBER_2 = 2,\r\n NUMBER_3 = 3\r\n }\r\n}","namespace Portico.Models.Legacy {\r\n export class MemberNumberStatusResultModel {\r\n\t\tredemptions: number;\r\n\t\tmemberNumberStatus: string;\r\n\t\tmemberNumberStatusId: string;\r\n bin: string;\r\n cardActivationDate: Date;\r\n cardEndDate: Date;\r\n sponsorNumber: string;\r\n memberNumber: string;\r\n groupNumber: string;\r\n totalBenefitAmount: number;\r\n remainingBenefitAmount: number;\r\n totalPaidAmount: number;\r\n\r\n constructor(obj?: Portico.Services.Legacy.CardService.Models.MemberNumberStatusResultModel) {\r\n\t\t\tthis.redemptions = null;\r\n\t\t\tthis.memberNumberStatus = null;\r\n\t\t\tthis.memberNumberStatusId = null;\r\n this.bin = null;\r\n this.cardActivationDate = null;\r\n this.cardEndDate = null;\r\n this.sponsorNumber = null;\r\n this.memberNumber = null;\r\n this.groupNumber = null;\r\n this.totalBenefitAmount = null;\r\n this.remainingBenefitAmount = null;\r\n this.totalPaidAmount = null;\r\n\r\n if (obj) {\r\n\t\t\t\tthis.redemptions = obj.redemptions || null;\r\n\t\t\t\tthis.memberNumberStatus = obj.memberNumberStatus || null;\r\n\t\t\t\tthis.memberNumberStatusId = obj.memberNumberStatusId || null;\r\n this.bin = obj.bin || null;\r\n this.cardActivationDate || null;\r\n this.cardEndDate = obj.cardEndDate || null;\r\n this.sponsorNumber = obj.sponsorNumber || null;\r\n this.memberNumber = obj.memberNumber || null;\r\n this.groupNumber = obj.groupNumber || null;\r\n this.totalBenefitAmount = obj.totalBenefitAmount || null;\r\n this.remainingBenefitAmount = obj.remainingBenefitAmount || null;\r\n this.totalPaidAmount = obj.totalPaidAmount || null;\r\n }\r\n }\r\n\r\n\t\ttoModel(): Portico.Services.Legacy.CardService.Models.MemberNumberStatusResultModel {\r\n\t\t\treturn {\r\n\t\t\t\tredemptions: this.redemptions,\r\n\t\t\t\tmemberNumberStatus: this.memberNumberStatus,\r\n\t\t\t\tmemberNumberStatusId: this.memberNumberStatusId,\r\n\t\t\t\tbin: this.bin,\r\n\t\t\t\tcardActivationDate: this.cardActivationDate,\r\n\t\t\t\tcardEndDate: this.cardEndDate,\r\n\t\t\t\tsponsorNumber: this.sponsorNumber,\r\n\t\t\t\tmemberNumber: this.memberNumber,\r\n\t\t\t\tgroupNumber: this.groupNumber,\r\n\t\t\t\ttotalBenefitAmount: this.totalBenefitAmount,\r\n\t\t\t\tremainingBenefitAmount: this.remainingBenefitAmount,\r\n\t\t\t\ttotalPaidAmount: this.totalPaidAmount,\r\n\t\t\t};\r\n }\r\n }\t\r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class MultiCardCreateResultModel {\r\n results: Array;\r\n\r\n constructor(obj?: Portico.Services.Legacy.CardService.Models.MultiCardCreateResultModel){\r\n this.results = null;\r\n\r\n if(obj){\r\n this.results = (obj.results || []).map(item => new CardCreatedModel(item || null));\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.CardService.Models.MultiCardCreateResultModel {\r\n return {\r\n results: this.results.map(item => item.toModel()),\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class PatientLookupRequestModel {\r\n firstName: string;\r\n lastName: string;\r\n gender: string;\r\n dateOfBirth: string;\r\n postalCode: string;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.PatientLookupRequestModel){\r\n this.firstName = null;\r\n this.lastName = null;\r\n this.gender = null;\r\n this.dateOfBirth = null;\r\n this.postalCode = null;\r\n\r\n if(obj){\r\n this.firstName = obj.firstName || null;\r\n this.lastName = obj.lastName || null;\r\n this.gender = obj.gender || null;\r\n this.dateOfBirth = obj.dateOfBirth || null;\r\n this.postalCode = obj.postalCode || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.PatientLookupRequestModel {\r\n return {\r\n firstName: this.firstName,\r\n lastName: this.lastName,\r\n gender: this.gender,\r\n dateOfBirth: this.dateOfBirth,\r\n postalCode: this.postalCode,\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class PatientLookupResultModel {\r\n patientId: string;\r\n memberNumber: string;\r\n enrollments: Array;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.PatientLookupResultModel){\r\n this.patientId = null;\r\n this.memberNumber = null;\r\n this.enrollments = null;\r\n\r\n if(obj){\r\n this.patientId = obj.patientId || null;\r\n this.memberNumber = obj.memberNumber || null;\r\n this.enrollments = (obj.enrollments || []).map(item => new EnrollmentHistoryModel(item || null));\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.PatientLookupResultModel {\r\n return {\r\n patientId: this.patientId,\r\n memberNumber: this.memberNumber,\r\n enrollments: this.enrollments.map(item => item.toModel()),\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class PatientSearchRecordModel {\r\n firstName: string;\r\n lastName: string;\r\n dateOfBirth: Date;\r\n address1: string;\r\n city: string;\r\n state: string;\r\n postalCode: string;\r\n country: string;\r\n memberNumber: string;\r\n cardStartDate: Date;\r\n cardEndDate: Date;\r\n cardActivationDate: Date;\r\n eligibilityStatusCode: EligibilityStatusCodeEnum;\r\n eligibilityStatusDescription: string;\r\n eligibilityDate: string;\r\n bin: string;\r\n sponsorNumber: string;\r\n personId: number;\r\n alternateCardIds: Array;\r\n email: string;\r\n phone: string;\r\n groupNumber: string;\r\n totalBenefitAmount: number;\r\n remainingBenefitAmount: number;\r\n totalPaidAmount: number;\r\n communicationTypes: CommunicationTypesEnum;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.PatientSearchRecordModel){\r\n this.firstName = null;\r\n this.lastName = null;\r\n this.dateOfBirth = null;\r\n this.address1 = null;\r\n this.city = null;\r\n this.state = null;\r\n this.postalCode = null;\r\n this.country = null;\r\n this.memberNumber = null;\r\n this.cardStartDate = null;\r\n this.cardEndDate = null;\r\n this.cardActivationDate = null;\r\n this.eligibilityStatusCode = null;\r\n this.eligibilityStatusDescription = null;\r\n this.eligibilityDate = null;\r\n this.bin = null;\r\n this.sponsorNumber = null;\r\n this.personId = null;\r\n this.alternateCardIds = null;\r\n this.email = null;\r\n this.phone = null;\r\n this.groupNumber = null;\r\n this.totalBenefitAmount = null;\r\n this.remainingBenefitAmount = null;\r\n this.totalPaidAmount = null;\r\n this.communicationTypes = null;\r\n\r\n if(obj){\r\n this.firstName = obj.firstName || null;\r\n this.lastName = obj.lastName || null;\r\n this.dateOfBirth = typeof obj.dateOfBirth === 'string' ? new Date(obj.dateOfBirth) : obj.dateOfBirth || null;\r\n this.address1 = obj.address1 || null;\r\n this.city = obj.city || null;\r\n this.state = obj.state || null;\r\n this.postalCode = obj.postalCode || null;\r\n this.country = obj.country || null;\r\n this.memberNumber = obj.memberNumber || null;\r\n this.cardStartDate = typeof obj.cardStartDate === 'string' ? new Date(obj.cardStartDate) : obj.cardStartDate || null;\r\n this.cardEndDate = typeof obj.cardEndDate === 'string' ? new Date(obj.cardEndDate) : obj.cardEndDate || null;\r\n this.cardActivationDate = typeof obj.cardActivationDate === 'string' ? new Date(obj.cardActivationDate) : obj.cardActivationDate || null;\r\n this.eligibilityStatusCode = obj.eligibilityStatusCode || null;\r\n this.eligibilityStatusDescription = obj.eligibilityStatusDescription || null;\r\n this.eligibilityDate = obj.eligibilityDate || null;\r\n this.bin = obj.bin || null;\r\n this.sponsorNumber = obj.sponsorNumber || null;\r\n this.personId = obj.personId || null;\r\n this.alternateCardIds = (obj.alternateCardIds || []).map(item => new AlternateCardId(item || null));\r\n this.email = obj.email || null;\r\n this.phone = obj.phone || null;\r\n this.groupNumber = obj.groupNumber || null;\r\n this.totalBenefitAmount = obj.totalBenefitAmount || null;\r\n this.remainingBenefitAmount = obj.remainingBenefitAmount || null;\r\n this.totalPaidAmount = obj.totalPaidAmount || null;\r\n this.communicationTypes = obj.communicationTypes || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.PatientSearchRecordModel {\r\n return {\r\n firstName: this.firstName,\r\n lastName: this.lastName,\r\n dateOfBirth: this.dateOfBirth,\r\n address1: this.address1,\r\n city: this.city,\r\n state: this.state,\r\n postalCode: this.postalCode,\r\n country: this.country,\r\n memberNumber: this.memberNumber,\r\n cardStartDate: this.cardStartDate,\r\n cardEndDate: this.cardEndDate,\r\n cardActivationDate: this.cardActivationDate,\r\n eligibilityStatusCode: this.eligibilityStatusCode,\r\n eligibilityStatusDescription: this.eligibilityStatusDescription,\r\n eligibilityDate: this.eligibilityDate,\r\n bin: this.bin,\r\n sponsorNumber: this.sponsorNumber,\r\n personId: this.personId,\r\n alternateCardIds: this.alternateCardIds.map(item => item.toModel()),\r\n email: this.email,\r\n phone: this.phone,\r\n groupNumber: this.groupNumber,\r\n totalBenefitAmount: this.totalBenefitAmount,\r\n remainingBenefitAmount: this.remainingBenefitAmount,\r\n totalPaidAmount: this.totalPaidAmount,\r\n communicationTypes: this.communicationTypes,\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class PatientSearchRequestModel {\r\n maxResults: number;\r\n skipRows: number;\r\n firstNameQueryType: FirstNameQueryTypeEnum;\r\n firstName: string;\r\n lastNameQueryType: LastNameQueryTypeEnum;\r\n lastName: string;\r\n dateOfBirth: string;\r\n city: string;\r\n state: string;\r\n postalCode: string;\r\n country: string;\r\n memberNumber: string;\r\n email: string;\r\n phone: string;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.PatientSearchRequestModel){\r\n this.maxResults = null;\r\n this.skipRows = null;\r\n this.firstNameQueryType = null;\r\n this.firstName = null;\r\n this.lastNameQueryType = null;\r\n this.lastName = null;\r\n this.dateOfBirth = null;\r\n this.city = null;\r\n this.state = null;\r\n this.postalCode = null;\r\n this.country = null;\r\n this.memberNumber = null;\r\n this.email = null;\r\n this.phone = null;\r\n\r\n if(obj){\r\n this.maxResults = obj.maxResults || null;\r\n this.skipRows = obj.skipRows || null;\r\n this.firstNameQueryType = obj.firstNameQueryType || null;\r\n this.firstName = obj.firstName || null;\r\n this.lastNameQueryType = obj.lastNameQueryType || null;\r\n this.lastName = obj.lastName || null;\r\n this.dateOfBirth = obj.dateOfBirth || null;\r\n this.city = obj.city || null;\r\n this.state = obj.state || null;\r\n this.postalCode = obj.postalCode || null;\r\n this.country = obj.country || null;\r\n this.memberNumber = obj.memberNumber || null;\r\n this.email = obj.email || null;\r\n this.phone = obj.phone || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.PatientSearchRequestModel {\r\n return {\r\n maxResults: this.maxResults,\r\n skipRows: this.skipRows,\r\n firstNameQueryType: this.firstNameQueryType,\r\n firstName: this.firstName,\r\n lastNameQueryType: this.lastNameQueryType,\r\n lastName: this.lastName,\r\n dateOfBirth: this.dateOfBirth,\r\n city: this.city,\r\n state: this.state,\r\n postalCode: this.postalCode,\r\n country: this.country,\r\n memberNumber: this.memberNumber,\r\n email: this.email,\r\n phone: this.phone,\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class PatientSearchResultModel {\r\n results: Array;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.PatientSearchResultModel){\r\n this.results = null;\r\n\r\n if(obj){\r\n this.results = (obj.results || []).map(item => new PatientSearchRecordModel(item || null));\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.PatientSearchResultModel {\r\n return {\r\n results: this.results.map(item => item.toModel()),\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n\r\n export class PhoneNumberModel {\r\n phoneNumberId: number;\r\n countryCode: string;\r\n areaCode: string;\r\n number: string;\r\n primaryPhoneNumber: boolean;\r\n phoneType: number;\r\n extension: string;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.PhoneNumberModel) {\r\n this.phoneNumberId = null;\r\n this.countryCode = null;\r\n this.areaCode = null;\r\n this.number = null;\r\n this.primaryPhoneNumber = null;\r\n this.phoneType = null;\r\n this.extension = null;\r\n\r\n if(obj) {\r\n this.phoneNumberId = obj.phoneNumberId || null;\r\n this.countryCode = obj.countryCode || null;\r\n this.areaCode = obj.areaCode || null;\r\n this.number = obj.number || null;\r\n this.primaryPhoneNumber = obj.primaryPhoneNumber || null;\r\n this.phoneType = obj.phoneType || null;\r\n this.extension = obj.extension || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.PhoneNumberModel {\r\n return {\r\n phoneNumberId: this.phoneNumberId,\r\n countryCode: this.countryCode,\r\n areaCode: this.areaCode,\r\n number: this.number,\r\n primaryPhoneNumber: this.primaryPhoneNumber,\r\n phoneType: this.phoneType,\r\n extension: this.extension,\r\n };\r\n }\r\n }\r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class ReplaceCardRequestModel {\r\n memberNumber: string;\r\n\r\n constructor(obj?: Portico.Services.Legacy.CardService.Models.ReplaceCardRequestModel){\r\n this.memberNumber = null;\r\n\r\n if(obj){\r\n this.memberNumber = obj.memberNumber || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.CardService.Models.ReplaceCardRequestModel {\r\n return {\r\n memberNumber: this.memberNumber,\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class ReplaceCardResultModel {\r\n memberNumber: string;\r\n orderReferenceNumber: string;\r\n\r\n constructor(obj?: Portico.Services.Legacy.CardService.Models.ReplaceCardResultModel){\r\n this.memberNumber = null;\r\n this.orderReferenceNumber = null;\r\n\r\n if(obj){\r\n this.memberNumber = obj.memberNumber || null;\r\n this.orderReferenceNumber = obj.orderReferenceNumber || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.CardService.Models.ReplaceCardResultModel {\r\n return {\r\n memberNumber: this.memberNumber,\r\n orderReferenceNumber: this.orderReferenceNumber,\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class ResendCorrespondenceRequestModel {\r\n memberNumber: string;\r\n orderReferenceNumber: string;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.ResendCorrespondenceRequestModel){\r\n this.memberNumber = null;\r\n this.orderReferenceNumber = null;\r\n\r\n if(obj){\r\n this.memberNumber = obj.memberNumber || null;\r\n this.orderReferenceNumber = obj.orderReferenceNumber || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.ResendCorrespondenceRequestModel {\r\n return {\r\n memberNumber: this.memberNumber,\r\n orderReferenceNumber: this.orderReferenceNumber,\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class ResendCorrespondenceResultModel {\r\n memberNumber: string;\r\n oldOrderReferenceNumber: string;\r\n newOrderReferenceNumber: string;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.ResendCorrespondenceResultModel){\r\n this.memberNumber = null;\r\n this.oldOrderReferenceNumber = null;\r\n this.newOrderReferenceNumber = null;\r\n\r\n if(obj){\r\n this.memberNumber = obj.memberNumber || null;\r\n this.oldOrderReferenceNumber = obj.oldOrderReferenceNumber || null;\r\n this.newOrderReferenceNumber = obj.newOrderReferenceNumber || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.ResendCorrespondenceResultModel {\r\n return {\r\n memberNumber: this.memberNumber,\r\n oldOrderReferenceNumber: this.oldOrderReferenceNumber,\r\n newOrderReferenceNumber: this.newOrderReferenceNumber,\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class ResponseModel {\r\n success: boolean;\r\n messages: Array;\r\n\r\n\t\tconstructor(obj?: Portico.Services.Legacy.CardService.Models.ResponseModel | Portico.Services.Legacy.EnrollmentService.Models.ResponseModel){\r\n this.success = null;\r\n this.messages = null;\r\n\r\n if(obj){\r\n this.success = obj.success || null;\r\n this.messages = (obj.messages || []).concat();\r\n }\r\n }\r\n\r\n\t\tpublic toModel(): Portico.Services.Legacy.CardService.Models.ResponseModel | Portico.Services.Legacy.EnrollmentService.Models.ResponseModel {\r\n return {\r\n success: this.success,\r\n messages: (this.messages || []).concat()\r\n };\r\n }\r\n } \r\n}","/**\r\n * TC - Enrollment Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n *\r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Models.Legacy {\r\n import models = Portico.Models.Legacy;\r\n export class ResponseModelCreatePrescriberResultModel {\r\n success: boolean;\r\n messages: Array;\r\n data: models.CreatePrescriberResultModel;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.ResponseModelCreatePrescriberResultModel){\r\n this.success = null;\r\n this.messages = null;\r\n this.data = null;\r\n\r\n if(obj){\r\n this.success = obj.success || null;\r\n this.messages = (obj.messages || []).concat();\r\n this.data = new models.CreatePrescriberResultModel(obj.data || null);\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.ResponseModelCreatePrescriberResultModel {\r\n return {\r\n success: this.success,\r\n messages: (this.messages || []).concat(),\r\n data: this.data.toModel(),\r\n };\r\n }\r\n }\r\n}\r\n","/**\r\n * TC - Enrollment Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n *\r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Models.Legacy {\r\n import models = Portico.Models.Legacy;\r\n export class ResponseModelCreateSiteResultModel {\r\n success: boolean;\r\n messages: Array;\r\n data: models.CreateSiteResultModel;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.ResponseModelCreateSiteResultModel){\r\n this.success = null;\r\n this.messages = null;\r\n this.data = null;\r\n\r\n if(obj){\r\n this.success = obj.success || null;\r\n this.messages = (obj.messages || []).concat();\r\n this.data = new models.CreateSiteResultModel(obj.data || null);\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.ResponseModelCreateSiteResultModel {\r\n return {\r\n success: this.success,\r\n messages: (this.messages || []).concat(),\r\n data: this.data.toModel(),\r\n };\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Legacy {\r\n \r\n export class ResponseModelEnrollmentResultModel {\r\n success: boolean;\r\n messages: Array;\r\n data: EnrollmentResultModel;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.ResponseModelEnrollmentResultModel){\r\n this.success = null;\r\n this.messages = null;\r\n this.data = null;\r\n\r\n if(obj){\r\n this.success = obj.success || null;\r\n this.messages = (obj.messages || []).concat();\r\n this.data = new EnrollmentResultModel(obj.data || null);\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.ResponseModelEnrollmentResultModel {\r\n return {\r\n success: this.success,\r\n messages: (this.messages || []).concat(),\r\n data: this.data.toModel(),\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class ResponseModelEnrollmentWithPdfResultModel {\r\n success: boolean;\r\n messages: Array;\r\n data: EnrollmentWithPdfResultModel;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.ResponseModelEnrollmentWithPdfResultModel){\r\n this.success = null;\r\n this.messages = null;\r\n this.data = null;\r\n\r\n if(obj){\r\n this.success = obj.success || null;\r\n this.messages = (obj.messages || []).concat();\r\n this.data = new EnrollmentWithPdfResultModel(obj.data || null);\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.ResponseModelEnrollmentWithPdfResultModel {\r\n return {\r\n success: this.success,\r\n messages: (this.messages || []).concat(),\r\n data: this.data.toModel(),\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class ResponseModelPatientLookupResultModel {\r\n success: boolean;\r\n messages: Array;\r\n data: PatientLookupResultModel;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.ResponseModelPatientLookupResultModel){\r\n this.success = null;\r\n this.messages = null;\r\n this.data = null;\r\n\r\n if(obj){\r\n this.success = obj.success || null;\r\n this.messages = (obj.messages || []).concat();\r\n this.data = new PatientLookupResultModel(obj.data || null);\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.ResponseModelPatientLookupResultModel {\r\n return {\r\n success: this.success,\r\n messages: (this.messages || []).concat(),\r\n data: this.data.toModel(),\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class ResponseModelPatientSearchResultModel {\r\n success: boolean;\r\n messages: Array;\r\n data: PatientSearchResultModel;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.ResponseModelPatientSearchResultModel){\r\n this.success = null;\r\n this.messages = null;\r\n this.data = null;\r\n\r\n if(obj){\r\n this.success = obj.success || null;\r\n this.messages = (obj.messages || []).concat();\r\n this.data = new PatientSearchResultModel(obj.data || null);\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.ResponseModelPatientSearchResultModel {\r\n return {\r\n success: this.success,\r\n messages: (this.messages || []).concat(),\r\n data: this.data.toModel(),\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class ResponseModelResendCorrespondenceResultModel {\r\n success: boolean;\r\n messages: Array;\r\n data: ResendCorrespondenceResultModel;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.ResponseModelResendCorrespondenceResultModel){\r\n this.success = null;\r\n this.messages = null;\r\n this.data = null;\r\n\r\n if(obj){\r\n this.success = obj.success || null;\r\n this.messages = (obj.messages || []).concat();\r\n this.data = new ResendCorrespondenceResultModel(obj.data || null);\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.ResponseModelResendCorrespondenceResultModel {\r\n return {\r\n success: this.success,\r\n messages: (this.messages || []).concat(),\r\n data: this.data.toModel(),\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n\r\n export class ResponseModelVerifySurveyEntryResultModel {\r\n success: boolean;\r\n messages: Array;\r\n data: VerifySurveyEntryResultModel;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.ResponseModelVerifySurveyEntryResultModel) {\r\n this.success = null;\r\n this.messages = null;\r\n this.data = null;\r\n\r\n if (obj) {\r\n this.success = obj.success || null;\r\n this.messages = (obj.messages || []).concat();\r\n this.data = new VerifySurveyEntryResultModel(obj.data || null);\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.ResponseModelVerifySurveyEntryResultModel {\r\n return {\r\n success: this.success,\r\n messages: (this.messages || []).concat(),\r\n data: this.data.toModel()\r\n };\r\n }\r\n }\r\n}","/**\r\n * TC - Enrollment Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n *\r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Models.Legacy {\r\n import models = Portico.Models.Legacy;\r\n export class SiteEnrollmentModel {\r\n siteId: string;\r\n siteType: SiteTypeEnum;\r\n siteCommunicationTypes: SiteCommunicationTypesEnum[];\r\n siteCommunicationOption: SiteCommunicationOptionEnum;\r\n sitePayable: boolean;\r\n aobReceived: boolean;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.SiteEnrollmentModel){\r\n this.siteId = null;\r\n this.siteType = null;\r\n this.siteCommunicationTypes = null;\r\n this.siteCommunicationOption = null;\r\n this.sitePayable = null;\r\n this.aobReceived = null;\r\n\r\n if(obj){\r\n this.siteId = obj.siteId || null;\r\n this.siteType = obj.siteType || null;\r\n this.siteCommunicationTypes = (obj.siteCommunicationTypes || []).concat();\r\n this.siteCommunicationOption = obj.siteCommunicationOption || null;\r\n this.sitePayable = obj.sitePayable || null;\r\n this.aobReceived = obj.aobReceived || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.SiteEnrollmentModel {\r\n return {\r\n siteId: this.siteId,\r\n siteType: this.siteType,\r\n siteCommunicationTypes: (this.siteCommunicationTypes || []).concat(),\r\n siteCommunicationOption: this.siteCommunicationOption,\r\n sitePayable: this.sitePayable,\r\n aobReceived: this.aobReceived,\r\n };\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Legacy {\r\n \r\n export class SurveyQuestionModel {\r\n surveyId: number;\r\n questionId: number;\r\n answerKey: number;\r\n answerText: string;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.SurveyQuestionModel){\r\n this.surveyId = null;\r\n this.questionId = null;\r\n this.answerKey = null;\r\n this.answerText = null;\r\n\r\n if(obj){\r\n this.surveyId = obj.surveyId || null;\r\n this.questionId = obj.questionId || null;\r\n this.answerKey = obj.answerKey || null;\r\n this.answerText = obj.answerText || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.SurveyQuestionModel {\r\n return {\r\n surveyId: this.surveyId,\r\n questionId: this.questionId,\r\n answerKey: this.answerKey,\r\n answerText: this.answerText,\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n \r\n export class TerminateCardRequestModel {\r\n memberNumber: string;\r\n terminateDate: string;\r\n\r\n constructor(obj?: Portico.Services.Legacy.CardService.Models.TerminateCardRequestModel){\r\n this.memberNumber = null;\r\n this.terminateDate = null;\r\n\r\n if(obj){\r\n this.memberNumber = obj.memberNumber || null;\r\n this.terminateDate = obj.terminateDate || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.CardService.Models.TerminateCardRequestModel {\r\n return {\r\n memberNumber: this.memberNumber,\r\n terminateDate: this.terminateDate,\r\n };\r\n }\r\n } \r\n}","/**\r\n * TC - Enrollment Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n *\r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Models.Legacy {\r\n import models = Portico.Models.Legacy;\r\n export class UpdatePrescriberRequestModel {\r\n prescriberId: string;\r\n firstName: string;\r\n lastName: string;\r\n phoneNumbers: Array;\r\n address1: string;\r\n address2: string;\r\n city: string;\r\n country: string;\r\n state: string;\r\n postalCode: string;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.UpdatePrescriberRequestModel){\r\n this.prescriberId = null;\r\n this.firstName = null;\r\n this.lastName = null;\r\n this.phoneNumbers = null;\r\n this.address1 = null;\r\n this.address2 = null;\r\n this.city = null;\r\n this.country = null;\r\n this.state = null;\r\n this.postalCode = null;\r\n\r\n if(obj){\r\n this.prescriberId = obj.prescriberId || null;\r\n this.firstName = obj.firstName || null;\r\n this.lastName = obj.lastName || null;\r\n this.phoneNumbers = (obj.phoneNumbers || []).map(item => new models.PhoneNumberModel(item || null));\r\n this.address1 = obj.address1 || null;\r\n this.address2 = obj.address2 || null;\r\n this.city = obj.city || null;\r\n this.country = obj.country || null;\r\n this.state = obj.state || null;\r\n this.postalCode = obj.postalCode || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.UpdatePrescriberRequestModel {\r\n return {\r\n prescriberId: this.prescriberId,\r\n firstName: this.firstName,\r\n lastName: this.lastName,\r\n phoneNumbers: this.phoneNumbers.map(item => item.toModel()),\r\n address1: this.address1,\r\n address2: this.address2,\r\n city: this.city,\r\n country: this.country,\r\n state: this.state,\r\n postalCode: this.postalCode,\r\n };\r\n }\r\n }\r\n}\r\n","/**\r\n * TC - Enrollment Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n *\r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Models.Legacy {\r\n import models = Portico.Models.Legacy;\r\n export class UpdateSiteRequestModel {\r\n siteId: string;\r\n siteVerified: boolean;\r\n name: string;\r\n phoneNumbers: Array;\r\n address1: string;\r\n address2: string;\r\n city: string;\r\n country: string;\r\n state: string;\r\n postalCode: string;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.UpdateSiteRequestModel){\r\n this.siteId = null;\r\n this.siteVerified = null;\r\n this.name = null;\r\n this.phoneNumbers = null;\r\n this.address1 = null;\r\n this.address2 = null;\r\n this.city = null;\r\n this.country = null;\r\n this.state = null;\r\n this.postalCode = null;\r\n\r\n if(obj){\r\n this.siteId = obj.siteId || null;\r\n this.siteVerified = obj.siteVerified || null;\r\n this.name = obj.name || null;\r\n this.phoneNumbers = (obj.phoneNumbers || []).map(item => new models.PhoneNumberModel(item || null));\r\n this.address1 = obj.address1 || null;\r\n this.address2 = obj.address2 || null;\r\n this.city = obj.city || null;\r\n this.country = obj.country || null;\r\n this.state = obj.state || null;\r\n this.postalCode = obj.postalCode || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.UpdateSiteRequestModel {\r\n return {\r\n siteId: this.siteId,\r\n siteVerified: this.siteVerified,\r\n name: this.name,\r\n phoneNumbers: this.phoneNumbers.map(item => item.toModel()),\r\n address1: this.address1,\r\n address2: this.address2,\r\n city: this.city,\r\n country: this.country,\r\n state: this.state,\r\n postalCode: this.postalCode,\r\n };\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Legacy {\r\n \r\n export class VerifySurveyEntryRequestModel {\r\n surveyId: number;\r\n questionId: number;\r\n answerKey: number;\r\n answerText: string;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.VerifySurveyEntryRequestModel){\r\n this.surveyId = null;\r\n this.questionId = null;\r\n this.answerKey = null;\r\n this.answerText = null;\r\n\r\n if(obj){\r\n this.surveyId = obj.surveyId || null;\r\n this.questionId = obj.questionId || null;\r\n this.answerKey = obj.answerKey || null;\r\n this.answerText = obj.answerText || null;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.VerifySurveyEntryRequestModel {\r\n return {\r\n surveyId: this.surveyId,\r\n questionId: this.questionId,\r\n answerKey: this.answerKey,\r\n answerText: this.answerText,\r\n };\r\n }\r\n } \r\n}","namespace Portico.Models.Legacy {\r\n\r\n export class VerifySurveyEntryResultModel {\r\n isEligible: boolean;\r\n\r\n constructor(obj?: Portico.Services.Legacy.EnrollmentService.Models.VerifySurveyEntryResultModel) {\r\n this.isEligible = null;\r\n\r\n if (obj) {\r\n this.isEligible = obj.isEligible || false;\r\n }\r\n }\r\n\r\n public toModel(): Portico.Services.Legacy.EnrollmentService.Models.VerifySurveyEntryResultModel {\r\n return {\r\n isEligible: this.isEligible\r\n };\r\n }\r\n }\r\n}","namespace Portico.Models.Setup {\r\n\r\n export interface IDataColumn {\r\n id: string;\r\n\t\tdataTableId: string;\r\n\t\tname: string;\r\n\t\tdataTypeId: string;\r\n\t\torder: number;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n\t\tisDeleted: boolean;\r\n }\r\n\r\n export class DataColumn implements IDataColumn {\r\n\t\tid: string;\r\n\t\tdataTableId: string;\r\n name: string;\r\n\t\tdataTypeId: string;\r\n\t\torder: number;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n\t\tisDeleted: boolean;\r\n\r\n constructor(obj?: IDataColumn) {\r\n this.id = null;\r\n this.dataTableId = null;\r\n\t\t\tthis.name = null;\r\n this.dataTypeId = null;\r\n\t\t\tthis.order = null;\r\n\t\t\tthis.createdBy = null;\r\n\t\t\tthis.createdOn = null;\r\n\t\t\tthis.isDeleted = false;\r\n\r\n if (obj) {\r\n this.id = obj.id;\r\n this.dataTableId = obj.dataTableId;\r\n this.name = obj.name;\r\n\t\t\t\tthis.dataTypeId = obj.dataTypeId;\r\n\t\t\t\tthis.order = obj.order;\r\n\t\t\t\tthis.createdBy = obj.createdBy;\r\n\t\t\t\tthis.createdOn = obj.createdOn ? new Date(typeof obj.createdOn === 'string' && (obj.createdOn).charAt(10) === 'T' ? obj.createdOn + 'Z' : obj.createdOn) : null;\r\n\t\t\t\tthis.isDeleted = obj.isDeleted;\r\n }\r\n }\r\n }\r\n}\r\n","namespace Portico.Models.Setup {\r\n\r\n export interface IDataGroup {\r\n\t\tid: string;\r\n\t\tdataGroupTypeId: string;\r\n name: string;\r\n isPrivate: boolean;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n dataRows: DataRow[];\r\n\r\n\t\tgetDataRows(dataTableId: string, key?: string): DataRow[];\r\n\t}\r\n\r\n export class DataGroup implements IDataGroup {\r\n\t\tid: string;\r\n\t\tdataGroupTypeId: string;\r\n name: string;\r\n isPrivate: boolean;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n dataRows: DataRow[];\r\n\r\n constructor(obj?: IDataGroup) {\r\n this.id = null;\r\n this.dataGroupTypeId = null;\r\n this.name = null;\r\n this.isPrivate = null;\r\n\t\t\tthis.createdBy = null;\r\n\t\t\tthis.createdOn = null;\r\n this.dataRows = [];\r\n\r\n if (obj) {\r\n this.id = obj.id;\r\n this.dataGroupTypeId = obj.dataGroupTypeId;\r\n this.name = obj.name;\r\n this.isPrivate = obj.isPrivate;\r\n\t\t\t\tthis.createdBy = obj.createdBy;\r\n\t\t\t\tthis.createdOn = obj.createdOn ? new Date(typeof obj.createdOn === 'string' && (obj.createdOn).charAt(10) === 'T' ? obj.createdOn + 'Z' : obj.createdOn) : null;\r\n\r\n if (obj.dataRows) {\r\n for (const dataRow of obj.dataRows) {\r\n this.dataRows.push(new DataRow(dataRow));\r\n }\r\n }\r\n }\r\n }\r\n\r\n\t\tgetDataRows(dataTableId: string, key: string = null): DataRow[] {\r\n\t\t\treturn this.dataRows.filter((dataRow) => {\r\n\t\t\t\treturn (dataRow.dataTableId === dataTableId) && (key === null || dataRow.key === key);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}","namespace Portico.Models.Setup {\r\n\r\n export interface IDataGroupType {\r\n\t\tid: string;\r\n name: string;\r\n priority: number;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n }\r\n\r\n export class DataGroupType implements IDataGroupType {\r\n\t\tid: string;\r\n name: string;\r\n priority: number;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n\r\n constructor(obj?: IDataGroupType) {\r\n this.id = null;\r\n this.name = null;\r\n this.priority = null;\r\n\t\t\tthis.createdBy = null;\r\n\t\t\tthis.createdOn = null;\r\n\r\n if (obj) {\r\n this.id = obj.id;\r\n this.name = obj.name;\r\n this.priority = obj.priority;\r\n\t\t\t\tthis.createdBy = obj.createdBy;\r\n\t\t\t\tthis.createdOn = obj.createdOn ? new Date(typeof obj.createdOn === 'string' && (obj.createdOn).charAt(10) === 'T' ? obj.createdOn + 'Z' : obj.createdOn) : null;\r\n }\r\n }\r\n }\r\n}","namespace Portico.Models.Setup {\r\n\r\n export interface IDataRow {\r\n\t\tid: string;\r\n\t\tdataTableId: string;\r\n\t\tdataGroupId: string;\r\n\t\tkey: string;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n dataValues: DataValue[];\r\n\r\n\t\tgetDataValue(dataColumnId: string): DataValue;\r\n\t\tgetValue(dataColumnId: string, def?: string): string;\r\n }\r\n\r\n export class DataRow implements IDataRow {\r\n\t\tid: string;\r\n\t\tdataTableId: string;\r\n\t\tdataGroupId: string;\r\n key: string;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n dataValues: DataValue[];\r\n\r\n constructor(obj?: IDataRow) {\r\n this.id = null;\r\n this.dataTableId = null;\r\n this.dataGroupId = null;\r\n this.key = null;\r\n\t\t\tthis.createdBy = null;\r\n\t\t\tthis.createdOn = null;\r\n this.dataValues = [];\r\n\r\n if (obj) {\r\n this.id = obj.id;\r\n this.dataTableId = obj.dataTableId;\r\n this.dataGroupId = obj.dataGroupId;\r\n\t\t\t\tthis.key = obj.key;\r\n\t\t\t\tthis.createdBy = obj.createdBy;\r\n\t\t\t\tthis.createdOn = obj.createdOn ? new Date(typeof obj.createdOn === 'string' && (obj.createdOn).charAt(10) === 'T' ? obj.createdOn + 'Z' : obj.createdOn) : null;\r\n\r\n if (obj.dataValues) {\r\n for (const dataValue of obj.dataValues) {\r\n this.dataValues.push(new DataValue(dataValue));\r\n }\r\n }\r\n }\r\n }\r\n\r\n\t\tgetDataValue(dataColumnId: string): DataValue {\r\n const matches = this.dataValues.filter((dv: DataValue) => {\r\n return dv.dataColumnId === dataColumnId;\r\n });\r\n\r\n return matches && matches.length > 0 ? matches[0] : null;\r\n }\r\n\r\n\t\tgetValue(dataColumnId: string, def: string = null): string {\r\n\t\t\tconst dataValue = this.getDataValue(dataColumnId);\r\n\t\t\treturn dataValue ? dataValue.value : def;\r\n\t\t}\r\n }\r\n}","namespace Portico.Models.Setup {\r\n\r\n export interface IDataTable {\r\n\t\tid: string;\r\n name: string;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n dataColumns: DataColumn[];\r\n\r\n\t\tgetDataColumn(column: string): DataColumn;\r\n\t}\r\n\r\n export class DataTable implements IDataTable {\r\n\t\tid: string;\r\n name: string;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n\r\n dataColumns: DataColumn[];\r\n\r\n constructor(obj?: IDataTable) {\r\n this.id = null;\r\n this.name = null;\r\n\t\t\tthis.createdBy = null;\r\n\t\t\tthis.createdOn = null;\r\n\r\n this.dataColumns = [];\r\n\r\n if (obj) {\r\n this.id = obj.id;\r\n this.name = obj.name;\r\n\t\t\t\tthis.createdBy = obj.createdBy;\r\n\t\t\t\tthis.createdOn = obj.createdOn ? new Date(typeof obj.createdOn === 'string' && (obj.createdOn).charAt(10) === 'T' ? obj.createdOn + 'Z' : obj.createdOn) : null;\r\n\r\n if (obj.dataColumns) {\r\n for (const dataColumn of obj.dataColumns) {\r\n this.dataColumns.push(new DataColumn(dataColumn));\r\n }\r\n }\r\n }\r\n }\r\n\r\n\t\tgetDataColumn(column: string): DataColumn {\r\n\t\t\tconst dataColumns = this.dataColumns.filter((dc: DataColumn) => {\r\n\t\t\t\treturn dc.id === column || dc.name === column;\r\n\t\t\t});\r\n\r\n\t\t\tif (dataColumns && dataColumns.length === 1) {\r\n\t\t\t\treturn dataColumns[0];\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t}\r\n }\r\n}","namespace Portico.Models.Setup {\r\n\r\n export interface IDataType {\r\n\t\tid: string;\r\n name: string;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n }\r\n\r\n export class DataType implements IDataType {\r\n\t\tid: string;\r\n name: string;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n\r\n constructor(obj?: IDataType) {\r\n this.id = null;\r\n this.name = null;\r\n\t\t\tthis.createdBy = null;\r\n\t\t\tthis.createdOn = null;\r\n\r\n if (obj) {\r\n this.id = obj.id;\r\n this.name = obj.name;\r\n\t\t\t\tthis.createdBy = obj.createdBy;\r\n\t\t\t\tthis.createdOn = obj.createdOn ? new Date(typeof obj.createdOn === 'string' && (obj.createdOn).charAt(10) === 'T' ? obj.createdOn + 'Z' : obj.createdOn) : null;\r\n }\r\n }\r\n }\r\n}","namespace Portico.Models.Setup {\r\n\r\n export interface IDataValue {\r\n\t\tid: string;\r\n\t\tdataRowId: string;\r\n\t\tdataColumnId: string;\r\n value: string;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n\t\tisDeleted: boolean;\r\n }\r\n\r\n export class DataValue implements IDataValue {\r\n\t\tid: string;\r\n\t\tdataRowId: string;\r\n\t\tdataColumnId: string;\r\n value: string;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n\t\tisDeleted: boolean;\r\n\r\n constructor(obj?: IDataValue) {\r\n this.id = null;\r\n this.dataRowId = null;\r\n this.dataColumnId = null;\r\n this.value = null;\r\n\t\t\tthis.createdBy = null;\r\n\t\t\tthis.createdOn = null;\r\n\t\t\tthis.isDeleted = false;\r\n\r\n if (obj) {\r\n this.id = obj.id;\r\n this.dataRowId = obj.dataRowId;\r\n this.dataColumnId = obj.dataColumnId;\r\n this.value = obj.value;\r\n\t\t\t\tthis.createdBy = obj.createdBy;\r\n\t\t\t\tthis.createdOn = obj.createdOn ? new Date(typeof obj.createdOn === 'string' && (obj.createdOn).charAt(10) === 'T' ? obj.createdOn + 'Z' : obj.createdOn) : null;\r\n\t\t\t\tthis.isDeleted = obj.isDeleted;\r\n }\r\n }\r\n }\r\n}","namespace Portico.Models.Setup {\r\n\r\n export interface IDemo {\r\n\t\tportal: Portal;\r\n\t\ttemplate: DataValue;\r\n\t\tbrand: DataValue;\r\n\t\tpharma: DataValue;\r\n\t\tprimary: DataValue;\r\n\t\tsecondary: DataValue;\r\n\t\tsquare: boolean;\r\n\t\tshadow: boolean;\r\n\t\tlogo: DataValue;\r\n\t\tlogoFile: any;\r\n\t}\r\n\r\n\texport class Demo implements IDemo {\r\n\t\tportal: Portal;\r\n\t\ttemplate: DataValue;\r\n\t\tbrand: DataValue;\r\n\t\tpharma: DataValue;\r\n\t\tprimary: DataValue;\r\n\t\tsecondary: DataValue;\r\n\t\tsquare: boolean;\r\n\t\tshadow: boolean;\r\n\t\tlogo: DataValue;\r\n\t\tlogoFile: any;\r\n\r\n\t\tconstructor(obj?: IDemo) {\r\n\t\t\tthis.portal = null;\r\n\t\t\tthis.template = null;\r\n\t\t\tthis.brand = null;\r\n\t\t\tthis.pharma = null;\r\n\t\t\tthis.primary = null;\r\n\t\t\tthis.secondary = null;\r\n\t\t\tthis.square = false;\r\n\t\t\tthis.shadow = false;\r\n\t\t\tthis.logo = null;\r\n\t\t\tthis.logoFile = null;\r\n\r\n if (obj) {\r\n\t\t\t\tif (obj.portal) {\r\n\t\t\t\t\tthis.portal = new Portal(obj.portal);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.template) {\r\n\t\t\t\t\tthis.template = new DataValue(obj.template);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.brand) {\r\n\t\t\t\t\tthis.brand = new DataValue(obj.brand);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.pharma) {\r\n\t\t\t\t\tthis.pharma = new DataValue(obj.pharma);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.primary) {\r\n\t\t\t\t\tthis.primary = new DataValue(obj.primary);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.secondary) {\r\n\t\t\t\t\tthis.secondary = new DataValue(obj.secondary);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.square = obj.square;\r\n\t\t\t\tthis.shadow = obj.shadow;\r\n\r\n\t\t\t\tif (obj.logo) {\r\n\t\t\t\t\tthis.logo = new DataValue(obj.logo);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.logoFile = obj.logoFile;\r\n }\r\n }\r\n }\r\n}","namespace Portico.Models.Setup {\r\n\t\r\n\r\n export interface IPortal {\r\n\t\tid: string;\r\n\t\tportalGroupId: string;\r\n name: string;\r\n url: string;\r\n\t\tbeginOn: Date;\r\n\t\tendOn: Date;\r\n\t\tsettings: string;\r\n\t\tcoreVersion: string;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n\r\n\t\tportalGroup: PortalGroup;\r\n\t\tportalChildren: PortalChild[];\r\n\t\tportalDataGroups: PortalDataGroup[];\r\n\r\n\t\tgetDataRows(dataTableId: string, key?: string): DataRow[];\r\n\t}\r\n\r\n export class Portal implements IPortal {\r\n\t\tid: string;\r\n\t\tportalGroupId: string;\r\n\t\tname: string;\r\n url: string;\r\n\t\tbeginOn: Date;\r\n\t\tendOn: Date;\r\n\t\tsettings: string;\r\n coreVersion: string;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n\r\n\t\tportalGroup: PortalGroup;\r\n\t\tportalChildren: PortalChild[];\r\n portalDataGroups: PortalDataGroup[];\r\n\r\n constructor(obj?: IPortal) {\r\n this.id = null;\r\n this.portalGroupId = null;\r\n\t\t\tthis.name = null;\r\n this.url = null;\r\n\t\t\tthis.beginOn = null;\r\n\t\t\tthis.endOn = null;\r\n\t\t\tthis.settings = null;\r\n\t\t\tthis.coreVersion = null;\r\n\t\t\tthis.createdBy = null;\r\n\t\t\tthis.createdOn = null;\r\n\r\n\t\t\tthis.portalGroup = null\r\n\t\t\tthis.portalChildren = [];\r\n\t\t\tthis.portalDataGroups = [];\r\n\r\n if (obj) {\r\n this.id = obj.id;\r\n this.portalGroupId = obj.portalGroupId;\r\n\t\t\t\tthis.name = obj.name;\r\n this.url = obj.url;\r\n\r\n\t\t\t\tif (obj.beginOn) {\r\n\t\t\t\t\tthis.beginOn = new Date(obj.beginOn.toString());\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.endOn) {\r\n\t\t\t\t\tthis.endOn = new Date(obj.endOn.toString());\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.settings = obj.settings;\r\n\t\t\t\tthis.coreVersion = obj.coreVersion;\r\n\t\t\t\tthis.createdBy = obj.createdBy;\r\n\t\t\t\tthis.createdOn = obj.createdOn ? new Date(typeof obj.createdOn === 'string' && (obj.createdOn).charAt(10) === 'T' ? obj.createdOn + 'Z' : obj.createdOn) : null;\r\n\r\n\t\t\t\tif (obj.portalGroup) {\r\n\t\t\t\t\tthis.portalGroup = new PortalGroup(obj.portalGroup);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.portalChildren) {\r\n\t\t\t\t\tfor (const portalChild of obj.portalChildren) {\r\n\t\t\t\t\t\tthis.portalChildren.push(new PortalChild(portalChild));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.portalDataGroups) {\r\n\t\t\t\t\tfor (const portalDataGroup of obj.portalDataGroups) {\r\n\t\t\t\t\t\tthis.portalDataGroups.push(new PortalDataGroup(portalDataGroup));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n }\r\n }\r\n\r\n\t\tgetDataRows(dataTableId: string, key: string = null): DataRow[] {\r\n\t\t\tlet dataRows: DataRow[] = [];\r\n\r\n\t\t\tfor (let i = this.portalDataGroups.length - 1; i >= 0; i--) {\r\n\t\t\t\tconst portalDataGroup = this.portalDataGroups[i];\r\n\t\t\t\tconst temp = portalDataGroup.getDataRows(dataTableId, key);\r\n\t\t\t\tdataRows = dataRows.concat(temp);\r\n\t\t\t}\r\n\r\n\t\t\treturn dataRows;\r\n\t\t}\r\n }\r\n}","namespace Portico.Models.Setup {\r\n\r\n export interface IPortalChild {\r\n\t\tid: string;\r\n\t\tportalId: string;\r\n\t\tchildId: string;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n\t}\r\n\r\n export class PortalChild implements IPortalChild {\r\n\t\tid: string;\r\n\t\tportalId: string;\r\n\t\tchildId: string;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n\r\n constructor(obj?: IPortalChild) {\r\n this.id = null;\r\n this.portalId = null;\r\n this.childId = null;\r\n\t\t\tthis.createdBy = null;\r\n\t\t\tthis.createdOn = null;\r\n\r\n if (obj) {\r\n this.id = obj.id;\r\n this.portalId = obj.portalId;\r\n\t\t\t\tthis.childId = obj.childId;\r\n\t\t\t\tthis.createdBy = obj.createdBy;\r\n\t\t\t\tthis.createdOn = obj.createdOn ? new Date(typeof obj.createdOn === 'string' && (obj.createdOn).charAt(10) === 'T' ? obj.createdOn + 'Z' : obj.createdOn) : null;\r\n }\r\n }\r\n }\r\n}","namespace Portico.Models.Setup {\r\n\r\n export interface IPortalDataGroup {\r\n\t\tid: string;\r\n\t\tportalId: string;\r\n\t\tdataGroupId: string;\r\n priority: number;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n\r\n dataGroup: DataGroup;\r\n\r\n\t\tgetDataRows(dataTableId: string, key?: string): DataRow[];\r\n\t}\r\n\r\n export class PortalDataGroup implements IPortalDataGroup {\r\n\t\tid: string;\r\n\t\tportalId: string;\r\n\t\tdataGroupId: string;\r\n priority: number;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n\r\n dataGroup: DataGroup;\r\n\r\n constructor(obj?: IPortalDataGroup) {\r\n this.id = null;\r\n this.portalId = null;\r\n this.dataGroupId = null;\r\n this.priority = null;\r\n\t\t\tthis.createdBy = null;\r\n\t\t\tthis.createdOn = null;\r\n\r\n this.dataGroup = null;\r\n\r\n if (obj) {\r\n this.id = obj.id;\r\n this.portalId = obj.portalId;\r\n this.dataGroupId = obj.dataGroupId;\r\n this.priority = obj.priority;\r\n\t\t\t\tthis.createdBy = obj.createdBy;\r\n\t\t\t\tthis.createdOn = obj.createdOn ? new Date(typeof obj.createdOn === 'string' && (obj.createdOn).charAt(10) === 'T' ? obj.createdOn + 'Z' : obj.createdOn) : null;\r\n\r\n if (obj.dataGroup) {\r\n this.dataGroup = new DataGroup(obj.dataGroup);\r\n }\r\n }\r\n }\r\n\r\n\t\tgetDataRows(dataTableId: string, key: string = null): DataRow[] {\r\n\t\t\treturn this.dataGroup ? this.dataGroup.getDataRows(dataTableId, key) : [];\r\n\t\t}\r\n }\r\n}","namespace Portico.Models.Setup {\r\n\r\n export interface IPortalGroup {\r\n\t\tid: string;\r\n name: string;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n }\r\n\r\n export class PortalGroup implements IPortalGroup {\r\n\t\tid: string;\r\n name: string;\r\n\t\tcreatedBy: number;\r\n\t\tcreatedOn: Date;\r\n\r\n constructor(obj?: IPortalGroup) {\r\n this.id = null;\r\n this.name = null;\r\n\t\t\tthis.createdBy = null;\r\n\t\t\tthis.createdOn = null;\r\n\r\n if (obj) {\r\n this.id = obj.id;\r\n this.name = obj.name;\r\n\t\t\t\tthis.createdBy = obj.createdBy;\r\n\t\t\t\tthis.createdOn = obj.createdOn ? new Date(typeof obj.createdOn === 'string' && (obj.createdOn).charAt(10) === 'T' ? obj.createdOn + 'Z' : obj.createdOn) : null;\r\n }\r\n }\r\n }\r\n}","namespace Portico.Models.Setup {\r\n\r\n\texport interface ISetup {\r\n\t\t// portal and setup data\r\n\t\tdataTables: DataTable[];\r\n\t\tdataTypes: DataType[];\r\n\t\tdemo: Demo;\r\n\t\tdemos: Portal[];\r\n\t\tportal: Portal;\r\n\t\ttemplates: DataGroup[];\r\n\t}\r\n\r\n\texport class Setup implements ISetup {\r\n\t\t// portal and setup data\r\n\t\tdataTables: DataTable[];\r\n\t\tdataTypes: DataType[];\r\n\t\tdemo: Demo;\r\n\t\tdemos: Portal[];\r\n\t\tportal: Portal;\r\n\t\ttemplates: DataGroup[];\r\n\r\n\t\tconstructor(obj?: ISetup) {\r\n\t\t\tthis.dataTables = [];\r\n\t\t\tthis.dataTypes = [];\r\n\t\t\tthis.demo = null;\r\n\t\t\tthis.demos = [];\r\n\t\t\tthis.portal = null;\r\n\t\t\tthis.templates = [];\r\n\r\n if (obj) {\r\n\t\t\t\tif (obj.dataTables) {\r\n\t\t\t\t\tobj.dataTables.forEach((dataTable) => {\r\n\t\t\t\t\t\tthis.dataTables.push(new DataTable(dataTable));\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.dataTypes) {\r\n\t\t\t\t\tobj.dataTypes.forEach((dataType) => {\r\n\t\t\t\t\t\tthis.dataTypes.push(new DataType(dataType));\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.demo) {\r\n\t\t\t\t\tthis.demo = new Demo(obj.demo);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.demos) {\r\n\t\t\t\t\tobj.demos.forEach((portal) => {\r\n\t\t\t\t\t\tthis.demos.push(new Portal(portal));\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.portal) {\r\n\t\t\t\t\tthis.portal = new Portal(obj.portal);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (obj.templates) {\r\n\t\t\t\t\tobj.templates.forEach((dataGroup) => {\r\n\t\t\t\t\t\tthis.templates.push(new DataGroup(dataGroup));\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n }\r\n }\r\n }\r\n}\r\n","namespace Portico.Models {\r\n export class AuthenticationRequest {\r\n public portalId: string;\r\n public userName: string;\r\n public password: string;\r\n public action: AuthenticationAction;\r\n public jwt: string;\r\n public isParent: boolean;\r\n }\r\n}","namespace Portico.Models {\r\n\r\n export class AuthenticationResponse {\r\n public status: PorticoAuthenticateStatus;\r\n public jwtToken: string;\r\n public session: SessionDetail;\r\n public success: boolean;\r\n public messages: string[];\r\n public sessionDetail: SessionDetail;\r\n public childSessionData: ChildSessionData[];\r\n\r\n constructor(obj?: any)\r\n {\r\n this.status = PorticoAuthenticateStatus.NotAuthenticated;\r\n this.jwtToken = null;\r\n this.success = null;\r\n this.messages = null;\r\n this.sessionDetail = new SessionDetail();\r\n this.childSessionData = null;\r\n \r\n if (obj) {\r\n this.jwtToken = obj.jwtToken || null;\r\n this.success = obj.sucsess || null;\r\n this.messages = (obj.messages || []).concat();\r\n this.status = obj.status || PorticoAuthenticateStatus.NotAuthenticated;\r\n this.sessionDetail = new SessionDetail(\r\n {\r\n 'sessionId': obj.sessionId || null,\r\n 'expirationDate': obj.sessionId || null\r\n });\r\n\r\n if (Array.isArray(obj.childSessionData)) {\r\n this.childSessionData = [];\r\n (obj.childSessionData as ChildSessionData[]).forEach((value: ChildSessionData) => {\r\n this.childSessionData.push(new ChildSessionData(value));\r\n });\r\n }\r\n }\r\n }\r\n }\r\n}","namespace Portico.Models {\r\n export class ChangePasswordRequestModel {\r\n public userName: string;\r\n public password: string;\r\n public newPassword: string;\r\n public portalId: string;\r\n }\r\n}","namespace Portico.Models {\r\n export class ChildSessionData {\r\n public portalId: string;\r\n public features: string[];\r\n public jwt: string;\r\n\r\n constructor(obj?: any) {\r\n this.portalId = null;\r\n this.features = [];\r\n this.jwt = null;\r\n \r\n if (obj) {\r\n this.portalId = obj.portalId || null;\r\n this.features = obj.features || [];\r\n this.jwt = obj.jwt || null;\r\n }\r\n }\r\n }\r\n}","namespace Portico.Models {\r\n\t// Tenant IDs\r\n\texport const TENANT_TC = 10001;\r\n\r\n\t// GUID\r\n\texport const GUID_EMPTY = '00000000-0000-0000-0000-000000000000';\r\n\t// Setup GUIDs\r\n\texport const DATA_GROUP_LNF_SHADOW = '195366AC-2229-4EA8-97AE-792DE036152E';\r\n\texport const DATA_GROUP_LNF_SQUARE = '5E461156-35E0-4F1D-9C43-0C47AFA2101B';\r\n\texport const DATA_GROUP_STANDARD_DEFAULT = '1E02AE1F-13DC-49F8-9EBB-81D6023BFD6A';\r\n\texport const DATA_GROUP_TYPE_PORTAL = 'B006FE97-8D91-4A13-A41D-A550624D65C3';\r\n\texport const DATA_GROUP_TYPE_TEMPLATE = '1E51AC95-7F43-4D75-B9D6-295D0B881044';\r\n export const PORTAL_GROUP_DEMO = '2A92F150-E981-4E34-82A1-2A92B2B10BAD';\r\n\r\n export const KnownKeyNames = {\r\n loggingLevel: 'logging-level',\r\n tenant: 'tenant',\r\n legacyProgramSecureId: 'legacy-program-secure-id',\r\n secureId: 'secure-id',\r\n surveyId: 'survey-id',\r\n survey: 'survey',\r\n programType: 'program-type',\r\n templateId: 'template-id'\r\n }\r\n\r\n // Session Storage Keys\r\n export const JWT_STORAGE_KEY = 'gateway-jwt';\r\n export const SESSION_STORAGE_KEY = 'session';\r\n export const IS_CHILD_KEY = 'is-child';\r\n\r\n\t// Session Status\r\n export const SESSION_ACTIVE = 'active';\r\n export const SESSION_EXPIRED = 'expired';\r\n export const SESSION_EXPIRING = 'expiring';\r\n}\r\n","namespace Portico.Models {\r\n\r\n export enum StorageType {\r\n Local = 1,\r\n Session = 2\r\n }\r\n\r\n export enum QuestionType {\r\n MemberNumberCollector = 1,\r\n PatientObjectCollector = 2,\r\n DocumentId = 3,\r\n DebitCardNumberCollector = 4,\r\n MultipleChoice = 5,\r\n MultipleChoiceMultiAnswer = 6,\r\n FreeForm = 7,\r\n Date = 8,\r\n CampaignMemberIdCollector = 9,\r\n CampaignStreamIdCollector = 10\r\n\t}\r\n\r\n\texport enum ResponseModelType {\r\n\t\tUnknown,\r\n\t\tStandard,\r\n\t\tEnterprise,\r\n\t\tLegacy,\r\n\t\tExternalLegacy\r\n }\r\n\r\n export enum LogLevel {\r\n none = 0,\r\n basic = 1,\r\n verbose = 2,\r\n record = 3\r\n }\r\n\r\n export enum PorticoAuthenticateStatus {\r\n Valid,\r\n AccountNotFound,\r\n AccountDisabled,\r\n AccountLocked,\r\n PasswordExpired,\r\n ServerError,\r\n UserFound,\r\n NotAuthenticated,\r\n SessionExpired,\r\n SessionValid\r\n }\r\n\r\n export enum AuthenticationAction {\r\n CreateSession,\r\n AuthenticateAndCreateSession,\r\n\t\tTouchSession,\r\n\t\tAuthenticateAndCreateSessionNoAuthorization,\r\n\t\tUpdateSession,\r\n\t\tIsExistingUser\r\n }\r\n}","namespace Portico.Models {\r\n export class PorticoException {\r\n constructor(\r\n public errorMessage: string,\r\n public rawError: string,\r\n public errorCode?: number,\r\n public dataDump?: string\r\n ) { }\r\n }\r\n}","namespace Portico.Models {\r\n export class ProgramCardTypeInfo {\r\n public cardTypes: number[];\r\n public surveyId: number;\r\n public questionId: number;\r\n\r\n constructor() {\r\n this.cardTypes = [];\r\n this.surveyId = null;\r\n this.questionId = null;\r\n }\r\n }\r\n}","namespace Portico.Models {\r\n\r\n export class SessionDetail {\r\n public expirationDate: Date;\r\n public status: string;\r\n public features: string[];\r\n public isParent: boolean;\r\n public parentPortalId: string;\r\n public userName: string;\r\n\r\n constructor(obj?: any) {\r\n this.expirationDate = new Date();\r\n this.status = 'active';\r\n this.features = [];\r\n this.parentPortalId = null;\r\n this.userName = null;\r\n\r\n if (obj) {\r\n this.expirationDate = obj.expirationDate !== null ? new Date(obj.expirationDate) : new Date();\r\n this.status = obj.status || null;\r\n this.features = obj.features || null;\r\n this.isParent = obj.isParent || false;\r\n this.userName = obj.userName || null;\r\n }\r\n }\r\n }\r\n}","namespace Portico.Models {\r\n export class SessionDetailResponse {\r\n public success: boolean;\r\n public messages: string[];\r\n public sessionDetail: SessionDetail;\r\n }\r\n}","namespace Portico.Models {\r\n\r\n export interface IState {\r\n\t\t// url data\r\n\t\troot: string;\r\n\t\tfullRoute: string;\r\n // state data\r\n app: string;\r\n layout: string;\r\n page: string;\r\n intake: string;\r\n section: string;\r\n // \"page\" parameters\r\n ppid: string; // primary id\r\n psid: string; // secondary id\r\n // \"section\" parameters\r\n spid: string; // primary id\r\n ssid: string; // secondary id\r\n // \"return to\" parameters\r\n r2p: string; // return to page\r\n r2s: string; // return to section\r\n }\r\n\r\n export class State implements IState {\r\n\t\t// url data\r\n\t\troot: string;\r\n\t\tfullRoute: string;\r\n // state data\r\n app: string;\r\n layout: string;\r\n page: string;\r\n intake: string;\r\n section: string;\r\n\t\t// \"page\" parameters\r\n\t\tppid: string; // primary id\r\n psid: string; // secondary id\r\n // \"section\" parameters\r\n spid: string; // primary id\r\n ssid: string; // secondary id\r\n // \"return to\" parameters\r\n r2p: string; // return to page\r\n r2s: string; // return to section\r\n\r\n constructor(obj?: IState) {\r\n\t\t\tthis.root = null;\r\n\t\t\tthis.fullRoute = null;\r\n this.app = null;\r\n this.layout = null;\r\n this.page = null;\r\n this.intake = null;\r\n this.section = null;\r\n\t\t\tthis.ppid = null;\r\n this.psid = null;\r\n this.spid = null;\r\n this.ssid = null;\r\n this.r2p = null;\r\n this.r2s = null;\r\n\r\n if (obj) {\r\n\t\t\t\tthis.root = obj.root;\r\n\t\t\t\tthis.fullRoute = obj.fullRoute;\r\n this.app = obj.app;\r\n this.layout = obj.layout;\r\n this.page = obj.page;\r\n this.intake = obj.intake;\r\n this.section = obj.section;\r\n\t\t\t\tthis.ppid = obj.ppid;\r\n this.psid = obj.psid;\r\n this.spid = obj.spid;\r\n this.ssid = obj.ssid;\r\n this.r2p = obj.r2p;\r\n this.r2s = obj.r2s;\r\n }\r\n }\r\n }\r\n}\r\n","namespace Portico.Services {\r\n\r\n import IServiceUrl = Portico.Models.Interfaces.IServiceUrl;\r\n\r\n export abstract class ServiceBase {\r\n private className = 'Portico.Services.ServiceBase';\r\n\r\n constructor(\r\n protected $http: ng.IHttpService,\r\n protected $q: ng.IQService,\r\n protected dataService: Portico.Services.DataService,\r\n private modalService: Portico.Services.IModalService,\r\n private errorService: Portico.Services.IErrorService,\r\n private $rootScope: ng.IRootScopeService\r\n ) {\r\n this.$http.defaults.headers.common['accept'] = 'application/json';\r\n this.$http.defaults.headers.common[\"X-Requested-With\"] = 'XMLHttpRequest';\r\n }\r\n\r\n public createInstance(serviceUrl: TSettings): IServiceInstance {\r\n return new ServiceInstance(\r\n serviceUrl,\r\n this.$http,\r\n this.$q,\r\n this.dataService,\r\n this.modalService,\r\n this.errorService,\r\n this.$rootScope,\r\n this.requestToken.bind(this),\r\n this.getHttpConfig.bind(this)\r\n );\r\n }\r\n\r\n protected abstract requestToken(serviceUrl: TSettings): ng.IPromise;\r\n protected getHttpConfig(serviceUrl: TSettings, token: string): ng.IRequestConfig {\r\n const config = {} as ng.IRequestConfig;\r\n\r\n\t\t\tif (!_.startsWith(token, 'Bearer')) {\r\n\t\t\t\ttoken = 'Bearer ' + token;\r\n\t\t\t}\r\n\r\n config.headers = {\r\n 'Authorization': token\r\n };\r\n\r\n return config;\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n import IServiceDefinition = Portico.Models.Interfaces.IServiceDefinition;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n export abstract class EnterpriseServiceBase extends ServiceBase {\r\n constructor(\r\n $http: ng.IHttpService,\r\n $q: ng.IQService,\r\n dataService: Portico.Services.DataService,\r\n modalService: Portico.Services.IModalService,\r\n errorService: Portico.Services.IErrorService,\r\n $rootScope: ng.IRootScopeService,\r\n private tokenService: Portico.Services.ITokenService,\r\n private secureKeyId: string\r\n ) {\r\n super($http, $q, dataService, modalService, errorService, $rootScope);\r\n }\r\n\r\n protected requestToken(serviceUrl: IServiceDefinition): ng.IPromise {\r\n return this.tokenService.requestToken(serviceUrl);\r\n }\r\n\r\n protected getHttpConfig(serviceUrl: IServiceDefinition, token: string): ng.IRequestConfig {\r\n const config = {} as ng.IRequestConfig;\r\n\r\n config.headers = {\r\n 'Authorization': token\r\n };\r\n\r\n config.headers['x-tc-userid'] = this.dataService.getEnvironmentValue(this.secureKeyId);\r\n\r\n return config;\r\n };\r\n }\r\n\r\n @Service('app', 'legacyService')\r\n @Inject('$http', '$q', 'dataService', 'modalService', 'errorService', '$rootScope', 'tokenService')\r\n export class LegacyService extends EnterpriseServiceBase {\r\n constructor(\r\n $http: ng.IHttpService,\r\n $q: ng.IQService,\r\n dataService: Portico.Services.DataService,\r\n modalService: Portico.Services.IModalService,\r\n errorService: Portico.Services.IErrorService,\r\n $rootScope: ng.IRootScopeService,\r\n tokenService: Portico.Services.ITokenService\r\n ) {\r\n super($http, $q, dataService, modalService, errorService, $rootScope, tokenService, Portico.Models.KnownKeyNames.legacyProgramSecureId);\r\n }\r\n }\r\n\r\n @Service('app', 'entService')\r\n @Inject('$http', '$q', 'dataService', 'modalService', 'errorService', '$rootScope', 'tokenService')\r\n export class EntService extends EnterpriseServiceBase {\r\n constructor(\r\n $http: ng.IHttpService,\r\n $q: ng.IQService,\r\n dataService: Portico.Services.DataService,\r\n modalService: Portico.Services.IModalService,\r\n errorService: Portico.Services.IErrorService,\r\n $rootScope: ng.IRootScopeService,\r\n tokenService: Portico.Services.ITokenService\r\n ) {\r\n super($http, $q, dataService, modalService, errorService, $rootScope, tokenService, Portico.Models.KnownKeyNames.secureId);\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n import IAccessToken = Portico.Models.Interfaces.IAccessToken;\r\n import ResponseModel = Portico.Models.Enterprise.ResponseModel;\r\n import IResponseModel = Portico.Models.Interfaces.IResponseModel;\r\n import ILegacyExternalResponseModel = Portico.Models.Interfaces.ILegacyExternalResponseModel;\r\n import IServiceDefinition = Portico.Models.Interfaces.IServiceDefinition;\r\n import IServiceUrl = Portico.Models.Interfaces.IServiceUrl;\r\n\r\n function delegate(ctor: { new(model: T): TClass; } | string) {\r\n\t\treturn (item: angular.IHttpPromiseCallbackArg) =>\r\n\t\t\tctor == null ? item.data as T : _.isString(ctor) ? item.data as T : new ctor(item.data);\r\n }\r\n\r\n interface HttpMethodWithData {\r\n , TClass extends { data: { results: any; } }>(ctor: { new(model: T): TClass; }, url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n >(url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n , TClass extends { data: any }>(ctor: { new(model: T): TClass; }, url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n >(url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n , TClass>(ctor: { new(model: T): TClass; }, url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n >(url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n (url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise; // NOTE: This overload might throw in new ResponseModel<>\r\n }\r\n\r\n interface HttpMethodWithoutData {\r\n , TClass extends { data: { results: any; } }>(ctor: { new(model: T): TClass; }, url: string, headers?: { [key: string]: string; }): ng.IPromise;\r\n >(url: string, headers?: { [key: string]: string; }): ng.IPromise;\r\n , TClass extends { data: any }>(ctor: { new(model: T): TClass; }, url: string, headers?: { [key: string]: string; }): ng.IPromise;\r\n >(url: string, headers?: { [key: string]: string; }): ng.IPromise;\r\n , TClass>(ctor: { new(model: T): TClass; }, url: string, headers?: { [key: string]: string; }): ng.IPromise;\r\n >(url: string, headers?: { [key: string]: string; }): ng.IPromise;\r\n (url: string, headers?: { [key: string]: string; }): ng.IPromise; // NOTE: This overload might throw in new ResponseModel<>\r\n }\r\n\r\n export interface IServiceInstance {\r\n get: HttpMethodWithoutData;\r\n GET: HttpMethodWithoutData;\r\n\r\n post: HttpMethodWithData;\r\n POST: HttpMethodWithData;\r\n\r\n put: HttpMethodWithData;\r\n PUT: HttpMethodWithData;\r\n\r\n delete: HttpMethodWithData;\r\n DELETE: HttpMethodWithData;\r\n }\r\n\r\n export class ServiceInstance implements IServiceInstance {\r\n private spinner: string;\r\n private className = 'Portico.Services.ServiceInstance';\r\n\r\n constructor(\r\n protected serviceUrl: TSettings,\r\n protected $http: ng.IHttpService,\r\n protected $q: ng.IQService,\r\n protected dataService: Portico.Services.DataService,\r\n private modalService: Portico.Services.IModalService,\r\n private errorService: Portico.Services.IErrorService,\r\n private $rootScope: ng.IRootScopeService,\r\n private requestToken: (serviceUrl: TSettings) => ng.IPromise,\r\n private getHttpConfig: (serviceUrl: TSettings, token: string) => ng.IRequestConfig\r\n ) {\r\n this.$http.defaults.headers.common['accept'] = 'application/json';\r\n this.$http.defaults.headers.common[\"X-Requested-With\"] = 'XMLHttpRequest';\r\n\r\n this.spinner = \"spinner\";\r\n\r\n if (this.serviceUrl.url.substr(-1) === '/') {\r\n this.serviceUrl.url = this.serviceUrl.url.substr(0, this.serviceUrl.url.length - 1);\r\n }\r\n }\r\n\r\n public get, TClass extends { data: { results: any; } }>(ctor: { new(model: T): TClass; }, url: string, headers?: { [key: string]: string; }): ng.IPromise;\r\n public get>(url: string, headers?: { [key: string]: string; }): ng.IPromise;\r\n public get, TClass extends { data: any }>(ctor: { new(model: T): TClass; }, url: string, headers?: { [key: string]: string; }): ng.IPromise;\r\n public get>(url: string, headers?: { [key: string]: string; }): ng.IPromise;\r\n public get, TClass>(ctor: { new(model: T): TClass; }, url: string, headers?: { [key: string]: string; }): ng.IPromise;\r\n public get>(url: string, headers?: { [key: string]: string; }): ng.IPromise;\r\n public get(url: string, headers?: { [key: string]: string; }): ng.IPromise; // NOTE: This overload might throw in new ResponseModel<>\r\n public get(ctor: { new(model: T): TClass; } | string, url?: string | { [key: string]: string; }, headers?: { [key: string]: string; }): ng.IPromise {\r\n if (_.isString(ctor)) {\r\n headers = url;\r\n url = ctor;\r\n ctor = null;\r\n }\r\n\r\n this.showSpinner();\r\n\r\n return this.$get(url, headers)\r\n .then(delegate(ctor))\r\n .then(resp => {\r\n var model = new ResponseModel(resp);\r\n\r\n if (!model.success)\r\n return this.$q.reject(model.messages);\r\n\r\n return model.data;\r\n })\r\n .finally(() => {\r\n this.hideSpinner();\r\n });\r\n }\r\n\r\n public GET: typeof ServiceInstance.prototype.get;\r\n\r\n public post, TClass extends { data: { results: any; } }>(ctor: { new(model: T): TClass; }, url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n public post>(url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n public post, TClass extends { data: any }>(ctor: { new(model: T): TClass; }, url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n public post>(url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n public post, TClass>(ctor: { new(model: T): TClass; }, url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n public post>(url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n public post(url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise; // NOTE: This overload might throw in new ResponseModel<>\r\n public post(ctor: { new(model: T): TClass; } | string, url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise {\r\n if (_.isString(ctor)) {\r\n headers = data;\r\n data = url;\r\n url = ctor;\r\n ctor = null;\r\n }\r\n\r\n this.showSpinner();\r\n\r\n return this.$post(url, data, headers)\r\n .then(delegate(ctor))\r\n .then(resp => {\r\n var model = new ResponseModel(resp);\r\n\r\n if (!model.success)\r\n return this.$q.reject(model.messages);\r\n\r\n return model.data;\r\n })\r\n .finally(() => {\r\n this.hideSpinner();\r\n });\r\n }\r\n\r\n public POST: typeof ServiceInstance.prototype.post;\r\n\r\n public put, TClass extends { data: { results: any; } }>(ctor: { new(model: T): TClass; }, url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n public put>(url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n public put, TClass extends { data: any }>(ctor: { new(model: T): TClass; }, url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n public put>(url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n public put, TClass>(ctor: { new(model: T): TClass; }, url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n public put>(url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n public put(url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise; // NOTE: This overload might throw in new ResponseModel<>\r\n public put(ctor: { new(model: T): TClass; } | string, url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise {\r\n if (_.isString(ctor)) {\r\n headers = data;\r\n data = url;\r\n url = ctor;\r\n ctor = null;\r\n }\r\n\r\n this.showSpinner();\r\n\r\n return this.$put(url, data, headers)\r\n .then(delegate(ctor))\r\n .then(resp => {\r\n var model = new ResponseModel(resp);\r\n\r\n if (!model.success)\r\n return this.$q.reject(model.messages);\r\n\r\n return model.data;\r\n })\r\n .finally(() => {\r\n this.hideSpinner();\r\n });\r\n }\r\n\r\n public PUT: typeof ServiceInstance.prototype.put;\r\n\r\n public delete, TClass extends { data: { results: any; } }>(ctor: { new(model: T): TClass; }, url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n public delete>(url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n public delete, TClass extends { data: any }>(ctor: { new(model: T): TClass; }, url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n public delete>(url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n public delete, TClass>(ctor: { new(model: T): TClass; }, url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n public delete>(url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise;\r\n public delete(url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise; // NOTE: This overload might throw in new ResponseModel<>\r\n public delete(ctor: { new(model: T): TClass; } | string, url: string, data?: any, headers?: { [key: string]: string; }): ng.IPromise {\r\n if (_.isString(ctor)) {\r\n headers = data;\r\n data = url;\r\n url = ctor;\r\n ctor = null;\r\n }\r\n\r\n this.showSpinner();\r\n\r\n return this.$delete(url, data, headers)\r\n .then(delegate(ctor))\r\n .then(resp => {\r\n var model = new ResponseModel(resp);\r\n\r\n if (!model.success)\r\n return this.$q.reject(model.messages);\r\n\r\n return model.data;\r\n })\r\n .finally(() => {\r\n this.hideSpinner();\r\n });\r\n }\r\n\r\n public DELETE: typeof ServiceInstance.prototype.delete;\r\n\r\n private normalizeUrl(url: string): string {\r\n if (url.substr(0, 1) !== '/') {\r\n return `/${url}`;\r\n }\r\n\r\n return url;\r\n }\r\n\r\n private $get(url: string, headers?: { [key: string]: string; }): ng.IHttpPromise {\r\n url = this.normalizeUrl(url);\r\n\r\n return this.requestToken(this.serviceUrl)\r\n .then((token: string) => {\r\n return this.$q.when(this.getHttpConfig(this.serviceUrl, token));\r\n })\r\n .then((config: ng.IRequestConfig) => {\r\n config.headers = angular.merge(config.headers, headers);\r\n return this.$http.get(this.serviceUrl.url + url, config);\r\n })\r\n .catch((error: any) => {\r\n return this.handleError(error, url, `${this.className}.$get`);\r\n });\r\n }\r\n\r\n private $post(url: string, data?: any, headers?: { [key: string]: string; }): ng.IHttpPromise {\r\n url = this.normalizeUrl(url);\r\n\r\n return this.requestToken(this.serviceUrl)\r\n .then((token: string) => {\r\n return this.$q.when(this.getHttpConfig(this.serviceUrl, token));\r\n })\r\n .then((config: ng.IRequestConfig) => {\r\n config.headers = angular.merge(config.headers, headers);\r\n return this.$http.post(this.serviceUrl.url + url, data, config);\r\n })\r\n .catch((error: any) => {\r\n return this.handleError(error, url, `${this.className}.$post`, data);\r\n });\r\n }\r\n\r\n private $put(url: string, data?: any, headers?: { [key: string]: string; }): ng.IHttpPromise {\r\n url = this.normalizeUrl(url);\r\n\r\n return this.requestToken(this.serviceUrl)\r\n .then((token: string) => {\r\n return this.$q.when(this.getHttpConfig(this.serviceUrl, token));\r\n })\r\n .then((config: ng.IRequestConfig) => {\r\n config.headers = angular.merge(config.headers, headers);\r\n return this.$http.put(this.serviceUrl.url + url, data, config);\r\n })\r\n .catch((error: any) => {\r\n return this.handleError(error, url, `${this.className}.$put`, data);\r\n });\r\n }\r\n\r\n private $delete(url: string, data?: any, headers?: { [key: string]: string; }): ng.IHttpPromise {\r\n url = this.normalizeUrl(url);\r\n\r\n return this.requestToken(this.serviceUrl)\r\n .then((token: string) => {\r\n return this.$q.when(this.getHttpConfig(this.serviceUrl, token));\r\n })\r\n .then((config: ng.IRequestConfig) => {\r\n\r\n if (data !== undefined && data !== null) {\r\n config.data = data;\r\n config.headers['Content-Type'] = 'application/json;charset=utf-8';\r\n }\r\n\r\n config.headers = angular.merge(config.headers, headers);\r\n return this.$http.delete(this.serviceUrl.url + url, config);\r\n })\r\n .catch((error: any) => {\r\n return this.handleError(error, url, `${this.className}.$delete`, data);\r\n });\r\n }\r\n\r\n private handleError(error: any, url: string, methodName: string, data?: any): ng.IPromise {\r\n this.logError(error, url, methodName, data);\r\n return this.$q.reject(error);\r\n }\r\n\r\n private logError(error: any, url: string, methodName: string, data?: any): void {\r\n let dataDump = null;\r\n\r\n if (data) {\r\n dataDump = JSON.stringify(data);\r\n }\r\n\r\n let rawError = (typeof error) === 'object' ? JSON.stringify(error) : error;\r\n\r\n this.errorService.handleError(new Portico.Models.PorticoException(`[${methodName}]`, rawError, 0, dataDump));\r\n }\r\n\r\n private showSpinner(): void {\r\n if (_.get(this.$rootScope, 'spinnerDisabled', false) === false) {\r\n // this.modalService.show(this.spinner);\r\n document.getElementById('global-spinner-overlay').style.display = 'flex';\r\n }\r\n }\r\n\r\n private hideSpinner(): void {\r\n // this.modalService.hide(this.spinner);\r\n document.getElementById('global-spinner-overlay').style.display = 'none';\r\n }\r\n }\r\n (ServiceInstance).prototype.GET = (ServiceInstance).prototype.get;\r\n (ServiceInstance).prototype.POST = (ServiceInstance).prototype.post;\r\n (ServiceInstance).prototype.PUT = (ServiceInstance).prototype.put;\r\n (ServiceInstance).prototype.DELETE = (ServiceInstance).prototype.delete;\r\n}","/**\r\n * TC - Card Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n * \r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Services.Legacy.CardService.Api {\r\n/* tslint:disable:no-unused-variable member-ordering */\r\n import models = Portico.Models.Legacy;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n @Service('app','ActivateCardApi')\r\n @Inject('webServiceUrls', 'legacyService')\r\n export class ActivateCardApi {\r\n private readonly instance: IServiceInstance;\r\n\r\n constructor(\r\n webServiceUrls: Portico.Models.Interfaces.IWebServiceUrls,\r\n legacyService: Portico.Services.LegacyService\r\n ) {\r\n this.instance = legacyService.createInstance(webServiceUrls.legacyCard);\r\n }\r\n /**\r\n * \r\n * @param programId \r\n * @param request \r\n */\r\n public post (programId: number, request: models.ReplaceCardRequestModel) {\r\n const url = '/ActivateCard/{programId}'\r\n .replace('{' + 'programId' + '}', String(programId));\r\n return this.instance.POST(models.IResponseModel, url, request)\r\n }\r\n }\r\n}","/**\r\n * TC - Card Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n * \r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Services.Legacy.CardService.Api {\r\n/* tslint:disable:no-unused-variable member-ordering */\r\n import models = Portico.Models.Legacy;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n @Service('app','CreateCardApi')\r\n @Inject('webServiceUrls', 'legacyService')\r\n export class CreateCardApi {\r\n private readonly instance: IServiceInstance;\r\n\r\n constructor(\r\n webServiceUrls: Portico.Models.Interfaces.IWebServiceUrls,\r\n legacyService: Portico.Services.LegacyService\r\n ) {\r\n this.instance = legacyService.createInstance(webServiceUrls.legacyCard);\r\n }\r\n /**\r\n * \r\n * @param programId \r\n * @param count \r\n */\r\n public post (programId: number, count: number, ) {\r\n const url = '/CreateCard/{programId}?count={ count }'\r\n .replace('{' + 'programId' + '}', String(programId))\r\n .replace('{ ' + 'count' + ' }', String(count));\r\n return this.instance.POST(models.IResponseModelMultiCardCreateResultModel, url)\r\n }\r\n }\r\n}","/**\r\n * TC - Card Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n * \r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Services.Legacy.CardService.Api {\r\n/* tslint:disable:no-unused-variable member-ordering */\r\n import models = Portico.Models.Legacy;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n @Service('app','MemberNumberStatusApi')\r\n @Inject('webServiceUrls', 'legacyService')\r\n export class MemberNumberStatusApi {\r\n private readonly instance: IServiceInstance;\r\n\r\n constructor(\r\n webServiceUrls: Portico.Models.Interfaces.IWebServiceUrls,\r\n legacyService: Portico.Services.LegacyService\r\n ) {\r\n this.instance = legacyService.createInstance(webServiceUrls.legacyCard);\r\n }\r\n /**\r\n * \r\n * @param programId \r\n * @param memberNumber \r\n */\r\n public get (programId: number, memberNumber: string, ) {\r\n const url = '/MemberNumberStatus/{programId}?memberNumber={ memberNumber }'\r\n .replace('{' + 'programId' + '}', String(programId))\r\n .replace('{ ' + 'memberNumber' + ' }', String(memberNumber));\r\n return this.instance.GET(models.IResponseModelMemberNumberStatusResultModel, url)\r\n }\r\n }\r\n}","/**\r\n * TC - Card Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n * \r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Services.Legacy.CardService.Api {\r\n/* tslint:disable:no-unused-variable member-ordering */\r\n import models = Portico.Models.Legacy;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n @Service('app','ReplaceCardApi')\r\n @Inject('webServiceUrls', 'legacyService')\r\n export class ReplaceCardApi {\r\n private readonly instance: IServiceInstance;\r\n\r\n constructor(\r\n webServiceUrls: Portico.Models.Interfaces.IWebServiceUrls,\r\n legacyService: Portico.Services.LegacyService\r\n ) {\r\n this.instance = legacyService.createInstance(webServiceUrls.legacyCard);\r\n }\r\n /**\r\n * \r\n * @param programId \r\n * @param replaceRequest \r\n */\r\n public post (programId: number, replaceRequest: models.ReplaceCardRequestModel) {\r\n const url = '/ReplaceCard/{programId}'\r\n .replace('{' + 'programId' + '}', String(programId));\r\n return this.instance.POST(models.IResponseModelReplaceCardResultModel, url, replaceRequest)\r\n }\r\n }\r\n}","/**\r\n * TC - Card Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n * \r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Services.Legacy.CardService.Api {\r\n/* tslint:disable:no-unused-variable member-ordering */\r\n import models = Portico.Models.Legacy;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n @Service('app','TerminateCardApi')\r\n @Inject('webServiceUrls', 'legacyService')\r\n export class TerminateCardApi {\r\n private readonly instance: IServiceInstance;\r\n\r\n constructor(\r\n webServiceUrls: Portico.Models.Interfaces.IWebServiceUrls,\r\n legacyService: Portico.Services.LegacyService\r\n ) {\r\n this.instance = legacyService.createInstance(webServiceUrls.legacyCard);\r\n }\r\n /**\r\n * \r\n * @param programId \r\n * @param terminateRequest \r\n */\r\n public put (programId: number, terminateRequest: models.TerminateCardRequestModel) {\r\n const url = '/TerminateCard/{programId}'\r\n .replace('{' + 'programId' + '}', String(programId));\r\n return this.instance.PUT(models.IResponseModel, url, terminateRequest)\r\n }\r\n }\r\n}","/**\r\n * TC - Enrollment Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n * \r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Services.Legacy.EnrollmentService.Api {\r\n/* tslint:disable:no-unused-variable member-ordering */\r\n import models = Portico.Models.Legacy;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n @Service('app','BasicEnrollmentApi')\r\n @Inject('webServiceUrls', 'legacyService')\r\n export class BasicEnrollmentApi {\r\n private readonly instance: IServiceInstance;\r\n\r\n constructor(\r\n webServiceUrls: Portico.Models.Interfaces.IWebServiceUrls,\r\n legacyService: Portico.Services.LegacyService\r\n ) {\r\n this.instance = legacyService.createInstance(webServiceUrls.legacyEnrollment);\r\n }\r\n /**\r\n * \r\n * @param programId \r\n * @param request \r\n */\r\n public post (programId: number, request: models.EnrollmentRequestModel) {\r\n const url = '/BasicEnrollment/{programId}'\r\n .replace('{' + 'programId' + '}', String(programId));\r\n return this.instance.POST(models.ResponseModelEnrollmentResultModel, url, request)\r\n }\r\n }\r\n}","/**\r\n * TC - Enrollment Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n * \r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Services.Legacy.EnrollmentService.Api {\r\n/* tslint:disable:no-unused-variable member-ordering */\r\n import models = Portico.Models.Legacy;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n @Service('app','BasicEnrollmentWithPdfApi')\r\n @Inject('webServiceUrls', 'legacyService')\r\n export class BasicEnrollmentWithPdfApi {\r\n private readonly instance: IServiceInstance;\r\n\r\n constructor(\r\n webServiceUrls: Portico.Models.Interfaces.IWebServiceUrls,\r\n legacyService: Portico.Services.LegacyService\r\n ) {\r\n this.instance = legacyService.createInstance(webServiceUrls.legacyEnrollment);\r\n }\r\n /**\r\n * \r\n * @summary \r\n * @param programId \r\n * @param request \r\n */\r\n public post (programId: number, request: models.EnrollmentRequestModel) {\r\n const url = '/BasicEnrollmentWithPdf/{programId}'\r\n .replace('{' + 'programId' + '}', String(programId));\r\n return this.instance.POST(models.ResponseModelEnrollmentWithPdfResultModel, url, request)\r\n }\r\n }\r\n}","/**\r\n * TC - Enrollment Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n * \r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Services.Legacy.EnrollmentService.Api {\r\n/* tslint:disable:no-unused-variable member-ordering */\r\n import models = Portico.Models.Legacy;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n @Service('app','EnrollmentApi')\r\n @Inject('webServiceUrls', 'legacyService')\r\n export class EnrollmentApi {\r\n private readonly instance: IServiceInstance;\r\n\r\n constructor(\r\n webServiceUrls: Portico.Models.Interfaces.IWebServiceUrls,\r\n legacyService: Portico.Services.LegacyService\r\n ) {\r\n this.instance = legacyService.createInstance(webServiceUrls.legacyEnrollment);\r\n }\r\n /**\r\n * \r\n * @param programId \r\n * @param request \r\n */\r\n public post (programId: number, request: models.EnrollmentInsVerRequestModel) {\r\n const url = '/Enrollment/{programId}'\r\n .replace('{' + 'programId' + '}', String(programId));\r\n return this.instance.POST(models.ResponseModelEnrollmentResultModel, url, request)\r\n }\r\n }\r\n}","/**\r\n * TC - Enrollment Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n * \r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Services.Legacy.EnrollmentService.Api {\r\n/* tslint:disable:no-unused-variable member-ordering */\r\n import models = Portico.Models.Legacy;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n @Service('app','EnrollmentUpdateApi')\r\n @Inject('webServiceUrls', 'legacyService')\r\n export class EnrollmentUpdateApi {\r\n private readonly instance: IServiceInstance;\r\n\r\n constructor(\r\n webServiceUrls: Portico.Models.Interfaces.IWebServiceUrls,\r\n legacyService: Portico.Services.LegacyService\r\n ) {\r\n this.instance = legacyService.createInstance(webServiceUrls.legacyEnrollment);\r\n }\r\n /**\r\n * \r\n * @summary \r\n * @param programId \r\n * @param request \r\n */\r\n public put (programId: number, request: models.EnrollmentUpdateRequestModel) {\r\n const url = '/EnrollmentUpdate/{programId}'\r\n .replace('{' + 'programId' + '}', String(programId));\r\n return this.instance.PUT(models.ResponseModelEnrollmentResultModel, url, request)\r\n }\r\n }\r\n}","/**\r\n * TC - Enrollment Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n * \r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Services.Legacy.EnrollmentService.Api {\r\n/* tslint:disable:no-unused-variable member-ordering */\r\n import models = Portico.Models.Legacy;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n @Service('app','PatientSearchApi')\r\n @Inject('webServiceUrls', 'legacyService')\r\n export class PatientSearchApi {\r\n private readonly instance: IServiceInstance;\r\n\r\n constructor(\r\n webServiceUrls: Portico.Models.Interfaces.IWebServiceUrls,\r\n legacyService: Portico.Services.LegacyService\r\n ) {\r\n this.instance = legacyService.createInstance(webServiceUrls.legacyEnrollment);\r\n }\r\n /**\r\n * \r\n * @param programId \r\n * @param searchRequest \r\n */\r\n public post (programId: number, searchRequest: models.PatientSearchRequestModel) {\r\n const url = '/PatientSearch/{programId}'\r\n .replace('{' + 'programId' + '}', String(programId));\r\n return this.instance.POST(models.ResponseModelPatientSearchResultModel, url, searchRequest)\r\n }\r\n }\r\n}","/**\r\n * TC - Enrollment Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n * \r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Services.Legacy.EnrollmentService.Api {\r\n/* tslint:disable:no-unused-variable member-ordering */\r\n import models = Portico.Models.Legacy;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n @Service('app','ResendCorrespondenceApi')\r\n @Inject('webServiceUrls', 'legacyService')\r\n export class ResendCorrespondenceApi {\r\n private readonly instance: IServiceInstance;\r\n\r\n constructor(\r\n webServiceUrls: Portico.Models.Interfaces.IWebServiceUrls,\r\n legacyService: Portico.Services.LegacyService\r\n ) {\r\n this.instance = legacyService.createInstance(webServiceUrls.legacyEnrollment);\r\n }\r\n /**\r\n * \r\n * @summary \r\n * @param programId \r\n * @param request \r\n */\r\n public post (programId: number, request: models.ResendCorrespondenceRequestModel) {\r\n const url = '/ResendCorrespondence/{programId}'\r\n .replace('{' + 'programId' + '}', String(programId));\r\n return this.instance.POST(models.ResponseModelResendCorrespondenceResultModel, url, request)\r\n }\r\n }\r\n}","/**\r\n * TC - Enrollment Services v1.0.0\r\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\r\n *\r\n * OpenAPI spec version: v1\r\n * \r\n *\r\n * NOTE: This class is auto generated by the swagger code generator program.\r\n * https://github.com/swagger-api/swagger-codegen.git\r\n * Do not edit the class manually.\r\n */\r\n\r\nnamespace Portico.Services.Legacy.EnrollmentService.Api {\r\n/* tslint:disable:no-unused-variable member-ordering */\r\n import models = Portico.Models.Legacy;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n @Service('app','VerifySurveyAnswerApi')\r\n @Inject('webServiceUrls', 'legacyService')\r\n export class VerifySurveyAnswerApi {\r\n private readonly instance: IServiceInstance;\r\n\r\n constructor(\r\n webServiceUrls: Portico.Models.Interfaces.IWebServiceUrls,\r\n legacyService: Portico.Services.LegacyService\r\n ) {\r\n this.instance = legacyService.createInstance(webServiceUrls.legacyEnrollment);\r\n }\r\n /**\r\n * \r\n * @param programId \r\n * @param surveyVerifyRequest \r\n */\r\n public post (programId: number, surveyVerifyRequest: models.VerifySurveyEntryRequestModel) {\r\n const url = '/VerifySurveyAnswer/{programId}'\r\n .replace('{' + 'programId' + '}', String(programId));\r\n return this.instance.POST(models.ResponseModelVerifySurveyEntryResultModel, url, surveyVerifyRequest)\r\n }\r\n }\r\n}","namespace Portico.Services.Legacy.EnrollmentService {\r\n import Api = Portico.Services.Legacy.EnrollmentService.Api;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n const apiModule = angular.module('app')\r\n .service('LegacyEnrollmentService.BasicEnrollmentApi', Api.BasicEnrollmentApi)\r\n .service('LegacyEnrollmentService.BasicEnrollmentWithPdfApi', Api.BasicEnrollmentWithPdfApi)\r\n .service('LegacyEnrollmentService.EnrollmentApi', Api.EnrollmentApi)\r\n .service('LegacyEnrollmentService.EnrollmentUpdateApi', Api.EnrollmentUpdateApi)\r\n .service('LegacyEnrollmentService.PatientSearchApi', Api.PatientSearchApi)\r\n .service('LegacyEnrollmentService.ResendCorrespondenceApi', Api.ResendCorrespondenceApi)\r\n .service('LegacyEnrollmentService.VerifySurveyAnswerApi', Api.VerifySurveyAnswerApi)\r\n\r\n export interface ILegacyEnrollmentService {\r\n BasicEnrollmentApi: Api.BasicEnrollmentApi;\r\n BasicEnrollmentWithPdfApi: Api.BasicEnrollmentWithPdfApi;\r\n EnrollmentApi: Api.EnrollmentApi;\r\n EnrollmentUpdateApi: Api.EnrollmentUpdateApi;\r\n PatientSearchApi: Api.PatientSearchApi;\r\n ResendCorrespondenceApi: Api.ResendCorrespondenceApi;\r\n VerifySurveyAnswerApi: Api.VerifySurveyAnswerApi;\r\n }\r\n\r\n @Service('app', 'LegacyEnrollmentService')\r\n @Inject(\r\n 'LegacyEnrollmentService.BasicEnrollmentApi',\r\n 'LegacyEnrollmentService.BasicEnrollmentWithPdfApi',\r\n 'LegacyEnrollmentService.EnrollmentApi',\r\n 'LegacyEnrollmentService.EnrollmentUpdateApi',\r\n 'LegacyEnrollmentService.PatientSearchApi',\r\n 'LegacyEnrollmentService.ResendCorrespondenceApi',\r\n 'LegacyEnrollmentService.VerifySurveyAnswerApi',\r\n )\r\n export class LegacyEnrollmentService implements ILegacyEnrollmentService {\r\n constructor(\r\n public BasicEnrollmentApi: Api.BasicEnrollmentApi,\r\n public BasicEnrollmentWithPdfApi: Api.BasicEnrollmentWithPdfApi,\r\n public EnrollmentApi: Api.EnrollmentApi,\r\n public EnrollmentUpdateApi: Api.EnrollmentUpdateApi,\r\n public PatientSearchApi: Api.PatientSearchApi,\r\n public ResendCorrespondenceApi: Api.ResendCorrespondenceApi,\r\n public VerifySurveyAnswerApi: Api.VerifySurveyAnswerApi,\r\n ){}\r\n } \r\n}","namespace Portico.Services.Legacy.CardService {\r\n import Api = Portico.Services.Legacy.CardService.Api;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n const apiModule = angular.module('app')\r\n .service('LegacyCardService.ActivateCardApi', Api.ActivateCardApi)\r\n .service('LegacyCardService.CreateCardApi', Api.CreateCardApi)\r\n .service('LegacyCardService.MemberNumberStatusApi', Api.MemberNumberStatusApi)\r\n .service('LegacyCardService.ReplaceCardApi', Api.ReplaceCardApi)\r\n .service('LegacyCardService.TerminateCardApi', Api.TerminateCardApi)\r\n\r\n export interface ILegacyCardService {\r\n ActivateCardApi: Api.ActivateCardApi;\r\n CreateCardApi: Api.CreateCardApi;\r\n MemberNumberStatusApi: Api.MemberNumberStatusApi;\r\n ReplaceCardApi: Api.ReplaceCardApi;\r\n TerminateCardApi: Api.TerminateCardApi;\r\n }\r\n\r\n @Service('app', 'LegacyCardService')\r\n @Inject(\r\n 'LegacyCardService.ActivateCardApi',\r\n 'LegacyCardService.CreateCardApi',\r\n 'LegacyCardService.MemberNumberStatusApi',\r\n 'LegacyCardService.ReplaceCardApi',\r\n 'LegacyCardService.TerminateCardApi',\r\n )\r\n export class LegacyCardService implements ILegacyCardService {\r\n constructor(\r\n public ActivateCardApi: Api.ActivateCardApi,\r\n public CreateCardApi: Api.CreateCardApi,\r\n public MemberNumberStatusApi: Api.MemberNumberStatusApi,\r\n public ReplaceCardApi: Api.ReplaceCardApi,\r\n public TerminateCardApi: Api.TerminateCardApi,\r\n ){}\r\n } \r\n}","namespace Portico.Services {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\timport pmg = Portico.Models.Gateway;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pms = Portico.Models.Setup;\r\n\timport ps = Portico.Services;\r\n\timport psge = apigateway.enums;\r\n\timport psgm = apigateway.models;\r\n\r\n\texport class Action {\r\n\t\tcommand: any;\r\n\t\tmessages: string[];\r\n\t\tresult: any;\r\n\t\tsuccess: boolean;\r\n\t\ttype: string;\r\n\r\n\t\tchild: Action;\r\n\t\tnext: Action;\r\n\t\tparent: Action;\r\n\t\tprevious: Action;\r\n\t\tscope: angular.IScope;\r\n\r\n\t\tconstructor(command: any, type: string) {\r\n\t\t\tthis.command = command;\r\n\t\t\tthis.messages = [];\r\n\t\t\tthis.result = null;\r\n\t\t\tthis.success = true;\r\n\t\t\tthis.type = type;\r\n\r\n\t\t\tthis.child = null;\r\n\t\t\tthis.next = null;\r\n\t\t\tthis.parent = null;\r\n\t\t\tthis.previous = null;\r\n\t\t\tthis.scope = null;\r\n\t\t}\r\n\r\n\t\tisAllowed(): boolean {\r\n\t\t\tconst allowCommand = this.command !== null;\r\n\t\t\tconst allowIf = this.type !== 'IF' || (this.type === 'IF' && this.result !== false);\r\n\t\t\tconst allowElse = this.type !== 'ELSE' || (this.type === 'ELSE' && this.result !== false);\r\n\t\t\tconst allowError = this.type !== 'ERROR' || (this.type === 'ERROR' && this.result !== false);\r\n\t\t\tconst allowParent = this.parent === null || this.parent.isAllowed();\r\n\t\t\tconst allow = allowCommand && allowIf && allowElse && allowError && allowParent;\r\n\r\n\t\t\treturn allow;\r\n\t\t}\r\n\t}\r\n\r\n\texport class ActionProcessor {\r\n\t\tprivate _action: Action;\r\n\t\tprivate _promise: angular.IPromise;\r\n\t\tprivate _stopped: boolean;\r\n\r\n\t\tconstructor(private $q: angular.IQService, private porticoService: ps.IPorticoService) {\r\n\t\t\tthis._action = null;\r\n\t\t\tthis._promise = this.$q.when(true);\r\n\t\t\tthis._stopped = false;\r\n\t\t}\r\n\r\n\t\tbegin(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn null;\r\n\t\t\t}, 'BEGIN');\r\n\t\t}\r\n\r\n\t\telse(): ActionProcessor {\r\n\t\t\treturn this._add((self: Action) => {\r\n\t\t\t\treturn self.previous && !self.previous.result;\r\n\t\t\t}, 'ELSE');\r\n\t\t}\r\n\r\n\t\tend(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn null;\r\n\t\t\t}, 'END');\r\n\t\t}\r\n\r\n\t\terror(): ActionProcessor {\r\n\t\t\treturn this._add((self: Action) => {\r\n\t\t\t\treturn self.previous && !self.previous.success;\r\n\t\t\t}, 'ERROR');\r\n\t\t}\r\n\r\n\t\tif(expression: string): ActionProcessor {\r\n\t\t\treturn this._add((self: Action) => {\r\n\t\t\t\treturn !!self.scope.$eval(expression);\r\n\t\t\t}, 'IF');\r\n\t\t}\r\n\r\n\t\tprivate log(action: Action, depth: number): string {\r\n\t\t\tlet callStack = '';\r\n\r\n\t\t\tfor (let i = 0; i < depth; i++) {\r\n\t\t\t\tcallStack += '\\t';\r\n\t\t\t}\r\n\r\n\t\t\tcallStack += action.type + '\\n';\r\n\r\n\t\t\tif (action.child) {\r\n\t\t\t\tcallStack += this.log(action.child, depth + 1);\r\n\t\t\t}\r\n\r\n\t\t\tif (action.next) {\r\n\t\t\t\tcallStack += this.log(action.next, depth);\r\n\t\t\t}\r\n\r\n\t\t\treturn callStack;\r\n\t\t}\r\n\r\n\t\tpromise(): angular.IPromise {\r\n\t\t\tif (this.porticoService.dataService.session.mode === 'edit') {\r\n\t\t\t\tthis.porticoService.$log.info('ActionService Call Stack:\\n' + this.log(this._action, 1));\r\n\t\t\t}\r\n\r\n\t\t\treturn this._promise;\r\n\t\t}\r\n\r\n\t\tresult(target: string, messages: string = null): ActionProcessor {\r\n\t\t\treturn this._add((self: Action) => {\r\n\t\t\t\tself.scope.$eval(`${target}=v`, { v: self.parent.result });\r\n\r\n\t\t\t\tif (messages) {\r\n\t\t\t\t\tself.scope.$eval(`${messages}=v`, { v: self.parent.messages });\r\n\t\t\t\t}\r\n\t\t\t}, 'RESULT');\r\n\t\t}\r\n\r\n\t\tscope($scope: angular.IScope): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn null;\r\n\t\t\t}, 'SCOPE', $scope);\r\n\t\t}\r\n\r\n\t\tstop(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\tthis._stopped = true;\r\n\t\t\t\treturn null;\r\n\t\t\t}, 'STOP');\r\n\t\t}\r\n\r\n\t\tprivate _add(command: any, type: string = 'COMMAND', $scope: angular.IScope = null): ActionProcessor {\r\n\t\t\tconst action = new Action(command, type);\r\n\r\n\t\t\tif (this._action == null) {\r\n\t\t\t\tthis._action = action;\r\n\t\t\t} else {\r\n\t\t\t\tlet last = this._last(this._action, action.type);\r\n\r\n\t\t\t\tif (this.porticoService.dataService.session.mode === 'edit') {\r\n\t\t\t\t\tthis.porticoService.$log.info('ActionService: { action = ' + type + ', last = ' + last.type + '}');\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//if (['RESULT'].includes(action.type)) {\r\n\t\t\t\tif (_.indexOf(['RESULT'], action.type) > -1) {\r\n\t\t\t\t\taction.parent = last;\r\n\t\t\t\t\tlast.child = action;\r\n\t\t\t\t}\r\n\t\t\t\t//else if (['BEGIN', 'ELSE', 'ERROR', 'IF'].includes(last.type) && !last.child) {\r\n\t\t\t\telse if (_.indexOf(['BEGIN', 'ELSE', 'ERROR', 'IF'], last.type) > -1 && !last.child) {\r\n\r\n\t\t\t\t\taction.parent = last;\r\n\t\t\t\t\tlast.child = action;\r\n\t\t\t\t} else {\r\n\t\t\t\t\taction.previous = last;\r\n\t\t\t\t\taction.parent = last.parent;\r\n\t\t\t\t\tlast.next = action;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\taction.scope = ($scope ? $scope : (action.previous ? action.previous.scope : (action.parent ? action.parent.scope : null)));\r\n\r\n\t\t\tthis._execute(action);\r\n\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tprivate _execute(action: Action) {\r\n\t\t\tif (!this._stopped) {\r\n\t\t\t\tthis._promise = this._promise.then((result) => {\r\n\t\t\t\t\tconst response = action.isAllowed() ? action.command(/* self = */ action) : null;\r\n\t\t\t\t\tconst promise = this.$q.when(response);\r\n\r\n\t\t\t\t\treturn promise.then((result) => {\r\n\t\t\t\t\t\taction.result = result;\r\n\t\t\t\t\t\taction.success = true;\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}).catch((messages) => {\r\n\t\t\t\t\t\taction.messages = messages;\r\n\t\t\t\t\t\taction.success = false;\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tprivate _last(action: Action, type: string): Action {\r\n\t\t\tif (action.next) {\r\n\t\t\t\tconst temp = this._last(action.next, type);\r\n\r\n\t\t\t\t//if (temp) {\r\n\t\t\t\treturn temp;\r\n\t\t\t\t//}\r\n\t\t\t}\r\n\r\n\t\t\t//if (['BEGIN', 'ELSE', 'ERROR', 'IF'].includes(action.type)) {\r\n\t\t\tif (_.indexOf(['BEGIN', 'ELSE', 'ERROR', 'IF'], action.type) > -1) {\r\n\t\t\t\tif (!action.child) {\r\n\t\t\t\t\treturn action;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst temp = this._last(action.child, type);\r\n\r\n\t\t\t\tif (temp) {\r\n\t\t\t\t\treturn temp;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (action.parent) {\r\n\t\t\t\t//if (['ELSE'].includes(type) && ['ERROR', 'IF'].includes(action.type)) {\r\n\t\t\t\tif (_.indexOf(['ELSE'], type) > -1 && _.indexOf(['ERROR', 'IF'], action.type) > -1) {\r\n\t\t\t\t\treturn action;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//if (['END'].includes(action.type) && ['BEGIN'].includes(action.parent.type)) {\r\n\t\t\t\tif (_.indexOf(['END'], type) > -1 && _.indexOf(['BEGIN'], action.parent.type) > -1) {\r\n\t\t\t\t\treturn action.parent;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//if (['ELSE', 'ERROR', 'IF'].includes(action.parent.type)) {\r\n\t\t\t\tif (_.indexOf(['ELSE', 'ERROR', 'IF'], action.parent.type) > -1) {\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn action;\r\n\t\t}\r\n\r\n\t\t///////////////////////////////////\r\n\t\t// data initialization functions //\r\n\t\t///////////////////////////////////\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitDataTables(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.initDataTables();\r\n\t\t\t}, 'initDataTables');\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitDataTypes(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.initDataTypes();\r\n\t\t\t}, 'initDataTypes');\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitDemos(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.initDemos();\r\n\t\t\t}, 'initDemos');\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitDiagnoses(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.initDiagnoses();\r\n\t\t\t}, 'initDiagnoses');\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitIntakeLayout(key: string = null): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.initIntakeLayout(key);\r\n\t\t\t}, 'initIntakeLayout');\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitLayoutSection(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.initLayoutSection();\r\n\t\t\t}, 'initLayoutSection');\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitNdcs(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.initNdcs();\r\n\t\t\t}, 'initNdcs');\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitPortal(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.initPortal();\r\n\t\t\t}, 'initPortal');\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitStates(key: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.initStates(key);\r\n\t\t\t}, 'initStates');\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitSurveys(key: string = null): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.initSurveys(key);\r\n\t\t\t}, 'initSurveys');\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitTemplates(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.initTemplates();\r\n\t\t\t}, 'initTemplates');\r\n\t\t}\r\n\r\n\t\t/////////////////////////////////\r\n\t\t// demo portal setup functions //\r\n\t\t/////////////////////////////////\r\n\r\n\t\teditPortal(id: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.demoService.edit(id);\r\n\t\t\t}, 'editPortal');\r\n\t\t}\r\n\r\n\t\tremovePortal(portal: pms.Portal): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.demoService.remove(portal);\r\n\t\t\t}, 'removePortal');\r\n\t\t}\r\n\r\n\t\tsavePortal(demo: pms.Demo): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.demoService.save(demo);\r\n\t\t\t}, 'savePortal');\r\n\t\t}\r\n\r\n\t\t///////////////////////\r\n\t\t// account functions //\r\n\t\t///////////////////////\r\n\r\n\t\taccount_create(account: pme.Account = null) {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\tconst programId = this.porticoService.dataService.getProgramId();\r\n\t\t\t\treturn this.porticoService.enterpriseService.accountService.create(programId, account);\r\n\t\t\t}, 'account_create');\r\n\t\t}\r\n\r\n\t\taccount_createFromCase(caze: psgm.GetCaseResponseModel) {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\tconst programId = this.porticoService.dataService.getProgramId();\r\n\t\t\t\treturn this.porticoService.enterpriseService.accountService.createFromCase(programId, caze);\r\n\t\t\t}, 'account_createFromCase');\r\n\t\t}\r\n\r\n\t\taccount_getPrescribers(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.accountService.getPrescribers();\r\n\t\t\t}, 'account_getPrescribers');\r\n\t\t}\r\n\r\n\t\taccount_getSites(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.accountService.getSites();\r\n\t\t\t}, 'account_getSites');\r\n\t\t}\r\n\r\n\t\taccount_getTasks(typeId: number, accountId: number = null): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.accountService.getTasks(typeId, accountId);\r\n\t\t\t}, 'account_getTasks');\r\n\t\t}\r\n\r\n\t\t// placeholder for action to populate the account with all data...\r\n\t\taccount_populate(account: pme.Account): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn null;\r\n\t\t\t}, 'account_populate');\r\n\t\t}\r\n\r\n\t\taccount_savePrescriber(prescriber: pme.Prescriber): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.accountService.savePrescriber(prescriber);\r\n\t\t\t}, 'account_savePrescriber');\r\n\t\t}\r\n\r\n\t\taccount_saveSite(site: pme.Site): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.accountService.saveSite(site);\r\n\t\t\t}, 'account_saveSite');\r\n\t\t}\r\n\r\n\t\taccount_saveTask(task: pme.Task): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.accountService.saveTask(task);\r\n\t\t\t}, 'account_saveTask');\r\n\t\t}\r\n\r\n\t\taccount_diagnosis_populate(account: pme.Account): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.diagnosisService.populate(account);\r\n\t\t\t}, 'account_diagnosis_populate');\r\n\t\t}\r\n\r\n\t\taccount_payor_add(account: pme.Account, role: psge.PayorType, index: number = null): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn account.addPayor(role, index);\r\n\t\t\t}, 'account_payor_add');\r\n\t\t}\r\n\r\n\t\taccount_payor_filter(account: pme.Account, role: psge.PayorType): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn account.filterPayors(role);\r\n\t\t\t}, 'account_payor_filter');\r\n\t\t}\r\n\r\n\t\taccount_payor_length(account: pme.Account, role: psge.PayorType): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn account.filterPayors(role).length;\r\n\t\t\t}, 'account_payor_length');\r\n\t\t}\r\n\r\n\t\taccount_payor_populate(account: pme.Account): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.payorService.populate(account);\r\n\t\t\t}, 'account_payor_populate');\r\n\t\t}\r\n\r\n\t\taccount_payor_remove(account: pme.Account, relationship: pme.PayorRelationship): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn account.removePayor(relationship);\r\n\t\t\t}, 'account_payor_remove');\r\n\t\t}\r\n\r\n\t\taccount_pharmacy_populate(account: pme.Account): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.pharmacyService.populate(account);\r\n\t\t\t}, 'account_pharmacy_populate');\r\n\t\t}\r\n\r\n\t\taccount_prescriber_add(account: pme.Account): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn account.addPrescriber();\r\n\t\t\t}, 'account_prescriber_add');\r\n\t\t}\r\n\r\n\t\taccount_prescriber_length(account: pme.Account): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn account.prescriberRelationships.length;\r\n\t\t\t}, 'account_prescriber_length');\r\n\t\t}\r\n\r\n\t\taccount_prescriber_populate(account: pme.Account): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.prescriberService.populate(account);\r\n\t\t\t}, 'account_prescriber_populate');\r\n\t\t}\r\n\r\n\t\taccount_prescriber_remove(account: pme.Account, relationship: pme.PrescriberRelationship): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn account.removePrescriber(relationship);\r\n\t\t\t}, 'account_prescriber_remove');\r\n\t\t}\r\n\r\n\t\taccount_prescription_populate(account: pme.Account): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\tconst programId = this.porticoService.dataService.getProgramId();\r\n\t\t\t\treturn this.porticoService.enterpriseService.prescriptionService.populate(programId, account);\r\n\t\t\t}, 'account_prescription_populate');\r\n\t\t}\r\n\r\n\t\taccount_surveySession_populate(account: pme.Account, surveyIds: number[]): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\tconst programId = this.porticoService.dataService.getProgramId();\r\n\t\t\t\treturn this.porticoService.enterpriseService.surveyService.populate_session(programId, account, surveyIds);\r\n\t\t\t}, 'account_surveySession_populate');\r\n\t\t}\r\n\r\n\t\taccount_surveySession_answer_get(account: pme.Account, survey: number | string, question: number | string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.account_surveySession_answer_get(account, survey, question);\r\n\t\t\t}, 'account_surveySession_answer_get');\r\n\t\t}\r\n\r\n\t\taccount_surveySession_answer_getValue(account: pme.Account, survey: number | string, question: number | string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.account_surveySession_answer_getValue(account, survey, question);\r\n\t\t\t}, 'account_surveySession_answer_getValue');\r\n\t\t}\r\n\r\n\t\taccount_surveySession_answers_get(account: pme.Account, survey: number | string, question: number | string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.account_surveySession_answers_get(account, survey, question);\r\n\t\t\t}, 'account_surveySession_answers_get');\r\n\t\t}\r\n\r\n\t\taccount_surveySession_answers_getValues(account: pme.Account, survey: number | string, question: number | string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.account_surveySession_answers_getValues(account, survey, question);\r\n\t\t\t}, 'account_surveySession_answers_getValues');\r\n\t\t}\r\n\r\n\t\taccount_surveySession_answers_set(account: pme.Account, survey: number | string, question: number | string, answers: (number | string)[], value: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.account_surveySession_answers_set(account, survey, question, answers, value);\r\n\t\t\t}, 'account_surveySession_answers_set');\r\n\t\t}\r\n\r\n\t\taccount_surveySession_answers_test(account: pme.Account, survey: number | string, question: number | string, answer: number | string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.account_surveySession_answers_test(account, survey, question, answer);\r\n\t\t\t}, 'account_surveySession_answers_test');\r\n\t\t}\r\n\r\n\t\taccount_user_activate(userName: string, activate: boolean): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.accountService.activateUser(userName, activate);\r\n\t\t\t}, 'account_user_activate');\r\n\t\t}\r\n\r\n\t\taccount_user_get(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.accountService.getUsers();\r\n\t\t\t}, 'account_user_get');\r\n\t\t}\r\n\r\n\t\taccount_user_save(user: pme.User): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.accountService.saveUser(user);\r\n\t\t\t}, 'account_user_save');\r\n\t\t}\r\n\r\n\t\taccount_userRole_save(userName: string, role: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.accountService.saveUserRole(userName, role);\r\n\t\t\t}, 'account_userRole_save');\r\n\t\t}\r\n\r\n\t\t//////////////////////////////\r\n\t\t// authentication functions //\r\n\t\t//////////////////////////////\r\n\r\n\t\tauthentication_authenticateAccount(userName: string, password: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.authenticationService.authenticateAccount(userName, password);\r\n\t\t\t}, 'authentication_authenticateAccount');\r\n\t\t}\r\n\r\n\t\tauthentication_authenticateUser(userName: string, password: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.authenticationService.authenticateUser(userName, password);\r\n\t\t\t}, 'authentication_authenticateUser');\r\n\t\t}\r\n\r\n\t\tauthentication_changePassword(oldPassword: string, newPassword: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.authenticationService.changePassword(oldPassword, newPassword);\r\n\t\t\t}, 'authentication_changePassword');\r\n\t\t}\r\n\r\n\t\tauthentication_createSession(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.authenticationService.createSession();\r\n\t\t\t}, 'authentication_createSession');\r\n\t\t}\r\n\r\n\t\tauthentication_getCurrentUser(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.authenticationService.getCurrentUser();\r\n\t\t\t}, 'authentication_getCurrentUser');\r\n\t\t}\r\n\r\n\t\tauthentication_getPortalRoles(portalId: number): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.authenticationService.getPortalRoles(portalId);\r\n\t\t\t}, 'authentication_getPortalRoles');\r\n\t\t}\r\n\r\n\t\tauthentication_getPortalUsers(portalId: number, accountId?: number): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.authenticationService.getPortalUsers(portalId, accountId);\r\n\t\t\t}, 'authentication_getPortalUsers');\r\n\t\t}\r\n\r\n\t\tauthentication_isEmailRegistered(email: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.authenticationService.isEmailRegistered(email);\r\n\t\t\t}, 'authentication_isEmailRegistered');\r\n\t\t}\r\n\r\n\t\tauthentication_isExistingUser(userName: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.authenticationService.isExistingUser(userName);\r\n\t\t\t}, 'authentication_isExistingUser');\r\n\t\t}\r\n\r\n\t\tauthentication_resetPassword(userName: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.authenticationService.resetPassword(userName);\r\n\t\t\t}, 'authentication_resetPassword');\r\n\t\t}\r\n\r\n\t\tauthentication_resetUserPassword(portalId: string, userId: number): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.authenticationService.resetUserPassword(portalId, userId);\r\n\t\t\t}, 'authentication_resetUserPassword');\r\n\t\t}\r\n\r\n\t\tauthentication_saveCurrentUser(user: pme.User): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.authenticationService.saveCurrentUser(user);\r\n\t\t\t}, 'authentication_saveCurrentUser');\r\n\t\t}\r\n\r\n\t\tauthentication_saveUser(portalId: string, user: pme.User): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.authenticationService.saveUser(portalId, user);\r\n\t\t\t}, 'authentication_saveUser');\r\n\t\t}\r\n\r\n\t\tauthentication_touchSession(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.authenticationService.touchSession();\r\n\t\t\t}, 'authentication_touchSession');\r\n\t\t}\r\n\r\n\t\tauthentication_isAuthenticated(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.authenticationService.isAuthenticated();\r\n\t\t\t}, 'authentication_isAuthenticated');\r\n\t\t}\r\n\r\n\t\tauthentication_logOut(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.authenticationService.logOut();\r\n\t\t\t}, 'authentication_logOut');\r\n\t\t}\r\n\r\n\t\t/////////////////////////////\r\n\t\t// authorization functions //\r\n\t\t/////////////////////////////\t\t\r\n\r\n\t\tauthorization_userProfile_get(id: number): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.authorizationService.getUserProfile(id);\r\n\t\t\t}, 'authorization_userProfile_get');\r\n\t\t}\r\n\r\n\t\t/////////////////////////////\r\n\t\t// case/workflow functions //\r\n\t\t/////////////////////////////\t\t\r\n\r\n\t\t/////////////////////////////////\r\n\t\t// data manipulation functions //\r\n\t\t/////////////////////////////////\r\n\r\n\t\tcopy(source: any, target: any = null): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn target ? angular.copy(source, target) : angular.copy(source);\r\n\t\t\t}, 'copy');\r\n\t\t}\r\n\r\n\t\teval(expression: string): ActionProcessor {\r\n\t\t\treturn this._add((self: Action) => {\r\n\t\t\t\treturn self.scope.$eval(expression);\r\n\t\t\t}, 'eval');\r\n\t\t}\r\n\r\n\t\t/////////////////////\r\n\t\t// claim functions //\r\n\t\t/////////////////////\r\n\r\n\t\tclaim_getAccumulator(memberNumber: string, date: Date): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.claimService.getAccumulator(memberNumber, date);\r\n\t\t\t}, 'claim_getAccumulator');\r\n\t\t}\r\n\r\n\t\t//////////////////////////\r\n\t\t// conversion functions //\r\n\t\t//////////////////////////\r\n\r\n\t\tconversion_getCaseResponseModelToAccount(model: psgm.GetCaseResponseModel): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.conversionService.convertGetCaseResponseModelToAccount(model);\r\n\t\t\t}, 'conversion_getCaseResponseModelToAccount');\r\n\t\t}\r\n\r\n\t\t/////////////////////////\r\n\t\t// diagnosis functions //\r\n\t\t/////////////////////////\r\n\r\n\t\tdiagnosis_get(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.diagnosisService.getByProgramId();\r\n\t\t\t}, 'diagnosis_get');\r\n\t\t}\r\n\r\n\t\t////////////////////////\r\n\t\t// document functions //\r\n\t\t////////////////////////\r\n\r\n\t\tdocument_createPdfFromAccount(account: pme.Account): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.document_createPdfFromAccount(account);\r\n\t\t\t}, 'document_createPdfFromAccount');\r\n\t\t}\r\n\r\n\t\tdocument_upload(file: any, typeId: number = 10002): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\tconst programId = this.porticoService.dataService.getProgramId();\r\n\t\t\t\treturn this.porticoService.enterpriseService.documentService.upload(programId, typeId, file);\r\n\t\t\t}, 'document_upload');\r\n\t\t}\r\n\r\n\t\t////////////////////////////////\r\n\t\t// dom manipulation functions //\r\n\t\t////////////////////////////////\r\n\r\n\t\tcolor(hex: string, percent: number = null): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.color(hex, percent || 0);\r\n\t\t\t}, 'color');\r\n\t\t}\r\n\r\n\t\telement_show(id: string, show: boolean): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.elementShow(id, show);\r\n\t\t\t}, 'element_show');\r\n\t\t}\r\n\r\n\t\t/////////////////////\r\n\t\t// email functions //\r\n\t\t/////////////////////\r\n\r\n\t\temail_feedback(feedbackRequest: pme.FeedbackRequest): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.email_feedback(feedbackRequest);\r\n\t\t\t}, 'email_feedback');\r\n\t\t}\r\n\r\n\t\temail_isUnsubscribed(email: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.emailService.isUnsubscribed(email);\r\n\t\t\t}, 'email_isUnsubscribed');\r\n\t\t}\r\n\r\n\t\temail_send(emailRequest: pme.EmailRequest, checkUnsubscribe: boolean = true): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.emailService.send(emailRequest, checkUnsubscribe);\r\n\t\t\t}, 'email_send');\r\n\t\t}\r\n\r\n\t\temail_unsubscribe(accountId: number, email: string, userId: number, username: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.emailService.unsubscribe(accountId, email, userId, username);\r\n\t\t\t}, 'email_unsubscribe');\r\n\t\t}\r\n\r\n\t\t//////////////////////////\r\n\t\t// enrollment functions //\r\n\t\t//////////////////////////\r\n\r\n\t\tenrollment_create(enrollment: pme.Enrollment = null) {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.enrollmentService.create(enrollment);\r\n\t\t\t}, 'enrollment_create');\r\n\t\t}\r\n\r\n\t\t///////////////////\r\n\t\t// hub functions //\r\n\t\t///////////////////\r\n\r\n\t\thub_account_get(accountId: number): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.hubService.getAccount(accountId);\r\n\t\t\t}, 'hub_account_get');\r\n\t\t}\r\n\r\n\t\thub_account_search(patient: pme.Patient): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.hubService.searchAccounts(patient);\r\n\t\t\t}, 'hub_account_search');\r\n\t\t}\r\n\r\n\t\thub_patient_get(patientId: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.hubService.getPatient(patientId);\r\n\t\t\t}, 'hub_patient_get');\r\n\t\t}\r\n\r\n\t\thub_patient_save(patient: pme.Patient): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.hubService.savePatient(patient);\r\n\t\t\t}, 'hub_patient_save');\r\n\t\t}\r\n\r\n\t\thub_patient_search(patient: pme.Patient): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.hubService.searchPatients(patient);\r\n\t\t\t}, 'hub_patient_search');\r\n\t\t}\r\n\r\n\t\t////////////////////////////\r\n\t\t// intakeLayout functions //\r\n\t\t////////////////////////////\r\n\r\n\t\tintakeLayout_survey_populate(intakeLayout: pme.IntakeLayout): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.intakeLayout_survey_populate(intakeLayout);\r\n\t\t\t}, 'intakeLayout_survey_populate');\r\n\t\t}\r\n\r\n\t\t//////////////////////\r\n\t\t// legacy functions //\r\n\t\t//////////////////////\r\n\r\n\t\tlegacy_survey_checkAnswer(question: number | string, account: pme.Account): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\tconst questionId = this.porticoService.dataService.getEnvironmentId(question);\r\n\t\t\t\tconst survey = this.porticoService.dataService.enterprise.intakeLayout.getSurveyByQuestionId(questionId);\r\n\t\t\t\tconst surveyId = this.porticoService.dataService.getEnvironmentId(survey.surveyId);\r\n\r\n\t\t\t\treturn this.porticoService.legacyService.checkAnswer(surveyId, questionId, account);\r\n\t\t\t}, 'legacy_survey_checkAnswer');\r\n\t\t}\r\n\r\n\t\tlegacy_survey_checkAnswers(questions: (number | string)[], account: pme.Account): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\tconst questionIds = questions.map((question) => {\r\n\t\t\t\t\treturn this.porticoService.dataService.getEnvironmentId(question);\r\n\t\t\t\t});\r\n\r\n\t\t\t\tconst surveyIds = questionIds.map((questionId) => {\r\n\t\t\t\t\tconst survey = this.porticoService.dataService.enterprise.intakeLayout.getSurveyByQuestionId(questionId);\r\n\t\t\t\t\treturn this.porticoService.dataService.getEnvironmentId(survey.surveyId);\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn this.porticoService.legacyService.checkAnswers(surveyIds, questionIds, account);\r\n\t\t\t}, 'legacy_survey_checkAnswers');\r\n\t\t}\r\n\r\n\t\tlegacy_basicEnrollment(account: pme.Account, enrollment: pme.Enrollment): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.legacyService.enroll(account, enrollment);\r\n\t\t\t}, 'legacy_basicEnrollment');\r\n\t\t}\r\n\r\n\t\tlegacy_checkMemberNumber(memberNumber: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.legacyService.checkMN(memberNumber);\r\n\t\t\t}, 'legacy_checkMemberNumber');\r\n\t\t}\r\n\r\n\t\t/////////////////////\r\n\t\t// modal functions //\r\n\t\t/////////////////////\r\n\r\n\t\tmodal_hide(id: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.modalService.hide(id);\r\n\t\t\t}, 'modal_hide');\r\n\t\t}\r\n\r\n\t\tmodal_hide_2(key: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.modalService.hide2(key);\r\n\t\t\t}, 'modal_hide_2');\r\n\t\t}\r\n\r\n\t\tmodal_show(id: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.modalService.show(id);\r\n\t\t\t}, 'modal_show');\r\n\t\t}\r\n\r\n\t\tmodal_show_2(key: string, clazz: string, init: string): ActionProcessor {\r\n\t\t\treturn this._add((self: Action) => {\r\n\t\t\t\treturn this.porticoService.modalService.show2(self.scope, key, clazz, init);\r\n\t\t\t}, 'modal_show_2');\r\n\t\t}\r\n\r\n\t\t/////////////////////////\r\n\t\t// note/task functions //\r\n\t\t/////////////////////////\r\n\r\n\t\t///////////////////////\r\n\t\t// patient functions //\r\n\t\t///////////////////////\r\n\r\n\t\tpatient_get(id: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.patientService.get(id);\r\n\t\t\t}, 'patient_get');\r\n\t\t}\r\n\r\n\t\tpatient_search(search: pme.Patient): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.patientService.search(search);\r\n\t\t\t}, 'patient_search');\r\n\t\t}\r\n\r\n\t\t///////////////////////////////\r\n\t\t// patient account functions //\r\n\t\t///////////////////////////////\r\n\r\n\t\tpatientAccount_getAccount(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.patientAccountService.getAccount();\r\n\t\t\t}, 'patientAccount_getAccount');\r\n\t\t}\r\n\r\n\t\tpatientAccount_getCase(caseId: number): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.patientAccountService.getCase(caseId);\r\n\t\t\t}, 'patientAccount_getCase');\r\n\t\t}\r\n\r\n\t\tpatientAccount_isPatientRegistered(registration: pme.PatientAccountRegistration): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.patientAccountService.isPatientRegistered(registration);\r\n\t\t\t}, 'patientAccount_isPatientRegistered');\r\n\t\t}\r\n\r\n\t\tpatientAccount_patientRegistration(registration: pme.PatientAccountRegistration): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.patientAccountService.patientRegistration(registration);\r\n\t\t\t}, 'patientAccount_patientRegistration');\r\n\t\t}\r\n\r\n\t\t/////////////////////\r\n\t\t// payor functions //\r\n\t\t/////////////////////\r\n\r\n\t\tpayor_get(id: number): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.payorService.get(id);\r\n\t\t\t}, 'payor_get');\r\n\t\t}\r\n\r\n\t\tpayor_search(search: pme.Payor, stateCoverageArea: string, max: number = 30, local: boolean = false, global: boolean = true): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.payorService.search(search, stateCoverageArea, max, local, global);\r\n\t\t\t}, 'payor_search');\r\n\t\t}\r\n\r\n\t\t/////////////////////////////\r\n\t\t// payor benefit functions //\r\n\t\t/////////////////////////////\r\n\r\n\t\tpayor_benefit_get(accountId: number, payorId: number, role: psge.PayorType): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.payorService.getPayorBenefit(accountId, payorId, role);\r\n\t\t\t}, 'payor_benefit_get');\r\n\t\t}\r\n\r\n\t\t////////////////////////\r\n\t\t// pharmacy functions //\r\n\t\t////////////////////////\r\n\r\n\t\tpharmacy_get(id: number): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.pharmacyService.get(id);\r\n\t\t\t}, 'pharmacy_get');\r\n\t\t}\r\n\r\n\t\tpharmacy_search(search: pme.Pharmacy): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.pharmacyService.search(search);\r\n\t\t\t}, 'pharmacy_search');\r\n\t\t}\r\n\r\n\t\t//////////////////////////\r\n\t\t// prescriber functions //\r\n\t\t//////////////////////////\r\n\r\n\t\tprescriber_create(addresses: number = 0, emailAddresses: number = 0, externalIds: number = 0, phoneNumbers: number = 0, prescriberLicenses: number = 0): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.prescriberService.create(addresses, emailAddresses, externalIds, phoneNumbers, prescriberLicenses);\r\n\t\t\t}, 'prescriber_create');\r\n\t\t}\r\n\r\n\t\tprescriber_get(id: number): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.prescriberService.get(id);\r\n\t\t\t}, 'prescriber_get');\r\n\t\t}\r\n\r\n\t\tprescriber_remove(id: number): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.accountService.removePrescriber(id);\r\n\t\t\t}, 'prescriber_remove');\r\n\t\t}\r\n\r\n\t\tprescriber_search(search: pme.Prescriber): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.prescriberService.search(search);\r\n\t\t\t}, 'prescriber_search');\r\n\t\t}\r\n\r\n\t\t////////////////////////////\r\n\t\t// prescription functions //\r\n\t\t////////////////////////////\r\n\r\n\t\tprescription_getByAccountId(id: number): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\tconst programId = this.porticoService.dataService.getProgramId();\r\n\t\t\t\treturn this.porticoService.enterpriseService.prescriptionService.getByAccountId(programId, id);\r\n\t\t\t}, 'prescription_getByAccountId');\r\n\t\t}\r\n\r\n\t\tprescription_ndc_list(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\tconst programId = this.porticoService.dataService.getProgramId();\r\n\t\t\t\treturn this.porticoService.enterpriseService.prescriptionService.getNdcList(programId);\r\n\t\t\t}, 'prescription_ndc_list');\r\n\t\t}\r\n\r\n\t\t///////////////////////\r\n\t\t// program functions //\r\n\t\t///////////////////////\r\n\r\n\t\tprogram_id(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.dataService.getProgramId();\r\n\t\t\t}, 'program_id');\r\n\t\t}\r\n\r\n\t\t///////////////////////\r\n\t\t// session functions //\r\n\t\t///////////////////////\r\n\r\n\t\tgetExistingPortalSession(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.sessionService.getExistingSession();\r\n\t\t\t}, 'getExistingPortalSession');\r\n\t\t}\r\n\r\n\t\tsession_touch(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.authenticationService.touchSession();\r\n\t\t\t}, 'session_touch');\r\n\t\t}\r\n\r\n\t\tsession_application_get(name: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.sessionService.getApplication(name);\r\n\t\t\t}, 'session_application_get');\r\n\t\t}\r\n\r\n\t\tsession_application_save(application: pme.Application): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.sessionService.saveApplication(application);\r\n\t\t\t}, 'session_application_save');\r\n\t\t}\r\n\r\n\t\t/////////////////////\r\n\t\t// setup functions //\r\n\t\t/////////////////////\r\n\r\n\t\tsetup_dataColumn_add(dataTable: pms.DataTable, dataColumn: pms.DataColumn): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.addDataColumn(dataTable, dataColumn);\r\n\t\t\t}, 'setup_dataColumn_add');\r\n\t\t}\r\n\r\n\t\tsetup_dataColumn_remove(dataTable: pms.DataTable, dataColumn: pms.DataColumn): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.removeDataColumn(dataTable, dataColumn);\r\n\t\t\t}, 'setup_dataColumn_remove');\r\n\t\t}\r\n\r\n\t\tsetup_dataGroup_get(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.dataGroupTypeService.get().then((dataGroupTypes) => {\r\n\t\t\t\t\tconst promises = {};\r\n\r\n\t\t\t\t\tdataGroupTypes = dataGroupTypes.sort((a, b) => {\r\n\t\t\t\t\t\treturn a.name < b.name ? -1 : (a.name > b.name ? 1 : 0);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tdataGroupTypes.forEach((dataGroupType) => {\r\n\t\t\t\t\t\tpromises[dataGroupType.id] = this.porticoService.setupService.dataGroupService.getByDataGroupTypeId(dataGroupType.id);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\treturn this.$q.all(promises).then((results) => {\r\n\t\t\t\t\t\tlet dataGroups = [];\r\n\r\n\t\t\t\t\t\tdataGroupTypes.forEach((dataGroupType) => {\r\n\t\t\t\t\t\t\tconst temp = results[dataGroupType.id].sort((a, b) => {\r\n\t\t\t\t\t\t\t\treturn a.name < b.name ? -1 : (a.name > b.name ? 1 : 0);\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\ttemp.forEach((dataGroup) => {\r\n\t\t\t\t\t\t\t\tdataGroup.dataGroupType = dataGroupType;\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tdataGroups = dataGroups.concat(temp);\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\treturn dataGroups;\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t}, 'setup_dataGroup_get');\r\n\t\t}\r\n\r\n\t\tsetup_dataGroup_getByDataGroupTypeId(dataGroupTypeId: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.dataGroupService.getByDataGroupTypeId(dataGroupTypeId);\r\n\t\t\t}, 'setup_dataGroup_getByDataGroupTypeId');\r\n\t\t}\r\n\r\n\t\tsetup_dataGroup_getHistory(id: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.dataGroupService.getHistory(id);\r\n\t\t\t}, 'setup_dataGroup_getHistory');\r\n\t\t}\r\n\r\n\t\tsetup_dataGroup_new(dataGroupTypeId: string, dataGroup: pms.DataGroup = null): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn dataGroup ? this.$q.when(new pms.DataGroup(dataGroup)) : this.$q.when(new pms.DataGroup({ dataGroupTypeId: dataGroupTypeId }))\r\n\t\t\t}, 'setup_dataGroup_new');\r\n\t\t}\r\n\r\n\t\tsetup_dataGroup_remove(dataGroup: pms.DataGroup, dataGroups: pms.DataGroup[]): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.removeDataGroup(dataGroup, dataGroups);\r\n\t\t\t}, 'setup_dataGroup_remove');\r\n\t\t}\r\n\r\n\t\tsetup_dataGroup_save(dataGroup: pms.DataGroup, dataGroups: pms.DataGroup[]): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.saveDataGroup(dataGroup, dataGroups);\r\n\t\t\t}, 'setup_dataGroup_save');\r\n\t\t}\r\n\r\n\t\tsetup_dataGroupType_get(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.dataGroupTypeService.get();\r\n\t\t\t}, 'setup_dataGroupType_get');\r\n\t\t}\r\n\r\n\t\tsetup_dataGroupType_getHistory(id: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.dataGroupTypeService.getHistory(id);\r\n\t\t\t}, 'setup_dataGroupType_getHistory');\r\n\t\t}\r\n\r\n\t\tsetup_dataGroupType_new(dataGroupType: pms.DataGroupType): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn dataGroupType ? this.$q.when(new pms.DataGroupType(dataGroupType)) : this.$q.when(new pms.DataGroupType());\r\n\t\t\t}, 'setup_dataGroupType_new');\r\n\t\t}\r\n\r\n\t\tsetup_dataGroupType_remove(dataGroupType: pms.DataGroupType, dataGroupTypes: pms.DataGroupType[]): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.removeDataGroupType(dataGroupType, dataGroupTypes);\r\n\t\t\t}, 'setup_dataGroupType_remove');\r\n\t\t}\r\n\r\n\t\tsetup_dataGroupType_save(dataGroupType: pms.DataGroupType, dataGroupTypes: pms.DataGroupType[]): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.saveDataGroupType(dataGroupType, dataGroupTypes);\r\n\t\t\t}, 'setup_dataGroupType_save');\r\n\t\t}\r\n\r\n\t\tsetup_dataRow_getByDataGroupId(dataGroupId: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.dataRowService.getByDataGroupId(dataGroupId);\r\n\t\t\t}, 'setup_dataRow_getByDataGroupId');\r\n\t\t}\r\n\r\n\t\tsetup_dataRow_getConflict(dataRow: pms.DataRow): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.dataRowService.getConflict(dataRow);\r\n\t\t\t}, 'setup_dataRow_getConflict');\r\n\t\t}\r\n\r\n\t\tsetup_dataRow_getHistory(id: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.dataRowService.getHistory(id);\r\n\t\t\t}, 'setup_dataRow_getHistory');\r\n\t\t}\r\n\r\n\t\tsetup_dataRow_fix(dataTable: pms.DataTable, dataRow: pms.DataRow): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.fixDataRow(dataTable, dataRow);\r\n\t\t\t}, 'setup_dataRow_fix');\r\n\t\t}\r\n\r\n\t\tsetup_dataRow_new(dataGroupId: string, dataTableId: string, dataRow: pms.DataRow = null): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn dataRow ? this.$q.when(new pms.DataRow(dataRow)) : this.$q.when(new pms.DataRow({ dataGroupId: dataGroupId, dataTableId: dataTableId }));\r\n\t\t\t}, 'setup_dataRow_new');\r\n\t\t}\r\n\r\n\t\tsetup_dataRow_remove(dataRow: pms.DataRow, dataRows: pms.DataRow[]): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.removeDataRow(dataRow, dataRows);\r\n\t\t\t}, 'setup_dataRow_remove');\r\n\t\t}\r\n\r\n\t\tsetup_dataRow_save(dataRow: pms.DataRow, dataRows: pms.DataRow[]): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.saveDataRow(dataRow, dataRows);\r\n\t\t\t}, 'setup_dataRow_save');\r\n\t\t}\r\n\r\n\t\tsetup_dataTable_get(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.dataTableService.get();\r\n\t\t\t}, 'setup_dataTable_get');\r\n\t\t}\r\n\r\n\t\tsetup_dataTable_getHistory(id: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.dataTableService.getHistory(id);\r\n\t\t\t}, 'setup_dataTable_getHistory');\r\n\t\t}\r\n\r\n\t\tsetup_dataTable_new(dataTable: pms.DataTable = null): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn dataTable ? this.$q.when(new pms.DataTable(dataTable)) : this.$q.when(new pms.DataTable());\r\n\t\t\t}, 'setup_dataTable_new');\r\n\t\t}\r\n\r\n\t\tsetup_dataTable_remove(dataTable: pms.DataTable, dataTables: pms.DataTable[]): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.removeDataTable(dataTable, dataTables);\r\n\t\t\t}, 'setup_dataTable_remove');\r\n\t\t}\r\n\r\n\t\tsetup_dataTable_save(dataTable: pms.DataTable, dataTables: pms.DataTable[]): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.saveDataTable(dataTable, dataTables);\r\n\t\t\t}, 'setup_dataTable_save');\r\n\t\t}\r\n\r\n\t\tsetup_dataType_get(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.dataTypeService.get();\r\n\t\t\t}, 'setup_dataType_get');\r\n\t\t}\r\n\r\n\t\tsetup_dataType_getHistory(id: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.dataTypeService.getHistory(id);\r\n\t\t\t}, 'setup_dataType_getHistory');\r\n\t\t}\r\n\r\n\t\tsetup_portal_get(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.portalGroupService.get().then((portalGroups) => {\r\n\t\t\t\t\tconst promises = {};\r\n\r\n\t\t\t\t\tportalGroups = portalGroups.sort((a, b) => {\r\n\t\t\t\t\t\treturn a.name < b.name ? -1 : (a.name > b.name ? 1 : 0);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tportalGroups.forEach((portalGroup) => {\r\n\t\t\t\t\t\tpromises[portalGroup.id] = this.porticoService.setupService.portalService.getByPortalGroupId(portalGroup.id);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\treturn this.$q.all(promises).then((results) => {\r\n\t\t\t\t\t\tlet portals = [];\r\n\r\n\t\t\t\t\t\tportalGroups.forEach((portalGroup) => {\r\n\t\t\t\t\t\t\tconst temp = results[portalGroup.id].sort((a, b) => {\r\n\t\t\t\t\t\t\t\treturn a.name < b.name ? -1 : (a.name > b.name ? 1 : 0);\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\ttemp.forEach((portal) => {\r\n\t\t\t\t\t\t\t\tportal.portalGroup = portalGroup;\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tportals = portals.concat(temp);\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\treturn portals;\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t}, 'setup_portal_get');\r\n\t\t}\r\n\r\n\t\tsetup_portal_getById(id: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.portalService.getById(id);\r\n\t\t\t}, 'setup_portal_getById');\r\n\t\t}\r\n\r\n\t\tsetup_portal_getByPortalGroupId(portalGroupId: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.portalService.getByPortalGroupId(portalGroupId);\r\n\t\t\t}, 'setup_portal_getByPortalGroupId');\r\n\t\t}\r\n\r\n\t\tsetup_portal_getHistory(id: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.portalService.getHistory(id);\r\n\t\t\t}, 'setup_portal_getHistory');\r\n\t\t}\r\n\r\n\t\tsetup_portal_import(upload: any): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.importPortal(upload);\r\n\t\t\t}, 'setup_portal_import');\r\n\t\t}\r\n\r\n\t\tsetup_portal_new(portalGroupId: string, portal: pms.Portal = null): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn portal ? this.$q.when(new pms.Portal(portal)) : this.$q.when(new pms.Portal({ portalGroupId: portalGroupId }));\r\n\t\t\t}, 'setup_portal_new');\r\n\t\t}\r\n\r\n\t\tsetup_portal_remove(portal: pms.Portal, portals: pms.Portal[]): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.removePortal(portal, portals);\r\n\t\t\t}, 'setup_portal_remove');\r\n\t\t}\r\n\r\n\t\tsetup_portal_save(portal: pms.Portal, portals: pms.Portal[], copyFrom: string = null): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.savePortal(portal, portals, copyFrom);\r\n\t\t\t}, 'setup_portal_save');\r\n\t\t}\r\n\r\n\t\tsetup_portalChild_getByPortalId(portalId: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.portalChildService.getByPortalId(portalId);\r\n\t\t\t}, 'setup_portalChild_getByPortalId');\r\n\t\t}\r\n\r\n\t\tsetup_portalChild_getHistory(id: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.portalChildService.getHistory(id);\r\n\t\t\t}, 'setup_portalChild_getHistory');\r\n\t\t}\r\n\r\n\t\tsetup_portalChild_new(portalId: string, portalChild: pms.PortalChild = null): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn portalChild ? this.$q.when(new pms.PortalChild(portalChild)) : this.$q.when(new pms.PortalChild({ portalId: portalId }));\r\n\t\t\t}, 'setup_portalChild_new');\r\n\t\t}\r\n\r\n\t\tsetup_portalChild_remove(portalChild: pms.PortalChild, portalChildren: pms.PortalChild[]): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.removePortalChild(portalChild, portalChildren);\r\n\t\t\t}, 'setup_portalChild_remove');\r\n\t\t}\r\n\r\n\t\tsetup_portalChild_save(portalChild: pms.PortalChild, portalChildren: pms.PortalChild[]): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.savePortalChild(portalChild, portalChildren);\r\n\t\t\t}, 'setup_portalChild_save');\r\n\t\t}\r\n\r\n\t\tsetup_portalDataGroup_flatten(portalDataGroups: pms.PortalDataGroup[]): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.flattenPortalDataGroups(portalDataGroups);\r\n\t\t\t}, 'setup_portalDataGroup_flatten');\r\n\t\t}\r\n\r\n\t\tsetup_portalDataGroup_getByPortalId(portalId: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.portalDataGroupService.getByPortalId(portalId);\r\n\t\t\t}, 'setup_portalDataGroup_getByPortalId');\r\n\t\t}\r\n\r\n\t\tsetup_portalDataGroup_getHistory(id: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.portalDataGroupService.getHistory(id);\r\n\t\t\t}, 'setup_portalDataGroup_getHistory');\r\n\t\t}\r\n\r\n\t\tsetup_portalDataGroup_new(portalId: string, portalDataGroup: pms.PortalDataGroup = null): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn portalDataGroup ? this.$q.when(new pms.PortalDataGroup(portalDataGroup)) : this.$q.when(new pms.PortalDataGroup({ portalId: portalId }));\r\n\t\t\t}, 'setup_portalDataGroup_new');\r\n\t\t}\r\n\r\n\t\tsetup_portalDataGroup_remove(portalDataGroup: pms.PortalDataGroup, portalDataGroups: pms.PortalDataGroup[]): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.removePortalDataGroup(portalDataGroup, portalDataGroups);\r\n\t\t\t}, 'setup_portalDataGroup_remove');\r\n\t\t}\r\n\r\n\t\tsetup_portalDataGroup_save(portalDataGroup: pms.PortalDataGroup, portalDataGroups: pms.PortalDataGroup[], dataGroups: pms.DataGroup[]): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.savePortalDataGroup(portalDataGroup, portalDataGroups, dataGroups);\r\n\t\t\t}, 'setup_portalDataGroup_save');\r\n\t\t}\r\n\r\n\t\tsetup_portalGroup_get(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.portalGroupService.get();\r\n\t\t\t}, 'setup_portalGroup_get');\r\n\t\t}\r\n\r\n\t\tsetup_portalGroup_getById(id: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.portalGroupService.getById(id);\r\n\t\t\t}, 'setup_portalGroup_getById');\r\n\t\t}\r\n\r\n\t\tsetup_portalGroup_getHistory(id: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.portalGroupService.getHistory(id);\r\n\t\t\t}, 'setup_portalGroup_getHistory');\r\n\t\t}\r\n\r\n\t\tsetup_portalGroup_new(portalGroup: pms.PortalGroup = null): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn portalGroup ? this.$q.when(new pms.PortalGroup(portalGroup)) : this.$q.when(new pms.PortalGroup());\r\n\t\t\t}, 'setup_portalGroup_new');\r\n\t\t}\r\n\r\n\t\tsetup_portalGroup_remove(portalGroup: pms.PortalGroup, portalGroups: pms.PortalGroup[]): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.removePortalGroup(portalGroup, portalGroups);\r\n\t\t\t}, 'setup_portalGroup_remove');\r\n\t\t}\r\n\r\n\t\tsetup_portalGroup_save(portalGroup: pms.PortalGroup, portalGroups: pms.PortalGroup[]): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.setupService.savePortalGroup(portalGroup, portalGroups);\r\n\t\t\t}, 'setup_portalGroup_save');\r\n\t\t}\r\n\r\n\t\t////////////////////\r\n\t\t// site functions //\r\n\t\t////////////////////\r\n\r\n\t\tsite_create(addresses: number = 0, contacts: number = 0, emailAddresses: number = 0, externalIds: number = 0, phoneNumbers: number = 0): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.siteService.create(addresses, emailAddresses, contacts, externalIds, phoneNumbers);\r\n\t\t\t}, 'site_create');\r\n\t\t}\r\n\r\n\t\tsite_get(id: number): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.siteService.get(id);\r\n\t\t\t}, 'site_get');\r\n\t\t}\r\n\r\n\t\tsite_getByPrescriberId(id: number): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.siteService.getByPrescriberId(id);\r\n\t\t\t}, 'site_getByPrescriberId');\r\n\t\t}\r\n\r\n\t\tsite_remove(id: number): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.accountService.removeSite(id);\r\n\t\t\t}, 'site_remove');\r\n\t\t}\r\n\r\n\t\tsite_search(search: pme.Site): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.siteService.search(search);\r\n\t\t\t}, 'site_search');\r\n\t\t}\r\n\r\n\t\t////////////////////////////\r\n\t\t// site account functions //\r\n\t\t////////////////////////////\r\n\r\n\t\tsiteAccount_getAccount(id: number): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.siteAccountService.getAccount(id);\r\n\t\t\t}, 'account_get');\r\n\t\t}\r\n\r\n\t\tsiteAccount_getCase(caseId: number): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.siteAccountService.getCase(caseId);\r\n\t\t\t}, 'siteAccount_getCase');\r\n\t\t}\r\n\r\n\t\tsiteAccount_getCases(accountId: number): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.siteAccountService.getCases(accountId);\r\n\t\t\t}, 'siteAccount_getCases');\r\n\t\t}\r\n\r\n\t\tsiteAccount_getParty(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.siteAccountService.getParty();\r\n\t\t\t}, 'siteAccount_getPartySite');\r\n\t\t}\r\n\r\n\t\tsiteAccount_getSiteAccount(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.siteAccountService.getSiteAccount();\r\n\t\t\t}, 'siteAccount_getSiteAccount');\r\n\t\t}\r\n\r\n\t\tsiteAccount_getSiteAccounts(portalId: string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.siteAccountService.getSiteAccounts(portalId);\r\n\t\t\t}, 'siteAccount_getSiteAccounts');\r\n\t\t}\r\n\r\n\t\tsiteAccount_getWorkflows(accountId: number, includePayors: boolean, includePharmacies: boolean, includePrescribers: boolean): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.siteAccountService.getWorkflows(accountId, includePayors, includePharmacies, includePrescribers);\r\n\t\t\t}, 'siteAccount_getWorkflows');\r\n\t\t}\r\n\r\n\t\tsiteAccount_searchAccounts(search: pme.Account): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.siteAccountService.searchAccounts(search);\r\n\t\t\t}, 'siteAccount_searchAccounts');\r\n\t\t}\r\n\r\n\t\tsiteAccount_searchCases(daysInPastBegin: number, daysInPastEnd: number, searchByCreatedDate: boolean, workflowTypes: string[], statusTypes: string[], includePayors: boolean, includePharmacies: boolean, includePrescribers: boolean): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\tconst date = new Date();\r\n\t\t\t\tconst after = new Date(date.getTime() - (daysInPastBegin * 24 * 60 * 60 * 1000));\r\n\t\t\t\tconst before = new Date(date.getTime() - (daysInPastEnd * 24 * 60 * 60 * 1000));\r\n\t\t\t\tlet searchModel = {\r\n\t\t\t\t\tcreatedBefore: null,\r\n\t\t\t\t\tcreatedAfter: null,\r\n\t\t\t\t\tendBefore: null,\r\n\t\t\t\t\tendAfter: null,\r\n\t\t\t\t\tworkflowTypes: workflowTypes,\r\n\t\t\t\t\tstatusTypes: statusTypes,\r\n\t\t\t\t\tincludePayors,\r\n\t\t\t\t\tincludePharmacies,\r\n\t\t\t\t\tincludePrescribers\r\n\t\t\t\t};\r\n\t\t\t\tconst searchBy = searchByCreatedDate ? 'created' : 'end';\r\n\t\t\t\tsearchModel[`${searchBy}Before`] = before;\r\n\t\t\t\tsearchModel[`${searchBy}After`] = after;\r\n\t\t\t\treturn this.porticoService.enterpriseService.siteAccountService.searchCases(searchModel);\r\n\t\t\t}, 'siteAccount_searchCases');\r\n\t\t}\r\n\r\n\t\tsiteAccount_searchWorkflows(daysInPastBegin: number, daysInPastEnd: number, searchByCreatedDate: boolean, workflowTypes: string[], statusTypes: string[], includePayors: boolean, includePharmacies: boolean, includePrescribers: boolean): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\tconst date = new Date();\r\n\t\t\t\tconst after = new Date(date.getTime() - (daysInPastBegin * 24 * 60 * 60 * 1000));\r\n\t\t\t\tconst before = new Date(date.getTime() - (daysInPastEnd * 24 * 60 * 60 * 1000));\r\n\t\t\t\tlet searchModel = {\r\n\t\t\t\t\tcreatedBefore: null,\r\n\t\t\t\t\tcreatedAfter: null,\r\n\t\t\t\t\tendBefore: null,\r\n\t\t\t\t\tendAfter: null,\r\n\t\t\t\t\tworkflowTypes: workflowTypes,\r\n\t\t\t\t\tstatusTypes: statusTypes,\r\n\t\t\t\t\tincludePayors,\r\n\t\t\t\t\tincludePharmacies,\r\n\t\t\t\t\tincludePrescribers\r\n\t\t\t\t};\r\n\t\t\t\tconst searchBy = searchByCreatedDate ? 'created' : 'end';\r\n\t\t\t\tsearchModel[`${searchBy}Before`] = before;\r\n\t\t\t\tsearchModel[`${searchBy}After`] = after;\r\n\t\t\t\treturn this.porticoService.enterpriseService.siteAccountService.searchWorkflows(searchModel);\r\n\t\t\t}, 'siteAccount_searchWorkflows');\r\n\t\t}\r\n\r\n\t\t////////////////////////////////\r\n\t\t// state transition functions //\r\n\t\t////////////////////////////////\r\n\r\n\t\tpage(name: string, options: any = null): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.page(name, options);\r\n\t\t\t}, 'page');\r\n\t\t}\r\n\r\n\t\tsection(name: string, options: any = null): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.section(name, options);\r\n\t\t\t}, 'section');\r\n\t\t}\r\n\r\n\t\tstate(app: string, layout: string, page: string, intake: string = null, section: string = null, options: any = null): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.state(app, layout, page, intake, section, options);\r\n\t\t\t}, 'state');\r\n\t\t}\r\n\r\n\t\t//////////////////////\r\n\t\t// survey functions //\r\n\t\t//////////////////////\r\n\r\n\t\tsurvey_get(survey: number | string): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\tconst surveyId = this.porticoService.dataService.getEnvironmentId(survey);\r\n\t\t\t\treturn this.porticoService.enterpriseService.surveyService.get(surveyId);\r\n\t\t\t}, 'survey_get');\r\n\t\t}\r\n\r\n\t\t/////////////////////////////\r\n\t\t// surveySession functions //\r\n\t\t/////////////////////////////\r\n\r\n\t\tsurveySession_save(surveySession: pme.SurveySession): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.enterpriseService.surveyService.saveSurveySession(surveySession);\r\n\t\t\t}, 'surveySession_save');\r\n\t\t}\r\n\r\n\r\n\t\t//////////////////////\r\n\t\t// toastr functions //\r\n\t\t//////////////////////\r\n\r\n\t\taddToastr(type: string, title: string, content: string, options: any = null): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.toastrService.add(type, title, content, options);\r\n\t\t\t}, 'addToastr');\r\n\t\t}\r\n\r\n\t\tclearAllToastr(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.toastrService.clearAll();\r\n\t\t\t}, 'clearAllToastr');\r\n\t\t}\r\n\r\n\t\tremoveLastToastr(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.toastrService.removeLast();\r\n\t\t\t}, 'clearAllToastr');\r\n\t\t}\r\n\r\n\t\t////////////////////\r\n\t\t// user functions //\r\n\t\t////////////////////\r\n\r\n\t\tuser_create(): ActionProcessor {\r\n\t\t\treturn this._add(() => {\r\n\t\t\t\treturn this.porticoService.authenticationService.createUser();\r\n\t\t\t}, 'user_create');\r\n\t\t}\r\n\t}\r\n\r\n\texport interface IActionService {\r\n\t\tscope($scope?: angular.IScope): ActionProcessor;\r\n\t}\r\n\r\n\t@Service('app', 'actionService')\r\n\t@Inject('$q', 'porticoService')\r\n\texport class ActionService implements IActionService {\r\n\t\tconstructor(private $q: angular.IQService, private porticoService: ps.IPorticoService) {\r\n\t\t}\r\n\r\n\t\tscope($scope: angular.IScope = null): ActionProcessor {\r\n\t\t\treturn new ActionProcessor(this.$q, this.porticoService).scope($scope);\r\n\t\t}\r\n\t}\r\n}","namespace Portico.Services {\r\n\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n import models = Portico.Models;\r\n \r\n @Service('app', 'apiInterceptor')\r\n @Inject('$rootScope', '$q', '$injector')\r\n export class ApiInterceptor {\r\n private httpUnauthorized = 401; // No bearer token\r\n private httpPreconditionFailed = 412; // session missing\r\n private httpForbidden = 403; // doesn't have the feature to make the call\r\n private porticoEvents: Portico.Services.IPorticoEvents;\r\n\r\n constructor(\r\n private $rootScope: ng.IRootScopeService,\r\n private $q: ng.IQService,\r\n private $injector: ng.auto.IInjectorService\r\n ) {\r\n this.porticoEvents = this.$injector.get(\"porticoEvents\");\r\n }\r\n\r\n public responseError = (response: any) => {\r\n if (response.status === this.httpUnauthorized || response.status === this.httpPreconditionFailed || response.status == this.httpForbidden) {\r\n this.porticoEvents.unauthorizedEvent();\r\n }\r\n };\r\n \r\n public requestError = (rejection: any) => {\r\n this.porticoEvents.loggedOutEvent();\r\n return this.$q.reject(rejection);\r\n };\r\n }\r\n}","namespace Portico.Services {\r\n\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport ps = Portico.Services;\r\n\r\n export interface IApiService {\r\n\t\tgetItem: (endPoint: string, spinner?: string) => ng.IPromise;\r\n\t\tsearchItem: (endPoint: string, item: T, spinner?: string) => ng.IPromise;\r\n saveItem: (endPoint: string, item: T, spinner?: string) => ng.IPromise;\r\n\t\tdeleteItem: (endPoint: string, spinner?: string) => ng.IPromise;\r\n }\r\n\r\n @Service('app', 'apiService')\r\n\t@Inject('$http', '$q', 'serverConstants', 'modalService', '$rootScope')\r\n export class ApiService implements IApiService {\r\n constructor(\r\n private $http: ng.IHttpService,\r\n private $q: ng.IQService,\r\n\t\t\tprivate serverConstants: pmi.IServerConstants,\r\n private modalService: ps.IModalService,\r\n private $rootScope: ng.IRootScopeService\r\n ) { }\r\n\r\n getItem(endPoint: string, spinner: string = 'spinner'): ng.IPromise {\r\n this.showSpinner(spinner);\r\n\r\n const deferred = this.$q.defer();\r\n\r\n const req: angular.IRequestConfig = {\r\n method: 'GET',\r\n url: `${this.serverConstants.apiPath}${endPoint}`,\r\n headers: this.getStandardHeaders()\r\n }\r\n\r\n\t\t\tthis.$http(req).then((response) => {\r\n\t\t\t\tdeferred.resolve(response.data);\r\n\t\t\t}, () => {\r\n\t\t\t\tdeferred.reject();\r\n }).finally(() => {\r\n this.hideSpinner(spinner);\r\n\t\t\t});\r\n\r\n return deferred.promise;\r\n }\r\n\r\n\t\tsearchItem(endPoint: string, item: T, spinner: string = 'spinner'): ng.IPromise {\r\n this.showSpinner(spinner);\r\n\r\n const deferred = this.$q.defer();\r\n\r\n const req: angular.IRequestConfig = {\r\n method: 'POST',\r\n url: `${this.serverConstants.apiPath}${endPoint}`,\r\n headers: this.getStandardHeaders(),\r\n data: JSON.stringify(item)\r\n };\r\n\r\n this.$http(req).then((response) => {\r\n deferred.resolve(response.data);\r\n }, () => {\r\n deferred.reject();\r\n\t\t\t}).finally(() => {\r\n this.hideSpinner(spinner);\r\n\t\t\t});\r\n\r\n return deferred.promise;\r\n }\r\n\r\n\t\tsaveItem(endPoint: string, item: T, spinner: string = 'spinner'): ng.IPromise {\r\n\t\t\tthis.showSpinner(spinner);\r\n\r\n\t\t\tconst deferred = this.$q.defer();\r\n\r\n const req: angular.IRequestConfig = {\r\n method: 'PUT',\r\n url: `${this.serverConstants.apiPath}${endPoint}`,\r\n headers: this.getStandardHeaders(),\r\n data: JSON.stringify(item)\r\n };\r\n\r\n this.$http(req).then((response) => {\r\n deferred.resolve(response.data);\r\n }, (message) => {\r\n deferred.reject();\r\n\t\t\t}).finally(() => {\r\n\t\t\t\tthis.hideSpinner(spinner);\r\n\t\t\t});\r\n\r\n return deferred.promise;\r\n }\r\n\r\n\t\tdeleteItem(endPoint: string, spinner: string = 'spinner'): ng.IPromise {\r\n\t\t\tthis.showSpinner(spinner);\r\n\r\n const deferred = this.$q.defer();\r\n\r\n const req: angular.IRequestConfig = {\r\n method: 'DELETE',\r\n url: `${this.serverConstants.apiPath}${endPoint}`,\r\n headers: this.getStandardHeaders()\r\n }\r\n\r\n this.$http(req).then((response) => {\r\n deferred.resolve(response.data);\r\n }, () => {\r\n deferred.reject();\r\n\t\t\t}).finally(() => {\r\n\t\t\t\tthis.hideSpinner(spinner);\r\n\t\t\t});\r\n\r\n return deferred.promise;\r\n }\r\n\r\n private showSpinner(spinner: string): void {\r\n if (_.get(this.$rootScope, 'spinnerDisabled', false) === false) {\r\n // this.modalService.show(spinner);\r\n document.getElementById('global-spinner-overlay').style.display = 'flex';\r\n }\r\n }\r\n\r\n private hideSpinner(spinner: string): void {\r\n // this.modalService.hide(spinner);\r\n document.getElementById('global-spinner-overlay').style.display = 'none';\r\n }\r\n\r\n private getStandardHeaders() {\r\n return { 'x-requested-with': 'XMLHttpRequest' };\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\timport models = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport psga = apigateway.client;\r\n\timport psgm = apigateway.models;\r\n\r\n\texport interface IAuthenticationService {\r\n\t\tauthenticateAccount(userName: string, password: string): angular.IPromise;\r\n\t\tauthenticateUser(userName: string, password: string): angular.IPromise;\r\n\t\tchangePassword(oldPassword: string, newPassword: string): angular.IPromise;\r\n\t\tcreateSession(): angular.IPromise;\r\n\t\tcreateUser(): angular.IPromise;\r\n\t\tgetCurrentUser(): angular.IPromise;\r\n\t\tgetPortalRoles(portalId: number): angular.IPromise;\r\n\t\tgetPortalUsers(portalId: number, accountId?: number): angular.IPromise;\r\n\t\thasSession(): boolean;\r\n isAuthenticated(): boolean;\r\n\t\tisAuthorized(features: string[]): boolean;\r\n\t\tisEmailRegistered(email: string): angular.IPromise;\r\n\t\tisExistingUser(userName: string): angular.IPromise;\r\n\t\tisExpiring(): boolean;\r\n\t\tlogOut(): angular.IPromise;\r\n\t\tresetPassword(userName: string): angular.IPromise;\r\n\t\tresetUserPassword(portalId: string, userId: number): angular.IPromise;\r\n\t\tsaveCurrentUser(user: pme.User): angular.IPromise;\r\n\t\tsaveUser(portalId: string, user: pme.User): angular.IPromise;\r\n\t\ttouchSession(): ng.IPromise;\r\n\t}\r\n\r\n\t@Service('app', 'authenticationService')\r\n\t@Inject('$http', '$q', '$window', 'storageService', 'dataService', 'modalService', 'serverConstants', 'porticoEvents', 'sessionService', 'EdgeAuthenticationApi', 'dateService')\r\n\texport class AuthenticationService implements IAuthenticationService {\r\n\t\tprivate jwtTokenName;\r\n\t\tprivate sessionKeyName;\r\n\r\n\t\tconstructor(protected $http: ng.IHttpService,\r\n\t\t\tprotected $q: ng.IQService,\r\n\t\t\tprotected $window: ng.IWindowService,\r\n\t\t\tprotected storageService: Portico.Services.IStorageService,\r\n\t\t\tprotected dataService: Portico.Services.IDataService,\r\n\t\t\tprotected modalService: Portico.Services.IModalService,\r\n\t\t\tprotected serverConstants: Portico.Models.Interfaces.IServerConstants,\r\n\t\t\tprotected porticoEvents: Portico.Services.IPorticoEvents,\r\n\t\t\tprotected sessionService: Portico.Services.ISessionService,\r\n\t\t\tprotected edgeAuthenticationApi: psga.EdgeAuthenticationApi,\r\n protected dateService: Portico.Services.IDateService\r\n\t\t) {\r\n\t\t\tthis.$http.defaults.headers.common['accept'] = 'application/json';\r\n\t\t\tthis.$http.defaults.headers.common[\"X-Requested-With\"] = 'XMLHttpRequest';\r\n\t\t\tthis.jwtTokenName = this.dataService.jwtTokenKeyName;\r\n\t\t\tthis.sessionKeyName = this.dataService.sessionKeyName;\r\n\t\t}\r\n\r\n\t\t// ***** Public methods\r\n\r\n\t\tauthenticateAccount(userName: string, password: string): angular.IPromise {\r\n\t\t\tconst authenticateLoginAccountRequest = {\r\n\t\t\t\tportalId: this.getPortalId(),\r\n\t\t\t\tuserName: userName,\r\n\t\t\t\tpassword: password\r\n\t\t\t};\r\n\r\n\t\t\treturn this.$q.when(this.edgeAuthenticationApi.authenticationAuthenticateUser(authenticateLoginAccountRequest).then((response) => {\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tauthenticateUser(userName: string, password: string): angular.IPromise {\r\n\t\t\tconst request = this.buildRequest(models.AuthenticationAction.AuthenticateAndCreateSession);\r\n\r\n\t\t\trequest.userName = userName;\r\n\t\t\trequest.password = password;\r\n\r\n\t\t\treturn this.authenticate(request).then((response: angular.IHttpPromiseCallbackArg) => {\r\n\t\t\t\tthis.dataService.session.authentication = response.data;\r\n\t\t\t\treturn response.data;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tchangePassword(oldPassword: string, newPassword: string): angular.IPromise {\r\n\t\t\tconst changeLoginRequest = {\r\n\t\t\t\toldPassword: oldPassword,\r\n\t\t\t\tnewPassword: newPassword\r\n\t\t\t};\r\n\r\n\t\t\treturn this.$q.when(this.edgeAuthenticationApi.authenticationChangePassword(changeLoginRequest).then((response) => {\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tcreateSession(): angular.IPromise {\r\n\t\t\t//const session = this.sessionService.getExistingSession();\r\n\r\n\t\t\t//if (session !== null) {\r\n\t\t\t//\t// first we need to check if the user already has an authenticated session so that we don't overwrite that\r\n\t\t\t//\tif (session.userName !== null) {\r\n\t\t\t//\t\treturn this.$q.resolve(null);\r\n\t\t\t//\t}\r\n\t\t\t//}\r\n\r\n\t\t\tconst request = this.buildRequest(models.AuthenticationAction.CreateSession);\r\n\r\n\t\t\treturn this.authenticate(request).then((response: angular.IHttpPromiseCallbackArg) => {\r\n\t\t\t\treturn response.data;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tcreateUser(): angular.IPromise {\r\n\t\t\tconst user = new pme.User();\r\n\t\t\treturn this.$q.when(user);\r\n\t\t}\r\n\r\n\t\tgetCurrentUser(): angular.IPromise {\r\n\t\t\treturn this.$q.when(this.edgeAuthenticationApi.authenticationGetCurrentUser({}).then((response) => {\r\n\t\t\t\treturn new pme.User(response.data.data);\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tgetPortalRoles(portalId: number): angular.IPromise {\r\n\t\t\tlet endpoint = '/api/PortalRole/' + portalId;\r\n\r\n\t\t\treturn this.$http.get(endpoint).then((response) => {\r\n\t\t\t\treturn response.data;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tgetPortalUsers(portalId: number, accountId?: number): angular.IPromise {\r\n\t\t\tlet endpoint = '/api/PortalUser/' + portalId;\r\n\r\n\t\t\tif (accountId) {\r\n\t\t\t\tendpoint += '/' + accountId;\r\n\t\t\t}\r\n\r\n\t\t\treturn this.$http.get(endpoint).then((response) => {\r\n\t\t\t\treturn _.map(response.data, (u) => {\r\n\t\t\t\t\treturn new pme.User(u);\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\thasSession(): boolean {\r\n\t\t\tconst sessionKey = `session-${this.serverConstants.portalId}`;\r\n\t\t\tconst sessionDetail = this.storageService.getItem(models.StorageType.Session, sessionKey) as models.SessionDetail;\r\n\t\t\treturn sessionDetail !== null && _.get(sessionDetail, 'expirationDate', null) !== null &&\r\n\t\t\t\tthis.dateService.isBefore(this.dateService.subtract(sessionDetail.expirationDate, 1, 'minutes'));\r\n\t\t}\r\n\r\n\t\tisAuthenticated(): boolean {\r\n\t\t\tconst sessionKey = `session-${this.serverConstants.portalId}`;\r\n\t\t\tconst sessionDetail = this.storageService.getItem(models.StorageType.Session, sessionKey) as models.SessionDetail;\r\n\t\t\treturn this.hasSession() && _.get(sessionDetail, 'userName', null) !== null;\r\n\t\t}\r\n\r\n\t\tisAuthorized(features: string[]): boolean {\r\n\t\t\tconst sessionKey = `session-${this.serverConstants.portalId}`;\r\n\t\t\tconst sessionDetail = this.storageService.getItem(models.StorageType.Session, sessionKey) as models.SessionDetail;\r\n\t\t\tconst sessionFeatures = _.get(sessionDetail, 'features', []).concat(['Authenticated']);\r\n\t\t\treturn this.isAuthenticated() && _.difference(features, sessionFeatures).length === 0;\r\n\t\t}\r\n\r\n\t\tisEmailRegistered(email: string): angular.IPromise {\r\n\t\t\treturn this.$q.when(this.edgeAuthenticationApi.authenticationIsEmailRegistered({ email }).then((response) => {\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tisExistingUser(userName: string): angular.IPromise {\r\n\t\t\tconst request = this.buildRequest(models.AuthenticationAction.IsExistingUser);\r\n\r\n\t\t\trequest.userName = userName;\r\n\r\n\t\t\treturn this.$http.post('/api/Authentication', request).then((response) => {\r\n\t\t\t\treturn response.data;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tisExpiring(): boolean {\r\n\t\t\tconst warning = this.dataService.getReferenceId('session-warning', 10);\r\n\t\t\tconst sessionKey = `session-${this.serverConstants.portalId}`;\r\n\t\t\tconst sessionDetail = this.storageService.getItem(models.StorageType.Session, sessionKey) as models.SessionDetail;\r\n\r\n\t\t\tconst a = this.dateService.isAfter(this.dateService.subtract(sessionDetail.expirationDate, warning + 1, 'minutes'));\r\n\t\t\tconst b = this.dateService.isBefore(this.dateService.subtract(sessionDetail.expirationDate, warning, 'minutes'));\r\n\r\n\t\t\treturn sessionDetail !== null && _.get(sessionDetail, 'expirationDate', null) !== null && a && b;\r\n\t\t}\r\n\r\n\t\tlogOut(): angular.IPromise {\r\n\t\t\tthis.dataService.session.authentication = null;\r\n\t\t\tthis.sessionService.wipeLocalSessions();\r\n\r\n\t\t\treturn this.createSession().then(() => {\r\n\t\t\t\tthis.porticoEvents.loggedOutEvent();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tresetPassword(userName: string): angular.IPromise {\r\n\t\t\tconst request = {\r\n\t\t\t\tportalId: this.getPortalId(),\r\n\t\t\t\tuserName: userName\r\n\t\t\t};\r\n\r\n\t\t\treturn this.$q.when(this.edgeAuthenticationApi.authenticationResetPassword(request).then((response) => {\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tresetUserPassword(portalId: string, userId: number): angular.IPromise {\r\n\t\t\treturn this.$http.post('/api/Password/' + portalId + '/' + userId, null).then((response) => {\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsaveCurrentUser(user: pme.User): angular.IPromise {\r\n\t\t\treturn this.$q.when(this.edgeAuthenticationApi.authenticationSaveCurrentUser(user).then((response) => {\r\n\t\t\t\treturn true;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tsaveUser(portalId: string, user: pme.User): angular.IPromise {\r\n\t\t\treturn this.$http.put('/api/PortalUser/' + portalId, user).then((response) => {\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\ttouchSession(): ng.IPromise {\r\n\t\t\tconst session = this.sessionService.getExistingSession();\r\n\t\t\tconst request = this.buildRequest(models.AuthenticationAction.TouchSession);\r\n\r\n\t\t\trequest.jwt = this.sessionService.getJwt();\r\n\t\t\trequest.isParent = _.get(session, 'isParent', false);\r\n\r\n\t\t\t// return value if the session is invalid\r\n\t\t\tconst expiredResponse = {\r\n\t\t\t\tdata: {\r\n\t\t\t\t\tsuccess: true,\r\n\t\t\t\t\tstatus: Models.PorticoAuthenticateStatus.SessionExpired,\r\n\t\t\t\t\tjwtToken: null,\r\n\t\t\t\t\tmessages: [],\r\n\t\t\t\t\tsession: null,\r\n\t\t\t\t\tsessionDetail: null\r\n\t\t\t\t} as models.AuthenticationResponse\r\n\t\t\t} as angular.IHttpPromiseCallbackArg;\r\n\r\n\t\t\tconst promise = request.portalId && request.jwt ?\r\n\t\t\t\tthis.$http.post('/api/Authentication', request) :\r\n\t\t\t\tthis.$q.when(expiredResponse);\r\n\r\n\t\t\treturn promise.then((response: angular.IHttpPromiseCallbackArg) => {\r\n\t\t\t\tif (_.get(response, 'data.status', models.PorticoAuthenticateStatus.SessionExpired) as models.PorticoAuthenticateStatus === models.PorticoAuthenticateStatus.SessionValid) {\r\n\t\t\t\t\tconst newSession = _.get(response, 'data.sessionDetail', null) as models.SessionDetail;\r\n\t\t\t\t\tthis.sessionService.updateCurrentSessionExpiration(newSession.expirationDate);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.logOut();\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn _.get(response, 'data', null);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// ***** Private methods\r\n\t\tprivate authenticate(request: models.AuthenticationRequest): ng.IPromise> {\r\n\t\t\t// this.modalService.show('spinner');\r\n\t\t\tdocument.getElementById('global-spinner-overlay').style.display = 'flex';\r\n\r\n\t\t\tconst promise = request.portalId ?\r\n\t\t\t\tthis.$http.post('/api/Authentication', request) :\r\n\t\t\t\tthis.$q.when(null);\r\n\r\n\t\t\treturn promise.then((response: angular.IHttpPromiseCallbackArg) => {\r\n\t\t\t\tif (response.data.sessionDetail) {\r\n\t\t\t\t\tresponse.data.sessionDetail.status = Models.SESSION_ACTIVE;\r\n\t\t\t\t\tthis.sessionService.saveNewSession(response.data.jwtToken, response.data.sessionDetail, request, response.data.childSessionData);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn response;\r\n\t\t\t}).catch(() => {\r\n\t\t\t\tconst authResponse = {\r\n\t\t\t\t\tsuccess: false,\r\n\t\t\t\t\tstatus: models.PorticoAuthenticateStatus.NotAuthenticated,\r\n\t\t\t\t\tjwtToken: null,\r\n\t\t\t\t\tchildSessionData: null,\r\n\t\t\t\t\tmessages: null,\r\n\t\t\t\t\tsession: null,\r\n\t\t\t\t\tsessionDetail: null\r\n\t\t\t\t} as models.AuthenticationResponse;\r\n\r\n\t\t\t\treturn this.$q.resolve({ data: authResponse } as angular.IHttpPromiseCallbackArg);\r\n\t\t\t}).finally(() => {\r\n\t\t\t\t// this.modalService.hide('spinner');\r\n document.getElementById('global-spinner-overlay').style.display = 'none';\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tprivate buildRequest(action: models.AuthenticationAction): models.AuthenticationRequest {\r\n\t\t\tlet request = new models.AuthenticationRequest();\r\n\r\n\t\t\trequest.password = null;\r\n\t\t\trequest.userName = null;\r\n\t\t\trequest.action = action;\r\n\t\t\trequest.portalId = this.getPortalId();\r\n\r\n\t\t\treturn request;\r\n\t\t}\r\n\r\n\t\tprivate getPortalId(): string {\r\n\t\t\treturn _.get(this, 'dataService.setup.portal.id', null);\r\n\t\t}\r\n\t}\r\n}","namespace Portico.Services {\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\timport models = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport psga = apigateway.client;\r\n\timport psgm = apigateway.models;\r\n\r\n\texport interface IAuthorizationService {\r\n\t\tgetUserProfile(id: number): angular.IPromise;\r\n\t}\r\n\r\n\t@Service('app', 'authorizationService')\r\n\t@Inject('$http', '$q', '$window', 'storageService', 'dataService', 'modalService', 'serverConstants', 'porticoEvents', 'sessionService', 'EdgeAuthenticationApi', 'dateService')\r\n\texport class AuthorizationService implements IAuthorizationService {\r\n\t\tconstructor(protected $http: ng.IHttpService,\r\n\t\t\tprotected $q: ng.IQService,\r\n\t\t\tprotected $window: ng.IWindowService,\r\n\t\t\tprotected storageService: Portico.Services.IStorageService,\r\n\t\t\tprotected dataService: Portico.Services.IDataService,\r\n\t\t\tprotected modalService: Portico.Services.IModalService,\r\n\t\t\tprotected serverConstants: Portico.Models.Interfaces.IServerConstants,\r\n\t\t\tprotected porticoEvents: Portico.Services.IPorticoEvents,\r\n\t\t\tprotected sessionService: Portico.Services.ISessionService,\r\n\t\t\tprotected edgeAuthenticationApi: psga.EdgeAuthenticationApi,\r\n protected dateService: Portico.Services.IDateService\r\n\t\t) {\r\n\t\t}\r\n\r\n\t\tgetUserProfile(id: number): angular.IPromise {\r\n\t\t\tlet endpoint = '/api/Authorization/' + id;\r\n\r\n\t\t\treturn this.$http.get(endpoint).then((response) => {\r\n\t\t\t\treturn response.data;\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}","namespace Portico.Services {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\timport pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport psge = apigateway.enums;\r\n\timport psgm = apigateway.models;\r\n\r\n\texport interface IConversionService {\r\n\t\tconvertGetCaseResponseModelToAccount: (response: psgm.GetCaseResponseModel) => pme.Account;\r\n\t}\r\n\r\n\t@Service('app', 'conversionService')\r\n\t@Inject('serverConstants')\r\n\texport class ConversionService implements IConversionService {\r\n\t\tconstructor() {\r\n }\r\n\r\n\t\tconvertGetCaseResponseModelToAccount(response: psgm.GetCaseResponseModel): pme.Account {\r\n\t\t\tconst account = new pme.Account(response.accountData);\r\n\r\n\t\t\taccount.id = null;\r\n\t\t\taccount.assignedUser = null;\r\n\t\t\taccount.displayId = null;\r\n\t\t\taccount.partyId = null;\r\n\t\t\taccount.securePartyId = null;\r\n\t\t\taccount.accountSessions = [];\r\n\t\t\taccount.documentRelationships = [];\r\n\t\t\taccount.linkedPayors = [];\r\n\t\t\taccount.notes = [];\r\n\t\t\taccount.optionalServices = [];\r\n\t\t\taccount.payorRelationships = [];\r\n\t\t\taccount.pharmacyRelationships = [];\r\n\t\t\taccount.prescriberRelationships = [];\r\n\t\t\taccount.siteRelationships = [];\r\n\t\t\taccount.tasks = [];\r\n\r\n\t\t\taccount.accountAddresses.forEach(aa => {\r\n\t\t\t\taa.id = null;\r\n\t\t\t});\r\n\r\n\t\t\taccount.contacts.forEach(c => {\r\n\t\t\t\tc.id = null;\r\n\t\t\t});\r\n\r\n\t\t\taccount.phoneNumbers.forEach(pn => {\r\n\t\t\t\tpn.id = null;\r\n\t\t\t});\r\n\r\n\t\t\taccount.patient = new pme.Patient(response.patientData);\r\n\r\n\t\t\t// account.patient.id = null;\r\n\t\t\taccount.patient.ssn = response.ssn;\r\n\r\n\t\t\taccount.patient.addresses.forEach(a => {\r\n\t\t\t\ta.id = null;\r\n\t\t\t});\r\n\r\n\t\t\taccount.patient.contacts.forEach(c => {\r\n\t\t\t\tc.id = null;\r\n\r\n\t\t\t\tc.addresses.forEach(a => {\r\n\t\t\t\t\ta.id = null;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tc.emailAddresses.forEach(ea => {\r\n\t\t\t\t\tea.id = null;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tc.phoneNumbers.forEach(pn => {\r\n\t\t\t\t\tpn.id = null;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tc.webAddresses.forEach(wa => {\r\n\t\t\t\t\twa.id = null;\r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\t\t\taccount.patient.emailAddresses.forEach(ea => {\r\n\t\t\t\tea.id = null;\r\n\t\t\t});\r\n\r\n\t\t\taccount.patient.phoneNumbers.forEach(pn => {\r\n\t\t\t\tpn.id = null;\r\n\t\t\t});\r\n\r\n\t\t\tif (response.diagnosisData) {\r\n\t\t\t\tconst diagnosisSession = account.getDiagnosisSession();\r\n\t\t\t\tdiagnosisSession.ids = _.map(response.diagnosisData, d => d.diagnosisId);\r\n\t\t\t}\r\n\r\n\t\t\tif (response.payorData) {\r\n\t\t\t\tresponse.caseData.payors.forEach(pr => {\r\n\t\t\t\t\tpr.caseRelations.forEach(or => {\r\n\t\t\t\t\t\tconst payor = _.find(response.payorData, pd => pd.payorData.payorType === pr.roleType && pd.payorData.payorId === or.partyRoleId);\r\n\r\n\t\t\t\t\t\tif (payor) {\r\n\t\t\t\t\t\t\tconst p = new pme.Payor(payor.payorData);\r\n\r\n\t\t\t\t\t\t\tp.id = null;\r\n\r\n\t\t\t\t\t\t\tp.addresses.forEach(a => {\r\n\t\t\t\t\t\t\t\ta.id = null;\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tp.emailAddresses.forEach(ea => {\r\n\t\t\t\t\t\t\t\tea.id = null;\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tp.phoneNumbers.forEach(pn => {\r\n\t\t\t\t\t\t\t\tpn.id = null;\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tp.webAddresses.forEach(wa => {\r\n\t\t\t\t\t\t\t\twa.id = null;\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\taccount.payorRelationships.push(new pme.PayorRelationship({\r\n\t\t\t\t\t\t\t\torder: or.coverageOrder,\r\n\t\t\t\t\t\t\t\tpayor: p,\r\n\t\t\t\t\t\t\t\tpayorBenefit: new pme.PayorBenefit(payor.benefitData),\r\n\t\t\t\t\t\t\t\trole: pr.roleType\r\n\t\t\t\t\t\t\t}));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (response.pharmacyData) {\r\n\t\t\t\tresponse.caseData.pharmacies.forEach(pr => {\r\n\t\t\t\t\tconst pharmacy = _.find(response.pharmacyData, pd => pd.pharmacyData.pharmacyId === pr.partyRoleId);\r\n\r\n\t\t\t\t\tif (pharmacy) {\r\n\t\t\t\t\t\tconst p = new pme.Pharmacy(pharmacy.pharmacyData);\r\n\r\n\t\t\t\t\t\tp.id = null;\r\n\r\n\t\t\t\t\t\tp.addresses.forEach(a => {\r\n\t\t\t\t\t\t\ta.id = null;\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tp.contacts.forEach(c => {\r\n\t\t\t\t\t\t\tc.id = null;\r\n\r\n\t\t\t\t\t\t\tc.addresses.forEach(a => {\r\n\t\t\t\t\t\t\t\ta.id = null;\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tc.emailAddresses.forEach(ea => {\r\n\t\t\t\t\t\t\t\tea.id = null;\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tc.phoneNumbers.forEach(pn => {\r\n\t\t\t\t\t\t\t\tpn.id = null;\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tc.webAddresses.forEach(wa => {\r\n\t\t\t\t\t\t\t\twa.id = null;\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tp.emailAddresses.forEach(ea => {\r\n\t\t\t\t\t\t\tea.id = null;\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tp.phoneNumbers.forEach(pn => {\r\n\t\t\t\t\t\t\tpn.id = null;\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tp.webAddresses.forEach(wa => {\r\n\t\t\t\t\t\t\twa.id = null;\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tconst pocs = _.map(pharmacy.pointOfContactData, poc => new pme.PointOfContact(poc));\r\n\r\n\t\t\t\t\t\tpocs.forEach(poc => {\r\n\t\t\t\t\t\t\tpoc.id = null;\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\taccount.pharmacyRelationships.push(new pme.PharmacyRelationship({\r\n\t\t\t\t\t\t\tisPrimary: pr.isPrimary,\r\n\t\t\t\t\t\t\tpharmacy: p,\r\n\t\t\t\t\t\t\tpointOfContacts: pocs\r\n\t\t\t\t\t\t}));\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (response.prescriberData) {\r\n\t\t\t\tresponse.caseData.prescribers.forEach(pr => {\r\n\t\t\t\t\tconst prescriber = _.find(response.prescriberData, pd => pd.prescriberId === pr.partyRoleId);\r\n\r\n\t\t\t\t\tif (prescriber) {\r\n\t\t\t\t\t\tconst p = new pme.Prescriber(prescriber);\r\n\r\n\t\t\t\t\t\tp.id = null;\r\n\r\n\t\t\t\t\t\tp.addresses.forEach(a => {\r\n\t\t\t\t\t\t\ta.id = null;\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tp.emailAddresses.forEach(ea => {\r\n\t\t\t\t\t\t\tea.id = null;\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tp.phoneNumbers.forEach(pn => {\r\n\t\t\t\t\t\t\tpn.id = null;\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tp.prescriberLicenses.forEach(pl => {\r\n\t\t\t\t\t\t\tpl.prescriberLicenseId = null;\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\taccount.prescriberRelationships.push(new pme.PrescriberRelationship({\r\n\t\t\t\t\t\t\tisPrimary: pr.isPrimary,\r\n\t\t\t\t\t\t\tprescriber: p\r\n\t\t\t\t\t\t}));\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (response.prescriptionData) {\r\n\t\t\t\tconst prescriptions = [];\r\n\r\n\t\t\t\tresponse.caseData.prescriptions.forEach(cp => {\r\n\t\t\t\t\tconst prescription = _.find(response.prescriptionData, pd => pd.id === cp.prescriptionId);\r\n\r\n\t\t\t\t\tif (prescription) {\r\n\t\t\t\t\t\tprescriptions.push(new pme.Prescription(prescription));\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (prescriptions.length > 0) {\r\n\t\t\t\t\tconst ordered = _.orderBy(prescriptions, ['createdOn'], ['desc']);\r\n\t\t\t\t\tconst first = ordered[0];\r\n\t\t\t\t\tfirst.id = null;\r\n\t\t\t\t\taccount.prescriptions.push(first);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (response.siteData) {\r\n\t\t\t\tresponse.caseData.sites.forEach(sr => {\r\n\t\t\t\t\tconst site = _.find(response.siteData, sd => sd.siteData.siteId === sr.partyRoleId);\r\n\r\n\t\t\t\t\tif (site) {\r\n\t\t\t\t\t\tconst s = new pme.Site(site.siteData);\r\n\r\n\t\t\t\t\t\ts.id = null;\r\n\r\n\t\t\t\t\t\ts.addresses.forEach(a => {\r\n\t\t\t\t\t\t\ta.id = null;\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\ts.contacts.forEach(c => {\r\n\t\t\t\t\t\t\tc.id = null;\r\n\r\n\t\t\t\t\t\t\tc.addresses.forEach(a => {\r\n\t\t\t\t\t\t\t\ta.id = null;\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tc.emailAddresses.forEach(ea => {\r\n\t\t\t\t\t\t\t\tea.id = null;\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tc.phoneNumbers.forEach(pn => {\r\n\t\t\t\t\t\t\t\tpn.id = null;\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tc.webAddresses.forEach(wa => {\r\n\t\t\t\t\t\t\t\twa.id = null;\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\ts.emailAddresses.forEach(ea => {\r\n\t\t\t\t\t\t\tea.id = null;\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\ts.phoneNumbers.forEach(pn => {\r\n\t\t\t\t\t\t\tpn.id = null;\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tconst pocs = _.map(site.pointOfContactData, poc => new pme.PointOfContact(poc));\r\n\r\n\t\t\t\t\t\tpocs.forEach(poc => {\r\n\t\t\t\t\t\t\tpoc.id = null;\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\taccount.siteRelationships.push(new pme.SiteRelationship({\r\n\t\t\t\t\t\t\tisPrimary: sr.isPrimary,\r\n\t\t\t\t\t\t\tsite: s,\r\n\t\t\t\t\t\t\tpointOfContacts: pocs\r\n\t\t\t\t\t\t}));\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (response.surveyData) {\r\n\t\t\t\tresponse.surveyData.forEach(sd => {\r\n\t\t\t\t\tconst surveySession = account.getSurveySession(sd.sessionData.surveyId);\r\n\t\t\t\t\tconst questionIds = _.uniq(_.map(sd.valueData, 'questionId'));\r\n\t\t\t\t\tquestionIds.forEach(q => {\r\n\t\t\t\t\t\tconst answers = _.filter(sd.valueData, { 'questionId': q });\r\n\t\t\t\t\t\tconst answerIds = _.map(answers, 'answerId');\r\n\t\t\t\t\t\tconst answerValue = _.get(answers, '[0].answerValue', '');\r\n\t\t\t\t\t\tsurveySession.setSurveySessionAnswers(q, answerIds, answerValue);\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\treturn account;\r\n\t\t}\r\n }\r\n}","namespace Portico.Services {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\timport pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pml = Portico.Models.Legacy;\r\n\timport pms = Portico.Models.Setup;\r\n\timport ps = Portico.Services;\r\n\r\n\texport type KvpMap = { [key: string]: any };\r\n\r\n\texport interface IDataService {\r\n\t\t// enterprise data\r\n\t\tenterprise: pme.Enterprise;\r\n\t\t// legacy data\r\n\t\tlegacy: pml.Legacy;\r\n\t\t// setup data\r\n\t\tsetup: pms.Setup;\r\n\t\t// state data\r\n\t\tstate: pm.State;\r\n\t\t// local storage\r\n\t\tlocal: KvpMap;\r\n\t\t// session storage\r\n\t\tsession: KvpMap;\r\n\t\t// temporary data\r\n temp: KvpMap;\r\n\r\n jwtTokenKeyName: string;\r\n sessionKeyName: string;\r\n childFlagKeyName: string;\r\n\r\n\t\tgetDataRows: (table: string, key?: string) => pms.DataRow[];\r\n\t\tgetDataRowValue: (dataRow: pms.DataRow, column: string, def?: string) => string;\r\n\t\tgetDataTable: (table: string) => pms.DataTable;\r\n\t\tgetDataValue: (table: string, column: string, key: string, def?: string) => string;\r\n\t\tgetDataValues: (table: string, column: string, key?: string) => string[];\r\n\t\tgetEnvironmentId: (key: number | string, def?: number) => number;\r\n\t\tgetEnvironmentValue(key: string, def?: string): string;\r\n\t\tgetProgramId: () => number;\r\n getReferenceId: (key: number | string, def?: number) => number;\r\n //getReferenceValue(key: string): string;\r\n getReferenceValue(key: string, def?: string): string;\r\n\t\tgetTenantId: () => number;\r\n\t}\r\n\r\n\t@Service('app', 'dataService')\r\n\t@Inject('serverConstants')\r\n\texport class DataService implements IDataService {\r\n\t\t// enterprise data\r\n\t\tenterprise: pme.Enterprise;\r\n\t\t// legacy data\r\n\t\tlegacy: pml.Legacy;\r\n\t\t// setup data\r\n\t\tsetup: pms.Setup;\r\n\t\t// state data\r\n\t\tstate: pm.State;\r\n\t\t// local storage\r\n\t\tlocal: KvpMap;\r\n\t\t// session storage\r\n\t\tsession: KvpMap;\r\n\t\t// permanent data (uses storage)\r\n\t\tperm: KvpMap;\r\n\t\t// temporary data\r\n\t\ttemp: KvpMap;\r\n\r\n\t\tconstructor(private serverConstants: pmi.IServerConstants) {\r\n\t\t\tthis.enterprise = new pme.Enterprise();\r\n\t\t\tthis.legacy = new pml.Legacy();\r\n\t\t\tthis.setup = new pms.Setup();\r\n\t\t\tthis.state = new pm.State();\r\n\t\t\tthis.local = {};\r\n\t\t\tthis.session = {};\r\n\t\t\tthis.perm = this.session;\r\n\t\t\tthis.temp = {};\r\n }\r\n\r\n public jwtTokenKeyName: string = `${Portico.Models.JWT_STORAGE_KEY}-${this.serverConstants.portalId}`;\r\n public sessionKeyName: string = `${pm.SESSION_STORAGE_KEY}-${this.serverConstants.portalId}`;\r\n public childFlagKeyName: string = `${pm.IS_CHILD_KEY}-${this.serverConstants.portalId}`;\r\n\r\n\t\tgetDataRows(table: string, key: string = null): pms.DataRow[] {\r\n\t\t\tif (this.setup.portal) {\r\n\t\t\t\tconst dataTable = this.getDataTable(table);\r\n\r\n\t\t\t\tif (dataTable) {\r\n\t\t\t\t\treturn this.setup.portal.getDataRows(dataTable.id, key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tgetDataRowValue(dataRow: pms.DataRow, column: string, def: string = null): string {\r\n\t\t\tconst dataTable = this.getDataTable(dataRow.dataTableId);\r\n\r\n\t\t\tif (dataTable) {\r\n\t\t\t\tconst dataColumn = dataTable.getDataColumn(column);\r\n\r\n\t\t\t\tif (dataColumn) {\r\n\t\t\t\t\treturn dataRow.getValue(dataColumn.id, def);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn def;\r\n\t\t}\r\n\r\n\t\tgetDataTable(table: string): pms.DataTable {\r\n\t\t\tif (this.setup.dataTables) {\r\n\t\t\t\tconst dataTables = this.setup.dataTables.filter((dt: pms.DataTable) => {\r\n\t\t\t\t\treturn dt.id === table || dt.name === table;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (dataTables && dataTables.length === 1) {\r\n\t\t\t\t\treturn dataTables[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tgetDataValue(table: string, column: string, key: string, def: string = null): string {\r\n\t\t\tif (this.setup.portal) {\r\n\t\t\t\tconst dataTable = this.getDataTable(table);\r\n\r\n\t\t\t\tif (dataTable) {\r\n\t\t\t\t\tconst dataColumn = dataTable.getDataColumn(column);\r\n\r\n\t\t\t\t\tif (dataColumn) {\r\n\t\t\t\t\t\tconst dataRows = this.setup.portal.getDataRows(dataTable.id, key);\r\n\r\n\t\t\t\t\t\tif (dataRows && dataRows.length >= 1) {\r\n\t\t\t\t\t\t\tconst dataRow = dataRows[0];\r\n\t\t\t\t\t\t\tconst dataValue = dataRow.getDataValue(dataColumn.id);\r\n\r\n\t\t\t\t\t\t\tif (dataValue) {\r\n\t\t\t\t\t\t\t\treturn dataValue.value;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn def;\r\n\t\t}\r\n\r\n\t\tgetDataValues(table: string, column: string, key: string = null): string[] {\r\n\t\t\tconst values: string[] = [];\r\n\r\n\t\t\tif (this.setup.portal) {\r\n\t\t\t\tconst dataTable = this.getDataTable(table);\r\n\r\n\t\t\t\tif (dataTable) {\r\n\t\t\t\t\tconst dataColumn = dataTable.getDataColumn(column);\r\n\r\n\t\t\t\t\tif (dataColumn) {\r\n\t\t\t\t\t\tconst dataRows = this.setup.portal.getDataRows(dataTable.id, key);\r\n\r\n\t\t\t\t\t\tif (dataRows) {\r\n\t\t\t\t\t\t\tdataRows.forEach((dataRow) => {\r\n\t\t\t\t\t\t\t\tconst dataValue = dataRow.getDataValue(dataColumn.id);\r\n\r\n\t\t\t\t\t\t\t\tif (dataValue) {\r\n\t\t\t\t\t\t\t\t\tvalues.push(dataValue.value);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn values;\r\n\t\t}\r\n\r\n\t\tgetEnvironmentId(key: number | string, def: number = null): number {\r\n\t\t\tif (typeof key === 'string') {\r\n\t\t\t\tconst environment = this.serverConstants.connectTo;\r\n\t\t\t\tconst value = this.getDataValue('Environment', environment, key) || this.getDataValue('Reference', 'Id', key) || key;\r\n\t\t\t\treturn value ? _.toNumber(value) : def;\r\n\t\t\t}\r\n\r\n\t\t\treturn key;\r\n\t\t}\r\n\r\n\t\tgetEnvironmentValue(key: string, def: string = null): string {\r\n\t\t\tconst environment = this.serverConstants.connectTo;\r\n\t\t\tconst value = this.getDataValue('Environment', environment, key) || this.getDataValue('Reference', 'Id', key);\r\n\t\t\treturn value || def;\r\n\t\t}\r\n\r\n\t\tgetProgramId(): number {\r\n\t\t\treturn this.getEnvironmentId(this.state.app + '-program') || -1;\r\n\t\t}\r\n\r\n\t\tgetReferenceId(key: number | string, def: number = null): number {\r\n\t\t\tif (typeof key === 'string') {\r\n\t\t\t\tconst value = this.getDataValue('Reference', 'Id', key); // || key;\r\n\t\t\t\treturn value ? _.toNumber(value) : def;\r\n\t\t\t}\r\n\r\n\t\t\treturn key;\r\n }\r\n\r\n getReferenceValue(key: string, def: string = null): string {\r\n return this.getDataValue('Reference', 'Id', key) || def;\r\n }\r\n\r\n\t\tgetTenantId(): number {\r\n\t\t\treturn this.getEnvironmentId('tenant') || -1;\r\n\t\t}\r\n }\r\n}","namespace Portico.Services {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\texport interface IDateService {\r\n\t\tadd(utcDate: string | Date | moment.Moment, amount: number, unit: string): moment.Moment;\r\n\t\tisAfter(utcDate: string | Date | moment.Moment): boolean;\r\n\t\tisBefore(utcDate: string | Date | moment.Moment): boolean;\r\n\t\tnow(): moment.Moment;\r\n\t\tsubtract(utcDate: string | Date | moment.Moment, amount: number, unit: string): moment.Moment;\r\n\t}\r\n\r\n\t@Service('app', 'dateService')\r\n\t@Inject('$rootScope')\r\n\texport class DateService implements IDateService {\r\n\t\tconstructor() { }\r\n\r\n\t\tadd(utcDate: string | Date | moment.Moment, amount: number, unit: string): moment.Moment {\r\n\t\t\treturn moment(utcDate).add(amount, unit);\r\n\t\t}\r\n\r\n\t\tisAfter(utcDate: string | Date | moment.Moment): boolean {\r\n\t\t\treturn moment().utc().isAfter(moment(utcDate).utcOffset(0, true));\r\n\t\t}\r\n\r\n\t\tisBefore(utcDate: string | Date | moment.Moment): boolean {\r\n\t\t\treturn moment().utc().isBefore(moment(utcDate).utcOffset(0, true));\r\n\t\t}\r\n\r\n\t\tnow(): moment.Moment {\r\n\t\t\treturn moment().utc();\r\n\t\t}\r\n\r\n\t\tsubtract(utcDate: string | Date | moment.Moment, amount: number, unit: string): moment.Moment {\r\n\t\t\treturn moment(utcDate).subtract(amount, unit);\r\n\t\t}\r\n\t}\r\n}","namespace Portico.Services {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\timport pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pms = Portico.Models.Setup;\r\n\timport ps = Portico.Services;\r\n\r\n export interface IDemoService {\r\n\t\tedit(id: string): angular.IPromise;\r\n\t\tremove(portal: pms.Portal): angular.IPromise;\r\n\t\tsave(demo: pms.Demo): angular.IPromise;\r\n\t}\r\n\r\n\t// temporarily renamed portico service; created data service to avoid circular injection issues\r\n @Service('app', 'demoService')\r\n @Inject('$q', 'Upload', 'dataService', 'serverConstants', 'setupService')\r\n\texport class DemoService implements IDemoService {\r\n\r\n constructor(\r\n\t\t\tprivate $q: angular.IQService,\r\n\t\t\tprivate $upload: any,\r\n\t\t\tprivate dataService: ps.IDataService,\r\n\t\t\tprivate serverConstants: pmi.IServerConstants,\r\n\t\t\tprivate setupService: ps.ISetupService\r\n ) { }\r\n\r\n\t\tedit(id: string): angular.IPromise {\r\n\t\t\tconst promise =\r\n\t\t\t\tid !== pm.GUID_EMPTY ?\r\n\t\t\t\tthis.setupService.portalService.getDetailsById(id, false) :\r\n\t\t\t\tthis.$q.when(new pms.Portal());\r\n\r\n\t\t\treturn promise.then((response) => {\r\n\t\t\t\tif (!response.id) {\r\n\t\t\t\t\tresponse.coreVersion = '1.0';\r\n\t\t\t\t\tresponse.portalGroupId = pm.PORTAL_GROUP_DEMO;\r\n\t\t\t\t\tresponse.settings = \r\n\t\t\t\t\t`{\r\n\t\t\t\t\t\t\"head\": [\r\n\t\t\t\t\t\t\t\"\",\r\n\t\t\t\t\t\t\t\"\",\r\n\t\t\t\t\t\t\t\"\",\r\n\t\t\t\t\t\t\t\"\",\r\n\t\t\t\t\t\t\t\"\"\r\n\t\t\t\t\t\t]\r\n\t\t\t\t\t}`;\r\n\t\t\t\t\tresponse.url = 'demo';\r\n\r\n\t\t\t\t\t// Standard Default\r\n\t\t\t\t\tresponse.portalDataGroups.push(new pms.PortalDataGroup({\r\n\t\t\t\t\t\tdataGroupId: pm.DATA_GROUP_STANDARD_DEFAULT,\r\n\t\t\t\t\t\tpriority: 1\r\n\t\t\t\t\t}));\r\n\r\n\t\t\t\t\t// Template Placeholder\r\n\t\t\t\t\tresponse.portalDataGroups.push(new pms.PortalDataGroup({\r\n\t\t\t\t\t\tpriority: 2\r\n\t\t\t\t\t}));\r\n\r\n\t\t\t\t\t// Private\r\n\t\t\t\t\tconst component = this.dataService.getDataTable('Component');\r\n\t\t\t\t\tconst componentHtml = component.getDataColumn('Html');\r\n\r\n\t\t\t\t\tconst image = this.dataService.getDataTable('Image');\r\n\t\t\t\t\tconst imageSource = image.getDataColumn('Source');\r\n\r\n\t\t\t\t\tconst reference = this.dataService.getDataTable('Reference');\r\n\t\t\t\t\tconst referenceId = reference.getDataColumn('Id');\r\n\r\n\t\t\t\t\tresponse.portalDataGroups.push(new pms.PortalDataGroup({\r\n\t\t\t\t\t\tpriority: 9,\r\n\t\t\t\t\t\tdataGroup: new pms.DataGroup({\r\n\t\t\t\t\t\t\tdataGroupTypeId: pm.DATA_GROUP_TYPE_PORTAL,\r\n\t\t\t\t\t\t\tname: '',\r\n\t\t\t\t\t\t\tisPrivate: true,\r\n\t\t\t\t\t\t\tdataRows: [\r\n\t\t\t\t\t\t\t\tnew pms.DataRow({\r\n\t\t\t\t\t\t\t\t\tkey: 'brand-name',\r\n\t\t\t\t\t\t\t\t\tdataTableId: component.id,\r\n\t\t\t\t\t\t\t\t\tdataValues: [\r\n\t\t\t\t\t\t\t\t\t\tnew pms.DataValue({\r\n\t\t\t\t\t\t\t\t\t\t\tdataColumnId: componentHtml.id\r\n\t\t\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\t\t]\r\n\t\t\t\t\t\t\t\t}),\r\n\t\t\t\t\t\t\t\tnew pms.DataRow({\r\n\t\t\t\t\t\t\t\t\tkey: 'color-background',\r\n\t\t\t\t\t\t\t\t\tdataTableId: reference.id,\r\n\t\t\t\t\t\t\t\t\tdataValues: [\r\n\t\t\t\t\t\t\t\t\t\tnew pms.DataValue({\r\n\t\t\t\t\t\t\t\t\t\t\tdataColumnId: referenceId.id,\r\n\t\t\t\t\t\t\t\t\t\t\tvalue: '#FFFFFF'\r\n\t\t\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\t\t]\r\n\t\t\t\t\t\t\t\t}),\r\n\t\t\t\t\t\t\t\tnew pms.DataRow({\r\n\t\t\t\t\t\t\t\t\tkey: 'color-font',\r\n\t\t\t\t\t\t\t\t\tdataTableId: reference.id,\r\n\t\t\t\t\t\t\t\t\tdataValues: [\r\n\t\t\t\t\t\t\t\t\t\tnew pms.DataValue({\r\n\t\t\t\t\t\t\t\t\t\t\tdataColumnId: referenceId.id,\r\n\t\t\t\t\t\t\t\t\t\t\tvalue: '#444444'\r\n\t\t\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\t\t]\r\n\t\t\t\t\t\t\t\t}),\r\n\t\t\t\t\t\t\t\tnew pms.DataRow({\r\n\t\t\t\t\t\t\t\t\tkey: 'color-primary',\r\n\t\t\t\t\t\t\t\t\tdataTableId: reference.id,\r\n\t\t\t\t\t\t\t\t\tdataValues: [\r\n\t\t\t\t\t\t\t\t\t\tnew pms.DataValue({\r\n\t\t\t\t\t\t\t\t\t\t\tdataColumnId: referenceId.id\r\n\t\t\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\t\t]\r\n\t\t\t\t\t\t\t\t}),\r\n\t\t\t\t\t\t\t\tnew pms.DataRow({\r\n\t\t\t\t\t\t\t\t\tkey: 'color-secondary',\r\n\t\t\t\t\t\t\t\t\tdataTableId: reference.id,\r\n\t\t\t\t\t\t\t\t\tdataValues: [\r\n\t\t\t\t\t\t\t\t\t\tnew pms.DataValue({\r\n\t\t\t\t\t\t\t\t\t\t\tdataColumnId: referenceId.id\r\n\t\t\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\t\t]\r\n\t\t\t\t\t\t\t\t}),\r\n\t\t\t\t\t\t\t\tnew pms.DataRow({\r\n\t\t\t\t\t\t\t\t\tkey: 'brand-logo',\r\n\t\t\t\t\t\t\t\t\tdataTableId: image.id,\r\n\t\t\t\t\t\t\t\t\tdataValues: [\r\n\t\t\t\t\t\t\t\t\t\tnew pms.DataValue({\r\n\t\t\t\t\t\t\t\t\t\t\tdataColumnId: imageSource.id\r\n\t\t\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\t\t]\r\n\t\t\t\t\t\t\t\t}),\r\n\t\t\t\t\t\t\t\tnew pms.DataRow({\r\n\t\t\t\t\t\t\t\t\tkey: 'template-id',\r\n\t\t\t\t\t\t\t\t\tdataTableId: reference.id,\r\n\t\t\t\t\t\t\t\t\tdataValues: [\r\n\t\t\t\t\t\t\t\t\t\tnew pms.DataValue({\r\n\t\t\t\t\t\t\t\t\t\t\tdataColumnId: referenceId.id\r\n\t\t\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\t\t]\r\n\t\t\t\t\t\t\t\t}),\r\n\t\t\t\t\t\t\t\tnew pms.DataRow({\r\n\t\t\t\t\t\t\t\t\tkey: 'tenant-name',\r\n\t\t\t\t\t\t\t\t\tdataTableId: component.id,\r\n\t\t\t\t\t\t\t\t\tdataValues: [\r\n\t\t\t\t\t\t\t\t\t\tnew pms.DataValue({\r\n\t\t\t\t\t\t\t\t\t\t\tdataColumnId: componentHtml.id\r\n\t\t\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\t\t]\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t]\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst squares = response.portalDataGroups.filter((portalDataGroup) => {\r\n\t\t\t\t\treturn portalDataGroup.dataGroupId.toUpperCase() === pm.DATA_GROUP_LNF_SQUARE;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tconst shadows = response.portalDataGroups.filter((portalDataGroup) => {\r\n\t\t\t\t\treturn portalDataGroup.dataGroupId.toUpperCase() === pm.DATA_GROUP_LNF_SHADOW;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.dataService.setup.demo = new pms.Demo();\r\n\t\t\t\tthis.dataService.setup.demo.portal = response;\r\n\t\t\t\tthis.dataService.setup.demo.brand = this.getDataValue(response, 'Component', 'Html', 'brand-name');\r\n\t\t\t\tthis.dataService.setup.demo.logo = this.getDataValue(response, 'Image', 'Source', 'brand-logo');\r\n\t\t\t\tthis.dataService.setup.demo.pharma = this.getDataValue(response, 'Component', 'Html', 'tenant-name');\r\n\t\t\t\tthis.dataService.setup.demo.primary = this.getDataValue(response, 'Reference', 'Id', 'color-primary');\r\n\t\t\t\tthis.dataService.setup.demo.secondary = this.getDataValue(response, 'Reference', 'Id', 'color-secondary');\r\n\t\t\t\tthis.dataService.setup.demo.shadow = shadows.length > 0;\r\n\t\t\t\tthis.dataService.setup.demo.square = squares.length > 0;\r\n\t\t\t\tthis.dataService.setup.demo.template = this.getDataValue(response, 'Reference', 'Id', 'template-id');\r\n\r\n\t\t\t\tthis.dataService.setup.demo.primary.value = this.dataService.setup.demo.primary.value.toLowerCase();\r\n\t\t\t\tthis.dataService.setup.demo.secondary.value = this.dataService.setup.demo.secondary.value.toLowerCase();\r\n\t\t\t\tthis.dataService.setup.demo.template.value = this.dataService.setup.demo.template.value.toLowerCase();\r\n\r\n\t\t\t\t// why not just return the demo portal?\r\n\t\t\t\t// can the action service return data?\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tremove(portal: pms.Portal): angular.IPromise {\r\n\t\t\treturn this.setupService.portalService.getDetailsById(portal.id).then((details) => {\r\n\t\t\t\treturn this.setupService.portalService.delete(portal).then((response) => {\r\n\t\t\t\t\tif (this.dataService.setup.demos) {\r\n\t\t\t\t\t\tthis.dataService.setup.demos = this.dataService.setup.demos.filter((p) => {\r\n\t\t\t\t\t\t\treturn p.id !== portal.id;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (this.dataService.setup.templates) {\r\n\t\t\t\t\t\tthis.dataService.setup.templates = this.dataService.setup.templates.filter((p) => {\r\n\t\t\t\t\t\t\treturn p.id !== portal.id;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tconst promises: angular.IPromise[] = [];\r\n\r\n\t\t\t\t\tdetails.portalDataGroups.forEach((portalDataGroup) => {\r\n\t\t\t\t\t\tif (portalDataGroup.dataGroup.isPrivate) {\r\n\t\t\t\t\t\t\tpromises.push(this.setupService.dataGroupService.delete(portalDataGroup.dataGroup));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\treturn this.$q.all(promises).then(() => {\r\n\t\t\t\t\t\treturn response;\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// rename to saveDemo? move into a demo service?\r\n\t\tsave(demo: pms.Demo): angular.IPromise {\r\n\t\t\tthis.dataService.setup.demo.primary.value = this.dataService.setup.demo.primary.value.toUpperCase();\r\n\t\t\tthis.dataService.setup.demo.secondary.value = this.dataService.setup.demo.secondary.value.toUpperCase();\r\n\t\t\tthis.dataService.setup.demo.template.value = this.dataService.setup.demo.template.value.toUpperCase();\r\n\r\n\t\t\t// set path to logo file\r\n\t\t\tif (demo.logoFile) {\r\n\t\t\t\tdemo.logo.value = '{{$app.serverConstants.contentPath}}/Demo/' + demo.logoFile.name;\r\n\t\t\t}\r\n\r\n\t\t\t// remove shadow and square\r\n\t\t\tdemo.portal.portalDataGroups = demo.portal.portalDataGroups.filter((portalDataGroup) => {\r\n\t\t\t\treturn portalDataGroup.dataGroupId.toUpperCase() !== pm.DATA_GROUP_LNF_SHADOW && portalDataGroup.dataGroupId.toUpperCase() !== pm.DATA_GROUP_LNF_SQUARE;\r\n\t\t\t});\r\n\r\n\t\t\t// if checked, add square\r\n\t\t\tif (this.dataService.setup.demo.square) {\r\n\t\t\t\tdemo.portal.portalDataGroups.push(new pms.PortalDataGroup({\r\n\t\t\t\t\tdataGroupId: pm.DATA_GROUP_LNF_SQUARE,\r\n\t\t\t\t\tpriority: 3\r\n\t\t\t\t}));\r\n\t\t\t}\r\n\r\n\t\t\t// if checked, add shadow\r\n\t\t\tif (this.dataService.setup.demo.shadow) {\r\n\t\t\t\tdemo.portal.portalDataGroups.push(new pms.PortalDataGroup({\r\n\t\t\t\t\tdataGroupId: pm.DATA_GROUP_LNF_SHADOW,\r\n\t\t\t\t\tpriority: 4\r\n\t\t\t\t}));\r\n\t\t\t}\r\n\r\n\t\t\tdemo.portal.portalDataGroups.forEach((pdg) => {\r\n\t\t\t\t// don't save shared data groups (1-4)\r\n\t\t\t\tif (pdg.priority <= 4) {\r\n\t\t\t\t\tpdg.dataGroup = null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// set template data group\r\n\t\t\t\tif (pdg.priority === 2) {\r\n\t\t\t\t\tpdg.dataGroupId = this.getDataValue(demo.portal, 'Reference', 'Id', Portico.Models.KnownKeyNames.templateId).value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// set template data group\r\n\t\t\t\tif (pdg.priority === 9) {\r\n\t\t\t\t\tpdg.dataGroup.name = demo.portal.name + ' (private)';\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treturn this.setupService.portalService.saveDetails(demo.portal).then((response) => {\r\n\t\t\t\tif (demo.logoFile) {\r\n\t\t\t\t\tthis.$upload.upload({\r\n\t\t\t\t\t\turl: this.serverConstants.root + 'Setup/Upload',\r\n\t\t\t\t\t\tdata: { file: demo.logoFile }\r\n\t\t\t\t\t}).success(function (data, status, headers, config) {\r\n\t\t\t\t\t\t// console.log(data);\r\n\t\t\t\t\t}).error(function (data, status, headers, config) {\r\n\t\t\t\t\t\t// console.log(data);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn response;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tprivate getDataValue(portal: pms.Portal, table: string, column: string, key: string): pms.DataValue {\r\n\t\t\tconst dataTable = this.dataService.getDataTable(table);\r\n\t\t\tconst dataColumn = dataTable.getDataColumn(column);\r\n\t\t\tconst dataRows = portal.getDataRows(dataTable.id, key);\r\n\t\t\tconst dataRow = dataRows[0];\r\n\t\t\tconst dataValue = dataRow.getDataValue(dataColumn.id);\r\n\r\n\t\t\treturn dataValue;\r\n\t\t}\r\n }\r\n}","namespace Portico.Services {\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n import LogLevel = Portico.Models.LogLevel;\r\n\r\n export type errorCallback = (error: T, loggingLevel: Portico.Models.LogLevel) => void;\r\n\r\n export interface IErrorService {\r\n handleError(error: Portico.Models.PorticoException, callback?: errorCallback): void;\r\n handleError(error: string, callback?: errorCallback): void;\r\n handleError(error: string[], callback?: errorCallback): void;\r\n handleError(error: Portico.Models.PorticoException | string | string[],\r\n callback?: errorCallback): void;\r\n }\r\n\r\n @Service('app', 'errorService')\r\n @Inject('$log', 'dataService', '$http')\r\n export class ErrorService {\r\n constructor(\r\n private $log: angular.ILogService,\r\n private dataService: Portico.Services.IDataService,\r\n private $http: ng.IHttpService\r\n ) { }\r\n\r\n public handleError(error: Portico.Models.PorticoException, callback?: errorCallback): void;\r\n public handleError(error: string, callback?: errorCallback): void;\r\n public handleError(error: string[], callback?: errorCallback): void;\r\n public handleError(error: Portico.Models.PorticoException | string | string[],\r\n callback?: errorCallback): void {\r\n\r\n var loggingLevel = this.dataService.getEnvironmentValue('logging-level') != null ?\r\n LogLevel[this.dataService.getEnvironmentValue('logging-level').toLowerCase()] : LogLevel.none;\r\n\r\n var errorObj = null;\r\n\r\n if (error instanceof Portico.Models.PorticoException) {\r\n errorObj = error;\r\n\r\n if (loggingLevel !== LogLevel.none && loggingLevel !== LogLevel.record) {\r\n this.$log.error(\"Portico error: \" + error.errorMessage);\r\n\r\n if (loggingLevel === LogLevel.verbose) {\r\n this.$log.error(\"Details: \" + error.rawError);\r\n this.$log.error(\"Raw Dump: \" + error.dataDump);\r\n }\r\n }\r\n }\r\n else {\r\n const messages = Array.isArray(error) ? error.join(' | ') : error;\r\n errorObj = new Portico.Models.PorticoException(messages, '');\r\n\r\n if (loggingLevel !== LogLevel.none) {\r\n this.$log.error(messages);\r\n }\r\n }\r\n\r\n if (loggingLevel === LogLevel.record) {\r\n // send error to the server to be logged\r\n this.logToServer(errorObj);\r\n }\r\n\r\n if (callback) {\r\n callback(error, loggingLevel);\r\n }\r\n }\r\n\r\n private logToServer(error: Portico.Models.PorticoException | string): void {\r\n this.$http.defaults.headers.common['accept'] = 'application/json';\r\n this.$http.defaults.headers.common[\"X-Requested-With\"] = 'XMLHttpRequest';\r\n\r\n try {\r\n this.$http.post('/api/ClientError', error)\r\n .catch(() => { });\r\n }\r\n catch(e) { }\r\n\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\timport pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pms = Portico.Models.Setup;\r\n\timport ps = Portico.Services;\r\n\r\n\tenum ModalState {\r\n\t\tHIDDEN,\r\n\t\tHIDE,\r\n\t\tSHOW,\r\n\t\tSHOWN\r\n\t}\r\n\r\n\texport class Modal {\r\n\t\tid: string;\r\n\t\tactualId: string;\r\n\t\tversion: number;\r\n\t\t$scope: angular.IScope;\r\n\t\thtml: string;\r\n\t\treturnTo: JQuery;\r\n\t\tstate: ModalState;\r\n\r\n\t\tconstructor(id: string, actualId: string, version: number = 1, $scope: angular.IScope = null, html: string = null) {\r\n\t\t\tthis.id = id;\r\n\t\t\tthis.actualId = actualId;\r\n\t\t\tthis.version = version;\r\n\t\t\tthis.$scope = $scope;\r\n\t\t\tthis.html = html;\r\n\t\t\tthis.returnTo = null;\r\n\t\t\tthis.state = ModalState.SHOW;\r\n\t\t}\r\n\t}\r\n\r\n\texport interface IModalService {\r\n\t\tclear: () => void;\r\n\t\thide: (id: string) => void;\r\n\t\thide2: (key: string) => void;\r\n\t\tshow: (id: string) => void;\r\n\t\tshow2: ($scope: angular.IScope, key: string, clazz?: string, ngInit?: string) => void;\r\n\t}\r\n\r\n @Service('app', 'modalService')\r\n\t@Inject('$compile', '$timeout')\r\n\texport class ModalService implements IModalService {\r\n\t\tprivate current: number;\r\n\t\tprivate modals: Modal[];\r\n\t\tprivate ready: boolean;\r\n\r\n\t\tconstructor(\r\n\t\t\tprivate $compile: ng.ICompileService,\r\n\t\t\tprivate $timeout: ng.ITimeoutService\r\n\t\t) {\r\n\t\t\tthis.current = 0;\r\n\t\t\tthis.modals = [];\r\n\t\t\tthis.ready = true;\r\n\t\t}\r\n\r\n\t\tpublic clear(): void {\r\n\t\t\tthis.current = 0;\r\n\t\t\tthis.modals = [];\r\n\t\t\tthis.ready = true;\r\n\t\t}\r\n\r\n\t\tpublic hide(id: string): void {\r\n\t\t\tconst modal = _.findLast(this.modals, (m) => { return m.id === id && m.state !== ModalState.HIDDEN && m.version === 1; });\r\n\t\t\tmodal.state = modal.state === ModalState.SHOWN ? ModalState.HIDE : ModalState.HIDDEN;\r\n\t\t\tthis._process();\r\n\t\t}\r\n\r\n\t\tpublic hide2(key: string): void {\r\n\t\t\tconst modal = _.findLast(this.modals, (m) => { return m.id === key && m.state !== ModalState.HIDDEN && m.version === 2; });\r\n\t\t\tmodal.state = modal.state === ModalState.SHOWN ? ModalState.HIDE : ModalState.HIDDEN;\r\n\t\t\tthis._process();\r\n\t\t}\r\n\r\n\t\tpublic show(id: string): void {\r\n\t\t\tconst actualId = $(`#${id}`).hasClass('modal') ? `#${id}` : '#default-spinner';\r\n\t\t\tconst modal = new Modal(id, actualId);\r\n\t\t\tthis.modals.push(modal);\r\n\t\t\tthis._process();\r\n\t\t}\r\n\r\n\t\tpublic show2($scope: angular.IScope, key: string, clazz: string = '', ngInit: string = ''): void {\r\n\t\t\tconst actualId = `#${key}`;\r\n\t\t\tconst html = ``;\r\n\t\t\tconst modal = new Modal(key, actualId, 2, $scope, html);\r\n\t\t\tthis.modals.push(modal);\r\n\t\t\tthis._process();\r\n\t\t} \r\n\r\n\t\tprivate _process(): void {\r\n\t\t\tif (this.ready) {\r\n\t\t\t\tthis.modals = this.modals.filter((m, index) => { return m.state !== ModalState.HIDDEN || index < this.current; });\r\n\r\n\t\t\t\tif (this.current < this.modals.length) {\r\n\t\t\t\t\tif (this.current < this.modals.length - 1 || this.modals[this.current].state === ModalState.HIDE) {\r\n\t\t\t\t\t\tconst modal = this.modals[this.current];\r\n\t\t\t\t\t\tmodal.state = modal.state === ModalState.HIDE ? modal.state = ModalState.HIDDEN : ModalState.SHOW;\r\n\r\n\t\t\t\t\t\t$(modal.actualId).one('hidden.bs.modal', (e) => {\r\n\t\t\t\t\t\t\tmodal.returnTo.focus();\r\n\t\t\t\t\t\t\tconst index = _.findLastIndex(this.modals, (m) => { return m.state === ModalState.SHOW; });\r\n\t\t\t\t\t\t\tthis.current = index >= 0 ? index : 0;\r\n\t\t\t\t\t\t\tthis.ready = true;\r\n\t\t\t\t\t\t\tthis._process();\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tthis.ready = false;\r\n\t\t\t\t\t\t$(modal.actualId).modal('hide');\r\n\t\t\t\t\t} else if (this.modals[this.current].state === ModalState.SHOW) {\r\n\t\t\t\t\t\tconst modal = this.modals[this.current];\r\n\t\t\t\t\t\tmodal.returnTo = $(\":focus\").first();\r\n\t\t\t\t\t\tmodal.state = ModalState.SHOWN;\r\n\r\n\t\t\t\t\t\tif (modal.version === 2) {\r\n\t\t\t\t\t\t\tconst element = $(`#modal-container`).html(modal.html);\r\n\t\t\t\t\t\t\tthis.$compile(element.contents() as any)(modal.$scope);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$(modal.actualId).one('shown.bs.modal', (e) => {\r\n\t\t\t\t\t\t\t$(modal.actualId).find(\"a, button, input, select, textarea\").first().focus();\r\n\r\n\t\t\t\t\t\t\tthis.ready = true;\r\n\t\t\t\t\t\t\tthis._process();\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tthis.ready = false;\r\n\t\t\t\t\t\t$(modal.actualId).modal('show');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} \r\n }\r\n}","namespace Portico.Services {\r\n import models = Portico.Models.Pdf;\r\n import Inject = Portico.Decorators.Inject;\r\n import interfaces = Portico.Models.Interfaces;\r\n import Service = Portico.Decorators.Service;\r\n\r\n export interface IPdfService {\r\n createDocumentServicePdf(request: models.AddDocumentRequestModel): angular.IPromise;\r\n createDocumentServicePdfFromSimpleDictionary(programId: number, key: string, contentDictionary: {}): angular.IPromise;\r\n createHTMLDocumentServicePdf(request: models.AddDocumentRequestModel): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'pdfService')\r\n @Inject('$q', 'apiService', 'dataService', 'serverConstants', 'storageService')\r\n export class PdfService implements IPdfService {\r\n constructor(\r\n private $q: angular.IQService,\r\n private apiService: IApiService,\r\n private dataService: IDataService,\r\n public serverConstants: interfaces.IServerConstants,\r\n private storageService: IStorageService\r\n ) { }\r\n\r\n createDocumentServicePdf(request: models.AddDocumentRequestModel): angular.IPromise {\r\n const endpoint = `/pdfdocument`;\r\n\r\n return this.apiService.searchItem(endpoint, request);\r\n }\r\n\r\n createDocumentServicePdfFromSimpleDictionary(programId: number, key: string, contentDictionary: {}): angular.IPromise {\r\n const endpoint = `/pdfdocument`;\r\n\r\n const template = this.dataService.getDataValue('PDF', 'Template', key).replace('{{$app.serverConstants.contentPath}}', this.serverConstants.contentPath);\r\n const fileName = this.dataService.getDataValue('PDF', 'Filename', key);\r\n let pdfContents = JSON.parse(this.dataService.getDataValue('PDF', 'Contents', key));\r\n\r\n pdfContents = pdfContents.map(pdfContent => {\r\n pdfContent.content = contentDictionary[pdfContent.content];\r\n return pdfContent;\r\n });\r\n\r\n var request: models.AddDocumentRequestModel = {\r\n programId,\r\n pdfRequest: {\r\n fileName,\r\n template,\r\n pdfContents\r\n }\r\n };\r\n\r\n return this.apiService.searchItem(endpoint, request);\r\n }\r\n createHTMLDocumentServicePdf(request: models.AddDocumentRequestModel): angular.IPromise {\r\n const endpoint = `/pdfdocumenthtml`;\r\n\r\n return this.apiService.searchItem(endpoint, request);\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n export interface IPorticoEvents {\r\n loggedOutEvent(): void;\r\n unauthorizedEvent(): void;\r\n addDelegate(eventName: string, func): void;\r\n removeDelegate(eventName): void;\r\n }\r\n\r\n export type Delegate = () => void;\r\n \r\n @Service('app', 'porticoEvents')\r\n @Inject('$rootScope')\r\n export class PorticoEvents implements IPorticoEvents {\r\n private callbacks: Delegate[];\r\n\r\n constructor(protected $rootScope: ng.IRootScopeService) {\r\n this.callbacks = [] as Delegate[];\r\n this.init(this);\r\n }\r\n \r\n // Events that can be fired\r\n public loggedOutEvent(): void {\r\n this.$rootScope.$broadcast('loggedOutEvent');\r\n }\r\n\r\n public unauthorizedEvent(): void {\r\n this.$rootScope.$broadcast('unauthorizedEvent');\r\n }\r\n\r\n // Methods for registering and unregistering event callbacks\r\n public addDelegate(eventName: string, func: Delegate): void {\r\n if (this.callbacks[eventName] === undefined) {\r\n throw \"the value provided for argument [eventName] is not a valid event.\";\r\n }\r\n\r\n if (typeof func !== 'function') {\r\n throw \"argument [func] does not contain a method\";\r\n }\r\n\r\n this.callbacks[eventName] = this.$rootScope.$on(eventName, () => {\r\n func();\r\n });\r\n }\r\n\r\n public removeDelegate(eventName: symbol): void {\r\n if (this.callbacks[eventName] === undefined) {\r\n throw \"the value provided for argument [eventName] is not a valid event.\";\r\n }\r\n\r\n this.callbacks[eventName]();\r\n }\r\n\r\n private init(obj: PorticoEvents): void {\r\n //debugger;\r\n const classMembers = Object.getOwnPropertyNames(Object.getPrototypeOf(obj))\r\n .filter(i => {\r\n return i.indexOf('Event') > -1;\r\n });\r\n\r\n classMembers.forEach(value => {\r\n if (typeof this[value] === 'function') {\r\n this.callbacks[value] = null;\r\n }\r\n });\r\n }\r\n }\r\n}\r\n","namespace Portico.Services {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\timport pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pms = Portico.Models.Setup;\r\n\timport ps = Portico.Services;\r\n\r\n\texport interface IPorticoService {\r\n\t\t$log: angular.ILogService,\r\n\t\tauthenticationService: ps.IAuthenticationService;\r\n\t\tauthorizationService: ps.IAuthorizationService;\r\n\t\tcouponService: ps.ICouponService,\r\n\t\tdataService: ps.IDataService;\r\n\t\tdemoService: ps.IDemoService;\r\n\t\tenterpriseService: ps.IEnterpriseService;\r\n\t\tlegacyService: ps.Legacy.IPorticoLegacyService;\r\n\t\tmodalService: ps.IModalService;\r\n\t\ttoastrService: ps.IToastrService;\r\n\t\tsetupService: ps.ISetupService;\r\n\t\tpdfService: ps.IPdfService;\r\n\t\tsessionService: ps.ISessionService;\r\n\t\tsessionDetailService: ps.ISessionDetailService;\r\n\t\tstorageService: ps.IStorageService;\r\n\t\tserverConstants: pm.Interfaces.IServerConstants;\r\n\r\n\t\t// data initialization functions\r\n\t\t/** @deprecated */\r\n\t\tinitDataTables(): void;\r\n\t\t/** @deprecated */\r\n\t\tinitDataTypes(): void;\r\n\t\t/** @deprecated */\r\n\t\tinitDemos(): void;\r\n\t\t/** @deprecated */\r\n\t\tinitDiagnoses(): void;\r\n\t\t/** @deprecated */\r\n\t\tinitIntakeLayout(params?: string): void;\r\n\t\t/** @deprecated */\r\n\t\tinitLayoutSection(): void;\r\n\t\t/** @deprecated */\r\n\t\tinitNdcs(): void;\r\n\t\t/** @deprecated */\r\n\t\tinitPortal(): void;\r\n\t\t/** @deprecated */\r\n\t\tinitStates(key?: string): void;\r\n\t\t/** @deprecated */\r\n\t\tinitSurveys(key?: string): void;\r\n\t\t/** @deprecated */\r\n\t\tinitTemplates(): void;\r\n\t\trefresh(key: string): void;\r\n\r\n\t\t// data manipulation functions\r\n\t\tcopy(source: any, target: any): void;\r\n\r\n\t\t// state transition functions\r\n\t\tpage(name: string, options?: any): void;\r\n\t\tsection(name: string, options?: any): void;\r\n\t\tstate(app: string, layout: string, page: string, intake?: string, section?: string, options?: any): void;\r\n\r\n\t\t// account functions\r\n\t\taccount_surveySession_get(account: pme.Account, survey: number | string): pme.SurveySession;\r\n\t\taccount_surveySession_answer_get(account: pme.Account, survey: number | string, question: number | string): pme.SurveySessionAnswer;\r\n\t\taccount_surveySession_answer_getValue(account: pme.Account, survey: number | string, question: number | string): string;\r\n\t\taccount_surveySession_answers_get(account: pme.Account, survey: number | string, question: number | string): pme.SurveySessionAnswer[];\r\n\t\taccount_surveySession_answers_getValues(account: pme.Account, surveyKey: number | string, questionKey: number | string): string[];\r\n\t\taccount_surveySession_answers_set(account: pme.Account, survey: number | string, question: number | string, answers: (number | string)[], value: string): void;\r\n\t\taccount_surveySession_answers_test(account: pme.Account, survey: number | string, question: number | string, answer: number | string): boolean;\r\n\r\n\t\t// document functions\r\n\t\tdocument_createPdfFromAccount(account: pme.Account): angular.IPromise;\r\n\r\n\t\t// email functions\r\n\t\temail_feedback(feedbackRequest: pme.FeedbackRequest): angular.IPromise;\r\n\r\n\t\t// intakeLayout functions\r\n\t\tintakeLayout_get(key?: number | string): angular.IPromise;\r\n\t\tintakeLayout_layoutSection_get(intakeLayout: pme.IntakeLayout, name: string): angular.IPromise;\r\n\t\tintakeLayout_survey_populate(intakeLayout: pme.IntakeLayout): angular.IPromise;\r\n\r\n\t\t// location functions\r\n\t\tlocation_states_get(key?: string): angular.IPromise;\r\n\r\n\t\t// survey functions\r\n\t\tsurvey_get(key: number | string): angular.IPromise;\r\n\r\n\t\t// dom manipulation functions\r\n\t\tcolor(hex: string, percent?: number): string;\r\n\t\telementShow(id: string, show: boolean): void;\r\n\t}\r\n\r\n\t// temporarily renamed portico service; created data service to avoid circular injection issues\r\n\t@Service('app', 'porticoService')\r\n\t@Inject('$log', '$q', '$rootScope', '$state', 'Upload', 'authenticationService', 'authorizationService', 'couponService', 'dataService', 'demoService', 'enterpriseService', 'modalService', 'toastrService',\r\n\t\t'serverConstants', 'setupService', 'porticoLegacyService', 'errorService', 'spinnerOverrideService',\r\n\t\t'pdfService', 'storageService', 'sessionService', 'sessionDetailService')\r\n\texport class PorticoService implements IPorticoService {\r\n\r\n\t\tprivate serviceName: string = 'Portico.Services.Legacy.LegacyService';\r\n\r\n\t\tconstructor(\r\n\t\t\tpublic $log: angular.ILogService,\r\n\t\t\tprivate $q: angular.IQService,\r\n\t\t\tprivate $rootScope: angular.IRootScopeService,\r\n\t\t\tprivate $state: angular.ui.IStateService,\r\n\t\t\tprivate $upload: any,\r\n\t\t\tpublic authenticationService: ps.IAuthenticationService,\r\n\t\t\tpublic authorizationService: ps.IAuthorizationService,\r\n\t\t\tpublic couponService: ps.ICouponService,\r\n\t\t\tpublic dataService: ps.IDataService,\r\n\t\t\tpublic demoService: ps.IDemoService,\r\n\t\t\tpublic enterpriseService: ps.IEnterpriseService,\r\n\t\t\tpublic modalService: ps.IModalService,\r\n\t\t\tpublic toastrService: ps.IToastrService,\r\n\t\t\tpublic serverConstants: pmi.IServerConstants,\r\n\t\t\tpublic setupService: ps.ISetupService,\r\n\t\t\tpublic legacyService: ps.Legacy.IPorticoLegacyService,\r\n\t\t\tpublic errorService: ps.ErrorService,\r\n\t\t\tpublic spinnerOverrideService: ps.ISpinnerOverrideService,\r\n\t\t\tpublic pdfService: ps.IPdfService,\r\n\t\t\tpublic storageService: ps.IStorageService,\r\n\t\t\tpublic sessionService: ps.ISessionService,\r\n\t\t\tpublic sessionDetailService: ps.ISessionDetailService\r\n\t\t) { }\r\n\r\n\r\n\t\t///////////////////////////////////\r\n\t\t// data initialization functions //\r\n\t\t///////////////////////////////////\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitDataTables() {\r\n\t\t\treturn this.setupService.dataTableService.get().then((dataTables) => {\r\n\t\t\t\tthis.dataService.setup.dataTables = dataTables;\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitDataTypes() {\r\n\t\t\treturn this.setupService.dataTypeService.get().then((dataTypes) => {\r\n\t\t\t\tthis.dataService.setup.dataTypes = dataTypes;\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitDemos() {\r\n\t\t\treturn this.setupService.portalService.getByPortalGroupId(pm.PORTAL_GROUP_DEMO).then((portals) => {\r\n\t\t\t\tthis.dataService.setup.demos = portals;\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitDiagnoses() {\r\n\t\t\treturn this.enterpriseService.diagnosisService.getByProgramId().then((diagnoses) => {\r\n\t\t\t\tthis.dataService.enterprise.diagnoses = diagnoses;\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitIntakeLayout(key: string = null) {\r\n\t\t\tif (key) {\r\n\t\t\t\tlet json = this.dataService.getDataValue('Reference', 'Id', key);\r\n\t\t\t\tlet intakeLayout = angular.fromJson(json);\r\n\t\t\t\tthis.dataService.enterprise.intakeLayout = new pme.IntakeLayout(intakeLayout);\r\n\t\t\t} else {\r\n\t\t\t\tconst intake = this.dataService.state.intake;\r\n\t\t\t\tconst intakeLayoutId = this.dataService.getEnvironmentId(`intake-${intake}`);\r\n\t\t\t\tconst programId = this.dataService.getProgramId();\r\n\r\n\t\t\t\treturn this.enterpriseService.intakeService.getIntakeLayout(programId, intakeLayoutId).then((intakeLayout: pme.IntakeLayout) => {\r\n\t\t\t\t\tthis.dataService.enterprise.intakeLayout = intakeLayout;\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitLayoutSection() {\r\n\t\t\tconst section = this.dataService.state.section;\r\n\t\t\tconst intakeLayout = this.dataService.enterprise.intakeLayout;\r\n\t\t\tconst layoutSection = intakeLayout.getLayoutSection(section);\r\n\r\n\t\t\tthis.dataService.enterprise.layoutSection = layoutSection;\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitNdcs() {\r\n\t\t\tconst programId = this.dataService.getProgramId();\r\n\r\n\t\t\treturn this.enterpriseService.prescriptionService.getNdcList(programId).then((ndcs) => {\r\n\t\t\t\tthis.dataService.enterprise.ndcs = ndcs;\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitPortal() {\r\n\t\t\tconst portalId = this.serverConstants.portalId;\r\n\r\n\t\t\treturn this.setupService.portalService.getDetailsById(portalId).then((portal) => {\r\n\t\t\t\tthis.dataService.setup.portal = portal;\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitStates(key: string) {\r\n\t\t\tif (key) {\r\n\t\t\t\tlet json = this.dataService.getDataValue('Reference', 'Id', key);\r\n\t\t\t\tlet states: pme.State[] = angular.fromJson(json);\r\n\t\t\t\tthis.dataService.enterprise.states = states;\r\n\t\t\t} else {\r\n\t\t\t\treturn this.enterpriseService.locationService.getStates().then((states) => {\r\n\t\t\t\t\tthis.dataService.enterprise.states = states;\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitSurveys(key: string) {\r\n\t\t\tif (key) {\r\n\t\t\t\tconst json = this.dataService.getReferenceValue(key);\r\n\t\t\t\tconst survey = angular.fromJson(json);\r\n\r\n\t\t\t\tthis.dataService.enterprise.intakeLayout = new pme.IntakeLayout({\r\n\t\t\t\t\tsurveys: [survey]\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn this.$q.when(true);\r\n\t\t\t} else {\r\n\t\t\t\tconst intakeLayout = this.dataService.enterprise.intakeLayout;\r\n\t\t\t\tconst surveyPromises = [];\r\n\r\n\t\t\t\tintakeLayout.surveyIds.forEach((sid: number | string) => {\r\n\t\t\t\t\tconst id = this.dataService.getEnvironmentId(sid);\r\n\t\t\t\t\tsurveyPromises.push(this.enterpriseService.surveyService.get(id));\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn this.$q.all(surveyPromises).then((surveys: pme.Survey[]) => {\r\n\t\t\t\t\tintakeLayout.surveys = surveys;\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tinitTemplates() {\r\n\t\t\treturn this.setupService.dataGroupService.getByDataGroupTypeId(pm.DATA_GROUP_TYPE_TEMPLATE).then((dataGroups) => {\r\n\t\t\t\tthis.dataService.setup.templates = dataGroups;\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\trefresh(key: string): void {\r\n\t\t\tthis.$rootScope.$broadcast(`tc-refresh-${key}`);\r\n\t\t}\r\n\r\n\t\t/////////////////////////////////\r\n\t\t// data manipulation functions //\r\n\t\t/////////////////////////////////\t\r\n\r\n\t\tcopy(source: any, target: any): void {\r\n\t\t\tangular.copy(source, target);\r\n\t\t}\r\n\r\n\t\t////////////////////////////////\r\n\t\t// state transition functions //\r\n\t\t////////////////////////////////\r\n\r\n\t\tpage(name: string, options: any = null) {\r\n\t\t\tthis.state(null, null, name, null, null, options);\r\n\t\t}\r\n\r\n\t\tsection(name: string, options: any = null) {\r\n\t\t\tthis.state(null, null, null, null, name, options);\r\n\t\t}\r\n\r\n\t\tstate(app: string, layout: string, page: string, intake: string = null, section: string = null, options: any = null) {\r\n\t\t\tlet name: string = 'app.layout.page';\r\n\t\t\tlet params: any = options ? options : {};\r\n\r\n\t\t\tparams.app = app ? app : this.dataService.state.app;\r\n\t\t\tparams.layout = layout ? layout : this.dataService.state.layout;\r\n\t\t\tparams.page = page ? page : this.dataService.state.page;\r\n\r\n\t\t\tif (section) {\r\n\t\t\t\tname += '.intake.section';\r\n\t\t\t\tparams.intake = intake ? intake : this.dataService.state.intake;\r\n\t\t\t\tparams.section = section ? section : this.dataService.state.section;\r\n\r\n\t\t\t\tconst intakeLayout = this.dataService.enterprise.intakeLayout;\r\n\r\n\t\t\t\tif (intakeLayout) {\r\n\t\t\t\t\tconst layoutSection = intakeLayout.getLayoutSection(params.section, this.dataService.state.section);\r\n\r\n\t\t\t\t\tif (layoutSection) {\r\n\t\t\t\t\t\tparams.section = layoutSection.name;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (angular.isUndefined(params.ppid)) { params.ppid = null; }\r\n\t\t\tif (angular.isUndefined(params.psid)) { params.psid = null; }\r\n\t\t\tif (angular.isUndefined(params.spid)) { params.spid = null; }\r\n\t\t\tif (angular.isUndefined(params.ssid)) { params.ssid = null; }\r\n\t\t\tif (angular.isUndefined(params.r2p)) { params.r2p = null; }\r\n\t\t\tif (angular.isUndefined(params.r2s)) { params.r2s = null; }\r\n\r\n\t\t\tthis.$state.go(name, params);\r\n\t\t}\r\n\r\n\r\n\r\n\t\t///////////////////////\r\n\t\t// account functions //\r\n\t\t///////////////////////\r\n\r\n\t\taccount_surveySession_get(account: pme.Account, survey: number | string): pme.SurveySession {\r\n\t\t\tconst surveyId = this.dataService.getEnvironmentId(survey);\r\n\t\t\treturn account ? account.getSurveySession(surveyId) : null;\r\n\t\t}\r\n\r\n\t\taccount_surveySession_answer_get(account: pme.Account, survey: number | string, question: number | string): pme.SurveySessionAnswer {\r\n\t\t\tconst answers = this.account_surveySession_answers_get(account, survey, question);\r\n\t\t\treturn answers && answers.length > 0 ? answers[0] : null;\r\n\t\t}\r\n\r\n\t\taccount_surveySession_answer_getValue(account: pme.Account, survey: number | string, question: number | string): string {\r\n\t\t\tconst values = this.account_surveySession_answers_getValues(account, survey, question);\r\n\t\t\treturn values && values.length > 0 ? values[0] : '';\r\n\t\t}\r\n\r\n\t\taccount_surveySession_answers_get(account: pme.Account, survey: number | string, question: number | string): pme.SurveySessionAnswer[] {\r\n\t\t\tconst surveySession = this.account_surveySession_get(account, survey);\r\n\t\t\tconst questionId = this.dataService.getEnvironmentId(question);\r\n\r\n\t\t\treturn surveySession ? surveySession.getSurveySessionAnswers(questionId) : null;\r\n\t\t}\r\n\r\n\t\taccount_surveySession_answers_getValues(account: pme.Account, surveyKey: number | string, questionKey: number | string): string[] {\r\n\t\t\tconst surveyId = this.dataService.getEnvironmentId(surveyKey);\r\n\t\t\tconst survey: pme.Survey = _.find(this.dataService.enterprise.intakeLayout.surveys, (s) => { return s.surveyId === surveyId; });\r\n\t\t\tconst surveySession = this.account_surveySession_get(account, surveyId);\r\n\t\t\tconst questionId = this.dataService.getEnvironmentId(questionKey);\r\n\t\t\tconst answers = surveySession ? surveySession.getSurveySessionAnswers(questionId) : [];\r\n\r\n\t\t\treturn answers.map((answer) => {\r\n\t\t\t\tlet answerValue = answer.answerValue;\r\n\r\n\t\t\t\tif (!answerValue) {\r\n\t\t\t\t\tconst temp = survey.getSurveyAnswer(answer.questionId, answer.answerId);\r\n\r\n\t\t\t\t\tif (temp) {\r\n\t\t\t\t\t\tanswerValue = temp.answerValue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn answerValue;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\taccount_surveySession_answers_set(account: pme.Account, survey: number | string, question: number | string, answers: (number | string)[], value: string): void {\r\n\t\t\tconst surveyId = this.dataService.getEnvironmentId(survey);\r\n\t\t\tconst surveySession = account.getSurveySession(surveyId);\r\n\t\t\tconst questionId = this.dataService.getEnvironmentId(question);\r\n\t\t\tconst answerIds = answers.map((answer) => {\r\n\t\t\t\treturn this.dataService.getEnvironmentId(answer);\r\n\t\t\t});\r\n\r\n\t\t\tif (surveySession) {\r\n\t\t\t\tsurveySession.setSurveySessionAnswers(questionId, answerIds, value);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Sets the type(s) of program for which member numbers should be generated (medical, pharmacy, hub)\r\n\t\taccount_surveySession_answers_setProgramType(account: pme.Account, programType: string): void {\r\n\t\t\tconst cardTypes = JSON.parse(this.dataService.getEnvironmentValue(programType + '-card-types'));\r\n\t\t\tthis.account_surveySession_answers_set(account, 'survey-' + programType, 'survey-' + programType + '-card-type', cardTypes, null);\r\n\t\t}\r\n\r\n\t\taccount_surveySession_answers_test(account: pme.Account, survey: number | string, question: number | string, answer: number | string): boolean {\r\n\t\t\tconst surveySession = this.account_surveySession_get(account, survey);\r\n\t\t\tconst questionId = this.dataService.getEnvironmentId(question);\r\n\t\t\tconst answerId = this.dataService.getEnvironmentId(answer);\r\n\r\n\t\t\treturn surveySession ? surveySession.isSurveySessionAnswer(questionId, answerId) : null;\r\n\t\t}\r\n\r\n\t\t////////////////////////\r\n\t\t// document functions //\r\n\t\t////////////////////////\r\n\r\n\t\tdocument_createPdfFromAccount(account: pme.Account): angular.IPromise {\r\n\t\t\tconst now = new Date().toJSON();\r\n\t\t\tconst documentData: { [key: string]: string } = {};\r\n\t\t\tconst documentName = now + '.pdf';\r\n\t\t\tconst portalName = this.dataService.setup.portal.name;\r\n\r\n\t\t\tdocumentData.FirstName = _.get(account, 'patient.firstName', '');\r\n\t\t\tdocumentData.LastName = _.get(account, 'patient.lastName', '');\r\n\t\t\tdocumentData.Contact_First_Name = _.get(account, 'patient.contact[0].firstName', '');\r\n\t\t\tdocumentData.Contact_Last_Name = _.get(account, 'patient.contact[0].lastName', '');\r\n\t\t\tdocumentData.Contact_Type = _.get(account, 'patient.contact[0].type', '');\r\n\t\t\taccount.patient.addresses.forEach((address, index) => {\r\n\t\t\t\tdocumentData[`Patient_Address_${index}_Line_1`] = _.get(account, `patient.addresses[${index}].address1`, '');\r\n\t\t\t\tdocumentData[`Patient_Address_${index}_Line_2`] = _.get(account, `patient.addresses[${index}].address2`, '');\r\n\t\t\t\tdocumentData[`Patient_Address_${index}_City`] = _.get(account, `patient.addresses[${index}].city`, '');\r\n\t\t\t\tdocumentData[`Patient_Address_${index}_State`] = _.get(account, `patient.addresses[${index}].state`, '');\r\n\t\t\t\tdocumentData[`Patient_Address_${index}_Zip`] = _.get(account, `patient.addresses[${index}].zip`, '');\r\n\t\t\t\tdocumentData[`Patient_Address_${index}_Country`] = _.get(account, `patient.addresses[${index}].country`, '');\r\n\t\t\t});\r\n\t\t\tdocumentData.Sex = _.get(account, 'patient.gender', '');\r\n\t\t\tdocumentData.DOB = _.get(account, 'patient.dateOfBirth', '');\r\n\t\t\taccount.patient.phoneNumbers.forEach((phoneNumber, index) => {\r\n\t\t\t\tdocumentData[`Patient_Phone_Number_${index}`] = _.get(account, `patient.phoneNumbers[${index}].number`, '');\r\n\t\t\t});\r\n\t\t\taccount.patient.emailAddresses.forEach((emailAddress, index) => {\r\n\t\t\t\tdocumentData[`Patient_Email_Address_${index}`] = _.get(account, `patient.emailAddresses[${index}].address`, '');\r\n\t\t\t});\r\n\t\t\tdocumentData.MemberNumber = _.get(this.dataService.session, 'memberNumber', '');\r\n\r\n\t\t\tdocumentData.CreateDate = now;\r\n\r\n\t\t\tconst surveys: pme.Survey[] = this.dataService.enterprise.intakeLayout.surveys || [];\r\n\r\n\t\t\tfor (let survey of surveys) {\r\n\t\t\t\tconst surveyId = this.dataService.getEnvironmentId(survey.surveyId);\r\n\r\n\t\t\t\tfor (let question of survey.surveyQuestions) {\r\n\t\t\t\t\tconst questionId = this.dataService.getEnvironmentId(question.questionId);\r\n\t\t\t\t\tconst text = question.questionText;\r\n\t\t\t\t\tconst surveySession = account.getSurveySession(surveyId);\r\n\t\t\t\t\tconst answers = surveySession.getSurveySessionAnswers(questionId) || [];\r\n\t\t\t\t\tlet concatvalue = '';\r\n\r\n\t\t\t\t\tfor (let answer of answers) {\r\n\t\t\t\t\t\tconcatvalue += (answer.answerValue ? answer.answerValue : survey.getSurveyAnswer(answer.questionId, answer.answerId).answerValue) + '\\n';\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdocumentData[text] = concatvalue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn this.enterpriseService.documentService.createPdf(documentName, documentData, portalName);\r\n\t\t}\r\n\r\n\t\t/////////////////////\r\n\t\t// email functions //\r\n\t\t/////////////////////\r\n\r\n\t\temail_feedback(feedbackRequest: pme.FeedbackRequest): angular.IPromise {\r\n\t\t\tconst email = this.dataService.getDataValue('EmailTemplate', 'Email', 'Feedback');\r\n\t\t\tconst firstName = this.dataService.getDataValue('EmailTemplate', 'FirstName', 'Feedback') || '';\r\n\t\t\tconst lastName = this.dataService.getDataValue('EmailTemplate', 'LastName', 'Feedback') || '';\r\n\t\t\tconst template = this.dataService.getDataValue('EmailTemplate', 'Template', 'Feedback');\r\n\r\n\t\t\tconst emailRequest: pme.EmailRequest = {\r\n\t\t\t\tparameters: 'TYPE=' + encodeURI(feedbackRequest.type) + '&' +\r\n\t\t\t\t\t'SUBJECT=' + encodeURI(feedbackRequest.subject) + '&' +\r\n\t\t\t\t\t'BODY=' + encodeURI(feedbackRequest.body) + '&' +\r\n\t\t\t\t\t'CAN_CONTACT=' + encodeURI(feedbackRequest.canContact),\r\n\t\t\t\trecipientAddress: email,\r\n\t\t\t\trecipientFirstName: firstName,\r\n\t\t\t\trecipientLastName: lastName,\r\n\t\t\t\tsenderAddress: feedbackRequest.email,\r\n\t\t\t\tsenderName: feedbackRequest.name,\r\n\t\t\t\ttemplaterName: template\r\n\t\t\t};\r\n\r\n\t\t\treturn this.enterpriseService.emailService.send(emailRequest);\r\n\t\t}\r\n\r\n\t\t////////////////////////////\r\n\t\t// intakeLayout functions //\r\n\t\t////////////////////////////\r\n\r\n\t\tintakeLayout_get(key: number | string = null): angular.IPromise {\r\n\t\t\tif (typeof key === 'string') {\r\n\t\t\t\tconst json = this.dataService.getReferenceValue(key);\r\n\t\t\t\tconst temp = angular.fromJson(json);\r\n\t\t\t\tconst intakeLayout = new pme.IntakeLayout(temp);\r\n\r\n\t\t\t\treturn this.$q.when(intakeLayout);\r\n\t\t\t}\r\n\r\n\t\t\tconst programId = this.dataService.getProgramId();\r\n\r\n\t\t\treturn this.enterpriseService.intakeService.getIntakeLayout(programId, key);\r\n\t\t}\r\n\r\n\t\tintakeLayout_layoutSection_get(intakeLayout: pme.IntakeLayout, name: string): angular.IPromise {\r\n\t\t\tconst layoutSection = intakeLayout.getLayoutSection(name);\r\n\r\n\t\t\treturn this.$q.when(layoutSection);\r\n\t\t}\r\n\r\n\t\tintakeLayout_survey_populate(intakeLayout: pme.IntakeLayout): angular.IPromise {\r\n\t\t\tconst surveyPromises = [];\r\n\r\n\t\t\tintakeLayout.surveyIds.forEach((sid: number | string) => {\r\n\t\t\t\tconst id = this.dataService.getEnvironmentId(sid);\r\n\t\t\t\tsurveyPromises.push(this.enterpriseService.surveyService.get(id));\r\n\t\t\t});\r\n\r\n\t\t\treturn this.$q.all(surveyPromises).then((surveys: pme.Survey[]) => {\r\n\t\t\t\tintakeLayout.surveys = surveys;\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t////////////////////////\r\n\t\t// location functions //\r\n\t\t////////////////////////\r\n\r\n\t\tlocation_states_get(key: string = null): angular.IPromise {\r\n\t\t\tif (key) {\r\n\t\t\t\tconst json = this.dataService.getReferenceValue(key);\r\n\t\t\t\tconst temp = angular.fromJson(json);\r\n\t\t\t\tconst states: pme.State[] = [];\r\n\r\n\t\t\t\tfor (const state of temp) {\r\n\t\t\t\t\tstates.push(new pme.State(state));\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn this.$q.when(states);\r\n\t\t\t}\r\n\r\n\t\t\treturn this.enterpriseService.locationService.getStates();\r\n\t\t}\r\n\r\n\t\t//////////////////////\r\n\t\t// survey functions //\r\n\t\t//////////////////////\r\n\r\n\t\tsurvey_get(key: number | string): angular.IPromise {\r\n\t\t\tif (typeof key === 'string') {\r\n\t\t\t\tconst json = this.dataService.getReferenceValue(key);\r\n\t\t\t\tconst temp = angular.fromJson(json);\r\n\t\t\t\tconst survey = new pme.Survey(temp);\r\n\r\n\t\t\t\treturn this.$q.when(survey);\r\n\t\t\t}\r\n\r\n\t\t\treturn this.enterpriseService.surveyService.get(key);\r\n\t\t}\r\n\r\n\t\t//////////////////////\r\n\t\t// toastr functions //\r\n\t\t//////////////////////\r\n\r\n\t\taddToastr(type: string, title: string, content: string, options: any = null) {\r\n\t\t\tthis.toastrService.add(type, title, content, options);\r\n\t\t}\r\n\r\n\t\tclearLastToastr() {\r\n\t\t\tthis.toastrService.removeLast();\r\n\t\t}\r\n\r\n\t\tclearAllToastr() {\r\n\t\t\tthis.toastrService.clearAll();\r\n\t\t}\r\n\r\n\t\t////////////////////////////////\r\n\t\t// dom manipulation functions //\r\n\t\t////////////////////////////////\r\n\r\n\t\tcolor(hex: string, percent: number = 0): string {\r\n\t\t\tif (hex.charAt(0) !== '#') {\r\n\t\t\t\thex = this.dataService.getDataValue('Reference', 'Id', hex, '#FFFFFF');\r\n\t\t\t}\r\n\r\n\t\t\tlet r = parseInt(hex.substring(1, 3), 16);\r\n\t\t\tlet g = parseInt(hex.substring(3, 5), 16);\r\n\t\t\tlet b = parseInt(hex.substring(5, 7), 16);\r\n\r\n\t\t\tpercent = Math.max(-1, Math.min(1, percent));\r\n\r\n\t\t\tif (percent <= 0) {\r\n\t\t\t\tr = r * (1 + percent);\r\n\t\t\t\tg = g * (1 + percent);\r\n\t\t\t\tb = b * (1 + percent);\r\n\t\t\t} else {\r\n\t\t\t\tr = r + ((255 - r) * percent);\r\n\t\t\t\tg = g + ((255 - g) * percent);\r\n\t\t\t\tb = b + ((255 - b) * percent);\r\n\t\t\t}\r\n\r\n\t\t\tlet rh = '0' + Math.floor(r).toString(16);\r\n\t\t\tlet gh = '0' + Math.floor(g).toString(16);\r\n\t\t\tlet bh = '0' + Math.floor(b).toString(16);\r\n\r\n\t\t\treturn \"#\" + rh.substr(-2, 2) + gh.substr(-2, 2) + bh.substr(-2, 2);\r\n\t\t}\r\n\r\n\t\telementShow(id: string, show: boolean): void {\r\n\t\t\tif (show) {\r\n\t\t\t\t$(id).removeClass('hide');\r\n\t\t\t} else {\r\n\t\t\t\t$(id).addClass('hide');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tprivate handleError(error: any, methodName: string): ng.IPromise {\r\n\t\t\tthis.errorService.handleError(new Portico.Models.PorticoException(`[${methodName}]`, error));\r\n\t\t\treturn this.$q.reject(error);\r\n\t\t}\r\n\t}\r\n}","namespace Portico.Services {\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n import models = Portico.Models;\r\n\r\n export interface ISessionDetailService {\r\n getSessionDetail(jwt: string): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'sessionDetailService')\r\n @Inject('$http', '$q', 'storageService', 'dataService', 'serverConstants', 'modalService')\r\n export class SessionDetailService implements ISessionDetailService {\r\n private endPoint = '/api/Session';\r\n private jwtTokenName;\r\n\r\n constructor(protected $http: ng.IHttpService,\r\n protected $q: ng.IQService,\r\n protected storageService: Portico.Services.IStorageService,\r\n protected dataService: Portico.Services.IDataService,\r\n protected serverConstants: Portico.Models.Interfaces.IServerConstants,\r\n protected modalService: Portico.Services.IModalService,\r\n ) {\r\n this.$http.defaults.headers.common['accept'] = 'application/json';\r\n this.$http.defaults.headers.common[\"X-Requested-With\"] = 'XMLHttpRequest';\r\n }\r\n\r\n public getSessionDetail(jwt: string): angular.IPromise {\r\n // this.modalService.show('spinner');\r\n document.getElementById('global-spinner-overlay').style.display = 'flex';\r\n\r\n const promise = jwt ?\r\n this.$http.post(this.endPoint, `\"${jwt}\"` ) :\r\n this.$q.when(null);\r\n\r\n return promise.then((response: angular.IHttpPromiseCallbackArg) => {\r\n return response.data || null;\r\n\r\n }).finally(() => {\r\n // this.modalService.hide('spinner');\r\n document.getElementById('global-spinner-overlay').style.display = 'none';\r\n });\r\n\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n export interface ISpinnerOverrideService {\r\n withoutUntil(action: () => ng.IPromise): ng.IPromise;\r\n }\r\n\r\n @Service('app', 'spinnerOverrideService')\r\n @Inject('$rootScope')\r\n class SpinnerOverrideService implements ISpinnerOverrideService {\r\n constructor(private $rootScope: ng.IRootScopeService) { }\r\n\r\n withoutUntil(action: () => ng.IPromise): ng.IPromise {\r\n (this.$rootScope as any).spinnerDisabled = true;\r\n return action().finally(() => (this.$rootScope as any).spinnerDisabled = false);\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\timport pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pms = Portico.Models.Setup;\r\n\timport ps = Portico.Services;\r\n\r\n export interface IInnerStorageService {\r\n\t\t$default(items: {}): IInnerStorageService;\r\n\t\t$reset(items?: {}): IInnerStorageService;\r\n $apply(): void;\r\n $sync(): void;\r\n get(key: string): T;\r\n }\r\n\r\n\texport interface IStorageProvider extends angular.IServiceProvider, IInnerStorageService {\r\n get(key: string): T;\r\n set(key: string, value: T): T;\r\n\r\n setKeyPrefix(prefix: string): void;\r\n setSerializer(serializer: (value: any) => string): void;\r\n setDeserializer(deserializer: (value: string) => any): void;\r\n }\r\n\r\n export interface IStorageService {\r\n getItem: (storageType: pm.StorageType, key: string) => T;\r\n saveItem: (storageType: pm.StorageType, key: string, value: T) => void;\r\n deleteItem: (storageType: pm.StorageType, key: string) => void;\r\n }\r\n\r\n @Service('app', 'storageService')\r\n\t@Inject('$localStorage', '$sessionStorage', 'dataService')\r\n export class StorageService implements IStorageService {\r\n\t\t/* istanbul ignore next */\r\n\t\tconstructor(\r\n\t\t\tprivate $localStorage: IStorageProvider,\r\n\t\t\tprivate $sessionStorage: IStorageProvider,\r\n\t\t\tprivate dataService: ps.IDataService\r\n ) { }\r\n\r\n\t\tgetItem(storageType: pm.StorageType, key: string): T {\r\n\t\t\t// skip when in debug or nocache mode (workaround for this.$state.params['app'])\r\n\t\t\tif (this.dataService.session.mode === 'debug' || this.dataService.session.mode === 'nocache') {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n const storageProvider = this.getStorageProvider(storageType);\r\n\r\n return storageProvider.hasOwnProperty(key) ? storageProvider[key] as T : null;\r\n }\r\n\r\n\t\tsaveItem(storageType: pm.StorageType, key: string, value: T): void {\r\n\t\t\t// skip when in debug or nocache mode\r\n\t\t\tif (this.dataService.session.mode === 'debug' || this.dataService.session.mode === 'nocache') {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n const storageProvider = this.getStorageProvider(storageType);\r\n\r\n storageProvider[key] = value;\r\n }\r\n\r\n\t\tdeleteItem(storageType: pm.StorageType, key: string): void {\r\n\t\t\t// skip when in debug or nocache mode\r\n\t\t\tif (this.dataService.session.mode === 'debug' || this.dataService.session.mode === 'nocache') {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n const storageProvider = this.getStorageProvider(storageType);\r\n\r\n if (storageProvider.hasOwnProperty(key)) {\r\n delete storageProvider[key];\r\n }\r\n }\r\n\r\n\t\tprivate getStorageProvider(storageType: pm.StorageType): IStorageProvider {\r\n switch (storageType) {\r\n\t\t\t\tcase pm.StorageType.Local:\r\n return this.$localStorage;\r\n\t\t\t\tcase pm.StorageType.Session:\r\n return this.$sessionStorage;\r\n default:\r\n return this.$sessionStorage;\r\n }\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n export interface IToastrService {\r\n add(type: string, title: string, content: string, options: any);\r\n removeLast();\r\n clearAll();\r\n }\r\n\r\n @Service('app', 'toastrService')\r\n @Inject('$rootScope')\r\n export class ToastrService implements IToastrService {\r\n list: Array>;\r\n last: JQuery;\r\n constructor() {\r\n this.list = [];\r\n this.last = null;\r\n }\r\n\r\n add(type: string, title: string, content: string, options: any) {\r\n if (options) {\r\n for (var option in options) {\r\n toastr.options[option] = options[option];\r\n }\r\n }\r\n let toast: JQuery = toastr[type](content, title);\r\n this.list.push(toast); \r\n this.last = toast;\r\n }\r\n\r\n removeLast() {\r\n if(this.list){\r\n toastr.clear(this.last);\r\n }\r\n }\r\n\r\n clearAll() {\r\n toastr.clear();\r\n } \r\n\r\n }\r\n}","namespace Portico.Services {\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n import Endpoints = Portico.Models.Interfaces;\r\n import IAccessToken = Portico.Models.Interfaces.IAccessToken;\r\n import ResponseModel = Portico.Models.Enterprise.ResponseModel;\r\n import IResponseModel = Portico.Models.Interfaces.IResponseModel;\r\n \r\n export interface ITokenService {\r\n requestToken(serviceDef: Endpoints.IServiceDefinition): ng.IPromise;\r\n }\r\n\r\n @Service('app', 'tokenService')\r\n @Inject('$http', '$q', 'storageService')\r\n export class TokenService implements ITokenService {\r\n private promiseCache = {};\r\n\r\n constructor(protected $http: ng.IHttpService,\r\n protected $q: ng.IQService,\r\n protected storageService: Portico.Services.StorageService) {\r\n\r\n this.$http.defaults.headers.common['accept'] = 'application/json';\r\n this.$http.defaults.headers.common[\"X-Requested-With\"] = 'XMLHttpRequest';\r\n }\r\n\r\n requestToken(serviceDef: Endpoints.IServiceDefinition): ng.IPromise {\r\n if (serviceDef.url.substr(-1) === '/') {\r\n serviceDef.url = serviceDef.url.substr(0, serviceDef.url.length - 1);\r\n }\r\n\r\n if (!serviceDef.audienceId) {\r\n return this.$q.when('');\r\n }\r\n\r\n const token = this.storageService.getItem(Models.StorageType.Session, serviceDef.storageKey);\r\n\r\n if (token) {\r\n if ((new Date(token.expiresOnUtc) <= new Date()) && this.promiseCache[serviceDef.audienceId] == undefined) {\r\n this.storageService.deleteItem(Models.StorageType.Session, serviceDef.storageKey);\r\n } else {\r\n return this.$q.when('Bearer ' + token.token);\r\n }\r\n }\r\n\r\n if (this.promiseCache[serviceDef.audienceId]) {\r\n return this.promiseCache[serviceDef.audienceId];\r\n }\r\n\r\n const config = { withCredentials: true };\r\n\r\n return this.promiseCache[serviceDef.audienceId] = this.$http.post>('/api/Token/' + serviceDef.audienceId, undefined, config)\r\n .then((response) => {\r\n var model = new ResponseModel(response.data);\r\n\r\n return model.success\r\n ? this.$q.when(model.data)\r\n : this.$q.reject(model.messages);\r\n })\r\n .then((accessToken: IAccessToken): ng.IPromise => {\r\n\r\n this.storageService.saveItem(Models.StorageType.Session, serviceDef.storageKey, accessToken);\r\n delete this.promiseCache[serviceDef.audienceId];\r\n\r\n return this.$q.when('Bearer ' + accessToken.token);\r\n });\r\n\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n import pme = Portico.Models.Enterprise;\r\n import ps = Portico.Services;\r\n import psga = apigateway.client;\r\n import psgm = apigateway.models;\r\n\r\n export interface IMemberNumberCodeResponse {\r\n code: number;\r\n }\r\n export class MemberNumberCodeResponse {\r\n code: number;\r\n constructor(obj?: IMemberNumberCodeResponse) {\r\n this.code = null;\r\n if (obj) {\r\n this.code = obj.code || null;\r\n }\r\n }\r\n }\r\n export interface MemberNumberCodeResponse extends psgm.CardMemberNumberStatusResultModel {}\r\n\r\n export interface ICouponService {\r\n basicEnrollment(\r\n programId: number,\r\n account: pme.Account,\r\n enrollment: pme.Enrollment\r\n ): angular.IPromise;\r\n getEnrollmentDetails(\r\n programId: number,\r\n patient: pme.Patient\r\n ): angular.IPromise;\r\n memberNumberStatus(\r\n programId: number,\r\n memberNumber: string\r\n ): angular.IPromise;\r\n verifySurveyAnswer(\r\n programId: number,\r\n surveyId: number,\r\n questionId: number,\r\n account: pme.Account\r\n ): angular.IPromise;\r\n verifySurveyAnswers(\r\n programId: number,\r\n surveyIds: number[],\r\n questionIds: number[],\r\n account: pme.Account\r\n ): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'couponService')\r\n @Inject(\r\n '$q',\r\n 'dataService',\r\n 'dateService',\r\n 'EdgeCouponApi',\r\n 'EnrollmentExtV2Api',\r\n 'CardExtV1Api'\r\n )\r\n export class CouponService implements ICouponService {\r\n constructor(\r\n private $q: angular.IQService,\r\n private dataService: ps.IDataService,\r\n private dateService: ps.IDateService,\r\n private edgeCouponApi: psga.EdgeCouponApi,\r\n private extEnrollmentApi: psga.EnrollmentExtV2Api,\r\n private extCardApi: psga.CardExtV1Api\r\n ) {}\r\n\r\n memberNumberStatus(\r\n programId: number,\r\n memberNumber: string\r\n ): angular.IPromise {\r\n if (\r\n this.dataService.session.mode === 'edit' ||\r\n this.dataService.session.mode === 'mock'\r\n ) {\r\n return this.$q.when(new MemberNumberCodeResponse());\r\n }\r\n\r\n return this.$q.when(this.extCardApi.memberNumberStatusGet(programId, memberNumber).then((response) => {\r\n const value = response.data.data;\r\n\r\n if (response.data.data.cardEndDate) {\r\n if (this.dateService.isAfter(response.data.data.cardEndDate)) {\r\n // expired\r\n value.code = LegacyCheckMNCodes.Expired;\r\n } else {\r\n // already active\r\n value.code = LegacyCheckMNCodes.Activated;\r\n }\r\n } else {\r\n // inactive -> proceed\r\n value.code = LegacyCheckMNCodes.Inactive;\r\n }\r\n\r\n return value;\r\n }));\r\n }\r\n\r\n getEnrollmentDetails(programId: number, patient: pme.Patient) {\r\n const { firstName, lastName, dateOfBirth } = patient;\r\n const request = {\r\n programId,\r\n firstName,\r\n lastName,\r\n dateOfBirth: moment(dateOfBirth)\r\n } as psgm.GetEnrollmentDetailsRequestModel;\r\n \r\n if (patient.addresses && patient.addresses.length > 0) {\r\n request.city = patient.addresses[0].city;\r\n request.state = patient.addresses[0].state;\r\n request.zip = patient.addresses[0].zip;\r\n }\r\n\r\n return this.$q.when(this.edgeCouponApi.couponGetEnrollmentDetails(request).then(response => {\r\n return response.data.data;\r\n }));\r\n }\r\n\r\n basicEnrollment(programId: number, account: pme.Account, enrollment: pme.Enrollment) {\r\n const accountSessions = account.accountSessions.filter(accountSession => {\r\n return !accountSession.id && accountSession.surveySession;\r\n });\r\n const surveySession =\r\n accountSessions && accountSessions.length > 0\r\n ? accountSessions[0].surveySession\r\n : null;\r\n\r\n const requestModel = {} as psgm.EnrollmentRequestModel;\r\n const mapper = new Mappers.SurveyMapper();\r\n\r\n requestModel.survey = mapper.toLegacy(surveySession);\r\n requestModel.demographics = mapper.toCouponDemographics(\r\n account,\r\n enrollment.memberNumber\r\n );\r\n\r\n requestModel.clientIdentifiers = null;\r\n\r\n return this.$q.when(this.extEnrollmentApi.basicEnrollmentCreate(programId, requestModel).then(response => {\r\n return response.data.data;\r\n }));\r\n }\r\n\r\n enrollment(programId: number, account: pme.Account, enrollment: pme.Enrollment) {\r\n const accountSessions = account.accountSessions.filter(accountSession => {\r\n return !accountSession.id && accountSession.surveySession;\r\n });\r\n const surveySession =\r\n accountSessions && accountSessions.length > 0\r\n ? accountSessions[0].surveySession\r\n : null;\r\n\r\n const requestModel = {} as psgm.EnrollmentInsVerRequestModel;\r\n const mapper = new Mappers.SurveyMapper();\r\n requestModel.survey = mapper.toLegacy(surveySession);\r\n requestModel.demographics = mapper.toCouponDemographics(\r\n account,\r\n enrollment.memberNumber\r\n );\r\n requestModel.clientIdentifiers = null;\r\n return this.extEnrollmentApi\r\n .enrollmentCreate(programId, requestModel)\r\n .then(response => {\r\n return response;\r\n });\r\n }\r\n\r\n verifySurveyAnswer(\r\n programId: number,\r\n surveyId: number,\r\n questionId: number,\r\n account: pme.Account\r\n ): angular.IPromise {\r\n if (\r\n this.dataService.session.mode === 'edit' ||\r\n this.dataService.session.mode === 'mock'\r\n ) {\r\n return this.$q.when(true);\r\n }\r\n\r\n let mapper = new ps.Mappers.SurveyMapper();\r\n let surveySession = account.getSurveySession(surveyId);\r\n let answers = surveySession.getSurveySessionAnswers(questionId);\r\n let legacyQuestion = mapper.toLegacySurveyQuestion(\r\n surveySession.surveyId,\r\n questionId,\r\n answers[0]\r\n );\r\n\r\n return this.$q.when(this.extEnrollmentApi.verifySurveyAnswerCreate(programId, legacyQuestion).then((response) => {\r\n return response.data.data.isEligible;\r\n }));\r\n }\r\n\r\n verifySurveyAnswers(\r\n programId: number,\r\n surveyIds: number[],\r\n questionIds: number[],\r\n account: pme.Account\r\n ): angular.IPromise {\r\n let promises: angular.IPromise[] = [];\r\n\r\n for (let i = 0; i < surveyIds.length; i++) {\r\n promises.push(this.verifySurveyAnswer(programId, surveyIds[i], questionIds[i], account));\r\n }\r\n\r\n return this.$q.all(promises).then(x => x.every(z => z));\r\n }\r\n }\r\n export enum LegacyCheckMNCodes {\r\n Invalid = 0, // Failure. Invalid member number For program (success - false)\r\n Expired = 1, // Have to check the date with dateService.isAfter(cardEndDate) (success - true)\r\n Activated = 2, // Have to check the cardActivationDate!=null (success - true)\r\n Inactive = 3, // Have to check the cardActivationDate=null && cardEndDate=null? (succes - true)\r\n Error = 4, // Generic error response message is something like \"an unknown error occurred\" (success - false)\r\n }\r\n}\r\n","namespace Portico.Services {\r\n\r\n import pme = Portico.Models.Enterprise;\r\n\timport psga = apigateway.client;\r\n\timport psge = apigateway.enums;\r\n\timport psgm = apigateway.models;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n export interface IAccountService {\r\n\t\tactivateUser(userName: string, activate: boolean): angular.IPromise;\r\n\t\tcreate(programId: number, account?: pme.Account): angular.IPromise;\r\n\t\tcreateFromCase(programId: number, caze: psgm.GetCaseResponseModel): angular.IPromise;\r\n\t\tgetPrescribers(): angular.IPromise;\r\n\t\tgetSites(): angular.IPromise;\r\n\t\tgetTasks(typeId: number, accountId?: number): angular.IPromise;\r\n\t\tgetUsers(): angular.IPromise;\r\n removePrescriber(prescriberId: number): angular.IPromise;\r\n removeSite(siteId: number): angular.IPromise;\r\n\t\tsavePrescriber(prescriber: pme.Prescriber): angular.IPromise;\r\n\t\tsaveSite(site: pme.Site): angular.IPromise;\r\n\t\tsaveTask(task: pme.Task): angular.IPromise;\r\n\t\tsaveUser(user: pme.User): angular.IPromise;\r\n\t\tsaveUserRole(userName: string, role: string): angular.IPromise;\r\n\t\tupdateAccount(account: pme.Account, programId?: string): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'accountService')\r\n\t@Inject('$q', 'EdgeAccountApi')\r\n export class AccountService implements IAccountService {\r\n constructor(\r\n private $q: angular.IQService,\r\n\t\t\tprivate edgeAccountApi: psga.EdgeAccountApi,\r\n ) { }\r\n\r\n\t\tactivateUser(userName: string, activate: boolean): angular.IPromise {\r\n\t\t\tconst request = {\r\n\t\t\t\tuserName: userName,\r\n\t\t\t\tactivate: activate\r\n\t\t\t};\r\n\r\n\t\t\treturn this.$q.when(this.edgeAccountApi.accountActivateUser(request).then((response) => {\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tcreate(programId: number, account: pme.Account = null): angular.IPromise {\r\n\t\t\treturn this.$q.when(new pme.Account(account || { programId: programId }));\r\n\t\t}\r\n\r\n\t\tcreateFromCase(programId: number, caze: psgm.GetCaseResponseModel): angular.IPromise {\r\n\t\t\treturn null; // this.$q.when(new pme.Account(account || { programId: programId }));\r\n\t\t}\r\n\r\n\t\tgetPrescribers(): angular.IPromise {\r\n\t\t\treturn this.$q.when(this.edgeAccountApi.accountGetPrescribers({}).then((response) => {\r\n\t\t\t\treturn _.map(response.data.data, (s) => {\r\n\t\t\t\t\treturn new pme.Prescriber(s);\r\n\t\t\t\t});\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tgetSites(): angular.IPromise {\r\n\t\t\treturn this.$q.when(this.edgeAccountApi.accountGetSites({}).then((response) => {\r\n\t\t\t\treturn _.map(response.data.data, (s) => {\r\n\t\t\t\t\ts.businessEndTime = s.businessEndTime?.toDate();\r\n\t\t\t\t\ts.businessStartTime = s.businessStartTime?.toDate();\r\n\t\t\t\t\treturn new pme.Site(s);\r\n\t\t\t\t});\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tgetTasks(typeId: number, accountId: number = null): angular.IPromise {\r\n\t\t\treturn this.$q.when(this.edgeAccountApi.accountGetTasks({ typeId: typeId, accountId: accountId }).then((response) => {\r\n\t\t\t\tconst tasks = [];\r\n\r\n\t\t\t\tfor (const task of response.data.data) {\r\n\t\t\t\t\ttask.completionDate = task.completionDate?.toDate();\r\n\t\t\t\t\ttask.createdDate = task.createdDate?.toDate();\r\n\t\t\t\t\ttask.dueDate = task.dueDate?.toDate();\r\n\t\t\t\t\ttask.updatedDate = task.updatedDate?.toDate();\r\n\t\t\t\t\ttasks.push(new pme.Task(task));\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn tasks;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tgetUsers(): angular.IPromise {\r\n\t\t\treturn this.$q.when(this.edgeAccountApi.accountGetUsers({}).then((response) => {\r\n\t\t\t\tconst users = _.map(response.data.data, (u) => {\r\n\t\t\t\t\treturn new pme.User(u);\r\n\t\t\t\t});\r\n\t\t\t\treturn users;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n removePrescriber(prescriberId: number){\r\n var requestModel: psgm.RemovePrescriberRequestModel = {\r\n prescriberId\r\n }\r\n\t\t\treturn this.$q.when(this.edgeAccountApi.accountRemovePrescriber(requestModel).then(response => {\r\n\t\t\t\treturn response.data.data;\r\n }));\r\n }\r\n\r\n removeSite(siteId: number){\r\n var requestModel: psgm.RemoveSiteRequestModel = {\r\n siteId\r\n }\r\n\t\t\treturn this.$q.when(this.edgeAccountApi.accountRemoveSite(requestModel).then(response => {\r\n\t\t\t\treturn response.data.data;\r\n }));\r\n }\r\n\r\n\t\tsavePrescriber(prescriber: pme.Prescriber): angular.IPromise {\r\n\t\t\treturn this.$q.when(this.edgeAccountApi.accountSavePrescriber(prescriber.mapToPrescriberUpsearchModel()).then((response) => {\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tsaveSite(site: pme.Site): angular.IPromise {\r\n\t\t\treturn this.$q.when(this.$q.when(this.edgeAccountApi.accountSaveSite(site.mapToSiteUpsearchModel()).then((response) => {\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t})));\r\n\t\t}\r\n\r\n\t\tsaveTask(task: pme.Task): angular.IPromise {\r\n\t\t\tconst now = new Date();\r\n\t\t\tconst request = {\r\n\t\t\t\taccountId: _.get(task, 'accountId', null),\r\n\t\t\t\tcaseId: _.get(task, 'caseId', null),\r\n\t\t\t\tassignedUserId: _.get(task, 'assignedUserId', null),\r\n\t\t\t\tdueDate: moment(_.get(task, 'dueDate', now)),\r\n\t\t\t\tcompletionDate: moment(_.get(task, 'completionDate', null)),\r\n\t\t\t\tisCompleted: _.get(task, 'isCompleted', false),\r\n\t\t\t\tresolution: _.get(task, 'resolution', ''),\r\n\t\t\t\tdocumentId: _.get(task, 'documentId', null),\r\n\t\t\t\ttypeId: _.toNumber(_.get(task, 'typeId', null)),\r\n\t\t\t\tsubject: _.get(task, 'subject', ''),\r\n\t\t\t\tbody: _.get(task, 'body', '')\r\n\t\t\t};\r\n\r\n\t\t\treturn this.$q.when(this.edgeAccountApi.accountSaveTask(request).then((response) => {\r\n\t\t\t\tconst task = new pme.Task(request);\r\n\t\t\t\ttask.id = response.data.data;\r\n\t\t\t\ttask.createdDate = now;\r\n\t\t\t\treturn task;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tsaveUser(user: pme.User): angular.IPromise {\r\n\t\t\treturn this.$q.when(this.edgeAccountApi.accountSaveUser(user).then((response) => {\r\n\t\t\t\treturn true;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tsaveUserRole(userName: string, role: string): angular.IPromise {\r\n\t\t\tconst request = {\r\n\t\t\t\tuserName: userName,\r\n\t\t\t\trole: role\r\n\t\t\t};\r\n\t\t\treturn this.$q.when(this.edgeAccountApi.accountSaveUserRole(request).then((response) => {\r\n\t\t\t\treturn true;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tupdateAccount(account: pme.Account, programId?: string) {\r\n\t\t\tconst {\r\n\t\t\t\ttype,\r\n\t\t\t\tstatus,\r\n\t\t\t\tpartyId,\r\n\t\t\t\tsecurePartyId,\r\n\t\t\t\tassignedUser,\r\n\t\t\t\tpayorRelationships,\r\n\t\t\t\tprescriberRelationships,\r\n\t\t\t\tsiteRelationships,\r\n\t\t\t\tpharmacyRelationships,\r\n\t\t\t\tdocumentRelationships,\r\n\t\t\t\tnotes,\r\n\t\t\t\ttasks,\r\n\t\t\t\tvoiceMailOptIns,\r\n\t\t\t\tassignmentOfBenefitFlag,\r\n\t\t\t\tisIneligibleForMailInClaims,\r\n\t\t\t\tallowAutoReenroll,\r\n\t\t\t} = account;\r\n\t\t\tconst payors: psgm.AccountPayorRelationModel[] = payorRelationships.map((rel) => ({\r\n\t\t\t\troleType: rel.role as unknown as psge.AccountRoleType,\r\n\t\t\t\taccountRelations: [{\r\n\t\t\t\t\tcoverageOrder: rel.order,\r\n\t\t\t\t\trelatedId: rel.payorId,\r\n\t\t\t\t\tisPrimary: rel.isPrimary,\r\n\t\t\t\t}]\r\n\t\t\t}));\r\n\t\t\tconst prescribers: psgm.AccountRelationModel[] = prescriberRelationships.map((rel) =>({\r\n\t\t\t\trelatedId: rel.prescriberId,\r\n\t\t\t\tisPrimary: rel.isPrimary,\r\n\t\t\t}));\r\n\t\t\tconst sites: psgm.AccountRelationModel[] = siteRelationships.map((rel) => ({\r\n\t\t\t\trelatedId: rel.siteId,\r\n\t\t\t\tisPrimary: rel.isPrimary,\r\n\t\t\t}))\r\n\t\t\tconst pharmacies: psgm.AccountRelationModel[] = pharmacyRelationships.map((rel) => ({\r\n\t\t\t\trelatedId: rel.pharmacyId,\r\n\t\t\t\tisPrimary: rel.isPrimary,\r\n\t\t\t}));\r\n\t\t\tconst documents: psgm.AccountDocumentRelationshipModel[] = documentRelationships.map((rel) => ({\r\n\t\t\t\tdocumentId: rel.documentId,\r\n\t\t\t\tcomment: rel.comment,\r\n\t\t\t}))\r\n\t\t\tconst accountSaveModel: psgm.AccountSaveModel = {\r\n\t\t\t\taccountType: psge.AccountType[type],\r\n\t\t\t\taccountStatus: psge.AccountStatus[status],\r\n\t\t\t\tpartyId,\r\n\t\t\t\tsecurePartyId,\r\n\t\t\t\tassignedUser,\r\n\t\t\t\tpayors,\r\n\t\t\t\tprescribers,\r\n\t\t\t\tsites,\r\n\t\t\t\tpharmacies,\r\n\t\t\t\tdocuments,\r\n\t\t\t\tnotes,\r\n\t\t\t\ttasks,\r\n\t\t\t\tvoicemailOptInStatus: voiceMailOptIns,\r\n\t\t\t\tassignmentOfBenefitFlag,\r\n\t\t\t\tisIneligibleForMailInClaims,\r\n\t\t\t\tallowAutoReenroll,\r\n\t\t\t}\r\n\t\t\treturn this.$q.when(this.edgeAccountApi.accountUpdateAccount(accountSaveModel, programId).then((response) => response.data.data));\r\n\t\t}\r\n }\r\n}","namespace Portico.Services {\r\n import Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n import psga = apigateway.client;\r\n import psgm = apigateway.models;\r\n\r\n export interface ICaseService {\r\n getCaseTypeStatuses: (caseTypeId: number) => angular.IPromise\r\n }\r\n\r\n @Service('app', 'caseService')\r\n\t@Inject('$q', 'CaseV3Api')\r\n export class CaseService implements ICaseService {\r\n\t\tconstructor(\r\n private $q: angular.IQService,\r\n private caseApi: psga.CaseV3Api\r\n ){}\r\n\r\n getCaseTypeStatuses(caseTypeId: number) {\r\n return this.$q.when(this.caseApi.caseTypeStatusGetByProgramId(caseTypeId).then(response => {\r\n return response.data.data;\r\n }));\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n import Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\timport psga = apigateway.client;\r\n\timport psgm = apigateway.models;\r\n\r\n export interface IClaimService {\r\n\t\tgetAccumulator(memberNumber: string, date: Date): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'claimService')\r\n\t@Inject('$q', 'ClaimV1Api')\r\n export class ClaimService implements IClaimService {\r\n constructor(\r\n\t\t\tprivate $q: angular.IQService,\r\n\t\t\tprivate claimApi: psga.ClaimV1Api,\r\n ){}\r\n\r\n\t\tgetAccumulator(memberNumber: string, date: Date): angular.IPromise {\r\n\t\t\treturn this.$q.when(this.claimApi.getByMemberNumber(memberNumber, moment(date)).then((response) => {\r\n\t\t\t\tresponse.data.data.forEach(cam => {\r\n\t\t\t\t\tcam.endDate = cam.endDate?.toDate();\r\n\t\t\t\t\tcam.startDate = cam.startDate?.toDate();\r\n\t\t\t\t});\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n\t}\r\n}","namespace Portico.Services {\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n import psga = apigateway.client;\r\n import psgm = apigateway.models;\r\n\r\n export interface IDebitCardService {\r\n getDebitCardDetail(memberNumber: string): angular.IPromise< psgm.DebitCardInfoResponseModel>;\r\n getLashPatientDebitCardLast4(patientLashId: string): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'debitCardService')\r\n @Inject('$q', 'EdgeDebitCardApi')\r\n export class DebitCardService implements IDebitCardService {\r\n constructor(\r\n private $q: angular.IQService,\r\n private edgeDebitCardApi: psga.EdgeDebitCardApi\r\n ){}\r\n\r\n getDebitCardDetail(memberNumber: string) {\r\n return this.$q.when(this.edgeDebitCardApi.debitCardGetDebitCardDetail({ memberNumber } as psgm.GetDebitCardDetailRequestModel).then(response => {\r\n response.data.data.effectiveDate = response.data.data.effectiveDate?.toDate();\r\n response.data.data.expirationDate = response.data.data.expirationDate?.toDate();\r\n response.data.data.vmcValidThroughDate = response.data.data.vmcValidThroughDate?.toDate();\r\n return response.data.data;\r\n }));\r\n }\r\n\r\n getLashPatientDebitCardLast4(patientLashId: string) {\r\n return this.$q.when(this.edgeDebitCardApi.debitCardGetLashPatientDebitCardLast4({ patientLashId }).then(response => {\r\n return response.data.data;\r\n }));\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n import pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n import psga = apigateway.client;\r\n import psgm = apigateway.models;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n export interface IDiagnosisService {\r\n\t\tgetByProgramId(): angular.IPromise;\r\n populate(account: pme.Account): angular.IPromise;\r\n search(diagnosisCode: string, diagnosisTypes: pm.Gateway.DiagnosisType[]): ng.IPromise;\r\n search(diagnosisCode: string, diagnosisTypes: pm.Gateway.DiagnosisType[], currentDiagnoses: pme.Diagnosis[]): ng.IPromise;\r\n getById(diagnosisId: number): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'diagnosisService')\r\n\t@Inject('$q', 'DiagnosisV3Api')\r\n export class DiagnosisService implements IDiagnosisService {\r\n constructor(\r\n private $q: angular.IQService,\r\n\t\t\tprivate diagnosisV3Api: psga.DiagnosisV3Api\r\n ) { }\r\n\r\n\t\tgetByProgramId(): angular.IPromise {\r\n\t\t\t// let diagnoses: pme.Diagnosis[] = this.storageService.getItem(pm.StorageType.Session, `diagnosis-${programId}-list`);\r\n\r\n\t\t\tconst promise = // diagnoses ?\r\n\t\t\t\t// this.$q.when(diagnoses) :\r\n this.$q.when(this.diagnosisV3Api.programDiagnosisGetByProgramId()\r\n .then(x => x.data.data.map(x => new pme.Diagnosis(x)))); \r\n\r\n\t\t\treturn promise.then((response: pme.Diagnosis[]) => {\r\n\t\t\t\tconst temp: pme.Diagnosis[] = [];\r\n\r\n\t\t\t\tfor (const diagnosis of response) {\r\n\t\t\t\t\ttemp.push(new pme.Diagnosis(diagnosis));\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// this.storageService.saveItem(pm.StorageType.Session, `diagnosis-${programId}-list`, temp);\r\n\r\n\t\t\t\treturn temp;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tpopulate(account: pme.Account): angular.IPromise {\r\n\t\t\tconst accountSessions = account.accountSessions.filter((a) => {\r\n\t\t\t\treturn !a.surveySessionId\r\n\t\t\t}).sort((a, b) => {\r\n\t\t\t\treturn b.sessionDate.getTime() - a.sessionDate.getTime();\r\n\t\t\t});\r\n\r\n\t\t\tif (accountSessions.length === 0) {\r\n\t\t\t\treturn this.$q.when(false);\r\n\t\t\t}\r\n\r\n\t\t\tconst accountSession = accountSessions[0];\r\n\r\n\t\t\t// TODO: wrap in an edge call\r\n return this.$q.when(this.diagnosisV3Api.sessionDiagnosisGet(accountSession.id).then((response) => {\r\n\t\t\t\taccountSession.diagnoses = [];\r\n\r\n for (const diagnosis of response.data.data) {\r\n\t\t\t\t\taccountSession.diagnoses.push(new pme.Diagnosis(diagnosis));\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}));\r\n }\r\n\r\n\t\tgetById(diagnosisId: number): angular.IPromise {\r\n\t\t\t// TODO: wrap in an edge call\r\n return this.$q.when(this.diagnosisV3Api.diagnosisGet(diagnosisId).then((response) => {\r\n return new pme.Diagnosis(response.data.data);\r\n }));\r\n }\r\n\r\n search(diagnosisCode: string, diagnosisTypes: pm.Gateway.DiagnosisType[], currentDiagnoses: pme.Diagnosis[] = null): ng.IPromise {\r\n const search: psgm.DiagnosisSearchRequestModel = {\r\n programId: null,\r\n diagnosisName: '',\r\n diagnosisDescription: '',\r\n diagnosisCode: diagnosisCode,\r\n diagnosisType: pm.Gateway.DiagnosisType.UNKN,\r\n maxRecordCount: 20\r\n };\r\n\r\n const currentDiagnosisCodes = currentDiagnoses !== null ? currentDiagnoses.map(x => x.id) : null;\r\n\r\n return this.$q.when(this.diagnosisV3Api.diagnosisSearch(search).then((response) => {\r\n let results: pme.Diagnosis[] = [];\r\n\r\n // filter out only the diagnosis types that we want to see\r\n response.data.data.diagnoses.filter(d => this.isInArray(d.diagnosisType, diagnosisTypes)).forEach(r => {\r\n if (currentDiagnosisCodes != null) {\r\n if (this.isInArray(r.diagnosisId, currentDiagnosisCodes) == false) {\r\n results.push(new pme.Diagnosis(r));\r\n }\r\n }\r\n else {\r\n results.push(new pme.Diagnosis(r));\r\n }\r\n });\r\n\r\n return results;\r\n }));\r\n }\r\n\r\n private isInArray(searchValue: T, valueArray: T[]) {\r\n return _.findIndex(valueArray, (value: T) => {\r\n return value === searchValue;\r\n }) !== -1;\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n import pm = Portico.Models;\r\n import pme = Portico.Models.Enterprise;\r\n import pmg = Portico.Models.Gateway;\r\n import pmi = Portico.Models.Interfaces;\r\n import psga = apigateway.client;\r\n import psgm = apigateway.models;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n export interface IDocumentService {\r\n createPdf(documentName: string, templateData, title: string): angular.IPromise;\r\n getById(documentId: number): angular.IPromise;\r\n upload(programId: number, typeId: number, file: any): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'documentService')\r\n @Inject('$q', 'Upload', 'serverConstants', 'DocumentV3Api')\r\n export class DocumentService implements IDocumentService {\r\n constructor(\r\n private $q: angular.IQService,\r\n private $upload: any,\r\n private serverConstants: pmi.IServerConstants,\r\n private documentApi: psga.DocumentV3Api\r\n ) {}\r\n\r\n createPdf(\r\n documentName: string,\r\n documentData: { [key: string]: string },\r\n title: string\r\n ): angular.IPromise {\r\n const request: psgm.DocumentPdfDocumentModel = {\r\n documentGroupSource: pmg.DocumentGroupSource.TCPortal,\r\n documentGroupReceivedDate: moment(new Date().toJSON()),\r\n templateData: {\r\n templateName: 'BaseDocumentTemplate',\r\n author: 'Portico',\r\n title: title || '',\r\n overWriteExisting: false,\r\n documentData: documentData || {},\r\n documentStyles: [],\r\n },\r\n documentStatus: pmg.DocumentStatus.UNKN,\r\n documentOriginalFileName: documentName || '',\r\n faxAni: '',\r\n faxDns: '',\r\n };\r\n\r\n return this.$q.when(this.documentApi.pdfDocumentCreateByProgramId(request).then(response => {\r\n return response.data.data;\r\n }));\r\n }\r\n\r\n getById(documentId: number): angular.IPromise {\r\n return this.$q.when(this.documentApi.documentGetByProgramId(documentId).then(response => {\r\n response.data.data.createDate = response.data.data.createDate?.toDate();\r\n response.data.data.documentGroupReceivedDate = response.data.data.documentGroupReceivedDate?.toDate();\r\n response.data.data.lastUpdateDate = response.data.data.lastUpdateDate?.toDate();\r\n return response.data.data;\r\n }));\r\n }\r\n\r\n upload(programId: number, typeId: number, file: any): angular.IPromise {\r\n return this.$upload\r\n .upload({\r\n url:\r\n this.serverConstants.root +\r\n 'File/UploadDocument/' +\r\n programId +\r\n '/' +\r\n typeId,\r\n data: { file: file },\r\n })\r\n .then(response => {\r\n return new pme.Document(response.data);\r\n });\r\n }\r\n }\r\n}\r\n","namespace Portico.Services {\r\n\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmg = Portico.Models.Gateway;\r\n\timport psga = apigateway.client;\r\n\timport psgm = apigateway.models;\r\n\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n\texport interface IEmailService {\r\n\t\tisUnsubscribed(email: string): angular.IPromise;\r\n\t\tsend(emailRequest: pme.EmailRequest, checkUnsubscribe?: boolean): angular.IPromise;\r\n\t\tunsubscribe(accountId: number, email: string, userId: number, username: string): angular.IPromise;\r\n\t\tunsubscribeV2(email: string, sourceName: string): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'emailService')\r\n\t@Inject('$q', 'EdgeEmailApi')\r\n export class EmailService implements IEmailService {\r\n\t\tconstructor(\r\n\t\t\tprivate $q: angular.IQService,\r\n\t\t\tprivate edgeEmailApi: psga.EdgeEmailApi,\r\n ) { }\r\n\r\n\t\tisUnsubscribed(email: string): angular.IPromise {\r\n\t\t\treturn this.$q.when(this.edgeEmailApi.emailIsUnsubscribed({ email }).then((response) => {\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tsend(emailRequest: pme.EmailRequest, check: boolean = true): angular.IPromise {\r\n\t\t\tconst request = {\r\n\t\t\t\tcheck,\r\n\t\t\t\temail: {\r\n\t\t\t\t\tcontact: {\r\n\t\t\t\t\t\temailAddress: emailRequest.recipientAddress,\r\n\t\t\t\t\t\tfirstName: emailRequest.recipientFirstName,\r\n\t\t\t\t\t\tlastName: emailRequest.recipientLastName\r\n\t\t\t\t\t},\r\n\t\t\t\t\tmemberNumber: null,\r\n\t\t\t\t\tparameters: emailRequest.parameters,\r\n\t\t\t\t\tfromName: emailRequest.senderName || emailRequest.senderAddress,\r\n\t\t\t\t\tfromAddress: emailRequest.senderAddress,\r\n\t\t\t\t\temailName: emailRequest.templaterName,\r\n\t\t\t\t\tdeliveryType: 'triggered',\r\n\t\t\t\t\tmessageContentType: pmg.MessageContentType.Html,\r\n\t\t\t\t\ttag: null\r\n\t\t\t\t}\r\n\t\t\t} as psgm.SendRequestModel;\r\n\r\n\t\t\treturn this.$q.when(this.edgeEmailApi.emailSend(request).then((response) => {\r\n\t\t\t\treturn response.data.data;\r\n }));\r\n }\r\n\r\n\t\tunsubscribe(accountId: number, email: string, userId: number, username: string): angular.IPromise {\r\n\t\t\treturn this.$q.when(this.edgeEmailApi.emailUnsubscribe({ accountId, email, userId, username }).then((response) => {\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tunsubscribeV2(email: string, sourceName: string): angular.IPromise {\r\n\t\t\treturn this.$q.when(this.edgeEmailApi.unsubscribeUnsubscribeBySourceName({ email, sourceName }).then((response: any) => {\r\n\t\t\t\treturn response.data.data as boolean;\r\n\t\t\t}));\r\n\t\t}\r\n }\r\n}","namespace Portico.Services {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmg = Portico.Models.Gateway;\r\n\timport ps = Portico.Services;\r\n\timport psga = apigateway.client;\r\n\timport psgm = apigateway.models;\r\n\r\n\texport interface IEnrollmentService {\r\n\t\tcheckMemberNumber: (memberNumber: string, haveACard: boolean, partyId: number, checkForEnrollment: boolean) => angular.IPromise;\r\n\t\tcreate: (enrollment?: pme.Enrollment) => angular.IPromise;\r\n\t\tenrollPatient: (enrollRequestModel: pme.EnrollRequestModel\r\n\t\t\t, shouldVerifyEligibility: boolean\r\n\t\t\t, payorCoverageAreas: psgm.PayorCoverageEligibilityRequestModel[]\r\n\t\t\t, enrollmentInput?: psgm.ScriptsEnrollmentEnrollPatientEnrollmentInputModel\r\n\t\t\t, programId?: string | number) => angular.IPromise\r\n\t\t\t, caseInitiator?: pmg.EnrollPatientCaseInitiator;\r\n\t\tgetBestEnrollment: (patient: pme.Patient) => angular.IPromise;\r\n\t\tgetBestEnrollmentV2: (patient: pme.Patient) => angular.IPromise;\r\n\t}\r\n\r\n\t@Service('app', 'enrollmentService')\r\n\t@Inject('$q', 'dataService', 'EdgeApi', 'EdgeEnrollmentApi')\r\n\texport class EnrollmentService implements IEnrollmentService {\r\n\t\tconstructor(\r\n\t\t\tprivate $q: angular.IQService,\r\n\t\t\tprivate dataService: ps.IDataService,\r\n\t\t\tprivate edgeApi: psga.EdgeApi,\r\n\t\t\tprivate edgeEnrollmentApi: psga.EdgeEnrollmentApi\r\n\t\t) { }\r\n\r\n\t\tcheckMemberNumber(memberNumber: string, haveACard: boolean, partyId: number, checkForEnrollment: boolean) {\r\n\t\t\tconst request = {\r\n\t\t\t\tmemberNumber,\r\n\t\t\t\thaveACard,\r\n\t\t\t\tpartyId,\r\n\t\t\t\tcheckForEnrollment\r\n\t\t\t} as psgm.EnrollmentIsValidMemberNumberRequestModel;\r\n\r\n\t\t\treturn this.$q.when(this.edgeEnrollmentApi.enrollmentCheckMemberNumber(request).then((response) => {\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tcreate(enrollment: pme.Enrollment = null): angular.IPromise {\r\n\t\t\treturn this.$q.when(new pme.Enrollment(enrollment));\r\n\t\t}\r\n\r\n\t\tenrollPatient(enrollRequestModel: pme.EnrollRequestModel\r\n\t\t\t, shouldVerifyEligibility: boolean\r\n\t\t\t, payorCoverageAreas: psgm.PayorCoverageEligibilityRequestModel[]\r\n\t\t\t, enrollmentInput?: psgm.ScriptsEnrollmentEnrollPatientEnrollmentInputModel\r\n\t\t\t, programId?: string | number\r\n\t\t\t, caseInitiator?: pmg.EnrollPatientCaseInitiator) {\r\n\r\n\t\t\tconst temp = new pme.EnrollRequestModel(enrollRequestModel);\r\n\t\t\tconst sourceId = this.dataService.getEnvironmentId('source-id');\r\n\t\t\tconst edgePatientEnrollmentRequestModel = temp.mapToEnterpriseCoordinatorAccountUpsearchRequestModel(sourceId);\r\n\t\t\tconst overrideProgramId = programId ? programId.toString() : null;\r\n\r\n\t\t\tconst request = {\r\n\t\t\t\taccount: edgePatientEnrollmentRequestModel,\r\n\t\t\t\tshouldVerifyEligibility: shouldVerifyEligibility,\r\n\t\t\t\tpayorCoverageAreas: payorCoverageAreas,\r\n\t\t\t\tenrollmentInput,\r\n\t\t\t\tcaseInitiator,\r\n\t\t\t} as psgm.EnrollPatientRequestModel;\r\n\r\n\t\t\treturn this.$q.when(this.edgeApi.patientEnrollmentEnrollPatient(request, overrideProgramId).then((response) => {\r\n\t\t\t\tresponse.data.data.benefitResult = response.data.data.benefitResult ?? {} as psgm.EnrollmentV2ProcessingBenefitModel;\r\n\t\t\t\tresponse.data.data.benefitResult.claimEligibilityDate = response.data.data.benefitResult.claimEligibilityDate?.toDate();\r\n\t\t\t\tresponse.data.data.benefitResult.endDate = response.data.data.benefitResult.endDate?.toDate();\r\n\t\t\t\tresponse.data.data.benefitResult.queuedProcessingDate = response.data.data.benefitResult.queuedProcessingDate?.toDate();\r\n\t\t\t\tresponse.data.data.benefitResult.startDate = response.data.data.benefitResult.startDate?.toDate();\r\n\t\t\t\tresponse.data.data.enrollment = response.data.data.enrollment ?? {} as psgm.EnrollmentV2EnrollmentModel;\r\n\t\t\t\tresponse.data.data.enrollment.claimEligibilityDate = response.data.data.enrollment.claimEligibilityDate?.toDate();\r\n\t\t\t\tresponse.data.data.enrollment.createDate = response.data.data.enrollment.createDate?.toDate();\r\n\t\t\t\tresponse.data.data.enrollment.endDate = response.data.data.enrollment.endDate?.toDate();\r\n\t\t\t\tresponse.data.data.enrollment.startDate = response.data.data.enrollment.startDate?.toDate();\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tgetBestEnrollment(patient: pme.Patient) {\r\n\t\t\tconst getBestEnrollmentRequestModel: psgm.GetBestEnrollmentRequest = {\r\n\t\t\t\tfirstName: patient.firstName,\r\n\t\t\t\tlastName: patient.lastName,\r\n\t\t\t\tdateOfBirth: moment(patient.dateOfBirth),\r\n\t\t\t\tzip: patient.addresses && patient.addresses.length > 0 ? patient.addresses[0].zip : null,\r\n\t\t\t\tgender: pmg.Gender[patient.gender]\r\n\t\t\t}\r\n\r\n\t\t\treturn this.$q.when(this.edgeApi.enrollmentGetBestEnrollment(getBestEnrollmentRequestModel).then((response) => {\r\n\t\t\t\tresponse.data.data.claimEligibilityDate = response.data.data.claimEligibilityDate?.toDate();\r\n\t\t\t\tresponse.data.data.createdOn = response.data.data.createdOn?.toDate();\r\n\t\t\t\tresponse.data.data.endDate = response.data.data.endDate?.toDate();\r\n\t\t\t\tresponse.data.data.reenrollmentEligibilityDate = response.data.data.reenrollmentEligibilityDate?.toDate();\r\n\t\t\t\tresponse.data.data.startDate = response.data.data.startDate?.toDate();\r\n\t\t\t\tresponse.data.data.updatedOn = response.data.data.updatedOn?.toDate();\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tgetBestEnrollmentV2(patient: pme.Patient) {\r\n\t\t\tconst getBestEnrollmentRequestModel: psgm.GetBestEnrollmentV2RequestModel = {\r\n\t\t\t\tfirstName: patient.firstName,\r\n\t\t\t\tlastName: patient.lastName,\r\n\t\t\t\tdateOfBirth: moment(patient.dateOfBirth),\r\n\t\t\t\tzip: patient.addresses && patient.addresses.length > 0 ? patient.addresses[0].zip : null,\r\n\t\t\t\tgender: pmg.Gender[patient.gender]\r\n\t\t\t}\r\n\r\n\t\t\treturn this.$q.when(this.edgeEnrollmentApi.enrollmentGetBestEnrollmentsV2(getBestEnrollmentRequestModel).then((response) => {\r\n\t\t\t\tresponse.data.data.forEach(e => {\r\n\t\t\t\t\te.claimEligibilityDate = e.claimEligibilityDate?.toDate();\r\n\t\t\t\t\te.createdOn = e.createdOn?.toDate();\r\n\t\t\t\t\te.endDate = e.endDate?.toDate();\r\n\t\t\t\t\te.reenrollmentEligibilityDate = e.reenrollmentEligibilityDate?.toDate();\r\n\t\t\t\t\te.startDate = e.startDate?.toDate();\r\n\t\t\t\t\te.updatedOn = e.updatedOn?.toDate();\r\n\t\t\t\t});\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n\t}\r\n}","namespace Portico.Services {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\timport ps = Portico.Services;\r\n\r\n export interface IEnterpriseService {\r\n\t\taccountService: ps.IAccountService;\r\n\t\tcaseService: ps.ICaseService;\r\n\t\tclaimService: ps.IClaimService;\r\n\t\tconversionService: ps.IConversionService;\r\n\t\tdebitCardService: ps.IDebitCardService;\r\n\t\tdiagnosisService: ps.IDiagnosisService;\r\n\t\tdocumentService: ps.IDocumentService;\r\n\t\temailService: ps.IEmailService;\r\n\t\tenrollmentService: ps.IEnrollmentService;\r\n\t\thubService: ps.IHubService;\r\n\t\tintakeService: ps.IIntakeService;\r\n\t\tlocationService: ps.ILocationService;\r\n\t\tlocationServiceGateway: ps.ILocationService;\r\n\t\tmiscService: ps.IMiscService;\r\n\t\tnoteService: ps.INoteService;\r\n\t\tpatientAccountService: ps.IPatientAccountService;\r\n\t\tpatientService: ps.IPatientService;\r\n\t\tpayloadStagingService: ps.IPayloadStagingService;\r\n\t\tpayorService: ps.IPayorService;\r\n\t\tpharmacyService: ps.IPharmacyService;\r\n\t\tprescriberService: ps.IPrescriberService;\r\n\t\tprescriptionService: ps.IPrescriptionService;\r\n\t\tprogramService: ps.IProgramService;\r\n\t\tsessionService: ps.ISessionService;\r\n\t\tsiteService: ps.ISiteService;\r\n\t\tsiteAccountService: ps.ISiteAccountService;\r\n\t\tsurveyService: ps.ISurveyService;\r\n }\r\n\r\n\t@Service(\r\n\t\t'app',\r\n\t\t'enterpriseService'\r\n\t)\r\n\t@Inject(\r\n\t\t'accountService',\r\n\t\t'caseService',\r\n\t\t'claimService',\r\n\t\t'conversionService',\r\n\t\t'debitCardService',\r\n\t\t'diagnosisService',\r\n\t\t'documentService',\r\n\t\t'emailService',\r\n\t\t'enrollmentService',\r\n\t\t'hubService',\r\n\t\t'intakeService',\r\n\t\t'locationServiceClient', // TODO - This needs to be changed back to just locationService once the Gateway is in production\r\n\t\t'locationService',\r\n\t\t'miscService',\r\n\t\t'noteService',\r\n\t\t'patientAccountService',\r\n\t\t'patientService',\r\n\t\t'payloadStagingService',\r\n\t\t'payorService',\r\n\t\t'pharmacyService',\r\n\t\t'prescriberService',\r\n\t\t'prescriptionService',\r\n\t\t'programService',\r\n\t\t'sessionService',\r\n\t\t'siteService',\r\n\t\t'siteAccountService',\r\n\t\t'surveyService'\r\n\t)\r\n\texport class EnterpriseService implements IEnterpriseService {\r\n\t\tconstructor(\r\n\t\t\tpublic accountService: ps.IAccountService,\r\n\t\t\tpublic caseService: ps.ICaseService,\r\n\t\t\tpublic claimService: ps.IClaimService,\r\n\t\t\tpublic conversionService: ps.IConversionService,\r\n\t\t\tpublic debitCardService: ps.IDebitCardService,\r\n\t\t\tpublic diagnosisService: ps.IDiagnosisService,\r\n\t\t\tpublic documentService: ps.IDocumentService,\r\n\t\t\tpublic emailService: ps.IEmailService,\r\n\t\t\tpublic enrollmentService: ps.IEnrollmentService,\r\n\t\t\tpublic hubService: ps.IHubService,\r\n\t\t\tpublic intakeService: ps.IIntakeService,\r\n\t\t\tpublic locationService: ps.ILocationService,\r\n public locationServiceGateway: ps.ILocationService, // This was done to continue supporting the older locationService client\r\n\t\t\tpublic miscService: ps.IMiscService,\r\n\t\t\tpublic noteService: ps.INoteService,\r\n\t\t\tpublic patientAccountService: ps.IPatientAccountService,\r\n\t\t\tpublic patientService: ps.IPatientService,\r\n\t\t\tpublic payloadStagingService: ps.IPayloadStagingService,\r\n\t\t\tpublic payorService: ps.IPayorService,\r\n\t\t\tpublic pharmacyService: ps.IPharmacyService,\r\n\t\t\tpublic prescriberService: ps.IPrescriberService,\r\n\t\t\tpublic prescriptionService: ps.IPrescriptionService,\r\n\t\t\tpublic programService: ps.IProgramService,\r\n\t\t\tpublic sessionService: ps.ISessionService,\r\n\t\t\tpublic siteService: ps.ISiteService,\r\n\t\t\tpublic siteAccountService: ps.ISiteAccountService,\r\n\t\t\tpublic surveyService: ps.ISurveyService\r\n ) { }\r\n\t}\r\n}","namespace Portico.Services {\r\n import ps = Portico.Services;\r\n import pme = Portico.Models.Enterprise;\r\n\timport gateway = Portico.Models.Gateway;\r\n\timport psga = apigateway.client;\r\n\timport psgm = apigateway.models;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n export interface IHubService {\r\n\t\tgetAccount(accountId: number): angular.IPromise;\r\n\t\tgetPatient(patientId: string): angular.IPromise;\r\n\t\tsavePatient(patient: pme.Patient): angular.IPromise;\r\n\t\tsearchAccounts(patient: pme.Patient): angular.IPromise;\r\n\t\tsearchPatients(patient: pme.Patient): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'hubService')\r\n\t@Inject('$q', 'EdgeHubApi')\r\n export class HubService implements IHubService {\r\n constructor(\r\n\t\t\tprivate $q: angular.IQService,\r\n\t\t\tprivate edgeHubApi: psga.EdgeHubApi\r\n ){}\r\n\r\n\t\tgetAccount(accountId: number) {\r\n\t\t\treturn this.$q.when(this.edgeHubApi.hubV1GetAccount({ accountId: accountId }).then(response => {\r\n\t\t\t\tresponse.data.data.account.lastModifiedTime = response.data.data.account.lastModifiedTime?.toDate();\r\n\t\t\t\tresponse.data.data.patient.dateOfBirth = response.data.data.patient.dateOfBirth?.toDate();\r\n\t\t\t\tconst account = new pme.Account(response.data.data.account);\r\n\t\t\t\taccount.patient = new pme.Patient(response.data.data.patient);\r\n\t\t\t\treturn account;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tgetPatient(patientId: string) {\r\n\t\t\treturn this.$q.when(this.edgeHubApi.hubV1GetPatient({ patientId: patientId }).then(response => {\r\n\t\t\t\tresponse.data.data.dateOfBirth = response.data.data.dateOfBirth?.toDate();\r\n\t\t\t\treturn new pme.Patient(response.data.data);\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tsavePatient(patient: pme.Patient) {\r\n\t\t\tconst request: psgm.SavePatientRequestModel = {\t\t\t\t\r\n\t\t\t\tpatientUpsearchModel: patient.mapToEnterpriseCoordinatorPatientUpsearchModelWithFlags(true, true, false)\r\n\t\t\t};\r\n\r\n\t\t\treturn this.$q.when(this.edgeHubApi.hubV1SavePatient(request).then(response => {\r\n\t\t\t\treturn response.data.data.patientId;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tsearchAccounts(patient: pme.Patient) {\r\n\t\t\tconst request = {\r\n\t\t\t\tfirstName: patient.firstName,\r\n\t\t\t\tlastName: patient.lastName,\r\n\t\t\t\tdateOfBirth: moment(patient.dateOfBirth),\r\n\t\t\t\tgender: Portico.Models.Gateway.Gender[patient.gender],\r\n\t\t\t\tcity: _.get(patient, 'addresses[0].city', ''),\r\n\t\t\t\tstate: _.get(patient, 'addresses[0].state', ''),\r\n\t\t\t\tzip: _.get(patient, 'addresses[0].zip', '')\r\n\t\t\t};\r\n\r\n\t\t\treturn this.$q.when(this.edgeHubApi.hubV1SearchAccounts(request).then(response => {\r\n\t\t\t\treturn response.data.data.map((r) => {\r\n\t\t\t\t\tconst account = new pme.Account(r.account);\r\n\t\t\t\t\taccount.patient = new pme.Patient(r.patient);\r\n\t\t\t\t\taccount.patient.ssn = r.ssn;\r\n\t\t\t\t\treturn account;\r\n\t\t\t\t});\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tsearchAccountsWithExternalId(patient: pme.Patient, externalId: string, accountExternalIdType: gateway.AccountExternalIdType ) {\r\n\t\t\tconst request = {\r\n\t\t\t\tfirstName: patient.firstName,\r\n\t\t\t\tlastName: patient.lastName,\r\n\t\t\t\tdateOfBirth: moment(patient.dateOfBirth),\r\n\t\t\t\tgender: gateway.Gender[patient.gender],\r\n\t\t\t\tcity: _.get(patient, 'addresses[0].city', ''),\r\n\t\t\t\tstate: _.get(patient, 'addresses[0].state', ''),\r\n\t\t\t\tzip: _.get(patient, 'addresses[0].zip', ''),\r\n\t\t\t\texternalId,\r\n\t\t\t\taccountExternalIdType\r\n\t\t\t};\r\n\r\n\t\t\treturn this.$q.when(this.edgeHubApi.hubV1SearchAccounts(request).then(response => {\r\n\t\t\t\treturn response.data.data.map((r) => {\r\n\t\t\t\t\tr.account.lastModifiedTime = r.account.lastModifiedTime?.toDate();\r\n\t\t\t\t\tr.patient.dateOfBirth = r.patient.dateOfBirth?.toDate();\r\n\t\t\t\t\tconst account = new pme.Account(r.account);\r\n\t\t\t\t\taccount.patient = new pme.Patient(r.patient);\r\n\t\t\t\t\taccount.patient.ssn = r.ssn;\r\n\t\t\t\t\treturn account;\r\n\t\t\t\t});\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tsearchPatients(patient: pme.Patient) {\r\n\t\t\tconst request = {\r\n\t\t\t\tfirstName: patient.firstName,\r\n\t\t\t\tlastName: patient.lastName,\r\n\t\t\t\tdateOfBirth: moment(patient.dateOfBirth),\r\n\t\t\t\taddressOne: _.get(patient, 'addresses[0].addressOne', ''),\r\n\t\t\t\tcity: _.get(patient, 'addresses[0].city', ''),\r\n\t\t\t\tstate: _.get(patient, 'addresses[0].state', ''),\r\n\t\t\t\tzip: _.get(patient, 'addresses[0].zip', '')\r\n\t\t\t};\r\n\r\n\t\t\treturn this.$q.when(this.edgeHubApi.hubV1SearchPatients(request).then(response => {\r\n\t\t\t\treturn response.data.data.map((r) => {\r\n\t\t\t\t\tr.dateOfBirth = r.dateOfBirth?.toDate();\r\n\t\t\t\t\treturn new pme.Patient(r);\r\n\t\t\t\t});\r\n\t\t\t}));\r\n\t\t}\r\n }\r\n}","namespace Portico.Services {\r\n\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport ps = Portico.Services;\r\n\timport psga = apigateway.client;\r\n\timport psgm = apigateway.models;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n\texport interface IStateOptions extends angular.ui.IStateOptions {\r\n\t\treturnTo?: string;\r\n\t}\r\n\r\n export interface IIntakeService {\r\n\t\tgetIntakeLayout: (programId: number, intakeLayoutId: number) => angular.IPromise;\r\n\t\thcpIntake: (patientIntakeRequestModel: pme.EnrollRequestModel) => angular.IPromise;\r\n\t\tisHcpIntakeAllowed(patient: pme.Patient): angular.IPromise;\r\n\t\tpatientIntake: (patientIntake: pme.EnrollRequestModel, closeIntake?: boolean, programId?: string | number ) => angular.IPromise;\r\n }\r\n\r\n @Service('app', 'intakeService')\r\n\t@Inject('$q', 'dataService', 'IntakeV1Api', 'EdgeIntakeApi')\r\n export class IntakeService implements IIntakeService {\r\n constructor(\r\n private $q: angular.IQService,\r\n\t\t\tprivate dataService: ps.IDataService,\r\n\t\t\tprivate intakeV1LayoutApi: psga.IntakeV1Api,\r\n\t\t\tprivate edgeIntakeApi : psga.EdgeIntakeApi\r\n ) { }\r\n\r\n\t\tgetIntakeLayout(programId: number, intakeLayoutId: number): angular.IPromise {\r\n\t\t\treturn this.$q.when(this.intakeV1LayoutApi.layoutGetByProgramId(intakeLayoutId.toString(), '', '').then((response: any) => {\r\n\t\t\t\tconst promises: angular.IPromise[] = [\r\n\t\t\t\t\tthis.$q.when(this.intakeV1LayoutApi.layoutSectionGet(intakeLayoutId.toString(), '', '').then((response2: any) => {\r\n\t\t\t\t\t\tresponse.data.data.layoutSections = response2.data.data;\r\n\t\t\t\t\t\treturn response2.data.data;\r\n\t\t\t\t\t})),\r\n\t\t\t\t\tthis.$q.when(this.intakeV1LayoutApi.layoutSurveyGet(intakeLayoutId.toString(), '', '').then((response2: any) => {\r\n\t\t\t\t\t\tresponse.data.data.surveyIds = response2.data.data;\r\n\t\t\t\t\t\treturn response2.data.data;\r\n\t\t\t\t\t}))\r\n\t\t\t\t];\r\n\r\n\t\t\t\treturn this.$q.all(promises).then(() => {\r\n\t\t\t\t\treturn new pme.IntakeLayout(response);\r\n\t\t\t\t});\r\n }));\r\n\t\t}\r\n\r\n\t\thcpIntake(patientIntakeRequestModel: pme.EnrollRequestModel) {\r\n\t\t\tconst temp = new pme.EnrollRequestModel(patientIntakeRequestModel);\r\n\t\t\tconst sourceId = this.dataService.getEnvironmentId('source-id');\r\n\t\t\tconst accountUpsearchRequestModel = temp.mapToEnterpriseCoordinatorAccountUpsearchRequestModel(sourceId);\r\n\r\n\t\t\tconst request = {\r\n\t\t\t\tpatientAccountUpsearch: accountUpsearchRequestModel\r\n\t\t\t} as psgm.HcpIntakeRequestModel;\r\n\r\n\t\t\treturn this.$q.when(this.edgeIntakeApi.intakeHcpIntake(request).then((response) => {\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tisHcpIntakeAllowed(patient: pme.Patient) {\r\n\t\t\tconst isIntakeAllowedRequest = {\r\n\t\t\t\tfirstName: patient.firstName,\r\n\t\t\t\tlastName: patient.lastName,\r\n\t\t\t\tzip: patient.addresses[0].zip,\r\n\t\t\t\tgender: patient.gender,\r\n\t\t\t\tdateOfBirth: moment(patient.dateOfBirth)\r\n\t\t\t} as psgm.IsHcpIntakeAllowedRequestModel;\r\n\r\n\t\t\treturn this.$q.when(this.edgeIntakeApi.intakeIsHcpIntakeAllowed(isIntakeAllowedRequest).then((response) => {\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tpatientIntake(patientIntake: pme.EnrollRequestModel, closeIntake?: boolean, programId?: string | number) {\r\n\t\t\tconst temp = new pme.EnrollRequestModel(patientIntake);\r\n\t\t\tconst sourceId = this.dataService.getEnvironmentId('source-id');\r\n\t\t\tconst accountUpsearchRequestModel = temp.mapToEnterpriseCoordinatorAccountUpsearchRequestModel(sourceId);\r\n\r\n\t\t\tconst request = {\r\n\t\t\t\tpatientAccountUpsearch: accountUpsearchRequestModel,\r\n\t\t\t\tcloseIntake\r\n\t\t\t} as psgm.PatientIntakeRequestModel;\r\n\r\n\t\t\treturn this.$q.when(this.edgeIntakeApi.intakePatientIntake(request, programId.toString()).then((response) => {\r\n\t\t\t\treturn response.data.data; \r\n\t\t\t}));\r\n\t\t}\r\n }\r\n}","namespace Portico.Services {\r\n\r\n import Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\timport pme = Portico.Models.Enterprise;\r\n import psga = apigateway.client;\r\n import psgm = apigateway.models;\r\n\r\n\texport interface ILocationService {\r\n\t\tgetCities: (zip: string) => angular.IPromise;\r\n getStates: () => angular.IPromise;\r\n getSuggestedAddress(address: pme.Address): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'locationService')\r\n\t@Inject('$q', 'spinnerOverrideService', 'LocationV1Api')\r\n\texport class LocationService implements ILocationService {\r\n constructor(\r\n private $q: angular.IQService,\r\n\t\t\tprivate spinnerOverrideService: ISpinnerOverrideService,\r\n\t\t\tprivate locationV1Api: psga.LocationV1Api\r\n ) { }\r\n\r\n\t\tgetCities(zip: string): angular.IPromise {\r\n\t\t\t//let cities: pme.City[] = this.storageService.getItem(pm.StorageType.Session, `city-${zip}-list`);\r\n\r\n\t\t\tconst promise = // cities ?\r\n // this.$q.when(cities) :\r\n this.spinnerOverrideService.withoutUntil(() => this.$q.when(this.locationV1Api.getCitiesByZip(zip).then(response => {\r\n return response.data.data;\r\n })));\r\n\r\n\t\t\treturn promise.then((response: psgm.LocationCityModel[]) => {\r\n\t\t\t\tconst temp: pme.City[] = [];\r\n\r\n\t\t\t\tfor (const city of response) {\r\n\t\t\t\t\ttemp.push(new pme.City(city));\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//this.storageService.saveItem(pm.StorageType.Session, `city-${zip}-list`, temp);\r\n\r\n\t\t\t\treturn temp;\r\n });\r\n }\r\n\r\n getSuggestedAddress(address: pme.Address): angular.IPromise {\r\n const searchAddress: psgm.LocationAddressModel = {\r\n businessName: '',\r\n line1: address.address1,\r\n line2: address.address2 || '',\r\n city: address.city,\r\n state: address.state,\r\n postalCode: address.zip\r\n };\r\n\r\n return this.$q.when(this.locationV1Api.validAddress(searchAddress).then((results) => {\r\n if (results.data.data.hasMatches) {\r\n const returnAddresses: pme.IPartialAddress[] = [];\r\n\r\n results.data.data.addresses.forEach(a => {\r\n const address: pme.IPartialAddress = {\r\n address1: a.line1 || '',\r\n address2: a.line2 || '',\r\n city: a.city || '',\r\n state: a.state || '',\r\n zip: a.postalCode\r\n };\r\n\r\n returnAddresses.push(address);\r\n });\r\n\r\n return returnAddresses;\r\n }\r\n else {\r\n return [];\r\n }\r\n }));\r\n }\r\n\r\n\t\tgetStates(): angular.IPromise {\r\n\t\t\t// let states: pme.State[] = this.storageService.getItem(pm.StorageType.Session, `state-list`);\r\n\r\n\t\t\tconst promise = // states ?\r\n\t\t\t\t// this.$q.when(states) :\r\n this.$q.when(this.locationV1Api.getAllStates().then(response => {\r\n return response.data.data;\r\n }));\r\n\r\n\t\t\treturn promise.then((response: psgm.LocationSharedStateModel[]) => {\r\n\t\t\t\tconst temp: pme.State[] = [];\r\n\r\n\t\t\t\tfor (let i = 0; i < response.length; i++) {\r\n\t\t\t\t\tconst state = response[i];\r\n\t\t\t\t\tconst length = state.description.length;\r\n\r\n\t\t\t\t\tif (state.description.charAt(length - 1) === '.') {\r\n\t\t\t\t\t\tstate.description = state.description.substring(0, length - 1);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (state.description !== 'UNKNOWN') {\r\n\t\t\t\t\t\ttemp.push(new pme.State(state));\r\n\t\t\t\t\t}\r\n }\r\n\r\n\t\t\t\t// this.storageService.saveItem(pm.StorageType.Session, `state-list`, temp);\r\n\r\n\t\t\t\treturn temp;\r\n });\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n import pme = Portico.Models.Enterprise;\r\n\r\n @Service('app', 'locationServiceClient')\r\n @Inject('apiService', 'spinnerOverrideService')\r\n export class LocationServiceClient implements ILocationService {\r\n constructor(\r\n private apiService: IApiService,\r\n private spinnerOverrideService: ISpinnerOverrideService\r\n ) { }\r\n\r\n getCities(zip: string): angular.IPromise {\r\n const endpoint = `/locationzip?zip=${zip}`;\r\n\r\n const promise = this.spinnerOverrideService.withoutUntil(() => this.apiService.getItem(endpoint));\r\n\r\n return promise.then((response: pme.City[]) => {\r\n const temp: pme.City[] = [];\r\n\r\n for (const city of response) {\r\n temp.push(new pme.City(city));\r\n }\r\n\r\n return temp;\r\n });\r\n }\r\n\r\n getStates(): angular.IPromise {\r\n const endpoint = `/locationstate`;\r\n\r\n const promise = this.apiService.getItem(endpoint);\r\n\r\n return promise.then((response: pme.State[]) => {\r\n const temp: pme.State[] = [];\r\n\r\n for (let i = 0; i < response.length; i++) {\r\n const state = response[i];\r\n const length = state.description.length;\r\n\r\n if (state.description.charAt(length - 1) === '.') {\r\n state.description = state.description.substring(0, length - 1);\r\n }\r\n\r\n if (state.description !== 'UNKNOWN') {\r\n temp.push(new pme.State(state));\r\n }\r\n }\r\n\r\n return temp;\r\n });\r\n }\r\n\r\n getSuggestedAddress(address: pme.Address): angular.IPromise {\r\n throw \"not implemented, use LocationService class instead\";\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n import Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\timport pme = Portico.Models.Enterprise;\r\n import psga = apigateway.client;\r\n import psgm = apigateway.models;\r\n\r\n export interface IMiscService {\r\n janssenGECheck: (janssenGECheckRequestModel: pme.JanssenGECheck) => angular.IPromise;\r\n }\r\n\r\n @Service('app', 'miscService')\r\n @Inject('$q', 'EdgeTempApi')\r\n export class MiscService implements IMiscService {\r\n constructor(\r\n private $q: angular.IQService,\r\n private edgeTempApi: psga.EdgeTempApi\r\n ) {}\r\n\r\n janssenGECheck(janssenGECheckRequestModel: pme.JanssenGECheck) {\r\n const requestModel: psgm.JanssenGECheckRequestModel = {\r\n tcProgramId: janssenGECheckRequestModel.tcProgramId,\r\n ndc: janssenGECheckRequestModel.ndc,\r\n patient: {\r\n firstName: janssenGECheckRequestModel.firstName,\r\n lastName: janssenGECheckRequestModel.lastName,\r\n gender: janssenGECheckRequestModel.gender,\r\n dateOfBirth: janssenGECheckRequestModel.dateOfBirth,\r\n addressLine1: janssenGECheckRequestModel.addressLine1,\r\n city: janssenGECheckRequestModel.city,\r\n state: janssenGECheckRequestModel.state,\r\n zipCode: janssenGECheckRequestModel.zipCode,\r\n },\r\n uniqueId: janssenGECheckRequestModel.uniqueId,\r\n memberNumber:janssenGECheckRequestModel.memberNumber\r\n };\r\n\r\n return this.$q.when(this.edgeTempApi.tempJanssenGeCheck(requestModel).then((response) => {\r\n return response.data.data;\r\n }));\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n\r\n import pme = Portico.Models.Enterprise;\r\n\timport psga = apigateway.client;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n\texport interface INoteService {\r\n\t\tgetTask(taskId: number): angular.IPromise;\r\n\t\tgetTasks(taskIds: number[]): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'noteService')\r\n\t@Inject('$q', 'NotesV2Api')\r\n\texport class NoteService implements INoteService {\r\n constructor(\r\n private $q: angular.IQService,\r\n\t\t\tprivate noteApi: psga.NotesV2Api\r\n ) { }\r\n\r\n getTask(taskId: number): angular.IPromise {\r\n\t\t\t// TODO: wrap in an edge call\r\n\t\t\treturn this.$q.when(this.noteApi.taskGetByProgramId(taskId).then((response) => {\r\n\t\t\t\tresponse.data.data.completionDate = response.data.data.completionDate?.toDate();\r\n\t\t\t\tresponse.data.data.createdDate = response.data.data.createdDate?.toDate();\r\n\t\t\t\tresponse.data.data.dueDate = response.data.data.dueDate?.toDate();\r\n\t\t\t\tresponse.data.data.updatedDate = response.data.data.updatedDate?.toDate();\r\n\t\t\t\treturn new pme.Task(response.data.data);\r\n }));\r\n }\r\n\r\n\t\tgetTasks(taskIds: number[]): angular.IPromise {\r\n\t\t\tconst promises: angular.IPromise[] = [];\r\n\t\t\tconst tasks: pme.Task[] = [];\r\n\r\n\t\t\tfor (const taskId of taskIds) {\r\n\t\t\t\tconst promise = this.getTask(taskId).then((response) => {\r\n\t\t\t\t\ttasks.push(new pme.Task(response));\r\n\t\t\t\t});\r\n\r\n\t\t\t\tpromises.push(promise);\r\n\t\t\t}\r\n\r\n\t\t\treturn this.$q.all(promises).then(() => {\r\n\t\t\t\treturn tasks;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t//populate(account: pme.Account): angular.IPromise {\r\n\t\t//\tconst promises: angular.IPromise[] = [];\r\n\r\n\t\t//\tfor (const task of account.tasks) {\r\n\t\t//\t\tconst promise = this.getTask(task.id).then((response) => {\r\n\t\t//\t\t\tangular.copy(response, task);\r\n\t\t//\t\t});\r\n\r\n\t\t//\t\tpromises.push(promise);\r\n\t\t//\t}\r\n\r\n\t\t//\treturn this.$q.all(promises).then(() => {\r\n\t\t//\t\treturn true;\r\n\t\t//\t});\r\n\t\t//}\r\n }\r\n}","namespace Portico.Services {\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n import ps = Portico.Services;\r\n import pme = Portico.Models.Enterprise;\r\n\timport psga = apigateway.client;\r\n\timport psgm = apigateway.models;\r\n\r\n export interface IPatientAccountService {\r\n\t\tgetAccount(): angular.IPromise;\r\n getActiveEnrollments(): angular.IPromise;\r\n\t\tgetCase(caseId: number): angular.IPromise;\r\n\t\tisPatientRegistered(patientAccountRegistration: pme.PatientAccountRegistration): angular.IPromise;\r\n patientRegistration(patientAccountRegistration: pme.PatientAccountRegistration): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'patientAccountService')\r\n @Inject('$q', 'EdgePatientAccountApi')\r\n export class PatientAccountService implements IPatientAccountService {\r\n constructor(\r\n\t\t\tprivate $q: angular.IQService,\r\n private edgePatientAccountApi: psga.EdgePatientAccountApi\r\n ){}\r\n\r\n\t\tgetAccount() {\r\n\t\t\treturn this.$q.when(this.edgePatientAccountApi.patientAccountGetPatientAccount().then(response => {\r\n\t\t\t\tresponse.data.data.account.lastModifiedTime = response.data.data.account.lastModifiedTime?.toDate();\r\n\t\t\t\tresponse.data.data.patient.dateOfBirth = response.data.data.patient.dateOfBirth?.toDate();\r\n\t\t\t\tconst account = new pme.Account(response.data.data.account);\r\n\t\t\t\taccount.patient = new pme.Patient(response.data.data.patient);\r\n\t\t\t\treturn account;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n getActiveEnrollments() {\r\n\t\t\treturn this.$q.when(this.edgePatientAccountApi.patientAccountGetPatientActiveEnrollments().then(response => {\r\n\t\t\t\tresponse.data.data.forEach(e => {\r\n\t\t\t\t\te.claimEligibilityDate = e.claimEligibilityDate?.toDate();\r\n\t\t\t\t\te.createdOn = e.createdOn?.toDate();\r\n\t\t\t\t\te.endDate = e.endDate?.toDate();\r\n\t\t\t\t\te.reenrollmentEligibilityDate = e.reenrollmentEligibilityDate?.toDate();\r\n\t\t\t\t\te.startDate = e.startDate?.toDate();\r\n\t\t\t\t\te.updatedOn = e.updatedOn?.toDate();\r\n\t\t\t\t});\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t}));\r\n }\r\n\r\n\t\tgetCase(caseId: number) {\r\n\t\t\tconst request: psgm.GetCaseRequestModel = {\r\n\t\t\t\tcaseId: caseId,\r\n\t\t\t\tincludeDiagnoses: true,\r\n\t\t\t\tincludePayors: true,\r\n\t\t\t\tincludePharmacies: true,\r\n\t\t\t\tincludePrescribers: true,\r\n\t\t\t\tincludePrescriptions: true,\r\n\t\t\t\tincludeSites: true,\r\n\t\t\t\tincludeSurveys: true\r\n\t\t\t};\r\n\r\n\t\t\treturn this.$q.when(this.edgePatientAccountApi.patientAccountGetCase(request).then(response => {\r\n\t\t\t\tresponse.data.data.accountData.lastModifiedTime = response.data.data.accountData.lastModifiedTime?.toDate();\r\n\t\t\t\tresponse.data.data.caseData.createdOn = response.data.data.caseData.createdOn?.toDate();\r\n\t\t\t\tresponse.data.data.caseData.endDate = response.data.data.caseData.endDate?.toDate();\r\n\t\t\t\tresponse.data.data.caseData.expirationDate = response.data.data.caseData.expirationDate?.toDate();\r\n\t\t\t\tresponse.data.data.caseData.startDate = response.data.data.caseData.startDate?.toDate();\r\n\t\t\t\tresponse.data.data.patientData.dateOfBirth = response.data.data.patientData.dateOfBirth?.toDate();\r\n\t\t\t\tresponse.data.data.payorData.forEach(p => {\r\n\t\t\t\t\tp.benefitData.createDate = p.benefitData.createDate?.toDate();\r\n\t\t\t\t\tp.benefitData.dateOfBirth = p.benefitData.dateOfBirth?.toDate();\r\n\t\t\t\t\tp.benefitData.planEffectiveDate = p.benefitData.planEffectiveDate?.toDate();\r\n\t\t\t\t\tp.benefitData.planExpirationDate = p.benefitData.planExpirationDate?.toDate();\r\n\t\t\t\t\tp.benefitData.planTerminationDate = p.benefitData.planTerminationDate?.toDate();\r\n\t\t\t\t});\r\n\t\t\t\tresponse.data.data.prescriptionData.forEach(p => {\r\n\t\t\t\t\tp.createdOn = p.createdOn?.toDate();\r\n\t\t\t\t\tp.updatedOn = p.updatedOn?.toDate();\r\n\t\t\t\t\tp.writtenOn = p.writtenOn?.toDate();\r\n\t\t\t\t});\r\n\t\t\t\tresponse.data.data.siteData.forEach(s => {\r\n\t\t\t\t\ts.siteData.businessEndTime = s.siteData.businessEndTime?.toDate();\r\n\t\t\t\t\ts.siteData.businessStartTime = s.siteData.businessStartTime?.toDate();\r\n\t\t\t\t});\r\n\t\t\t\tresponse.data.data.surveyData.forEach(s => {\r\n\t\t\t\t\ts.sessionData.creationTime = s.sessionData.creationTime?.toDate();\r\n\t\t\t\t});\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tisPatientRegistered(patientAccountRegistration: pme.PatientAccountRegistration) {\r\n\t\t\tconst registration = new pme.PatientAccountRegistration(patientAccountRegistration);\r\n\t\t\tconst request: psgm.IIsPatientRegisteredRequestModel = {\r\n\t\t\t\tfirstName: registration.firstName,\r\n\t\t\t\tlastName: registration.lastName,\r\n\t\t\t\tdob: moment(registration.dob),\r\n\t\t\t\tgender: registration.gender,\r\n\t\t\t\tzip: registration.zip,\r\n\t\t\t}\r\n\r\n\t\t\treturn this.$q.when(this.edgePatientAccountApi.patientAccountIsPatientRegistered(request).then(response => {\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tpatientRegistration(patientAccountRegistration: pme.PatientAccountRegistration) {\r\n\t\t\tconst registration = new pme.PatientAccountRegistration(patientAccountRegistration);\r\n\t\t\tconst request: psgm.IPatientRegistrationRequestModel = {\r\n\t\t\t\tuserName: registration.userName,\r\n\t\t\t\tpassword: registration.password,\r\n\t\t\t\tfirstName: registration.firstName,\r\n\t\t\t\tlastName: registration.lastName,\r\n\t\t\t\tdob: moment(registration.dob),\r\n\t\t\t\tgender: registration.gender,\r\n\t\t\t\tzip: registration.zip,\r\n\t\t\t\tphone: registration.phone,\r\n\t\t\t\tfax: registration.fax,\r\n\t\t\t\temail: registration.email,\r\n\t\t\t\tsendEmail: registration.sendEmail,\r\n\t\t\t\texternalId: null\r\n\t\t\t}\r\n\r\n\t\t\treturn this.$q.when(this.edgePatientAccountApi.patientAccountPatientRegistration(request).then(response => {\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n }\r\n}","namespace Portico.Services {\r\n\r\n import pme = Portico.Models.Enterprise;\r\n import pmg = Portico.Models.Gateway;\r\n import psga = apigateway.client;\r\n import psgm = apigateway.models;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n export interface IPatientService {\r\n get(patientId: string): angular.IPromise;\r\n save(patient: pme.Patient): angular.IPromise;\r\n search(patient: pme.Patient): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'patientService')\r\n\t@Inject('$q', 'PatientV3Api')\r\n export class PatientService implements IPatientService {\r\n constructor(\r\n private $q: angular.IQService,\r\n private patientApi: psga.PatientV3Api\r\n ) { }\r\n\r\n get(patientId: string): angular.IPromise {\r\n // let patient = this.storageService.getItem(pm.StorageType.Session, `patient-${patientId}`);\r\n\r\n //if (patient) {\r\n // patient = new pme.Patient(patient);\r\n // this.storageService.saveItem(pm.StorageType.Session, `patient-${patientId}`, patient);\r\n // return this.$q.when(patient);\r\n //}\r\n\r\n\t\t\t// TODO: wrap in an edge call\r\n return this.$q.when(this.patientApi.patientGetByTenantId(patientId).then((response) => {\r\n //patient = new pme.Patient(response);\r\n //this.storageService.saveItem(pm.StorageType.Session, `patient-${patientId}`, patient);\r\n //return patient;\r\n response.data.data.dateOfBirth = response.data.data.dateOfBirth?.toDate();\r\n return new pme.Patient(response.data.data);\r\n }));\r\n }\r\n\r\n save(patient: pme.Patient): angular.IPromise {\r\n const request: psgm.PatientSaveModel = {\r\n firstName: _.get(patient, 'firstName', ''),\r\n middleName: _.get(patient, 'middleName', ''),\r\n lastName: _.get(patient, 'lastName', ''),\r\n suffix: _.get(patient, 'suffix', ''),\r\n nickname: _.get(patient, 'nickName', ''),\r\n dateOfBirth: moment(_.get(patient, 'dateOfBirth', null)),\r\n gender: pmg.Gender[_.get(patient, 'gender', '')],\r\n // socialSecurityNumber: _.get(patient, 'ssn', ''),\r\n primaryLanguageId: _.toNumber(_.get(patient, 'primaryLanguageId', '')),\r\n isUsResident: _.get(patient, 'isUsResident', null),\r\n householdSize: _.get(patient, 'householdSize', null)\r\n };\r\n\r\n if (patient.id) {\r\n\t\t\t\t// TODO: wrap in an edge call\r\n return this.$q.when(this.patientApi.patientUpdateByTenantId(patient.id, request).then((response) => {\r\n return new pme.Patient(response.data);\r\n }));\r\n } else {\r\n\t\t\t\t// TODO: wrap in an edge call\r\n return this.$q.when(this.patientApi.patientCreateByTenantId(request).then((response) => {\r\n return new pme.Patient(response.data.data);\r\n }));\r\n }\r\n }\r\n\r\n\t\tsearch(patient: pme.Patient): angular.IPromise {\r\n\t\t\tconst request: psgm.PatientSearchModel = {\r\n\t\t\t\t// maxRecordCount: null,\r\n\t\t\t\tfirstName: _.get(patient, 'firstName', ''),\r\n\t\t\t\tlastName: _.get(patient, 'lastName', ''),\r\n\t\t\t\t// socialSecurityNumber: _.get(patient, 'ssn', ''),\r\n\t\t\t\tdateOfBirth: moment(_.get(patient, 'dateOfBirth', null)),\r\n\t\t\t\taddressOne: _.get(patient, 'addresses[0].address1', ''),\r\n\t\t\t\tcity: _.get(patient, 'addresses[0].city', ''),\r\n\t\t\t\tstate: _.get(patient, 'addresses[0].state', ''),\r\n\t\t\t\tzip: _.get(patient, 'addresses[0].zip', '')\r\n\t\t\t};\r\n\r\n\t\t\t// TODO: wrap in an edge call\r\n return this.$q.when(this.patientApi.patientSearchByTenantId(request).then((response) => {\r\n\t\t\t\tconst temp: pme.Patient[] = [];\r\n\r\n for (const patient of response.data.data.patients) {\r\n patient.dateOfBirth = patient.dateOfBirth?.toDate();\r\n\t\t\t\t\ttemp.push(new pme.Patient(patient));\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn temp;\r\n\t\t\t}));\r\n\t\t}\r\n }\r\n}","namespace Portico.Services {\r\n import Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n import psga = apigateway.client;\r\n import psgm = apigateway.models;\r\n\r\n export interface IPayloadStagingService {\r\n StagePayload: (request: psgm.StagePayloadRequest) => angular.IPromise\r\n }\r\n\r\n @Service('app', 'payloadStagingService')\r\n @Inject('$q', 'EdgePayloadStagingApi')\r\n export class PayloadStagingService implements IPayloadStagingService {\r\n\t\tconstructor(\r\n private $q: angular.IQService,\r\n private payloadStagingApi: psga.EdgePayloadStagingApi\r\n ){}\r\n\r\n StagePayload(request: psgm.StagePayloadRequest) {\r\n return this.$q.when(this.payloadStagingApi.payloadStagePayload(request).then(response => {\r\n return response.data;\r\n }));\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmg = Portico.Models.Gateway;\r\n\timport psga = apigateway.client;\r\n\timport psge = apigateway.enums;\r\n\timport psgm = apigateway.models;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n export interface IPayorService {\r\n\t\tget(id: number): angular.IPromise;\r\n\t\tgetPayorBenefit(accountId: number, payorId: number, role: psge.PayorType): angular.IPromise;\r\n\t\tgetPlanTypes(): angular.IPromise;\r\n\t\tpopulate(account: pme.Account): angular.IPromise;\r\n save: (payor: pme.Payor) => angular.IPromise;\r\n search(payor: pme.Payor, coverageAreaState: string, max?: number, local?: boolean, global?: boolean): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'payorService')\r\n\t@Inject('$q', 'PayorV4Api', 'PayorV4GlobalApi')\r\n export class PayorService implements IPayorService {\r\n constructor(\r\n private $q: angular.IQService,\r\n\t\t\tprivate payorV4Api: psga.PayorV4Api,\r\n\t\t\tprivate payorV4GlobalApi: psga.PayorV4GlobalApi\r\n ) { }\r\n\r\n\t\tget(id: number): angular.IPromise {\r\n\t\t\t// TODO: wrap in an edge call\r\n\t\t\treturn this.$q.when(this.payorV4Api.payorGetByTenantId(id).then((response) => {\r\n\t\t\t\treturn new pme.Payor(response.data.data);\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tgetPayorBenefit(accountId: number, payorId: number, role: psge.PayorType): angular.IPromise {\r\n\t\t\tif (role === psge.PayorType.INS) {\r\n\t\t\t\t// TODO: wrap in an edge call\r\n\t\t\t\treturn this.$q.when(this.payorV4Api.accountMedicalGet2(accountId, payorId).then((response) => {\r\n\t\t\t\t\tresponse.data.data.createDate = response.data.data.createDate?.toDate();\r\n\t\t\t\t\tresponse.data.data.dateOfBirth = response.data.data.dateOfBirth?.toDate();\r\n\t\t\t\t\tresponse.data.data.planEffectiveDate = response.data.data.planEffectiveDate?.toDate();\r\n\t\t\t\t\tresponse.data.data.planExpirationDate = response.data.data.planExpirationDate?.toDate();\r\n\t\t\t\t\tresponse.data.data.planTerminationDate = response.data.data.planTerminationDate?.toDate();\r\n\t\t\t\t\treturn new pme.PayorBenefit(response.data.data);\r\n\t\t\t\t}));\r\n\t\t\t} else if (role === psge.PayorType.PBM) {\r\n\t\t\t\t// TODO: wrap in an edge call\r\n\t\t\t\treturn this.$q.when(this.payorV4Api.accountPharmacyGet2(accountId, payorId).then((response) => {\r\n\t\t\t\t\tresponse.data.data.createDate = response.data.data.createDate?.toDate();\r\n\t\t\t\t\tresponse.data.data.dateOfBirth = response.data.data.dateOfBirth?.toDate();\r\n\t\t\t\t\tresponse.data.data.planEffectiveDate = response.data.data.planEffectiveDate?.toDate();\r\n\t\t\t\t\tresponse.data.data.planExpirationDate = response.data.data.planExpirationDate?.toDate();\r\n\t\t\t\t\tresponse.data.data.planTerminationDate = response.data.data.planTerminationDate?.toDate();\r\n\t\t\t\t\treturn new pme.PayorBenefit(response.data.data);\r\n\t\t\t\t}));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tgetPlanTypes(): angular.IPromise {\r\n\t\t\treturn this.$q.when(this.payorV4Api.planTypeGet().then((response) => {\r\n\t\t\t\treturn response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tpopulate(account: pme.Account): angular.IPromise {\r\n\t\t\tconst promises: angular.IPromise[] = [];\r\n\r\n\t\t\tfor (const relationship of account.payorRelationships) {\r\n\t\t\t\tif (!relationship.payor) {\r\n\t\t\t\t\tpromises.push(this.get(relationship.payorId).then((payor) => {\r\n\t\t\t\t\t\trelationship.payor = payor;\r\n\t\t\t\t\t}));\r\n\r\n\t\t\t\t\tpromises.push(this.getPayorBenefit(account.id, relationship.payorId, relationship.role).then((benefit) => {\r\n\t\t\t\t\t\trelationship.payorBenefit = benefit;\r\n\t\t\t\t\t}));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn this.$q.all(promises).then(() => {\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsave(payor: pme.Payor): angular.IPromise {\r\n\t\t\tconst request: DeepPartial = {\r\n\t\t\t\tpayorName: _.get(payor, 'name') || '',\r\n\t\t\t\tpayorType: _.get(payor, 'type') || pmg.RoleType.INSURANCEPROVIDER,\r\n\t\t\t\tpayorBin: _.get(payor, 'bin') || '',\r\n\t\t\t\tpayorPcn: _.get(payor, 'pcn') || '',\r\n\t\t\t\tpayorGroup: _.get(payor, 'group') || '',\r\n\t\t\t\tisPlaceholder: false\r\n\t\t\t};\r\n\r\n\t\t\tif (payor.id) {\r\n\t\t\t\t// TODO: wrap in an edge call\r\n\t\t\t\treturn this.$q.when(this.payorV4Api.payorUpdateByTenantId(payor.id, request).then((response) => {\r\n\t\t\t\t\treturn new pme.Payor(response.data as any);\r\n\t\t\t\t}));\r\n\t\t\t} else {\r\n\t\t\t\t// TODO: wrap in an edge call\r\n\t\t\t\treturn this.$q.when(this.payorV4Api.payorCreateByTenantId(request).then((response) => {\r\n\t\t\t\t\tpayor.id = response.data.data;\r\n\t\t\t\t\treturn new pme.Payor(payor);\r\n\t\t\t\t}));\r\n\t\t\t}\r\n }\r\n\r\n\t\tsearch(payor: pme.Payor, stateCoverageArea: string = '', max: number = 50, local: boolean = false, global: boolean = true): angular.IPromise {\r\n\t\t\tconst request: DeepPartial = {\r\n\t\t\t\tmaxRecordCount: max,\r\n\t\t\t\tpayorType: _.get(payor, 'type') || 0,\r\n\t\t\t\tpayorName: _.get(payor, 'name') || '',\r\n\t\t\t\tpayorGroup: _.get(payor, 'group') || '',\r\n\t\t\t\tpayorBin: _.get(payor, 'bin') || '',\r\n\t\t\t\tpayorPcn: _.get(payor, 'pcn') || '',\r\n\t\t\t\taddressOne: _.get(payor, 'addresses[0].address1') || '',\r\n\t\t\t\tcity: _.get(payor, 'addresses[0].city') || '',\r\n\t\t\t\tstate: _.get(payor, 'addresses[0].state') || '',\r\n zip: _.get(payor, 'addresses[0].zip') || '',\r\n coverageAreaState: stateCoverageArea || '',\r\n\t\t\t\tisPlaceholder: false\r\n\t\t\t};\r\n\r\n\t\t\tconst localPromise: angular.IPromise = local ?\r\n\t\t\t\t// TODO: wrap in an edge call\r\n\t\t\t\tthis.$q.when(this.payorV4Api.payorSearchByTenantId(request).then(response => { return response.data.data; })) :\r\n\t\t\t\tthis.$q.when({ payors: [] });\r\n\r\n\t\t\tconst globalPromise: angular.IPromise = global ?\r\n\t\t\t\t// TODO: wrap in an edge call\r\n\t\t\t\tthis.$q.when(this.payorV4GlobalApi.globalPayorSearchByTenantId(request).then(response => { return response.data.data; })) :\r\n\t\t\t\tthis.$q.when({ payors: [] });\r\n\r\n\t\t\treturn this.$q.all({ lp: localPromise, gp: globalPromise }).then((response) => {\r\n\t\t\t\tconst payors: pme.Payor[] = [];\r\n\t\t\t\tconst temp = _.unionWith(response.lp.payors, response.gp.payors, (a, b) => {\r\n\t\t\t\t\treturn a.payorName === b.payorName && _.get(a, 'addresses[0].state', '') === _.get(b, 'addresses[0].state', '');\r\n\t\t\t\t});\r\n\r\n\t\t\t\tfor (const payor of temp) {\r\n\t\t\t\t\tpayors.push(new pme.Payor(payor));\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn payors;\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}","namespace Portico.Services {\r\n\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport psga = apigateway.client;\r\n\timport psgm = apigateway.models;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n export interface IPharmacyService {\r\n\t\tget(pharmacyId: number): angular.IPromise;\r\n\t\tpopulate(account: pme.Account): angular.IPromise;\r\n\t\tsave(pharmacy: pme.Pharmacy): angular.IPromise;\r\n\t\tsearch(pharmacy: pme.Pharmacy): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'pharmacyService')\r\n\t@Inject('$q', 'PharmacyV2Api')\r\n export class PharmacyService implements IPharmacyService {\r\n constructor(\r\n private $q: angular.IQService,\r\n\t\t\tprivate pharmacyV2Api: psga.PharmacyV2Api\r\n ) { }\r\n\r\n\t\tget(pharmacyId: number): angular.IPromise {\r\n\t\t\t// TODO: wrap in an edge call\r\n\t\t\treturn this.$q.when(this.pharmacyV2Api.pharmacyGetByTenantId(pharmacyId).then((response) => {\r\n\t\t\t\treturn new pme.Pharmacy(response.data.data);\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tpopulate(account: pme.Account): angular.IPromise {\r\n\t\t\tconst promises: angular.IPromise[] = [];\r\n\r\n\t\t\tfor (const relationship of account.pharmacyRelationships) {\r\n\t\t\t\tif (!relationship.pharmacy) {\r\n\t\t\t\t\tconst promise = this.get(relationship.pharmacyId).then((pharmacy) => {\r\n\t\t\t\t\t\trelationship.pharmacy = pharmacy;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tpromises.push(promise);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn this.$q.all(promises).then(() => {\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsave(pharmacy: pme.Pharmacy): angular.IPromise {\r\n\t\t\tconst request: DeepPartial = {\r\n\t\t\t\tpharmacyId: _.toNumber(pharmacy.id),\r\n\t\t\t\tpharmacyName: _.get(pharmacy, 'name', ''),\r\n\t\t\t\tnabp: _.get(pharmacy, 'nabp', ''),\r\n\t\t\t\tnpi: _.get(pharmacy, 'npi', ''),\r\n\t\t\t\tpharmacyType: _.toNumber(pharmacy.type),\r\n\t\t\t\tpharmacySpecialization: _.toNumber(pharmacy.specialization),\r\n\t\t\t\taddresses: _.map(pharmacy.addresses, (v) => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\taddressId: v.id,\r\n\t\t\t\t\t\taddressType: _.toNumber(v.type),\r\n\t\t\t\t\t\taddressOne: _.get(v, 'address1', ''),\r\n\t\t\t\t\t\taddressTwo: _.get(v, 'address2', ''),\r\n\t\t\t\t\t\tcity: _.get(v, 'city', ''),\r\n\t\t\t\t\t\tstate: _.get(v, 'state', ''),\r\n\t\t\t\t\t\tzip: _.get(v, 'zip', ''),\r\n\t\t\t\t\t\tcountry: _.get(v, 'country', '')\r\n\t\t\t\t\t};\r\n\t\t\t\t}),\r\n\t\t\t\tcontacts: _.map(pharmacy.contacts, (v) => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tcontactId: v.id,\r\n\t\t\t\t\t\tcontactType: _.toNumber(v.type),\r\n\t\t\t\t\t\tfirstName: _.get(v, 'firstName', ''),\r\n\t\t\t\t\t\tlastName: _.get(v, 'lastName', ''),\r\n\t\t\t\t\t\toccupationDescription: _.get(v, 'occupationDescription', ''),\r\n\t\t\t\t\t\taddresses: _.map(v.addresses, (u) => {\r\n\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\taddressId: u.id,\r\n\t\t\t\t\t\t\t\taddressType: _.toNumber(u.type),\r\n\t\t\t\t\t\t\t\taddressOne: _.get(u, 'address1', ''),\r\n\t\t\t\t\t\t\t\taddressTwo: _.get(u, 'address2', ''),\r\n\t\t\t\t\t\t\t\tcity: _.get(u, 'city', ''),\r\n\t\t\t\t\t\t\t\tstate: _.get(u, 'state', ''),\r\n\t\t\t\t\t\t\t\tzip: _.get(u, 'zip', ''),\r\n\t\t\t\t\t\t\t\tcountry: _.get(u, 'country', '')\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}),\r\n\t\t\t\t\t\temailAddresses: _.map(v.emailAddresses, (u) => {\r\n\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\temailAddressId: u.id,\r\n\t\t\t\t\t\t\t\temailAddressType: _.toNumber(u.type),\r\n\t\t\t\t\t\t\t\taddress: _.get(v, 'address', ''),\r\n\t\t\t\t\t\t\t\tlanguage: _.get(v, 'language', '')\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}),\r\n\t\t\t\t\t\tphoneNumbers: _.map(v.phoneNumbers, (u) => {\r\n\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\tphoneId: u.id,\r\n\t\t\t\t\t\t\t\tphoneType: _.toNumber(u.type),\r\n\t\t\t\t\t\t\t\tphonePurpose: _.toNumber(u.purpose),\r\n\t\t\t\t\t\t\t\tphoneNumber: _.get(v, 'number', ''),\r\n\t\t\t\t\t\t\t\textension: _.get(v, 'extension', ''),\r\n\t\t\t\t\t\t\t\tcontactDatePreferenceType: _.toNumber(u.contactDatePreferenceType),\r\n\t\t\t\t\t\t\t\tbestDaysToCall: _.get(v, 'bestDaysToCall', ''),\r\n\t\t\t\t\t\t\t\tcontactTimePreferenceType: _.toNumber(u.contactTimePreferenceType),\r\n\t\t\t\t\t\t\t\tbestTimeToCall: _.get(v, 'bestTimeToCall', ''),\r\n\t\t\t\t\t\t\t\tlanguage: _.get(v, 'language', ''),\r\n\t\t\t\t\t\t\t\ttimeZone: _.get(v, 'timeZone', '')\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}),\r\n\t\t\t\t\t\twebAddresses: _.map(v.webAddresses, (u) => {\r\n\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\twebAddressId: u.id,\r\n\t\t\t\t\t\t\t\twebAddressType: _.toNumber(u.type),\r\n\t\t\t\t\t\t\t\turl: _.get(v, 'url', '')\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t};\r\n\t\t\t\t}),\r\n\t\t\t\tphoneNumbers: _.map(pharmacy.phoneNumbers, (v) => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tphoneId: v.id,\r\n\t\t\t\t\t\tphoneType: _.toNumber(v.type),\r\n\t\t\t\t\t\tphonePurpose: _.toNumber(v.purpose),\r\n\t\t\t\t\t\tphoneNumber: _.get(v, 'number', ''),\r\n\t\t\t\t\t\textension: _.get(v, 'extension', ''),\r\n\t\t\t\t\t\tcontactDatePreferenceType: _.toNumber(v.contactDatePreferenceType),\r\n\t\t\t\t\t\tbestDaysToCall: _.get(v, 'bestDaysToCall', ''),\r\n\t\t\t\t\t\tcontactTimePreferenceType: _.toNumber(v.contactTimePreferenceType),\r\n\t\t\t\t\t\tbestTimeToCall: _.get(v, 'bestTimeToCall', ''),\r\n\t\t\t\t\t\tlanguage: _.get(v, 'language', ''),\r\n\t\t\t\t\t\ttimeZone: _.get(v, 'timeZone', '')\r\n\t\t\t\t\t};\r\n\t\t\t\t}),\r\n\t\t\t\temailAddresses: _.map(pharmacy.emailAddresses, (v) => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\temailAddressId: v.id,\r\n\t\t\t\t\t\temailAddressType: _.toNumber(v.type),\r\n\t\t\t\t\t\taddress: _.get(v, 'address', ''),\r\n\t\t\t\t\t\tlanguage: _.get(v, 'language', '')\r\n\t\t\t\t\t};\r\n\t\t\t\t}),\r\n\t\t\t\twebAddresses: _.map(pharmacy.webAddresses, (v) => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\twebAddressId: v.id,\r\n\t\t\t\t\t\twebAddressType: _.toNumber(v.type),\r\n\t\t\t\t\t\turl: _.get(v, 'url', '')\r\n\t\t\t\t\t};\r\n\t\t\t\t})\r\n\t\t\t};\r\n\r\n\t\t\t// TODO: wrap in an edge call\r\n\t\t\treturn this.$q.when(this.pharmacyV2Api\r\n\t\t\t\t.pharmacyUpsearchByTenantId({\r\n\t\t\t\t\tcanInsert: true,\r\n\t\t\t\t\tcanUpdate: true,\r\n\t\t\t\t\tskipSearch: false,\r\n\t\t\t\t\tmodel: request\r\n\t\t\t\t}).then((response) => {\r\n\t\t\t\t\treturn new pme.Pharmacy(response.data.data);\r\n\t\t\t\t}));\r\n }\r\n\r\n\t\tsearch(pharmacy: pme.Pharmacy): angular.IPromise {\r\n\t\t\tconst request: DeepPartial = {\r\n\t\t\t\tmaxRecordCount: 20,\r\n\t\t\t\tpharmacyName: _.get(pharmacy, 'name', ''),\r\n\t\t\t\tnpi: _.get(pharmacy, 'npi', ''),\r\n\t\t\t\tnabp: _.get(pharmacy, 'nabp', ''),\r\n\t\t\t\tcity: _.get(pharmacy, 'addresses[0].city', ''),\r\n\t\t\t\tstate: _.get(pharmacy, 'addresses[0].state', ''),\r\n\t\t\t\tzip: _.get(pharmacy, 'addresses[0].zip', ''),\r\n\t\t\t\tphoneNumber: _.get(pharmacy, 'phoneNumbers[0].number', ''),\r\n\t\t\t\tphoneType: _.get(pharmacy, 'phoneNumbers[0].type', 0)\r\n\t\t\t};\r\n\r\n\t\t\t// TODO: wrap in an edge call\r\n\t\t\treturn this.$q.when(this.pharmacyV2Api.pharmacySearchByTenantId(request).then((response) => {\r\n\t\t\t\tconst temp: pme.Pharmacy[] = [];\r\n\r\n\t\t\t\tfor (const pharmacy of response.data.data.pharmacies) {\r\n\t\t\t\t\ttemp.push(new pme.Pharmacy(pharmacy));\r\n }\r\n\r\n\t\t\t\treturn temp;\r\n }));\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmg = Portico.Models.Gateway;\r\n\timport psga = apigateway.client;\r\n\timport psgm = apigateway.models;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n export interface IPrescriberService {\r\n\t\tcreate(addresses?: number, emailAddresses?: number, externalIds?: number, phoneNumbers?: number, prescriberLicenses?: number): angular.IPromise;\r\n\t\tget(prescriberId: number): angular.IPromise;\r\n\t\tpopulate(account: pme.Account): angular.IPromise;\r\n\t\tsave(prescriber: pme.Prescriber): angular.IPromise;\r\n\t\tsearch(prescriber: pme.Prescriber): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'prescriberService')\r\n\t@Inject('$q', 'PrescriberV3Api')\r\n export class PrescriberService implements IPrescriberService {\r\n constructor(\r\n private $q: angular.IQService,\r\n\t\t\tprivate prescriberV3Api: psga.PrescriberV3Api\r\n ) { }\r\n\r\n\t\tcreate(addresses: number = 0, emailAddresses: number = 0, externalIds: number = 0, phoneNumbers: number = 0, prescriberLicenses: number = 0): angular.IPromise {\r\n\t\t\tconst prescriber = new pme.Prescriber();\r\n\r\n\t\t\tfor (let i = 0; i < addresses; i++) {\r\n\t\t\t\tprescriber.addAddress();\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < emailAddresses; i++) {\r\n\t\t\t\tprescriber.addEmailAddress();\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < externalIds; i++) {\r\n\t\t\t\tprescriber.addExternalId();\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < phoneNumbers; i++) {\r\n\t\t\t\tprescriber.addPhoneNumber();\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < prescriberLicenses; i++) {\r\n\t\t\t\tprescriber.addPrescriberLicense();\r\n\t\t\t}\r\n\r\n\t\t\treturn this.$q.when(prescriber);\r\n\t\t}\r\n\r\n\t\tget(prescriberId: number): angular.IPromise {\r\n\t\t\t// TODO: wrap in an edge call\r\n\t\t\treturn this.$q.when(this.prescriberV3Api.prescriberGetByTenantId(prescriberId).then((response) => {\r\n\t\t\t\treturn new pme.Prescriber(response.data.data);\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\t/** @deprecated */\r\n\t\tlength(account: pme.Account): number {\r\n\t\t\treturn account.prescriberRelationships.length;\r\n\t\t}\r\n\r\n\t\tpopulate(account: pme.Account): angular.IPromise {\r\n\t\t\tconst promises: angular.IPromise[] = [];\r\n\r\n\t\t\tfor (const relationship of account.prescriberRelationships) {\r\n\t\t\t\tif (!relationship.prescriber) {\r\n\t\t\t\t\tconst promise = this.get(relationship.prescriberId).then((response) => {\r\n\t\t\t\t\t\trelationship.prescriber = response;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tpromises.push(promise);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn this.$q.all(promises).then(() => {\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsave(prescriber: pme.Prescriber): angular.IPromise {\r\n\t\t\tconst request: psgm.PrescriberUpsearchModel = {\r\n\t\t\t\tprescriberId: _.toNumber(prescriber.id),\r\n\t\t\t\tfirstName: _.get(prescriber, 'firstName', ''),\r\n\t\t\t\tmiddleName: _.get(prescriber, 'middleName', ''),\r\n\t\t\t\tlastName: _.get(prescriber, 'lastName', ''),\r\n\t\t\t\tsuffix: _.get(prescriber, 'suffix', ''),\r\n\t\t\t\tnickname: _.get(prescriber, 'nickName', ''),\r\n\t\t\t\tnpi: _.get(prescriber, 'npi', ''),\r\n\t\t\t\ttaxId: _.get(prescriber, 'taxId', ''),\r\n\t\t\t\texternalIds: _.map(prescriber.externalIds, (v) => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tid: v.id,\r\n\t\t\t\t\t\texternalIdType: _.toNumber(v.type),\r\n\t\t\t\t\t\texternalId: _.get(v, 'value', '')\r\n\t\t\t\t\t};\r\n\t\t\t\t}),\r\n\t\t\t\taddresses: _.map(prescriber.addresses, (v) => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\taddressId: v.id,\r\n\t\t\t\t\t\taddressType: _.toNumber(v.type),\r\n\t\t\t\t\t\taddressOne: _.get(v, 'address1', ''),\r\n\t\t\t\t\t\taddressTwo: _.get(v, 'address2', ''),\r\n\t\t\t\t\t\tcity: _.get(v, 'city', ''),\r\n\t\t\t\t\t\tstate: _.get(v, 'state', ''),\r\n\t\t\t\t\t\tzip: _.get(v, 'zip', ''),\r\n\t\t\t\t\t\tcountry: _.get(v, 'country', '')\r\n\t\t\t\t\t};\r\n\t\t\t\t}),\r\n\t\t\t\tphoneNumbers: _.map(prescriber.phoneNumbers, (v) => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tphoneId: v.id,\r\n\t\t\t\t\t\tphoneType: _.toNumber(v.type),\r\n\t\t\t\t\t\tphonePurpose: _.toNumber(v.purpose),\r\n\t\t\t\t\t\tphoneNumber: _.get(v, 'number', ''),\r\n\t\t\t\t\t\textension: _.get(v, 'extension', ''),\r\n\t\t\t\t\t\tcontactDatePreferenceType: _.toNumber(v.contactDatePreferenceType),\r\n\t\t\t\t\t\tbestDaysToCall: _.get(v, 'bestDaysToCall', ''),\r\n\t\t\t\t\t\tcontactTimePreferenceType: _.toNumber(v.contactTimePreferenceType),\r\n\t\t\t\t\t\tbestTimeToCall: _.get(v, 'bestTimeToCall', ''),\r\n\t\t\t\t\t\tlanguage: _.get(v, 'language', ''),\r\n\t\t\t\t\t\ttimeZone: _.get(v, 'timeZone', '')\r\n\t\t\t\t\t};\r\n\t\t\t\t}),\r\n\t\t\t\temailAddresses: _.map(prescriber.emailAddresses, (v) => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\temailAddressId: v.id,\r\n\t\t\t\t\t\temailAddressType: _.toNumber(v.type),\r\n\t\t\t\t\t\taddress: _.get(v, 'address', ''),\r\n\t\t\t\t\t\tlanguage: _.get(v, 'language', '')\r\n\t\t\t\t\t};\r\n\t\t\t\t}),\r\n\t\t\t\tprescriberLicenses: _.map(prescriber.prescriberLicenses, (v) => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tprescriberLicenseId: v.prescriberLicenseId,\r\n\t\t\t\t\t\tlicenseType: _.toNumber(v.licenseType),\r\n\t\t\t\t\t\tlicenseNumber: _.get(v, 'licenseNumber', '')\r\n\t\t\t\t\t};\r\n\t\t\t\t})\r\n\t\t\t};\r\n\r\n\t\t\t// TODO: wrap in an edge call\r\n\t\t\treturn this.$q.when(this.prescriberV3Api.prescriberUpsearchByTenantId({\r\n\t\t\t\tcanInsert: true,\r\n\t\t\t\tcanUpdate: true,\r\n\t\t\t\tskipSearch: false,\r\n\t\t\t\tmodel: request\r\n\t\t\t}).then((response) => {\r\n\t\t\t\treturn new pme.Prescriber(response.data.data);\r\n\t\t\t}));\r\n }\r\n\r\n\t\tsearch(prescriber: pme.Prescriber): angular.IPromise {\r\n\t\t\tconst request: DeepPartial = {\r\n\t\t\t\tmaxRecordCount: 20,\r\n\t\t\t\tfirstName: _.get(prescriber, 'firstName', ''),\r\n\t\t\t\tlastName: _.get(prescriber, 'lastName', ''),\r\n\t\t\t\tdea: _.get(_.find(_.get(prescriber, 'externalIds', []), { type: pmg.ExternalIdType.DEANUMBER } as any), 'value', ''), // 5: DEANUMBER\r\n\t\t\t\tnpi: _.get(_.find(_.get(prescriber, 'externalIds', []), { type: pmg.ExternalIdType.NPINUMBER } as any), 'value', ''), // 6: NPINUMBER\r\n\t\t\t\tstateLicenseId: _.get(_.find(_.get(prescriber, 'externalIds', []), { type: pmg.ExternalIdType.STATELICENSENUMBER } as any), 'value', ''), // 9: STATELICENSENUMBER\r\n\t\t\t\tprescriberTaxId: _.get(_.find(_.get(prescriber, 'externalIds', []), { type: pmg.ExternalIdType.MEDICALID } as any), 'value', ''), // 12: MEDICALID\r\n\t\t\t\taddressOne: _.get(prescriber, 'addresses[0].address1', ''),\r\n\t\t\t\tcity: _.get(prescriber, 'addresses[0].city', ''),\r\n\t\t\t\tstate: _.get(prescriber, 'addresses[0].state', ''),\r\n\t\t\t\tzip: _.get(prescriber, 'addresses[0].zip', ''),\r\n\t\t\t\texternalIdType: null,\r\n\t\t\t\texternalId: ''\r\n\t\t\t};\r\n\r\n\t\t\t// TODO: wrap in an edge call\r\n\t\t\treturn this.$q.when(this.prescriberV3Api.prescriberSearchByTenantId(request).then((response) => {\r\n\t\t\t\tconst temp: pme.Prescriber[] = [];\r\n\r\n\t\t\t\tfor (const prescriber of response.data.data.prescribers) {\r\n\t\t\t\t\ttemp.push(new pme.Prescriber(prescriber));\r\n }\r\n\r\n\t\t\t\treturn temp;\r\n }));\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport psga = apigateway.client;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n export interface IPrescriptionService {\r\n\t\tgetByAccountId(programId: number, accountId: number): angular.IPromise;\r\n\t\tgetNdcList: (programId: number) => angular.IPromise;\r\n\t\tpopulate(programId: number, account: pme.Account): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'prescriptionService')\r\n\t@Inject('$q', 'PrescriptionV1Api')\r\n export class PrescriptionService implements IPrescriptionService {\r\n constructor(\r\n private $q: angular.IQService,\r\n\t\t\tprivate prescriptionV1Api: psga.PrescriptionV1Api\r\n ) { }\r\n\r\n\t\tgetByAccountId(programId: number, accountId: number): angular.IPromise {\r\n\t\t\t// TODO: wrap in an edge call\r\n\t\t\treturn this.$q.when(this.prescriptionV1Api.accountPrescriptionGet(accountId.toString(), programId.toString(), '5').then((response) => {\r\n\t\t\t\tconst temp: pme.Prescription[] = [];\r\n\r\n\t\t\t\tfor (let prescription of response.data.data) {\r\n\t\t\t\t\ttemp.push(new pme.Prescription(prescription));\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn temp;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tgetNdcList(programId: number): angular.IPromise {\r\n\t\t\t//let ndcList: pme.Ndc[] = this.storageService.getItem(pm.StorageType.Session, `ndc-${programId}-list`);\r\n\r\n\t\t\tconst promise = //ndcList ?\r\n\t\t\t\t//this.$q.when(ndcList) :\r\n\t\t\t\tthis.$q.when(this.prescriptionV1Api.programIdByProgramId('', '').then((response: any) => {\r\n\t\t\t\t\treturn response.data.Data;\r\n\t\t\t\t}));\r\n\r\n\t\t\treturn promise.then((response: pme.Ndc[]) => {\r\n\t\t\t\tconst temp: pme.Ndc[] = [];\r\n\r\n\t\t\t\tfor (const ndc of response) {\r\n\t\t\t\t\ttemp.push(new pme.Ndc(ndc));\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//this.storageService.saveItem(pm.StorageType.Session, `ndc-${programId}-list`, temp);\r\n\r\n\t\t\t\treturn temp;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tpopulate(programId: number, account: pme.Account): angular.IPromise {\r\n\t\t\treturn this.getByAccountId(programId, account.id).then((prescriptions) => {\r\n\t\t\t\taccount.prescriptions = prescriptions;\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t}\r\n }\r\n}","namespace Portico.Services {\r\n\r\n import ent = Portico.Models.Enterprise;\r\n import psga = apigateway.client;\r\n import psgm = apigateway.models;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n export interface IProgramService {\r\n //get: () => angular.IPromise;\r\n //getByCode: (code: string) => angular.IPromise;\r\n //getByTenantId: (tenantId: number) => angular.IPromise;\r\n }\r\n\r\n @Service('app', 'programService')\r\n @Inject('$q', 'apiService', 'ProgramV2Api')\r\n export class ProgramService implements IProgramService {\r\n constructor(\r\n private $q: angular.IQService,\r\n private apiService: IApiService,\r\n private programV2Api: psga.ProgramV2Api\r\n ) { }\r\n\r\n //get(): angular.IPromise {\r\n // return this.programV2Api.getByTenantId(null, null, null).then((response) => {\r\n // const programs: ent.Program[] = [];\r\n\r\n // for (const program of response) {\r\n // programs.push(new ent.Program(program));\r\n // }\r\n\r\n // return programs;\r\n // });\r\n //}\r\n\r\n //getByCode(code: string): angular.IPromise {\r\n // return this.programV2Api.getByTenantId(code, null, null).then((response) => {\r\n // return new ent.Program(response[0]);\r\n // });\r\n //}\r\n\r\n //getByTenantId(tenantId: number): angular.IPromise {\r\n // return this.programV2Api.getByTenantId(null, null, null).then((response) => {\r\n // const programs: ent.Program[] = [];\r\n\r\n // for (const program of response) {\r\n // programs.push(new ent.Program(program));\r\n // }\r\n\r\n // return programs;\r\n // });\r\n //}\r\n }\r\n}","namespace Portico.Services {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\timport pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\r\n\texport interface ISessionService {\r\n\t\tgetApplication: (name: string) => angular.IPromise;\r\n\t\tsaveApplication: (application: pme.Application) => angular.IPromise;\r\n\r\n\t\tgetExistingSession(): pm.SessionDetail;\r\n\t\tgetJwt(): string;\r\n\t\twipeLocalSessions(): void;\r\n\t\tsaveNewSession(jwt: string, sessionDetail: pm.SessionDetail, request: pm.AuthenticationRequest, childSessionData: pm.ChildSessionData[]): void;\r\n\t\tupdateCurrentSessionExpiration(expirationDate: Date): void;\r\n\t}\r\n\r\n\t@Service('app', 'sessionService')\r\n\t@Inject('$http', '$q', '$window', 'apiService', 'dataService', 'serverConstants', 'storageService')\r\n\texport class SessionService implements ISessionService {\r\n\t\tconstructor(\r\n\t\t\tprotected $http: ng.IHttpService,\r\n\t\t\tprotected $q: ng.IQService,\r\n\t\t\tprotected $window: ng.IWindowService,\r\n\t\t\tprotected apiService: IApiService,\r\n\t\t\tprotected dataService: Portico.Services.IDataService,\r\n\t\t\tprotected serverConstants: Portico.Models.Interfaces.IServerConstants,\r\n\t\t\tprotected storageService: Portico.Services.IStorageService,\r\n\t\t) {\r\n\t\t\tthis.$http.defaults.headers.common['accept'] = 'application/json';\r\n\t\t\tthis.$http.defaults.headers.common[\"X-Requested-With\"] = 'XMLHttpRequest';\r\n\t\t}\r\n\r\n\t\tgetApplication(name: string): angular.IPromise {\r\n\t\t\tconst endpoint = `/sessionapplication/${name}`;\r\n\r\n\t\t\treturn this.apiService.getItem(endpoint).then((response) => {\r\n\t\t\t\treturn new pme.Application(response);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsaveApplication(application: pme.Application): angular.IPromise {\r\n\t\t\tconst endpoint = `/sessionapplication`;\r\n\r\n\t\t\treturn this.apiService.saveItem(endpoint, application).then((response: pme.IApplication) => {\r\n\t\t\t\treturn new pme.Application(response);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t/****** Public Methods ******/\r\n\r\n\t\t// Gets the current main/parent session\r\n\t\tpublic getExistingSession(): pm.SessionDetail {\r\n\t\t\tconst sessionKeyName = this.getSessionKeyName();\r\n\t\t\treturn this.storageService.getItem(pm.StorageType.Session, sessionKeyName) as pm.SessionDetail;\r\n\t\t}\r\n\r\n\t\t// Updates the current main/parent session and child sessions if needed\r\n\t\tpublic updateCurrentSessionExpiration(expirationDate: Date): void {\r\n\t\t\tconst parentPortalId: string = this.storageService.getItem(pm.StorageType.Session, 'parent');\r\n\t\t\tconst sessionKeyName = this.getSessionKeyName();\r\n\t\t\tconst existingSession = this.getExistingSession();\r\n\r\n\t\t\texistingSession.status = Models.SESSION_ACTIVE;\r\n\t\t\texistingSession.expirationDate = expirationDate;\r\n\t\t\tthis.storageService.saveItem(Models.StorageType.Session, sessionKeyName, existingSession);\r\n\r\n\t\t\tif (parentPortalId) {\r\n\t\t\t\tthis.touchChildExpirations(parentPortalId, existingSession.expirationDate);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Gets the JWT for the main/parent session\r\n\t\tpublic getJwt(): string {\r\n\t\t\tconst jwtTokenName = this.getJwtKeyName();\r\n\t\t\treturn this.storageService.getItem(Models.StorageType.Session, jwtTokenName);\r\n\t\t}\r\n\r\n\t\t// Used to save a new main/parent session\r\n\t\tpublic saveNewSession(jwt: string, sessionDetail: pm.SessionDetail,\r\n\t\t\trequest: pm.AuthenticationRequest,\r\n\t\t\tchildSessionData: pm.ChildSessionData[] = null): void {\r\n\r\n\t\t\tthis.storageService.saveItem(Models.StorageType.Session, this.dataService.jwtTokenKeyName, jwt);\r\n\t\t\tthis.storageService.saveItem(Models.StorageType.Session, this.dataService.sessionKeyName, sessionDetail);\r\n\r\n\t\t\tif (sessionDetail.isParent) {\r\n\t\t\t\tthis.storageService.saveItem(Models.StorageType.Session, 'parent', request.portalId);\r\n\t\t\t\tthis.persistChildSessions(request.portalId, childSessionData, sessionDetail.expirationDate, request.userName);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Erases all session key data from local session storage\r\n\t\tpublic wipeLocalSessions(): void {\r\n\t\t\tconst parentPortalId: string = this.storageService.getItem(pm.StorageType.Session, 'parent') ?\r\n\t\t\t\tthis.storageService.getItem(pm.StorageType.Session, 'parent') : this.serverConstants.portalId;\r\n\r\n\t\t\tconst parentSession = this.storageService.getItem(pm.StorageType.Session, `${pm.SESSION_STORAGE_KEY}-${parentPortalId}`) as pm.SessionDetail;\r\n\r\n\t\t\tif (parentSession.isParent) {\r\n\t\t\t\tthis.storageService.deleteItem(pm.StorageType.Session, 'parent');\r\n\r\n\t\t\t\t// delete child sessions\r\n\t\t\t\tfor (var x in sessionStorage) {\r\n\t\t\t\t\tif (x.indexOf('ngStorage-session-') > -1 && JSON.parse(sessionStorage[x]).hasOwnProperty(\"parentPortalId\")) {\r\n\t\t\t\t\t\tif (JSON.parse(sessionStorage[x]).parentPortalId === parentPortalId) {\r\n\t\t\t\t\t\t\tconst portalId = x.replace('ngStorage-session-', '');\r\n\r\n\t\t\t\t\t\t\t// delete the session\r\n\t\t\t\t\t\t\tthis.storageService.deleteItem(pm.StorageType.Session, x.replace('ngStorage-', ''));\r\n\t\t\t\t\t\t\t// delete the JWT\r\n\t\t\t\t\t\t\tthis.storageService.deleteItem(pm.StorageType.Session, `${pm.JWT_STORAGE_KEY}-${portalId}`)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.storageService.deleteItem(pm.StorageType.Session, `${pm.JWT_STORAGE_KEY}-${parentPortalId}`);\r\n\t\t\tthis.storageService.deleteItem(pm.StorageType.Session, `${pm.SESSION_STORAGE_KEY}-${parentPortalId}`);\r\n\t\t}\r\n\r\n\t\t/****** Private Methods ******/\r\n\r\n\t\t// Updates any child session expiration dates for the given parent portal\r\n\t\tprivate touchChildExpirations(parentPortalId, expirationDate: Date): void {\r\n\t\t\tfor (var x in sessionStorage) {\r\n\t\t\t\tif (x.indexOf('ngStorage-session-') > -1) {\r\n\t\t\t\t\tlet sessionDetail = JSON.parse(sessionStorage[x]);\r\n\r\n\t\t\t\t\tif (sessionDetail.hasOwnProperty(\"parentPortalId\") && sessionDetail.parentPortalId === parentPortalId) {\r\n\t\t\t\t\t\tconst childSession = angular.copy(sessionDetail) as pm.SessionDetail;\r\n\t\t\t\t\t\tchildSession.expirationDate = expirationDate;\r\n\t\t\t\t\t\tthis.storageService.saveItem(Models.StorageType.Session, x.replace('ngStorage-', ''), childSession);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// saves child sessions to local SessionStorage\r\n\t\tprivate persistChildSessions(parentPortalId: string, childSessions: pm.ChildSessionData[], expirationDate: Date, userName: string): void {\r\n\t\t\tchildSessions.forEach((childSession: pm.ChildSessionData) => {\r\n\t\t\t\tconst jwtName = `${pm.JWT_STORAGE_KEY}-${childSession.portalId}`;\r\n\t\t\t\tconst sessionDetailName = `${pm.SESSION_STORAGE_KEY}-${childSession.portalId}`;\r\n\t\t\t\tconst sessionDetail = {\r\n\t\t\t\t\texpirationDate: expirationDate,\r\n\t\t\t\t\tstatus: Models.SESSION_ACTIVE,\r\n\t\t\t\t\tfeatures: childSession.features,\r\n\t\t\t\t\tisParent: false,\r\n\t\t\t\t\tparentPortalId: parentPortalId,\r\n\t\t\t\t\tuserName: userName\r\n\t\t\t\t} as pm.SessionDetail;\r\n\r\n\t\t\t\tthis.storageService.saveItem(Models.StorageType.Session, jwtName, childSession.jwt);\r\n\t\t\t\tthis.storageService.saveItem(Models.StorageType.Session, sessionDetailName, sessionDetail);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// get the main/parent jwt token key name\r\n\t\tprivate getJwtKeyName(): string {\r\n\t\t\tconst parentPortalId: string = this.storageService.getItem(pm.StorageType.Session, 'parent');\r\n\t\t\treturn (parentPortalId !== null && parentPortalId !== undefined) ? `${pm.JWT_STORAGE_KEY}-${parentPortalId}` : this.dataService.jwtTokenKeyName;\r\n\t\t}\r\n\r\n\t\t// get the main/parent session key name\r\n\t\tprivate getSessionKeyName(): string {\r\n\t\t\tconst parentPortalId: string = this.storageService.getItem(pm.StorageType.Session, 'parent');\r\n\t\t\treturn (parentPortalId !== null && parentPortalId !== undefined) ? `${pm.SESSION_STORAGE_KEY}-${parentPortalId}` : this.dataService.sessionKeyName;\r\n\t\t}\r\n\t}\r\n}","namespace Portico.Services {\r\n import pme = Portico.Models.Enterprise;\r\n import psga = apigateway.client;\r\n import psgm = apigateway.models;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n export interface ISiteAccountService {\r\n cancelWorkflow(patientAccountId: number, workflowId: number): angular.IPromise;\r\n getAccount(accountId: number): angular.IPromise;\r\n\t\tgetCase(caseId: number): angular.IPromise;\r\n\t\tgetCases(accountId: number): angular.IPromise;\r\n getParty(): angular.IPromise;\r\n getSiteAccount(): angular.IPromise;\r\n\t\tgetSiteAccounts(portalId: string): angular.IPromise;\r\n getWorkflows(\r\n accountId: number,\r\n includePayors: boolean,\r\n includePharmacies: boolean,\r\n includePrescribers: boolean\r\n ): angular.IPromise;\r\n searchAccounts(account: pme.Account): angular.IPromise;\r\n searchCases(searchCasesRequest: psgm.SearchCasesRequestModel): angular.IPromise;\r\n searchWorkflows(\r\n searchWorkflowsRequest: psgm.SearchWorkflowsRequestModel\r\n ): angular.IPromise;\r\n siteRegistration: (\r\n siteAccountRegistration: pme.SiteAccountRegistration\r\n ) => angular.IPromise;\r\n }\r\n\r\n @Service('app', 'siteAccountService')\r\n\t@Inject('$q', 'apiService', 'DocumentV3Api', 'EdgeSiteAccountApi')\r\n export class SiteAccountService {\r\n constructor(\r\n private $q: angular.IQService,\r\n\t\t\tprivate apiService: IApiService,\r\n private documentApi: psga.DocumentV3Api,\r\n private edgeSiteAccountApi: psga.EdgeSiteAccountApi\r\n ) {}\r\n\r\n cancelWorkflow(patientAccountId: number, workflowId: number, caseTypeStatusRelationshipId: number, reason: string) {\r\n return this.edgeSiteAccountApi\r\n .siteAccountCancelWorkflow(\r\n {\r\n patientAccountId,\r\n workflowId,\r\n caseTypeStatusRelationshipId,\r\n reason \r\n } as psgm.CancelWorkflowRequestModel)\r\n .then(response => {\r\n return response;\r\n });\r\n }\r\n\r\n getAccount(accountId: number): angular.IPromise {\r\n return this.$q.when(this.edgeSiteAccountApi\r\n .siteAccountGetAccount({ accountId: accountId })\r\n .then(response => {\r\n response.data.data.account.lastModifiedTime = response.data.data.account.lastModifiedTime?.toDate();\r\n response.data.data.patient.dateOfBirth = response.data.data.patient.dateOfBirth?.toDate();\r\n const account = new pme.Account(response.data.data.account);\r\n account.patient = new pme.Patient(response.data.data.patient);\r\n return account;\r\n }));\r\n }\r\n\r\n\t\tgetCase(caseId: number): angular.IPromise {\r\n\t\t\tvar request: psgm.GetCaseRequestModel = {\r\n\t\t\t\tcaseId: caseId,\r\n\t\t\t\tincludeDiagnoses: true,\r\n\t\t\t\tincludePayors: true,\r\n\t\t\t\tincludePharmacies: true,\r\n\t\t\t\tincludePrescribers: true,\r\n\t\t\t\tincludePrescriptions: true,\r\n\t\t\t\tincludeSites: true,\r\n\t\t\t\tincludeSurveys: true\r\n\t\t\t};\r\n return this.$q.when(this.edgeSiteAccountApi.siteAccountGetCase(request).then(response => {\r\n response.data.data.accountData.lastModifiedTime = response.data.data.accountData.lastModifiedTime?.toDate();\r\n response.data.data.caseData.createdOn = response.data.data.caseData.createdOn?.toDate();\r\n response.data.data.caseData.endDate = response.data.data.caseData.endDate?.toDate();\r\n response.data.data.caseData.expirationDate = response.data.data.caseData.expirationDate?.toDate();\r\n response.data.data.caseData.startDate = response.data.data.caseData.startDate?.toDate();\r\n response.data.data.patientData.dateOfBirth = response.data.data.patientData.dateOfBirth?.toDate();\r\n response.data.data.payorData.forEach(p => {\r\n p.benefitData.createDate = p.benefitData.createDate?.toDate();\r\n p.benefitData.dateOfBirth = p.benefitData.dateOfBirth?.toDate();\r\n p.benefitData.planEffectiveDate = p.benefitData.planEffectiveDate?.toDate();\r\n p.benefitData.planExpirationDate = p.benefitData.planExpirationDate?.toDate();\r\n p.benefitData.planTerminationDate = p.benefitData.planTerminationDate?.toDate();\r\n });\r\n response.data.data.prescriptionData.forEach(p => {\r\n p.createdOn = p.createdOn?.toDate();\r\n p.updatedOn = p.updatedOn?.toDate();\r\n p.writtenOn = p.writtenOn?.toDate();\r\n });\r\n response.data.data.siteData.forEach(s => {\r\n s.siteData.businessEndTime = s.siteData.businessEndTime?.toDate();\r\n s.siteData.businessStartTime = s.siteData.businessStartTime?.toDate();\r\n });\r\n response.data.data.surveyData.forEach(s => {\r\n s.sessionData.creationTime = s.sessionData.creationTime?.toDate();\r\n });\r\n return response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tgetCases(accountId: number): angular.IPromise {\r\n\t\t\tvar request: psgm.GetCasesRequestModel = {\r\n\t\t\t\taccountId,\r\n\t\t\t};\r\n return this.$q.when(this.edgeSiteAccountApi.siteAccountGetCases(request).then(response => {\r\n response.data.data.forEach(c => {\r\n c.createdOn = c.createdOn?.toDate();\r\n c.endDate = c.endDate?.toDate();\r\n c.expirationDate = c.expirationDate?.toDate();\r\n c.startDate = c.startDate?.toDate();\r\n });\r\n return response.data.data;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n getParty(): angular.IPromise {\r\n return this.$q.when(this.edgeSiteAccountApi.siteAccountGetParty({}).then(response => {\r\n response.data.data.businessEndTime = response.data.data.businessEndTime?.toDate();\r\n response.data.data.businessStartTime = response.data.data.businessStartTime?.toDate();\r\n return new pme.Site(response.data.data);\r\n }));\r\n }\r\n\r\n getSiteAccount(): angular.IPromise {\r\n return this.$q.when(this.edgeSiteAccountApi.siteAccountGetSiteAccount({}).then(response => {\r\n response.data.data.lastModifiedTime = response.data.data.lastModifiedTime?.toDate();\r\n return new pme.SiteAccount(response.data.data);\r\n }));\r\n }\r\n\r\n\t\tgetSiteAccounts(portalId: string): angular.IPromise {\r\n\t\t\tconst endpoint = `/siteaccount/${portalId}`;\r\n\r\n\t\t\treturn this.apiService.getItem(endpoint).then(response => {\r\n\t\t\t\treturn _.map(response, (sa) => {\r\n\t\t\t\t\treturn new pme.SiteAccount({\r\n\t\t\t\t\t\tid: sa.id,\r\n\t\t\t\t\t\tparty: new pme.Site({\r\n\t\t\t\t\t\t\tid: sa.site.id,\r\n\t\t\t\t\t\t\tdescription: sa.site.name,\r\n\t\t\t\t\t\t\taddresses: [\r\n\t\t\t\t\t\t\t\tnew pme.Address({\r\n\t\t\t\t\t\t\t\t\taddress1: sa.site.address1,\r\n\t\t\t\t\t\t\t\t\taddress2: sa.site.address2,\r\n\t\t\t\t\t\t\t\t\tcity: sa.site.city,\r\n\t\t\t\t\t\t\t\t\tstate: sa.site.state,\r\n\t\t\t\t\t\t\t\t\tzip: sa.site.zip\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t],\r\n\t\t\t\t\t\t\tphoneNumbers: [\r\n\t\t\t\t\t\t\t\tnew pme.PhoneNumber({\r\n\t\t\t\t\t\t\t\t\tnumber: sa.site.phone,\r\n\t\t\t\t\t\t\t\t\ttype: 'PHONE'\r\n\t\t\t\t\t\t\t\t}),\r\n\t\t\t\t\t\t\t\tnew pme.PhoneNumber({\r\n\t\t\t\t\t\t\t\t\tnumber: sa.site.fax,\r\n\t\t\t\t\t\t\t\t\ttype: 'FAX'\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t]\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n getWorkflows(\r\n accountId: number,\r\n includePayors: boolean,\r\n includePharmacies: boolean,\r\n includePrescribers: boolean\r\n ): angular.IPromise {\r\n var requestModel: psgm.GetWorkflowsRequestModel = {\r\n accountId,\r\n includePayors,\r\n includePharmacies,\r\n includePrescribers,\r\n };\r\n\r\n return this.$q.when(this.edgeSiteAccountApi.siteAccountGetWorkflows(requestModel).then(workflowResponse => {\r\n const promises: angular.IPromise[] = [];\r\n\r\n // temporary solution\r\n for (const workflow of workflowResponse.data.data) {\r\n for (const relationship of workflow.caseWorkflow.documents) {\r\n // TODO: wrap in an edge call\r\n const promise = this.$q.when(this.documentApi\r\n .documentGetByProgramId(relationship.documentId)\r\n .then(documentResponse => {\r\n (relationship).document = documentResponse.data.data;\r\n }));\r\n\r\n promises.push(promise);\r\n }\r\n }\r\n\r\n return this.$q.all(promises).then(() => {\r\n return workflowResponse.data.data;\r\n });\r\n }));\r\n }\r\n\r\n searchAccounts(account: pme.Account): angular.IPromise {\r\n const request: psgm.SearchAccountsRequestModel = {\r\n firstName: _.get(account, 'patient.firstName', ''),\r\n lastName: _.get(account, 'patient.lastName', ''),\r\n dateOfBirth: _.get(account, 'patient.dateOfBirth', ''),\r\n city: _.get(account, 'patient.addresses[0].city', ''),\r\n state: _.get(account, 'patient.addresses[0].state', ''),\r\n zip: _.get(account, 'patient.addresses[0].zip', ''),\r\n gender: _.get(account, 'patient.gender', null),\r\n };\r\n\r\n return this.$q.when(this.edgeSiteAccountApi.siteAccountSearchAccounts(request).then(response => {\r\n const temp: pme.Account[] = [];\r\n\r\n for (const patientAccount of response.data.data) {\r\n patientAccount.account.lastModifiedTime = patientAccount.account.lastModifiedTime?.toDate();\r\n patientAccount.patient.dateOfBirth = patientAccount.patient.dateOfBirth?.toDate();\r\n const account = new pme.Account(patientAccount.account);\r\n account.patient = new pme.Patient(patientAccount.patient);\r\n account.patient.ssn = patientAccount.ssn;\r\n temp.push(account);\r\n }\r\n\r\n return temp;\r\n }));\r\n }\r\n\r\n searchCases(searchCasesRequest: psgm.SearchCasesRequestModel): angular.IPromise { \r\n return this.$q.when(this.edgeSiteAccountApi.siteAccountSearchCases(searchCasesRequest).then((response) => {\r\n response.data.data.forEach(r => {\r\n r.intakeCase.createdOn = r.intakeCase.createdOn?.toDate();\r\n r.intakeCase.endDate = r.intakeCase.endDate?.toDate();\r\n r.intakeCase.expirationDate = r.intakeCase.expirationDate?.toDate();\r\n r.intakeCase.startDate = r.intakeCase.startDate?.toDate();\r\n r.workflows.forEach(w => {\r\n w.patient.dateOfBirth = w.patient.dateOfBirth?.toDate();\r\n w.workflow.createdOn = w.workflow.createdOn?.toDate();\r\n w.workflow.endDate = w.workflow.endDate?.toDate();\r\n w.workflow.expirationDate = w.workflow.expirationDate?.toDate();\r\n w.workflow.startDate = w.workflow.startDate?.toDate();\r\n });\r\n });\r\n return response.data.data;\r\n\t\t\t}));\r\n }\r\n\r\n searchWorkflows(searchWorkflowsRequest: psgm.SearchWorkflowsRequestModel) {\r\n return this.$q.when(this.edgeSiteAccountApi.siteAccountSearchWorkflows(searchWorkflowsRequest).then((response) => {\r\n response.data.data.forEach(w => {\r\n w.patient.dateOfBirth = w.patient.dateOfBirth?.toDate();\r\n w.workflow.createdOn = w.workflow.createdOn?.toDate();\r\n w.workflow.endDate = w.workflow.endDate?.toDate();\r\n w.workflow.expirationDate = w.workflow.expirationDate?.toDate();\r\n w.workflow.startDate = w.workflow.startDate?.toDate();\r\n });\r\n return response.data.data;\r\n }));\r\n }\r\n\r\n siteRegistration(siteAccountRegistration: pme.SiteAccountRegistration) {\r\n const registration = new pme.SiteAccountRegistration(siteAccountRegistration);\r\n const request = {\r\n userName: registration.userName,\r\n firstName: registration.firstName,\r\n lastName: registration.lastName,\r\n phone: registration.phone,\r\n fax: registration.fax,\r\n email: registration.email,\r\n siteAccountUpsearch: registration.siteAccount.mapToEnterpriseCoordinatorSiteAccountUpsearchRequestModel(\r\n true,\r\n true,\r\n false,\r\n true,\r\n true,\r\n false\r\n ),\r\n } as psgm.ISiteRegistrationRequestModel;\r\n\r\n return this.edgeSiteAccountApi.siteAccountSiteRegistration(request).then(response => {\r\n return response.data.data;\r\n });\r\n }\r\n }\r\n}\r\n","namespace Portico.Services {\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmg = Portico.Models.Gateway;\r\n\timport psga = apigateway.client;\r\n\timport psgm = apigateway.models;\r\n\timport psge = apigateway.enums;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n export interface ISiteService {\r\n\t\tcreate(addresses?: number, contacts?: number, emailAddresses?: number, externalIds?: number, phoneNumbers?: number): angular.IPromise;\r\n\t\tget(siteId: number): angular.IPromise;\r\n\t\tgetByPrescriberId(prescriberId: number): angular.IPromise;\r\n\t\tsave(site: pme.Site): angular.IPromise;\r\n\t\tsearch(site: pme.Site): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'siteService')\r\n\t@Inject('$q', 'SiteV3Api')\r\n export class SiteService implements ISiteService {\r\n constructor(\r\n private $q: angular.IQService,\r\n\t\t\tprivate siteV3Api: psga.SiteV3Api\r\n ) { }\r\n\r\n\t\tcreate(addresses: number = 0, contacts: number = 0, emailAddresses: number = 0, externalIds: number = 0, phoneNumbers: number = 0): angular.IPromise {\r\n\t\t\tconst site = new pme.Site();\r\n\r\n\t\t\tfor (let i = 0; i < addresses; i++) {\r\n\t\t\t\tsite.addAddress();\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < contacts; i++) {\r\n\t\t\t\tsite.addContact();\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < emailAddresses; i++) {\r\n\t\t\t\tsite.addEmailAddress();\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < externalIds; i++) {\r\n\t\t\t\tsite.addExternalId();\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < phoneNumbers; i++) {\r\n\t\t\t\tsite.addPhoneNumber();\r\n\t\t\t}\r\n\r\n\t\t\treturn this.$q.when(site);\r\n\t\t}\r\n\r\n\t\tget(siteId: number): angular.IPromise {\r\n\t\t\t// TODO: wrap in an edge call\r\n\t\t\treturn this.$q.when(this.siteV3Api.siteGetByTenantId(siteId, psge.RoleType.PrescriberSite).then((response) => {\r\n\t\t\t\tresponse.data.data.businessEndTime = response.data.data.businessEndTime?.toDate();\r\n\t\t\t\tresponse.data.data.businessStartTime = response.data.data.businessStartTime?.toDate();\r\n\t\t\t\treturn new pme.Site(response.data.data);\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tgetByPrescriberId(prescriberId: number): angular.IPromise {\r\n\t\t\t// TODO: wrap in an edge call\r\n\t\t\treturn this.$q.when(this.siteV3Api.sitesByPrescriberGetByTenantId1(prescriberId).then((response) => {\r\n\t\t\t\tconst temp: pme.Site[] = [];\r\n\r\n\t\t\t\tfor (let site of response.data.data) {\r\n\t\t\t\t\tsite.businessEndTime = site.businessEndTime?.toDate();\r\n\t\t\t\t\tsite.businessStartTime = site.businessStartTime?.toDate();\r\n\t\t\t\t\ttemp.push(new pme.Site(site));\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn temp;\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\tsave(site: pme.Site): angular.IPromise {\r\n\t\t\tconst request: psgm.SiteUpsearchModel = {\r\n\t\t\t\tsiteId: _.toNumber(site.id),\r\n\t\t\t\tsiteRoleType: psge.RoleType.PrescriberSite,\r\n\t\t\t\tdescription: _.get(site, 'description', ''),\r\n\t\t\t\tnickName: _.get(site, 'nickName', ''),\r\n\t\t\t\tbusinessStartTime: moment(_.get(site, 'businessStartTime', '')),\r\n\t\t\t\tbusinessEndTime: moment(_.get(site, 'businessEndTime', '')),\r\n\t\t\t\tstateTaxId: null,\r\n\t\t\t\tnpi: null,\r\n\t\t\t\tsiteNote: null,\r\n\t\t\t\tcontacts: _.map(site.contacts, (v) => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tcontactId: v.id,\r\n\t\t\t\t\t\tcontactType: _.toNumber(v.type),\r\n\t\t\t\t\t\tfirstName: _.get(v, 'firstName', ''),\r\n\t\t\t\t\t\tlastName: _.get(v, 'lastName', ''),\r\n\t\t\t\t\t\toccupationDescription: _.get(v, 'occupationDescription', ''),\r\n\t\t\t\t\t\taddresses: _.map(v.addresses, (u) => {\r\n\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\taddressId: u.id,\r\n\t\t\t\t\t\t\t\taddressType: _.toNumber(u.type),\r\n\t\t\t\t\t\t\t\taddressOne: _.get(u, 'address1', ''),\r\n\t\t\t\t\t\t\t\taddressTwo: _.get(u, 'address2', ''),\r\n\t\t\t\t\t\t\t\tcity: _.get(u, 'city', ''),\r\n\t\t\t\t\t\t\t\tstate: _.get(u, 'state', ''),\r\n\t\t\t\t\t\t\t\tzip: _.get(u, 'zip', ''),\r\n\t\t\t\t\t\t\t\tcountry: _.get(u, 'country', '')\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}),\r\n\t\t\t\t\t\temailAddresses: _.map(v.emailAddresses, (u) => {\r\n\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\temailAddressId: u.id,\r\n\t\t\t\t\t\t\t\temailAddressType: _.toNumber(u.type),\r\n\t\t\t\t\t\t\t\taddress: _.get(v, 'address', ''),\r\n\t\t\t\t\t\t\t\tlanguage: _.get(v, 'language', '')\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}),\r\n\t\t\t\t\t\tphoneNumbers: _.map(v.phoneNumbers, (u) => {\r\n\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\tphoneId: u.id,\r\n\t\t\t\t\t\t\t\tphoneType: _.toNumber(u.type),\r\n\t\t\t\t\t\t\t\tphonePurpose: _.toNumber(u.purpose),\r\n\t\t\t\t\t\t\t\tphoneNumber: _.get(v, 'number', ''),\r\n\t\t\t\t\t\t\t\textension: _.get(v, 'extension', ''),\r\n\t\t\t\t\t\t\t\tcontactDatePreferenceType: _.toNumber(u.contactDatePreferenceType),\r\n\t\t\t\t\t\t\t\tbestDaysToCall: _.get(v, 'bestDaysToCall', ''),\r\n\t\t\t\t\t\t\t\tcontactTimePreferenceType: _.toNumber(u.contactTimePreferenceType),\r\n\t\t\t\t\t\t\t\tbestTimeToCall: _.get(v, 'bestTimeToCall', ''),\r\n\t\t\t\t\t\t\t\tlanguage: _.get(v, 'language', ''),\r\n\t\t\t\t\t\t\t\ttimeZone: _.get(v, 'timeZone', '')\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}),\r\n\t\t\t\t\t\twebAddresses: _.map(v.webAddresses, (u) => {\r\n\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\twebAddressId: u.id,\r\n\t\t\t\t\t\t\t\twebAddressType: _.toNumber(u.type),\r\n\t\t\t\t\t\t\t\turl: _.get(v, 'url', '')\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t};\r\n\t\t\t\t}),\r\n\t\t\t\texternalIds: _.map(site.externalIds, (v) => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tid: v.id,\r\n\t\t\t\t\t\texternalIdType: _.toNumber(v.type),\r\n\t\t\t\t\t\texternalId: _.get(v, 'value', '')\r\n\t\t\t\t\t};\r\n\t\t\t\t}),\r\n\t\t\t\tglobalIds: null,\r\n\t\t\t\taddresses: _.map(site.addresses, (v) => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\taddressId: v.id,\r\n\t\t\t\t\t\taddressType: _.toNumber(v.type),\r\n\t\t\t\t\t\taddressOne: _.get(v, 'address1', ''),\r\n\t\t\t\t\t\taddressTwo: _.get(v, 'address2', ''),\r\n\t\t\t\t\t\tcity: _.get(v, 'city', ''),\r\n\t\t\t\t\t\tstate: _.get(v, 'state', ''),\r\n\t\t\t\t\t\tzip: _.get(v, 'zip', ''),\r\n\t\t\t\t\t\tcountry: _.get(v, 'country', '')\r\n\t\t\t\t\t};\r\n\t\t\t\t}),\r\n\t\t\t\tphoneNumbers: _.map(site.phoneNumbers, (v) => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tphoneId: v.id,\r\n\t\t\t\t\t\tphoneType: _.toNumber(v.type),\r\n\t\t\t\t\t\tphonePurpose: _.toNumber(v.purpose),\r\n\t\t\t\t\t\tphoneNumber: _.get(v, 'number', ''),\r\n\t\t\t\t\t\textension: _.get(v, 'extension', ''),\r\n\t\t\t\t\t\tcontactDatePreferenceType: _.toNumber(v.contactDatePreferenceType),\r\n\t\t\t\t\t\tbestDaysToCall: _.get(v, 'bestDaysToCall', ''),\r\n\t\t\t\t\t\tcontactTimePreferenceType: _.toNumber(v.contactTimePreferenceType),\r\n\t\t\t\t\t\tbestTimeToCall: _.get(v, 'bestTimeToCall', ''),\r\n\t\t\t\t\t\tlanguage: _.get(v, 'language', ''),\r\n\t\t\t\t\t\ttimeZone: _.get(v, 'timeZone', '')\r\n\t\t\t\t\t};\r\n\t\t\t\t}),\r\n\t\t\t\temailAddresses: _.map(site.emailAddresses, (v) => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\temailAddressId: v.id,\r\n\t\t\t\t\t\temailAddressType: _.toNumber(v.type),\r\n\t\t\t\t\t\taddress: _.get(v, 'address', ''),\r\n\t\t\t\t\t\tlanguage: _.get(v, 'language', '')\r\n\t\t\t\t\t};\r\n\t\t\t\t})\r\n\t\t\t};\r\n\r\n\t\t\t// TODO: wrap in an edge call\r\n\t\t\treturn this.$q.when(this.siteV3Api.siteUpsearchByTenantId({\r\n\t\t\t\tcanInsert: true,\r\n\t\t\t\tcanUpdate: true,\r\n\t\t\t\tskipSearch: false,\r\n\t\t\t\tmodel: request\r\n\t\t\t}).then((response) => {\r\n\t\t\t\treturn new pme.Site(response.data.data);\r\n\t\t\t}));\r\n }\r\n\r\n\t\tsearch(site: pme.Site): angular.IPromise {\r\n\t\t\tconst request: DeepPartial = {\r\n\t\t\t\tmaxRecordCount: 20,\r\n\t\t\t\tdescription: _.get(site, 'description', ''),\r\n\t\t\t\tnpi: _.get(_.find(_.get(site, 'externalIds', []), { type: pmg.ExternalIdType.NPINUMBER } as any), 'value', ''), // 6: NPINUMBER,\r\n\t\t\t\taddressOne: _.get(site, 'addresses[0].address1', ''),\r\n\t\t\t\tcity: _.get(site, 'addresses[0].city', ''),\r\n\t\t\t\tstate: _.get(site, 'addresses[0].state', ''),\r\n\t\t\t\tzip: _.get(site, 'addresses[0].zip', ''),\r\n\t\t\t\troleType: psge.RoleType.PrescriberSite,\r\n\t\t\t\texternalIdType: null,\r\n\t\t\t\texternalId: ''\r\n\t\t\t};\r\n\r\n\t\t\t// TODO: wrap in an edge call\r\n\t\t\treturn this.$q.when(this.siteV3Api.siteSearchByTenantId(request).then((response) => {\r\n const temp: pme.Site[] = [];\r\n\r\n\t\t\t\tfor (let site of response.data.data.sites) {\r\n\t\t\t\t\tsite.businessEndTime = site.businessEndTime?.toDate();\r\n\t\t\t\t\tsite.businessStartTime = site.businessStartTime?.toDate();\r\n temp.push(new pme.Site(site));\r\n }\r\n\r\n return temp;\r\n }));\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n import pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport psga = apigateway.client;\r\n\timport psgm = apigateway.models;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n export interface ISurveyService {\r\n\t\tget: (id: number) => angular.IPromise;\r\n\t\tpopulate_session(programId: number, account: pme.Account, surveyIds: number[]): angular.IPromise;\r\n saveSurveySession: (surveySession: pme.SurveySession) => angular.IPromise;\r\n }\r\n\r\n @Service('app', 'surveyService')\r\n\t@Inject('$q', 'SurveyV2Api')\r\n export class SurveyService implements ISurveyService {\r\n constructor(\r\n private $q: angular.IQService,\r\n\t\t\tprivate surveyV2Api: psga.SurveyV2Api\r\n ) { }\r\n\r\n\t\tget(id: number): angular.IPromise {\r\n\t\t\t// let survey: pme.Survey = this.storageService.getItem(pm.StorageType.Session, `survey-${id}`);\r\n\r\n\t\t\tconst promise = // survey ?\r\n\t\t\t\t// this.$q.when(survey) :\r\n\t\t\t\tthis.$q.when(this.surveyV2Api.fullSurveyGet(id.toString(), '', '').then(response => {\r\n\t\t\t\t\treturn response.data.data;\r\n\t\t\t\t}));\r\n\r\n\t\t\treturn promise.then((response: any) => {\r\n\t\t\t\t// survey = new pme.Survey(response);\r\n\t\t\t\t// this.storageService.saveItem(pm.StorageType.Session, `survey-${id}`, survey);\r\n\t\t\t\t// return survey;\r\n\t\t\t\treturn new pme.Survey(response);\r\n\t\t\t});\r\n }\r\n\r\n\t\tpopulate_session(programId: number, account: pme.Account, surveyIds: number[]): angular.IPromise {\r\n\t\t\tconst promises: angular.IPromise[] = [];\r\n\r\n\t\t\tfor (const surveyId of surveyIds) {\r\n\t\t\t\tconst accountSessions = account.accountSessions.filter((a) => {\r\n\t\t\t\t\treturn a.surveySessionId && a.surveyId === surveyId;\r\n\t\t\t\t}).sort((a, b) => {\r\n\t\t\t\t\treturn b.sessionDate.getTime() - a.sessionDate.getTime();\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (accountSessions.length > 0) {\r\n\t\t\t\t\tconst accountSession = accountSessions[0];\r\n\r\n\t\t\t\t\t// TODO: wrap in an edge call\r\n\t\t\t\t\tconst promise = this.$q.when(this.surveyV2Api.fullSurveySessionGet3(accountSession.surveySessionId.toString(), programId.toString(), '5').then((response: any) => {\r\n\t\t\t\t\t\taccountSession.surveySession = new pme.SurveySession();\r\n\r\n\t\t\t\t\t\tfor (const answer of response.data.data) {\r\n\t\t\t\t\t\t\taccountSession.surveySession.surveySessionAnswers.push(new pme.SurveySessionAnswer(answer));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}));\r\n\r\n\t\t\t\t\tpromises.push(promise);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn this.$q.all(promises).then(() => {\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsaveSurveySession(surveySession: pme.SurveySession): angular.IPromise {\r\n\t\t\tconst request: psgm.SurveySessionPostRequest = {\r\n\t\t\t\tsurveyId: surveySession.surveyId,\r\n\t\t\t\tsurveySourceId: surveySession.surveySourceId,\r\n\t\t\t\tsourceSystemId: ''\r\n\t\t\t};\r\n\r\n\t\t\treturn this.$q.when(this.surveyV2Api.surveySessionCreate2('', '', request).then((response: any) => {\r\n\t\t\t\tconst request2: psgm.FullSurveySessionPostRequest = {\r\n\t\t\t\t\tsessionValues: []\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsurveySession.surveySessionAnswers.forEach((ssa) => {\r\n\t\t\t\t\tconst sessionValue: psgm.SurveySessionValuePostRequest = {\r\n\t\t\t\t\t\tsurveySessionId: response.data.data.surveySessionId,\r\n\t\t\t\t\t\tquestionId: ssa.questionId,\r\n\t\t\t\t\t\tanswerId: ssa.answerId,\r\n\t\t\t\t\t\tanswerValue: ssa.answerValue\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\trequest2.sessionValues.push(sessionValue);\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// TODO: wrap in an edge call\r\n\t\t\t\treturn this.surveyV2Api.fullSurveySessionCreate2('', '', request2).then((response2) => {\r\n\t\t\t\t\tsurveySession.surveySessionId = response.data.data.surveySessionId;\r\n\t\t\t\t\treturn response.data.data.surveySessionId;\r\n\t\t\t\t});\r\n\t\t\t}));\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n\timport psga = apigateway.client;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n export interface ITenantService {\r\n // get: () => angular.IPromise;\r\n\t\t//getById: (id: number) => angular.IPromise;\r\n }\r\n\r\n @Service('app', 'tenantService')\r\n\t@Inject('$q', 'ProgramV2Api')\r\n export class TenantService implements ITenantService {\r\n constructor(\r\n\t\t\tprivate $q: angular.IQService,\r\n\t\t\tprivate programV2Api: psga.ProgramV2Api\r\n ) { }\r\n\r\n\t\t//get(): angular.IPromise {\r\n\t\t//\tconst request: DeepPartial = {};\r\n\r\n\t\t//\treturn this.programV2Api.tenantSearch(request).then((response) => {\r\n\t\t//\t\tconst tenants: pme.Tenant[] = [];\r\n\r\n // for (const tenant of response) {\r\n\t\t//\t\t\ttenants.push(new pme.Tenant(tenant));\r\n // }\r\n\r\n // return tenants;\r\n // });\r\n // }\r\n\r\n\t\t//getById(id: number): angular.IPromise {\r\n\t\t//\tconst request: DeepPartial = {\r\n\t\t//\t\ttenantId: id\r\n\t\t//\t};\r\n\r\n\t\t//\treturn this.programV2Api.tenantSearch(request).then((response) => {\r\n\t\t//\t\treturn new pme.Tenant(response[0]);\r\n // });\r\n // }\r\n }\r\n}","namespace Portico.Services.Gateway {\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n const apiModule = angular\r\n .module('app')\r\n .service('ApiGatewayConfiguration', [\r\n 'serverConstants',\r\n 'storageService',\r\n 'webServiceUrls',\r\n (\r\n serverConstants: Portico.Models.Interfaces.IServerConstants,\r\n storageService: Portico.Services.StorageService,\r\n webServiceUrls: Portico.Models.Interfaces.IWebServiceUrls\r\n ) => {\r\n let container = new VueDI.Container();\r\n\r\n trialcard_apigateway.configure(\r\n container,\r\n <'qa' | 'uat' | 'training' | 'lab' | 'prod'>webServiceUrls.gateway.url\r\n );\r\n\r\n container.registerSingleton(trialcard_authentication.OAUTH_TOKEN_PROVIDER, {\r\n get(container) {\r\n return {\r\n async getToken(context) {\r\n const tokenName = `${Portico.Models.JWT_STORAGE_KEY}-${serverConstants.portalId}`;\r\n return storageService.getItem(\r\n Portico.Models.StorageType.Session,\r\n tokenName\r\n );\r\n },\r\n };\r\n },\r\n });\r\n\r\n container.registerInstance(\r\n trialcard_shared.AXIOS_CONFIGURATION,\r\n {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n transformRequest(data: any, headers?: any) {\r\n delete headers['User-Agent'];\r\n if (Array.isArray(axios.default.defaults.transformRequest)) {\r\n return axios.default.defaults.transformRequest[0](data, headers);\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n return axios.default.defaults.transformRequest!(data, headers);\r\n },\r\n }\r\n );\r\n\r\n window;\r\n\r\n container.registerInstance(trialcard_shared.X_TC_USERID, '');\r\n\r\n return container;\r\n },\r\n ])\r\n .service('CardExtV1Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.CardExtV1Api),\r\n ])\r\n .service('CaseV3Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.CaseV3Api),\r\n ])\r\n .service('ClaimV1Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.ClaimV1Api),\r\n ])\r\n .service('DiagnosisV3Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.DiagnosisV3Api),\r\n ])\r\n .service('DocumentV3Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.DocumentV3Api),\r\n ])\r\n .service('EdgeApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EdgeApi),\r\n ])\r\n .service('EdgeAccountApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EdgeAccountApi),\r\n ])\r\n .service('EdgeAdminApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EdgeAdminApi),\r\n ])\r\n .service('EdgeAuthenticationApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EdgeAuthenticationApi),\r\n ])\r\n .service('EdgeClaimApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EdgeClaimApi),\r\n ])\r\n .service('EdgeCouponApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EdgeCouponApi),\r\n ])\r\n .service('EdgeDebitCardApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EdgeDebitCardApi),\r\n ])\r\n .service('EdgeDocumentsApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EdgeDocumentsApi),\r\n ])\r\n .service('EdgeEmailApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EdgeEmailApi),\r\n ])\r\n .service('EdgeEnrollmentApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EdgeEnrollmentApi),\r\n ])\r\n .service('EdgeHubApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EdgeHubApi),\r\n ])\r\n .service('EdgeIntakeApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EdgeIntakeApi),\r\n ])\r\n .service('EdgeMangoApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EdgeMangoApi),\r\n ])\r\n .service('EdgePatientAccountApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EdgePatientAccountApi),\r\n ])\r\n .service('EdgePatientEnrollmentApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EdgePatientEnrollmentApi),\r\n ])\r\n .service('EdgePayloadStagingApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EdgePayloadStagingApi),\r\n ])\r\n .service('EdgePlpApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EdgePlpApi),\r\n ])\r\n .service('EdgeSiteAccountApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EdgeSiteAccountApi),\r\n ])\r\n .service('EdgeTempApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EdgeTempApi),\r\n ])\r\n .service('EdgeTokenApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EdgeTokenApi),\r\n ])\r\n .service('EmailV1Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EmailV1Api),\r\n ])\r\n .service('EnrollmentExtV2Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EnrollmentExtV2Api),\r\n ])\r\n .service('EnrollmentV1Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EnrollmentV1Api),\r\n ])\r\n .service('EscoordV1Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.EscoordV1Api),\r\n ])\r\n .service('IntakeV1Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.IntakeV1Api),\r\n ])\r\n .service('LocationV1Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.LocationV1Api),\r\n ])\r\n .service('NotesV2Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.NotesV2Api),\r\n ])\r\n .service('PatientV3Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.PatientV3Api),\r\n ])\r\n .service('PayorV4Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.PayorV4Api),\r\n ])\r\n .service('PayorV4GlobalApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.PayorV4GlobalApi),\r\n ])\r\n .service('PharmacyV2Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.PharmacyV2Api),\r\n ])\r\n .service('PharmacyV2GlobalApi', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.PharmacyV2GlobalApi),\r\n ])\r\n .service('PrescriberV3Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.PrescriberV3Api),\r\n ])\r\n .service('PrescriptionV1Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.PrescriptionV1Api),\r\n ])\r\n .service('ProgramV2Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.ProgramV2Api),\r\n ])\r\n .service('SiteV2Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.SiteV2Api),\r\n ])\r\n .service('SiteV3Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.SiteV3Api),\r\n ])\r\n .service('SurveyV2Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.SurveyV2Api),\r\n ])\r\n .service('SurveyV3Api', [\r\n 'ApiGatewayConfiguration',\r\n (container: InstanceType) =>\r\n container.get(trialcard_apigateway.SurveyV3Api),\r\n ]);\r\n\r\n export interface IGatewayService {\r\n CardExtV1: import('@trialcard/apigateway.client').CardExtV1Api;\r\n CaseV3: import('@trialcard/apigateway.client').CaseV3Api;\r\n ClaimV1: import('@trialcard/apigateway.client').ClaimV1Api;\r\n DiagnosisV3: import('@trialcard/apigateway.client').DiagnosisV3Api;\r\n DocumentV3: import('@trialcard/apigateway.client').DocumentV3Api;\r\n Edge: import('@trialcard/apigateway.client').EdgeApi;\r\n EdgeAccount: import('@trialcard/apigateway.client').EdgeAccountApi;\r\n EdgeAdmin: import('@trialcard/apigateway.client').EdgeAdminApi;\r\n EdgeAuthentication: import('@trialcard/apigateway.client').EdgeAuthenticationApi;\r\n EdgeClaim: import('@trialcard/apigateway.client').EdgeClaimApi;\r\n EdgeCoupon: import('@trialcard/apigateway.client').EdgeCouponApi;\r\n EdgeDebitCard: import('@trialcard/apigateway.client').EdgeDebitCardApi;\r\n EdgeDocuments: import('@trialcard/apigateway.client').EdgeDocumentsApi;\r\n EdgeEmail: import('@trialcard/apigateway.client').EdgeEmailApi;\r\n EdgeEnrollment: import('@trialcard/apigateway.client').EdgeEnrollmentApi;\r\n EdgeHub: import('@trialcard/apigateway.client').EdgeHubApi;\r\n EdgeIntake: import('@trialcard/apigateway.client').EdgeIntakeApi;\r\n EdgeMango: import('@trialcard/apigateway.client').EdgeMangoApi;\r\n EdgePatientAccount: import('@trialcard/apigateway.client').EdgePatientAccountApi;\r\n EdgePatientEnrollment: import('@trialcard/apigateway.client').EdgePatientEnrollmentApi;\r\n EdgePayloadStaging: import('@trialcard/apigateway.client').EdgePayloadStagingApi;\r\n EdgePlp: import('@trialcard/apigateway.client').EdgePlpApi;\r\n EdgeSiteAccount: import('@trialcard/apigateway.client').EdgeSiteAccountApi;\r\n EdgeTemp: import('@trialcard/apigateway.client').EdgeTempApi;\r\n EdgeToken: import('@trialcard/apigateway.client').EdgeTokenApi;\r\n EmailV1: import('@trialcard/apigateway.client').EmailV1Api;\r\n EnrollmentExtV2: import('@trialcard/apigateway.client').EnrollmentExtV2Api;\r\n EnrollmentV1: import('@trialcard/apigateway.client').EnrollmentV1Api;\r\n EscoordV1: import('@trialcard/apigateway.client').EscoordV1Api;\r\n IntakeV1: import('@trialcard/apigateway.client').IntakeV1Api;\r\n LocationV1: import('@trialcard/apigateway.client').LocationV1Api;\r\n NotesV2: import('@trialcard/apigateway.client').NotesV2Api;\r\n PatientV3: import('@trialcard/apigateway.client').PatientV3Api;\r\n PayorV4: import('@trialcard/apigateway.client').PayorV4Api;\r\n PayorV4Global: import('@trialcard/apigateway.client').PayorV4GlobalApi;\r\n PharmacyV2: import('@trialcard/apigateway.client').PharmacyV2Api;\r\n PharmacyV2Global: import('@trialcard/apigateway.client').PharmacyV2GlobalApi;\r\n PrescriberV3: import('@trialcard/apigateway.client').PrescriberV3Api;\r\n PrescriptionV1: import('@trialcard/apigateway.client').PrescriptionV1Api;\r\n ProgramV2: import('@trialcard/apigateway.client').ProgramV2Api;\r\n SiteV2: import('@trialcard/apigateway.client').SiteV2Api;\r\n SiteV3: import('@trialcard/apigateway.client').SiteV3Api;\r\n SurveyV2: import('@trialcard/apigateway.client').SurveyV2Api;\r\n SurveyV3: import('@trialcard/apigateway.client').SurveyV3Api;\r\n }\r\n\r\n @Service('app', 'gatewayService')\r\n @Inject(\r\n 'CardExtV1Api',\r\n 'CaseV3Api',\r\n 'ClaimV1Api',\r\n 'DiagnosisV3Api',\r\n 'DocumentV3Api',\r\n 'EdgeApi',\r\n 'EdgeAccountApi',\r\n 'EdgeAdminApi',\r\n 'EdgeAuthenticationApi',\r\n 'EdgeClaimApi',\r\n 'EdgeCouponApi',\r\n 'EdgeDebitCardApi',\r\n 'EdgeDocumentsApi',\r\n 'EdgeEmailApi',\r\n 'EdgeEnrollmentApi',\r\n 'EdgeHubApi',\r\n 'EdgeIntakeApi',\r\n 'EdgeMangoApi',\r\n 'EdgePatientAccountApi',\r\n 'EdgePatientEnrollmentApi',\r\n 'EdgePayloadStagingApi',\r\n 'EdgePlpApi',\r\n 'EdgeSiteAccountApi',\r\n 'EdgeTempApi',\r\n 'EdgeTokenApi',\r\n 'EmailV1Api',\r\n 'EnrollmentExtV2Api',\r\n 'EnrollmentV1Api',\r\n 'EscoordV1Api',\r\n 'IntakeV1Api',\r\n 'LocationV1Api',\r\n 'NotesV2Api',\r\n 'PatientV3Api',\r\n 'PayorV4Api',\r\n 'PayorV4GlobalApi',\r\n 'PharmacyV2Api',\r\n 'PharmacyV2GlobalApi',\r\n 'PrescriberV3Api',\r\n 'PrescriptionV1Api',\r\n 'ProgramV2Api',\r\n 'SiteV2Api',\r\n 'SiteV3Api',\r\n 'SurveyV2Api',\r\n 'SurveyV3Api'\r\n )\r\n export class GatewayService implements IGatewayService {\r\n constructor(\r\n public CardExtV1: import('@trialcard/apigateway.client').CardExtV1Api,\r\n public CaseV3: import('@trialcard/apigateway.client').CaseV3Api,\r\n public ClaimV1: import('@trialcard/apigateway.client').ClaimV1Api,\r\n public DiagnosisV3: import('@trialcard/apigateway.client').DiagnosisV3Api,\r\n public DocumentV3: import('@trialcard/apigateway.client').DocumentV3Api,\r\n public Edge: import('@trialcard/apigateway.client').EdgeApi,\r\n public EdgeAccount: import('@trialcard/apigateway.client').EdgeAccountApi,\r\n public EdgeAdmin: import('@trialcard/apigateway.client').EdgeAdminApi,\r\n public EdgeAuthentication: import('@trialcard/apigateway.client').EdgeAuthenticationApi,\r\n public EdgeClaim: import('@trialcard/apigateway.client').EdgeClaimApi,\r\n public EdgeCoupon: import('@trialcard/apigateway.client').EdgeCouponApi,\r\n public EdgeDebitCard: import('@trialcard/apigateway.client').EdgeDebitCardApi,\r\n public EdgeDocuments: import('@trialcard/apigateway.client').EdgeDocumentsApi,\r\n public EdgeEmail: import('@trialcard/apigateway.client').EdgeEmailApi,\r\n public EdgeEnrollment: import('@trialcard/apigateway.client').EdgeEnrollmentApi,\r\n public EdgeHub: import('@trialcard/apigateway.client').EdgeHubApi,\r\n public EdgeIntake: import('@trialcard/apigateway.client').EdgeIntakeApi,\r\n public EdgeMango: import('@trialcard/apigateway.client').EdgeMangoApi,\r\n public EdgePatientAccount: import('@trialcard/apigateway.client').EdgePatientAccountApi,\r\n public EdgePatientEnrollment: import('@trialcard/apigateway.client').EdgePatientEnrollmentApi,\r\n public EdgePayloadStaging: import('@trialcard/apigateway.client').EdgePayloadStagingApi,\r\n public EdgePlp: import('@trialcard/apigateway.client').EdgePlpApi,\r\n public EdgeSiteAccount: import('@trialcard/apigateway.client').EdgeSiteAccountApi,\r\n public EdgeTemp: import('@trialcard/apigateway.client').EdgeTempApi,\r\n public EdgeToken: import('@trialcard/apigateway.client').EdgeTokenApi,\r\n public EmailV1: import('@trialcard/apigateway.client').EmailV1Api,\r\n public EnrollmentExtV2: import('@trialcard/apigateway.client').EnrollmentExtV2Api,\r\n public EnrollmentV1: import('@trialcard/apigateway.client').EnrollmentV1Api,\r\n public EscoordV1: import('@trialcard/apigateway.client').EscoordV1Api,\r\n public IntakeV1: import('@trialcard/apigateway.client').IntakeV1Api,\r\n public LocationV1: import('@trialcard/apigateway.client').LocationV1Api,\r\n public NotesV2: import('@trialcard/apigateway.client').NotesV2Api,\r\n public PatientV3: import('@trialcard/apigateway.client').PatientV3Api,\r\n public PayorV4: import('@trialcard/apigateway.client').PayorV4Api,\r\n public PayorV4Global: import('@trialcard/apigateway.client').PayorV4GlobalApi,\r\n public PharmacyV2: import('@trialcard/apigateway.client').PharmacyV2Api,\r\n public PharmacyV2Global: import('@trialcard/apigateway.client').PharmacyV2GlobalApi,\r\n public PrescriberV3: import('@trialcard/apigateway.client').PrescriberV3Api,\r\n public PrescriptionV1: import('@trialcard/apigateway.client').PrescriptionV1Api,\r\n public ProgramV2: import('@trialcard/apigateway.client').ProgramV2Api,\r\n public SiteV2: import('@trialcard/apigateway.client').SiteV2Api,\r\n public SiteV3: import('@trialcard/apigateway.client').SiteV3Api,\r\n public SurveyV2: import('@trialcard/apigateway.client').SurveyV2Api,\r\n public SurveyV3: import('@trialcard/apigateway.client').SurveyV3Api\r\n ) {}\r\n }\r\n}\r\n","namespace Portico.Services.Legacy {\r\n\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n import ps = Portico.Services;\r\n\r\n import leg = Portico.Models.Legacy;\r\n import ent = Portico.Models.Enterprise;\r\n\r\n import lcs = Portico.Services.Legacy.CardService;\r\n import les = Portico.Services.Legacy.EnrollmentService;\r\n\r\n export interface IPorticoLegacyService {\r\n checkMN(memberNumber: string): angular.IPromise;\r\n\t\tcheckAnswer(surveyId: number, questionId: number, account: ent.Account): angular.IPromise;\r\n\t\tcheckAnswers(surveyIds: number[], questionIds: number[], account: ent.Account): angular.IPromise;\r\n enroll(account: ent.Account, enrollment: ent.Enrollment): angular.IPromise;\r\n enroll(account: ent.Account, enrollment: ent.Enrollment, programId: number): angular.IPromise;\r\n enroll(account: ent.Account, enrollment: ent.Enrollment, programId?: number): angular.IPromise;\r\n }\r\n\r\n export interface IMemberNumberCodeResponse extends leg.MemberNumberStatusResultModel{\r\n code: number;\r\n }\r\n export class MemberNumberCodeResponse extends leg.MemberNumberStatusResultModel{\r\n code: number;\r\n constructor(obj?: IMemberNumberCodeResponse){\r\n super();\r\n this.code = null;\r\n if(obj){\r\n this.code = obj.code || null;\r\n }\r\n }\r\n }\r\n\r\n @Service('app', 'porticoLegacyService')\r\n @Inject('$q',\r\n '$rootScope',\r\n '$state',\r\n 'accountService',\r\n 'dataService',\r\n 'dateService',\r\n 'LegacyCardService',\r\n 'LegacyEnrollmentService',\r\n 'surveyService')\r\n export class PorticoLegacyService implements IPorticoLegacyService {\r\n private serviceName: string = 'Portico.Services.Legacy.LegacyService';\r\n\r\n constructor(\r\n private $q: angular.IQService,\r\n private $rootScope: angular.IRootScopeService,\r\n private $state: angular.ui.IStateService,\r\n private accountService: ps.IAccountService,\r\n private dataService: ps.IDataService,\r\n private dateService: ps.IDateService,\r\n private legacyCardService: lcs.LegacyCardService,\r\n private legacyEnrollmentService: les.LegacyEnrollmentService,\r\n private surveyService: ps.SurveyService\r\n ) { }\r\n\r\n checkMN(memberNumber: string): angular.IPromise {\r\n\t\t\tif (this.dataService.session.mode === 'edit' || this.dataService.session.mode === 'mock') {\r\n return this.$q.when(new MemberNumberCodeResponse());\r\n }\r\n\r\n return this.legacyCardService.MemberNumberStatusApi.get(this.dataService.getProgramId(), memberNumber)\r\n .then((response: MemberNumberCodeResponse) => {\r\n if (response.cardEndDate) {\r\n if (this.dateService.isAfter(response.cardEndDate)) {\r\n // expired\r\n response.code = LegacyCheckMNCodes.Expired;\r\n } else {\r\n // already active\r\n response.code = LegacyCheckMNCodes.Activated;\r\n }\r\n } else {\r\n // inactive -> proceed\r\n response.code = LegacyCheckMNCodes.Inactive;\r\n }\r\n return response;\r\n });\r\n }\r\n\r\n\t\tcheckAnswer(surveyId: number, questionId: number, account: ent.Account): angular.IPromise {\r\n\t\t\tif (this.dataService.session.mode === 'edit' || this.dataService.session.mode === 'mock') {\r\n return this.$q.when(true);\r\n }\r\n\r\n let mapper = new ps.Mappers.SurveyMapper();\r\n\t\t\tlet surveySession = account.getSurveySession(surveyId);\r\n let answers = surveySession.getSurveySessionAnswers(questionId);\r\n\t\t\tlet legacyQuestion = mapper.toLegacySurveyQuestion(surveySession.surveyId, questionId, answers[0]);\r\n\r\n return this.legacyEnrollmentService.VerifySurveyAnswerApi.post(this.dataService.getProgramId(), legacyQuestion)\r\n .then((response: leg.VerifySurveyEntryResultModel) => {\r\n return response.isEligible;\r\n });\r\n }\r\n\r\n\t\tcheckAnswers(surveyIds: number[], questionIds: number[], account: ent.Account): angular.IPromise {\r\n let promises: angular.IPromise[] = [];\r\n\r\n\t\t\tfor (let i = 0; i < surveyIds.length; i++) {\r\n\t\t\t\tpromises.push(this.checkAnswer(surveyIds[i], questionIds[i], account));\r\n }\r\n\r\n return this.$q.all(promises).then(x => x.every(z => z));\r\n }\r\n\r\n\r\n enroll(account: ent.Account, enrollment: ent.Enrollment): angular.IPromise\r\n enroll(account: ent.Account, enrollment: ent.Enrollment, programId: number): angular.IPromise\r\n enroll(account: ent.Account, enrollment: ent.Enrollment, programId?: number): angular.IPromise {\r\n\t\t\tif (this.dataService.session.mode === 'edit' || this.dataService.session.mode === 'mock') {\r\n\t\t\t\tif (this.dataService.session.mode === 'mock') {\r\n\t\t\t\t\tthis.dataService.session.intakeExpired = true;\r\n }\r\n\r\n enrollment.memberNumber = '00000000000';\r\n\r\n return this.$q.when(new leg.EnrollmentResultModel());\r\n }\r\n\r\n const mapper = new ps.Mappers.SurveyMapper();\r\n\t\t\tconst requestModel = new leg.EnrollmentRequestModel();\r\n\t\t\tconst accountSessions = account.accountSessions.filter((accountSession) => {\r\n\t\t\t\treturn !accountSession.id && accountSession.surveySession;\r\n\t\t\t});\r\n\t\t\tconst surveySession = accountSessions && accountSessions.length > 0 ? accountSessions[0].surveySession : null;\r\n\r\n\t\t\trequestModel.survey = mapper.toLegacy(surveySession);\r\n requestModel.demographics = mapper.toLegacyDemographics(account, enrollment.memberNumber);\r\n requestModel.clientIdentifiers = null;\r\n\r\n return this.legacyEnrollmentService.BasicEnrollmentApi.post(programId || this.dataService.getProgramId(), requestModel)\r\n .then((response: leg.EnrollmentResultModel) => {\r\n\r\n enrollment.memberNumber = response.memberNumber;\r\n\r\n return response;\r\n });\r\n }\r\n }\r\n\r\n export enum LegacyCheckMNCodes {\r\n Invalid = 0, // Failure. Invalid member number For program (success - false)\r\n Expired = 1, // Have to check the date with dateService.isAfter(cardEndDate) (success - true)\r\n Activated = 2, // Have to check the cardActivationDate!=null (success - true)\r\n Inactive = 3, // Have to check the cardActivationDate=null && cardEndDate=null? (succes - true)\r\n Error = 4 // Generic error response message is something like \"an unknown error occurred\" (success - false)\r\n }\r\n}","namespace Portico.Services.Mappers {\r\n import ent = Portico.Models.Enterprise;\r\n\timport leg = Portico.Models.Legacy;\r\n\timport psgm = apigateway.models;\r\n\r\n\texport class SurveyMapper {\r\n\r\n\t\ttoLegacySurveyQuestion(surveyId: number, questionId: number, answer: ent.SurveySessionAnswer): leg.SurveyQuestionModel {\r\n\t\t\tlet obj = new leg.SurveyQuestionModel();\r\n\t\t\tobj.surveyId = surveyId;\r\n\t\t\tobj.questionId = questionId;\r\n\t\t\tobj.answerKey = answer.answerId;\r\n\t\t\tobj.answerText = answer.answerValue;\r\n\t\t\treturn obj;\r\n\t\t}\r\n\r\n\t\ttoLegacyDemographics(account: ent.Account, memberNumber: string): leg.EnrollmentDemographicsModel {\r\n\t\t\tlet e: ent.Patient = account.patient;\r\n\t\t\tlet obj = new leg.EnrollmentDemographicsModel();\r\n\r\n\t\t\t// postpend middle name\r\n\t\t\tobj.firstName = `${_.isNil(e.firstName) ? '' : e.firstName}${_.isNil(e.middleName) ? '' : ' ' + e.middleName}`;\r\n\t\t\t// postpend suffix\t\t\t\r\n\t\t\tobj.lastName = `${_.isNil(e.lastName) ? '' : e.lastName}${_.isNil(e.suffix) ? '' : ' ' + e.suffix}`;\r\n\t\t\tobj.dateOfBirth = _.isNil(e.dateOfBirth) ? '' : moment(e.dateOfBirth instanceof Date ? e.dateOfBirth : new Date(e.dateOfBirth)).format('L');\r\n\t\t\tobj.gender = _.isNil(e.gender) ? '' : e.gender;\r\n\t\t\tobj.address1 = _.get(e, 'addresses[0].address1', '');\r\n\t\t\tobj.address2 = _.get(e, 'addresses[0].address2', '');\r\n\t\t\tobj.city = _.get(e, 'addresses[0].city', '');\r\n\t\t\tobj.state = _.get(e, 'addresses[0].state', '');\r\n\t\t\tobj.postalCode = _.get(e, 'addresses[0].zip', '');\r\n\t\t\tobj.email = _.get(e, 'emailAddresses[0].address', '');\r\n\t\t\tobj.homePhone = _.get(e, 'phoneNumbers[0].number', '');\r\n\t\t\tobj.memberNumber = _.isNil(memberNumber) ? '' : memberNumber;\r\n\t\t\t// default extra properties\r\n\t\t\tobj.personId = null;\r\n\t\t\tobj.mobilePhone = ''; // Not used by service\r\n\t\t\tobj.country = '';\r\n\t\t\tobj.communicationTypes = null;\r\n\t\t\treturn obj;\r\n\t\t}\r\n\r\n\t\ttoCouponDemographics(account: ent.Account, memberNumber: string): psgm.EnrollmentDemographicsModel {\r\n\t\t\tlet e: ent.Patient = account.patient;\r\n\t\t\tlet obj = {} as psgm.EnrollmentDemographicsModel;\r\n\r\n\t\t\t// postpend middle name\r\n\t\t\tobj.firstName = `${_.isNil(e.firstName) ? '' : e.firstName}${_.isNil(e.middleName) ? '' : ' ' + e.middleName}`;\r\n\t\t\t// postpend suffix\t\t\t\r\n\t\t\tobj.lastName = `${_.isNil(e.lastName) ? '' : e.lastName}${_.isNil(e.suffix) ? '' : ' ' + e.suffix}`;\r\n\t\t\tobj.dateOfBirth = _.isNil(e.dateOfBirth) ? '' : moment(e.dateOfBirth instanceof Date ? e.dateOfBirth : new Date(e.dateOfBirth)).format('L');\r\n\t\t\tobj.gender = _.isNil(e.gender) ? '' : e.gender;\r\n\t\t\tobj.address1 = _.get(e, 'addresses[0].address1', '');\r\n\t\t\tobj.address2 = _.get(e, 'addresses[0].address2', '');\r\n\t\t\tobj.city = _.get(e, 'addresses[0].city', '');\r\n\t\t\tobj.state = _.get(e, 'addresses[0].state', '');\r\n\t\t\tobj.postalCode = _.get(e, 'addresses[0].zip', '');\r\n\t\t\tobj.email = _.get(e, 'emailAddresses[0].address', '');\r\n\t\t\tobj.homePhone = _.get(e, 'phoneNumbers[0].number', '');\r\n\t\t\tobj.memberNumber = _.isNil(memberNumber) ? '' : memberNumber;\r\n\t\t\t// default extra properties\r\n\t\t\tobj.personId = null;\r\n\t\t\tobj.mobilePhone = ''; // Not used by service\r\n\t\t\tobj.country = '';\r\n\t\t\tobj.communicationTypes = null;\r\n\t\t\treturn obj;\r\n\t\t}\r\n\r\n\r\n\t\t// toLegacy: transform enterprise survey to legacy survey\r\n\t\ttoLegacy(surveySession: ent.SurveySession): leg.SurveyQuestionModel[] {\r\n\t\t\tconst legacySurvey: leg.SurveyQuestionModel[] = [];\r\n\r\n if (surveySession && surveySession.surveySessionAnswers) {\r\n surveySession.surveySessionAnswers.forEach((q) => {\r\n\t\t\t\t legacySurvey.push(new leg.SurveyQuestionModel({\r\n\t\t\t\t\t surveyId: surveySession.surveyId,\r\n\t\t\t\t\t questionId: q.questionId,\r\n\t\t\t\t\t answerKey: q.answerId,\r\n\t\t\t\t\t answerText: q.answerValue\r\n\t\t\t\t }));\r\n\t\t\t });\r\n }\r\n\r\n\t\t\treturn legacySurvey;\r\n\t\t}\r\n\t}\r\n}","namespace Portico.Services {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\timport pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pms = Portico.Models.Setup;\r\n\r\n export interface IDataGroupService {\r\n delete(dataGroup: pms.DataGroup): angular.IPromise;\r\n get(): angular.IPromise;\r\n\t\tgetById(id: string): angular.IPromise;\r\n\t\tgetByDataGroupTypeId(dataGroupTypeId: string): angular.IPromise;\r\n\t\tgetHistory(id: string, spinner?: string): angular.IPromise;\r\n save(dataGroup: pms.DataGroup): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'dataGroupService')\r\n @Inject('$q', 'apiService', 'storageService')\r\n export class DataGroupService implements IDataGroupService {\r\n constructor(\r\n private $q: angular.IQService,\r\n private apiService: IApiService,\r\n private storageService: IStorageService\r\n ) { }\r\n\r\n delete(dataGroup: pms.DataGroup): angular.IPromise {\r\n const endpoint = `/datagroup/${dataGroup.id}`;\r\n\r\n return this.apiService.deleteItem(endpoint).then((response: boolean) => {\r\n return response;\r\n });\r\n }\r\n\r\n get(): angular.IPromise {\r\n const endpoint = `/datagroup`;\r\n\r\n return this.apiService.getItem(endpoint).then((dataGroups: pms.IDataGroup[]) => {\r\n const temp: pms.DataGroup[] = [];\r\n\r\n for (const dataGroup of dataGroups) {\r\n temp.push(new pms.DataGroup(dataGroup));\r\n }\r\n\r\n return temp;\r\n });\r\n }\r\n\r\n\t\tgetById(id: string): angular.IPromise {\r\n const endpoint = `/datagroup/${id}`;\r\n\r\n return this.apiService.getItem(endpoint).then((dataGroup: pms.IDataGroup) => {\r\n return new pms.DataGroup(dataGroup);\r\n });\r\n }\r\n\r\n\t\tgetByDataGroupTypeId(dataGroupTypeId: string): angular.IPromise {\r\n const endpoint = `/datagroupbydatagrouptypeid/${dataGroupTypeId}`;\r\n\r\n return this.apiService.getItem(endpoint).then((dataGroups: pms.IDataGroup[]) => {\r\n const temp: pms.DataGroup[] = [];\r\n\r\n for (const dataGroup of dataGroups) {\r\n temp.push(new pms.DataGroup(dataGroup));\r\n }\r\n\r\n return temp;\r\n });\r\n }\r\n\r\n\t\tgetHistory(id: string, spinner: string = null): angular.IPromise {\r\n\t\t\tconst endpoint = `/datagrouphistory/${id}`;\r\n\r\n\t\t\treturn this.apiService.getItem(endpoint, spinner).then((response: pms.DataGroup[]) => {\r\n\t\t\t\tconst dataGroups: pms.DataGroup[] = [];\r\n\r\n\t\t\t\tfor (const dataGroup of response) {\r\n\t\t\t\t\tdataGroups.push(new pms.DataGroup(dataGroup));\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn _.orderBy(dataGroups, ['createdOn'], ['desc']);\r\n\t\t\t});\r\n\t\t}\r\n\r\n save(dataGroup: pms.DataGroup): angular.IPromise {\r\n const endpoint = `/datagroup`;\r\n\r\n return this.apiService.saveItem(endpoint, dataGroup).then((response: pms.IDataGroup) => {\r\n return new pms.DataGroup(response);\r\n });\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\timport pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pms = Portico.Models.Setup;\r\n\r\n export interface IDataGroupTypeService {\r\n delete(dataGroupType: pms.DataGroupType): angular.IPromise;\r\n get(): angular.IPromise;\r\n\t\tgetHistory(id: string, spinner?: string): angular.IPromise;\r\n save(dataGroupType: pms.DataGroupType): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'dataGroupTypeService')\r\n @Inject('$q', 'apiService', 'storageService')\r\n export class DataGroupTypeService implements IDataGroupTypeService {\r\n constructor(\r\n private $q: angular.IQService,\r\n private apiService: IApiService,\r\n private storageService: IStorageService\r\n ) { }\r\n\r\n delete(dataGroupType: pms.DataGroupType): angular.IPromise {\r\n const endpoint = `/datagrouptype/${dataGroupType.id}`;\r\n\r\n return this.apiService.deleteItem(endpoint).then((response: boolean) => {\r\n return response;\r\n });\r\n }\r\n\r\n get(): angular.IPromise {\r\n const endpoint = `/datagrouptype`;\r\n\r\n let dataGroupTypes: pms.DataGroupType[] = this.storageService.getItem(pm.StorageType.Session, `dataGroupType-list`);\r\n\r\n const promise = dataGroupTypes ?\r\n this.$q.when(dataGroupTypes) :\r\n this.apiService.getItem(endpoint);\r\n\r\n return promise.then((response: pms.IDataGroupType[]) => {\r\n const temp: pms.DataGroupType[] = [];\r\n\r\n for (const dataGroupType of response) {\r\n temp.push(new pms.DataGroupType(dataGroupType));\r\n }\r\n\r\n\t\t\t\tthis.storageService.saveItem(pm.StorageType.Session, `dataGroupType-list`, temp);\r\n\r\n return temp;\r\n });\r\n }\r\n\r\n\t\tgetHistory(id: string, spinner: string = null): angular.IPromise {\r\n\t\t\tconst endpoint = `/datagrouptypehistory/${id}`;\r\n\r\n\t\t\treturn this.apiService.getItem(endpoint, spinner).then((response: pms.DataGroupType[]) => {\r\n\t\t\t\tconst dataGroupTypes: pms.DataGroupType[] = [];\r\n\r\n\t\t\t\tfor (const dataGroupType of response) {\r\n\t\t\t\t\tdataGroupTypes.push(new pms.DataGroupType(dataGroupType));\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn _.orderBy(dataGroupTypes, ['createdOn'], ['desc']);\r\n\t\t\t});\r\n\t\t}\r\n\r\n save(dataGroupType: pms.DataGroupType): angular.IPromise {\r\n const endpoint = `/datagrouptype`;\r\n\r\n return this.apiService.saveItem(endpoint, dataGroupType).then((response: pms.IDataGroupType) => {\r\n return new pms.DataGroupType(response);\r\n });\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\timport pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pms = Portico.Models.Setup;\r\n\r\n\texport interface IDataRowService {\r\n\t\tclean(dataTable: pms.DataTable, dataRow: pms.DataRow): void;\r\n\t\tcreate(dataTable: pms.DataTable): pms.DataRow;\r\n\t\tdelete(dataRow: pms.DataRow, spinner?: string): angular.IPromise;\r\n\t\tgetByDataGroupId(dataGroupId: string, spinner?: string): angular.IPromise;\r\n\t\tgetConflict(dataRow: pms.DataRow, spinner?: string): angular.IPromise;\r\n\t\tgetHistory(id: string, spinner?: string): angular.IPromise;\r\n\t\tsave(dataRow: pms.DataRow, spinner?: string): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'dataRowService')\r\n @Inject('$q', 'apiService', 'storageService')\r\n export class DataRowService implements IDataRowService {\r\n constructor(\r\n private $q: angular.IQService,\r\n private apiService: IApiService,\r\n private storageService: IStorageService\r\n ) { }\r\n\r\n\t\tclean(dataTable: pms.DataTable, dataRow: pms.DataRow): void {\r\n\t\t\tif (dataTable && dataRow) {\r\n\t\t\t\t// remove invalid values\r\n\t\t\t\tfor (let i = dataRow.dataValues.length - 1; i >= 0; i--) {\r\n\t\t\t\t\tconst matches = dataTable.dataColumns.filter((dc: pms.DataColumn) => {\r\n\t\t\t\t\t\treturn dc.id === dataRow.dataValues[i].dataColumnId;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif (!matches.length) {\r\n\t\t\t\t\t\tdataRow.dataValues[i].isDeleted = true;\r\n\t\t\t\t\t\t// this.dataRow.dataValues.splice(i, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// add missing values\r\n\t\t\t\tdataTable.dataColumns.forEach((dc: pms.DataColumn) => {\r\n\t\t\t\t\tif (dataRow.getDataValue(dc.id) === null) {\r\n\t\t\t\t\t\tdataRow.dataValues.push(new pms.DataValue({ id: null, dataRowId: dataRow.id, dataColumnId: dc.id, value: null, createdBy: null, createdOn: null, isDeleted: false }));\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcreate(dataTable: pms.DataTable): pms.DataRow {\r\n\t\t\tconst dataRow = new pms.DataRow();\r\n\r\n\t\t\tdataRow.dataTableId = dataTable.id;\r\n\r\n\t\t\tthis.clean(dataTable, dataRow);\r\n\r\n\t\t\treturn dataRow;\r\n\t\t}\r\n\r\n\t\tdelete(dataRow: pms.DataRow, spinner: string = null): angular.IPromise {\r\n const endpoint = `/datarow/${dataRow.id}`;\r\n\r\n\t\t\treturn this.apiService.deleteItem(endpoint, spinner).then((response: boolean) => {\r\n return response;\r\n });\r\n }\r\n\r\n\t\tgetByDataGroupId(dataGroupId: string, spinner: string = null): angular.IPromise {\r\n const endpoint = `/datarowbydatagroupid/${dataGroupId}`;\r\n\r\n\t\t\treturn this.apiService.getItem(endpoint, spinner).then((response: pms.DataRow[]) => {\r\n const dataRows: pms.DataRow[] = [];\r\n\r\n for (const dataRow of response) {\r\n dataRows.push(new pms.DataRow(dataRow));\r\n }\r\n\r\n return dataRows;\r\n });\r\n }\r\n\r\n\t\tgetConflict(dataRow: pms.DataRow, spinner: string = null): angular.IPromise {\r\n\t\t\tconst endpoint = `/datarowconflict`;\r\n\r\n\t\t\treturn this.apiService.searchItem(endpoint, dataRow, spinner).then((response: pms.IDataRow) => {\r\n\t\t\t\treturn response ? new pms.DataRow(response) : null;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tgetHistory(id: string, spinner: string = null): angular.IPromise {\r\n\t\t\tconst endpoint = `/datarowhistory/${id}`;\r\n\r\n\t\t\treturn this.apiService.getItem(endpoint, spinner).then((response: pms.DataRow[]) => {\r\n\t\t\t\tconst dataRows: pms.DataRow[] = [];\r\n\r\n\t\t\t\tfor (const dataRow of response) {\r\n\t\t\t\t\tdataRows.push(new pms.DataRow(dataRow));\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn _.orderBy(dataRows, ['createdOn'], ['desc']);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsave(dataRow: pms.DataRow, spinner: string = null): angular.IPromise {\r\n\t\t\tconst endpoint = `/datarow`;\r\n\r\n\t\t\treturn this.apiService.saveItem(endpoint, dataRow, spinner).then((response: pms.IDataRow) => {\r\n\t\t\t\treturn new pms.DataRow(response);\r\n\t\t\t});\r\n\t\t}\r\n }\r\n}","namespace Portico.Services {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\timport pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pms = Portico.Models.Setup;\r\n\r\n export interface IDataTableService {\r\n delete(dataTable: pms.DataTable): angular.IPromise;\r\n get(): angular.IPromise;\r\n\t\tgetHistory(id: string, spinner?: string): angular.IPromise;\r\n save(dataTable: pms.DataTable): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'dataTableService')\r\n\t@Inject('$q', 'apiService', 'serverConstants', 'storageService')\r\n export class DataTableService implements IDataTableService {\r\n constructor(\r\n private $q: angular.IQService,\r\n private apiService: IApiService,\r\n\t\t\tprivate serverConstants: pmi.IServerConstants,\r\n private storageService: IStorageService\r\n ) { }\r\n\r\n delete(dataTable: pms.DataTable): angular.IPromise {\r\n const endpoint = `/datatable/${dataTable.id}`;\r\n\r\n return this.apiService.deleteItem(endpoint).then((response: boolean) => {\r\n return response;\r\n });\r\n }\r\n\r\n get(): angular.IPromise {\r\n const endpoint = `/datatable`;\r\n\r\n\t\t\tlet timestamp: Date = new Date( this.storageService.getItem(pm.StorageType.Local, `dataTable-list-timestamp`));\r\n\t\t\tlet dataTables: pms.DataTable[] = timestamp >= this.serverConstants.tsDataTable ? this.storageService.getItem(pm.StorageType.Local, `dataTable-list`) : null;\r\n\r\n const promise = dataTables ?\r\n this.$q.when(dataTables) :\r\n this.apiService.getItem(endpoint);\r\n\r\n return promise.then((response: pms.IDataTable[]) => {\r\n const temp: pms.DataTable[] = [];\r\n\r\n for (const dataTable of response) {\r\n temp.push(new pms.DataTable(dataTable));\r\n }\r\n\r\n\t\t\t\tthis.storageService.saveItem(pm.StorageType.Local, `dataTable-list`, temp);\r\n\t\t\t\tthis.storageService.saveItem(pm.StorageType.Local, `dataTable-list-timestamp`, this.serverConstants.tsDataTable);\r\n\r\n return temp;\r\n });\r\n }\r\n\r\n\t\tgetHistory(id: string, spinner: string = null): angular.IPromise {\r\n\t\t\tconst endpoint = `/datatablehistory/${id}`;\r\n\r\n\t\t\treturn this.apiService.getItem(endpoint, spinner).then((response: pms.DataTable[]) => {\r\n\t\t\t\tconst dataTables: pms.DataTable[] = [];\r\n\r\n\t\t\t\tfor (const dataTable of response) {\r\n\t\t\t\t\tdataTables.push(new pms.DataTable(dataTable));\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn _.orderBy(dataTables, ['createdOn'], ['desc']);\r\n\t\t\t});\r\n\t\t}\r\n\r\n save(dataTable: pms.DataTable): angular.IPromise {\r\n const endpoint = `/datatable`;\r\n\r\n return this.apiService.saveItem(endpoint, dataTable).then((response: pms.IDataTable) => {\r\n return new pms.DataTable(response);\r\n });\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\timport pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pms = Portico.Models.Setup;\r\n\r\n export interface IDataTypeService {\r\n get(): angular.IPromise;\r\n\t\tgetHistory(id: string, spinner?: string): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'dataTypeService')\r\n\t@Inject('$q', 'apiService', 'serverConstants', 'storageService')\r\n export class DataTypeService implements IDataTypeService {\r\n constructor(\r\n private $q: angular.IQService,\r\n private apiService: IApiService,\r\n\t\t\tprivate serverConstants: pmi.IServerConstants,\r\n private storageService: IStorageService\r\n ) { }\r\n\r\n get(): angular.IPromise {\r\n const endpoint = `/datatype`;\r\n\r\n\t\t\tlet timestamp: Date = new Date(this.storageService.getItem(pm.StorageType.Local, `dataType-list-timestamp`));\r\n\t\t\tlet dataTypes: pms.DataType[] = timestamp >= this.serverConstants.tsDataType ? this.storageService.getItem(pm.StorageType.Local, `dataType-list`) : null;\r\n\r\n const promise = dataTypes ?\r\n this.$q.when(dataTypes) :\r\n this.apiService.getItem(endpoint);\r\n\r\n return promise.then((response: pms.IDataType[]) => {\r\n const temp: pms.DataType[] = [];\r\n\r\n for (const dataType of response) {\r\n temp.push(new pms.DataType(dataType));\r\n }\r\n\r\n\t\t\t\tthis.storageService.saveItem(pm.StorageType.Local, `dataType-list`, temp);\r\n\t\t\t\tthis.storageService.saveItem(pm.StorageType.Local, `dataType-list-timestamp`, this.serverConstants.tsDataType);\r\n\r\n return temp;\r\n });\r\n }\r\n\r\n\t\tgetHistory(id: string, spinner: string = null): angular.IPromise {\r\n\t\t\tconst endpoint = `/datatypehistory/${id}`;\r\n\r\n\t\t\treturn this.apiService.getItem(endpoint, spinner).then((response: pms.DataType[]) => {\r\n\t\t\t\tconst dataTypes: pms.DataType[] = [];\r\n\r\n\t\t\t\tfor (const dataType of response) {\r\n\t\t\t\t\tdataTypes.push(new pms.DataType(dataType));\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn _.orderBy(dataTypes, ['createdOn'], ['desc']);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}","namespace Portico.Services {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\timport pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pms = Portico.Models.Setup;\r\n\r\n export interface IPortalChildService {\r\n delete(portalChild: pms.PortalChild): angular.IPromise;\r\n\t\tgetByPortalId(portalId: string): angular.IPromise;\r\n\t\tgetHistory(id: string, spinner?: string): angular.IPromise;\r\n save(portalChild: pms.PortalChild): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'portalChildService')\r\n @Inject('apiService')\r\n export class PortalChildService implements IPortalChildService {\r\n constructor(\r\n private apiService: IApiService\r\n ) { }\r\n\r\n delete(portalChild: pms.PortalChild): angular.IPromise {\r\n const endpoint = `/portalchild/${portalChild.id}`;\r\n\r\n return this.apiService.deleteItem(endpoint).then((response: boolean) => {\r\n return response;\r\n });\r\n }\r\n\r\n\t\tgetByPortalId(portalId: string): angular.IPromise {\r\n const endpoint = `/portalchildbyportalid/${portalId}`;\r\n\r\n return this.apiService.getItem(endpoint).then((response: pms.IPortalChild[]) => {\r\n const portalChilds: pms.PortalChild[] = [];\r\n\r\n for (const portalChild of response) {\r\n portalChilds.push(new pms.PortalChild(portalChild));\r\n }\r\n\r\n return portalChilds;\r\n });\r\n }\r\n\r\n\t\tgetHistory(id: string, spinner: string = null): angular.IPromise {\r\n\t\t\tconst endpoint = `/portalchildhistory/${id}`;\r\n\r\n\t\t\treturn this.apiService.getItem(endpoint, spinner).then((response: pms.PortalChild[]) => {\r\n\t\t\t\tconst portalChildren: pms.PortalChild[] = [];\r\n\r\n\t\t\t\tfor (const portalChild of response) {\r\n\t\t\t\t\tportalChildren.push(new pms.PortalChild(portalChild));\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn _.orderBy(portalChildren, ['createdOn'], ['desc']);\r\n\t\t\t});\r\n\t\t}\r\n\r\n save(portalChild: pms.PortalChild): angular.IPromise {\r\n const endpoint = `/portalchild`;\r\n\r\n return this.apiService.saveItem(endpoint, portalChild).then((response: pms.IPortalChild) => {\r\n return new pms.PortalChild(response);\r\n });\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\timport pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pms = Portico.Models.Setup;\r\n\r\n export interface IPortalDataGroupService {\r\n delete(portalDataGroup: pms.PortalDataGroup): angular.IPromise;\r\n\t\tgetByPortalId(portalId: string): angular.IPromise;\r\n\t\tgetHistory(id: string, spinner?: string): angular.IPromise;\r\n save(portalDataGroup: pms.PortalDataGroup): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'portalDataGroupService')\r\n @Inject('apiService')\r\n export class PortalDataGroupService implements IPortalDataGroupService {\r\n constructor(\r\n private apiService: IApiService\r\n ) { }\r\n\r\n delete(portalDataGroup: pms.PortalDataGroup): angular.IPromise {\r\n const endpoint = `/portaldatagroup/${portalDataGroup.id}`;\r\n\r\n return this.apiService.deleteItem(endpoint).then((response: boolean) => {\r\n return response;\r\n });\r\n }\r\n\r\n\t\tgetByPortalId(portalId: string): angular.IPromise {\r\n const endpoint = `/portaldatagroupbyportalid/${portalId}`;\r\n\r\n return this.apiService.getItem(endpoint).then((response: pms.IPortalDataGroup[]) => {\r\n const portalDataGroups: pms.PortalDataGroup[] = [];\r\n\r\n for (const portalDataGroup of response) {\r\n portalDataGroups.push(new pms.PortalDataGroup(portalDataGroup));\r\n }\r\n\r\n return portalDataGroups;\r\n });\r\n }\r\n\r\n\t\tgetHistory(id: string, spinner: string = null): angular.IPromise {\r\n\t\t\tconst endpoint = `/portaldatagrouphistory/${id}`;\r\n\r\n\t\t\treturn this.apiService.getItem(endpoint, spinner).then((response: pms.PortalDataGroup[]) => {\r\n\t\t\t\tconst portalDataGroups: pms.PortalDataGroup[] = [];\r\n\r\n\t\t\t\tfor (const portalDataGroup of response) {\r\n\t\t\t\t\tportalDataGroups.push(new pms.PortalDataGroup(portalDataGroup));\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn _.orderBy(portalDataGroups, ['createdOn'], ['desc']);\r\n\t\t\t});\r\n\t\t}\r\n\r\n save(portalDataGroup: pms.PortalDataGroup): angular.IPromise {\r\n const endpoint = `/portaldatagroup`;\r\n\r\n return this.apiService.saveItem(endpoint, portalDataGroup).then((response: pms.IPortalDataGroup) => {\r\n return new pms.PortalDataGroup(response);\r\n });\r\n }\r\n }\r\n}","namespace Portico.Services {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\timport pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pms = Portico.Models.Setup;\r\n\r\n export interface IPortalGroupService {\r\n delete(portalGroup: pms.PortalGroup): angular.IPromise;\r\n get(): angular.IPromise;\r\n\t\tgetById(id: string): angular.IPromise;\r\n\t\tgetHistory(id: string, spinner?: string): angular.IPromise;\r\n save(portalGroup: pms.PortalGroup): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'portalGroupService')\r\n @Inject('apiService')\r\n export class PortalGroupService implements IPortalGroupService {\r\n constructor(\r\n private apiService: IApiService\r\n ) { }\r\n\r\n delete(portalGroup: pms.PortalGroup): angular.IPromise {\r\n const endpoint = `/portalgroup/${portalGroup.id}`;\r\n\r\n return this.apiService.deleteItem(endpoint).then((response: boolean) => {\r\n return response;\r\n });\r\n }\r\n\r\n\t\tget(): angular.IPromise {\r\n\t\t\tconst endpoint = `/portalgroup`;\r\n\r\n\t\t\treturn this.apiService.getItem(endpoint).then((response: pms.IPortalGroup[]) => {\r\n\t\t\t\tconst portalGroups: pms.PortalGroup[] = [];\r\n\r\n\t\t\t\tfor (const portalGroup of response) {\r\n\t\t\t\t\tportalGroups.push(new pms.PortalGroup(portalGroup));\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn portalGroups;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tgetById(id: string): angular.IPromise {\r\n\t\t\tconst endpoint = `/portalgroup`;\r\n\r\n\t\t\treturn this.apiService.getItem(endpoint).then((response: pms.IPortalGroup) => {\r\n\t\t\t\treturn new pms.PortalGroup(response);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tgetHistory(id: string, spinner: string = null): angular.IPromise {\r\n\t\t\tconst endpoint = `/portalgrouphistory/${id}`;\r\n\r\n\t\t\treturn this.apiService.getItem(endpoint, spinner).then((response: pms.PortalGroup[]) => {\r\n\t\t\t\tconst portalGroups: pms.PortalGroup[] = [];\r\n\r\n\t\t\t\tfor (const portalGroup of response) {\r\n\t\t\t\t\tportalGroups.push(new pms.PortalGroup(portalGroup));\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn _.orderBy(portalGroups, ['createdOn'], ['desc']);\r\n\t\t\t});\r\n\t\t}\r\n\r\n save(portalGroup: pms.PortalGroup): angular.IPromise {\r\n const endpoint = `/portalgroup`;\r\n\r\n return this.apiService.saveItem(endpoint, portalGroup).then((response: pms.IPortalGroup) => {\r\n return new pms.PortalGroup(response);\r\n });\r\n }\r\n }\r\n}\r\n","namespace Portico.Services {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\timport pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pms = Portico.Models.Setup;\r\n\r\n export interface IPortalService {\r\n delete(portal: pms.Portal): angular.IPromise;\r\n\t\tgetById(id: string): angular.IPromise;\r\n\t\tgetByPortalGroupId(portalGroupId: string): angular.IPromise;\r\n\t\tgetDetailsById(id: string, session?: boolean): angular.IPromise;\r\n\t\tgetHistory(id: string, spinner?: string): angular.IPromise;\r\n save(portal: pms.Portal): angular.IPromise;\r\n\t\tsaveDetails(portal: pms.Portal): angular.IPromise;\r\n }\r\n\r\n @Service('app', 'portalService')\r\n\t@Inject('$q', 'apiService', 'serverConstants', 'storageService')\r\n export class PortalService implements IPortalService {\r\n constructor(\r\n private $q: angular.IQService,\r\n\t\t\tprivate apiService: IApiService,\r\n\t\t\tprivate serverConstants: pmi.IServerConstants,\r\n private storageService: IStorageService\r\n ) { }\r\n\r\n delete(portal: pms.Portal): angular.IPromise {\r\n const endpoint = `/portal/${portal.id}`;\r\n\r\n return this.apiService.deleteItem(endpoint).then((response: boolean) => {\r\n return response;\r\n });\r\n }\r\n\r\n\t\tgetById(id: string): angular.IPromise {\r\n const endpoint = `/portal/${id}`;\r\n\r\n return this.apiService.getItem(endpoint).then((response: pms.IPortal) => {\r\n return new pms.Portal(response);\r\n });\r\n }\r\n\r\n\t\tgetByPortalGroupId(portalGroupId: string): angular.IPromise {\r\n const endpoint = `/portalbyportalgroupid/${portalGroupId}`;\r\n\r\n return this.apiService.getItem(endpoint).then((response: pms.IPortal[]) => {\r\n const portals: pms.Portal[] = [];\r\n\r\n for (const portal of response) {\r\n portals.push(new pms.Portal(portal));\r\n }\r\n\r\n return portals;\r\n });\r\n }\r\n\r\n\t\tgetDetailsById(id: string, useStorage: boolean = true): angular.IPromise {\r\n const endpoint = `/portaldetails/${id}`;\r\n\r\n\t\t\tlet timestamp: Date = useStorage ? new Date(this.storageService.getItem(pm.StorageType.Local, `portal-${id}-timestamp`)) : null;\r\n\t\t\tlet portal: pms.Portal = useStorage && this.serverConstants.connectTo !== 'Qa' && timestamp >= this.serverConstants.tsPortal ? this.storageService.getItem(pm.StorageType.Local, `portal-${id}-details`) : null;\r\n\r\n const promise = portal ?\r\n this.$q.when(portal) :\r\n this.apiService.getItem(endpoint);\r\n\r\n return promise.then((response: pms.IPortal) => {\r\n portal = new pms.Portal(response);\r\n\r\n\t\t\t\tif (useStorage) {\r\n\t\t\t\t\tthis.storageService.saveItem(pm.StorageType.Local, `portal-${id}-details`, portal);\r\n\t\t\t\t\tthis.storageService.saveItem(pm.StorageType.Local, `portal-${id}-timestamp`, this.serverConstants.tsPortal);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn portal;\r\n });\r\n }\r\n\r\n\t\tgetHistory(id: string, spinner: string = null): angular.IPromise {\r\n\t\t\tconst endpoint = `/portalhistory/${id}`;\r\n\r\n\t\t\treturn this.apiService.getItem(endpoint, spinner).then((response: pms.Portal[]) => {\r\n\t\t\t\tconst portals: pms.Portal[] = [];\r\n\r\n\t\t\t\tfor (const portal of response) {\r\n\t\t\t\t\tportals.push(new pms.Portal(portal));\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn _.orderBy(portals, ['createdOn'], ['desc']);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsave(portal: pms.Portal): angular.IPromise {\r\n\t\t\tconst endpoint = `/portal`;\r\n\r\n\t\t\treturn this.apiService.saveItem(endpoint, portal).then((response: pms.IPortal) => {\r\n\t\t\t\treturn new pms.Portal(response);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsaveDetails(portal: pms.Portal): angular.IPromise {\r\n\t\t\tconst endpoint = `/portaldetails`;\r\n\r\n\t\t\treturn this.apiService.saveItem(endpoint, portal).then((response: pms.IPortal) => {\r\n\t\t\t\treturn new pms.Portal(response);\r\n\t\t\t});\r\n\t\t}\r\n }\r\n}","namespace Portico.Services {\r\n\r\n\timport pm = Portico.Models;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pms = Portico.Models.Setup;\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n export interface ISetupService {\r\n\t\tdataGroupService: IDataGroupService;\r\n\t\tdataGroupTypeService: IDataGroupTypeService;\r\n\t\tdataRowService: IDataRowService;\r\n\t\tdataTableService: IDataTableService;\r\n\t\tdataTypeService: IDataTypeService;\r\n\t\tportalChildService: IPortalChildService;\r\n\t\tportalDataGroupService: IPortalDataGroupService;\r\n\t\tportalGroupService: IPortalGroupService;\r\n\t\tportalService: IPortalService;\r\n\r\n\t\t// data column functions\r\n\t\taddDataColumn(dataTable: pms.DataTable, dataColumn?: pms.DataColumn): void;\r\n\t\tremoveDataColumn(dataTable: pms.DataTable, dataColumn: pms.DataColumn): void;\r\n\t\t// data group functions\r\n\t\tremoveDataGroup(dataGroup: pms.DataGroup, dataGroups?: pms.DataGroup[]): angular.IPromise;\r\n\t\tsaveDataGroup(dataGroup: pms.DataGroup, dataGroups?: pms.DataGroup[]): angular.IPromise;\r\n\t\t// data group type functions\r\n\t\tremoveDataGroupType(dataGroupType: pms.DataGroupType, dataGroupTypes?: pms.DataGroupType[]): angular.IPromise;\r\n\t\tsaveDataGroupType(dataGroupType: pms.DataGroupType, dataGroupTypes?: pms.DataGroupType[]): angular.IPromise;\r\n\t\t// data row functions\r\n\t\tcreateDataRow(dataGroupId: string, dataTableId: string, dataRow?: pms.DataRow): pms.DataRow;\r\n\t\tfixDataRow(dataTable: pms.DataTable, dataRow: pms.DataRow): void;\r\n\t\tremoveDataRow(dataRow: pms.DataRow, dataRows?: pms.DataRow[]): angular.IPromise;\r\n\t\tsaveDataRow(dataRow: pms.DataRow, dataRows?: pms.DataRow[]): angular.IPromise;\r\n\t\t// data table functions\r\n\t\tremoveDataTable(dataTable: pms.DataTable, dataTables?: pms.DataTable[]): angular.IPromise;\r\n\t\tsaveDataTable(dataTable: pms.DataTable, dataTables?: pms.DataTable[]): angular.IPromise;\r\n\t\t// portal functions\r\n\t\timportPortal(upload: any): void;\r\n\t\tremovePortal(portal: pms.Portal, portals?: pms.Portal[]): angular.IPromise;\r\n\t\tsavePortal(portal: pms.Portal, portals?: pms.Portal[], copyFrom?: string): angular.IPromise;\r\n\t\t// portal child functions\r\n\t\tremovePortalChild(portalChild: pms.PortalChild, portalChildren?: pms.PortalChild[]): angular.IPromise;\r\n\t\tsavePortalChild(portalChild: pms.PortalChild, portalChildren?: pms.PortalChild[]): angular.IPromise;\r\n\t\t// portal data group functions\r\n\t\tflattenPortalDataGroups(portalDataGroups: pms.PortalDataGroup[]): angular.IPromise;\r\n\t\tremovePortalDataGroup(portalDataGroup: pms.PortalDataGroup, portalDataGroups?: pms.PortalDataGroup[]): angular.IPromise;\r\n\t\tsavePortalDataGroup(portalDataGroup: pms.PortalDataGroup, portalDataGroups?: pms.PortalDataGroup[], dataGroups?: pms.DataGroup[]): angular.IPromise;\r\n\t\t// portal group functions\r\n\t\tremovePortalGroup(portalGroup: pms.PortalGroup, portalGroups?: pms.PortalGroup[]): angular.IPromise;\r\n\t\tsavePortalGroup(portalGroup: pms.PortalGroup, portalGroups?: pms.PortalGroup[]): angular.IPromise;\r\n\t}\r\n\r\n\t@Service(\r\n\t\t'app',\r\n\t\t'setupService'\r\n\t)\r\n\t@Inject(\r\n\t\t'$q',\r\n\t\t'Upload',\r\n\t\t'dataGroupService',\r\n\t\t'dataGroupTypeService',\r\n\t\t'dataRowService',\r\n\t\t'dataTableService',\r\n\t\t'dataTypeService',\r\n\t\t'modalService',\r\n\t\t'portalChildService',\r\n\t\t'portalDataGroupService',\r\n\t\t'portalGroupService',\r\n\t\t'portalService',\r\n\t\t'serverConstants'\r\n\t)\r\n\texport class SetupService implements ISetupService {\r\n\t\tconstructor(\r\n\t\t\tprivate $q: angular.IQService,\r\n\t\t\tprivate $upload: any,\r\n\t\t\tpublic dataGroupService: IDataGroupService,\r\n\t\t\tpublic dataGroupTypeService: IDataGroupTypeService,\r\n\t\t\tpublic dataRowService: IDataRowService,\r\n\t\t\tpublic dataTableService: IDataTableService,\r\n\t\t\tpublic dataTypeService: IDataTypeService,\r\n\t\t\tpublic modalService: IModalService,\r\n\t\t\tpublic portalChildService: IPortalChildService,\r\n\t\t\tpublic portalDataGroupService: IPortalDataGroupService,\r\n\t\t\tpublic portalGroupService: IPortalGroupService,\r\n\t\t\tpublic portalService: IPortalService,\r\n\t\t\tprivate serverConstants: pmi.IServerConstants\r\n ) { }\r\n\r\n\t\t// data column functions\r\n\r\n\t\taddDataColumn(dataTable: pms.DataTable, dataColumn: pms.DataColumn = null): void {\r\n\t\t\tif (!dataTable.dataColumns) {\r\n\t\t\t\tdataTable.dataColumns = [];\r\n\t\t\t}\r\n\r\n\t\t\tdataTable.dataColumns.push(dataColumn || new pms.DataColumn());\r\n\t\t}\r\n\r\n\t\tremoveDataColumn(dataTable: pms.DataTable, dataColumn: pms.DataColumn): void {\r\n\t\t\tdataTable.dataColumns = dataTable.dataColumns.filter((dc: pms.DataColumn) => {\r\n\t\t\t\treturn dc !== dataColumn;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// data group functions\r\n\r\n\t\tremoveDataGroup(dataGroup: pms.DataGroup, dataGroups: pms.DataGroup[] = null): angular.IPromise {\r\n\t\t\treturn this.dataGroupService.delete(dataGroup).then((response: boolean) => {\r\n\t\t\t\tif (dataGroups) {\r\n\t\t\t\t\tfor (let i = dataGroups.length - 1; i >= 0; i--) {\r\n\t\t\t\t\t\tif (dataGroups[i].id === dataGroup.id) {\r\n\t\t\t\t\t\t\tdataGroups.splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn response;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsaveDataGroup(dataGroup: pms.DataGroup, dataGroups: pms.DataGroup[] = null): angular.IPromise {\r\n\t\t\tlet duplicate = false;\r\n\r\n\t\t\t// check for a duplicate dataGroup name\r\n\t\t\tif (dataGroups) {\r\n\t\t\t\tdataGroups.forEach((pg: pms.DataGroup) => {\r\n\t\t\t\t\tif (pg.id !== dataGroup.id && pg.name === dataGroup.name) {\r\n\t\t\t\t\t\tduplicate = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (duplicate) {\r\n\t\t\t\t\treturn this.$q.when(null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// save dataGroup\r\n\t\t\treturn this.dataGroupService.save(dataGroup).then((response: pms.DataGroup) => {\r\n\t\t\t\tif (dataGroups) {\r\n\t\t\t\t\tif (dataGroup.id) {\r\n\t\t\t\t\t\t// update dataGroup\r\n\t\t\t\t\t\tfor (let i = dataGroups.length - 1; i >= 0; i--) {\r\n\t\t\t\t\t\t\tif (dataGroups[i].id === dataGroup.id) {\r\n\t\t\t\t\t\t\t\tdataGroups[i] = response;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// insert dataGroup\r\n\t\t\t\t\t\tdataGroups.push(response);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn response;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// data group type functions\r\n\r\n\t\tremoveDataGroupType(dataGroupType: pms.DataGroupType, dataGroupTypes: pms.DataGroupType[] = null): angular.IPromise {\r\n\t\t\treturn this.dataGroupTypeService.delete(dataGroupType).then((response: boolean) => {\r\n\t\t\t\tif (dataGroupTypes) {\r\n\t\t\t\t\tfor (let i = dataGroupTypes.length - 1; i >= 0; i--) {\r\n\t\t\t\t\t\tif (dataGroupTypes[i].id === dataGroupType.id) {\r\n\t\t\t\t\t\t\tdataGroupTypes.splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn response;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsaveDataGroupType(dataGroupType: pms.DataGroupType, dataGroupTypes: pms.DataGroupType[] = null): angular.IPromise {\r\n\t\t\tlet duplicate = false;\r\n\r\n\t\t\t// check for a duplicate dataGroupType name\r\n\t\t\tif (dataGroupTypes) {\r\n\t\t\t\tdataGroupTypes.forEach((pg: pms.DataGroupType) => {\r\n\t\t\t\t\tif (pg.id !== dataGroupType.id && pg.name === dataGroupType.name) {\r\n\t\t\t\t\t\tduplicate = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (duplicate) {\r\n\t\t\t\t\treturn this.$q.when(null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// save dataGroupType\r\n\t\t\treturn this.dataGroupTypeService.save(dataGroupType).then((response: pms.DataGroupType) => {\r\n\t\t\t\tif (dataGroupTypes) {\r\n\t\t\t\t\tif (dataGroupType.id) {\r\n\t\t\t\t\t\t// update dataGroupType\r\n\t\t\t\t\t\tfor (let i = dataGroupTypes.length - 1; i >= 0; i--) {\r\n\t\t\t\t\t\t\tif (dataGroupTypes[i].id === dataGroupType.id) {\r\n\t\t\t\t\t\t\t\tdataGroupTypes[i] = response;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// insert dataGroupType\r\n\t\t\t\t\t\tdataGroupTypes.push(response);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn response;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// data row functions\r\n\r\n\t\tcreateDataRow(dataGroupId: string, dataTableId: string, dataRow: pms.DataRow = null): pms.DataRow {\r\n\t\t\treturn dataRow ? new pms.DataRow(dataRow) : new pms.DataRow({ dataGroupId: dataGroupId, dataTableId: dataTableId });\r\n\t\t}\r\n\r\n\t\tfixDataRow(dataTable: pms.DataTable, dataRow: pms.DataRow): void {\r\n\t\t\t// remove invalid values\r\n\t\t\tfor (let i = dataRow.dataValues.length - 1; i >= 0; i--) {\r\n\t\t\t\tconst matches = dataTable.dataColumns.filter((dc: pms.DataColumn) => {\r\n\t\t\t\t\treturn dc.id === dataRow.dataValues[i].dataColumnId;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (!matches.length) {\r\n\t\t\t\t\tdataRow.dataValues[i].isDeleted = true;\r\n\t\t\t\t\t// this.dataRow.dataValues.splice(i, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// add missing values\r\n\t\t\tdataTable.dataColumns.forEach((dc: pms.DataColumn) => {\r\n\t\t\t\tif (dataRow.getDataValue(dc.id) === null) {\r\n\t\t\t\t\tdataRow.dataValues.push(new pms.DataValue({ id: null, dataRowId: dataRow.id, dataColumnId: dc.id, value: null, createdBy: null, createdOn: null, isDeleted: false }));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tremoveDataRow(dataRow: pms.DataRow, dataRows: pms.DataRow[] = null): angular.IPromise {\r\n\t\t\treturn this.dataRowService.delete(dataRow).then((response: boolean) => {\r\n\t\t\t\tif (dataRows) {\r\n\t\t\t\t\tfor (let i = dataRows.length - 1; i >= 0; i--) {\r\n\t\t\t\t\t\tif (dataRows[i].id === dataRow.id) {\r\n\t\t\t\t\t\t\tdataRows.splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn response;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsaveDataRow(dataRow: pms.DataRow, dataRows: pms.DataRow[] = null): angular.IPromise {\r\n\t\t\tlet duplicate = false;\r\n\r\n\t\t\t// check for a duplicate data key\r\n\t\t\tif (dataRows) {\r\n\t\t\t\tdataRows.forEach((dr: pms.DataRow) => {\r\n\t\t\t\t\tif (dr.id !== dataRow.id && dr.dataGroupId === dataRow.dataGroupId && dr.dataTableId === dataRow.dataTableId && dr.key === dataRow.key) {\r\n\t\t\t\t\t\tduplicate = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (duplicate) {\r\n\t\t\t\t\treturn this.$q.when(null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// save data\r\n\t\t\treturn this.dataRowService.save(dataRow).then((response: pms.DataRow) => {\r\n\t\t\t\tif (dataRows) {\r\n\t\t\t\t\tif (dataRow.id) {\r\n\t\t\t\t\t\t// update data\r\n\t\t\t\t\t\tfor (let i = dataRows.length - 1; i >= 0; i--) {\r\n\t\t\t\t\t\t\tif (dataRows[i].id === dataRow.id) {\r\n\t\t\t\t\t\t\t\tdataRows[i] = response;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// insert data\r\n\t\t\t\t\t\tdataRows.push(response);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn response;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// data table functions\r\n\r\n\t\tremoveDataTable(dataTable: pms.DataTable, dataTables: pms.DataTable[] = null): angular.IPromise {\r\n\t\t\treturn this.dataTableService.delete(dataTable).then((response: boolean) => {\r\n\t\t\t\tif (dataTables) {\r\n\t\t\t\t\tfor (let i = dataTables.length - 1; i >= 0; i--) {\r\n\t\t\t\t\t\tif (dataTables[i].id === dataTable.id) {\r\n\t\t\t\t\t\t\tdataTables.splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn response;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsaveDataTable(dataTable: pms.DataTable, dataTables: pms.DataTable[] = null): angular.IPromise {\r\n\t\t\tlet duplicate = false;\r\n\r\n\t\t\tif (dataTables) {\r\n\t\t\t\t// check for a duplicate data table name\r\n\t\t\t\tdataTables.forEach((dt: pms.DataTable) => {\r\n\t\t\t\t\tif (dt.id !== dataTable.id && dt.name === dataTable.name) {\r\n\t\t\t\t\t\tduplicate = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (dataTable.dataColumns) {\r\n\t\t\t\t\t// check for a duplicate data column name\r\n\t\t\t\t\tdataTable.dataColumns.forEach((dc: pms.DataColumn) => {\r\n\t\t\t\t\t\tconst matches = dataTable.dataColumns.filter((dc2: pms.DataColumn) => {\r\n\t\t\t\t\t\t\treturn dc2.name === dc.name;\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tif (matches.length > 1) {\r\n\t\t\t\t\t\t\tduplicate = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (duplicate) {\r\n\t\t\t\t\treturn this.$q.when(null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// save data table\r\n\t\t\treturn this.dataTableService.save(dataTable).then((response: pms.DataTable) => {\r\n\t\t\t\tif (dataTables) {\r\n\t\t\t\t\tif (dataTable.id) {\r\n\t\t\t\t\t\t// update data table\r\n\t\t\t\t\t\tfor (let i = dataTables.length - 1; i >= 0; i--) {\r\n\t\t\t\t\t\t\tif (dataTables[i].id === dataTable.id) {\r\n\t\t\t\t\t\t\t\tdataTables[i] = response;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// insert data table\r\n\t\t\t\t\t\tdataTables.push(response);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn response;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// portal functions\r\n\r\n\t\timportPortal(upload: any): angular.IPromise {\r\n\t\t\t// this.modalService.show('spinner');\r\n\t\t\tdocument.getElementById('global-spinner-overlay').style.display = 'flex';\r\n\r\n\t\t\treturn this.$upload.upload({\r\n\t\t\t\turl: this.serverConstants.root + 'Setup/Import',\r\n\t\t\t\tdata: { file: upload }\r\n\t\t\t}).then((data, status, headers, config) => {\r\n\t\t\t\treturn true\r\n\t\t\t}, (data, status, headers, config) => {\r\n\t\t\t\treturn false;\r\n\t\t\t}).finally(() => {\r\n\t\t\t\t// this.modalService.hide('spinner');\r\n\t\t\t\tdocument.getElementById('global-spinner-overlay').style.display = 'none';\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tremovePortal(portal: pms.Portal, portals: pms.Portal[] = null): angular.IPromise {\r\n\t\t\treturn this.portalService.getDetailsById(portal.id).then((details) => {\r\n\t\t\t\treturn this.portalService.delete(portal).then((response: boolean) => {\r\n\t\t\t\t\tif (portals) {\r\n\t\t\t\t\t\tfor (let i = portals.length - 1; i >= 0; i--) {\r\n\t\t\t\t\t\t\tif (portals[i].id === portal.id) {\r\n\t\t\t\t\t\t\t\tportals.splice(i, 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tconst promises: angular.IPromise[] = [];\r\n\r\n\t\t\t\t\tdetails.portalDataGroups.forEach((portalDataGroup) => {\r\n\t\t\t\t\t\tif (portalDataGroup.dataGroup.isPrivate) {\r\n\t\t\t\t\t\t\tpromises.push(this.dataGroupService.delete(portalDataGroup.dataGroup));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\treturn this.$q.all(promises).then(() => {\r\n\t\t\t\t\t\treturn response;\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsavePortal(portal: pms.Portal, portals: pms.Portal[] = null, copyFrom: string = null): angular.IPromise {\r\n\t\t\tlet duplicate = false;\r\n\r\n\t\t\t// check for a duplicate portal version\r\n\t\t\tif (portals) {\r\n\t\t\t\tportals.forEach((p: pms.Portal) => {\r\n\t\t\t\t\tif (p.id !== portal.id && p.name === portal.name) {\r\n\t\t\t\t\t\tduplicate = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (duplicate) {\r\n\t\t\t\t\treturn this.$q.when(null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// save portal\r\n\t\t\treturn this.portalService.save(portal).then((response: pms.Portal) => {\r\n\t\t\t\tif (portals) {\r\n\t\t\t\t\tif (portal.id) {\r\n\t\t\t\t\t\t// update portal\r\n\t\t\t\t\t\tfor (let i = portals.length - 1; i >= 0; i--) {\r\n\t\t\t\t\t\t\tif (portals[i].id === portal.id) {\r\n\t\t\t\t\t\t\t\tportals[i] = response;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// insert portal\r\n\t\t\t\t\t\tportals.push(response);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn portal.id ? this.$q.when(response) : this.copyAndSave_portalDetails(response, copyFrom);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tprivate copyAndSave_portalDetails(portal: pms.Portal, copyFrom: string): angular.IPromise {\r\n\t\t\tlet promise = null as angular.IPromise;\r\n\r\n\t\t\tif (copyFrom) {\r\n\t\t\t\tpromise = this.portalService.getDetailsById(copyFrom);\r\n\t\t\t} else {\r\n\t\t\t\tconst temp = new pms.Portal({\r\n\t\t\t\t\tportalDataGroups: [\r\n\t\t\t\t\t\tnew pms.PortalDataGroup({\r\n\t\t\t\t\t\t\tdataGroup: new pms.DataGroup({\r\n\t\t\t\t\t\t\t\tid: pm.DATA_GROUP_STANDARD_DEFAULT,\r\n\t\t\t\t\t\t\t\tisPrivate: false\r\n\t\t\t\t\t\t\t}),\r\n\t\t\t\t\t\t\tpriority: 1\r\n\t\t\t\t\t\t}),\r\n\t\t\t\t\t\tnew pms.PortalDataGroup({\r\n\t\t\t\t\t\t\tdataGroup: new pms.DataGroup({\r\n\t\t\t\t\t\t\t\tdataGroupTypeId: pm.DATA_GROUP_TYPE_PORTAL,\r\n\t\t\t\t\t\t\t\tisPrivate: true,\r\n\t\t\t\t\t\t\t\tname: portal.name\r\n\t\t\t\t\t\t\t}),\r\n\t\t\t\t\t\t\tpriority: 9\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t]\r\n\t\t\t\t});\r\n\r\n\t\t\t\tpromise = this.$q.when(temp);\r\n\t\t\t}\r\n\r\n\t\t\treturn promise.then((original) => {\r\n\t\t\t\tlet pdgPromise = this.$q.when();\r\n\r\n\t\t\t\toriginal.portalDataGroups.forEach((opdg) => {\r\n\t\t\t\t\tpdgPromise = pdgPromise.then((result) => {\r\n\t\t\t\t\t\treturn this.copyAndSave_portalDataGroup(portal.id, portal.name, opdg).then((pdg) => {\r\n\t\t\t\t\t\t\tportal.portalDataGroups.push(pdg);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn pdgPromise.then(() => {\r\n\t\t\t\t\treturn portal;\r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\t\t\t// const pdgPromises: angular.IPromise[] = [];\r\n\r\n\t\t\t//original.portalDataGroups.forEach((opdg) => {\r\n\t\t\t//\tpdgPromises.push(this.copyAndSave_portalDataGroup(portal.id, portal.name, opdg));\r\n\t\t\t//});\r\n\r\n\t\t\t//return this.$q.all(pdgPromises).then((portalDataGroups) => {\r\n\t\t\t//\tportal.portalDataGroups = portalDataGroups;\r\n\t\t\t//\treturn portal;\r\n\t\t\t//});\r\n\t\t}\r\n\r\n\t\tprivate copyAndSave_portalDataGroup(portalId: string, name: string, portalDataGroup: pms.PortalDataGroup): angular.IPromise {\r\n\t\t\tconst promise =\r\n\t\t\t\tthis.$q.when(portalDataGroup.dataGroup.isPrivate ?\r\n\t\t\t\t\tthis.copyAndSave_dataGroup(name, portalDataGroup.dataGroup) :\r\n\t\t\t\t\tportalDataGroup.dataGroup);\r\n\r\n\t\t\treturn promise.then((response) => {\r\n\t\t\t\tconst copy = new pms.PortalDataGroup({\r\n\t\t\t\t\tportalId: portalId,\r\n\t\t\t\t\tdataGroupId: response.id,\r\n\t\t\t\t\tpriority: portalDataGroup.priority\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn this.portalDataGroupService.save(copy);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tprivate copyAndSave_dataGroup(name: string, dataGroup: pms.DataGroup): angular.IPromise {\r\n\t\t\tconst copy = new pms.DataGroup({\r\n\t\t\t\tdataGroupTypeId: dataGroup.dataGroupTypeId,\r\n\t\t\t\tisPrivate: dataGroup.isPrivate,\r\n\t\t\t\tname: name\r\n\t\t\t});\r\n\r\n\t\t\treturn this.dataGroupService.save(copy).then((response) => {\r\n\t\t\t\tlet promise = this.$q.when();\r\n\r\n\t\t\t\tdataGroup.dataRows.forEach((dataRow) => {\r\n\t\t\t\t\tconst dataValues: pms.DataValue[] = [];\r\n\r\n\t\t\t\t\tdataRow.dataValues.forEach((dataValue) => {\r\n\t\t\t\t\t\tconst dvc = new pms.DataValue({\r\n\t\t\t\t\t\t\tdataColumnId: dataValue.dataColumnId,\r\n\t\t\t\t\t\t\tvalue: dataValue.value\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tdataValues.push(dvc);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tconst drc = new pms.DataRow({\r\n\t\t\t\t\t\tdataGroupId: response.id,\r\n\t\t\t\t\t\tdataTableId: dataRow.dataTableId,\r\n\t\t\t\t\t\tdataValues: dataValues,\r\n\t\t\t\t\t\tkey: dataRow.key\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tpromise = promise.then(() => {\r\n\t\t\t\t\t\treturn this.dataRowService.save(drc).then(() => {\r\n\t\t\t\t\t\t\t// do nothing\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn promise.then((responses) => {\r\n\t\t\t\t\treturn response;\r\n\t\t\t\t});\r\n\r\n\t\t\t\t//const promises: angular.IPromise[] = [];\r\n\r\n\t\t\t\t//dataGroup.dataRows.forEach((dataRow) => {\r\n\t\t\t\t//\tconst dataValues: pms.DataValue[] = [];\r\n\r\n\t\t\t\t//\tdataRow.dataValues.forEach((dataValue) => {\r\n\t\t\t\t//\t\tconst dvc = new pms.DataValue({\r\n\t\t\t\t//\t\t\tdataColumnId: dataValue.dataColumnId,\r\n\t\t\t\t//\t\t\tvalue: dataValue.value\r\n\t\t\t\t//\t\t});\r\n\r\n\t\t\t\t//\t\tdataValues.push(dvc);\r\n\t\t\t\t//\t});\r\n\r\n\t\t\t\t//\tconst drc = new pms.DataRow({\r\n\t\t\t\t//\t\tdataGroupId: response.id,\r\n\t\t\t\t//\t\tdataTableId: dataRow.dataTableId,\r\n\t\t\t\t//\t\tdataValues: dataValues,\r\n\t\t\t\t//\t\tkey: dataRow.key\r\n\t\t\t\t//\t});\r\n\r\n\t\t\t\t//\tpromises.push(this.dataRowService.save(drc));\r\n\t\t\t\t//});\r\n\r\n\t\t\t\t//return this.$q.all(promises).then((responses) => {\r\n\t\t\t\t//\treturn response;\r\n\t\t\t\t//});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// portal child functions\r\n\r\n\t\tremovePortalChild(portalChild: pms.PortalChild, portalChildren: pms.PortalChild[] = null): angular.IPromise {\r\n\t\t\treturn this.portalChildService.delete(portalChild).then((response: boolean) => {\r\n\t\t\t\tif (portalChildren) {\r\n\t\t\t\t\tfor (let i = portalChildren.length - 1; i >= 0; i--) {\r\n\t\t\t\t\t\tif (portalChildren[i].id === portalChild.id) {\r\n\t\t\t\t\t\t\tportalChildren.splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn response;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsavePortalChild(portalChild: pms.PortalChild, portalChildren: pms.PortalChild[] = null): angular.IPromise {\r\n\t\t\tlet duplicate = false;\r\n\r\n\t\t\t// check for a duplicate portalChild childId\r\n\t\t\tif (portalChildren) {\r\n\t\t\t\tportalChildren.forEach((pc: pms.PortalChild) => {\r\n\t\t\t\t\tif (pc.id !== portalChild.id && pc.childId === portalChild.childId) {\r\n\t\t\t\t\t\tduplicate = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (duplicate) {\r\n\t\t\t\t\treturn this.$q.when(null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// save portal child\r\n\t\t\treturn this.portalChildService.save(portalChild).then((response: pms.PortalChild) => {\r\n\t\t\t\tif (portalChildren) {\r\n\t\t\t\t\tif (portalChild.id) {\r\n\t\t\t\t\t\t// update portal child\r\n\t\t\t\t\t\tfor (let i = portalChildren.length - 1; i >= 0; i--) {\r\n\t\t\t\t\t\t\tif (portalChildren[i].id === portalChild.id) {\r\n\t\t\t\t\t\t\t\tportalChildren[i] = response;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// insert portal child\r\n\t\t\t\t\t\tportalChildren.push(response);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn response;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// portal data group functions\r\n\r\n\t\tflattenPortalDataGroups(portalDataGroups: pms.PortalDataGroup[]): angular.IPromise {\r\n\t\t\tconst sorted = portalDataGroups.sort((a, b) => {\r\n\t\t\t\treturn a.priority - b.priority;\r\n\t\t\t});\r\n\r\n\t\t\tconst keepers = sorted.filter((portalDataGroup) => {\r\n\t\t\t\treturn portalDataGroup.dataGroup.isPrivate;\r\n\t\t\t});\r\n\r\n\t\t\tlet promises: angular.IPromise[] = [];\r\n\r\n\t\t\tsorted.forEach((portalDataGroup) => {\r\n\t\t\t\tpromises.push(this.dataRowService.getByDataGroupId(portalDataGroup.dataGroup.id).then((response) => {\r\n\t\t\t\t\tportalDataGroup.dataGroup.dataRows = response;\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}));\r\n\t\t\t});\r\n\r\n\t\t\treturn this.$q.all(promises).then(() => {\r\n\t\t\t\tpromises = [];\r\n\r\n\t\t\t\tsorted.forEach((portalDataGroup) => {\r\n\t\t\t\t\tif (!portalDataGroup.dataGroup.isPrivate) {\r\n\t\t\t\t\t\tportalDataGroup.dataGroup.dataRows.forEach((dataRow) => {\r\n\t\t\t\t\t\t\tconst matches = keepers[0].dataGroup.getDataRows(dataRow.dataTableId, dataRow.key);\r\n\r\n\t\t\t\t\t\t\tif (matches.length === 0) {\r\n\t\t\t\t\t\t\t\tconst dataValues: pms.DataValue[] = [];\r\n\r\n\t\t\t\t\t\t\t\tdataRow.dataValues.forEach((dataValue) => {\r\n\t\t\t\t\t\t\t\t\tconst dvc = new pms.DataValue({\r\n\t\t\t\t\t\t\t\t\t\tdataColumnId: dataValue.dataColumnId,\r\n\t\t\t\t\t\t\t\t\t\tvalue: dataValue.value\r\n\t\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\t\tdataValues.push(dvc);\r\n\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\tconst drc = new pms.DataRow({\r\n\t\t\t\t\t\t\t\t\tdataGroupId: keepers[0].dataGroup.id,\r\n\t\t\t\t\t\t\t\t\tdataTableId: dataRow.dataTableId,\r\n\t\t\t\t\t\t\t\t\tdataValues: dataValues,\r\n\t\t\t\t\t\t\t\t\tkey: dataRow.key\r\n\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\tkeepers[0].dataGroup.dataRows.push(drc);\r\n\r\n\t\t\t\t\t\t\t\tpromises.push(this.dataRowService.save(drc));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tpromises.push(this.removePortalDataGroup(portalDataGroup));\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn this.$q.all(promises).then(() => {\r\n\t\t\t\t\tangular.copy(keepers, portalDataGroups);\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tremovePortalDataGroup(portalDataGroup: pms.PortalDataGroup, portalDataGroups: pms.PortalDataGroup[] = null): angular.IPromise {\r\n\t\t\treturn this.portalDataGroupService.delete(portalDataGroup).then((response: boolean) => {\r\n\t\t\t\tif (portalDataGroups) {\r\n\t\t\t\t\tfor (let i = portalDataGroups.length - 1; i >= 0; i--) {\r\n\t\t\t\t\t\tif (portalDataGroups[i].id === portalDataGroup.id) {\r\n\t\t\t\t\t\t\tportalDataGroups.splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn response;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsavePortalDataGroup(portalDataGroup: pms.PortalDataGroup, portalDataGroups: pms.PortalDataGroup[] = null, dataGroups: pms.DataGroup[] = null): angular.IPromise {\r\n\t\t\tlet duplicate = false;\r\n\r\n\t\t\t// check for a duplicate portalDataGroup dataGroupId or priority\r\n\t\t\tif (portalDataGroups) {\r\n\t\t\t\tportalDataGroups.forEach((pdg: pms.PortalDataGroup) => {\r\n\t\t\t\t\tif (pdg.id !== portalDataGroup.id && (pdg.dataGroupId === portalDataGroup.dataGroupId || pdg.priority === portalDataGroup.priority)) {\r\n\t\t\t\t\t\tduplicate = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (duplicate) {\r\n\t\t\t\t\treturn this.$q.when(null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// save portalDataGroup\r\n\t\t\treturn this.portalDataGroupService.save(portalDataGroup).then((response: pms.PortalDataGroup) => {\r\n\t\t\t\tif (portalDataGroups) {\r\n\t\t\t\t\tif (portalDataGroup.id) {\r\n\t\t\t\t\t\t// update portalDataGroup\r\n\t\t\t\t\t\tfor (let i = portalDataGroups.length - 1; i >= 0; i--) {\r\n\t\t\t\t\t\t\tif (portalDataGroups[i].id === portalDataGroup.id) {\r\n\t\t\t\t\t\t\t\tportalDataGroups[i] = response;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// insert portalDataGroup\r\n\t\t\t\t\t\tportalDataGroups.push(response);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (dataGroups) {\r\n\t\t\t\t\tvar matches = dataGroups.filter((dataGroup: pms.DataGroup) => {\r\n\t\t\t\t\t\treturn dataGroup.id === portalDataGroup.dataGroupId;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tresponse.dataGroup = matches[0];\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn response;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// portal group functions\r\n\r\n\t\tremovePortalGroup(portalGroup: pms.PortalGroup, portalGroups: pms.PortalGroup[] = null): angular.IPromise {\r\n\t\t\treturn this.portalGroupService.delete(portalGroup).then((response: boolean) => {\r\n\t\t\t\tif (portalGroups) {\r\n\t\t\t\t\tfor (let i = portalGroups.length - 1; i >= 0; i--) {\r\n\t\t\t\t\t\tif (portalGroups[i].id === portalGroup.id) {\r\n\t\t\t\t\t\t\tportalGroups.splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn response;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsavePortalGroup(portalGroup: pms.PortalGroup, portalGroups: pms.PortalGroup[] = null): angular.IPromise {\r\n\t\t\tlet duplicate = false;\r\n\r\n\t\t\t// check for a duplicate portalGroup name\r\n\t\t\tif (portalGroups) {\r\n\t\t\t\tportalGroups.forEach((pg: pms.PortalGroup) => {\r\n\t\t\t\t\tif (pg.id !== portalGroup.id && pg.name === portalGroup.name) {\r\n\t\t\t\t\t\tduplicate = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (duplicate) {\r\n\t\t\t\t\treturn this.$q.when(null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// save portalGroup\r\n\t\t\treturn this.portalGroupService.save(portalGroup).then((response: pms.PortalGroup) => {\r\n\t\t\t\tif (portalGroups) {\r\n\t\t\t\t\tif (portalGroup.id) {\r\n\t\t\t\t\t\t// update portalGroup\r\n\t\t\t\t\t\tfor (let i = portalGroups.length - 1; i >= 0; i--) {\r\n\t\t\t\t\t\t\tif (portalGroups[i].id === portalGroup.id) {\r\n\t\t\t\t\t\t\t\tportalGroups[i] = response;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// insert portalGroup\r\n\t\t\t\t\t\tportalGroups.push(response);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn response;\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}","namespace Portico.Tfs {\r\n export class TfsBuildDefinitionService {\r\n constructor(private $http: angular.IHttpService, private settings: ITfsSettings) {}\r\n\r\n private request(method: string, url: string, data?: any): ng.IPromise {\r\n url = `/${this.settings.project}/_apis/build${url}`;\r\n\r\n return this.$http(tfsRequest({ method, url, data }, this.settings, '2.0')).then(\r\n x => x.data\r\n );\r\n }\r\n\r\n public list(criteria: Build.Definition.List.Request) {\r\n const items: string[] = [];\r\n for (let key of Object.keys(criteria)) {\r\n if (Array.isArray(criteria[key])) {\r\n criteria[key] = criteria[key].join(',');\r\n }\r\n items.push(`${key}=${criteria[key]}`);\r\n }\r\n let url = '/definitions';\r\n if (items.length > 0) {\r\n url += '?' + items.join('&');\r\n }\r\n return this.request('get', url);\r\n }\r\n\r\n public async find(\r\n criteria: Build.Definition.List.Request,\r\n func: (build: Build.Definition.List.Value) => boolean\r\n ) {\r\n const builds = await this.list(criteria);\r\n const found = _.find(builds.value, func);\r\n if (found) return await this.get(found.id);\r\n }\r\n\r\n public get(id: number) {\r\n let url = `/definitions/${id}`;\r\n return this.request('get', url);\r\n }\r\n\r\n public revision(id: number, revision: number) {\r\n const url = `/definitions/${id}?revision=${revision}`;\r\n return this.request('get', url);\r\n }\r\n\r\n public create(request: Tfs.Build.Definition.Create.Request) {\r\n const url = `/definitions`;\r\n return this.request('post', url, request);\r\n }\r\n\r\n public update(id: number, request: Tfs.Build.Definition.Update.Request) {\r\n const url = `/definitions/${id}`;\r\n return this.request('put', url, request);\r\n }\r\n\r\n public delete(id: number) {\r\n const url = `/definitions/${id}`;\r\n return this.request('delete', url);\r\n }\r\n\r\n public revisions(id: number) {\r\n const url = `/definitions/${id}/revisions`;\r\n return this.request('get', url);\r\n }\r\n\r\n public options() {\r\n const url = `/options`;\r\n return this.request('get', url);\r\n }\r\n }\r\n}\r\n","namespace Portico.Tfs {\r\n export class TfsBuildService {\r\n constructor(private $http: angular.IHttpService, private settings: ITfsSettings) {}\r\n\r\n private request(method: string, url: string, data?: any): ng.IPromise {\r\n url = `/${this.settings.project}/_apis/build${url}`;\r\n return this.$http(tfsRequest({ method, url, data }, this.settings, '2.0')).then(\r\n x => x.data\r\n );\r\n }\r\n\r\n public list(criteria: Build.List.Request) {\r\n const items: string[] = [];\r\n for (let key of Object.keys(criteria)) {\r\n if (Array.isArray(criteria[key])) {\r\n criteria[key] = criteria[key].join(',');\r\n }\r\n items.push(`${key}=${criteria[key]}`);\r\n }\r\n let url = `/builds`;\r\n if (items.length > 0) {\r\n url += '?' + items.join('&');\r\n }\r\n return this.request('get', url);\r\n }\r\n\r\n public queue(request: Build.Queue.Request) {\r\n const url = `/builds`;\r\n return this.request('post', url, request);\r\n }\r\n\r\n public get(id: number) {\r\n const url = `/builds/${id}`;\r\n return this.request('get', url);\r\n }\r\n\r\n public timeline(id: number) {\r\n const url = `/builds/${id}/timeline`;\r\n return this.request('get', url);\r\n }\r\n\r\n public changes(id: number) {\r\n const url = `/builds/${id}/timeline`;\r\n return this.request('get', url);\r\n }\r\n\r\n public workItems(id: number, query: { $top: number }) {\r\n const url = `/builds/${id}/workitems`;\r\n return this.request('post', url, query);\r\n }\r\n\r\n public logs(id: number) {\r\n const url = `/builds/${id}/timeline`;\r\n return this.request('get', url);\r\n }\r\n\r\n public artifacts(id: number) {\r\n const url = `/builds/${id}/artifacts`;\r\n return this.request('get', url);\r\n }\r\n\r\n public tags(id: number) {\r\n const url = `/builds/${id}/tags`;\r\n return this.request('get', url);\r\n }\r\n\r\n public addTag(id: number, tag: string) {\r\n const url = `/builds/${id}/tags/${tag}`;\r\n return this.request('put', url);\r\n }\r\n\r\n public removeTag(id: number, tag: string) {\r\n const url = `/builds/${id}/tags/${tag}`;\r\n return this.request('delete', url);\r\n }\r\n\r\n public update(id: number, request: Build.Get.UpdateRequest) {\r\n const url = `/builds/${id}`;\r\n return this.request('patch', url, request);\r\n }\r\n\r\n public delete(id: number) {\r\n const url = `/builds/${id}`;\r\n return this.request('delete', url);\r\n }\r\n }\r\n}\r\n","namespace Portico.Tfs {\r\n angular.module('app').directive('tfsBuildView', [\r\n function() {\r\n class Controller {\r\n build: Build.Get.Response;\r\n name: string;\r\n panel: { [index: string]: boolean };\r\n\r\n constructor(\r\n private $scope: ng.IScope,\r\n private $attrs: ng.IAttributes,\r\n private tfsService: TfsService\r\n ) {\r\n this.name = $attrs['name'];\r\n $scope.$on('tfs:update', () => this.update());\r\n }\r\n\r\n get isComplete() {\r\n return this.build && this.build.status === 'completed';\r\n }\r\n get buildUrl() {\r\n return this.build && this.build._links.web.href;\r\n }\r\n get commitUrl() {\r\n return (\r\n this.build &&\r\n `https://tfs.trialcard.com/DevCollection/Portico/Team%20Portals%20to%20Go/_git/Portico/commit/${\r\n this.build.sourceVersion\r\n }`\r\n );\r\n }\r\n get compareUrl() {\r\n return (\r\n this.build &&\r\n `https://tfs.trialcard.com/DevCollection/_git/Portico/branches?baseVersion=GBmaster&targetVersion=GC${\r\n this.build.sourceVersion\r\n }&_a=commits`\r\n );\r\n }\r\n\r\n release() {\r\n (this.$scope.$parent).tfs.onRelease();\r\n }\r\n\r\n sync() {\r\n (this.$scope.$parent).tfs.sync();\r\n }\r\n\r\n update() {\r\n if (!this.build) {\r\n this.panel = {\r\n 'panel-info': true,\r\n };\r\n return;\r\n }\r\n\r\n this.panel = {\r\n 'panel-success': this.build.result === 'succeeded',\r\n 'panel-info':\r\n this.build.status === 'inProgress' ||\r\n this.build.status === 'notStarted',\r\n 'panel-danger': this.build.result === 'failed',\r\n 'panel-warning': this.build.result === 'partiallySucceeded',\r\n };\r\n }\r\n\r\n $onInit() {\r\n this.$scope.$watch('ctrl.build', build => {\r\n this.update();\r\n });\r\n }\r\n }\r\n return {\r\n scope: { build: '=' },\r\n bindToController: true,\r\n controllerAs: 'ctrl',\r\n template: `\r\n
\r\n
\r\n {{ ctrl.name }}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Build Number:{{ ctrl.build.buildNumber }}
Finished:{{ ctrl.build.finishTime | date:'medium' }}
Started:{{ ctrl.build.startTime | date:'medium' }}
Result:{{ ctrl.build.result }}
Status:{{ ctrl.build.status }}
\r\n Commit:\r\n \r\n \r\n \r\n {{ ctrl.build.sourceVersion | limitTo:8 }}
\r\n Compare:\r\n \r\n \r\n \r\n master <=> {{ ctrl.build.sourceVersion | limitTo:8 }}
\r\n
`,\r\n controller: [\r\n '$scope',\r\n '$attrs',\r\n 'tfsService',\r\n Controller as any],\r\n };\r\n },\r\n ]);\r\n}\r\n","namespace Portico.Tfs {\r\n export class TfsPortalController {\r\n get isConfigured() {\r\n return !!this.settings.buildDefinitionId && !!this.settings.releaseDefinitionId;\r\n }\r\n get buildDefinitionId() {\r\n return this.settings.buildDefinitionId;\r\n }\r\n get releaseDefinitionId() {\r\n return this.settings.releaseDefinitionId;\r\n }\r\n settings: { buildDefinitionId?: number; releaseDefinitionId?: number } = {};\r\n constructor(\r\n private $scope: ng.IScope & { portal: any; },\r\n private $q: ng.IQService,\r\n private $interval: ng.IIntervalService,\r\n private tfsService: TfsService\r\n ) {\r\n this.settings = JSON.parse($scope.portal.settings || '{}');\r\n\r\n const interval = $interval(\r\n () => {\r\n this.update();\r\n },\r\n 30000,\r\n undefined,\r\n true\r\n );\r\n $scope.$on('destory', () => {\r\n $interval.cancel(interval);\r\n });\r\n\r\n $scope.portal.hasBuild =\r\n !!this.settings.buildDefinitionId && !!this.settings.releaseDefinitionId;\r\n\r\n $scope.$watch('portal.settings', settingsString => {\r\n this.settings = JSON.parse(settingsString || '{}');\r\n $scope.portal.hasBuild = this.isConfigured;\r\n if (this.isConfigured) {\r\n this.update();\r\n }\r\n });\r\n\r\n if (this.isConfigured) {\r\n this.update();\r\n }\r\n }\r\n\r\n async update() {\r\n this.updateBuildInformation();\r\n this.updateReleaseInformation();\r\n await this.tfsService.getLatestPorticoInformation();\r\n this.$scope.$broadcast('tfs:update');\r\n }\r\n\r\n sync() {\r\n this.tfsService.syncPortal(this.$scope.portal);\r\n this.$interval(() => this.update(), 5000, 12);\r\n }\r\n\r\n lastBuild: Build.List.Value;\r\n lastSuccessfulBuild: Build.List.Value;\r\n\r\n async updateBuildInformation() {\r\n function getValue(result: Build.List.Response) {\r\n return result.value[0];\r\n }\r\n\r\n const [lastSuccessfulBuild, lastBuild] = await this.$q.all([\r\n this.tfsService.build.list({\r\n definitions: this.buildDefinitionId.toString(),\r\n resultFilter: 'succeeded',\r\n statusFilter: 'completed',\r\n $top: 1,\r\n }),\r\n this.tfsService.build.list({\r\n definitions: this.buildDefinitionId.toString(),\r\n $top: 1,\r\n }),\r\n ]);\r\n this.lastBuild = getValue(lastBuild);\r\n this.lastSuccessfulBuild = getValue(lastSuccessfulBuild);\r\n if (\r\n this.lastSuccessfulBuild &&\r\n this.lastBuild &&\r\n this.lastSuccessfulBuild.id === this.lastBuild.id\r\n )\r\n this.lastSuccessfulBuild = null;\r\n }\r\n\r\n releases: Release.List.Value[];\r\n\r\n async updateReleaseInformation() {\r\n const list = await this.tfsService.release.list({\r\n definitionId: this.releaseDefinitionId,\r\n $expand: 'environments,artifacts',\r\n });\r\n const hasBeenSet = new Set();\r\n this.releases = list.value;\r\n }\r\n\r\n onRelease() {\r\n this.tfsService.build.queue({ definition: { id: this.buildDefinitionId } });\r\n this.$interval(() => this.update(), 500, 30000 / 500);\r\n }\r\n }\r\n angular\r\n .module('app')\r\n .controller('portalTfs', [\r\n '$scope',\r\n '$q',\r\n '$interval',\r\n 'tfsService',\r\n TfsPortalController,\r\n ]);\r\n}\r\n","namespace Portico.Tfs {\r\n export class TfsReleaseDefinitionService {\r\n constructor(private $http: angular.IHttpService, private settings: ITfsSettings) {}\r\n\r\n private request(method: string, url: string, data?: any): ng.IPromise {\r\n url = `/${this.settings.project}/_apis/release${url}`;\r\n return this.$http(\r\n vsrmRequest({ method, url, data }, this.settings, '3.0-preview.1')\r\n ).then(x => x.data);\r\n }\r\n\r\n public list(criteria: Release.Definition.List.Request) {\r\n const items: string[] = [];\r\n for (let key of Object.keys(criteria)) {\r\n if (Array.isArray(criteria[key])) {\r\n criteria[key] = criteria[key].join(',');\r\n }\r\n items.push(`${key}=${criteria[key]}`);\r\n }\r\n let url = '/definitions';\r\n if (items.length > 0) {\r\n url += '?' + items.join('&');\r\n }\r\n return this.request('get', url);\r\n }\r\n\r\n public async find(\r\n criteria: Release.Definition.List.Request,\r\n func: (build: Release.Definition.List.Value) => boolean\r\n ) {\r\n const releases = await this.list(criteria);\r\n const found = _.find(releases.value, func);\r\n if (found) return await this.get(found.id);\r\n }\r\n\r\n public get(id: number, revision?: number) {\r\n let url = `/definitions/${id}`;\r\n if (typeof revision === 'number') {\r\n url += `?revision=${revision}`;\r\n }\r\n return this.request('get', url);\r\n }\r\n\r\n public revision(id: number, revision: number) {\r\n const url = `/definitions/${id}/revisions/${revision}`;\r\n return this.request('get', url);\r\n }\r\n\r\n public create(request: Release.Definition.Create.Request) {\r\n const url = `/definitions`;\r\n return this.request('post', url, request);\r\n }\r\n\r\n public update(id: number, request: Tfs.Release.Definition.Update.Request) {\r\n const url = `/definitions/${id}`;\r\n return this.request('put', url, request);\r\n }\r\n\r\n public delete(id: number) {\r\n const url = `/definitions/${id}`;\r\n return this.request('delete', url);\r\n }\r\n\r\n public revisions(id: number) {\r\n const url = `/definitions/${id}/revisions`;\r\n return this.request('get', url);\r\n }\r\n }\r\n}\r\n","namespace Portico.Tfs {\r\n export class TfsReleaseService {\r\n constructor(private $http: angular.IHttpService, private settings: ITfsSettings) {}\r\n\r\n private request(method: string, url: string, data?: any): ng.IPromise {\r\n url = `/${this.settings.project}/_apis/release/releases${url}`;\r\n return this.$http(\r\n vsrmRequest({ method, url, data }, this.settings, '3.0-preview.1')\r\n ).then(x => x.data);\r\n }\r\n\r\n public list(criteria: Release.List.Request) {\r\n const items: string[] = [];\r\n for (let key of Object.keys(criteria)) {\r\n if (Array.isArray(criteria[key])) {\r\n criteria[key] = criteria[key].join(',');\r\n }\r\n items.push(`${key}=${criteria[key]}`);\r\n }\r\n let url = `/`;\r\n if (items.length > 0) {\r\n url += '?' + items.join('&');\r\n }\r\n return this.request('get', url);\r\n }\r\n\r\n public get(id: number, includeAllApprovals = true) {\r\n const url = `/${id}`;\r\n return this.request('get', url);\r\n }\r\n\r\n public update(id: number, request: Release.Get.UpdateRequest) {\r\n const url = `/${id}`;\r\n return this.request('patch', url, request);\r\n }\r\n\r\n public updateEnvironment(\r\n id: number,\r\n environment: number,\r\n request: Release.Get.UpdateEnvironmentRequest\r\n ) {\r\n const url = `/${id}`;\r\n return this.request('patch', url, request);\r\n }\r\n }\r\n}\r\n","namespace Portico.Tfs {\r\n angular.module('app').directive('tfsReleaseView', [\r\n function() {\r\n interface State {\r\n release: Release.List.Value;\r\n environment: Release.Get.Environment;\r\n panel: { [index: string]: boolean };\r\n releaseUrl: string;\r\n build?: Build.Get.Response;\r\n commitUrl?: string;\r\n compareTo(sha: string): string;\r\n }\r\n\r\n class Controller {\r\n releases: Release.List.Value[];\r\n current: State;\r\n successful: State;\r\n build: Build.Get.Response;\r\n environment: string;\r\n portal: Portico.Models.Setup.Portal;\r\n portico: {\r\n release: Release.List.Value;\r\n environment: Release.Get.Environment;\r\n build?: Build.Get.Response;\r\n };\r\n\r\n name: string;\r\n\r\n constructor(\r\n private $scope: ng.IScope,\r\n private $attrs: ng.IAttributes,\r\n private tfsService: TfsService\r\n ) {\r\n this.name = this.$attrs['name'];\r\n $scope.$on('tfs:update', () => this.update());\r\n }\r\n\r\n releaseState(\r\n release: Release.List.Value,\r\n environment: Release.Get.Environment\r\n ): State {\r\n const result: State = {\r\n compareTo(sha: string) {\r\n if (!this.build) return '';\r\n return (\r\n this.build &&\r\n `https://tfs.trialcard.com/DevCollection/_git/Portico/branches?baseVersion=GC${sha}&targetVersion=GC${\r\n this.build.sourceVersion\r\n }&_a=commits`\r\n );\r\n },\r\n release,\r\n environment,\r\n panel: this.panel(environment),\r\n releaseUrl: this.releaseUrl(release),\r\n };\r\n const build = this.tfsService.build\r\n .get(release.artifacts[0].definitionReference.version.id as any)\r\n .then(build => {\r\n result.build = build;\r\n result.commitUrl = this.commitUrl(build);\r\n });\r\n return result;\r\n }\r\n\r\n panel(environment: Release.Get.Environment) {\r\n return {\r\n 'panel-success': environment.status === 'succeeded',\r\n 'panel-info':\r\n environment.status === 'inProgress' ||\r\n environment.status === 'notStarted',\r\n 'panel-danger': environment.status === 'rejected',\r\n 'panel-warning': environment.status === 'partiallySucceeded',\r\n };\r\n }\r\n\r\n releaseUrl(release: Release.List.Value) {\r\n return release && release._links.web.href;\r\n }\r\n\r\n commitUrl(build: Build.Get.Response) {\r\n return (\r\n build &&\r\n `https://tfs.trialcard.com/DevCollection/Portico/Team%20Portals%20to%20Go/_git/Portico/commit/${\r\n build.sourceVersion\r\n }`\r\n );\r\n }\r\n\r\n compareTo(build: Build.Get.Response, sha: string) {}\r\n\r\n update() {\r\n this.current = null;\r\n this.successful = null;\r\n for (let value of this.releases || []) {\r\n if (this.current && this.successful) break;\r\n if (this.current && this.current.environment.status === 'succeeded') break;\r\n\r\n for (let environment of value.environments) {\r\n if (environment.name.toLowerCase() === this.environment.toLowerCase()) {\r\n if (!this.current) {\r\n this.current = this.releaseState(value, environment);\r\n }\r\n if (!this.successful && environment.status === 'succeeded') {\r\n if (this.current && value.id === this.current.release.id) break;\r\n\r\n this.successful = this.releaseState(value, environment);\r\n }\r\n }\r\n }\r\n }\r\n\r\n for (const release of (this.tfsService.porticoReleases || []) as Release.List.Value[]) {\r\n const environment = _.find(release.environments, x =>\r\n x.name.toLowerCase().startsWith(this.environment.toLowerCase())\r\n );\r\n if (environment && environment.status === 'succeeded') {\r\n const artifact = _.find(\r\n release.artifacts,\r\n x =>\r\n x.definitionReference.definition.id.toString() ===\r\n this.tfsService.settings.porticoBuildDefinitionId\r\n );\r\n this.tfsService.build\r\n .get(artifact.definitionReference.version.id as any)\r\n .then(\r\n build =>\r\n (this.portico = { environment, release, build })\r\n );\r\n break;\r\n }\r\n }\r\n }\r\n\r\n $onInit() {\r\n this.$scope.$watch(\r\n 'ctrl.releases',\r\n (releases, oldReleases) => {\r\n if (releases) this.update();\r\n }\r\n );\r\n }\r\n }\r\n return {\r\n scope: { releases: '=', environment: '<', portal: '=' },\r\n bindToController: true,\r\n controllerAs: 'ctrl',\r\n template: `\r\n
\r\n
\r\n
\r\n {{ ctrl.name }}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Name:{{ ctrl.current.release.name }}
Status:{{ ctrl.current.environment.status }}
Commit:{{ ctrl.current.build.sourceVersion | limitTo:8 }}
Compare:{{ ctrl.portico.build.sourceVersion | limitTo:8}} <=> {{ ctrl.current.build.sourceVersion | limitTo:8 }}
\r\n
\r\n
\r\n
\r\n Last Successful\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Name:{{ ctrl.successful.release.name }}
Status:{{ ctrl.successful.environment.status }}
Commit:{{ ctrl.successful.build.sourceVersion | limitTo:8 }}
Compare:{{ ctrl.portico.build.sourceVersion | limitTo:8}} <=> {{ ctrl.successful.build.sourceVersion | limitTo:8 }}
\r\n
\r\n
`,\r\n controller: ['$scope', '$attrs', 'tfsService', Controller as any],\r\n };\r\n },\r\n ]);\r\n}\r\n","namespace Portico.Tfs {\r\n import PortalGroup = Portico.Models.Setup.PortalGroup;\r\n import Inject = Portico.Decorators.Inject;\r\n import Service = Portico.Decorators.Service;\r\n\r\n export interface ITfsSettings {\r\n apiVersion: string;\r\n url: string;\r\n vsrm: string;\r\n project: string;\r\n token: string;\r\n porticoReleaseDefinitionId: string;\r\n porticoBuildDefinitionId: string;\r\n }\r\n\r\n export function tfsRequest(\r\n request: angular.IRequestConfig,\r\n settings: ITfsSettings,\r\n apiVersion: string\r\n ) {\r\n request.headers = request.headers || {};\r\n request.headers['Accept'] = `application/json;api-version=${apiVersion ||\r\n settings.apiVersion}`;\r\n request.headers['Authorization'] = `Basic ${settings.token}`;\r\n // request.withCredentials = true;\r\n\r\n request.url = _.trim(`${settings.url}/${_.trim(request.url, '/')}`, '/').replace('/?', '?');\r\n return request;\r\n }\r\n\r\n export function vsrmRequest(\r\n request: angular.IRequestConfig,\r\n settings: ITfsSettings,\r\n apiVersion: string\r\n ) {\r\n request.headers = request.headers || {};\r\n request.headers['Accept'] = `application/json;api-version=${apiVersion ||\r\n settings.apiVersion}`;\r\n request.headers['Authorization'] = `Basic ${settings.token}`;\r\n // request.withCredentials = true;\r\n\r\n request.url = _.trim(`${settings.vsrm}/${_.trim(request.url, '/')}`, '/').replace('/?', '?');\r\n return request;\r\n }\r\n\r\n @Service('app', 'tfsService')\r\n @Inject('$http', '$q', 'dataService', 'portalGroupService', 'setupService')\r\n export class TfsService {\r\n public readonly settings: ITfsSettings;\r\n private readonly templates: {\r\n build?: Portico.Tfs.Build.Definition.Get.Response;\r\n release?: Portico.Tfs.Release.Definition.Get.Response;\r\n } = {};\r\n\r\n constructor(\r\n private $http: angular.IHttpService,\r\n private $q: angular.IQService,\r\n private dataService: Portico.Services.IDataService,\r\n private portalGroupService: Portico.Services.PortalGroupService,\r\n private setupService: Portico.Services.SetupService\r\n ) {\r\n this.settings = {\r\n apiVersion: dataService.getDataValue('Reference', 'Id', 'tfs-api-version'),\r\n url: _.trim(dataService.getDataValue('Reference', 'Id', 'tfs-url'), '/'),\r\n vsrm: _.trim(dataService.getDataValue('Reference', 'Id', 'tfs-vsrm'), '/'),\r\n project: dataService.getDataValue('Reference', 'Id', 'tfs-project'),\r\n token: dataService.getDataValue('Reference', 'Id', 'tfs-token'),\r\n porticoReleaseDefinitionId: dataService.getDataValue(\r\n 'Reference',\r\n 'Id',\r\n 'tfs-portico-release-definition-id'\r\n ),\r\n porticoBuildDefinitionId: dataService.getDataValue(\r\n 'Reference',\r\n 'Id',\r\n 'tfs-portico-build-definition-id'\r\n ),\r\n };\r\n\r\n this.build = new TfsBuildService(this.$http, this.settings);\r\n this.buildDefinition = new TfsBuildDefinitionService(this.$http, this.settings);\r\n this.release = new TfsReleaseService(this.$http, this.settings);\r\n this.releaseDefinition = new TfsReleaseDefinitionService(this.$http, this.settings);\r\n }\r\n\r\n public build: TfsBuildService;\r\n public buildDefinition: TfsBuildDefinitionService;\r\n public release: TfsReleaseService;\r\n public releaseDefinition: TfsReleaseDefinitionService;\r\n\r\n private async getBuildDefinitionTemplate() {\r\n if (this.templates.build) return this.templates.build;\r\n\r\n const result = await this.buildDefinition.list({ name: 'Template' });\r\n if (result.count > 1 || result.count === 0) {\r\n throw new Error('error getting build definition template');\r\n }\r\n\r\n const definition = await this.buildDefinition.get(result.value[0].id);\r\n return (this.templates.build = definition);\r\n }\r\n\r\n private async getReleaseDefinitionTemplate() {\r\n if (this.templates.release) return this.templates.release;\r\n\r\n const result = (await this.releaseDefinition.list({ searchText: 'Ptl> Template' }));\r\n const template = _.find(result.value, x => x.name === 'Ptl> Template');\r\n if (!template) {\r\n throw new Error('error getting build definition template');\r\n }\r\n\r\n const definition = await this.releaseDefinition.get(result.value[0].id);\r\n return (this.templates.release = definition);\r\n }\r\n\r\n public async createOrUpdateBuildDefinition(\r\n portal: Portico.Models.Setup.Portal,\r\n portalGroup: Portico.Models.Setup.PortalGroup\r\n ) {\r\n const template = await this.getBuildDefinitionTemplate();\r\n const path = `\\\\Portals\\\\${portalGroup.name}`;\r\n const portalBuildDefinitionId = this.getPortalBuildDefinitionId(portal);\r\n const build = portalBuildDefinitionId\r\n ? await this.buildDefinition.get(portalBuildDefinitionId)\r\n : await this.buildDefinition.find(\r\n {\r\n name: portal.name,\r\n },\r\n x => x.path.toLowerCase() === path.toLowerCase()\r\n );\r\n\r\n const creating = !build;\r\n const id = creating ? 0 : build.id;\r\n const comment = creating ? 'Created' : 'Updated';\r\n const revision = build ? build.revision : 0;\r\n\r\n const variables = _.cloneDeep(template.variables);\r\n variables['Portal.Id'].value = portal.id;\r\n\r\n const request:\r\n | Tfs.Build.Definition.Create.Request\r\n | Tfs.Build.Definition.Update.Request = {\r\n id,\r\n revision,\r\n name: portal.name,\r\n buildNumberFormat: template.buildNumberFormat,\r\n path,\r\n definitionType: 'build',\r\n documentQuality: 'definition',\r\n queue: {\r\n id: template.queue.id,\r\n },\r\n build: _.cloneDeep(template.build),\r\n repository: _.cloneDeep(template.repository),\r\n options: _.cloneDeep(template.options),\r\n variables,\r\n retentionRules: _.cloneDeep(template.retentionRules),\r\n badgeEnabled: true,\r\n comment: `${comment} portal build definition for ${portalGroup.name} / ${\r\n portal.name\r\n } (id: ${portal.id})`,\r\n };\r\n\r\n if (creating) {\r\n return await this.buildDefinition.create(request);\r\n }\r\n\r\n return await this.buildDefinition.update(build.id, request);\r\n }\r\n\r\n private getPortalReleaseDefinitionId(portal: Portico.Models.Setup.Portal) {\r\n return JSON.parse(portal.settings || '{}').releaseDefinitionId;\r\n }\r\n\r\n private getPortalBuildDefinitionId(portal: Portico.Models.Setup.Portal) {\r\n return JSON.parse(portal.settings || '{}').buildDefinitionId;\r\n }\r\n\r\n public async createOrUpdateReleaseDefinition(\r\n buildDefinition: Tfs.Build.Definition.Get.Response,\r\n portal: Portico.Models.Setup.Portal,\r\n portalGroup: Portico.Models.Setup.PortalGroup\r\n ) {\r\n const template = await this.getReleaseDefinitionTemplate();\r\n const name = `Ptl> ${portalGroup.name} > ${portal.name}`;\r\n const portalReleaseDefinitionId = this.getPortalReleaseDefinitionId(portal);\r\n const release = portalReleaseDefinitionId\r\n ? await this.releaseDefinition.get(portalReleaseDefinitionId)\r\n : await this.releaseDefinition.find(\r\n {\r\n searchText: name,\r\n },\r\n x => x.name.toLowerCase() === name.toLowerCase()\r\n );\r\n\r\n const creating = !release;\r\n const id = creating ? 0 : release.id;\r\n const revision = release ? release.revision : 0;\r\n\r\n const variables = _.cloneDeep(template.variables);\r\n variables['Portal.Id'].value = portal.id;\r\n variables['Portal.Name'].value = portal.name;\r\n\r\n function cloneEnvironments() {\r\n const results: Portico.Tfs.Release.Definition.Get.Environment[] = [];\r\n for (let env of template.environments) {\r\n results.push({\r\n name: env.name,\r\n rank: env.rank,\r\n conditions: _.cloneDeep(env.conditions),\r\n demands: _.cloneDeep(env.demands),\r\n deployPhases: _.cloneDeep(env.deployPhases),\r\n deployStep: {\r\n tasks: _.cloneDeep(env.deployStep.tasks),\r\n } as any,\r\n environmentOptions: _.cloneDeep(env.environmentOptions),\r\n executionPolicy: _.cloneDeep(env.executionPolicy),\r\n postDeployApprovals: {\r\n approvals: _.cloneDeep(env.postDeployApprovals.approvals),\r\n },\r\n preDeployApprovals: {\r\n approvals: _.cloneDeep(env.preDeployApprovals.approvals),\r\n },\r\n queueId: buildDefinition.queue.id,\r\n retentionPolicy: _.cloneDeep(env.retentionPolicy),\r\n schedules: _.cloneDeep(env.schedules),\r\n variables: _.cloneDeep(env.variables),\r\n } as any);\r\n }\r\n return results;\r\n }\r\n\r\n const request: Tfs.Release.Definition.Create.Request = {\r\n id,\r\n revision,\r\n source: 2 as any,\r\n name,\r\n releaseNameFormat: template.releaseNameFormat,\r\n retentionPolicy: _.cloneDeep(template.retentionPolicy),\r\n variables,\r\n artifacts: [\r\n ...template.artifacts.map(x => {\r\n x.isPrimary = false;\r\n return x;\r\n }),\r\n {\r\n sourceId: `${buildDefinition.project.id}:${buildDefinition.id}`,\r\n type: 'Build',\r\n alias: 'portal',\r\n isPrimary: true,\r\n definitionReference: {\r\n artifactSourceDefinitionUrl: {\r\n id: `https://tfs.trialcard.com/_permalink/_build/index?collectionId=b573ff9b-5d96-4d57-81bc-f38d848e83b9&projectId=${\r\n buildDefinition.project.id\r\n }&definitionId=${buildDefinition.id}`,\r\n name: `${buildDefinition.name}`,\r\n },\r\n definition: {\r\n id: `${buildDefinition.id}`,\r\n name: `${buildDefinition.name}`,\r\n },\r\n project: {\r\n id: `${buildDefinition.project.id}`,\r\n name: `${buildDefinition.project.name}`,\r\n },\r\n },\r\n },\r\n ],\r\n environments: cloneEnvironments(),\r\n triggers: [\r\n {\r\n artifactAlias: 'portal',\r\n triggerConditions: [\r\n {\r\n sourceBranch: 'master',\r\n tags: [],\r\n },\r\n ],\r\n triggerType: 'artifactSource',\r\n },\r\n ],\r\n } as any;\r\n\r\n if (creating) {\r\n return await this.releaseDefinition.create(request);\r\n }\r\n\r\n return await this.releaseDefinition.update(release.id, request);\r\n }\r\n\r\n public async syncPortal(portal: Portico.Models.Setup.Portal) {\r\n const portalGroup = _.find(\r\n await this.portalGroupService.get(),\r\n x => x.id === portal.portalGroupId\r\n );\r\n const buildDefinition = await this.createOrUpdateBuildDefinition(portal, portalGroup);\r\n const releaseDefinition = await this.createOrUpdateReleaseDefinition(\r\n buildDefinition,\r\n portal,\r\n portalGroup\r\n );\r\n\r\n const settings = JSON.parse(portal.settings || '{}');\r\n settings.buildDefinitionId = buildDefinition.id;\r\n settings.releaseDefinitionId = releaseDefinition.id;\r\n portal.settings = JSON.stringify(settings);\r\n\r\n await this.setupService.savePortal(portal);\r\n }\r\n\r\n porticoReleases: Release.List.Value[];\r\n // latestPorticoBuild: Build.Get.Response;\r\n\r\n public async getLatestPorticoInformation() {\r\n const possibleReleases = await this.release.list({\r\n $top: 1000,\r\n $expand: 'environments,artifacts',\r\n definitionId: this.settings.porticoReleaseDefinitionId as any,\r\n });\r\n this.porticoReleases = possibleReleases.value;\r\n }\r\n\r\n public viewPortal(portal: any) {\r\n portal.isOpen = !portal.isOpen;\r\n }\r\n\r\n private hasBuild(portal: Portico.Models.Setup.Portal) {\r\n return (\r\n this.getPortalBuildDefinitionId(portal) && this.getPortalReleaseDefinitionId(portal)\r\n );\r\n }\r\n }\r\n}\r\n","namespace Portico.Directives {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport pms = Portico.Models.Setup;\r\n\timport ps = Portico.Services;\r\n\r\n\texport interface ITcContentController {\r\n\t\thtml: string;\r\n\r\n\t\tcompile: () => void;\r\n\t}\r\n\r\n\t@Inject('$compile', '$element', '$scope')\r\n\texport class TcContentController implements ITcContentController {\r\n\t\thtml: string;\r\n\r\n\t\tconstructor(\r\n\t\t\tpublic $compile: angular.ICompileService,\r\n\t\t\tpublic $element: angular.IAugmentedJQuery,\r\n\t\t\tpublic $scope: angular.IScope\r\n\t\t) { }\r\n\r\n\t\tcompile() {\r\n\t\t\tthis.$element.html(this.html.replace(/"/g, '\\\"'));\r\n\t\t\tthis.$compile(this.$element.contents() as any)(this.$scope);\r\n\t\t}\r\n\t}\r\n\r\n\tangular.module('app').directive('tcContent', [() => {\r\n\t\treturn {\r\n\t\t\tbindToController: {\r\n\t\t\t\thtml: '@',\r\n\t\t\t},\r\n\t\t\tcontroller: TcContentController,\r\n\t\t\tcontrollerAs: '$content',\r\n\t\t\tlink: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: any[]) => {\r\n\t\t\t\tconst tcContent: ITcContentController = $ctrl[0];\r\n\t\t\t\ttcContent.compile();\r\n\t\t\t},\r\n\t\t\treplace: true,\r\n\t\t\trequire: ['tcContent'],\r\n\t\t\trestrict: 'E',\r\n\t\t\tscope: true\r\n\t\t};\r\n\t}]);\r\n}\r\n","namespace Portico.Directives {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pms = Portico.Models.Setup;\r\n\timport ps = Portico.Services;\r\n\r\n\texport interface ITcHtmlController {\r\n caze: string;\r\n column: string;\r\n def: string;\r\n key: string;\r\n schema: string;\r\n\r\n\t\tdataGroup: pms.DataGroup;\r\n\t\tdataRow: pms.DataRow;\r\n\t\tdataTable: pms.DataTable;\r\n\t\teditRow: pms.DataRow;\r\n\t\ttcParent: ITcHtmlController; // is this necessary, or will implementing the angular IController give us this? doubtful.\r\n\r\n\t\tcompile: () => void;\r\n }\r\n\r\n\t@Inject('$compile', '$element', '$scope', 'dataService', 'dataRowService', 'modalService', 'porticoService', 'serverConstants')\r\n export class TcHtmlController implements ITcHtmlController {\r\n caze: string;\r\n _column: string;\r\n def: string;\r\n key: string;\r\n _schema: string;\r\n\r\n\t\tdataGroup: pms.DataGroup;\r\n\t\tdataRow: pms.DataRow;\r\n\t\tdataTable: pms.DataTable;\r\n\t\teditRow: pms.DataRow;\r\n\t\ttcParent: ITcHtmlController;\r\n\r\n\t\tconstructor(\r\n\t\t\tpublic $compile: angular.ICompileService,\r\n\t\t\tpublic $element: angular.IAugmentedJQuery,\r\n\t\t\tpublic $scope: angular.IScope,\r\n\t\t\tpublic dataService: ps.IDataService,\r\n\t\t\tpublic dataRowService: ps.IDataRowService,\r\n\t\t\tpublic modalService: ps.IModalService,\r\n\t\t\tpublic porticoService: ps.IPorticoService,\r\n\t\t\tpublic serverConstants: pmi.IServerConstants\r\n\t\t) {}\r\n\r\n\t\tget column() {\r\n\t\t\treturn this._column ? this._column : 'Html';\r\n\t\t}\r\n\r\n\t\tset column(value: string) {\r\n\t\t\tthis._column = value;\r\n\t\t}\r\n\r\n\t\tget schema() {\r\n\t\t\treturn this._schema ? this._schema : 'Component';\r\n\t\t}\r\n\r\n\t\tset schema(value: string) {\r\n\t\t\tthis._schema = value;\r\n\t\t}\r\n\r\n\t\tcancel() {\r\n\t\t\tthis.modalService.hide('inline-editor');\r\n\t\t}\r\n\r\n\t\tcompile() {\r\n\t\t\tlet tcCurrent: ITcHtmlController = this;\r\n\t\t\tlet fullKey = this.key;\r\n\r\n\t\t\t// should reverse loop to go from absolute to relative key, with short circuiting\r\n\t\t\twhile (tcCurrent) {\r\n\t\t\t\tlet temp = this.dataService.getDataRows(this.schema, fullKey);\r\n\r\n\t\t\t\tif (temp && temp.length > 0) {\r\n\t\t\t\t\tthis.dataRow = temp[0];\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttcCurrent = tcCurrent.tcParent;\r\n\r\n\t\t\t\tif (tcCurrent) {\r\n\t\t\t\t\tfullKey = tcCurrent.key + '.' + fullKey;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (this.dataRow) {\r\n\t\t\t\tconst portalDataGroups = this.dataService.setup.portal.portalDataGroups.filter((portalDataGroup) => {\r\n\t\t\t\t\treturn portalDataGroup.dataGroupId === this.dataRow.dataGroupId;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.dataGroup = portalDataGroups && portalDataGroups.length > 0 ? portalDataGroups[0].dataGroup : null;\r\n\t\t\t} else {\r\n\t\t\t\tconst portalDataGroups = this.dataService.setup.portal.portalDataGroups.filter((portalDataGroup) => {\r\n\t\t\t\t\treturn portalDataGroup.dataGroup.isPrivate === true;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.dataGroup = portalDataGroups && portalDataGroups.length > 0 ? portalDataGroups[0].dataGroup : null;\r\n\t\t\t}\r\n\r\n\t\t\tconst dataColumn = this.dataTable.getDataColumn(this.column);\r\n\t\t\tconst dataValue = this.dataRow ? this.dataRow.getDataValue(dataColumn.id) : null;\r\n\t\t\tconst value = dataValue ? dataValue.value : null;\r\n\r\n\t\t\tlet html = this.getHtml(value);\r\n\r\n\t\t\tif (this.serverConstants.connectTo !== 'Prod') {\r\n\t\t\t\thtml = this.getEditHtml(html, fullKey);\r\n\t\t\t}\r\n\r\n\t\t\tthis.$element.html(html);\r\n\t\t\tthis.$compile(this.$element.contents() as any)(this.$scope);\r\n\t\t}\r\n\r\n\t\tdiff() {\r\n\t\t\ttry {\r\n\t\t\t\t(angular.element('#_root_porticoService_dataService_temp_editRow_key-monaco').scope()).$monaco.diff(this.porticoService.dataService.temp.conflict.key);\r\n\t\t\t} catch {\r\n\t\t\t\t// ignore\r\n\t\t\t}\r\n\r\n\t\t\tthis.porticoService.dataService.temp.conflict.dataValues.forEach((dv) => {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t(angular.element('#_root_porticoService_dataService_temp_editRow_getDataValue_' + dv.dataColumnId + '_value-monaco').scope()).$monaco.diff(dv.value);\r\n\t\t\t\t} catch {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tedit() {\r\n\t\t\tif (this.dataRow) {\r\n\t\t\t\tthis.editRow = new pms.DataRow(this.dataRow);\r\n\t\t\t\tthis.porticoService.setupService.fixDataRow(this.dataTable, this.editRow);\r\n\t\t\t} else {\r\n\t\t\t\tthis.editRow = this.dataRowService.create(this.dataTable);\r\n\t\t\t\tthis.editRow.key = this.key;\r\n\t\t\t}\r\n\r\n\t\t\tconst portalDataGroups = this.dataService.setup.portal.portalDataGroups.filter((portalDataGroup) => {\r\n\t\t\t\treturn portalDataGroup.dataGroup.isPrivate === true;\r\n\t\t\t});\r\n\r\n\t\t\tconst dataGroup = portalDataGroups && portalDataGroups.length > 0 ? portalDataGroups[0].dataGroup : null;\r\n\r\n\t\t\tif (this.editRow.dataGroupId !== dataGroup.id) {\r\n\t\t\t\tthis.editRow.id = null;\r\n\t\t\t\tthis.editRow.dataGroupId = dataGroup.id;\r\n\r\n\t\t\t\tthis.editRow.dataValues.forEach((dataValue) => {\r\n\t\t\t\t\tdataValue.id = null;\r\n\t\t\t\t\tdataValue.dataRowId = null;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tthis.dataService.temp.conflict = null;\r\n\t\t\tthis.dataService.temp.diff = () => { this.diff(); };\r\n\t\t\tthis.dataService.temp.dataTable = this.dataTable;\r\n\t\t\tthis.dataService.temp.editRow = this.editRow;\r\n\t\t\tthis.dataService.temp.resolved = false;\r\n\t\t\tthis.dataService.temp.save = () => { this.save(); };\r\n\r\n\t\t\tthis.modalService.show('inline-editor');\r\n\r\n\t\t\ttry {\r\n\t\t\t\t(angular.element('#_root_porticoService_dataService_temp_editRow_key-monaco').scope()).$monaco.edit();\r\n\t\t\t} catch {\r\n\t\t\t\t// ignore\r\n\t\t\t}\r\n\r\n\t\t\tthis.editRow.dataValues.forEach((dv) => {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t(angular.element('#_root_porticoService_dataService_temp_editRow_getDataValue_' + dv.dataColumnId + '_value-monaco').scope()).$monaco.edit();\r\n\t\t\t\t} catch {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsave() {\r\n\t\t\tthis.dataRowService.save(this.editRow).then((dataRow: pms.DataRow) => {\r\n\t\t\t\tconst portalDataGroups = this.dataService.setup.portal.portalDataGroups.filter((pdg) => {\r\n\t\t\t\t\treturn pdg.dataGroupId === dataRow.dataGroupId;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tportalDataGroups[0].dataGroup.dataRows = portalDataGroups[0].dataGroup.dataRows.filter((dr) => {\r\n\t\t\t\t\treturn dr.id !== dataRow.id;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tportalDataGroups[0].dataGroup.dataRows.push(dataRow);\r\n\r\n\t\t\t\tthis.modalService.hide('inline-editor');\r\n\t\t\t\tthis.porticoService.refresh(this.key);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tgetHtml(value: string): string {\r\n\t\t\tlet html = value ? value : this.def;\r\n\r\n\t\t\tif (html) {\r\n\t\t\t\tif (this.caze === 'lower') {\r\n\t\t\t\t\thtml = html.toLowerCase();\r\n\t\t\t\t} else if (this.caze === 'upper') {\r\n\t\t\t\t\thtml = html.toUpperCase();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tgetDebugHtml(html: string, key: string): string {\r\n\t\t\thtml =\r\n\t\t\t\t`[tc-html schema=\"${this.schema}\" column=\"${this.column}\" key=\"${key}\"]\r\n\t\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\t${html}\r\n\t\t\t\t`;\r\n\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tgetEditHtml(html: string, key: string): string {\r\n\t\t\tlet clazz = '';\r\n\r\n\t\t\tif (!this.dataGroup.isPrivate) {\r\n\t\t\t\tclazz += ' text-danger';\r\n\t\t\t} else {\r\n\t\t\t\tclazz += ' text-success';\r\n\t\t\t}\r\n\r\n\t\t\thtml =\r\n\t\t\t\t`\r\n\t\t\t\t\t${this.schema}
${key}\" >
\r\n\t\t\t\t\t${html}\r\n\t\t\t\t
\r\n\t\t\t\t${html}`;\r\n\r\n\t\t\treturn html;\r\n\t\t}\r\n }\r\n\r\n\tangular.module('app').directive('tcHtml', ['dataService', (dataService: ps.IDataService) => {\r\n\t\treturn {\r\n\t\t\tbindToController: {\r\n\t\t\t\tcaze: '@',\r\n\t\t\t\tcolumn: '@',\r\n\t\t\t\tdef: '@',\r\n\t\t\t\tkey: '@',\r\n\t\t\t\tschema: '@'\r\n\t\t\t},\r\n\t\t\tcontroller: TcHtmlController,\r\n\t\t\tcontrollerAs: '$html',\r\n\t\t\tlink: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: any[]) => {\r\n\t\t\t\tconst tcHtml: ITcHtmlController = $ctrl[0];\r\n\r\n\t\t\t\ttcHtml.def = tcHtml.def ? tcHtml.def : '';\r\n\t\t\t\ttcHtml.dataRow = null;\r\n\t\t\t\ttcHtml.dataTable = dataService.getDataTable(tcHtml.schema);\r\n\t\t\t\ttcHtml.tcParent = $ctrl[1];\r\n\r\n\t\t\t\ttcHtml.compile();\r\n\r\n\t\t\t\t$scope.$on(`tc-refresh-${tcHtml.key}`, () => {\r\n\t\t\t\t\ttcHtml.compile();\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\treplace: true,\r\n\t\t\trequire: ['tcHtml', '?^^tcHtml'],\r\n\t\t\trestrict: 'E',\r\n\t\t\tscope: true\r\n\t\t};\r\n\t}]);\r\n\r\n\texport interface ITcContentController {\r\n\t\thtml: string;\r\n\r\n\t\tcompile: () => void;\r\n\t}\r\n}\r\n","namespace Portico.Directives {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pms = Portico.Models.Setup;\r\n\timport ps = Portico.Services;\r\n\r\n export interface ITcImageController {\r\n\t\tkey: string;\r\n\t\tsource: string;\r\n\r\n\t\tdataGroup: pms.DataGroup;\r\n\t\tdataRow: pms.DataRow;\r\n\t\tdataTable: pms.DataTable;\r\n\t\teditRow: pms.DataRow;\r\n\t\ttcParent: ITcHtmlController; // is this necessary, or will implementing the angular IController give us this? doubtful.\r\n\r\n\t\tcompile: () => void;\r\n\t}\r\n\r\n\t@Inject('$compile', '$element', '$scope', 'dataService', 'dataRowService', 'modalService', 'porticoService', 'serverConstants')\r\n export class TcImageController implements ITcImageController {\r\n key: string;\r\n\t\tsource: string;\r\n\r\n\t\tdataGroup: pms.DataGroup;\r\n\t\tdataRow: pms.DataRow;\r\n\t\tdataTable: pms.DataTable;\r\n\t\teditRow: pms.DataRow;\r\n\t\ttcParent: TcHtmlController;\r\n\r\n\t\tconstructor(\r\n\t\t\tpublic $compile: angular.ICompileService,\r\n\t\t\tpublic $element: angular.IAugmentedJQuery,\r\n\t\t\tpublic $scope: angular.IScope,\r\n\t\t\tpublic dataService: ps.IDataService,\r\n\t\t\tpublic dataRowService: ps.IDataRowService,\r\n\t\t\tpublic modalService: ps.IModalService,\r\n\t\t\tpublic porticoService: ps.IPorticoService,\r\n\t\t\tpublic serverConstants: pmi.IServerConstants\r\n\t\t) {}\r\n\r\n\t\tcancel() {\r\n\t\t\tthis.modalService.hide('inline-editor');\r\n\t\t}\r\n\r\n\t\tcompile() {\r\n\t\t\tlet tcCurrent: TcHtmlController | TcImageController = this;\r\n\t\t\tlet fullKey = this.key;\r\n\t\t\tlet source = this.source;\r\n\r\n\t\t\tif (this.key) {\r\n\t\t\t\t// should reverse loop to go from absolute to relative key, with short circuiting\r\n\t\t\t\twhile (tcCurrent) {\r\n\t\t\t\t\tlet temp = this.dataService.getDataRows('Image', fullKey);\r\n\r\n\t\t\t\t\tif (temp && temp.length > 0) {\r\n\t\t\t\t\t\tthis.dataRow = temp[0];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttcCurrent = tcCurrent.tcParent;\r\n\r\n\t\t\t\t\tif (tcCurrent) {\r\n\t\t\t\t\t\tfullKey = tcCurrent.key + '.' + fullKey;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this.dataRow) {\r\n\t\t\t\t\tconst portalDataGroups = this.dataService.setup.portal.portalDataGroups.filter((portalDataGroup) => {\r\n\t\t\t\t\t\treturn portalDataGroup.dataGroupId === this.dataRow.dataGroupId;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tthis.dataGroup = portalDataGroups && portalDataGroups.length > 0 ? portalDataGroups[0].dataGroup : null;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconst portalDataGroups = this.dataService.setup.portal.portalDataGroups.filter((portalDataGroup) => {\r\n\t\t\t\t\t\treturn portalDataGroup.dataGroup.isPrivate === true;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tthis.dataGroup = portalDataGroups && portalDataGroups.length > 0 ? portalDataGroups[0].dataGroup : null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst dataColumn = this.dataTable.getDataColumn('Source');\r\n\t\t\t\tconst dataValue = this.dataRow ? this.dataRow.getDataValue(dataColumn.id) : null;\r\n\r\n\t\t\t\tsource = dataValue ? dataValue.value : null;\r\n\t\t\t}\r\n\r\n\t\t\tlet html = this.getHtml(source);\r\n\r\n\t\t\tif (fullKey) {\r\n\t\t\t\tif (this.serverConstants.connectTo !== 'Prod') {\r\n\t\t\t\t\thtml = this.getEditHtml(html, fullKey);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.$element.html(html);\r\n\t\t\tthis.$compile(this.$element.contents() as any)(this.$scope);\r\n\t\t}\r\n\r\n\t\tdiff() {\r\n\t\t\ttry {\r\n\t\t\t\t(angular.element('#_root_porticoService_dataService_temp_editRow_key-monaco').scope()).$monaco.diff(this.porticoService.dataService.temp.conflict.key);\r\n\t\t\t} catch {\r\n\t\t\t\t// ignore\r\n\t\t\t}\r\n\r\n\t\t\tthis.porticoService.dataService.temp.conflict.dataValues.forEach((dv) => {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t(angular.element('#_root_porticoService_dataService_temp_editRow_getDataValue_' + dv.dataColumnId + '_value-monaco').scope()).$monaco.diff(dv.value);\r\n\t\t\t\t} catch {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tedit() {\r\n\t\t\tif (this.dataRow) {\r\n\t\t\t\tthis.editRow = new pms.DataRow(this.dataRow);\r\n\t\t\t} else {\r\n\t\t\t\tthis.editRow = this.dataRowService.create(this.dataTable);\r\n\t\t\t\tthis.editRow.key = this.key;\r\n\t\t\t}\r\n\r\n\t\t\tconst portalDataGroups = this.dataService.setup.portal.portalDataGroups.filter((portalDataGroup) => {\r\n\t\t\t\treturn portalDataGroup.dataGroup.isPrivate === true;\r\n\t\t\t});\r\n\r\n\t\t\tconst dataGroup = portalDataGroups && portalDataGroups.length > 0 ? portalDataGroups[0].dataGroup : null;\r\n\r\n\t\t\tif (this.editRow.dataGroupId !== dataGroup.id) {\r\n\t\t\t\tthis.editRow.id = null;\r\n\t\t\t\tthis.editRow.dataGroupId = dataGroup.id;\r\n\r\n\t\t\t\tthis.editRow.dataValues.forEach((dataValue) => {\r\n\t\t\t\t\tdataValue.id = null;\r\n\t\t\t\t\tdataValue.dataRowId = null;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tthis.dataService.temp.conflict = null;\r\n\t\t\tthis.dataService.temp.diff = () => { this.diff(); };\r\n\t\t\tthis.dataService.temp.dataTable = this.dataTable;\r\n\t\t\tthis.dataService.temp.editRow = this.editRow;\r\n\t\t\tthis.dataService.temp.resolved = false;\r\n\t\t\tthis.dataService.temp.save = () => { this.save(); };\r\n\r\n\t\t\tthis.modalService.show('inline-editor');\r\n\r\n\t\t\ttry {\r\n\t\t\t\t(angular.element('#_root_porticoService_dataService_temp_editRow_key-monaco').scope()).$monaco.edit();\r\n\t\t\t} catch {\r\n\t\t\t\t// ignore\r\n\t\t\t}\r\n\r\n\t\t\tthis.editRow.dataValues.forEach((dv) => {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t(angular.element('#_root_porticoService_dataService_temp_editRow_getDataValue_' + dv.dataColumnId + '_value-monaco').scope()).$monaco.edit();\r\n\t\t\t\t} catch {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsave() {\r\n\t\t\tthis.dataRowService.save(this.editRow).then((dataRow: pms.DataRow) => {\r\n\t\t\t\tconst portalDataGroups = this.dataService.setup.portal.portalDataGroups.filter((pdg) => {\r\n\t\t\t\t\treturn pdg.dataGroupId === dataRow.dataGroupId;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tportalDataGroups[0].dataGroup.dataRows = portalDataGroups[0].dataGroup.dataRows.filter((dr) => {\r\n\t\t\t\t\treturn dr.id !== dataRow.id;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tportalDataGroups[0].dataGroup.dataRows.push(dataRow);\r\n\r\n\t\t\t\tthis.modalService.hide('inline-editor');\r\n\t\t\t\tthis.porticoService.refresh(this.key);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tgetHtml(source: string): string {\r\n\t\t\tlet html = '';\r\n\r\n\t\t\tif (source) {\r\n\t\t\t\thtml = `\"${this.key}\"`;\r\n\t\t\t}\r\n\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tgetDebugHtml(html: string, key: string): string {\r\n\t\t\thtml =\r\n\t\t\t\t`[tc-image key=\"${key}\"]\r\n\t\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\t${html}\r\n\t\t\t\t`;\r\n\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tgetEditHtml(html: string, key: string): string {\r\n\t\t\tlet clazz = '';\r\n\r\n\t\t\tif (!this.dataGroup.isPrivate) {\r\n\t\t\t\tclazz += ' text-danger';\r\n\t\t\t} else {\r\n\t\t\t\tclazz += ' text-info';\r\n\t\t\t}\r\n\r\n\t\t\thtml =\r\n\t\t\t\t`\r\n\t\t\t\t\tImage
${key}\">
\r\n\t\t\t\t\t${html}\r\n\t\t\t\t
\r\n\t\t\t\t${html}`;\r\n\r\n\t\t\treturn html;\r\n\t\t}\r\n\t}\r\n\r\n\tangular.module('app').directive('tcImage', ['dataService', (dataService: ps.IDataService) => {\r\n\t\treturn {\r\n\t\t\tbindToController: {\r\n\t\t\t\tkey: '@',\r\n\t\t\t\tsource: '@'\r\n\t\t\t},\r\n\t\t\tcontroller: TcImageController,\r\n\t\t\tcontrollerAs: '$image',\r\n\t\t\tlink: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: any[]) => {\r\n\t\t\t\tconst tcImage: TcImageController = $ctrl[0];\r\n\r\n\t\t\t\ttcImage.dataRow = null;\r\n\t\t\t\ttcImage.dataTable = dataService.getDataTable('Image');\r\n\t\t\t\ttcImage.tcParent = $ctrl[1];\r\n\r\n\t\t\t\ttcImage.compile();\r\n\r\n\t\t\t\tif (tcImage.key) {\r\n\t\t\t\t\t$scope.$on(`tc-refresh-${tcImage.key}`, () => {\r\n\t\t\t\t\t\ttcImage.compile();\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$scope.$watch('$image.source', () => {\r\n\t\t\t\t\ttcImage.compile();\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\trestrict: 'E',\r\n\t\t\trequire: ['tcImage', '?^^tcHtml'],\r\n\t\t\tscope: true\r\n\t\t};\r\n }]);\r\n}","namespace Portico.Directives {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pms = Portico.Models.Setup;\r\n\timport ps = Portico.Services;\r\n\r\n export interface ITcModalController {\r\n clazz: string;\r\n close: () => void;\r\n key: string;\r\n\r\n\t\tdataGroup: pms.DataGroup;\r\n\t\tdataRow: pms.DataRow;\r\n\t\tdataTable: pms.DataTable;\r\n\t\teditRow: pms.DataRow;\r\n\t\ttcParent: ITcHtmlController; // is this necessary, or will implementing the angular IController give us this? doubtful.\r\n\r\n click: () => void;\r\n\t\tcompile: () => void;\r\n }\r\n\r\n\t@Inject('$compile', '$element', '$scope', 'dataService', 'dataRowService', 'modalService', 'porticoService', 'serverConstants')\r\n export class TcModalController implements ITcModalController {\r\n clazz: string;\r\n close: () => void;\r\n key: string;\r\n\r\n\t\tdataGroup: pms.DataGroup;\r\n\t\tdataRow: pms.DataRow;\r\n\t\tdataTable: pms.DataTable;\r\n\t\teditRow: pms.DataRow;\r\n\t\ttcParent: TcHtmlController;\r\n\r\n\t\tconstructor(\r\n\t\t\tpublic $compile: angular.ICompileService,\r\n\t\t\tpublic $element: angular.IAugmentedJQuery,\r\n\t\t\tpublic $scope: angular.IScope,\r\n\t\t\tpublic dataService: ps.IDataService,\r\n\t\t\tpublic dataRowService: ps.IDataRowService,\r\n\t\t\tpublic modalService: ps.IModalService,\r\n\t\t\tpublic porticoService: ps.IPorticoService,\r\n\t\t\tpublic serverConstants: pmi.IServerConstants\r\n\t\t) {}\r\n\r\n\t\tcancel() {\r\n\t\t\tthis.modalService.hide('inline-editor');\r\n\t\t}\r\n\r\n\t\tclick(): void {\r\n\t\t\tthis.close();\r\n\t\t}\r\n\r\n\t\tcompile() {\r\n\t\t\tlet tcCurrent: TcHtmlController | TcModalController = this;\r\n\t\t\tlet fullKey = this.key;\r\n\r\n\t\t\t// should reverse loop to go from absolute to relative key, with short circuiting\r\n\t\t\twhile (tcCurrent) {\r\n\t\t\t\tlet temp = this.dataService.getDataRows('Modal', fullKey);\r\n\r\n\t\t\t\tif (temp && temp.length > 0) {\r\n\t\t\t\t\tthis.dataRow = temp[0];\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttcCurrent = tcCurrent.tcParent;\r\n\r\n\t\t\t\tif (tcCurrent) {\r\n\t\t\t\t\tfullKey = tcCurrent.key + '.' + fullKey;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (this.dataRow) {\r\n\t\t\t\tconst portalDataGroups = this.dataService.setup.portal.portalDataGroups.filter((portalDataGroup) => {\r\n\t\t\t\t\treturn portalDataGroup.dataGroupId === this.dataRow.dataGroupId;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.dataGroup = portalDataGroups && portalDataGroups.length > 0 ? portalDataGroups[0].dataGroup : null;\r\n\t\t\t} else {\r\n\t\t\t\tconst portalDataGroups = this.dataService.setup.portal.portalDataGroups.filter((portalDataGroup) => {\r\n\t\t\t\t\treturn portalDataGroup.dataGroup.isPrivate === true;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.dataGroup = portalDataGroups && portalDataGroups.length > 0 ? portalDataGroups[0].dataGroup : null;\r\n\t\t\t}\r\n\r\n\t\t\tconst headerColumn = this.dataTable.getDataColumn('Header');\r\n\t\t\tconst headerValue = this.dataRow ? this.dataRow.getDataValue(headerColumn.id) : null;\r\n\t\t\tconst header = headerValue ? headerValue.value : null;\r\n\t\t\tconst bodyColumn = this.dataTable.getDataColumn('Body');\r\n\t\t\tconst bodyValue = this.dataRow ? this.dataRow.getDataValue(bodyColumn.id) : null;\r\n\t\t\tconst body = bodyValue ? bodyValue.value : null;\r\n\t\t\tconst footerColumn = this.dataTable.getDataColumn('Footer');\r\n\t\t\tconst footerValue = this.dataRow ? this.dataRow.getDataValue(footerColumn.id) : null;\r\n\t\t\tconst footer = footerValue ? footerValue.value : null;\r\n\r\n\t\t\tlet html = this.getHtml(header, body, footer);\r\n\r\n\t\t\tif (this.serverConstants.connectTo !== 'Prod') {\r\n\t\t\t\thtml = this.getEditHtml(html, fullKey);\r\n\t\t\t}\r\n\r\n\t\t\tconst clazz = this.clazz ? this.clazz : '';\r\n\t\t\tconst key = this.key ? this.key : '';\r\n\r\n\t\t\thtml =\r\n\t\t\t\t`
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t${html}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
`;\r\n\r\n\t\t\tthis.$element.html(html);\r\n\t\t\tthis.$compile(this.$element.contents() as any)(this.$scope);\r\n\t\t}\r\n\r\n\t\tdiff() {\r\n\t\t\ttry {\r\n\t\t\t\t(angular.element('#_root_porticoService_dataService_temp_editRow_key-monaco').scope()).$monaco.diff(this.porticoService.dataService.temp.conflict.key);\r\n\t\t\t} catch {\r\n\t\t\t\t// ignore\r\n\t\t\t}\r\n\r\n\t\t\tthis.porticoService.dataService.temp.conflict.dataValues.forEach((dv) => {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t(angular.element('#_root_porticoService_dataService_temp_editRow_getDataValue_' + dv.dataColumnId + '_value-monaco').scope()).$monaco.diff(dv.value);\r\n\t\t\t\t} catch {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tedit() {\r\n\t\t\tif (this.dataRow) {\r\n\t\t\t\tthis.editRow = new pms.DataRow(this.dataRow);\r\n\t\t\t} else {\r\n\t\t\t\tthis.editRow = this.dataRowService.create(this.dataTable);\r\n\t\t\t\tthis.editRow.key = this.key;\r\n\t\t\t}\r\n\r\n\t\t\tconst portalDataGroups = this.dataService.setup.portal.portalDataGroups.filter((portalDataGroup) => {\r\n\t\t\t\treturn portalDataGroup.dataGroup.isPrivate === true;\r\n\t\t\t});\r\n\r\n\t\t\tconst dataGroup = portalDataGroups && portalDataGroups.length > 0 ? portalDataGroups[0].dataGroup : null;\r\n\r\n\t\t\tif (this.editRow.dataGroupId !== dataGroup.id) {\r\n\t\t\t\tthis.editRow.id = null;\r\n\t\t\t\tthis.editRow.dataGroupId = dataGroup.id;\r\n\r\n\t\t\t\tthis.editRow.dataValues.forEach((dataValue) => {\r\n\t\t\t\t\tdataValue.id = null;\r\n\t\t\t\t\tdataValue.dataRowId = null;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tthis.dataService.temp.conflict = null;\r\n\t\t\tthis.dataService.temp.diff = () => { this.diff(); };\r\n\t\t\tthis.dataService.temp.dataTable = this.dataTable;\r\n\t\t\tthis.dataService.temp.editRow = this.editRow;\r\n\t\t\tthis.dataService.temp.resolved = false;\r\n\t\t\tthis.dataService.temp.save = () => { this.save(); };\r\n\r\n\t\t\tthis.modalService.show('inline-editor');\r\n\r\n\t\t\ttry {\r\n\t\t\t\t(angular.element('#_root_porticoService_dataService_temp_editRow_key-monaco').scope()).$monaco.edit();\r\n\t\t\t} catch {\r\n\t\t\t\t// ignore\r\n\t\t\t}\r\n\r\n\t\t\tthis.editRow.dataValues.forEach((dv) => {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t(angular.element('#_root_porticoService_dataService_temp_editRow_getDataValue_' + dv.dataColumnId + '_value-monaco').scope()).$monaco.edit();\r\n\t\t\t\t} catch {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsave() {\r\n\t\t\tthis.dataRowService.save(this.editRow).then((dataRow: pms.DataRow) => {\r\n\t\t\t\tconst portalDataGroups = this.dataService.setup.portal.portalDataGroups.filter((pdg) => {\r\n\t\t\t\t\treturn pdg.dataGroupId === dataRow.dataGroupId;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tportalDataGroups[0].dataGroup.dataRows = portalDataGroups[0].dataGroup.dataRows.filter((dr) => {\r\n\t\t\t\t\treturn dr.id !== dataRow.id;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tportalDataGroups[0].dataGroup.dataRows.push(dataRow);\r\n\r\n\t\t\t\tthis.modalService.hide('inline-editor');\r\n\t\t\t\t// this.porticoService.refresh(this.key);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tgetHtml(header: string, body: string, footer: string): string {\r\n\t\t\t//const clazz = this.clazz ? this.clazz : '';\r\n\t\t\t//const key = this.key ? this.key : '';\r\n\r\n\t\t\tif (header) {\r\n\t\t\t\theader =\r\n\t\t\t\t\t`
\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t${header}\r\n\t\t\t\t\t
`;\r\n\t\t\t} else {\r\n\t\t\t\theader = '';\r\n\t\t\t}\r\n\r\n\t\t\tif (body) {\r\n\t\t\t\tbody =\r\n\t\t\t\t\t`
\r\n\t\t\t\t\t\t${body}\r\n\t\t\t\t\t
`;\r\n\t\t\t} else {\r\n\t\t\t\tbody = '';\r\n\t\t\t}\r\n\r\n\t\t\tif (footer) {\r\n\t\t\t\tfooter =\r\n\t\t\t\t\t`
\r\n\t\t\t\t\t\t${footer}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
`;\r\n\t\t\t} else {\r\n\t\t\t\tfooter = '';\r\n\t\t\t}\r\n\r\n\t\t\t//let html =\r\n\t\t\t//\t`
\r\n\t\t\t//\t\t
\r\n\t\t\t//\t\t\t
\r\n\t\t\t//\t\t\t\t
\r\n\t\t\t//\t\t\t\t\t
\r\n\t\t\t//\t\t\t\t\t\t\r\n\t\t\t//\t\t\t\t\t\t\t${header}\r\n\t\t\t//\t\t\t\t\t\t\t${body}\r\n\t\t\t//\t\t\t\t\t\t\t${footer}\r\n\t\t\t//\t\t\t\t\t\t\r\n\t\t\t//\t\t\t\t\t
\r\n\t\t\t//\t\t\t\t
\r\n\t\t\t//\t\t\t
\r\n\t\t\t//\t\t
\r\n\t\t\t//\t
`;\r\n\r\n\t\t\tlet html =\r\n\t\t\t\t`${header}\r\n\t\t\t\t${body}\r\n\t\t\t\t${footer}`;\r\n\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tgetDebugHtml(html: string, key: string): string {\r\n\t\t\thtml =\r\n\t\t\t\t`[tc-modal key=\"${key}\"]\r\n\t\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\t${html}\r\n\t\t\t\t`;\r\n\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tgetEditHtml(html: string, key: string): string {\r\n\t\t\tlet clazz = '';\r\n\r\n\t\t\tif (!this.dataGroup.isPrivate) {\r\n\t\t\t\tclazz += ' text-danger';\r\n\t\t\t} else {\r\n\t\t\t\tclazz += ' text-success';\r\n\t\t\t}\r\n\r\n\t\t\thtml =\r\n\t\t\t\t`\r\n\t\t\t\t\tModal
${key}\">
\r\n\t\t\t\t\t${html}\r\n\t\t\t\t
\r\n\t\t\t\t${html}`\r\n\r\n\t\t\treturn html;\r\n\t\t}\r\n }\r\n\r\n\tangular.module('app').directive('tcModal', ['dataService', (dataService: ps.IDataService) => {\r\n\t\treturn {\r\n\t\t\tbindToController: {\r\n\t\t\t\tclazz: '@', // should we move class to modal custom data?\r\n\t\t\t\tclose: '&',\r\n\t\t\t\tkey: '@'\r\n\t\t\t},\r\n\t\t\tcontroller: TcModalController,\r\n\t\t\tcontrollerAs: '$modal',\r\n\t\t\tlink: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: any[]) => {\r\n\t\t\t\tconst tcModal: TcModalController = $ctrl[0];\r\n\r\n\t\t\t\ttcModal.dataRow = null;\r\n\t\t\t\ttcModal.dataTable = dataService.getDataTable('Modal');\r\n\t\t\t\ttcModal.tcParent = $ctrl[1];\r\n\r\n\t\t\t\ttcModal.compile();\r\n\r\n\t\t\t\t$scope.$on(`tc-refresh-${tcModal.key}`, () => {\r\n\t\t\t\t\ttcModal.compile();\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\trestrict: 'E',\r\n\t\t\trequire: ['tcModal', '?^^tcHtml'],\r\n\t\t\tscope: true,\r\n\t\t};\r\n\t}]);\r\n}","namespace Portico.Directives {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pms = Portico.Models.Setup;\r\n\timport ps = Portico.Services;\r\n\r\n export interface ITcScriptController {\r\n key: string;\r\n\r\n\t\tdataGroups: pms.DataGroup[];\r\n\t\tdataRows: pms.DataRow[];\r\n\t\tdataTable: pms.DataTable;\r\n\t\teditRow: pms.DataRow;\r\n\t\ttcParent: ITcHtmlController; // is this necessary, or will implementing the angular IController give us this? doubtful.\r\n\r\n\t\tcompile: () => void;\r\n }\r\n\r\n\t@Inject('$compile', '$element', '$scope', 'dataService', 'dataRowService', 'modalService', 'porticoService', 'serverConstants')\r\n export class TcScriptController implements ITcScriptController {\r\n key: string;\r\n\r\n\t\tdataGroups: pms.DataGroup[];\r\n\t\tdataRows: pms.DataRow[];\r\n\t\tdataTable: pms.DataTable;\r\n\t\teditRow: pms.DataRow;\r\n\t\ttcParent: TcHtmlController;\r\n\r\n\t\tconstructor(\r\n\t\t\tpublic $compile: angular.ICompileService,\r\n\t\t\tpublic $element: angular.IAugmentedJQuery,\r\n\t\t\tpublic $scope: angular.IScope,\r\n\t\t\tpublic dataService: ps.IDataService,\r\n\t\t\tpublic dataRowService: ps.IDataRowService,\r\n\t\t\tpublic modalService: ps.IModalService,\r\n\t\t\tpublic porticoService: ps.IPorticoService,\r\n\t\t\tpublic serverConstants: pmi.IServerConstants\r\n\t\t) {\r\n\t\t\tthis.dataGroups = [];\r\n\t\t\tthis.dataRows = [];\r\n\t\t}\r\n\r\n\t\tcancel(index: number) {\r\n\t\t\tthis.modalService.hide('inline-editor');\r\n\t\t}\r\n\r\n\t\tcompile() {\r\n\t\t\tlet tcCurrent: TcHtmlController | TcScriptController = this;\r\n\t\t\tlet fullKey = this.key;\r\n\r\n\t\t\tthis.dataRows = [];\r\n\r\n\t\t\t// should reverse loop to go from absolute to relative key, with short circuiting\r\n\t\t\twhile (tcCurrent) {\r\n\t\t\t\tlet temp = this.dataService.getDataRows('Script', fullKey);\r\n\r\n\t\t\t\tif (temp) {\r\n\t\t\t\t\tthis.dataRows = this.dataRows.concat(temp);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttcCurrent = tcCurrent.tcParent;\r\n\r\n\t\t\t\tif (tcCurrent) {\r\n\t\t\t\t\tfullKey = tcCurrent.key + '.' + fullKey;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (this.dataRows.length === 0) {\r\n\t\t\t\tthis.dataRows.push(null);\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < this.dataRows.length; i++) {\r\n\t\t\t\tconst dataRow = this.dataRows[i];\r\n\r\n\t\t\t\tif (dataRow) {\r\n\t\t\t\t\tconst portalDataGroups = this.dataService.setup.portal.portalDataGroups.filter((portalDataGroup) => {\r\n\t\t\t\t\t\treturn portalDataGroup.dataGroupId === dataRow.dataGroupId;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tthis.dataGroups[i] = portalDataGroups && portalDataGroups.length > 0 ? portalDataGroups[0].dataGroup : null;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconst portalDataGroups = this.dataService.setup.portal.portalDataGroups.filter((portalDataGroup) => {\r\n\t\t\t\t\t\treturn portalDataGroup.dataGroup.isPrivate === true;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tthis.dataGroups[i] = portalDataGroups && portalDataGroups.length > 0 ? portalDataGroups[0].dataGroup : null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst dataColumn = this.dataTable.getDataColumn('Code');\r\n\t\t\tlet fullHtml = '';\r\n\r\n\t\t\tfor (let i = this.dataRows.length - 1; i >= 0; i--) {\r\n\t\t\t\tconst dataRow = this.dataRows[i];\r\n\t\t\t\tconst dataValue = dataRow ? dataRow.getDataValue(dataColumn.id) : null;\r\n\t\t\t\tlet code = dataValue ? dataValue.value : null;\r\n\r\n\t\t\t\tlet html = this.getHtml(code);\r\n\r\n\t\t\t\tif (this.serverConstants.connectTo !== 'Prod') {\r\n\t\t\t\t\thtml = this.getEditHtml(i, html, fullKey);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfullHtml += html;\r\n\t\t\t}\r\n\r\n\t\t\tthis.$element.html(fullHtml);\r\n\t\t\tthis.$compile(this.$element.contents() as any)(this.$scope);\r\n\t\t}\r\n\r\n\t\tdiff() {\r\n\t\t\ttry {\r\n\t\t\t\t(angular.element('#_root_porticoService_dataService_temp_editRow_key-monaco').scope()).$monaco.diff(this.porticoService.dataService.temp.conflict.key);\r\n\t\t\t} catch {\r\n\t\t\t\t// ignore\r\n\t\t\t}\r\n\r\n\t\t\tthis.porticoService.dataService.temp.conflict.dataValues.forEach((dv) => {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t(angular.element('#_root_porticoService_dataService_temp_editRow_getDataValue_' + dv.dataColumnId + '_value-monaco').scope()).$monaco.diff(dv.value);\r\n\t\t\t\t} catch {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tedit(index: number) {\r\n\t\t\tif (this.dataRows[index]) {\r\n\t\t\t\tthis.editRow = new pms.DataRow(this.dataRows[index]);\r\n\t\t\t} else { // ???\r\n\t\t\t\tthis.editRow = this.dataRowService.create(this.dataTable);\r\n\t\t\t\tthis.editRow.key = this.key;\r\n\t\t\t}\r\n\r\n\t\t\tconst portalDataGroups = this.dataService.setup.portal.portalDataGroups.filter((portalDataGroup) => {\r\n\t\t\t\treturn portalDataGroup.dataGroup.isPrivate === true;\r\n\t\t\t});\r\n\r\n\t\t\tconst dataGroup = portalDataGroups && portalDataGroups.length > 0 ? portalDataGroups[0].dataGroup : null;\r\n\r\n\t\t\tif (this.editRow.dataGroupId !== dataGroup.id) {\r\n\t\t\t\tthis.editRow.id = null;\r\n\t\t\t\tthis.editRow.dataGroupId = dataGroup.id;\r\n\r\n\t\t\t\tthis.editRow.dataValues.forEach((dataValue) => {\r\n\t\t\t\t\tdataValue.id = null;\r\n\t\t\t\t\tdataValue.dataRowId = null;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tthis.dataService.temp.conflict = null;\r\n\t\t\tthis.dataService.temp.diff = () => { this.diff(); };\r\n\t\t\tthis.dataService.temp.dataTable = this.dataTable;\r\n\t\t\tthis.dataService.temp.editRow = this.editRow;\r\n\t\t\tthis.dataService.temp.resolved = false;\r\n\t\t\tthis.dataService.temp.save = () => { this.save(); };\r\n\r\n\t\t\tthis.modalService.show('inline-editor');\r\n\r\n\t\t\ttry {\r\n\t\t\t\t(angular.element('#_root_porticoService_dataService_temp_editRow_key-monaco').scope()).$monaco.edit();\r\n\t\t\t} catch {\r\n\t\t\t\t// ignore\r\n\t\t\t}\r\n\r\n\t\t\tthis.editRow.dataValues.forEach((dv) => {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t(angular.element('#_root_porticoService_dataService_temp_editRow_getDataValue_' + dv.dataColumnId + '_value-monaco').scope()).$monaco.edit();\r\n\t\t\t\t} catch {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsave() {\r\n\t\t\tthis.dataRowService.save(this.editRow).then((dataRow: pms.DataRow) => {\r\n\t\t\t\tconst portalDataGroups = this.dataService.setup.portal.portalDataGroups.filter((pdg) => {\r\n\t\t\t\t\treturn pdg.dataGroupId === dataRow.dataGroupId;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tportalDataGroups[0].dataGroup.dataRows = portalDataGroups[0].dataGroup.dataRows.filter((dr) => {\r\n\t\t\t\t\treturn dr.id !== dataRow.id;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tportalDataGroups[0].dataGroup.dataRows.push(dataRow);\r\n\r\n\t\t\t\tthis.modalService.hide('inline-editor');\r\n\t\t\t\tthis.porticoService.refresh(this.key);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tgetHtml(code: string): string {\r\n\t\t\tlet html = '';\r\n\r\n\t\t\tif (code) {\r\n\t\t\t\thtml = ``;\r\n\t\t\t}\r\n\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tgetDebugHtml(index: number, html: string, key: string): string {\r\n\t\t\thtml =\r\n\t\t\t\t`[tc-script key=\"${key}\"]\r\n\t\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\t${html}\r\n\t\t\t\t`;\r\n\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tgetEditHtml(index: number, html: string, key: string): string {\r\n\t\t\tlet clazz = '';\r\n\r\n\t\t\tif (!this.dataGroups[index].isPrivate) {\r\n\t\t\t\tclazz += ' text-danger';\r\n\t\t\t} else {\r\n\t\t\t\tclazz += ' text-warning';\r\n\t\t\t}\r\n\r\n\t\t\thtml =\r\n\t\t\t\t`\r\n\t\t\t\t\tScript
${key}\">
\r\n\t\t\t\t\t${html}\r\n\t\t\t\t
\r\n\t\t\t\t${html}`\r\n\r\n\t\t\treturn html;\r\n\t\t}\r\n }\r\n\r\n\tangular.module('app').directive('tcScript', ['dataService', (dataService: ps.IDataService) => {\r\n\t\treturn {\r\n\t\t\tbindToController: {\r\n\t\t\t\tkey: '@'\r\n\t\t\t},\r\n\t\t\tcontroller: TcScriptController,\r\n\t\t\tcontrollerAs: '$script',\r\n\t\t\tlink: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: any[]) => {\r\n\t\t\t\tconst tcScript: TcScriptController = $ctrl[0];\r\n\r\n\t\t\t\ttcScript.dataTable = dataService.getDataTable('Script');\r\n\t\t\t\ttcScript.tcParent = $ctrl[1];\r\n\r\n\t\t\t\ttcScript.compile();\r\n\r\n\t\t\t\t$scope.$on(`tc-refresh-${tcScript.key}`, () => {\r\n\t\t\t\t\ttcScript.compile();\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\trestrict: 'E',\r\n\t\t\trequire: ['tcScript'],\r\n\t\t\tscope: true\r\n\t\t};\r\n }]);\r\n}","namespace Portico.Directives {\r\n\r\n import Inject = Portico.Decorators.Inject;\r\n\timport pmi = Portico.Models.Interfaces;\r\n import pms = Portico.Models.Setup;\r\n import ps = Portico.Services;\r\n\r\n export interface ITcStyleController {\r\n key: string;\r\n\r\n dataGroups: pms.DataGroup[];\r\n dataRows: pms.DataRow[];\r\n dataTable: pms.DataTable;\r\n editRow: pms.DataRow;\r\n tcParent: ITcHtmlController; // is this necessary, or will implementing the angular IController give us this? doubtful.\r\n\r\n compile: () => void;\r\n }\r\n\r\n\t@Inject('$compile', '$element', '$scope', 'dataService', 'dataRowService', 'modalService', 'porticoService', 'serverConstants')\r\n export class TcStyleController implements ITcStyleController {\r\n key: string;\r\n\r\n dataGroups: pms.DataGroup[];\r\n dataRows: pms.DataRow[];\r\n dataTable: pms.DataTable;\r\n editRow: pms.DataRow;\r\n tcParent: TcHtmlController;\r\n\r\n constructor(\r\n public $compile: angular.ICompileService,\r\n public $element: angular.IAugmentedJQuery,\r\n public $scope: angular.IScope,\r\n public dataService: ps.IDataService,\r\n public dataRowService: ps.IDataRowService,\r\n public modalService: ps.IModalService,\r\n\t\t\tpublic porticoService: ps.IPorticoService,\r\n\t\t\tpublic serverConstants: pmi.IServerConstants\r\n ) {\r\n this.dataGroups = [];\r\n this.dataRows = [];\r\n }\r\n\r\n cancel(index: number) {\r\n\t\t\tthis.modalService.hide('inline-editor');\r\n }\r\n\r\n compile() {\r\n let tcCurrent: TcHtmlController | TcStyleController = this;\r\n let fullKey = this.key;\r\n\r\n this.dataRows = [];\r\n\r\n // should reverse loop to go from absolute to relative key, with short circuiting\r\n while (tcCurrent) {\r\n let temp = this.dataService.getDataRows('Style', fullKey);\r\n\r\n if (temp) {\r\n this.dataRows = this.dataRows.concat(temp);\r\n }\r\n\r\n tcCurrent = tcCurrent.tcParent;\r\n\r\n if (tcCurrent) {\r\n fullKey = tcCurrent.key + '.' + fullKey;\r\n }\r\n }\r\n\r\n if (this.dataRows.length === 0) {\r\n this.dataRows.push(null);\r\n }\r\n\r\n for (let i = 0; i < this.dataRows.length; i++) {\r\n const dataRow = this.dataRows[i];\r\n\r\n if (dataRow) {\r\n const portalDataGroups = this.dataService.setup.portal.portalDataGroups.filter((portalDataGroup) => {\r\n return portalDataGroup.dataGroupId === dataRow.dataGroupId;\r\n });\r\n\r\n this.dataGroups[i] = portalDataGroups && portalDataGroups.length > 0 ? portalDataGroups[0].dataGroup : null;\r\n } else {\r\n const portalDataGroups = this.dataService.setup.portal.portalDataGroups.filter((portalDataGroup) => {\r\n return portalDataGroup.dataGroup.isPrivate === true;\r\n });\r\n\r\n this.dataGroups[i] = portalDataGroups && portalDataGroups.length > 0 ? portalDataGroups[0].dataGroup : null;\r\n }\r\n }\r\n\r\n const dataColumn = this.dataTable.getDataColumn('CSS');\r\n let fullHtml = '';\r\n\r\n for (let i = this.dataRows.length - 1; i >= 0; i--) {\r\n const dataRow = this.dataRows[i];\r\n const dataValue = dataRow ? dataRow.getDataValue(dataColumn.id) : null;\r\n let css = dataValue ? dataValue.value : null;\r\n\r\n let html = this.getHtml(css);\r\n\r\n\t\t\t\tif (this.serverConstants.connectTo !== 'Prod') {\r\n\t\t\t\t\thtml = this.getEditHtml(i, html, fullKey);\r\n\t\t\t\t}\r\n\r\n fullHtml += html;\r\n }\r\n\r\n this.$element.html(fullHtml);\r\n this.$compile(this.$element.contents() as any)(this.$scope);\r\n }\r\n\r\n\t\tdiff() {\r\n\t\t\ttry {\r\n\t\t\t\t(angular.element('#_root_porticoService_dataService_temp_editRow_key-monaco').scope()).$monaco.diff(this.porticoService.dataService.temp.conflict.key);\r\n\t\t\t} catch {\r\n\t\t\t\t// ignore\r\n\t\t\t}\r\n\r\n\t\t\tthis.porticoService.dataService.temp.conflict.dataValues.forEach((dv) => {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t(angular.element('#_root_porticoService_dataService_temp_editRow_getDataValue_' + dv.dataColumnId + '_value-monaco').scope()).$monaco.diff(dv.value);\r\n\t\t\t\t} catch {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n edit(index: number) {\r\n if (this.dataRows[index]) {\r\n this.editRow = new pms.DataRow(this.dataRows[index]);\r\n } else { // ???\r\n this.editRow = this.dataRowService.create(this.dataTable);\r\n this.editRow.key = this.key;\r\n }\r\n\r\n const portalDataGroups = this.dataService.setup.portal.portalDataGroups.filter((portalDataGroup) => {\r\n return portalDataGroup.dataGroup.isPrivate === true;\r\n });\r\n\r\n const dataGroup = portalDataGroups && portalDataGroups.length > 0 ? portalDataGroups[0].dataGroup : null;\r\n\r\n if (this.editRow.dataGroupId !== dataGroup.id) {\r\n this.editRow.id = null;\r\n this.editRow.dataGroupId = dataGroup.id;\r\n\r\n this.editRow.dataValues.forEach((dataValue) => {\r\n dataValue.id = null;\r\n dataValue.dataRowId = null;\r\n });\r\n }\r\n\r\n\t\t\tthis.dataService.temp.conflict = null;\r\n\t\t\tthis.dataService.temp.diff = () => { this.diff(); };\r\n\t\t\tthis.dataService.temp.dataTable = this.dataTable;\r\n\t\t\tthis.dataService.temp.editRow = this.editRow;\r\n\t\t\tthis.dataService.temp.resolved = false;\r\n\t\t\tthis.dataService.temp.save = () => { this.save(); };\r\n\r\n\t\t\tthis.modalService.show('inline-editor');\r\n\r\n\t\t\ttry {\r\n\t\t\t\t(angular.element('#_root_porticoService_dataService_temp_editRow_key-monaco').scope()).$monaco.edit();\r\n\t\t\t} catch {\r\n\t\t\t\t// ignore\r\n\t\t\t}\r\n\r\n\t\t\tthis.editRow.dataValues.forEach((dv) => {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t(angular.element('#_root_porticoService_dataService_temp_editRow_getDataValue_' + dv.dataColumnId + '_value-monaco').scope()).$monaco.edit();\r\n\t\t\t\t} catch {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t});\r\n }\r\n\r\n save() {\r\n this.dataRowService.save(this.editRow).then((dataRow: pms.DataRow) => {\r\n const portalDataGroups = this.dataService.setup.portal.portalDataGroups.filter((pdg) => {\r\n return pdg.dataGroupId === dataRow.dataGroupId;\r\n });\r\n\r\n portalDataGroups[0].dataGroup.dataRows = portalDataGroups[0].dataGroup.dataRows.filter((dr) => {\r\n return dr.id !== dataRow.id;\r\n });\r\n\r\n portalDataGroups[0].dataGroup.dataRows.push(dataRow);\r\n\r\n this.modalService.hide('inline-editor');\r\n this.porticoService.refresh(this.key);\r\n });\r\n }\r\n\r\n getHtml(css: string): string {\r\n let html = '';\r\n\r\n if (css) {\r\n html = ``;\r\n }\r\n\r\n return html;\r\n }\r\n\r\n getDebugHtml(index: number, html: string, key: string): string {\r\n html =\r\n `[tc-style key=\"${key}\"]\r\n
\r\n \r\n ${html}\r\n `;\r\n\r\n return html;\r\n }\r\n\r\n getEditHtml(index: number, html: string, key: string): string {\r\n let clazz = '';\r\n\r\n if (!this.dataGroups[index].isPrivate) {\r\n\t\t\t\tclazz += ' text-danger';\r\n\t\t\t} else {\r\n\t\t\t\tclazz += ' text-info';\r\n }\r\n\r\n\t\t\thtml =\r\n\t\t\t\t`\r\n Style
${key}\">
\r\n ${html}\r\n
\r\n\t\t\t\t${html}`\r\n\r\n return html;\r\n }\r\n }\r\n\r\n angular.module('app').directive('tcStyle', ['dataService', (dataService: ps.IDataService) => {\r\n return {\r\n bindToController: {\r\n key: '@'\r\n },\r\n controller: TcStyleController,\r\n controllerAs: '$style',\r\n link: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: any[]) => {\r\n const tcStyle: TcStyleController = $ctrl[0];\r\n\r\n tcStyle.dataTable = dataService.getDataTable('Style');\r\n tcStyle.tcParent = $ctrl[1];\r\n\r\n tcStyle.compile();\r\n\r\n $scope.$on(`tc-refresh-${tcStyle.key}`, () => {\r\n tcStyle.compile();\r\n });\r\n },\r\n restrict: 'E',\r\n require: ['tcStyle'],\r\n scope: true\r\n }\r\n }]);\r\n}","namespace Portico.Directives {\r\n\r\n\timport models = Portico.Models;\r\n\timport services = Portico.Services;\r\n\r\n export interface ITcButtonController {\r\n\t\tclazz: string;\r\n\t\tdisable: string;\r\n\t\tisAllowed: () => boolean;\r\n\t\tonDenied: () => void;\r\n\t\tonInvalid: () => void;\r\n\t\tonSuccess: () => void;\r\n\t\ttype: string;\r\n\t\tvalidate: boolean;\r\n\r\n tcForm: ITcFormController;\r\n\r\n\t\tisDisabled: () => boolean;\r\n\t\tonClick: () => void;\r\n }\r\n\r\n export class TcButtonController implements ITcButtonController {\r\n clazz: string;\r\n\t\tdisable: string;\r\n\t\tisAllowed: () => boolean;\r\n\t\tonDenied: () => void;\r\n\t\tonInvalid: () => void;\r\n\t\tonSuccess: () => void;\r\n\t\ttype: string;\r\n\t\tvalidate: boolean;\r\n\r\n tcForm: ITcFormController;\r\n\r\n\t\tconstructor(\r\n\t\t\tprivate $q: angular.IQService\r\n\t\t) {\r\n\t\t}\r\n\r\n\t\tisDisabled(): boolean {\r\n\t\t\tif (this.tcForm && this.tcForm.isDisabled()) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tif (this.disable === 'all' || this.disable === 'invalid') {\r\n\t\t\t\tif (!this.tcForm || !this.tcForm.ngForm || !this.tcForm.ngForm.$valid) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (this.disable === 'all' || this.disable === 'denied') {\r\n\t\t\t\tif (this.isAllowed && !this.isAllowed()) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tonClick(): void {\r\n\t\t\tif (this.tcForm) {\r\n\t\t\t\tthis.tcForm.ngForm.$setSubmitted();\r\n\r\n\t\t\t\t// need to do a better job with promises so the form can be enabled after onClick resolves\r\n\t\t\t\tif (this.type === 'submit') {\r\n\t\t\t\t\tthis.tcForm.disabled = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!this.validate || !this.tcForm || this.tcForm.ngForm.$valid) {\r\n\t\t\t\tif (this.isAllowed) {\r\n\t\t\t\t\tthis.$q.when(this.isAllowed()).then((result: boolean) => {\r\n\t\t\t\t\t\tif (!result) {\r\n\t\t\t\t\t\t\tif (this.onDenied) {\r\n\t\t\t\t\t\t\t\tthis.$q.when(this.onDenied()).finally(() => {\r\n\t\t\t\t\t\t\t\t\tif (this.tcForm) {\r\n\t\t\t\t\t\t\t\t\t\tthis.tcForm.disabled = false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (this.onSuccess) {\r\n\t\t\t\t\t\t\tthis.$q.when(this.onSuccess()).finally(() => {\r\n\t\t\t\t\t\t\t\tif (this.tcForm) {\r\n\t\t\t\t\t\t\t\t\tthis.tcForm.disabled = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t} else if (this.onSuccess) {\r\n\t\t\t\t\tthis.$q.when(this.onSuccess()).finally(() => {\r\n\t\t\t\t\t\tif (this.tcForm) {\r\n\t\t\t\t\t\t\tthis.tcForm.disabled = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n } else if (this.onInvalid) {\r\n this.$q.when(this.onInvalid()).finally(() => {\r\n if (this.tcForm) {\r\n this.tcForm.disabled = false;\r\n }\r\n });\r\n } else if (this.tcForm) {\r\n this.tcForm.disabled = false;\r\n }\r\n\t\t}\r\n }\r\n\r\n angular.module('app').directive('tcButton', [\r\n '$compile', (\r\n $compile: angular.ICompileService) => {\r\n\t\t\treturn {\r\n\t\t\t\tbindToController: {\r\n\t\t\t\t\tclazz: '@',\r\n\t\t\t\t\tdisable: '@',\r\n\t\t\t\t\tisAllowed: '&?',\r\n\t\t\t\t\tonDenied: '&?',\r\n\t\t\t\t\tonInvalid: '&?',\r\n\t\t\t\t\tonSuccess: '&?',\r\n\t\t\t\t\ttype: '@',\r\n\t\t\t\t\tvalidate: '@'\r\n\t\t\t\t},\r\n\t\t\t\tcontroller: ['$q', TcButtonController],\r\n\t\t\t\tcontrollerAs: '$button',\r\n\t\t\t\tlink: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: any[]) => {\r\n\t\t\t\t\tconst tcButton: ITcButtonController = $ctrl[0];\r\n\t\t\t\t\tconst tcForm: ITcFormController = $ctrl[1];\r\n\r\n\t\t\t\t\ttcButton.tcForm = tcForm;\r\n\t\t\t\t\ttcButton.type = tcButton.type ? tcButton.type : 'button';\r\n\t\t\t\t},\r\n\t\t\t\trestrict: 'E',\r\n\t\t\t\trequire: ['tcButton', '?^tcForm'],\r\n\t\t\t\tscope: true,\r\n\t\t\t\ttemplate:\r\n\t\t\t\t\t``,\r\n\t\t\t\ttransclude: true\r\n\t\t\t};\r\n\t\t}\r\n\t]);\r\n}","/// \r\n\r\nnamespace Portico.Directives {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport ps = Portico.Services;\r\n\r\n\texport class ITcColorizeController {\r\n\t\ttcColorize: string;\r\n\t\tlang: string;\r\n\t\tcontent: string;\r\n\t\ttheme?: string;\r\n\t}\r\n\r\n\t@Inject('$scope')\r\n\texport class TcColorizeController implements ITcColorizeController {\r\n\t\ttcColorize: string;\r\n\t\tlang: string;\r\n\t\tcontent: string;\r\n\t\ttheme?: string;\r\n\r\n\t\tconstructor(private $scope: angular.IScope) {\r\n\t\t}\r\n\t}\r\n\r\n\tangular.module('app').directive('tcColorize', ['$compile', '$timeout', '$sce', ($compile: angular.ICompileService, $timeout: angular.ITimeoutService, $sce: angular.ISCEService) => {\r\n\t\treturn {\r\n\t\t\tbindToController: {\r\n lang: '=',\r\n content: '=', \r\n theme: '@'\r\n\t\t\t},\r\n\t\t\tcontroller: TcColorizeController,\r\n\t\t\tcontrollerAs: '$monaco',\r\n\t\t\tlink: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: any[]) => {\r\n const tcColorize: ITcColorizeController = $ctrl[0];\r\n\r\n\t\t\t\tconst theme = tcColorize.theme && tcColorize.theme.toLowerCase() === 'vs-dark' ? 'vs-dark':'vs';\r\n\t\t\t\tconst content = tcColorize.content && tcColorize.content.length > 0 ? tcColorize.content : 'NULL';\r\n\t\t\t\tconst lang = tcColorize.lang.toLowerCase();\r\n\t\t\t\t\r\n\t\t\t\tconst innerHTML = $sce.trustAsHtml(content.replace(//g, '>'));\r\n\t\t\t\tconst html = `
${innerHTML}
`\r\n\r\n\t\t\t\t$element.html(html);\r\n\t\t\t\t//$compile($element.contents())($scope);\r\n\r\n\t\t\t\t$timeout(() => {\r\n\t\t\t\t\t(window).require([\"vs/editor/editor.main\"], () => {\r\n\t\t\t\t\t\tconst editor = monaco.editor.colorizeElement($element[0].querySelector('#monaco'), {\t\t\t\r\n\t\t\t\t\t\t\ttheme\t\t\t\t\t\t\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}); \r\n\t\t\t\t}, 500, true);\r\n\t\t\t},\r\n\t\t\trestrict: 'E',\t\t\t\r\n\t\t\trequire: ['tcColorize'],\r\n scope: true\r\n\t\t};\r\n\t}]);\r\n}","namespace Portico.Directives {\r\n\r\n import Inject = Portico.Decorators.Inject;\r\n import pme = Portico.Models.Enterprise;\r\n import ps = Portico.Services;\r\n\r\n export class ITcInputOptions {\r\n addressKey: string;\r\n cityKey: string;\r\n stateKey: string;\r\n zipKey: string;\r\n }\r\n\r\n class GoogleFormattedAddress {\r\n searchedBy: string;\r\n address1: string;\r\n city: string;\r\n state: string;\r\n zip: string;\r\n\r\n constructor(private googleResponse = {} as any) {\r\n this.searchedBy = googleResponse.searchedBy ? googleResponse.searchedBy : \"\";\r\n this.address1 = googleResponse.street_number ? googleResponse.street_number + \" \" + googleResponse.route : googleResponse.route;\r\n this.city = googleResponse.locality ? googleResponse.locality : \"\";\r\n this.state = googleResponse.administrative_area_level_1 ? googleResponse.administrative_area_level_1 : \"\";\r\n this.zip = googleResponse.postal_code ? googleResponse.postal_code : \"\";\r\n }\r\n }\r\n\r\n export class ITcInputController {\r\n change: () => void;\r\n controlClass: string;\r\n disabled: string;\r\n dateOptions: string;\r\n groupClass: string;\r\n index: string;\r\n inputClass: string;\r\n isAllowed: () => boolean;\r\n key: string;\r\n label: string;\r\n labelClass: string;\r\n list: string;\r\n listLabel: string;\r\n listOptions: string;\r\n listTrackBy: string;\r\n listValue: string;\r\n mask: string;\r\n maskInclude: string;\r\n max: string;\r\n maxlength: string;\r\n maxlengthMessage: string;\r\n messageClass: string;\r\n min: string;\r\n minlength: string;\r\n minlengthMessage: string;\r\n options: ITcInputOptions;\r\n pattern: string;\r\n patternMessage: string;\r\n placeholder: string;\r\n readonly: string;\r\n required: string;\r\n requiredMessage: string;\r\n rows: string;\r\n type: string;\r\n utc: string;\r\n valueDefault: string;\r\n valueNone: string;\r\n\r\n tcForm: ITcFormController;\r\n id: string;\r\n isOpen: boolean;\r\n value: any;\r\n\r\n isDisabled: () => boolean;\r\n onChange: () => void;\r\n }\r\n\r\n @Inject('$scope', 'locationServiceClient') // TODO - Change back to locationService once the API Gateway is in production\r\n export class TcInputController implements ITcInputController {\r\n change: () => void;\r\n controlClass: string;\r\n disabled: string;\r\n dateOptions: string;\r\n groupClass: string;\r\n index: string;\r\n inputClass: string;\r\n isAllowed: () => boolean;\r\n key: string;\r\n label: string;\r\n labelClass: string;\r\n list: string;\r\n listLabel: string;\r\n listOptions: string;\r\n listTrackBy: string;\r\n listValue: string;\r\n mask: string;\r\n maskInclude: string;\r\n max: string;\r\n maxlength: string;\r\n maxlengthMessage: string;\r\n messageClass: string;\r\n min: string;\r\n minlength: string;\r\n minlengthMessage: string;\r\n options: ITcInputOptions;\r\n pattern: string;\r\n patternMessage: string;\r\n placeholder: string;\r\n readonly: string;\r\n required: string;\r\n requiredMessage: string;\r\n rows: string;\r\n type: string;\r\n utc: string;\r\n valueDefault: string;\r\n valueNone: string;\r\n\r\n tcForm: ITcFormController;\r\n id: string;\r\n isOpen: boolean = false;\r\n value: any;\r\n\r\n constructor(\r\n private $scope: angular.IScope,\r\n private locationService: ps.ILocationService,\r\n ) {\r\n }\r\n\r\n isDisabled(): boolean {\r\n if (this.disabled === 'true' || (this.tcForm && this.tcForm.isDisabled())) {\r\n return true;\r\n }\r\n\r\n if (this.isAllowed && !this.isAllowed()) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n onChange(): void {\r\n if (this.type === 'consent' || this.type.indexOf('checkbox') >= 0 && this.list) {\r\n this.checkbox();\r\n } else if (this.type.indexOf('date') === 0) {\r\n this.datePicker();\r\n } else if (this.type === 'zip-lookup') {\r\n this.zipLookup();\r\n } else if (this.type === 'google-autocomplete') {\r\n this.googleAutoComplete();\r\n }\r\n\r\n if (this.change) {\r\n this.change();\r\n }\r\n }\r\n\r\n private checkbox(): void {\r\n const values: any[] = [];\r\n\r\n for (let key in this.value) {\r\n\t\t\t\tif (this.value[key] && this.value[key] != this.valueNone) {\r\n values.push(this.value[key]);\r\n }\r\n }\r\n\r\n if (values.length === 0 && this.valueNone != null) {\r\n values.push(parseInt(this.valueNone));\r\n }\r\n\r\n this.$scope.$eval(`${this.key}=v`, { v: values });\r\n }\r\n\r\n private datePicker(): void {\r\n if (this.max || this.min) {\r\n const value: Date = this.$scope.$eval(`${this.key}`);\r\n this.tcForm.ngForm[this.id].$setValidity('max', true);\r\n this.tcForm.ngForm[this.id].$setValidity('min', true);\r\n\r\n if (this.max) {\r\n this.tcForm.ngForm[this.id].$setValidity('max', value <= new Date(this.max));\r\n }\r\n\r\n if (this.min) {\r\n this.tcForm.ngForm[this.id].$setValidity('min', value >= new Date(this.min));\r\n }\r\n }\r\n }\r\n\r\n private zipLookup(): void {\r\n const value: string = this.$scope.$eval(`${this.key}`);\r\n\r\n if (value && value.length === 5) {\r\n this.locationService.getCities(value).then((response: pme.City[]) => {\r\n if (response.length > 0) {\r\n this.$scope.$eval(`${this.options.cityKey}=cn`, { cn: response[0].cityName });\r\n this.$scope.$eval(`${this.options.stateKey}=sa`, { sa: response[0].stateAbbr });\r\n } else {\r\n this.$scope.$eval(`${this.options.cityKey}=cn`, { cn: null });\r\n this.$scope.$eval(`${this.options.stateKey}=sa`, { sa: null });\r\n }\r\n });\r\n }\r\n }\r\n\r\n private googleAutoCompleteForm(address: GoogleFormattedAddress) {\r\n const value: string = this.$scope.$eval(`${this.key}`);\r\n if (value) {\r\n var inputKey = this.key.replace(/[\\.\\'\\$\\[\\]\\(\\)]+/g, '_');\r\n var inputId = inputKey + '-input';\r\n var element = document.getElementById(inputId) as HTMLInputElement;\r\n element.value = address.address1; //sets to address line of the google result, and clears out the complete address result.\r\n this.$scope.$eval(`${this.options.addressKey} = adr`, { adr: address.address1 });\r\n this.$scope.$eval(`${this.options.cityKey}= cn`, { cn: address.city });\r\n this.$scope.$eval(`${this.options.stateKey}= sa`, { sa: address.state });\r\n this.$scope.$eval(`${this.options.zipKey}= zp`, { zp: address.zip });\r\n } else {\r\n this.$scope.$eval(`${this.options.addressKey}= adr`, { adr: null });\r\n this.$scope.$eval(`${this.options.cityKey}= cn`, { cn: null });\r\n this.$scope.$eval(`${this.options.stateKey}= sa`, { sa: null });\r\n this.$scope.$eval(`${this.options.zipKey}= zp`, { zp: null });\r\n }\r\n }\r\n\r\n private googleAutoCompleteConvertToFriendlyObject(place) {\r\n var result = {} as any;\r\n if (place) {\r\n result.searchedBy = place.address_components[0].types[0];\r\n for (var i = 0, l = place.address_components.length; i < l; i++) {\r\n result[place.address_components[i].types[0]] =\r\n place.address_components[i].short_name;\r\n }\r\n result.formattedAddress = place.formatted_address;\r\n result.lat = place.geometry.location.lat();\r\n result.lng = place.geometry.location.lng();\r\n }\r\n return result;\r\n }\r\n\r\n private googleAutoComplete() {\r\n var options = {\r\n types: ['address'],\r\n componentRestrictions: { country: \"us\" }\r\n };\r\n var inputKey = this.key.replace(/[\\.\\'\\$\\[\\]\\(\\)]+/g, '_');\r\n var inputId = inputKey + '-input';\r\n var element = document.getElementById(inputId) as HTMLInputElement;\r\n var gPlace = new google.maps.places.Autocomplete(element, options);\r\n google.maps.event.addListener(gPlace,\r\n 'place_changed',\r\n () => {\r\n this.$scope.$apply(() => {\r\n var place = gPlace.getPlace();\r\n var details = this.googleAutoCompleteConvertToFriendlyObject(place);\r\n var googleFormattedAddress = new GoogleFormattedAddress(details);\r\n this.googleAutoCompleteForm(googleFormattedAddress);\r\n });\r\n });\r\n }\r\n }\r\n\r\n angular.module('app').directive('tcInput', [\r\n '$compile',\r\n '$filter',\r\n '$stateParams',\r\n 'dataService',\r\n (\r\n $compile: angular.ICompileService,\r\n $filter: angular.IFilterService,\r\n $stateParams: angular.ui.IStateParamsService,\r\n dataService: ps.IDataService\r\n ) => {\r\n return {\r\n bindToController: {\r\n change: '&?',\r\n controlClass: '@',\r\n disabled: '@',\r\n dateOptions: '@',\r\n groupClass: '@',\r\n index: '@',\r\n inputClass: '@',\r\n isAllowed: '&?',\r\n key: '@',\r\n label: '@',\r\n labelClass: '@',\r\n list: '=',\r\n listLabel: '@',\r\n listOptions: '@',\r\n listTrackBy: '@',\r\n listValue: '@',\r\n mask: '@',\r\n maskInclude: '@',\r\n max: '@',\r\n maxlength: '@',\r\n maxlengthMessage: '@',\r\n messageClass: '@',\r\n min: '@',\r\n minlength: '@',\r\n minlengthMessage: '@',\r\n options: '=?',\r\n pattern: '@',\r\n patternMessage: '@',\r\n placeholder: '@',\r\n readonly: '@',\r\n required: '@',\r\n requiredMessage: '@',\r\n rows: '@',\r\n type: '@',\r\n utc: '@',\r\n valueDefault: '@',\r\n valueNone: '@'\r\n },\r\n controller: TcInputController,\r\n controllerAs: '$input',\r\n link: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: any[], $transclude: angular.ITranscludeFunction) => {\r\n const tcInput: ITcInputController = $ctrl[0];\r\n const tcForm: ITcFormController = $ctrl[1];\r\n\r\n if (tcForm) {\r\n tcInput.tcForm = tcForm;\r\n tcForm.tcInputs.push(tcInput);\r\n }\r\n\r\n const index: string = tcInput.index ? tcInput.index : '';\r\n const key: string = tcInput.key ? tcInput.key : '';\r\n const type = tcInput.type ? tcInput.type : 'text';\r\n\r\n tcInput.id = key.replace(/[\\.\\'\\$\\[\\]\\(\\)]+/g, '_');\r\n\r\n if (index) {\r\n tcInput.id += '-' + index.replace(/[\\.\\'\\$\\[\\]\\(\\)]+/g, '_');\r\n }\r\n\r\n let value = $scope.$eval(`${key}`);\r\n\r\n if (value == null) {\r\n if (tcInput.valueDefault != null) {\r\n value = tcInput.valueDefault;\r\n } else if (tcInput.valueNone != null) {\r\n value = tcInput.valueNone;\r\n }\r\n }\r\n\r\n if (value != null) {\r\n if (tcInput.type.indexOf('date') === 0) {\r\n value = new Date(value);\r\n }\r\n\r\n $scope.$eval(`${tcInput.key}=v`, { v: value });\r\n }\r\n\r\n if (Array.isArray(value)) {\r\n tcInput.value = {};\r\n\r\n for (let i = 0; i < value.length; i++) {\r\n tcInput.value['' + value[i]] = value[i];\r\n }\r\n } else {\r\n tcInput.value = value;\r\n }\r\n\r\n ///////////\r\n // LABEL //\r\n ///////////\r\n\r\n let labelHtml = '';\r\n\r\n if (tcInput.label) {\r\n const labelClass = tcInput.labelClass ? tcInput.labelClass : '';\r\n const append = tcInput.required === 'append' ? '*' : '';\r\n const prepend = tcInput.required === 'prepend' || tcInput.required === 'true' ? '*' : '';\r\n\r\n labelHtml =\r\n `
\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
`;\r\n }\r\n\r\n ///////////\r\n // INPUT //\r\n ///////////\r\n\r\n let inputClass = (type.indexOf('checkbox') === 0 || type === 'file' || type === 'monaco' || type.indexOf('radio') === 0 || type === 'select' || type === 'textarea' || type.indexOf('triple') === 0 || type === 'consent' ? '' : 'form-control');\r\n inputClass += (tcInput.inputClass ? ' ' + tcInput.inputClass : '');\r\n // these are trialcard attributes that should be passed along to child directives\r\n let childAttrs = '';\r\n let inputAttrs = '';\r\n let inputHtml = '';\r\n let transclusion = '';\r\n\r\n $transclude(function (clone, scope) {\r\n clone.each(function (index, node) {\r\n transclusion += node.textContent ? node.textContent : node.outerHTML;\r\n });\r\n });\r\n\r\n childAttrs += `change=\"$input.onChange()\" `;\r\n inputAttrs += `ng-change=\"$input.onChange()\" `;\r\n\r\n if (tcInput.disabled) {\r\n childAttrs += `disabled=\"${tcInput.disabled}\" `;\r\n inputAttrs += `disabled=\"${tcInput.disabled}\" `;\r\n }\r\n\r\n if (tcInput.isAllowed) {\r\n childAttrs += `is-allowed=\"$input.isAllowed()\" `;\r\n }\r\n\r\n if (inputClass) {\r\n childAttrs += `input-class=\"${inputClass}\" `;\r\n\r\n if (type.indexOf('checkbox') < 0 && type.indexOf('radio') < 0) {\r\n inputAttrs += `class=\"${inputClass}\" `;\r\n }\r\n }\r\n\r\n if (tcInput.listLabel) {\r\n childAttrs += `list-label=\"${tcInput.listLabel}\" `;\r\n }\r\n\r\n if (tcInput.listOptions) {\r\n childAttrs += `list-options=\"${tcInput.listOptions}\" `;\r\n }\r\n\r\n if (tcInput.listTrackBy) {\r\n childAttrs += `list-track-by=\"${tcInput.listTrackBy}\" `;\r\n }\r\n\r\n if (tcInput.listValue) {\r\n childAttrs += `list-value=\"${tcInput.listValue}\" `;\r\n }\r\n\r\n if (tcInput.mask) {\r\n childAttrs += `mask=\"${tcInput.mask}\" `;\r\n\r\n if (tcInput.mask === 'date') {\r\n inputAttrs += `ui-mask=\"99/99/9999\" ui-mask-placeholder ui-mask-placeholder-char=\"space\" ui-options=\"{ allowInvalidValue: true }\" `;\r\n } else if (tcInput.mask === 'phone') {\r\n inputAttrs += `ui-mask=\"(999) 999-9999\" ui-mask-placeholder ui-mask-placeholder-char=\"space\" ui-options=\"{ allowInvalidValue: true }\" `;\r\n } else if (tcInput.mask === 'zip') {\r\n inputAttrs += `ui-mask=\"99999\" ui-mask-placeholder ui-mask-placeholder-char=\"space\" ui-options=\"{ allowInvalidValue: true }\" `;\r\n } else if (tcInput.mask) {\r\n inputAttrs += `ui-mask=\"${tcInput.mask}\" ui-mask-placeholder ui-mask-placeholder-char=\"space\" ui-options=\"{ allowInvalidValue: true }\" `;\r\n }\r\n\r\n if (tcInput.maskInclude === 'true') {\r\n inputAttrs += `model-view-value=\"true\" `;\r\n }\r\n }\r\n\r\n if (tcInput.maxlength) {\r\n childAttrs += `maxlength=\"${tcInput.maxlength}\" `;\r\n inputAttrs += `ng-maxlength=\"${tcInput.maxlength}\" maxlength=\"${tcInput.maxlength}\" `;\r\n }\r\n\r\n if (tcInput.minlength) {\r\n childAttrs += `minlength=\"${tcInput.minlength}\" `;\r\n inputAttrs += `ng-minlength=\"${tcInput.minlength}\" `;\r\n }\r\n\r\n if (tcInput.pattern) {\r\n childAttrs += `pattern=\"${tcInput.pattern}\" `;\r\n\r\n if (tcInput.pattern === 'email') {\r\n inputAttrs += `ng-pattern=\"/^[a-z0-9!#\\$%&'*+\\\\/=?^_\\`{|}~.-]+@[a-z0-9-]+(\\\\.[a-z0-9-]+)+\\$/i\" `;\r\n } else {\r\n inputAttrs += `ng-pattern=\"${tcInput.pattern}\" `;\r\n }\r\n }\r\n\r\n if (tcInput.placeholder) {\r\n childAttrs += `placeholder=\"${tcInput.placeholder}\" `;\r\n inputAttrs += `placeholder=\"${tcInput.placeholder}\" `;\r\n }\r\n\r\n if (tcInput.readonly) {\r\n childAttrs += `readonly=\"${tcInput.readonly}\" `;\r\n inputAttrs += `readonly=\"readonly\" `;\r\n }\r\n\r\n if (tcInput.required) {\r\n\t\t\t\t\t\tif (dataService.session.mode !== 'edit' && dataService.session.mode !== 'mock') {\r\n childAttrs += `required=\"${tcInput.required}\" `;\r\n inputAttrs += `required=\"required\" `;\r\n }\r\n }\r\n\r\n if (tcInput.rows) {\r\n childAttrs += `rows=\"${tcInput.rows}\" `;\r\n inputAttrs += `rows=\"${tcInput.rows}\" `;\r\n }\r\n\r\n if (type.indexOf('checkbox') === 0 || type.indexOf('radio') === 0 || type === 'consent') {\r\n let inline = type.indexOf('-inline') > 0;\r\n let tag = inline ? 'span' : 'div';\r\n\r\n if (type.indexOf('-button') > 0) {\r\n inputAttrs += `class=\"tc-hide\" `;\r\n }\r\n\r\n if (tcInput.list) {\r\n const itemLabel = (transclusion !== '' ? transclusion : (tcInput.listLabel ? `{{item.${tcInput.listLabel}}}` : '{{item}}')).replace(/\"/g, '"');\r\n const itemValue = (tcInput.listValue ? `item.${tcInput.listValue}` : 'item');\r\n let innerHtml = '';\r\n let labelAttrs = '';\r\n\r\n if(type === 'consent') {\r\n inputHtml += ``;\r\n } else {\r\n if (type.indexOf('checkbox') >= 0) {\r\n innerHtml += ``;\r\n } else if (type.indexOf('radio') >= 0) {\r\n innerHtml += ``;\r\n }\r\n \r\n if (type === 'checkbox-button') {\r\n labelAttrs += `class=\"btn btn-block btn-default\" ng-class=\"{'checked': $input.value[${itemValue}] === ${itemValue}, 'focus': $input.focus[$index]}\" `;\r\n } else if (type === 'radio-button') {\r\n labelAttrs += `class=\"btn btn-block btn-default\" ng-class=\"{'checked': ${key} === ${itemValue}, 'focus': $input.focus[$index]}\" `;\r\n }\r\n \r\n\t\t\t\t\t\t\t\tif (tcInput.listTrackBy) {\r\n\t\t\t\t\t\t\t\t\tinputHtml =\r\n\t\t\t\t\t\t\t\t\t\t`<${tag} ${inline ? '' : 'class=\"row flat\"'}>\r\n\t\t\t\t\t\t\t\t\t\t\t<${tag} class=\"${inputClass}\" ng-repeat=\"item in $input.list track by item.${tcInput.listTrackBy}\" ng-if=\"${itemValue} != $input.valueNone\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t`;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tinputHtml =\r\n\t\t\t\t\t\t\t\t\t\t`<${tag} ${inline ? '' : 'class=\"row flat\"'}>\r\n\t\t\t\t\t\t\t\t\t\t\t<${tag} class=\"${inputClass}\" ng-repeat=\"item in $input.list\" ng-if=\"${itemValue} != $input.valueNone\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t`;\r\n\t\t\t\t\t\t\t\t}\r\n }\r\n } else {\r\n let innerHtml = '';\r\n let labelAttrs = '';\r\n\r\n if (type.indexOf('checkbox') >= 0 || type == 'consent') {\r\n innerHtml += ``;\r\n } else if (type.indexOf('radio') >= 0) {\r\n innerHtml += ``;\r\n }\r\n\r\n if (type.indexOf('-button') > 0) {\r\n labelAttrs += `class=\"btn btn-block btn-default\" ng-class=\"{'checked': ${key} === ${tcInput.listValue}, 'focus': $input.focus}\" `;\r\n }\r\n\r\n if(type === 'consent') {\r\n inputHtml = \r\n ``\r\n } else {\r\n inputHtml =\r\n `
\r\n
\r\n \r\n
\r\n
`;\r\n }\r\n }\r\n }\r\n else if (type === 'color-picker') {\r\n inputHtml =\r\n `\r\n \r\n \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t`;\r\n } else if (type.indexOf('date') === 0) {\r\n let options = '';\r\n\r\n if (tcInput.max || tcInput.min) {\r\n // const today = $filter('date')(new Date(), 'MM/dd/yyyy');\r\n options += `datepicker-options=\"{ `;\r\n\r\n if (tcInput.max) {\r\n options += `maxDate: '${tcInput.max}', `;\r\n }\r\n\r\n if (tcInput.min) {\r\n options += `minDate: '${tcInput.min}', `;\r\n }\r\n\r\n if(tcInput.dateOptions){\r\n const dateOptions = tcInput.dateOptions.replace(/[\\{\\}]+/g, '').split(','); \r\n for(let o of dateOptions){\r\n options += `${o.trim()}, `;\r\n }\r\n }\r\n\r\n // options += `initDate: '${today}' }\" `;\r\n options += ` }\" `;\r\n }\r\n\r\n if(tcInput.utc){\r\n options += `ng-model-options=\"{timezone: 'utc'}\" `;\r\n }\r\n\r\n inputAttrs += `is-open=\"$input.isOpen\" model-view-value=\"true\" show-button-bar=\"false\" uib-datepicker-popup=\"MM/dd/yyyy\" ui-mask=\"99/99/9999\" ui-mask-placeholder ui-mask-placeholder-char=\"_\" ${options} `;\r\n\r\n if (type.indexOf('-picker') === -1) {\r\n inputHtml =``;\r\n } else {\r\n inputHtml =\r\n `\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t`;\r\n }\r\n } else if (type.indexOf('monaco') === 0) {\r\n const language = _.last(type.split('-')).toLowerCase();\r\n const theme = type.indexOf('monaco-dark') === 0 ? 'vs-dark':'vs'\r\n inputHtml = `
`;\r\n } else if (type === 'select') {\r\n inputHtml =\r\n `\r\n\t\t\t\t\t\t\t\t${transclusion}\r\n\t\t\t\t\t\t\t`;\r\n } else if (type === 'textarea') {\r\n inputHtml = ``;\r\n } else if (type === 'triple-date') { \r\n childAttrs += tcInput.placeholder ? 'placeholder-month=\"Month\" placeholder-day=\"Day\" placeholder-year=\"Year\" ':'';\r\n inputHtml = ``;\r\n } else if (type === 'triple-phone') {\r\n inputHtml = ``;\r\n } else if (type === 'zip-lookup' || type === 'google-autocomplete') {\r\n inputHtml = ``;\r\n } else {\r\n inputHtml = ``; // ng-minlength=\"3\"\r\n }\r\n\r\n /////////////\r\n // MESSAGE //\r\n /////////////\r\n\r\n let messageAttrs = '';\r\n let messageHtml = '';\r\n let messageItems = '';\r\n\r\n if (tcInput.messageClass) {\r\n messageAttrs += `class=\"${tcInput.messageClass}\" `;\r\n }\r\n\r\n if (tcInput.maxlengthMessage) {\r\n messageItems +=\r\n `
  • \r\n\t\t\t\t\t\t\t\t${tcInput.maxlengthMessage}\r\n\t\t\t\t\t\t\t
  • `;\r\n }\r\n\r\n if (tcInput.minlengthMessage) {\r\n messageItems +=\r\n `
  • \r\n\t\t\t\t\t\t\t\t${tcInput.minlengthMessage}\r\n\t\t\t\t\t\t\t
  • `;\r\n }\r\n\r\n if (tcInput.patternMessage) {\r\n messageItems +=\r\n `
  • \r\n\t\t\t\t\t\t\t\t${tcInput.patternMessage}\r\n\t\t\t\t\t\t\t
  • `;\r\n }\r\n\r\n if (tcInput.requiredMessage) {\r\n messageItems +=\r\n `
  • \r\n\t\t\t\t\t\t\t\t${tcInput.requiredMessage}\r\n\t\t\t\t\t\t\t
  • `;\r\n }\r\n\r\n if (messageItems.length > 0) {\r\n messageHtml =\r\n `
    \r\n\t\t\t\t\t\t\t\t
      \r\n\t\t\t\t\t\t\t\t\t${messageItems}\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    `;\r\n }\r\n\r\n const controlClass = tcInput.controlClass ? tcInput.controlClass : '';\r\n let groupClass = (tcInput.type !== 'file' ? 'form-group' : '');\r\n\r\n groupClass += (tcInput.groupClass ? ' ' + tcInput.groupClass : '');\r\n\r\n const html =\r\n `
    \r\n ${type === 'consent' ? '': labelHtml}\r\n
    \r\n ${inputHtml}\r\n
    \r\n ${messageHtml}\r\n
    `; \r\n\r\n $element.html(html);\r\n $compile($element.contents() as any)($scope);\r\n },\r\n restrict: 'E',\r\n require: ['tcInput', '?^tcForm'],\r\n scope: true,\r\n transclude: true\r\n };\r\n }\r\n ]);\r\n}","/// \r\n\r\nnamespace Portico.Directives {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport ps = Portico.Services;\r\n\r\n\texport class ITcMonacoController {\r\n\t\ttcMonaco: string;\r\n\t\ttheme?: string;\r\n\r\n\t\t$element: angular.IAugmentedJQuery;\r\n\t\teditor: monaco.editor.IStandaloneCodeEditor;\r\n\t\tdiffEditor: monaco.editor.IStandaloneDiffEditor;\r\n\t\tngModel: angular.INgModelController;\r\n\r\n\t\tdiff: (source: string) => void;\r\n\t\tedit: () => void;\r\n\t}\r\n\r\n\t@Inject('$scope')\r\n\texport class TcMonacoController implements ITcMonacoController {\r\n\t\ttcMonaco: string;\r\n\t\ttheme?: string;\r\n\r\n\t\t$element: angular.IAugmentedJQuery;\r\n\t\teditor: monaco.editor.IStandaloneCodeEditor;\r\n\t\tdiffEditor: monaco.editor.IStandaloneDiffEditor;\r\n\t\tngModel: angular.INgModelController;\r\n\r\n\t\tconstructor(private $scope: angular.IScope) {\r\n\t\t}\r\n\r\n\t\tdiff(source: string): void {\r\n\t\t\tif (this.editor) {\r\n\t\t\t\tthis.editor.dispose();\r\n\t\t\t}\r\n\r\n\t\t\tif (this.diffEditor) {\r\n\t\t\t\tthis.diffEditor.dispose();\r\n\t\t\t}\r\n\r\n\t\t\tthis.$element[0].innerHTML = '';\r\n\r\n\t\t\tvar sourceModel = monaco.editor.createModel(source, this.tcMonaco);\r\n\t\t\tvar targetModel = monaco.editor.createModel(this.ngModel.$viewValue, this.tcMonaco);\r\n\r\n\t\t\tthis.diffEditor = monaco.editor.createDiffEditor(this.$element[0], {\r\n\t\t\t\tenableSplitViewResizing: true,\r\n\t\t\t\trenderSideBySide: true\r\n\t\t\t});\r\n\r\n\t\t\tthis.diffEditor.setModel({\r\n\t\t\t\toriginal: sourceModel,\r\n\t\t\t\tmodified: targetModel\r\n\t\t\t});\r\n\r\n\t\t\twindow.addEventListener('resize', () => {\r\n\t\t\t\tthis.diffEditor.layout();\r\n\t\t\t});\r\n\r\n\t\t\t//this.ngModel.$formatters.push((value) => {\r\n\t\t\t//\tif (angular.isUndefined(value) || value === null) {\r\n\t\t\t//\t\treturn '';\r\n\t\t\t//\t} else if (angular.isObject(value) || angular.isArray(value)) {\r\n\t\t\t//\t\tthrow new Error('the monaco editor cannot use an object or an array as a model');\r\n\t\t\t//\t}\r\n\r\n\t\t\t//\treturn value;\r\n\t\t\t//});\r\n\r\n\t\t\tthis.ngModel.$render = () => {\r\n\t\t\t\tthis.diffEditor.getModifiedEditor().setValue(this.ngModel.$viewValue || '');\r\n\t\t\t\tthis.diffEditor.layout();\r\n\t\t\t};\r\n\r\n\t\t\tthis.diffEditor.getModifiedEditor().onDidChangeModelContent((e) => {\r\n\t\t\t\tvar value = this.diffEditor.getModifiedEditor().getValue();\r\n\r\n\t\t\t\tif (value !== this.ngModel.$viewValue) {\r\n\t\t\t\t\tthis.$scope.$evalAsync(() => {\r\n\t\t\t\t\t\tthis.ngModel.$setViewValue(value);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tedit(): void {\r\n\t\t\tif (this.editor) {\r\n\t\t\t\tthis.editor.dispose();\r\n\t\t\t}\r\n\r\n\t\t\tif (this.diffEditor) {\r\n\t\t\t\tthis.diffEditor.dispose();\r\n\t\t\t}\r\n\r\n\t\t\tthis.$element[0].innerHTML = '';\r\n\r\n\t\t\tthis.editor = monaco.editor.create(this.$element[0], {\r\n\t\t\t\tlanguage: this.tcMonaco,\r\n\t\t\t\ttheme: this.theme,\r\n\t\t\t\tlineNumbers: \"on\",\r\n\t\t\t\tvalue: this.ngModel.$viewValue\r\n\t\t\t});\r\n\r\n\t\t\twindow.addEventListener('resize', () => {\r\n\t\t\t\tthis.editor.layout();\r\n\t\t\t});\r\n\r\n\t\t\tthis.ngModel.$formatters.push((value) => {\r\n\t\t\t\tif (angular.isUndefined(value) || value === null) {\r\n\t\t\t\t\treturn '';\r\n\t\t\t\t} else if (angular.isObject(value) || angular.isArray(value)) {\r\n\t\t\t\t\tthrow new Error('the monaco editor cannot use an object or an array as a model');\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn value;\r\n\t\t\t});\r\n\r\n\t\t\tthis.ngModel.$render = () => {\r\n\t\t\t\tthis.editor.setValue(this.ngModel.$viewValue || '');\r\n\t\t\t\tthis.editor.layout();\r\n\t\t\t};\r\n\r\n\t\t\tthis.editor.onDidChangeModelContent((e) => {\r\n\t\t\t\tvar value = this.editor.getValue();\r\n\r\n\t\t\t\tif (value !== this.ngModel.$viewValue) {\r\n\t\t\t\t\tthis.$scope.$evalAsync(() => {\r\n\t\t\t\t\t\tthis.ngModel.$setViewValue(value);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tangular.module('app').directive('tcMonaco', ['$timeout', ($timeout: angular.ITimeoutService) => {\r\n\t\treturn {\r\n\t\t\tbindToController: {\r\n\t\t\t\ttcMonaco: '@',\r\n\t\t\t\ttheme: '@'\r\n\t\t\t},\r\n\t\t\tcontroller: TcMonacoController,\r\n\t\t\tcontrollerAs: '$monaco',\r\n\t\t\tlink: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: any[]) => {\r\n\t\t\t\tconst tcMonaco: ITcMonacoController = $ctrl[0];\r\n\t\t\t\tconst ngModel: angular.INgModelController = $ctrl[1];\r\n\r\n\t\t\t\tconst theme = tcMonaco.theme && tcMonaco.theme === 'vs-dark' ? 'vs-dark' : 'vs';\r\n\r\n\t\t\t\ttcMonaco.$element = $element;\r\n\t\t\t\ttcMonaco.ngModel = ngModel;\r\n\r\n\t\t\t\t(window).require([\"vs/editor/editor.main\"], () => {\r\n\t\t\t\t\ttcMonaco.edit();\r\n\r\n\t\t\t\t\t$timeout(() => {\r\n\t\t\t\t\t\ttcMonaco.editor.layout();\r\n\t\t\t\t\t}, 500, true);\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\trestrict: 'A',\r\n\t\t\trequire: ['tcMonaco', '^ngModel'],\r\n\t\t\tscope: true\r\n\t\t};\r\n\t}]);\r\n}","namespace Portico.Directives {\r\n\timport ps = Portico.Services;\r\n\r\n\texport interface ITcSelectController {\r\n\t\tchange: () => void;\r\n\t\tdisabled: string;\r\n\t\tinputClass: string;\r\n\t\tisAllowed: () => boolean;\r\n\t\tkey: string;\r\n\t\tlist: string;\r\n\t\tlistLabel: string;\r\n\t\tlistOptions: string;\r\n\t\tlistTrackBy: string;\r\n\t\tlistValue: string;\r\n\t\tplaceholder: string;\r\n\t\treadonly: string;\r\n\t\trequired: string;\r\n\r\n\t\ttcForm: ITcFormController;\r\n\r\n\t\tisDisabled: () => boolean;\r\n\t\tonChange: () => void;\r\n\t}\r\n\r\n\texport class TcSelectController implements ITcSelectController {\r\n\t\tchange: () => void;\r\n\t\tdisabled: string;\r\n\t\tinputClass: string;\r\n\t\tisAllowed: () => boolean;\r\n\t\tkey: string;\r\n\t\tlist: string;\r\n\t\tlistLabel: string;\r\n\t\tlistOptions: string;\r\n\t\tlistTrackBy: string;\r\n\t\tlistValue: string;\r\n\t\tplaceholder: string;\r\n\t\treadonly: string;\r\n\t\trequired: string;\r\n\r\n\t\ttcForm: ITcFormController;\r\n\r\n isDisabled(): boolean {\r\n if (this.disabled === 'true' || (this.tcForm && this.tcForm.isDisabled())) {\r\n return true;\r\n }\r\n\r\n if (this.isAllowed && !this.isAllowed()) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n\t\tonChange(): void {\r\n\t\t\tif (this.change) {\r\n\t\t\t\tthis.change();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tangular.module('app')\r\n\t\t.directive('tcSelect', [\r\n\t\t\t'$compile',\r\n\t\t\t'$stateParams',\r\n\t\t\t'dataService', (\r\n\t\t\t\t$compile: angular.ICompileService,\r\n\t\t\t\t$stateParams: angular.ui.IStateParamsService,\r\n\t\t\t\tdataService: ps.IDataService) => {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tbindToController: {\r\n\t\t\t\t\t\tchange: '&?',\r\n\t\t\t\t\t\tdisabled: '@',\r\n\t\t\t\t\t\tinputClass: '@',\r\n\t\t\t\t\t\tisAllowed: '&?',\r\n\t\t\t\t\t\tkey: '@',\r\n\t\t\t\t\t\tlist: '=',\r\n\t\t\t\t\t\tlistLabel: '@',\r\n\t\t\t\t\t\tlistOptions: '@',\r\n\t\t\t\t\t\tlistTrackBy: '@',\r\n\t\t\t\t\t\tlistValue: '@',\r\n\t\t\t\t\t\tplaceholder: '@',\r\n\t\t\t\t\t\treadonly: '@',\r\n\t\t\t\t\t\trequired: '@'\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcontroller: TcSelectController,\r\n\t\t\t\t\tcontrollerAs: '$select',\r\n\t\t\t\t\tlink: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: any[], $transclude: any) => {\r\n\t\t\t\t\t\tconst tcSelect: ITcSelectController = $ctrl[0];\r\n\t\t\t\t\t\tconst tcForm: ITcFormController = $ctrl[1];\r\n\r\n\t\t\t\t\t\tif (tcForm) {\r\n\t\t\t\t\t\t\ttcSelect.tcForm = tcForm;\r\n\t\t\t\t\t\t\t//tcForm.tcSelects.push(tcSelect);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tconst key: string = tcSelect.key ? tcSelect.key : '';\r\n\t\t\t\t\t\tconst id: string = key.replace(/[\\.\\'\\$\\[\\]\\(\\)]+/g, '_');\r\n\r\n\t\t\t\t\t\tconst inputClass = tcSelect.inputClass ? ' ' + tcSelect.inputClass : '';\r\n\t\t\t\t\t\tlet inputAttrs = '';\r\n\t\t\t\t\t\tlet placeholderOption = '';\r\n\t\t\t\t\t\tlet transclusion = '';\r\n\r\n\t\t\t\t\t\t$transclude(function (clone, scope) {\r\n\t\t\t\t\t\t\tclone.each(function (index, node) {\r\n\t\t\t\t\t\t\t\ttransclusion += node.textContent ? node.textContent : node.outerHTML;\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\ttransclusion = transclusion.trim();\r\n\r\n\t\t\t\t\t\tif (tcSelect.disabled) {\r\n\t\t\t\t\t\t\tinputAttrs += `disabled=\"${tcSelect.disabled}\" `;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tcSelect.placeholder) {\r\n\t\t\t\t\t\t\tplaceholderOption += ``;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tcSelect.readonly) {\r\n\t\t\t\t\t\t\tinputAttrs += `readonly=\"${tcSelect.readonly}\" `;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tcSelect.required) {\r\n\t\t\t\t\t\t\tif (dataService.session.mode !== 'edit' && dataService.session.mode !== 'mock') {\r\n\t\t\t\t\t\t\t\tinputAttrs += `required=\"${tcSelect.required}\" `;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tconst itemLabel = (transclusion !== '' ? transclusion : (tcSelect.listLabel ? `{{item.${tcSelect.listLabel}}}` : '{{item}}')).replace(/\"/g, '"');\r\n\t\t\t\t\t\tconst itemValue = (tcSelect.listValue ? `item.${tcSelect.listValue}` : 'item');\r\n\r\n\t\t\t\t\t\tlet html;\r\n\t\t\t\t\t\tif (tcSelect.listOptions) {\r\n\t\t\t\t\t\t\thtml =\r\n\t\t\t\t\t\t\t\t``;\r\n\t\t\t\t\t\t} else if (tcSelect.listTrackBy) {\r\n\t\t\t\t\t\t\thtml =\r\n\t\t\t\t\t\t\t\t``;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\thtml =\r\n\t\t\t\t\t\t\t\t``;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$element.html(html);\r\n\t\t\t\t\t\t$compile($element.contents() as any)($scope);\r\n\t\t\t\t\t},\r\n\t\t\t\t\trestrict: 'E',\r\n\t\t\t\t\trequire: ['tcSelect', '?^tcForm'],\r\n\t\t\t\t\tscope: true,\r\n\t\t\t\t\ttransclude: true\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t]);\r\n}","namespace Portico.Directives {\r\n\timport ps = Portico.Services;\r\n\r\n export interface ITcTextareaController {\r\n\t\tchange: () => void;\r\n\t\tdisabled: string;\r\n\t\tinputClass: string;\r\n\t\tkey: string;\r\n\t\tmaxlength: string;\r\n\t\tminlength: string;\r\n\t\tpattern: string;\r\n\t\tplaceholder: string;\r\n\t\treadonly: string;\r\n\t\trequired: string;\r\n\t\trows: string;\r\n\r\n\t\ttcForm: ITcFormController;\r\n\r\n\t\tisDisabled: () => boolean;\r\n\t\tonChange: () => void;\r\n }\r\n\r\n export class TcTextareaController implements ITcTextareaController {\r\n\t\tchange: () => void;\r\n\t\tdisabled: string;\r\n\t\tinputClass: string;\r\n\t\tkey: string;\r\n\t\tmaxlength: string;\r\n\t\tminlength: string;\r\n\t\tpattern: string;\r\n\t\tplaceholder: string;\r\n\t\treadonly: string;\r\n\t\trequired: string;\r\n\t\trows: string;\r\n\r\n\t\ttcForm: ITcFormController;\r\n\r\n\t\tisDisabled(): boolean {\r\n\t\t\treturn this.disabled === 'true' || (this.tcForm && this.tcForm.isDisabled());\r\n\t\t}\r\n\r\n\t\tonChange(): void {\r\n\t\t\tif (this.change) {\r\n\t\t\t\tthis.change();\r\n\t\t\t}\r\n\t\t}\r\n }\r\n\r\n angular.module('app')\r\n .directive('tcTextarea', [\r\n\t\t\t'$compile',\r\n\t\t\t'$stateParams',\r\n\t\t\t'dataService', (\r\n\t\t\t\t$compile: angular.ICompileService,\r\n\t\t\t\t$stateParams: angular.ui.IStateParamsService,\r\n\t\t\t\tdataService: ps.IDataService) => {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tbindToController: {\r\n\t\t\t\t\t\tchange: '&?',\r\n\t\t\t\t\t\tdisabled: '@',\r\n\t\t\t\t\t\tinputClass: '@',\r\n\t\t\t\t\t\tkey: '@',\r\n\t\t\t\t\t\tmaxlength: '@',\r\n\t\t\t\t\t\tminlength: '@',\r\n\t\t\t\t\t\tpattern: '@',\r\n\t\t\t\t\t\tplaceholder: '@',\r\n\t\t\t\t\t\treadonly: '@',\r\n\t\t\t\t\t\trequired: '@',\r\n\t\t\t\t\t\trows: '@'\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcontroller: TcTextareaController,\r\n\t\t\t\t\tcontrollerAs: '$textarea',\r\n\t\t\t\t\tlink: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: any[]) => {\r\n\t\t\t\t\t\tconst tcTextarea: ITcTextareaController = $ctrl[0];\r\n\t\t\t\t\t\tconst tcForm: ITcFormController = $ctrl[1];\r\n\r\n\t\t\t\t\t\tif (tcForm) {\r\n\t\t\t\t\t\t\ttcTextarea.tcForm = tcForm;\r\n\t\t\t\t\t\t\t//tcForm.tcInputs.push(tcTextarea);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tconst key: string = tcTextarea.key ? tcTextarea.key : '';\r\n\t\t\t\t\t\tconst id: string = key.replace(/[\\.\\'\\$\\[\\]\\(\\)]+/g, '_');\r\n\r\n\t\t\t\t\t\tconst inputClass = tcTextarea.inputClass ? ' ' + tcTextarea.inputClass : '';\r\n\t\t\t\t\t\tlet inputAttrs = '';\r\n\r\n\t\t\t\t\t\tif (tcTextarea.disabled) {\r\n\t\t\t\t\t\t\tinputAttrs += `disabled=\"${tcTextarea.disabled}\" `;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tcTextarea.maxlength) {\r\n\t\t\t\t\t\t\tinputAttrs += `ng-maxlength=\"${tcTextarea.maxlength}\" maxlength=\"${tcTextarea.maxlength}\" `;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tcTextarea.minlength) {\r\n\t\t\t\t\t\t\tinputAttrs += `ng-minlength=\"${tcTextarea.minlength}\" `;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tcTextarea.pattern) {\r\n\t\t\t\t\t\t\tif (tcTextarea.pattern === 'email') {\r\n\t\t\t\t\t\t\t\tinputAttrs += `ng-pattern=\"/^[a-z0-9!#\\$%&'*+\\\\/=?^_\\`{|}~.-]+@[a-z0-9-]+(\\\\.[a-z0-9-]+)+\\$/i\" `;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tinputAttrs += `ng-pattern=\"${tcTextarea.pattern}\" `;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tcTextarea.placeholder) {\r\n\t\t\t\t\t\t\tinputAttrs += `placeholder=\"${tcTextarea.placeholder}\" `;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tcTextarea.readonly) {\r\n\t\t\t\t\t\t\tinputAttrs += `readonly=\"readonly\" `;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tcTextarea.required) {\r\n\t\t\t\t\t\t\tif (dataService.session.mode !== 'edit' && dataService.session.mode !== 'mock') {\r\n\t\t\t\t\t\t\t\tinputAttrs += `required=\"required\" `;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tcTextarea.rows) {\r\n\t\t\t\t\t\t\tinputAttrs += `rows=\"${tcTextarea.rows}\" `;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tconst html =\r\n\t\t\t\t\t\t\t``;\r\n\r\n\t\t\t\t\t\t$element.html(html);\r\n\t\t\t\t\t\t$compile($element.contents() as any)($scope);\r\n\t\t\t\t\t},\r\n\t\t\t\t\trestrict: 'E',\r\n\t\t\t\t\trequire: ['tcTextarea', '?^tcForm'],\r\n\t\t\t\t\tscope: true\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t]\r\n\t);\r\n}","namespace Portico.Directives {\r\n import Inject = Portico.Decorators.Inject;\r\n\timport ps = Portico.Services;\r\n\r\n export interface IMonth {\r\n id: string;\r\n label: string;\r\n }\r\n\r\n export interface ITcTripleDateController extends angular.IController {\r\n _year: string;\r\n _month: string;\r\n _day: string;\r\n\r\n\t\tchange: () => void;\r\n disabled: string;\r\n inputClass: string;\r\n key: string;\r\n pattern: string;\r\n placeholderMonth: string;\r\n placeholderDay: string;\r\n placeholderYear: string;\r\n readonly: string;\r\n required: string;\r\n\r\n tcForm: ITcFormController;\r\n\t\tid: string;\r\n\r\n years: string[];\r\n months: IMonth[];\r\n days: string[];\r\n\r\n\t\tisDisabled: () => boolean;\r\n\t\t//onChange: () => void;\r\n updateDays: () => void;\r\n }\r\n\r\n @Inject('$scope')\r\n export class TcTripleDateController implements ITcTripleDateController {\r\n _year: string;\r\n _month: string;\r\n _day: string;\r\n\r\n\t\tchange: () => void;\r\n disabled: string;\r\n inputClass: string;\r\n key: string;\r\n pattern: string;\r\n placeholderMonth: string;\r\n placeholderDay: string;\r\n placeholderYear: string;\r\n readonly: string;\r\n required: string;\r\n\r\n tcForm: ITcFormController;\r\n\t\tid: string;\r\n\r\n years: string[];\r\n months: IMonth[];\r\n days: string[];\r\n\r\n constructor(\r\n private $scope: angular.IScope\r\n ) {\r\n const date = new Date();\r\n const year = date.getFullYear();\r\n\r\n this.years = [];\r\n this.months = [];\r\n this.days = [];\r\n\r\n for (let i = 0; i < 100; i++) {\r\n this.years.push((year - i).toString());\r\n }\r\n\r\n this.months = [\r\n { id: '01', label: 'January' },\r\n { id: '02', label: 'February' },\r\n { id: '03', label: 'March' },\r\n { id: '04', label: 'April' },\r\n { id: '05', label: 'May' },\r\n { id: '06', label: 'June' },\r\n { id: '07', label: 'July' },\r\n { id: '08', label: 'August' },\r\n { id: '09', label: 'September' },\r\n { id: '10', label: 'October' },\r\n { id: '11', label: 'November' },\r\n { id: '12', label: 'December' }\r\n ];\r\n\r\n for (let i = 1; i <= 31; i++) {\r\n if (i < 10) {\r\n this.days.push('0' + i.toString());\r\n } else {\r\n this.days.push(i.toString());\r\n }\r\n }\r\n }\r\n\r\n get year() {\r\n return this._year;\r\n }\r\n\r\n set year(value: string) {\r\n this._year = value;\r\n\r\n if (this._year && this._month && this._day) {\r\n this.full = `${this._month}/${this._day}/${this._year}`;\r\n }\r\n }\r\n\r\n get month() {\r\n return this._month;\r\n }\r\n\r\n set month(value: string) {\r\n this._month = value;\r\n\r\n if (this._year && this._month && this._day) {\r\n this.full = `${this._month}/${this._day}/${this._year}`;\r\n }\r\n }\r\n\r\n get day() {\r\n return this._day;\r\n }\r\n\r\n set day(value: string) {\r\n this._day = value;\r\n\r\n if (this._year && this._month && this._day) {\r\n this.full = `${this._month}/${this._day}/${this._year}`;\r\n }\r\n }\r\n\r\n get full() {\r\n const date = this.$scope.$eval(`${this.key}`);\r\n\r\n if (date && date instanceof Date) {\r\n const year = date.getFullYear().toString();\r\n const month = date.getMonth() < 9 ? ('0' + (date.getMonth() + 1).toString()) : (date.getMonth() + 1).toString();\r\n const day = date.getDate() < 10 ? ('0' + date.getDate().toString()) : date.getDate().toString();\r\n\r\n return `${month}/${day}/${year}`;\r\n }\r\n\r\n return '';\r\n }\r\n\r\n set full(value: string) {\r\n let date: Date = null;\r\n\r\n if (value && value.length === 10) {\r\n const month = parseInt(value.substr(0, 2));\r\n const day = parseInt(value.substr(3, 2));\r\n const year = parseInt(value.substr(6, 4));\r\n\r\n date = new Date(year, month - 1, day);\r\n }\r\n\r\n this.$scope.$eval(`${this.key}=d`, { d: date });\r\n\r\n\t\t\tif (this.tcForm.ngForm[`${this.id}_month`].$dirty || this.tcForm.ngForm[`${this.id}_day`].$dirty || this.tcForm.ngForm[`${this.id}_year`].$dirty) {\r\n\t\t\t\tthis.tcForm.ngForm[`${this.id}`].$setDirty();\r\n\r\n\t\t\t\tif (this.change) {\r\n\t\t\t\t\tthis.change();\r\n\t\t\t\t}\r\n\t\t\t}\r\n }\r\n\r\n\t\tisDisabled(): boolean {\r\n\t\t\treturn this.disabled === 'true' || (this.tcForm && this.tcForm.isDisabled());\r\n\t\t}\r\n\r\n\t\t//onChange(): void {\r\n\t\t//\tif (this.change) {\r\n\t\t//\t\tthis.change();\r\n\t\t//\t}\r\n\t\t//}\r\n\r\n updateDays(): void {\r\n let year: number = parseInt(this.year);\r\n let month: number = parseInt(this.month);\r\n\r\n if (isNaN(year)) {\r\n year = 2000;\r\n }\r\n\r\n if (isNaN(month)) {\r\n month = 1;\r\n }\r\n\r\n const date = new Date(year, month, 0);\r\n const days: string[] = [];\r\n\r\n for (let i = 1; i <= date.getDate(); i++) {\r\n if (i < 10) {\r\n days.push('0' + i.toString());\r\n } else {\r\n days.push(i.toString());\r\n }\r\n }\r\n\r\n this.days = days;\r\n }\r\n }\r\n\r\n angular.module('app')\r\n .directive('tcTripleDate', [\r\n\t\t\t'$compile',\r\n\t\t\t'$stateParams',\r\n\t\t\t'dataService', (\r\n\t\t\t\t$compile: angular.ICompileService,\r\n\t\t\t\t$stateParams: angular.ui.IStateParamsService,\r\n\t\t\t\tdataService: ps.IDataService) => {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tbindToController: {\r\n\t\t\t\t\t\tchange: '&?',\r\n\t\t\t\t\t\tdisabled: '@',\r\n\t\t\t\t\t\tinputClass: '@',\r\n\t\t\t\t\t\tkey: '@',\r\n pattern: '@',\r\n placeholderMonth: '@',\r\n placeholderDay: '@',\r\n placeholderYear: '@',\r\n\t\t\t\t\t\treadonly: '@',\r\n\t\t\t\t\t\trequired: '@'\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcontroller: TcTripleDateController,\r\n\t\t\t\t\tcontrollerAs: '$date',\r\n\t\t\t\t\tlink: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: angular.IController) => {\r\n\t\t\t\t\t\tconst tcTripleDate = $ctrl[0] as ITcTripleDateController;\r\n\t\t\t\t\t\tconst tcForm = $ctrl[1] as ITcFormController;\r\n\r\n\t\t\t\t\t\tif (tcForm) {\r\n\t\t\t\t\t\t\ttcTripleDate.tcForm = tcForm;\r\n\t\t\t\t\t\t\t//tcForm.tcInputs.push(tcTripleDate);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tconst key: string = tcTripleDate.key ? tcTripleDate.key : null;\r\n\r\n\t\t\t\t\t\ttcTripleDate.id = key.replace(/[\\.\\'\\$\\[\\]\\(\\)]+/g, '_');\r\n\r\n\t\t\t\t\t\tconst inputClass = tcTripleDate.inputClass ? ' ' + tcTripleDate.inputClass : '';\r\n\t\t\t\t\t\tconst pattern = tcTripleDate.pattern ? tcTripleDate.pattern : '/^\\\\d{2}/\\\\d{2}/\\\\d{4}$/';\r\n\t\t\t\t\t\tlet inputAttrs = ['', '', '', ''];\r\n\r\n\t\t\t\t\t\tconst date: Date = $scope.$eval(`${key}`);\r\n\r\n\t\t\t\t\t\tif (date && date instanceof Date) {\r\n\t\t\t\t\t\t\ttcTripleDate._year = date.getFullYear().toString();\r\n\t\t\t\t\t\t\ttcTripleDate._month = date.getMonth() < 9 ? ('0' + (date.getMonth() + 1).toString()) : (date.getMonth() + 1).toString();\r\n\t\t\t\t\t\t\ttcTripleDate._day = date.getDate() < 10 ? ('0' + date.getDate().toString()) : date.getDate().toString();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tcTripleDate.disabled) {\r\n\t\t\t\t\t\t\tinputAttrs[1] += `disabled=\"${tcTripleDate.disabled}\" `;\r\n\t\t\t\t\t\t\tinputAttrs[2] += `disabled=\"${tcTripleDate.disabled}\" `;\r\n\t\t\t\t\t\t\tinputAttrs[3] += `disabled=\"${tcTripleDate.disabled}\" `;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tcTripleDate.required) {\r\n\t\t\t\t\t\t\tif (dataService.session.mode !== 'edit' && dataService.session.mode !== 'mock') {\r\n\t\t\t\t\t\t\t\tinputAttrs[0] += `required=\"${tcTripleDate.required}\"`;\r\n\t\t\t\t\t\t\t\tinputAttrs[1] += `required=\"${tcTripleDate.required}\"`;\r\n\t\t\t\t\t\t\t\tinputAttrs[2] += `required=\"${tcTripleDate.required}\"`;\r\n\t\t\t\t\t\t\t\tinputAttrs[3] += `required=\"${tcTripleDate.required}\"`;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tcTripleDate.readonly) {\r\n\t\t\t\t\t\t\tinputAttrs[1] += `readonly=\"${tcTripleDate.readonly}\" `;\r\n\t\t\t\t\t\t\tinputAttrs[2] += `readonly=\"${tcTripleDate.readonly}\" `;\r\n\t\t\t\t\t\t\tinputAttrs[3] += `readonly=\"${tcTripleDate.readonly}\" `;\r\n\t\t\t\t\t\t} \r\n\r\n\t\t\t\t\t\tconst html =\r\n\t\t\t\t\t\t\t`\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    `;\r\n\r\n\t\t\t\t\t\t$element.html(html);\r\n\t\t\t\t\t\t$compile($element.contents() as any)($scope);\r\n\r\n\t\t\t\t\t\ttcTripleDate.pattern = pattern;\r\n\t\t\t\t\t},\r\n\t\t\t\t\trestrict: 'E',\r\n\t\t\t\t\trequire: ['tcTripleDate', '?^tcForm'],\r\n\t\t\t\t\tscope: true\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t]\r\n\t);\r\n}","namespace Portico.Directives {\r\n import Inject = Portico.Decorators.Inject;\r\n\timport ps = Portico.Services;\r\n\r\n export interface ITcTriplePhoneController extends angular.IController {\r\n _area: string;\r\n _prefix: string;\r\n _line: string;\r\n\r\n\t\tchange: () => void;\r\n disabled: string;\r\n inputClass: string;\r\n key: string;\r\n mask: string;\r\n pattern: string;\r\n placeholder: string;\r\n readonly: string;\r\n required: string;\r\n\r\n tcForm: ITcFormController;\r\n\t\tid: string;\r\n\r\n\t\tisDisabled: () => boolean;\r\n\t\t//onChange: () => void;\r\n }\r\n\r\n @Inject('$scope')\r\n export class TcTriplePhoneController implements ITcTriplePhoneController {\r\n _area: string;\r\n _prefix: string;\r\n _line: string;\r\n\r\n\t\tchange: () => void;\r\n disabled: string;\r\n inputClass: string;\r\n key: string;\r\n mask: string;\r\n pattern: string;\r\n placeholder: string;\r\n readonly: string;\r\n required: string;\r\n\r\n tcForm: ITcFormController;\r\n\t\tid: string;\r\n\r\n constructor(\r\n private $scope: angular.IScope\r\n ) {\r\n }\r\n\r\n get area() {\r\n return this._area;\r\n }\r\n\r\n set area(value: string) {\r\n this._area = value;\r\n this.full = (this._area ? this._area : '') + (this._prefix ? this._prefix : '') + (this._line ? this._line : '');\r\n\r\n if (this._area.length === 3) {\r\n $('#' + this.id + '-input-prefix').focus().select();\r\n }\r\n }\r\n\r\n get prefix() {\r\n return this._prefix;\r\n }\r\n\r\n set prefix(value: string) {\r\n this._prefix = value;\r\n this.full = (this._area ? this._area : '') + (this._prefix ? this._prefix : '') + (this._line ? this._line : '');\r\n\r\n if (this._prefix.length === 3) {\r\n $('#' + this.id + '-input-line').focus().select();\r\n }\r\n }\r\n\r\n get line() {\r\n return this._line;\r\n }\r\n\r\n set line(value: string) {\r\n this._line = value;\r\n this.full = (this._area ? this._area : '') + (this._prefix ? this._prefix : '') + (this._line ? this._line : '');\r\n }\r\n\r\n get full() {\r\n return this.$scope.$eval(`${this.key}`);\r\n }\r\n\r\n set full(value: string) {\r\n this.$scope.$eval(`${this.key}='${value}'`);\r\n\r\n\t\t\tif (this.tcForm.ngForm[`${this.id}_area`].$dirty || this.tcForm.ngForm[`${this.id}_prefix`].$dirty || this.tcForm.ngForm[`${this.id}_line`].$dirty) {\r\n\t\t\t\tthis.tcForm.ngForm[`${this.id}`].$setDirty();\r\n\r\n\t\t\t\tif (this.change) {\r\n\t\t\t\t\tthis.change();\r\n\t\t\t\t}\r\n\t\t\t}\r\n }\r\n\r\n\t\tisDisabled(): boolean {\r\n\t\t\treturn this.disabled === 'true' || (this.tcForm && this.tcForm.isDisabled());\r\n\t\t}\r\n\r\n\t\t//onChange(): void {\r\n\t\t//\tif (this.change) {\r\n\t\t//\t\tthis.change();\r\n\t\t//\t}\r\n\t\t//}\r\n }\r\n\r\n angular.module('app')\r\n .directive('tcTriplePhone', [\r\n\t\t\t'$compile',\r\n\t\t\t'$stateParams',\r\n\t\t\t'dataService', (\r\n\t\t\t\t$compile: angular.ICompileService,\r\n\t\t\t\t$stateParams: angular.ui.IStateParamsService,\r\n\t\t\t\tdataService: ps.IDataService) => {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tbindToController: {\r\n\t\t\t\t\t\tchange: '&?',\r\n\t\t\t\t\t\tdisabled: '@',\r\n\t\t\t\t\t\tinputClass: '@',\r\n\t\t\t\t\t\tkey: '@',\r\n\t\t\t\t\t\tmask: '@',\r\n\t\t\t\t\t\tpattern: '@',\r\n\t\t\t\t\t\tplaceholder: '@',\r\n\t\t\t\t\t\treadonly: '@',\r\n\t\t\t\t\t\trequired: '@'\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcontroller: TcTriplePhoneController,\r\n\t\t\t\t\tcontrollerAs: '$phone',\r\n\t\t\t\t\tlink: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: any[]) => {\r\n\t\t\t\t\t\tconst tcTriplePhone: ITcTriplePhoneController = $ctrl[0];\r\n\t\t\t\t\t\tconst tcForm: ITcFormController = $ctrl[1];\r\n\r\n\t\t\t\t\t\tif (tcForm) {\r\n\t\t\t\t\t\t\ttcTriplePhone.tcForm = tcForm;\r\n\t\t\t\t\t\t\t//$ctrl[1].tcInputs.push(tcTriplePhone);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tconst key: string = tcTriplePhone.key ? tcTriplePhone.key : null;\r\n\r\n\t\t\t\t\t\ttcTriplePhone.id = key.replace(/[\\.\\'\\$\\[\\]\\(\\)]+/g, '_');\r\n\r\n\t\t\t\t\t\tconst inputClass = tcTriplePhone.inputClass ? ' ' + tcTriplePhone.inputClass : '';\r\n\t\t\t\t\t\tconst pattern = tcTriplePhone.pattern ? tcTriplePhone.pattern : '/^\\\\d{10}$/';\r\n\t\t\t\t\t\tlet inputAttrs = ['', '', '', ''];\r\n\r\n\t\t\t\t\t\tconst full: string = $scope.$eval(`${key}`);\r\n\r\n\t\t\t\t\t\tif (full && full.length === 10) {\r\n\t\t\t\t\t\t\ttcTriplePhone._area = full.substr(0, 3);\r\n\t\t\t\t\t\t\ttcTriplePhone._prefix = full.substr(3, 3);\r\n\t\t\t\t\t\t\ttcTriplePhone._line = full.substr(6, 4);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tcTriplePhone.disabled) {\r\n\t\t\t\t\t\t\tinputAttrs[1] += `disabled=\"${tcTriplePhone.disabled}\" `;\r\n\t\t\t\t\t\t\tinputAttrs[2] += `disabled=\"${tcTriplePhone.disabled}\" `;\r\n\t\t\t\t\t\t\tinputAttrs[3] += `disabled=\"${tcTriplePhone.disabled}\" `;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tcTriplePhone.mask) {\r\n\t\t\t\t\t\t\tinputAttrs[1] += `ui-mask=\"999\" ui-mask-placeholder ui-mask-placeholder-char=\"_\" ui-options=\"{ clearOnBlur: false }\"`;\r\n\t\t\t\t\t\t\tinputAttrs[2] += `ui-mask=\"999\" ui-mask-placeholder ui-mask-placeholder-char=\"_\" ui-options=\"{ clearOnBlur: false }\"`;\r\n\t\t\t\t\t\t\tinputAttrs[3] += `ui-mask=\"9999\" ui-mask-placeholder ui-mask-placeholder-char=\"_\" ui-options=\"{ clearOnBlur: false }\"`;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tcTriplePhone.placeholder) {\r\n\t\t\t\t\t\t\tinputAttrs[1] += `placeholder=\"888\"`;\r\n\t\t\t\t\t\t\tinputAttrs[2] += `placeholder=\"888\"`;\r\n\t\t\t\t\t\t\tinputAttrs[3] += `placeholder=\"8888\"`;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tcTriplePhone.required) {\r\n\t\t\t\t\t\t\tif (dataService.session.mode !== 'edit' && dataService.session.mode !== 'mock') {\r\n\t\t\t\t\t\t\t\tinputAttrs[0] += `required=\"${tcTriplePhone.required}\"`;\r\n\t\t\t\t\t\t\t\tinputAttrs[1] += `required=\"${tcTriplePhone.required}\"`;\r\n\t\t\t\t\t\t\t\tinputAttrs[2] += `required=\"${tcTriplePhone.required}\"`;\r\n\t\t\t\t\t\t\t\tinputAttrs[3] += `required=\"${tcTriplePhone.required}\"`;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tcTriplePhone.readonly) {\r\n\t\t\t\t\t\t\tinputAttrs[1] += `readonly=\"${tcTriplePhone.readonly}\" `;\r\n\t\t\t\t\t\t\tinputAttrs[2] += `readonly=\"${tcTriplePhone.readonly}\" `;\r\n\t\t\t\t\t\t\tinputAttrs[3] += `readonly=\"${tcTriplePhone.readonly}\" `;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tconst html =\r\n\t\t\t\t\t\t\t`\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t
    `;\r\n\r\n\t\t\t\t\t\t$element.html(html);\r\n\t\t\t\t\t\t$compile($element.contents() as any)($scope);\r\n\r\n\t\t\t\t\t\ttcTriplePhone.pattern = pattern;\r\n\t\t\t\t\t},\r\n\t\t\t\t\trestrict: 'E',\r\n\t\t\t\t\trequire: ['tcTriplePhone', '?^tcForm'],\r\n\t\t\t\t\tscope: true\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t]\r\n\t);\r\n}","namespace Portico.Directives {\r\n\r\n import services = Portico.Services;\r\n\r\n export interface ITcFocusController {\r\n tcForm: ITcFormController;\r\n tcInput: ITcInputController;\r\n }\r\n\r\n export class TcFocusController implements ITcFocusController {\r\n tcForm: ITcFormController;\r\n tcInput: ITcInputController;\r\n }\r\n\r\n angular.module('app').directive('tcFocus', ['$timeout', ($timeout: angular.ITimeoutService) => {\r\n return {\r\n bindToController: { },\r\n controller: TcFocusController,\r\n controllerAs: '$focus',\r\n link: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: any[]) => {\r\n const tcFocus: ITcFocusController = $ctrl[0];\r\n const tcForm: ITcFormController = $ctrl[1];\r\n const tcInput: ITcInputController = $ctrl[2];\r\n\r\n tcFocus.tcForm = tcForm;\r\n tcFocus.tcInput = tcInput;\r\n\r\n $timeout(() => {\r\n //let tcInput = tcFocus.tcInput;\r\n\r\n //if (!tcInput) {\r\n // tcInput = tcFocus.tcForm.tcInputs[0];\r\n //}\r\n\r\n //$('#' + tcInput.id + '-input').focus();\r\n $element.find(\"a, button, input, select, textarea\").first().focus();\r\n }, 50);\r\n },\r\n restrict: 'A',\r\n require: ['tcFocus', '?^tcForm', '?^tcInput'],\r\n scope: true,\r\n };\r\n }]);\r\n}","namespace Portico.Directives {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport services = Portico.Services;\r\n\r\n\texport interface ITcFormController {\r\n\t\tdisabled: boolean;\r\n\t\tfocus: string;\r\n\t\tisAllowed: () => boolean;\r\n\t\tname: string;\r\n ngForm: angular.IFormController;\r\n tcInputs: ITcInputController[];\r\n\r\n\t\tisDisabled(): boolean;\r\n\t\tunSubmit(): void;\r\n }\r\n\r\n\t@Inject('$timeout')\r\n export class TcFormController implements ITcFormController {\r\n\t\tdisabled: boolean;\r\n\t\tfocus: string;\r\n\t\tisAllowed: () => boolean;\r\n\t\tname: string;\r\n ngForm: angular.IFormController;\r\n tcInputs: ITcInputController[] = [];\r\n\r\n\t\tconstructor(private $timeout: angular.ITimeoutService) {\r\n\t\t}\r\n\r\n\t\tisDisabled(): boolean {\r\n\t\t\tif (this.disabled) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tif (this.isAllowed && !this.isAllowed()) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tunSubmit(): void {\r\n\t\t\tthis.$timeout(() => {\r\n\t\t\t\tthis.ngForm.$setUntouched();\r\n\t\t\t\tthis.ngForm.$setPristine();\r\n\t\t\t});\r\n\t\t}\r\n }\r\n\r\n\tangular.module('app').directive('tcForm', ['$timeout', ($timeout: angular.ITimeoutService) => {\r\n\t\treturn {\r\n\t\t\tbindToController: {\r\n\t\t\t\tdisabled: '@',\r\n\t\t\t\tfocus: '@',\r\n\t\t\t\tisAllowed: '&?',\r\n\t\t\t\tname: '@'\r\n\t\t\t},\r\n\t\t\tcontroller: TcFormController,\r\n\t\t\tcontrollerAs: '$form',\r\n\t\t\tlink: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: any[]) => {\r\n\t\t\t\tconst tcForm: ITcFormController = $ctrl[0];\r\n\t\t\t\tconst focus = !tcForm.focus || tcForm.focus === 'true' ? true : false;\r\n\r\n\t\t\t\tif (!tcForm.name) {\r\n\t\t\t\t\ttcForm.name = '$form.ngForm';\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (focus) {\r\n\t\t\t\t\t$timeout(() => {\r\n\t\t\t\t\t\t$element.find(\"button, input\").first().focus();\r\n\t\t\t\t\t}, 50);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\trestrict: 'E',\r\n\t\t\trequire: ['tcForm'],\r\n\t\t\tscope: true,\r\n\t\t\ttemplate:\r\n\t\t\t\t`
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    `,\r\n\t\t\ttransclude: true\r\n\t\t};\r\n }]);\r\n}","namespace Portico.Directives {\r\n\r\n export interface ITcFormMessageController {\r\n tcForm: ITcFormController;\r\n }\r\n\r\n export class TcFormMessageController implements ITcFormMessageController {\r\n tcForm: ITcFormController;\r\n }\r\n\r\n angular.module('app').directive('tcFormMessage', [() => {\r\n\t\treturn {\r\n\t\t\tbindToController: {},\r\n\t\t\tcontroller: TcFormMessageController,\r\n\t\t\tcontrollerAs: '$message',\r\n\t\t\tlink: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: any[]) => {\r\n\t\t\t\tconst tcFormMessage: ITcFormMessageController = $ctrl[0];\r\n\t\t\t\tconst tcForm: ITcFormController = $ctrl[1];\r\n\r\n\t\t\t\ttcFormMessage.tcForm = tcForm;\r\n\t\t\t},\r\n\t\t\trestrict: 'E',\r\n\t\t\trequire: ['tcFormMessage', '?^tcForm'],\r\n\t\t\tscope: true,\r\n\t\t\ttemplate:\r\n\t\t\t\t`
      \r\n\t\t\t\t\t
    • \r\n\t\t\t\t\t\t{{tcInput.maxlengthMessage}}\r\n\t\t\t\t\t
    • \r\n\t\t\t\t\t
    • \r\n\t\t\t\t\t\t{{tcInput.minlengthMessage}}\r\n\t\t\t\t\t
    • \r\n\t\t\t\t\t
    • \r\n\t\t\t\t\t\t{{tcInput.patternMessage}}\r\n\t\t\t\t\t
    • \r\n\t\t\t\t\t
    • \r\n\t\t\t\t\t\t{{tcInput.requiredMessage}}\r\n\t\t\t\t\t
    • \r\n\t\t\t\t
    `\r\n\t\t};\r\n }]);\r\n}","namespace Portico.Directives {\r\n\r\n\timport pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pms = Portico.Models.Setup;\r\n\timport ps = Portico.Services;\r\n\r\n\texport interface ITcDownloadController {\r\n\t\tclazz: string;\r\n\t\tfile: string;\r\n\t\tlabel: string;\r\n\t\tmethod: string;\r\n\t\ttype: string;\r\n }\r\n\r\n export class TcDownloadController implements ITcDownloadController {\r\n clazz: string;\r\n\t\tfile: string;\r\n label: string;\r\n\t\tmethod: string;\r\n\t\ttype: string;\r\n }\r\n\r\n angular.module('app').directive('tcDownload', [\r\n '$compile',\r\n '$state',\r\n\t\t'dataService',\r\n 'serverConstants',\r\n\t\t(\r\n $compile: angular.ICompileService,\r\n $state: angular.ui.IStateService,\r\n\t\t\tdataService: ps.IDataService,\r\n serverConstants: pmi.IServerConstants\r\n\t\t) => {\r\n\t\t\treturn {\r\n\t\t\t\tbindToController: {\r\n\t\t\t\t\tclazz: '@',\r\n\t\t\t\t\tfile: '@',\r\n\t\t\t\t\tlabel: '@',\r\n\t\t\t\t\tmethod: '@',\r\n\t\t\t\t\ttype: '@',\r\n\t\t\t\t},\r\n\t\t\t\tcontroller: TcDownloadController,\r\n\t\t\t\tcontrollerAs: '$download',\r\n\t\t\t\tlink: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: any[], $transclude: angular.ITranscludeFunction) => {\r\n\t\t\t\t\tconst tcDownload: ITcDownloadController = $ctrl[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\tconst clazz = tcDownload.clazz ? tcDownload.clazz : '';\r\n\t\t\t\t\tconst file = tcDownload.file ? tcDownload.file : '';\r\n\t\t\t\t\tconst label = tcDownload.label ? tcDownload.label : '';\r\n\t\t\t\t\tconst method = tcDownload.method ? tcDownload.method : 'post';\r\n\t\t\t\t\tconst programId = dataService.getProgramId();\r\n\t\t\t\t\tconst type = tcDownload.type ? tcDownload.type : '';\r\n\t\t\t\t\tlet transclusion = '';\t\t\t\t\t\r\n\t\t\t\t\tlet html = '';\r\n\r\n\t\t\t\t\t$transclude(function (clone) {\r\n clone.each(function (index, node) {\r\n transclusion += node.textContent ? node.textContent : node.outerHTML;\r\n });\r\n });\r\n\r\n\t\t\t\t\ttransclusion = transclusion.trim() || label;\r\n\r\n\t\t\t\t\tif (type === 'document') {\r\n\t\t\t\t\t\tif (method === 'get') {\r\n\t\t\t\t\t\t\thtml =\r\n\t\t\t\t\t\t\t\t`${transclusion}`;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\thtml =\r\n\t\t\t\t\t\t\t\t`
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t${transclusion}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    `;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (method === 'get') {\r\n\t\t\t\t\t\t\thtml =\r\n\t\t\t\t\t\t\t\t`${transclusion}`;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\thtml =\r\n\t\t\t\t\t\t\t\t`
    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t${transclusion}\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t
    `;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$compile($element.contents() as any)($scope);\r\n\t\t\t\t\t$element.html(html);\t\t\t\t\t\r\n\t\t\t\t},\r\n\t\t\t\treplace: true,\r\n\t\t\t\trequire: ['tcDownload'],\t\t\t\t\r\n\t\t\t\trestrict: 'E',\r\n\t\t\t\tscope: true,\r\n\t\t\t\ttransclude: true\r\n\t\t\t};\r\n\t\t}\r\n\t]);\r\n}","namespace Portico.Directives {\r\n import pm = Portico.Models;\r\n import pme = Portico.Models.Enterprise;\r\n import pmi = Portico.Models.Interfaces;\r\n import pms = Portico.Models.Setup;\r\n import ps = Portico.Services;\r\n\r\n export interface ITcPdfCardController {\r\n clazz: string;\r\n key: string;\r\n label: string;\r\n method: string;\r\n value: string;\r\n }\r\n\r\n export class TcPdfCardController implements ITcPdfCardController {\r\n clazz: string;\r\n key: string;\r\n label: string;\r\n method: string;\r\n value: string;\r\n }\r\n\r\n angular.module('app').directive('tcPdfCard', [\r\n '$compile',\r\n '$state',\r\n 'dataService',\r\n 'serverConstants',\r\n (\r\n $compile: angular.ICompileService,\r\n $state: angular.ui.IStateService,\r\n dataService: ps.IDataService,\r\n serverConstants: pmi.IServerConstants\r\n ) => {\r\n return {\r\n bindToController: {\r\n clazz: '@',\r\n key: '@',\r\n label: '@',\r\n method: '@',\r\n value: '=', // change to an object (mapped values)\r\n },\r\n controller: TcPdfCardController,\r\n controllerAs: '$pdf',\r\n link: (\r\n $scope: angular.IScope,\r\n $element: angular.IAugmentedJQuery,\r\n $attr: angular.IAttributes,\r\n $ctrl: any[],\r\n $transclude: angular.ITranscludeFunction\r\n ) => {\r\n const tcPdfCard: ITcPdfCardController = $ctrl[0];\r\n\r\n const clazz = tcPdfCard.clazz ? tcPdfCard.clazz : '';\r\n const key = tcPdfCard.key ? tcPdfCard.key : '';\r\n const label = tcPdfCard.label ? tcPdfCard.label : '';\r\n const method = tcPdfCard.method ? tcPdfCard.method : 'post';\r\n const value = tcPdfCard.value ? tcPdfCard.value : '';\r\n\r\n const template = dataService.getDataValue('PDF', 'Template', key);\r\n const filename = dataService.getDataValue('PDF', 'Filename', key);\r\n const contents = dataService.getDataValue('PDF', 'Contents', key);\r\n const pdfContents: any[] = angular.fromJson(contents);\r\n\r\n let html = '';\r\n let transclusion = '';\r\n\r\n $transclude(function(clone) {\r\n clone.each(function(index, node) {\r\n transclusion += node.textContent ? node.textContent : node.outerHTML;\r\n });\r\n });\r\n\r\n transclusion = transclusion.trim() || label;\r\n\r\n if (method === 'get') {\r\n let queryString = `${\r\n serverConstants.pdfPath\r\n }/card?pdfRequest.filename=${filename}&pdfRequest.template=${template}`;\r\n\r\n pdfContents.forEach((c: any, index: number) => {\r\n queryString += `&pdfRequest.pdfContents[${index}].page=${c.page}`;\r\n queryString += `&pdfRequest.pdfContents[${index}].content=${\r\n value[c.content]\r\n }`;\r\n queryString += `&pdfRequest.pdfContents[${index}].font=${c.font}`;\r\n queryString += `&pdfRequest.pdfContents[${index}].size=${c.size}`;\r\n queryString += `&pdfRequest.pdfContents[${index}].style=${c.style}`;\r\n queryString += `&pdfRequest.pdfContents[${index}].color=${c.color}`;\r\n queryString += `&pdfRequest.pdfContents[${index}].point.x=${c.point.x}`;\r\n queryString += `&pdfRequest.pdfContents[${index}].point.y=${c.point.y}`;\r\n });\r\n\r\n html = `\r\n\t\t\t\t\t\t\t\t${transclusion}\r\n\t\t\t\t\t\t\t`;\r\n } else {\r\n let htmlContents = '';\r\n\r\n pdfContents.forEach((c: any, index: number) => {\r\n htmlContents += `\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t`;\r\n });\r\n\r\n html = `
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t${htmlContents}\r\n\t\t\t\t\t\t\t\t${transclusion}\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    `;\r\n }\r\n\r\n $element.html(html);\r\n $compile($element.contents() as any)($scope);\r\n },\r\n replace: true,\r\n require: ['tcPdfCard'],\r\n restrict: 'E',\r\n scope: true,\r\n transclude: true,\r\n };\r\n },\r\n ]);\r\n}\r\n","namespace Portico.Directives {\r\n\r\n\timport pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pmi = Portico.Models.Interfaces;\r\n\timport pms = Portico.Models.Setup;\r\n\timport ps = Portico.Services;\r\n\r\n\texport interface ITcPdfHtmlController {\r\n\t\tclazz: string;\r\n\t\tlabel: string;\r\n\t\ttemplate: string;\r\n\t\tstyles: string;\r\n\t\tfilename: string;\r\n\t\tsubmit(): any;\r\n\t}\r\n\r\n\texport class TcPdfHtmlController implements ITcPdfHtmlController {\r\n\t\tclazz: string;\r\n\t\tlabel: string;\r\n\t\ttemplate: string;\r\n\t\tstyles: string;\r\n\t\tfilename: string;\r\n\r\n\t\tconstructor(\r\n\t\t\tprivate $compile: angular.ICompileService,\r\n\t\t\tprivate $http: angular.IHttpService,\r\n\t\t\tprivate $scope: angular.IScope,\r\n\t\t\tprivate $timeout: angular.ITimeoutService,\r\n\t\t\tprivate dataService: ps.IDataService,\r\n\t\t\tprivate serverConstants: pmi.IServerConstants\r\n\t\t) { }\r\n\r\n\t\tsubmit() {\r\n\t\t\tconst temp = this.dataService.getDataValue('Component', 'Html', this.template);\r\n\t\t\tconst element = this.$compile(temp)(this.$scope);\r\n\r\n\t\t\tthis.$timeout(() => {\r\n\t\t\t\tconst html = element.html();\r\n\t\t\t\tconst css = this.dataService.getDataValue('Style', 'CSS', this.styles);\r\n\t\t\t\tconst name = this.filename ? `${this.filename}.pdf` : 'output.pdf';\r\n\t\t\t\tthis.$http.post(`${this.serverConstants.pdfPath}/html`, {\r\n\t\t\t\t\tpdfRequest: {\r\n\t\t\t\t\t\tfileName: name,\r\n\t\t\t\t\t\ttemplate: html,\r\n\t\t\t\t\t\tpdfContents: [{\r\n\t\t\t\t\t\t\tcontent: css\r\n\t\t\t\t\t\t}]\r\n\t\t\t\t\t}\r\n\t\t\t\t}, {\r\n\t\t\t\t\tresponseType: 'arraybuffer'\r\n\t\t\t\t})\r\n\t\t\t\t.then(response => {\r\n\t\t\t\t\tvar blob = new Blob([response.data as any\t], { type: 'application/pdf' });\r\n\t\t\t\t\tif (window.navigator && window.navigator.msSaveOrOpenBlob) { // for IE\r\n\t\t\t\t\t\twindow.navigator.msSaveOrOpenBlob(blob, name);\r\n\t\t\t\t\t} else { // for Non-IE (chrome, firefox etc.)\r\n\t\t\t\t\t\tvar link = document.createElement('a');\r\n\t\t\t\t\t\tlink.href = window.URL.createObjectURL(blob);\r\n\t\t\t\t\t\tlink.download = name;\r\n\t\t\t\t\t\tlink.click();\r\n\t\t\t\t\t\tlink.remove();\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t\t.catch(error => {\r\n\t\t\t\t\tconsole.log(error);\r\n\t\t\t\t});\r\n\t\t\t}, 0);\r\n\t\t}\r\n\t}\r\n\r\n\tangular.module('app').directive('tcPdfHtml', [() => {\r\n\t\treturn {\r\n\t\t\tbindToController: {\r\n\t\t\t\tclazz: '@',\r\n\t\t\t\tlabel: '@',\r\n\t\t\t\ttemplate: '@',\r\n\t\t\t\tstyles: '@',\r\n\t\t\t\tfilename: '@'\r\n\t\t\t},\r\n\t\t\tcontroller: ['$compile', '$http', '$scope', '$timeout', 'dataService', 'serverConstants', TcPdfHtmlController],\r\n\t\t\tcontrollerAs: '$pdf',\r\n\t\t\treplace: true,\r\n\t\t\trequire: ['tcPdfHtml'],\r\n\t\t\trestrict: 'E',\r\n\t\t\tscope: true,\r\n\t\t\ttemplate: ``\r\n\t\t};\r\n\t}\r\n\t]);\r\n}","namespace Portico.Directives {\r\n\r\n\timport pm = Portico.Models;\r\n import pme = Portico.Models.Enterprise;\r\n\timport ps = Portico.Services;\r\n import Inject = Portico.Decorators.Inject;\r\n\r\n export interface ITcConsentController {\r\n change: () => void;\r\n controlClass: string;\r\n disabled: string;\r\n groupClass: string;\r\n inputClass: string;\r\n\t\tkey: pme.Account;\r\n labelClass: string;\r\n\t\tquestionId: string;\r\n readonly: string;\r\n required: string;\r\n requiredMessage: string;\r\n type: string;\r\n\t\tvalueDefault: number | string;\r\n\t\tvalueNone: number | string;\r\n\r\n\t\tintakeLayout: pme.IntakeLayout;\r\n\t\tsurvey: pme.Survey;\r\n\t\tsurveyQuestion: pme.SurveyQuestion;\r\n\t\tvalue: any;\r\n\r\n\t\tonChange(): void;\r\n getSurveyAnswer(questionId: number): number | string;\r\n }\r\n\r\n export class TcConsentController implements ITcConsentController {\r\n change: () => void;\r\n\t\tcontrolClass: string;\r\n disabled: string;\r\n groupClass: string;\r\n inputClass: string;\r\n\t\tkey: pme.Account;\r\n labelClass: string;\r\n\t\tquestionId: string;\r\n readonly: string;\r\n required: string;\r\n requiredMessage: string;\r\n type: string;\r\n\t\tvalueDefault: number | string;\r\n\t\tvalueNone: number | string;\r\n\r\n\t\tintakeLayout: pme.IntakeLayout;\r\n\t\tsurvey: pme.Survey;\r\n\t\tsurveyQuestion: pme.SurveyQuestion;\r\n\t\tvalue: any;\r\n\r\n\t\tconstructor(private dataService: ps.IDataService, private porticoService: ps.IPorticoService) {\r\n }\r\n\r\n onChange() {\r\n\t\t\tconst surveyId = this.dataService.getEnvironmentId(this.survey.surveyId);\r\n\t\t\tconst surveySession = this.key.getSurveySession(surveyId);\r\n\t\t\tconst questionId = this.dataService.getEnvironmentId(this.surveyQuestion.questionId);\r\n\t\t\tlet answer: string = null;\r\n\t\t\tlet answerIds: number[] = [];\r\n\r\n\t\t\tif (this.surveyQuestion.questionTypeId === pm.QuestionType.Date || this.surveyQuestion.questionTypeId === pm.QuestionType.FreeForm) {\r\n\t\t\t\tanswer = this.value;\r\n\t\t\t\tanswerIds.push(this.surveyQuestion.surveyAnswers[0].answerId);\r\n\t\t\t} else if (this.surveyQuestion.questionTypeId === pm.QuestionType.MultipleChoiceMultiAnswer) {\r\n\t\t\t\tif (this.value.length > 1) {\r\n\t\t\t\t\tthis.value = this.value.filter((v) => {\r\n\t\t\t\t\t\treturn v != this.valueNone;\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tanswerIds = this.value;\r\n\t\t\t} else {\r\n\t\t\t\tanswerIds.push(parseInt(this.value));\r\n }\r\n\r\n\t\t\tsurveySession.setSurveySessionAnswers(questionId, answerIds, answer);\r\n\r\n\t\t\tif (this.change) {\r\n\t\t\t\tthis.change();\r\n\t\t\t}\r\n }\r\n\r\n // can this be moved to a service?\r\n getSurveyAnswer(questionId: number): any {\r\n\t\t\tconst surveyId = this.dataService.getEnvironmentId(this.survey.surveyId);\r\n\t\t\tconst surveySession = this.key.getSurveySession(surveyId);\r\n\t\t\tconst values: any[] = [];\r\n\r\n\t\t\tthis.surveyQuestion.surveyAnswers.forEach((sa) => {\r\n\t\t\t\tconst surveySessionAnswers = surveySession.surveySessionAnswers.filter((ssa) => {\r\n\t\t\t\t\treturn ssa.questionId === this.surveyQuestion.questionId && ssa.answerId === sa.answerId;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (surveySessionAnswers.length > 0) {\r\n\t\t\t\t\tif (this.surveyQuestion.questionTypeId === pm.QuestionType.Date) {\r\n\t\t\t\t\t\tvalues.push(new Date(surveySessionAnswers[0].answerValue));\r\n\t\t\t\t\t} else if (this.surveyQuestion.questionTypeId === pm.QuestionType.FreeForm) {\r\n\t\t\t\t\t\tvalues.push(surveySessionAnswers[0].answerValue);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvalues.push(surveySessionAnswers[0].answerId);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (this.surveyQuestion.questionTypeId === pm.QuestionType.MultipleChoiceMultiAnswer) {\r\n\t\t\t\treturn values;\r\n\t\t\t}\r\n\r\n\t\t\treturn values.length > 0 ? values[0] : null;\r\n }\r\n }\r\n\r\n angular.module('app').directive('tcConsent', [\r\n '$compile',\r\n\t\t'$state',\r\n\t\t'dataService', (\r\n $compile: angular.ICompileService,\r\n\t\t\t$state: angular.ui.IStateService,\r\n\t\t\tdataService: ps.IDataService\r\n\t\t) => {\r\n return {\r\n bindToController: {\r\n change: '&?',\r\n controlClass: '@',\r\n disabled: '@',\r\n groupClass: '@',\r\n inputClass: '@',\r\n key: '=',\r\n labelClass: '@',\r\n questionId: '@',\r\n readonly: '@',\r\n required: '@',\r\n requiredMessage: '@',\r\n\t\t\t\t\ttype: '@',\r\n\t\t\t\t\tvalueDefault: '@',\r\n\t\t\t\t\tvalueNone: '@'\r\n },\r\n\t\t\t\tcontroller: ['dataService', 'porticoService', TcConsentController],\r\n controllerAs: '$question',\r\n link: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: any[]) => {\r\n const tcConsent: ITcConsentController = $ctrl[0];\r\n\t\t\t\t\tconst intakeLayout = dataService.enterprise.intakeLayout;\r\n\t\t\t\t\tconst questionId = dataService.getEnvironmentId(tcConsent.questionId);\r\n\t\t\t\t\tlet inputAttrs = `change=\"$question.onChange()\" `;\r\n\r\n tcConsent.intakeLayout = intakeLayout;\r\n\t\t\t\t\ttcConsent.survey = intakeLayout.getSurveyByQuestionId(questionId);\r\n\t\t\t\t\ttcConsent.surveyQuestion = intakeLayout.getSurveyQuestion(questionId);\r\n\t\t\t\t\ttcConsent.value = tcConsent.getSurveyAnswer(questionId);\r\n\r\n\t\t\t\t\tif (tcConsent.surveyQuestion.questionTypeId == pm.QuestionType.MultipleChoiceMultiAnswer) {\r\n\t\t\t\t\t\tif (tcConsent.valueDefault != null) {\r\n\t\t\t\t\t\t\ttcConsent.valueDefault = dataService.getEnvironmentId(tcConsent.valueDefault);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tcConsent.valueNone != null) {\r\n\t\t\t\t\t\t\ttcConsent.valueNone = dataService.getEnvironmentId(tcConsent.valueNone);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n throw 'MUST USE MULTI_CHOICE_MULTI_ANSWER';\r\n }\r\n\r\n\t\t\t\t\tif ((angular.isArray(tcConsent.value) && tcConsent.value.length == 0) || (tcConsent.value == null)) {\r\n\t\t\t\t\t\tlet value = null;\r\n\r\n\t\t\t\t\t\tif (tcConsent.valueDefault) {\r\n\t\t\t\t\t\t\tvalue = tcConsent.valueDefault;\r\n\t\t\t\t\t\t} else if (tcConsent.valueNone) {\r\n\t\t\t\t\t\t\tvalue = tcConsent.valueNone;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (value) {\r\n\t\t\t\t\t\t\tif (tcConsent.surveyQuestion.questionTypeId === pm.QuestionType.MultipleChoiceMultiAnswer) {\r\n\t\t\t\t\t\t\t\ttcConsent.value.push(value);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\ttcConsent.value = value;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\ttcConsent.onChange();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (tcConsent.controlClass) {\r\n\t\t\t\t\t\tinputAttrs += `control-class=\"${tcConsent.controlClass}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcConsent.disabled) {\r\n\t\t\t\t\t\tinputAttrs += `disabled=\"${tcConsent.disabled}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcConsent.groupClass) {\r\n\t\t\t\t\t\tinputAttrs += `group-class=\"${tcConsent.groupClass}\" `;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (tcConsent.inputClass) {\r\n\t\t\t\t\t\tinputAttrs += `input-class=\"${tcConsent.inputClass}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcConsent.labelClass) {\r\n\t\t\t\t\t\tinputAttrs += `label-class=\"${tcConsent.labelClass}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcConsent.readonly) {\r\n\t\t\t\t\t\tinputAttrs += `readonly=\"${tcConsent.readonly}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcConsent.required) {\r\n\t\t\t\t\t\tinputAttrs += `required=\"${tcConsent.required}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcConsent.requiredMessage) {\r\n\t\t\t\t\t\tinputAttrs += `required-message=\"${tcConsent.requiredMessage}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcConsent.valueDefault) {\r\n\t\t\t\t\t\tinputAttrs += `value-default=\"${tcConsent.valueDefault}\" `;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (tcConsent.valueNone) {\r\n\t\t\t\t\t\tinputAttrs += `value-none=\"${tcConsent.valueNone}\" `;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tinputAttrs += `list=\"$question.surveyQuestion.surveyAnswers\" `;\r\n\t\t\t\t\tinputAttrs += `list-label=\"answerValue\" `;\r\n\t\t\t\t\tinputAttrs += `list-value=\"answerId\" `;\r\n\r\n const html = ``;\r\n\r\n $element.html(html);\r\n $compile($element.contents() as any)($scope);\r\n },\r\n restrict: 'E',\r\n\t\t\t\trequire: ['tcConsent'],\r\n\t\t\t\tscope: true\r\n }\r\n\t\t}\r\n\t]);\r\n}","namespace Portico.Directives {\r\n\r\n\timport pm = Portico.Models;\r\n import pme = Portico.Models.Enterprise;\r\n\timport ps = Portico.Services;\r\n import Inject = Portico.Decorators.Inject;\r\n\r\n export interface ITcQuestionController {\r\n change: () => void;\r\n controlClass: string;\r\n disabled: string;\r\n groupClass: string;\r\n inputClass: string;\r\n\t\tkey: pme.Account;\r\n labelClass: string;\r\n\t\tmask: string;\r\n\t\tmax: string;\r\n\t\tmaxlength: string;\r\n maxlengthMessage: string;\r\n messageClass: string;\r\n\t\tmin: string;\r\n\t\tminlength: string;\r\n minlengthMessage: string;\r\n pattern: string;\r\n patternMessage: string;\r\n placeholder: string;\r\n\t\tquestionId: string;\r\n readonly: string;\r\n required: string;\r\n requiredMessage: string;\r\n rows: string;\r\n type: string;\r\n\t\tvalueDefault: number | string;\r\n\t\tvalueNone: number | string;\r\n\r\n\t\tintakeLayout: pme.IntakeLayout;\r\n\t\tsurvey: pme.Survey;\r\n\t\tsurveyQuestion: pme.SurveyQuestion;\r\n\t\tvalue: any;\r\n\r\n\t\tonChange(): void;\r\n getSurveyAnswer(questionId: number): number | string;\r\n }\r\n\r\n export class TcQuestionController implements ITcQuestionController {\r\n change: () => void;\r\n\t\tcontrolClass: string;\r\n disabled: string;\r\n groupClass: string;\r\n inputClass: string;\r\n\t\tkey: pme.Account;\r\n labelClass: string;\r\n\t\tmask: string;\r\n\t\tmax: string;\r\n maxlength: string;\r\n maxlengthMessage: string;\r\n messageClass: string;\r\n\t\tmin: string;\r\n\t\tminlength: string;\r\n minlengthMessage: string;\r\n pattern: string;\r\n patternMessage: string;\r\n placeholder: string;\r\n\t\tquestionId: string;\r\n readonly: string;\r\n required: string;\r\n requiredMessage: string;\r\n rows: string;\r\n type: string;\r\n\t\tvalueDefault: number | string;\r\n\t\tvalueNone: number | string;\r\n\r\n\t\tintakeLayout: pme.IntakeLayout;\r\n\t\tsurvey: pme.Survey;\r\n\t\tsurveyQuestion: pme.SurveyQuestion;\r\n\t\tvalue: any;\r\n\r\n\t\tconstructor(private dataService: ps.IDataService, private porticoService: ps.IPorticoService) {\r\n }\r\n\r\n onChange() {\r\n\t\t\tconst surveyId = this.dataService.getEnvironmentId(this.survey.surveyId);\r\n\t\t\tconst surveySession = this.key.getSurveySession(surveyId);\r\n\t\t\tconst questionId = this.dataService.getEnvironmentId(this.surveyQuestion.questionId);\r\n\t\t\tlet answer: string = null;\r\n\t\t\tlet answerIds: number[] = [];\r\n\r\n\t\t\tif (this.surveyQuestion.questionTypeId === pm.QuestionType.Date || this.surveyQuestion.questionTypeId === pm.QuestionType.FreeForm) {\r\n\t\t\t\tanswer = this.value;\r\n\t\t\t\tanswerIds.push(this.surveyQuestion.surveyAnswers[0].answerId);\r\n\t\t\t} else if (this.surveyQuestion.questionTypeId === pm.QuestionType.MultipleChoiceMultiAnswer) {\r\n\t\t\t\tif (this.value.length > 1) {\r\n\t\t\t\t\tthis.value = this.value.filter((v) => {\r\n\t\t\t\t\t\treturn v != this.valueNone;\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tanswerIds = this.value;\r\n\t\t\t} else {\r\n\t\t\t\tanswerIds.push(parseInt(this.value));\r\n }\r\n\r\n\t\t\tsurveySession.setSurveySessionAnswers(questionId, answerIds, answer);\r\n\r\n\t\t\tif (this.change) {\r\n\t\t\t\tthis.change();\r\n\t\t\t}\r\n }\r\n\r\n // can this be moved to a service?\r\n getSurveyAnswer(questionId: number): any {\r\n\t\t\tconst surveyId = this.dataService.getEnvironmentId(this.survey.surveyId);\r\n\t\t\tconst surveySession = this.key.getSurveySession(surveyId);\r\n\t\t\tconst values: any[] = [];\r\n\r\n\t\t\tthis.surveyQuestion.surveyAnswers.forEach((sa) => {\r\n\t\t\t\tconst surveySessionAnswers = surveySession.surveySessionAnswers.filter((ssa) => {\r\n\t\t\t\t\treturn ssa.questionId === this.surveyQuestion.questionId && ssa.answerId === sa.answerId;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (surveySessionAnswers.length > 0) {\r\n\t\t\t\t\tif (this.surveyQuestion.questionTypeId === pm.QuestionType.Date) {\r\n\t\t\t\t\t\tvalues.push(new Date(surveySessionAnswers[0].answerValue));\r\n\t\t\t\t\t} else if (this.surveyQuestion.questionTypeId === pm.QuestionType.FreeForm) {\r\n\t\t\t\t\t\tvalues.push(surveySessionAnswers[0].answerValue);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvalues.push(surveySessionAnswers[0].answerId);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (this.surveyQuestion.questionTypeId === pm.QuestionType.MultipleChoiceMultiAnswer) {\r\n\t\t\t\treturn values;\r\n\t\t\t}\r\n\r\n\t\t\treturn values.length > 0 ? values[0] : null;\r\n }\r\n }\r\n\r\n angular.module('app').directive('tcQuestion', [\r\n '$compile',\r\n\t\t'$state',\r\n\t\t'dataService', (\r\n $compile: angular.ICompileService,\r\n\t\t\t$state: angular.ui.IStateService,\r\n\t\t\tdataService: ps.IDataService\r\n\t\t) => {\r\n return {\r\n bindToController: {\r\n change: '&?',\r\n controlClass: '@',\r\n disabled: '@',\r\n groupClass: '@',\r\n inputClass: '@',\r\n key: '=',\r\n labelClass: '@',\r\n\t\t\t\t\tmask: '@',\r\n\t\t\t\t\tmax: '@',\r\n\t\t\t\t\tmaxlength: '@',\r\n maxlengthMessage: '@',\r\n messageClass: '@',\r\n\t\t\t\t\tmin: '@',\r\n\t\t\t\t\tminlength: '@',\r\n minlengthMessage: '@',\r\n pattern: '@',\r\n patternMessage: '@',\r\n placeholder: '@',\r\n questionId: '@',\r\n readonly: '@',\r\n required: '@',\r\n requiredMessage: '@',\r\n rows: '@',\r\n\t\t\t\t\ttype: '@',\r\n\t\t\t\t\tvalueDefault: '@',\r\n\t\t\t\t\tvalueNone: '@'\r\n },\r\n\t\t\t\tcontroller: ['dataService', 'porticoService', TcQuestionController],\r\n controllerAs: '$question',\r\n link: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: any[]) => {\r\n const tcQuestion: ITcQuestionController = $ctrl[0];\r\n\t\t\t\t\tconst intakeLayout = dataService.enterprise.intakeLayout;\r\n\t\t\t\t\tconst questionId = dataService.getEnvironmentId(tcQuestion.questionId);\r\n const type = tcQuestion.type ? tcQuestion.type : 'radio';\r\n\t\t\t\t\tlet inputAttrs = `change=\"$question.onChange()\" `;\r\n\r\n tcQuestion.intakeLayout = intakeLayout;\r\n\t\t\t\t\ttcQuestion.survey = intakeLayout.getSurveyByQuestionId(questionId);\r\n\t\t\t\t\ttcQuestion.surveyQuestion = intakeLayout.getSurveyQuestion(questionId);\r\n\t\t\t\t\ttcQuestion.value = tcQuestion.getSurveyAnswer(questionId);\r\n\r\n\t\t\t\t\tif (tcQuestion.surveyQuestion.questionTypeId !== pm.QuestionType.Date && tcQuestion.surveyQuestion.questionTypeId !== pm.QuestionType.FreeForm) {\r\n\t\t\t\t\t\tif (tcQuestion.valueDefault != null) {\r\n\t\t\t\t\t\t\ttcQuestion.valueDefault = dataService.getEnvironmentId(tcQuestion.valueDefault);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tcQuestion.valueNone != null) {\r\n\t\t\t\t\t\t\ttcQuestion.valueNone = dataService.getEnvironmentId(tcQuestion.valueNone);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ((angular.isArray(tcQuestion.value) && tcQuestion.value.length == 0) || (tcQuestion.value == null)) {\r\n\t\t\t\t\t\tlet value = null;\r\n\r\n\t\t\t\t\t\tif (tcQuestion.valueDefault) {\r\n\t\t\t\t\t\t\tvalue = tcQuestion.valueDefault;\r\n\t\t\t\t\t\t} else if (tcQuestion.valueNone) {\r\n\t\t\t\t\t\t\tvalue = tcQuestion.valueNone;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (value) {\r\n\t\t\t\t\t\t\tif (tcQuestion.surveyQuestion.questionTypeId === pm.QuestionType.MultipleChoiceMultiAnswer) {\r\n\t\t\t\t\t\t\t\ttcQuestion.value.push(value);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\ttcQuestion.value = value;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\ttcQuestion.onChange();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (tcQuestion.controlClass) {\r\n\t\t\t\t\t\tinputAttrs += `control-class=\"${tcQuestion.controlClass}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcQuestion.disabled) {\r\n\t\t\t\t\t\tinputAttrs += `disabled=\"${tcQuestion.disabled}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcQuestion.groupClass) {\r\n\t\t\t\t\t\tinputAttrs += `group-class=\"${tcQuestion.groupClass}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcQuestion.inputClass) {\r\n\t\t\t\t\t\tinputAttrs += `input-class=\"${tcQuestion.inputClass}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcQuestion.labelClass) {\r\n\t\t\t\t\t\tinputAttrs += `label-class=\"${tcQuestion.labelClass}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcQuestion.mask) {\r\n\t\t\t\t\t\tinputAttrs += `mask=\"${tcQuestion.mask}\" `;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (tcQuestion.max) {\r\n\t\t\t\t\t\tinputAttrs += `max=\"${tcQuestion.max}\" `;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (tcQuestion.maxlength) {\r\n\t\t\t\t\t\tinputAttrs += `maxlength=\"${tcQuestion.maxlength}\" `;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (tcQuestion.maxlengthMessage) {\r\n\t\t\t\t\t\tinputAttrs += `maxlength-message=\"${tcQuestion.maxlengthMessage}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcQuestion.messageClass) {\r\n\t\t\t\t\t\tinputAttrs += `message-class=\"${tcQuestion.messageClass}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcQuestion.min) {\r\n\t\t\t\t\t\tinputAttrs += `min=\"${tcQuestion.min}\" `;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (tcQuestion.minlength) {\r\n\t\t\t\t\t\tinputAttrs += `minlength=\"${tcQuestion.minlength}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcQuestion.minlengthMessage) {\r\n\t\t\t\t\t\tinputAttrs += `minlength-message=\"${tcQuestion.minlengthMessage}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcQuestion.pattern) {\r\n\t\t\t\t\t\tinputAttrs += `pattern=\"${tcQuestion.pattern}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcQuestion.patternMessage) {\r\n\t\t\t\t\t\tinputAttrs += `pattern-message=\"${tcQuestion.patternMessage}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcQuestion.placeholder) {\r\n\t\t\t\t\t\tinputAttrs += `placeholder=\"${tcQuestion.placeholder}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcQuestion.readonly) {\r\n\t\t\t\t\t\tinputAttrs += `readonly=\"${tcQuestion.readonly}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcQuestion.required) {\r\n\t\t\t\t\t\tinputAttrs += `required=\"${tcQuestion.required}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcQuestion.requiredMessage) {\r\n\t\t\t\t\t\tinputAttrs += `required-message=\"${tcQuestion.requiredMessage}\" `;\r\n }\r\n\r\n\t\t\t\t\tif (tcQuestion.rows) {\r\n\t\t\t\t\t\tinputAttrs += `rows=\"${tcQuestion.rows}\" `;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (tcQuestion.valueDefault) {\r\n\t\t\t\t\t\tinputAttrs += `value-default=\"${tcQuestion.valueDefault}\" `;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (tcQuestion.valueNone) {\r\n\t\t\t\t\t\tinputAttrs += `value-none=\"${tcQuestion.valueNone}\" `;\r\n\t\t\t\t\t}\r\n\r\n if (type) {\r\n inputAttrs += `type=\"${type}\" `;\r\n\r\n\t\t\t\t\t\tif (type.indexOf('checkbox') >= 0 || type.indexOf('radio') >= 0 || type === 'select') {\r\n inputAttrs += `list=\"$question.surveyQuestion.surveyAnswers\" `;\r\n inputAttrs += `list-label=\"answerValue\" `;\r\n inputAttrs += `list-value=\"answerId\" `;\r\n }\r\n }\r\n\r\n\t\t\t\t\tconst html = ``;\r\n\r\n $element.html(html);\r\n $compile($element.contents() as any)($scope);\r\n },\r\n restrict: 'E',\r\n\t\t\t\trequire: ['tcQuestion'],\r\n\t\t\t\tscope: true\r\n }\r\n\t\t}\r\n\t]);\r\n}","namespace Portico.Directives {\r\n\r\n\timport pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport ps = Portico.Services;\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Service = Portico.Decorators.Service;\r\n\r\n\texport interface ITcSurveyController {\r\n\t\tchange: () => void;\r\n\t\tcontrolClass: string;\r\n\t\tdisabled: string;\r\n\t\tgroupClass: string;\r\n\t\tinputClass: string;\r\n\t\tkey: pme.Account;\r\n\t\tlabelClass: string;\r\n\t\tmaxlength: string;\r\n\t\tmaxlengthMessage: string;\r\n\t\tmessageClass: string;\r\n\t\tminlength: string;\r\n\t\tminlengthMessage: string;\r\n\t\tpattern: string;\r\n\t\tpatternMessage: string;\r\n\t\tplaceholder: string;\r\n\t\treadonly: string;\r\n\t\trequired: string;\r\n\t\trequiredMessage: string;\r\n\t\trows: string;\r\n\t\tsection: string;\r\n\t\ttype: string;\r\n\r\n\t\tonChange: () => void;\r\n\t}\r\n\r\n\texport class TcSurveyController implements ITcSurveyController {\r\n\t\tchange: () => void;\r\n\t\tcontrolClass: string;\r\n\t\tdisabled: string;\r\n\t\tgroupClass: string;\r\n\t\tinputClass: string;\r\n\t\tkey: pme.Account;\r\n\t\tlabelClass: string;\r\n\t\tmaxlength: string;\r\n\t\tmaxlengthMessage: string;\r\n\t\tmessageClass: string;\r\n\t\tminlength: string;\r\n\t\tminlengthMessage: string;\r\n\t\tpattern: string;\r\n\t\tpatternMessage: string;\r\n\t\tplaceholder: string;\r\n\t\treadonly: string;\r\n\t\trequired: string;\r\n\t\trequiredMessage: string;\r\n\t\trows: string;\r\n\t\tsection: string;\r\n\t\ttype: string;\r\n\r\n\t\tonChange() {\r\n\t\t\tif (this.change) {\r\n\t\t\t\tthis.change();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tangular.module('app').directive('tcSurvey', [\r\n\t\t'$compile',\r\n\t\t'$state',\r\n\t\t'dataService', (\r\n\t\t\t$compile: angular.ICompileService,\r\n\t\t\t$state: angular.ui.IStateService,\r\n\t\t\tdataService: ps.IDataService\r\n\t\t) => {\r\n\t\t\treturn {\r\n\t\t\t\tbindToController: {\r\n\t\t\t\t\tchange: '&?',\r\n\t\t\t\t\tcontrolClass: '@',\r\n\t\t\t\t\tdisabled: '@',\r\n\t\t\t\t\tgroupClass: '@',\r\n\t\t\t\t\tinputClass: '@',\r\n\t\t\t\t\tkey: '=',\r\n\t\t\t\t\tlabelClass: '@',\r\n\t\t\t\t\tmaxlength: '@',\r\n\t\t\t\t\tmaxlengthMessage: '@',\r\n\t\t\t\t\tmessageClass: '@',\r\n\t\t\t\t\tminlength: '@',\r\n\t\t\t\t\tminlengthMessage: '@',\r\n\t\t\t\t\tpattern: '@',\r\n\t\t\t\t\tpatternMessage: '@',\r\n\t\t\t\t\tplaceholder: '@',\r\n\t\t\t\t\treadonly: '@',\r\n\t\t\t\t\trequired: '@',\r\n\t\t\t\t\trequiredMessage: '@',\r\n\t\t\t\t\trows: '@',\r\n\t\t\t\t\tsection: '@',\r\n\t\t\t\t\ttype: '@'\r\n\t\t\t\t},\r\n\t\t\t\tcontroller: TcSurveyController,\r\n\t\t\t\tcontrollerAs: '$survey',\r\n\t\t\t\tlink: ($scope: angular.IScope, $element: angular.IAugmentedJQuery, $attr: angular.IAttributes, $ctrl: any[]) => {\r\n\t\t\t\t\tconst tcSurvey: ITcSurveyController = $ctrl[0];\r\n\t\t\t\t\tlet html = '';\r\n\r\n\t\t\t\t\tif (dataService.enterprise.intakeLayout) {\r\n\t\t\t\t\t\tconst layoutSection = dataService.enterprise.intakeLayout.getLayoutSection(tcSurvey.section);\r\n\r\n\t\t\t\t\t\tif (layoutSection) {\r\n\t\t\t\t\t\t\tconst questions = layoutSection.questions;\r\n\r\n\t\t\t\t\t\t\tif (questions) {\r\n\t\t\t\t\t\t\t\tconst type = tcSurvey.type ? tcSurvey.type : 'radio';\r\n\t\t\t\t\t\t\t\tlet inputAttrs = `change=\"$survey.onChange()\" `;\r\n\r\n\t\t\t\t\t\t\t\tif (tcSurvey.controlClass) {\r\n\t\t\t\t\t\t\t\t\tinputAttrs += `control-class=\"${tcSurvey.controlClass}\" `;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif (tcSurvey.disabled) {\r\n\t\t\t\t\t\t\t\t\tinputAttrs += `disabled=\"${tcSurvey.disabled}\" `;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif (tcSurvey.groupClass) {\r\n\t\t\t\t\t\t\t\t\tinputAttrs += `group-class=\"${tcSurvey.groupClass}\" `;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif (tcSurvey.inputClass) {\r\n\t\t\t\t\t\t\t\t\tinputAttrs += `input-class=\"${tcSurvey.inputClass}\" `;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif (tcSurvey.labelClass) {\r\n\t\t\t\t\t\t\t\t\tinputAttrs += `label-class=\"${tcSurvey.labelClass}\" `;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif (tcSurvey.maxlength) {\r\n\t\t\t\t\t\t\t\t\tinputAttrs += `maxlength=\"${tcSurvey.maxlength}\" `;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif (tcSurvey.maxlengthMessage) {\r\n\t\t\t\t\t\t\t\t\tinputAttrs += `maxlength-message=\"${tcSurvey.maxlengthMessage}\" `;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif (tcSurvey.messageClass) {\r\n\t\t\t\t\t\t\t\t\tinputAttrs += `message-class=\"${tcSurvey.messageClass}\" `;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif (tcSurvey.minlength) {\r\n\t\t\t\t\t\t\t\t\tinputAttrs += `minlength=\"${tcSurvey.minlength}\" `;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif (tcSurvey.minlengthMessage) {\r\n\t\t\t\t\t\t\t\t\tinputAttrs += `minlength-message=\"${tcSurvey.minlengthMessage}\" `;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif (tcSurvey.pattern) {\r\n\t\t\t\t\t\t\t\t\tinputAttrs += `pattern=\"${tcSurvey.pattern}\" `;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif (tcSurvey.patternMessage) {\r\n\t\t\t\t\t\t\t\t\tinputAttrs += `pattern-message=\"${tcSurvey.patternMessage}\" `;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif (tcSurvey.placeholder) {\r\n\t\t\t\t\t\t\t\t\tinputAttrs += `placeholder=\"${tcSurvey.placeholder}\" `;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif (tcSurvey.readonly) {\r\n\t\t\t\t\t\t\t\t\tinputAttrs += `readonly=\"${tcSurvey.readonly}\" `;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif (tcSurvey.required) {\r\n\t\t\t\t\t\t\t\t\tinputAttrs += `required=\"${tcSurvey.required}\" `;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif (tcSurvey.requiredMessage) {\r\n\t\t\t\t\t\t\t\t\tinputAttrs += `required-message=\"${tcSurvey.requiredMessage}\" `;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif (tcSurvey.rows) {\r\n\t\t\t\t\t\t\t\t\tinputAttrs += `rows=\"${tcSurvey.rows}\" `;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tfor (let i = 0; i < questions.length; i++) {\r\n\t\t\t\t\t\t\t\t\thtml +=\r\n\t\t\t\t\t\t\t\t\t\t`
    \r\n\t\t\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t
    `;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$element.html(html);\r\n\t\t\t\t\t$compile($element.contents() as any)($scope);\r\n\t\t\t\t},\r\n\t\t\t\trestrict: 'E',\r\n\t\t\t\trequire: ['tcSurvey'],\r\n\t\t\t\tscope: true\r\n\t\t\t}\r\n\t\t}\r\n\t]);\r\n}","namespace Portico.Filters {\r\n\r\n\tangular.module('app').filter('highlight', ['$sce', ($sce: angular.ISCEService) => {\r\n\t\treturn (text: string, phrase: string) => {\r\n\t\t\tlet t = text;\r\n\r\n\t\t\tif (t) {\r\n\t\t\t\tif (phrase) {\r\n\t\t\t\t\tlet p = phrase.replace(/([\\\\.*+?^$|(){}\\[\\]])/g, '\\\\$1');\r\n\t\t\t\t\tt = t.replace(new RegExp('(' + p + ')', 'gi'), '$$$$$$HIGHLIGHT$$$$$$');\r\n\t\t\t\t\tphrase = phrase.replace(//g, '>');\r\n\t\t\t\t}\r\n\r\n\t\t\t\tt = t.replace(//g, '>').replace(/\\$\\$\\$HIGHLIGHT\\$\\$\\$/g, '' + phrase + '');\r\n\t\t\t}\r\n\r\n\t\t\treturn $sce.trustAsHtml(t);\r\n\t\t}\r\n\t}]);\r\n}\r\n","namespace Portico.Filters {\r\n\r\n\tangular.module('app').filter('phone', () => {\r\n\t\treturn (text: string) => {\r\n\t\t\tif (!text) {\r\n\t\t\t\treturn '';\r\n\t\t\t}\r\n\r\n\t\t\tvar value = text.toString().trim().replace(/^\\+/, '');\r\n\r\n\t\t\tif (value.match(/[^0-9]/)) {\r\n\t\t\t\treturn text;\r\n\t\t\t}\r\n\r\n\t\t\tvar country, city, number;\r\n\r\n\t\t\tswitch (value.length) {\r\n\t\t\t\tcase 10: // +1PPP####### -> C (PPP) ###-####\r\n\t\t\t\t\tcountry = 1;\r\n\t\t\t\t\tcity = value.slice(0, 3);\r\n\t\t\t\t\tnumber = value.slice(3);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 11: // +CPPP####### -> CCC (PP) ###-####\r\n\t\t\t\t\tcountry = value[0];\r\n\t\t\t\t\tcity = value.slice(1, 4);\r\n\t\t\t\t\tnumber = value.slice(4);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 12: // +CCCPP####### -> CCC (PP) ###-####\r\n\t\t\t\t\tcountry = value.slice(0, 3);\r\n\t\t\t\t\tcity = value.slice(3, 5);\r\n\t\t\t\t\tnumber = value.slice(5);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\treturn text;\r\n\t\t\t}\r\n\r\n\t\t\tif (country == 1) {\r\n\t\t\t\tcountry = \"\";\r\n\t\t\t}\r\n\r\n\t\t\tnumber = number.slice(0, 3) + '-' + number.slice(3);\r\n\r\n\t\t\treturn (country + \" (\" + city + \") \" + number).trim();\r\n\t\t}\r\n\t});\r\n}\r\n","namespace Portico.Filters {\r\n\r\n angular.module('app').filter('selectPropsFilter', function () {\r\n return function (items, props) {\r\n var out = [];\r\n\r\n if (angular.isArray(items)) {\r\n var keys = Object.keys(props);\r\n\r\n items.forEach(function (item) {\r\n var itemMatches = false;\r\n\r\n for (var i = 0; i < keys.length; i++) {\r\n var prop = keys[i];\r\n var text = props[prop].toLowerCase();\r\n if (item[prop].toString().toLowerCase().indexOf(text) !== -1) {\r\n itemMatches = true;\r\n break;\r\n }\r\n }\r\n\r\n if (itemMatches) {\r\n out.push(item);\r\n }\r\n });\r\n } else {\r\n out = items;\r\n }\r\n return out;\r\n };\r\n });\r\n}","namespace Portico.Controllers {\r\n import Service = Portico.Decorators.Service;\r\n import Inject = Portico.Decorators.Inject;\r\n import pml = Portico.Models.Legacy;\r\n import ps = Portico.Services;\r\n import legacyEnrollmentModels = Portico.Services.Legacy.EnrollmentService.Models;\r\n\r\n @Service('app', 'testController')\r\n @Inject('LegacyEnrollmentService', 'LegacyCardService')\r\n export class TestController {\r\n public results: string;\r\n programId: number = 44;\r\n medBenProgramId: number = 59;\r\n constructor(private legacyEnrollmentService: ps.Legacy.EnrollmentService.ILegacyEnrollmentService\r\n , private legacyCardService: ps.Legacy.CardService.ILegacyCardService) { }\r\n\r\n //Patient search\r\n testLegacySearchPatients(): void {\r\n let searchModel = {\r\n \"firstName\": 'John',\r\n \"lastName\": null,\r\n \"dateOfBirth\": null,\r\n \"city\": 'Raleigh',\r\n \"country\": null,\r\n \"state\": 'NC',\r\n \"postalCode\": null,\r\n \"memberNumber\": null,\r\n \"maxResults\": 10,\r\n \"skipRows\": 0,\r\n \"firstNameQueryType\": Portico.Models.Legacy.FirstNameQueryTypeEnum.Contains,\r\n \"lastNameQueryType\": Portico.Models.Legacy.LastNameQueryTypeEnum.Contains,\r\n \"email\": null,\r\n \"phone\": null\r\n } as Models.Legacy.PatientSearchRequestModel;\r\n\r\n //let searchModel = {\r\n //\t\"maxResults\": 1,\r\n //\t\"skipRows\": 0,\r\n //\t\"firstNameQueryType\": 0,\r\n //\t\"firstName\": null,\r\n //\t\"lastNameQueryType\": 0,\r\n //\t\"lastName\": null,\r\n //\t\"dateOfBirth\": null,\r\n //\t\"city\": null,\r\n //\t\"state\": null,\r\n //\t\"postalCode\": null,\r\n //\t\"country\": null,\r\n //\t\"memberNumber\": \"40847400809\",\r\n //\t\"phone\": null,\r\n //\t\"email\": null\r\n //};\r\n\r\n\r\n this.legacyEnrollmentService.PatientSearchApi.post(this.programId, searchModel).then((response: pml.PatientSearchRecordModel[]) => {\r\n this.results = `Patient Search Result: ${response[0].firstName} ${response[0].lastName} MemberNumber: ${response[0].memberNumber}`;\r\n }).catch((reason) => {\r\n alert('Failed: ' + reason);\r\n });\r\n }\r\n\r\n //basic enrollment\r\n testBasicEnrollmentApi() {\r\n\r\n\t\t\tlet basicEnrollmentModel = {\r\n\r\n\t\t\t\tdemographics: {\r\n\t\t\t\t\tpersonId: 0,\r\n\t\t\t\t\tfirstName: '2Test3123',\r\n\t\t\t\t\tlastName: '2Tes1233t',\r\n\t\t\t\t\tgender: 'F',\r\n\t\t\t\t\tdateOfBirth: '07/12/1984',\r\n\t\t\t\t\temail: '',\r\n\t\t\t\t\tmobilePhone: '7144578172',\r\n\t\t\t\t\thomePhone: '7144578172',\r\n\t\t\t\t\taddress1: '3516 E Jacaranda Ave',\r\n\t\t\t\t\taddress2: '',\r\n\t\t\t\t\tcity: 'Orange',\r\n\t\t\t\t\tstate: 'CA',\r\n\t\t\t\t\tpostalCode: '92867',\r\n\t\t\t\t\tmemberNumber: '',\r\n\t\t\t\t\tcountry: 'US',\r\n\t\t\t\t\tcommunicationTypes: Portico.Models.Legacy.CommunicationTypesEnum.Email\r\n\t\t\t\t},\r\n\r\n\t\t\t\tsurvey: [\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsurveyId: 0,\r\n\t\t\t\t\t\tquestionId: 10510,\r\n\t\t\t\t\t\tanswerKey: 8113,\r\n\t\t\t\t\t\tanswerText: 'Yes'\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsurveyId: 0,\r\n\t\t\t\t\t\tquestionId: 10511,\r\n\t\t\t\t\t\tanswerKey: 8115,\r\n\t\t\t\t\t\tanswerText: 'Yes'\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsurveyId: 0,\r\n\t\t\t\t\t\tquestionId: 10512,\r\n\t\t\t\t\t\tanswerKey: 8117,\r\n\t\t\t\t\t\tanswerText: 'Yes'\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t],\r\n\r\n\t\t\t\tclientIdentifiers: null\r\n\r\n\r\n\t\t\t} as Models.Legacy.EnrollmentRequestModel;\r\n\r\n this.legacyEnrollmentService.BasicEnrollmentApi.post(this.programId, basicEnrollmentModel).then((response: pml.EnrollmentResultModel) => {\r\n this.results = `Basic Enrollment Result: ${response.bin} ${response.memberNumber}`;\r\n }).catch((err) => {\r\n alert('Failed: ' + err);\r\n });\r\n\r\n }\r\n\r\n //basic enrollment pdf\r\n testBasicEnrollmentApiPdf() {\r\n\r\n let basicEnrollmentModel = {\r\n\r\n demographics: {\r\n \"personId\": 0,\r\n \"firstName\": \"2Test3123\",\r\n \"lastName\": \"2Tes1233t\",\r\n \"gender\": \"F\",\r\n \"dateOfBirth\": \"07/12/1984\",\r\n \"email\": \"\",\r\n \"mobilePhone\": \"7144578172\",\r\n \"homePhone\": \"7144578172\",\r\n \"address1\": \"3516 E Jacaranda Ave\",\r\n \"address2\": \"\",\r\n \"city\": \"Orange\",\r\n \"state\": \"CA\",\r\n \"postalCode\": \"92867\",\r\n \"memberNumber\": \"\",\r\n\t\t\t\t\t\"country\": \"US\",\r\n\t\t\t\t\t\"communicationTypes\": Portico.Models.Legacy.CommunicationTypesEnum.Email\r\n },\r\n\r\n survey: [\r\n {\r\n \"surveyId\": 0,\r\n \"questionId\": 10510,\r\n \"answerKey\": 8113,\r\n \"answerText\": \"Yes\"\r\n },\r\n {\r\n \"surveyId\": 0,\r\n \"questionId\": 10511,\r\n \"answerKey\": 8115,\r\n \"answerText\": \"Yes\"\r\n },\r\n {\r\n \"surveyId\": 0,\r\n \"questionId\": 10512,\r\n \"answerKey\": 8117,\r\n \"answerText\": \"Yes\"\r\n },\r\n\r\n ]\r\n\r\n\r\n } as Models.Legacy.EnrollmentRequestModel\r\n this.legacyEnrollmentService.BasicEnrollmentWithPdfApi.post(this.programId, basicEnrollmentModel).then((response: pml.EnrollmentWithPdfResultModel) => {\r\n this.results = `Basic Enrollment Result: ${response.bin} ${response.memberNumber} Pdf: ${response.base64PdfFile} ` ;\r\n }).catch((err) => {\r\n alert('Failed: ' + err);\r\n });\r\n\r\n }\r\n\r\n testEnrollment() {\r\n let enrollmentModel = {\r\n\r\n demographics: {\r\n \"personId\": 0,\r\n \"firstName\": \"2Test3123\",\r\n \"lastName\": \"2Tes1233t\",\r\n \"gender\": \"F\",\r\n \"dateOfBirth\": \"07/12/1984\",\r\n \"email\": \"\",\r\n \"mobilePhone\": \"7144578172\",\r\n \"homePhone\": \"7144578172\",\r\n \"address1\": \"3516 E Jacaranda Ave\",\r\n \"address2\": \"\",\r\n \"city\": \"Orange\",\r\n \"state\": \"CA\",\r\n \"postalCode\": \"92867\",\r\n \"memberNumber\": \"\",\r\n\t\t\t\t\t\"country\": \"US\",\r\n\t\t\t\t\t\"communicationTypes\": Portico.Models.Legacy.CommunicationTypesEnum.Email\r\n },\r\n\r\n survey: [\r\n {\r\n \"surveyId\": 0,\r\n \"questionId\": 10510,\r\n \"answerKey\": 8113,\r\n \"answerText\": \"Yes\"\r\n },\r\n {\r\n \"surveyId\": 0,\r\n \"questionId\": 10511,\r\n \"answerKey\": 8115,\r\n \"answerText\": \"Yes\"\r\n },\r\n {\r\n \"surveyId\": 0,\r\n \"questionId\": 10512,\r\n \"answerKey\": 8117,\r\n \"answerText\": \"Yes\"\r\n },\r\n ],\r\n clientIdentifiers: {\r\n \"sourceId\": \"\",\r\n \"alternateId\": \"\",\r\n \"alternateIdType\": \"ThirdPartyID\"\r\n },\r\n insuranceVerification: {\r\n \"insuranceType\": 1,\r\n \"payerName\": \"P\",\r\n \"payerPhone\": \"9999999998\",\r\n \"bin\": \"B\",\r\n \"pcn\": \"\",\r\n \"payerMedicalId\": \"G\"\r\n }\r\n\r\n\r\n } as Models.Legacy.EnrollmentInsVerRequestModel\r\n\r\n this.legacyEnrollmentService.EnrollmentApi.post(this.programId, enrollmentModel).then((response: pml.EnrollmentResultModel) => {\r\n this.results =\r\n `Enrollment Result: ${response.memberNumber} Benefit Amount: ${response.totalBenefitAmount} Remaining Beneift: ${response.remainingBenefitAmount}`;\r\n }).catch((err) => {\r\n alert('Failed: ' + err);\r\n });\r\n }\r\n\r\n testEnrollmentUpdate() {\r\n let enrollmentModel = {\r\n\r\n demographics: {\r\n \"personId\": 0,\r\n \"firstName\": \"2Test3123\",\r\n \"lastName\": \"2Tes1233t\",\r\n \"gender\": \"F\",\r\n \"dateOfBirth\": \"07/12/1984\",\r\n \"email\": \"\",\r\n \"mobilePhone\": \"7144578172\",\r\n \"homePhone\": \"7144578172\",\r\n \"address1\": \"3516 E Jacaranda Ave\",\r\n \"address2\": \"\",\r\n \"city\": \"Orange\",\r\n \"state\": \"CA\",\r\n \"postalCode\": \"92867\",\r\n \"memberNumber\": \"39871588603\",\r\n\t\t\t\t\t\"country\": \"US\",\r\n\t\t\t\t\t\"communicationTypes\": Portico.Models.Legacy.CommunicationTypesEnum.Email\r\n },\r\n\r\n clientIdentifiers: {\r\n \"sourceId\": \"\",\r\n \"alternateId\": \"\",\r\n \"alternateIdType\": \"ThirdPartyID\"\r\n }\r\n\r\n\r\n } as Models.Legacy.EnrollmentUpdateRequestModel\r\n\r\n this.legacyEnrollmentService.EnrollmentUpdateApi.put(this.programId, enrollmentModel).then((response: pml.EnrollmentResultModel) => {\r\n this.results =\r\n `Enrollment Update Result: ${response.memberNumber}`;\r\n }).catch((err) => {\r\n alert('Failed: ' + err);\r\n });\r\n }\r\n\r\n //medBenefitEnrollment() {\r\n\r\n // let enrollmentModel = {\r\n // demographics: {\r\n // \"firstName\": \"2Test3123\",\r\n // \"lastName\": \"2Tes1233t\",\r\n // \"gender\": \"F\",\r\n // \"dateOfBirth\": \"07/12/2004\",\r\n // \"email\": \"\",\r\n // \"phoneNumbers\": [\r\n // {\r\n // \"phoneNumberId\": 0,\r\n // \"countryCode\": \"1\",\r\n // \"areaCode\": \"919\",\r\n // \"number\": \"5550510\",\r\n // \"primaryPhoneNumber\": true,\r\n // \"phoneType\": 0,\r\n // \"phoneTypeDescription\": null,\r\n // \"extension\": null\r\n // }],\r\n // \"address1\": \"3516 E Jacaranda Ave\",\r\n // \"address2\": \"\",\r\n // \"city\": \"Orange\",\r\n // \"state\": \"CA\",\r\n // \"postalCode\": \"92867\",\r\n // \"memberNumber\": \"\",\r\n // \"country\": \"US\",\r\n // \"communicationType\": Models.Legacy.CommunicationTypeEnum.Email,\r\n // \"paymentType\": Models.Legacy.PaymentTypeEnum.NUMBER_0\r\n // },\r\n // clientIdentifiers: {\r\n // \"sourceId\": Models.Legacy.SourceIdEnum.NUMBER_5,\r\n // \"alternateId\": \"\",\r\n // \"alternateIdType\": \"ThirdPartyID\",\r\n // \"prescriberId\": \"5\",\r\n // \"prescriberCommunicationType\": Models.Legacy.PrescriberCommunicationTypeEnum.Email,\r\n // \"prescriberCommunicationOption\": Models.Legacy.PrescriberCommunicationOptionEnum.NUMBER_0,\r\n // \"sites\": [\r\n // {\r\n // \"siteId\": \"8\",\r\n // \"siteType\": Models.Legacy.SiteTypeEnum.NUMBER_1,\r\n // \"siteCommunicationType\": Models.Legacy.SiteCommunicationTypeEnum.NUMBER_0,\r\n // \"siteCommunicationOption\": Models.Legacy.SiteCommunicationOptionEnum.NUMBER_0\r\n // }\r\n // ]\r\n // },\r\n // guardianInfo: {\r\n // \"personId\": null,\r\n // \"namePrefix\": null,\r\n // \"firstName\": \"Some\",\r\n // \"middleName\": null,\r\n // \"lastName\": \"Guardian\",\r\n // \"nameSuffix\": null,\r\n // \"dateOfBirth\": \"07/12/1984\",\r\n // \"relationship\": 0,\r\n // \"primaryPhoneNumber\": {\r\n // \"phoneNumberId\": 0,\r\n // \"countryCode\": \"1\",\r\n // \"areaCode\": \"919\",\r\n // \"number\": \"5550511\",\r\n // \"primaryPhoneNumber\": true,\r\n // \"phoneType\": 0,\r\n // \"phoneTypeDescription\": null,\r\n // \"extension\": null\r\n // }\r\n // },\r\n // insuranceVerification: null,\r\n // survey: [{\r\n // \"surveyId\": 0,\r\n // \"questionId\": 10510,\r\n // \"answerKey\": 8113,\r\n // \"answerText\": \"Yes\"\r\n // },\r\n // {\r\n // \"surveyId\": 0,\r\n // \"questionId\": 10511,\r\n // \"answerKey\": 8115,\r\n // \"answerText\": \"Yes\"\r\n // },\r\n // {\r\n // \"surveyId\": 0,\r\n // \"questionId\": 10512,\r\n // \"answerKey\": 8117,\r\n // \"answerText\": \"Yes\"\r\n // },\r\n // ]\r\n // } as Models.Legacy.MedBenEnrollmentRequestModel\r\n\r\n // this.legacyEnrollmentService.MedBenefitEnrollmentApi.medBenefitEnrollmentPost(this.medBenProgramId, enrollmentModel)\r\n // .then((response: pml.MedBenEnrollmentResultModel) => {\r\n // this.results = `MedbenefitEnrollment Result: MemberNumber: ${response.memberNumber} ActivationDate:${response.cardActivationDate}`\r\n\r\n // }).catch((err) => {\r\n // alert('Failed: ' + err);\r\n // });\r\n //}\r\n\r\n //medBenefitEnrollmentOptOut() {\r\n\r\n // let enrollmentModel = {\r\n // \"memberNumber\": \"40847094309\",\r\n // \"patientId\": \"x4qfwG0ee0x06dg8YOGNkg~~\",\r\n // \"enrollmentId\": \"53qfwG0ee0x06dg8YOGNkg~~\"\r\n\r\n // } as Models.Legacy.MedBenOptOutRequestModel\r\n\r\n // this.legacyEnrollmentService.MedBenefitEnrollmentOptOutApi.medBenefitEnrollmentOptOutPost(this.medBenProgramId, enrollmentModel)\r\n // .then((response: never) => {\r\n // this.results = `MedBenefitEnrollmentOptOut Result: ${response}`;\r\n // }).catch((err) => {\r\n // alert('Failed: ' + err);\r\n // });\r\n //}\r\n\r\n\r\n //medBenefitEnrollmentUpdateApi() {\r\n\r\n // let enrollmentModel = {\r\n // demographics: {\r\n // \"firstName\": \"2Test3123\",\r\n // \"lastName\": \"2Tes1233t\",\r\n // \"gender\": \"F\",\r\n // \"dateOfBirth\": \"07/12/2004\",\r\n // \"email\": \"\",\r\n // \"phoneNumbers\": [\r\n // {\r\n // \"phoneNumberId\": 0,\r\n // \"countryCode\": \"1\",\r\n // \"areaCode\": \"919\",\r\n // \"number\": \"5550510\",\r\n // \"primaryPhoneNumber\": true,\r\n // \"phoneType\": 0,\r\n // \"phoneTypeDescription\": null,\r\n // \"extension\": null\r\n // }],\r\n // \"address1\": \"3516 E Jacaranda Ave\",\r\n // \"address2\": \"\",\r\n // \"city\": \"Orange\",\r\n // \"state\": \"CA\",\r\n // \"postalCode\": \"92867\",\r\n // \"memberNumber\": \"12345678910\",\r\n // \"country\": \"US\",\r\n // \"communicationType\": Models.Legacy.CommunicationTypeEnum.Email,\r\n // \"paymentType\": Models.Legacy.PaymentTypeEnum.NUMBER_0\r\n // },\r\n // clientIdentifiers: {\r\n // \"sourceId\": Models.Legacy.SourceIdEnum.NUMBER_5,\r\n // \"alternateId\": \"\",\r\n // \"alternateIdType\": \"ThirdPartyID\",\r\n // \"prescriberId\": \"5\",\r\n // \"prescriberCommunicationType\": Models.Legacy.PrescriberCommunicationTypeEnum.Email,\r\n // \"prescriberCommunicationOption\": Models.Legacy.PrescriberCommunicationOptionEnum.NUMBER_0,\r\n // \"sites\": [\r\n // {\r\n // \"siteId\": \"8\",\r\n // \"siteType\": Models.Legacy.SiteTypeEnum.NUMBER_1,\r\n // \"siteCommunicationType\": Models.Legacy.SiteCommunicationTypeEnum.NUMBER_0,\r\n // \"siteCommunicationOption\": Models.Legacy.SiteCommunicationOptionEnum.NUMBER_0\r\n // }\r\n // ]\r\n // },\r\n // guardianInfo: {\r\n // \"personId\": null,\r\n // \"namePrefix\": null,\r\n // \"firstName\": \"Some\",\r\n // \"middleName\": null,\r\n // \"lastName\": \"Guardian\",\r\n // \"nameSuffix\": null,\r\n // \"dateOfBirth\": \"07/12/1984\",\r\n // \"relationship\": 0,\r\n // \"primaryPhoneNumber\": {\r\n // \"phoneNumberId\": 0,\r\n // \"countryCode\": \"1\",\r\n // \"areaCode\": \"919\",\r\n // \"number\": \"5550511\",\r\n // \"primaryPhoneNumber\": true,\r\n // \"phoneType\": 0,\r\n // \"phoneTypeDescription\": null,\r\n // \"extension\": null\r\n // }\r\n // },\r\n // insuranceVerification: null\r\n // } as Models.Legacy.MedBenEnrollmentUpdateRequestModel\r\n\r\n // this.legacyEnrollmentService.MedBenefitEnrollmentUpdateApi.medBenefitEnrollmentUpdatePut(this.medBenProgramId, enrollmentModel)\r\n // .then((response: pml.MedBenEnrollmentResultModel) => {\r\n // this.results =\r\n // `MedBenefitEnrollment Update Result: MemberNumber: ${response.memberNumber} ActivationDate: ${response.cardActivationDate}`;\r\n // }).catch((err) => {\r\n // alert('Failed: ' + err);\r\n // });\r\n //}\r\n\r\n\r\n //medBenefitPatientLookup() {\r\n // let patientLookup = {\r\n // \"firstName\": \"TEST\",\r\n // \"lastName\": \"LASTNAME\",\r\n // \"dateOfBirth\": \"03/01/1995\",\r\n // \"postalCode\": \"27615-1234\",\r\n // \"gender\": \"m\"\r\n // } as Models.Legacy.PatientLookupRequestModel\r\n\r\n // this.legacyEnrollmentService.MedBenefitPatientLookupApi.medBenefitPatientLookupPost(this.medBenProgramId, patientLookup)\r\n // .then((response: pml.PatientLookupResultModel) => {\r\n // this.results = `MedBenefit Patient Lookup: MemberNumber: ${response.memberNumber} PatientId: ${response.patientId} Enrollment: ${response.enrollments[0].enrollmentId}`;\r\n // }).catch((err) => {\r\n // alert('Failed: ' + err);\r\n // });\r\n //}\r\n\r\n //medBenefitPatientSearch() {\r\n\r\n // let patientSearch = {\r\n // \"firstName\": \"TEST\",\r\n // \"lastName\": null,\r\n // \"dateOfBirth\": null,\r\n // \"city\": null,\r\n // \"state\": null,\r\n // \"postalCode\": null,\r\n // \"country\": null,\r\n // \"memberNumber\": null,\r\n // \"gender\": \"m\",\r\n // \"enrollmentId\": null,\r\n // \"patientId\": null\r\n // } as Models.Legacy.MedBenPatientSearchRequestModel\r\n\r\n // this.legacyEnrollmentService.MedBenefitPatientSearchApi.medBenefitPatientSearchPost(this.medBenProgramId, patientSearch)\r\n // .then((response: pml.MedBenPatientSearchResultModel) => {\r\n // this.results =\r\n // `MedBenefit Patient Search: First Name: ${response.demographics.firstName} Last Name: ${response.demographics.lastName} Enrollment: ${response.enrollments[0].enrollmentId}`;\r\n\r\n // }).catch((err) => {\r\n // alert('Failed: ' + err);\r\n // });\r\n //}\r\n\r\n //medBenefitPrescriberUpsert(update: boolean) {\r\n // let medBenefitPrescriberCreate = {\r\n // \"firstName\": \"Bob\",\r\n // \"lastName\": \"Jones\",\r\n // \"phoneNumber\": {\r\n // \"phoneNumberId\": 0,\r\n // \"countryCode\": \"1\",\r\n // \"areaCode\": \"919\",\r\n // \"number\": \"5550511\",\r\n // \"primaryPhoneNumber\": true,\r\n // \"phoneType\": 0,\r\n // \"phoneTypeDescription\": null,\r\n // \"extension\": null\r\n // },\r\n // \"address1\": \"3516 E Jacaranda Ave\",\r\n // \"address2\": \"\",\r\n // \"city\": \"Orange\",\r\n // \"country\": \"US\",\r\n // \"state\": \"CA\",\r\n // \"postalCode\": \"92867\"\r\n\r\n // } as Models.Legacy.CreatePrescriberRequestModel\r\n\r\n // let medBenefitPrescriberUpdate = {\r\n // \"prescriberId\": \"5\",\r\n // \"firstName\": \"Bob\",\r\n // \"lastName\": \"Jones\",\r\n // \"phoneNumber\": {\r\n // \"phoneNumberId\": 0,\r\n // \"countryCode\": \"1\",\r\n // \"areaCode\": \"919\",\r\n // \"number\": \"5550511\",\r\n // \"primaryPhoneNumber\": true,\r\n // \"phoneType\": 0,\r\n // \"phoneTypeDescription\": null,\r\n // \"extension\": null\r\n // },\r\n // \"address1\": \"3516 E Jacaranda Ave\",\r\n // \"address2\": \"\",\r\n // \"city\": \"Orange\",\r\n // \"country\": \"US\",\r\n // \"state\": \"CA\",\r\n // \"postalCode\": \"92867\"\r\n\r\n // } as Models.Legacy.UpdatePrescriberRequestModel\r\n // if (!update) {\r\n\r\n // this.legacyEnrollmentService.MedBenefitPrescriberApi.medBenefitPrescriberPut(this.medBenProgramId, medBenefitPrescriberUpdate)\r\n // .then((response: pml.CreatePrescriberResultModel) => {\r\n // this.results = `Med benefit Create Prescriber: ${response.firstName} ${response.firstName} PrescriberId: ${response.prescriberId}`\r\n // }).catch((err) => {\r\n // alert('Failed: ' + err);\r\n // });\r\n // }\r\n // else {\r\n // this.legacyEnrollmentService.MedBenefitPrescriberApi.medBenefitPrescriberPost(this.medBenProgramId, medBenefitPrescriberCreate)\r\n // .then((response: pml.CreatePrescriberResultModel) => {\r\n // this.results = `Med benefit Update Prescriber: ${response.firstName} ${response.firstName} PrescriberId: ${response.prescriberId}`\r\n // }).catch((err) => {\r\n // alert('Failed: ' + err);\r\n // });\r\n // }\r\n //}\r\n\r\n //medBenefitSiteUpsert(update: boolean) {\r\n // let medBenefitSiteCreate = {\r\n // \"siteVerified\": true,\r\n // \"taxIdCaptured\": true,\r\n // \"name\": \"SomeSite\",\r\n // \"phoneNumber\": {\r\n // \"phoneNumberId\": 0,\r\n // \"countryCode\": \"1\",\r\n // \"areaCode\": \"919\",\r\n // \"number\": \"5550511\",\r\n // \"primaryPhoneNumber\": true,\r\n // \"phoneType\": 0,\r\n // \"phoneTypeDescription\": null,\r\n // \"extension\": null\r\n // },\r\n // \"address1\": \"3516 E Jacaranda Ave\",\r\n // \"address2\": \"\",\r\n // \"city\": \"Orange\",\r\n // \"country\": \"US\",\r\n // \"state\": \"CA\",\r\n // \"postalCode\": \"92867\"\r\n // } as Models.Legacy.CreateSiteRequestModel\r\n\r\n // let medBenefitSiteUpdate = {\r\n // \"siteId\": \"8\",\r\n // \"siteVerified\": true,\r\n // \"taxIdCaptured\": true,\r\n // \"name\": \"SomeSite\",\r\n // \"phoneNumber\": {\r\n // \"phoneNumberId\": 0,\r\n // \"countryCode\": \"1\",\r\n // \"areaCode\": \"919\",\r\n // \"number\": \"5550511\",\r\n // \"primaryPhoneNumber\": true,\r\n // \"phoneType\": 0,\r\n // \"phoneTypeDescription\": null,\r\n // \"extension\": null\r\n // },\r\n // \"address1\": \"3516 E Jacaranda Ave\",\r\n // \"address2\": \"\",\r\n // \"city\": \"Orange\",\r\n // \"country\": \"US\",\r\n // \"state\": \"CA\",\r\n // \"postalCode\": \"92867\"\r\n // } as Models.Legacy.UpdateSiteRequestModel\r\n\r\n // if (!update) {\r\n // this.legacyEnrollmentService.MedBenefitSiteApi.medBenefitSitePut(this.medBenProgramId, medBenefitSiteUpdate)\r\n // .then((response: pml.CreateSiteResultModel) => {\r\n // this.results = `Med benefit Create Site: SiteId: ${response.siteId} UpdateDate: ${response.lastUpdateDate}`;\r\n\r\n // }).catch((err) => {\r\n // alert('Failed: ' + err);\r\n // });\r\n // }\r\n // else {\r\n // this.legacyEnrollmentService.MedBenefitSiteApi.medBenefitSitePost(this.medBenProgramId, medBenefitSiteCreate)\r\n // .then((response: pml.CreateSiteResultModel) => {\r\n // this.results = `Med benefit Create Site: SiteId: ${response.siteId} UpdateDate: ${response.lastUpdateDate}`;\r\n\r\n // }).catch((err) => {\r\n // alert('Failed: ' + err);\r\n // });\r\n // }\r\n //}\r\n\r\n //resendCorrespondence() {\r\n // let resendCorrespondenceModel = {\r\n // \"memberNumber\": \"40847094309\",\r\n // \"orderReferenceNumber\": \"34964\"\r\n // } as Models.Legacy.ResendCorrespondenceRequestModel\r\n\r\n // this.legacyEnrollmentService.ResendCorrespondenceApi.resendCorrespondencePost(this.programId, resendCorrespondenceModel)\r\n // .then((response: pml.ResendCorrespondenceResultModel) => {\r\n // this.results =\r\n // `Resend Correspondence Result: MN: ${response.memberNumber} Old Order Reference number: ${response.oldOrderReferenceNumber}, New Order Reference number: ${response.newOrderReferenceNumber}`\r\n // }).catch((err) => {\r\n // alert('Failed: ' + err);\r\n // });\r\n //}\r\n\r\n verifySurveyAnswer() {\r\n let survey = {\r\n \"surveyId\": 0,\r\n \"questionId\": 10510,\r\n \"answerKey\": 8113,\r\n \"answerText\": \"Yes\"\r\n } as Models.Legacy.VerifySurveyEntryRequestModel\r\n\r\n this.legacyEnrollmentService.VerifySurveyAnswerApi.post(this.programId, survey)\r\n .then((response: pml.VerifySurveyEntryResultModel) => {\r\n this.results = `Verify Survey Answer Result: IsEligible: ${response.isEligible}`;\r\n }).catch((err) => {\r\n alert('Failed: ' + err);\r\n });\r\n }\r\n\r\n createCard() {\r\n this.legacyCardService.CreateCardApi.post(this.programId, 1).then((response: pml.CardCreatedModel[]) => {\r\n this.results = `Create Card Result: MemberNumber: ${response[0].memberNumber} Activation Date: ${response[0].cardActivationDate}`;\r\n }).catch((err) => {\r\n alert('Failed: ' + err);\r\n });\r\n }\r\n\r\n //medBenDebitCardActivation() {\r\n // let debitCard = {\r\n // \"memberNumber\": \"12345678910\",\r\n // \"patientId\": \"x4qfwG0ee0x06dg8YOGNkg~~\",\r\n // \"cardLastFourDigits\": \"3454\",\r\n // \"dateOfBirth\": \"07/12/2004\",\r\n // \"expirationDate\": \"02/18\"\r\n // } as Models.Legacy.CardActivationRequestModel\r\n\r\n // this.legacyCardService.MedBenefitDebitCardActivationApi.medBenefitDebitCardActivationPost(this.medBenProgramId, debitCard)\r\n // .then((response: pml.MedBenStandardResultModel) => {\r\n // this.results = `Debit Card Activation Result: MemberNumber: ${response.memberNumber} Activation Date: ${response.cardActivationDate}`;\r\n // }).catch((err) => {\r\n // alert('Failed: ' + err);\r\n // });\r\n //}\r\n\r\n //medBenDebitCardStatus() {\r\n // this.legacyCardService.MedBenefitDebitCardStatusApi.medBenefitDebitCardStatusGet(this.medBenProgramId, '40847094309', 'x4qfwG0ee0x06dg8YOGNkg%7E%7E')\r\n // .then((response: pml.CardStatusResultModel) => {\r\n // this.results = `Debit Card Status: ${response.memberNumber} Card Activation Date: ${response.cardActivationDate} Card balance: ${response.cardBalance}`;\r\n\r\n // })\r\n //}\r\n\r\n //medBenReplaceCard() {\r\n // let replaceCard = {\r\n // \"memberNumber\": \"40847094309\",\r\n // \"patientId\": \"x4qfwG0ee0x06dg8YOGNkg~~\"\r\n // } as Models.Legacy.MedBenCardReplaceRequestModel\r\n\r\n // this.legacyCardService.MedBenefitReplaceCardApi.medBenefitReplaceCardPost(this.medBenProgramId, replaceCard)\r\n // .then((response: pml.MedBenCardReplaceResultModel) => {\r\n // this.results = `Replace Card Result: MN: ${response.memberNumber} Ref#: ${response.orderReferenceNumber}`;\r\n\r\n // }).catch((err) => {\r\n // alert('Failed: ' + err);\r\n // });\r\n //}\r\n\r\n memberNumberStatus() {\r\n this.legacyCardService.MemberNumberStatusApi.get(this.medBenProgramId, '40847094309')\r\n .then((response: pml.MemberNumberStatusResultModel) => {\r\n this.results = `Member Number Status: MN: ${response.memberNumber}`\r\n\r\n }).catch((err) => {\r\n alert('Failed: ' + err);\r\n });\r\n\r\n }\r\n\r\n replaceCard() {\r\n let replaceCardModel = {\r\n \"memberNumber\": \"40847094309\"\r\n } as Models.Legacy.ReplaceCardRequestModel\r\n\r\n this.legacyCardService.ReplaceCardApi.post(this.programId, replaceCardModel)\r\n .then((response: pml.ReplaceCardResultModel) => {\r\n this.results = `Replace Card Result: MN: ${response.memberNumber} Ref#: ${response.orderReferenceNumber}`\r\n }).catch((err) => {\r\n alert('Failed: ' + err);\r\n });\r\n }\r\n terminateCard(){\r\n let terminateCard = {\r\n \"memberNumber\": \"60077945909\",\r\n \"terminateDate\": \"12/01/2017\"\r\n\r\n } as Models.Legacy.TerminateCardRequestModel\r\n\r\n this.legacyCardService.TerminateCardApi.put(this.programId, terminateCard)\r\n .then((response: never) => {\r\n this.results = 'Terminate Card Result: Card Terminated';\r\n }).catch((err) => {\r\n alert('Failed: ' + err);\r\n });\r\n }\r\n }\r\n}","namespace Portico.Controllers {\r\n\r\n import Inject = Portico.Decorators.Inject;\r\n import Controller = Portico.Decorators.Controller;\r\n\r\n import pm = Portico.Models;\r\n import pmi = Portico.Models.Interfaces;\r\n\timport ps = Portico.Services;\r\n\timport pt = Portico.Tfs;\r\n\r\n @Controller('app', 'appController')\r\n @Inject(\r\n '$interval',\r\n '$scope',\r\n '$location',\r\n 'actionService',\r\n 'dataService',\r\n 'enterpriseService',\r\n 'modalService',\r\n 'porticoService',\r\n 'serverConstants',\r\n 'dateService',\r\n 'tfsService',\r\n 'storageService')\r\n export class AppController {\r\n today: Date;\r\n rootUrl: string;\r\n\r\n constructor(\r\n private $interval: angular.IIntervalService,\r\n private $scope: angular.IScope,\r\n private $location: angular.ILocationService,\r\n private actionService: ps.IActionService,\r\n private dataService: ps.IDataService,\r\n private enterpriseService: ps.IEnterpriseService,\r\n private modalService: ps.IModalService,\r\n private porticoService: ps.IPorticoService,\r\n private serverConstants: pmi.IServerConstants,\r\n private dateService: ps.IDateService,\r\n private tfsService: pt.TfsService,\r\n\t\t\tprivate storageService: ps.StorageService\r\n ) {\r\n\t\t\tthis.today = new Date();\r\n\t\t\tthis.rootUrl = _.trimEnd(window.location.origin + window.location.pathname, '/') + '/';\r\n\r\n $interval(() => {\r\n const currentSession = this.storageService.getItem(pm.StorageType.Session, pm.SESSION_STORAGE_KEY) as pm.SessionDetail;\r\n\r\n if (currentSession) {\r\n if (currentSession.status === Models.SESSION_ACTIVE) {\r\n const now = new Date();\r\n\r\n now.setMinutes(now.getMinutes() + 5);\r\n\r\n if (currentSession.expirationDate <= now) {\r\n currentSession.status = Models.SESSION_EXPIRING;\r\n this.storageService.saveItem(Models.StorageType.Session, pm.SESSION_STORAGE_KEY, currentSession);\r\n\t\t\t\t\t\t\tthis.porticoService.modalService.show2(this.$scope, 'session-inactivity', 'modal-primary', '');\r\n }\r\n } else if (currentSession.status === Models.SESSION_EXPIRING) {\r\n const now = new Date();\r\n\r\n if (currentSession.expirationDate <= now) {\r\n currentSession.status = Models.SESSION_EXPIRED;\r\n this.storageService.saveItem(Models.StorageType.Session, pm.SESSION_STORAGE_KEY, currentSession);\r\n\t\t\t\t\t\t\tthis.porticoService.page('expired');\r\n }\r\n }\r\n }\r\n }, 500);\r\n }\r\n\r\n\t\tgetDate() {\r\n\t\t\treturn new Date();\r\n\t\t}\r\n }\r\n}","namespace Portico.Controllers {\r\n\timport Controller = Portico.Decorators.Controller;\r\n\r\n @Controller('app', 'intakeController')\r\n\texport class IntakeController {}\r\n}","namespace Portico.Controllers {\r\n import Controller = Portico.Decorators.Controller;\r\n\r\n @Controller('app', 'layoutController')\r\n export class LayoutController {}\r\n}","namespace Portico.Controllers {\r\n import Controller = Portico.Decorators.Controller;\r\n\r\n @Controller('app', 'pageController')\r\n export class PageController {}\r\n}","namespace Portico.Controllers {\r\n\r\n\timport Inject = Portico.Decorators.Inject;\r\n\timport Controller = Portico.Decorators.Controller;\r\n\r\n\timport pm = Portico.Models;\r\n\timport pme = Portico.Models.Enterprise;\r\n\timport pms = Portico.Models.Setup;\r\n\timport ps = Portico.Services;\r\n \r\n @Controller('app', 'sectionController')\r\n\t@Inject('$scope', 'accountService', 'dataService', 'enrollmentService', 'intakeService', 'porticoService', 'prescriberService', 'siteService', 'storageService')\r\n\texport class SectionController {\r\n\t\tbreadcrumbs: string[]; // ??? move to intake resolve ???\r\n\t\tstate: string;\r\n\r\n\t\tsearch: any;\r\n\t\tresults: any[];\r\n\r\n constructor(\r\n private $scope: angular.IScope,\r\n\t\t\tprivate accountService: ps.IAccountService,\r\n\t\t\tprivate dataService: ps.IDataService,\r\n\t\t\tprivate enrollmentService: ps.IEnrollmentService,\r\n\t\t\tprivate intakeService: ps.IIntakeService,\r\n\t\t\tprivate porticoService: ps.IPorticoService,\r\n\t\t\tprivate prescriberService: ps.IPrescriberService,\r\n\t\t\tprivate siteService: ps.ISiteService,\r\n\t\t\tprivate storageService: ps.IStorageService\r\n ) {\r\n\t\t\tconst account = this.dataService.session.account; // todo: try to avoid doing this\r\n\t\t\tconst intakeLayout = this.dataService.enterprise.intakeLayout; // todo: try to avoid doing this\r\n\r\n\t\t\tthis.breadcrumbs = [];\r\n\t\t\tthis.dataService.session.accountEdit = angular.copy(account); // todo: try to avoid doing this\r\n\t\t\tthis.state = '';\r\n\r\n\t\t\tfor (let i = 0; i < intakeLayout.layoutSections.length; i++) {\r\n\t\t\t\tconst layoutSection = intakeLayout.layoutSections[i];\r\n\t\t\t\tconst value = this.dataService.getDataValue('Section', 'IsBreadcrumb', layoutSection.name);\r\n\r\n\t\t\t\tif (value == 'true') {\r\n\t\t\t\t\tthis.breadcrumbs.push(layoutSection.name);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (this.dataService.state.section === 'start') {\r\n\t\t\t\tthis.porticoService.section('first', { r2s: this.dataService.state.r2s });\r\n\t\t\t}\r\n }\r\n\r\n\t\tisActiveBreadcrumb(section: string) {\r\n\t\t\treturn this.dataService.state.section === section;\r\n\t\t}\r\n\r\n\t\tisBreadcrumb() {\r\n\t\t\tconst value = this.dataService.getDataValue('Section', 'IsBreadcrumb', this.dataService.state.section);\r\n\t\t\treturn value == 'true';\r\n\t\t}\r\n\r\n\t\tisVisitedBreadcrumb(section: string) {\r\n\t\t\tconst intakeLayout = this.dataService.enterprise.intakeLayout;\r\n\r\n\t\t\tfor (let i = 0; i < intakeLayout.layoutSections.length; i++) {\r\n\t\t\t\tconst layoutSection = intakeLayout.layoutSections[i];\r\n\r\n\t\t\t\tif (layoutSection.name === this.dataService.state.section) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t} else if (layoutSection.name === section) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n }\r\n}","/*!\r\n * IE10 viewport hack for Surface/desktop Windows 8 bug\r\n * Copyright 2014-2015 Twitter, Inc.\r\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\r\n */\r\n\r\n// See the Getting Started docs for more information:\r\n// http://getbootstrap.com/getting-started/#support-ie10-width\r\n\r\n(() => {\r\n if (navigator.userAgent.match(/IEMobile\\/10\\.0/)) {\r\n var msViewportStyle = document.createElement('style');\r\n msViewportStyle.appendChild(document.createTextNode('@-ms-viewport{width:auto!important}'));\r\n document.querySelector('head').appendChild(msViewportStyle);\r\n }\r\n})();"]}