Skip to content

Commit

Permalink
Update Delete operation to include deletion of Artifact Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris0296 committed Oct 30, 2024
1 parent 4e2e534 commit 34c541f
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ public IBase visit(KnowledgeArtifactAdapter rootAdapter, Repository repository,
var resToUpdate = new ArrayList<IDomainResource>();
resToUpdate.add(rootAdapter.get());

var resourcesToUpdate = getComponents(rootAdapter, repository, resToUpdate);
findArtifactCommentsToUpdate(rootAdapter.get(), fhirVersion.getFhirVersionString(), repository)
.forEach(artifact -> {
var approval = BundleHelper.getEntryResource(fhirVersion, artifact);
var entry = PackageHelper.deleteEntry(approval);
BundleHelper.addEntry(transactionBundle, entry);
});

var resourcesToUpdate = getComponents(rootAdapter, repository, resToUpdate);
for (var res : resourcesToUpdate) {
var entry = PackageHelper.deleteEntry(res);
BundleHelper.addEntry(transactionBundle, entry);
Expand Down

0 comments on commit 34c541f

Please sign in to comment.