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.special40_50.Extension40_50; 005import org.hl7.fhir.exceptions.FHIRException; 006 007/* 008 Copyright (c) 2011+, HL7, Inc. 009 All rights reserved. 010 011 Redistribution and use in source and binary forms, with or without modification, 012 are permitted provided that the following conditions are met: 013 014 * Redistributions of source code must retain the above copyright notice, this 015 list of conditions and the following disclaimer. 016 * Redistributions in binary form must reproduce the above copyright notice, 017 this list of conditions and the following disclaimer in the documentation 018 and/or other materials provided with the distribution. 019 * Neither the name of HL7 nor the names of its contributors may be used to 020 endorse or promote products derived from this software without specific 021 prior written permission. 022 023 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 024 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 025 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 026 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 027 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 028 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 029 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 030 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 031 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 032 POSSIBILITY OF SUCH DAMAGE. 033 034*/ 035// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 036public class Enumerations40_50 { 037 038 public static void copyEnumeration(org.hl7.fhir.r4.model.Enumeration<?> src, org.hl7.fhir.r5.model.Enumeration<?> tgt) throws FHIRException { 039 if (src.hasId()) tgt.setId(src.getId()); 040 for (org.hl7.fhir.r4.model.Extension e : src.getExtension()) { 041 tgt.addExtension(Extension40_50.convertExtension(e)); 042 } 043 } 044 045 public static void copyEnumeration(org.hl7.fhir.r5.model.Enumeration<?> src, org.hl7.fhir.r4.model.Enumeration<?> tgt) throws FHIRException { 046 if (src.hasId()) tgt.setId(src.getId()); 047 for (org.hl7.fhir.r5.model.Extension e : src.getExtension()) { 048 tgt.addExtension(Extension40_50.convertExtension(e)); 049 } 050 } 051 052 static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.BindingStrength> convertBindingStrength(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.BindingStrength> src) throws FHIRException { 053 if (src == null || src.isEmpty()) 054 return null; 055 org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.BindingStrength> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.BindingStrengthEnumFactory()); 056 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 057 switch (src.getValue()) { 058 case REQUIRED: 059 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.BindingStrength.REQUIRED); 060 break; 061 case EXTENSIBLE: 062 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.BindingStrength.EXTENSIBLE); 063 break; 064 case PREFERRED: 065 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.BindingStrength.PREFERRED); 066 break; 067 case EXAMPLE: 068 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.BindingStrength.EXAMPLE); 069 break; 070 default: 071 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.BindingStrength.NULL); 072 break; 073 } 074 return tgt; 075 } 076 077 static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.BindingStrength> convertBindingStrength(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.BindingStrength> src) throws FHIRException { 078 if (src == null || src.isEmpty()) 079 return null; 080 org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.BindingStrength> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Enumerations.BindingStrengthEnumFactory()); 081 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 082 switch (src.getValue()) { 083 case REQUIRED: 084 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.BindingStrength.REQUIRED); 085 break; 086 case EXTENSIBLE: 087 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.BindingStrength.EXTENSIBLE); 088 break; 089 case PREFERRED: 090 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.BindingStrength.PREFERRED); 091 break; 092 case EXAMPLE: 093 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.BindingStrength.EXAMPLE); 094 break; 095 default: 096 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.BindingStrength.NULL); 097 break; 098 } 099 return tgt; 100 } 101 102 static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.PublicationStatus> convertPublicationStatus(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.PublicationStatus> src) throws FHIRException { 103 if (src == null || src.isEmpty()) 104 return null; 105 org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.PublicationStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.PublicationStatusEnumFactory()); 106 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 107 switch (src.getValue()) { 108 case DRAFT: 109 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.PublicationStatus.DRAFT); 110 break; 111 case ACTIVE: 112 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.PublicationStatus.ACTIVE); 113 break; 114 case RETIRED: 115 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.PublicationStatus.RETIRED); 116 break; 117 case UNKNOWN: 118 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.PublicationStatus.UNKNOWN); 119 break; 120 default: 121 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.PublicationStatus.NULL); 122 break; 123 } 124 return tgt; 125 } 126 127 static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.PublicationStatus> convertPublicationStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.PublicationStatus> src) throws FHIRException { 128 if (src == null || src.isEmpty()) 129 return null; 130 org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.PublicationStatus> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Enumerations.PublicationStatusEnumFactory()); 131 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 132 switch (src.getValue()) { 133 case DRAFT: 134 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.PublicationStatus.DRAFT); 135 break; 136 case ACTIVE: 137 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.PublicationStatus.ACTIVE); 138 break; 139 case RETIRED: 140 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.PublicationStatus.RETIRED); 141 break; 142 case UNKNOWN: 143 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.PublicationStatus.UNKNOWN); 144 break; 145 default: 146 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.PublicationStatus.NULL); 147 break; 148 } 149 return tgt; 150 } 151 152 static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.FHIRVersion> convertFHIRVersion(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.FHIRVersion> src) throws FHIRException { 153 if (src == null || src.isEmpty()) 154 return null; 155 org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.FHIRVersion> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.FHIRVersionEnumFactory()); 156 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 157 switch (src.getValue()) { 158 case _0_01: 159 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._0_01); 160 break; 161 case _0_05: 162 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._0_05); 163 break; 164 case _0_06: 165 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._0_06); 166 break; 167 case _0_11: 168 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._0_11); 169 break; 170 case _0_0_80: 171 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._0_0_80); 172 break; 173 case _0_0_81: 174 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._0_0_81); 175 break; 176 case _0_0_82: 177 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._0_0_82); 178 break; 179 case _0_4_0: 180 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._0_4_0); 181 break; 182 case _0_5_0: 183 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._0_5_0); 184 break; 185 case _1_0_0: 186 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._1_0_0); 187 break; 188 case _1_0_1: 189 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._1_0_1); 190 break; 191 case _1_0_2: 192 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._1_0_2); 193 break; 194 case _1_1_0: 195 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._1_1_0); 196 break; 197 case _1_4_0: 198 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._1_4_0); 199 break; 200 case _1_6_0: 201 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._1_6_0); 202 break; 203 case _1_8_0: 204 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._1_8_0); 205 break; 206 case _3_0_0: 207 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._3_0_0); 208 break; 209 case _3_0_1: 210 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._3_0_1); 211 break; 212 case _3_0_2: 213 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._3_0_2); 214 break; 215 case _3_3_0: 216 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._3_3_0); 217 break; 218 case _3_5_0: 219 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._3_5_0); 220 break; 221 case _4_0_0: 222 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._4_0_0); 223 break; 224 case _4_0_1: 225 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._4_0_1); 226 break; 227 case _4_1_0: 228 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._4_1_0); 229 break; 230 case _4_3_0: 231 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._4_3_0); 232 break; 233 case _4_3_0_CIBUILD: 234 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._4_3_0CIBUILD); 235 break; 236 case _4_3_0_SNAPSHOT1: 237 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._4_3_0SNAPSHOT1); 238 break; 239 case _5_0_0: 240 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._5_0_0); 241 break; 242 case _5_0_0SNAPSHOT1: 243 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._5_0_0SNAPSHOT1); 244 break; 245 case _5_0_0SNAPSHOT2: 246 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._5_0_0SNAPSHOT2); 247 break; 248 case _5_0_0BALLOT: 249 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._5_0_0BALLOT); 250 break; 251 case _5_0_0SNAPSHOT3: 252 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._5_0_0SNAPSHOT3); 253 break; 254 case _5_0_0DRAFTFINAL: 255 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._5_0_0DRAFTFINAL); 256 break; 257 default: 258 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion.NULL); 259 break; 260 } 261 return tgt; 262 } 263 264 static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.FHIRVersion> convertFHIRVersion(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.FHIRVersion> src) throws FHIRException { 265 if (src == null || src.isEmpty()) 266 return null; 267 org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.FHIRVersion> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Enumerations.FHIRVersionEnumFactory()); 268 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 269 switch (src.getValue()) { 270 case _0_01: 271 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._0_01); 272 break; 273 case _0_05: 274 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._0_05); 275 break; 276 case _0_06: 277 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._0_06); 278 break; 279 case _0_11: 280 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._0_11); 281 break; 282 case _0_0_80: 283 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._0_0_80); 284 break; 285 case _0_0_81: 286 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._0_0_81); 287 break; 288 case _0_0_82: 289 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._0_0_82); 290 break; 291 case _0_4_0: 292 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._0_4_0); 293 break; 294 case _0_5_0: 295 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._0_5_0); 296 break; 297 case _1_0_0: 298 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._1_0_0); 299 break; 300 case _1_0_1: 301 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._1_0_1); 302 break; 303 case _1_0_2: 304 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._1_0_2); 305 break; 306 case _1_1_0: 307 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._1_1_0); 308 break; 309 case _1_4_0: 310 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._1_4_0); 311 break; 312 case _1_6_0: 313 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._1_6_0); 314 break; 315 case _1_8_0: 316 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._1_8_0); 317 break; 318 case _3_0_0: 319 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._3_0_0); 320 break; 321 case _3_0_1: 322 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._3_0_1); 323 break; 324 case _3_0_2: 325 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._3_0_2); 326 break; 327 case _3_3_0: 328 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._3_3_0); 329 break; 330 case _3_5_0: 331 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._3_5_0); 332 break; 333 case _4_0_0: 334 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._4_0_0); 335 break; 336 case _4_0_1: 337 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._4_0_1); 338 break; 339 case _4_1_0: 340 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._4_1_0); 341 break; 342 case _4_3_0: 343 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._4_3_0); 344 break; 345 case _4_3_0CIBUILD: 346 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._4_3_0_CIBUILD); 347 break; 348 case _4_3_0SNAPSHOT1: 349 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._4_3_0_SNAPSHOT1); 350 break; 351 case _5_0_0: 352 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._5_0_0); 353 break; 354 case _5_0_0SNAPSHOT1: 355 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._5_0_0SNAPSHOT1); 356 break; 357 case _5_0_0SNAPSHOT2: 358 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._5_0_0SNAPSHOT2); 359 break; 360 case _5_0_0BALLOT: 361 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._5_0_0BALLOT); 362 break; 363 case _5_0_0SNAPSHOT3: 364 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._5_0_0SNAPSHOT3); 365 break; 366 case _5_0_0DRAFTFINAL: 367 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._5_0_0DRAFTFINAL); 368 break; 369 370 default: 371 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion.NULL); 372 break; 373 } 374 return tgt; 375 } 376 377 static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.SearchParamType> convertSearchParamType(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.SearchParamType> src) throws FHIRException { 378 if (src == null || src.isEmpty()) 379 return null; 380 org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.SearchParamType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.SearchParamTypeEnumFactory()); 381 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 382 switch (src.getValue()) { 383 case NUMBER: 384 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchParamType.NUMBER); 385 break; 386 case DATE: 387 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchParamType.DATE); 388 break; 389 case STRING: 390 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchParamType.STRING); 391 break; 392 case TOKEN: 393 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchParamType.TOKEN); 394 break; 395 case REFERENCE: 396 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchParamType.REFERENCE); 397 break; 398 case COMPOSITE: 399 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchParamType.COMPOSITE); 400 break; 401 case QUANTITY: 402 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchParamType.QUANTITY); 403 break; 404 case URI: 405 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchParamType.URI); 406 break; 407 case SPECIAL: 408 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchParamType.SPECIAL); 409 break; 410 default: 411 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchParamType.NULL); 412 break; 413 } 414 return tgt; 415 } 416 417 static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.SearchParamType> convertSearchParamType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.SearchParamType> src) throws FHIRException { 418 if (src == null || src.isEmpty()) 419 return null; 420 org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.SearchParamType> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Enumerations.SearchParamTypeEnumFactory()); 421 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 422 switch (src.getValue()) { 423 case NUMBER: 424 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.SearchParamType.NUMBER); 425 break; 426 case DATE: 427 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.SearchParamType.DATE); 428 break; 429 case STRING: 430 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.SearchParamType.STRING); 431 break; 432 case TOKEN: 433 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.SearchParamType.TOKEN); 434 break; 435 case REFERENCE: 436 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.SearchParamType.REFERENCE); 437 break; 438 case COMPOSITE: 439 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.SearchParamType.COMPOSITE); 440 break; 441 case QUANTITY: 442 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.SearchParamType.QUANTITY); 443 break; 444 case URI: 445 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.SearchParamType.URI); 446 break; 447 case SPECIAL: 448 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.SearchParamType.SPECIAL); 449 break; 450 default: 451 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.SearchParamType.NULL); 452 break; 453 } 454 return tgt; 455 } 456 457 static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.PaymentReconciliation.NoteType> convertNoteType(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.NoteType> src) throws FHIRException { 458 if (src == null || src.isEmpty()) 459 return null; 460 org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.PaymentReconciliation.NoteType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.PaymentReconciliation.NoteTypeEnumFactory()); 461 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 462 switch (src.getValue()) { 463 case DISPLAY: 464 tgt.setValue(org.hl7.fhir.r5.model.PaymentReconciliation.NoteType.DISPLAY); 465 break; 466 case PRINT: 467 tgt.setValue(org.hl7.fhir.r5.model.PaymentReconciliation.NoteType.PRINT); 468 break; 469 case PRINTOPER: 470 tgt.setValue(org.hl7.fhir.r5.model.PaymentReconciliation.NoteType.PRINTOPER); 471 break; 472 default: 473 tgt.setValue(org.hl7.fhir.r5.model.PaymentReconciliation.NoteType.NULL); 474 break; 475 } 476 return tgt; 477 } 478 479 static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.NoteType> convertNoteType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.PaymentReconciliation.NoteType> src) throws FHIRException { 480 if (src == null || src.isEmpty()) 481 return null; 482 org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.NoteType> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Enumerations.NoteTypeEnumFactory()); 483 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 484 switch (src.getValue()) { 485 case DISPLAY: 486 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.NoteType.DISPLAY); 487 break; 488 case PRINT: 489 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.NoteType.PRINT); 490 break; 491 case PRINTOPER: 492 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.NoteType.PRINTOPER); 493 break; 494 default: 495 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.NoteType.NULL); 496 break; 497 } 498 return tgt; 499 } 500 501 static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship> convertConceptMapRelationship(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence> src) throws FHIRException { 502 if (src == null || src.isEmpty()) 503 return null; 504 org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationshipEnumFactory()); 505 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 506 switch (src.getValue()) { 507 case RELATEDTO: 508 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.RELATEDTO); 509 break; 510 case EQUIVALENT: 511 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.EQUIVALENT); 512 break; 513 case EQUAL: 514 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.EQUIVALENT); 515 break; 516 case WIDER: 517 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.SOURCEISNARROWERTHANTARGET); 518 break; 519 case SUBSUMES: 520 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.SOURCEISNARROWERTHANTARGET); 521 break; 522 case NARROWER: 523 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.SOURCEISBROADERTHANTARGET); 524 break; 525 case SPECIALIZES: 526 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.SOURCEISBROADERTHANTARGET); 527 break; 528 case INEXACT: 529 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.RELATEDTO); 530 break; 531 case UNMATCHED: 532 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NULL); 533 break; 534 case DISJOINT: 535 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NOTRELATEDTO); 536 break; 537 default: 538 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NULL); 539 break; 540 } 541 return tgt; 542 } 543 544 static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence> convertConceptMapEquivalence(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship> src) throws FHIRException { 545 if (src == null || src.isEmpty()) 546 return null; 547 org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalenceEnumFactory()); 548 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 549 switch (src.getValue()) { 550 case RELATEDTO: 551 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.RELATEDTO); 552 break; 553 case EQUIVALENT: 554 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.EQUIVALENT); 555 break; 556 case SOURCEISNARROWERTHANTARGET: 557 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.WIDER); 558 break; 559 case SOURCEISBROADERTHANTARGET: 560 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.NARROWER); 561 break; 562 case NOTRELATEDTO: 563 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.DISJOINT); 564 break; 565 default: 566 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.NULL); 567 break; 568 } 569 return tgt; 570 } 571 572 static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus> convertDocumentReferenceStatus(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus> src) throws FHIRException { 573 if (src == null || src.isEmpty()) 574 return null; 575 org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatusEnumFactory()); 576 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 577 switch (src.getValue()) { 578 case CURRENT: 579 tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.CURRENT); 580 break; 581 case SUPERSEDED: 582 tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.SUPERSEDED); 583 break; 584 case ENTEREDINERROR: 585 tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.ENTEREDINERROR); 586 break; 587 default: 588 tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.NULL); 589 break; 590 } 591 return tgt; 592 } 593 594 static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus> convertDocumentReferenceStatus(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus> src) throws FHIRException { 595 if (src == null || src.isEmpty()) 596 return null; 597 org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatusEnumFactory()); 598 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 599 switch (src.getValue()) { 600 case CURRENT: 601 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus.CURRENT); 602 break; 603 case SUPERSEDED: 604 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus.SUPERSEDED); 605 break; 606 case ENTEREDINERROR: 607 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus.ENTEREDINERROR); 608 break; 609 default: 610 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatus.NULL); 611 break; 612 } 613 return tgt; 614 } 615 616 static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.AdministrativeGender> convertAdministrativeGender(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.AdministrativeGender> src) throws FHIRException { 617 if (src == null || src.isEmpty()) 618 return null; 619 org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.AdministrativeGender> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.AdministrativeGenderEnumFactory()); 620 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 621 switch (src.getValue()) { 622 case MALE: 623 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.AdministrativeGender.MALE); 624 break; 625 case FEMALE: 626 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.AdministrativeGender.FEMALE); 627 break; 628 case OTHER: 629 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.AdministrativeGender.OTHER); 630 break; 631 case UNKNOWN: 632 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.AdministrativeGender.UNKNOWN); 633 break; 634 default: 635 tgt.setValue(org.hl7.fhir.r5.model.Enumerations.AdministrativeGender.NULL); 636 break; 637 } 638 return tgt; 639 } 640 641 static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.AdministrativeGender> convertAdministrativeGender(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Enumerations.AdministrativeGender> src) throws FHIRException { 642 if (src == null || src.isEmpty()) 643 return null; 644 org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Enumerations.AdministrativeGender> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Enumerations.AdministrativeGenderEnumFactory()); 645 ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); 646 switch (src.getValue()) { 647 case MALE: 648 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.MALE); 649 break; 650 case FEMALE: 651 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.FEMALE); 652 break; 653 case OTHER: 654 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.OTHER); 655 break; 656 case UNKNOWN: 657 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.UNKNOWN); 658 break; 659 default: 660 tgt.setValue(org.hl7.fhir.r4.model.Enumerations.AdministrativeGender.NULL); 661 break; 662 } 663 return tgt; 664 } 665 666}