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.complextypes14_30.Identifier14_30;
009import org.hl7.fhir.convertors.conv14_30.datatypes14_30.primitivetypes14_30.Boolean14_30;
010import org.hl7.fhir.convertors.conv14_30.datatypes14_30.primitivetypes14_30.Code14_30;
011import org.hl7.fhir.convertors.conv14_30.datatypes14_30.primitivetypes14_30.DateTime14_30;
012import org.hl7.fhir.convertors.conv14_30.datatypes14_30.primitivetypes14_30.Id14_30;
013import org.hl7.fhir.convertors.conv14_30.datatypes14_30.primitivetypes14_30.Integer14_30;
014import org.hl7.fhir.convertors.conv14_30.datatypes14_30.primitivetypes14_30.String14_30;
015import org.hl7.fhir.convertors.conv14_30.datatypes14_30.primitivetypes14_30.Uri14_30;
016import org.hl7.fhir.exceptions.FHIRException;
017
018public class TestScript14_30 {
019
020  static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType> convertAssertionDirectionType(org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.TestScript.AssertionDirectionType> src) throws FHIRException {
021    if (src == null || src.isEmpty())
022      return null;
023    org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionTypeEnumFactory());
024    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
025    switch (src.getValue()) {
026      case RESPONSE:
027        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType.RESPONSE);
028        break;
029      case REQUEST:
030        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType.REQUEST);
031        break;
032      default:
033        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType.NULL);
034        break;
035    }
036    return tgt;
037  }
038
039  static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.TestScript.AssertionDirectionType> convertAssertionDirectionType(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.TestScript.AssertionDirectionType> src) throws FHIRException {
040    if (src == null || src.isEmpty())
041      return null;
042    org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.TestScript.AssertionDirectionType> tgt = new org.hl7.fhir.dstu2016may.model.Enumeration<>(new org.hl7.fhir.dstu2016may.model.TestScript.AssertionDirectionTypeEnumFactory());
043    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
044    switch (src.getValue()) {
045      case RESPONSE:
046        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionDirectionType.RESPONSE);
047        break;
048      case REQUEST:
049        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionDirectionType.REQUEST);
050        break;
051      default:
052        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionDirectionType.NULL);
053        break;
054    }
055    return tgt;
056  }
057
058  static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.TestScript.AssertionOperatorType> convertAssertionOperatorType(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType> src) throws FHIRException {
059    if (src == null || src.isEmpty())
060      return null;
061    org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.TestScript.AssertionOperatorType> tgt = new org.hl7.fhir.dstu2016may.model.Enumeration<>(new org.hl7.fhir.dstu2016may.model.TestScript.AssertionOperatorTypeEnumFactory());
062    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
063    switch (src.getValue()) {
064      case EQUALS:
065        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionOperatorType.EQUALS);
066        break;
067      case NOTEQUALS:
068        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionOperatorType.NOTEQUALS);
069        break;
070      case IN:
071        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionOperatorType.IN);
072        break;
073      case NOTIN:
074        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionOperatorType.NOTIN);
075        break;
076      case GREATERTHAN:
077        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionOperatorType.GREATERTHAN);
078        break;
079      case LESSTHAN:
080        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionOperatorType.LESSTHAN);
081        break;
082      case EMPTY:
083        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionOperatorType.EMPTY);
084        break;
085      case NOTEMPTY:
086        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionOperatorType.NOTEMPTY);
087        break;
088      case CONTAINS:
089        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionOperatorType.CONTAINS);
090        break;
091      case NOTCONTAINS:
092        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionOperatorType.NOTCONTAINS);
093        break;
094      default:
095        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionOperatorType.NULL);
096        break;
097    }
098    return tgt;
099  }
100
101  static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType> convertAssertionOperatorType(org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.TestScript.AssertionOperatorType> src) throws FHIRException {
102    if (src == null || src.isEmpty())
103      return null;
104    org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorTypeEnumFactory());
105    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
106    switch (src.getValue()) {
107      case EQUALS:
108        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.EQUALS);
109        break;
110      case NOTEQUALS:
111        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.NOTEQUALS);
112        break;
113      case IN:
114        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.IN);
115        break;
116      case NOTIN:
117        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.NOTIN);
118        break;
119      case GREATERTHAN:
120        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.GREATERTHAN);
121        break;
122      case LESSTHAN:
123        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.LESSTHAN);
124        break;
125      case EMPTY:
126        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.EMPTY);
127        break;
128      case NOTEMPTY:
129        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.NOTEMPTY);
130        break;
131      case CONTAINS:
132        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.CONTAINS);
133        break;
134      case NOTCONTAINS:
135        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.NOTCONTAINS);
136        break;
137      default:
138        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionOperatorType.NULL);
139        break;
140    }
141    return tgt;
142  }
143
144  static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes> convertAssertionResponseTypes(org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.TestScript.AssertionResponseTypes> src) throws FHIRException {
145    if (src == null || src.isEmpty())
146      return null;
147    org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypesEnumFactory());
148    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
149    switch (src.getValue()) {
150      case OKAY:
151        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.OKAY);
152        break;
153      case CREATED:
154        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.CREATED);
155        break;
156      case NOCONTENT:
157        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.NOCONTENT);
158        break;
159      case NOTMODIFIED:
160        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.NOTMODIFIED);
161        break;
162      case BAD:
163        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.BAD);
164        break;
165      case FORBIDDEN:
166        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.FORBIDDEN);
167        break;
168      case NOTFOUND:
169        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.NOTFOUND);
170        break;
171      case METHODNOTALLOWED:
172        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.METHODNOTALLOWED);
173        break;
174      case CONFLICT:
175        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.CONFLICT);
176        break;
177      case GONE:
178        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.GONE);
179        break;
180      case PRECONDITIONFAILED:
181        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED);
182        break;
183      case UNPROCESSABLE:
184        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.UNPROCESSABLE);
185        break;
186      default:
187        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.NULL);
188        break;
189    }
190    return tgt;
191  }
192
193  static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.TestScript.AssertionResponseTypes> convertAssertionResponseTypes(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes> src) throws FHIRException {
194    if (src == null || src.isEmpty())
195      return null;
196    org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.TestScript.AssertionResponseTypes> tgt = new org.hl7.fhir.dstu2016may.model.Enumeration<>(new org.hl7.fhir.dstu2016may.model.TestScript.AssertionResponseTypesEnumFactory());
197    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
198    switch (src.getValue()) {
199      case OKAY:
200        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionResponseTypes.OKAY);
201        break;
202      case CREATED:
203        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionResponseTypes.CREATED);
204        break;
205      case NOCONTENT:
206        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionResponseTypes.NOCONTENT);
207        break;
208      case NOTMODIFIED:
209        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionResponseTypes.NOTMODIFIED);
210        break;
211      case BAD:
212        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionResponseTypes.BAD);
213        break;
214      case FORBIDDEN:
215        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionResponseTypes.FORBIDDEN);
216        break;
217      case NOTFOUND:
218        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionResponseTypes.NOTFOUND);
219        break;
220      case METHODNOTALLOWED:
221        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionResponseTypes.METHODNOTALLOWED);
222        break;
223      case CONFLICT:
224        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionResponseTypes.CONFLICT);
225        break;
226      case GONE:
227        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionResponseTypes.GONE);
228        break;
229      case PRECONDITIONFAILED:
230        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED);
231        break;
232      case UNPROCESSABLE:
233        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionResponseTypes.UNPROCESSABLE);
234        break;
235      default:
236        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.AssertionResponseTypes.NULL);
237        break;
238    }
239    return tgt;
240  }
241
242  static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.TestScript.ContentType> convertContentType(org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.TestScript.ContentType> src) throws FHIRException {
243    if (src == null || src.isEmpty())
244      return null;
245    org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.TestScript.ContentType> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.TestScript.ContentTypeEnumFactory());
246    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
247    switch (src.getValue()) {
248      case XML:
249        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.ContentType.XML);
250        break;
251      case JSON:
252        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.ContentType.JSON);
253        break;
254      default:
255        tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.ContentType.NULL);
256        break;
257    }
258    return tgt;
259  }
260
261  static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.TestScript.ContentType> convertContentType(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.TestScript.ContentType> src) throws FHIRException {
262    if (src == null || src.isEmpty())
263      return null;
264    org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.TestScript.ContentType> tgt = new org.hl7.fhir.dstu2016may.model.Enumeration<>(new org.hl7.fhir.dstu2016may.model.TestScript.ContentTypeEnumFactory());
265    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
266    switch (src.getValue()) {
267      case XML:
268        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.ContentType.XML);
269        break;
270      case JSON:
271        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.ContentType.JSON);
272        break;
273      default:
274        tgt.setValue(org.hl7.fhir.dstu2016may.model.TestScript.ContentType.NULL);
275        break;
276    }
277    return tgt;
278  }
279
280  public static org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertComponent convertSetupActionAssertComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent src) throws FHIRException {
281    if (src == null || src.isEmpty())
282      return null;
283    org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertComponent();
284    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
285    if (src.hasLabel())
286      tgt.setLabelElement(String14_30.convertString(src.getLabelElement()));
287    if (src.hasDescription())
288      tgt.setDescriptionElement(String14_30.convertString(src.getDescriptionElement()));
289    if (src.hasDirection())
290      tgt.setDirectionElement(convertAssertionDirectionType(src.getDirectionElement()));
291    if (src.hasCompareToSourceId())
292      tgt.setCompareToSourceIdElement(String14_30.convertString(src.getCompareToSourceIdElement()));
293    if (src.hasCompareToSourcePath())
294      tgt.setCompareToSourcePathElement(String14_30.convertString(src.getCompareToSourcePathElement()));
295    if (src.hasContentType())
296      tgt.setContentTypeElement(convertContentType(src.getContentTypeElement()));
297    if (src.hasHeaderField())
298      tgt.setHeaderFieldElement(String14_30.convertString(src.getHeaderFieldElement()));
299    if (src.hasMinimumId())
300      tgt.setMinimumIdElement(String14_30.convertString(src.getMinimumIdElement()));
301    if (src.hasNavigationLinks())
302      tgt.setNavigationLinksElement(Boolean14_30.convertBoolean(src.getNavigationLinksElement()));
303    if (src.hasOperator())
304      tgt.setOperatorElement(convertAssertionOperatorType(src.getOperatorElement()));
305    if (src.hasPath())
306      tgt.setPathElement(String14_30.convertString(src.getPathElement()));
307    if (src.hasResource())
308      tgt.setResourceElement(Code14_30.convertCode(src.getResourceElement()));
309    if (src.hasResponse())
310      tgt.setResponseElement(convertAssertionResponseTypes(src.getResponseElement()));
311    if (src.hasResponseCode())
312      tgt.setResponseCodeElement(String14_30.convertString(src.getResponseCodeElement()));
313    if (src.hasRule())
314      tgt.setRule(convertSetupActionAssertRuleComponent(src.getRule()));
315    if (src.hasRuleset())
316      tgt.setRuleset(convertSetupActionAssertRulesetComponent(src.getRuleset()));
317    if (src.hasSourceId())
318      tgt.setSourceIdElement(Id14_30.convertId(src.getSourceIdElement()));
319    if (src.hasValidateProfileId())
320      tgt.setValidateProfileIdElement(Id14_30.convertId(src.getValidateProfileIdElement()));
321    if (src.hasValue())
322      tgt.setValueElement(String14_30.convertString(src.getValueElement()));
323    if (src.hasWarningOnly())
324      tgt.setWarningOnlyElement(Boolean14_30.convertBoolean(src.getWarningOnlyElement()));
325    return tgt;
326  }
327
328  public static org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent convertSetupActionAssertComponent(org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertComponent src) throws FHIRException {
329    if (src == null || src.isEmpty())
330      return null;
331    org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent();
332    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
333    if (src.hasLabel())
334      tgt.setLabelElement(String14_30.convertString(src.getLabelElement()));
335    if (src.hasDescription())
336      tgt.setDescriptionElement(String14_30.convertString(src.getDescriptionElement()));
337    if (src.hasDirection())
338      tgt.setDirectionElement(convertAssertionDirectionType(src.getDirectionElement()));
339    if (src.hasCompareToSourceId())
340      tgt.setCompareToSourceIdElement(String14_30.convertString(src.getCompareToSourceIdElement()));
341    if (src.hasCompareToSourcePath())
342      tgt.setCompareToSourcePathElement(String14_30.convertString(src.getCompareToSourcePathElement()));
343    if (src.hasContentType())
344      tgt.setContentTypeElement(convertContentType(src.getContentTypeElement()));
345    if (src.hasHeaderField())
346      tgt.setHeaderFieldElement(String14_30.convertString(src.getHeaderFieldElement()));
347    if (src.hasMinimumId())
348      tgt.setMinimumIdElement(String14_30.convertString(src.getMinimumIdElement()));
349    if (src.hasNavigationLinks())
350      tgt.setNavigationLinksElement(Boolean14_30.convertBoolean(src.getNavigationLinksElement()));
351    if (src.hasOperator())
352      tgt.setOperatorElement(convertAssertionOperatorType(src.getOperatorElement()));
353    if (src.hasPath())
354      tgt.setPathElement(String14_30.convertString(src.getPathElement()));
355    if (src.hasResource())
356      tgt.setResourceElement(Code14_30.convertCode(src.getResourceElement()));
357    if (src.hasResponse())
358      tgt.setResponseElement(convertAssertionResponseTypes(src.getResponseElement()));
359    if (src.hasResponseCode())
360      tgt.setResponseCodeElement(String14_30.convertString(src.getResponseCodeElement()));
361    if (src.hasRule())
362      tgt.setRule(convertSetupActionAssertRuleComponent(src.getRule()));
363    if (src.hasRuleset())
364      tgt.setRuleset(convertSetupActionAssertRulesetComponent(src.getRuleset()));
365    if (src.hasSourceId())
366      tgt.setSourceIdElement(Id14_30.convertId(src.getSourceIdElement()));
367    if (src.hasValidateProfileId())
368      tgt.setValidateProfileIdElement(Id14_30.convertId(src.getValidateProfileIdElement()));
369    if (src.hasValue())
370      tgt.setValueElement(String14_30.convertString(src.getValueElement()));
371    if (src.hasWarningOnly())
372      tgt.setWarningOnlyElement(Boolean14_30.convertBoolean(src.getWarningOnlyElement()));
373    return tgt;
374  }
375
376  public static org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRuleComponent convertSetupActionAssertRuleComponent(org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleComponent src) throws FHIRException {
377    if (src == null || src.isEmpty())
378      return null;
379    org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRuleComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRuleComponent();
380    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
381    for (org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleParamComponent t : src.getParam())
382      tgt.addParam(convertSetupActionAssertRuleParamComponent(t));
383    return tgt;
384  }
385
386  public static org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleComponent convertSetupActionAssertRuleComponent(org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRuleComponent src) throws FHIRException {
387    if (src == null || src.isEmpty())
388      return null;
389    org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleComponent();
390    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
391    for (org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRuleParamComponent t : src.getParam())
392      tgt.addParam(convertSetupActionAssertRuleParamComponent(t));
393    return tgt;
394  }
395
396  public static org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleParamComponent convertSetupActionAssertRuleParamComponent(org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRuleParamComponent src) throws FHIRException {
397    if (src == null || src.isEmpty())
398      return null;
399    org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleParamComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleParamComponent();
400    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
401    if (src.hasNameElement())
402      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
403    if (src.hasValue())
404      tgt.setValueElement(String14_30.convertString(src.getValueElement()));
405    return tgt;
406  }
407
408  public static org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRuleParamComponent convertSetupActionAssertRuleParamComponent(org.hl7.fhir.dstu3.model.TestScript.ActionAssertRuleParamComponent src) throws FHIRException {
409    if (src == null || src.isEmpty())
410      return null;
411    org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRuleParamComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRuleParamComponent();
412    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
413    if (src.hasNameElement())
414      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
415    if (src.hasValue())
416      tgt.setValueElement(String14_30.convertString(src.getValueElement()));
417    return tgt;
418  }
419
420  public static org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRulesetComponent convertSetupActionAssertRulesetComponent(org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetComponent src) throws FHIRException {
421    if (src == null || src.isEmpty())
422      return null;
423    org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRulesetComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRulesetComponent();
424    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
425    for (org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleComponent t : src.getRule())
426      tgt.addRule(convertSetupActionAssertRulesetRuleComponent(t));
427    return tgt;
428  }
429
430  public static org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetComponent convertSetupActionAssertRulesetComponent(org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRulesetComponent src) throws FHIRException {
431    if (src == null || src.isEmpty())
432      return null;
433    org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetComponent();
434    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
435    for (org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRulesetRuleComponent t : src.getRule())
436      tgt.addRule(convertSetupActionAssertRulesetRuleComponent(t));
437    return tgt;
438  }
439
440  public static org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleComponent convertSetupActionAssertRulesetRuleComponent(org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRulesetRuleComponent src) throws FHIRException {
441    if (src == null || src.isEmpty())
442      return null;
443    org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleComponent();
444    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
445    for (org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRulesetRuleParamComponent t : src.getParam())
446      tgt.addParam(convertSetupActionAssertRulesetRuleParamComponent(t));
447    return tgt;
448  }
449
450  public static org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRulesetRuleComponent convertSetupActionAssertRulesetRuleComponent(org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleComponent src) throws FHIRException {
451    if (src == null || src.isEmpty())
452      return null;
453    org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRulesetRuleComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRulesetRuleComponent();
454    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
455    for (org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleParamComponent t : src.getParam())
456      tgt.addParam(convertSetupActionAssertRulesetRuleParamComponent(t));
457    return tgt;
458  }
459
460  public static org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRulesetRuleParamComponent convertSetupActionAssertRulesetRuleParamComponent(org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleParamComponent src) throws FHIRException {
461    if (src == null || src.isEmpty())
462      return null;
463    org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRulesetRuleParamComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRulesetRuleParamComponent();
464    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
465    if (src.hasNameElement())
466      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
467    if (src.hasValue())
468      tgt.setValueElement(String14_30.convertString(src.getValueElement()));
469    return tgt;
470  }
471
472  public static org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleParamComponent convertSetupActionAssertRulesetRuleParamComponent(org.hl7.fhir.dstu2016may.model.TestScript.SetupActionAssertRulesetRuleParamComponent src) throws FHIRException {
473    if (src == null || src.isEmpty())
474      return null;
475    org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleParamComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.ActionAssertRulesetRuleParamComponent();
476    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
477    if (src.hasNameElement())
478      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
479    if (src.hasValue())
480      tgt.setValueElement(String14_30.convertString(src.getValueElement()));
481    return tgt;
482  }
483
484  public static org.hl7.fhir.dstu2016may.model.TestScript.SetupActionComponent convertSetupActionComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent src) throws FHIRException {
485    if (src == null || src.isEmpty())
486      return null;
487    org.hl7.fhir.dstu2016may.model.TestScript.SetupActionComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.SetupActionComponent();
488    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
489    if (src.hasOperation())
490      tgt.setOperation(convertSetupActionOperationComponent(src.getOperation()));
491    if (src.hasAssert())
492      tgt.setAssert(convertSetupActionAssertComponent(src.getAssert()));
493    return tgt;
494  }
495
496  public static org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent convertSetupActionComponent(org.hl7.fhir.dstu2016may.model.TestScript.SetupActionComponent src) throws FHIRException {
497    if (src == null || src.isEmpty())
498      return null;
499    org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent();
500    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
501    if (src.hasOperation())
502      tgt.setOperation(convertSetupActionOperationComponent(src.getOperation()));
503    if (src.hasAssert())
504      tgt.setAssert(convertSetupActionAssertComponent(src.getAssert()));
505    return tgt;
506  }
507
508  public static org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent convertSetupActionOperationComponent(org.hl7.fhir.dstu2016may.model.TestScript.SetupActionOperationComponent src) throws FHIRException {
509    if (src == null || src.isEmpty())
510      return null;
511    org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent();
512    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
513    if (src.hasType())
514      tgt.setType(Code14_30.convertCoding(src.getType()));
515    if (src.hasResource())
516      tgt.setResourceElement(Code14_30.convertCode(src.getResourceElement()));
517    if (src.hasLabel())
518      tgt.setLabelElement(String14_30.convertString(src.getLabelElement()));
519    if (src.hasDescription())
520      tgt.setDescriptionElement(String14_30.convertString(src.getDescriptionElement()));
521    if (src.hasAccept())
522      tgt.setAcceptElement(convertContentType(src.getAcceptElement()));
523    if (src.hasContentType())
524      tgt.setContentTypeElement(convertContentType(src.getContentTypeElement()));
525    if (src.hasDestination())
526      tgt.setDestinationElement(Integer14_30.convertInteger(src.getDestinationElement()));
527    if (src.hasEncodeRequestUrl())
528      tgt.setEncodeRequestUrlElement(Boolean14_30.convertBoolean(src.getEncodeRequestUrlElement()));
529    if (src.hasOrigin())
530      tgt.setOriginElement(Integer14_30.convertInteger(src.getOriginElement()));
531    if (src.hasParams())
532      tgt.setParamsElement(String14_30.convertString(src.getParamsElement()));
533    for (org.hl7.fhir.dstu2016may.model.TestScript.SetupActionOperationRequestHeaderComponent t : src.getRequestHeader())
534      tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t));
535    if (src.hasResponseId())
536      tgt.setResponseIdElement(Id14_30.convertId(src.getResponseIdElement()));
537    if (src.hasSourceId())
538      tgt.setSourceIdElement(Id14_30.convertId(src.getSourceIdElement()));
539    if (src.hasTargetId())
540      tgt.setTargetId(src.getTargetId());
541    if (src.hasUrl())
542      tgt.setUrlElement(String14_30.convertString(src.getUrlElement()));
543    return tgt;
544  }
545
546  public static org.hl7.fhir.dstu2016may.model.TestScript.SetupActionOperationComponent convertSetupActionOperationComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent src) throws FHIRException {
547    if (src == null || src.isEmpty())
548      return null;
549    org.hl7.fhir.dstu2016may.model.TestScript.SetupActionOperationComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.SetupActionOperationComponent();
550    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
551    if (src.hasResource())
552      tgt.setResourceElement(Code14_30.convertCode(src.getResourceElement()));
553    if (src.hasLabel())
554      tgt.setLabelElement(String14_30.convertString(src.getLabelElement()));
555    if (src.hasDescription())
556      tgt.setDescriptionElement(String14_30.convertString(src.getDescriptionElement()));
557    if (src.hasAccept())
558      tgt.setAcceptElement(convertContentType(src.getAcceptElement()));
559    if (src.hasContentType())
560      tgt.setContentTypeElement(convertContentType(src.getContentTypeElement()));
561    if (src.hasDestination())
562      tgt.setDestinationElement(Integer14_30.convertInteger(src.getDestinationElement()));
563    if (src.hasEncodeRequestUrl())
564      tgt.setEncodeRequestUrlElement(Boolean14_30.convertBoolean(src.getEncodeRequestUrlElement()));
565    if (src.hasOrigin())
566      tgt.setOriginElement(Integer14_30.convertInteger(src.getOriginElement()));
567    if (src.hasParams())
568      tgt.setParamsElement(String14_30.convertString(src.getParamsElement()));
569    for (org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent t : src.getRequestHeader())
570      tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t));
571    if (src.hasResponseId())
572      tgt.setResponseIdElement(Id14_30.convertId(src.getResponseIdElement()));
573    if (src.hasSourceId())
574      tgt.setSourceIdElement(Id14_30.convertId(src.getSourceIdElement()));
575    if (src.hasTargetId())
576      tgt.setTargetId(src.getTargetId());
577    if (src.hasUrl())
578      tgt.setUrlElement(String14_30.convertString(src.getUrlElement()));
579    return tgt;
580  }
581
582  public static org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent convertSetupActionOperationRequestHeaderComponent(org.hl7.fhir.dstu2016may.model.TestScript.SetupActionOperationRequestHeaderComponent src) throws FHIRException {
583    if (src == null || src.isEmpty())
584      return null;
585    org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent();
586    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
587    if (src.hasFieldElement())
588      tgt.setFieldElement(String14_30.convertString(src.getFieldElement()));
589    if (src.hasValueElement())
590      tgt.setValueElement(String14_30.convertString(src.getValueElement()));
591    return tgt;
592  }
593
594  public static org.hl7.fhir.dstu2016may.model.TestScript.SetupActionOperationRequestHeaderComponent convertSetupActionOperationRequestHeaderComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent src) throws FHIRException {
595    if (src == null || src.isEmpty())
596      return null;
597    org.hl7.fhir.dstu2016may.model.TestScript.SetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.SetupActionOperationRequestHeaderComponent();
598    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
599    if (src.hasFieldElement())
600      tgt.setFieldElement(String14_30.convertString(src.getFieldElement()));
601    if (src.hasValueElement())
602      tgt.setValueElement(String14_30.convertString(src.getValueElement()));
603    return tgt;
604  }
605
606  public static org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent convertTeardownActionComponent(org.hl7.fhir.dstu2016may.model.TestScript.TeardownActionComponent src) throws FHIRException {
607    if (src == null || src.isEmpty())
608      return null;
609    org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent();
610    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
611    if (src.hasOperation())
612      tgt.setOperation(convertSetupActionOperationComponent(src.getOperation()));
613    return tgt;
614  }
615
616  public static org.hl7.fhir.dstu2016may.model.TestScript.TeardownActionComponent convertTeardownActionComponent(org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent src) throws FHIRException {
617    if (src == null || src.isEmpty())
618      return null;
619    org.hl7.fhir.dstu2016may.model.TestScript.TeardownActionComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TeardownActionComponent();
620    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
621    if (src.hasOperation())
622      tgt.setOperation(convertSetupActionOperationComponent(src.getOperation()));
623    return tgt;
624  }
625
626  public static org.hl7.fhir.dstu2016may.model.TestScript.TestActionComponent convertTestActionComponent(org.hl7.fhir.dstu3.model.TestScript.TestActionComponent src) throws FHIRException {
627    if (src == null || src.isEmpty())
628      return null;
629    org.hl7.fhir.dstu2016may.model.TestScript.TestActionComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestActionComponent();
630    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
631    if (src.hasOperation())
632      tgt.setOperation(convertSetupActionOperationComponent(src.getOperation()));
633    if (src.hasAssert())
634      tgt.setAssert(convertSetupActionAssertComponent(src.getAssert()));
635    return tgt;
636  }
637
638  public static org.hl7.fhir.dstu3.model.TestScript.TestActionComponent convertTestActionComponent(org.hl7.fhir.dstu2016may.model.TestScript.TestActionComponent src) throws FHIRException {
639    if (src == null || src.isEmpty())
640      return null;
641    org.hl7.fhir.dstu3.model.TestScript.TestActionComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestActionComponent();
642    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
643    if (src.hasOperation())
644      tgt.setOperation(convertSetupActionOperationComponent(src.getOperation()));
645    if (src.hasAssert())
646      tgt.setAssert(convertSetupActionAssertComponent(src.getAssert()));
647    return tgt;
648  }
649
650  public static org.hl7.fhir.dstu3.model.TestScript convertTestScript(org.hl7.fhir.dstu2016may.model.TestScript src) throws FHIRException {
651    if (src == null || src.isEmpty())
652      return null;
653    org.hl7.fhir.dstu3.model.TestScript tgt = new org.hl7.fhir.dstu3.model.TestScript();
654    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyDomainResource(src, tgt);
655    if (src.hasUrlElement())
656      tgt.setUrlElement(Uri14_30.convertUri(src.getUrlElement()));
657    if (src.hasVersion())
658      tgt.setVersionElement(String14_30.convertString(src.getVersionElement()));
659    if (src.hasNameElement())
660      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
661    if (src.hasStatus())
662      tgt.setStatusElement(Enumerations14_30.convertConformanceResourceStatus(src.getStatusElement()));
663    if (src.hasIdentifier())
664      tgt.setIdentifier(Identifier14_30.convertIdentifier(src.getIdentifier()));
665    if (src.hasExperimental())
666      tgt.setExperimentalElement(Boolean14_30.convertBoolean(src.getExperimentalElement()));
667    if (src.hasPublisher())
668      tgt.setPublisherElement(String14_30.convertString(src.getPublisherElement()));
669    for (org.hl7.fhir.dstu2016may.model.TestScript.TestScriptContactComponent t : src.getContact())
670      tgt.addContact(convertTestScriptContactComponent(t));
671    if (src.hasDate())
672      tgt.setDateElement(DateTime14_30.convertDateTime(src.getDateElement()));
673    if (src.hasDescription())
674      tgt.setDescription(src.getDescription());
675    for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext())
676      if (VersionConvertor_14_30.isJurisdiction(t))
677        tgt.addJurisdiction(CodeableConcept14_30.convertCodeableConcept(t));
678      else
679        tgt.addUseContext(CodeableConcept14_30.convertCodeableConceptToUsageContext(t));
680    if (src.hasRequirements())
681      tgt.setPurpose(src.getRequirements());
682    if (src.hasCopyright())
683      tgt.setCopyright(src.getCopyright());
684    for (org.hl7.fhir.dstu2016may.model.TestScript.TestScriptOriginComponent t : src.getOrigin())
685      tgt.addOrigin(convertTestScriptOriginComponent(t));
686    for (org.hl7.fhir.dstu2016may.model.TestScript.TestScriptDestinationComponent t : src.getDestination())
687      tgt.addDestination(convertTestScriptDestinationComponent(t));
688    if (src.hasMetadata())
689      tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata()));
690    for (org.hl7.fhir.dstu2016may.model.TestScript.TestScriptFixtureComponent t : src.getFixture())
691      tgt.addFixture(convertTestScriptFixtureComponent(t));
692    for (org.hl7.fhir.dstu2016may.model.Reference t : src.getProfile())
693      tgt.addProfile(Reference14_30.convertReference(t));
694    for (org.hl7.fhir.dstu2016may.model.TestScript.TestScriptVariableComponent t : src.getVariable())
695      tgt.addVariable(convertTestScriptVariableComponent(t));
696    for (org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRuleComponent t : src.getRule())
697      tgt.addRule(convertTestScriptRuleComponent(t));
698    for (org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRulesetComponent t : src.getRuleset())
699      tgt.addRuleset(convertTestScriptRulesetComponent(t));
700    if (src.hasSetup())
701      tgt.setSetup(convertTestScriptSetupComponent(src.getSetup()));
702    for (org.hl7.fhir.dstu2016may.model.TestScript.TestScriptTestComponent t : src.getTest())
703      tgt.addTest(convertTestScriptTestComponent(t));
704    if (src.hasTeardown())
705      tgt.setTeardown(convertTestScriptTeardownComponent(src.getTeardown()));
706    return tgt;
707  }
708
709  public static org.hl7.fhir.dstu2016may.model.TestScript convertTestScript(org.hl7.fhir.dstu3.model.TestScript src) throws FHIRException {
710    if (src == null || src.isEmpty())
711      return null;
712    org.hl7.fhir.dstu2016may.model.TestScript tgt = new org.hl7.fhir.dstu2016may.model.TestScript();
713    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyDomainResource(src, tgt);
714    if (src.hasUrlElement())
715      tgt.setUrlElement(Uri14_30.convertUri(src.getUrlElement()));
716    if (src.hasVersion())
717      tgt.setVersionElement(String14_30.convertString(src.getVersionElement()));
718    if (src.hasNameElement())
719      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
720    if (src.hasStatus())
721      tgt.setStatusElement(Enumerations14_30.convertConformanceResourceStatus(src.getStatusElement()));
722    if (src.hasIdentifier())
723      tgt.setIdentifier(Identifier14_30.convertIdentifier(src.getIdentifier()));
724    if (src.hasExperimental())
725      tgt.setExperimentalElement(Boolean14_30.convertBoolean(src.getExperimentalElement()));
726    if (src.hasPublisher())
727      tgt.setPublisherElement(String14_30.convertString(src.getPublisherElement()));
728    for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact())
729      tgt.addContact(convertTestScriptContactComponent(t));
730    if (src.hasDate())
731      tgt.setDateElement(DateTime14_30.convertDateTime(src.getDateElement()));
732    if (src.hasDescription())
733      tgt.setDescription(src.getDescription());
734    for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext())
735      if (t.hasValueCodeableConcept())
736        tgt.addUseContext(CodeableConcept14_30.convertCodeableConcept(t.getValueCodeableConcept()));
737    for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction())
738      tgt.addUseContext(CodeableConcept14_30.convertCodeableConcept(t));
739    if (src.hasPurpose())
740      tgt.setRequirements(src.getPurpose());
741    if (src.hasCopyright())
742      tgt.setCopyright(src.getCopyright());
743    for (org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent t : src.getOrigin())
744      tgt.addOrigin(convertTestScriptOriginComponent(t));
745    for (org.hl7.fhir.dstu3.model.TestScript.TestScriptDestinationComponent t : src.getDestination())
746      tgt.addDestination(convertTestScriptDestinationComponent(t));
747    if (src.hasMetadata())
748      tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata()));
749    for (org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent t : src.getFixture())
750      tgt.addFixture(convertTestScriptFixtureComponent(t));
751    for (org.hl7.fhir.dstu3.model.Reference t : src.getProfile()) tgt.addProfile(Reference14_30.convertReference(t));
752    for (org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent t : src.getVariable())
753      tgt.addVariable(convertTestScriptVariableComponent(t));
754    for (org.hl7.fhir.dstu3.model.TestScript.TestScriptRuleComponent t : src.getRule())
755      tgt.addRule(convertTestScriptRuleComponent(t));
756    for (org.hl7.fhir.dstu3.model.TestScript.TestScriptRulesetComponent t : src.getRuleset())
757      tgt.addRuleset(convertTestScriptRulesetComponent(t));
758    if (src.hasSetup())
759      tgt.setSetup(convertTestScriptSetupComponent(src.getSetup()));
760    for (org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent t : src.getTest())
761      tgt.addTest(convertTestScriptTestComponent(t));
762    if (src.hasTeardown())
763      tgt.setTeardown(convertTestScriptTeardownComponent(src.getTeardown()));
764    return tgt;
765  }
766
767  public static org.hl7.fhir.dstu2016may.model.TestScript.TestScriptContactComponent convertTestScriptContactComponent(org.hl7.fhir.dstu3.model.ContactDetail src) throws FHIRException {
768    if (src == null || src.isEmpty())
769      return null;
770    org.hl7.fhir.dstu2016may.model.TestScript.TestScriptContactComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptContactComponent();
771    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
772    if (src.hasName())
773      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
774    for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())
775      tgt.addTelecom(ContactPoint14_30.convertContactPoint(t));
776    return tgt;
777  }
778
779  public static org.hl7.fhir.dstu3.model.ContactDetail convertTestScriptContactComponent(org.hl7.fhir.dstu2016may.model.TestScript.TestScriptContactComponent src) throws FHIRException {
780    if (src == null || src.isEmpty())
781      return null;
782    org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail();
783    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
784    if (src.hasName())
785      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
786    for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom())
787      tgt.addTelecom(ContactPoint14_30.convertContactPoint(t));
788    return tgt;
789  }
790
791  public static org.hl7.fhir.dstu2016may.model.TestScript.TestScriptDestinationComponent convertTestScriptDestinationComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptDestinationComponent src) throws FHIRException {
792    if (src == null || src.isEmpty())
793      return null;
794    org.hl7.fhir.dstu2016may.model.TestScript.TestScriptDestinationComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptDestinationComponent();
795    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
796    if (src.hasIndexElement())
797      tgt.setIndexElement(Integer14_30.convertInteger(src.getIndexElement()));
798    if (src.hasProfile())
799      tgt.setProfile(Code14_30.convertCoding(src.getProfile()));
800    return tgt;
801  }
802
803  public static org.hl7.fhir.dstu3.model.TestScript.TestScriptDestinationComponent convertTestScriptDestinationComponent(org.hl7.fhir.dstu2016may.model.TestScript.TestScriptDestinationComponent src) throws FHIRException {
804    if (src == null || src.isEmpty())
805      return null;
806    org.hl7.fhir.dstu3.model.TestScript.TestScriptDestinationComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptDestinationComponent();
807    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
808    if (src.hasIndexElement())
809      tgt.setIndexElement(Integer14_30.convertInteger(src.getIndexElement()));
810    if (src.hasProfile())
811      tgt.setProfile(Code14_30.convertCoding(src.getProfile()));
812    return tgt;
813  }
814
815  public static org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent convertTestScriptFixtureComponent(org.hl7.fhir.dstu2016may.model.TestScript.TestScriptFixtureComponent src) throws FHIRException {
816    if (src == null || src.isEmpty())
817      return null;
818    org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent();
819    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
820    if (src.hasAutocreate())
821      tgt.setAutocreateElement(Boolean14_30.convertBoolean(src.getAutocreateElement()));
822    if (src.hasAutodelete())
823      tgt.setAutodeleteElement(Boolean14_30.convertBoolean(src.getAutodeleteElement()));
824    if (src.hasResource())
825      tgt.setResource(Reference14_30.convertReference(src.getResource()));
826    return tgt;
827  }
828
829  public static org.hl7.fhir.dstu2016may.model.TestScript.TestScriptFixtureComponent convertTestScriptFixtureComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent src) throws FHIRException {
830    if (src == null || src.isEmpty())
831      return null;
832    org.hl7.fhir.dstu2016may.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptFixtureComponent();
833    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
834    if (src.hasAutocreate())
835      tgt.setAutocreateElement(Boolean14_30.convertBoolean(src.getAutocreateElement()));
836    if (src.hasAutodelete())
837      tgt.setAutodeleteElement(Boolean14_30.convertBoolean(src.getAutodeleteElement()));
838    if (src.hasResource())
839      tgt.setResource(Reference14_30.convertReference(src.getResource()));
840    return tgt;
841  }
842
843  public static org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent convertTestScriptMetadataCapabilityComponent(org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataCapabilityComponent src) throws FHIRException {
844    if (src == null || src.isEmpty())
845      return null;
846    org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent();
847    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
848    if (src.hasRequired())
849      tgt.setRequiredElement(Boolean14_30.convertBoolean(src.getRequiredElement()));
850    if (src.hasValidated())
851      tgt.setValidatedElement(Boolean14_30.convertBoolean(src.getValidatedElement()));
852    if (src.hasDescription())
853      tgt.setDescriptionElement(String14_30.convertString(src.getDescriptionElement()));
854    for (org.hl7.fhir.dstu2016may.model.IntegerType t : src.getOrigin()) tgt.addOrigin(t.getValue());
855    if (src.hasDestination())
856      tgt.setDestinationElement(Integer14_30.convertInteger(src.getDestinationElement()));
857    for (org.hl7.fhir.dstu2016may.model.UriType t : src.getLink()) tgt.addLink(t.getValue());
858    if (src.hasConformance())
859      tgt.setCapabilities(Reference14_30.convertReference(src.getConformance()));
860    return tgt;
861  }
862
863  public static org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataCapabilityComponent convertTestScriptMetadataCapabilityComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent src) throws FHIRException {
864    if (src == null || src.isEmpty())
865      return null;
866    org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataCapabilityComponent();
867    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
868    if (src.hasRequired())
869      tgt.setRequiredElement(Boolean14_30.convertBoolean(src.getRequiredElement()));
870    if (src.hasValidated())
871      tgt.setValidatedElement(Boolean14_30.convertBoolean(src.getValidatedElement()));
872    if (src.hasDescription())
873      tgt.setDescriptionElement(String14_30.convertString(src.getDescriptionElement()));
874    for (org.hl7.fhir.dstu3.model.IntegerType t : src.getOrigin()) tgt.addOrigin(t.getValue());
875    if (src.hasDestination())
876      tgt.setDestinationElement(Integer14_30.convertInteger(src.getDestinationElement()));
877    for (org.hl7.fhir.dstu3.model.UriType t : src.getLink()) tgt.addLink(t.getValue());
878    if (src.hasCapabilities())
879      tgt.setConformance(Reference14_30.convertReference(src.getCapabilities()));
880    return tgt;
881  }
882
883  public static org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataComponent convertTestScriptMetadataComponent(org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataComponent src) throws FHIRException {
884    if (src == null || src.isEmpty())
885      return null;
886    org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataComponent();
887    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
888    for (org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataLinkComponent t : src.getLink())
889      tgt.addLink(convertTestScriptMetadataLinkComponent(t));
890    for (org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataCapabilityComponent t : src.getCapability())
891      tgt.addCapability(convertTestScriptMetadataCapabilityComponent(t));
892    return tgt;
893  }
894
895  public static org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataComponent convertTestScriptMetadataComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataComponent src) throws FHIRException {
896    if (src == null || src.isEmpty())
897      return null;
898    org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataComponent();
899    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
900    for (org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataLinkComponent t : src.getLink())
901      tgt.addLink(convertTestScriptMetadataLinkComponent(t));
902    for (org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataCapabilityComponent t : src.getCapability())
903      tgt.addCapability(convertTestScriptMetadataCapabilityComponent(t));
904    return tgt;
905  }
906
907  public static org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataLinkComponent convertTestScriptMetadataLinkComponent(org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataLinkComponent src) throws FHIRException {
908    if (src == null || src.isEmpty())
909      return null;
910    org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataLinkComponent();
911    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
912    if (src.hasUrlElement())
913      tgt.setUrlElement(Uri14_30.convertUri(src.getUrlElement()));
914    if (src.hasDescription())
915      tgt.setDescriptionElement(String14_30.convertString(src.getDescriptionElement()));
916    return tgt;
917  }
918
919  public static org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataLinkComponent convertTestScriptMetadataLinkComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataLinkComponent src) throws FHIRException {
920    if (src == null || src.isEmpty())
921      return null;
922    org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptMetadataLinkComponent();
923    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
924    if (src.hasUrlElement())
925      tgt.setUrlElement(Uri14_30.convertUri(src.getUrlElement()));
926    if (src.hasDescription())
927      tgt.setDescriptionElement(String14_30.convertString(src.getDescriptionElement()));
928    return tgt;
929  }
930
931  public static org.hl7.fhir.dstu2016may.model.TestScript.TestScriptOriginComponent convertTestScriptOriginComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent src) throws FHIRException {
932    if (src == null || src.isEmpty())
933      return null;
934    org.hl7.fhir.dstu2016may.model.TestScript.TestScriptOriginComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptOriginComponent();
935    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
936    if (src.hasIndexElement())
937      tgt.setIndexElement(Integer14_30.convertInteger(src.getIndexElement()));
938    if (src.hasProfile())
939      tgt.setProfile(Code14_30.convertCoding(src.getProfile()));
940    return tgt;
941  }
942
943  public static org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent convertTestScriptOriginComponent(org.hl7.fhir.dstu2016may.model.TestScript.TestScriptOriginComponent src) throws FHIRException {
944    if (src == null || src.isEmpty())
945      return null;
946    org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent();
947    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
948    if (src.hasIndexElement())
949      tgt.setIndexElement(Integer14_30.convertInteger(src.getIndexElement()));
950    if (src.hasProfile())
951      tgt.setProfile(Code14_30.convertCoding(src.getProfile()));
952    return tgt;
953  }
954
955  public static org.hl7.fhir.dstu3.model.TestScript.TestScriptRuleComponent convertTestScriptRuleComponent(org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRuleComponent src) throws FHIRException {
956    if (src == null || src.isEmpty())
957      return null;
958    org.hl7.fhir.dstu3.model.TestScript.TestScriptRuleComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptRuleComponent();
959    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
960    if (src.hasResource())
961      tgt.setResource(Reference14_30.convertReference(src.getResource()));
962    for (org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRuleParamComponent t : src.getParam())
963      tgt.addParam(convertTestScriptRuleParamComponent(t));
964    return tgt;
965  }
966
967  public static org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRuleComponent convertTestScriptRuleComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptRuleComponent src) throws FHIRException {
968    if (src == null || src.isEmpty())
969      return null;
970    org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRuleComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRuleComponent();
971    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
972    if (src.hasResource())
973      tgt.setResource(Reference14_30.convertReference(src.getResource()));
974    for (org.hl7.fhir.dstu3.model.TestScript.RuleParamComponent t : src.getParam())
975      tgt.addParam(convertTestScriptRuleParamComponent(t));
976    return tgt;
977  }
978
979  public static org.hl7.fhir.dstu3.model.TestScript.RuleParamComponent convertTestScriptRuleParamComponent(org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRuleParamComponent src) throws FHIRException {
980    if (src == null || src.isEmpty())
981      return null;
982    org.hl7.fhir.dstu3.model.TestScript.RuleParamComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.RuleParamComponent();
983    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
984    if (src.hasNameElement())
985      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
986    if (src.hasValue())
987      tgt.setValueElement(String14_30.convertString(src.getValueElement()));
988    return tgt;
989  }
990
991  public static org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRuleParamComponent convertTestScriptRuleParamComponent(org.hl7.fhir.dstu3.model.TestScript.RuleParamComponent src) throws FHIRException {
992    if (src == null || src.isEmpty())
993      return null;
994    org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRuleParamComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRuleParamComponent();
995    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
996    if (src.hasNameElement())
997      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
998    if (src.hasValue())
999      tgt.setValueElement(String14_30.convertString(src.getValueElement()));
1000    return tgt;
1001  }
1002
1003  public static org.hl7.fhir.dstu3.model.TestScript.TestScriptRulesetComponent convertTestScriptRulesetComponent(org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRulesetComponent src) throws FHIRException {
1004    if (src == null || src.isEmpty())
1005      return null;
1006    org.hl7.fhir.dstu3.model.TestScript.TestScriptRulesetComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptRulesetComponent();
1007    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
1008    if (src.hasResource())
1009      tgt.setResource(Reference14_30.convertReference(src.getResource()));
1010    for (org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRulesetRuleComponent t : src.getRule())
1011      tgt.addRule(convertTestScriptRulesetRuleComponent(t));
1012    return tgt;
1013  }
1014
1015  public static org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRulesetComponent convertTestScriptRulesetComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptRulesetComponent src) throws FHIRException {
1016    if (src == null || src.isEmpty())
1017      return null;
1018    org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRulesetComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRulesetComponent();
1019    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
1020    if (src.hasResource())
1021      tgt.setResource(Reference14_30.convertReference(src.getResource()));
1022    for (org.hl7.fhir.dstu3.model.TestScript.RulesetRuleComponent t : src.getRule())
1023      tgt.addRule(convertTestScriptRulesetRuleComponent(t));
1024    return tgt;
1025  }
1026
1027  public static org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRulesetRuleComponent convertTestScriptRulesetRuleComponent(org.hl7.fhir.dstu3.model.TestScript.RulesetRuleComponent src) throws FHIRException {
1028    if (src == null || src.isEmpty())
1029      return null;
1030    org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRulesetRuleComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRulesetRuleComponent();
1031    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
1032    for (org.hl7.fhir.dstu3.model.TestScript.RulesetRuleParamComponent t : src.getParam())
1033      tgt.addParam(convertTestScriptRulesetRuleParamComponent(t));
1034    return tgt;
1035  }
1036
1037  public static org.hl7.fhir.dstu3.model.TestScript.RulesetRuleComponent convertTestScriptRulesetRuleComponent(org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRulesetRuleComponent src) throws FHIRException {
1038    if (src == null || src.isEmpty())
1039      return null;
1040    org.hl7.fhir.dstu3.model.TestScript.RulesetRuleComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.RulesetRuleComponent();
1041    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
1042    for (org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRulesetRuleParamComponent t : src.getParam())
1043      tgt.addParam(convertTestScriptRulesetRuleParamComponent(t));
1044    return tgt;
1045  }
1046
1047  public static org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRulesetRuleParamComponent convertTestScriptRulesetRuleParamComponent(org.hl7.fhir.dstu3.model.TestScript.RulesetRuleParamComponent src) throws FHIRException {
1048    if (src == null || src.isEmpty())
1049      return null;
1050    org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRulesetRuleParamComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRulesetRuleParamComponent();
1051    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
1052    if (src.hasNameElement())
1053      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
1054    if (src.hasValue())
1055      tgt.setValueElement(String14_30.convertString(src.getValueElement()));
1056    return tgt;
1057  }
1058
1059  public static org.hl7.fhir.dstu3.model.TestScript.RulesetRuleParamComponent convertTestScriptRulesetRuleParamComponent(org.hl7.fhir.dstu2016may.model.TestScript.TestScriptRulesetRuleParamComponent src) throws FHIRException {
1060    if (src == null || src.isEmpty())
1061      return null;
1062    org.hl7.fhir.dstu3.model.TestScript.RulesetRuleParamComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.RulesetRuleParamComponent();
1063    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
1064    if (src.hasNameElement())
1065      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
1066    if (src.hasValue())
1067      tgt.setValueElement(String14_30.convertString(src.getValueElement()));
1068    return tgt;
1069  }
1070
1071  public static org.hl7.fhir.dstu2016may.model.TestScript.TestScriptSetupComponent convertTestScriptSetupComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptSetupComponent src) throws FHIRException {
1072    if (src == null || src.isEmpty())
1073      return null;
1074    org.hl7.fhir.dstu2016may.model.TestScript.TestScriptSetupComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptSetupComponent();
1075    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
1076    for (org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent t : src.getAction())
1077      tgt.addAction(convertSetupActionComponent(t));
1078    return tgt;
1079  }
1080
1081  public static org.hl7.fhir.dstu3.model.TestScript.TestScriptSetupComponent convertTestScriptSetupComponent(org.hl7.fhir.dstu2016may.model.TestScript.TestScriptSetupComponent src) throws FHIRException {
1082    if (src == null || src.isEmpty())
1083      return null;
1084    org.hl7.fhir.dstu3.model.TestScript.TestScriptSetupComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptSetupComponent();
1085    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
1086    for (org.hl7.fhir.dstu2016may.model.TestScript.SetupActionComponent t : src.getAction())
1087      tgt.addAction(convertSetupActionComponent(t));
1088    return tgt;
1089  }
1090
1091  public static org.hl7.fhir.dstu2016may.model.TestScript.TestScriptTeardownComponent convertTestScriptTeardownComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptTeardownComponent src) throws FHIRException {
1092    if (src == null || src.isEmpty())
1093      return null;
1094    org.hl7.fhir.dstu2016may.model.TestScript.TestScriptTeardownComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptTeardownComponent();
1095    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
1096    for (org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent t : src.getAction())
1097      tgt.addAction(convertTeardownActionComponent(t));
1098    return tgt;
1099  }
1100
1101  public static org.hl7.fhir.dstu3.model.TestScript.TestScriptTeardownComponent convertTestScriptTeardownComponent(org.hl7.fhir.dstu2016may.model.TestScript.TestScriptTeardownComponent src) throws FHIRException {
1102    if (src == null || src.isEmpty())
1103      return null;
1104    org.hl7.fhir.dstu3.model.TestScript.TestScriptTeardownComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptTeardownComponent();
1105    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
1106    for (org.hl7.fhir.dstu2016may.model.TestScript.TeardownActionComponent t : src.getAction())
1107      tgt.addAction(convertTeardownActionComponent(t));
1108    return tgt;
1109  }
1110
1111  public static org.hl7.fhir.dstu2016may.model.TestScript.TestScriptTestComponent convertTestScriptTestComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent src) throws FHIRException {
1112    if (src == null || src.isEmpty())
1113      return null;
1114    org.hl7.fhir.dstu2016may.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptTestComponent();
1115    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
1116    if (src.hasName())
1117      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
1118    if (src.hasDescription())
1119      tgt.setDescriptionElement(String14_30.convertString(src.getDescriptionElement()));
1120    for (org.hl7.fhir.dstu3.model.TestScript.TestActionComponent t : src.getAction())
1121      tgt.addAction(convertTestActionComponent(t));
1122    return tgt;
1123  }
1124
1125  public static org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent convertTestScriptTestComponent(org.hl7.fhir.dstu2016may.model.TestScript.TestScriptTestComponent src) throws FHIRException {
1126    if (src == null || src.isEmpty())
1127      return null;
1128    org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent();
1129    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
1130    if (src.hasName())
1131      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
1132    if (src.hasDescription())
1133      tgt.setDescriptionElement(String14_30.convertString(src.getDescriptionElement()));
1134    for (org.hl7.fhir.dstu2016may.model.TestScript.TestActionComponent t : src.getAction())
1135      tgt.addAction(convertTestActionComponent(t));
1136    return tgt;
1137  }
1138
1139  public static org.hl7.fhir.dstu2016may.model.TestScript.TestScriptVariableComponent convertTestScriptVariableComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent src) throws FHIRException {
1140    if (src == null || src.isEmpty())
1141      return null;
1142    org.hl7.fhir.dstu2016may.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.dstu2016may.model.TestScript.TestScriptVariableComponent();
1143    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
1144    if (src.hasNameElement())
1145      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
1146    if (src.hasDefaultValue())
1147      tgt.setDefaultValueElement(String14_30.convertString(src.getDefaultValueElement()));
1148    if (src.hasHeaderField())
1149      tgt.setHeaderFieldElement(String14_30.convertString(src.getHeaderFieldElement()));
1150    if (src.hasPath())
1151      tgt.setPathElement(String14_30.convertString(src.getPathElement()));
1152    if (src.hasSourceId())
1153      tgt.setSourceIdElement(Id14_30.convertId(src.getSourceIdElement()));
1154    return tgt;
1155  }
1156
1157  public static org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent convertTestScriptVariableComponent(org.hl7.fhir.dstu2016may.model.TestScript.TestScriptVariableComponent src) throws FHIRException {
1158    if (src == null || src.isEmpty())
1159      return null;
1160    org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent();
1161    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
1162    if (src.hasNameElement())
1163      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
1164    if (src.hasDefaultValue())
1165      tgt.setDefaultValueElement(String14_30.convertString(src.getDefaultValueElement()));
1166    if (src.hasHeaderField())
1167      tgt.setHeaderFieldElement(String14_30.convertString(src.getHeaderFieldElement()));
1168    if (src.hasPath())
1169      tgt.setPathElement(String14_30.convertString(src.getPathElement()));
1170    if (src.hasSourceId())
1171      tgt.setSourceIdElement(Id14_30.convertId(src.getSourceIdElement()));
1172    return tgt;
1173  }
1174}