Fixing class cast exceptions. However build is still failing.

This commit is contained in:
markiantorno 2020-02-11 15:30:37 -05:00
parent 9feec949f3
commit dc0559c3e7
13 changed files with 75 additions and 70 deletions

View File

@ -178,8 +178,8 @@ public class ConceptMap10_50 {
if (src.hasPropertyElement()) { if (src.hasPropertyElement()) {
tgt.setElementElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getPropertyElement())); tgt.setElementElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getPropertyElement()));
} }
if (src.hasSystemElement()) { if (src.hasSystem()) {
tgt.setCodeSystemElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_50.convertType(src.getSystemElement())); tgt.setCodeSystem(src.getSystem());
} }
if (src.hasValueElement()) { if (src.hasValueElement()) {
tgt.setCodeElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getValueElement())); tgt.setCodeElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getValueElement()));
@ -195,8 +195,8 @@ public class ConceptMap10_50 {
if (src.hasElementElement()) { if (src.hasElementElement()) {
tgt.setPropertyElement((UriType) VersionConvertor_10_50.convertType(src.getElementElement())); tgt.setPropertyElement((UriType) VersionConvertor_10_50.convertType(src.getElementElement()));
} }
if (src.hasCodeSystemElement()) { if (src.hasCodeSystem()) {
tgt.setSystemElement((CanonicalType) VersionConvertor_10_50.convertType(src.getCodeSystemElement())); tgt.setSystem(src.getCodeSystem());
} }
if (src.hasCodeElement()) { if (src.hasCodeElement()) {
tgt.setValueElement((StringType) VersionConvertor_10_50.convertType(src.getCodeElement())); tgt.setValueElement((StringType) VersionConvertor_10_50.convertType(src.getCodeElement()));

View File

@ -332,8 +332,8 @@ public class Conformance10_50 {
if (src.hasProtocol()) { if (src.hasProtocol()) {
tgt.setProtocol(VersionConvertor_10_50.convertCoding(src.getProtocol())); tgt.setProtocol(VersionConvertor_10_50.convertCoding(src.getProtocol()));
} }
if (src.hasAddressElement()) { if (src.hasAddress()) {
tgt.setAddressElement((UrlType) VersionConvertor_10_50.convertType(src.getAddressElement())); tgt.setAddress(src.getAddress());
} }
return tgt; return tgt;
} }
@ -346,8 +346,8 @@ public class Conformance10_50 {
if (src.hasProtocol()) { if (src.hasProtocol()) {
tgt.setProtocol(VersionConvertor_10_50.convertCoding(src.getProtocol())); tgt.setProtocol(VersionConvertor_10_50.convertCoding(src.getProtocol()));
} }
if (src.hasAddressElement()) { if (src.hasAddress()) {
tgt.setAddressElement((UriType) VersionConvertor_10_50.convertType(src.getAddressElement())); tgt.setAddress(src.getAddress());
} }
return tgt; return tgt;
} }

View File

@ -32,8 +32,8 @@ public class SearchParameter10_50 {
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t)); for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t));
} }
if (src.hasPurposeElement()) { if (src.hasPurpose()) {
tgt.setRequirementsElement((StringType) VersionConvertor_10_50.convertType(src.getPurposeElement())); tgt.setRequirements(src.getPurpose());
} }
if (src.hasCodeElement()) if (src.hasCodeElement())
tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_50.convertType(src.getCodeElement())); tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_50.convertType(src.getCodeElement()));
@ -43,8 +43,8 @@ public class SearchParameter10_50 {
if (src.hasType()) { if (src.hasType()) {
tgt.setType(VersionConvertor_10_50.convertSearchParamType(src.getType())); tgt.setType(VersionConvertor_10_50.convertSearchParamType(src.getType()));
} }
if (src.hasDescriptionElement()) if (src.hasDescription())
tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); tgt.setDescription(src.getDescription());
if (src.hasExpression()) { if (src.hasExpression()) {
org.hl7.fhir.dstu2.utils.ToolingExtensions.setStringExtension(tgt, ToolingExtensions.EXT_EXPRESSION, src.getExpression()); org.hl7.fhir.dstu2.utils.ToolingExtensions.setStringExtension(tgt, ToolingExtensions.EXT_EXPRESSION, src.getExpression());
} }
@ -80,8 +80,8 @@ public class SearchParameter10_50 {
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t)); for (org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t));
} }
if (src.hasRequirementsElement()) { if (src.hasRequirements()) {
tgt.setPurposeElement((MarkdownType) VersionConvertor_10_50.convertType(src.getRequirementsElement())); tgt.setPurpose(src.getRequirements());
} }
if (src.hasCodeElement()) if (src.hasCodeElement())
tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_10_50.convertType(src.getCodeElement())); tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_10_50.convertType(src.getCodeElement()));
@ -90,8 +90,8 @@ public class SearchParameter10_50 {
if (src.hasType()) { if (src.hasType()) {
tgt.setType(VersionConvertor_10_50.convertSearchParamType(src.getType())); tgt.setType(VersionConvertor_10_50.convertSearchParamType(src.getType()));
} }
if (src.hasDescriptionElement()) if (src.hasDescription())
tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); tgt.setDescription(src.getDescription());
tgt.setExpression(ToolingExtensions.readStringExtension(src, ToolingExtensions.EXT_EXPRESSION)); tgt.setExpression(ToolingExtensions.readStringExtension(src, ToolingExtensions.EXT_EXPRESSION));
if (src.hasXpathElement()) if (src.hasXpathElement())
tgt.setXpathElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getXpathElement())); tgt.setXpathElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_10_50.convertType(src.getXpathElement()));

