Skip to content

Commit e0e6255

Browse files
committed
update timezone
1 parent 92bfc89 commit e0e6255

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ RUN gradle :server:buildFatJar --no-daemon
1515

1616
# Stage 3: Create the Runtime Image
1717
FROM amazoncorretto:22 AS runtime
18+
ENV TZ="Africa/Blantyre"
1819
EXPOSE 4040
1920
RUN mkdir /app
2021
COPY --from=build /usr/src/app/server/build/libs/*.jar /app/ktor-app.jar

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ services:
66
ports:
77
- "49100:4040"
88
environment:
9+
- TZ:"Africa/Blantyre"
910
- KEYCLOAK_ID:${KEYCLOAK_ID}
1011
- KEYCLOAK_SECRET:${KEYCLOAK_SECRET}
1112
- KEYCLOAK_ISSUER:${KEYCLOAK_ISSUER}

server/src/main/kotlin/org/dtree/fhir/server/services/PatientType.kt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,22 @@ suspend fun fetchDataTest(client: FhirClient, actions: List<FilterFormData>): Fa
7171
val group = mapKeyToTitle(it.key)
7272
GroupedSummaryItem(
7373
groupKey = it.key,
74-
groupTitle = group.first,
74+
groupTitle = group.title,
7575
summaries = it.value,
76-
order = group.second,
76+
order = group.order,
77+
startCollapsed = group.startCollapsed,
7778
)
7879
},
7980
date = LocalDate.now(), generatedDate = LocalDateTime.now(),
8081
)
8182
}
8283

83-
fun mapKeyToTitle(key: String): Pair<String, Int> {
84+
fun mapKeyToTitle(key: String): GroupMeta {
8485
return when (key) {
85-
"visits" -> Pair("Today's visits", 1)
86-
"tasks" -> Pair("Today's Tasks", 2)
87-
"newPatients" -> Pair("New clients today", 3)
88-
else -> Pair("Facility Patient totals", 0)
86+
"visits" -> GroupMeta("Today's visits", 1)
87+
"tasks" -> GroupMeta("Today's Tasks", 2)
88+
"newPatients" -> GroupMeta("New clients today", 3)
89+
else -> GroupMeta("Facility Patient totals", 0, true)
8990
}
9091
}
9192

server/src/main/kotlin/org/dtree/fhir/server/services/ResultDataOld.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,23 @@ package org.dtree.fhir.server.services
33
import java.time.LocalDate
44
import java.time.LocalDateTime
55

6-
data class FacilityResultData(val groups: List<GroupedSummaryItem>, val date: LocalDate, val generatedDate: LocalDateTime)
6+
data class FacilityResultData(
7+
val groups: List<GroupedSummaryItem>,
8+
val date: LocalDate,
9+
val generatedDate: LocalDateTime,
10+
)
711

812
data class GroupedSummaryItem(
913
val groupKey: String,
1014
val groupTitle: String,
1115
val summaries: List<SummaryItem>,
1216
val order: Int,
17+
val startCollapsed: Boolean = false,
1318
)
1419

1520
data class SummaryItem(val name: String, val value: Int)
1621

1722

23+
data class GroupMeta(val title: String, val order: Int, val startCollapsed: Boolean = false,)
24+
1825
data class ResultDataOld(val summaries: List<SummaryItem>, val date: List<String>?)

0 commit comments

Comments
 (0)