Open adunsulag opened 1 year ago
I'm the one who put base in mainly for API services. Perhaps we could have done it differently but I wouldn't have expected any extensive routines as it mainly was a target for utility's/helpers. But I may have broken that rule with the query builder.
The BaseService class does a hit to the database for the database fields available for the table. Several class constructors in the Telehealth module instantiates the instances of the BaseService such as AppointmentService and TeleHealthUserRepository.
Anywhere we are subscribing to events needs to defer instantiation of these classes to mitigate the db hit. A future enhancement might be to have some kind of cache generation for our service classes for tables that don't have connection to LBF. No point in hitting the database to find the fields when they should be static at runtime.