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.complextypes30_50.Identifier30_50; 005import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Signature30_50; 006import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Decimal30_50; 007import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Instant30_50; 008import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.String30_50; 009import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.UnsignedInt30_50; 010import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Uri30_50; 011import org.hl7.fhir.exceptions.FHIRException; 012import org.hl7.fhir.r5.model.Bundle.LinkRelationTypes; 013 014public class Bundle30_50 { 015 016 public static org.hl7.fhir.r5.model.Bundle convertBundle(org.hl7.fhir.dstu3.model.Bundle src) throws FHIRException { 017 if (src == null) 018 return null; 019 org.hl7.fhir.r5.model.Bundle tgt = new org.hl7.fhir.r5.model.Bundle(); 020 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyResource(src, tgt); 021 if (src.hasIdentifier()) 022 tgt.setIdentifier(Identifier30_50.convertIdentifier(src.getIdentifier())); 023 if (src.hasType()) 024 tgt.setTypeElement(convertBundleType(src.getTypeElement())); 025 if (src.hasTotal()) 026 tgt.setTotalElement(UnsignedInt30_50.convertUnsignedInt(src.getTotalElement())); 027 for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink()) 028 tgt.addLink(convertBundleLinkComponent(t)); 029 for (org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent t : src.getEntry()) 030 tgt.addEntry(convertBundleEntryComponent(t)); 031 if (src.hasSignature()) 032 tgt.setSignature(Signature30_50.convertSignature(src.getSignature())); 033 return tgt; 034 } 035 036 public static org.hl7.fhir.dstu3.model.Bundle convertBundle(org.hl7.fhir.r5.model.Bundle src) throws FHIRException { 037 if (src == null) 038 return null; 039 org.hl7.fhir.dstu3.model.Bundle tgt = new org.hl7.fhir.dstu3.model.Bundle(); 040 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyResource(src, tgt); 041 if (src.hasIdentifier()) 042 tgt.setIdentifier(Identifier30_50.convertIdentifier(src.getIdentifier())); 043 if (src.hasType()) 044 tgt.setTypeElement(convertBundleType(src.getTypeElement())); 045 if (src.hasTotal()) 046 tgt.setTotalElement(UnsignedInt30_50.convertUnsignedInt(src.getTotalElement())); 047 for (org.hl7.fhir.r5.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); 048 for (org.hl7.fhir.r5.model.Bundle.BundleEntryComponent t : src.getEntry()) 049 tgt.addEntry(convertBundleEntryComponent(t)); 050 if (src.hasSignature()) 051 tgt.setSignature(Signature30_50.convertSignature(src.getSignature())); 052 return tgt; 053 } 054 055 public static org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.r5.model.Bundle.BundleEntryComponent src) throws FHIRException { 056 if (src == null) 057 return null; 058 org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent(); 059 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); 060 for (org.hl7.fhir.r5.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); 061 if (src.hasFullUrl()) 062 tgt.setFullUrlElement(Uri30_50.convertUri(src.getFullUrlElement())); 063 if (src.hasResource()) 064 tgt.setResource(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertResource(src.getResource())); 065 if (src.hasSearch()) 066 tgt.setSearch(convertBundleEntrySearchComponent(src.getSearch())); 067 if (src.hasRequest()) 068 tgt.setRequest(convertBundleEntryRequestComponent(src.getRequest())); 069 if (src.hasResponse()) 070 tgt.setResponse(convertBundleEntryResponseComponent(src.getResponse())); 071 return tgt; 072 } 073 074 public static org.hl7.fhir.r5.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent src) throws FHIRException { 075 if (src == null) 076 return null; 077 org.hl7.fhir.r5.model.Bundle.BundleEntryComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleEntryComponent(); 078 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); 079 for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink()) 080 tgt.addLink(convertBundleLinkComponent(t)); 081 if (src.hasFullUrl()) 082 tgt.setFullUrlElement(Uri30_50.convertUri(src.getFullUrlElement())); 083 if (src.hasResource()) 084 tgt.setResource(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertResource(src.getResource())); 085 if (src.hasSearch()) 086 tgt.setSearch(convertBundleEntrySearchComponent(src.getSearch())); 087 if (src.hasRequest()) 088 tgt.setRequest(convertBundleEntryRequestComponent(src.getRequest())); 089 if (src.hasResponse()) 090 tgt.setResponse(convertBundleEntryResponseComponent(src.getResponse())); 091 return tgt; 092 } 093 094 public static org.hl7.fhir.r5.model.Bundle.BundleEntryRequestComponent convertBundleEntryRequestComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryRequestComponent src) throws FHIRException { 095 if (src == null) 096 return null; 097 org.hl7.fhir.r5.model.Bundle.BundleEntryRequestComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleEntryRequestComponent(); 098 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); 099 if (src.hasMethod()) 100 tgt.setMethodElement(convertHTTPVerb(src.getMethodElement())); 101 if (src.hasUrl()) 102 tgt.setUrlElement(Uri30_50.convertUri(src.getUrlElement())); 103 if (src.hasIfNoneMatch()) 104 tgt.setIfNoneMatchElement(String30_50.convertString(src.getIfNoneMatchElement())); 105 if (src.hasIfModifiedSince()) 106 tgt.setIfModifiedSinceElement(Instant30_50.convertInstant(src.getIfModifiedSinceElement())); 107 if (src.hasIfMatch()) 108 tgt.setIfMatchElement(String30_50.convertString(src.getIfMatchElement())); 109 if (src.hasIfNoneExist()) 110 tgt.setIfNoneExistElement(String30_50.convertString(src.getIfNoneExistElement())); 111 return tgt; 112 } 113 114 public static org.hl7.fhir.dstu3.model.Bundle.BundleEntryRequestComponent convertBundleEntryRequestComponent(org.hl7.fhir.r5.model.Bundle.BundleEntryRequestComponent src) throws FHIRException { 115 if (src == null) 116 return null; 117 org.hl7.fhir.dstu3.model.Bundle.BundleEntryRequestComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntryRequestComponent(); 118 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); 119 if (src.hasMethod()) 120 tgt.setMethodElement(convertHTTPVerb(src.getMethodElement())); 121 if (src.hasUrl()) 122 tgt.setUrlElement(Uri30_50.convertUri(src.getUrlElement())); 123 if (src.hasIfNoneMatch()) 124 tgt.setIfNoneMatchElement(String30_50.convertString(src.getIfNoneMatchElement())); 125 if (src.hasIfModifiedSince()) 126 tgt.setIfModifiedSinceElement(Instant30_50.convertInstant(src.getIfModifiedSinceElement())); 127 if (src.hasIfMatch()) 128 tgt.setIfMatchElement(String30_50.convertString(src.getIfMatchElement())); 129 if (src.hasIfNoneExist()) 130 tgt.setIfNoneExistElement(String30_50.convertString(src.getIfNoneExistElement())); 131 return tgt; 132 } 133 134 public static org.hl7.fhir.r5.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent src) throws FHIRException { 135 if (src == null) 136 return null; 137 org.hl7.fhir.r5.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleEntryResponseComponent(); 138 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); 139 if (src.hasStatus()) 140 tgt.setStatusElement(String30_50.convertString(src.getStatusElement())); 141 if (src.hasLocation()) 142 tgt.setLocationElement(Uri30_50.convertUri(src.getLocationElement())); 143 if (src.hasEtag()) 144 tgt.setEtagElement(String30_50.convertString(src.getEtagElement())); 145 if (src.hasLastModified()) 146 tgt.setLastModifiedElement(Instant30_50.convertInstant(src.getLastModifiedElement())); 147 if (src.hasOutcome()) 148 tgt.setOutcome(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertResource(src.getOutcome())); 149 return tgt; 150 } 151 152 public static org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.r5.model.Bundle.BundleEntryResponseComponent src) throws FHIRException { 153 if (src == null) 154 return null; 155 org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent(); 156 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); 157 if (src.hasStatus()) 158 tgt.setStatusElement(String30_50.convertString(src.getStatusElement())); 159 if (src.hasLocation()) 160 tgt.setLocationElement(Uri30_50.convertUri(src.getLocationElement())); 161 if (src.hasEtag()) 162 tgt.setEtagElement(String30_50.convertString(src.getEtagElement())); 163 if (src.hasLastModified()) 164 tgt.setLastModifiedElement(Instant30_50.convertInstant(src.getLastModifiedElement())); 165 if (src.hasOutcome()) 166 tgt.setOutcome(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertResource(src.getOutcome())); 167 return tgt; 168 } 169 170 public static org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent convertBundleEntrySearchComponent(org.hl7.fhir.r5.model.Bundle.BundleEntrySearchComponent src) throws FHIRException { 171 if (src == null) 172 return null; 173 org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent(); 174 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); 175 if (src.hasMode()) 176 tgt.setModeElement(convertSearchEntryMode(src.getModeElement())); 177 if (src.hasScore()) 178 tgt.setScoreElement(Decimal30_50.convertDecimal(src.getScoreElement())); 179 return tgt; 180 } 181 182 public static org.hl7.fhir.r5.model.Bundle.BundleEntrySearchComponent convertBundleEntrySearchComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent src) throws FHIRException { 183 if (src == null) 184 return null; 185 org.hl7.fhir.r5.model.Bundle.BundleEntrySearchComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleEntrySearchComponent(); 186 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); 187 if (src.hasMode()) 188 tgt.setModeElement(convertSearchEntryMode(src.getModeElement())); 189 if (src.hasScore()) 190 tgt.setScoreElement(Decimal30_50.convertDecimal(src.getScoreElement())); 191 return tgt; 192 } 193 194 public static org.hl7.fhir.r5.model.Bundle.BundleLinkComponent convertBundleLinkComponent(org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent src) throws FHIRException { 195 if (src == null) 196 return null; 197 org.hl7.fhir.r5.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleLinkComponent(); 198 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); 199 if (src.hasRelation()) 200 tgt.setRelation(LinkRelationTypes.fromCode(src.getRelation())); 201 if (src.hasUrl()) 202 tgt.setUrlElement(Uri30_50.convertUri(src.getUrlElement())); 203 return tgt; 204 } 205 206 public static org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent convertBundleLinkComponent(org.hl7.fhir.r5.model.Bundle.BundleLinkComponent src) throws FHIRException { 207 if (src == null) 208 return null; 209 org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent(); 210 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); 211 if (src.hasRelation()) 212 tgt.setRelation((src.getRelation().toCode())); 213 if (src.hasUrl()) 214 tgt.setUrlElement(Uri30_50.convertUri(src.getUrlElement())); 215 return tgt; 216 } 217 218 static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Bundle.BundleType> convertBundleType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Bundle.BundleType> src) throws FHIRException { 219 if (src == null || src.isEmpty()) 220 return null; 221 org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Bundle.BundleType> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.Bundle.BundleTypeEnumFactory()); 222 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 223 switch (src.getValue()) { 224 case DOCUMENT: 225 tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.BundleType.DOCUMENT); 226 break; 227 case MESSAGE: 228 tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.BundleType.MESSAGE); 229 break; 230 case TRANSACTION: 231 tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.BundleType.TRANSACTION); 232 break; 233 case TRANSACTIONRESPONSE: 234 tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.BundleType.TRANSACTIONRESPONSE); 235 break; 236 case BATCH: 237 tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.BundleType.BATCH); 238 break; 239 case BATCHRESPONSE: 240 tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.BundleType.BATCHRESPONSE); 241 break; 242 case HISTORY: 243 tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.BundleType.HISTORY); 244 break; 245 case SEARCHSET: 246 tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.BundleType.SEARCHSET); 247 break; 248 case COLLECTION: 249 tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.BundleType.COLLECTION); 250 break; 251 default: 252 tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.BundleType.NULL); 253 break; 254 } 255 return tgt; 256 } 257 258 static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Bundle.BundleType> convertBundleType(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Bundle.BundleType> src) throws FHIRException { 259 if (src == null || src.isEmpty()) 260 return null; 261 org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Bundle.BundleType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Bundle.BundleTypeEnumFactory()); 262 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 263 switch (src.getValue()) { 264 case DOCUMENT: 265 tgt.setValue(org.hl7.fhir.r5.model.Bundle.BundleType.DOCUMENT); 266 break; 267 case MESSAGE: 268 tgt.setValue(org.hl7.fhir.r5.model.Bundle.BundleType.MESSAGE); 269 break; 270 case TRANSACTION: 271 tgt.setValue(org.hl7.fhir.r5.model.Bundle.BundleType.TRANSACTION); 272 break; 273 case TRANSACTIONRESPONSE: 274 tgt.setValue(org.hl7.fhir.r5.model.Bundle.BundleType.TRANSACTIONRESPONSE); 275 break; 276 case BATCH: 277 tgt.setValue(org.hl7.fhir.r5.model.Bundle.BundleType.BATCH); 278 break; 279 case BATCHRESPONSE: 280 tgt.setValue(org.hl7.fhir.r5.model.Bundle.BundleType.BATCHRESPONSE); 281 break; 282 case HISTORY: 283 tgt.setValue(org.hl7.fhir.r5.model.Bundle.BundleType.HISTORY); 284 break; 285 case SEARCHSET: 286 tgt.setValue(org.hl7.fhir.r5.model.Bundle.BundleType.SEARCHSET); 287 break; 288 case COLLECTION: 289 tgt.setValue(org.hl7.fhir.r5.model.Bundle.BundleType.COLLECTION); 290 break; 291 default: 292 tgt.setValue(org.hl7.fhir.r5.model.Bundle.BundleType.NULL); 293 break; 294 } 295 return tgt; 296 } 297 298 static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Bundle.HTTPVerb> convertHTTPVerb(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Bundle.HTTPVerb> src) throws FHIRException { 299 if (src == null || src.isEmpty()) 300 return null; 301 org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Bundle.HTTPVerb> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.Bundle.HTTPVerbEnumFactory()); 302 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 303 switch (src.getValue()) { 304 case GET: 305 tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.GET); 306 break; 307 case POST: 308 tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.POST); 309 break; 310 case PUT: 311 tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.PUT); 312 break; 313 case DELETE: 314 tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.DELETE); 315 break; 316 default: 317 tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.NULL); 318 break; 319 } 320 return tgt; 321 } 322 323 static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Bundle.HTTPVerb> convertHTTPVerb(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Bundle.HTTPVerb> src) throws FHIRException { 324 if (src == null || src.isEmpty()) 325 return null; 326 org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Bundle.HTTPVerb> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Bundle.HTTPVerbEnumFactory()); 327 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 328 switch (src.getValue()) { 329 case GET: 330 tgt.setValue(org.hl7.fhir.r5.model.Bundle.HTTPVerb.GET); 331 break; 332 case POST: 333 tgt.setValue(org.hl7.fhir.r5.model.Bundle.HTTPVerb.POST); 334 break; 335 case PUT: 336 tgt.setValue(org.hl7.fhir.r5.model.Bundle.HTTPVerb.PUT); 337 break; 338 case DELETE: 339 tgt.setValue(org.hl7.fhir.r5.model.Bundle.HTTPVerb.DELETE); 340 break; 341 default: 342 tgt.setValue(org.hl7.fhir.r5.model.Bundle.HTTPVerb.NULL); 343 break; 344 } 345 return tgt; 346 } 347 348 static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode> convertSearchEntryMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Bundle.SearchEntryMode> src) throws FHIRException { 349 if (src == null || src.isEmpty()) 350 return null; 351 org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.Bundle.SearchEntryModeEnumFactory()); 352 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 353 switch (src.getValue()) { 354 case MATCH: 355 tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode.MATCH); 356 break; 357 case INCLUDE: 358 tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode.INCLUDE); 359 break; 360 case OUTCOME: 361 tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode.OUTCOME); 362 break; 363 default: 364 tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode.NULL); 365 break; 366 } 367 return tgt; 368 } 369 370 static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Bundle.SearchEntryMode> convertSearchEntryMode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode> src) throws FHIRException { 371 if (src == null || src.isEmpty()) 372 return null; 373 org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Bundle.SearchEntryMode> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Bundle.SearchEntryModeEnumFactory()); 374 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 375 switch (src.getValue()) { 376 case MATCH: 377 tgt.setValue(org.hl7.fhir.r5.model.Bundle.SearchEntryMode.MATCH); 378 break; 379 case INCLUDE: 380 tgt.setValue(org.hl7.fhir.r5.model.Bundle.SearchEntryMode.INCLUDE); 381 break; 382 case OUTCOME: 383 tgt.setValue(org.hl7.fhir.r5.model.Bundle.SearchEntryMode.OUTCOME); 384 break; 385 default: 386 tgt.setValue(org.hl7.fhir.r5.model.Bundle.SearchEntryMode.NULL); 387 break; 388 } 389 return tgt; 390 } 391}