
001package org.hl7.fhir.convertors.conv40_50.resources40_50; 002 003import org.hl7.fhir.convertors.conv40_50.datatypes40_50.BackboneElement40_50; 004import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.CodeableConcept40_50; 005import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Period40_50; 006import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.DateTime40_50; 007import org.hl7.fhir.exceptions.FHIRException; 008 009public class MarketingStatus40_50 extends BackboneElement40_50 { 010 public static org.hl7.fhir.r5.model.MarketingStatus convertMarketingStatus(org.hl7.fhir.r4.model.MarketingStatus src) throws FHIRException { 011 if (src == null) return null; 012 org.hl7.fhir.r5.model.MarketingStatus tgt = new org.hl7.fhir.r5.model.MarketingStatus(); 013 copyBackboneElement(src, tgt); 014 if (src.hasCountry()) tgt.setCountry(CodeableConcept40_50.convertCodeableConcept(src.getCountry())); 015 if (src.hasJurisdiction()) tgt.setJurisdiction(CodeableConcept40_50.convertCodeableConcept(src.getJurisdiction())); 016 if (src.hasStatus()) tgt.setStatus(CodeableConcept40_50.convertCodeableConcept(src.getStatus())); 017 if (src.hasDateRange()) tgt.setDateRange(Period40_50.convertPeriod(src.getDateRange())); 018 if (src.hasRestoreDate()) tgt.setRestoreDateElement(DateTime40_50.convertDateTime(src.getRestoreDateElement())); 019 return tgt; 020 } 021 022 public static org.hl7.fhir.r4.model.MarketingStatus convertMarketingStatus(org.hl7.fhir.r5.model.MarketingStatus src) throws FHIRException { 023 if (src == null) return null; 024 org.hl7.fhir.r4.model.MarketingStatus tgt = new org.hl7.fhir.r4.model.MarketingStatus(); 025 copyBackboneElement(src, tgt); 026 if (src.hasCountry()) tgt.setCountry(CodeableConcept40_50.convertCodeableConcept(src.getCountry())); 027 if (src.hasJurisdiction()) tgt.setJurisdiction(CodeableConcept40_50.convertCodeableConcept(src.getJurisdiction())); 028 if (src.hasStatus()) tgt.setStatus(CodeableConcept40_50.convertCodeableConcept(src.getStatus())); 029 if (src.hasDateRange()) tgt.setDateRange(Period40_50.convertPeriod(src.getDateRange())); 030 if (src.hasRestoreDate()) tgt.setRestoreDateElement(DateTime40_50.convertDateTime(src.getRestoreDateElement())); 031 return tgt; 032 } 033}