diff --git a/src/main/java/it/finanze/sanita/fse2/ms/gtw/dispatcher/service/impl/FhirSRV.java b/src/main/java/it/finanze/sanita/fse2/ms/gtw/dispatcher/service/impl/FhirSRV.java index 3d79845..25486ed 100644 --- a/src/main/java/it/finanze/sanita/fse2/ms/gtw/dispatcher/service/impl/FhirSRV.java +++ b/src/main/java/it/finanze/sanita/fse2/ms/gtw/dispatcher/service/impl/FhirSRV.java @@ -139,7 +139,12 @@ private SubmissionSetEntryDTO createSubmissionSetEntry(final org.jsoup.nodes.Doc sse.setAuthorInstitution(authorSlotDTO.getAuthorInstitution()); sse.setAuthorRole(authorSlotDTO.getAuthorRole()); sse.setPatientId(buildPatient(docCDA)); - sse.setSourceId(SOURCE_ID_PREFIX+organizationId); + + String org = organizationId; + if(organizationId.startsWith("0")) { + org = organizationId.substring(1, organizationId.length()); + } + sse.setSourceId(SOURCE_ID_PREFIX+org); sse.setUniqueID(identificativoSottomissione); sse.setSubmissionTime(new SimpleDateFormat(Constants.Misc.INI_DATE_PATTERN).format(new Date())); @@ -275,4 +280,5 @@ private static AuthorSlotDTO buildAuthorSlotDTO(final String authorRole,final or return author; } + }