View File

@ -79,8 +79,8 @@ public class StructureDefinition10_50 {
} }
if (src.hasDateElement()) if (src.hasDateElement())
tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement()));
if (src.hasDescriptionElement()) if (src.hasDescription())
tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); tgt.setDescription(src.getDescription());
for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept())
tgt.addUseContext(VersionConvertor_10_50.convertCodeableConcept(t.getValueCodeableConcept())); tgt.addUseContext(VersionConvertor_10_50.convertCodeableConcept(t.getValueCodeableConcept()));
if (src.hasJurisdiction()) { if (src.hasJurisdiction()) {
@ -159,8 +159,8 @@ public class StructureDefinition10_50 {
} }
if (src.hasDateElement()) if (src.hasDateElement())
tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement()));
if (src.hasDescriptionElement()) if (src.hasDescription())
tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); tgt.setDescription(src.getDescription());
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_50.isJurisdiction(t)) for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_50.isJurisdiction(t))
tgt.addJurisdiction(VersionConvertor_10_50.convertCodeableConcept(t)); tgt.addJurisdiction(VersionConvertor_10_50.convertCodeableConcept(t));
else else
@ -168,8 +168,8 @@ public class StructureDefinition10_50 {
if (src.hasRequirements()) { if (src.hasRequirements()) {
tgt.setPurpose(src.getRequirements()); tgt.setPurpose(src.getRequirements());
} }
if (src.hasCopyrightElement()) if (src.hasCopyright())
tgt.setCopyrightElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_10_50.convertType(src.getCopyrightElement())); tgt.setCopyright(src.getCopyright());
if (src.hasCode()) { if (src.hasCode()) {
for (org.hl7.fhir.dstu2.model.Coding t : src.getCode()) tgt.addKeyword(VersionConvertor_10_50.convertCoding(t)); for (org.hl7.fhir.dstu2.model.Coding t : src.getCode()) tgt.addKeyword(VersionConvertor_10_50.convertCoding(t));
} }
@ -191,16 +191,16 @@ public class StructureDefinition10_50 {
} }
ec.setExpression("*".equals(t.getValue()) ? "Element" : t.getValue()); ec.setExpression("*".equals(t.getValue()) ? "Element" : t.getValue());
} }
if (src.hasConstrainedTypeElement()) if (src.hasConstrainedType())
tgt.setTypeElement((UriType) VersionConvertor_10_50.convertType(src.getConstrainedTypeElement())); tgt.setType(src.getConstrainedType());
else if (src.getSnapshot().hasElement()) else if (src.getSnapshot().hasElement())
tgt.setType(src.getSnapshot().getElement().get(0).getPath()); tgt.setType(src.getSnapshot().getElement().get(0).getPath());
else if (src.getDifferential().hasElement() && !src.getDifferential().getElement().get(0).getPath().contains(".")) else if (src.getDifferential().hasElement() && !src.getDifferential().getElement().get(0).getPath().contains("."))
tgt.setType(src.getDifferential().getElement().get(0).getPath()); tgt.setType(src.getDifferential().getElement().get(0).getPath());
else else
tgt.setType(src.getDifferential().getElement().get(0).getPath().substring(0, src.getDifferential().getElement().get(0).getPath().indexOf("."))); tgt.setType(src.getDifferential().getElement().get(0).getPath().substring(0, src.getDifferential().getElement().get(0).getPath().indexOf(".")));
if (src.hasBaseElement()) { if (src.hasBase()) {
tgt.setBaseDefinitionElement((CanonicalType) VersionConvertor_10_50.convertType(src.getBaseElement())); tgt.setBaseDefinition(src.getBase());
} }
tgt.setDerivation(src.hasConstrainedType() ? org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule.CONSTRAINT : org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule.SPECIALIZATION); tgt.setDerivation(src.hasConstrainedType() ? org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule.CONSTRAINT : org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule.SPECIALIZATION);
if (src.hasSnapshot()) { if (src.hasSnapshot()) {

View File

@ -256,8 +256,8 @@ public class ValueSet10_50 {
} }
if (src.hasDateElement()) if (src.hasDateElement())
tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); tgt.setDateElement((org.hl7.fhir.r5.model.DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement()));
if (src.hasDescriptionElement()) if (src.hasDescription())
tgt.setDescriptionElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); tgt.setDescription(src.getDescription());
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_50.isJurisdiction(t)) for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_50.isJurisdiction(t))
tgt.addJurisdiction(VersionConvertor_10_50.convertCodeableConcept(t)); tgt.addJurisdiction(VersionConvertor_10_50.convertCodeableConcept(t));
else else
@ -267,8 +267,8 @@ public class ValueSet10_50 {
if (src.hasRequirements()) { if (src.hasRequirements()) {
tgt.setPurpose(src.getRequirements()); tgt.setPurpose(src.getRequirements());
} }
if (src.hasCopyrightElement()) if (src.hasCopyright())
tgt.setCopyrightElement((org.hl7.fhir.r5.model.MarkdownType) VersionConvertor_10_50.convertType(src.getCopyrightElement())); tgt.setCopyright(src.getCopyright());
if (src.hasExtensible()) if (src.hasExtensible())
tgt.addExtension("http://hl7.org/fhir/StructureDefinition/valueset-extensible", new BooleanType(src.getExtensible())); tgt.addExtension("http://hl7.org/fhir/StructureDefinition/valueset-extensible", new BooleanType(src.getExtensible()));
if (src.hasCompose()) { if (src.hasCompose()) {
@ -307,8 +307,8 @@ public class ValueSet10_50 {
} }
if (src.hasDateElement()) if (src.hasDateElement())
tgtcs.setDateElement((DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement())); tgtcs.setDateElement((DateTimeType) VersionConvertor_10_50.convertType(src.getDateElement()));
if (src.hasDescriptionElement()) { if (src.hasDescription()) {
tgtcs.setDescriptionElement((MarkdownType) VersionConvertor_10_50.convertType(src.getDescriptionElement())); tgtcs.setDescription(src.getDescription());
} }
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_50.isJurisdiction(t)) for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_50.isJurisdiction(t))
tgtcs.addJurisdiction(VersionConvertor_10_50.convertCodeableConcept(t)); tgtcs.addJurisdiction(VersionConvertor_10_50.convertCodeableConcept(t));

