import {Provider, inject} from '@loopback/core'; import {Count} from '@loopback/repository'; import {getService} from '@loopback/service-proxy'; import {SuccessResponse} from '@sourcefuse-npm/alivio-lib'; import { Appointment } from '@sourcefuse-npm/patient-facade'; import {AppointmentFeedbackServiceDataSource} from '../datasources'; import {AppointmentHealth, AppointmentStatusModel} from '../models'; /* * Fix the service type. Possible options can be: * - import {PatientDetailsService} from 'your-module'; * - export type PatientDetailsService = string; * - export interface PatientDetailsService {} */ export interface AppointmentFeedbackService { create( id:number, appointmentHealth: Omit, token?: string, ): Promise; find( id: number, token?: string, ): Promise; updateAll( appointmentHealth: AppointmentHealth, id?: number, token?: string, ): Count | Promise; updateAppoinmentStatus( id: number, status: Partial, token?: string, ): Promise; deleteById(id: number, token?: string): Promise; updateAppoinement(id:number, appointment: Partial, token?: string):Promise; updatePrescriptionStatus( patientId: number, token?: string, ): Promise; } export class AppointmentFeedbackServiceProvider implements Provider { constructor( @inject('datasources.AppointmentFeedbackService') protected dataSource: AppointmentFeedbackServiceDataSource = new AppointmentFeedbackServiceDataSource(), ) {} value(): Promise { return getService(this.dataSource); } }