This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3032815
commit f6f1e11
Showing
20 changed files
with
160 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/main/java/de/difuture/uds/odm2fhir/fhir/writer/KafkaFHIRBundleWriter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package de.difuture.uds.odm2fhir.fhir.writer; | ||
|
||
/* | ||
* Copyright (C) 2021 DIFUTURE (https://difuture.de) | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | ||
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation | ||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, copies | ||
* of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following | ||
* conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the | ||
* Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE | ||
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
|
||
import org.hl7.fhir.r4.model.Bundle; | ||
|
||
import org.hl7.fhir.r4.model.Patient; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; | ||
import org.springframework.kafka.core.KafkaTemplate; | ||
import org.springframework.stereotype.Service; | ||
|
||
@ConditionalOnExpression("'${fhir.server.url:}'.empty and !'${kafka.broker.url:}'.empty") | ||
@Service | ||
@Slf4j | ||
public class KafkaFHIRBundleWriter implements FHIRBundleWriter { | ||
|
||
@Value("${spring.kafka.template.default-topic:}") | ||
private String topicName; | ||
|
||
@Autowired | ||
private KafkaTemplate<String, Bundle> kafkaTemplate; | ||
|
||
public void write(Bundle bundle) { | ||
var patientIdentifier = ((Patient) bundle.getEntryFirstRep().getResource()).getIdentifierFirstRep().getValue(); | ||
kafkaTemplate.send(topicName, patientIdentifier, bundle); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-615 KB
src/main/resources/fhir/profiles/de.einwilligungsmanagement-1.0.0.tgz
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-249 KB
...esources/fhir/profiles/de.medizininformatikinitiative.kerndatensatz.medikation-1.0.10.tgz
Binary file not shown.
Binary file added
BIN
+400 KB
...esources/fhir/profiles/de.medizininformatikinitiative.kerndatensatz.medikation-1.0.11.tgz
Binary file not shown.
Oops, something went wrong.