Skip to content

Commit

Permalink
refactor: change name of the surgical process description
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaGiulianelli committed May 18, 2023
1 parent 1749da3 commit f54a9ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/main/kotlin/entity/process/SurgicalProcess.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,25 @@ import entity.healthcareuser.PatientID
import entity.healthcareuser.TaxCode
import entity.healthprofessional.HealthProfessionalID
import entity.room.RoomID
import java.time.Instant

/**
* It models the data associated to a surgical process that is happened inside the Operating Block.
* Each process is identified by its [id] and it has a [type] that describes it.
* Each process is identified by its [id] and it has a [description].
* Moreover, a surgical process during its progress pass between several [processStates].
* The surgical process, obviously is a surgery that involve a [patientID], that when possible has a [taxCode]
* associated, under the responsibility of a [inChargeHealthProfessional].
* The process happens in two rooms of the Operating Block: the [preOperatingRoom] and the [operatingRoom].
*/
data class SurgicalProcess(
val id: SurgicalProcessID,
val type: String,
val description: String,
val patientID: PatientID,
val inChargeHealthProfessional: HealthProfessionalID,
val preOperatingRoom: RoomID,
val operatingRoom: RoomID,
val taxCode: TaxCode? = null,
val processStates: List<SurgicalProcessState> = listOf(),
val processStates: List<Pair<Instant, SurgicalProcessState>> = listOf(),
) {
override fun equals(other: Any?): Boolean = when {
other === this -> true
Expand Down
2 changes: 1 addition & 1 deletion src/test/kotlin/entity/process/SurgicalProcessTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class SurgicalProcessTest : StringSpec({
RoomID("preOp1"),
RoomID("op1"),
)
val surgicalProcessUpdated = surgicalProcess.copy(type = "type updated")
val surgicalProcessUpdated = surgicalProcess.copy(description = "description updated")
val differentSurgicalProcess = surgicalProcess.copy(id = SurgicalProcessID("sp2"))

"surgical process id should not be empty" {
Expand Down

0 comments on commit f54a9ae

Please sign in to comment.