View File

@ -50,8 +50,8 @@ public class CodeSystem14_50 {
tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getCopyrightElement())); tgt.setCopyrightElement((org.hl7.fhir.dstu2016may.model.StringType) VersionConvertor_14_50.convertType(src.getCopyrightElement()));
if (src.hasCaseSensitiveElement()) if (src.hasCaseSensitiveElement())
tgt.setCaseSensitiveElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getCaseSensitiveElement())); tgt.setCaseSensitiveElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getCaseSensitiveElement()));
if (src.hasValueSetElement()) if (src.hasValueSet())
tgt.setValueSetElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getValueSetElement())); tgt.setValueSet(src.getValueSet());
if (src.hasCompositionalElement()) if (src.hasCompositionalElement())
tgt.setCompositionalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getCompositionalElement())); tgt.setCompositionalElement((org.hl7.fhir.dstu2016may.model.BooleanType) VersionConvertor_14_50.convertType(src.getCompositionalElement()));
if (src.hasVersionNeededElement()) if (src.hasVersionNeededElement())
@ -110,8 +110,8 @@ public class CodeSystem14_50 {
tgt.setCopyright(src.getCopyright()); tgt.setCopyright(src.getCopyright());
if (src.hasCaseSensitiveElement()) if (src.hasCaseSensitiveElement())
tgt.setCaseSensitiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getCaseSensitiveElement())); tgt.setCaseSensitiveElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getCaseSensitiveElement()));
if (src.hasValueSetElement()) if (src.hasValueSet())
tgt.setValueSetElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_14_50.convertType(src.getValueSetElement())); tgt.setValueSet(src.getValueSet());
if (src.hasCompositionalElement()) if (src.hasCompositionalElement())
tgt.setCompositionalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getCompositionalElement())); tgt.setCompositionalElement((org.hl7.fhir.r5.model.BooleanType) VersionConvertor_14_50.convertType(src.getCompositionalElement()));
if (src.hasVersionNeededElement()) if (src.hasVersionNeededElement())
@ -119,8 +119,8 @@ public class CodeSystem14_50 {
if (src.hasContent()) { if (src.hasContent()) {
tgt.setContent(convertCodeSystemContentMode(src.getContent())); tgt.setContent(convertCodeSystemContentMode(src.getContent()));
} }
if (src.hasCountElement()) if (src.hasCount())
tgt.setCountElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_14_50.convertType(src.getCountElement())); tgt.setCount(src.getCount());
if (src.hasFilter()) { if (src.hasFilter()) {
for (org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemFilterComponent t : src.getFilter()) tgt.addFilter(convertCodeSystemFilterComponent(t)); for (org.hl7.fhir.dstu2016may.model.CodeSystem.CodeSystemFilterComponent t : src.getFilter()) tgt.addFilter(convertCodeSystemFilterComponent(t));
} }

