generated from SmartOperatingBlock/kotlin-template-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add medical device model representation in incoming events
- Loading branch information
1 parent
b63b527
commit 242743c
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
60 changes: 60 additions & 0 deletions
60
src/main/kotlin/application/presenter/event/model/MedicalDeviceEventData.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* 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.presenter.event.model | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
/** | ||
* Presenter class that represents data about an Implantable medical device. | ||
* It has data about the [id] and the [type] of it. | ||
*/ | ||
@Serializable | ||
data class ImplantableMedicalDeviceEventDto( | ||
val id: ImplantableMedicalDeviceIDEventDto, | ||
val type: ImplantableMedicalDeviceTypeEventDto, | ||
) | ||
|
||
/** | ||
* Presenter class for the [id] of [ImplantableMedicalDeviceEventDto]. | ||
*/ | ||
@Serializable | ||
data class ImplantableMedicalDeviceIDEventDto(val id: String) | ||
|
||
/** The type of [ImplantableMedicalDeviceEventDto]. */ | ||
@Serializable | ||
enum class ImplantableMedicalDeviceTypeEventDto { | ||
PACE_MAKER, | ||
CATHETER, | ||
} | ||
|
||
/** | ||
* Presenter class that represents data about a Medical technology. | ||
* It has data about the [id], the [name], the [description], its [type] and if it is [inUse] or not. | ||
*/ | ||
@Serializable | ||
data class MedicalTechnologyEventDto( | ||
val id: MedicalTechnologyIDEventDto, | ||
val name: String, | ||
val description: String? = null, | ||
val type: MedicalTechnologyTypeEventDto, | ||
val inUse: Boolean, | ||
) | ||
|
||
/** | ||
* Presenter class for the [id] of [MedicalTechnologyEventDto]. | ||
*/ | ||
@Serializable | ||
data class MedicalTechnologyIDEventDto(val id: String) | ||
|
||
/** The type of [MedicalTechnologyEventDto]. */ | ||
@Serializable | ||
enum class MedicalTechnologyTypeEventDto { | ||
ENDOSCOPE, | ||
X_RAY, | ||
} |