001package org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50; 002 003import org.hl7.fhir.convertors.context.ConversionContext14_50; 004import org.hl7.fhir.exceptions.FHIRException; 005 006public class Code14_50 { 007 public static org.hl7.fhir.r5.model.CodeType convertCode(org.hl7.fhir.dstu2016may.model.CodeType src) throws FHIRException { 008 org.hl7.fhir.r5.model.CodeType tgt = new org.hl7.fhir.r5.model.CodeType(); 009 if (src.hasValue()) tgt.setValue(src.getValue()); 010 ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt); 011 return tgt; 012 } 013 014 public static org.hl7.fhir.dstu2016may.model.CodeType convertCode(org.hl7.fhir.r5.model.CodeType src) throws FHIRException { 015 org.hl7.fhir.dstu2016may.model.CodeType tgt = new org.hl7.fhir.dstu2016may.model.CodeType(); 016 if (src.hasValue()) tgt.setValue(src.getValue()); 017 ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt); 018 return tgt; 019 } 020 021 public static org.hl7.fhir.r5.model.UriType convertCodeToUri(org.hl7.fhir.dstu2016may.model.CodeType src) throws FHIRException { 022 org.hl7.fhir.r5.model.UriType tgt = new org.hl7.fhir.r5.model.UriType(); 023 if (src.hasValue()) tgt.setValue(src.getValue()); 024 ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt); 025 return tgt; 026 } 027 028 public static org.hl7.fhir.dstu2016may.model.CodeType convertCode(org.hl7.fhir.r5.model.UriType src) throws FHIRException { 029 org.hl7.fhir.dstu2016may.model.CodeType tgt = new org.hl7.fhir.dstu2016may.model.CodeType(); 030 if (src.hasValue()) tgt.setValue(src.getValue()); 031 ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt); 032 return tgt; 033 } 034}