File tree Expand file tree Collapse file tree 3 files changed +15
-17
lines changed
application/presenter/api/process Expand file tree Collapse file tree 3 files changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ data class SurgicalProcessDto(
3232 val type : String ,
3333 val patientId : String ,
3434 val healthProfessionalId : String ,
35- val preOperatingRoom : ProcessData .RoomWithType ,
36- val operatingRoom : ProcessData .RoomWithType ,
35+ val preOperatingRoom : ProcessData .RoomWithType ? ,
36+ val operatingRoom : ProcessData .RoomWithType ? ,
3737 val state : String ,
3838 val step : String ,
3939)
Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ data class SurgicalProcess(
2828 val type : String ,
2929 val patientId : ProcessData .PatientId ,
3030 val healthProfessionalId : ProcessData .HealthProfessionalId ,
31- val preOperatingRoom : ProcessData .RoomWithType ,
32- val operatingRoom : ProcessData .RoomWithType ,
31+ val preOperatingRoom : ProcessData .RoomWithType ? ,
32+ val operatingRoom : ProcessData .RoomWithType ? ,
3333 val state : ProcessData .ProcessState ,
3434 val step : ProcessData .ProcessStep ,
3535)
Original file line number Diff line number Diff line change @@ -115,20 +115,18 @@ class WebClient(vertx: Vertx) :
115115 preOperatingRoomId : RoomData .RoomId ? ,
116116 operatingRoomId : RoomData .RoomId ? ,
117117 ): Future <SurgicalProcess ?> =
118- client.getAbs(" $SPMS_URI /processes" ).send().run {
119- map {
120- if (it.statusCode() == HttpResponseStatus .OK .code()) {
121- Json .decodeFromString<ResponseEntryList <SurgicalProcessDto >>(
122- it.bodyAsString(),
123- ).entries.map { processDto ->
124- processDto.toSurgicalProcess()
125- }.firstOrNull { process ->
126- process.preOperatingRoom.id.id == preOperatingRoomId?.id ||
127- process.operatingRoom.id.id == operatingRoomId?.id
128- }
129- } else {
130- null
118+ client.getAbs(" $SPMS_URI /processes" ).send().map {
119+ if (it.statusCode() == HttpResponseStatus .OK .code()) {
120+ Json .decodeFromString<ResponseEntryList <SurgicalProcessDto >>(
121+ it.bodyAsString(),
122+ ).entries.map { processDto ->
123+ processDto.toSurgicalProcess()
124+ }.firstOrNull { process ->
125+ process.preOperatingRoom?.id?.id == preOperatingRoomId?.id ||
126+ process.operatingRoom?.id?.id == operatingRoomId?.id
131127 }
128+ } else {
129+ null
132130 }
133131 }
134132
You can’t perform that action at this time.
0 commit comments