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