Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c9416e9a56
|
@ -90,7 +90,7 @@ steps:
|
|||
jdkVersionOption: '1.11'
|
||||
jdkArchitectureOption: 'x64'
|
||||
options: '--settings $(System.DefaultWorkingDirectory)/settings.xml -pl "!org.hl7.fhir.report, !org.hl7.fhir.validation.cli" -DdeployToSonatype'
|
||||
mavenOptions: '-Xmx768m'
|
||||
mavenOptions: '-Xmx768m -Dmaven.resolver.transport=wagon'
|
||||
publishJUnitResults: false
|
||||
|
||||
# Deploy the SNAPSHOT artifact to GitHub packages.
|
||||
|
@ -104,5 +104,5 @@ steps:
|
|||
jdkVersionOption: '1.11'
|
||||
jdkArchitectureOption: 'x64'
|
||||
options: '--settings $(System.DefaultWorkingDirectory)/settings.xml -pl "!org.hl7.fhir.report, !org.hl7.fhir.validation.cli" -Dmaven.test.skip -DdeployToGitHub'
|
||||
mavenOptions: '-Xmx768m'
|
||||
mavenOptions: '-Xmx768m -Dmaven.resolver.transport=wagon'
|
||||
publishJUnitResults: false
|
||||
|
|
|
@ -102,13 +102,11 @@
|
|||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-params</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -107,13 +107,11 @@
|
|||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-params</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -121,13 +121,11 @@
|
|||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-params</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -112,7 +112,7 @@ public class HumanName extends Type implements ICompositeType {
|
|||
case ANONYMOUS: return "anonymous";
|
||||
case OLD: return "old";
|
||||
case MAIDEN: return "maiden";
|
||||
case NULL: return null;
|
||||
case NULL: return null;
|
||||
default: return "?";
|
||||
}
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ public class HumanName extends Type implements ICompositeType {
|
|||
case ANONYMOUS: return "http://hl7.org/fhir/name-use";
|
||||
case OLD: return "http://hl7.org/fhir/name-use";
|
||||
case MAIDEN: return "http://hl7.org/fhir/name-use";
|
||||
case NULL: return null;
|
||||
case NULL: return null;
|
||||
default: return "?";
|
||||
}
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ public class HumanName extends Type implements ICompositeType {
|
|||
case ANONYMOUS: return "Anonymous assigned name, alias, or pseudonym (used to protect a person's identity for privacy reasons)";
|
||||
case OLD: return "This name is no longer in use (or was never correct, but retained for records)";
|
||||
case MAIDEN: return "A name used prior to marriage. Marriage naming customs vary greatly around the world. This name use is for use by applications that collect and store \"maiden\" names. Though the concept of maiden name is often gender specific, the use of this term is not gender specific. The use of this term does not imply any particular history for a person's name, nor should the maiden name be determined algorithmically.";
|
||||
case NULL: return null;
|
||||
case NULL: return null;
|
||||
default: return "?";
|
||||
}
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ public class HumanName extends Type implements ICompositeType {
|
|||
case ANONYMOUS: return "Anonymous";
|
||||
case OLD: return "Old";
|
||||
case MAIDEN: return "Maiden";
|
||||
case NULL: return null;
|
||||
case NULL: return null;
|
||||
default: return "?";
|
||||
}
|
||||
}
|
||||
|
@ -680,17 +680,17 @@ public class HumanName extends Type implements ICompositeType {
|
|||
* TODO: replace with call to ca.uhn.fhir.util.DatatypeUtil.joinStringsSpaceSeparated when HAPI upgrades to 1.4
|
||||
*/
|
||||
private static String joinStringsSpaceSeparated(List<? extends IPrimitiveType<String>> theStrings) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
for (IPrimitiveType<String> next : theStrings) {
|
||||
if (next.isEmpty()) {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
for (IPrimitiveType<String> string : theStrings) {
|
||||
if (string.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
if (b.length() > 0) {
|
||||
b.append(' ');
|
||||
if (stringBuilder.length() > 0) {
|
||||
stringBuilder.append(' ');
|
||||
}
|
||||
b.append(next.getValue());
|
||||
stringBuilder.append(string.getValue());
|
||||
}
|
||||
return b.toString();
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
protected void listChildren(List<Property> childrenList) {
|
||||
super.listChildren(childrenList);
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
package org.hl7.fhir.dstu2016may.model;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class HumanNameTest {
|
||||
|
||||
@Test
|
||||
public void getNameAsSingleStringWithoutFamilyElement() {
|
||||
final String expected = "dummy value";
|
||||
HumanName humanName = new HumanName()
|
||||
.setTextElement(new StringType(expected));
|
||||
|
||||
String actual = humanName.getNameAsSingleString();
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getNameAsSingleStringWithFamilyElement() {
|
||||
final String expected = "good value";
|
||||
HumanName humanName = new HumanName()
|
||||
.addFamily(expected);
|
||||
|
||||
String actual = humanName.getNameAsSingleString();
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
}
|
|
@ -115,13 +115,11 @@
|
|||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-params</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -114,7 +114,7 @@ public class HumanName extends Type implements ICompositeType {
|
|||
case ANONYMOUS: return "anonymous";
|
||||
case OLD: return "old";
|
||||
case MAIDEN: return "maiden";
|
||||
case NULL: return null;
|
||||
case NULL: return null;
|
||||
default: return "?";
|
||||
}
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ public class HumanName extends Type implements ICompositeType {
|
|||
case ANONYMOUS: return "http://hl7.org/fhir/name-use";
|
||||
case OLD: return "http://hl7.org/fhir/name-use";
|
||||
case MAIDEN: return "http://hl7.org/fhir/name-use";
|
||||
case NULL: return null;
|
||||
case NULL: return null;
|
||||
default: return "?";
|
||||
}
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ public class HumanName extends Type implements ICompositeType {
|
|||
case ANONYMOUS: return "Anonymous assigned name, alias, or pseudonym (used to protect a person's identity for privacy reasons)";
|
||||
case OLD: return "This name is no longer in use (or was never correct, but retained for records)";
|
||||
case MAIDEN: return "A name used prior to changing name because of marriage. This name use is for use by applications that collect and store names that were used prior to a marriage. Marriage naming customs vary greatly around the world, and are constantly changing. This term is not gender specific. The use of this term does not imply any particular history for a person's name";
|
||||
case NULL: return null;
|
||||
case NULL: return null;
|
||||
default: return "?";
|
||||
}
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ public class HumanName extends Type implements ICompositeType {
|
|||
case ANONYMOUS: return "Anonymous";
|
||||
case OLD: return "Old";
|
||||
case MAIDEN: return "Name changed for Marriage";
|
||||
case NULL: return null;
|
||||
case NULL: return null;
|
||||
default: return "?";
|
||||
}
|
||||
}
|
||||
|
@ -678,7 +678,9 @@ public class HumanName extends Type implements ICompositeType {
|
|||
List<StringType> nameParts = new ArrayList<StringType>();
|
||||
nameParts.addAll(getPrefix());
|
||||
nameParts.addAll(getGiven());
|
||||
nameParts.add(getFamilyElement());
|
||||
if (hasFamilyElement()) {
|
||||
nameParts.add(getFamilyElement());
|
||||
}
|
||||
nameParts.addAll(getSuffix());
|
||||
if (nameParts.size() > 0) {
|
||||
return joinStringsSpaceSeparated(nameParts);
|
||||
|
@ -693,17 +695,17 @@ public class HumanName extends Type implements ICompositeType {
|
|||
* TODO: replace with call to ca.uhn.fhir.util.DatatypeUtil.joinStringsSpaceSeparated when HAPI upgrades to 1.4
|
||||
*/
|
||||
private static String joinStringsSpaceSeparated(List<? extends IPrimitiveType<String>> theStrings) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
for (IPrimitiveType<String> next : theStrings) {
|
||||
if (next.isEmpty()) {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
for (IPrimitiveType<String> string : theStrings) {
|
||||
if (string.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
if (b.length() > 0) {
|
||||
b.append(' ');
|
||||
if (stringBuilder.length() > 0) {
|
||||
stringBuilder.append(' ');
|
||||
}
|
||||
b.append(next.getValue());
|
||||
stringBuilder.append(string.getValue());
|
||||
}
|
||||
return b.toString();
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
protected void listChildren(List<Property> children) {
|
||||
super.listChildren(children);
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
package org.hl7.fhir.dstu3.model;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class HumanNameTest {
|
||||
|
||||
@Test
|
||||
public void getNameAsSingleStringWithoutFamilyElement() {
|
||||
final String expected = "dummy value";
|
||||
HumanName humanName = new HumanName()
|
||||
.setTextElement(new StringType(expected));
|
||||
|
||||
String actual = humanName.getNameAsSingleString();
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getNameAsSingleStringWithFamilyElement() {
|
||||
final String expected = "good value";
|
||||
HumanName humanName = new HumanName()
|
||||
.setFamily(expected);
|
||||
|
||||
String actual = humanName.getNameAsSingleString();
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
}
|
|
@ -125,13 +125,11 @@
|
|||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-params</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -678,7 +678,9 @@ public class HumanName extends Type implements ICompositeType {
|
|||
List<StringType> nameParts = new ArrayList<StringType>();
|
||||
nameParts.addAll(getPrefix());
|
||||
nameParts.addAll(getGiven());
|
||||
nameParts.add(getFamilyElement());
|
||||
if (hasFamilyElement()) {
|
||||
nameParts.add(getFamilyElement());
|
||||
}
|
||||
nameParts.addAll(getSuffix());
|
||||
if (nameParts.size() > 0) {
|
||||
return joinStringsSpaceSeparated(nameParts);
|
||||
|
@ -693,17 +695,17 @@ public class HumanName extends Type implements ICompositeType {
|
|||
* TODO: replace with call to ca.uhn.fhir.util.DatatypeUtil.joinStringsSpaceSeparated when HAPI upgrades to 1.4
|
||||
*/
|
||||
private static String joinStringsSpaceSeparated(List<? extends IPrimitiveType<String>> theStrings) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
for (IPrimitiveType<String> next : theStrings) {
|
||||
if (next.isEmpty()) {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
for (IPrimitiveType<String> string : theStrings) {
|
||||
if (string.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
if (b.length() > 0) {
|
||||
b.append(' ');
|
||||
if (stringBuilder.length() > 0) {
|
||||
stringBuilder.append(' ');
|
||||
}
|
||||
b.append(next.getValue());
|
||||
stringBuilder.append(string.getValue());
|
||||
}
|
||||
return b.toString();
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
protected void listChildren(List<Property> children) {
|
||||
super.listChildren(children);
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package org.hl7.fhir.r4.model;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class HumanNameTest {
|
||||
|
||||
@Test
|
||||
public void getNameAsSingleStringWithoutFamilyElement() {
|
||||
final String expected = "dummy value";
|
||||
HumanName humanName = new HumanName()
|
||||
.setTextElement(new StringType(expected));
|
||||
|
||||
String actual = humanName.getNameAsSingleString();
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getNameAsSingleStringWithFamilyElement() {
|
||||
final String expected = "good value";
|
||||
HumanName humanName = new HumanName()
|
||||
.setFamily(expected);
|
||||
|
||||
String actual = humanName.getNameAsSingleString();
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
}
|
|
@ -145,13 +145,11 @@
|
|||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-params</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -899,8 +899,10 @@ public class HumanName extends DataType implements ICompositeType {
|
|||
public String getNameAsSingleString() {
|
||||
List<StringType> nameParts = new ArrayList<StringType>();
|
||||
nameParts.addAll(getPrefix());
|
||||
nameParts.addAll(getGiven());
|
||||
nameParts.add(getFamilyElement());
|
||||
nameParts.addAll(getGiven());
|
||||
if (hasFamilyElement()) {
|
||||
nameParts.add(getFamilyElement());
|
||||
}
|
||||
nameParts.addAll(getSuffix());
|
||||
if (nameParts.size() > 0) {
|
||||
return joinStringsSpaceSeparated(nameParts);
|
||||
|
@ -915,17 +917,17 @@ public class HumanName extends DataType implements ICompositeType {
|
|||
* TODO: replace with call to ca.uhn.fhir.util.DatatypeUtil.joinStringsSpaceSeparated when HAPI upgrades to 1.4
|
||||
*/
|
||||
private static String joinStringsSpaceSeparated(List<? extends IPrimitiveType<String>> theStrings) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
for (IPrimitiveType<String> next : theStrings) {
|
||||
if (next.isEmpty()) {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
for (IPrimitiveType<String> string : theStrings) {
|
||||
if (string.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
if (b.length() > 0) {
|
||||
b.append(' ');
|
||||
if (stringBuilder.length() > 0) {
|
||||
stringBuilder.append(' ');
|
||||
}
|
||||
b.append(next.getValue());
|
||||
stringBuilder.append(string.getValue());
|
||||
}
|
||||
return b.toString();
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
// end addition
|
||||
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
package org.hl7.fhir.r4b.model;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class HumanNameTest {
|
||||
|
||||
@Test
|
||||
public void getNameAsSingleStringWithoutFamilyElement() {
|
||||
final String expected = "dummy value";
|
||||
HumanName humanName = new HumanName()
|
||||
.setTextElement(new StringType(expected));
|
||||
|
||||
String actual = humanName.getNameAsSingleString();
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getNameAsSingleStringWithFamilyElement() {
|
||||
final String expected = "good value";
|
||||
HumanName humanName = new HumanName()
|
||||
.setFamily(expected);
|
||||
|
||||
String actual = humanName.getNameAsSingleString();
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
}
|
|
@ -169,13 +169,11 @@
|
|||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-params</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -900,7 +900,9 @@ public class HumanName extends DataType implements ICompositeType {
|
|||
List<StringType> nameParts = new ArrayList<StringType>();
|
||||
nameParts.addAll(getPrefix());
|
||||
nameParts.addAll(getGiven());
|
||||
nameParts.add(getFamilyElement());
|
||||
if (hasFamilyElement()) {
|
||||
nameParts.add(getFamilyElement());
|
||||
}
|
||||
nameParts.addAll(getSuffix());
|
||||
if (nameParts.size() > 0) {
|
||||
return joinStringsSpaceSeparated(nameParts);
|
||||
|
@ -915,17 +917,17 @@ public class HumanName extends DataType implements ICompositeType {
|
|||
* TODO: replace with call to ca.uhn.fhir.util.DatatypeUtil.joinStringsSpaceSeparated when HAPI upgrades to 1.4
|
||||
*/
|
||||
private static String joinStringsSpaceSeparated(List<? extends IPrimitiveType<String>> theStrings) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
for (IPrimitiveType<String> next : theStrings) {
|
||||
if (next.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
if (b.length() > 0) {
|
||||
b.append(' ');
|
||||
}
|
||||
b.append(next.getValue());
|
||||
}
|
||||
return b.toString();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
for (IPrimitiveType<String> string : theStrings) {
|
||||
if (string.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
if (stringBuilder.length() > 0) {
|
||||
stringBuilder.append(' ');
|
||||
}
|
||||
stringBuilder.append(string.getValue());
|
||||
}
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
// end addition
|
||||
|
||||
|
|
|
@ -69,18 +69,11 @@ import org.hl7.fhir.r5.utils.FHIRLexer.FHIRLexerException;
|
|||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.r5.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.SourceLocation;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.VersionUtilities;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueType;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.Source;
|
||||
import org.hl7.fhir.utilities.validation.ValidationOptions;
|
||||
import org.hl7.fhir.utilities.xhtml.NodeType;
|
||||
import org.hl7.fhir.utilities.xhtml.XhtmlNode;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
|
@ -1047,7 +1040,7 @@ public class StructureMapUtilities {
|
|||
lexer.token(")");
|
||||
} else if (lexer.hasToken(".")) {
|
||||
lexer.token(".");
|
||||
source.setElement(lexer.take());
|
||||
source.setElement(readAsStringOrProcessedConstant(lexer.take(), lexer));
|
||||
}
|
||||
if (lexer.hasToken(":")) {
|
||||
// type and cardinality
|
||||
|
@ -1090,6 +1083,12 @@ public class StructureMapUtilities {
|
|||
}
|
||||
}
|
||||
|
||||
private String readAsStringOrProcessedConstant(String s, FHIRLexer lexer) throws FHIRLexerException {
|
||||
if (s.startsWith("\"") || s.startsWith("`"))
|
||||
return lexer.processConstant(s);
|
||||
else
|
||||
return s;
|
||||
}
|
||||
|
||||
private void parseTarget(StructureMapGroupRuleComponent rule, FHIRLexer lexer) throws FHIRException {
|
||||
StructureMapGroupRuleTargetComponent target = rule.addTarget();
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package org.hl7.fhir.r5.model;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class HumanNameTest {
|
||||
|
||||
@Test
|
||||
public void getNameAsSingleStringWithoutFamilyElement() {
|
||||
final String expected = "dummy value";
|
||||
HumanName humanName = new HumanName()
|
||||
.setTextElement(new StringType(expected));
|
||||
|
||||
String actual = humanName.getNameAsSingleString();
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getNameAsSingleStringWithFamilyElement() {
|
||||
final String expected = "good value";
|
||||
HumanName humanName = new HumanName()
|
||||
.setFamily(expected);
|
||||
|
||||
String actual = humanName.getNameAsSingleString();
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
}
|
|
@ -90,6 +90,25 @@ public class StructureMapUtilitiesTest implements ITransformerServices {
|
|||
assertSerializeDeserialize(map);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSourceElementDelimiter() throws IOException, FHIRException {
|
||||
StructureMapUtilities scu = new StructureMapUtilities(context, this);
|
||||
String fileMap = "map \"http://github.com/FHIR/testSourceElementDelimiter\" = \"testSourceElementDelimiter\"\r\n"
|
||||
+ "uses \"http://hl7.org/fhir/StructureDefinition/Patient\" alias Patient as source\r\n"
|
||||
+ "uses \"http://hl7.org/fhir/StructureDefinition/Basic\" alias Basic as target\r\n"
|
||||
+ "group Patient(source src : Patient, target tgt : Basic) {\r\n"
|
||||
+ " src.identifier -> tgt.identifier;\r\n"
|
||||
+ " src.\"-quote\" -> tgt.quote;\r\n"
|
||||
+ " src.`-backtick` -> tgt.backtick;\r\n"
|
||||
+ "}";
|
||||
System.out.println(fileMap);
|
||||
|
||||
StructureMap structureMap = scu.parse(fileMap, "testSourceElementDelimiter");
|
||||
Assertions.assertEquals("identifier", structureMap.getGroup().get(0).getRule().get(0).getSourceFirstRep().getElement());
|
||||
Assertions.assertEquals("-quote", structureMap.getGroup().get(0).getRule().get(1).getSourceFirstRep().getElement());
|
||||
Assertions.assertEquals("-backtick", structureMap.getGroup().get(0).getRule().get(2).getSourceFirstRep().getElement());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void log(String message) {
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
<properties>
|
||||
<maven.deploy.skip>true</maven.deploy.skip>
|
||||
<jacoco_version>0.8.5</jacoco_version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
|
@ -109,7 +109,6 @@
|
|||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -123,7 +122,6 @@
|
|||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-params</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!-- shoo!
|
||||
|
@ -51,7 +50,6 @@
|
|||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-params</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
|
@ -213,7 +213,6 @@
|
|||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -233,14 +232,12 @@
|
|||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-params</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ public class SearchParameterValidator extends BaseValidator {
|
|||
pass.get(i).setOperation(Operation.Union);
|
||||
pass.get(i).setOpNext(pass.get(i+1));
|
||||
}
|
||||
return pass.size() == 0 ? "" : pass.get(0).toString();
|
||||
return pass.size() > 0 ? pass.get(0).toString() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
15
pom.xml
15
pom.xml
|
@ -20,12 +20,12 @@
|
|||
<properties>
|
||||
<hapi_fhir_version>6.2.1</hapi_fhir_version>
|
||||
<validator_test_case_version>1.2.26-SNAPSHOT</validator_test_case_version>
|
||||
<junit_jupiter_version>5.7.1</junit_jupiter_version>
|
||||
<junit_jupiter_version>5.9.2</junit_jupiter_version>
|
||||
<junit_platform_launcher_version>1.8.2</junit_platform_launcher_version>
|
||||
<maven_surefire_version>3.0.0-M5</maven_surefire_version>
|
||||
<maven_clean_version>3.1.0</maven_clean_version>
|
||||
<okhttp.version>4.9.3</okhttp.version>
|
||||
<jacoco_version>0.8.8</jacoco_version>
|
||||
<jacoco_version>0.8.9</jacoco_version>
|
||||
<info_cqframework_version>1.5.1</info_cqframework_version>
|
||||
<lombok_version>1.18.22</lombok_version>
|
||||
<byte_buddy_version>1.12.14</byte_buddy_version>
|
||||
|
@ -146,15 +146,10 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.vintage</groupId>
|
||||
<artifactId>junit-vintage-engine</artifactId>
|
||||
<groupId>org.junit</groupId>
|
||||
<artifactId>junit-bom</artifactId>
|
||||
<version>${junit_jupiter_version}</version>
|
||||
<type>pom</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -13,6 +13,7 @@ jobs:
|
|||
codecov: $(CODECOV_TOKEN)
|
||||
VERSION:
|
||||
JAVA_TOOL_OPTIONS: ${{image.javaToolOptions}}
|
||||
skipJaCoCo: $[not(eq(variables['currentName'], 'ubuntu-latest-java-11'))]
|
||||
|
||||
steps:
|
||||
- task: Cache@2
|
||||
|
@ -23,8 +24,8 @@ jobs:
|
|||
- task: Maven@3
|
||||
inputs:
|
||||
mavenPomFile: 'pom.xml'
|
||||
options: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
|
||||
mavenOptions: '-Xmx768m'
|
||||
options: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -Djacoco.skip=$(skipJaCoCo)'
|
||||
mavenOptions: '-Xmx768m -Dmaven.resolver.transport=wagon'
|
||||
javaHomeOption: 'JDKVersion'
|
||||
jdkVersionOption: '${{image.jdkVersion}}'
|
||||
jdkArchitectureOption: 'x64'
|
||||
|
@ -35,7 +36,7 @@ jobs:
|
|||
- task: Maven@3
|
||||
inputs:
|
||||
mavenPomFile: 'pom.xml'
|
||||
mavenOptions: '-Xmx768m'
|
||||
mavenOptions: '-Xmx768m -Dmaven.resolver.transport=wagon'
|
||||
javaHomeOption: 'JDKVersion'
|
||||
jdkVersionOption: '${{image.jdkVersion}}'
|
||||
jdkArchitectureOption: 'x64'
|
||||
|
@ -47,12 +48,12 @@ jobs:
|
|||
# Upload test results to codecov
|
||||
- script: bash <(curl https://codecov.io/bash) -t $(codecov)
|
||||
displayName: 'codecov Bash Uploader'
|
||||
condition: eq(variables.currentName, 'ubuntu-latest-java-11')
|
||||
condition: eq(variables.skipJaCoCo, false)
|
||||
|
||||
# Publishes the test results to build artifacts.
|
||||
- task: PublishCodeCoverageResults@1
|
||||
displayName: 'Publish JaCoCo test results'
|
||||
condition: eq(variables.currentName, 'ubuntu-latest-java-11')
|
||||
condition: eq(variables.skipJaCoCo, false)
|
||||
inputs:
|
||||
codeCoverageTool: 'JaCoCo'
|
||||
summaryFileLocation: '$(System.DefaultWorkingDirectory)/org.hl7.fhir.report/target/site/jacoco-aggregate/jacoco.xml'
|
||||
|
|
|
@ -29,7 +29,7 @@ jobs:
|
|||
inputs:
|
||||
mavenPomFile: 'pom.xml'
|
||||
options: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
|
||||
mavenOptions: '-Xmx768m'
|
||||
mavenOptions: '-Xmx768m -Dmaven.resolver.transport=wagon'
|
||||
javaHomeOption: 'JDKVersion'
|
||||
jdkVersionOption: '1.11'
|
||||
jdkArchitectureOption: 'x64'
|
||||
|
@ -39,7 +39,7 @@ jobs:
|
|||
inputs:
|
||||
mavenPomFile: 'pom.xml'
|
||||
options: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
|
||||
mavenOptions: '-Xmx4096m'
|
||||
mavenOptions: '-Xmx4096m -Dmaven.resolver.transport=wagon'
|
||||
javaHomeOption: 'JDKVersion'
|
||||
jdkVersionOption: '1.11'
|
||||
jdkArchitectureOption: 'x64'
|
||||
|
|
|
@ -127,7 +127,7 @@ jobs:
|
|||
- task: Maven@3
|
||||
inputs:
|
||||
mavenPomFile: 'pom.xml'
|
||||
mavenOptions: '-Xmx768m'
|
||||
mavenOptions: '-Xmx768m -Dmaven.resolver.transport=wagon'
|
||||
javaHomeOption: 'JDKVersion'
|
||||
jdkVersionOption: '1.11'
|
||||
jdkArchitectureOption: 'x64'
|
||||
|
|
Loading…
Reference in New Issue