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