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