Skip to content

Commit a8f4ea6

Browse files
committed
adds log if organization is missingin research study
1 parent dee2f12 commit a8f4ea6

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

dsf-bpe-process-feasibility/src/main/java/org/highmed/dsf/bpe/service/DownloadResearchStudyResource.java

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,17 @@ private ResearchStudy addMissingOrganizations(ResearchStudy researchStudy, FhirW
102102

103103
if (!identifiers.isEmpty())
104104
{
105-
identifiers.forEach(identifier -> researchStudy.addExtension()
106-
.setUrl(ConstantsFeasibility.EXTENSION_PARTICIPATING_MEDIC_URI).setValue(
107-
new Reference().setType("Organization").setIdentifier(new Identifier()
108-
.setSystem("http://highmed.org/fhir/NamingSystem/organization-identifier")
109-
.setValue(identifier))));
105+
identifiers.forEach(identifier -> {
106+
logger.warn(
107+
"Adding missing organization with identifier='{}' to feasibility research study with id='{}'",
108+
identifier, researchStudy.getId());
109+
110+
researchStudy.addExtension().setUrl(ConstantsFeasibility.EXTENSION_PARTICIPATING_MEDIC_URI).setValue(
111+
new Reference().setType("Organization").setIdentifier(new Identifier()
112+
.setSystem("http://highmed.org/fhir/NamingSystem/organization-identifier")
113+
.setValue(identifier)));
114+
115+
});
110116

111117
return update(researchStudy, client);
112118
}

0 commit comments

Comments
 (0)