Skip to content

Commit 7e401d2

Browse files
giacomoaccursiandrea-acampora
authored andcommitted
chore: add surgicalProcessId as parameter of surgery report integration usecase
1 parent dea89bd commit 7e401d2

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/main/kotlin/usecase/SurgeryReportIntegrationUseCase.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ import usecase.repository.SurgeryReportRepository
1616
* Class that models surgery report integration use case.
1717
*/
1818
class SurgeryReportIntegrationUseCase(
19+
private val surgicalProcessId: String,
1920
private val integration: SurgeryReportIntegration,
2021
private val repository: SurgeryReportRepository,
2122
) : UseCase<Future<Boolean>> {
2223

23-
override fun execute(): Future<Boolean> = repository.integrateReport(integration)
24+
override fun execute(): Future<Boolean> = repository.integrateReport(surgicalProcessId, integration)
2425
}

src/main/kotlin/usecase/repository/SurgeryReportRepository.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
package usecase.repository
1010

1111
import entity.surgeryreport.SurgeryReportEntry
12-
import entity.surgeryreport.SurgeryReportInfo
1312
import entity.surgeryreport.SurgeryReportIntegration
13+
import entity.surgeryreport.report.SurgeryReport
1414
import io.vertx.core.Future
1515

1616
/**
@@ -26,11 +26,12 @@ interface SurgeryReportRepository {
2626
/**
2727
* get the surgery report info given the [processId].
2828
*/
29-
fun getSurgeryReportInfo(processId: String): Future<SurgeryReportInfo>
29+
fun getSurgeryReportInfo(processId: String): Future<SurgeryReport>
3030

3131
/**
3232
* Integrate the surgery report.
33+
* @param surgicalProcessId the id of the surgical process.
3334
* @param surgeryReportIntegration the integration of the surgery report.
3435
*/
35-
fun integrateReport(surgeryReportIntegration: SurgeryReportIntegration): Future<Boolean>
36+
fun integrateReport(surgicalProcessId: String, surgeryReportIntegration: SurgeryReportIntegration): Future<Boolean>
3637
}

0 commit comments

Comments
 (0)