mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-03-02 01:19:14 +00:00
prepare for changing the way the IG publisher generates narrative
This commit is contained in:
parent
618f98e323
commit
962f3f09ea
@ -790,7 +790,7 @@ public class ProfileDrivenRenderer extends ResourceRenderer {
|
||||
if ("DomainResource.contained".equals(child.getBase().getPath())) {
|
||||
if (round2) {
|
||||
for (BaseWrapper v : p.getValues()) {
|
||||
if (!RendererFactory.hasSpecificRenderer(v.fhirType())) {
|
||||
if (v.getBase() != null && !RendererFactory.hasSpecificRenderer(v.fhirType())) {
|
||||
x.hr();
|
||||
RenderingContext ctxt = context.copy();
|
||||
ctxt.setContained(true);
|
||||
|
@ -4,6 +4,7 @@ import org.hl7.fhir.r5.model.DomainResource;
|
||||
import org.hl7.fhir.r5.model.Resource;
|
||||
import org.hl7.fhir.r5.renderers.utils.BaseWrappers.ResourceWrapper;
|
||||
import org.hl7.fhir.r5.renderers.utils.RenderingContext;
|
||||
import org.hl7.fhir.r5.renderers.utils.RenderingContext.GenerationRules;
|
||||
import org.hl7.fhir.r5.renderers.utils.Resolver.ResourceContext;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
||||
@ -145,5 +146,17 @@ public class RendererFactory {
|
||||
"CapabilityStatement", "CompartmentDefinition", "ImplementationGuide", "Library", "NamingSystem", "OperationDefinition",
|
||||
"Questionnaire", "SearchParameter", "StructureDefinition", "ActorDefinition", "Requirements");
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a list of renderers that return something different in IG mode, and the implementation guide
|
||||
* publisher will regenerate the narrative for the IG mode
|
||||
* @param rt
|
||||
* @return
|
||||
*/
|
||||
public static boolean hasIGSpecificRenderer(String rt) {
|
||||
|
||||
return Utilities.existsInList(rt, "ValueSet", "CapabilityStatement", "Questionnaire");
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user