001package org.hl7.fhir.convertors.conv14_30.resources14_30;
002
003import org.hl7.fhir.convertors.context.ConversionContext14_30;
004import org.hl7.fhir.convertors.conv14_30.VersionConvertor_14_30;
005import org.hl7.fhir.convertors.conv14_30.datatypes14_30.Reference14_30;
006import org.hl7.fhir.convertors.conv14_30.datatypes14_30.complextypes14_30.CodeableConcept14_30;
007import org.hl7.fhir.convertors.conv14_30.datatypes14_30.complextypes14_30.ContactPoint14_30;
008import org.hl7.fhir.convertors.conv14_30.datatypes14_30.primitivetypes14_30.Base64Binary14_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.String14_30;
014import org.hl7.fhir.convertors.conv14_30.datatypes14_30.primitivetypes14_30.UnsignedInt14_30;
015import org.hl7.fhir.convertors.conv14_30.datatypes14_30.primitivetypes14_30.Uri14_30;
016import org.hl7.fhir.dstu2016may.model.Conformance;
017import org.hl7.fhir.dstu3.model.CapabilityStatement;
018import org.hl7.fhir.dstu3.model.Enumeration;
019import org.hl7.fhir.exceptions.FHIRException;
020
021public class Conformance14_30 {
022
023  static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus> convertConditionalDeleteStatus(org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.ConditionalDeleteStatus> src) throws FHIRException {
024      if (src == null || src.isEmpty())
025          return null;
026      Enumeration<CapabilityStatement.ConditionalDeleteStatus> tgt = new Enumeration<>(new CapabilityStatement.ConditionalDeleteStatusEnumFactory());
027      ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
028      if (src.getValue() == null) {
029          tgt.setValue(null);
030      } else {
031          switch (src.getValue()) {
032              case NOTSUPPORTED:
033                  tgt.setValue(CapabilityStatement.ConditionalDeleteStatus.NOTSUPPORTED);
034                  break;
035              case SINGLE:
036                  tgt.setValue(CapabilityStatement.ConditionalDeleteStatus.SINGLE);
037                  break;
038              case MULTIPLE:
039                  tgt.setValue(CapabilityStatement.ConditionalDeleteStatus.MULTIPLE);
040                  break;
041              default:
042                  tgt.setValue(CapabilityStatement.ConditionalDeleteStatus.NULL);
043                  break;
044          }
045      }
046      return tgt;
047  }
048
049  static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.ConditionalDeleteStatus> convertConditionalDeleteStatus(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus> src) throws FHIRException {
050      if (src == null || src.isEmpty())
051          return null;
052      org.hl7.fhir.dstu2016may.model.Enumeration<Conformance.ConditionalDeleteStatus> tgt = new org.hl7.fhir.dstu2016may.model.Enumeration<>(new Conformance.ConditionalDeleteStatusEnumFactory());
053      ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
054      if (src.getValue() == null) {
055          tgt.setValue(null);
056      } else {
057          switch (src.getValue()) {
058              case NOTSUPPORTED:
059                  tgt.setValue(Conformance.ConditionalDeleteStatus.NOTSUPPORTED);
060                  break;
061              case SINGLE:
062                  tgt.setValue(Conformance.ConditionalDeleteStatus.SINGLE);
063                  break;
064              case MULTIPLE:
065                  tgt.setValue(Conformance.ConditionalDeleteStatus.MULTIPLE);
066                  break;
067              default:
068                  tgt.setValue(Conformance.ConditionalDeleteStatus.NULL);
069                  break;
070          }
071      }
072      return tgt;
073  }
074
075  public static org.hl7.fhir.dstu2016may.model.Conformance convertConformance(org.hl7.fhir.dstu3.model.CapabilityStatement src) throws FHIRException {
076    if (src == null || src.isEmpty())
077      return null;
078    org.hl7.fhir.dstu2016may.model.Conformance tgt = new org.hl7.fhir.dstu2016may.model.Conformance();
079    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyDomainResource(src, tgt);
080    if (src.hasUrl())
081      tgt.setUrlElement(Uri14_30.convertUri(src.getUrlElement()));
082    if (src.hasVersion())
083      tgt.setVersionElement(String14_30.convertString(src.getVersionElement()));
084    if (src.hasName())
085      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
086    if (src.hasStatus())
087      tgt.setStatusElement(Enumerations14_30.convertConformanceResourceStatus(src.getStatusElement()));
088    if (src.hasExperimental())
089      tgt.setExperimentalElement(Boolean14_30.convertBoolean(src.getExperimentalElement()));
090    if (src.hasDate())
091      tgt.setDateElement(DateTime14_30.convertDateTime(src.getDateElement()));
092    if (src.hasPublisher())
093      tgt.setPublisherElement(String14_30.convertString(src.getPublisherElement()));
094    for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact())
095      tgt.addContact(convertConformanceContactComponent(t));
096    if (src.hasDescription())
097      tgt.setDescription(src.getDescription());
098    for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext())
099      if (t.hasValueCodeableConcept())
100        tgt.addUseContext(CodeableConcept14_30.convertCodeableConcept(t.getValueCodeableConcept()));
101    for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction())
102      tgt.addUseContext(CodeableConcept14_30.convertCodeableConcept(t));
103    if (src.hasPurpose())
104      tgt.setRequirements(src.getPurpose());
105    if (src.hasCopyright())
106      tgt.setCopyright(src.getCopyright());
107    if (src.hasKind())
108      tgt.setKindElement(convertConformanceStatementKind(src.getKindElement()));
109    if (src.hasSoftware())
110      tgt.setSoftware(convertConformanceSoftwareComponent(src.getSoftware()));
111    if (src.hasImplementation())
112      tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation()));
113    if (src.hasFhirVersionElement())
114      tgt.setFhirVersionElement(Id14_30.convertId(src.getFhirVersionElement()));
115    if (src.hasAcceptUnknown())
116      tgt.setAcceptUnknownElement(convertUnknownContentCode(src.getAcceptUnknownElement()));
117    for (org.hl7.fhir.dstu3.model.CodeType t : src.getFormat()) tgt.addFormat(t.getValue());
118    for (org.hl7.fhir.dstu3.model.Reference t : src.getProfile()) tgt.addProfile(Reference14_30.convertReference(t));
119    for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent t : src.getRest())
120      tgt.addRest(convertConformanceRestComponent(t));
121    for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent t : src.getMessaging())
122      tgt.addMessaging(convertConformanceMessagingComponent(t));
123    for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent t : src.getDocument())
124      tgt.addDocument(convertConformanceDocumentComponent(t));
125    return tgt;
126  }
127
128  public static org.hl7.fhir.dstu3.model.CapabilityStatement convertConformance(org.hl7.fhir.dstu2016may.model.Conformance src) throws FHIRException {
129    if (src == null || src.isEmpty())
130      return null;
131    org.hl7.fhir.dstu3.model.CapabilityStatement tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement();
132    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyDomainResource(src, tgt);
133    if (src.hasUrl())
134      tgt.setUrlElement(Uri14_30.convertUri(src.getUrlElement()));
135    if (src.hasVersion())
136      tgt.setVersionElement(String14_30.convertString(src.getVersionElement()));
137    if (src.hasName())
138      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
139    if (src.hasStatus())
140      tgt.setStatusElement(Enumerations14_30.convertConformanceResourceStatus(src.getStatusElement()));
141    if (src.hasExperimental())
142      tgt.setExperimentalElement(Boolean14_30.convertBoolean(src.getExperimentalElement()));
143    if (src.hasDate())
144      tgt.setDateElement(DateTime14_30.convertDateTime(src.getDateElement()));
145    if (src.hasPublisher())
146      tgt.setPublisherElement(String14_30.convertString(src.getPublisherElement()));
147    for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceContactComponent t : src.getContact())
148      tgt.addContact(convertConformanceContactComponent(t));
149    if (src.hasDescription())
150      tgt.setDescription(src.getDescription());
151    for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getUseContext())
152      if (VersionConvertor_14_30.isJurisdiction(t))
153        tgt.addJurisdiction(CodeableConcept14_30.convertCodeableConcept(t));
154      else
155        tgt.addUseContext(CodeableConcept14_30.convertCodeableConceptToUsageContext(t));
156    if (src.hasRequirements())
157      tgt.setPurpose(src.getRequirements());
158    if (src.hasCopyright())
159      tgt.setCopyright(src.getCopyright());
160    if (src.hasKind())
161      tgt.setKindElement(convertConformanceStatementKind(src.getKindElement()));
162    if (src.hasSoftware())
163      tgt.setSoftware(convertConformanceSoftwareComponent(src.getSoftware()));
164    if (src.hasImplementation())
165      tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation()));
166    if (src.hasFhirVersionElement())
167      tgt.setFhirVersionElement(Id14_30.convertId(src.getFhirVersionElement()));
168    if (src.hasAcceptUnknown())
169      tgt.setAcceptUnknownElement(convertUnknownContentCode(src.getAcceptUnknownElement()));
170    for (org.hl7.fhir.dstu2016may.model.CodeType t : src.getFormat()) tgt.addFormat(t.getValue());
171    for (org.hl7.fhir.dstu2016may.model.Reference t : src.getProfile())
172      tgt.addProfile(Reference14_30.convertReference(t));
173    for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestComponent t : src.getRest())
174      tgt.addRest(convertConformanceRestComponent(t));
175    for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingComponent t : src.getMessaging())
176      tgt.addMessaging(convertConformanceMessagingComponent(t));
177    for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceDocumentComponent t : src.getDocument())
178      tgt.addDocument(convertConformanceDocumentComponent(t));
179    return tgt;
180  }
181
182  public static org.hl7.fhir.dstu3.model.ContactDetail convertConformanceContactComponent(org.hl7.fhir.dstu2016may.model.Conformance.ConformanceContactComponent src) throws FHIRException {
183    if (src == null || src.isEmpty())
184      return null;
185    org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail();
186    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
187    if (src.hasName())
188      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
189    for (org.hl7.fhir.dstu2016may.model.ContactPoint t : src.getTelecom())
190      tgt.addTelecom(ContactPoint14_30.convertContactPoint(t));
191    return tgt;
192  }
193
194  public static org.hl7.fhir.dstu2016may.model.Conformance.ConformanceContactComponent convertConformanceContactComponent(org.hl7.fhir.dstu3.model.ContactDetail src) throws FHIRException {
195    if (src == null || src.isEmpty())
196      return null;
197    org.hl7.fhir.dstu2016may.model.Conformance.ConformanceContactComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceContactComponent();
198    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
199    if (src.hasName())
200      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
201    for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())
202      tgt.addTelecom(ContactPoint14_30.convertContactPoint(t));
203    return tgt;
204  }
205
206  public static org.hl7.fhir.dstu2016may.model.Conformance.ConformanceDocumentComponent convertConformanceDocumentComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent src) throws FHIRException {
207    if (src == null || src.isEmpty())
208      return null;
209    org.hl7.fhir.dstu2016may.model.Conformance.ConformanceDocumentComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceDocumentComponent();
210    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
211    if (src.hasMode())
212      tgt.setModeElement(convertDocumentMode(src.getModeElement()));
213    if (src.hasDocumentation())
214      tgt.setDocumentationElement(String14_30.convertString(src.getDocumentationElement()));
215    if (src.hasProfile())
216      tgt.setProfile(Reference14_30.convertReference(src.getProfile()));
217    return tgt;
218  }
219
220  public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent convertConformanceDocumentComponent(org.hl7.fhir.dstu2016may.model.Conformance.ConformanceDocumentComponent src) throws FHIRException {
221    if (src == null || src.isEmpty())
222      return null;
223    org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent();
224    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
225    if (src.hasMode())
226      tgt.setModeElement(convertDocumentMode(src.getModeElement()));
227    if (src.hasDocumentation())
228      tgt.setDocumentationElement(String14_30.convertString(src.getDocumentationElement()));
229    if (src.hasProfile())
230      tgt.setProfile(Reference14_30.convertReference(src.getProfile()));
231    return tgt;
232  }
233
234  static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode> convertConformanceEventMode(org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.ConformanceEventMode> src) throws FHIRException {
235      if (src == null || src.isEmpty())
236          return null;
237      Enumeration<CapabilityStatement.EventCapabilityMode> tgt = new Enumeration<>(new CapabilityStatement.EventCapabilityModeEnumFactory());
238      ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
239      if (src.getValue() == null) {
240          tgt.setValue(null);
241      } else {
242          switch (src.getValue()) {
243              case SENDER:
244                  tgt.setValue(CapabilityStatement.EventCapabilityMode.SENDER);
245                  break;
246              case RECEIVER:
247                  tgt.setValue(CapabilityStatement.EventCapabilityMode.RECEIVER);
248                  break;
249              default:
250                  tgt.setValue(CapabilityStatement.EventCapabilityMode.NULL);
251                  break;
252          }
253      }
254      return tgt;
255  }
256
257  static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.ConformanceEventMode> convertConformanceEventMode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode> src) throws FHIRException {
258      if (src == null || src.isEmpty())
259          return null;
260      org.hl7.fhir.dstu2016may.model.Enumeration<Conformance.ConformanceEventMode> tgt = new org.hl7.fhir.dstu2016may.model.Enumeration<>(new Conformance.ConformanceEventModeEnumFactory());
261      ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
262      if (src.getValue() == null) {
263          tgt.setValue(null);
264      } else {
265          switch (src.getValue()) {
266              case SENDER:
267                  tgt.setValue(Conformance.ConformanceEventMode.SENDER);
268                  break;
269              case RECEIVER:
270                  tgt.setValue(Conformance.ConformanceEventMode.RECEIVER);
271                  break;
272              default:
273                  tgt.setValue(Conformance.ConformanceEventMode.NULL);
274                  break;
275          }
276      }
277      return tgt;
278  }
279
280  public static org.hl7.fhir.dstu2016may.model.Conformance.ConformanceImplementationComponent convertConformanceImplementationComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementImplementationComponent src) throws FHIRException {
281    if (src == null || src.isEmpty())
282      return null;
283    org.hl7.fhir.dstu2016may.model.Conformance.ConformanceImplementationComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceImplementationComponent();
284    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
285    if (src.hasDescriptionElement())
286      tgt.setDescriptionElement(String14_30.convertString(src.getDescriptionElement()));
287    if (src.hasUrl())
288      tgt.setUrlElement(Uri14_30.convertUri(src.getUrlElement()));
289    return tgt;
290  }
291
292  public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementImplementationComponent convertConformanceImplementationComponent(org.hl7.fhir.dstu2016may.model.Conformance.ConformanceImplementationComponent src) throws FHIRException {
293    if (src == null || src.isEmpty())
294      return null;
295    org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementImplementationComponent();
296    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
297    if (src.hasDescriptionElement())
298      tgt.setDescriptionElement(String14_30.convertString(src.getDescriptionElement()));
299    if (src.hasUrl())
300      tgt.setUrlElement(Uri14_30.convertUri(src.getUrlElement()));
301    return tgt;
302  }
303
304  public static org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingComponent convertConformanceMessagingComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent src) throws FHIRException {
305    if (src == null || src.isEmpty())
306      return null;
307    org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingComponent();
308    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
309    for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint())
310      tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t));
311    if (src.hasReliableCache())
312      tgt.setReliableCacheElement(UnsignedInt14_30.convertUnsignedInt(src.getReliableCacheElement()));
313    if (src.hasDocumentation())
314      tgt.setDocumentationElement(String14_30.convertString(src.getDocumentationElement()));
315    for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent t : src.getEvent())
316      tgt.addEvent(convertConformanceMessagingEventComponent(t));
317    return tgt;
318  }
319
320  public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent convertConformanceMessagingComponent(org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingComponent src) throws FHIRException {
321    if (src == null || src.isEmpty())
322      return null;
323    org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent();
324    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
325    for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingEndpointComponent t : src.getEndpoint())
326      tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t));
327    if (src.hasReliableCache())
328      tgt.setReliableCacheElement(UnsignedInt14_30.convertUnsignedInt(src.getReliableCacheElement()));
329    if (src.hasDocumentation())
330      tgt.setDocumentationElement(String14_30.convertString(src.getDocumentationElement()));
331    for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingEventComponent t : src.getEvent())
332      tgt.addEvent(convertConformanceMessagingEventComponent(t));
333    return tgt;
334  }
335
336  public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent convertConformanceMessagingEndpointComponent(org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingEndpointComponent src) throws FHIRException {
337    if (src == null || src.isEmpty())
338      return null;
339    org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent();
340    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
341    if (src.hasProtocol())
342      tgt.setProtocol(Code14_30.convertCoding(src.getProtocol()));
343    if (src.hasAddressElement())
344      tgt.setAddressElement(Uri14_30.convertUri(src.getAddressElement()));
345    return tgt;
346  }
347
348  public static org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingEndpointComponent convertConformanceMessagingEndpointComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent src) throws FHIRException {
349    if (src == null || src.isEmpty())
350      return null;
351    org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingEndpointComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingEndpointComponent();
352    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
353    if (src.hasProtocol())
354      tgt.setProtocol(Code14_30.convertCoding(src.getProtocol()));
355    if (src.hasAddressElement())
356      tgt.setAddressElement(Uri14_30.convertUri(src.getAddressElement()));
357    return tgt;
358  }
359
360  public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent convertConformanceMessagingEventComponent(org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingEventComponent src) throws FHIRException {
361    if (src == null || src.isEmpty())
362      return null;
363    org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent();
364    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
365    if (src.hasCode())
366      tgt.setCode(Code14_30.convertCoding(src.getCode()));
367    if (src.hasCategory())
368      tgt.setCategoryElement(convertMessageSignificanceCategory(src.getCategoryElement()));
369    if (src.hasMode())
370      tgt.setModeElement(convertConformanceEventMode(src.getModeElement()));
371    if (src.hasFocusElement())
372      tgt.setFocusElement(Code14_30.convertCode(src.getFocusElement()));
373    if (src.hasRequest())
374      tgt.setRequest(Reference14_30.convertReference(src.getRequest()));
375    if (src.hasResponse())
376      tgt.setResponse(Reference14_30.convertReference(src.getResponse()));
377    if (src.hasDocumentation())
378      tgt.setDocumentationElement(String14_30.convertString(src.getDocumentationElement()));
379    return tgt;
380  }
381
382  public static org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingEventComponent convertConformanceMessagingEventComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent src) throws FHIRException {
383    if (src == null || src.isEmpty())
384      return null;
385    org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingEventComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingEventComponent();
386    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
387    if (src.hasCode())
388      tgt.setCode(Code14_30.convertCoding(src.getCode()));
389    if (src.hasCategory())
390      tgt.setCategoryElement(convertMessageSignificanceCategory(src.getCategoryElement()));
391    if (src.hasMode())
392      tgt.setModeElement(convertConformanceEventMode(src.getModeElement()));
393    if (src.hasFocusElement())
394      tgt.setFocusElement(Code14_30.convertCode(src.getFocusElement()));
395    if (src.hasRequest())
396      tgt.setRequest(Reference14_30.convertReference(src.getRequest()));
397    if (src.hasResponse())
398      tgt.setResponse(Reference14_30.convertReference(src.getResponse()));
399    if (src.hasDocumentation())
400      tgt.setDocumentationElement(String14_30.convertString(src.getDocumentationElement()));
401    return tgt;
402  }
403
404  public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent convertConformanceRestComponent(org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestComponent src) throws FHIRException {
405    if (src == null || src.isEmpty())
406      return null;
407    org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent();
408    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
409    if (src.hasMode())
410      tgt.setModeElement(convertRestfulConformanceMode(src.getModeElement()));
411    if (src.hasDocumentation())
412      tgt.setDocumentationElement(String14_30.convertString(src.getDocumentationElement()));
413    if (src.hasSecurity())
414      tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity()));
415    for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceComponent t : src.getResource())
416      tgt.addResource(convertConformanceRestResourceComponent(t));
417    for (org.hl7.fhir.dstu2016may.model.Conformance.SystemInteractionComponent t : src.getInteraction())
418      tgt.addInteraction(convertSystemInteractionComponent(t));
419    for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceSearchParamComponent t : src.getSearchParam())
420      tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t));
421    for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestOperationComponent t : src.getOperation())
422      tgt.addOperation(convertConformanceRestOperationComponent(t));
423    for (org.hl7.fhir.dstu2016may.model.UriType t : src.getCompartment()) tgt.addCompartment(t.getValue());
424    return tgt;
425  }
426
427  public static org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestComponent convertConformanceRestComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent src) throws FHIRException {
428    if (src == null || src.isEmpty())
429      return null;
430    org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestComponent();
431    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
432    if (src.hasMode())
433      tgt.setModeElement(convertRestfulConformanceMode(src.getModeElement()));
434    if (src.hasDocumentation())
435      tgt.setDocumentationElement(String14_30.convertString(src.getDocumentationElement()));
436    if (src.hasSecurity())
437      tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity()));
438    for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent t : src.getResource())
439      tgt.addResource(convertConformanceRestResourceComponent(t));
440    for (org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent t : src.getInteraction())
441      tgt.addInteraction(convertSystemInteractionComponent(t));
442    for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent t : src.getSearchParam())
443      tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t));
444    for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent t : src.getOperation())
445      tgt.addOperation(convertConformanceRestOperationComponent(t));
446    for (org.hl7.fhir.dstu3.model.UriType t : src.getCompartment()) tgt.addCompartment(t.getValue());
447    return tgt;
448  }
449
450  public static org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestOperationComponent convertConformanceRestOperationComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent src) throws FHIRException {
451    if (src == null || src.isEmpty())
452      return null;
453    org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestOperationComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestOperationComponent();
454    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
455    if (src.hasNameElement())
456      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
457    if (src.hasDefinition())
458      tgt.setDefinition(Reference14_30.convertReference(src.getDefinition()));
459    return tgt;
460  }
461
462  public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent convertConformanceRestOperationComponent(org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestOperationComponent src) throws FHIRException {
463    if (src == null || src.isEmpty())
464      return null;
465    org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent();
466    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
467    if (src.hasNameElement())
468      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
469    if (src.hasDefinition())
470      tgt.setDefinition(Reference14_30.convertReference(src.getDefinition()));
471    return tgt;
472  }
473
474  public static org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceComponent convertConformanceRestResourceComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent src) throws FHIRException {
475    if (src == null || src.isEmpty())
476      return null;
477    org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceComponent();
478    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
479    if (src.hasTypeElement())
480      tgt.setTypeElement(Code14_30.convertCode(src.getTypeElement()));
481    if (src.hasProfile())
482      tgt.setProfile(Reference14_30.convertReference(src.getProfile()));
483    for (org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent t : src.getInteraction())
484      tgt.addInteraction(convertResourceInteractionComponent(t));
485    if (src.hasVersioning())
486      tgt.setVersioningElement(convertResourceVersionPolicy(src.getVersioningElement()));
487    if (src.hasReadHistory())
488      tgt.setReadHistoryElement(Boolean14_30.convertBoolean(src.getReadHistoryElement()));
489    if (src.hasUpdateCreate())
490      tgt.setUpdateCreateElement(Boolean14_30.convertBoolean(src.getUpdateCreateElement()));
491    if (src.hasConditionalCreate())
492      tgt.setConditionalCreateElement(Boolean14_30.convertBoolean(src.getConditionalCreateElement()));
493    if (src.hasConditionalUpdate())
494      tgt.setConditionalUpdateElement(Boolean14_30.convertBoolean(src.getConditionalUpdateElement()));
495    if (src.hasConditionalDelete())
496      tgt.setConditionalDeleteElement(convertConditionalDeleteStatus(src.getConditionalDeleteElement()));
497    for (org.hl7.fhir.dstu3.model.StringType t : src.getSearchInclude()) tgt.addSearchInclude(t.getValue());
498    for (org.hl7.fhir.dstu3.model.StringType t : src.getSearchRevInclude()) tgt.addSearchRevInclude(t.getValue());
499    for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent t : src.getSearchParam())
500      tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t));
501    return tgt;
502  }
503
504  public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent convertConformanceRestResourceComponent(org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceComponent src) throws FHIRException {
505    if (src == null || src.isEmpty())
506      return null;
507    org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent();
508    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
509    if (src.hasTypeElement())
510      tgt.setTypeElement(Code14_30.convertCode(src.getTypeElement()));
511    if (src.hasProfile())
512      tgt.setProfile(Reference14_30.convertReference(src.getProfile()));
513    for (org.hl7.fhir.dstu2016may.model.Conformance.ResourceInteractionComponent t : src.getInteraction())
514      tgt.addInteraction(convertResourceInteractionComponent(t));
515    if (src.hasVersioning())
516      tgt.setVersioningElement(convertResourceVersionPolicy(src.getVersioningElement()));
517    if (src.hasReadHistory())
518      tgt.setReadHistoryElement(Boolean14_30.convertBoolean(src.getReadHistoryElement()));
519    if (src.hasUpdateCreate())
520      tgt.setUpdateCreateElement(Boolean14_30.convertBoolean(src.getUpdateCreateElement()));
521    if (src.hasConditionalCreate())
522      tgt.setConditionalCreateElement(Boolean14_30.convertBoolean(src.getConditionalCreateElement()));
523    if (src.hasConditionalUpdate())
524      tgt.setConditionalUpdateElement(Boolean14_30.convertBoolean(src.getConditionalUpdateElement()));
525    if (src.hasConditionalDelete())
526      tgt.setConditionalDeleteElement(convertConditionalDeleteStatus(src.getConditionalDeleteElement()));
527    for (org.hl7.fhir.dstu2016may.model.StringType t : src.getSearchInclude()) tgt.addSearchInclude(t.getValue());
528    for (org.hl7.fhir.dstu2016may.model.StringType t : src.getSearchRevInclude()) tgt.addSearchRevInclude(t.getValue());
529    for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceSearchParamComponent t : src.getSearchParam())
530      tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t));
531    return tgt;
532  }
533
534  public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent convertConformanceRestResourceSearchParamComponent(org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceSearchParamComponent src) throws FHIRException {
535    if (src == null || src.isEmpty())
536      return null;
537    org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent();
538    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
539    if (src.hasNameElement())
540      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
541    if (src.hasDefinition())
542      tgt.setDefinitionElement(Uri14_30.convertUri(src.getDefinitionElement()));
543    if (src.hasType())
544      tgt.setTypeElement(Enumerations14_30.convertSearchParamType(src.getTypeElement()));
545    if (src.hasDocumentation())
546      tgt.setDocumentationElement(String14_30.convertString(src.getDocumentationElement()));
547    return tgt;
548  }
549
550  public static org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceSearchParamComponent convertConformanceRestResourceSearchParamComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent src) throws FHIRException {
551    if (src == null || src.isEmpty())
552      return null;
553    org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceSearchParamComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestResourceSearchParamComponent();
554    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
555    if (src.hasNameElement())
556      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
557    if (src.hasDefinition())
558      tgt.setDefinitionElement(Uri14_30.convertUri(src.getDefinitionElement()));
559    if (src.hasType())
560      tgt.setTypeElement(Enumerations14_30.convertSearchParamType(src.getTypeElement()));
561    if (src.hasDocumentation())
562      tgt.setDocumentationElement(String14_30.convertString(src.getDocumentationElement()));
563    return tgt;
564  }
565
566  public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent convertConformanceRestSecurityCertificateComponent(org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestSecurityCertificateComponent src) throws FHIRException {
567    if (src == null || src.isEmpty())
568      return null;
569    org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent();
570    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
571    if (src.hasType())
572      tgt.setTypeElement(Code14_30.convertCode(src.getTypeElement()));
573    if (src.hasBlob())
574      tgt.setBlobElement(Base64Binary14_30.convertBase64Binary(src.getBlobElement()));
575    return tgt;
576  }
577
578  public static org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestSecurityCertificateComponent convertConformanceRestSecurityCertificateComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent src) throws FHIRException {
579    if (src == null || src.isEmpty())
580      return null;
581    org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestSecurityCertificateComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestSecurityCertificateComponent();
582    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
583    if (src.hasType())
584      tgt.setTypeElement(Code14_30.convertCode(src.getTypeElement()));
585    if (src.hasBlob())
586      tgt.setBlobElement(Base64Binary14_30.convertBase64Binary(src.getBlobElement()));
587    return tgt;
588  }
589
590  public static org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestSecurityComponent convertConformanceRestSecurityComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent src) throws FHIRException {
591    if (src == null || src.isEmpty())
592      return null;
593    org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestSecurityComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestSecurityComponent();
594    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
595    if (src.hasCors())
596      tgt.setCorsElement(Boolean14_30.convertBoolean(src.getCorsElement()));
597    for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getService())
598      tgt.addService(CodeableConcept14_30.convertCodeableConcept(t));
599    if (src.hasDescription())
600      tgt.setDescriptionElement(String14_30.convertString(src.getDescriptionElement()));
601    for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent t : src.getCertificate())
602      tgt.addCertificate(convertConformanceRestSecurityCertificateComponent(t));
603    return tgt;
604  }
605
606  public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent convertConformanceRestSecurityComponent(org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestSecurityComponent src) throws FHIRException {
607    if (src == null || src.isEmpty())
608      return null;
609    org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent();
610    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
611    if (src.hasCors())
612      tgt.setCorsElement(Boolean14_30.convertBoolean(src.getCorsElement()));
613    for (org.hl7.fhir.dstu2016may.model.CodeableConcept t : src.getService())
614      tgt.addService(CodeableConcept14_30.convertCodeableConcept(t));
615    if (src.hasDescription())
616      tgt.setDescriptionElement(String14_30.convertString(src.getDescriptionElement()));
617    for (org.hl7.fhir.dstu2016may.model.Conformance.ConformanceRestSecurityCertificateComponent t : src.getCertificate())
618      tgt.addCertificate(convertConformanceRestSecurityCertificateComponent(t));
619    return tgt;
620  }
621
622  public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent convertConformanceSoftwareComponent(org.hl7.fhir.dstu2016may.model.Conformance.ConformanceSoftwareComponent src) throws FHIRException {
623    if (src == null || src.isEmpty())
624      return null;
625    org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent();
626    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
627    if (src.hasNameElement())
628      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
629    if (src.hasVersion())
630      tgt.setVersionElement(String14_30.convertString(src.getVersionElement()));
631    if (src.hasReleaseDate())
632      tgt.setReleaseDateElement(DateTime14_30.convertDateTime(src.getReleaseDateElement()));
633    return tgt;
634  }
635
636  public static org.hl7.fhir.dstu2016may.model.Conformance.ConformanceSoftwareComponent convertConformanceSoftwareComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent src) throws FHIRException {
637    if (src == null || src.isEmpty())
638      return null;
639    org.hl7.fhir.dstu2016may.model.Conformance.ConformanceSoftwareComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceSoftwareComponent();
640    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
641    if (src.hasNameElement())
642      tgt.setNameElement(String14_30.convertString(src.getNameElement()));
643    if (src.hasVersion())
644      tgt.setVersionElement(String14_30.convertString(src.getVersionElement()));
645    if (src.hasReleaseDate())
646      tgt.setReleaseDateElement(DateTime14_30.convertDateTime(src.getReleaseDateElement()));
647    return tgt;
648  }
649
650  static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.ConformanceStatementKind> convertConformanceStatementKind(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind> src) throws FHIRException {
651      if (src == null || src.isEmpty())
652          return null;
653      org.hl7.fhir.dstu2016may.model.Enumeration<Conformance.ConformanceStatementKind> tgt = new org.hl7.fhir.dstu2016may.model.Enumeration<>(new Conformance.ConformanceStatementKindEnumFactory());
654      ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
655      if (src.getValue() == null) {
656          tgt.setValue(null);
657      } else {
658          switch (src.getValue()) {
659              case INSTANCE:
660                  tgt.setValue(Conformance.ConformanceStatementKind.INSTANCE);
661                  break;
662              case CAPABILITY:
663                  tgt.setValue(Conformance.ConformanceStatementKind.CAPABILITY);
664                  break;
665              case REQUIREMENTS:
666                  tgt.setValue(Conformance.ConformanceStatementKind.REQUIREMENTS);
667                  break;
668              default:
669                  tgt.setValue(Conformance.ConformanceStatementKind.NULL);
670                  break;
671          }
672      }
673      return tgt;
674  }
675
676  static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind> convertConformanceStatementKind(org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.ConformanceStatementKind> src) throws FHIRException {
677      if (src == null || src.isEmpty())
678          return null;
679      Enumeration<CapabilityStatement.CapabilityStatementKind> tgt = new Enumeration<>(new CapabilityStatement.CapabilityStatementKindEnumFactory());
680      ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
681      if (src.getValue() == null) {
682          tgt.setValue(null);
683      } else {
684          switch (src.getValue()) {
685              case INSTANCE:
686                  tgt.setValue(CapabilityStatement.CapabilityStatementKind.INSTANCE);
687                  break;
688              case CAPABILITY:
689                  tgt.setValue(CapabilityStatement.CapabilityStatementKind.CAPABILITY);
690                  break;
691              case REQUIREMENTS:
692                  tgt.setValue(CapabilityStatement.CapabilityStatementKind.REQUIREMENTS);
693                  break;
694              default:
695                  tgt.setValue(CapabilityStatement.CapabilityStatementKind.NULL);
696                  break;
697          }
698      }
699      return tgt;
700  }
701
702  static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.DocumentMode> convertDocumentMode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode> src) throws FHIRException {
703      if (src == null || src.isEmpty())
704          return null;
705      org.hl7.fhir.dstu2016may.model.Enumeration<Conformance.DocumentMode> tgt = new org.hl7.fhir.dstu2016may.model.Enumeration<>(new Conformance.DocumentModeEnumFactory());
706      ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
707      if (src.getValue() == null) {
708          tgt.setValue(null);
709      } else {
710          switch (src.getValue()) {
711              case PRODUCER:
712                  tgt.setValue(Conformance.DocumentMode.PRODUCER);
713                  break;
714              case CONSUMER:
715                  tgt.setValue(Conformance.DocumentMode.CONSUMER);
716                  break;
717              default:
718                  tgt.setValue(Conformance.DocumentMode.NULL);
719                  break;
720          }
721      }
722      return tgt;
723  }
724
725  static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode> convertDocumentMode(org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.DocumentMode> src) throws FHIRException {
726      if (src == null || src.isEmpty())
727          return null;
728      Enumeration<CapabilityStatement.DocumentMode> tgt = new Enumeration<>(new CapabilityStatement.DocumentModeEnumFactory());
729      ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
730      if (src.getValue() == null) {
731          tgt.setValue(null);
732      } else {
733          switch (src.getValue()) {
734              case PRODUCER:
735                  tgt.setValue(CapabilityStatement.DocumentMode.PRODUCER);
736                  break;
737              case CONSUMER:
738                  tgt.setValue(CapabilityStatement.DocumentMode.CONSUMER);
739                  break;
740              default:
741                  tgt.setValue(CapabilityStatement.DocumentMode.NULL);
742                  break;
743          }
744      }
745      return tgt;
746  }
747
748  static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory> convertMessageSignificanceCategory(org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.MessageSignificanceCategory> src) throws FHIRException {
749      if (src == null || src.isEmpty())
750          return null;
751      Enumeration<CapabilityStatement.MessageSignificanceCategory> tgt = new Enumeration<>(new CapabilityStatement.MessageSignificanceCategoryEnumFactory());
752      ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
753      if (src.getValue() == null) {
754          tgt.setValue(null);
755      } else {
756          switch (src.getValue()) {
757              case CONSEQUENCE:
758                  tgt.setValue(CapabilityStatement.MessageSignificanceCategory.CONSEQUENCE);
759                  break;
760              case CURRENCY:
761                  tgt.setValue(CapabilityStatement.MessageSignificanceCategory.CURRENCY);
762                  break;
763              case NOTIFICATION:
764                  tgt.setValue(CapabilityStatement.MessageSignificanceCategory.NOTIFICATION);
765                  break;
766              default:
767                  tgt.setValue(CapabilityStatement.MessageSignificanceCategory.NULL);
768                  break;
769          }
770      }
771      return tgt;
772  }
773
774  static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.MessageSignificanceCategory> convertMessageSignificanceCategory(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory> src) throws FHIRException {
775      if (src == null || src.isEmpty())
776          return null;
777      org.hl7.fhir.dstu2016may.model.Enumeration<Conformance.MessageSignificanceCategory> tgt = new org.hl7.fhir.dstu2016may.model.Enumeration<>(new Conformance.MessageSignificanceCategoryEnumFactory());
778      ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
779      if (src.getValue() == null) {
780          tgt.setValue(null);
781      } else {
782          switch (src.getValue()) {
783              case CONSEQUENCE:
784                  tgt.setValue(Conformance.MessageSignificanceCategory.CONSEQUENCE);
785                  break;
786              case CURRENCY:
787                  tgt.setValue(Conformance.MessageSignificanceCategory.CURRENCY);
788                  break;
789              case NOTIFICATION:
790                  tgt.setValue(Conformance.MessageSignificanceCategory.NOTIFICATION);
791                  break;
792              default:
793                  tgt.setValue(Conformance.MessageSignificanceCategory.NULL);
794                  break;
795          }
796      }
797      return tgt;
798  }
799
800  public static org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent convertResourceInteractionComponent(org.hl7.fhir.dstu2016may.model.Conformance.ResourceInteractionComponent src) throws FHIRException {
801    if (src == null || src.isEmpty())
802      return null;
803    org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent();
804    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
805    if (src.hasCode())
806      tgt.setCodeElement(convertTypeRestfulInteraction(src.getCodeElement()));
807    if (src.hasDocumentation())
808      tgt.setDocumentationElement(String14_30.convertString(src.getDocumentationElement()));
809    return tgt;
810  }
811
812  public static org.hl7.fhir.dstu2016may.model.Conformance.ResourceInteractionComponent convertResourceInteractionComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent src) throws FHIRException {
813    if (src == null || src.isEmpty())
814      return null;
815    org.hl7.fhir.dstu2016may.model.Conformance.ResourceInteractionComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ResourceInteractionComponent();
816    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
817    if (src.hasCode())
818      tgt.setCodeElement(convertTypeRestfulInteraction(src.getCodeElement()));
819    if (src.hasDocumentation())
820      tgt.setDocumentationElement(String14_30.convertString(src.getDocumentationElement()));
821    return tgt;
822  }
823
824  static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy> convertResourceVersionPolicy(org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.ResourceVersionPolicy> src) throws FHIRException {
825      if (src == null || src.isEmpty())
826          return null;
827      Enumeration<CapabilityStatement.ResourceVersionPolicy> tgt = new Enumeration<>(new CapabilityStatement.ResourceVersionPolicyEnumFactory());
828      ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
829      if (src.getValue() == null) {
830          tgt.setValue(null);
831      } else {
832          switch (src.getValue()) {
833              case NOVERSION:
834                  tgt.setValue(CapabilityStatement.ResourceVersionPolicy.NOVERSION);
835                  break;
836              case VERSIONED:
837                  tgt.setValue(CapabilityStatement.ResourceVersionPolicy.VERSIONED);
838                  break;
839              case VERSIONEDUPDATE:
840                  tgt.setValue(CapabilityStatement.ResourceVersionPolicy.VERSIONEDUPDATE);
841                  break;
842              default:
843                  tgt.setValue(CapabilityStatement.ResourceVersionPolicy.NULL);
844                  break;
845          }
846      }
847      return tgt;
848  }
849
850  static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.ResourceVersionPolicy> convertResourceVersionPolicy(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy> src) throws FHIRException {
851      if (src == null || src.isEmpty())
852          return null;
853      org.hl7.fhir.dstu2016may.model.Enumeration<Conformance.ResourceVersionPolicy> tgt = new org.hl7.fhir.dstu2016may.model.Enumeration<>(new Conformance.ResourceVersionPolicyEnumFactory());
854      ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
855      if (src.getValue() == null) {
856          tgt.setValue(null);
857      } else {
858          switch (src.getValue()) {
859              case NOVERSION:
860                  tgt.setValue(Conformance.ResourceVersionPolicy.NOVERSION);
861                  break;
862              case VERSIONED:
863                  tgt.setValue(Conformance.ResourceVersionPolicy.VERSIONED);
864                  break;
865              case VERSIONEDUPDATE:
866                  tgt.setValue(Conformance.ResourceVersionPolicy.VERSIONEDUPDATE);
867                  break;
868              default:
869                  tgt.setValue(Conformance.ResourceVersionPolicy.NULL);
870                  break;
871          }
872      }
873      return tgt;
874  }
875
876  static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode> convertRestfulConformanceMode(org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.RestfulConformanceMode> src) throws FHIRException {
877      if (src == null || src.isEmpty())
878          return null;
879      Enumeration<CapabilityStatement.RestfulCapabilityMode> tgt = new Enumeration<>(new CapabilityStatement.RestfulCapabilityModeEnumFactory());
880      ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
881      if (src.getValue() == null) {
882          tgt.setValue(null);
883      } else {
884          switch (src.getValue()) {
885              case CLIENT:
886                  tgt.setValue(CapabilityStatement.RestfulCapabilityMode.CLIENT);
887                  break;
888              case SERVER:
889                  tgt.setValue(CapabilityStatement.RestfulCapabilityMode.SERVER);
890                  break;
891              default:
892                  tgt.setValue(CapabilityStatement.RestfulCapabilityMode.NULL);
893                  break;
894          }
895      }
896      return tgt;
897  }
898
899  static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.RestfulConformanceMode> convertRestfulConformanceMode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode> src) throws FHIRException {
900      if (src == null || src.isEmpty())
901          return null;
902      org.hl7.fhir.dstu2016may.model.Enumeration<Conformance.RestfulConformanceMode> tgt = new org.hl7.fhir.dstu2016may.model.Enumeration<>(new Conformance.RestfulConformanceModeEnumFactory());
903      ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
904      if (src.getValue() == null) {
905          tgt.setValue(null);
906      } else {
907          switch (src.getValue()) {
908              case CLIENT:
909                  tgt.setValue(Conformance.RestfulConformanceMode.CLIENT);
910                  break;
911              case SERVER:
912                  tgt.setValue(Conformance.RestfulConformanceMode.SERVER);
913                  break;
914              default:
915                  tgt.setValue(Conformance.RestfulConformanceMode.NULL);
916                  break;
917          }
918      }
919      return tgt;
920  }
921
922  public static org.hl7.fhir.dstu2016may.model.Conformance.SystemInteractionComponent convertSystemInteractionComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent src) throws FHIRException {
923    if (src == null || src.isEmpty())
924      return null;
925    org.hl7.fhir.dstu2016may.model.Conformance.SystemInteractionComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.SystemInteractionComponent();
926    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
927    if (src.hasCode())
928      tgt.setCodeElement(convertSystemRestfulInteraction(src.getCodeElement()));
929    if (src.hasDocumentation())
930      tgt.setDocumentationElement(String14_30.convertString(src.getDocumentationElement()));
931    return tgt;
932  }
933
934  public static org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent convertSystemInteractionComponent(org.hl7.fhir.dstu2016may.model.Conformance.SystemInteractionComponent src) throws FHIRException {
935    if (src == null || src.isEmpty())
936      return null;
937    org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent();
938    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyBackboneElement(src,tgt);
939    if (src.hasCode())
940      tgt.setCodeElement(convertSystemRestfulInteraction(src.getCodeElement()));
941    if (src.hasDocumentation())
942      tgt.setDocumentationElement(String14_30.convertString(src.getDocumentationElement()));
943    return tgt;
944  }
945
946  static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction> convertSystemRestfulInteraction(org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.SystemRestfulInteraction> src) throws FHIRException {
947      if (src == null || src.isEmpty())
948          return null;
949      Enumeration<CapabilityStatement.SystemRestfulInteraction> tgt = new Enumeration<>(new CapabilityStatement.SystemRestfulInteractionEnumFactory());
950      ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
951      if (src.getValue() == null) {
952          tgt.setValue(null);
953      } else {
954          switch (src.getValue()) {
955              case TRANSACTION:
956                  tgt.setValue(CapabilityStatement.SystemRestfulInteraction.TRANSACTION);
957                  break;
958              case SEARCHSYSTEM:
959                  tgt.setValue(CapabilityStatement.SystemRestfulInteraction.SEARCHSYSTEM);
960                  break;
961              case HISTORYSYSTEM:
962                  tgt.setValue(CapabilityStatement.SystemRestfulInteraction.HISTORYSYSTEM);
963                  break;
964              default:
965                  tgt.setValue(CapabilityStatement.SystemRestfulInteraction.NULL);
966                  break;
967          }
968      }
969      return tgt;
970  }
971
972  static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.SystemRestfulInteraction> convertSystemRestfulInteraction(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction> src) throws FHIRException {
973      if (src == null || src.isEmpty())
974          return null;
975      org.hl7.fhir.dstu2016may.model.Enumeration<Conformance.SystemRestfulInteraction> tgt = new org.hl7.fhir.dstu2016may.model.Enumeration<>(new Conformance.SystemRestfulInteractionEnumFactory());
976      ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
977      if (src.getValue() == null) {
978          tgt.setValue(null);
979      } else {
980          switch (src.getValue()) {
981              case TRANSACTION:
982                  tgt.setValue(Conformance.SystemRestfulInteraction.TRANSACTION);
983                  break;
984              case SEARCHSYSTEM:
985                  tgt.setValue(Conformance.SystemRestfulInteraction.SEARCHSYSTEM);
986                  break;
987              case HISTORYSYSTEM:
988                  tgt.setValue(Conformance.SystemRestfulInteraction.HISTORYSYSTEM);
989                  break;
990              default:
991                  tgt.setValue(Conformance.SystemRestfulInteraction.NULL);
992                  break;
993          }
994      }
995      return tgt;
996  }
997
998  static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction> convertTypeRestfulInteraction(org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.TypeRestfulInteraction> src) throws FHIRException {
999      if (src == null || src.isEmpty())
1000          return null;
1001      Enumeration<CapabilityStatement.TypeRestfulInteraction> tgt = new Enumeration<>(new CapabilityStatement.TypeRestfulInteractionEnumFactory());
1002      ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
1003      if (src.getValue() == null) {
1004          tgt.setValue(null);
1005      } else {
1006          switch (src.getValue()) {
1007              case READ:
1008                  tgt.setValue(CapabilityStatement.TypeRestfulInteraction.READ);
1009                  break;
1010              case VREAD:
1011                  tgt.setValue(CapabilityStatement.TypeRestfulInteraction.VREAD);
1012                  break;
1013              case UPDATE:
1014                  tgt.setValue(CapabilityStatement.TypeRestfulInteraction.UPDATE);
1015                  break;
1016              case DELETE:
1017                  tgt.setValue(CapabilityStatement.TypeRestfulInteraction.DELETE);
1018                  break;
1019              case HISTORYINSTANCE:
1020                  tgt.setValue(CapabilityStatement.TypeRestfulInteraction.HISTORYINSTANCE);
1021                  break;
1022              case HISTORYTYPE:
1023                  tgt.setValue(CapabilityStatement.TypeRestfulInteraction.HISTORYTYPE);
1024                  break;
1025              case CREATE:
1026                  tgt.setValue(CapabilityStatement.TypeRestfulInteraction.CREATE);
1027                  break;
1028              case SEARCHTYPE:
1029                  tgt.setValue(CapabilityStatement.TypeRestfulInteraction.SEARCHTYPE);
1030                  break;
1031              default:
1032                  tgt.setValue(CapabilityStatement.TypeRestfulInteraction.NULL);
1033                  break;
1034          }
1035      }
1036      return tgt;
1037  }
1038
1039  static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.TypeRestfulInteraction> convertTypeRestfulInteraction(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction> src) throws FHIRException {
1040      if (src == null || src.isEmpty())
1041          return null;
1042      org.hl7.fhir.dstu2016may.model.Enumeration<Conformance.TypeRestfulInteraction> tgt = new org.hl7.fhir.dstu2016may.model.Enumeration<>(new Conformance.TypeRestfulInteractionEnumFactory());
1043      ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
1044      if (src.getValue() == null) {
1045          tgt.setValue(null);
1046      } else {
1047          switch (src.getValue()) {
1048              case READ:
1049                  tgt.setValue(Conformance.TypeRestfulInteraction.READ);
1050                  break;
1051              case VREAD:
1052                  tgt.setValue(Conformance.TypeRestfulInteraction.VREAD);
1053                  break;
1054              case UPDATE:
1055                  tgt.setValue(Conformance.TypeRestfulInteraction.UPDATE);
1056                  break;
1057              case DELETE:
1058                  tgt.setValue(Conformance.TypeRestfulInteraction.DELETE);
1059                  break;
1060              case HISTORYINSTANCE:
1061                  tgt.setValue(Conformance.TypeRestfulInteraction.HISTORYINSTANCE);
1062                  break;
1063              case HISTORYTYPE:
1064                  tgt.setValue(Conformance.TypeRestfulInteraction.HISTORYTYPE);
1065                  break;
1066              case CREATE:
1067                  tgt.setValue(Conformance.TypeRestfulInteraction.CREATE);
1068                  break;
1069              case SEARCHTYPE:
1070                  tgt.setValue(Conformance.TypeRestfulInteraction.SEARCHTYPE);
1071                  break;
1072              default:
1073                  tgt.setValue(Conformance.TypeRestfulInteraction.NULL);
1074                  break;
1075          }
1076      }
1077      return tgt;
1078  }
1079
1080  static public org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.UnknownContentCode> convertUnknownContentCode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode> src) throws FHIRException {
1081      if (src == null || src.isEmpty())
1082          return null;
1083      org.hl7.fhir.dstu2016may.model.Enumeration<Conformance.UnknownContentCode> tgt = new org.hl7.fhir.dstu2016may.model.Enumeration<>(new Conformance.UnknownContentCodeEnumFactory());
1084      ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
1085      if (src.getValue() == null) {
1086          tgt.setValue(null);
1087      } else {
1088          switch (src.getValue()) {
1089              case NO:
1090                  tgt.setValue(Conformance.UnknownContentCode.NO);
1091                  break;
1092              case EXTENSIONS:
1093                  tgt.setValue(Conformance.UnknownContentCode.EXTENSIONS);
1094                  break;
1095              case ELEMENTS:
1096                  tgt.setValue(Conformance.UnknownContentCode.ELEMENTS);
1097                  break;
1098              case BOTH:
1099                  tgt.setValue(Conformance.UnknownContentCode.BOTH);
1100                  break;
1101              default:
1102                  tgt.setValue(Conformance.UnknownContentCode.NULL);
1103                  break;
1104          }
1105      }
1106      return tgt;
1107  }
1108
1109  static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode> convertUnknownContentCode(org.hl7.fhir.dstu2016may.model.Enumeration<org.hl7.fhir.dstu2016may.model.Conformance.UnknownContentCode> src) throws FHIRException {
1110      if (src == null || src.isEmpty())
1111          return null;
1112      Enumeration<CapabilityStatement.UnknownContentCode> tgt = new Enumeration<>(new CapabilityStatement.UnknownContentCodeEnumFactory());
1113      ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
1114      if (src.getValue() == null) {
1115          tgt.setValue(null);
1116      } else {
1117          switch (src.getValue()) {
1118              case NO:
1119                  tgt.setValue(CapabilityStatement.UnknownContentCode.NO);
1120                  break;
1121              case EXTENSIONS:
1122                  tgt.setValue(CapabilityStatement.UnknownContentCode.EXTENSIONS);
1123                  break;
1124              case ELEMENTS:
1125                  tgt.setValue(CapabilityStatement.UnknownContentCode.ELEMENTS);
1126                  break;
1127              case BOTH:
1128                  tgt.setValue(CapabilityStatement.UnknownContentCode.BOTH);
1129                  break;
1130              default:
1131                  tgt.setValue(CapabilityStatement.UnknownContentCode.NULL);
1132                  break;
1133          }
1134      }
1135      return tgt;
1136  }
1137}