import {inject} from '@loopback/core'; import {juggler} from '@loopback/repository'; import config from './patient-care-plan-details-service.datasource.json'; // Observe application's life cycle to disconnect the datasource when // application is stopped. This allows the application to be shut down // gracefully. The `stop()` method is inherited from `juggler.DataSource`. // Learn more at https://loopback.io/doc/en/lb4/Life-cycle.html export class PatientCarePlanDetailsServiceDataSource extends juggler.DataSource { static dataSourceName = 'PatientCarePlanDetailsService'; static readonly defaultConfig = config; constructor( @inject('datasources.config.PatientCarePlanDetailsService', { optional: true, }) dsConfig: object = config, ) { Object.assign(dsConfig, { options: {baseUrl: process.env.PATIENT_ONBOARDING_SERVICE_URL}, }); super(dsConfig); } }