Skip to content

Commit

Permalink
eRSDTransformer experimental fix, PlanDef reference removal
Browse files Browse the repository at this point in the history
  • Loading branch information
sliver007 committed Jun 29, 2023
1 parent c40cdfe commit ad0697f
Showing 1 changed file with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ private Library createSpecificationLibrary() {
specificationLibrary.setDescription(
"Defines the asset-collection library containing the US Public Health specification assets.");
specificationLibrary.setStatus(PublicationStatus.ACTIVE);
specificationLibrary.setExperimental(true);
specificationLibrary.setExperimental(false);
specificationLibrary.setPublisher(PUBLISHER);
specificationLibrary.setUrl("http://ersd.aimsplatform.org/fhir/Library/SpecificationLibrary");
specificationLibrary.setType(new CodeableConcept(
Expand Down Expand Up @@ -276,7 +276,7 @@ private IBaseOperationOutcome resolvePlanDefinition(PlanDefinition res, Library
// });
// res.setVersion(this.version);
// res.setPublisher(PUBLISHER);
// res.setExperimental(true);
// res.setExperimental(false);
// res.setDescription("Example Description");
return null;
}
Expand Down Expand Up @@ -365,14 +365,7 @@ private IBaseOperationOutcome resolveTriggeringValueSet(ValueSet res, Library sp

// Update Grouping ValueSet references (in useContexts) to PlanDefinition
List<UsageContext> useContexts = res.getUseContext();

if (v2PlanDefinition != null) {
useContexts.stream().forEach(uc -> {
if (uc.hasValueReference() && uc.getValueReference().hasReference() && uc.getValueReference().getReference().contains("skeleton")) {
uc.setValue(new Reference(v2PlanDefinition.getId()));
}
});
}
res.getUseContext().removeIf(uc -> uc.hasValueReference() && uc.getValueReference().hasReference() && uc.getValueReference().getReference().contains("skeleton"));

boolean hasPriorityUseContext = false;
for (UsageContext uc : useContexts) {
Expand Down Expand Up @@ -431,7 +424,7 @@ private IBaseOperationOutcome resolveTriggeringValueSet(ValueSet res, Library sp
compose.getInclude().remove(include);
}

res.setExperimental(true);
res.setExperimental(false);
return null;
}

Expand Down

0 comments on commit ad0697f

Please sign in to comment.