Skip to content

Commit cd8ab97

Browse files
authored
Update deps (#6)
* update * fix dependency crash * update kotlin version * Add clean all future dates route
1 parent c0e9448 commit cd8ab97

File tree

24 files changed

+272
-73
lines changed

24 files changed

+272
-73
lines changed

.idea/kotlinc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Stage 1: Cache Gradle dependencies
2-
FROM gradle:7.6.1-jdk17 AS cache
2+
FROM gradle:7.6.3-jdk17 AS cache
33
RUN mkdir -p /home/gradle/cache_home
44
ENV GRADLE_USER_HOME /home/gradle/cache_home
55
COPY . /home/gradle/app/
66
WORKDIR /home/gradle/app
77
RUN gradle clean build -i --stacktrace
88

99
# Stage 2: Build Application
10-
FROM gradle:7.6.1-jdk17 AS build
10+
FROM gradle:7.6.3-jdk17 AS build
1111
COPY --from=cache /home/gradle/cache_home /home/gradle/.gradle
1212
COPY . /usr/src/app/
1313
WORKDIR /usr/src/app

core/src/main/kotlin/org/dtree/fhir/core/fixes/CarePlanFixes.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import org.dtree.fhir.core.utils.*
1212
import io.github.cdimascio.dotenv.Dotenv
1313
import io.github.cdimascio.dotenv.dotenv
1414
import kotlinx.coroutines.runBlocking
15+
import org.dtree.fhir.core.di.FhirProvider
1516
import org.dtree.fhir.core.utils.extractId
1617
import org.dtree.fhir.core.utils.isCompleted
1718
import org.dtree.fhir.core.utils.isStarted
@@ -42,7 +43,7 @@ class CarePlanFixes {
4243
dotenv = dotenv {
4344
directory = projectRoot
4445
}
45-
fhirClient = FhirClient(dotenv, iParser)
46+
fhirClient = FhirClient(dotenv, FhirProvider())
4647
}
4748

4849
fun fixEnteredInErrorCarePlan(projectRoot: String) {

core/src/main/kotlin/org/dtree/fhir/core/uploader/FileUploader.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import org.dtree.fhir.core.utils.Logger
1313
import org.dtree.fhir.core.utils.readFile
1414
import io.github.cdimascio.dotenv.Dotenv
1515
import io.github.cdimascio.dotenv.dotenv
16+
import org.dtree.fhir.core.di.FhirProvider
1617
import org.hl7.fhir.r4.context.SimpleWorkerContext
1718
import org.hl7.fhir.r4.model.Bundle
1819
import org.hl7.fhir.r4.model.Bundle.BundleEntryComponent
@@ -45,7 +46,7 @@ class FileUploader() {
4546
val configManager = ProjectConfigManager()
4647
projectConfig = configManager.loadProjectConfig(projectRoot, directoryPath)
4748
processExcludedPaths(projectRoot)
48-
uploader = FhirClient(dotenv, iParser)
49+
uploader = FhirClient(dotenv, FhirProvider())
4950
fetchFiles(
5051
directoryPath, mapOf(
5152
Pair(projectConfig.structureMapLocation, "map"),

core/src/main/kotlin/org/dtree/fhir/core/uploader/LocationHierarchyUploader.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import org.dtree.fhir.core.utils.*
1111
import io.github.cdimascio.dotenv.Dotenv
1212
import io.github.cdimascio.dotenv.dotenv
1313
import kotlinx.coroutines.runBlocking
14+
import org.dtree.fhir.core.di.FhirProvider
1415
import org.dtree.fhir.core.utils.extractId
1516
import org.dtree.fhir.core.utils.logicalId
1617
import org.hl7.fhir.r4.context.SimpleWorkerContext
@@ -36,7 +37,7 @@ class LocationHierarchyUploader {
3637
dotenv = dotenv {
3738
directory = projectRoot
3839
}
39-
fhirClient = FhirClient(dotenv, iParser)
40+
fhirClient = FhirClient(dotenv, FhirProvider())
4041
val list = fhirClient.searchResources<Location>(count = batchSize) {
4142

4243
}

core/src/main/kotlin/org/dtree/fhir/core/uploader/general/FhirClient.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import okhttp3.OkHttpClient
1313
import okhttp3.Response
1414
import okhttp3.logging.HttpLoggingInterceptor
1515
import org.apache.commons.net.ntp.TimeStamp
16+
import org.dtree.fhir.core.di.FhirProvider
1617
import org.dtree.fhir.core.models.PatientData
1718
import org.dtree.fhir.core.models.parsePatientResources
1819
import org.dtree.fhir.core.utils.Logger
@@ -27,10 +28,11 @@ import java.net.URI
2728
import java.util.concurrent.TimeUnit
2829
import kotlin.io.path.Path
2930

30-
class FhirClient(private val dotenv: Dotenv, private val iParser: IParser) {
31+
class FhirClient(private val dotenv: Dotenv, private val provider: FhirProvider) {
3132
val fhirClient: IGenericClient
3233
private val okHttpClient: OkHttpClient
3334
val ctx: FhirContext = FhirContext.forR4()
35+
val iParser = provider.parser
3436

3537
init {
3638
okHttpClient = createOkHttpClient()

core/src/main/kotlin/org/dtree/fhir/core/uploader/localChanges/LocalChangesUploader.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import org.dtree.fhir.core.utils.*
1717
import io.github.cdimascio.dotenv.Dotenv
1818
import io.github.cdimascio.dotenv.dotenv
1919
import kotlinx.coroutines.runBlocking
20+
import org.dtree.fhir.core.di.FhirProvider
2021
import org.hl7.fhir.r4.context.SimpleWorkerContext
2122
import org.hl7.fhir.r4.model.Binary
2223
import org.hl7.fhir.r4.model.Bundle
@@ -49,7 +50,7 @@ class LocalChangesUploader(private val batchSize: Int = 10) {
4950
currentDir = filePath.getParentPath()
5051
val configManager = ProjectConfigManager()
5152
projectConfig = configManager.loadProjectConfig(projectRoot, filePath)
52-
uploader = FhirClient(dotenv, iParser)
53+
uploader = FhirClient(dotenv, FhirProvider())
5354
val data = filePath.readFile()
5455
val localChanges = gson.fromJson(data, LocalChangesModel::class.java)
5556
if (localChanges.changes.isNotEmpty()) {

gradle/libs.versions.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[versions]
2-
ktor = "2.3.12" # Set your Ktor version
3-
kotlin = "2.0.10" # Set your Kotlin version
4-
koin = "3.5.6" # Set your Koin version
2+
ktor = "3.0.0" # Set your Ktor version
3+
kotlin = "2.1.0" # Set your Kotlin version
4+
koin = "4.1.0-Beta5" # Set your Koin version
55
postgres = "42.5.1" # Set your PostgreSQL driver version
66
h2 = "2.2.224" # Set your H2 version
77
logback = "1.4.14" # Set your Logback version
88
dotenv = "6.4.1" # Set the dotenv version
9-
swagger-ui = "2.9.0"
9+
swagger-ui = "4.1.5"
1010
jquery = "3.2.1"
1111
hapiFhir = "6.8.0"
1212
hapiFhirCore = "6.0.22"
@@ -37,7 +37,7 @@ ktor-server-resources = { module = "io.ktor:ktor-server-resources", version.ref
3737
ktor-serialization-gson = { module = "io.ktor:ktor-serialization-gson-jvm", version.ref = "ktor" }
3838
ktor-server-call-logging = { module = "io.ktor:ktor-server-call-logging-jvm", version.ref = "ktor" }
3939
ktor-server-auth-jwt = { module = "io.ktor:ktor-server-auth-jwt-jvm", version.ref = "ktor" }
40-
koin-ktor = { module = "io.insert-koin:koin-ktor", version.ref = "koin" }
40+
koin-ktor = { module = "io.insert-koin:koin-ktor3", version.ref = "koin" }
4141
koin-logger-slf4j = { module = "io.insert-koin:koin-logger-slf4j", version.ref = "koin" }
4242
ktor-serialization-json = { module = "io.ktor:ktor-serialization-kotlinx-json-jvm", version.ref = "ktor" }
4343
ktor-server-content-negotiation = { module = "io.ktor:ktor-server-content-negotiation-jvm", version.ref = "ktor" }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

server/build.gradle.kts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ tasks.test {
1616
}
1717

1818
tasks.withType<KotlinCompile> {
19-
kotlinOptions.jvmTarget = "1.8"
19+
kotlinOptions {
20+
jvmTarget = "11"
21+
}
2022
}
2123

2224
application {

0 commit comments

Comments
 (0)