-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
APHL-1023-withdraw_draft_programs (#530)
* initial withdraw implementation * add test for non-draft library + only depends-on cascade delete * first check request resource id to work with * use specific withdraw resource file * return bundle and delete on ecr * fix in memory fhir repo * run code formatting * add InMemoryRepository tests * reformat code * add getEntryRequestId & isEntryRequestDelete tests * run code check * throw error if delete request entry is not present * artifacts that is owned and has composed-of relationship * run code check * update Exception thrown in in memory repo * run code check * add unsupported fhir version tests to bundle helper * rename getComponents method name * add approval removal on withdraw * add customSearchParams and fix runtime search param property --------- Co-authored-by: Ivan Baisi <[email protected]>
- Loading branch information
1 parent
6100130
commit 3b34066
Showing
17 changed files
with
12,627 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
.../src/main/java/org/opencds/cqf/fhir/utility/visitor/AbstractKnowledgeArtifactVisitor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.opencds.cqf.fhir.utility.visitor; | ||
|
||
import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; | ||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
import org.hl7.fhir.instance.model.api.IBaseBackboneElement; | ||
import org.hl7.fhir.instance.model.api.IBaseResource; | ||
import org.opencds.cqf.fhir.api.Repository; | ||
|
||
public abstract class AbstractKnowledgeArtifactVisitor implements IKnowledgeArtifactVisitor { | ||
protected List<IBaseBackboneElement> findArtifactCommentsToUpdate( | ||
IBaseResource artifact, String releaseVersion, Repository repository) { | ||
if (artifact instanceof org.hl7.fhir.dstu3.model.MetadataResource) { | ||
return org.opencds.cqf.fhir.utility.visitor.dstu3.ReleaseVisitor.findArtifactCommentsToUpdate( | ||
(org.hl7.fhir.dstu3.model.MetadataResource) artifact, releaseVersion, repository) | ||
.stream() | ||
.map(r -> (IBaseBackboneElement) r) | ||
.collect(Collectors.toList()); | ||
} else if (artifact instanceof org.hl7.fhir.r4.model.MetadataResource) { | ||
return org.opencds.cqf.fhir.utility.visitor.r4.ReleaseVisitor.findArtifactCommentsToUpdate( | ||
(org.hl7.fhir.r4.model.MetadataResource) artifact, releaseVersion, repository) | ||
.stream() | ||
.map(r -> (IBaseBackboneElement) r) | ||
.collect(Collectors.toList()); | ||
} else if (artifact instanceof org.hl7.fhir.r5.model.MetadataResource) { | ||
return org.opencds.cqf.fhir.utility.visitor.r5.ReleaseVisitor.findArtifactCommentsToUpdate( | ||
(org.hl7.fhir.r5.model.MetadataResource) artifact, releaseVersion, repository) | ||
.stream() | ||
.map(r -> (IBaseBackboneElement) r) | ||
.collect(Collectors.toList()); | ||
} else { | ||
throw new UnprocessableEntityException("Version not supported"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.