
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; 005 006 007public class Id43_50 { 008 public static org.hl7.fhir.r5.model.IdType convertId(org.hl7.fhir.r4b.model.IdType src) throws FHIRException { 009 org.hl7.fhir.r5.model.IdType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.IdType(src.getValueAsString()) : new org.hl7.fhir.r5.model.IdType(); 010 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 011 return tgt; 012 } 013 014 public static org.hl7.fhir.r4b.model.IdType convertId(org.hl7.fhir.r5.model.IdType src) throws FHIRException { 015 org.hl7.fhir.r4b.model.IdType tgt = src.hasValue() ? new org.hl7.fhir.r4b.model.IdType(src.getValueAsString()) : new org.hl7.fhir.r4b.model.IdType(); 016 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 017 return tgt; 018 } 019 020 public static org.hl7.fhir.r5.model.StringType convertIdToString(org.hl7.fhir.r4b.model.IdType src) { 021 org.hl7.fhir.r5.model.StringType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.StringType(src.getValueAsString()) : new org.hl7.fhir.r5.model.StringType(); 022 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 023 return tgt; 024 } 025 026 public static org.hl7.fhir.r4b.model.IdType convertId(org.hl7.fhir.r5.model.StringType src) throws FHIRException { 027 org.hl7.fhir.r4b.model.IdType tgt = src.hasValue() ? new org.hl7.fhir.r4b.model.IdType(src.getValueAsString()) : new org.hl7.fhir.r4b.model.IdType(); 028 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 029 return tgt; 030 } 031 032 public static org.hl7.fhir.r5.model.CodeType convertIdToCode(org.hl7.fhir.r4b.model.IdType src) { 033 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(); 034 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 035 return tgt; 036 } 037 038 public static org.hl7.fhir.r4b.model.IdType convertId(org.hl7.fhir.r5.model.CodeType src) throws FHIRException { 039 org.hl7.fhir.r4b.model.IdType tgt = src.hasValue() ? new org.hl7.fhir.r4b.model.IdType(src.getValueAsString()) : new org.hl7.fhir.r4b.model.IdType(); 040 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 041 return tgt; 042 } 043 044}