001package org.hl7.fhir.convertors.conv40_50.resources40_50; 002 003import org.hl7.fhir.convertors.context.ConversionContext40_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.Identifier40_50; 006import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Period40_50; 007import org.hl7.fhir.convertors.conv40_50.datatypes40_50.metadata40_50.ContactDetail40_50; 008import org.hl7.fhir.convertors.conv40_50.datatypes40_50.metadata40_50.Expression40_50; 009import org.hl7.fhir.convertors.conv40_50.datatypes40_50.metadata40_50.RelatedArtifact40_50; 010import org.hl7.fhir.convertors.conv40_50.datatypes40_50.metadata40_50.UsageContext40_50; 011import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.*; 012import org.hl7.fhir.exceptions.FHIRException; 013 014/* 015 Copyright (c) 2011+, HL7, Inc. 016 All rights reserved. 017 018 Redistribution and use in source and binary forms, with or without modification, 019 are permitted provided that the following conditions are met: 020 021 * Redistributions of source code must retain the above copyright notice, this 022 list of conditions and the following disclaimer. 023 * Redistributions in binary form must reproduce the above copyright notice, 024 this list of conditions and the following disclaimer in the documentation 025 and/or other materials provided with the distribution. 026 * Neither the name of HL7 nor the names of its contributors may be used to 027 endorse or promote products derived from this software without specific 028 prior written permission. 029 030 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 031 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 032 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 033 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 034 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 035 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 036 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 037 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 038 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 039 POSSIBILITY OF SUCH DAMAGE. 040 041*/ 042// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 043public class Measure40_50 { 044 045 public static org.hl7.fhir.r5.model.Measure convertMeasure(org.hl7.fhir.r4.model.Measure src) throws FHIRException { 046 if (src == null) 047 return null; 048 org.hl7.fhir.r5.model.Measure tgt = new org.hl7.fhir.r5.model.Measure(); 049 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt); 050 if (src.hasUrl()) 051 tgt.setUrlElement(Uri40_50.convertUri(src.getUrlElement())); 052 for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) 053 tgt.addIdentifier(Identifier40_50.convertIdentifier(t)); 054 if (src.hasVersion()) 055 tgt.setVersionElement(String40_50.convertString(src.getVersionElement())); 056 if (src.hasName()) 057 tgt.setNameElement(String40_50.convertString(src.getNameElement())); 058 if (src.hasTitle()) 059 tgt.setTitleElement(String40_50.convertString(src.getTitleElement())); 060 if (src.hasSubtitle()) 061 tgt.setSubtitleElement(String40_50.convertString(src.getSubtitleElement())); 062 if (src.hasStatus()) 063 tgt.setStatusElement(Enumerations40_50.convertPublicationStatus(src.getStatusElement())); 064 if (src.hasExperimental()) 065 tgt.setExperimentalElement(Boolean40_50.convertBoolean(src.getExperimentalElement())); 066 if (src.hasSubject()) 067 tgt.setSubject(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getSubject())); 068 if (src.hasDate()) 069 tgt.setDateElement(DateTime40_50.convertDateTime(src.getDateElement())); 070 if (src.hasPublisher()) 071 tgt.setPublisherElement(String40_50.convertString(src.getPublisherElement())); 072 for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) 073 tgt.addContact(ContactDetail40_50.convertContactDetail(t)); 074 if (src.hasDescription()) 075 tgt.setDescriptionElement(MarkDown40_50.convertMarkdown(src.getDescriptionElement())); 076 for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) 077 tgt.addUseContext(UsageContext40_50.convertUsageContext(t)); 078 for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) 079 tgt.addJurisdiction(CodeableConcept40_50.convertCodeableConcept(t)); 080 if (src.hasPurpose()) 081 tgt.setPurposeElement(MarkDown40_50.convertMarkdown(src.getPurposeElement())); 082 if (src.hasUsage()) 083 tgt.setUsageElement(String40_50.convertString(src.getUsageElement())); 084 if (src.hasCopyright()) 085 tgt.setCopyrightElement(MarkDown40_50.convertMarkdown(src.getCopyrightElement())); 086 if (src.hasApprovalDate()) 087 tgt.setApprovalDateElement(Date40_50.convertDate(src.getApprovalDateElement())); 088 if (src.hasLastReviewDate()) 089 tgt.setLastReviewDateElement(Date40_50.convertDate(src.getLastReviewDateElement())); 090 if (src.hasEffectivePeriod()) 091 tgt.setEffectivePeriod(Period40_50.convertPeriod(src.getEffectivePeriod())); 092 for (org.hl7.fhir.r4.model.CodeableConcept t : src.getTopic()) 093 tgt.addTopic(CodeableConcept40_50.convertCodeableConcept(t)); 094 for (org.hl7.fhir.r4.model.ContactDetail t : src.getAuthor()) 095 tgt.addAuthor(ContactDetail40_50.convertContactDetail(t)); 096 for (org.hl7.fhir.r4.model.ContactDetail t : src.getEditor()) 097 tgt.addEditor(ContactDetail40_50.convertContactDetail(t)); 098 for (org.hl7.fhir.r4.model.ContactDetail t : src.getReviewer()) 099 tgt.addReviewer(ContactDetail40_50.convertContactDetail(t)); 100 for (org.hl7.fhir.r4.model.ContactDetail t : src.getEndorser()) 101 tgt.addEndorser(ContactDetail40_50.convertContactDetail(t)); 102 for (org.hl7.fhir.r4.model.RelatedArtifact t : src.getRelatedArtifact()) 103 tgt.addRelatedArtifact(RelatedArtifact40_50.convertRelatedArtifact(t)); 104 for (org.hl7.fhir.r4.model.CanonicalType t : src.getLibrary()) 105 tgt.getLibrary().add(Canonical40_50.convertCanonical(t)); 106 if (src.hasDisclaimer()) 107 tgt.setDisclaimerElement(MarkDown40_50.convertMarkdown(src.getDisclaimerElement())); 108 if (src.hasScoring()) 109 tgt.setScoring(CodeableConcept40_50.convertCodeableConcept(src.getScoring())); 110 if (src.hasCompositeScoring()) 111 tgt.setCompositeScoring(CodeableConcept40_50.convertCodeableConcept(src.getCompositeScoring())); 112 for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType()) 113 tgt.addType(CodeableConcept40_50.convertCodeableConcept(t)); 114 if (src.hasRiskAdjustment()) 115 tgt.setRiskAdjustmentElement(String40_50.convertString(src.getRiskAdjustmentElement())); 116 if (src.hasRateAggregation()) 117 tgt.setRateAggregationElement(String40_50.convertString(src.getRateAggregationElement())); 118 if (src.hasRationale()) 119 tgt.setRationaleElement(MarkDown40_50.convertMarkdown(src.getRationaleElement())); 120 if (src.hasClinicalRecommendationStatement()) 121 tgt.setClinicalRecommendationStatementElement(MarkDown40_50.convertMarkdown(src.getClinicalRecommendationStatementElement())); 122 if (src.hasImprovementNotation()) 123 tgt.setImprovementNotation(CodeableConcept40_50.convertCodeableConcept(src.getImprovementNotation())); 124 for (org.hl7.fhir.r4.model.MarkdownType t : src.getDefinition()) 125 tgt.getDefinition().add(MarkDown40_50.convertMarkdown(t)); 126 if (src.hasGuidance()) 127 tgt.setGuidanceElement(MarkDown40_50.convertMarkdown(src.getGuidanceElement())); 128 for (org.hl7.fhir.r4.model.Measure.MeasureGroupComponent t : src.getGroup()) 129 tgt.addGroup(convertMeasureGroupComponent(t)); 130 for (org.hl7.fhir.r4.model.Measure.MeasureSupplementalDataComponent t : src.getSupplementalData()) 131 tgt.addSupplementalData(convertMeasureSupplementalDataComponent(t)); 132 return tgt; 133 } 134 135 public static org.hl7.fhir.r4.model.Measure convertMeasure(org.hl7.fhir.r5.model.Measure src) throws FHIRException { 136 if (src == null) 137 return null; 138 org.hl7.fhir.r4.model.Measure tgt = new org.hl7.fhir.r4.model.Measure(); 139 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt); 140 if (src.hasUrl()) 141 tgt.setUrlElement(Uri40_50.convertUri(src.getUrlElement())); 142 for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) 143 tgt.addIdentifier(Identifier40_50.convertIdentifier(t)); 144 if (src.hasVersion()) 145 tgt.setVersionElement(String40_50.convertString(src.getVersionElement())); 146 if (src.hasName()) 147 tgt.setNameElement(String40_50.convertString(src.getNameElement())); 148 if (src.hasTitle()) 149 tgt.setTitleElement(String40_50.convertString(src.getTitleElement())); 150 if (src.hasSubtitle()) 151 tgt.setSubtitleElement(String40_50.convertString(src.getSubtitleElement())); 152 if (src.hasStatus()) 153 tgt.setStatusElement(Enumerations40_50.convertPublicationStatus(src.getStatusElement())); 154 if (src.hasExperimental()) 155 tgt.setExperimentalElement(Boolean40_50.convertBoolean(src.getExperimentalElement())); 156 if (src.hasSubject()) 157 tgt.setSubject(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getSubject())); 158 if (src.hasDate()) 159 tgt.setDateElement(DateTime40_50.convertDateTime(src.getDateElement())); 160 if (src.hasPublisher()) 161 tgt.setPublisherElement(String40_50.convertString(src.getPublisherElement())); 162 for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) 163 tgt.addContact(ContactDetail40_50.convertContactDetail(t)); 164 if (src.hasDescription()) 165 tgt.setDescriptionElement(MarkDown40_50.convertMarkdown(src.getDescriptionElement())); 166 for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) 167 tgt.addUseContext(UsageContext40_50.convertUsageContext(t)); 168 for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) 169 tgt.addJurisdiction(CodeableConcept40_50.convertCodeableConcept(t)); 170 if (src.hasPurpose()) 171 tgt.setPurposeElement(MarkDown40_50.convertMarkdown(src.getPurposeElement())); 172 if (src.hasUsage()) 173 tgt.setUsageElement(String40_50.convertString(src.getUsageElement())); 174 if (src.hasCopyright()) 175 tgt.setCopyrightElement(MarkDown40_50.convertMarkdown(src.getCopyrightElement())); 176 if (src.hasApprovalDate()) 177 tgt.setApprovalDateElement(Date40_50.convertDate(src.getApprovalDateElement())); 178 if (src.hasLastReviewDate()) 179 tgt.setLastReviewDateElement(Date40_50.convertDate(src.getLastReviewDateElement())); 180 if (src.hasEffectivePeriod()) 181 tgt.setEffectivePeriod(Period40_50.convertPeriod(src.getEffectivePeriod())); 182 for (org.hl7.fhir.r5.model.CodeableConcept t : src.getTopic()) 183 tgt.addTopic(CodeableConcept40_50.convertCodeableConcept(t)); 184 for (org.hl7.fhir.r5.model.ContactDetail t : src.getAuthor()) 185 tgt.addAuthor(ContactDetail40_50.convertContactDetail(t)); 186 for (org.hl7.fhir.r5.model.ContactDetail t : src.getEditor()) 187 tgt.addEditor(ContactDetail40_50.convertContactDetail(t)); 188 for (org.hl7.fhir.r5.model.ContactDetail t : src.getReviewer()) 189 tgt.addReviewer(ContactDetail40_50.convertContactDetail(t)); 190 for (org.hl7.fhir.r5.model.ContactDetail t : src.getEndorser()) 191 tgt.addEndorser(ContactDetail40_50.convertContactDetail(t)); 192 for (org.hl7.fhir.r5.model.RelatedArtifact t : src.getRelatedArtifact()) 193 tgt.addRelatedArtifact(RelatedArtifact40_50.convertRelatedArtifact(t)); 194 for (org.hl7.fhir.r5.model.CanonicalType t : src.getLibrary()) 195 tgt.getLibrary().add(Canonical40_50.convertCanonical(t)); 196 if (src.hasDisclaimer()) 197 tgt.setDisclaimerElement(MarkDown40_50.convertMarkdown(src.getDisclaimerElement())); 198 if (src.hasScoring()) 199 tgt.setScoring(CodeableConcept40_50.convertCodeableConcept(src.getScoring())); 200 if (src.hasCompositeScoring()) 201 tgt.setCompositeScoring(CodeableConcept40_50.convertCodeableConcept(src.getCompositeScoring())); 202 for (org.hl7.fhir.r5.model.CodeableConcept t : src.getType()) 203 tgt.addType(CodeableConcept40_50.convertCodeableConcept(t)); 204 if (src.hasRiskAdjustment()) 205 tgt.setRiskAdjustmentElement(String40_50.convertString(src.getRiskAdjustmentElement())); 206 if (src.hasRateAggregation()) 207 tgt.setRateAggregationElement(String40_50.convertString(src.getRateAggregationElement())); 208 if (src.hasRationale()) 209 tgt.setRationaleElement(MarkDown40_50.convertMarkdown(src.getRationaleElement())); 210 if (src.hasClinicalRecommendationStatement()) 211 tgt.setClinicalRecommendationStatementElement(MarkDown40_50.convertMarkdown(src.getClinicalRecommendationStatementElement())); 212 if (src.hasImprovementNotation()) 213 tgt.setImprovementNotation(CodeableConcept40_50.convertCodeableConcept(src.getImprovementNotation())); 214 for (org.hl7.fhir.r5.model.MarkdownType t : src.getDefinition()) 215 tgt.getDefinition().add(MarkDown40_50.convertMarkdown(t)); 216 if (src.hasGuidance()) 217 tgt.setGuidanceElement(MarkDown40_50.convertMarkdown(src.getGuidanceElement())); 218 for (org.hl7.fhir.r5.model.Measure.MeasureGroupComponent t : src.getGroup()) 219 tgt.addGroup(convertMeasureGroupComponent(t)); 220 for (org.hl7.fhir.r5.model.Measure.MeasureSupplementalDataComponent t : src.getSupplementalData()) 221 tgt.addSupplementalData(convertMeasureSupplementalDataComponent(t)); 222 return tgt; 223 } 224 225 public static org.hl7.fhir.r5.model.Measure.MeasureGroupComponent convertMeasureGroupComponent(org.hl7.fhir.r4.model.Measure.MeasureGroupComponent src) throws FHIRException { 226 if (src == null) 227 return null; 228 org.hl7.fhir.r5.model.Measure.MeasureGroupComponent tgt = new org.hl7.fhir.r5.model.Measure.MeasureGroupComponent(); 229 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 230 if (src.hasCode()) 231 tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode())); 232 if (src.hasDescription()) 233 tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); 234 for (org.hl7.fhir.r4.model.Measure.MeasureGroupPopulationComponent t : src.getPopulation()) 235 tgt.addPopulation(convertMeasureGroupPopulationComponent(t)); 236 for (org.hl7.fhir.r4.model.Measure.MeasureGroupStratifierComponent t : src.getStratifier()) 237 tgt.addStratifier(convertMeasureGroupStratifierComponent(t)); 238 return tgt; 239 } 240 241 public static org.hl7.fhir.r4.model.Measure.MeasureGroupComponent convertMeasureGroupComponent(org.hl7.fhir.r5.model.Measure.MeasureGroupComponent src) throws FHIRException { 242 if (src == null) 243 return null; 244 org.hl7.fhir.r4.model.Measure.MeasureGroupComponent tgt = new org.hl7.fhir.r4.model.Measure.MeasureGroupComponent(); 245 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 246 if (src.hasCode()) 247 tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode())); 248 if (src.hasDescription()) 249 tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); 250 for (org.hl7.fhir.r5.model.Measure.MeasureGroupPopulationComponent t : src.getPopulation()) 251 tgt.addPopulation(convertMeasureGroupPopulationComponent(t)); 252 for (org.hl7.fhir.r5.model.Measure.MeasureGroupStratifierComponent t : src.getStratifier()) 253 tgt.addStratifier(convertMeasureGroupStratifierComponent(t)); 254 return tgt; 255 } 256 257 public static org.hl7.fhir.r5.model.Measure.MeasureGroupPopulationComponent convertMeasureGroupPopulationComponent(org.hl7.fhir.r4.model.Measure.MeasureGroupPopulationComponent src) throws FHIRException { 258 if (src == null) 259 return null; 260 org.hl7.fhir.r5.model.Measure.MeasureGroupPopulationComponent tgt = new org.hl7.fhir.r5.model.Measure.MeasureGroupPopulationComponent(); 261 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 262 if (src.hasCode()) 263 tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode())); 264 if (src.hasDescription()) 265 tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); 266 if (src.hasCriteria()) 267 tgt.setCriteria(Expression40_50.convertExpression(src.getCriteria())); 268 return tgt; 269 } 270 271 public static org.hl7.fhir.r4.model.Measure.MeasureGroupPopulationComponent convertMeasureGroupPopulationComponent(org.hl7.fhir.r5.model.Measure.MeasureGroupPopulationComponent src) throws FHIRException { 272 if (src == null) 273 return null; 274 org.hl7.fhir.r4.model.Measure.MeasureGroupPopulationComponent tgt = new org.hl7.fhir.r4.model.Measure.MeasureGroupPopulationComponent(); 275 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 276 if (src.hasCode()) 277 tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode())); 278 if (src.hasDescription()) 279 tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); 280 if (src.hasCriteria()) 281 tgt.setCriteria(Expression40_50.convertExpression(src.getCriteria())); 282 return tgt; 283 } 284 285 public static org.hl7.fhir.r5.model.Measure.MeasureGroupStratifierComponent convertMeasureGroupStratifierComponent(org.hl7.fhir.r4.model.Measure.MeasureGroupStratifierComponent src) throws FHIRException { 286 if (src == null) 287 return null; 288 org.hl7.fhir.r5.model.Measure.MeasureGroupStratifierComponent tgt = new org.hl7.fhir.r5.model.Measure.MeasureGroupStratifierComponent(); 289 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 290 if (src.hasCode()) 291 tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode())); 292 if (src.hasDescription()) 293 tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); 294 if (src.hasCriteria()) 295 tgt.setCriteria(Expression40_50.convertExpression(src.getCriteria())); 296 for (org.hl7.fhir.r4.model.Measure.MeasureGroupStratifierComponentComponent t : src.getComponent()) 297 tgt.addComponent(convertMeasureGroupStratifierComponentComponent(t)); 298 return tgt; 299 } 300 301 public static org.hl7.fhir.r4.model.Measure.MeasureGroupStratifierComponent convertMeasureGroupStratifierComponent(org.hl7.fhir.r5.model.Measure.MeasureGroupStratifierComponent src) throws FHIRException { 302 if (src == null) 303 return null; 304 org.hl7.fhir.r4.model.Measure.MeasureGroupStratifierComponent tgt = new org.hl7.fhir.r4.model.Measure.MeasureGroupStratifierComponent(); 305 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 306 if (src.hasCode()) 307 tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode())); 308 if (src.hasDescription()) 309 tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); 310 if (src.hasCriteria()) 311 tgt.setCriteria(Expression40_50.convertExpression(src.getCriteria())); 312 for (org.hl7.fhir.r5.model.Measure.MeasureGroupStratifierComponentComponent t : src.getComponent()) 313 tgt.addComponent(convertMeasureGroupStratifierComponentComponent(t)); 314 return tgt; 315 } 316 317 public static org.hl7.fhir.r5.model.Measure.MeasureGroupStratifierComponentComponent convertMeasureGroupStratifierComponentComponent(org.hl7.fhir.r4.model.Measure.MeasureGroupStratifierComponentComponent src) throws FHIRException { 318 if (src == null) 319 return null; 320 org.hl7.fhir.r5.model.Measure.MeasureGroupStratifierComponentComponent tgt = new org.hl7.fhir.r5.model.Measure.MeasureGroupStratifierComponentComponent(); 321 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 322 if (src.hasCode()) 323 tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode())); 324 if (src.hasDescription()) 325 tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); 326 if (src.hasCriteria()) 327 tgt.setCriteria(Expression40_50.convertExpression(src.getCriteria())); 328 return tgt; 329 } 330 331 public static org.hl7.fhir.r4.model.Measure.MeasureGroupStratifierComponentComponent convertMeasureGroupStratifierComponentComponent(org.hl7.fhir.r5.model.Measure.MeasureGroupStratifierComponentComponent src) throws FHIRException { 332 if (src == null) 333 return null; 334 org.hl7.fhir.r4.model.Measure.MeasureGroupStratifierComponentComponent tgt = new org.hl7.fhir.r4.model.Measure.MeasureGroupStratifierComponentComponent(); 335 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 336 if (src.hasCode()) 337 tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode())); 338 if (src.hasDescription()) 339 tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); 340 if (src.hasCriteria()) 341 tgt.setCriteria(Expression40_50.convertExpression(src.getCriteria())); 342 return tgt; 343 } 344 345 public static org.hl7.fhir.r5.model.Measure.MeasureSupplementalDataComponent convertMeasureSupplementalDataComponent(org.hl7.fhir.r4.model.Measure.MeasureSupplementalDataComponent src) throws FHIRException { 346 if (src == null) 347 return null; 348 org.hl7.fhir.r5.model.Measure.MeasureSupplementalDataComponent tgt = new org.hl7.fhir.r5.model.Measure.MeasureSupplementalDataComponent(); 349 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 350 if (src.hasCode()) 351 tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode())); 352 for (org.hl7.fhir.r4.model.CodeableConcept t : src.getUsage()) 353 tgt.addUsage(CodeableConcept40_50.convertCodeableConcept(t)); 354 if (src.hasDescription()) 355 tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); 356 if (src.hasCriteria()) 357 tgt.setCriteria(Expression40_50.convertExpression(src.getCriteria())); 358 return tgt; 359 } 360 361 public static org.hl7.fhir.r4.model.Measure.MeasureSupplementalDataComponent convertMeasureSupplementalDataComponent(org.hl7.fhir.r5.model.Measure.MeasureSupplementalDataComponent src) throws FHIRException { 362 if (src == null) 363 return null; 364 org.hl7.fhir.r4.model.Measure.MeasureSupplementalDataComponent tgt = new org.hl7.fhir.r4.model.Measure.MeasureSupplementalDataComponent(); 365 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 366 if (src.hasCode()) 367 tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode())); 368 for (org.hl7.fhir.r5.model.CodeableConcept t : src.getUsage()) 369 tgt.addUsage(CodeableConcept40_50.convertCodeableConcept(t)); 370 if (src.hasDescription()) 371 tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); 372 if (src.hasCriteria()) 373 tgt.setCriteria(Expression40_50.convertExpression(src.getCriteria())); 374 return tgt; 375 } 376}