
001package org.hl7.fhir.convertors.conv43_50.resources43_50; 002 003import org.hl7.fhir.convertors.context.ConversionContext43_50; 004import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.Annotation43_50; 005import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.CodeableConcept43_50; 006import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.Identifier43_50; 007import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Canonical43_50; 008import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.DateTime43_50; 009import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Uri43_50; 010import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50; 011import org.hl7.fhir.exceptions.FHIRException; 012import org.hl7.fhir.r5.model.CodeableReference; 013 014/* 015 Copyright (c) 2011+, HL7, Inc. 016 All rights reserved. 017 018 Redistribution and use in source and binary forms, with or without modification, 019 are permitted provided that the following conditions are met: 020 021 * Redistributions of source code must retain the above copyright notice, this 022 list of conditions and the following disclaimer. 023 * Redistributions in binary form must reproduce the above copyright notice, 024 this list of conditions and the following disclaimer in the documentation 025 and/or other materials provided with the distribution. 026 * Neither the name of HL7 nor the names of its contributors may be used to 027 endorse or promote products derived from this software without specific 028 prior written permission. 029 030 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 031 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 032 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 033 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 034 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 035 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 036 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 037 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 038 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 039 POSSIBILITY OF SUCH DAMAGE. 040 041*/ 042// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 043public class DeviceRequest43_50 { 044 045 public static org.hl7.fhir.r5.model.DeviceRequest convertDeviceRequest(org.hl7.fhir.r4b.model.DeviceRequest src) throws FHIRException { 046 if (src == null) 047 return null; 048 org.hl7.fhir.r5.model.DeviceRequest tgt = new org.hl7.fhir.r5.model.DeviceRequest(); 049 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyDomainResource(src, tgt); 050 for (org.hl7.fhir.r4b.model.Identifier t : src.getIdentifier()) 051 tgt.addIdentifier(Identifier43_50.convertIdentifier(t)); 052 for (org.hl7.fhir.r4b.model.CanonicalType t : src.getInstantiatesCanonical()) 053 tgt.getInstantiatesCanonical().add(Canonical43_50.convertCanonical(t)); 054 for (org.hl7.fhir.r4b.model.UriType t : src.getInstantiatesUri()) 055 tgt.getInstantiatesUri().add(Uri43_50.convertUri(t)); 056 for (org.hl7.fhir.r4b.model.Reference t : src.getBasedOn()) tgt.addBasedOn(Reference43_50.convertReference(t)); 057// for (org.hl7.fhir.r4b.model.Reference t : src.getPriorRequest()) 058// tgt.addPriorRequest(Reference43_50.convertReference(t)); 059 if (src.hasGroupIdentifier()) 060 tgt.setGroupIdentifier(Identifier43_50.convertIdentifier(src.getGroupIdentifier())); 061 if (src.hasStatus()) 062 tgt.setStatusElement(convertDeviceRequestStatus(src.getStatusElement())); 063 if (src.hasIntent()) 064 tgt.setIntentElement(convertRequestIntent(src.getIntentElement())); 065 if (src.hasPriority()) 066 tgt.setPriorityElement(convertRequestPriority(src.getPriorityElement())); 067 if (src.hasCodeCodeableConcept()) 068 tgt.getCode().setConcept(CodeableConcept43_50.convertCodeableConcept(src.getCodeCodeableConcept())); 069 else if (src.hasCodeReference()) 070 tgt.getCode().setReference(Reference43_50.convertReference(src.getCodeReference())); 071 072 for (org.hl7.fhir.r4b.model.DeviceRequest.DeviceRequestParameterComponent t : src.getParameter()) 073 tgt.addParameter(convertDeviceRequestParameterComponent(t)); 074 if (src.hasSubject()) 075 tgt.setSubject(Reference43_50.convertReference(src.getSubject())); 076 if (src.hasEncounter()) 077 tgt.setEncounter(Reference43_50.convertReference(src.getEncounter())); 078 if (src.hasOccurrence()) 079 tgt.setOccurrence(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getOccurrence())); 080 if (src.hasAuthoredOn()) 081 tgt.setAuthoredOnElement(DateTime43_50.convertDateTime(src.getAuthoredOnElement())); 082 if (src.hasRequester()) 083 tgt.setRequester(Reference43_50.convertReference(src.getRequester())); 084 if (src.hasPerformerType()) 085 tgt.getPerformer().setConcept(CodeableConcept43_50.convertCodeableConcept(src.getPerformerType())); 086 if (src.hasPerformer()) 087 tgt.getPerformer().setReference(Reference43_50.convertReference(src.getPerformer())); 088 for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getReasonCode()) 089 tgt.addReason(CodeableConcept43_50.convertCodeableConceptToCodeableReference(t)); 090 for (org.hl7.fhir.r4b.model.Reference t : src.getReasonReference()) 091 tgt.addReason(Reference43_50.convertReferenceToCodeableReference(t)); 092 for (org.hl7.fhir.r4b.model.Reference t : src.getInsurance()) tgt.addInsurance(Reference43_50.convertReference(t)); 093 for (org.hl7.fhir.r4b.model.Reference t : src.getSupportingInfo()) 094 tgt.addSupportingInfo(Reference43_50.convertReference(t)); 095 for (org.hl7.fhir.r4b.model.Annotation t : src.getNote()) tgt.addNote(Annotation43_50.convertAnnotation(t)); 096 for (org.hl7.fhir.r4b.model.Reference t : src.getRelevantHistory()) 097 tgt.addRelevantHistory(Reference43_50.convertReference(t)); 098 return tgt; 099 } 100 101 public static org.hl7.fhir.r4b.model.DeviceRequest convertDeviceRequest(org.hl7.fhir.r5.model.DeviceRequest src) throws FHIRException { 102 if (src == null) 103 return null; 104 org.hl7.fhir.r4b.model.DeviceRequest tgt = new org.hl7.fhir.r4b.model.DeviceRequest(); 105 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyDomainResource(src, tgt); 106 for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) 107 tgt.addIdentifier(Identifier43_50.convertIdentifier(t)); 108 for (org.hl7.fhir.r5.model.CanonicalType t : src.getInstantiatesCanonical()) 109 tgt.getInstantiatesCanonical().add(Canonical43_50.convertCanonical(t)); 110 for (org.hl7.fhir.r5.model.UriType t : src.getInstantiatesUri()) 111 tgt.getInstantiatesUri().add(Uri43_50.convertUri(t)); 112 for (org.hl7.fhir.r5.model.Reference t : src.getBasedOn()) tgt.addBasedOn(Reference43_50.convertReference(t)); 113// for (org.hl7.fhir.r5.model.Reference t : src.getPriorRequest()) 114// tgt.addPriorRequest(Reference43_50.convertReference(t)); 115 if (src.hasGroupIdentifier()) 116 tgt.setGroupIdentifier(Identifier43_50.convertIdentifier(src.getGroupIdentifier())); 117 if (src.hasStatus()) 118 tgt.setStatusElement(convertDeviceRequestStatus(src.getStatusElement())); 119 if (src.hasIntent()) 120 tgt.setIntentElement(convertRequestIntent(src.getIntentElement())); 121 if (src.hasPriority()) 122 tgt.setPriorityElement(convertRequestPriority(src.getPriorityElement())); 123 if (src.getCode().hasConcept()) 124 tgt.setCode(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getCode().getConcept())); 125 if (src.getCode().hasReference()) 126 tgt.setCode(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getCode().getReference())); 127 for (org.hl7.fhir.r5.model.DeviceRequest.DeviceRequestParameterComponent t : src.getParameter()) 128 tgt.addParameter(convertDeviceRequestParameterComponent(t)); 129 if (src.hasSubject()) 130 tgt.setSubject(Reference43_50.convertReference(src.getSubject())); 131 if (src.hasEncounter()) 132 tgt.setEncounter(Reference43_50.convertReference(src.getEncounter())); 133 if (src.hasOccurrence()) 134 tgt.setOccurrence(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getOccurrence())); 135 if (src.hasAuthoredOn()) 136 tgt.setAuthoredOnElement(DateTime43_50.convertDateTime(src.getAuthoredOnElement())); 137 if (src.hasRequester()) 138 tgt.setRequester(Reference43_50.convertReference(src.getRequester())); 139 if (src.getPerformer().hasConcept()) 140 tgt.setPerformerType(CodeableConcept43_50.convertCodeableConcept(src.getPerformer().getConcept())); 141 if (src.getPerformer().hasReference()) 142 tgt.setPerformer(Reference43_50.convertReference(src.getPerformer().getReference())); 143 for (CodeableReference t : src.getReason()) 144 if (t.hasConcept()) 145 tgt.addReasonCode(CodeableConcept43_50.convertCodeableConcept(t.getConcept())); 146 for (CodeableReference t : src.getReason()) 147 if (t.hasReference()) 148 tgt.addReasonReference(Reference43_50.convertReference(t.getReference())); 149 for (org.hl7.fhir.r5.model.Reference t : src.getInsurance()) tgt.addInsurance(Reference43_50.convertReference(t)); 150 for (org.hl7.fhir.r5.model.Reference t : src.getSupportingInfo()) 151 tgt.addSupportingInfo(Reference43_50.convertReference(t)); 152 for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation43_50.convertAnnotation(t)); 153 for (org.hl7.fhir.r5.model.Reference t : src.getRelevantHistory()) 154 tgt.addRelevantHistory(Reference43_50.convertReference(t)); 155 return tgt; 156 } 157 158 static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RequestStatus> convertDeviceRequestStatus(org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.Enumerations.RequestStatus> src) throws FHIRException { 159 if (src == null || src.isEmpty()) 160 return null; 161 org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RequestStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.RequestStatusEnumFactory()); 162 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 163 switch (src.getValue()) { 164 case DRAFT: 165 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestStatus.DRAFT); 166 break; 167 case ACTIVE: 168 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestStatus.ACTIVE); 169 break; 170 case ONHOLD: 171 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestStatus.ONHOLD); 172 break; 173 case REVOKED: 174 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestStatus.REVOKED); 175 break; 176 case COMPLETED: 177 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestStatus.COMPLETED); 178 break; 179 case ENTEREDINERROR: 180 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestStatus.ENTEREDINERROR); 181 break; 182 case UNKNOWN: 183 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestStatus.UNKNOWN); 184 break; 185 default: 186 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestStatus.NULL); 187 break; 188 } 189 return tgt; 190 } 191 192 static public org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.Enumerations.RequestStatus> convertDeviceRequestStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RequestStatus> src) throws FHIRException { 193 if (src == null || src.isEmpty()) 194 return null; 195 org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.Enumerations.RequestStatus> tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.Enumerations.RequestStatusEnumFactory()); 196 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 197 switch (src.getValue()) { 198 case DRAFT: 199 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestStatus.DRAFT); 200 break; 201 case ACTIVE: 202 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestStatus.ACTIVE); 203 break; 204 case ONHOLD: 205 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestStatus.ONHOLD); 206 break; 207 case REVOKED: 208 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestStatus.REVOKED); 209 break; 210 case COMPLETED: 211 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestStatus.COMPLETED); 212 break; 213 case ENTEREDINERROR: 214 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestStatus.ENTEREDINERROR); 215 break; 216 case UNKNOWN: 217 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestStatus.UNKNOWN); 218 break; 219 default: 220 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestStatus.NULL); 221 break; 222 } 223 return tgt; 224 } 225 226 static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RequestIntent> convertRequestIntent(org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.Enumerations.RequestIntent> src) throws FHIRException { 227 if (src == null || src.isEmpty()) 228 return null; 229 org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RequestIntent> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.RequestIntentEnumFactory()); 230 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 231 switch (src.getValue()) { 232 case PROPOSAL: 233 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestIntent.PROPOSAL); 234 break; 235 case PLAN: 236 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestIntent.PLAN); 237 break; 238 case DIRECTIVE: 239 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestIntent.DIRECTIVE); 240 break; 241 case ORDER: 242 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestIntent.ORDER); 243 break; 244 case ORIGINALORDER: 245 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestIntent.ORIGINALORDER); 246 break; 247 case REFLEXORDER: 248 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestIntent.REFLEXORDER); 249 break; 250 case FILLERORDER: 251 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestIntent.FILLERORDER); 252 break; 253 case INSTANCEORDER: 254 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestIntent.INSTANCEORDER); 255 break; 256 case OPTION: 257 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestIntent.OPTION); 258 break; 259 default: 260 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestIntent.NULL); 261 break; 262 } 263 return tgt; 264 } 265 266 static public org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.Enumerations.RequestIntent> convertRequestIntent(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RequestIntent> src) throws FHIRException { 267 if (src == null || src.isEmpty()) 268 return null; 269 org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.Enumerations.RequestIntent> tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.Enumerations.RequestIntentEnumFactory()); 270 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 271 switch (src.getValue()) { 272 case PROPOSAL: 273 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestIntent.PROPOSAL); 274 break; 275 case PLAN: 276 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestIntent.PLAN); 277 break; 278 case DIRECTIVE: 279 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestIntent.DIRECTIVE); 280 break; 281 case ORDER: 282 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestIntent.ORDER); 283 break; 284 case ORIGINALORDER: 285 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestIntent.ORIGINALORDER); 286 break; 287 case REFLEXORDER: 288 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestIntent.REFLEXORDER); 289 break; 290 case FILLERORDER: 291 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestIntent.FILLERORDER); 292 break; 293 case INSTANCEORDER: 294 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestIntent.INSTANCEORDER); 295 break; 296 case OPTION: 297 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestIntent.OPTION); 298 break; 299 default: 300 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestIntent.NULL); 301 break; 302 } 303 return tgt; 304 } 305 306 static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RequestPriority> convertRequestPriority(org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.Enumerations.RequestPriority> src) throws FHIRException { 307 if (src == null || src.isEmpty()) 308 return null; 309 org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RequestPriority> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.RequestPriorityEnumFactory()); 310 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 311 switch (src.getValue()) { 312 case ROUTINE: 313 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestPriority.ROUTINE); 314 break; 315 case URGENT: 316 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestPriority.URGENT); 317 break; 318 case ASAP: 319 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestPriority.ASAP); 320 break; 321 case STAT: 322 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestPriority.STAT); 323 break; 324 default: 325 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.RequestPriority.NULL); 326 break; 327 } 328 return tgt; 329 } 330 331 static public org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.Enumerations.RequestPriority> convertRequestPriority(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.RequestPriority> src) throws FHIRException { 332 if (src == null || src.isEmpty()) 333 return null; 334 org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.Enumerations.RequestPriority> tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.Enumerations.RequestPriorityEnumFactory()); 335 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 336 switch (src.getValue()) { 337 case ROUTINE: 338 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestPriority.ROUTINE); 339 break; 340 case URGENT: 341 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestPriority.URGENT); 342 break; 343 case ASAP: 344 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestPriority.ASAP); 345 break; 346 case STAT: 347 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestPriority.STAT); 348 break; 349 default: 350 tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.RequestPriority.NULL); 351 break; 352 } 353 return tgt; 354 } 355 356 public static org.hl7.fhir.r5.model.DeviceRequest.DeviceRequestParameterComponent convertDeviceRequestParameterComponent(org.hl7.fhir.r4b.model.DeviceRequest.DeviceRequestParameterComponent src) throws FHIRException { 357 if (src == null) 358 return null; 359 org.hl7.fhir.r5.model.DeviceRequest.DeviceRequestParameterComponent tgt = new org.hl7.fhir.r5.model.DeviceRequest.DeviceRequestParameterComponent(); 360 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); 361 if (src.hasCode()) 362 tgt.setCode(CodeableConcept43_50.convertCodeableConcept(src.getCode())); 363 if (src.hasValue()) 364 tgt.setValue(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getValue())); 365 return tgt; 366 } 367 368 public static org.hl7.fhir.r4b.model.DeviceRequest.DeviceRequestParameterComponent convertDeviceRequestParameterComponent(org.hl7.fhir.r5.model.DeviceRequest.DeviceRequestParameterComponent src) throws FHIRException { 369 if (src == null) 370 return null; 371 org.hl7.fhir.r4b.model.DeviceRequest.DeviceRequestParameterComponent tgt = new org.hl7.fhir.r4b.model.DeviceRequest.DeviceRequestParameterComponent(); 372 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); 373 if (src.hasCode()) 374 tgt.setCode(CodeableConcept43_50.convertCodeableConcept(src.getCode())); 375 if (src.hasValue()) 376 tgt.setValue(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getValue())); 377 return tgt; 378 } 379}