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