001package org.hl7.fhir.convertors.conv30_50.resources30_50; 002 003import org.hl7.fhir.convertors.context.ConversionContext30_50; 004import org.hl7.fhir.convertors.conv30_50.datatypes30_50.ContactDetail30_50; 005import org.hl7.fhir.convertors.conv30_50.datatypes30_50.UsageContext30_50; 006import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.CodeableConcept30_50; 007import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Coding30_50; 008import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Identifier30_50; 009import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.*; 010import org.hl7.fhir.exceptions.FHIRException; 011import org.hl7.fhir.r5.model.BooleanType; 012 013public class ValueSet30_50 { 014 015 public static org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent convertConceptReferenceComponent(org.hl7.fhir.r5.model.ValueSet.ConceptReferenceComponent src) throws FHIRException { 016 if (src == null) 017 return null; 018 org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent(); 019 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 020 if (src.hasCode()) 021 tgt.setCodeElement(Code30_50.convertCode(src.getCodeElement())); 022 if (src.hasDisplay()) 023 tgt.setDisplayElement(String30_50.convertString(src.getDisplayElement())); 024 for (org.hl7.fhir.r5.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) 025 tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); 026 return tgt; 027 } 028 029 public static org.hl7.fhir.r5.model.ValueSet.ConceptReferenceComponent convertConceptReferenceComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent src) throws FHIRException { 030 if (src == null) 031 return null; 032 org.hl7.fhir.r5.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ConceptReferenceComponent(); 033 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 034 if (src.hasCode()) 035 tgt.setCodeElement(Code30_50.convertCode(src.getCodeElement())); 036 if (src.hasDisplay()) 037 tgt.setDisplayElement(String30_50.convertString(src.getDisplayElement())); 038 for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) 039 tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); 040 return tgt; 041 } 042 043 public static org.hl7.fhir.r5.model.ValueSet.ConceptReferenceDesignationComponent convertConceptReferenceDesignationComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent src) throws FHIRException { 044 if (src == null) 045 return null; 046 org.hl7.fhir.r5.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ConceptReferenceDesignationComponent(); 047 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 048 if (src.hasLanguage()) 049 tgt.setLanguageElement(Code30_50.convertCode(src.getLanguageElement())); 050 if (src.hasUse()) 051 tgt.setUse(Coding30_50.convertCoding(src.getUse())); 052 if (src.hasValue()) 053 tgt.setValueElement(String30_50.convertString(src.getValueElement())); 054 return tgt; 055 } 056 057 public static org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent convertConceptReferenceDesignationComponent(org.hl7.fhir.r5.model.ValueSet.ConceptReferenceDesignationComponent src) throws FHIRException { 058 if (src == null) 059 return null; 060 org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent(); 061 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 062 if (src.hasLanguage()) 063 tgt.setLanguageElement(Code30_50.convertCode(src.getLanguageElement())); 064 if (src.hasUse()) 065 tgt.setUse(Coding30_50.convertCoding(src.getUse())); 066 if (src.hasValue()) 067 tgt.setValueElement(String30_50.convertString(src.getValueElement())); 068 return tgt; 069 } 070 071 public static org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent convertConceptSetComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent src) throws FHIRException { 072 if (src == null) 073 return null; 074 org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent(); 075 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 076 if (src.hasSystem()) 077 tgt.setSystemElement(Uri30_50.convertUri(src.getSystemElement())); 078 if (src.hasVersion()) 079 tgt.setVersionElement(String30_50.convertString(src.getVersionElement())); 080 for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) 081 tgt.addConcept(convertConceptReferenceComponent(t)); 082 for (org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent t : src.getFilter()) 083 tgt.addFilter(convertConceptSetFilterComponent(t)); 084 for (org.hl7.fhir.dstu3.model.UriType t : src.getValueSet()) tgt.addValueSet(t.getValue()); 085 return tgt; 086 } 087 088 public static org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent convertConceptSetComponent(org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent src) throws FHIRException { 089 if (src == null) 090 return null; 091 org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent(); 092 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 093 if (src.hasSystem()) 094 tgt.setSystemElement(Uri30_50.convertUri(src.getSystemElement())); 095 if (src.hasVersion()) 096 tgt.setVersionElement(String30_50.convertString(src.getVersionElement())); 097 for (org.hl7.fhir.r5.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) 098 tgt.addConcept(convertConceptReferenceComponent(t)); 099 for (org.hl7.fhir.r5.model.ValueSet.ConceptSetFilterComponent t : src.getFilter()) 100 tgt.addFilter(convertConceptSetFilterComponent(t)); 101 for (org.hl7.fhir.r5.model.UriType t : src.getValueSet()) tgt.addValueSet(t.getValue()); 102 return tgt; 103 } 104 105 public static org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent convertConceptSetFilterComponent(org.hl7.fhir.r5.model.ValueSet.ConceptSetFilterComponent src) throws FHIRException { 106 if (src == null) 107 return null; 108 org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent(); 109 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 110 if (src.hasProperty()) 111 tgt.setPropertyElement(Code30_50.convertCode(src.getPropertyElement())); 112 if (src.hasOp()) 113 tgt.setOpElement(convertFilterOperator2(src.getOpElement())); 114 if (src.hasValue()) 115 tgt.setValue(src.getValue()); 116 return tgt; 117 } 118 119 public static org.hl7.fhir.r5.model.ValueSet.ConceptSetFilterComponent convertConceptSetFilterComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent src) throws FHIRException { 120 if (src == null) 121 return null; 122 org.hl7.fhir.r5.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ConceptSetFilterComponent(); 123 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 124 if (src.hasProperty()) 125 tgt.setPropertyElement(Code30_50.convertCode(src.getPropertyElement())); 126 if (src.hasOp()) 127 tgt.setOpElement(Enumerations30_50.convertFilterOperator(src.getOpElement())); 128 if (src.hasValue()) 129 tgt.setValue(src.getValue()); 130 return tgt; 131 } 132 133 static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.ValueSet.FilterOperator> convertFilterOperator2(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.FilterOperator> src) throws FHIRException { 134 if (src == null || src.isEmpty()) 135 return null; 136 org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.ValueSet.FilterOperator> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.ValueSet.FilterOperatorEnumFactory()); 137 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 138 switch (src.getValue()) { 139 case EQUAL: 140 tgt.setValue(org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.EQUAL); 141 break; 142 case ISA: 143 tgt.setValue(org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.ISA); 144 break; 145 case DESCENDENTOF: 146 tgt.setValue(org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.DESCENDENTOF); 147 break; 148 case ISNOTA: 149 tgt.setValue(org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.ISNOTA); 150 break; 151 case REGEX: 152 tgt.setValue(org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.REGEX); 153 break; 154 case IN: 155 tgt.setValue(org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.IN); 156 break; 157 case NOTIN: 158 tgt.setValue(org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.NOTIN); 159 break; 160 case GENERALIZES: 161 tgt.setValue(org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.GENERALIZES); 162 break; 163 case EXISTS: 164 tgt.setValue(org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.EXISTS); 165 break; 166 default: 167 tgt.setValue(org.hl7.fhir.dstu3.model.ValueSet.FilterOperator.NULL); 168 break; 169 } 170 return tgt; 171 } 172 173 public static org.hl7.fhir.r5.model.ValueSet convertValueSet(org.hl7.fhir.dstu3.model.ValueSet src) throws FHIRException { 174 if (src == null) 175 return null; 176 org.hl7.fhir.r5.model.ValueSet tgt = new org.hl7.fhir.r5.model.ValueSet(); 177 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyDomainResource(src, tgt); 178 if (src.hasUrl()) 179 tgt.setUrlElement(Uri30_50.convertUri(src.getUrlElement())); 180 for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) 181 tgt.addIdentifier(Identifier30_50.convertIdentifier(t)); 182 if (src.hasVersion()) 183 tgt.setVersionElement(String30_50.convertString(src.getVersionElement())); 184 if (src.hasName()) 185 tgt.setNameElement(String30_50.convertString(src.getNameElement())); 186 if (src.hasTitle()) 187 tgt.setTitleElement(String30_50.convertString(src.getTitleElement())); 188 if (src.hasStatus()) 189 tgt.setStatusElement(Enumerations30_50.convertPublicationStatus(src.getStatusElement())); 190 if (src.hasExperimental()) 191 tgt.setExperimentalElement(Boolean30_50.convertBoolean(src.getExperimentalElement())); 192 if (src.hasDate()) 193 tgt.setDateElement(DateTime30_50.convertDateTime(src.getDateElement())); 194 if (src.hasPublisher()) 195 tgt.setPublisherElement(String30_50.convertString(src.getPublisherElement())); 196 for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) 197 tgt.addContact(ContactDetail30_50.convertContactDetail(t)); 198 if (src.hasDescription()) 199 tgt.setDescriptionElement(MarkDown30_50.convertMarkdown(src.getDescriptionElement())); 200 for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) 201 tgt.addUseContext(UsageContext30_50.convertUsageContext(t)); 202 for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) 203 tgt.addJurisdiction(CodeableConcept30_50.convertCodeableConcept(t)); 204 if (src.hasImmutable()) 205 tgt.setImmutableElement(Boolean30_50.convertBoolean(src.getImmutableElement())); 206 if (src.hasPurpose()) 207 tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement())); 208 if (src.hasCopyright()) 209 tgt.setCopyrightElement(MarkDown30_50.convertMarkdown(src.getCopyrightElement())); 210 if (src.hasExtensible()) 211 tgt.addExtension("http://hl7.org/fhir/StructureDefinition/valueset-extensible", new BooleanType(src.getExtensible())); 212 if (src.hasCompose()) 213 tgt.setCompose(convertValueSetComposeComponent(src.getCompose())); 214 if (src.hasExpansion()) 215 tgt.setExpansion(convertValueSetExpansionComponent(src.getExpansion())); 216 return tgt; 217 } 218 219 public static org.hl7.fhir.dstu3.model.ValueSet convertValueSet(org.hl7.fhir.r5.model.ValueSet src) throws FHIRException { 220 if (src == null) 221 return null; 222 org.hl7.fhir.dstu3.model.ValueSet tgt = new org.hl7.fhir.dstu3.model.ValueSet(); 223 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyDomainResource(src, tgt); 224 if (src.hasUrl()) 225 tgt.setUrlElement(Uri30_50.convertUri(src.getUrlElement())); 226 for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) 227 tgt.addIdentifier(Identifier30_50.convertIdentifier(t)); 228 if (src.hasVersion()) 229 tgt.setVersionElement(String30_50.convertString(src.getVersionElement())); 230 if (src.hasName()) 231 tgt.setNameElement(String30_50.convertString(src.getNameElement())); 232 if (src.hasTitle()) 233 tgt.setTitleElement(String30_50.convertString(src.getTitleElement())); 234 if (src.hasStatus()) 235 tgt.setStatusElement(Enumerations30_50.convertPublicationStatus(src.getStatusElement())); 236 if (src.hasExperimental()) 237 tgt.setExperimentalElement(Boolean30_50.convertBoolean(src.getExperimentalElement())); 238 if (src.hasDate()) 239 tgt.setDateElement(DateTime30_50.convertDateTime(src.getDateElement())); 240 if (src.hasPublisher()) 241 tgt.setPublisherElement(String30_50.convertString(src.getPublisherElement())); 242 for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) 243 tgt.addContact(ContactDetail30_50.convertContactDetail(t)); 244 if (src.hasDescription()) 245 tgt.setDescriptionElement(MarkDown30_50.convertMarkdown(src.getDescriptionElement())); 246 for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) 247 tgt.addUseContext(UsageContext30_50.convertUsageContext(t)); 248 for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) 249 tgt.addJurisdiction(CodeableConcept30_50.convertCodeableConcept(t)); 250 if (src.hasImmutable()) 251 tgt.setImmutableElement(Boolean30_50.convertBoolean(src.getImmutableElement())); 252 if (src.hasPurpose()) 253 tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement())); 254 if (src.hasCopyright()) 255 tgt.setCopyrightElement(MarkDown30_50.convertMarkdown(src.getCopyrightElement())); 256 if (src.hasExtension("http://hl7.org/fhir/StructureDefinition/valueset-extensible")) 257 tgt.setExtensible(((BooleanType) src.getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/valueset-extensible").getValue()).booleanValue()); 258 if (src.hasCompose()) 259 tgt.setCompose(convertValueSetComposeComponent(src.getCompose())); 260 if (src.hasExpansion()) 261 tgt.setExpansion(convertValueSetExpansionComponent(src.getExpansion())); 262 return tgt; 263 } 264 265 public static org.hl7.fhir.r5.model.ValueSet.ValueSetComposeComponent convertValueSetComposeComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent src) throws FHIRException { 266 if (src == null) 267 return null; 268 org.hl7.fhir.r5.model.ValueSet.ValueSetComposeComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ValueSetComposeComponent(); 269 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 270 if (src.hasLockedDate()) 271 tgt.setLockedDateElement(Date30_50.convertDate(src.getLockedDateElement())); 272 if (src.hasInactive()) 273 tgt.setInactiveElement(Boolean30_50.convertBoolean(src.getInactiveElement())); 274 for (org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent t : src.getInclude()) 275 tgt.addInclude(convertConceptSetComponent(t)); 276 for (org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent t : src.getExclude()) 277 tgt.addExclude(convertConceptSetComponent(t)); 278 return tgt; 279 } 280 281 public static org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent convertValueSetComposeComponent(org.hl7.fhir.r5.model.ValueSet.ValueSetComposeComponent src) throws FHIRException { 282 if (src == null) 283 return null; 284 org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent(); 285 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 286 if (src.hasLockedDate()) 287 tgt.setLockedDateElement(Date30_50.convertDate(src.getLockedDateElement())); 288 if (src.hasInactive()) 289 tgt.setInactiveElement(Boolean30_50.convertBoolean(src.getInactiveElement())); 290 for (org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent t : src.getInclude()) 291 tgt.addInclude(convertConceptSetComponent(t)); 292 for (org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent t : src.getExclude()) 293 tgt.addExclude(convertConceptSetComponent(t)); 294 return tgt; 295 } 296 297 public static org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent convertValueSetExpansionComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent src) throws FHIRException { 298 if (src == null) 299 return null; 300 org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent(); 301 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 302 if (src.hasIdentifier()) 303 tgt.setIdentifierElement(Uri30_50.convertUri(src.getIdentifierElement())); 304 if (src.hasTimestamp()) 305 tgt.setTimestampElement(DateTime30_50.convertDateTime(src.getTimestampElement())); 306 if (src.hasTotal()) 307 tgt.setTotalElement(Integer30_50.convertInteger(src.getTotalElement())); 308 if (src.hasOffset()) 309 tgt.setOffsetElement(Integer30_50.convertInteger(src.getOffsetElement())); 310 for (org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) 311 tgt.addParameter(convertValueSetExpansionParameterComponent(t)); 312 for (org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) 313 tgt.addContains(convertValueSetExpansionContainsComponent(t)); 314 return tgt; 315 } 316 317 public static org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent convertValueSetExpansionComponent(org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent src) throws FHIRException { 318 if (src == null) 319 return null; 320 org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent(); 321 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 322 if (src.hasIdentifier()) 323 tgt.setIdentifierElement(Uri30_50.convertUri(src.getIdentifierElement())); 324 if (src.hasTimestamp()) 325 tgt.setTimestampElement(DateTime30_50.convertDateTime(src.getTimestampElement())); 326 if (src.hasTotal()) 327 tgt.setTotalElement(Integer30_50.convertInteger(src.getTotalElement())); 328 if (src.hasOffset()) 329 tgt.setOffsetElement(Integer30_50.convertInteger(src.getOffsetElement())); 330 for (org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) 331 tgt.addParameter(convertValueSetExpansionParameterComponent(t)); 332 for (org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) 333 tgt.addContains(convertValueSetExpansionContainsComponent(t)); 334 return tgt; 335 } 336 337 public static org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent convertValueSetExpansionContainsComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent src) throws FHIRException { 338 if (src == null) 339 return null; 340 org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent(); 341 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 342 if (src.hasSystem()) 343 tgt.setSystemElement(Uri30_50.convertUri(src.getSystemElement())); 344 if (src.hasAbstract()) 345 tgt.setAbstractElement(Boolean30_50.convertBoolean(src.getAbstractElement())); 346 if (src.hasInactive()) 347 tgt.setInactiveElement(Boolean30_50.convertBoolean(src.getInactiveElement())); 348 if (src.hasVersion()) 349 tgt.setVersionElement(String30_50.convertString(src.getVersionElement())); 350 if (src.hasCode()) 351 tgt.setCodeElement(Code30_50.convertCode(src.getCodeElement())); 352 if (src.hasDisplay()) 353 tgt.setDisplayElement(String30_50.convertString(src.getDisplayElement())); 354 for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) 355 tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); 356 for (org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) 357 tgt.addContains(convertValueSetExpansionContainsComponent(t)); 358 return tgt; 359 } 360 361 public static org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent convertValueSetExpansionContainsComponent(org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent src) throws FHIRException { 362 if (src == null) 363 return null; 364 org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent(); 365 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 366 if (src.hasSystem()) 367 tgt.setSystemElement(Uri30_50.convertUri(src.getSystemElement())); 368 if (src.hasAbstract()) 369 tgt.setAbstractElement(Boolean30_50.convertBoolean(src.getAbstractElement())); 370 if (src.hasInactive()) 371 tgt.setInactiveElement(Boolean30_50.convertBoolean(src.getInactiveElement())); 372 if (src.hasVersion()) 373 tgt.setVersionElement(String30_50.convertString(src.getVersionElement())); 374 if (src.hasCode()) 375 tgt.setCodeElement(Code30_50.convertCode(src.getCodeElement())); 376 if (src.hasDisplay()) 377 tgt.setDisplayElement(String30_50.convertString(src.getDisplayElement())); 378 for (org.hl7.fhir.r5.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) 379 tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); 380 for (org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) 381 tgt.addContains(convertValueSetExpansionContainsComponent(t)); 382 return tgt; 383 } 384 385 public static org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent convertValueSetExpansionParameterComponent(org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionParameterComponent src) throws FHIRException { 386 if (src == null) 387 return null; 388 org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent(); 389 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 390 if (src.hasName()) 391 tgt.setNameElement(String30_50.convertString(src.getNameElement())); 392 if (src.hasValue()) 393 tgt.setValue(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getValue())); 394 return tgt; 395 } 396 397 public static org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionParameterComponent convertValueSetExpansionParameterComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent src) throws FHIRException { 398 if (src == null) 399 return null; 400 org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionParameterComponent(); 401 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 402 if (src.hasName()) 403 tgt.setNameElement(String30_50.convertString(src.getNameElement())); 404 if (src.hasValue()) 405 tgt.setValue(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getValue())); 406 return tgt; 407 } 408}