Merge branch 'master' into do-20240716-fix-code-validation-for-locale
This commit is contained in:
commit
231b18edad
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>6.3.18-SNAPSHOT</version>
|
||||
<version>6.3.19-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>6.3.18-SNAPSHOT</version>
|
||||
<version>6.3.19-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>6.3.18-SNAPSHOT</version>
|
||||
<version>6.3.19-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>6.3.18-SNAPSHOT</version>
|
||||
<version>6.3.19-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>6.3.18-SNAPSHOT</version>
|
||||
<version>6.3.19-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -347,6 +347,8 @@ public class NamingSystem extends MetadataResource {
|
|||
}
|
||||
|
||||
public String toCode(NamingSystemIdentifierType code) {
|
||||
if (code == NamingSystemIdentifierType.NULL)
|
||||
return null;
|
||||
if (code == NamingSystemIdentifierType.OID)
|
||||
return "oid";
|
||||
if (code == NamingSystemIdentifierType.UUID)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>6.3.18-SNAPSHOT</version>
|
||||
<version>6.3.19-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>6.3.18-SNAPSHOT</version>
|
||||
<version>6.3.19-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -312,6 +312,8 @@ public class NamingSystem extends MetadataResource {
|
|||
throw new FHIRException("Unknown NamingSystemType code '"+codeString+"'");
|
||||
}
|
||||
public String toCode(NamingSystemType code) {
|
||||
if (code == NamingSystemType.NULL)
|
||||
return null;
|
||||
if (code == NamingSystemType.CODESYSTEM)
|
||||
return "codesystem";
|
||||
if (code == NamingSystemType.IDENTIFIER)
|
||||
|
|
|
@ -278,10 +278,11 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
String s = codeSystem+'-'+code;
|
||||
StringBuilder b = new StringBuilder();
|
||||
for (char c : s.toCharArray()) {
|
||||
if (Character.isAlphabetic(c) || Character.isDigit(c) || c == '.')
|
||||
b.append(c);
|
||||
else
|
||||
b.append('-');
|
||||
if (Utilities.isValidHtmlAnchorChar(c)) {
|
||||
b.append(c);
|
||||
} else {
|
||||
b.append("|"+Integer.toHexString(c)); // not % to save double coding confusing users
|
||||
}
|
||||
}
|
||||
return b.toString();
|
||||
}
|
||||
|
|
|
@ -88,8 +88,9 @@ public class OperationOutcomeRenderer extends ResourceRenderer {
|
|||
d = true;
|
||||
td.addText(s.primitiveValue());
|
||||
}
|
||||
tr.td().addText(getTranslatedCode(i.child("code")));
|
||||
tr.td().addText(i.child("details").primitiveValue("text"));
|
||||
tr.td().addText(getTranslatedCode(i.child("code")));
|
||||
if (i.has("details"))
|
||||
tr.td().addText(i.child("details").primitiveValue("text"));
|
||||
smartAddText(tr.td(), i.primitiveValue("diagnostics"));
|
||||
if (hasSource) {
|
||||
ResourceWrapper ext = i.extension(ToolingExtensions.EXT_ISSUE_SOURCE);
|
||||
|
|
|
@ -809,7 +809,8 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
XhtmlNode td = tr.td();
|
||||
|
||||
String tgt = makeAnchor(c.getSystem(), c.getCode());
|
||||
td.an(res.getScopedId()+"-"+context.prefixAnchor(tgt));
|
||||
String pfx = res.getScopedId();
|
||||
td.an((context.prefixAnchor(pfx == null ? "" : pfx+"-")+tgt));
|
||||
|
||||
if (doLevel) {
|
||||
td.addText(Integer.toString(i));
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>6.3.18-SNAPSHOT</version>
|
||||
<version>6.3.19-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>6.3.18-SNAPSHOT</version>
|
||||
<version>6.3.19-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -2254,4 +2254,34 @@ public class Utilities {
|
|||
}
|
||||
}
|
||||
|
||||
public static boolean isValidHtmlAnchorChar(char c) {
|
||||
if ( (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')) {
|
||||
return true;
|
||||
}
|
||||
switch (c) {
|
||||
case '!':
|
||||
case '$':
|
||||
case '&':
|
||||
case '\'':
|
||||
case '(':
|
||||
case ')':
|
||||
case '*':
|
||||
case '+':
|
||||
case ',':
|
||||
case ';':
|
||||
case '=':
|
||||
case '.':
|
||||
case '_':
|
||||
case '-':
|
||||
case '~':
|
||||
case ':':
|
||||
case '@':
|
||||
case '/':
|
||||
case '?':
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>6.3.18-SNAPSHOT</version>
|
||||
<version>6.3.19-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>6.3.18-SNAPSHOT</version>
|
||||
<version>6.3.19-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
Loading…
Reference in New Issue