001package org.hl7.fhir.convertors.conv43_50.resources43_50; 002 003import org.hl7.fhir.convertors.context.ConversionContext43_50; 004import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.CodeableConcept43_50; 005import org.hl7.fhir.convertors.conv43_50.datatypes43_50.metadata43_50.ContactDetail43_50; 006import org.hl7.fhir.convertors.conv43_50.datatypes43_50.metadata43_50.UsageContext43_50; 007import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Boolean43_50; 008import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.DateTime43_50; 009import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.MarkDown43_50; 010import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.String43_50; 011import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Uri43_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 GraphDefinition43_50 { 044 045 public static org.hl7.fhir.r5.model.GraphDefinition convertGraphDefinition(org.hl7.fhir.r4b.model.GraphDefinition src) throws FHIRException { 046 if (src == null) 047 return null; 048 org.hl7.fhir.r5.model.GraphDefinition tgt = new org.hl7.fhir.r5.model.GraphDefinition(); 049 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyDomainResource(src, tgt); 050 if (src.hasUrl()) 051 tgt.setUrlElement(Uri43_50.convertUri(src.getUrlElement())); 052 if (src.hasVersion()) 053 tgt.setVersionElement(String43_50.convertString(src.getVersionElement())); 054 if (src.hasName()) 055 tgt.setNameElement(String43_50.convertString(src.getNameElement())); 056 if (src.hasStatus()) 057 tgt.setStatusElement(Enumerations43_50.convertPublicationStatus(src.getStatusElement())); 058 if (src.hasExperimental()) 059 tgt.setExperimentalElement(Boolean43_50.convertBoolean(src.getExperimentalElement())); 060 if (src.hasDate()) 061 tgt.setDateElement(DateTime43_50.convertDateTime(src.getDateElement())); 062 if (src.hasPublisher()) 063 tgt.setPublisherElement(String43_50.convertString(src.getPublisherElement())); 064 for (org.hl7.fhir.r4b.model.ContactDetail t : src.getContact()) 065 tgt.addContact(ContactDetail43_50.convertContactDetail(t)); 066 if (src.hasDescription()) 067 tgt.setDescriptionElement(MarkDown43_50.convertMarkdown(src.getDescriptionElement())); 068 for (org.hl7.fhir.r4b.model.UsageContext t : src.getUseContext()) 069 tgt.addUseContext(UsageContext43_50.convertUsageContext(t)); 070 for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getJurisdiction()) 071 tgt.addJurisdiction(CodeableConcept43_50.convertCodeableConcept(t)); 072 if (src.hasPurpose()) 073 tgt.setPurposeElement(MarkDown43_50.convertMarkdown(src.getPurposeElement())); 074// if (src.hasStart()) 075// tgt.setStartElement(Code43_50.convertCode(src.getStartElement())); 076// if (src.hasProfile()) 077// tgt.setProfileElement(Canonical43_50.convertCanonical(src.getProfileElement())); 078// for (org.hl7.fhir.r4b.model.GraphDefinition.GraphDefinitionLinkComponent t : src.getLink()) 079// tgt.addLink(convertGraphDefinitionLinkComponent(t)); 080 return tgt; 081 } 082 083 public static org.hl7.fhir.r4b.model.GraphDefinition convertGraphDefinition(org.hl7.fhir.r5.model.GraphDefinition src) throws FHIRException { 084 if (src == null) 085 return null; 086 org.hl7.fhir.r4b.model.GraphDefinition tgt = new org.hl7.fhir.r4b.model.GraphDefinition(); 087 ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyDomainResource(src, tgt); 088 if (src.hasUrl()) 089 tgt.setUrlElement(Uri43_50.convertUri(src.getUrlElement())); 090 if (src.hasVersion()) 091 tgt.setVersionElement(String43_50.convertString(src.getVersionElement())); 092 if (src.hasName()) 093 tgt.setNameElement(String43_50.convertString(src.getNameElement())); 094 if (src.hasStatus()) 095 tgt.setStatusElement(Enumerations43_50.convertPublicationStatus(src.getStatusElement())); 096 if (src.hasExperimental()) 097 tgt.setExperimentalElement(Boolean43_50.convertBoolean(src.getExperimentalElement())); 098 if (src.hasDate()) 099 tgt.setDateElement(DateTime43_50.convertDateTime(src.getDateElement())); 100 if (src.hasPublisher()) 101 tgt.setPublisherElement(String43_50.convertString(src.getPublisherElement())); 102 for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact()) 103 tgt.addContact(ContactDetail43_50.convertContactDetail(t)); 104 if (src.hasDescription()) 105 tgt.setDescriptionElement(MarkDown43_50.convertMarkdown(src.getDescriptionElement())); 106 for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext()) 107 tgt.addUseContext(UsageContext43_50.convertUsageContext(t)); 108 for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction()) 109 tgt.addJurisdiction(CodeableConcept43_50.convertCodeableConcept(t)); 110 if (src.hasPurpose()) 111 tgt.setPurposeElement(MarkDown43_50.convertMarkdown(src.getPurposeElement())); 112// if (src.hasStart()) 113// tgt.setStartElement(Code43_50.convertCode(src.getStartElement())); 114// if (src.hasProfile()) 115// tgt.setProfileElement(Canonical43_50.convertCanonical(src.getProfileElement())); 116// for (org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkComponent t : src.getLink()) 117// tgt.addLink(convertGraphDefinitionLinkComponent(t)); 118 return tgt; 119 } 120// 121// public static org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkComponent convertGraphDefinitionLinkComponent(org.hl7.fhir.r4b.model.GraphDefinition.GraphDefinitionLinkComponent src) throws FHIRException { 122// if (src == null) 123// return null; 124// org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkComponent tgt = new org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkComponent(); 125// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); 126// if (src.hasPath()) 127// tgt.setPathElement(String43_50.convertString(src.getPathElement())); 128// if (src.hasSliceName()) 129// tgt.setSliceNameElement(String43_50.convertString(src.getSliceNameElement())); 130// if (src.hasMin()) 131// tgt.setMinElement(Integer43_50.convertInteger(src.getMinElement())); 132// if (src.hasMax()) 133// tgt.setMaxElement(String43_50.convertString(src.getMaxElement())); 134// if (src.hasDescription()) 135// tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); 136// for (org.hl7.fhir.r4b.model.GraphDefinition.GraphDefinitionLinkTargetComponent t : src.getTarget()) 137// tgt.addTarget(convertGraphDefinitionLinkTargetComponent(t)); 138// return tgt; 139// } 140// 141// public static org.hl7.fhir.r4b.model.GraphDefinition.GraphDefinitionLinkComponent convertGraphDefinitionLinkComponent(org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkComponent src) throws FHIRException { 142// if (src == null) 143// return null; 144// org.hl7.fhir.r4b.model.GraphDefinition.GraphDefinitionLinkComponent tgt = new org.hl7.fhir.r4b.model.GraphDefinition.GraphDefinitionLinkComponent(); 145// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); 146// if (src.hasPath()) 147// tgt.setPathElement(String43_50.convertString(src.getPathElement())); 148// if (src.hasSliceName()) 149// tgt.setSliceNameElement(String43_50.convertString(src.getSliceNameElement())); 150// if (src.hasMin()) 151// tgt.setMinElement(Integer43_50.convertInteger(src.getMinElement())); 152// if (src.hasMax()) 153// tgt.setMaxElement(String43_50.convertString(src.getMaxElement())); 154// if (src.hasDescription()) 155// tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); 156// for (org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkTargetComponent t : src.getTarget()) 157// tgt.addTarget(convertGraphDefinitionLinkTargetComponent(t)); 158// return tgt; 159// } 160// 161// public static org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkTargetComponent convertGraphDefinitionLinkTargetComponent(org.hl7.fhir.r4b.model.GraphDefinition.GraphDefinitionLinkTargetComponent src) throws FHIRException { 162// if (src == null) 163// return null; 164// org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkTargetComponent tgt = new org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkTargetComponent(); 165// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); 166// if (src.hasType()) 167// tgt.setTypeElement(Code43_50.convertResourceEnum(src.getTypeElement())); 168// if (src.hasParams()) 169// tgt.setParamsElement(String43_50.convertString(src.getParamsElement())); 170// if (src.hasProfile()) 171// tgt.setProfileElement(Canonical43_50.convertCanonical(src.getProfileElement())); 172// for (org.hl7.fhir.r4b.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent t : src.getCompartment()) 173// tgt.addCompartment(convertGraphDefinitionLinkTargetCompartmentComponent(t)); 174// for (org.hl7.fhir.r4b.model.GraphDefinition.GraphDefinitionLinkComponent t : src.getLink()) 175// tgt.addLink(convertGraphDefinitionLinkComponent(t)); 176// return tgt; 177// } 178// 179// public static org.hl7.fhir.r4b.model.GraphDefinition.GraphDefinitionLinkTargetComponent convertGraphDefinitionLinkTargetComponent(org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkTargetComponent src) throws FHIRException { 180// if (src == null) 181// return null; 182// org.hl7.fhir.r4b.model.GraphDefinition.GraphDefinitionLinkTargetComponent tgt = new org.hl7.fhir.r4b.model.GraphDefinition.GraphDefinitionLinkTargetComponent(); 183// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); 184// if (src.hasType()) 185// tgt.setTypeElement(Code43_50.convertResourceEnum(src.getTypeElement())); 186// if (src.hasParams()) 187// tgt.setParamsElement(String43_50.convertString(src.getParamsElement())); 188// if (src.hasProfile()) 189// tgt.setProfileElement(Canonical43_50.convertCanonical(src.getProfileElement())); 190// for (org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent t : src.getCompartment()) 191// tgt.addCompartment(convertGraphDefinitionLinkTargetCompartmentComponent(t)); 192// for (org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkComponent t : src.getLink()) 193// tgt.addLink(convertGraphDefinitionLinkComponent(t)); 194// return tgt; 195// } 196// 197// public static org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent convertGraphDefinitionLinkTargetCompartmentComponent(org.hl7.fhir.r4b.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent src) throws FHIRException { 198// if (src == null) 199// return null; 200// org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent tgt = new org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent(); 201// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); 202// if (src.hasUse()) 203// tgt.setUseElement(convertGraphCompartmentUse(src.getUseElement())); 204// if (src.hasCode()) 205// tgt.setCodeElement(convertCompartmentCode(src.getCodeElement())); 206// if (src.hasRule()) 207// tgt.setRuleElement(convertGraphCompartmentRule(src.getRuleElement())); 208// if (src.hasExpression()) 209// tgt.setExpressionElement(String43_50.convertString(src.getExpressionElement())); 210// if (src.hasDescription()) 211// tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); 212// return tgt; 213// } 214// 215// public static org.hl7.fhir.r4b.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent convertGraphDefinitionLinkTargetCompartmentComponent(org.hl7.fhir.r5.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent src) throws FHIRException { 216// if (src == null) 217// return null; 218// org.hl7.fhir.r4b.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent tgt = new org.hl7.fhir.r4b.model.GraphDefinition.GraphDefinitionLinkTargetCompartmentComponent(); 219// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); 220// if (src.hasUse()) 221// tgt.setUseElement(convertGraphCompartmentUse(src.getUseElement())); 222// if (src.hasCode()) 223// tgt.setCodeElement(convertCompartmentCode(src.getCodeElement())); 224// if (src.hasRule()) 225// tgt.setRuleElement(convertGraphCompartmentRule(src.getRuleElement())); 226// if (src.hasExpression()) 227// tgt.setExpressionElement(String43_50.convertString(src.getExpressionElement())); 228// if (src.hasDescription()) 229// tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); 230// return tgt; 231// } 232// 233// static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.GraphDefinition.GraphCompartmentUse> convertGraphCompartmentUse(org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.GraphDefinition.GraphCompartmentUse> src) throws FHIRException { 234// if (src == null || src.isEmpty()) 235// return null; 236// org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.GraphDefinition.GraphCompartmentUse> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.GraphDefinition.GraphCompartmentUseEnumFactory()); 237// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 238// switch (src.getValue()) { 239// case CONDITION: 240// tgt.setValue(org.hl7.fhir.r5.model.GraphDefinition.GraphCompartmentUse.CONDITION); 241// break; 242// case REQUIREMENT: 243// tgt.setValue(org.hl7.fhir.r5.model.GraphDefinition.GraphCompartmentUse.REQUIREMENT); 244// break; 245// default: 246// tgt.setValue(org.hl7.fhir.r5.model.GraphDefinition.GraphCompartmentUse.NULL); 247// break; 248// } 249// return tgt; 250// } 251// 252// static public org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.GraphDefinition.GraphCompartmentUse> convertGraphCompartmentUse(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.GraphDefinition.GraphCompartmentUse> src) throws FHIRException { 253// if (src == null || src.isEmpty()) 254// return null; 255// org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.GraphDefinition.GraphCompartmentUse> tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.GraphDefinition.GraphCompartmentUseEnumFactory()); 256// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 257// switch (src.getValue()) { 258// case CONDITION: 259// tgt.setValue(org.hl7.fhir.r4b.model.GraphDefinition.GraphCompartmentUse.CONDITION); 260// break; 261// case REQUIREMENT: 262// tgt.setValue(org.hl7.fhir.r4b.model.GraphDefinition.GraphCompartmentUse.REQUIREMENT); 263// break; 264// default: 265// tgt.setValue(org.hl7.fhir.r4b.model.GraphDefinition.GraphCompartmentUse.NULL); 266// break; 267// } 268// return tgt; 269// } 270// 271// static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.CompartmentType> convertCompartmentCode(org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.Enumerations.CompartmentType> src) throws FHIRException { 272// if (src == null || src.isEmpty()) 273// return null; 274// org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.CompartmentType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.CompartmentTypeEnumFactory()); 275// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 276// switch (src.getValue()) { 277// case PATIENT: 278// tgt.setValue(org.hl7.fhir.r5.model.Enumerations.CompartmentType.PATIENT); 279// break; 280// case ENCOUNTER: 281// tgt.setValue(org.hl7.fhir.r5.model.Enumerations.CompartmentType.ENCOUNTER); 282// break; 283// case RELATEDPERSON: 284// tgt.setValue(org.hl7.fhir.r5.model.Enumerations.CompartmentType.RELATEDPERSON); 285// break; 286// case PRACTITIONER: 287// tgt.setValue(org.hl7.fhir.r5.model.Enumerations.CompartmentType.PRACTITIONER); 288// break; 289// case DEVICE: 290// tgt.setValue(org.hl7.fhir.r5.model.Enumerations.CompartmentType.DEVICE); 291// break; 292// default: 293// tgt.setValue(org.hl7.fhir.r5.model.Enumerations.CompartmentType.NULL); 294// break; 295// } 296// return tgt; 297// } 298// 299// static public org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.Enumerations.CompartmentType> convertCompartmentCode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.CompartmentType> src) throws FHIRException { 300// if (src == null || src.isEmpty()) 301// return null; 302// org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.Enumerations.CompartmentType> tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.Enumerations.CompartmentTypeEnumFactory()); 303// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 304// switch (src.getValue()) { 305// case PATIENT: 306// tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.CompartmentType.PATIENT); 307// break; 308// case ENCOUNTER: 309// tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.CompartmentType.ENCOUNTER); 310// break; 311// case RELATEDPERSON: 312// tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.CompartmentType.RELATEDPERSON); 313// break; 314// case PRACTITIONER: 315// tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.CompartmentType.PRACTITIONER); 316// break; 317// case DEVICE: 318// tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.CompartmentType.DEVICE); 319// break; 320// default: 321// tgt.setValue(org.hl7.fhir.r4b.model.Enumerations.CompartmentType.NULL); 322// break; 323// } 324// return tgt; 325// } 326// 327// static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.GraphDefinition.GraphCompartmentRule> convertGraphCompartmentRule(org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.GraphDefinition.GraphCompartmentRule> src) throws FHIRException { 328// if (src == null || src.isEmpty()) 329// return null; 330// org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.GraphDefinition.GraphCompartmentRule> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.GraphDefinition.GraphCompartmentRuleEnumFactory()); 331// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 332// switch (src.getValue()) { 333// case IDENTICAL: 334// tgt.setValue(org.hl7.fhir.r5.model.GraphDefinition.GraphCompartmentRule.IDENTICAL); 335// break; 336// case MATCHING: 337// tgt.setValue(org.hl7.fhir.r5.model.GraphDefinition.GraphCompartmentRule.MATCHING); 338// break; 339// case DIFFERENT: 340// tgt.setValue(org.hl7.fhir.r5.model.GraphDefinition.GraphCompartmentRule.DIFFERENT); 341// break; 342// case CUSTOM: 343// tgt.setValue(org.hl7.fhir.r5.model.GraphDefinition.GraphCompartmentRule.CUSTOM); 344// break; 345// default: 346// tgt.setValue(org.hl7.fhir.r5.model.GraphDefinition.GraphCompartmentRule.NULL); 347// break; 348// } 349// return tgt; 350// } 351// 352// static public org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.GraphDefinition.GraphCompartmentRule> convertGraphCompartmentRule(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.GraphDefinition.GraphCompartmentRule> src) throws FHIRException { 353// if (src == null || src.isEmpty()) 354// return null; 355// org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.GraphDefinition.GraphCompartmentRule> tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.GraphDefinition.GraphCompartmentRuleEnumFactory()); 356// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); 357// switch (src.getValue()) { 358// case IDENTICAL: 359// tgt.setValue(org.hl7.fhir.r4b.model.GraphDefinition.GraphCompartmentRule.IDENTICAL); 360// break; 361// case MATCHING: 362// tgt.setValue(org.hl7.fhir.r4b.model.GraphDefinition.GraphCompartmentRule.MATCHING); 363// break; 364// case DIFFERENT: 365// tgt.setValue(org.hl7.fhir.r4b.model.GraphDefinition.GraphCompartmentRule.DIFFERENT); 366// break; 367// case CUSTOM: 368// tgt.setValue(org.hl7.fhir.r4b.model.GraphDefinition.GraphCompartmentRule.CUSTOM); 369// break; 370// default: 371// tgt.setValue(org.hl7.fhir.r4b.model.GraphDefinition.GraphCompartmentRule.NULL); 372// break; 373// } 374// return tgt; 375// } 376}