View File

@ -208,8 +208,8 @@ public class ConceptMap14_50 {
if (src.hasElementElement()) { if (src.hasElementElement()) {
tgt.setPropertyElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getElementElement())); tgt.setPropertyElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_14_50.convertType(src.getElementElement()));
} }
if (src.hasSystemElement()) if (src.hasSystem())
tgt.setSystemElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_14_50.convertType(src.getSystemElement())); tgt.setSystem(src.getSystem());
if (src.hasCodeElement()) { if (src.hasCodeElement()) {
tgt.setValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getCodeElement())); tgt.setValueElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_14_50.convertType(src.getCodeElement()));
} }

View File

@ -241,8 +241,8 @@ public class Conformance14_50 {
if (src.hasDescription()) { if (src.hasDescription()) {
tgt.setDescription(src.getDescription()); tgt.setDescription(src.getDescription());
} }
if (src.hasUrlElement()) if (src.hasUrl())
tgt.setUrlElement((UrlType) VersionConvertor_14_50.convertType(src.getUrlElement())); tgt.setUrl(src.getUrl());
return tgt; return tgt;
} }
@ -301,8 +301,8 @@ public class Conformance14_50 {
if (src.hasEndpoint()) { if (src.hasEndpoint()) {
for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t)); for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t));
} }
if (src.hasReliableCacheElement()) if (src.hasReliableCache())
tgt.setReliableCacheElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_14_50.convertType(src.getReliableCacheElement())); tgt.setReliableCache(src.getReliableCache());
if (src.hasDocumentation()) if (src.hasDocumentation())
tgt.setDocumentation(src.getDocumentation()); tgt.setDocumentation(src.getDocumentation());
for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingEventComponent t : src.getEvent()) { for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingEventComponent t : src.getEvent()) {
@ -350,8 +350,8 @@ public class Conformance14_50 {
if (src.hasProtocol()) { if (src.hasProtocol()) {
tgt.setProtocol(VersionConvertor_14_50.convertCoding(src.getProtocol())); tgt.setProtocol(VersionConvertor_14_50.convertCoding(src.getProtocol()));
} }
if (src.hasAddressElement()) { if (src.hasAddress()) {
tgt.setAddressElement((UrlType) VersionConvertor_14_50.convertType(src.getAddressElement())); tgt.setAddress(src.getAddress());
} }
return tgt; return tgt;
} }

