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,YAAoB0F,0BARZvF,mBAAgB,IAAIwF,KAU5BrB,WACEnE,KAAKuF,gBAAgBE,IAAIzF,KAAK0F,IAAIC,mBAAoB3F,KAAK0F,IAAIE,UAAW5F,KAAK0F,IAAIG,uBAChFhE,MAAKiE,OAAU9F,KAAK+F,gBACpBC,UAAUC,IACTjG,KAAKiG,SAAWA,EAChBjG,KAAKkG,gBAAiB,IAI5BC,cACEnG,KAAK+F,cAAcK,OACnBpG,KAAK+F,cAAcM,yDAtBVf,GAAwBjF,qCAAxBiF,EAAwBlB,kODXrC/D,4BAAyCA,kECW5BiF,GAAb,GA0BM,SAAyB,kCCrCxB,IAAKgB,EAKX,MALD,OAAYA,QAAY,KACpBA,6CACAA,uCACAA,qCACAA,qCAJQA,EAAZ,IAAYA,GAKX,EALWA,sHCYL,IAAMC,EAAb,MAAM,QAEJ1G,YACU2G,EACAC,EACqBC,GAFrB1G,+BACAA,gCACqBA,kBAG/Bc,QAAQC,EAA+BC,GAErC,OAAK2F,QAAkB3G,KAAK0G,YAIrB1G,KAAKyG,yBAAyBG,gBAAgB/E,MAC/CoB,OAAO4D,GAAeA,IACtBC,OAAK,IACLhF,OAAU,IAID9B,KAAKwG,wBAAwBO,eAFLhG,EAAMY,OAAOqF,mBAR3CC,QAAG,kDAXHV,GAA8BlG,4BAK/B6G,mCALCX,EAA8BjG,QAA9BiG,EAA8B,qBAF7B,SAEDA,GAAb,EAAaA","names":["LoginService","constructor","authService","isLoggedIn","this","isLoggedInFull","login","username","password","i0","factory","ClinicHistoryByHashResolver","locale","baseService","clinicHistoryServices","doctorService","publicProfileService","router","resolve","route","_","currentNavigation","getCurrentNavigation","r","s","extras","_a","state","getClinicHistoryByHash","queryParams","id","params","idHistoriaClinica","pipe","switchMap","getDoctorLicense","bind","clinicHistory","lincese$","getLicense","idResponsableAtencion","profile$","getPublicProfileByIds","forkJoin","map","license","profile","mapFinalResponse","arg1","arg2","informacionResponsableServicio","firma","documentosFirma","filter","x","idDocumento","idDocumentoImagenFirma","direccionUbicacionWeb","licencia","licenciasProfesional","idIdentificacionPersona","idIdentificacionIdoneidadProfesionalDefault","direccionUbicacionFotoMedico","ubicacionFoto","nombreIdentificacionPerfil","nombreResponsableServicio","nombrePersona","Object","avatarModel","L10N_LOCALE","CliniwebDirectoryLinkComponent","ngOnInit","selectors","WorkflowDynamicComponent","resolveComponentFactory","loadWorkflowComponent","componentModel","factoryClass","WorkflowLookupRegistry","nombreComponente","viewContainerRef","dynamicHost","clear","componentRef","createComponent","instance","model","data","componentData","DynamicHostDirective","WorkflowManagerComponent","workflowService","Subject","get","dto","idTipoFlujoTrabajo","idEmpresa","idResponsableServicio","takeUntil","ngUnsubscribe","subscribe","workflow","workflowLoaded","ngOnDestroy","next","complete","WorkflowType","RequestToVerifySummaryResolver","requestsToVerifyService","appInitializationService","platformId","isPlatformBrowser","isInitialized","initialized","take","getSummaryData","idVerificacion","of","PLATFORM_ID"],"sourceRoot":"webpack:///","sources":["./src/app/modules/login/login.service.ts","./src/app/modules/medical-orders/resolvers/clinic-history-by-hash.resolver.ts","./src/app/shared/components/cliniweb-directory-link/cliniweb-directory-link.component.html","./src/app/shared/components/cliniweb-directory-link/cliniweb-directory-link.component.ts","./src/app/shared/components/workflows/workflow-dynamic/workflow-dynamic.component.ts","./src/app/shared/components/workflows/workflow-dynamic/workflow-dynamic.component.html","./src/app/shared/components/workflows/workflow-manager/workflow-manager.component.html","./src/app/shared/components/workflows/workflow-manager/workflow-manager.component.ts","./src/app/shared/enums/workflow-type.enum.ts","./src/app/shared/resolvers/request-to-verify-summary.resolver.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { AuthService } from 'src/app/core/services/auth.service';\nimport { LoginResponse } from 'src/app/shared/models/login-response.model';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LoginService {\n\n constructor(private authService: AuthService){ }\n\n isLoggedIn(): Observable{\n return this.authService.isLoggedInFull();\n }\n\n login(username: string, password: string): Observable{\n return this.authService.login(username, password);\n }\n}\n","import { Inject, Injectable } from \"@angular/core\";\r\nimport { ActivatedRouteSnapshot, Resolve, Router, RouterStateSnapshot } from \"@angular/router\";\r\nimport { L10N_LOCALE, L10nLocale } from \"angular-l10n\";\r\nimport { forkJoin, Observable } from \"rxjs\";\r\nimport { map, switchMap } from \"rxjs/operators\";\r\nimport { BaseService } from \"src/app/core/services/base.service\";\r\nimport { ClinicHistoryService } from \"src/app/core/services/clinic-history.service\";\r\nimport { DoctorService } from \"src/app/core/services/doctors.service\";\r\nimport { PublicProfileService } from \"src/app/core/services/public-profile.service\";\r\nimport { ClinicHistoryHashed } from \"src/app/shared/models/clinic-history/clinic-history-hashed.model\";\r\nimport { LicenseDoctor } from \"src/app/shared/models/clinic-history/license-doctor.model\";\r\nimport { LicenseDoctorInfo } from \"src/app/shared/models/people/license-doctor-info.mode\";\r\nimport { LicenseDoctorItem } from \"src/app/shared/models/people/lincese-doctor-item.model\";\r\nimport { PublicProfile } from \"src/app/shared/models/people/public-profile.model\";\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ClinicHistoryByHashResolver implements Resolve {\r\n \r\n constructor(\r\n @Inject(L10N_LOCALE) public locale: L10nLocale,\r\n private baseService: BaseService,\r\n private clinicHistoryServices: ClinicHistoryService,\r\n private doctorService: DoctorService,\r\n private publicProfileService: PublicProfileService,\r\n private router: Router\r\n ) { }\r\n\r\n resolve(route: ActivatedRouteSnapshot, _: RouterStateSnapshot): ClinicHistoryByHashResult | Observable {\r\n const currentNavigation = this.router.getCurrentNavigation();\r\n const idHistoriaClinica = /*route.params['idHistoriaClinica'] || */route.queryParams['id'] || route.params['id'];\r\n\r\n return currentNavigation?.extras?.state as ClinicHistoryByHashResult || this.getClinicHistoryByHash(idHistoriaClinica);\r\n }\r\n\r\n private getClinicHistoryByHash(idHistoriaClinica: string,): Observable {\r\n return this.clinicHistoryServices.getClinicHistoryByHash(idHistoriaClinica).pipe(switchMap(this.getDoctorLicense.bind(this)));\r\n }\r\n\r\n private getDoctorLicense(clinicHistory: ClinicHistoryHashed) {\r\n const lincese$ = this.doctorService.getLicense(clinicHistory.idResponsableAtencion);\r\n const profile$ = this.publicProfileService.getPublicProfileByIds([clinicHistory.idResponsableAtencion]);\r\n return forkJoin([lincese$, profile$]).pipe(map(([license, profile]) => this.mapFinalResponse(clinicHistory, license, profile[0])));\r\n }\r\n\r\n private mapFinalResponse(clinicHistory: ClinicHistoryHashed, arg1: LicenseDoctor, arg2: PublicProfile | null): ClinicHistoryByHashResult {\r\n const informacionResponsableServicio = arg1.informacionResponsableServicio;\r\n const firma = arg1.documentosFirma.filter(x => x.idDocumento == informacionResponsableServicio.idDocumentoImagenFirma).map(x => x.direccionUbicacionWeb)[0];\r\n const licencia = arg1.licenciasProfesional.filter(x => x.idIdentificacionPersona == informacionResponsableServicio.idIdentificacionIdoneidadProfesionalDefault)[0];\r\n\r\n informacionResponsableServicio.direccionUbicacionFotoMedico = informacionResponsableServicio.direccionUbicacionFotoMedico || arg2?.ubicacionFoto || '';\r\n informacionResponsableServicio.nombreIdentificacionPerfil = informacionResponsableServicio.nombreIdentificacionPerfil || arg2?.username || '';\r\n informacionResponsableServicio.nombreResponsableServicio = informacionResponsableServicio.nombreResponsableServicio || arg2?.nombrePersona || '';\r\n\r\n return { avatarModel: informacionResponsableServicio, firma, licencia, ...clinicHistory };\r\n }\r\n\r\n}\r\n\r\nexport interface ClinicHistoryByHashResult extends ClinicHistoryHashed {\r\n avatarModel: LicenseDoctorInfo;\r\n firma: string;\r\n licencia: LicenseDoctorItem;\r\n}\r\n","","import { Component, Inject, OnInit } from '@angular/core';\nimport { L10N_LOCALE, L10nLocale } from 'angular-l10n';\n\n@Component({\n selector: 'app-cliniweb-directory-link',\n templateUrl: './cliniweb-directory-link.component.html',\n styleUrls: ['./cliniweb-directory-link.component.css']\n})\nexport class CliniwebDirectoryLinkComponent implements OnInit {\n\n numberOfDoctors = \"+3K\";\n doctors = [\n \"https://cdn.aspstatic.com/Documentos/cusa/35/18_20200402031800.jpg\",\n \"https://cdn.aspstatic.com/Documentos/CAFE/101/107_20210328115529.jpg\",\n \"https://cdn.aspstatic.com/Documentos/CIF/1/22_20190719095606.jpg\"\n ];\n\n constructor(@Inject(L10N_LOCALE) public locale: L10nLocale) { }\n\n ngOnInit(): void {\n }\n\n}\n","import { Component, ComponentFactoryResolver, ComponentRef, Input, OnInit, ViewChild } from '@angular/core';\nimport { WorkflowLookupRegistry } from 'src/app/shared/decorators/workflow-lookup.decorator';\nimport { DynamicHostDirective } from 'src/app/shared/directives/dynamic-host.directive';\nimport { IWorkflowComponent } from 'src/app/shared/interfaces/workflow-component';\nimport { Workflow } from 'src/app/shared/models/systems/workflow.model';\n\n@Component({\n selector: 'app-workflow-dynamic',\n templateUrl: './workflow-dynamic.component.html',\n styleUrls: ['./workflow-dynamic.component.css']\n})\nexport class WorkflowDynamicComponent implements OnInit {\n\n @Input() componentModel: Workflow;\n @Input() componentData: any;\n @ViewChild(DynamicHostDirective, {static: true}) dynamicHost: DynamicHostDirective;\n\n componentRef: ComponentRef;\n\n constructor(private resolveComponentFactory: ComponentFactoryResolver){}\n\n ngOnInit(): void {\n this.loadWorkflowComponent();\n }\n\n private loadWorkflowComponent(){\n if(!this.componentModel) return;\n\n const factoryClass = WorkflowLookupRegistry.get(this.componentModel.nombreComponente);\n\n if(!factoryClass) return;\n\n const factory = this.resolveComponentFactory.resolveComponentFactory(factoryClass);\n\n const viewContainerRef = this.dynamicHost.viewContainerRef;\n viewContainerRef.clear();\n\n this.componentRef = viewContainerRef.createComponent(factory);\n\n this.componentRef.instance.model = this.componentModel;\n this.componentRef.instance.data = this.componentData;\n }\n\n}\n","\n","
\n \n \n
\n\n","import { Component, Input, OnInit } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { WorkflowService } from 'src/app/core/services/workflow.service';\nimport { Workflow } from 'src/app/shared/models/systems/workflow.model';\n\n@Component({\n selector: 'app-workflow-manager',\n templateUrl: './workflow-manager.component.html',\n styleUrls: ['./workflow-manager.component.css']\n})\nexport class WorkflowManagerComponent implements OnInit {\n private ngUnsubscribe = new Subject();\n\n @Input() dto:WorkFlowManagerDto;\n\n workflow: Workflow;\n\n workflowLoaded: boolean;\n\n constructor(private workflowService: WorkflowService) { }\n\n ngOnInit(): void {\n this.workflowService.get(this.dto.idTipoFlujoTrabajo, this.dto.idEmpresa, this.dto.idResponsableServicio)\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe(workflow=>{\n this.workflow = workflow;\n this.workflowLoaded = true;\n });\n }\n\n ngOnDestroy() {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n }\n}\n\nexport class WorkFlowManagerDto{\n idTipoFlujoTrabajo: number;\n idEmpresa?: number;\n idResponsableServicio?: number; \n data: any;\n}\n","export enum WorkflowType {\n ONLINE_APPOINTMENT = 1,\n ONLINE_PAYMENT = 2,\n MEDICAL_ORDER = 3,\n GROWTH_CURVES = 4\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport { Inject, Injectable, PLATFORM_ID } from '@angular/core';\nimport { Resolve, RouterStateSnapshot, ActivatedRouteSnapshot } from '@angular/router';\nimport { Observable, of } from 'rxjs';\nimport { filter, switchMap, take } from 'rxjs/operators';\nimport { AppInitializationService } from 'src/app/core/services/app-initializer.service';\nimport { RequestsToVerifyService } from 'src/app/core/services/requests-to-verify.service';\nimport { RequestToVerifySummary } from 'src/app/shared/interfaces/request-to-verify-summary';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RequestToVerifySummaryResolver implements Resolve\n{\n constructor(\n private requestsToVerifyService: RequestsToVerifyService,\n private appInitializationService: AppInitializationService,\n @Inject(PLATFORM_ID) private platformId: Object\n ) {}\n\n resolve(route: ActivatedRouteSnapshot, _: RouterStateSnapshot): Observable {\n\n if (!isPlatformBrowser(this.platformId)) {\n return of({} as RequestToVerifySummary); // Si no es navegador, permitir la navegaciĆ³n (en SSR no bloquea)\n }\n\n return this.appInitializationService.isInitialized().pipe(\n filter(initialized => initialized), // Esperar hasta que sea `true`\n take(1), // Tomar solo el primer valor `true`\n switchMap(() => {\n \n const idVerificacion: string = route.params.idVerificacion;\n\n return this.requestsToVerifyService.getSummaryData(idVerificacion);\n })\n );\n }\n}\n"]}