Merge branch 'master' into do-20240716-fix-code-validation-for-locale

This commit is contained in:
dotasek 2024-07-17 17:04:49 -04:00
commit 231b18edad
18 changed files with 56 additions and 19 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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)

View File

@ -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>

View File

@ -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>

View File

@ -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)

View File

@ -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();
}

View File

@ -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);

View File

@ -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));

View File

@ -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>

View File

@ -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>

View File

@ -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;
}
}
}

View File

@ -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>

View File

@ -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>

View File

@ -14,7 +14,7 @@
HAPI FHIR
-->
<artifactId>org.hl7.fhir.core</artifactId>
<version>6.3.18-SNAPSHOT</version>
<version>6.3.19-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>