public static org.hl7.fhir.dstu2016may.model.Extension convertExtension(org.hl7.fhir.r4.model.Extension src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.Extension tgt = new org.hl7.fhir.dstu2016may.model.Extension(); copyElement(src, tgt); tgt.setUrl(src.getUrl()); if (src.hasValue()) if (CANONICAL_URLS.contains(src.getUrl()) && src.getValue() instanceof org.hl7.fhir.r4.model.CanonicalType) tgt.setValue(convertCanonicalToReference((CanonicalType)src.getValue())); else tgt.setValue(convertType(src.getValue())); return tgt; }
public org.hl7.fhir.instance.model.Extension convertExtension(org.hl7.fhir.r4.model.Extension src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Extension tgt = new org.hl7.fhir.instance.model.Extension(); copyElement(src, tgt); tgt.setUrl(src.getUrl()); if (src.hasValue()) if (CANONICAL_URLS.contains(src.getUrl()) && src.getValue() instanceof org.hl7.fhir.r4.model.CanonicalType) tgt.setValue(convertCanonicalToReference((CanonicalType)src.getValue())); else tgt.setValue(convertType(src.getValue())); tgt.setValue(convertType(src.getValue())); return tgt; }
public static org.hl7.fhir.dstu2016may.model.Extension convertExtension(org.hl7.fhir.r4.model.Extension src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.Extension tgt = new org.hl7.fhir.dstu2016may.model.Extension(); copyElement(src, tgt); tgt.setUrl(src.getUrl()); if (src.hasValue()) if (CANONICAL_URLS.contains(src.getUrl()) && src.getValue() instanceof org.hl7.fhir.r4.model.CanonicalType) tgt.setValue(convertCanonicalToReference((CanonicalType)src.getValue())); else tgt.setValue(convertType(src.getValue())); return tgt; }
public org.hl7.fhir.instance.model.Extension convertExtension(org.hl7.fhir.r4.model.Extension src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Extension tgt = new org.hl7.fhir.instance.model.Extension(); copyElement(src, tgt); tgt.setUrl(src.getUrl()); if (src.hasValue()) if (CANONICAL_URLS.contains(src.getUrl()) && src.getValue() instanceof org.hl7.fhir.r4.model.CanonicalType) tgt.setValue(convertCanonicalToReference((CanonicalType)src.getValue())); else tgt.setValue(convertType(src.getValue())); tgt.setValue(convertType(src.getValue())); return tgt; }