Skip to content

Commit 356d056

Browse files
Merge branch 'dev' into CU-86byu490e_Notification-worklist-patient-name
2 parents 4504d5e + c9765e0 commit 356d056

File tree

2 files changed

+9
-6
lines changed
  • JeMPI_Apps
    • JeMPI_AsyncReceiver/src/main/java/org/jembi/jempi/async_receiver
    • JeMPI_Linker/src/main/java/org/jembi/jempi/linker

2 files changed

+9
-6
lines changed

JeMPI_Apps/JeMPI_AsyncReceiver/src/main/java/org/jembi/jempi/async_receiver/Main.java

+8-6
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,15 @@ private void apacheReadCSV(
164164
.findFirst()
165165
.orElse("");
166166

167-
String partitionKey;
167+
String partitionKey = "";
168168
if (!givenName.isEmpty()) {
169-
partitionKey = new Soundex().soundex(givenName);
170-
} else if (!familyName.isEmpty()) {
171-
partitionKey = new Soundex().soundex(familyName);
172-
} else {
173-
partitionKey = "Unknown";
169+
partitionKey += new Soundex().soundex(givenName);
170+
}
171+
if (!familyName.isEmpty()) {
172+
partitionKey += new Soundex().soundex(familyName);
173+
}
174+
if (givenName.isEmpty() && familyName.isEmpty()) {
175+
partitionKey += "Unknown";
174176
}
175177
LOGGER.info("Kafka topic/partition for patient: " + partitionKey);
176178

JeMPI_Apps/JeMPI_Linker/src/main/java/org/jembi/jempi/linker/SPInteractions.java

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ private void closeInteractionStream() {
9595

9696
private Properties loadConfig() {
9797
final Properties props = new Properties();
98+
props.put(StreamsConfig.PROCESSING_GUARANTEE_CONFIG, StreamsConfig.EXACTLY_ONCE_V2);
9899
props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, AppConfig.KAFKA_BOOTSTRAP_SERVERS);
99100
props.put(StreamsConfig.APPLICATION_ID_CONFIG, AppConfig.KAFKA_APPLICATION_ID_INTERACTIONS + topic);
100101
return props;

0 commit comments

Comments
 (0)