Skip to content

Commit

Permalink
feat: create health professional application service
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-acampora committed Feb 26, 2023
1 parent 73c7b46 commit 737cdbd
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/main/kotlin/application/service/HealthProfessionalService.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright (c) 2023. Smart Operating Block
*
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/

package application.service

import entity.healthprofessional.HealthProfessional
import usecase.repository.HealthProfessionalRepository

/**
* The application service for health professionals management.
* @param healthProfessionalRepository the repository to access health professionals data.
*/
class HealthProfessionalService(private val healthProfessionalRepository: HealthProfessionalRepository) {

/** Get a health professional given its [healthProfessionalId]. */
fun getHealthProfessional(healthProfessionalId: String): HealthProfessional? =
healthProfessionalRepository.getHealthProfessional(healthProfessionalId)

/** Create a [HealthProfessional]. */
fun createHealthProfessional(healthProfessional: HealthProfessional): HealthProfessional? =
healthProfessionalRepository.createHealthProfessional(healthProfessional)

/** Delete a [HealthProfessional] given its [healthProfessionalId]. */
fun deleteHealthProfessional(healthProfessionalId: String): Boolean =
healthProfessionalRepository.deleteHealthProfessional(healthProfessionalId)
}

0 comments on commit 737cdbd

Please sign in to comment.