Skip to content

Commit

Permalink
Remove "crmi" operation code prefix (#755)
Browse files Browse the repository at this point in the history
Removed "crmi" operation code prefix; fixed transform provider test case data
  • Loading branch information
Adam Stevenson authored Dec 1, 2023
1 parent b38a07c commit 5eb5f32
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 69 deletions.
4 changes: 3 additions & 1 deletion ecr/src/test/java/com/ecr/TransformProviderIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ void testTransformConfig() {
assertTrue(hasUSPHProfiles.size() == 0);
assertTrue(hasExperimental.size() == 0);
}

@Test
void testTransform_alternate_v1_skeleton() {
PlanDefinition planDef = (PlanDefinition) loadResource("ersd-v1-plandefinition-alternate.json");
Expand All @@ -100,9 +101,10 @@ void testTransform_alternate_v1_skeleton() {
.withParameters(v2BundleParams)
.returnResourceType(Bundle.class)
.execute();
List<BundleEntryComponent> bundleContainsAlternatePlanDef = v1Bundle.getEntry().stream().filter(entry -> entry.getFullUrl().equals("http://hl7.org/fhir/us/ecr/PlanDefinition/plandefinition-ersd-skeleton-alternate|test-version")).collect(Collectors.toList());
List<BundleEntryComponent> bundleContainsAlternatePlanDef = v1Bundle.getEntry().stream().filter(entry -> entry.getFullUrl().equals("http://hl7.org/fhir/us/ecr/PlanDefinition/plandefinition-ersd-skeleton-alternate|1.2.0.0")).collect(Collectors.toList());
assertTrue(bundleContainsAlternatePlanDef.size() == 1);
}

@Test
void testTransform_set_targetVersion() {
PlanDefinition planDef = (PlanDefinition) loadResource("ersd-v1-plandefinition-testversion.json");
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ public Bundle createPackageBundle(IdType id, FhirDal fhirDal, List<String> capab
return packagedBundle;
}
/**
* $crmi.package allows for a bundle to be paged
* $package allows for a bundle to be paged
* @param count the maximum number of resources to be returned
* @param offset the number of resources to skip beginning from the start of the bundle (starts from 1)
* @param bundle the bundle to page
Expand Down Expand Up @@ -862,7 +862,7 @@ private void setCorrectBundleType(Integer count, Integer offset, Bundle bundle)
}
}
/**
* ValueSets can be part of multiple artifacts at the same time. Certain properties are tracked/managed in the manifest to avoid conflicts with other artifacts. This function sets those properties on the ValueSets themselves at export / $crmi.package time
* ValueSets can be part of multiple artifacts at the same time. Certain properties are tracked/managed in the manifest to avoid conflicts with other artifacts. This function sets those properties on the ValueSets themselves at export / $package time
* @param manifest the resource containing all RelatedArtifact references
* @param bundleEntries the list of packaged resources to modify according to the extensions on the manifest relatedArtifact references
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public class RepositoryService extends DaoRegistryOperationProvider {
* used to represent the proper structure.
* @return An IBaseResource that is the targeted resource, updated with the approval
*/
@Operation(name = "$crmi.approve", idempotent = true, global = true, type = MetadataResource.class)
@Description(shortDefinition = "$crmi.approve", value = "Apply an approval to an existing artifact, regardless of status.")
@Operation(name = "$approve", idempotent = true, global = true, type = MetadataResource.class)
@Description(shortDefinition = "$approve", value = "Apply an approval to an existing artifact, regardless of status.")
public Bundle approveOperation(
RequestDetails requestDetails,
@IdParam IdType theId,
Expand Down Expand Up @@ -140,8 +140,8 @@ public Bundle approveOperation(
* @param version new version in the form MAJOR.MINOR.PATCH
* @return A transaction bundle result of the newly created resources
*/
@Operation(name = "$crmi.draft", idempotent = true, global = true, type = MetadataResource.class)
@Description(shortDefinition = "$crmi.draft", value = "Create a new draft version of the reference artifact")
@Operation(name = "$draft", idempotent = true, global = true, type = MetadataResource.class)
@Description(shortDefinition = "$draft", value = "Create a new draft version of the reference artifact")
public Bundle draftOperation(RequestDetails requestDetails, @IdParam IdType theId, @OperationParam(name = "version") String version)
throws FHIRException {
FhirDal fhirDal = this.fhirDalFactory.create(requestDetails);
Expand All @@ -157,8 +157,8 @@ public Bundle draftOperation(RequestDetails requestDetails, @IdParam IdType theI
* @param latestFromTxServer whether or not to query the TxServer if version information is missing from references
* @return A transaction bundle result of the updated resources
*/
@Operation(name = "$crmi.release", idempotent = true, global = true, type = MetadataResource.class)
@Description(shortDefinition = "$crmi.release", value = "Release an existing draft artifact")
@Operation(name = "$release", idempotent = true, global = true, type = MetadataResource.class)
@Description(shortDefinition = "$release", value = "Release an existing draft artifact")
public Bundle releaseOperation(
RequestDetails requestDetails,
@IdParam IdType theId,
Expand Down Expand Up @@ -187,8 +187,8 @@ public Bundle releaseOperation(
fhirDal));
}

@Operation(name = "$crmi.package", idempotent = true, global = true, type = MetadataResource.class)
@Description(shortDefinition = "$crmi.package", value = "Package an artifact and components / dependencies")
@Operation(name = "$package", idempotent = true, global = true, type = MetadataResource.class)
@Description(shortDefinition = "$package", value = "Package an artifact and components / dependencies")
public Bundle packageOperation(
RequestDetails requestDetails,
@IdParam IdType theId,
Expand Down Expand Up @@ -223,8 +223,8 @@ public Bundle packageOperation(
);
}

@Operation(name = "$crmi.revise", idempotent = true, global = true, type = MetadataResource.class)
@Description(shortDefinition = "$crmi.revise", value = "Update an existing artifact in 'draft' status")
@Operation(name = "$revise", idempotent = true, global = true, type = MetadataResource.class)
@Description(shortDefinition = "$revise", value = "Update an existing artifact in 'draft' status")
public IBaseResource reviseOperation(RequestDetails requestDetails, @OperationParam(name = "resource") IBaseResource resource)
throws FHIRException {

Expand Down
Loading

0 comments on commit 5eb5f32

Please sign in to comment.