Merge branch 'master' into do-20240716-fix-code-validation-for-locale
This commit is contained in:
commit
231b18edad
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>6.3.18-SNAPSHOT</version>
|
<version>6.3.19-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>6.3.18-SNAPSHOT</version>
|
<version>6.3.19-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>6.3.18-SNAPSHOT</version>
|
<version>6.3.19-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>6.3.18-SNAPSHOT</version>
|
<version>6.3.19-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>6.3.18-SNAPSHOT</version>
|
<version>6.3.19-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -347,6 +347,8 @@ public class NamingSystem extends MetadataResource {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toCode(NamingSystemIdentifierType code) {
|
public String toCode(NamingSystemIdentifierType code) {
|
||||||
|
if (code == NamingSystemIdentifierType.NULL)
|
||||||
|
return null;
|
||||||
if (code == NamingSystemIdentifierType.OID)
|
if (code == NamingSystemIdentifierType.OID)
|
||||||
return "oid";
|
return "oid";
|
||||||
if (code == NamingSystemIdentifierType.UUID)
|
if (code == NamingSystemIdentifierType.UUID)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>6.3.18-SNAPSHOT</version>
|
<version>6.3.19-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>6.3.18-SNAPSHOT</version>
|
<version>6.3.19-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -312,6 +312,8 @@ public class NamingSystem extends MetadataResource {
|
||||||
throw new FHIRException("Unknown NamingSystemType code '"+codeString+"'");
|
throw new FHIRException("Unknown NamingSystemType code '"+codeString+"'");
|
||||||
}
|
}
|
||||||
public String toCode(NamingSystemType code) {
|
public String toCode(NamingSystemType code) {
|
||||||
|
if (code == NamingSystemType.NULL)
|
||||||
|
return null;
|
||||||
if (code == NamingSystemType.CODESYSTEM)
|
if (code == NamingSystemType.CODESYSTEM)
|
||||||
return "codesystem";
|
return "codesystem";
|
||||||
if (code == NamingSystemType.IDENTIFIER)
|
if (code == NamingSystemType.IDENTIFIER)
|
||||||
|
|
|
@ -278,10 +278,11 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
||||||
String s = codeSystem+'-'+code;
|
String s = codeSystem+'-'+code;
|
||||||
StringBuilder b = new StringBuilder();
|
StringBuilder b = new StringBuilder();
|
||||||
for (char c : s.toCharArray()) {
|
for (char c : s.toCharArray()) {
|
||||||
if (Character.isAlphabetic(c) || Character.isDigit(c) || c == '.')
|
if (Utilities.isValidHtmlAnchorChar(c)) {
|
||||||
b.append(c);
|
b.append(c);
|
||||||
else
|
} else {
|
||||||
b.append('-');
|
b.append("|"+Integer.toHexString(c)); // not % to save double coding confusing users
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return b.toString();
|
return b.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,6 +89,7 @@ public class OperationOutcomeRenderer extends ResourceRenderer {
|
||||||
td.addText(s.primitiveValue());
|
td.addText(s.primitiveValue());
|
||||||
}
|
}
|
||||||
tr.td().addText(getTranslatedCode(i.child("code")));
|
tr.td().addText(getTranslatedCode(i.child("code")));
|
||||||
|
if (i.has("details"))
|
||||||
tr.td().addText(i.child("details").primitiveValue("text"));
|
tr.td().addText(i.child("details").primitiveValue("text"));
|
||||||
smartAddText(tr.td(), i.primitiveValue("diagnostics"));
|
smartAddText(tr.td(), i.primitiveValue("diagnostics"));
|
||||||
if (hasSource) {
|
if (hasSource) {
|
||||||
|
|
|
@ -809,7 +809,8 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
||||||
XhtmlNode td = tr.td();
|
XhtmlNode td = tr.td();
|
||||||
|
|
||||||
String tgt = makeAnchor(c.getSystem(), c.getCode());
|
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) {
|
if (doLevel) {
|
||||||
td.addText(Integer.toString(i));
|
td.addText(Integer.toString(i));
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>6.3.18-SNAPSHOT</version>
|
<version>6.3.19-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>6.3.18-SNAPSHOT</version>
|
<version>6.3.19-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</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>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>6.3.18-SNAPSHOT</version>
|
<version>6.3.19-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>6.3.18-SNAPSHOT</version>
|
<version>6.3.19-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -14,7 +14,7 @@
|
||||||
HAPI FHIR
|
HAPI FHIR
|
||||||
-->
|
-->
|
||||||
<artifactId>org.hl7.fhir.core</artifactId>
|
<artifactId>org.hl7.fhir.core</artifactId>
|
||||||
<version>6.3.18-SNAPSHOT</version>
|
<version>6.3.19-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|
Loading…
Reference in New Issue