conversion issues fixed, validation issues next
This commit is contained in:
parent
367b338d85
commit
3fdb7c8408
|
@ -9,6 +9,8 @@ import ca.uhn.fhir.context.support.ValueSetExpansionOptions;
|
|||
import ca.uhn.fhir.parser.IParser;
|
||||
import ca.uhn.fhir.util.FhirVersionIndependentConcept;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_30_50;
|
||||
import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_40_50;
|
||||
import org.hl7.fhir.convertors.factory.VersionConvertorFactory_10_50;
|
||||
import org.hl7.fhir.convertors.factory.VersionConvertorFactory_30_50;
|
||||
import org.hl7.fhir.convertors.factory.VersionConvertorFactory_40_50;
|
||||
|
@ -439,11 +441,11 @@ public class InMemoryTerminologyServerValidationSupport implements IValidationSu
|
|||
private org.hl7.fhir.r5.model.ValueSet expandValueSetDstu3(ValidationSupportContext theValidationSupportContext, org.hl7.fhir.dstu3.model.ValueSet theInput, @Nullable String theWantSystemUrlAndVersion, @Nullable String theWantCode) {
|
||||
Function<String, org.hl7.fhir.r5.model.CodeSystem> codeSystemLoader = t -> {
|
||||
org.hl7.fhir.dstu3.model.CodeSystem codeSystem = (org.hl7.fhir.dstu3.model.CodeSystem) theValidationSupportContext.getRootValidationSupport().fetchCodeSystem(t);
|
||||
return (CodeSystem) VersionConvertorFactory_30_50.convertResource(codeSystem);
|
||||
return (CodeSystem) VersionConvertorFactory_30_50.convertResource(codeSystem, new BaseAdvisor_30_50(false));
|
||||
};
|
||||
Function<String, org.hl7.fhir.r5.model.ValueSet> valueSetLoader = t -> {
|
||||
org.hl7.fhir.dstu3.model.ValueSet valueSet = (org.hl7.fhir.dstu3.model.ValueSet) theValidationSupportContext.getRootValidationSupport().fetchValueSet(t);
|
||||
return (org.hl7.fhir.r5.model.ValueSet) VersionConvertorFactory_30_50.convertResource(valueSet);
|
||||
return (org.hl7.fhir.r5.model.ValueSet) VersionConvertorFactory_30_50.convertResource(valueSet, new BaseAdvisor_30_50(false));
|
||||
};
|
||||
|
||||
org.hl7.fhir.r5.model.ValueSet input = (org.hl7.fhir.r5.model.ValueSet) VersionConvertorFactory_30_50.convertResource(theInput);
|
||||
|
@ -455,11 +457,11 @@ public class InMemoryTerminologyServerValidationSupport implements IValidationSu
|
|||
private org.hl7.fhir.r5.model.ValueSet expandValueSetR4(ValidationSupportContext theValidationSupportContext, org.hl7.fhir.r4.model.ValueSet theInput, @Nullable String theWantSystemUrlAndVersion, @Nullable String theWantCode) {
|
||||
Function<String, org.hl7.fhir.r5.model.CodeSystem> codeSystemLoader = t -> {
|
||||
org.hl7.fhir.r4.model.CodeSystem codeSystem = (org.hl7.fhir.r4.model.CodeSystem) theValidationSupportContext.getRootValidationSupport().fetchCodeSystem(t);
|
||||
return (CodeSystem) VersionConvertorFactory_40_50.convertResource(codeSystem);
|
||||
return (CodeSystem) VersionConvertorFactory_40_50.convertResource(codeSystem, new BaseAdvisor_40_50(false));
|
||||
};
|
||||
Function<String, org.hl7.fhir.r5.model.ValueSet> valueSetLoader = t -> {
|
||||
org.hl7.fhir.r4.model.ValueSet valueSet = (org.hl7.fhir.r4.model.ValueSet) theValidationSupportContext.getRootValidationSupport().fetchValueSet(t);
|
||||
return (org.hl7.fhir.r5.model.ValueSet) VersionConvertorFactory_40_50.convertResource(valueSet);
|
||||
return (org.hl7.fhir.r5.model.ValueSet) VersionConvertorFactory_40_50.convertResource(valueSet, new BaseAdvisor_40_50(false));
|
||||
};
|
||||
|
||||
org.hl7.fhir.r5.model.ValueSet input = (org.hl7.fhir.r5.model.ValueSet) VersionConvertorFactory_40_50.convertResource(theInput);
|
||||
|
|
|
@ -15,6 +15,7 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
|
|||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.time.DateUtils;
|
||||
import org.fhir.ucum.UcumService;
|
||||
import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_10_50;
|
||||
import org.hl7.fhir.convertors.factory.VersionConvertorFactory_10_50;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.exceptions.TerminologyServiceException;
|
||||
|
@ -691,7 +692,7 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
|
|||
converter = new IVersionTypeConverter() {
|
||||
@Override
|
||||
public Resource toCanonical(IBaseResource theNonCanonical) {
|
||||
Resource retVal = VersionConvertorFactory_10_50.convertResource((org.hl7.fhir.dstu2.model.Resource) theNonCanonical);
|
||||
Resource retVal = VersionConvertorFactory_10_50.convertResource((org.hl7.fhir.dstu2.model.Resource) theNonCanonical, new BaseAdvisor_10_50(false));
|
||||
if (theNonCanonical instanceof org.hl7.fhir.dstu2.model.ValueSet) {
|
||||
org.hl7.fhir.dstu2.model.ValueSet valueSet = (org.hl7.fhir.dstu2.model.ValueSet) theNonCanonical;
|
||||
if (valueSet.hasCodeSystem() && valueSet.getCodeSystem().hasSystem()) {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.hl7.fhir.common.hapi.validation.validator;
|
||||
|
||||
import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_30_50;
|
||||
import org.hl7.fhir.convertors.factory.VersionConvertorFactory_30_50;
|
||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
import org.hl7.fhir.r5.model.Resource;
|
||||
|
@ -7,11 +8,11 @@ import org.hl7.fhir.r5.model.Resource;
|
|||
public class VersionTypeConverterDstu3 implements VersionSpecificWorkerContextWrapper.IVersionTypeConverter {
|
||||
@Override
|
||||
public Resource toCanonical(IBaseResource theNonCanonical) {
|
||||
return VersionConvertorFactory_30_50.convertResource((org.hl7.fhir.dstu3.model.Resource) theNonCanonical);
|
||||
return VersionConvertorFactory_30_50.convertResource((org.hl7.fhir.dstu3.model.Resource) theNonCanonical, new BaseAdvisor_30_50(false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBaseResource fromCanonical(Resource theCanonical) {
|
||||
return VersionConvertorFactory_30_50.convertResource(theCanonical);
|
||||
return VersionConvertorFactory_30_50.convertResource(theCanonical, new BaseAdvisor_30_50(false));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.hl7.fhir.common.hapi.validation.validator;
|
||||
|
||||
import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_40_50;
|
||||
import org.hl7.fhir.convertors.factory.VersionConvertorFactory_40_50;
|
||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
import org.hl7.fhir.r5.model.Resource;
|
||||
|
@ -7,11 +8,11 @@ import org.hl7.fhir.r5.model.Resource;
|
|||
public class VersionTypeConverterR4 implements VersionSpecificWorkerContextWrapper.IVersionTypeConverter {
|
||||
@Override
|
||||
public Resource toCanonical(IBaseResource theNonCanonical) {
|
||||
return VersionConvertorFactory_40_50.convertResource((org.hl7.fhir.r4.model.Resource) theNonCanonical);
|
||||
return VersionConvertorFactory_40_50.convertResource((org.hl7.fhir.r4.model.Resource) theNonCanonical, new BaseAdvisor_40_50(false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBaseResource fromCanonical(Resource theCanonical) {
|
||||
return VersionConvertorFactory_40_50.convertResource(theCanonical);
|
||||
return VersionConvertorFactory_40_50.convertResource(theCanonical, new BaseAdvisor_40_50(false));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue