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.Identifier43_50; 005import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50; 006import org.hl7.fhir.exceptions.FHIRException; 007 008/* 009 Copyright (c) 2011+, HL7, Inc. 010 All rights reserved. 011 012 Redistribution and use in source and binary forms, with or without modification, 013 are permitted provided that the following conditions are met: 014 015 * Redistributions of source code must retain the above copyright notice, this 016 list of conditions and the following disclaimer. 017 * Redistributions in binary form must reproduce the above copyright notice, 018 this list of conditions and the following disclaimer in the documentation 019 and/or other materials provided with the distribution. 020 * Neither the name of HL7 nor the names of its contributors may be used to 021 endorse or promote products derived from this software without specific 022 prior written permission. 023 024 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 025 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 026 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 027 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 028 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 029 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 030 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 031 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 032 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 033 POSSIBILITY OF SUCH DAMAGE. 034 035*/ 036// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 037public class BiologicallyDerivedProduct43_50 { 038 039 public static org.hl7.fhir.r5.model.BiologicallyDerivedProduct convertBiologicallyDerivedProduct(org.hl7.fhir.r4b.model.BiologicallyDerivedProduct src) throws FHIRException { 040 if (src == null) 041 return null; 042 org.hl7.fhir.r5.model.BiologicallyDerivedProduct tgt = new org.hl7.fhir.r5.model.BiologicallyDerivedProduct(); 043 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyDomainResource(src, tgt); 044 for (org.hl7.fhir.r4b.model.Identifier t : src.getIdentifier()) 045 tgt.addIdentifier(Identifier43_50.convertIdentifier(t)); 046// if (src.hasProductCategory()) 047// tgt.setProductCategoryElement(convertBiologicallyDerivedProductCategory(src.getProductCategoryElement())); 048// if (src.hasProductCode()) 049// tgt.setProductCode(CodeableConcept43_50.convertCodeableConcept(src.getProductCode())); 050// if (src.hasStatus()) 051// tgt.setStatusElement(convertBiologicallyDerivedProductStatus(src.getStatusElement())); 052 for (org.hl7.fhir.r4b.model.Reference t : src.getRequest()) tgt.addRequest(Reference43_50.convertReference(t)); 053// if (src.hasQuantity()) 054// tgt.setQuantityElement(Integer43_50.convertInteger(src.getQuantityElement())); 055 for (org.hl7.fhir.r4b.model.Reference t : src.getParent()) tgt.addParent(Reference43_50.convertReference(t)); 056 if (src.hasCollection()) 057 tgt.setCollection(convertBiologicallyDerivedProductCollectionComponent(src.getCollection())); 058// for (org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent t : src.getProcessing()) 059// tgt.addProcessing(convertBiologicallyDerivedProductProcessingComponent(t)); 060// if (src.hasManipulation()) 061// tgt.setManipulation(convertBiologicallyDerivedProductManipulationComponent(src.getManipulation())); 062// for (org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent t : src.getStorage()) 063// tgt.addStorage(convertBiologicallyDerivedProductStorageComponent(t)); 064 return tgt; 065 } 066 067 public static org.hl7.fhir.r4b.model.BiologicallyDerivedProduct convertBiologicallyDerivedProduct(org.hl7.fhir.r5.model.BiologicallyDerivedProduct src) throws FHIRException { 068 if (src == null) 069 return null; 070 org.hl7.fhir.r4b.model.BiologicallyDerivedProduct tgt = new org.hl7.fhir.r4b.model.BiologicallyDerivedProduct(); 071 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyDomainResource(src, tgt); 072 for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) 073 tgt.addIdentifier(Identifier43_50.convertIdentifier(t)); 074// if (src.hasProductCategory()) 075// tgt.setProductCategoryElement(convertBiologicallyDerivedProductCategory(src.getProductCategoryElement())); 076// if (src.hasProductCode()) 077// tgt.setProductCode(CodeableConcept43_50.convertCodeableConcept(src.getProductCode())); 078// if (src.hasStatus()) 079// tgt.setStatusElement(convertBiologicallyDerivedProductStatus(src.getStatusElement())); 080 for (org.hl7.fhir.r5.model.Reference t : src.getRequest()) tgt.addRequest(Reference43_50.convertReference(t)); 081// if (src.hasQuantity()) 082// tgt.setQuantityElement(Integer43_50.convertInteger(src.getQuantityElement())); 083 for (org.hl7.fhir.r5.model.Reference t : src.getParent()) tgt.addParent(Reference43_50.convertReference(t)); 084 if (src.hasCollection()) 085 tgt.setCollection(convertBiologicallyDerivedProductCollectionComponent(src.getCollection())); 086// for (org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent t : src.getProcessing()) 087// tgt.addProcessing(convertBiologicallyDerivedProductProcessingComponent(t)); 088// if (src.hasManipulation()) 089// tgt.setManipulation(convertBiologicallyDerivedProductManipulationComponent(src.getManipulation())); 090// for (org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent t : src.getStorage()) 091// tgt.addStorage(convertBiologicallyDerivedProductStorageComponent(t)); 092 return tgt; 093 } 094// 095// static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory> convertBiologicallyDerivedProductCategory(org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory> src) throws FHIRException { 096// if (src == null || src.isEmpty()) 097// return null; 098// org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategoryEnumFactory()); 099// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 100// switch (src.getValue()) { 101// case ORGAN: 102// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.ORGAN); 103// break; 104// case TISSUE: 105// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.TISSUE); 106// break; 107// case FLUID: 108// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.FLUID); 109// break; 110// case CELLS: 111// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.CELLS); 112// break; 113// case BIOLOGICALAGENT: 114// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.BIOLOGICALAGENT); 115// break; 116// default: 117// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.NULL); 118// break; 119// } 120// return tgt; 121// } 122// 123// static public org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory> convertBiologicallyDerivedProductCategory(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory> src) throws FHIRException { 124// if (src == null || src.isEmpty()) 125// return null; 126// org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory> tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategoryEnumFactory()); 127// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 128// switch (src.getValue()) { 129// case ORGAN: 130// tgt.setValue(org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.ORGAN); 131// break; 132// case TISSUE: 133// tgt.setValue(org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.TISSUE); 134// break; 135// case FLUID: 136// tgt.setValue(org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.FLUID); 137// break; 138// case CELLS: 139// tgt.setValue(org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.CELLS); 140// break; 141// case BIOLOGICALAGENT: 142// tgt.setValue(org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.BIOLOGICALAGENT); 143// break; 144// default: 145// tgt.setValue(org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCategory.NULL); 146// break; 147// } 148// return tgt; 149// } 150// 151// static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus> convertBiologicallyDerivedProductStatus(org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus> src) throws FHIRException { 152// if (src == null || src.isEmpty()) 153// return null; 154// org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatusEnumFactory()); 155// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 156// switch (src.getValue()) { 157// case AVAILABLE: 158// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus.AVAILABLE); 159// break; 160// case UNAVAILABLE: 161// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus.UNAVAILABLE); 162// break; 163// default: 164// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus.NULL); 165// break; 166// } 167// return tgt; 168// } 169// 170// static public org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus> convertBiologicallyDerivedProductStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus> src) throws FHIRException { 171// if (src == null || src.isEmpty()) 172// return null; 173// org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus> tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatusEnumFactory()); 174// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 175// switch (src.getValue()) { 176// case AVAILABLE: 177// tgt.setValue(org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus.AVAILABLE); 178// break; 179// case UNAVAILABLE: 180// tgt.setValue(org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus.UNAVAILABLE); 181// break; 182// default: 183// tgt.setValue(org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStatus.NULL); 184// break; 185// } 186// return tgt; 187// } 188 189 public static org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent convertBiologicallyDerivedProductCollectionComponent(org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent src) throws FHIRException { 190 if (src == null) 191 return null; 192 org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent tgt = new org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent(); 193 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); 194 if (src.hasCollector()) 195 tgt.setCollector(Reference43_50.convertReference(src.getCollector())); 196 if (src.hasSource()) 197 tgt.setSource(Reference43_50.convertReference(src.getSource())); 198 if (src.hasCollected()) 199 tgt.setCollected(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getCollected())); 200 return tgt; 201 } 202 203 public static org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent convertBiologicallyDerivedProductCollectionComponent(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent src) throws FHIRException { 204 if (src == null) 205 return null; 206 org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent tgt = new org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductCollectionComponent(); 207 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); 208 if (src.hasCollector()) 209 tgt.setCollector(Reference43_50.convertReference(src.getCollector())); 210 if (src.hasSource()) 211 tgt.setSource(Reference43_50.convertReference(src.getSource())); 212 if (src.hasCollected()) 213 tgt.setCollected(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getCollected())); 214 return tgt; 215 } 216 217// public static org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent convertBiologicallyDerivedProductProcessingComponent(org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent src) throws FHIRException { 218// if (src == null) 219// return null; 220// org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent tgt = new org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent(); 221// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 222// if (src.hasDescription()) 223// tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); 224// if (src.hasProcedure()) 225// tgt.setProcedure(CodeableConcept43_50.convertCodeableConcept(src.getProcedure())); 226// if (src.hasAdditive()) 227// tgt.setAdditive(Reference43_50.convertReference(src.getAdditive())); 228// if (src.hasTime()) 229// tgt.setTime(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getTime())); 230// return tgt; 231// } 232// 233// public static org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent convertBiologicallyDerivedProductProcessingComponent(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent src) throws FHIRException { 234// if (src == null) 235// return null; 236// org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent tgt = new org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductProcessingComponent(); 237// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 238// if (src.hasDescription()) 239// tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); 240// if (src.hasProcedure()) 241// tgt.setProcedure(CodeableConcept43_50.convertCodeableConcept(src.getProcedure())); 242// if (src.hasAdditive()) 243// tgt.setAdditive(Reference43_50.convertReference(src.getAdditive())); 244// if (src.hasTime()) 245// tgt.setTime(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getTime())); 246// return tgt; 247// } 248// 249// public static org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductManipulationComponent convertBiologicallyDerivedProductManipulationComponent(org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductManipulationComponent src) throws FHIRException { 250// if (src == null) 251// return null; 252// org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductManipulationComponent tgt = new org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductManipulationComponent(); 253// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 254// if (src.hasDescription()) 255// tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); 256// if (src.hasTime()) 257// tgt.setTime(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getTime())); 258// return tgt; 259// } 260// 261// public static org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductManipulationComponent convertBiologicallyDerivedProductManipulationComponent(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductManipulationComponent src) throws FHIRException { 262// if (src == null) 263// return null; 264// org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductManipulationComponent tgt = new org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductManipulationComponent(); 265// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 266// if (src.hasDescription()) 267// tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); 268// if (src.hasTime()) 269// tgt.setTime(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getTime())); 270// return tgt; 271// } 272// 273// public static org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent convertBiologicallyDerivedProductStorageComponent(org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent src) throws FHIRException { 274// if (src == null) 275// return null; 276// org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent tgt = new org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent(); 277// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 278// if (src.hasDescription()) 279// tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); 280// if (src.hasTemperature()) 281// tgt.setTemperatureElement(Decimal43_50.convertDecimal(src.getTemperatureElement())); 282// if (src.hasScale()) 283// tgt.setScaleElement(convertBiologicallyDerivedProductStorageScale(src.getScaleElement())); 284// if (src.hasDuration()) 285// tgt.setDuration(Period43_50.convertPeriod(src.getDuration())); 286// return tgt; 287// } 288// 289// public static org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent convertBiologicallyDerivedProductStorageComponent(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent src) throws FHIRException { 290// if (src == null) 291// return null; 292// org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent tgt = new org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageComponent(); 293// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 294// if (src.hasDescription()) 295// tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); 296// if (src.hasTemperature()) 297// tgt.setTemperatureElement(Decimal43_50.convertDecimal(src.getTemperatureElement())); 298// if (src.hasScale()) 299// tgt.setScaleElement(convertBiologicallyDerivedProductStorageScale(src.getScaleElement())); 300// if (src.hasDuration()) 301// tgt.setDuration(Period43_50.convertPeriod(src.getDuration())); 302// return tgt; 303// } 304// 305// static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScale> convertBiologicallyDerivedProductStorageScale(org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScale> src) throws FHIRException { 306// if (src == null || src.isEmpty()) 307// return null; 308// org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScale> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScaleEnumFactory()); 309// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 310// switch (src.getValue()) { 311// case FARENHEIT: 312// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScale.FARENHEIT); 313// break; 314// case CELSIUS: 315// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScale.CELSIUS); 316// break; 317// case KELVIN: 318// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScale.KELVIN); 319// break; 320// default: 321// tgt.setValue(org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScale.NULL); 322// break; 323// } 324// return tgt; 325// } 326// 327// static public org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScale> convertBiologicallyDerivedProductStorageScale(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScale> src) throws FHIRException { 328// if (src == null || src.isEmpty()) 329// return null; 330// org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScale> tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScaleEnumFactory()); 331// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 332// switch (src.getValue()) { 333// case FARENHEIT: 334// tgt.setValue(org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScale.FARENHEIT); 335// break; 336// case CELSIUS: 337// tgt.setValue(org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScale.CELSIUS); 338// break; 339// case KELVIN: 340// tgt.setValue(org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScale.KELVIN); 341// break; 342// default: 343// tgt.setValue(org.hl7.fhir.r4b.model.BiologicallyDerivedProduct.BiologicallyDerivedProductStorageScale.NULL); 344// break; 345// } 346// return tgt; 347// } 348}