001package org.hl7.fhir.convertors.conv14_30.resources14_30; 002 003import org.hl7.fhir.convertors.context.ConversionContext14_30; 004import org.hl7.fhir.convertors.conv14_30.VersionConvertor_14_30; 005import org.hl7.fhir.convertors.conv14_30.datatypes14_30.Reference14_30; 006import org.hl7.fhir.convertors.conv14_30.datatypes14_30.complextypes14_30.CodeableConcept14_30; 007import org.hl7.fhir.convertors.conv14_30.datatypes14_30.complextypes14_30.ContactPoint14_30; 008import org.hl7.fhir.convertors.conv14_30.datatypes14_30.primitivetypes14_30.*; 009import org.hl7.fhir.exceptions.FHIRException; 010 011public class ImplementationGuide14_30 { 012 013 static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType> convertGuideDependencyType(org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuideDependencyType> src) throws FHIRException { 014 if (src == null || src.isEmpty()) 015 return null; 016 org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyTypeEnumFactory()); 017 ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt); 018 switch (src.getValue()) { 019 case REFERENCE: 020 tgt.setValue(org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType.REFERENCE); 021 break; 022 case INCLUSION: 023 tgt.setValue(org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType.INCLUSION); 024 break; 025 default: 026 tgt.setValue(org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType.NULL); 027 break; 028 } 029 return tgt; 030 } 031 032 static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuideDependencyType> convertGuideDependencyType(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.ImplementationGuide.GuideDependencyType> src) throws FHIRException { 033 if (src == null || src.isEmpty()) 034 return null; 035 org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuideDependencyType> tgt = new org.hl7.fhir.dstu2016may.model.Enumeration<>(new org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuideDependencyTypeEnumFactory()); 036 ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt); 037 switch (src.getValue()) { 038 case REFERENCE: 039 tgt.setValue(org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuideDependencyType.REFERENCE); 040 break; 041 case INCLUSION: 042 tgt.setValue(org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuideDependencyType.INCLUSION); 043 break; 044 default: 045 tgt.setValue(org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuideDependencyType.NULL); 046 break; 047 } 048 return tgt; 049 } 050 051 static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind> convertGuidePageKind(org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuidePageKind> src) throws FHIRException { 052 if (src == null || src.isEmpty()) 053 return null; 054 org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKindEnumFactory()); 055 ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt); 056 switch (src.getValue()) { 057 case PAGE: 058 tgt.setValue(org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.PAGE); 059 break; 060 case EXAMPLE: 061 tgt.setValue(org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.EXAMPLE); 062 break; 063 case LIST: 064 tgt.setValue(org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.LIST); 065 break; 066 case INCLUDE: 067 tgt.setValue(org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.INCLUDE); 068 break; 069 case DIRECTORY: 070 tgt.setValue(org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.DIRECTORY); 071 break; 072 case DICTIONARY: 073 tgt.setValue(org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.DICTIONARY); 074 break; 075 case TOC: 076 tgt.setValue(org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.TOC); 077 break; 078 case RESOURCE: 079 tgt.setValue(org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.RESOURCE); 080 break; 081 default: 082 tgt.setValue(org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind.NULL); 083 break; 084 } 085 return tgt; 086 } 087 088 static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuidePageKind> convertGuidePageKind(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.ImplementationGuide.GuidePageKind> src) throws FHIRException { 089 if (src == null || src.isEmpty()) 090 return null; 091 org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuidePageKind> tgt = new org.hl7.fhir.dstu2016may.model.Enumeration<>(new org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuidePageKindEnumFactory()); 092 ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt); 093 switch (src.getValue()) { 094 case PAGE: 095 tgt.setValue(org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuidePageKind.PAGE); 096 break; 097 case EXAMPLE: 098 tgt.setValue(org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuidePageKind.EXAMPLE); 099 break; 100 case LIST: 101 tgt.setValue(org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuidePageKind.LIST); 102 break; 103 case INCLUDE: 104 tgt.setValue(org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuidePageKind.INCLUDE); 105 break; 106 case DIRECTORY: 107 tgt.setValue(org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuidePageKind.DIRECTORY); 108 break; 109 case DICTIONARY: 110 tgt.setValue(org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuidePageKind.DICTIONARY); 111 break; 112 case TOC: 113 tgt.setValue(org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuidePageKind.TOC); 114 break; 115 case RESOURCE: 116 tgt.setValue(org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuidePageKind.RESOURCE); 117 break; 118 default: 119 tgt.setValue(org.hl7.fhir.dstu2016may.model.ImplementationGuide.GuidePageKind.NULL); 120 break; 121 } 122 return tgt; 123 } 124 125 public static org.hl7.fhir.dstu2016may.model.ImplementationGuide convertImplementationGuide(org.hl7.fhir.dstu3.model.ImplementationGuide src) throws FHIRException { 126 if (src == null || src.isEmpty()) 127 return null; 128 org.hl7.fhir.dstu2016may.model.ImplementationGuide tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide(); 129 ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyDomainResource(src, tgt); 130 if (src.hasUrlElement()) 131 tgt.setUrlElement(Uri14_30.convertUri(src.getUrlElement())); 132 if (src.hasVersion()) 133 tgt.setVersionElement(String14_30.convertString(src.getVersionElement())); 134 if (src.hasNameElement()) 135 tgt.setNameElement(String14_30.convertString(src.getNameElement())); 136 if (src.hasStatus()) 137 tgt.setStatusElement(Enumerations14_30.convertConformanceResourceStatus(src.getStatusElement())); 138 if (src.hasExperimental()) 139 tgt.setExperimentalElement(Boolean14_30.convertBoolean(src.getExperimentalElement())); 140 if (src.hasPublisher()) 141 tgt.setPublisherElement(String14_30.convertString(src.getPublisherElement())); 142 for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) 143 tgt.addContact(convertImplementationGuideContactComponent(t)); 144 if (src.hasDate()) 145 tgt.setDateElement(DateTime14_30.convertDateTime(src.getDateElement())); 146 if (src.hasDescription()) 147 tgt.setDescription(src.getDescription()); 148 for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) 149 if (t.hasValueCodeableConcept()) 150 tgt.addUseContext(CodeableConcept14_30.convertCodeableConcept(t.getValueCodeableConcept())); 151 for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) 152 tgt.addUseContext(CodeableConcept14_30.convertCodeableConcept(t)); 153 if (src.hasCopyright()) 154 tgt.setCopyright(src.getCopyright()); 155 if (src.hasFhirVersion()) 156 tgt.setFhirVersionElement(Id14_30.convertId(src.getFhirVersionElement())); 157 for (org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideDependencyComponent t : src.getDependency()) 158 tgt.addDependency(convertImplementationGuideDependencyComponent(t)); 159 for (org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageComponent t : src.getPackage()) 160 tgt.addPackage(convertImplementationGuidePackageComponent(t)); 161 for (org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent t : src.getGlobal()) 162 tgt.addGlobal(convertImplementationGuideGlobalComponent(t)); 163 for (org.hl7.fhir.dstu3.model.UriType t : src.getBinary()) tgt.addBinary(t.getValue()); 164 if (src.hasPage()) 165 tgt.setPage(convertImplementationGuidePageComponent(src.getPage())); 166 return tgt; 167 } 168 169 public static org.hl7.fhir.dstu3.model.ImplementationGuide convertImplementationGuide(org.hl7.fhir.dstu2016may.model.ImplementationGuide src) throws FHIRException { 170 if (src == null || src.isEmpty()) 171 return null; 172 org.hl7.fhir.dstu3.model.ImplementationGuide tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide(); 173 ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyDomainResource(src, tgt); 174 if (src.hasUrlElement()) 175 tgt.setUrlElement(Uri14_30.convertUri(src.getUrlElement())); 176 if (src.hasVersion()) 177 tgt.setVersionElement(String14_30.convertString(src.getVersionElement())); 178 if (src.hasNameElement()) 179 tgt.setNameElement(String14_30.convertString(src.getNameElement())); 180 if (src.hasStatus()) 181 tgt.setStatusElement(Enumerations14_30.convertConformanceResourceStatus(src.getStatusElement())); 182 if (src.hasExperimental()) 183 tgt.setExperimentalElement(Boolean14_30.convertBoolean(src.getExperimentalElement())); 184 if (src.hasPublisher()) 185 tgt.setPublisherElement(String14_30.convertString(src.getPublisherElement())); 186 for (org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideContactComponent t : src.getContact()) 187 tgt.addContact(convertImplementationGuideContactComponent(t)); 188 if (src.hasDate()) 189 tgt.setDateElement(DateTime14_30.convertDateTime(src.getDateElement())); 190 if (src.hasDescription()) 191 tgt.setDescription(src.getDescription()); 192 for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext()) 193 if (VersionConvertor_14_30.isJurisdiction(t)) 194 tgt.addJurisdiction(CodeableConcept14_30.convertCodeableConcept(t)); 195 else 196 tgt.addUseContext(CodeableConcept14_30.convertCodeableConceptToUsageContext(t)); 197 if (src.hasCopyright()) 198 tgt.setCopyright(src.getCopyright()); 199 if (src.hasFhirVersion()) 200 tgt.setFhirVersionElement(Id14_30.convertId(src.getFhirVersionElement())); 201 for (org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideDependencyComponent t : src.getDependency()) 202 tgt.addDependency(convertImplementationGuideDependencyComponent(t)); 203 for (org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageComponent t : src.getPackage()) 204 tgt.addPackage(convertImplementationGuidePackageComponent(t)); 205 for (org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideGlobalComponent t : src.getGlobal()) 206 tgt.addGlobal(convertImplementationGuideGlobalComponent(t)); 207 for (org.hl7.fhir.dstu2016may.model.UriType t : src.getBinary()) tgt.addBinary(t.getValue()); 208 if (src.hasPage()) 209 tgt.setPage(convertImplementationGuidePageComponent(src.getPage())); 210 return tgt; 211 } 212 213 public static org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideContactComponent convertImplementationGuideContactComponent(org.hl7.fhir.dstu3.model.ContactDetail src) throws FHIRException { 214 if (src == null || src.isEmpty()) 215 return null; 216 org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideContactComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideContactComponent(); 217 ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt); 218 if (src.hasName()) 219 tgt.setNameElement(String14_30.convertString(src.getNameElement())); 220 for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) 221 tgt.addTelecom(ContactPoint14_30.convertContactPoint(t)); 222 return tgt; 223 } 224 225 public static org.hl7.fhir.dstu3.model.ContactDetail convertImplementationGuideContactComponent(org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideContactComponent src) throws FHIRException { 226 if (src == null || src.isEmpty()) 227 return null; 228 org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail(); 229 ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt); 230 if (src.hasName()) 231 tgt.setNameElement(String14_30.convertString(src.getNameElement())); 232 for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom()) 233 tgt.addTelecom(ContactPoint14_30.convertContactPoint(t)); 234 return tgt; 235 } 236 237 public static org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideDependencyComponent convertImplementationGuideDependencyComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideDependencyComponent src) throws FHIRException { 238 if (src == null || src.isEmpty()) 239 return null; 240 org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideDependencyComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideDependencyComponent(); 241 ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt); 242 if (src.hasType()) 243 tgt.setTypeElement(convertGuideDependencyType(src.getTypeElement())); 244 if (src.hasUriElement()) 245 tgt.setUriElement(Uri14_30.convertUri(src.getUriElement())); 246 return tgt; 247 } 248 249 public static org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideDependencyComponent convertImplementationGuideDependencyComponent(org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideDependencyComponent src) throws FHIRException { 250 if (src == null || src.isEmpty()) 251 return null; 252 org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideDependencyComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideDependencyComponent(); 253 ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt); 254 if (src.hasType()) 255 tgt.setTypeElement(convertGuideDependencyType(src.getTypeElement())); 256 if (src.hasUriElement()) 257 tgt.setUriElement(Uri14_30.convertUri(src.getUriElement())); 258 return tgt; 259 } 260 261 public static org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideGlobalComponent convertImplementationGuideGlobalComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent src) throws FHIRException { 262 if (src == null || src.isEmpty()) 263 return null; 264 org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideGlobalComponent(); 265 ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt); 266 if (src.hasTypeElement()) 267 tgt.setTypeElement(Code14_30.convertCode(src.getTypeElement())); 268 if (src.hasProfile()) 269 tgt.setProfile(Reference14_30.convertReference(src.getProfile())); 270 return tgt; 271 } 272 273 public static org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent convertImplementationGuideGlobalComponent(org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuideGlobalComponent src) throws FHIRException { 274 if (src == null || src.isEmpty()) 275 return null; 276 org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent(); 277 ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt); 278 if (src.hasTypeElement()) 279 tgt.setTypeElement(Code14_30.convertCode(src.getTypeElement())); 280 if (src.hasProfile()) 281 tgt.setProfile(Reference14_30.convertReference(src.getProfile())); 282 return tgt; 283 } 284 285 public static org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageComponent convertImplementationGuidePackageComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageComponent src) throws FHIRException { 286 if (src == null || src.isEmpty()) 287 return null; 288 org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageComponent(); 289 ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt); 290 if (src.hasNameElement()) 291 tgt.setNameElement(String14_30.convertString(src.getNameElement())); 292 if (src.hasDescription()) 293 tgt.setDescriptionElement(String14_30.convertString(src.getDescriptionElement())); 294 for (org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource()) 295 tgt.addResource(convertImplementationGuidePackageResourceComponent(t)); 296 return tgt; 297 } 298 299 public static org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageComponent convertImplementationGuidePackageComponent(org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageComponent src) throws FHIRException { 300 if (src == null || src.isEmpty()) 301 return null; 302 org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageComponent(); 303 ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt); 304 if (src.hasNameElement()) 305 tgt.setNameElement(String14_30.convertString(src.getNameElement())); 306 if (src.hasDescription()) 307 tgt.setDescriptionElement(String14_30.convertString(src.getDescriptionElement())); 308 for (org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource()) 309 tgt.addResource(convertImplementationGuidePackageResourceComponent(t)); 310 return tgt; 311 } 312 313 public static org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageResourceComponent convertImplementationGuidePackageResourceComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent src) throws FHIRException { 314 if (src == null || src.isEmpty()) 315 return null; 316 org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageResourceComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageResourceComponent(); 317 ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt); 318 if (src.hasExampleElement()) 319 tgt.setExampleElement(Boolean14_30.convertBoolean(src.getExampleElement())); 320 if (src.hasName()) 321 tgt.setNameElement(String14_30.convertString(src.getNameElement())); 322 if (src.hasDescription()) 323 tgt.setDescriptionElement(String14_30.convertString(src.getDescriptionElement())); 324 if (src.hasAcronym()) 325 tgt.setAcronymElement(String14_30.convertString(src.getAcronymElement())); 326 if (src.hasSource()) 327 tgt.setSource(ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().convertType(src.getSource())); 328 if (src.hasExampleFor()) 329 tgt.setExampleFor(Reference14_30.convertReference(src.getExampleFor())); 330 return tgt; 331 } 332 333 public static org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent convertImplementationGuidePackageResourceComponent(org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePackageResourceComponent src) throws FHIRException { 334 if (src == null || src.isEmpty()) 335 return null; 336 org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent(); 337 ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt); 338 if (src.hasExampleElement()) 339 tgt.setExampleElement(Boolean14_30.convertBoolean(src.getExampleElement())); 340 if (src.hasName()) 341 tgt.setNameElement(String14_30.convertString(src.getNameElement())); 342 if (src.hasDescription()) 343 tgt.setDescriptionElement(String14_30.convertString(src.getDescriptionElement())); 344 if (src.hasAcronym()) 345 tgt.setAcronymElement(String14_30.convertString(src.getAcronymElement())); 346 if (src.hasSource()) 347 tgt.setSource(ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().convertType(src.getSource())); 348 if (src.hasExampleFor()) 349 tgt.setExampleFor(Reference14_30.convertReference(src.getExampleFor())); 350 return tgt; 351 } 352 353 public static org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePageComponent convertImplementationGuidePageComponent(org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePageComponent src) throws FHIRException { 354 if (src == null || src.isEmpty()) 355 return null; 356 org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePageComponent tgt = new org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePageComponent(); 357 ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt); 358 if (src.hasSourceElement()) 359 tgt.setSourceElement(Uri14_30.convertUri(src.getSourceElement())); 360 if (src.hasNameElement()) 361 tgt.setTitleElement(String14_30.convertString(src.getNameElement())); 362 if (src.hasKind()) 363 tgt.setKindElement(convertGuidePageKind(src.getKindElement())); 364 for (org.hl7.fhir.dstu2016may.model.CodeType t : src.getType()) tgt.addType(t.getValue()); 365 for (org.hl7.fhir.dstu2016may.model.StringType t : src.getPackage()) tgt.addPackage(t.getValue()); 366 if (src.hasFormat()) 367 tgt.setFormatElement(Code14_30.convertCode(src.getFormatElement())); 368 for (org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePageComponent t : src.getPage()) 369 tgt.addPage(convertImplementationGuidePageComponent(t)); 370 return tgt; 371 } 372 373 public static org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePageComponent convertImplementationGuidePageComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePageComponent src) throws FHIRException { 374 if (src == null || src.isEmpty()) 375 return null; 376 org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePageComponent tgt = new org.hl7.fhir.dstu2016may.model.ImplementationGuide.ImplementationGuidePageComponent(); 377 ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt); 378 if (src.hasSourceElement()) 379 tgt.setSourceElement(Uri14_30.convertUri(src.getSourceElement())); 380 if (src.hasTitleElement()) 381 tgt.setNameElement(String14_30.convertString(src.getTitleElement())); 382 if (src.hasKind()) 383 tgt.setKindElement(convertGuidePageKind(src.getKindElement())); 384 for (org.hl7.fhir.dstu3.model.CodeType t : src.getType()) tgt.addType(t.getValue()); 385 for (org.hl7.fhir.dstu3.model.StringType t : src.getPackage()) tgt.addPackage(t.getValue()); 386 if (src.hasFormat()) 387 tgt.setFormatElement(Code14_30.convertCode(src.getFormatElement())); 388 for (org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePageComponent t : src.getPage()) 389 tgt.addPage(convertImplementationGuidePageComponent(t)); 390 return tgt; 391 } 392}