Skip to content

Commit

Permalink
Merge branch 'develop' into feature/otel-config
Browse files Browse the repository at this point in the history
  • Loading branch information
simone-lungarella committed Apr 18, 2024
2 parents 0ea5fb5 + 2bc6666 commit 08ca9f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,8 @@ private SubmissionSetEntryDTO createSubmissionSetEntry(final org.jsoup.nodes.Doc
sse.setAuthorRole(authorSlotDTO.getAuthorRole());
sse.setPatientId(buildPatient(docCDA));

String org = organizationId;
if(organizationId.startsWith("0")) {
org = organizationId.substring(1, organizationId.length());
}
sse.setSourceId(SOURCE_ID_PREFIX+org);
String sourceId = StringUtility.sanitizeSourceId(organizationId);
sse.setSourceId(SOURCE_ID_PREFIX+sourceId);
sse.setUniqueID(identificativoSottomissione);

sse.setSubmissionTime(new SimpleDateFormat(Constants.Misc.INI_DATE_PATTERN).format(new Date()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,12 @@ public static <T> T fromJSONJackson(final String json, final Class<T> clazz) {
public static String sanitizeMessage(final String message) {
return message.replace("<script>", "").replace("</script>", "");
}

public static String sanitizeSourceId(final String organizationId) {
String sourceId = organizationId;
if(sourceId.startsWith("0")) {
sourceId = sourceId.substring(1, sourceId.length());
}
return sourceId;
}
}

0 comments on commit 08ca9f5

Please sign in to comment.