mirror of
https://github.com/pcvolkmer/mv64e-etl-processor
synced 2025-09-13 17:02:52 +00:00
Compare commits
7 Commits
v0.11.0-rc
...
v0.11.1
Author | SHA1 | Date | |
---|---|---|---|
328bf019af | |||
6dfec5c341 | |||
4602032bcf | |||
9cc9f130df | |||
b92fbae2c5 | |||
5704282a1c | |||
ba21d029d1 |
@@ -268,7 +268,7 @@ zur Nutzung des MTB-File-Endpunkts eine HTTP-Basic-Authentifizierung voraussetze
|
|||||||

|

|
||||||
|
|
||||||
In diesem Fall kann der Endpunkt für das Onkostar-Plugin *
|
In diesem Fall kann der Endpunkt für das Onkostar-Plugin *
|
||||||
*[onkostar-plugin-dnpmexport](https://github.com/CCC-MF/onkostar-plugin-dnpmexport)** wie folgt
|
*[mv64e-onkostar-plugin-export](https://github.com/pcvolkmer/mv64e-onkostar-plugin-export)** wie folgt
|
||||||
konfiguriert werden:
|
konfiguriert werden:
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -427,9 +427,9 @@ Die PEM-Datei mit dem/den Root CA Zertifikat(en) muss dabei im vorbereiteten Ver
|
|||||||
#### Integration zur Laufzeit
|
#### Integration zur Laufzeit
|
||||||
|
|
||||||
Hier muss die Umgebungsvariable `SERVICE_BINDING_ROOT` z.B. auf den Wert `/bindings` gesetzt sein.
|
Hier muss die Umgebungsvariable `SERVICE_BINDING_ROOT` z.B. auf den Wert `/bindings` gesetzt sein.
|
||||||
Zudem muss ein Verzeichnis `bindings/ca-certificates` - analog zum Verzeichnis [
|
Zudem muss ein Verzeichnis `bindings/ca-certificates` - analog zum Verzeichnis
|
||||||
`bindings/ca-certificates`](bindings/ca-certificates) mit einer PEM-Datei als Docker-Volume
|
[`bindings/ca-certificates`](bindings/ca-certificates) mit einer PEM-Datei und der
|
||||||
eingebunden werden.
|
Datei [`bindings/ca-certificates/type`](bindings/ca-certificates/type) als Docker-Volume eingebunden werden.
|
||||||
|
|
||||||
Beispiel für Docker-Compose:
|
Beispiel für Docker-Compose:
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@ import org.springframework.boot.gradle.tasks.bundling.BootBuildImage
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
war
|
war
|
||||||
id("org.springframework.boot") version "3.5.3"
|
id("org.springframework.boot") version "3.5.5"
|
||||||
id("io.spring.dependency-management") version "1.1.7"
|
id("io.spring.dependency-management") version "1.1.7"
|
||||||
kotlin("jvm") version "1.9.25"
|
kotlin("jvm") version "1.9.25"
|
||||||
kotlin("plugin.spring") version "1.9.25"
|
kotlin("plugin.spring") version "1.9.25"
|
||||||
@@ -13,7 +13,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "dev.dnpm"
|
group = "dev.dnpm"
|
||||||
version = "0.11.0-SNAPSHOT"
|
version = "0.11.1"
|
||||||
|
|
||||||
var versions = mapOf(
|
var versions = mapOf(
|
||||||
"mtb-dto" to "0.1.0-SNAPSHOT",
|
"mtb-dto" to "0.1.0-SNAPSHOT",
|
||||||
@@ -111,6 +111,8 @@ dependencies {
|
|||||||
integrationTestImplementation("com.tngtech.archunit:archunit:${versions["archunit"]}")
|
integrationTestImplementation("com.tngtech.archunit:archunit:${versions["archunit"]}")
|
||||||
integrationTestImplementation("org.htmlunit:htmlunit")
|
integrationTestImplementation("org.htmlunit:htmlunit")
|
||||||
integrationTestImplementation("org.springframework:spring-webflux")
|
integrationTestImplementation("org.springframework:spring-webflux")
|
||||||
|
// Fix for CVE-2024-25710
|
||||||
|
integrationTestImplementation("org.apache.commons:commons-compress:1.26.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<KotlinCompile> {
|
tasks.withType<KotlinCompile> {
|
||||||
|
@@ -282,6 +282,30 @@ class HomeControllerTest {
|
|||||||
assertThat(page.querySelectorAll("tbody tr")).isEmpty()
|
assertThat(page.querySelectorAll("tbody tr")).isEmpty()
|
||||||
assertThat(page.querySelectorAll("div.notification.info")).hasSize(1)
|
assertThat(page.querySelectorAll("div.notification.info")).hasSize(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@WithMockUser(username = "admin", roles = ["ADMIN"])
|
||||||
|
fun testShouldShowNoConsentStatusBadge() {
|
||||||
|
whenever(requestService.findRequestByPatientId(anyValueClass(), any<Pageable>())).thenReturn(
|
||||||
|
PageImpl(
|
||||||
|
listOf(
|
||||||
|
Request(
|
||||||
|
1L,
|
||||||
|
randomRequestId(),
|
||||||
|
PatientPseudonym("PSEUDO1"),
|
||||||
|
PatientId("PATIENT1"),
|
||||||
|
Fingerprint("ashdkasdh"),
|
||||||
|
RequestType.MTB_FILE,
|
||||||
|
RequestStatus.NO_CONSENT
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
val page = webClient.getPage<HtmlPage>("http://localhost/patient/PSEUDO1")
|
||||||
|
assertThat(page.querySelectorAll("tbody tr")).hasSize(1)
|
||||||
|
assertThat(page.querySelectorAll("tbody tr > td > small").first().textContent).isEqualTo("NO_CONSENT")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -27,7 +27,6 @@ import dev.pcvolkmer.mv64e.mtb.Mtb
|
|||||||
import dev.pcvolkmer.mv64e.mtb.MvhMetadata
|
import dev.pcvolkmer.mv64e.mtb.MvhMetadata
|
||||||
import org.apache.kafka.clients.producer.ProducerRecord
|
import org.apache.kafka.clients.producer.ProducerRecord
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
import org.springframework.http.MediaType
|
|
||||||
import org.springframework.kafka.core.KafkaTemplate
|
import org.springframework.kafka.core.KafkaTemplate
|
||||||
import org.springframework.retry.support.RetryTemplate
|
import org.springframework.retry.support.RetryTemplate
|
||||||
|
|
||||||
@@ -47,8 +46,9 @@ class KafkaMtbFileSender(
|
|||||||
ProducerRecord(
|
ProducerRecord(
|
||||||
kafkaProperties.outputTopic,
|
kafkaProperties.outputTopic,
|
||||||
key(request),
|
key(request),
|
||||||
objectMapper.writeValueAsString(request)
|
objectMapper.writeValueAsString(request),
|
||||||
)
|
)
|
||||||
|
record.headers().add("requestId", request.requestId.value.toByteArray())
|
||||||
when (request) {
|
when (request) {
|
||||||
is DnpmV2MtbFileRequest -> record.headers()
|
is DnpmV2MtbFileRequest -> record.headers()
|
||||||
.add(
|
.add(
|
||||||
@@ -82,7 +82,6 @@ class KafkaMtbFileSender(
|
|||||||
ProducerRecord(
|
ProducerRecord(
|
||||||
kafkaProperties.outputTopic,
|
kafkaProperties.outputTopic,
|
||||||
key(request),
|
key(request),
|
||||||
// Always use old BwhcV1FileRequest with Consent REJECT
|
|
||||||
objectMapper.writeValueAsString(
|
objectMapper.writeValueAsString(
|
||||||
DnpmV2MtbFileRequest(
|
DnpmV2MtbFileRequest(
|
||||||
request.requestId,
|
request.requestId,
|
||||||
@@ -90,7 +89,7 @@ class KafkaMtbFileSender(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
record.headers().add("requestId", request.requestId.value.toByteArray())
|
||||||
val result = kafkaTemplate.send(record)
|
val result = kafkaTemplate.send(record)
|
||||||
if (result.get() != null) {
|
if (result.get() != null) {
|
||||||
logger.debug("Sent deletion request via KafkaMtbFileSender")
|
logger.debug("Sent deletion request via KafkaMtbFileSender")
|
||||||
|
7
src/main/resources/banner.txt
Normal file
7
src/main/resources/banner.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
__ _ _ _ _
|
||||||
|
_ __ _____ __/ /_ | || | ___ ___| |_| | _ __ _ __ ___ ___ ___ ___ ___ ___ _ __
|
||||||
|
| '_ ` _ \ \ / / '_ \| || |_ / _ \_____ / _ \ __| |_____| '_ \| '__/ _ \ / __/ _ \/ __/ __|/ _ \| '__|
|
||||||
|
| | | | | \ V /| (_) |__ _| __/_____| __/ |_| |_____| |_) | | | (_) | (_| __/\__ \__ \ (_) | |
|
||||||
|
|_| |_| |_|\_/ \___/ |_| \___| \___|\__|_| | .__/|_| \___/ \___\___||___/___/\___/|_|
|
||||||
|
|_|
|
||||||
|
:: mv64e-etl-processor :: ${application.formatted-version}
|
@@ -54,6 +54,7 @@
|
|||||||
<td th:if="${request.status.value.contains('error')}" class="bg-red"><small>[[ ${request.status} ]]</small></td>
|
<td th:if="${request.status.value.contains('error')}" class="bg-red"><small>[[ ${request.status} ]]</small></td>
|
||||||
<td th:if="${request.status.value == 'unknown'}" class="bg-gray"><small>[[ ${request.status} ]]</small></td>
|
<td th:if="${request.status.value == 'unknown'}" class="bg-gray"><small>[[ ${request.status} ]]</small></td>
|
||||||
<td th:if="${request.status.value == 'duplication'}" class="bg-gray"><small>[[ ${request.status} ]]</small></td>
|
<td th:if="${request.status.value == 'duplication'}" class="bg-gray"><small>[[ ${request.status} ]]</small></td>
|
||||||
|
<td th:if="${request.status.value == 'no-consent'}" class="bg-blue"><small>[[ ${request.status} ]]</small></td>
|
||||||
<td th:style="${request.type.value == 'delete'} ? 'color: red;'"><small>[[ ${request.type} ]]</small></td>
|
<td th:style="${request.type.value == 'delete'} ? 'color: red;'"><small>[[ ${request.type} ]]</small></td>
|
||||||
<td th:if="not ${request.report}">[[ ${request.uuid} ]]</td>
|
<td th:if="not ${request.report}">[[ ${request.uuid} ]]</td>
|
||||||
<td th:if="${request.report}">
|
<td th:if="${request.report}">
|
||||||
@@ -100,4 +101,4 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -163,6 +163,8 @@ class KafkaMtbFileSenderTest {
|
|||||||
assertThat(captor.firstValue.key()).isEqualTo("{\"pid\": \"PID\"}")
|
assertThat(captor.firstValue.key()).isEqualTo("{\"pid\": \"PID\"}")
|
||||||
assertThat(captor.firstValue.headers().headers("contentType")).isNotNull
|
assertThat(captor.firstValue.headers().headers("contentType")).isNotNull
|
||||||
assertThat(captor.firstValue.headers().headers("contentType")?.firstOrNull()?.value()).isEqualTo(CustomMediaType.APPLICATION_VND_DNPM_V2_MTB_JSON_VALUE.toByteArray())
|
assertThat(captor.firstValue.headers().headers("contentType")?.firstOrNull()?.value()).isEqualTo(CustomMediaType.APPLICATION_VND_DNPM_V2_MTB_JSON_VALUE.toByteArray())
|
||||||
|
assertThat(captor.firstValue.headers().headers("requestId")).isNotNull
|
||||||
|
assertThat(captor.firstValue.headers().headers("requestId")?.firstOrNull()?.value()).isEqualTo(TEST_REQUEST_ID.value.toByteArray())
|
||||||
assertThat(captor.firstValue.value()).isNotNull
|
assertThat(captor.firstValue.value()).isNotNull
|
||||||
assertThat(captor.firstValue.value()).isEqualTo(objectMapper.writeValueAsString(dnmpV2kafkaRecordData(TEST_REQUEST_ID)))
|
assertThat(captor.firstValue.value()).isEqualTo(objectMapper.writeValueAsString(dnmpV2kafkaRecordData(TEST_REQUEST_ID)))
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user