View File

@ -1,8 +1,10 @@
package org.hl7.fhir.convertors.conv14_50; package org.hl7.fhir.convertors.conv14_50;
import org.hl7.fhir.convertors.VersionConvertor_10_50;
import org.hl7.fhir.convertors.VersionConvertor_14_50; import org.hl7.fhir.convertors.VersionConvertor_14_50;
import org.hl7.fhir.dstu2016may.model.StringType; import org.hl7.fhir.dstu2016may.model.StringType;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CanonicalType;
import org.hl7.fhir.r5.model.ElementDefinition; import org.hl7.fhir.r5.model.ElementDefinition;
import org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule; import org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule;
import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.utilities.Utilities;
@ -102,8 +104,8 @@ public class StructureDefinition14_50 {
tgt.setContextType(convertExtensionContext(t.getType(), t.getExpression())); tgt.setContextType(convertExtensionContext(t.getType(), t.getExpression()));
tgt.addContext("Element".equals(t.getExpression()) ? "*" : t.getExpression()); tgt.addContext("Element".equals(t.getExpression()) ? "*" : t.getExpression());
} }
if (src.hasBaseDefinitionElement()) if (src.hasBaseDefinition())
tgt.setBaseDefinitionElement((org.hl7.fhir.dstu2016may.model.UriType) VersionConvertor_14_50.convertType(src.getBaseDefinitionElement())); tgt.setBaseDefinition(src.getBaseDefinition());
if (src.hasType() && src.getDerivation() == org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule.CONSTRAINT) if (src.hasType() && src.getDerivation() == org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule.CONSTRAINT)
tgt.setBaseType(src.getType()); tgt.setBaseType(src.getType());
if (src.hasDerivation()) { if (src.hasDerivation()) {
@ -179,8 +181,8 @@ public class StructureDefinition14_50 {
tgt.setType(src.getBaseType()); tgt.setType(src.getBaseType());
else else
tgt.setType(src.getId()); tgt.setType(src.getId());
if (src.hasBaseDefinitionElement()) if (src.hasBaseDefinition())
tgt.setBaseDefinitionElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_14_50.convertType(src.getBaseDefinitionElement())); tgt.setBaseDefinition(src.getBaseDefinition());
if (src.hasDerivation()) { if (src.hasDerivation()) {
tgt.setDerivation(convertTypeDerivationRule(src.getDerivation())); tgt.setDerivation(convertTypeDerivationRule(src.getDerivation()));
} }

View File

@ -193,8 +193,8 @@ public class CapabilityStatement30_50 {
VersionConvertor_30_50.copyElement(src, tgt); VersionConvertor_30_50.copyElement(src, tgt);
if (src.hasDescription()) if (src.hasDescription())
tgt.setDescription(src.getDescription()); tgt.setDescription(src.getDescription());
if (src.hasUrlElement()) if (src.hasUrl())
tgt.setUrlElement((org.hl7.fhir.r5.model.UrlType) VersionConvertor_30_50.convertType(src.getUrlElement())); tgt.setUrl(src.getUrl());
return tgt; return tgt;
} }
@ -205,8 +205,8 @@ public class CapabilityStatement30_50 {
VersionConvertor_30_50.copyElement(src, tgt); VersionConvertor_30_50.copyElement(src, tgt);
if (src.hasDescription()) if (src.hasDescription())
tgt.setDescription(src.getDescription()); tgt.setDescription(src.getDescription());
if (src.hasUrlElement()) if (src.hasUrl())
tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); tgt.setUrl(src.getUrl());
return tgt; return tgt;
} }
@ -248,8 +248,8 @@ public class CapabilityStatement30_50 {
if (src.hasEndpoint()) { if (src.hasEndpoint()) {
for (org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertCapabilityStatementMessagingEndpointComponent(t)); for (org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertCapabilityStatementMessagingEndpointComponent(t));
} }
if (src.hasReliableCacheElement()) if (src.hasReliableCache())
tgt.setReliableCacheElement((org.hl7.fhir.dstu3.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getReliableCacheElement())); tgt.setReliableCache(src.getReliableCache());
if (src.hasDocumentation()) if (src.hasDocumentation())
tgt.setDocumentation(src.getDocumentation()); tgt.setDocumentation(src.getDocumentation());
if (src.hasSupportedMessage()) { if (src.hasSupportedMessage()) {
@ -285,8 +285,8 @@ public class CapabilityStatement30_50 {
if (src.hasEndpoint()) { if (src.hasEndpoint()) {
for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertCapabilityStatementMessagingEndpointComponent(t)); for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertCapabilityStatementMessagingEndpointComponent(t));
} }
if (src.hasReliableCacheElement()) if (src.hasReliableCache())
tgt.setReliableCacheElement((org.hl7.fhir.r5.model.UnsignedIntType) VersionConvertor_30_50.convertType(src.getReliableCacheElement())); tgt.setReliableCache(src.getReliableCache());
if (src.hasDocumentation()) if (src.hasDocumentation())
tgt.setDocumentation(src.getDocumentation()); tgt.setDocumentation(src.getDocumentation());
if (src.hasSupportedMessage()) { if (src.hasSupportedMessage()) {

View File

@ -172,8 +172,8 @@ public class ConceptMap30_50 {
tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); tgt.setCodeElement((org.hl7.fhir.r5.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement()));
if (src.hasDisplayElement()) if (src.hasDisplayElement())
tgt.setDisplayElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDisplayElement())); tgt.setDisplayElement((org.hl7.fhir.r5.model.StringType) VersionConvertor_30_50.convertType(src.getDisplayElement()));
if (src.hasUrlElement()) if (src.hasUrl())
tgt.setUrlElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_30_50.convertType(src.getUrlElement())); tgt.setUrl(src.getUrl());
return tgt; return tgt;
} }
@ -188,8 +188,8 @@ public class ConceptMap30_50 {
tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement())); tgt.setCodeElement((org.hl7.fhir.dstu3.model.CodeType) VersionConvertor_30_50.convertType(src.getCodeElement()));
if (src.hasDisplayElement()) if (src.hasDisplayElement())
tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDisplayElement())); tgt.setDisplayElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getDisplayElement()));
if (src.hasUrlElement()) if (src.hasUrl())
tgt.setUrlElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getUrlElement())); tgt.setUrl(src.getUrl());
return tgt; return tgt;
} }
@ -259,8 +259,8 @@ public class ConceptMap30_50 {
VersionConvertor_30_50.copyElement(src, tgt); VersionConvertor_30_50.copyElement(src, tgt);
if (src.hasPropertyElement()) if (src.hasPropertyElement())
tgt.setPropertyElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getPropertyElement())); tgt.setPropertyElement((org.hl7.fhir.r5.model.UriType) VersionConvertor_30_50.convertType(src.getPropertyElement()));
if (src.hasSystemElement()) if (src.hasSystem())
tgt.setSystemElement((org.hl7.fhir.r5.model.CanonicalType) VersionConvertor_30_50.convertType(src.getSystemElement())); tgt.setSystem(src.getSystem());
if (src.hasCodeElement()) if (src.hasCodeElement())
tgt.setValueElement((StringType) VersionConvertor_30_50.convertType(src.getCodeElement())); tgt.setValueElement((StringType) VersionConvertor_30_50.convertType(src.getCodeElement()));
if (src.hasDisplayElement()) if (src.hasDisplayElement())
@ -275,8 +275,8 @@ public class ConceptMap30_50 {
VersionConvertor_30_50.copyElement(src, tgt); VersionConvertor_30_50.copyElement(src, tgt);
if (src.hasPropertyElement()) if (src.hasPropertyElement())
tgt.setPropertyElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getPropertyElement())); tgt.setPropertyElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getPropertyElement()));
if (src.hasSystemElement()) if (src.hasSystem())
tgt.setSystemElement((org.hl7.fhir.dstu3.model.UriType) VersionConvertor_30_50.convertType(src.getSystemElement())); tgt.setSystem(src.getSystem());
if (src.hasValueElement()) if (src.hasValueElement())
tgt.setCodeElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getValueElement())); tgt.setCodeElement((org.hl7.fhir.dstu3.model.StringType) VersionConvertor_30_50.convertType(src.getValueElement()));
if (src.hasDisplayElement()) if (src.hasDisplayElement())

