Merge branch 'master' into issue-555
This commit is contained in:
commit
b5723bab50
|
@ -1,7 +1,8 @@
|
||||||
* Differential element fields minValue/maxValue are now correctly treated in the snapshot generation process
|
* Differential element fields minValue/maxValue are now correctly treated in the snapshot generation process
|
||||||
* Conversion context added to conversions process
|
* Conversion context added to conversions process
|
||||||
* Users can now define custom behavior for CodeSystems, Extensions, BundleEntries, and Types by extending BaseAdvisor.
|
* Users can now define custom behavior for CodeSystems, Extensions, BundleEntries, and Types by extending BaseAdvisor.
|
||||||
* Resource Conversions are now thread-safe, each using their own instance of the conversion context that is unique
|
* Resource Conversions are now thread-safe, each using their own instance of the conversion context that is unique
|
||||||
* ConversionFactory classes are statically accessed, to minimize changes downstream
|
* ConversionFactory classes are statically accessed, to minimize changes downstream
|
||||||
* I need to add more tests, there were very few to begin with, and it's my next task
|
* I need to add more tests, there were very few to begin with, and it's my next task
|
||||||
* All conversion libraries and no play makes Mark a dull boy
|
* All conversion libraries and no play makes Mark a dull boy
|
||||||
|
* Exposed showMessagesFromReferences on the command line interface to support reporting validation errors on referenced types (particularly useful when validating messages & documents)
|
||||||
|
|
|
@ -86,6 +86,9 @@ steps:
|
||||||
inputs:
|
inputs:
|
||||||
mavenPomFile: '$(System.DefaultWorkingDirectory)/pom.xml'
|
mavenPomFile: '$(System.DefaultWorkingDirectory)/pom.xml'
|
||||||
goals: deploy
|
goals: deploy
|
||||||
|
javaHomeOption: 'JDKVersion'
|
||||||
|
jdkVersionOption: '1.11'
|
||||||
|
jdkArchitectureOption: 'x64'
|
||||||
options: '--settings $(System.DefaultWorkingDirectory)/settings.xml -pl "!org.hl7.fhir.report, !org.hl7.fhir.validation.cli" -DdeployToSonatype'
|
options: '--settings $(System.DefaultWorkingDirectory)/settings.xml -pl "!org.hl7.fhir.report, !org.hl7.fhir.validation.cli" -DdeployToSonatype'
|
||||||
publishJUnitResults: false
|
publishJUnitResults: false
|
||||||
|
|
||||||
|
@ -96,5 +99,8 @@ steps:
|
||||||
inputs:
|
inputs:
|
||||||
mavenPomFile: '$(System.DefaultWorkingDirectory)/pom.xml'
|
mavenPomFile: '$(System.DefaultWorkingDirectory)/pom.xml'
|
||||||
goals: deploy
|
goals: deploy
|
||||||
|
javaHomeOption: 'JDKVersion'
|
||||||
|
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'
|
options: '--settings $(System.DefaultWorkingDirectory)/settings.xml -pl "!org.hl7.fhir.report, !org.hl7.fhir.validation.cli" -Dmaven.test.skip -DdeployToGitHub'
|
||||||
publishJUnitResults: false
|
publishJUnitResults: 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>5.4.10-SNAPSHOT</version>
|
<version>5.4.11-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
package org.hl7.fhir.convertors.factory;
|
||||||
|
|
||||||
|
import org.hl7.fhir.convertors.advisors.interfaces.BaseAdvisor;
|
||||||
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
|
import org.hl7.fhir.instance.model.api.IBaseDatatype;
|
||||||
|
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||||
|
|
||||||
|
public abstract class VersionConvertorFactory {
|
||||||
|
public static void cleanInputs(IBaseResource res, BaseAdvisor advisor) {
|
||||||
|
checkDataAndAdvisor(res, advisor);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void cleanInputs(IBaseDatatype res, BaseAdvisor advisor) {
|
||||||
|
checkDataAndAdvisor(res, advisor);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void checkDataAndAdvisor(Object o, BaseAdvisor advisor) {
|
||||||
|
if (advisor == null) {
|
||||||
|
throw new FHIRException("Null conversion advisor passed to factory method.");
|
||||||
|
}
|
||||||
|
if (advisor.failFastOnNullOrUnknownEntry() && o == null) {
|
||||||
|
throw new FHIRException("ConversionFactory received null input. Conversion advisor set to failFastOnNullInput.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,14 +5,15 @@ import org.hl7.fhir.convertors.conv10_30.VersionConvertor_10_30;
|
||||||
import org.hl7.fhir.exceptions.FHIRException;
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
import org.hl7.fhir.utilities.Utilities;
|
import org.hl7.fhir.utilities.Utilities;
|
||||||
|
|
||||||
public final class VersionConvertorFactory_10_30 {
|
public final class VersionConvertorFactory_10_30 extends VersionConvertorFactory {
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu3.model.Resource convertResource(org.hl7.fhir.dstu2.model.Resource src) throws FHIRException {
|
public static org.hl7.fhir.dstu3.model.Resource convertResource(org.hl7.fhir.dstu2.model.Resource src) throws FHIRException {
|
||||||
return convertResource(src, new BaseAdvisor_10_30());
|
return convertResource(src, new BaseAdvisor_10_30());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu3.model.Resource convertResource(org.hl7.fhir.dstu2.model.Resource src, BaseAdvisor_10_30 advisor) throws FHIRException {
|
public static org.hl7.fhir.dstu3.model.Resource convertResource(org.hl7.fhir.dstu2.model.Resource src, BaseAdvisor_10_30 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_10_30(advisor).convertResource(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_10_30(advisor).convertResource(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2.model.Resource convertResource(org.hl7.fhir.dstu3.model.Resource src) throws FHIRException {
|
public static org.hl7.fhir.dstu2.model.Resource convertResource(org.hl7.fhir.dstu3.model.Resource src) throws FHIRException {
|
||||||
|
@ -20,7 +21,8 @@ public final class VersionConvertorFactory_10_30 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2.model.Resource convertResource(org.hl7.fhir.dstu3.model.Resource src, BaseAdvisor_10_30 advisor) throws FHIRException {
|
public static org.hl7.fhir.dstu2.model.Resource convertResource(org.hl7.fhir.dstu3.model.Resource src, BaseAdvisor_10_30 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_10_30(advisor).convertResource(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_10_30(advisor).convertResource(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu3.model.Type convertType(org.hl7.fhir.dstu2.model.Type src) throws FHIRException {
|
public static org.hl7.fhir.dstu3.model.Type convertType(org.hl7.fhir.dstu2.model.Type src) throws FHIRException {
|
||||||
|
@ -28,7 +30,8 @@ public final class VersionConvertorFactory_10_30 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu3.model.Type convertType(org.hl7.fhir.dstu2.model.Type src, BaseAdvisor_10_30 advisor) throws FHIRException {
|
public static org.hl7.fhir.dstu3.model.Type convertType(org.hl7.fhir.dstu2.model.Type src, BaseAdvisor_10_30 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_10_30(advisor).convertType(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_10_30(advisor).convertType(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2.model.Type convertType(org.hl7.fhir.dstu3.model.Type src) throws FHIRException {
|
public static org.hl7.fhir.dstu2.model.Type convertType(org.hl7.fhir.dstu3.model.Type src) throws FHIRException {
|
||||||
|
@ -36,7 +39,8 @@ public final class VersionConvertorFactory_10_30 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2.model.Type convertType(org.hl7.fhir.dstu3.model.Type src, BaseAdvisor_10_30 advisor) throws FHIRException {
|
public static org.hl7.fhir.dstu2.model.Type convertType(org.hl7.fhir.dstu3.model.Type src, BaseAdvisor_10_30 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_10_30(advisor).convertType(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_10_30(advisor).convertType(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean convertsResource(String rt) {
|
public static boolean convertsResource(String rt) {
|
||||||
|
|
|
@ -5,14 +5,15 @@ import org.hl7.fhir.convertors.conv10_40.VersionConvertor_10_40;
|
||||||
import org.hl7.fhir.exceptions.FHIRException;
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
import org.hl7.fhir.utilities.Utilities;
|
import org.hl7.fhir.utilities.Utilities;
|
||||||
|
|
||||||
public final class VersionConvertorFactory_10_40 {
|
public final class VersionConvertorFactory_10_40 extends VersionConvertorFactory {
|
||||||
|
|
||||||
public static org.hl7.fhir.r4.model.Resource convertResource(org.hl7.fhir.dstu2.model.Resource src) throws FHIRException {
|
public static org.hl7.fhir.r4.model.Resource convertResource(org.hl7.fhir.dstu2.model.Resource src) throws FHIRException {
|
||||||
return convertResource(src, new BaseAdvisor_10_40());
|
return convertResource(src, new BaseAdvisor_10_40());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r4.model.Resource convertResource(org.hl7.fhir.dstu2.model.Resource src, BaseAdvisor_10_40 advisor) throws FHIRException {
|
public static org.hl7.fhir.r4.model.Resource convertResource(org.hl7.fhir.dstu2.model.Resource src, BaseAdvisor_10_40 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_10_40(advisor).convertResource(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_10_40(advisor).convertResource(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2.model.Resource convertResource(org.hl7.fhir.r4.model.Resource src) throws FHIRException {
|
public static org.hl7.fhir.dstu2.model.Resource convertResource(org.hl7.fhir.r4.model.Resource src) throws FHIRException {
|
||||||
|
@ -20,7 +21,8 @@ public final class VersionConvertorFactory_10_40 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2.model.Resource convertResource(org.hl7.fhir.r4.model.Resource src, BaseAdvisor_10_40 advisor) throws FHIRException {
|
public static org.hl7.fhir.dstu2.model.Resource convertResource(org.hl7.fhir.r4.model.Resource src, BaseAdvisor_10_40 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_10_40(advisor).convertResource(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_10_40(advisor).convertResource(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r4.model.Type convertType(org.hl7.fhir.dstu2.model.Type src) throws FHIRException {
|
public static org.hl7.fhir.r4.model.Type convertType(org.hl7.fhir.dstu2.model.Type src) throws FHIRException {
|
||||||
|
@ -28,7 +30,8 @@ public final class VersionConvertorFactory_10_40 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r4.model.Type convertType(org.hl7.fhir.dstu2.model.Type src, BaseAdvisor_10_40 advisor) throws FHIRException {
|
public static org.hl7.fhir.r4.model.Type convertType(org.hl7.fhir.dstu2.model.Type src, BaseAdvisor_10_40 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_10_40(advisor).convertType(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_10_40(advisor).convertType(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2.model.Type convertType(org.hl7.fhir.r4.model.Type src) throws FHIRException {
|
public static org.hl7.fhir.dstu2.model.Type convertType(org.hl7.fhir.r4.model.Type src) throws FHIRException {
|
||||||
|
@ -36,7 +39,8 @@ public final class VersionConvertorFactory_10_40 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2.model.Type convertType(org.hl7.fhir.r4.model.Type src, BaseAdvisor_10_40 advisor) throws FHIRException {
|
public static org.hl7.fhir.dstu2.model.Type convertType(org.hl7.fhir.r4.model.Type src, BaseAdvisor_10_40 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_10_40(advisor).convertType(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_10_40(advisor).convertType(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean convertsResource(String rt) {
|
public static boolean convertsResource(String rt) {
|
||||||
|
|
|
@ -5,14 +5,15 @@ import org.hl7.fhir.convertors.conv10_50.VersionConvertor_10_50;
|
||||||
import org.hl7.fhir.exceptions.FHIRException;
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
import org.hl7.fhir.utilities.Utilities;
|
import org.hl7.fhir.utilities.Utilities;
|
||||||
|
|
||||||
public final class VersionConvertorFactory_10_50 {
|
public final class VersionConvertorFactory_10_50 extends VersionConvertorFactory {
|
||||||
|
|
||||||
public static org.hl7.fhir.r5.model.Resource convertResource(org.hl7.fhir.dstu2.model.Resource src) throws FHIRException {
|
public static org.hl7.fhir.r5.model.Resource convertResource(org.hl7.fhir.dstu2.model.Resource src) throws FHIRException {
|
||||||
return convertResource(src, new BaseAdvisor_10_50());
|
return convertResource(src, new BaseAdvisor_10_50());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r5.model.Resource convertResource(org.hl7.fhir.dstu2.model.Resource src, BaseAdvisor_10_50 advisor) throws FHIRException {
|
public static org.hl7.fhir.r5.model.Resource convertResource(org.hl7.fhir.dstu2.model.Resource src, BaseAdvisor_10_50 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_10_50(advisor).convertResource(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_10_50(advisor).convertResource(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2.model.Resource convertResource(org.hl7.fhir.r5.model.Resource src) throws FHIRException {
|
public static org.hl7.fhir.dstu2.model.Resource convertResource(org.hl7.fhir.r5.model.Resource src) throws FHIRException {
|
||||||
|
@ -20,7 +21,8 @@ public final class VersionConvertorFactory_10_50 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2.model.Resource convertResource(org.hl7.fhir.r5.model.Resource src, BaseAdvisor_10_50 advisor) throws FHIRException {
|
public static org.hl7.fhir.dstu2.model.Resource convertResource(org.hl7.fhir.r5.model.Resource src, BaseAdvisor_10_50 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_10_50(advisor).convertResource(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_10_50(advisor).convertResource(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r5.model.DataType convertType(org.hl7.fhir.dstu2.model.Type src) throws FHIRException {
|
public static org.hl7.fhir.r5.model.DataType convertType(org.hl7.fhir.dstu2.model.Type src) throws FHIRException {
|
||||||
|
@ -28,7 +30,8 @@ public final class VersionConvertorFactory_10_50 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r5.model.DataType convertType(org.hl7.fhir.dstu2.model.Type src, BaseAdvisor_10_50 advisor) throws FHIRException {
|
public static org.hl7.fhir.r5.model.DataType convertType(org.hl7.fhir.dstu2.model.Type src, BaseAdvisor_10_50 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_10_50(advisor).convertType(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_10_50(advisor).convertType(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2.model.Type convertType(org.hl7.fhir.r5.model.DataType src) throws FHIRException {
|
public static org.hl7.fhir.dstu2.model.Type convertType(org.hl7.fhir.r5.model.DataType src) throws FHIRException {
|
||||||
|
@ -36,7 +39,8 @@ public final class VersionConvertorFactory_10_50 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2.model.Type convertType(org.hl7.fhir.r5.model.DataType src, BaseAdvisor_10_50 advisor) throws FHIRException {
|
public static org.hl7.fhir.dstu2.model.Type convertType(org.hl7.fhir.r5.model.DataType src, BaseAdvisor_10_50 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_10_50(advisor).convertType(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_10_50(advisor).convertType(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean convertsResource(String rt) {
|
public static boolean convertsResource(String rt) {
|
||||||
|
|
|
@ -5,14 +5,15 @@ import org.hl7.fhir.convertors.conv14_30.VersionConvertor_14_30;
|
||||||
import org.hl7.fhir.exceptions.FHIRException;
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
import org.hl7.fhir.utilities.Utilities;
|
import org.hl7.fhir.utilities.Utilities;
|
||||||
|
|
||||||
public final class VersionConvertorFactory_14_30 {
|
public final class VersionConvertorFactory_14_30 extends VersionConvertorFactory {
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu3.model.Resource convertResource(org.hl7.fhir.dstu2016may.model.Resource src) throws FHIRException {
|
public static org.hl7.fhir.dstu3.model.Resource convertResource(org.hl7.fhir.dstu2016may.model.Resource src) throws FHIRException {
|
||||||
return convertResource(src, new BaseAdvisor_14_30());
|
return convertResource(src, new BaseAdvisor_14_30());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu3.model.Resource convertResource(org.hl7.fhir.dstu2016may.model.Resource src, BaseAdvisor_14_30 advisor) throws FHIRException {
|
public static org.hl7.fhir.dstu3.model.Resource convertResource(org.hl7.fhir.dstu2016may.model.Resource src, BaseAdvisor_14_30 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_14_30(advisor).convertResource(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_14_30(advisor).convertResource(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2016may.model.Resource convertResource(org.hl7.fhir.dstu3.model.Resource src) throws FHIRException {
|
public static org.hl7.fhir.dstu2016may.model.Resource convertResource(org.hl7.fhir.dstu3.model.Resource src) throws FHIRException {
|
||||||
|
@ -20,7 +21,8 @@ public final class VersionConvertorFactory_14_30 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2016may.model.Resource convertResource(org.hl7.fhir.dstu3.model.Resource src, BaseAdvisor_14_30 advisor) throws FHIRException {
|
public static org.hl7.fhir.dstu2016may.model.Resource convertResource(org.hl7.fhir.dstu3.model.Resource src, BaseAdvisor_14_30 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_14_30(advisor).convertResource(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_14_30(advisor).convertResource(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu3.model.Type convertType(org.hl7.fhir.dstu2016may.model.Type src) throws FHIRException {
|
public static org.hl7.fhir.dstu3.model.Type convertType(org.hl7.fhir.dstu2016may.model.Type src) throws FHIRException {
|
||||||
|
@ -28,7 +30,8 @@ public final class VersionConvertorFactory_14_30 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu3.model.Type convertType(org.hl7.fhir.dstu2016may.model.Type src, BaseAdvisor_14_30 advisor) throws FHIRException {
|
public static org.hl7.fhir.dstu3.model.Type convertType(org.hl7.fhir.dstu2016may.model.Type src, BaseAdvisor_14_30 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_14_30(advisor).convertType(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_14_30(advisor).convertType(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2016may.model.Type convertType(org.hl7.fhir.dstu3.model.Type src) throws FHIRException {
|
public static org.hl7.fhir.dstu2016may.model.Type convertType(org.hl7.fhir.dstu3.model.Type src) throws FHIRException {
|
||||||
|
@ -36,7 +39,8 @@ public final class VersionConvertorFactory_14_30 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2016may.model.Type convertType(org.hl7.fhir.dstu3.model.Type src, BaseAdvisor_14_30 advisor) throws FHIRException {
|
public static org.hl7.fhir.dstu2016may.model.Type convertType(org.hl7.fhir.dstu3.model.Type src, BaseAdvisor_14_30 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_14_30(advisor).convertType(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_14_30(advisor).convertType(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean convertsResource(String rt) {
|
public static boolean convertsResource(String rt) {
|
||||||
|
|
|
@ -5,14 +5,15 @@ import org.hl7.fhir.convertors.conv14_40.VersionConvertor_14_40;
|
||||||
import org.hl7.fhir.exceptions.FHIRException;
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
import org.hl7.fhir.utilities.Utilities;
|
import org.hl7.fhir.utilities.Utilities;
|
||||||
|
|
||||||
public final class VersionConvertorFactory_14_40 {
|
public final class VersionConvertorFactory_14_40 extends VersionConvertorFactory {
|
||||||
|
|
||||||
public static org.hl7.fhir.r4.model.Resource convertResource(org.hl7.fhir.dstu2016may.model.Resource src) throws FHIRException {
|
public static org.hl7.fhir.r4.model.Resource convertResource(org.hl7.fhir.dstu2016may.model.Resource src) throws FHIRException {
|
||||||
return convertResource(src, new BaseAdvisor_14_40());
|
return convertResource(src, new BaseAdvisor_14_40());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r4.model.Resource convertResource(org.hl7.fhir.dstu2016may.model.Resource src, BaseAdvisor_14_40 advisor) throws FHIRException {
|
public static org.hl7.fhir.r4.model.Resource convertResource(org.hl7.fhir.dstu2016may.model.Resource src, BaseAdvisor_14_40 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_14_40(advisor).convertResource(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_14_40(advisor).convertResource(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2016may.model.Resource convertResource(org.hl7.fhir.r4.model.Resource src) throws FHIRException {
|
public static org.hl7.fhir.dstu2016may.model.Resource convertResource(org.hl7.fhir.r4.model.Resource src) throws FHIRException {
|
||||||
|
@ -20,7 +21,8 @@ public final class VersionConvertorFactory_14_40 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2016may.model.Resource convertResource(org.hl7.fhir.r4.model.Resource src, BaseAdvisor_14_40 advisor) throws FHIRException {
|
public static org.hl7.fhir.dstu2016may.model.Resource convertResource(org.hl7.fhir.r4.model.Resource src, BaseAdvisor_14_40 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_14_40(advisor).convertResource(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_14_40(advisor).convertResource(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r4.model.Type convertType(org.hl7.fhir.dstu2016may.model.Type src) throws FHIRException {
|
public static org.hl7.fhir.r4.model.Type convertType(org.hl7.fhir.dstu2016may.model.Type src) throws FHIRException {
|
||||||
|
@ -28,7 +30,8 @@ public final class VersionConvertorFactory_14_40 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r4.model.Type convertType(org.hl7.fhir.dstu2016may.model.Type src, BaseAdvisor_14_40 advisor) throws FHIRException {
|
public static org.hl7.fhir.r4.model.Type convertType(org.hl7.fhir.dstu2016may.model.Type src, BaseAdvisor_14_40 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_14_40(advisor).convertType(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_14_40(advisor).convertType(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2016may.model.Type convertType(org.hl7.fhir.r4.model.Type src) throws FHIRException {
|
public static org.hl7.fhir.dstu2016may.model.Type convertType(org.hl7.fhir.r4.model.Type src) throws FHIRException {
|
||||||
|
@ -36,7 +39,8 @@ public final class VersionConvertorFactory_14_40 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2016may.model.Type convertType(org.hl7.fhir.r4.model.Type src, BaseAdvisor_14_40 advisor) throws FHIRException {
|
public static org.hl7.fhir.dstu2016may.model.Type convertType(org.hl7.fhir.r4.model.Type src, BaseAdvisor_14_40 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_14_40(advisor).convertType(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_14_40(advisor).convertType(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean convertsResource(String rt) {
|
public static boolean convertsResource(String rt) {
|
||||||
|
|
|
@ -5,14 +5,15 @@ import org.hl7.fhir.convertors.conv14_50.VersionConvertor_14_50;
|
||||||
import org.hl7.fhir.exceptions.FHIRException;
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
import org.hl7.fhir.utilities.Utilities;
|
import org.hl7.fhir.utilities.Utilities;
|
||||||
|
|
||||||
public final class VersionConvertorFactory_14_50 {
|
public final class VersionConvertorFactory_14_50 extends VersionConvertorFactory {
|
||||||
|
|
||||||
public static org.hl7.fhir.r5.model.Resource convertResource(org.hl7.fhir.dstu2016may.model.Resource src) throws FHIRException {
|
public static org.hl7.fhir.r5.model.Resource convertResource(org.hl7.fhir.dstu2016may.model.Resource src) throws FHIRException {
|
||||||
return convertResource(src, new BaseAdvisor_14_50());
|
return convertResource(src, new BaseAdvisor_14_50());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r5.model.Resource convertResource(org.hl7.fhir.dstu2016may.model.Resource src, BaseAdvisor_14_50 advisor) throws FHIRException {
|
public static org.hl7.fhir.r5.model.Resource convertResource(org.hl7.fhir.dstu2016may.model.Resource src, BaseAdvisor_14_50 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_14_50(advisor).convertResource(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_14_50(advisor).convertResource(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2016may.model.Resource convertResource(org.hl7.fhir.r5.model.Resource src) throws FHIRException {
|
public static org.hl7.fhir.dstu2016may.model.Resource convertResource(org.hl7.fhir.r5.model.Resource src) throws FHIRException {
|
||||||
|
@ -20,7 +21,8 @@ public final class VersionConvertorFactory_14_50 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2016may.model.Resource convertResource(org.hl7.fhir.r5.model.Resource src, BaseAdvisor_14_50 advisor) throws FHIRException {
|
public static org.hl7.fhir.dstu2016may.model.Resource convertResource(org.hl7.fhir.r5.model.Resource src, BaseAdvisor_14_50 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_14_50(advisor).convertResource(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_14_50(advisor).convertResource(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r5.model.DataType convertType(org.hl7.fhir.dstu2016may.model.Type src) throws FHIRException {
|
public static org.hl7.fhir.r5.model.DataType convertType(org.hl7.fhir.dstu2016may.model.Type src) throws FHIRException {
|
||||||
|
@ -28,7 +30,8 @@ public final class VersionConvertorFactory_14_50 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r5.model.DataType convertType(org.hl7.fhir.dstu2016may.model.Type src, BaseAdvisor_14_50 advisor) throws FHIRException {
|
public static org.hl7.fhir.r5.model.DataType convertType(org.hl7.fhir.dstu2016may.model.Type src, BaseAdvisor_14_50 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_14_50(advisor).convertType(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_14_50(advisor).convertType(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2016may.model.Type convertType(org.hl7.fhir.r5.model.DataType src) throws FHIRException {
|
public static org.hl7.fhir.dstu2016may.model.Type convertType(org.hl7.fhir.r5.model.DataType src) throws FHIRException {
|
||||||
|
@ -36,7 +39,8 @@ public final class VersionConvertorFactory_14_50 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu2016may.model.Type convertType(org.hl7.fhir.r5.model.DataType src, BaseAdvisor_14_50 advisor) throws FHIRException {
|
public static org.hl7.fhir.dstu2016may.model.Type convertType(org.hl7.fhir.r5.model.DataType src, BaseAdvisor_14_50 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_14_50(advisor).convertType(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_14_50(advisor).convertType(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean convertsResource(String rt) {
|
public static boolean convertsResource(String rt) {
|
||||||
|
|
|
@ -5,14 +5,15 @@ import org.hl7.fhir.convertors.conv30_40.VersionConvertor_30_40;
|
||||||
import org.hl7.fhir.exceptions.FHIRException;
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
import org.hl7.fhir.utilities.Utilities;
|
import org.hl7.fhir.utilities.Utilities;
|
||||||
|
|
||||||
public final class VersionConvertorFactory_30_40 {
|
public final class VersionConvertorFactory_30_40 extends VersionConvertorFactory {
|
||||||
|
|
||||||
public static org.hl7.fhir.r4.model.Resource convertResource(org.hl7.fhir.dstu3.model.Resource src) throws FHIRException {
|
public static org.hl7.fhir.r4.model.Resource convertResource(org.hl7.fhir.dstu3.model.Resource src) throws FHIRException {
|
||||||
return convertResource(src, new BaseAdvisor_30_40());
|
return convertResource(src, new BaseAdvisor_30_40());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r4.model.Resource convertResource(org.hl7.fhir.dstu3.model.Resource src, BaseAdvisor_30_40 advisor) throws FHIRException {
|
public static org.hl7.fhir.r4.model.Resource convertResource(org.hl7.fhir.dstu3.model.Resource src, BaseAdvisor_30_40 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_30_40(advisor).convertResource(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_30_40(advisor).convertResource(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu3.model.Resource convertResource(org.hl7.fhir.r4.model.Resource src) throws FHIRException {
|
public static org.hl7.fhir.dstu3.model.Resource convertResource(org.hl7.fhir.r4.model.Resource src) throws FHIRException {
|
||||||
|
@ -20,7 +21,8 @@ public final class VersionConvertorFactory_30_40 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu3.model.Resource convertResource(org.hl7.fhir.r4.model.Resource src, BaseAdvisor_30_40 advisor) throws FHIRException {
|
public static org.hl7.fhir.dstu3.model.Resource convertResource(org.hl7.fhir.r4.model.Resource src, BaseAdvisor_30_40 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_30_40(advisor).convertResource(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_30_40(advisor).convertResource(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r4.model.Type convertType(org.hl7.fhir.dstu3.model.Type src) throws FHIRException {
|
public static org.hl7.fhir.r4.model.Type convertType(org.hl7.fhir.dstu3.model.Type src) throws FHIRException {
|
||||||
|
@ -28,7 +30,8 @@ public final class VersionConvertorFactory_30_40 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r4.model.Type convertType(org.hl7.fhir.dstu3.model.Type src, BaseAdvisor_30_40 advisor) throws FHIRException {
|
public static org.hl7.fhir.r4.model.Type convertType(org.hl7.fhir.dstu3.model.Type src, BaseAdvisor_30_40 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_30_40(advisor).convertType(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_30_40(advisor).convertType(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu3.model.Type convertType(org.hl7.fhir.r4.model.Type src) throws FHIRException {
|
public static org.hl7.fhir.dstu3.model.Type convertType(org.hl7.fhir.r4.model.Type src) throws FHIRException {
|
||||||
|
@ -36,7 +39,8 @@ public final class VersionConvertorFactory_30_40 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu3.model.Type convertType(org.hl7.fhir.r4.model.Type src, BaseAdvisor_30_40 advisor) throws FHIRException {
|
public static org.hl7.fhir.dstu3.model.Type convertType(org.hl7.fhir.r4.model.Type src, BaseAdvisor_30_40 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_30_40(advisor).convertType(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_30_40(advisor).convertType(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean convertsResource(String rt) {
|
public static boolean convertsResource(String rt) {
|
||||||
|
|
|
@ -4,14 +4,15 @@ import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_30_50;
|
||||||
import org.hl7.fhir.convertors.conv30_50.VersionConvertor_30_50;
|
import org.hl7.fhir.convertors.conv30_50.VersionConvertor_30_50;
|
||||||
import org.hl7.fhir.exceptions.FHIRException;
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
|
|
||||||
public final class VersionConvertorFactory_30_50 {
|
public final class VersionConvertorFactory_30_50 extends VersionConvertorFactory {
|
||||||
|
|
||||||
public static org.hl7.fhir.r5.model.Resource convertResource(org.hl7.fhir.dstu3.model.Resource src) throws FHIRException {
|
public static org.hl7.fhir.r5.model.Resource convertResource(org.hl7.fhir.dstu3.model.Resource src) throws FHIRException {
|
||||||
return convertResource(src, new BaseAdvisor_30_50());
|
return convertResource(src, new BaseAdvisor_30_50());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r5.model.Resource convertResource(org.hl7.fhir.dstu3.model.Resource src, BaseAdvisor_30_50 advisor) throws FHIRException {
|
public static org.hl7.fhir.r5.model.Resource convertResource(org.hl7.fhir.dstu3.model.Resource src, BaseAdvisor_30_50 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_30_50(advisor).convertResource(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_30_50(advisor).convertResource(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu3.model.Resource convertResource(org.hl7.fhir.r5.model.Resource src) throws FHIRException {
|
public static org.hl7.fhir.dstu3.model.Resource convertResource(org.hl7.fhir.r5.model.Resource src) throws FHIRException {
|
||||||
|
@ -19,7 +20,8 @@ public final class VersionConvertorFactory_30_50 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu3.model.Resource convertResource(org.hl7.fhir.r5.model.Resource src, BaseAdvisor_30_50 advisor) throws FHIRException {
|
public static org.hl7.fhir.dstu3.model.Resource convertResource(org.hl7.fhir.r5.model.Resource src, BaseAdvisor_30_50 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_30_50(advisor).convertResource(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_30_50(advisor).convertResource(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r5.model.DataType convertType(org.hl7.fhir.dstu3.model.Type src) throws FHIRException {
|
public static org.hl7.fhir.r5.model.DataType convertType(org.hl7.fhir.dstu3.model.Type src) throws FHIRException {
|
||||||
|
@ -27,7 +29,8 @@ public final class VersionConvertorFactory_30_50 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r5.model.DataType convertType(org.hl7.fhir.dstu3.model.Type src, BaseAdvisor_30_50 advisor) throws FHIRException {
|
public static org.hl7.fhir.r5.model.DataType convertType(org.hl7.fhir.dstu3.model.Type src, BaseAdvisor_30_50 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_30_50(advisor).convertType(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_30_50(advisor).convertType(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu3.model.Type convertType(org.hl7.fhir.r5.model.DataType src) throws FHIRException {
|
public static org.hl7.fhir.dstu3.model.Type convertType(org.hl7.fhir.r5.model.DataType src) throws FHIRException {
|
||||||
|
@ -35,6 +38,7 @@ public final class VersionConvertorFactory_30_50 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.dstu3.model.Type convertType(org.hl7.fhir.r5.model.DataType src, BaseAdvisor_30_50 advisor) throws FHIRException {
|
public static org.hl7.fhir.dstu3.model.Type convertType(org.hl7.fhir.r5.model.DataType src, BaseAdvisor_30_50 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_30_50(advisor).convertType(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_30_50(advisor).convertType(src) : null;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -4,14 +4,15 @@ import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_40_50;
|
||||||
import org.hl7.fhir.convertors.conv40_50.VersionConvertor_40_50;
|
import org.hl7.fhir.convertors.conv40_50.VersionConvertor_40_50;
|
||||||
import org.hl7.fhir.exceptions.FHIRException;
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
|
|
||||||
public final class VersionConvertorFactory_40_50 {
|
public final class VersionConvertorFactory_40_50 extends VersionConvertorFactory {
|
||||||
|
|
||||||
public static org.hl7.fhir.r5.model.Resource convertResource(org.hl7.fhir.r4.model.Resource src) throws FHIRException {
|
public static org.hl7.fhir.r5.model.Resource convertResource(org.hl7.fhir.r4.model.Resource src) throws FHIRException {
|
||||||
return convertResource(src, new BaseAdvisor_40_50());
|
return convertResource(src, new BaseAdvisor_40_50());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r5.model.Resource convertResource(org.hl7.fhir.r4.model.Resource src, BaseAdvisor_40_50 advisor) throws FHIRException {
|
public static org.hl7.fhir.r5.model.Resource convertResource(org.hl7.fhir.r4.model.Resource src, BaseAdvisor_40_50 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_40_50(advisor).convertResource(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_40_50(advisor).convertResource(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r4.model.Resource convertResource(org.hl7.fhir.r5.model.Resource src) throws FHIRException {
|
public static org.hl7.fhir.r4.model.Resource convertResource(org.hl7.fhir.r5.model.Resource src) throws FHIRException {
|
||||||
|
@ -19,7 +20,8 @@ public final class VersionConvertorFactory_40_50 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r4.model.Resource convertResource(org.hl7.fhir.r5.model.Resource src, BaseAdvisor_40_50 advisor) throws FHIRException {
|
public static org.hl7.fhir.r4.model.Resource convertResource(org.hl7.fhir.r5.model.Resource src, BaseAdvisor_40_50 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_40_50(advisor).convertResource(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_40_50(advisor).convertResource(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r5.model.DataType convertType(org.hl7.fhir.r4.model.Type src) throws FHIRException {
|
public static org.hl7.fhir.r5.model.DataType convertType(org.hl7.fhir.r4.model.Type src) throws FHIRException {
|
||||||
|
@ -27,7 +29,8 @@ public final class VersionConvertorFactory_40_50 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r5.model.DataType convertType(org.hl7.fhir.r4.model.Type src, BaseAdvisor_40_50 advisor) throws FHIRException {
|
public static org.hl7.fhir.r5.model.DataType convertType(org.hl7.fhir.r4.model.Type src, BaseAdvisor_40_50 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_40_50(advisor).convertType(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_40_50(advisor).convertType(src) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r4.model.Type convertType(org.hl7.fhir.r5.model.DataType src) throws FHIRException {
|
public static org.hl7.fhir.r4.model.Type convertType(org.hl7.fhir.r5.model.DataType src) throws FHIRException {
|
||||||
|
@ -35,6 +38,7 @@ public final class VersionConvertorFactory_40_50 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.hl7.fhir.r4.model.Type convertType(org.hl7.fhir.r5.model.DataType src, BaseAdvisor_40_50 advisor) throws FHIRException {
|
public static org.hl7.fhir.r4.model.Type convertType(org.hl7.fhir.r5.model.DataType src, BaseAdvisor_40_50 advisor) throws FHIRException {
|
||||||
return new VersionConvertor_40_50(advisor).convertType(src);
|
cleanInputs(src, advisor);
|
||||||
|
return src != null ? new VersionConvertor_40_50(advisor).convertType(src) : null;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,103 @@
|
||||||
|
package org.hl7.fhir.convertors.factory;
|
||||||
|
|
||||||
|
import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_10_30;
|
||||||
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.DisplayName;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
class VersionConvertorFactory_10_30NullHandlingTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2 resource with default advisor throws FHIRException.")
|
||||||
|
void convertResourceWithDefaultAdvisorDSTU2() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_30.convertResource((org.hl7.fhir.dstu2.model.Resource) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2 resource with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToFailFastDSTU2() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_30.convertResource((org.hl7.fhir.dstu2.model.Resource) null, new BaseAdvisor_10_30(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2 resource with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToNotFailFastDSTU2() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_10_30.convertResource((org.hl7.fhir.dstu2.model.Resource) null,
|
||||||
|
new BaseAdvisor_10_30(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 resource with default advisor throws FHIRException.")
|
||||||
|
void convertResourceWithDefaultAdvisorDSTU3() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_30.convertResource((org.hl7.fhir.dstu3.model.Resource) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 resource with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToFailFastDSTU3() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_30.convertResource((org.hl7.fhir.dstu3.model.Resource) null, new BaseAdvisor_10_30(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 resource with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToNotFailFastDSTU3() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_10_30.convertResource((org.hl7.fhir.dstu3.model.Resource) null,
|
||||||
|
new BaseAdvisor_10_30(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2 type with default advisor throws FHIRException.")
|
||||||
|
void convertTypeWithDefaultAdvisorDSTU2() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_30.convertType((org.hl7.fhir.dstu2.model.Type) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2 type with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToFailFastDSTU2() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_30.convertType((org.hl7.fhir.dstu2.model.Type) null, new BaseAdvisor_10_30(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2 type with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToNotFailFastDSTU2() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_10_30.convertType((org.hl7.fhir.dstu2.model.Type) null,
|
||||||
|
new BaseAdvisor_10_30(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 type with default advisor throws FHIRException.")
|
||||||
|
void convertTypeWithDefaultAdvisorDSTU3() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_30.convertType((org.hl7.fhir.dstu3.model.Type) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 type with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToFailFastDSTU3() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_30.convertType((org.hl7.fhir.dstu3.model.Type) null, new BaseAdvisor_10_30(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 type with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToNotFailFastDSTU3() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_10_30.convertType((org.hl7.fhir.dstu3.model.Type) null,
|
||||||
|
new BaseAdvisor_10_30(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,103 @@
|
||||||
|
package org.hl7.fhir.convertors.factory;
|
||||||
|
|
||||||
|
import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_10_40;
|
||||||
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.DisplayName;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
class VersionConvertorFactory_10_40NullHandlingTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2 resource with default advisor throws FHIRException.")
|
||||||
|
void convertResourceWithDefaultAdvisorDSTU2() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_40.convertResource((org.hl7.fhir.dstu2.model.Resource) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2 resource with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToFailFastDSTU2() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_40.convertResource((org.hl7.fhir.dstu2.model.Resource) null, new BaseAdvisor_10_40(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2 resource with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToNotFailFastDSTU2() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_10_40.convertResource((org.hl7.fhir.dstu2.model.Resource) null,
|
||||||
|
new BaseAdvisor_10_40(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 resource with default advisor throws FHIRException.")
|
||||||
|
void convertResourceWithDefaultAdvisorR4() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_40.convertResource((org.hl7.fhir.r4.model.Resource) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 resource with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToFailFastR4() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_40.convertResource((org.hl7.fhir.r4.model.Resource) null, new BaseAdvisor_10_40(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 resource with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToNotFailFastR4() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_10_40.convertResource((org.hl7.fhir.r4.model.Resource) null,
|
||||||
|
new BaseAdvisor_10_40(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2 type with default advisor throws FHIRException.")
|
||||||
|
void convertTypeWithDefaultAdvisorDSTU2() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_40.convertType((org.hl7.fhir.dstu2.model.Type) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2 type with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToFailFastDSTU2() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_40.convertType((org.hl7.fhir.dstu2.model.Type) null, new BaseAdvisor_10_40(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2 type with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToNotFailFastDSTU2() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_10_40.convertType((org.hl7.fhir.dstu2.model.Type) null,
|
||||||
|
new BaseAdvisor_10_40(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 type with default advisor throws FHIRException.")
|
||||||
|
void convertTypeWithDefaultAdvisorR4() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_40.convertType((org.hl7.fhir.r4.model.Type) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 type with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToFailFastR4() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_40.convertType((org.hl7.fhir.r4.model.Type) null, new BaseAdvisor_10_40(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 type with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToNotFailFastR4() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_10_40.convertType((org.hl7.fhir.r4.model.Type) null,
|
||||||
|
new BaseAdvisor_10_40(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,103 @@
|
||||||
|
package org.hl7.fhir.convertors.factory;
|
||||||
|
|
||||||
|
import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_10_50;
|
||||||
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.DisplayName;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
class VersionConvertorFactory_10_50NullHandlingTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2 resource with default advisor throws FHIRException.")
|
||||||
|
void convertResourceWithDefaultAdvisorDSTU2() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_50.convertResource((org.hl7.fhir.dstu2.model.Resource) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2 resource with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToFailFastDSTU2() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_50.convertResource((org.hl7.fhir.dstu2.model.Resource) null, new BaseAdvisor_10_50(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2 resource with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToNotFailFastDSTU2() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_10_50.convertResource((org.hl7.fhir.dstu2.model.Resource) null,
|
||||||
|
new BaseAdvisor_10_50(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 resource with default advisor throws FHIRException.")
|
||||||
|
void convertResourceWithDefaultAdvisorR5() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_50.convertResource((org.hl7.fhir.r5.model.Resource) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 resource with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToFailFastR5() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_50.convertResource((org.hl7.fhir.r5.model.Resource) null, new BaseAdvisor_10_50(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 resource with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToNotFailFastR5() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_10_50.convertResource((org.hl7.fhir.r5.model.Resource) null,
|
||||||
|
new BaseAdvisor_10_50(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2 type with default advisor throws FHIRException.")
|
||||||
|
void convertTypeWithDefaultAdvisorDSTU2() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_50.convertType((org.hl7.fhir.dstu2.model.Type) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2 type with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToFailFastDSTU2() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_50.convertType((org.hl7.fhir.dstu2.model.Type) null, new BaseAdvisor_10_50(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2 type with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToNotFailFastDSTU2() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_10_50.convertType((org.hl7.fhir.dstu2.model.Type) null,
|
||||||
|
new BaseAdvisor_10_50(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 type with default advisor throws FHIRException.")
|
||||||
|
void convertTypeWithDefaultAdvisorR5() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_50.convertType((org.hl7.fhir.r5.model.DataType) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 type with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToFailFastR5() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_10_50.convertType((org.hl7.fhir.r5.model.DataType) null, new BaseAdvisor_10_50(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 type with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToNotFailFastR5() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_10_50.convertType((org.hl7.fhir.r5.model.DataType) null,
|
||||||
|
new BaseAdvisor_10_50(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,103 @@
|
||||||
|
package org.hl7.fhir.convertors.factory;
|
||||||
|
|
||||||
|
import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_14_30;
|
||||||
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.DisplayName;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
class VersionConvertorFactory_14_30NullHandlingTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2016MAY resource with default advisor throws FHIRException.")
|
||||||
|
void convertResourceWithDefaultAdvisorDSTU2016MAY() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_30.convertResource((org.hl7.fhir.dstu2016may.model.Resource) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2016MAY resource with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToFailFastDSTU2016MAY() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_30.convertResource((org.hl7.fhir.dstu2016may.model.Resource) null, new BaseAdvisor_14_30(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2016MAY resource with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToNotFailFastDSTU2016MAY() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_14_30.convertResource((org.hl7.fhir.dstu2016may.model.Resource) null,
|
||||||
|
new BaseAdvisor_14_30(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 resource with default advisor throws FHIRException.")
|
||||||
|
void convertResourceWithDefaultAdvisorDSTU3() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_30.convertResource((org.hl7.fhir.dstu3.model.Resource) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 resource with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToFailFastDSTU3() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_30.convertResource((org.hl7.fhir.dstu3.model.Resource) null, new BaseAdvisor_14_30(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 resource with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToNotFailFastDSTU3() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_14_30.convertResource((org.hl7.fhir.dstu3.model.Resource) null,
|
||||||
|
new BaseAdvisor_14_30(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2016MAY type with default advisor throws FHIRException.")
|
||||||
|
void convertTypeWithDefaultAdvisorDSTU2016MAY() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_30.convertType((org.hl7.fhir.dstu2016may.model.Type) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2016MAY type with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToFailFastDSTU2016MAY() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_30.convertType((org.hl7.fhir.dstu2016may.model.Type) null, new BaseAdvisor_14_30(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2016MAY type with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToNotFailFastDSTU2016MAY() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_14_30.convertType((org.hl7.fhir.dstu2016may.model.Type) null,
|
||||||
|
new BaseAdvisor_14_30(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 type with default advisor throws FHIRException.")
|
||||||
|
void convertTypeWithDefaultAdvisorDSTU3() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_30.convertType((org.hl7.fhir.dstu3.model.Type) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 type with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToFailFastDSTU3() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_30.convertType((org.hl7.fhir.dstu3.model.Type) null, new BaseAdvisor_14_30(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 type with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToNotFailFastDSTU3() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_14_30.convertType((org.hl7.fhir.dstu3.model.Type) null,
|
||||||
|
new BaseAdvisor_14_30(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,103 @@
|
||||||
|
package org.hl7.fhir.convertors.factory;
|
||||||
|
|
||||||
|
import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_14_40;
|
||||||
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.DisplayName;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
class VersionConvertorFactory_14_40NullHandlingTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2016MAY resource with default advisor throws FHIRException.")
|
||||||
|
void convertResourceWithDefaultAdvisorDSTU2016MAY() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_40.convertResource((org.hl7.fhir.dstu2016may.model.Resource) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2016MAY resource with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToFailFastDSTU2016MAY() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_40.convertResource((org.hl7.fhir.dstu2016may.model.Resource) null, new BaseAdvisor_14_40(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2016MAY resource with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToNotFailFastDSTU2016MAY() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_14_40.convertResource((org.hl7.fhir.dstu2016may.model.Resource) null,
|
||||||
|
new BaseAdvisor_14_40(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 resource with default advisor throws FHIRException.")
|
||||||
|
void convertResourceWithDefaultAdvisorR4() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_40.convertResource((org.hl7.fhir.r4.model.Resource) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 resource with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToFailFastR4() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_40.convertResource((org.hl7.fhir.r4.model.Resource) null, new BaseAdvisor_14_40(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 resource with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToNotFailFastR4() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_14_40.convertResource((org.hl7.fhir.r4.model.Resource) null,
|
||||||
|
new BaseAdvisor_14_40(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2016MAY type with default advisor throws FHIRException.")
|
||||||
|
void convertTypeWithDefaultAdvisorDSTU2016MAY() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_40.convertType((org.hl7.fhir.dstu2016may.model.Type) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2016MAY type with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToFailFastDSTU2016MAY() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_40.convertType((org.hl7.fhir.dstu2016may.model.Type) null, new BaseAdvisor_14_40(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2016MAY type with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToNotFailFastDSTU2016MAY() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_14_40.convertType((org.hl7.fhir.dstu2016may.model.Type) null,
|
||||||
|
new BaseAdvisor_14_40(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 type with default advisor throws FHIRException.")
|
||||||
|
void convertTypeWithDefaultAdvisorR4() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_40.convertType((org.hl7.fhir.r4.model.Type) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 type with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToFailFastR4() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_40.convertType((org.hl7.fhir.r4.model.Type) null, new BaseAdvisor_14_40(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 type with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToNotFailFastR4() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_14_40.convertType((org.hl7.fhir.r4.model.Type) null,
|
||||||
|
new BaseAdvisor_14_40(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,103 @@
|
||||||
|
package org.hl7.fhir.convertors.factory;
|
||||||
|
|
||||||
|
import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_14_50;
|
||||||
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.DisplayName;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
class VersionConvertorFactory_14_50NullHandlingTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2016MAY resource with default advisor throws FHIRException.")
|
||||||
|
void convertResourceWithDefaultAdvisorDSTU2016MAY() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_50.convertResource((org.hl7.fhir.dstu2016may.model.Resource) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2016MAY resource with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToFailFastDSTU2016MAY() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_50.convertResource((org.hl7.fhir.dstu2016may.model.Resource) null, new BaseAdvisor_14_50(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2016MAY resource with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToNotFailFastDSTU2016MAY() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_14_50.convertResource((org.hl7.fhir.dstu2016may.model.Resource) null,
|
||||||
|
new BaseAdvisor_14_50(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 resource with default advisor throws FHIRException.")
|
||||||
|
void convertResourceWithDefaultAdvisorR5() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_50.convertResource((org.hl7.fhir.r5.model.Resource) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 resource with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToFailFastR5() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_50.convertResource((org.hl7.fhir.r5.model.Resource) null, new BaseAdvisor_14_50(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 resource with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToNotFailFastR5() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_14_50.convertResource((org.hl7.fhir.r5.model.Resource) null,
|
||||||
|
new BaseAdvisor_14_50(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2016MAY type with default advisor throws FHIRException.")
|
||||||
|
void convertTypeWithDefaultAdvisorDSTU2016MAY() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_50.convertType((org.hl7.fhir.dstu2016may.model.Type) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2016MAY type with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToFailFastDSTU2016MAY() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_50.convertType((org.hl7.fhir.dstu2016may.model.Type) null, new BaseAdvisor_14_50(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU2016MAY type with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToNotFailFastDSTU2016MAY() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_14_50.convertType((org.hl7.fhir.dstu2016may.model.Type) null,
|
||||||
|
new BaseAdvisor_14_50(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 type with default advisor throws FHIRException.")
|
||||||
|
void convertTypeWithDefaultAdvisorR5() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_50.convertType((org.hl7.fhir.r5.model.DataType) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 type with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToFailFastR5() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_14_50.convertType((org.hl7.fhir.r5.model.DataType) null, new BaseAdvisor_14_50(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 type with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToNotFailFastR5() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_14_50.convertType((org.hl7.fhir.r5.model.DataType) null,
|
||||||
|
new BaseAdvisor_14_50(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,103 @@
|
||||||
|
package org.hl7.fhir.convertors.factory;
|
||||||
|
|
||||||
|
import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_30_40;
|
||||||
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.DisplayName;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
class VersionConvertorFactory_30_40NullHandlingTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 resource with default advisor throws FHIRException.")
|
||||||
|
void convertResourceWithDefaultAdvisorDSTU3() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_30_40.convertResource((org.hl7.fhir.dstu3.model.Resource) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 resource with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToFailFastDSTU3() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_30_40.convertResource((org.hl7.fhir.dstu3.model.Resource) null, new BaseAdvisor_30_40(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 resource with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToNotFailFastDSTU3() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_30_40.convertResource((org.hl7.fhir.dstu3.model.Resource) null,
|
||||||
|
new BaseAdvisor_30_40(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 resource with default advisor throws FHIRException.")
|
||||||
|
void convertResourceWithDefaultAdvisorR4() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_30_40.convertResource((org.hl7.fhir.r4.model.Resource) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 resource with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToFailFastR4() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_30_40.convertResource((org.hl7.fhir.r4.model.Resource) null, new BaseAdvisor_30_40(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 resource with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToNotFailFastR4() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_30_40.convertResource((org.hl7.fhir.r4.model.Resource) null,
|
||||||
|
new BaseAdvisor_30_40(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 type with default advisor throws FHIRException.")
|
||||||
|
void convertTypeWithDefaultAdvisorDSTU3() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_30_40.convertType((org.hl7.fhir.dstu3.model.Type) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 type with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToFailFastDSTU3() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_30_40.convertType((org.hl7.fhir.dstu3.model.Type) null, new BaseAdvisor_30_40(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 type with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToNotFailFastDSTU3() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_30_40.convertType((org.hl7.fhir.dstu3.model.Type) null,
|
||||||
|
new BaseAdvisor_30_40(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 type with default advisor throws FHIRException.")
|
||||||
|
void convertTypeWithDefaultAdvisorR4() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_30_40.convertType((org.hl7.fhir.r4.model.Type) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 type with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToFailFastR4() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_30_40.convertType((org.hl7.fhir.r4.model.Type) null, new BaseAdvisor_30_40(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 type with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToNotFailFastR4() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_30_40.convertType((org.hl7.fhir.r4.model.Type) null,
|
||||||
|
new BaseAdvisor_30_40(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,103 @@
|
||||||
|
package org.hl7.fhir.convertors.factory;
|
||||||
|
|
||||||
|
import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_30_50;
|
||||||
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.DisplayName;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
class VersionConvertorFactory_30_50NullHandlingTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 resource with default advisor throws FHIRException.")
|
||||||
|
void convertResourceWithDefaultAdvisorDSTU3() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_30_50.convertResource((org.hl7.fhir.dstu3.model.Resource) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 resource with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToFailFastDSTU3() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_30_50.convertResource((org.hl7.fhir.dstu3.model.Resource) null, new BaseAdvisor_30_50(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 resource with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToNotFailFastDSTU3() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_30_50.convertResource((org.hl7.fhir.dstu3.model.Resource) null,
|
||||||
|
new BaseAdvisor_30_50(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 resource with default advisor throws FHIRException.")
|
||||||
|
void convertResourceWithDefaultAdvisorR5() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_30_50.convertResource((org.hl7.fhir.r5.model.Resource) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 resource with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToFailFastR5() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_30_50.convertResource((org.hl7.fhir.r5.model.Resource) null, new BaseAdvisor_30_50(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 resource with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToNotFailFastR5() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_30_50.convertResource((org.hl7.fhir.r5.model.Resource) null,
|
||||||
|
new BaseAdvisor_30_50(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 type with default advisor throws FHIRException.")
|
||||||
|
void convertTypeWithDefaultAdvisorDSTU3() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_30_50.convertType((org.hl7.fhir.dstu3.model.Type) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 type with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToFailFastDSTU3() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_30_50.convertType((org.hl7.fhir.dstu3.model.Type) null, new BaseAdvisor_30_50(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null DSTU3 type with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToNotFailFastDSTU3() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_30_50.convertType((org.hl7.fhir.dstu3.model.Type) null,
|
||||||
|
new BaseAdvisor_30_50(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 type with default advisor throws FHIRException.")
|
||||||
|
void convertTypeWithDefaultAdvisorR5() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_30_50.convertType((org.hl7.fhir.r5.model.DataType) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 type with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToFailFastR5() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_30_50.convertType((org.hl7.fhir.r5.model.DataType) null, new BaseAdvisor_30_50(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 type with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToNotFailFastR5() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_30_50.convertType((org.hl7.fhir.r5.model.DataType) null,
|
||||||
|
new BaseAdvisor_30_50(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,103 @@
|
||||||
|
package org.hl7.fhir.convertors.factory;
|
||||||
|
|
||||||
|
import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_40_50;
|
||||||
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.DisplayName;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
class VersionConvertorFactory_40_50NullHandlingTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 resource with default advisor throws FHIRException.")
|
||||||
|
void convertResourceWithDefaultAdvisorR4() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_40_50.convertResource((org.hl7.fhir.r4.model.Resource) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 resource with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToFailFastR4() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_40_50.convertResource((org.hl7.fhir.r4.model.Resource) null, new BaseAdvisor_40_50(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 resource with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToNotFailFastR4() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_40_50.convertResource((org.hl7.fhir.r4.model.Resource) null,
|
||||||
|
new BaseAdvisor_40_50(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 resource with default advisor throws FHIRException.")
|
||||||
|
void convertResourceWithDefaultAdvisorR5() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_40_50.convertResource((org.hl7.fhir.r5.model.Resource) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 resource with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToFailFastR5() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_40_50.convertResource((org.hl7.fhir.r5.model.Resource) null, new BaseAdvisor_40_50(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 resource with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertResourceWithCustomAdvisorSetToNotFailFastR5() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_40_50.convertResource((org.hl7.fhir.r5.model.Resource) null,
|
||||||
|
new BaseAdvisor_40_50(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 type with default advisor throws FHIRException.")
|
||||||
|
void convertTypeWithDefaultAdvisorR4() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_40_50.convertType((org.hl7.fhir.r4.model.Type) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 type with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToFailFastR4() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_40_50.convertType((org.hl7.fhir.r4.model.Type) null, new BaseAdvisor_40_50(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R4 type with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToNotFailFastR4() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_40_50.convertType((org.hl7.fhir.r4.model.Type) null,
|
||||||
|
new BaseAdvisor_40_50(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 type with default advisor throws FHIRException.")
|
||||||
|
void convertTypeWithDefaultAdvisorR5() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_40_50.convertType((org.hl7.fhir.r5.model.DataType) null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 type with custom advisor throws FHIRException when advisor is set to fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToFailFastR5() {
|
||||||
|
Assertions.assertThrows(FHIRException.class, () -> {
|
||||||
|
VersionConvertorFactory_40_50.convertType((org.hl7.fhir.r5.model.DataType) null, new BaseAdvisor_40_50(true));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Check null R5 type with custom advisor returns null when advisor set to not fail fast.")
|
||||||
|
void convertTypeWithCustomAdvisorSetToNotFailFastR5() {
|
||||||
|
Assertions.assertNull(VersionConvertorFactory_40_50.convertType((org.hl7.fhir.r5.model.DataType) null,
|
||||||
|
new BaseAdvisor_40_50(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>5.4.10-SNAPSHOT</version>
|
<version>5.4.11-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>5.4.10-SNAPSHOT</version>
|
<version>5.4.11-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>5.4.10-SNAPSHOT</version>
|
<version>5.4.11-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>5.4.10-SNAPSHOT</version>
|
<version>5.4.11-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.hl7.fhir.exceptions.FHIRException;
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
import org.hl7.fhir.r4.context.IWorkerContext.ValidationResult;
|
import org.hl7.fhir.r4.context.IWorkerContext.ValidationResult;
|
||||||
import org.hl7.fhir.r4.formats.IParser.OutputStyle;
|
import org.hl7.fhir.r4.formats.IParser.OutputStyle;
|
||||||
|
@ -59,12 +60,12 @@ import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||||
import org.hl7.fhir.utilities.TextFile;
|
import org.hl7.fhir.utilities.TextFile;
|
||||||
import org.hl7.fhir.utilities.Utilities;
|
import org.hl7.fhir.utilities.Utilities;
|
||||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
|
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
|
||||||
|
import org.hl7.fhir.utilities.validation.ValidationOptions;
|
||||||
|
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
import com.google.gson.JsonNull;
|
import com.google.gson.JsonNull;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import com.google.gson.JsonPrimitive;
|
import com.google.gson.JsonPrimitive;
|
||||||
import org.hl7.fhir.utilities.validation.ValidationOptions;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This implements a two level cache.
|
* This implements a two level cache.
|
||||||
|
@ -393,7 +394,10 @@ public class TerminologyCache {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String hashNWS(String s) {
|
private String hashNWS(String s) {
|
||||||
return String.valueOf(s.replace("\r", "").replace("\n", "").replace(" ", "").hashCode());
|
s = StringUtils.remove(s, ' ');
|
||||||
|
s = StringUtils.remove(s, '\n');
|
||||||
|
s = StringUtils.remove(s, '\r');
|
||||||
|
return String.valueOf(s.hashCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
// management
|
// management
|
||||||
|
|
|
@ -26,34 +26,34 @@ import org.hl7.fhir.utilities.Utilities;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2011+, HL7, Inc.
|
Copyright (c) 2011+, HL7, Inc.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice, this
|
* Redistributions of source code must retain the above copyright notice, this
|
||||||
list of conditions and the following disclaimer.
|
list of conditions and the following disclaimer.
|
||||||
* Redistributions in binary form must reproduce the above copyright notice,
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
* Neither the name of HL7 nor the names of its contributors may be used to
|
* Neither the name of HL7 nor the names of its contributors may be used to
|
||||||
endorse or promote products derived from this software without specific
|
endorse or promote products derived from this software without specific
|
||||||
prior written permission.
|
prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
POSSIBILITY OF SUCH DAMAGE.
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4291,11 +4291,11 @@ public class FHIRPathEngine {
|
||||||
focus = sd.getSnapshot().getElementFirstRep();
|
focus = sd.getSnapshot().getElementFirstRep();
|
||||||
} else if ("extension".equals(expr.getName())) {
|
} else if ("extension".equals(expr.getName())) {
|
||||||
String targetUrl = expr.getParameters().get(0).getConstant().primitiveValue();
|
String targetUrl = expr.getParameters().get(0).getConstant().primitiveValue();
|
||||||
// targetUrl = targetUrl.substring(1,targetUrl.length()-1);
|
|
||||||
List<ElementDefinition> childDefinitions = ProfileUtilities.getChildMap(sd, element);
|
List<ElementDefinition> childDefinitions = ProfileUtilities.getChildMap(sd, element);
|
||||||
for (ElementDefinition t : childDefinitions) {
|
for (ElementDefinition t : childDefinitions) {
|
||||||
if (t.getPath().endsWith(".extension") && t.hasSliceName()) {
|
if (t.getPath().endsWith(".extension") && t.hasSliceName()) {
|
||||||
StructureDefinition exsd = worker.fetchResource(StructureDefinition.class, t.getType().get(0).getProfile().get(0).getValue());
|
StructureDefinition exsd = (t.getType() == null || t.getType().isEmpty()) ?
|
||||||
|
null : worker.fetchResource(StructureDefinition.class, t.getType().get(0).getProfile().get(0).getValue());
|
||||||
while (exsd!=null && !exsd.getBaseDefinition().equals("http://hl7.org/fhir/StructureDefinition/Extension"))
|
while (exsd!=null && !exsd.getBaseDefinition().equals("http://hl7.org/fhir/StructureDefinition/Extension"))
|
||||||
exsd = worker.fetchResource(StructureDefinition.class, exsd.getBaseDefinition());
|
exsd = worker.fetchResource(StructureDefinition.class, exsd.getBaseDefinition());
|
||||||
if (exsd.getUrl().equals(targetUrl)) {
|
if (exsd.getUrl().equals(targetUrl)) {
|
||||||
|
|
|
@ -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>5.4.10-SNAPSHOT</version>
|
<version>5.4.11-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.hl7.fhir.exceptions.FHIRException;
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
import org.hl7.fhir.r5.context.IWorkerContext.ValidationResult;
|
import org.hl7.fhir.r5.context.IWorkerContext.ValidationResult;
|
||||||
import org.hl7.fhir.r5.formats.IParser.OutputStyle;
|
import org.hl7.fhir.r5.formats.IParser.OutputStyle;
|
||||||
|
@ -403,7 +404,10 @@ public class TerminologyCache {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String hashNWS(String s) {
|
private String hashNWS(String s) {
|
||||||
return String.valueOf(s.replace("\r", "").replace("\n", "").replace(" ", "").hashCode());
|
s = StringUtils.remove(s, ' ');
|
||||||
|
s = StringUtils.remove(s, '\n');
|
||||||
|
s = StringUtils.remove(s, '\r');
|
||||||
|
return String.valueOf(s.hashCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
// management
|
// management
|
||||||
|
|
|
@ -70,34 +70,34 @@ import org.hl7.fhir.utilities.xhtml.XhtmlNode;
|
||||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||||
import ca.uhn.fhir.util.ElementUtil;
|
import ca.uhn.fhir.util.ElementUtil;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2011+, HL7, Inc.
|
Copyright (c) 2011+, HL7, Inc.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice, this
|
* Redistributions of source code must retain the above copyright notice, this
|
||||||
list of conditions and the following disclaimer.
|
list of conditions and the following disclaimer.
|
||||||
* Redistributions in binary form must reproduce the above copyright notice,
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
* Neither the name of HL7 nor the names of its contributors may be used to
|
* Neither the name of HL7 nor the names of its contributors may be used to
|
||||||
endorse or promote products derived from this software without specific
|
endorse or promote products derived from this software without specific
|
||||||
prior written permission.
|
prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
POSSIBILITY OF SUCH DAMAGE.
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5493,12 +5493,12 @@ public class FHIRPathEngine {
|
||||||
focus = sd.getSnapshot().getElementFirstRep();
|
focus = sd.getSnapshot().getElementFirstRep();
|
||||||
} else if ("extension".equals(expr.getName())) {
|
} else if ("extension".equals(expr.getName())) {
|
||||||
String targetUrl = expr.getParameters().get(0).getConstant().primitiveValue();
|
String targetUrl = expr.getParameters().get(0).getConstant().primitiveValue();
|
||||||
// targetUrl = targetUrl.substring(1,targetUrl.length()-1);
|
|
||||||
List<ElementDefinition> childDefinitions = profileUtilities.getChildMap(sd, element);
|
List<ElementDefinition> childDefinitions = profileUtilities.getChildMap(sd, element);
|
||||||
for (ElementDefinition t : childDefinitions) {
|
for (ElementDefinition t : childDefinitions) {
|
||||||
if (t.getPath().endsWith(".extension") && t.hasSliceName()) {
|
if (t.getPath().endsWith(".extension") && t.hasSliceName()) {
|
||||||
StructureDefinition exsd = worker.fetchResource(StructureDefinition.class, t.getType().get(0).getProfile().get(0).getValue());
|
StructureDefinition exsd = (t.getType() == null || t.getType().isEmpty()) ?
|
||||||
while (exsd!=null && !exsd.getBaseDefinition().equals("http://hl7.org/fhir/StructureDefinition/Extension")) {
|
null : worker.fetchResource(StructureDefinition.class, t.getType().get(0).getProfile().get(0).getValue());
|
||||||
|
while (exsd != null && !exsd.getBaseDefinition().equals("http://hl7.org/fhir/StructureDefinition/Extension")) {
|
||||||
exsd = worker.fetchResource(StructureDefinition.class, exsd.getBaseDefinition());
|
exsd = worker.fetchResource(StructureDefinition.class, exsd.getBaseDefinition());
|
||||||
}
|
}
|
||||||
if (exsd != null && exsd.getUrl().equals(targetUrl)) {
|
if (exsd != null && exsd.getUrl().equals(targetUrl)) {
|
||||||
|
|
|
@ -1,13 +1,19 @@
|
||||||
package org.hl7.fhir.r5.test;
|
package org.hl7.fhir.r5.test;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.hl7.fhir.exceptions.FHIRException;
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
|
import org.hl7.fhir.r5.elementmodel.Element;
|
||||||
|
import org.hl7.fhir.r5.elementmodel.Manager;
|
||||||
|
import org.hl7.fhir.r5.elementmodel.Manager.FhirFormat;
|
||||||
import org.hl7.fhir.r5.formats.IParser;
|
import org.hl7.fhir.r5.formats.IParser;
|
||||||
import org.hl7.fhir.r5.formats.IParser.OutputStyle;
|
import org.hl7.fhir.r5.formats.IParser.OutputStyle;
|
||||||
import org.hl7.fhir.r5.formats.JsonParser;
|
import org.hl7.fhir.r5.formats.JsonParser;
|
||||||
|
@ -55,4 +61,22 @@ public class ResourceRoundTripTests {
|
||||||
throw new FHIRException("Bundle was null");
|
throw new FHIRException("Bundle was null");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
/**
|
||||||
|
* verify that umlaut like äö etc are not encoded in UTF-8 in attributes
|
||||||
|
*/
|
||||||
|
public void testSerializeUmlaut() throws IOException {
|
||||||
|
Element xml = Manager.parse(TestingUtilities.context(), TestingUtilities.loadTestResourceStream("r5", "unicode.xml"),
|
||||||
|
FhirFormat.XML);
|
||||||
|
List<Element> concept = xml.getChildrenByName("concept");
|
||||||
|
assertTrue(concept!=null && concept.size()==1);
|
||||||
|
List<Element> code = concept.get(0).getChildrenByName("code");
|
||||||
|
assertTrue(code!=null && code.size()==1);
|
||||||
|
code.get(0).setValue("ö");
|
||||||
|
ByteArrayOutputStream baosXml = new ByteArrayOutputStream();
|
||||||
|
Manager.compose(TestingUtilities.context(), xml, baosXml, FhirFormat.XML, OutputStyle.PRETTY, null);
|
||||||
|
String cdaSerialised = baosXml.toString("UTF-8");
|
||||||
|
assertTrue(cdaSerialised.indexOf("ö")>0);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -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>5.4.10-SNAPSHOT</version>
|
<version>5.4.11-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>5.4.10-SNAPSHOT</version>
|
<version>5.4.11-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -1095,7 +1095,9 @@ public class Utilities {
|
||||||
public static boolean isAbsoluteUrl(String ref) {
|
public static boolean isAbsoluteUrl(String ref) {
|
||||||
if (ref != null && ref.contains(":")) {
|
if (ref != null && ref.contains(":")) {
|
||||||
String scheme = ref.substring(0, ref.indexOf(":"));
|
String scheme = ref.substring(0, ref.indexOf(":"));
|
||||||
return existsInList(scheme, "http", "https", "urn") || isToken(scheme) || Utilities.startsWithInList(ref, "urn:iso:", "urn:iso-iec:", "urn:iso-cie:", "urn:iso-astm:", "urn:iso-ieee:", "urn:iec:"); // rfc5141
|
String details = ref.substring(ref.indexOf(":")+1);
|
||||||
|
return (existsInList(scheme, "http", "https", "urn") || isToken(scheme) || Utilities.startsWithInList(ref, "urn:iso:", "urn:iso-iec:", "urn:iso-cie:", "urn:iso-astm:", "urn:iso-ieee:", "urn:iec:"))
|
||||||
|
&& details != null && details.length() > 0 && !details.contains(" "); // rfc5141
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ import java.util.Map.Entry;
|
||||||
public class FilesystemPackageCacheManager extends BasePackageCacheManager implements IPackageCacheManager {
|
public class FilesystemPackageCacheManager extends BasePackageCacheManager implements IPackageCacheManager {
|
||||||
|
|
||||||
public static final String PRIMARY_SERVER = "http://packages.fhir.org";
|
public static final String PRIMARY_SERVER = "http://packages.fhir.org";
|
||||||
public static final String SECONDARY_SERVER = "http://packages2.fhir.org/packages";
|
public static final String SECONDARY_SERVER = "https://packages2.fhir.org/packages";
|
||||||
// private static final String SECONDARY_SERVER = "http://local.fhir.org:960/packages";
|
// private static final String SECONDARY_SERVER = "http://local.fhir.org:960/packages";
|
||||||
public static final String PACKAGE_REGEX = "^[a-zA-Z][A-Za-z0-9\\_\\-]*(\\.[A-Za-z0-9\\_\\-]+)+$";
|
public static final String PACKAGE_REGEX = "^[a-zA-Z][A-Za-z0-9\\_\\-]*(\\.[A-Za-z0-9\\_\\-]+)+$";
|
||||||
public static final String PACKAGE_VERSION_REGEX = "^[A-Za-z][A-Za-z0-9\\_\\-]*(\\.[A-Za-z0-9\\_\\-]+)+\\#[A-Za-z0-9\\-\\_]+(\\.[A-Za-z0-9\\-\\_]+)*$";
|
public static final String PACKAGE_VERSION_REGEX = "^[A-Za-z][A-Za-z0-9\\_\\-]*(\\.[A-Za-z0-9\\_\\-]+)+\\#[A-Za-z0-9\\-\\_]+(\\.[A-Za-z0-9\\-\\_]+)*$";
|
||||||
|
|
|
@ -142,7 +142,7 @@ public class PackageHacker {
|
||||||
|
|
||||||
// https://github.com/HL7/fhir-ig-publisher/issues/295
|
// https://github.com/HL7/fhir-ig-publisher/issues/295
|
||||||
if (webref.contains("hl7.org/fhir/us/core/STU4.0.0")) {
|
if (webref.contains("hl7.org/fhir/us/core/STU4.0.0")) {
|
||||||
webref.replace("hl7.org/fhir/us/core/STU4.0.0", "hl7.org/fhir/us/core/STU4");
|
return webref.replace("hl7.org/fhir/us/core/STU4.0.0", "hl7.org/fhir/us/core/STU4");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isUseSecureReferences()) {
|
if (isUseSecureReferences()) {
|
||||||
|
|
|
@ -257,7 +257,7 @@ public class XMLWriter extends OutputStreamWriter implements IXMLWriter {
|
||||||
protected String xmlEscape(String s) {
|
protected String xmlEscape(String s) {
|
||||||
StringBuilder b = new StringBuilder();
|
StringBuilder b = new StringBuilder();
|
||||||
for (char c : s.toCharArray()) {
|
for (char c : s.toCharArray()) {
|
||||||
if (c < ' ' || c > '~') {
|
if (c < ' ') {
|
||||||
b.append("&#x");
|
b.append("&#x");
|
||||||
b.append(Integer.toHexString(c).toUpperCase());
|
b.append(Integer.toHexString(c).toUpperCase());
|
||||||
b.append(";");
|
b.append(";");
|
||||||
|
@ -266,7 +266,8 @@ public class XMLWriter extends OutputStreamWriter implements IXMLWriter {
|
||||||
}
|
}
|
||||||
return b.toString();
|
return b.toString();
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
|
||||||
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ohf.utilities.xml.IXMLWriter#attribute(java.lang.String, java.lang.String, java.lang.String, boolean)
|
* @see org.eclipse.ohf.utilities.xml.IXMLWriter#attribute(java.lang.String, java.lang.String, java.lang.String, boolean)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -10,9 +10,13 @@ import java.util.List;
|
||||||
|
|
||||||
public class CachingPackageClientTests {
|
public class CachingPackageClientTests {
|
||||||
|
|
||||||
|
private static final String SERVER1 = "http://packages.fhir.org";
|
||||||
|
private static final String SERVER2 = "https://packages2.fhir.org/packages";
|
||||||
|
// private static final String SERVER2 = "http://local.fhir.org:960/packages";
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testExists() throws IOException {
|
public void testExists() throws IOException {
|
||||||
CachingPackageClient client = new CachingPackageClient("http://packages.fhir.org");
|
CachingPackageClient client = new CachingPackageClient(CachingPackageClientTests.SERVER1);
|
||||||
Assertions.assertTrue(client.exists("hl7.fhir.r4.core", "4.0.1"));
|
Assertions.assertTrue(client.exists("hl7.fhir.r4.core", "4.0.1"));
|
||||||
Assertions.assertTrue(!client.exists("hl7.fhir.r4.core", "1.0.2"));
|
Assertions.assertTrue(!client.exists("hl7.fhir.r4.core", "1.0.2"));
|
||||||
Assertions.assertTrue(client.exists("HL7.fhir.r4.core", "4.0.1"));
|
Assertions.assertTrue(client.exists("HL7.fhir.r4.core", "4.0.1"));
|
||||||
|
@ -21,14 +25,14 @@ public class CachingPackageClientTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCase() throws IOException {
|
public void testCase() throws IOException {
|
||||||
CachingPackageClient client = new CachingPackageClient("http://packages.fhir.org");
|
CachingPackageClient client = new CachingPackageClient(CachingPackageClientTests.SERVER1);
|
||||||
Assertions.assertTrue(client.exists("kbv.basis", "1.1.3"));
|
Assertions.assertTrue(client.exists("kbv.basis", "1.1.3"));
|
||||||
Assertions.assertTrue(client.exists("KBV.Basis", "1.1.3"));
|
Assertions.assertTrue(client.exists("KBV.Basis", "1.1.3"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSearch() throws IOException {
|
public void testSearch() throws IOException {
|
||||||
CachingPackageClient client = new CachingPackageClient("http://packages.fhir.org");
|
CachingPackageClient client = new CachingPackageClient(CachingPackageClientTests.SERVER1);
|
||||||
List<PackageInfo> matches = client.search("core", null, null, false);
|
List<PackageInfo> matches = client.search("core", null, null, false);
|
||||||
for (PackageInfo pi : matches) {
|
for (PackageInfo pi : matches) {
|
||||||
System.out.println(pi.toString());
|
System.out.println(pi.toString());
|
||||||
|
@ -38,14 +42,14 @@ public class CachingPackageClientTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSearchNoMatches() throws IOException {
|
public void testSearchNoMatches() throws IOException {
|
||||||
CachingPackageClient client = new CachingPackageClient("http://packages.fhir.org");
|
CachingPackageClient client = new CachingPackageClient(CachingPackageClientTests.SERVER1);
|
||||||
List<PackageInfo> matches = client.search("corezxxx", null, null, false);
|
List<PackageInfo> matches = client.search("corezxxx", null, null, false);
|
||||||
Assertions.assertTrue(matches.size() == 0);
|
Assertions.assertTrue(matches.size() == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testVersions() throws IOException {
|
public void testVersions() throws IOException {
|
||||||
CachingPackageClient client = new CachingPackageClient("http://packages.fhir.org");
|
CachingPackageClient client = new CachingPackageClient(CachingPackageClientTests.SERVER1);
|
||||||
List<PackageInfo> matches = client.getVersions("Simplifier.Core.STU3");
|
List<PackageInfo> matches = client.getVersions("Simplifier.Core.STU3");
|
||||||
for (PackageInfo pi : matches) {
|
for (PackageInfo pi : matches) {
|
||||||
System.out.println(pi.toString());
|
System.out.println(pi.toString());
|
||||||
|
@ -55,14 +59,14 @@ public class CachingPackageClientTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testVersionsNone() throws IOException {
|
public void testVersionsNone() throws IOException {
|
||||||
CachingPackageClient client = new CachingPackageClient("http://packages.fhir.org");
|
CachingPackageClient client = new CachingPackageClient(CachingPackageClientTests.SERVER1);
|
||||||
List<PackageInfo> matches = client.getVersions("Simplifier.Core.STU3X");
|
List<PackageInfo> matches = client.getVersions("Simplifier.Core.STU3X");
|
||||||
Assertions.assertTrue(matches.size() == 0);
|
Assertions.assertTrue(matches.size() == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testExists2() throws IOException {
|
public void testExists2() throws IOException {
|
||||||
CachingPackageClient client = new CachingPackageClient("http://packages2.fhir.org/packages");
|
CachingPackageClient client = new CachingPackageClient(CachingPackageClientTests.SERVER2);
|
||||||
Assertions.assertTrue(client.exists("hl7.fhir.r4.core", "4.0.1"));
|
Assertions.assertTrue(client.exists("hl7.fhir.r4.core", "4.0.1"));
|
||||||
Assertions.assertTrue(!client.exists("hl7.fhir.r4.core", "1.0.2"));
|
Assertions.assertTrue(!client.exists("hl7.fhir.r4.core", "1.0.2"));
|
||||||
Assertions.assertTrue(!client.exists("hl7.fhir.nothing", "1.0.1"));
|
Assertions.assertTrue(!client.exists("hl7.fhir.nothing", "1.0.1"));
|
||||||
|
@ -71,7 +75,7 @@ public class CachingPackageClientTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSearch2() throws IOException {
|
public void testSearch2() throws IOException {
|
||||||
CachingPackageClient client = new CachingPackageClient("http://packages2.fhir.org/packages");
|
CachingPackageClient client = new CachingPackageClient(CachingPackageClientTests.SERVER2);
|
||||||
List<PackageInfo> matches = client.search("core", null, null, false);
|
List<PackageInfo> matches = client.search("core", null, null, false);
|
||||||
for (PackageInfo pi : matches) {
|
for (PackageInfo pi : matches) {
|
||||||
System.out.println(pi.toString());
|
System.out.println(pi.toString());
|
||||||
|
@ -81,14 +85,14 @@ public class CachingPackageClientTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSearchNoMatches2() throws IOException {
|
public void testSearchNoMatches2() throws IOException {
|
||||||
CachingPackageClient client = new CachingPackageClient("http://packages2.fhir.org/packages");
|
CachingPackageClient client = new CachingPackageClient(CachingPackageClientTests.SERVER2);
|
||||||
List<PackageInfo> matches = client.search("corezxxx", null, null, false);
|
List<PackageInfo> matches = client.search("corezxxx", null, null, false);
|
||||||
Assertions.assertTrue(matches.size() == 0);
|
Assertions.assertTrue(matches.size() == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testVersions2() throws IOException {
|
public void testVersions2() throws IOException {
|
||||||
CachingPackageClient client = new CachingPackageClient("http://packages2.fhir.org/packages");
|
CachingPackageClient client = new CachingPackageClient(CachingPackageClientTests.SERVER2);
|
||||||
List<PackageInfo> matches = client.getVersions("Simplifier.Core.STU3");
|
List<PackageInfo> matches = client.getVersions("Simplifier.Core.STU3");
|
||||||
for (PackageInfo pi : matches) {
|
for (PackageInfo pi : matches) {
|
||||||
System.out.println(pi.toString());
|
System.out.println(pi.toString());
|
||||||
|
@ -98,7 +102,7 @@ public class CachingPackageClientTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testVersions2A() throws IOException {
|
public void testVersions2A() throws IOException {
|
||||||
CachingPackageClient client = new CachingPackageClient("http://packages2.fhir.org/packages");
|
CachingPackageClient client = new CachingPackageClient(CachingPackageClientTests.SERVER2);
|
||||||
List<PackageInfo> matches = client.getVersions("hl7.fhir.us.core");
|
List<PackageInfo> matches = client.getVersions("hl7.fhir.us.core");
|
||||||
for (PackageInfo pi : matches) {
|
for (PackageInfo pi : matches) {
|
||||||
System.out.println(pi.toString());
|
System.out.println(pi.toString());
|
||||||
|
@ -108,7 +112,7 @@ public class CachingPackageClientTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testVersionsNone2() throws IOException {
|
public void testVersionsNone2() throws IOException {
|
||||||
CachingPackageClient client = new CachingPackageClient("http://packages2.fhir.org/packages");
|
CachingPackageClient client = new CachingPackageClient(CachingPackageClientTests.SERVER2);
|
||||||
List<PackageInfo> matches = client.getVersions("Simplifier.Core.STU3X");
|
List<PackageInfo> matches = client.getVersions("Simplifier.Core.STU3X");
|
||||||
Assertions.assertTrue(matches.size() == 0);
|
Assertions.assertTrue(matches.size() == 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>5.4.10-SNAPSHOT</version>
|
<version>5.4.11-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>5.4.10-SNAPSHOT</version>
|
<version>5.4.11-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -149,6 +149,7 @@ public class ValidationEngine implements IValidatorResourceFetcher, IPackageInst
|
||||||
@Getter @Setter private boolean securityChecks;
|
@Getter @Setter private boolean securityChecks;
|
||||||
@Getter @Setter private boolean crumbTrails;
|
@Getter @Setter private boolean crumbTrails;
|
||||||
@Getter @Setter private boolean allowExampleUrls;
|
@Getter @Setter private boolean allowExampleUrls;
|
||||||
|
@Getter @Setter private boolean showMessagesFromReferences;
|
||||||
@Getter @Setter private Locale locale;
|
@Getter @Setter private Locale locale;
|
||||||
@Getter @Setter private List<ImplementationGuide> igs = new ArrayList<>();
|
@Getter @Setter private List<ImplementationGuide> igs = new ArrayList<>();
|
||||||
@Getter @Setter private boolean showTimes;
|
@Getter @Setter private boolean showTimes;
|
||||||
|
@ -495,6 +496,7 @@ public class ValidationEngine implements IValidatorResourceFetcher, IPackageInst
|
||||||
validator.setSecurityChecks(securityChecks);
|
validator.setSecurityChecks(securityChecks);
|
||||||
validator.setCrumbTrails(crumbTrails);
|
validator.setCrumbTrails(crumbTrails);
|
||||||
validator.setAllowExamples(allowExampleUrls);
|
validator.setAllowExamples(allowExampleUrls);
|
||||||
|
validator.setShowMessagesFromReferences(showMessagesFromReferences);
|
||||||
validator.getContext().setLocale(locale);
|
validator.getContext().setLocale(locale);
|
||||||
validator.setFetcher(this);
|
validator.setFetcher(this);
|
||||||
validator.getImplementationGuides().addAll(igs);
|
validator.getImplementationGuides().addAll(igs);
|
||||||
|
|
|
@ -26,6 +26,8 @@ public class CliContext {
|
||||||
private boolean hintAboutNonMustSupport = false;
|
private boolean hintAboutNonMustSupport = false;
|
||||||
@JsonProperty("recursive")
|
@JsonProperty("recursive")
|
||||||
private boolean recursive = false;
|
private boolean recursive = false;
|
||||||
|
@JsonProperty("showMessagesFromReferences")
|
||||||
|
private boolean showMessagesFromReferences = false;
|
||||||
@JsonProperty("doDebug")
|
@JsonProperty("doDebug")
|
||||||
private boolean doDebug = false;
|
private boolean doDebug = false;
|
||||||
@JsonProperty("assumeValidRestReferences")
|
@JsonProperty("assumeValidRestReferences")
|
||||||
|
@ -200,6 +202,17 @@ public class CliContext {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JsonProperty("showMessagesFromReferences")
|
||||||
|
public boolean isShowMessagesFromReferences() {
|
||||||
|
return showMessagesFromReferences;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty("showMessagesFromReferences")
|
||||||
|
public CliContext setShowMessagesFromReferences(boolean showMessagesFromReferences) {
|
||||||
|
this.showMessagesFromReferences = showMessagesFromReferences;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@JsonProperty("locale")
|
@JsonProperty("locale")
|
||||||
public String getLanguageCode() {
|
public String getLanguageCode() {
|
||||||
return locale;
|
return locale;
|
||||||
|
|
|
@ -242,6 +242,7 @@ public class ValidationService {
|
||||||
validator.setLocale(cliContext.getLocale());
|
validator.setLocale(cliContext.getLocale());
|
||||||
validator.setSnomedExtension(cliContext.getSnomedCTCode());
|
validator.setSnomedExtension(cliContext.getSnomedCTCode());
|
||||||
validator.setAssumeValidRestReferences(cliContext.isAssumeValidRestReferences());
|
validator.setAssumeValidRestReferences(cliContext.isAssumeValidRestReferences());
|
||||||
|
validator.setShowMessagesFromReferences(cliContext.isShowMessagesFromReferences());
|
||||||
validator.setNoExtensibleBindingMessages(cliContext.isNoExtensibleBindingMessages());
|
validator.setNoExtensibleBindingMessages(cliContext.isNoExtensibleBindingMessages());
|
||||||
validator.setNoInvariantChecks(cliContext.isNoInvariants());
|
validator.setNoInvariantChecks(cliContext.isNoInvariants());
|
||||||
validator.setWantInvariantInMessage(cliContext.isWantInvariantsInMessages());
|
validator.setWantInvariantInMessage(cliContext.isWantInvariantsInMessages());
|
||||||
|
|
|
@ -24,6 +24,7 @@ public class Params {
|
||||||
public static final String DEBUG = "-debug";
|
public static final String DEBUG = "-debug";
|
||||||
public static final String SCT = "-sct";
|
public static final String SCT = "-sct";
|
||||||
public static final String RECURSE = "-recurse";
|
public static final String RECURSE = "-recurse";
|
||||||
|
public static final String SHOW_MESSAGES_FROM_REFERENCES = "-showReferenceMessages";
|
||||||
public static final String LOCALE = "-locale";
|
public static final String LOCALE = "-locale";
|
||||||
public static final String STRICT_EXTENSIONS = "-strictExtensions";
|
public static final String STRICT_EXTENSIONS = "-strictExtensions";
|
||||||
public static final String HINT_ABOUT_NON_MUST_SUPPORT = "-hintAboutNonMustSupport";
|
public static final String HINT_ABOUT_NON_MUST_SUPPORT = "-hintAboutNonMustSupport";
|
||||||
|
@ -148,6 +149,8 @@ public class Params {
|
||||||
cliContext.setSnomedCT(args[++i]);
|
cliContext.setSnomedCT(args[++i]);
|
||||||
} else if (args[i].equals(RECURSE)) {
|
} else if (args[i].equals(RECURSE)) {
|
||||||
cliContext.setRecursive(true);
|
cliContext.setRecursive(true);
|
||||||
|
} else if (args[i].equals(SHOW_MESSAGES_FROM_REFERENCES)) {
|
||||||
|
cliContext.setShowMessagesFromReferences(true);
|
||||||
} else if (args[i].equals(LOCALE)) {
|
} else if (args[i].equals(LOCALE)) {
|
||||||
if (i + 1 == args.length) {
|
if (i + 1 == args.length) {
|
||||||
throw new Error("Specified -locale without indicating locale");
|
throw new Error("Specified -locale without indicating locale");
|
||||||
|
|
|
@ -41,6 +41,12 @@ The following parameters are supported:
|
||||||
Note: the profile (and it's dependencies) have to be made available
|
Note: the profile (and it's dependencies) have to be made available
|
||||||
through one of the -ig parameters. Note that package dependencies will
|
through one of the -ig parameters. Note that package dependencies will
|
||||||
automatically be resolved
|
automatically be resolved
|
||||||
|
-showReferenceMessages
|
||||||
|
Includes validation messages resulting from validating target resources
|
||||||
|
against profiles defined on a reference. This increases the volume of
|
||||||
|
validationmessages, but may allow easier debugging. If not specified,
|
||||||
|
then only a high-level message indicating that the referenced item wasn't
|
||||||
|
valid against the listed profile(s) will be provided.
|
||||||
-questionnaire mode: what to do with when validating QuestionnaireResponse resources
|
-questionnaire mode: what to do with when validating QuestionnaireResponse resources
|
||||||
none (default): just ignore the questionnaire reference
|
none (default): just ignore the questionnaire reference
|
||||||
required: check that the QuestionnaireResponse has a questionnaire and validate against it
|
required: check that the QuestionnaireResponse has a questionnaire and validate against it
|
||||||
|
|
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>5.4.10-SNAPSHOT</version>
|
<version>5.4.11-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|
|
@ -30,7 +30,7 @@ steps:
|
||||||
mavenPomFile: 'pom.xml'
|
mavenPomFile: 'pom.xml'
|
||||||
mavenOptions: '-Xmx3072m'
|
mavenOptions: '-Xmx3072m'
|
||||||
javaHomeOption: 'JDKVersion'
|
javaHomeOption: 'JDKVersion'
|
||||||
jdkVersionOption: '1.8'
|
jdkVersionOption: '1.11'
|
||||||
jdkArchitectureOption: 'x64'
|
jdkArchitectureOption: 'x64'
|
||||||
publishJUnitResults: true
|
publishJUnitResults: true
|
||||||
testResultsFiles: '**/surefire-reports/TEST-*.xml'
|
testResultsFiles: '**/surefire-reports/TEST-*.xml'
|
||||||
|
@ -41,7 +41,7 @@ steps:
|
||||||
mavenPomFile: 'pom.xml'
|
mavenPomFile: 'pom.xml'
|
||||||
mavenOptions: '-Xmx3072m'
|
mavenOptions: '-Xmx3072m'
|
||||||
javaHomeOption: 'JDKVersion'
|
javaHomeOption: 'JDKVersion'
|
||||||
jdkVersionOption: '1.8'
|
jdkVersionOption: '1.11'
|
||||||
jdkArchitectureOption: 'x64'
|
jdkArchitectureOption: 'x64'
|
||||||
options: '-pl org.hl7.fhir.validation.cli'
|
options: '-pl org.hl7.fhir.validation.cli'
|
||||||
publishJUnitResults: false
|
publishJUnitResults: false
|
||||||
|
|
|
@ -58,7 +58,7 @@ steps:
|
||||||
mavenPomFile: 'pom.xml'
|
mavenPomFile: 'pom.xml'
|
||||||
mavenOptions: '-Xmx3072m'
|
mavenOptions: '-Xmx3072m'
|
||||||
javaHomeOption: 'JDKVersion'
|
javaHomeOption: 'JDKVersion'
|
||||||
jdkVersionOption: '1.8'
|
jdkVersionOption: '1.11'
|
||||||
jdkArchitectureOption: 'x64'
|
jdkArchitectureOption: 'x64'
|
||||||
publishJUnitResults: true
|
publishJUnitResults: true
|
||||||
testResultsFiles: '**/surefire-reports/TEST-*.xml'
|
testResultsFiles: '**/surefire-reports/TEST-*.xml'
|
||||||
|
|
Loading…
Reference in New Issue