
001package org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50; 002 003import org.hl7.fhir.convertors.context.ConversionContext30_50; 004import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.DateTime30_50; 005import org.hl7.fhir.exceptions.FHIRException; 006 007public class Annotation30_50 { 008 public static org.hl7.fhir.r5.model.Annotation convertAnnotation(org.hl7.fhir.dstu3.model.Annotation src) throws FHIRException { 009 if (src == null) return null; 010 org.hl7.fhir.r5.model.Annotation tgt = new org.hl7.fhir.r5.model.Annotation(); 011 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 012 if (src.hasAuthor()) 013 tgt.setAuthor(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getAuthor())); 014 if (src.hasTime()) tgt.setTimeElement(DateTime30_50.convertDateTime(src.getTimeElement())); 015 if (src.hasText()) tgt.setText(src.getText()); 016 return tgt; 017 } 018 019 public static org.hl7.fhir.dstu3.model.Annotation convertAnnotation(org.hl7.fhir.r5.model.Annotation src) throws FHIRException { 020 if (src == null) return null; 021 org.hl7.fhir.dstu3.model.Annotation tgt = new org.hl7.fhir.dstu3.model.Annotation(); 022 ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); 023 if (src.hasAuthor()) 024 tgt.setAuthor(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getAuthor())); 025 if (src.hasTime()) tgt.setTimeElement(DateTime30_50.convertDateTime(src.getTimeElement())); 026 if (src.hasText()) tgt.setText(src.getText()); 027 return tgt; 028 } 029}