View File

@ -2,6 +2,9 @@ package org.hl7.fhir.r5.model;
import org.junit.Test; import org.junit.Test;
import java.util.Date;
import java.util.TimeZone;
import static org.junit.Assert.*; import static org.junit.Assert.*;
public class BaseDateTimeTypeTest { public class BaseDateTimeTypeTest {
@ -33,6 +36,8 @@ public class BaseDateTimeTypeTest {
@Test @Test
public void equalsUsingFhirPathRulesOther() { public void equalsUsingFhirPathRulesOther() {
// Exact same - Same timezone // Exact same - Same timezone
assertTrue( compareDateTimes("2001-01-02T11:22:33.444Z", "2001-01-02T11:22:33.444Z")); assertTrue( compareDateTimes("2001-01-02T11:22:33.444Z", "2001-01-02T11:22:33.444Z"));
// Exact same - Different timezone // Exact same - Different timezone

View File

@ -3,10 +3,7 @@ package org.hl7.fhir.r5.test;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.ParserConfigurationException;
@ -150,6 +147,7 @@ public class FHIRPathTests {
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
@Test @Test
public void test() throws FileNotFoundException, IOException, FHIRException, org.hl7.fhir.exceptions.FHIRException, UcumException { public void test() throws FileNotFoundException, IOException, FHIRException, org.hl7.fhir.exceptions.FHIRException, UcumException {
if (fp == null) if (fp == null)
fp = new FHIRPathEngine(TestingUtilities.context()); fp = new FHIRPathEngine(TestingUtilities.context());
fp.setHostServices(new FHIRPathTestEvaluationServices()); fp.setHostServices(new FHIRPathTestEvaluationServices());