mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-03-05 19:09:11 +00:00
Lookup compliesWithProfile target from link-only dependencies
This commit is contained in:
parent
c36038cd3f
commit
4ccaae1571
@ -126,7 +126,7 @@ public class StructureDefinitionRenderer extends ResourceRenderer {
|
||||
StructureDefinition sd = (StructureDefinition) r.getBase();
|
||||
genSummaryTable(status, x, sd);
|
||||
if (context.getStructureMode() == StructureDefinitionRendererMode.DATA_DICT) {
|
||||
renderDict(status, sd, sd.getDifferential().getElement(), x.table("dict"), false, GEN_MODE_DIFF, "", r);
|
||||
renderDict(status, sd, sd.getDifferential().getElement(), x.table("dict", false), false, GEN_MODE_DIFF, "", r);
|
||||
} else {
|
||||
x.addChildNode(generateTable(status, context.getDefinitionsTarget(), sd, true, context.getDestDir(), false, sd.getId(), false,
|
||||
context.getLink(KnownLinkType.SPEC), "", sd.getKind() == StructureDefinitionKind.LOGICAL, false, null, false, context.withUniqueLocalPrefix(null), "r", r));
|
||||
@ -1851,7 +1851,7 @@ public class StructureDefinitionRenderer extends ResourceRenderer {
|
||||
}
|
||||
}
|
||||
|
||||
private void addCanonicalListExt(HierarchicalTableGenerator gen, Cell c, List<Extension> list, String start, boolean bold) {
|
||||
private void addCanonicalListExt(HierarchicalTableGenerator gen, Cell c, List<Extension> list, String start, boolean bold) throws IOException {
|
||||
List<CanonicalType> clist = new ArrayList<>();
|
||||
for (Extension ext : list) {
|
||||
if (ext.hasValueCanonicalType()) {
|
||||
@ -1861,7 +1861,7 @@ public class StructureDefinitionRenderer extends ResourceRenderer {
|
||||
addCanonicalList(gen, c, clist, start, bold);
|
||||
}
|
||||
|
||||
private void addCanonicalList(HierarchicalTableGenerator gen, Cell c, List<CanonicalType> list, String start, boolean bold) {
|
||||
private void addCanonicalList(HierarchicalTableGenerator gen, Cell c, List<CanonicalType> list, String start, boolean bold) throws IOException {
|
||||
if (!list.isEmpty()) {
|
||||
|
||||
if (!c.getPieces().isEmpty()) { c.addPiece(gen.new Piece("br")); }
|
||||
@ -1880,6 +1880,9 @@ public class StructureDefinitionRenderer extends ResourceRenderer {
|
||||
}
|
||||
String iu = ct.primitiveValue();
|
||||
StructureDefinition sd = context.getContext().fetchResource(StructureDefinition.class, iu);
|
||||
if (sd == null) {
|
||||
sd = context.findLinkableResource(StructureDefinition.class, iu);
|
||||
}
|
||||
if (sd == null) {
|
||||
p = gen.new Piece(null, iu, null).addStyle("font-weight:bold");
|
||||
c.addPiece(p);
|
||||
@ -1896,7 +1899,9 @@ public class StructureDefinitionRenderer extends ResourceRenderer {
|
||||
c.addPiece(p);
|
||||
}
|
||||
}
|
||||
if (bold) p.addStyle("font-weight:bold");
|
||||
if (bold) {
|
||||
p.addStyle("font-weight:bold");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4146,7 +4151,7 @@ public class StructureDefinitionRenderer extends ResourceRenderer {
|
||||
}
|
||||
}
|
||||
if (obr.hasObligations()) {
|
||||
XhtmlNode tbl = ret.table("grid");
|
||||
XhtmlNode tbl = ret.table("grid", false);
|
||||
obr.renderTable(status, res, tbl.getChildNodes(), true, defPath, anchorPrefix, inScopeElements);
|
||||
if (tbl.isEmpty()) {
|
||||
ret.remove(tbl);
|
||||
@ -4719,7 +4724,7 @@ public class StructureDefinitionRenderer extends ResourceRenderer {
|
||||
}
|
||||
|
||||
if (abr.hasBindings()) {
|
||||
var tbl = x.table("grid");
|
||||
var tbl = x.table("grid", false);
|
||||
abr.render(tbl.getChildNodes(), true);
|
||||
}
|
||||
return x;
|
||||
|
@ -24,7 +24,9 @@ import org.hl7.fhir.r5.model.Base;
|
||||
import org.hl7.fhir.r5.model.DomainResource;
|
||||
import org.hl7.fhir.r5.model.Enumeration;
|
||||
import org.hl7.fhir.r5.model.PrimitiveType;
|
||||
import org.hl7.fhir.r5.model.Resource;
|
||||
import org.hl7.fhir.r5.model.StringType;
|
||||
import org.hl7.fhir.r5.renderers.utils.RenderingContext.IResourceLinkResolver;
|
||||
import org.hl7.fhir.r5.renderers.utils.Resolver.IReferenceResolver;
|
||||
import org.hl7.fhir.r5.terminologies.utilities.ValidationResult;
|
||||
import org.hl7.fhir.r5.utils.ToolingExtensions;
|
||||
@ -72,6 +74,10 @@ import org.hl7.fhir.utilities.validation.ValidationOptions;
|
||||
*/
|
||||
public class RenderingContext extends RenderingI18nContext {
|
||||
|
||||
public interface IResourceLinkResolver {
|
||||
public <T extends Resource> T findLinkableResource(Class<T> class_, String uri) throws IOException;
|
||||
}
|
||||
|
||||
public static class RenderingContextLangs {
|
||||
|
||||
private RenderingContext defLangRC;
|
||||
@ -297,6 +303,7 @@ public class RenderingContext extends RenderingI18nContext {
|
||||
private String uniqueLocalPrefix;
|
||||
private Set<String> anchors = new HashSet<>();
|
||||
private boolean unknownLocalReferencesNotLinks;
|
||||
private IResourceLinkResolver resolveLinkResolver;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -366,6 +373,7 @@ public class RenderingContext extends RenderingI18nContext {
|
||||
res.anchors = anchors;
|
||||
}
|
||||
res.unknownLocalReferencesNotLinks = unknownLocalReferencesNotLinks;
|
||||
res.resolveLinkResolver = resolveLinkResolver;
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -1058,4 +1066,21 @@ public class RenderingContext extends RenderingI18nContext {
|
||||
public void setUnknownLocalReferencesNotLinks(boolean unknownLocalReferencesNotLinks) {
|
||||
this.unknownLocalReferencesNotLinks = unknownLocalReferencesNotLinks;
|
||||
}
|
||||
|
||||
public <T extends Resource> T findLinkableResource(Class<T> class_, String uri) throws IOException {
|
||||
if (resolveLinkResolver == null) {
|
||||
return null;
|
||||
} else {
|
||||
return resolveLinkResolver.findLinkableResource(class_, uri);
|
||||
}
|
||||
}
|
||||
|
||||
public IResourceLinkResolver getResolveLinkResolver() {
|
||||
return resolveLinkResolver;
|
||||
}
|
||||
|
||||
public void setResolveLinkResolver(IResourceLinkResolver resolveLinkResolver) {
|
||||
this.resolveLinkResolver = resolveLinkResolver;
|
||||
}
|
||||
|
||||
}
|
@ -906,6 +906,23 @@ public class RenderingI18nContext extends I18nBase {
|
||||
public static final String VALUE_SET_USED_ELSEWHERE = "VALUE_SET_USED_ELSEWHERE";
|
||||
public static final String VALUE_SET_WHERE = "VALUE_SET_WHERE";
|
||||
public static final String VALUE_SET_WHERE_CODES = "VALUE_SET_WHERE_CODES";
|
||||
public static final String VALUE_SET_AR = "VALUE_SET_AR";
|
||||
public static final String VALUE_SET_AT = "VALUE_SET_AT";
|
||||
public static final String VALUE_SET_BE = "VALUE_SET_BE";
|
||||
public static final String VALUE_SET_CA_EN = "VALUE_SET_CA_EN";
|
||||
public static final String VALUE_SET_CA_FR = "VALUE_SET_CA_FR";
|
||||
public static final String VALUE_SET_EE = "VALUE_SET_EE";
|
||||
public static final String VALUE_SET_FI = "VALUE_SET_FI";
|
||||
public static final String VALUE_SET_DE = "VALUE_SET_DE";
|
||||
public static final String VALUE_SET_IE = "VALUE_SET_IE";
|
||||
public static final String VALUE_SET_NZ = "VALUE_SET_NZ";
|
||||
public static final String VALUE_SET_NO = "VALUE_SET_NO";
|
||||
public static final String VALUE_SET_KR = "VALUE_SET_KR";
|
||||
public static final String VALUE_ES_ES = "VALUE_ES_ES";
|
||||
public static final String VALUE_SET_CH = "VALUE_SET_CH";
|
||||
public static final String VALUE_SET_UK_CLIN = "VALUE_SET_UK_CLIN";
|
||||
public static final String VALUE_SET_UY = "VALUE_SET_UY";
|
||||
public static final String VALUE_SET_US_ICD10CM = "VALUE_SET_US_ICD10CM";
|
||||
public static final String VS_ABSTRACT_CODE_HINT = "VS_ABSTRACT_CODE_HINT";
|
||||
public static final String GENERAL_CODE = "GENERAL_CODE";
|
||||
public static final String GENERAL_DESC = "GENERAL_DESC";
|
||||
|
@ -947,3 +947,25 @@ DATA_REND_EVENING_LATE = Late Evening
|
||||
DATA_REND_NIGHT = Night
|
||||
DATA_REND_AFTER_SLEEP = After Sleep
|
||||
DATA_REND_IMMEDIATE = Immediate
|
||||
VALUE_SET_AR = Argentinian Edition
|
||||
VALUE_SET_AT = Austrian Edition
|
||||
VALUE_SET_BE = Belgian Edition
|
||||
VALUE_SET_CA_EN = Canadian English Edition
|
||||
VALUE_SET_CA_FR = Canadian Canadian French Edition
|
||||
VALUE_SET_EE = Estonian Edition
|
||||
VALUE_SET_FI = Finnish Edition
|
||||
VALUE_SET_DE = German Edition
|
||||
VALUE_SET_IE = Irish Edition
|
||||
VALUE_SET_NZ = New Zealand Edition
|
||||
VALUE_SET_NO = Norwegian Edition
|
||||
VALUE_SET_KR = Republic of Korea Edition (South Korea)
|
||||
VALUE_ES_ES = Spanish National Edition
|
||||
VALUE_SET_CH = Swiss Edition
|
||||
VALUE_SET_UK_CLIN = UK Clinical Edition
|
||||
VALUE_SET_UY = Uruguay Edition
|
||||
VALUE_SET_US_ICD10CM = US Edition (with ICD-10-CM maps)
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -878,13 +878,33 @@ public class CliContext {
|
||||
public String getSnomedCTCode() {
|
||||
if ("intl".equals(snomedCT)) return "900000000000207008";
|
||||
if ("us".equals(snomedCT)) return "731000124108";
|
||||
if ("uk".equals(snomedCT)) return "999000041000000102";
|
||||
if ("us+icd10cm".equals(snomedCT)) return "5991000124107";
|
||||
if ("uk/clinical".equals(snomedCT)) return "999000021000000109";
|
||||
if ("uk".equals(snomedCT)) return "83821000000107";
|
||||
if ("au".equals(snomedCT)) return "32506021000036107";
|
||||
if ("ca".equals(snomedCT)) return "20611000087101";
|
||||
if ("at".equals(snomedCT)) return "11000234105";
|
||||
if ("ca".equals(snomedCT)) return "20621000087109";
|
||||
if ("ca-en".equals(snomedCT)) return "20621000087109";
|
||||
if ("ca-fr".equals(snomedCT)) return "20611000087101";
|
||||
if ("nl".equals(snomedCT)) return "11000146104";
|
||||
if ("se".equals(snomedCT)) return "45991000052106";
|
||||
if ("es".equals(snomedCT)) return "449081005";
|
||||
if ("es-ES".equals(snomedCT)) return "900000001000122104";
|
||||
if ("ar".equals(snomedCT)) return "11000221109";
|
||||
if ("dk".equals(snomedCT)) return "554471000005108";
|
||||
if ("be".equals(snomedCT)) return "11000172109";
|
||||
if ("ee".equals(snomedCT)) return "11000181102";
|
||||
if ("fi".equals(snomedCT)) return "11000229106";
|
||||
if ("de".equals(snomedCT)) return "11000274103";
|
||||
if ("in".equals(snomedCT)) return "1121000189102";
|
||||
if ("ie".equals(snomedCT)) return "11000220105";
|
||||
if ("nl".equals(snomedCT)) return "11000146104";
|
||||
if ("nz".equals(snomedCT)) return "21000210109";
|
||||
if ("no".equals(snomedCT)) return "51000202101";
|
||||
if ("kr".equals(snomedCT)) return "11000267109";
|
||||
if ("se".equals(snomedCT)) return "45991000052106";
|
||||
if ("ch".equals(snomedCT)) return "2011000195101";
|
||||
if ("uy".equals(snomedCT)) return "5631000179106";
|
||||
return snomedCT;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user