Skip to content

Commit

Permalink
chore: change return type of patient medical data
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-acampora committed Mar 29, 2023
1 parent 3f9a44d commit a1dd8b7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class PatientDataController(
patientId: PatientData.PatientId,
from: Instant,
to: Instant
): Map<Instant, PatientData.MedicalData> =
): List<Pair<Instant, PatientData.MedicalData>> =
patientMedicalDataDatabaseManager.getPatientMedicalData(patientId, from, to)

override fun getCurrentPatientMedicalData(patientId: PatientData.PatientId): PatientData.MedicalData? =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface PatientMedicalDataDatabaseManager {
patientId: PatientData.PatientId,
from: Instant,
to: Instant
): Map<Instant, PatientData.MedicalData>
): List<Pair<Instant, PatientData.MedicalData>>

/**
* Get current patient medical data given the patient id.
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/application/service/PatientDataServices.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ object PatientDataServices {
private val from: Instant,
private val to: Instant,
private val patientRepository: PatientRepository
) : ApplicationService<Map<Instant, PatientData.MedicalData>> {
override fun execute(): Map<Instant, PatientData.MedicalData> =
) : ApplicationService<List<Pair<Instant, PatientData.MedicalData>>> {
override fun execute(): List<Pair<Instant, PatientData.MedicalData>> =
patientRepository.getPatientMedicalData(
patientId,
from,
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/usecase/repository/PatientRepository.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface PatientRepository {
patientId: PatientData.PatientId,
from: Instant,
to: Instant
): Map<Instant, PatientData.MedicalData>
): List<Pair<Instant, PatientData.MedicalData>>

/**
* Get current patient medical data given the patient id.
Expand Down

0 comments on commit a1dd8b7

Please sign in to comment.