001package org.hl7.fhir.convertors.conv14_30.datatypes14_30;
002
003import org.hl7.fhir.convertors.context.ConversionContext14_30;
004import org.hl7.fhir.convertors.conv14_30.datatypes14_30.primitivetypes14_30.String14_30;
005import org.hl7.fhir.exceptions.FHIRException;
006
007public class Reference14_30 {
008  public static org.hl7.fhir.dstu3.model.Reference convertReference(org.hl7.fhir.dstu2016may.model.Reference src) throws FHIRException {
009    if (src == null || src.isEmpty()) return null;
010    org.hl7.fhir.dstu3.model.Reference tgt = new org.hl7.fhir.dstu3.model.Reference();
011    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
012    if (src.hasReference()) tgt.setReference(src.getReference());
013    if (src.hasDisplay()) tgt.setDisplayElement(String14_30.convertString(src.getDisplayElement()));
014    return tgt;
015  }
016
017  public static org.hl7.fhir.dstu2016may.model.Reference convertReference(org.hl7.fhir.dstu3.model.Reference src) throws FHIRException {
018    if (src == null || src.isEmpty()) return null;
019    org.hl7.fhir.dstu2016may.model.Reference tgt = new org.hl7.fhir.dstu2016may.model.Reference();
020    ConversionContext14_30.INSTANCE.getVersionConvertor_14_30().copyElement(src, tgt);
021    if (src.hasReference()) tgt.setReference(src.getReference());
022    if (src.hasDisplay()) tgt.setDisplayElement(String14_30.convertString(src.getDisplayElement()));
023    return tgt;
024  }
025}