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