mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-03-05 19:09:11 +00:00
Fix code system rendering for uri properties
This commit is contained in:
parent
3e642e8bd8
commit
2628010dff
2
.gitignore
vendored
2
.gitignore
vendored
@ -307,3 +307,5 @@ local.properties
|
||||
/org.hl7.fhir.r4b.new
|
||||
|
||||
org.hl7.fhir.r5/var/lib/.fhir/packages/
|
||||
|
||||
org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/DebugUtilities.java
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -11,6 +11,7 @@ import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.exceptions.FHIRFormatError;
|
||||
import org.hl7.fhir.r5.comparison.VersionComparisonAnnotation;
|
||||
import org.hl7.fhir.r5.model.BooleanType;
|
||||
import org.hl7.fhir.r5.model.CanonicalResource;
|
||||
import org.hl7.fhir.r5.model.CodeSystem;
|
||||
import org.hl7.fhir.r5.model.Enumerations.CodeSystemContentMode;
|
||||
import org.hl7.fhir.r5.model.CodeSystem.CodeSystemFilterComponent;
|
||||
@ -539,8 +540,15 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
||||
if (first) first = false; else td.addText(", ");
|
||||
if (pcv.hasValueCoding()) {
|
||||
td.addText(pcv.getValueCoding().getCode());
|
||||
} else if (pcv.hasValueStringType() && Utilities.isAbsoluteUrlLinkable(pcv.getValue().primitiveValue())) {
|
||||
td.ah(pcv.getValue().primitiveValue()).tx(pcv.getValue().primitiveValue());
|
||||
} else if (pcv.hasValueStringType() && Utilities.isAbsoluteUrl(pcv.getValue().primitiveValue())) {
|
||||
CanonicalResource cr = (CanonicalResource) context.getContext().fetchResource(Resource.class, pcv.getValue().primitiveValue());
|
||||
if (cr != null) {
|
||||
td.ah(cr.getWebPath(), cr.getVersionedUrl()).tx(cr.present());
|
||||
} else if (Utilities.isAbsoluteUrlLinkable(pcv.getValue().primitiveValue())) {
|
||||
td.ah(pcv.getValue().primitiveValue()).tx(pcv.getValue().primitiveValue());
|
||||
} else {
|
||||
td.code(pcv.getValue().primitiveValue());
|
||||
}
|
||||
} else if ("parent".equals(pcv.getCode())) {
|
||||
td.ah("#"+cs.getId()+"-"+Utilities.nmtokenize(pcv.getValue().primitiveValue())).addText(pcv.getValue().primitiveValue());
|
||||
} else {
|
||||
|
@ -31,6 +31,8 @@ public class XVerExtensionManager {
|
||||
|
||||
public static final String XVER_EXT_MARKER = "XVER_EXT_MARKER";
|
||||
|
||||
public static final String XVER_VER_MARKER = "XVER_VER_MARKER";
|
||||
|
||||
private Map<String, JsonObject> lists = new HashMap<>();
|
||||
private IWorkerContext context;
|
||||
|
||||
@ -92,6 +94,7 @@ public class XVerExtensionManager {
|
||||
|
||||
StructureDefinition sd = new StructureDefinition();
|
||||
sd.setUserData(XVER_EXT_MARKER, "true");
|
||||
sd.setUserData(XVER_VER_MARKER, verSource);
|
||||
if (context.getResourceNamesAsSet().contains(r)) {
|
||||
sd.setWebPath(Utilities.pathURL(context.getSpecUrl(), r.toLowerCase()+"-definitions.html#"+e));
|
||||
} else {
|
||||
|
@ -729,5 +729,15 @@ public class VersionUtilities {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean includedInRange(String startVer, String stopVer, String ver) {
|
||||
if (ver.equals(startVer)) {
|
||||
return true;
|
||||
}
|
||||
if (ver.equals(stopVer)) {
|
||||
return true;
|
||||
}
|
||||
return startVer.compareTo(ver) < 0 && stopVer.compareTo(ver) > 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -976,5 +976,27 @@ public class XhtmlNode extends XhtmlFluent implements IBaseXhtml {
|
||||
}
|
||||
return btn;
|
||||
}
|
||||
|
||||
|
||||
public XhtmlNode head() {
|
||||
return addTag("head");
|
||||
}
|
||||
|
||||
public XhtmlNode body() {
|
||||
return addTag("body");
|
||||
}
|
||||
public XhtmlNode title(String title) {
|
||||
return addTag("title").tx(title);
|
||||
}
|
||||
|
||||
public XhtmlNode link(String rel, String href) {
|
||||
return addTag("link").attribute("rel", rel).attribute("href", href);
|
||||
}
|
||||
|
||||
|
||||
public void wbr() {
|
||||
addTag("wbr");
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user