
001package org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50; 002 003import org.hl7.fhir.convertors.context.ConversionContext43_50; 004import org.hl7.fhir.exceptions.FHIRException; 005public class Code43_50 { 006 public static org.hl7.fhir.r5.model.CodeType convertCode(org.hl7.fhir.r4b.model.CodeType src) throws FHIRException { 007 org.hl7.fhir.r5.model.CodeType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.CodeType(src.getValueAsString()) : new org.hl7.fhir.r5.model.CodeType(); 008 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 009 return tgt; 010 } 011 012 public static org.hl7.fhir.r4b.model.CodeType convertCode(org.hl7.fhir.r5.model.CodeType src) throws FHIRException { 013 org.hl7.fhir.r4b.model.CodeType tgt = src.hasValue() ? new org.hl7.fhir.r4b.model.CodeType(src.getValueAsString()) : new org.hl7.fhir.r4b.model.CodeType(); 014 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 015 return tgt; 016 } 017// 018// public static org.hl7.fhir.r5.model.Enumeration<AllResourceTypes> convertResourceEnum(org.hl7.fhir.r4b.model.CodeType src) { 019// return new Enumeration<AllResourceTypes>(new org.hl7.fhir.r5.model.Enumerations.AllResourceTypesEnumFactory(), src.getCode()); 020// } 021// 022// public static org.hl7.fhir.r4b.model.CodeType convertResourceEnum(org.hl7.fhir.r5.model.Enumeration<AllResourceTypes> src) { 023// return new org.hl7.fhir.r4b.model.CodeType(src.getCode()); 024// } 025}