
001package org.hl7.fhir.dstu3.model; 002 003 004 005/* 006 Copyright (c) 2011+, HL7, Inc. 007 All rights reserved. 008 009 Redistribution and use in source and binary forms, with or without modification, 010 are permitted provided that the following conditions are met: 011 012 * Redistributions of source code must retain the above copyright notice, this 013 list of conditions and the following disclaimer. 014 * Redistributions in binary form must reproduce the above copyright notice, 015 this list of conditions and the following disclaimer in the documentation 016 and/or other materials provided with the distribution. 017 * Neither the name of HL7 nor the names of its contributors may be used to 018 endorse or promote products derived from this software without specific 019 prior written permission. 020 021 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 022 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 023 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 024 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 025 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 026 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 027 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 028 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 029 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 030 POSSIBILITY OF SUCH DAMAGE. 031 032*/ 033 034// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.x 035import java.util.ArrayList; 036import java.util.List; 037 038import org.hl7.fhir.dstu3.model.Enumerations.BindingStrength; 039import org.hl7.fhir.dstu3.model.Enumerations.BindingStrengthEnumFactory; 040import org.hl7.fhir.exceptions.FHIRException; 041import org.hl7.fhir.exceptions.FHIRFormatError; 042import org.hl7.fhir.instance.model.api.IBaseDatatypeElement; 043import org.hl7.fhir.instance.model.api.ICompositeType; 044import org.hl7.fhir.utilities.CommaSeparatedStringBuilder; 045import org.hl7.fhir.utilities.Utilities; 046 047import ca.uhn.fhir.model.api.annotation.Block; 048import ca.uhn.fhir.model.api.annotation.Child; 049import ca.uhn.fhir.model.api.annotation.DatatypeDef; 050import ca.uhn.fhir.model.api.annotation.Description; 051/** 052 * Captures constraints on each element within the resource, profile, or extension. 053 */ 054@DatatypeDef(name="ElementDefinition") 055public class ElementDefinition extends Type implements ICompositeType { 056 057 public enum PropertyRepresentation { 058 /** 059 * In XML, this property is represented as an attribute not an element. 060 */ 061 XMLATTR, 062 /** 063 * This element is represented using the XML text attribute (primitives only) 064 */ 065 XMLTEXT, 066 /** 067 * The type of this element is indicated using xsi:type 068 */ 069 TYPEATTR, 070 /** 071 * Use CDA narrative instead of XHTML 072 */ 073 CDATEXT, 074 /** 075 * The property is represented using XHTML 076 */ 077 XHTML, 078 /** 079 * added to help the parsers with the generic types 080 */ 081 NULL; 082 public static PropertyRepresentation fromCode(String codeString) throws FHIRException { 083 if (codeString == null || "".equals(codeString)) 084 return null; 085 if ("xmlAttr".equals(codeString)) 086 return XMLATTR; 087 if ("xmlText".equals(codeString)) 088 return XMLTEXT; 089 if ("typeAttr".equals(codeString)) 090 return TYPEATTR; 091 if ("cdaText".equals(codeString)) 092 return CDATEXT; 093 if ("xhtml".equals(codeString)) 094 return XHTML; 095 if (Configuration.isAcceptInvalidEnums()) 096 return null; 097 else 098 throw new FHIRException("Unknown PropertyRepresentation code '"+codeString+"'"); 099 } 100 public String toCode() { 101 switch (this) { 102 case XMLATTR: return "xmlAttr"; 103 case XMLTEXT: return "xmlText"; 104 case TYPEATTR: return "typeAttr"; 105 case CDATEXT: return "cdaText"; 106 case XHTML: return "xhtml"; 107 case NULL: return null; 108 default: return "?"; 109 } 110 } 111 public String getSystem() { 112 switch (this) { 113 case XMLATTR: return "http://hl7.org/fhir/property-representation"; 114 case XMLTEXT: return "http://hl7.org/fhir/property-representation"; 115 case TYPEATTR: return "http://hl7.org/fhir/property-representation"; 116 case CDATEXT: return "http://hl7.org/fhir/property-representation"; 117 case XHTML: return "http://hl7.org/fhir/property-representation"; 118 case NULL: return null; 119 default: return "?"; 120 } 121 } 122 public String getDefinition() { 123 switch (this) { 124 case XMLATTR: return "In XML, this property is represented as an attribute not an element."; 125 case XMLTEXT: return "This element is represented using the XML text attribute (primitives only)"; 126 case TYPEATTR: return "The type of this element is indicated using xsi:type"; 127 case CDATEXT: return "Use CDA narrative instead of XHTML"; 128 case XHTML: return "The property is represented using XHTML"; 129 case NULL: return null; 130 default: return "?"; 131 } 132 } 133 public String getDisplay() { 134 switch (this) { 135 case XMLATTR: return "XML Attribute"; 136 case XMLTEXT: return "XML Text"; 137 case TYPEATTR: return "Type Attribute"; 138 case CDATEXT: return "CDA Text Format"; 139 case XHTML: return "XHTML"; 140 case NULL: return null; 141 default: return "?"; 142 } 143 } 144 } 145 146 public static class PropertyRepresentationEnumFactory implements EnumFactory<PropertyRepresentation> { 147 public PropertyRepresentation fromCode(String codeString) throws IllegalArgumentException { 148 if (codeString == null || "".equals(codeString)) 149 if (codeString == null || "".equals(codeString)) 150 return null; 151 if ("xmlAttr".equals(codeString)) 152 return PropertyRepresentation.XMLATTR; 153 if ("xmlText".equals(codeString)) 154 return PropertyRepresentation.XMLTEXT; 155 if ("typeAttr".equals(codeString)) 156 return PropertyRepresentation.TYPEATTR; 157 if ("cdaText".equals(codeString)) 158 return PropertyRepresentation.CDATEXT; 159 if ("xhtml".equals(codeString)) 160 return PropertyRepresentation.XHTML; 161 throw new IllegalArgumentException("Unknown PropertyRepresentation code '"+codeString+"'"); 162 } 163 public Enumeration<PropertyRepresentation> fromType(PrimitiveType<?> code) throws FHIRException { 164 if (code == null) 165 return null; 166 if (code.isEmpty()) 167 return new Enumeration<PropertyRepresentation>(this); 168 String codeString = code.asStringValue(); 169 if (codeString == null || "".equals(codeString)) 170 return null; 171 if ("xmlAttr".equals(codeString)) 172 return new Enumeration<PropertyRepresentation>(this, PropertyRepresentation.XMLATTR); 173 if ("xmlText".equals(codeString)) 174 return new Enumeration<PropertyRepresentation>(this, PropertyRepresentation.XMLTEXT); 175 if ("typeAttr".equals(codeString)) 176 return new Enumeration<PropertyRepresentation>(this, PropertyRepresentation.TYPEATTR); 177 if ("cdaText".equals(codeString)) 178 return new Enumeration<PropertyRepresentation>(this, PropertyRepresentation.CDATEXT); 179 if ("xhtml".equals(codeString)) 180 return new Enumeration<PropertyRepresentation>(this, PropertyRepresentation.XHTML); 181 throw new FHIRException("Unknown PropertyRepresentation code '"+codeString+"'"); 182 } 183 public String toCode(PropertyRepresentation code) { 184 if (code == PropertyRepresentation.XMLATTR) 185 return "xmlAttr"; 186 if (code == PropertyRepresentation.XMLTEXT) 187 return "xmlText"; 188 if (code == PropertyRepresentation.TYPEATTR) 189 return "typeAttr"; 190 if (code == PropertyRepresentation.CDATEXT) 191 return "cdaText"; 192 if (code == PropertyRepresentation.XHTML) 193 return "xhtml"; 194 return "?"; 195 } 196 public String toSystem(PropertyRepresentation code) { 197 return code.getSystem(); 198 } 199 } 200 201 public enum DiscriminatorType { 202 /** 203 * The slices have different values in the nominated element 204 */ 205 VALUE, 206 /** 207 * The slices are differentiated by the presence or absence of the nominated element 208 */ 209 EXISTS, 210 /** 211 * The slices have different values in the nominated element, as determined by testing them against the applicable ElementDefinition.pattern[x] 212 */ 213 PATTERN, 214 /** 215 * The slices are differentiated by type of the nominated element to a specifed profile 216 */ 217 TYPE, 218 /** 219 * The slices are differentiated by conformance of the nominated element to a specifed profile 220 */ 221 PROFILE, 222 /** 223 * added to help the parsers with the generic types 224 */ 225 NULL; 226 public static DiscriminatorType fromCode(String codeString) throws FHIRException { 227 if (codeString == null || "".equals(codeString)) 228 return null; 229 if ("value".equals(codeString)) 230 return VALUE; 231 if ("exists".equals(codeString)) 232 return EXISTS; 233 if ("pattern".equals(codeString)) 234 return PATTERN; 235 if ("type".equals(codeString)) 236 return TYPE; 237 if ("profile".equals(codeString)) 238 return PROFILE; 239 if (Configuration.isAcceptInvalidEnums()) 240 return null; 241 else 242 throw new FHIRException("Unknown DiscriminatorType code '"+codeString+"'"); 243 } 244 public String toCode() { 245 switch (this) { 246 case VALUE: return "value"; 247 case EXISTS: return "exists"; 248 case PATTERN: return "pattern"; 249 case TYPE: return "type"; 250 case PROFILE: return "profile"; 251 case NULL: return null; 252 default: return "?"; 253 } 254 } 255 public String getSystem() { 256 switch (this) { 257 case VALUE: return "http://hl7.org/fhir/discriminator-type"; 258 case EXISTS: return "http://hl7.org/fhir/discriminator-type"; 259 case PATTERN: return "http://hl7.org/fhir/discriminator-type"; 260 case TYPE: return "http://hl7.org/fhir/discriminator-type"; 261 case PROFILE: return "http://hl7.org/fhir/discriminator-type"; 262 case NULL: return null; 263 default: return "?"; 264 } 265 } 266 public String getDefinition() { 267 switch (this) { 268 case VALUE: return "The slices have different values in the nominated element"; 269 case EXISTS: return "The slices are differentiated by the presence or absence of the nominated element"; 270 case PATTERN: return "The slices have different values in the nominated element, as determined by testing them against the applicable ElementDefinition.pattern[x]"; 271 case TYPE: return "The slices are differentiated by type of the nominated element to a specifed profile"; 272 case PROFILE: return "The slices are differentiated by conformance of the nominated element to a specifed profile"; 273 case NULL: return null; 274 default: return "?"; 275 } 276 } 277 public String getDisplay() { 278 switch (this) { 279 case VALUE: return "Value"; 280 case EXISTS: return "Exists"; 281 case PATTERN: return "Pattern"; 282 case TYPE: return "Type"; 283 case PROFILE: return "Profile"; 284 case NULL: return null; 285 default: return "?"; 286 } 287 } 288 } 289 290 public static class DiscriminatorTypeEnumFactory implements EnumFactory<DiscriminatorType> { 291 public DiscriminatorType fromCode(String codeString) throws IllegalArgumentException { 292 if (codeString == null || "".equals(codeString)) 293 if (codeString == null || "".equals(codeString)) 294 return null; 295 if ("value".equals(codeString)) 296 return DiscriminatorType.VALUE; 297 if ("exists".equals(codeString)) 298 return DiscriminatorType.EXISTS; 299 if ("pattern".equals(codeString)) 300 return DiscriminatorType.PATTERN; 301 if ("type".equals(codeString)) 302 return DiscriminatorType.TYPE; 303 if ("profile".equals(codeString)) 304 return DiscriminatorType.PROFILE; 305 throw new IllegalArgumentException("Unknown DiscriminatorType code '"+codeString+"'"); 306 } 307 public Enumeration<DiscriminatorType> fromType(PrimitiveType<?> code) throws FHIRException { 308 if (code == null) 309 return null; 310 if (code.isEmpty()) 311 return new Enumeration<DiscriminatorType>(this); 312 String codeString = code.asStringValue(); 313 if (codeString == null || "".equals(codeString)) 314 return null; 315 if ("value".equals(codeString)) 316 return new Enumeration<DiscriminatorType>(this, DiscriminatorType.VALUE); 317 if ("exists".equals(codeString)) 318 return new Enumeration<DiscriminatorType>(this, DiscriminatorType.EXISTS); 319 if ("pattern".equals(codeString)) 320 return new Enumeration<DiscriminatorType>(this, DiscriminatorType.PATTERN); 321 if ("type".equals(codeString)) 322 return new Enumeration<DiscriminatorType>(this, DiscriminatorType.TYPE); 323 if ("profile".equals(codeString)) 324 return new Enumeration<DiscriminatorType>(this, DiscriminatorType.PROFILE); 325 throw new FHIRException("Unknown DiscriminatorType code '"+codeString+"'"); 326 } 327 public String toCode(DiscriminatorType code) { 328 if (code == DiscriminatorType.VALUE) 329 return "value"; 330 if (code == DiscriminatorType.EXISTS) 331 return "exists"; 332 if (code == DiscriminatorType.PATTERN) 333 return "pattern"; 334 if (code == DiscriminatorType.TYPE) 335 return "type"; 336 if (code == DiscriminatorType.PROFILE) 337 return "profile"; 338 return "?"; 339 } 340 public String toSystem(DiscriminatorType code) { 341 return code.getSystem(); 342 } 343 } 344 345 public enum SlicingRules { 346 /** 347 * No additional content is allowed other than that described by the slices in this profile. 348 */ 349 CLOSED, 350 /** 351 * Additional content is allowed anywhere in the list. 352 */ 353 OPEN, 354 /** 355 * Additional content is allowed, but only at the end of the list. Note that using this requires that the slices be ordered, which makes it hard to share uses. This should only be done where absolutely required. 356 */ 357 OPENATEND, 358 /** 359 * added to help the parsers with the generic types 360 */ 361 NULL; 362 public static SlicingRules fromCode(String codeString) throws FHIRException { 363 if (codeString == null || "".equals(codeString)) 364 return null; 365 if ("closed".equals(codeString)) 366 return CLOSED; 367 if ("open".equals(codeString)) 368 return OPEN; 369 if ("openAtEnd".equals(codeString)) 370 return OPENATEND; 371 if (Configuration.isAcceptInvalidEnums()) 372 return null; 373 else 374 throw new FHIRException("Unknown SlicingRules code '"+codeString+"'"); 375 } 376 public String toCode() { 377 switch (this) { 378 case CLOSED: return "closed"; 379 case OPEN: return "open"; 380 case OPENATEND: return "openAtEnd"; 381 case NULL: return null; 382 default: return "?"; 383 } 384 } 385 public String getSystem() { 386 switch (this) { 387 case CLOSED: return "http://hl7.org/fhir/resource-slicing-rules"; 388 case OPEN: return "http://hl7.org/fhir/resource-slicing-rules"; 389 case OPENATEND: return "http://hl7.org/fhir/resource-slicing-rules"; 390 case NULL: return null; 391 default: return "?"; 392 } 393 } 394 public String getDefinition() { 395 switch (this) { 396 case CLOSED: return "No additional content is allowed other than that described by the slices in this profile."; 397 case OPEN: return "Additional content is allowed anywhere in the list."; 398 case OPENATEND: return "Additional content is allowed, but only at the end of the list. Note that using this requires that the slices be ordered, which makes it hard to share uses. This should only be done where absolutely required."; 399 case NULL: return null; 400 default: return "?"; 401 } 402 } 403 public String getDisplay() { 404 switch (this) { 405 case CLOSED: return "Closed"; 406 case OPEN: return "Open"; 407 case OPENATEND: return "Open at End"; 408 case NULL: return null; 409 default: return "?"; 410 } 411 } 412 } 413 414 public static class SlicingRulesEnumFactory implements EnumFactory<SlicingRules> { 415 public SlicingRules fromCode(String codeString) throws IllegalArgumentException { 416 if (codeString == null || "".equals(codeString)) 417 if (codeString == null || "".equals(codeString)) 418 return null; 419 if ("closed".equals(codeString)) 420 return SlicingRules.CLOSED; 421 if ("open".equals(codeString)) 422 return SlicingRules.OPEN; 423 if ("openAtEnd".equals(codeString)) 424 return SlicingRules.OPENATEND; 425 throw new IllegalArgumentException("Unknown SlicingRules code '"+codeString+"'"); 426 } 427 public Enumeration<SlicingRules> fromType(PrimitiveType<?> code) throws FHIRException { 428 if (code == null) 429 return null; 430 if (code.isEmpty()) 431 return new Enumeration<SlicingRules>(this); 432 String codeString = code.asStringValue(); 433 if (codeString == null || "".equals(codeString)) 434 return null; 435 if ("closed".equals(codeString)) 436 return new Enumeration<SlicingRules>(this, SlicingRules.CLOSED); 437 if ("open".equals(codeString)) 438 return new Enumeration<SlicingRules>(this, SlicingRules.OPEN); 439 if ("openAtEnd".equals(codeString)) 440 return new Enumeration<SlicingRules>(this, SlicingRules.OPENATEND); 441 throw new FHIRException("Unknown SlicingRules code '"+codeString+"'"); 442 } 443 public String toCode(SlicingRules code) { 444 if (code == SlicingRules.CLOSED) 445 return "closed"; 446 if (code == SlicingRules.OPEN) 447 return "open"; 448 if (code == SlicingRules.OPENATEND) 449 return "openAtEnd"; 450 return "?"; 451 } 452 public String toSystem(SlicingRules code) { 453 return code.getSystem(); 454 } 455 } 456 457 public enum AggregationMode { 458 /** 459 * The reference is a local reference to a contained resource. 460 */ 461 CONTAINED, 462 /** 463 * The reference to a resource that has to be resolved externally to the resource that includes the reference. 464 */ 465 REFERENCED, 466 /** 467 * The resource the reference points to will be found in the same bundle as the resource that includes the reference. 468 */ 469 BUNDLED, 470 /** 471 * added to help the parsers with the generic types 472 */ 473 NULL; 474 public static AggregationMode fromCode(String codeString) throws FHIRException { 475 if (codeString == null || "".equals(codeString)) 476 return null; 477 if ("contained".equals(codeString)) 478 return CONTAINED; 479 if ("referenced".equals(codeString)) 480 return REFERENCED; 481 if ("bundled".equals(codeString)) 482 return BUNDLED; 483 if (Configuration.isAcceptInvalidEnums()) 484 return null; 485 else 486 throw new FHIRException("Unknown AggregationMode code '"+codeString+"'"); 487 } 488 public String toCode() { 489 switch (this) { 490 case CONTAINED: return "contained"; 491 case REFERENCED: return "referenced"; 492 case BUNDLED: return "bundled"; 493 case NULL: return null; 494 default: return "?"; 495 } 496 } 497 public String getSystem() { 498 switch (this) { 499 case CONTAINED: return "http://hl7.org/fhir/resource-aggregation-mode"; 500 case REFERENCED: return "http://hl7.org/fhir/resource-aggregation-mode"; 501 case BUNDLED: return "http://hl7.org/fhir/resource-aggregation-mode"; 502 case NULL: return null; 503 default: return "?"; 504 } 505 } 506 public String getDefinition() { 507 switch (this) { 508 case CONTAINED: return "The reference is a local reference to a contained resource."; 509 case REFERENCED: return "The reference to a resource that has to be resolved externally to the resource that includes the reference."; 510 case BUNDLED: return "The resource the reference points to will be found in the same bundle as the resource that includes the reference."; 511 case NULL: return null; 512 default: return "?"; 513 } 514 } 515 public String getDisplay() { 516 switch (this) { 517 case CONTAINED: return "Contained"; 518 case REFERENCED: return "Referenced"; 519 case BUNDLED: return "Bundled"; 520 case NULL: return null; 521 default: return "?"; 522 } 523 } 524 } 525 526 public static class AggregationModeEnumFactory implements EnumFactory<AggregationMode> { 527 public AggregationMode fromCode(String codeString) throws IllegalArgumentException { 528 if (codeString == null || "".equals(codeString)) 529 if (codeString == null || "".equals(codeString)) 530 return null; 531 if ("contained".equals(codeString)) 532 return AggregationMode.CONTAINED; 533 if ("referenced".equals(codeString)) 534 return AggregationMode.REFERENCED; 535 if ("bundled".equals(codeString)) 536 return AggregationMode.BUNDLED; 537 throw new IllegalArgumentException("Unknown AggregationMode code '"+codeString+"'"); 538 } 539 public Enumeration<AggregationMode> fromType(PrimitiveType<?> code) throws FHIRException { 540 if (code == null) 541 return null; 542 if (code.isEmpty()) 543 return new Enumeration<AggregationMode>(this); 544 String codeString = code.asStringValue(); 545 if (codeString == null || "".equals(codeString)) 546 return null; 547 if ("contained".equals(codeString)) 548 return new Enumeration<AggregationMode>(this, AggregationMode.CONTAINED); 549 if ("referenced".equals(codeString)) 550 return new Enumeration<AggregationMode>(this, AggregationMode.REFERENCED); 551 if ("bundled".equals(codeString)) 552 return new Enumeration<AggregationMode>(this, AggregationMode.BUNDLED); 553 throw new FHIRException("Unknown AggregationMode code '"+codeString+"'"); 554 } 555 public String toCode(AggregationMode code) { 556 if (code == AggregationMode.CONTAINED) 557 return "contained"; 558 if (code == AggregationMode.REFERENCED) 559 return "referenced"; 560 if (code == AggregationMode.BUNDLED) 561 return "bundled"; 562 return "?"; 563 } 564 public String toSystem(AggregationMode code) { 565 return code.getSystem(); 566 } 567 } 568 569 public enum ReferenceVersionRules { 570 /** 571 * The reference may be either version independent or version specific 572 */ 573 EITHER, 574 /** 575 * The reference must be version independent 576 */ 577 INDEPENDENT, 578 /** 579 * The reference must be version specific 580 */ 581 SPECIFIC, 582 /** 583 * added to help the parsers with the generic types 584 */ 585 NULL; 586 public static ReferenceVersionRules fromCode(String codeString) throws FHIRException { 587 if (codeString == null || "".equals(codeString)) 588 return null; 589 if ("either".equals(codeString)) 590 return EITHER; 591 if ("independent".equals(codeString)) 592 return INDEPENDENT; 593 if ("specific".equals(codeString)) 594 return SPECIFIC; 595 if (Configuration.isAcceptInvalidEnums()) 596 return null; 597 else 598 throw new FHIRException("Unknown ReferenceVersionRules code '"+codeString+"'"); 599 } 600 public String toCode() { 601 switch (this) { 602 case EITHER: return "either"; 603 case INDEPENDENT: return "independent"; 604 case SPECIFIC: return "specific"; 605 case NULL: return null; 606 default: return "?"; 607 } 608 } 609 public String getSystem() { 610 switch (this) { 611 case EITHER: return "http://hl7.org/fhir/reference-version-rules"; 612 case INDEPENDENT: return "http://hl7.org/fhir/reference-version-rules"; 613 case SPECIFIC: return "http://hl7.org/fhir/reference-version-rules"; 614 case NULL: return null; 615 default: return "?"; 616 } 617 } 618 public String getDefinition() { 619 switch (this) { 620 case EITHER: return "The reference may be either version independent or version specific"; 621 case INDEPENDENT: return "The reference must be version independent"; 622 case SPECIFIC: return "The reference must be version specific"; 623 case NULL: return null; 624 default: return "?"; 625 } 626 } 627 public String getDisplay() { 628 switch (this) { 629 case EITHER: return "Either Specific or independent"; 630 case INDEPENDENT: return "Version independent"; 631 case SPECIFIC: return "Version Specific"; 632 case NULL: return null; 633 default: return "?"; 634 } 635 } 636 } 637 638 public static class ReferenceVersionRulesEnumFactory implements EnumFactory<ReferenceVersionRules> { 639 public ReferenceVersionRules fromCode(String codeString) throws IllegalArgumentException { 640 if (codeString == null || "".equals(codeString)) 641 if (codeString == null || "".equals(codeString)) 642 return null; 643 if ("either".equals(codeString)) 644 return ReferenceVersionRules.EITHER; 645 if ("independent".equals(codeString)) 646 return ReferenceVersionRules.INDEPENDENT; 647 if ("specific".equals(codeString)) 648 return ReferenceVersionRules.SPECIFIC; 649 throw new IllegalArgumentException("Unknown ReferenceVersionRules code '"+codeString+"'"); 650 } 651 public Enumeration<ReferenceVersionRules> fromType(PrimitiveType<?> code) throws FHIRException { 652 if (code == null) 653 return null; 654 if (code.isEmpty()) 655 return new Enumeration<ReferenceVersionRules>(this); 656 String codeString = code.asStringValue(); 657 if (codeString == null || "".equals(codeString)) 658 return null; 659 if ("either".equals(codeString)) 660 return new Enumeration<ReferenceVersionRules>(this, ReferenceVersionRules.EITHER); 661 if ("independent".equals(codeString)) 662 return new Enumeration<ReferenceVersionRules>(this, ReferenceVersionRules.INDEPENDENT); 663 if ("specific".equals(codeString)) 664 return new Enumeration<ReferenceVersionRules>(this, ReferenceVersionRules.SPECIFIC); 665 throw new FHIRException("Unknown ReferenceVersionRules code '"+codeString+"'"); 666 } 667 public String toCode(ReferenceVersionRules code) { 668 if (code == ReferenceVersionRules.EITHER) 669 return "either"; 670 if (code == ReferenceVersionRules.INDEPENDENT) 671 return "independent"; 672 if (code == ReferenceVersionRules.SPECIFIC) 673 return "specific"; 674 return "?"; 675 } 676 public String toSystem(ReferenceVersionRules code) { 677 return code.getSystem(); 678 } 679 } 680 681 public enum ConstraintSeverity { 682 /** 683 * If the constraint is violated, the resource is not conformant. 684 */ 685 ERROR, 686 /** 687 * If the constraint is violated, the resource is conformant, but it is not necessarily following best practice. 688 */ 689 WARNING, 690 /** 691 * added to help the parsers with the generic types 692 */ 693 NULL; 694 public static ConstraintSeverity fromCode(String codeString) throws FHIRException { 695 if (codeString == null || "".equals(codeString)) 696 return null; 697 if ("error".equals(codeString)) 698 return ERROR; 699 if ("warning".equals(codeString)) 700 return WARNING; 701 if (Configuration.isAcceptInvalidEnums()) 702 return null; 703 else 704 throw new FHIRException("Unknown ConstraintSeverity code '"+codeString+"'"); 705 } 706 public String toCode() { 707 switch (this) { 708 case ERROR: return "error"; 709 case WARNING: return "warning"; 710 case NULL: return null; 711 default: return "?"; 712 } 713 } 714 public String getSystem() { 715 switch (this) { 716 case ERROR: return "http://hl7.org/fhir/constraint-severity"; 717 case WARNING: return "http://hl7.org/fhir/constraint-severity"; 718 case NULL: return null; 719 default: return "?"; 720 } 721 } 722 public String getDefinition() { 723 switch (this) { 724 case ERROR: return "If the constraint is violated, the resource is not conformant."; 725 case WARNING: return "If the constraint is violated, the resource is conformant, but it is not necessarily following best practice."; 726 case NULL: return null; 727 default: return "?"; 728 } 729 } 730 public String getDisplay() { 731 switch (this) { 732 case ERROR: return "Error"; 733 case WARNING: return "Warning"; 734 case NULL: return null; 735 default: return "?"; 736 } 737 } 738 } 739 740 public static class ConstraintSeverityEnumFactory implements EnumFactory<ConstraintSeverity> { 741 public ConstraintSeverity fromCode(String codeString) throws IllegalArgumentException { 742 if (codeString == null || "".equals(codeString)) 743 if (codeString == null || "".equals(codeString)) 744 return null; 745 if ("error".equals(codeString)) 746 return ConstraintSeverity.ERROR; 747 if ("warning".equals(codeString)) 748 return ConstraintSeverity.WARNING; 749 throw new IllegalArgumentException("Unknown ConstraintSeverity code '"+codeString+"'"); 750 } 751 public Enumeration<ConstraintSeverity> fromType(PrimitiveType<?> code) throws FHIRException { 752 if (code == null) 753 return null; 754 if (code.isEmpty()) 755 return new Enumeration<ConstraintSeverity>(this); 756 String codeString = code.asStringValue(); 757 if (codeString == null || "".equals(codeString)) 758 return null; 759 if ("error".equals(codeString)) 760 return new Enumeration<ConstraintSeverity>(this, ConstraintSeverity.ERROR); 761 if ("warning".equals(codeString)) 762 return new Enumeration<ConstraintSeverity>(this, ConstraintSeverity.WARNING); 763 throw new FHIRException("Unknown ConstraintSeverity code '"+codeString+"'"); 764 } 765 public String toCode(ConstraintSeverity code) { 766 if (code == ConstraintSeverity.ERROR) 767 return "error"; 768 if (code == ConstraintSeverity.WARNING) 769 return "warning"; 770 return "?"; 771 } 772 public String toSystem(ConstraintSeverity code) { 773 return code.getSystem(); 774 } 775 } 776 777 @Block() 778 public static class ElementDefinitionSlicingComponent extends Element implements IBaseDatatypeElement { 779 /** 780 * Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices. 781 */ 782 @Child(name = "discriminator", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 783 @Description(shortDefinition="Element values that are used to distinguish the slices", formalDefinition="Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices." ) 784 protected List<ElementDefinitionSlicingDiscriminatorComponent> discriminator; 785 786 /** 787 * A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated. 788 */ 789 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 790 @Description(shortDefinition="Text description of how slicing works (or not)", formalDefinition="A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated." ) 791 protected StringType description; 792 793 /** 794 * If the matching elements have to occur in the same order as defined in the profile. 795 */ 796 @Child(name = "ordered", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=true) 797 @Description(shortDefinition="If elements must be in same order as slices", formalDefinition="If the matching elements have to occur in the same order as defined in the profile." ) 798 protected BooleanType ordered; 799 800 /** 801 * Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end. 802 */ 803 @Child(name = "rules", type = {CodeType.class}, order=4, min=1, max=1, modifier=false, summary=true) 804 @Description(shortDefinition="closed | open | openAtEnd", formalDefinition="Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end." ) 805 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-slicing-rules") 806 protected Enumeration<SlicingRules> rules; 807 808 private static final long serialVersionUID = -311635839L; 809 810 /** 811 * Constructor 812 */ 813 public ElementDefinitionSlicingComponent() { 814 super(); 815 } 816 817 /** 818 * Constructor 819 */ 820 public ElementDefinitionSlicingComponent(Enumeration<SlicingRules> rules) { 821 super(); 822 this.rules = rules; 823 } 824 825 /** 826 * @return {@link #discriminator} (Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.) 827 */ 828 public List<ElementDefinitionSlicingDiscriminatorComponent> getDiscriminator() { 829 if (this.discriminator == null) 830 this.discriminator = new ArrayList<ElementDefinitionSlicingDiscriminatorComponent>(); 831 return this.discriminator; 832 } 833 834 /** 835 * @return Returns a reference to <code>this</code> for easy method chaining 836 */ 837 public ElementDefinitionSlicingComponent setDiscriminator(List<ElementDefinitionSlicingDiscriminatorComponent> theDiscriminator) { 838 this.discriminator = theDiscriminator; 839 return this; 840 } 841 842 public boolean hasDiscriminator() { 843 if (this.discriminator == null) 844 return false; 845 for (ElementDefinitionSlicingDiscriminatorComponent item : this.discriminator) 846 if (!item.isEmpty()) 847 return true; 848 return false; 849 } 850 851 public ElementDefinitionSlicingDiscriminatorComponent addDiscriminator() { //3 852 ElementDefinitionSlicingDiscriminatorComponent t = new ElementDefinitionSlicingDiscriminatorComponent(); 853 if (this.discriminator == null) 854 this.discriminator = new ArrayList<ElementDefinitionSlicingDiscriminatorComponent>(); 855 this.discriminator.add(t); 856 return t; 857 } 858 859 public ElementDefinitionSlicingComponent addDiscriminator(ElementDefinitionSlicingDiscriminatorComponent t) { //3 860 if (t == null) 861 return this; 862 if (this.discriminator == null) 863 this.discriminator = new ArrayList<ElementDefinitionSlicingDiscriminatorComponent>(); 864 this.discriminator.add(t); 865 return this; 866 } 867 868 /** 869 * @return The first repetition of repeating field {@link #discriminator}, creating it if it does not already exist 870 */ 871 public ElementDefinitionSlicingDiscriminatorComponent getDiscriminatorFirstRep() { 872 if (getDiscriminator().isEmpty()) { 873 addDiscriminator(); 874 } 875 return getDiscriminator().get(0); 876 } 877 878 /** 879 * @return {@link #description} (A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 880 */ 881 public StringType getDescriptionElement() { 882 if (this.description == null) 883 if (Configuration.errorOnAutoCreate()) 884 throw new Error("Attempt to auto-create ElementDefinitionSlicingComponent.description"); 885 else if (Configuration.doAutoCreate()) 886 this.description = new StringType(); // bb 887 return this.description; 888 } 889 890 public boolean hasDescriptionElement() { 891 return this.description != null && !this.description.isEmpty(); 892 } 893 894 public boolean hasDescription() { 895 return this.description != null && !this.description.isEmpty(); 896 } 897 898 /** 899 * @param value {@link #description} (A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 900 */ 901 public ElementDefinitionSlicingComponent setDescriptionElement(StringType value) { 902 this.description = value; 903 return this; 904 } 905 906 /** 907 * @return A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated. 908 */ 909 public String getDescription() { 910 return this.description == null ? null : this.description.getValue(); 911 } 912 913 /** 914 * @param value A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated. 915 */ 916 public ElementDefinitionSlicingComponent setDescription(String value) { 917 if (Utilities.noString(value)) 918 this.description = null; 919 else { 920 if (this.description == null) 921 this.description = new StringType(); 922 this.description.setValue(value); 923 } 924 return this; 925 } 926 927 /** 928 * @return {@link #ordered} (If the matching elements have to occur in the same order as defined in the profile.). This is the underlying object with id, value and extensions. The accessor "getOrdered" gives direct access to the value 929 */ 930 public BooleanType getOrderedElement() { 931 if (this.ordered == null) 932 if (Configuration.errorOnAutoCreate()) 933 throw new Error("Attempt to auto-create ElementDefinitionSlicingComponent.ordered"); 934 else if (Configuration.doAutoCreate()) 935 this.ordered = new BooleanType(); // bb 936 return this.ordered; 937 } 938 939 public boolean hasOrderedElement() { 940 return this.ordered != null && !this.ordered.isEmpty(); 941 } 942 943 public boolean hasOrdered() { 944 return this.ordered != null && !this.ordered.isEmpty(); 945 } 946 947 /** 948 * @param value {@link #ordered} (If the matching elements have to occur in the same order as defined in the profile.). This is the underlying object with id, value and extensions. The accessor "getOrdered" gives direct access to the value 949 */ 950 public ElementDefinitionSlicingComponent setOrderedElement(BooleanType value) { 951 this.ordered = value; 952 return this; 953 } 954 955 /** 956 * @return If the matching elements have to occur in the same order as defined in the profile. 957 */ 958 public boolean getOrdered() { 959 return this.ordered == null || this.ordered.isEmpty() ? false : this.ordered.getValue(); 960 } 961 962 /** 963 * @param value If the matching elements have to occur in the same order as defined in the profile. 964 */ 965 public ElementDefinitionSlicingComponent setOrdered(boolean value) { 966 if (this.ordered == null) 967 this.ordered = new BooleanType(); 968 this.ordered.setValue(value); 969 return this; 970 } 971 972 /** 973 * @return {@link #rules} (Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.). This is the underlying object with id, value and extensions. The accessor "getRules" gives direct access to the value 974 */ 975 public Enumeration<SlicingRules> getRulesElement() { 976 if (this.rules == null) 977 if (Configuration.errorOnAutoCreate()) 978 throw new Error("Attempt to auto-create ElementDefinitionSlicingComponent.rules"); 979 else if (Configuration.doAutoCreate()) 980 this.rules = new Enumeration<SlicingRules>(new SlicingRulesEnumFactory()); // bb 981 return this.rules; 982 } 983 984 public boolean hasRulesElement() { 985 return this.rules != null && !this.rules.isEmpty(); 986 } 987 988 public boolean hasRules() { 989 return this.rules != null && !this.rules.isEmpty(); 990 } 991 992 /** 993 * @param value {@link #rules} (Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.). This is the underlying object with id, value and extensions. The accessor "getRules" gives direct access to the value 994 */ 995 public ElementDefinitionSlicingComponent setRulesElement(Enumeration<SlicingRules> value) { 996 this.rules = value; 997 return this; 998 } 999 1000 /** 1001 * @return Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end. 1002 */ 1003 public SlicingRules getRules() { 1004 return this.rules == null ? null : this.rules.getValue(); 1005 } 1006 1007 /** 1008 * @param value Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end. 1009 */ 1010 public ElementDefinitionSlicingComponent setRules(SlicingRules value) { 1011 if (this.rules == null) 1012 this.rules = new Enumeration<SlicingRules>(new SlicingRulesEnumFactory()); 1013 this.rules.setValue(value); 1014 return this; 1015 } 1016 1017 protected void listChildren(List<Property> children) { 1018 super.listChildren(children); 1019 children.add(new Property("discriminator", "", "Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.", 0, java.lang.Integer.MAX_VALUE, discriminator)); 1020 children.add(new Property("description", "string", "A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.", 0, 1, description)); 1021 children.add(new Property("ordered", "boolean", "If the matching elements have to occur in the same order as defined in the profile.", 0, 1, ordered)); 1022 children.add(new Property("rules", "code", "Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.", 0, 1, rules)); 1023 } 1024 1025 @Override 1026 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1027 switch (_hash) { 1028 case -1888270692: /*discriminator*/ return new Property("discriminator", "", "Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.", 0, java.lang.Integer.MAX_VALUE, discriminator); 1029 case -1724546052: /*description*/ return new Property("description", "string", "A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.", 0, 1, description); 1030 case -1207109523: /*ordered*/ return new Property("ordered", "boolean", "If the matching elements have to occur in the same order as defined in the profile.", 0, 1, ordered); 1031 case 108873975: /*rules*/ return new Property("rules", "code", "Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.", 0, 1, rules); 1032 default: return super.getNamedProperty(_hash, _name, _checkValid); 1033 } 1034 1035 } 1036 1037 @Override 1038 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1039 switch (hash) { 1040 case -1888270692: /*discriminator*/ return this.discriminator == null ? new Base[0] : this.discriminator.toArray(new Base[this.discriminator.size()]); // ElementDefinitionSlicingDiscriminatorComponent 1041 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 1042 case -1207109523: /*ordered*/ return this.ordered == null ? new Base[0] : new Base[] {this.ordered}; // BooleanType 1043 case 108873975: /*rules*/ return this.rules == null ? new Base[0] : new Base[] {this.rules}; // Enumeration<SlicingRules> 1044 default: return super.getProperty(hash, name, checkValid); 1045 } 1046 1047 } 1048 1049 @Override 1050 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1051 switch (hash) { 1052 case -1888270692: // discriminator 1053 this.getDiscriminator().add((ElementDefinitionSlicingDiscriminatorComponent) value); // ElementDefinitionSlicingDiscriminatorComponent 1054 return value; 1055 case -1724546052: // description 1056 this.description = castToString(value); // StringType 1057 return value; 1058 case -1207109523: // ordered 1059 this.ordered = castToBoolean(value); // BooleanType 1060 return value; 1061 case 108873975: // rules 1062 value = new SlicingRulesEnumFactory().fromType(castToCode(value)); 1063 this.rules = (Enumeration) value; // Enumeration<SlicingRules> 1064 return value; 1065 default: return super.setProperty(hash, name, value); 1066 } 1067 1068 } 1069 1070 @Override 1071 public Base setProperty(String name, Base value) throws FHIRException { 1072 if (name.equals("discriminator")) { 1073 this.getDiscriminator().add((ElementDefinitionSlicingDiscriminatorComponent) value); 1074 } else if (name.equals("description")) { 1075 this.description = castToString(value); // StringType 1076 } else if (name.equals("ordered")) { 1077 this.ordered = castToBoolean(value); // BooleanType 1078 } else if (name.equals("rules")) { 1079 value = new SlicingRulesEnumFactory().fromType(castToCode(value)); 1080 this.rules = (Enumeration) value; // Enumeration<SlicingRules> 1081 } else 1082 return super.setProperty(name, value); 1083 return value; 1084 } 1085 1086 @Override 1087 public Base makeProperty(int hash, String name) throws FHIRException { 1088 switch (hash) { 1089 case -1888270692: return addDiscriminator(); 1090 case -1724546052: return getDescriptionElement(); 1091 case -1207109523: return getOrderedElement(); 1092 case 108873975: return getRulesElement(); 1093 default: return super.makeProperty(hash, name); 1094 } 1095 1096 } 1097 1098 @Override 1099 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1100 switch (hash) { 1101 case -1888270692: /*discriminator*/ return new String[] {}; 1102 case -1724546052: /*description*/ return new String[] {"string"}; 1103 case -1207109523: /*ordered*/ return new String[] {"boolean"}; 1104 case 108873975: /*rules*/ return new String[] {"code"}; 1105 default: return super.getTypesForProperty(hash, name); 1106 } 1107 1108 } 1109 1110 @Override 1111 public Base addChild(String name) throws FHIRException { 1112 if (name.equals("discriminator")) { 1113 return addDiscriminator(); 1114 } 1115 else if (name.equals("description")) { 1116 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.description"); 1117 } 1118 else if (name.equals("ordered")) { 1119 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.ordered"); 1120 } 1121 else if (name.equals("rules")) { 1122 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.rules"); 1123 } 1124 else 1125 return super.addChild(name); 1126 } 1127 1128 public ElementDefinitionSlicingComponent copy() { 1129 ElementDefinitionSlicingComponent dst = new ElementDefinitionSlicingComponent(); 1130 copyValues(dst); 1131 if (discriminator != null) { 1132 dst.discriminator = new ArrayList<ElementDefinitionSlicingDiscriminatorComponent>(); 1133 for (ElementDefinitionSlicingDiscriminatorComponent i : discriminator) 1134 dst.discriminator.add(i.copy()); 1135 }; 1136 dst.description = description == null ? null : description.copy(); 1137 dst.ordered = ordered == null ? null : ordered.copy(); 1138 dst.rules = rules == null ? null : rules.copy(); 1139 return dst; 1140 } 1141 1142 @Override 1143 public boolean equalsDeep(Base other_) { 1144 if (!super.equalsDeep(other_)) 1145 return false; 1146 if (!(other_ instanceof ElementDefinitionSlicingComponent)) 1147 return false; 1148 ElementDefinitionSlicingComponent o = (ElementDefinitionSlicingComponent) other_; 1149 return compareDeep(discriminator, o.discriminator, true) && compareDeep(description, o.description, true) 1150 && compareDeep(ordered, o.ordered, true) && compareDeep(rules, o.rules, true); 1151 } 1152 1153 @Override 1154 public boolean equalsShallow(Base other_) { 1155 if (!super.equalsShallow(other_)) 1156 return false; 1157 if (!(other_ instanceof ElementDefinitionSlicingComponent)) 1158 return false; 1159 ElementDefinitionSlicingComponent o = (ElementDefinitionSlicingComponent) other_; 1160 return compareValues(description, o.description, true) && compareValues(ordered, o.ordered, true) && compareValues(rules, o.rules, true) 1161 ; 1162 } 1163 1164 public boolean isEmpty() { 1165 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(discriminator, description 1166 , ordered, rules); 1167 } 1168 1169 public String fhirType() { 1170 return "ElementDefinition.slicing"; 1171 1172 } 1173 1174 } 1175 1176 @Block() 1177 public static class ElementDefinitionSlicingDiscriminatorComponent extends Element implements IBaseDatatypeElement { 1178 /** 1179 * How the element value is interpreted when discrimination is evaluated. 1180 */ 1181 @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 1182 @Description(shortDefinition="value | exists | pattern | type | profile", formalDefinition="How the element value is interpreted when discrimination is evaluated." ) 1183 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/discriminator-type") 1184 protected Enumeration<DiscriminatorType> type; 1185 1186 /** 1187 * A FHIRPath expression, using a restricted subset of FHIRPath, that is used to identify the element on which discrimination is based. 1188 */ 1189 @Child(name = "path", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true) 1190 @Description(shortDefinition="Path to element value", formalDefinition="A FHIRPath expression, using a restricted subset of FHIRPath, that is used to identify the element on which discrimination is based." ) 1191 protected StringType path; 1192 1193 private static final long serialVersionUID = 1151159293L; 1194 1195 /** 1196 * Constructor 1197 */ 1198 public ElementDefinitionSlicingDiscriminatorComponent() { 1199 super(); 1200 } 1201 1202 /** 1203 * Constructor 1204 */ 1205 public ElementDefinitionSlicingDiscriminatorComponent(Enumeration<DiscriminatorType> type, StringType path) { 1206 super(); 1207 this.type = type; 1208 this.path = path; 1209 } 1210 1211 /** 1212 * @return {@link #type} (How the element value is interpreted when discrimination is evaluated.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1213 */ 1214 public Enumeration<DiscriminatorType> getTypeElement() { 1215 if (this.type == null) 1216 if (Configuration.errorOnAutoCreate()) 1217 throw new Error("Attempt to auto-create ElementDefinitionSlicingDiscriminatorComponent.type"); 1218 else if (Configuration.doAutoCreate()) 1219 this.type = new Enumeration<DiscriminatorType>(new DiscriminatorTypeEnumFactory()); // bb 1220 return this.type; 1221 } 1222 1223 public boolean hasTypeElement() { 1224 return this.type != null && !this.type.isEmpty(); 1225 } 1226 1227 public boolean hasType() { 1228 return this.type != null && !this.type.isEmpty(); 1229 } 1230 1231 /** 1232 * @param value {@link #type} (How the element value is interpreted when discrimination is evaluated.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1233 */ 1234 public ElementDefinitionSlicingDiscriminatorComponent setTypeElement(Enumeration<DiscriminatorType> value) { 1235 this.type = value; 1236 return this; 1237 } 1238 1239 /** 1240 * @return How the element value is interpreted when discrimination is evaluated. 1241 */ 1242 public DiscriminatorType getType() { 1243 return this.type == null ? null : this.type.getValue(); 1244 } 1245 1246 /** 1247 * @param value How the element value is interpreted when discrimination is evaluated. 1248 */ 1249 public ElementDefinitionSlicingDiscriminatorComponent setType(DiscriminatorType value) { 1250 if (this.type == null) 1251 this.type = new Enumeration<DiscriminatorType>(new DiscriminatorTypeEnumFactory()); 1252 this.type.setValue(value); 1253 return this; 1254 } 1255 1256 /** 1257 * @return {@link #path} (A FHIRPath expression, using a restricted subset of FHIRPath, that is used to identify the element on which discrimination is based.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value 1258 */ 1259 public StringType getPathElement() { 1260 if (this.path == null) 1261 if (Configuration.errorOnAutoCreate()) 1262 throw new Error("Attempt to auto-create ElementDefinitionSlicingDiscriminatorComponent.path"); 1263 else if (Configuration.doAutoCreate()) 1264 this.path = new StringType(); // bb 1265 return this.path; 1266 } 1267 1268 public boolean hasPathElement() { 1269 return this.path != null && !this.path.isEmpty(); 1270 } 1271 1272 public boolean hasPath() { 1273 return this.path != null && !this.path.isEmpty(); 1274 } 1275 1276 /** 1277 * @param value {@link #path} (A FHIRPath expression, using a restricted subset of FHIRPath, that is used to identify the element on which discrimination is based.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value 1278 */ 1279 public ElementDefinitionSlicingDiscriminatorComponent setPathElement(StringType value) { 1280 this.path = value; 1281 return this; 1282 } 1283 1284 /** 1285 * @return A FHIRPath expression, using a restricted subset of FHIRPath, that is used to identify the element on which discrimination is based. 1286 */ 1287 public String getPath() { 1288 return this.path == null ? null : this.path.getValue(); 1289 } 1290 1291 /** 1292 * @param value A FHIRPath expression, using a restricted subset of FHIRPath, that is used to identify the element on which discrimination is based. 1293 */ 1294 public ElementDefinitionSlicingDiscriminatorComponent setPath(String value) { 1295 if (this.path == null) 1296 this.path = new StringType(); 1297 this.path.setValue(value); 1298 return this; 1299 } 1300 1301 protected void listChildren(List<Property> children) { 1302 super.listChildren(children); 1303 children.add(new Property("type", "code", "How the element value is interpreted when discrimination is evaluated.", 0, 1, type)); 1304 children.add(new Property("path", "string", "A FHIRPath expression, using a restricted subset of FHIRPath, that is used to identify the element on which discrimination is based.", 0, 1, path)); 1305 } 1306 1307 @Override 1308 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1309 switch (_hash) { 1310 case 3575610: /*type*/ return new Property("type", "code", "How the element value is interpreted when discrimination is evaluated.", 0, 1, type); 1311 case 3433509: /*path*/ return new Property("path", "string", "A FHIRPath expression, using a restricted subset of FHIRPath, that is used to identify the element on which discrimination is based.", 0, 1, path); 1312 default: return super.getNamedProperty(_hash, _name, _checkValid); 1313 } 1314 1315 } 1316 1317 @Override 1318 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1319 switch (hash) { 1320 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<DiscriminatorType> 1321 case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType 1322 default: return super.getProperty(hash, name, checkValid); 1323 } 1324 1325 } 1326 1327 @Override 1328 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1329 switch (hash) { 1330 case 3575610: // type 1331 value = new DiscriminatorTypeEnumFactory().fromType(castToCode(value)); 1332 this.type = (Enumeration) value; // Enumeration<DiscriminatorType> 1333 return value; 1334 case 3433509: // path 1335 this.path = castToString(value); // StringType 1336 return value; 1337 default: return super.setProperty(hash, name, value); 1338 } 1339 1340 } 1341 1342 @Override 1343 public Base setProperty(String name, Base value) throws FHIRException { 1344 if (name.equals("type")) { 1345 value = new DiscriminatorTypeEnumFactory().fromType(castToCode(value)); 1346 this.type = (Enumeration) value; // Enumeration<DiscriminatorType> 1347 } else if (name.equals("path")) { 1348 this.path = castToString(value); // StringType 1349 } else 1350 return super.setProperty(name, value); 1351 return value; 1352 } 1353 1354 @Override 1355 public Base makeProperty(int hash, String name) throws FHIRException { 1356 switch (hash) { 1357 case 3575610: return getTypeElement(); 1358 case 3433509: return getPathElement(); 1359 default: return super.makeProperty(hash, name); 1360 } 1361 1362 } 1363 1364 @Override 1365 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1366 switch (hash) { 1367 case 3575610: /*type*/ return new String[] {"code"}; 1368 case 3433509: /*path*/ return new String[] {"string"}; 1369 default: return super.getTypesForProperty(hash, name); 1370 } 1371 1372 } 1373 1374 @Override 1375 public Base addChild(String name) throws FHIRException { 1376 if (name.equals("type")) { 1377 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.type"); 1378 } 1379 else if (name.equals("path")) { 1380 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.path"); 1381 } 1382 else 1383 return super.addChild(name); 1384 } 1385 1386 public ElementDefinitionSlicingDiscriminatorComponent copy() { 1387 ElementDefinitionSlicingDiscriminatorComponent dst = new ElementDefinitionSlicingDiscriminatorComponent(); 1388 copyValues(dst); 1389 dst.type = type == null ? null : type.copy(); 1390 dst.path = path == null ? null : path.copy(); 1391 return dst; 1392 } 1393 1394 @Override 1395 public boolean equalsDeep(Base other_) { 1396 if (!super.equalsDeep(other_)) 1397 return false; 1398 if (!(other_ instanceof ElementDefinitionSlicingDiscriminatorComponent)) 1399 return false; 1400 ElementDefinitionSlicingDiscriminatorComponent o = (ElementDefinitionSlicingDiscriminatorComponent) other_; 1401 return compareDeep(type, o.type, true) && compareDeep(path, o.path, true); 1402 } 1403 1404 @Override 1405 public boolean equalsShallow(Base other_) { 1406 if (!super.equalsShallow(other_)) 1407 return false; 1408 if (!(other_ instanceof ElementDefinitionSlicingDiscriminatorComponent)) 1409 return false; 1410 ElementDefinitionSlicingDiscriminatorComponent o = (ElementDefinitionSlicingDiscriminatorComponent) other_; 1411 return compareValues(type, o.type, true) && compareValues(path, o.path, true); 1412 } 1413 1414 public boolean isEmpty() { 1415 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, path); 1416 } 1417 1418 public String fhirType() { 1419 return "ElementDefinition.slicing.discriminator"; 1420 1421 } 1422 1423 } 1424 1425 @Block() 1426 public static class ElementDefinitionBaseComponent extends Element implements IBaseDatatypeElement { 1427 /** 1428 * The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base. 1429 */ 1430 @Child(name = "path", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) 1431 @Description(shortDefinition="Path that identifies the base element", formalDefinition="The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base." ) 1432 protected StringType path; 1433 1434 /** 1435 * Minimum cardinality of the base element identified by the path. 1436 */ 1437 @Child(name = "min", type = {UnsignedIntType.class}, order=2, min=1, max=1, modifier=false, summary=true) 1438 @Description(shortDefinition="Min cardinality of the base element", formalDefinition="Minimum cardinality of the base element identified by the path." ) 1439 protected UnsignedIntType min; 1440 1441 /** 1442 * Maximum cardinality of the base element identified by the path. 1443 */ 1444 @Child(name = "max", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=true) 1445 @Description(shortDefinition="Max cardinality of the base element", formalDefinition="Maximum cardinality of the base element identified by the path." ) 1446 protected StringType max; 1447 1448 private static final long serialVersionUID = -1412704221L; 1449 1450 /** 1451 * Constructor 1452 */ 1453 public ElementDefinitionBaseComponent() { 1454 super(); 1455 } 1456 1457 /** 1458 * Constructor 1459 */ 1460 public ElementDefinitionBaseComponent(StringType path, UnsignedIntType min, StringType max) { 1461 super(); 1462 this.path = path; 1463 this.min = min; 1464 this.max = max; 1465 } 1466 1467 /** 1468 * @return {@link #path} (The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value 1469 */ 1470 public StringType getPathElement() { 1471 if (this.path == null) 1472 if (Configuration.errorOnAutoCreate()) 1473 throw new Error("Attempt to auto-create ElementDefinitionBaseComponent.path"); 1474 else if (Configuration.doAutoCreate()) 1475 this.path = new StringType(); // bb 1476 return this.path; 1477 } 1478 1479 public boolean hasPathElement() { 1480 return this.path != null && !this.path.isEmpty(); 1481 } 1482 1483 public boolean hasPath() { 1484 return this.path != null && !this.path.isEmpty(); 1485 } 1486 1487 /** 1488 * @param value {@link #path} (The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value 1489 */ 1490 public ElementDefinitionBaseComponent setPathElement(StringType value) { 1491 this.path = value; 1492 return this; 1493 } 1494 1495 /** 1496 * @return The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base. 1497 */ 1498 public String getPath() { 1499 return this.path == null ? null : this.path.getValue(); 1500 } 1501 1502 /** 1503 * @param value The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base. 1504 */ 1505 public ElementDefinitionBaseComponent setPath(String value) { 1506 if (this.path == null) 1507 this.path = new StringType(); 1508 this.path.setValue(value); 1509 return this; 1510 } 1511 1512 /** 1513 * @return {@link #min} (Minimum cardinality of the base element identified by the path.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value 1514 */ 1515 public UnsignedIntType getMinElement() { 1516 if (this.min == null) 1517 if (Configuration.errorOnAutoCreate()) 1518 throw new Error("Attempt to auto-create ElementDefinitionBaseComponent.min"); 1519 else if (Configuration.doAutoCreate()) 1520 this.min = new UnsignedIntType(); // bb 1521 return this.min; 1522 } 1523 1524 public boolean hasMinElement() { 1525 return this.min != null && !this.min.isEmpty(); 1526 } 1527 1528 public boolean hasMin() { 1529 return this.min != null && !this.min.isEmpty(); 1530 } 1531 1532 /** 1533 * @param value {@link #min} (Minimum cardinality of the base element identified by the path.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value 1534 */ 1535 public ElementDefinitionBaseComponent setMinElement(UnsignedIntType value) { 1536 this.min = value; 1537 return this; 1538 } 1539 1540 /** 1541 * @return Minimum cardinality of the base element identified by the path. 1542 */ 1543 public int getMin() { 1544 return this.min == null || this.min.isEmpty() ? 0 : this.min.getValue(); 1545 } 1546 1547 /** 1548 * @param value Minimum cardinality of the base element identified by the path. 1549 */ 1550 public ElementDefinitionBaseComponent setMin(int value) { 1551 if (this.min == null) 1552 this.min = new UnsignedIntType(); 1553 this.min.setValue(value); 1554 return this; 1555 } 1556 1557 /** 1558 * @return {@link #max} (Maximum cardinality of the base element identified by the path.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value 1559 */ 1560 public StringType getMaxElement() { 1561 if (this.max == null) 1562 if (Configuration.errorOnAutoCreate()) 1563 throw new Error("Attempt to auto-create ElementDefinitionBaseComponent.max"); 1564 else if (Configuration.doAutoCreate()) 1565 this.max = new StringType(); // bb 1566 return this.max; 1567 } 1568 1569 public boolean hasMaxElement() { 1570 return this.max != null && !this.max.isEmpty(); 1571 } 1572 1573 public boolean hasMax() { 1574 return this.max != null && !this.max.isEmpty(); 1575 } 1576 1577 /** 1578 * @param value {@link #max} (Maximum cardinality of the base element identified by the path.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value 1579 */ 1580 public ElementDefinitionBaseComponent setMaxElement(StringType value) { 1581 this.max = value; 1582 return this; 1583 } 1584 1585 /** 1586 * @return Maximum cardinality of the base element identified by the path. 1587 */ 1588 public String getMax() { 1589 return this.max == null ? null : this.max.getValue(); 1590 } 1591 1592 /** 1593 * @param value Maximum cardinality of the base element identified by the path. 1594 */ 1595 public ElementDefinitionBaseComponent setMax(String value) { 1596 if (this.max == null) 1597 this.max = new StringType(); 1598 this.max.setValue(value); 1599 return this; 1600 } 1601 1602 protected void listChildren(List<Property> children) { 1603 super.listChildren(children); 1604 children.add(new Property("path", "string", "The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base.", 0, 1, path)); 1605 children.add(new Property("min", "unsignedInt", "Minimum cardinality of the base element identified by the path.", 0, 1, min)); 1606 children.add(new Property("max", "string", "Maximum cardinality of the base element identified by the path.", 0, 1, max)); 1607 } 1608 1609 @Override 1610 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1611 switch (_hash) { 1612 case 3433509: /*path*/ return new Property("path", "string", "The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base.", 0, 1, path); 1613 case 108114: /*min*/ return new Property("min", "unsignedInt", "Minimum cardinality of the base element identified by the path.", 0, 1, min); 1614 case 107876: /*max*/ return new Property("max", "string", "Maximum cardinality of the base element identified by the path.", 0, 1, max); 1615 default: return super.getNamedProperty(_hash, _name, _checkValid); 1616 } 1617 1618 } 1619 1620 @Override 1621 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1622 switch (hash) { 1623 case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType 1624 case 108114: /*min*/ return this.min == null ? new Base[0] : new Base[] {this.min}; // UnsignedIntType 1625 case 107876: /*max*/ return this.max == null ? new Base[0] : new Base[] {this.max}; // StringType 1626 default: return super.getProperty(hash, name, checkValid); 1627 } 1628 1629 } 1630 1631 @Override 1632 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1633 switch (hash) { 1634 case 3433509: // path 1635 this.path = castToString(value); // StringType 1636 return value; 1637 case 108114: // min 1638 this.min = castToUnsignedInt(value); // UnsignedIntType 1639 return value; 1640 case 107876: // max 1641 this.max = castToString(value); // StringType 1642 return value; 1643 default: return super.setProperty(hash, name, value); 1644 } 1645 1646 } 1647 1648 @Override 1649 public Base setProperty(String name, Base value) throws FHIRException { 1650 if (name.equals("path")) { 1651 this.path = castToString(value); // StringType 1652 } else if (name.equals("min")) { 1653 this.min = castToUnsignedInt(value); // UnsignedIntType 1654 } else if (name.equals("max")) { 1655 this.max = castToString(value); // StringType 1656 } else 1657 return super.setProperty(name, value); 1658 return value; 1659 } 1660 1661 @Override 1662 public Base makeProperty(int hash, String name) throws FHIRException { 1663 switch (hash) { 1664 case 3433509: return getPathElement(); 1665 case 108114: return getMinElement(); 1666 case 107876: return getMaxElement(); 1667 default: return super.makeProperty(hash, name); 1668 } 1669 1670 } 1671 1672 @Override 1673 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1674 switch (hash) { 1675 case 3433509: /*path*/ return new String[] {"string"}; 1676 case 108114: /*min*/ return new String[] {"unsignedInt"}; 1677 case 107876: /*max*/ return new String[] {"string"}; 1678 default: return super.getTypesForProperty(hash, name); 1679 } 1680 1681 } 1682 1683 @Override 1684 public Base addChild(String name) throws FHIRException { 1685 if (name.equals("path")) { 1686 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.path"); 1687 } 1688 else if (name.equals("min")) { 1689 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.min"); 1690 } 1691 else if (name.equals("max")) { 1692 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.max"); 1693 } 1694 else 1695 return super.addChild(name); 1696 } 1697 1698 public ElementDefinitionBaseComponent copy() { 1699 ElementDefinitionBaseComponent dst = new ElementDefinitionBaseComponent(); 1700 copyValues(dst); 1701 dst.path = path == null ? null : path.copy(); 1702 dst.min = min == null ? null : min.copy(); 1703 dst.max = max == null ? null : max.copy(); 1704 return dst; 1705 } 1706 1707 @Override 1708 public boolean equalsDeep(Base other_) { 1709 if (!super.equalsDeep(other_)) 1710 return false; 1711 if (!(other_ instanceof ElementDefinitionBaseComponent)) 1712 return false; 1713 ElementDefinitionBaseComponent o = (ElementDefinitionBaseComponent) other_; 1714 return compareDeep(path, o.path, true) && compareDeep(min, o.min, true) && compareDeep(max, o.max, true) 1715 ; 1716 } 1717 1718 @Override 1719 public boolean equalsShallow(Base other_) { 1720 if (!super.equalsShallow(other_)) 1721 return false; 1722 if (!(other_ instanceof ElementDefinitionBaseComponent)) 1723 return false; 1724 ElementDefinitionBaseComponent o = (ElementDefinitionBaseComponent) other_; 1725 return compareValues(path, o.path, true) && compareValues(min, o.min, true) && compareValues(max, o.max, true) 1726 ; 1727 } 1728 1729 public boolean isEmpty() { 1730 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, min, max); 1731 } 1732 1733 public String fhirType() { 1734 return "ElementDefinition.base"; 1735 1736 } 1737 1738 } 1739 1740 @Block() 1741 public static class TypeRefComponent extends Element implements IBaseDatatypeElement { 1742 /** 1743 * URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. "string" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models. 1744 */ 1745 @Child(name = "code", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=true) 1746 @Description(shortDefinition="Data type or Resource (reference to definition)", formalDefinition="URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. \"string\" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models." ) 1747 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/defined-types") 1748 protected UriType code; 1749 1750 /** 1751 * Identifies a profile structure or implementation Guide that SHALL hold for the datatype this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide. 1752 */ 1753 @Child(name = "profile", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true) 1754 @Description(shortDefinition="Profile (StructureDefinition) to apply (or IG)", formalDefinition="Identifies a profile structure or implementation Guide that SHALL hold for the datatype this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide." ) 1755 protected UriType profile; 1756 1757 /** 1758 * Identifies a profile structure or implementation Guide that SHALL hold for the target of the reference this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide. 1759 */ 1760 @Child(name = "targetProfile", type = {UriType.class}, order=3, min=0, max=1, modifier=false, summary=true) 1761 @Description(shortDefinition="Profile (StructureDefinition) to apply to reference target (or IG)", formalDefinition="Identifies a profile structure or implementation Guide that SHALL hold for the target of the reference this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide." ) 1762 protected UriType targetProfile; 1763 1764 /** 1765 * If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle. 1766 */ 1767 @Child(name = "aggregation", type = {CodeType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1768 @Description(shortDefinition="contained | referenced | bundled - how aggregated", formalDefinition="If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle." ) 1769 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-aggregation-mode") 1770 protected List<Enumeration<AggregationMode>> aggregation; 1771 1772 /** 1773 * Whether this reference needs to be version specific or version independent, or whether either can be used. 1774 */ 1775 @Child(name = "versioning", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=true) 1776 @Description(shortDefinition="either | independent | specific", formalDefinition="Whether this reference needs to be version specific or version independent, or whether either can be used." ) 1777 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/reference-version-rules") 1778 protected Enumeration<ReferenceVersionRules> versioning; 1779 1780 private static final long serialVersionUID = -560921355L; 1781 1782 /** 1783 * Constructor 1784 */ 1785 public TypeRefComponent() { 1786 super(); 1787 } 1788 1789 /** 1790 * Constructor 1791 */ 1792 public TypeRefComponent(UriType code) { 1793 super(); 1794 this.code = code; 1795 } 1796 1797 /** 1798 * @return {@link #code} (URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. "string" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 1799 */ 1800 public UriType getCodeElement() { 1801 if (this.code == null) 1802 if (Configuration.errorOnAutoCreate()) 1803 throw new Error("Attempt to auto-create TypeRefComponent.code"); 1804 else if (Configuration.doAutoCreate()) 1805 this.code = new UriType(); // bb 1806 return this.code; 1807 } 1808 1809 public boolean hasCodeElement() { 1810 return this.code != null && !this.code.isEmpty(); 1811 } 1812 1813 public boolean hasCode() { 1814 return this.code != null && !this.code.isEmpty(); 1815 } 1816 1817 /** 1818 * @param value {@link #code} (URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. "string" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 1819 */ 1820 public TypeRefComponent setCodeElement(UriType value) { 1821 this.code = value; 1822 return this; 1823 } 1824 1825 /** 1826 * @return URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. "string" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models. 1827 */ 1828 public String getCode() { 1829 return this.code == null ? null : this.code.getValue(); 1830 } 1831 1832 /** 1833 * @param value URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. "string" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models. 1834 */ 1835 public TypeRefComponent setCode(String value) { 1836 if (this.code == null) 1837 this.code = new UriType(); 1838 this.code.setValue(value); 1839 return this; 1840 } 1841 1842 /** 1843 * @return {@link #profile} (Identifies a profile structure or implementation Guide that SHALL hold for the datatype this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getProfile" gives direct access to the value 1844 */ 1845 public UriType getProfileElement() { 1846 if (this.profile == null) 1847 if (Configuration.errorOnAutoCreate()) 1848 throw new Error("Attempt to auto-create TypeRefComponent.profile"); 1849 else if (Configuration.doAutoCreate()) 1850 this.profile = new UriType(); // bb 1851 return this.profile; 1852 } 1853 1854 public boolean hasProfileElement() { 1855 return this.profile != null && !this.profile.isEmpty(); 1856 } 1857 1858 public boolean hasProfile() { 1859 return this.profile != null && !this.profile.isEmpty(); 1860 } 1861 1862 /** 1863 * @param value {@link #profile} (Identifies a profile structure or implementation Guide that SHALL hold for the datatype this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getProfile" gives direct access to the value 1864 */ 1865 public TypeRefComponent setProfileElement(UriType value) { 1866 this.profile = value; 1867 return this; 1868 } 1869 1870 /** 1871 * @return Identifies a profile structure or implementation Guide that SHALL hold for the datatype this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide. 1872 */ 1873 public String getProfile() { 1874 return this.profile == null ? null : this.profile.getValue(); 1875 } 1876 1877 /** 1878 * @param value Identifies a profile structure or implementation Guide that SHALL hold for the datatype this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide. 1879 */ 1880 public TypeRefComponent setProfile(String value) { 1881 if (Utilities.noString(value)) 1882 this.profile = null; 1883 else { 1884 if (this.profile == null) 1885 this.profile = new UriType(); 1886 this.profile.setValue(value); 1887 } 1888 return this; 1889 } 1890 1891 /** 1892 * @return {@link #targetProfile} (Identifies a profile structure or implementation Guide that SHALL hold for the target of the reference this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getTargetProfile" gives direct access to the value 1893 */ 1894 public UriType getTargetProfileElement() { 1895 if (this.targetProfile == null) 1896 if (Configuration.errorOnAutoCreate()) 1897 throw new Error("Attempt to auto-create TypeRefComponent.targetProfile"); 1898 else if (Configuration.doAutoCreate()) 1899 this.targetProfile = new UriType(); // bb 1900 return this.targetProfile; 1901 } 1902 1903 public boolean hasTargetProfileElement() { 1904 return this.targetProfile != null && !this.targetProfile.isEmpty(); 1905 } 1906 1907 public boolean hasTargetProfile() { 1908 return this.targetProfile != null && !this.targetProfile.isEmpty(); 1909 } 1910 1911 /** 1912 * @param value {@link #targetProfile} (Identifies a profile structure or implementation Guide that SHALL hold for the target of the reference this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getTargetProfile" gives direct access to the value 1913 */ 1914 public TypeRefComponent setTargetProfileElement(UriType value) { 1915 this.targetProfile = value; 1916 return this; 1917 } 1918 1919 /** 1920 * @return Identifies a profile structure or implementation Guide that SHALL hold for the target of the reference this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide. 1921 */ 1922 public String getTargetProfile() { 1923 return this.targetProfile == null ? null : this.targetProfile.getValue(); 1924 } 1925 1926 /** 1927 * @param value Identifies a profile structure or implementation Guide that SHALL hold for the target of the reference this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide. 1928 */ 1929 public TypeRefComponent setTargetProfile(String value) { 1930 if (Utilities.noString(value)) 1931 this.targetProfile = null; 1932 else { 1933 if (this.targetProfile == null) 1934 this.targetProfile = new UriType(); 1935 this.targetProfile.setValue(value); 1936 } 1937 return this; 1938 } 1939 1940 /** 1941 * @return {@link #aggregation} (If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.) 1942 */ 1943 public List<Enumeration<AggregationMode>> getAggregation() { 1944 if (this.aggregation == null) 1945 this.aggregation = new ArrayList<Enumeration<AggregationMode>>(); 1946 return this.aggregation; 1947 } 1948 1949 /** 1950 * @return Returns a reference to <code>this</code> for easy method chaining 1951 */ 1952 public TypeRefComponent setAggregation(List<Enumeration<AggregationMode>> theAggregation) { 1953 this.aggregation = theAggregation; 1954 return this; 1955 } 1956 1957 public boolean hasAggregation() { 1958 if (this.aggregation == null) 1959 return false; 1960 for (Enumeration<AggregationMode> item : this.aggregation) 1961 if (!item.isEmpty()) 1962 return true; 1963 return false; 1964 } 1965 1966 /** 1967 * @return {@link #aggregation} (If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.) 1968 */ 1969 public Enumeration<AggregationMode> addAggregationElement() {//2 1970 Enumeration<AggregationMode> t = new Enumeration<AggregationMode>(new AggregationModeEnumFactory()); 1971 if (this.aggregation == null) 1972 this.aggregation = new ArrayList<Enumeration<AggregationMode>>(); 1973 this.aggregation.add(t); 1974 return t; 1975 } 1976 1977 /** 1978 * @param value {@link #aggregation} (If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.) 1979 */ 1980 public TypeRefComponent addAggregation(AggregationMode value) { //1 1981 Enumeration<AggregationMode> t = new Enumeration<AggregationMode>(new AggregationModeEnumFactory()); 1982 t.setValue(value); 1983 if (this.aggregation == null) 1984 this.aggregation = new ArrayList<Enumeration<AggregationMode>>(); 1985 this.aggregation.add(t); 1986 return this; 1987 } 1988 1989 /** 1990 * @param value {@link #aggregation} (If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.) 1991 */ 1992 public boolean hasAggregation(AggregationMode value) { 1993 if (this.aggregation == null) 1994 return false; 1995 for (Enumeration<AggregationMode> v : this.aggregation) 1996 if (v.getValue().equals(value)) // code 1997 return true; 1998 return false; 1999 } 2000 2001 /** 2002 * @return {@link #versioning} (Whether this reference needs to be version specific or version independent, or whether either can be used.). This is the underlying object with id, value and extensions. The accessor "getVersioning" gives direct access to the value 2003 */ 2004 public Enumeration<ReferenceVersionRules> getVersioningElement() { 2005 if (this.versioning == null) 2006 if (Configuration.errorOnAutoCreate()) 2007 throw new Error("Attempt to auto-create TypeRefComponent.versioning"); 2008 else if (Configuration.doAutoCreate()) 2009 this.versioning = new Enumeration<ReferenceVersionRules>(new ReferenceVersionRulesEnumFactory()); // bb 2010 return this.versioning; 2011 } 2012 2013 public boolean hasVersioningElement() { 2014 return this.versioning != null && !this.versioning.isEmpty(); 2015 } 2016 2017 public boolean hasVersioning() { 2018 return this.versioning != null && !this.versioning.isEmpty(); 2019 } 2020 2021 /** 2022 * @param value {@link #versioning} (Whether this reference needs to be version specific or version independent, or whether either can be used.). This is the underlying object with id, value and extensions. The accessor "getVersioning" gives direct access to the value 2023 */ 2024 public TypeRefComponent setVersioningElement(Enumeration<ReferenceVersionRules> value) { 2025 this.versioning = value; 2026 return this; 2027 } 2028 2029 /** 2030 * @return Whether this reference needs to be version specific or version independent, or whether either can be used. 2031 */ 2032 public ReferenceVersionRules getVersioning() { 2033 return this.versioning == null ? null : this.versioning.getValue(); 2034 } 2035 2036 /** 2037 * @param value Whether this reference needs to be version specific or version independent, or whether either can be used. 2038 */ 2039 public TypeRefComponent setVersioning(ReferenceVersionRules value) { 2040 if (value == null) 2041 this.versioning = null; 2042 else { 2043 if (this.versioning == null) 2044 this.versioning = new Enumeration<ReferenceVersionRules>(new ReferenceVersionRulesEnumFactory()); 2045 this.versioning.setValue(value); 2046 } 2047 return this; 2048 } 2049 2050 protected void listChildren(List<Property> children) { 2051 super.listChildren(children); 2052 children.add(new Property("code", "uri", "URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. \"string\" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", 0, 1, code)); 2053 children.add(new Property("profile", "uri", "Identifies a profile structure or implementation Guide that SHALL hold for the datatype this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.", 0, 1, profile)); 2054 children.add(new Property("targetProfile", "uri", "Identifies a profile structure or implementation Guide that SHALL hold for the target of the reference this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.", 0, 1, targetProfile)); 2055 children.add(new Property("aggregation", "code", "If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.", 0, java.lang.Integer.MAX_VALUE, aggregation)); 2056 children.add(new Property("versioning", "code", "Whether this reference needs to be version specific or version independent, or whether either can be used.", 0, 1, versioning)); 2057 } 2058 2059 @Override 2060 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2061 switch (_hash) { 2062 case 3059181: /*code*/ return new Property("code", "uri", "URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. \"string\" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", 0, 1, code); 2063 case -309425751: /*profile*/ return new Property("profile", "uri", "Identifies a profile structure or implementation Guide that SHALL hold for the datatype this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.", 0, 1, profile); 2064 case 1994521304: /*targetProfile*/ return new Property("targetProfile", "uri", "Identifies a profile structure or implementation Guide that SHALL hold for the target of the reference this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.", 0, 1, targetProfile); 2065 case 841524962: /*aggregation*/ return new Property("aggregation", "code", "If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.", 0, java.lang.Integer.MAX_VALUE, aggregation); 2066 case -670487542: /*versioning*/ return new Property("versioning", "code", "Whether this reference needs to be version specific or version independent, or whether either can be used.", 0, 1, versioning); 2067 default: return super.getNamedProperty(_hash, _name, _checkValid); 2068 } 2069 2070 } 2071 2072 @Override 2073 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2074 switch (hash) { 2075 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // UriType 2076 case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // UriType 2077 case 1994521304: /*targetProfile*/ return this.targetProfile == null ? new Base[0] : new Base[] {this.targetProfile}; // UriType 2078 case 841524962: /*aggregation*/ return this.aggregation == null ? new Base[0] : this.aggregation.toArray(new Base[this.aggregation.size()]); // Enumeration<AggregationMode> 2079 case -670487542: /*versioning*/ return this.versioning == null ? new Base[0] : new Base[] {this.versioning}; // Enumeration<ReferenceVersionRules> 2080 default: return super.getProperty(hash, name, checkValid); 2081 } 2082 2083 } 2084 2085 @Override 2086 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2087 switch (hash) { 2088 case 3059181: // code 2089 this.code = castToUri(value); // UriType 2090 return value; 2091 case -309425751: // profile 2092 this.profile = castToUri(value); // UriType 2093 return value; 2094 case 1994521304: // targetProfile 2095 this.targetProfile = castToUri(value); // UriType 2096 return value; 2097 case 841524962: // aggregation 2098 value = new AggregationModeEnumFactory().fromType(castToCode(value)); 2099 this.getAggregation().add((Enumeration) value); // Enumeration<AggregationMode> 2100 return value; 2101 case -670487542: // versioning 2102 value = new ReferenceVersionRulesEnumFactory().fromType(castToCode(value)); 2103 this.versioning = (Enumeration) value; // Enumeration<ReferenceVersionRules> 2104 return value; 2105 default: return super.setProperty(hash, name, value); 2106 } 2107 2108 } 2109 2110 @Override 2111 public Base setProperty(String name, Base value) throws FHIRException { 2112 if (name.equals("code")) { 2113 this.code = castToUri(value); // UriType 2114 } else if (name.equals("profile")) { 2115 this.profile = castToUri(value); // UriType 2116 } else if (name.equals("targetProfile")) { 2117 this.targetProfile = castToUri(value); // UriType 2118 } else if (name.equals("aggregation")) { 2119 value = new AggregationModeEnumFactory().fromType(castToCode(value)); 2120 this.getAggregation().add((Enumeration) value); 2121 } else if (name.equals("versioning")) { 2122 value = new ReferenceVersionRulesEnumFactory().fromType(castToCode(value)); 2123 this.versioning = (Enumeration) value; // Enumeration<ReferenceVersionRules> 2124 } else 2125 return super.setProperty(name, value); 2126 return value; 2127 } 2128 2129 @Override 2130 public Base makeProperty(int hash, String name) throws FHIRException { 2131 switch (hash) { 2132 case 3059181: return getCodeElement(); 2133 case -309425751: return getProfileElement(); 2134 case 1994521304: return getTargetProfileElement(); 2135 case 841524962: return addAggregationElement(); 2136 case -670487542: return getVersioningElement(); 2137 default: return super.makeProperty(hash, name); 2138 } 2139 2140 } 2141 2142 @Override 2143 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2144 switch (hash) { 2145 case 3059181: /*code*/ return new String[] {"uri"}; 2146 case -309425751: /*profile*/ return new String[] {"uri"}; 2147 case 1994521304: /*targetProfile*/ return new String[] {"uri"}; 2148 case 841524962: /*aggregation*/ return new String[] {"code"}; 2149 case -670487542: /*versioning*/ return new String[] {"code"}; 2150 default: return super.getTypesForProperty(hash, name); 2151 } 2152 2153 } 2154 2155 @Override 2156 public Base addChild(String name) throws FHIRException { 2157 if (name.equals("code")) { 2158 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.code"); 2159 } 2160 else if (name.equals("profile")) { 2161 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.profile"); 2162 } 2163 else if (name.equals("targetProfile")) { 2164 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.targetProfile"); 2165 } 2166 else if (name.equals("aggregation")) { 2167 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.aggregation"); 2168 } 2169 else if (name.equals("versioning")) { 2170 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.versioning"); 2171 } 2172 else 2173 return super.addChild(name); 2174 } 2175 2176 public TypeRefComponent copy() { 2177 TypeRefComponent dst = new TypeRefComponent(); 2178 copyValues(dst); 2179 dst.code = code == null ? null : code.copy(); 2180 dst.profile = profile == null ? null : profile.copy(); 2181 dst.targetProfile = targetProfile == null ? null : targetProfile.copy(); 2182 if (aggregation != null) { 2183 dst.aggregation = new ArrayList<Enumeration<AggregationMode>>(); 2184 for (Enumeration<AggregationMode> i : aggregation) 2185 dst.aggregation.add(i.copy()); 2186 }; 2187 dst.versioning = versioning == null ? null : versioning.copy(); 2188 return dst; 2189 } 2190 2191 @Override 2192 public boolean equalsDeep(Base other_) { 2193 if (!super.equalsDeep(other_)) 2194 return false; 2195 if (!(other_ instanceof TypeRefComponent)) 2196 return false; 2197 TypeRefComponent o = (TypeRefComponent) other_; 2198 return compareDeep(code, o.code, true) && compareDeep(profile, o.profile, true) && compareDeep(targetProfile, o.targetProfile, true) 2199 && compareDeep(aggregation, o.aggregation, true) && compareDeep(versioning, o.versioning, true) 2200 ; 2201 } 2202 2203 @Override 2204 public boolean equalsShallow(Base other_) { 2205 if (!super.equalsShallow(other_)) 2206 return false; 2207 if (!(other_ instanceof TypeRefComponent)) 2208 return false; 2209 TypeRefComponent o = (TypeRefComponent) other_; 2210 return compareValues(code, o.code, true) && compareValues(profile, o.profile, true) && compareValues(targetProfile, o.targetProfile, true) 2211 && compareValues(aggregation, o.aggregation, true) && compareValues(versioning, o.versioning, true) 2212 ; 2213 } 2214 2215 public boolean isEmpty() { 2216 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, profile, targetProfile 2217 , aggregation, versioning); 2218 } 2219 2220 public String fhirType() { 2221 return "ElementDefinition.type"; 2222 2223 } 2224 2225 public boolean hasTarget() { 2226 return Utilities.existsInList(getCode(), "Reference"); 2227 2228 } 2229 2230 } 2231 2232 @Block() 2233 public static class ElementDefinitionExampleComponent extends Element implements IBaseDatatypeElement { 2234 /** 2235 * Describes the purpose of this example amoung the set of examples. 2236 */ 2237 @Child(name = "label", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) 2238 @Description(shortDefinition="Describes the purpose of this example", formalDefinition="Describes the purpose of this example amoung the set of examples." ) 2239 protected StringType label; 2240 2241 /** 2242 * The actual value for the element, which must be one of the types allowed for this element. 2243 */ 2244 @Child(name = "value", type = {}, order=2, min=1, max=1, modifier=false, summary=true) 2245 @Description(shortDefinition="Value of Example (one of allowed types)", formalDefinition="The actual value for the element, which must be one of the types allowed for this element." ) 2246 protected org.hl7.fhir.dstu3.model.Type value; 2247 2248 private static final long serialVersionUID = 1346348024L; 2249 2250 /** 2251 * Constructor 2252 */ 2253 public ElementDefinitionExampleComponent() { 2254 super(); 2255 } 2256 2257 /** 2258 * Constructor 2259 */ 2260 public ElementDefinitionExampleComponent(StringType label, org.hl7.fhir.dstu3.model.Type value) { 2261 super(); 2262 this.label = label; 2263 this.value = value; 2264 } 2265 2266 /** 2267 * @return {@link #label} (Describes the purpose of this example amoung the set of examples.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value 2268 */ 2269 public StringType getLabelElement() { 2270 if (this.label == null) 2271 if (Configuration.errorOnAutoCreate()) 2272 throw new Error("Attempt to auto-create ElementDefinitionExampleComponent.label"); 2273 else if (Configuration.doAutoCreate()) 2274 this.label = new StringType(); // bb 2275 return this.label; 2276 } 2277 2278 public boolean hasLabelElement() { 2279 return this.label != null && !this.label.isEmpty(); 2280 } 2281 2282 public boolean hasLabel() { 2283 return this.label != null && !this.label.isEmpty(); 2284 } 2285 2286 /** 2287 * @param value {@link #label} (Describes the purpose of this example amoung the set of examples.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value 2288 */ 2289 public ElementDefinitionExampleComponent setLabelElement(StringType value) { 2290 this.label = value; 2291 return this; 2292 } 2293 2294 /** 2295 * @return Describes the purpose of this example amoung the set of examples. 2296 */ 2297 public String getLabel() { 2298 return this.label == null ? null : this.label.getValue(); 2299 } 2300 2301 /** 2302 * @param value Describes the purpose of this example amoung the set of examples. 2303 */ 2304 public ElementDefinitionExampleComponent setLabel(String value) { 2305 if (this.label == null) 2306 this.label = new StringType(); 2307 this.label.setValue(value); 2308 return this; 2309 } 2310 2311 /** 2312 * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.) 2313 */ 2314 public org.hl7.fhir.dstu3.model.Type getValue() { 2315 return this.value; 2316 } 2317 2318 public boolean hasValue() { 2319 return this.value != null && !this.value.isEmpty(); 2320 } 2321 2322 /** 2323 * @param value {@link #value} (The actual value for the element, which must be one of the types allowed for this element.) 2324 */ 2325 public ElementDefinitionExampleComponent setValue(org.hl7.fhir.dstu3.model.Type value) { 2326 this.value = value; 2327 return this; 2328 } 2329 2330 protected void listChildren(List<Property> children) { 2331 super.listChildren(children); 2332 children.add(new Property("label", "string", "Describes the purpose of this example amoung the set of examples.", 0, 1, label)); 2333 children.add(new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value)); 2334 } 2335 2336 @Override 2337 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2338 switch (_hash) { 2339 case 102727412: /*label*/ return new Property("label", "string", "Describes the purpose of this example amoung the set of examples.", 0, 1, label); 2340 case -1410166417: /*value[x]*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2341 case 111972721: /*value*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2342 case -1535024575: /*valueBase64Binary*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2343 case 733421943: /*valueBoolean*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2344 case -786218365: /*valueCanonical*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2345 case -766209282: /*valueCode*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2346 case -766192449: /*valueDate*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2347 case 1047929900: /*valueDateTime*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2348 case -2083993440: /*valueDecimal*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2349 case 231604844: /*valueId*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2350 case -1668687056: /*valueInstant*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2351 case -1668204915: /*valueInteger*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2352 case -497880704: /*valueMarkdown*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2353 case -1410178407: /*valueOid*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2354 case -1249932027: /*valuePositiveInt*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2355 case -1424603934: /*valueString*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2356 case -765708322: /*valueTime*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2357 case 26529417: /*valueUnsignedInt*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2358 case -1410172357: /*valueUri*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2359 case -1410172354: /*valueUrl*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2360 case -765667124: /*valueUuid*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2361 case -478981821: /*valueAddress*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2362 case -67108992: /*valueAnnotation*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2363 case -475566732: /*valueAttachment*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2364 case 924902896: /*valueCodeableConcept*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2365 case -1887705029: /*valueCoding*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2366 case 944904545: /*valueContactPoint*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2367 case -2026205465: /*valueHumanName*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2368 case -130498310: /*valueIdentifier*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2369 case -1524344174: /*valuePeriod*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2370 case -2029823716: /*valueQuantity*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2371 case 2030761548: /*valueRange*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2372 case 2030767386: /*valueRatio*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2373 case 1755241690: /*valueReference*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2374 case -962229101: /*valueSampledData*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2375 case -540985785: /*valueSignature*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2376 case -1406282469: /*valueTiming*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2377 case -1858636920: /*valueDosage*/ return new Property("value[x]", "*", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value); 2378 default: return super.getNamedProperty(_hash, _name, _checkValid); 2379 } 2380 2381 } 2382 2383 @Override 2384 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2385 switch (hash) { 2386 case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType 2387 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // org.hl7.fhir.dstu3.model.Type 2388 default: return super.getProperty(hash, name, checkValid); 2389 } 2390 2391 } 2392 2393 @Override 2394 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2395 switch (hash) { 2396 case 102727412: // label 2397 this.label = castToString(value); // StringType 2398 return value; 2399 case 111972721: // value 2400 this.value = castToType(value); // org.hl7.fhir.dstu3.model.Type 2401 return value; 2402 default: return super.setProperty(hash, name, value); 2403 } 2404 2405 } 2406 2407 @Override 2408 public Base setProperty(String name, Base value) throws FHIRException { 2409 if (name.equals("label")) { 2410 this.label = castToString(value); // StringType 2411 } else if (name.equals("value[x]")) { 2412 this.value = castToType(value); // org.hl7.fhir.dstu3.model.Type 2413 } else 2414 return super.setProperty(name, value); 2415 return value; 2416 } 2417 2418 @Override 2419 public Base makeProperty(int hash, String name) throws FHIRException { 2420 switch (hash) { 2421 case 102727412: return getLabelElement(); 2422 case -1410166417: return getValue(); 2423 case 111972721: return getValue(); 2424 default: return super.makeProperty(hash, name); 2425 } 2426 2427 } 2428 2429 @Override 2430 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2431 switch (hash) { 2432 case 102727412: /*label*/ return new String[] {"string"}; 2433 case 111972721: /*value*/ return new String[] {"*"}; 2434 default: return super.getTypesForProperty(hash, name); 2435 } 2436 2437 } 2438 2439 @Override 2440 public Base addChild(String name) throws FHIRException { 2441 if (name.equals("label")) { 2442 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.label"); 2443 } 2444 else if (name.equals("valueBoolean")) { 2445 this.value = new BooleanType(); 2446 return this.value; 2447 } 2448 else if (name.equals("valueInteger")) { 2449 this.value = new IntegerType(); 2450 return this.value; 2451 } 2452 else if (name.equals("valueDecimal")) { 2453 this.value = new DecimalType(); 2454 return this.value; 2455 } 2456 else if (name.equals("valueBase64Binary")) { 2457 this.value = new Base64BinaryType(); 2458 return this.value; 2459 } 2460 else if (name.equals("valueInstant")) { 2461 this.value = new InstantType(); 2462 return this.value; 2463 } 2464 else if (name.equals("valueString")) { 2465 this.value = new StringType(); 2466 return this.value; 2467 } 2468 else if (name.equals("valueUri")) { 2469 this.value = new UriType(); 2470 return this.value; 2471 } 2472 else if (name.equals("valueDate")) { 2473 this.value = new DateType(); 2474 return this.value; 2475 } 2476 else if (name.equals("valueDateTime")) { 2477 this.value = new DateTimeType(); 2478 return this.value; 2479 } 2480 else if (name.equals("valueTime")) { 2481 this.value = new TimeType(); 2482 return this.value; 2483 } 2484 else if (name.equals("valueCode")) { 2485 this.value = new CodeType(); 2486 return this.value; 2487 } 2488 else if (name.equals("valueOid")) { 2489 this.value = new OidType(); 2490 return this.value; 2491 } 2492 else if (name.equals("valueId")) { 2493 this.value = new IdType(); 2494 return this.value; 2495 } 2496 else if (name.equals("valueUnsignedInt")) { 2497 this.value = new UnsignedIntType(); 2498 return this.value; 2499 } 2500 else if (name.equals("valuePositiveInt")) { 2501 this.value = new PositiveIntType(); 2502 return this.value; 2503 } 2504 else if (name.equals("valueMarkdown")) { 2505 this.value = new MarkdownType(); 2506 return this.value; 2507 } 2508 else if (name.equals("valueAnnotation")) { 2509 this.value = new Annotation(); 2510 return this.value; 2511 } 2512 else if (name.equals("valueAttachment")) { 2513 this.value = new Attachment(); 2514 return this.value; 2515 } 2516 else if (name.equals("valueIdentifier")) { 2517 this.value = new Identifier(); 2518 return this.value; 2519 } 2520 else if (name.equals("valueCodeableConcept")) { 2521 this.value = new CodeableConcept(); 2522 return this.value; 2523 } 2524 else if (name.equals("valueCoding")) { 2525 this.value = new Coding(); 2526 return this.value; 2527 } 2528 else if (name.equals("valueQuantity")) { 2529 this.value = new Quantity(); 2530 return this.value; 2531 } 2532 else if (name.equals("valueRange")) { 2533 this.value = new Range(); 2534 return this.value; 2535 } 2536 else if (name.equals("valuePeriod")) { 2537 this.value = new Period(); 2538 return this.value; 2539 } 2540 else if (name.equals("valueRatio")) { 2541 this.value = new Ratio(); 2542 return this.value; 2543 } 2544 else if (name.equals("valueSampledData")) { 2545 this.value = new SampledData(); 2546 return this.value; 2547 } 2548 else if (name.equals("valueSignature")) { 2549 this.value = new Signature(); 2550 return this.value; 2551 } 2552 else if (name.equals("valueHumanName")) { 2553 this.value = new HumanName(); 2554 return this.value; 2555 } 2556 else if (name.equals("valueAddress")) { 2557 this.value = new Address(); 2558 return this.value; 2559 } 2560 else if (name.equals("valueContactPoint")) { 2561 this.value = new ContactPoint(); 2562 return this.value; 2563 } 2564 else if (name.equals("valueTiming")) { 2565 this.value = new Timing(); 2566 return this.value; 2567 } 2568 else if (name.equals("valueReference")) { 2569 this.value = new Reference(); 2570 return this.value; 2571 } 2572 else if (name.equals("valueMeta")) { 2573 this.value = new Meta(); 2574 return this.value; 2575 } 2576 else 2577 return super.addChild(name); 2578 } 2579 2580 public ElementDefinitionExampleComponent copy() { 2581 ElementDefinitionExampleComponent dst = new ElementDefinitionExampleComponent(); 2582 copyValues(dst); 2583 dst.label = label == null ? null : label.copy(); 2584 dst.value = value == null ? null : value.copy(); 2585 return dst; 2586 } 2587 2588 @Override 2589 public boolean equalsDeep(Base other_) { 2590 if (!super.equalsDeep(other_)) 2591 return false; 2592 if (!(other_ instanceof ElementDefinitionExampleComponent)) 2593 return false; 2594 ElementDefinitionExampleComponent o = (ElementDefinitionExampleComponent) other_; 2595 return compareDeep(label, o.label, true) && compareDeep(value, o.value, true); 2596 } 2597 2598 @Override 2599 public boolean equalsShallow(Base other_) { 2600 if (!super.equalsShallow(other_)) 2601 return false; 2602 if (!(other_ instanceof ElementDefinitionExampleComponent)) 2603 return false; 2604 ElementDefinitionExampleComponent o = (ElementDefinitionExampleComponent) other_; 2605 return compareValues(label, o.label, true); 2606 } 2607 2608 public boolean isEmpty() { 2609 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(label, value); 2610 } 2611 2612 public String fhirType() { 2613 return "ElementDefinition.example"; 2614 2615 } 2616 2617 } 2618 2619 @Block() 2620 public static class ElementDefinitionConstraintComponent extends Element implements IBaseDatatypeElement { 2621 /** 2622 * Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality. 2623 */ 2624 @Child(name = "key", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=true) 2625 @Description(shortDefinition="Target of 'condition' reference above", formalDefinition="Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality." ) 2626 protected IdType key; 2627 2628 /** 2629 * Description of why this constraint is necessary or appropriate. 2630 */ 2631 @Child(name = "requirements", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 2632 @Description(shortDefinition="Why this constraint is necessary or appropriate", formalDefinition="Description of why this constraint is necessary or appropriate." ) 2633 protected StringType requirements; 2634 2635 /** 2636 * Identifies the impact constraint violation has on the conformance of the instance. 2637 */ 2638 @Child(name = "severity", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true) 2639 @Description(shortDefinition="error | warning", formalDefinition="Identifies the impact constraint violation has on the conformance of the instance." ) 2640 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/constraint-severity") 2641 protected Enumeration<ConstraintSeverity> severity; 2642 2643 /** 2644 * Text that can be used to describe the constraint in messages identifying that the constraint has been violated. 2645 */ 2646 @Child(name = "human", type = {StringType.class}, order=4, min=1, max=1, modifier=false, summary=true) 2647 @Description(shortDefinition="Human description of constraint", formalDefinition="Text that can be used to describe the constraint in messages identifying that the constraint has been violated." ) 2648 protected StringType human; 2649 2650 /** 2651 * A [FHIRPath](http://hl7.org/fluentpath) expression of constraint that can be executed to see if this constraint is met. 2652 */ 2653 @Child(name = "expression", type = {StringType.class}, order=5, min=1, max=1, modifier=false, summary=true) 2654 @Description(shortDefinition="FHIRPath expression of constraint", formalDefinition="A [FHIRPath](http://hl7.org/fluentpath) expression of constraint that can be executed to see if this constraint is met." ) 2655 protected StringType expression; 2656 2657 /** 2658 * An XPath expression of constraint that can be executed to see if this constraint is met. 2659 */ 2660 @Child(name = "xpath", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) 2661 @Description(shortDefinition="XPath expression of constraint", formalDefinition="An XPath expression of constraint that can be executed to see if this constraint is met." ) 2662 protected StringType xpath; 2663 2664 /** 2665 * A reference to the original source of the constraint, for traceability purposes. 2666 */ 2667 @Child(name = "source", type = {UriType.class}, order=7, min=0, max=1, modifier=false, summary=true) 2668 @Description(shortDefinition="Reference to original source of constraint", formalDefinition="A reference to the original source of the constraint, for traceability purposes." ) 2669 protected UriType source; 2670 2671 private static final long serialVersionUID = 1860862205L; 2672 2673 /** 2674 * Constructor 2675 */ 2676 public ElementDefinitionConstraintComponent() { 2677 super(); 2678 } 2679 2680 /** 2681 * Constructor 2682 */ 2683 public ElementDefinitionConstraintComponent(IdType key, Enumeration<ConstraintSeverity> severity, StringType human, StringType expression) { 2684 super(); 2685 this.key = key; 2686 this.severity = severity; 2687 this.human = human; 2688 this.expression = expression; 2689 } 2690 2691 /** 2692 * @return {@link #key} (Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.). This is the underlying object with id, value and extensions. The accessor "getKey" gives direct access to the value 2693 */ 2694 public IdType getKeyElement() { 2695 if (this.key == null) 2696 if (Configuration.errorOnAutoCreate()) 2697 throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.key"); 2698 else if (Configuration.doAutoCreate()) 2699 this.key = new IdType(); // bb 2700 return this.key; 2701 } 2702 2703 public boolean hasKeyElement() { 2704 return this.key != null && !this.key.isEmpty(); 2705 } 2706 2707 public boolean hasKey() { 2708 return this.key != null && !this.key.isEmpty(); 2709 } 2710 2711 /** 2712 * @param value {@link #key} (Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.). This is the underlying object with id, value and extensions. The accessor "getKey" gives direct access to the value 2713 */ 2714 public ElementDefinitionConstraintComponent setKeyElement(IdType value) { 2715 this.key = value; 2716 return this; 2717 } 2718 2719 /** 2720 * @return Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality. 2721 */ 2722 public String getKey() { 2723 return this.key == null ? null : this.key.getValue(); 2724 } 2725 2726 /** 2727 * @param value Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality. 2728 */ 2729 public ElementDefinitionConstraintComponent setKey(String value) { 2730 if (this.key == null) 2731 this.key = new IdType(); 2732 this.key.setValue(value); 2733 return this; 2734 } 2735 2736 /** 2737 * @return {@link #requirements} (Description of why this constraint is necessary or appropriate.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value 2738 */ 2739 public StringType getRequirementsElement() { 2740 if (this.requirements == null) 2741 if (Configuration.errorOnAutoCreate()) 2742 throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.requirements"); 2743 else if (Configuration.doAutoCreate()) 2744 this.requirements = new StringType(); // bb 2745 return this.requirements; 2746 } 2747 2748 public boolean hasRequirementsElement() { 2749 return this.requirements != null && !this.requirements.isEmpty(); 2750 } 2751 2752 public boolean hasRequirements() { 2753 return this.requirements != null && !this.requirements.isEmpty(); 2754 } 2755 2756 /** 2757 * @param value {@link #requirements} (Description of why this constraint is necessary or appropriate.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value 2758 */ 2759 public ElementDefinitionConstraintComponent setRequirementsElement(StringType value) { 2760 this.requirements = value; 2761 return this; 2762 } 2763 2764 /** 2765 * @return Description of why this constraint is necessary or appropriate. 2766 */ 2767 public String getRequirements() { 2768 return this.requirements == null ? null : this.requirements.getValue(); 2769 } 2770 2771 /** 2772 * @param value Description of why this constraint is necessary or appropriate. 2773 */ 2774 public ElementDefinitionConstraintComponent setRequirements(String value) { 2775 if (Utilities.noString(value)) 2776 this.requirements = null; 2777 else { 2778 if (this.requirements == null) 2779 this.requirements = new StringType(); 2780 this.requirements.setValue(value); 2781 } 2782 return this; 2783 } 2784 2785 /** 2786 * @return {@link #severity} (Identifies the impact constraint violation has on the conformance of the instance.). This is the underlying object with id, value and extensions. The accessor "getSeverity" gives direct access to the value 2787 */ 2788 public Enumeration<ConstraintSeverity> getSeverityElement() { 2789 if (this.severity == null) 2790 if (Configuration.errorOnAutoCreate()) 2791 throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.severity"); 2792 else if (Configuration.doAutoCreate()) 2793 this.severity = new Enumeration<ConstraintSeverity>(new ConstraintSeverityEnumFactory()); // bb 2794 return this.severity; 2795 } 2796 2797 public boolean hasSeverityElement() { 2798 return this.severity != null && !this.severity.isEmpty(); 2799 } 2800 2801 public boolean hasSeverity() { 2802 return this.severity != null && !this.severity.isEmpty(); 2803 } 2804 2805 /** 2806 * @param value {@link #severity} (Identifies the impact constraint violation has on the conformance of the instance.). This is the underlying object with id, value and extensions. The accessor "getSeverity" gives direct access to the value 2807 */ 2808 public ElementDefinitionConstraintComponent setSeverityElement(Enumeration<ConstraintSeverity> value) { 2809 this.severity = value; 2810 return this; 2811 } 2812 2813 /** 2814 * @return Identifies the impact constraint violation has on the conformance of the instance. 2815 */ 2816 public ConstraintSeverity getSeverity() { 2817 return this.severity == null ? null : this.severity.getValue(); 2818 } 2819 2820 /** 2821 * @param value Identifies the impact constraint violation has on the conformance of the instance. 2822 */ 2823 public ElementDefinitionConstraintComponent setSeverity(ConstraintSeverity value) { 2824 if (this.severity == null) 2825 this.severity = new Enumeration<ConstraintSeverity>(new ConstraintSeverityEnumFactory()); 2826 this.severity.setValue(value); 2827 return this; 2828 } 2829 2830 /** 2831 * @return {@link #human} (Text that can be used to describe the constraint in messages identifying that the constraint has been violated.). This is the underlying object with id, value and extensions. The accessor "getHuman" gives direct access to the value 2832 */ 2833 public StringType getHumanElement() { 2834 if (this.human == null) 2835 if (Configuration.errorOnAutoCreate()) 2836 throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.human"); 2837 else if (Configuration.doAutoCreate()) 2838 this.human = new StringType(); // bb 2839 return this.human; 2840 } 2841 2842 public boolean hasHumanElement() { 2843 return this.human != null && !this.human.isEmpty(); 2844 } 2845 2846 public boolean hasHuman() { 2847 return this.human != null && !this.human.isEmpty(); 2848 } 2849 2850 /** 2851 * @param value {@link #human} (Text that can be used to describe the constraint in messages identifying that the constraint has been violated.). This is the underlying object with id, value and extensions. The accessor "getHuman" gives direct access to the value 2852 */ 2853 public ElementDefinitionConstraintComponent setHumanElement(StringType value) { 2854 this.human = value; 2855 return this; 2856 } 2857 2858 /** 2859 * @return Text that can be used to describe the constraint in messages identifying that the constraint has been violated. 2860 */ 2861 public String getHuman() { 2862 return this.human == null ? null : this.human.getValue(); 2863 } 2864 2865 /** 2866 * @param value Text that can be used to describe the constraint in messages identifying that the constraint has been violated. 2867 */ 2868 public ElementDefinitionConstraintComponent setHuman(String value) { 2869 if (this.human == null) 2870 this.human = new StringType(); 2871 this.human.setValue(value); 2872 return this; 2873 } 2874 2875 /** 2876 * @return {@link #expression} (A [FHIRPath](http://hl7.org/fluentpath) expression of constraint that can be executed to see if this constraint is met.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value 2877 */ 2878 public StringType getExpressionElement() { 2879 if (this.expression == null) 2880 if (Configuration.errorOnAutoCreate()) 2881 throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.expression"); 2882 else if (Configuration.doAutoCreate()) 2883 this.expression = new StringType(); // bb 2884 return this.expression; 2885 } 2886 2887 public boolean hasExpressionElement() { 2888 return this.expression != null && !this.expression.isEmpty(); 2889 } 2890 2891 public boolean hasExpression() { 2892 return this.expression != null && !this.expression.isEmpty(); 2893 } 2894 2895 /** 2896 * @param value {@link #expression} (A [FHIRPath](http://hl7.org/fluentpath) expression of constraint that can be executed to see if this constraint is met.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value 2897 */ 2898 public ElementDefinitionConstraintComponent setExpressionElement(StringType value) { 2899 this.expression = value; 2900 return this; 2901 } 2902 2903 /** 2904 * @return A [FHIRPath](http://hl7.org/fluentpath) expression of constraint that can be executed to see if this constraint is met. 2905 */ 2906 public String getExpression() { 2907 return this.expression == null ? null : this.expression.getValue(); 2908 } 2909 2910 /** 2911 * @param value A [FHIRPath](http://hl7.org/fluentpath) expression of constraint that can be executed to see if this constraint is met. 2912 */ 2913 public ElementDefinitionConstraintComponent setExpression(String value) { 2914 if (this.expression == null) 2915 this.expression = new StringType(); 2916 this.expression.setValue(value); 2917 return this; 2918 } 2919 2920 /** 2921 * @return {@link #xpath} (An XPath expression of constraint that can be executed to see if this constraint is met.). This is the underlying object with id, value and extensions. The accessor "getXpath" gives direct access to the value 2922 */ 2923 public StringType getXpathElement() { 2924 if (this.xpath == null) 2925 if (Configuration.errorOnAutoCreate()) 2926 throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.xpath"); 2927 else if (Configuration.doAutoCreate()) 2928 this.xpath = new StringType(); // bb 2929 return this.xpath; 2930 } 2931 2932 public boolean hasXpathElement() { 2933 return this.xpath != null && !this.xpath.isEmpty(); 2934 } 2935 2936 public boolean hasXpath() { 2937 return this.xpath != null && !this.xpath.isEmpty(); 2938 } 2939 2940 /** 2941 * @param value {@link #xpath} (An XPath expression of constraint that can be executed to see if this constraint is met.). This is the underlying object with id, value and extensions. The accessor "getXpath" gives direct access to the value 2942 */ 2943 public ElementDefinitionConstraintComponent setXpathElement(StringType value) { 2944 this.xpath = value; 2945 return this; 2946 } 2947 2948 /** 2949 * @return An XPath expression of constraint that can be executed to see if this constraint is met. 2950 */ 2951 public String getXpath() { 2952 return this.xpath == null ? null : this.xpath.getValue(); 2953 } 2954 2955 /** 2956 * @param value An XPath expression of constraint that can be executed to see if this constraint is met. 2957 */ 2958 public ElementDefinitionConstraintComponent setXpath(String value) { 2959 if (Utilities.noString(value)) 2960 this.xpath = null; 2961 else { 2962 if (this.xpath == null) 2963 this.xpath = new StringType(); 2964 this.xpath.setValue(value); 2965 } 2966 return this; 2967 } 2968 2969 /** 2970 * @return {@link #source} (A reference to the original source of the constraint, for traceability purposes.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value 2971 */ 2972 public UriType getSourceElement() { 2973 if (this.source == null) 2974 if (Configuration.errorOnAutoCreate()) 2975 throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.source"); 2976 else if (Configuration.doAutoCreate()) 2977 this.source = new UriType(); // bb 2978 return this.source; 2979 } 2980 2981 public boolean hasSourceElement() { 2982 return this.source != null && !this.source.isEmpty(); 2983 } 2984 2985 public boolean hasSource() { 2986 return this.source != null && !this.source.isEmpty(); 2987 } 2988 2989 /** 2990 * @param value {@link #source} (A reference to the original source of the constraint, for traceability purposes.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value 2991 */ 2992 public ElementDefinitionConstraintComponent setSourceElement(UriType value) { 2993 this.source = value; 2994 return this; 2995 } 2996 2997 /** 2998 * @return A reference to the original source of the constraint, for traceability purposes. 2999 */ 3000 public String getSource() { 3001 return this.source == null ? null : this.source.getValue(); 3002 } 3003 3004 /** 3005 * @param value A reference to the original source of the constraint, for traceability purposes. 3006 */ 3007 public ElementDefinitionConstraintComponent setSource(String value) { 3008 if (Utilities.noString(value)) 3009 this.source = null; 3010 else { 3011 if (this.source == null) 3012 this.source = new UriType(); 3013 this.source.setValue(value); 3014 } 3015 return this; 3016 } 3017 3018 protected void listChildren(List<Property> children) { 3019 super.listChildren(children); 3020 children.add(new Property("key", "id", "Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.", 0, 1, key)); 3021 children.add(new Property("requirements", "string", "Description of why this constraint is necessary or appropriate.", 0, 1, requirements)); 3022 children.add(new Property("severity", "code", "Identifies the impact constraint violation has on the conformance of the instance.", 0, 1, severity)); 3023 children.add(new Property("human", "string", "Text that can be used to describe the constraint in messages identifying that the constraint has been violated.", 0, 1, human)); 3024 children.add(new Property("expression", "string", "A [FHIRPath](http://hl7.org/fluentpath) expression of constraint that can be executed to see if this constraint is met.", 0, 1, expression)); 3025 children.add(new Property("xpath", "string", "An XPath expression of constraint that can be executed to see if this constraint is met.", 0, 1, xpath)); 3026 children.add(new Property("source", "uri", "A reference to the original source of the constraint, for traceability purposes.", 0, 1, source)); 3027 } 3028 3029 @Override 3030 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3031 switch (_hash) { 3032 case 106079: /*key*/ return new Property("key", "id", "Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.", 0, 1, key); 3033 case -1619874672: /*requirements*/ return new Property("requirements", "string", "Description of why this constraint is necessary or appropriate.", 0, 1, requirements); 3034 case 1478300413: /*severity*/ return new Property("severity", "code", "Identifies the impact constraint violation has on the conformance of the instance.", 0, 1, severity); 3035 case 99639597: /*human*/ return new Property("human", "string", "Text that can be used to describe the constraint in messages identifying that the constraint has been violated.", 0, 1, human); 3036 case -1795452264: /*expression*/ return new Property("expression", "string", "A [FHIRPath](http://hl7.org/fluentpath) expression of constraint that can be executed to see if this constraint is met.", 0, 1, expression); 3037 case 114256029: /*xpath*/ return new Property("xpath", "string", "An XPath expression of constraint that can be executed to see if this constraint is met.", 0, 1, xpath); 3038 case -896505829: /*source*/ return new Property("source", "uri", "A reference to the original source of the constraint, for traceability purposes.", 0, 1, source); 3039 default: return super.getNamedProperty(_hash, _name, _checkValid); 3040 } 3041 3042 } 3043 3044 @Override 3045 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3046 switch (hash) { 3047 case 106079: /*key*/ return this.key == null ? new Base[0] : new Base[] {this.key}; // IdType 3048 case -1619874672: /*requirements*/ return this.requirements == null ? new Base[0] : new Base[] {this.requirements}; // StringType 3049 case 1478300413: /*severity*/ return this.severity == null ? new Base[0] : new Base[] {this.severity}; // Enumeration<ConstraintSeverity> 3050 case 99639597: /*human*/ return this.human == null ? new Base[0] : new Base[] {this.human}; // StringType 3051 case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType 3052 case 114256029: /*xpath*/ return this.xpath == null ? new Base[0] : new Base[] {this.xpath}; // StringType 3053 case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // UriType 3054 default: return super.getProperty(hash, name, checkValid); 3055 } 3056 3057 } 3058 3059 @Override 3060 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3061 switch (hash) { 3062 case 106079: // key 3063 this.key = castToId(value); // IdType 3064 return value; 3065 case -1619874672: // requirements 3066 this.requirements = castToString(value); // StringType 3067 return value; 3068 case 1478300413: // severity 3069 value = new ConstraintSeverityEnumFactory().fromType(castToCode(value)); 3070 this.severity = (Enumeration) value; // Enumeration<ConstraintSeverity> 3071 return value; 3072 case 99639597: // human 3073 this.human = castToString(value); // StringType 3074 return value; 3075 case -1795452264: // expression 3076 this.expression = castToString(value); // StringType 3077 return value; 3078 case 114256029: // xpath 3079 this.xpath = castToString(value); // StringType 3080 return value; 3081 case -896505829: // source 3082 this.source = castToUri(value); // UriType 3083 return value; 3084 default: return super.setProperty(hash, name, value); 3085 } 3086 3087 } 3088 3089 @Override 3090 public Base setProperty(String name, Base value) throws FHIRException { 3091 if (name.equals("key")) { 3092 this.key = castToId(value); // IdType 3093 } else if (name.equals("requirements")) { 3094 this.requirements = castToString(value); // StringType 3095 } else if (name.equals("severity")) { 3096 value = new ConstraintSeverityEnumFactory().fromType(castToCode(value)); 3097 this.severity = (Enumeration) value; // Enumeration<ConstraintSeverity> 3098 } else if (name.equals("human")) { 3099 this.human = castToString(value); // StringType 3100 } else if (name.equals("expression")) { 3101 this.expression = castToString(value); // StringType 3102 } else if (name.equals("xpath")) { 3103 this.xpath = castToString(value); // StringType 3104 } else if (name.equals("source")) { 3105 this.source = castToUri(value); // UriType 3106 } else 3107 return super.setProperty(name, value); 3108 return value; 3109 } 3110 3111 @Override 3112 public Base makeProperty(int hash, String name) throws FHIRException { 3113 switch (hash) { 3114 case 106079: return getKeyElement(); 3115 case -1619874672: return getRequirementsElement(); 3116 case 1478300413: return getSeverityElement(); 3117 case 99639597: return getHumanElement(); 3118 case -1795452264: return getExpressionElement(); 3119 case 114256029: return getXpathElement(); 3120 case -896505829: return getSourceElement(); 3121 default: return super.makeProperty(hash, name); 3122 } 3123 3124 } 3125 3126 @Override 3127 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3128 switch (hash) { 3129 case 106079: /*key*/ return new String[] {"id"}; 3130 case -1619874672: /*requirements*/ return new String[] {"string"}; 3131 case 1478300413: /*severity*/ return new String[] {"code"}; 3132 case 99639597: /*human*/ return new String[] {"string"}; 3133 case -1795452264: /*expression*/ return new String[] {"string"}; 3134 case 114256029: /*xpath*/ return new String[] {"string"}; 3135 case -896505829: /*source*/ return new String[] {"uri"}; 3136 default: return super.getTypesForProperty(hash, name); 3137 } 3138 3139 } 3140 3141 @Override 3142 public Base addChild(String name) throws FHIRException { 3143 if (name.equals("key")) { 3144 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.key"); 3145 } 3146 else if (name.equals("requirements")) { 3147 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.requirements"); 3148 } 3149 else if (name.equals("severity")) { 3150 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.severity"); 3151 } 3152 else if (name.equals("human")) { 3153 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.human"); 3154 } 3155 else if (name.equals("expression")) { 3156 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.expression"); 3157 } 3158 else if (name.equals("xpath")) { 3159 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.xpath"); 3160 } 3161 else if (name.equals("source")) { 3162 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.source"); 3163 } 3164 else 3165 return super.addChild(name); 3166 } 3167 3168 public ElementDefinitionConstraintComponent copy() { 3169 ElementDefinitionConstraintComponent dst = new ElementDefinitionConstraintComponent(); 3170 copyValues(dst); 3171 dst.key = key == null ? null : key.copy(); 3172 dst.requirements = requirements == null ? null : requirements.copy(); 3173 dst.severity = severity == null ? null : severity.copy(); 3174 dst.human = human == null ? null : human.copy(); 3175 dst.expression = expression == null ? null : expression.copy(); 3176 dst.xpath = xpath == null ? null : xpath.copy(); 3177 dst.source = source == null ? null : source.copy(); 3178 return dst; 3179 } 3180 3181 @Override 3182 public boolean equalsDeep(Base other_) { 3183 if (!super.equalsDeep(other_)) 3184 return false; 3185 if (!(other_ instanceof ElementDefinitionConstraintComponent)) 3186 return false; 3187 ElementDefinitionConstraintComponent o = (ElementDefinitionConstraintComponent) other_; 3188 return compareDeep(key, o.key, true) && compareDeep(requirements, o.requirements, true) && compareDeep(severity, o.severity, true) 3189 && compareDeep(human, o.human, true) && compareDeep(expression, o.expression, true) && compareDeep(xpath, o.xpath, true) 3190 && compareDeep(source, o.source, true); 3191 } 3192 3193 @Override 3194 public boolean equalsShallow(Base other_) { 3195 if (!super.equalsShallow(other_)) 3196 return false; 3197 if (!(other_ instanceof ElementDefinitionConstraintComponent)) 3198 return false; 3199 ElementDefinitionConstraintComponent o = (ElementDefinitionConstraintComponent) other_; 3200 return compareValues(key, o.key, true) && compareValues(requirements, o.requirements, true) && compareValues(severity, o.severity, true) 3201 && compareValues(human, o.human, true) && compareValues(expression, o.expression, true) && compareValues(xpath, o.xpath, true) 3202 && compareValues(source, o.source, true); 3203 } 3204 3205 public boolean isEmpty() { 3206 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(key, requirements, severity 3207 , human, expression, xpath, source); 3208 } 3209 3210 public String fhirType() { 3211 return "ElementDefinition.constraint"; 3212 3213 } 3214 3215 } 3216 3217 @Block() 3218 public static class ElementDefinitionBindingComponent extends Element implements IBaseDatatypeElement { 3219 /** 3220 * Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances. 3221 */ 3222 @Child(name = "strength", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 3223 @Description(shortDefinition="required | extensible | preferred | example", formalDefinition="Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances." ) 3224 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/binding-strength") 3225 protected Enumeration<BindingStrength> strength; 3226 3227 /** 3228 * Describes the intended use of this particular set of codes. 3229 */ 3230 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 3231 @Description(shortDefinition="Human explanation of the value set", formalDefinition="Describes the intended use of this particular set of codes." ) 3232 protected StringType description; 3233 3234 /** 3235 * Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri. 3236 */ 3237 @Child(name = "valueSet", type = {UriType.class, ValueSet.class}, order=3, min=0, max=1, modifier=false, summary=true) 3238 @Description(shortDefinition="Source of value set", formalDefinition="Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri." ) 3239 protected Type valueSet; 3240 3241 private static final long serialVersionUID = 1355538460L; 3242 3243 /** 3244 * Constructor 3245 */ 3246 public ElementDefinitionBindingComponent() { 3247 super(); 3248 } 3249 3250 /** 3251 * Constructor 3252 */ 3253 public ElementDefinitionBindingComponent(Enumeration<BindingStrength> strength) { 3254 super(); 3255 this.strength = strength; 3256 } 3257 3258 /** 3259 * @return {@link #strength} (Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.). This is the underlying object with id, value and extensions. The accessor "getStrength" gives direct access to the value 3260 */ 3261 public Enumeration<BindingStrength> getStrengthElement() { 3262 if (this.strength == null) 3263 if (Configuration.errorOnAutoCreate()) 3264 throw new Error("Attempt to auto-create ElementDefinitionBindingComponent.strength"); 3265 else if (Configuration.doAutoCreate()) 3266 this.strength = new Enumeration<BindingStrength>(new BindingStrengthEnumFactory()); // bb 3267 return this.strength; 3268 } 3269 3270 public boolean hasStrengthElement() { 3271 return this.strength != null && !this.strength.isEmpty(); 3272 } 3273 3274 public boolean hasStrength() { 3275 return this.strength != null && !this.strength.isEmpty(); 3276 } 3277 3278 /** 3279 * @param value {@link #strength} (Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.). This is the underlying object with id, value and extensions. The accessor "getStrength" gives direct access to the value 3280 */ 3281 public ElementDefinitionBindingComponent setStrengthElement(Enumeration<BindingStrength> value) { 3282 this.strength = value; 3283 return this; 3284 } 3285 3286 /** 3287 * @return Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances. 3288 */ 3289 public BindingStrength getStrength() { 3290 return this.strength == null ? null : this.strength.getValue(); 3291 } 3292 3293 /** 3294 * @param value Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances. 3295 */ 3296 public ElementDefinitionBindingComponent setStrength(BindingStrength value) { 3297 if (this.strength == null) 3298 this.strength = new Enumeration<BindingStrength>(new BindingStrengthEnumFactory()); 3299 this.strength.setValue(value); 3300 return this; 3301 } 3302 3303 /** 3304 * @return {@link #description} (Describes the intended use of this particular set of codes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 3305 */ 3306 public StringType getDescriptionElement() { 3307 if (this.description == null) 3308 if (Configuration.errorOnAutoCreate()) 3309 throw new Error("Attempt to auto-create ElementDefinitionBindingComponent.description"); 3310 else if (Configuration.doAutoCreate()) 3311 this.description = new StringType(); // bb 3312 return this.description; 3313 } 3314 3315 public boolean hasDescriptionElement() { 3316 return this.description != null && !this.description.isEmpty(); 3317 } 3318 3319 public boolean hasDescription() { 3320 return this.description != null && !this.description.isEmpty(); 3321 } 3322 3323 /** 3324 * @param value {@link #description} (Describes the intended use of this particular set of codes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 3325 */ 3326 public ElementDefinitionBindingComponent setDescriptionElement(StringType value) { 3327 this.description = value; 3328 return this; 3329 } 3330 3331 /** 3332 * @return Describes the intended use of this particular set of codes. 3333 */ 3334 public String getDescription() { 3335 return this.description == null ? null : this.description.getValue(); 3336 } 3337 3338 /** 3339 * @param value Describes the intended use of this particular set of codes. 3340 */ 3341 public ElementDefinitionBindingComponent setDescription(String value) { 3342 if (Utilities.noString(value)) 3343 this.description = null; 3344 else { 3345 if (this.description == null) 3346 this.description = new StringType(); 3347 this.description.setValue(value); 3348 } 3349 return this; 3350 } 3351 3352 /** 3353 * @return {@link #valueSet} (Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.) 3354 */ 3355 public Type getValueSet() { 3356 return this.valueSet; 3357 } 3358 3359 /** 3360 * @return {@link #valueSet} (Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.) 3361 */ 3362 public UriType getValueSetUriType() throws FHIRException { 3363 if (this.valueSet == null) 3364 return null; 3365 if (!(this.valueSet instanceof UriType)) 3366 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.valueSet.getClass().getName()+" was encountered"); 3367 return (UriType) this.valueSet; 3368 } 3369 3370 public boolean hasValueSetUriType() { 3371 return this != null && this.valueSet instanceof UriType; 3372 } 3373 3374 /** 3375 * @return {@link #valueSet} (Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.) 3376 */ 3377 public Reference getValueSetReference() throws FHIRException { 3378 if (this.valueSet == null) 3379 return null; 3380 if (!(this.valueSet instanceof Reference)) 3381 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.valueSet.getClass().getName()+" was encountered"); 3382 return (Reference) this.valueSet; 3383 } 3384 3385 public boolean hasValueSetReference() { 3386 return this != null && this.valueSet instanceof Reference; 3387 } 3388 3389 public boolean hasValueSet() { 3390 return this.valueSet != null && !this.valueSet.isEmpty(); 3391 } 3392 3393 /** 3394 * @param value {@link #valueSet} (Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.) 3395 */ 3396 public ElementDefinitionBindingComponent setValueSet(Type value) throws FHIRFormatError { 3397 if (value != null && !(value instanceof UriType || value instanceof Reference)) 3398 throw new FHIRFormatError("Not the right type for ElementDefinition.binding.valueSet[x]: "+value.fhirType()); 3399 this.valueSet = value; 3400 return this; 3401 } 3402 3403 protected void listChildren(List<Property> children) { 3404 super.listChildren(children); 3405 children.add(new Property("strength", "code", "Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.", 0, 1, strength)); 3406 children.add(new Property("description", "string", "Describes the intended use of this particular set of codes.", 0, 1, description)); 3407 children.add(new Property("valueSet[x]", "uri|Reference(ValueSet)", "Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.", 0, 1, valueSet)); 3408 } 3409 3410 @Override 3411 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3412 switch (_hash) { 3413 case 1791316033: /*strength*/ return new Property("strength", "code", "Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.", 0, 1, strength); 3414 case -1724546052: /*description*/ return new Property("description", "string", "Describes the intended use of this particular set of codes.", 0, 1, description); 3415 case -1438410321: /*valueSet[x]*/ return new Property("valueSet[x]", "uri|Reference(ValueSet)", "Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.", 0, 1, valueSet); 3416 case -1410174671: /*valueSet*/ return new Property("valueSet[x]", "uri|Reference(ValueSet)", "Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.", 0, 1, valueSet); 3417 case -1438416261: /*valueSetUri*/ return new Property("valueSet[x]", "uri|Reference(ValueSet)", "Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.", 0, 1, valueSet); 3418 case 295220506: /*valueSetReference*/ return new Property("valueSet[x]", "uri|Reference(ValueSet)", "Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.", 0, 1, valueSet); 3419 default: return super.getNamedProperty(_hash, _name, _checkValid); 3420 } 3421 3422 } 3423 3424 @Override 3425 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3426 switch (hash) { 3427 case 1791316033: /*strength*/ return this.strength == null ? new Base[0] : new Base[] {this.strength}; // Enumeration<BindingStrength> 3428 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 3429 case -1410174671: /*valueSet*/ return this.valueSet == null ? new Base[0] : new Base[] {this.valueSet}; // Type 3430 default: return super.getProperty(hash, name, checkValid); 3431 } 3432 3433 } 3434 3435 @Override 3436 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3437 switch (hash) { 3438 case 1791316033: // strength 3439 value = new BindingStrengthEnumFactory().fromType(castToCode(value)); 3440 this.strength = (Enumeration) value; // Enumeration<BindingStrength> 3441 return value; 3442 case -1724546052: // description 3443 this.description = castToString(value); // StringType 3444 return value; 3445 case -1410174671: // valueSet 3446 this.valueSet = castToType(value); // Type 3447 return value; 3448 default: return super.setProperty(hash, name, value); 3449 } 3450 3451 } 3452 3453 @Override 3454 public Base setProperty(String name, Base value) throws FHIRException { 3455 if (name.equals("strength")) { 3456 value = new BindingStrengthEnumFactory().fromType(castToCode(value)); 3457 this.strength = (Enumeration) value; // Enumeration<BindingStrength> 3458 } else if (name.equals("description")) { 3459 this.description = castToString(value); // StringType 3460 } else if (name.equals("valueSet[x]")) { 3461 this.valueSet = castToType(value); // Type 3462 } else 3463 return super.setProperty(name, value); 3464 return value; 3465 } 3466 3467 @Override 3468 public Base makeProperty(int hash, String name) throws FHIRException { 3469 switch (hash) { 3470 case 1791316033: return getStrengthElement(); 3471 case -1724546052: return getDescriptionElement(); 3472 case -1438410321: return getValueSet(); 3473 case -1410174671: return getValueSet(); 3474 default: return super.makeProperty(hash, name); 3475 } 3476 3477 } 3478 3479 @Override 3480 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3481 switch (hash) { 3482 case 1791316033: /*strength*/ return new String[] {"code"}; 3483 case -1724546052: /*description*/ return new String[] {"string"}; 3484 case -1410174671: /*valueSet*/ return new String[] {"uri", "Reference"}; 3485 default: return super.getTypesForProperty(hash, name); 3486 } 3487 3488 } 3489 3490 @Override 3491 public Base addChild(String name) throws FHIRException { 3492 if (name.equals("strength")) { 3493 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.strength"); 3494 } 3495 else if (name.equals("description")) { 3496 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.description"); 3497 } 3498 else if (name.equals("valueSetUri")) { 3499 this.valueSet = new UriType(); 3500 return this.valueSet; 3501 } 3502 else if (name.equals("valueSetReference")) { 3503 this.valueSet = new Reference(); 3504 return this.valueSet; 3505 } 3506 else 3507 return super.addChild(name); 3508 } 3509 3510 public ElementDefinitionBindingComponent copy() { 3511 ElementDefinitionBindingComponent dst = new ElementDefinitionBindingComponent(); 3512 copyValues(dst); 3513 dst.strength = strength == null ? null : strength.copy(); 3514 dst.description = description == null ? null : description.copy(); 3515 dst.valueSet = valueSet == null ? null : valueSet.copy(); 3516 return dst; 3517 } 3518 3519 @Override 3520 public boolean equalsDeep(Base other_) { 3521 if (!super.equalsDeep(other_)) 3522 return false; 3523 if (!(other_ instanceof ElementDefinitionBindingComponent)) 3524 return false; 3525 ElementDefinitionBindingComponent o = (ElementDefinitionBindingComponent) other_; 3526 return compareDeep(strength, o.strength, true) && compareDeep(description, o.description, true) 3527 && compareDeep(valueSet, o.valueSet, true); 3528 } 3529 3530 @Override 3531 public boolean equalsShallow(Base other_) { 3532 if (!super.equalsShallow(other_)) 3533 return false; 3534 if (!(other_ instanceof ElementDefinitionBindingComponent)) 3535 return false; 3536 ElementDefinitionBindingComponent o = (ElementDefinitionBindingComponent) other_; 3537 return compareValues(strength, o.strength, true) && compareValues(description, o.description, true) 3538 ; 3539 } 3540 3541 public boolean isEmpty() { 3542 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(strength, description, valueSet 3543 ); 3544 } 3545 3546 public String fhirType() { 3547 return "ElementDefinition.binding"; 3548 3549 } 3550 3551 } 3552 3553 @Block() 3554 public static class ElementDefinitionMappingComponent extends Element implements IBaseDatatypeElement { 3555 /** 3556 * An internal reference to the definition of a mapping. 3557 */ 3558 @Child(name = "identity", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=true) 3559 @Description(shortDefinition="Reference to mapping declaration", formalDefinition="An internal reference to the definition of a mapping." ) 3560 protected IdType identity; 3561 3562 /** 3563 * Identifies the computable language in which mapping.map is expressed. 3564 */ 3565 @Child(name = "language", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true) 3566 @Description(shortDefinition="Computable language of mapping", formalDefinition="Identifies the computable language in which mapping.map is expressed." ) 3567 protected CodeType language; 3568 3569 /** 3570 * Expresses what part of the target specification corresponds to this element. 3571 */ 3572 @Child(name = "map", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=true) 3573 @Description(shortDefinition="Details of the mapping", formalDefinition="Expresses what part of the target specification corresponds to this element." ) 3574 protected StringType map; 3575 3576 /** 3577 * Comments that provide information about the mapping or its use. 3578 */ 3579 @Child(name = "comment", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) 3580 @Description(shortDefinition="Comments about the mapping or its use", formalDefinition="Comments that provide information about the mapping or its use." ) 3581 protected StringType comment; 3582 3583 private static final long serialVersionUID = 1386816887L; 3584 3585 /** 3586 * Constructor 3587 */ 3588 public ElementDefinitionMappingComponent() { 3589 super(); 3590 } 3591 3592 /** 3593 * Constructor 3594 */ 3595 public ElementDefinitionMappingComponent(IdType identity, StringType map) { 3596 super(); 3597 this.identity = identity; 3598 this.map = map; 3599 } 3600 3601 /** 3602 * @return {@link #identity} (An internal reference to the definition of a mapping.). This is the underlying object with id, value and extensions. The accessor "getIdentity" gives direct access to the value 3603 */ 3604 public IdType getIdentityElement() { 3605 if (this.identity == null) 3606 if (Configuration.errorOnAutoCreate()) 3607 throw new Error("Attempt to auto-create ElementDefinitionMappingComponent.identity"); 3608 else if (Configuration.doAutoCreate()) 3609 this.identity = new IdType(); // bb 3610 return this.identity; 3611 } 3612 3613 public boolean hasIdentityElement() { 3614 return this.identity != null && !this.identity.isEmpty(); 3615 } 3616 3617 public boolean hasIdentity() { 3618 return this.identity != null && !this.identity.isEmpty(); 3619 } 3620 3621 /** 3622 * @param value {@link #identity} (An internal reference to the definition of a mapping.). This is the underlying object with id, value and extensions. The accessor "getIdentity" gives direct access to the value 3623 */ 3624 public ElementDefinitionMappingComponent setIdentityElement(IdType value) { 3625 this.identity = value; 3626 return this; 3627 } 3628 3629 /** 3630 * @return An internal reference to the definition of a mapping. 3631 */ 3632 public String getIdentity() { 3633 return this.identity == null ? null : this.identity.getValue(); 3634 } 3635 3636 /** 3637 * @param value An internal reference to the definition of a mapping. 3638 */ 3639 public ElementDefinitionMappingComponent setIdentity(String value) { 3640 if (this.identity == null) 3641 this.identity = new IdType(); 3642 this.identity.setValue(value); 3643 return this; 3644 } 3645 3646 /** 3647 * @return {@link #language} (Identifies the computable language in which mapping.map is expressed.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value 3648 */ 3649 public CodeType getLanguageElement() { 3650 if (this.language == null) 3651 if (Configuration.errorOnAutoCreate()) 3652 throw new Error("Attempt to auto-create ElementDefinitionMappingComponent.language"); 3653 else if (Configuration.doAutoCreate()) 3654 this.language = new CodeType(); // bb 3655 return this.language; 3656 } 3657 3658 public boolean hasLanguageElement() { 3659 return this.language != null && !this.language.isEmpty(); 3660 } 3661 3662 public boolean hasLanguage() { 3663 return this.language != null && !this.language.isEmpty(); 3664 } 3665 3666 /** 3667 * @param value {@link #language} (Identifies the computable language in which mapping.map is expressed.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value 3668 */ 3669 public ElementDefinitionMappingComponent setLanguageElement(CodeType value) { 3670 this.language = value; 3671 return this; 3672 } 3673 3674 /** 3675 * @return Identifies the computable language in which mapping.map is expressed. 3676 */ 3677 public String getLanguage() { 3678 return this.language == null ? null : this.language.getValue(); 3679 } 3680 3681 /** 3682 * @param value Identifies the computable language in which mapping.map is expressed. 3683 */ 3684 public ElementDefinitionMappingComponent setLanguage(String value) { 3685 if (Utilities.noString(value)) 3686 this.language = null; 3687 else { 3688 if (this.language == null) 3689 this.language = new CodeType(); 3690 this.language.setValue(value); 3691 } 3692 return this; 3693 } 3694 3695 /** 3696 * @return {@link #map} (Expresses what part of the target specification corresponds to this element.). This is the underlying object with id, value and extensions. The accessor "getMap" gives direct access to the value 3697 */ 3698 public StringType getMapElement() { 3699 if (this.map == null) 3700 if (Configuration.errorOnAutoCreate()) 3701 throw new Error("Attempt to auto-create ElementDefinitionMappingComponent.map"); 3702 else if (Configuration.doAutoCreate()) 3703 this.map = new StringType(); // bb 3704 return this.map; 3705 } 3706 3707 public boolean hasMapElement() { 3708 return this.map != null && !this.map.isEmpty(); 3709 } 3710 3711 public boolean hasMap() { 3712 return this.map != null && !this.map.isEmpty(); 3713 } 3714 3715 /** 3716 * @param value {@link #map} (Expresses what part of the target specification corresponds to this element.). This is the underlying object with id, value and extensions. The accessor "getMap" gives direct access to the value 3717 */ 3718 public ElementDefinitionMappingComponent setMapElement(StringType value) { 3719 this.map = value; 3720 return this; 3721 } 3722 3723 /** 3724 * @return Expresses what part of the target specification corresponds to this element. 3725 */ 3726 public String getMap() { 3727 return this.map == null ? null : this.map.getValue(); 3728 } 3729 3730 /** 3731 * @param value Expresses what part of the target specification corresponds to this element. 3732 */ 3733 public ElementDefinitionMappingComponent setMap(String value) { 3734 if (this.map == null) 3735 this.map = new StringType(); 3736 this.map.setValue(value); 3737 return this; 3738 } 3739 3740 /** 3741 * @return {@link #comment} (Comments that provide information about the mapping or its use.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value 3742 */ 3743 public StringType getCommentElement() { 3744 if (this.comment == null) 3745 if (Configuration.errorOnAutoCreate()) 3746 throw new Error("Attempt to auto-create ElementDefinitionMappingComponent.comment"); 3747 else if (Configuration.doAutoCreate()) 3748 this.comment = new StringType(); // bb 3749 return this.comment; 3750 } 3751 3752 public boolean hasCommentElement() { 3753 return this.comment != null && !this.comment.isEmpty(); 3754 } 3755 3756 public boolean hasComment() { 3757 return this.comment != null && !this.comment.isEmpty(); 3758 } 3759 3760 /** 3761 * @param value {@link #comment} (Comments that provide information about the mapping or its use.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value 3762 */ 3763 public ElementDefinitionMappingComponent setCommentElement(StringType value) { 3764 this.comment = value; 3765 return this; 3766 } 3767 3768 /** 3769 * @return Comments that provide information about the mapping or its use. 3770 */ 3771 public String getComment() { 3772 return this.comment == null ? null : this.comment.getValue(); 3773 } 3774 3775 /** 3776 * @param value Comments that provide information about the mapping or its use. 3777 */ 3778 public ElementDefinitionMappingComponent setComment(String value) { 3779 if (Utilities.noString(value)) 3780 this.comment = null; 3781 else { 3782 if (this.comment == null) 3783 this.comment = new StringType(); 3784 this.comment.setValue(value); 3785 } 3786 return this; 3787 } 3788 3789 protected void listChildren(List<Property> children) { 3790 super.listChildren(children); 3791 children.add(new Property("identity", "id", "An internal reference to the definition of a mapping.", 0, 1, identity)); 3792 children.add(new Property("language", "code", "Identifies the computable language in which mapping.map is expressed.", 0, 1, language)); 3793 children.add(new Property("map", "string", "Expresses what part of the target specification corresponds to this element.", 0, 1, map)); 3794 children.add(new Property("comment", "string", "Comments that provide information about the mapping or its use.", 0, 1, comment)); 3795 } 3796 3797 @Override 3798 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3799 switch (_hash) { 3800 case -135761730: /*identity*/ return new Property("identity", "id", "An internal reference to the definition of a mapping.", 0, 1, identity); 3801 case -1613589672: /*language*/ return new Property("language", "code", "Identifies the computable language in which mapping.map is expressed.", 0, 1, language); 3802 case 107868: /*map*/ return new Property("map", "string", "Expresses what part of the target specification corresponds to this element.", 0, 1, map); 3803 case 950398559: /*comment*/ return new Property("comment", "string", "Comments that provide information about the mapping or its use.", 0, 1, comment); 3804 default: return super.getNamedProperty(_hash, _name, _checkValid); 3805 } 3806 3807 } 3808 3809 @Override 3810 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3811 switch (hash) { 3812 case -135761730: /*identity*/ return this.identity == null ? new Base[0] : new Base[] {this.identity}; // IdType 3813 case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // CodeType 3814 case 107868: /*map*/ return this.map == null ? new Base[0] : new Base[] {this.map}; // StringType 3815 case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // StringType 3816 default: return super.getProperty(hash, name, checkValid); 3817 } 3818 3819 } 3820 3821 @Override 3822 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3823 switch (hash) { 3824 case -135761730: // identity 3825 this.identity = castToId(value); // IdType 3826 return value; 3827 case -1613589672: // language 3828 this.language = castToCode(value); // CodeType 3829 return value; 3830 case 107868: // map 3831 this.map = castToString(value); // StringType 3832 return value; 3833 case 950398559: // comment 3834 this.comment = castToString(value); // StringType 3835 return value; 3836 default: return super.setProperty(hash, name, value); 3837 } 3838 3839 } 3840 3841 @Override 3842 public Base setProperty(String name, Base value) throws FHIRException { 3843 if (name.equals("identity")) { 3844 this.identity = castToId(value); // IdType 3845 } else if (name.equals("language")) { 3846 this.language = castToCode(value); // CodeType 3847 } else if (name.equals("map")) { 3848 this.map = castToString(value); // StringType 3849 } else if (name.equals("comment")) { 3850 this.comment = castToString(value); // StringType 3851 } else 3852 return super.setProperty(name, value); 3853 return value; 3854 } 3855 3856 @Override 3857 public Base makeProperty(int hash, String name) throws FHIRException { 3858 switch (hash) { 3859 case -135761730: return getIdentityElement(); 3860 case -1613589672: return getLanguageElement(); 3861 case 107868: return getMapElement(); 3862 case 950398559: return getCommentElement(); 3863 default: return super.makeProperty(hash, name); 3864 } 3865 3866 } 3867 3868 @Override 3869 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3870 switch (hash) { 3871 case -135761730: /*identity*/ return new String[] {"id"}; 3872 case -1613589672: /*language*/ return new String[] {"code"}; 3873 case 107868: /*map*/ return new String[] {"string"}; 3874 case 950398559: /*comment*/ return new String[] {"string"}; 3875 default: return super.getTypesForProperty(hash, name); 3876 } 3877 3878 } 3879 3880 @Override 3881 public Base addChild(String name) throws FHIRException { 3882 if (name.equals("identity")) { 3883 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.identity"); 3884 } 3885 else if (name.equals("language")) { 3886 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.language"); 3887 } 3888 else if (name.equals("map")) { 3889 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.map"); 3890 } 3891 else if (name.equals("comment")) { 3892 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.comment"); 3893 } 3894 else 3895 return super.addChild(name); 3896 } 3897 3898 public ElementDefinitionMappingComponent copy() { 3899 ElementDefinitionMappingComponent dst = new ElementDefinitionMappingComponent(); 3900 copyValues(dst); 3901 dst.identity = identity == null ? null : identity.copy(); 3902 dst.language = language == null ? null : language.copy(); 3903 dst.map = map == null ? null : map.copy(); 3904 dst.comment = comment == null ? null : comment.copy(); 3905 return dst; 3906 } 3907 3908 @Override 3909 public boolean equalsDeep(Base other_) { 3910 if (!super.equalsDeep(other_)) 3911 return false; 3912 if (!(other_ instanceof ElementDefinitionMappingComponent)) 3913 return false; 3914 ElementDefinitionMappingComponent o = (ElementDefinitionMappingComponent) other_; 3915 return compareDeep(identity, o.identity, true) && compareDeep(language, o.language, true) && compareDeep(map, o.map, true) 3916 && compareDeep(comment, o.comment, true); 3917 } 3918 3919 @Override 3920 public boolean equalsShallow(Base other_) { 3921 if (!super.equalsShallow(other_)) 3922 return false; 3923 if (!(other_ instanceof ElementDefinitionMappingComponent)) 3924 return false; 3925 ElementDefinitionMappingComponent o = (ElementDefinitionMappingComponent) other_; 3926 return compareValues(identity, o.identity, true) && compareValues(language, o.language, true) && compareValues(map, o.map, true) 3927 && compareValues(comment, o.comment, true); 3928 } 3929 3930 public boolean isEmpty() { 3931 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identity, language, map 3932 , comment); 3933 } 3934 3935 public String fhirType() { 3936 return "ElementDefinition.mapping"; 3937 3938 } 3939 3940 } 3941 3942 /** 3943 * The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension. 3944 */ 3945 @Child(name = "path", type = {StringType.class}, order=0, min=1, max=1, modifier=false, summary=true) 3946 @Description(shortDefinition="Path of the element in the hierarchy of elements", formalDefinition="The path identifies the element and is expressed as a \".\"-separated list of ancestor elements, beginning with the name of the resource or extension." ) 3947 protected StringType path; 3948 3949 /** 3950 * Codes that define how this element is represented in instances, when the deviation varies from the normal case. 3951 */ 3952 @Child(name = "representation", type = {CodeType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 3953 @Description(shortDefinition="xmlAttr | xmlText | typeAttr | cdaText | xhtml", formalDefinition="Codes that define how this element is represented in instances, when the deviation varies from the normal case." ) 3954 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/property-representation") 3955 protected List<Enumeration<PropertyRepresentation>> representation; 3956 3957 /** 3958 * The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element. 3959 */ 3960 @Child(name = "sliceName", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 3961 @Description(shortDefinition="Name for this particular element (in a set of slices)", formalDefinition="The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element." ) 3962 protected StringType sliceName; 3963 3964 /** 3965 * A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form. 3966 */ 3967 @Child(name = "label", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 3968 @Description(shortDefinition="Name for element to display with or prompt for element", formalDefinition="A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form." ) 3969 protected StringType label; 3970 3971 /** 3972 * A code that has the same meaning as the element in a particular terminology. 3973 */ 3974 @Child(name = "code", type = {Coding.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 3975 @Description(shortDefinition="Corresponding codes in terminologies", formalDefinition="A code that has the same meaning as the element in a particular terminology." ) 3976 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-codes") 3977 protected List<Coding> code; 3978 3979 /** 3980 * Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set). 3981 */ 3982 @Child(name = "slicing", type = {}, order=5, min=0, max=1, modifier=false, summary=true) 3983 @Description(shortDefinition="This element is sliced - slices follow", formalDefinition="Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set)." ) 3984 protected ElementDefinitionSlicingComponent slicing; 3985 3986 /** 3987 * A concise description of what this element means (e.g. for use in autogenerated summaries). 3988 */ 3989 @Child(name = "short", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) 3990 @Description(shortDefinition="Concise definition for space-constrained presentation", formalDefinition="A concise description of what this element means (e.g. for use in autogenerated summaries)." ) 3991 protected StringType short_; 3992 3993 /** 3994 * Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. 3995 */ 3996 @Child(name = "definition", type = {MarkdownType.class}, order=7, min=0, max=1, modifier=false, summary=true) 3997 @Description(shortDefinition="Full formal definition as narrative text", formalDefinition="Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource." ) 3998 protected MarkdownType definition; 3999 4000 /** 4001 * Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. 4002 */ 4003 @Child(name = "comment", type = {MarkdownType.class}, order=8, min=0, max=1, modifier=false, summary=true) 4004 @Description(shortDefinition="Comments about the use of this element", formalDefinition="Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc." ) 4005 protected MarkdownType comment; 4006 4007 /** 4008 * This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element. 4009 */ 4010 @Child(name = "requirements", type = {MarkdownType.class}, order=9, min=0, max=1, modifier=false, summary=true) 4011 @Description(shortDefinition="Why this resource has been created", formalDefinition="This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element." ) 4012 protected MarkdownType requirements; 4013 4014 /** 4015 * Identifies additional names by which this element might also be known. 4016 */ 4017 @Child(name = "alias", type = {StringType.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 4018 @Description(shortDefinition="Other names", formalDefinition="Identifies additional names by which this element might also be known." ) 4019 protected List<StringType> alias; 4020 4021 /** 4022 * The minimum number of times this element SHALL appear in the instance. 4023 */ 4024 @Child(name = "min", type = {UnsignedIntType.class}, order=11, min=0, max=1, modifier=false, summary=true) 4025 @Description(shortDefinition="Minimum Cardinality", formalDefinition="The minimum number of times this element SHALL appear in the instance." ) 4026 protected UnsignedIntType min; 4027 4028 /** 4029 * The maximum number of times this element is permitted to appear in the instance. 4030 */ 4031 @Child(name = "max", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=true) 4032 @Description(shortDefinition="Maximum Cardinality (a number or *)", formalDefinition="The maximum number of times this element is permitted to appear in the instance." ) 4033 protected StringType max; 4034 4035 /** 4036 * Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. This information is provided when the element definition is not the original definition of an element - i.g. either in a constraint on another type, or for elements from a super type in a snap shot. 4037 */ 4038 @Child(name = "base", type = {}, order=13, min=0, max=1, modifier=false, summary=true) 4039 @Description(shortDefinition="Base definition information for tools", formalDefinition="Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. This information is provided when the element definition is not the original definition of an element - i.g. either in a constraint on another type, or for elements from a super type in a snap shot." ) 4040 protected ElementDefinitionBaseComponent base; 4041 4042 /** 4043 * Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element. 4044 */ 4045 @Child(name = "contentReference", type = {UriType.class}, order=14, min=0, max=1, modifier=false, summary=true) 4046 @Description(shortDefinition="Reference to definition of content for the element", formalDefinition="Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element." ) 4047 protected UriType contentReference; 4048 4049 /** 4050 * The data type or resource that the value of this element is permitted to be. 4051 */ 4052 @Child(name = "type", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 4053 @Description(shortDefinition="Data type and Profile for this element", formalDefinition="The data type or resource that the value of this element is permitted to be." ) 4054 protected List<TypeRefComponent> type; 4055 4056 /** 4057 * The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false'). 4058 */ 4059 @Child(name = "defaultValue", type = {}, order=16, min=0, max=1, modifier=false, summary=true) 4060 @Description(shortDefinition="Specified value if missing from instance", formalDefinition="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')." ) 4061 protected org.hl7.fhir.dstu3.model.Type defaultValue; 4062 4063 /** 4064 * The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'. 4065 */ 4066 @Child(name = "meaningWhenMissing", type = {MarkdownType.class}, order=17, min=0, max=1, modifier=false, summary=true) 4067 @Description(shortDefinition="Implicit meaning when this element is missing", formalDefinition="The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'." ) 4068 protected MarkdownType meaningWhenMissing; 4069 4070 /** 4071 * If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning. 4072 */ 4073 @Child(name = "orderMeaning", type = {StringType.class}, order=18, min=0, max=1, modifier=false, summary=true) 4074 @Description(shortDefinition="What the order of the elements means", formalDefinition="If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning." ) 4075 protected StringType orderMeaning; 4076 4077 /** 4078 * Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing. 4079 */ 4080 @Child(name = "fixed", type = {}, order=19, min=0, max=1, modifier=false, summary=true) 4081 @Description(shortDefinition="Value must be exactly this", formalDefinition="Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing." ) 4082 protected org.hl7.fhir.dstu3.model.Type fixed; 4083 4084 /** 4085 * Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.). 4086 */ 4087 @Child(name = "pattern", type = {}, order=20, min=0, max=1, modifier=false, summary=true) 4088 @Description(shortDefinition="Value must have at least these property values", formalDefinition="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.)." ) 4089 protected org.hl7.fhir.dstu3.model.Type pattern; 4090 4091 /** 4092 * A sample value for this element demonstrating the type of information that would typically be found in the element. 4093 */ 4094 @Child(name = "example", type = {}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 4095 @Description(shortDefinition="Example value (as defined for type)", formalDefinition="A sample value for this element demonstrating the type of information that would typically be found in the element." ) 4096 protected List<ElementDefinitionExampleComponent> example; 4097 4098 /** 4099 * The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity. 4100 */ 4101 @Child(name = "minValue", type = {DateType.class, DateTimeType.class, InstantType.class, TimeType.class, DecimalType.class, IntegerType.class, PositiveIntType.class, UnsignedIntType.class, Quantity.class}, order=22, min=0, max=1, modifier=false, summary=true) 4102 @Description(shortDefinition="Minimum Allowed Value (for some types)", formalDefinition="The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity." ) 4103 protected Type minValue; 4104 4105 /** 4106 * The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity. 4107 */ 4108 @Child(name = "maxValue", type = {DateType.class, DateTimeType.class, InstantType.class, TimeType.class, DecimalType.class, IntegerType.class, PositiveIntType.class, UnsignedIntType.class, Quantity.class}, order=23, min=0, max=1, modifier=false, summary=true) 4109 @Description(shortDefinition="Maximum Allowed Value (for some types)", formalDefinition="The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity." ) 4110 protected Type maxValue; 4111 4112 /** 4113 * Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element. 4114 */ 4115 @Child(name = "maxLength", type = {IntegerType.class}, order=24, min=0, max=1, modifier=false, summary=true) 4116 @Description(shortDefinition="Max length for strings", formalDefinition="Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element." ) 4117 protected IntegerType maxLength; 4118 4119 /** 4120 * A reference to an invariant that may make additional statements about the cardinality or value in the instance. 4121 */ 4122 @Child(name = "condition", type = {IdType.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 4123 @Description(shortDefinition="Reference to invariant about presence", formalDefinition="A reference to an invariant that may make additional statements about the cardinality or value in the instance." ) 4124 protected List<IdType> condition; 4125 4126 /** 4127 * Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance. 4128 */ 4129 @Child(name = "constraint", type = {}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 4130 @Description(shortDefinition="Condition that must evaluate to true", formalDefinition="Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance." ) 4131 protected List<ElementDefinitionConstraintComponent> constraint; 4132 4133 /** 4134 * If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. If false, the element may be ignored and not supported. 4135 */ 4136 @Child(name = "mustSupport", type = {BooleanType.class}, order=27, min=0, max=1, modifier=false, summary=true) 4137 @Description(shortDefinition="If the element must supported", formalDefinition="If true, implementations that produce or consume resources SHALL provide \"support\" for the element in some meaningful way. If false, the element may be ignored and not supported." ) 4138 protected BooleanType mustSupport; 4139 4140 /** 4141 * If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system. 4142 */ 4143 @Child(name = "isModifier", type = {BooleanType.class}, order=28, min=0, max=1, modifier=false, summary=true) 4144 @Description(shortDefinition="If this modifies the meaning of other elements", formalDefinition="If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system." ) 4145 protected BooleanType isModifier; 4146 4147 /** 4148 * Whether the element should be included if a client requests a search with the parameter _summary=true. 4149 */ 4150 @Child(name = "isSummary", type = {BooleanType.class}, order=29, min=0, max=1, modifier=false, summary=true) 4151 @Description(shortDefinition="Include when _summary = true?", formalDefinition="Whether the element should be included if a client requests a search with the parameter _summary=true." ) 4152 protected BooleanType isSummary; 4153 4154 /** 4155 * Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri). 4156 */ 4157 @Child(name = "binding", type = {}, order=30, min=0, max=1, modifier=false, summary=true) 4158 @Description(shortDefinition="ValueSet details if this is coded", formalDefinition="Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri)." ) 4159 protected ElementDefinitionBindingComponent binding; 4160 4161 /** 4162 * Identifies a concept from an external specification that roughly corresponds to this element. 4163 */ 4164 @Child(name = "mapping", type = {}, order=31, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 4165 @Description(shortDefinition="Map element to another set of definitions", formalDefinition="Identifies a concept from an external specification that roughly corresponds to this element." ) 4166 protected List<ElementDefinitionMappingComponent> mapping; 4167 4168 private static final long serialVersionUID = -278262340L; 4169 4170 /** 4171 * Constructor 4172 */ 4173 public ElementDefinition() { 4174 super(); 4175 } 4176 4177 /** 4178 * Constructor 4179 */ 4180 public ElementDefinition(StringType path) { 4181 super(); 4182 this.path = path; 4183 } 4184 4185 /** 4186 * @return {@link #path} (The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value 4187 */ 4188 public StringType getPathElement() { 4189 if (this.path == null) 4190 if (Configuration.errorOnAutoCreate()) 4191 throw new Error("Attempt to auto-create ElementDefinition.path"); 4192 else if (Configuration.doAutoCreate()) 4193 this.path = new StringType(); // bb 4194 return this.path; 4195 } 4196 4197 public boolean hasPathElement() { 4198 return this.path != null && !this.path.isEmpty(); 4199 } 4200 4201 public boolean hasPath() { 4202 return this.path != null && !this.path.isEmpty(); 4203 } 4204 4205 /** 4206 * @param value {@link #path} (The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value 4207 */ 4208 public ElementDefinition setPathElement(StringType value) { 4209 this.path = value; 4210 return this; 4211 } 4212 4213 /** 4214 * @return The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension. 4215 */ 4216 public String getPath() { 4217 return this.path == null ? null : this.path.getValue(); 4218 } 4219 4220 /** 4221 * @param value The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension. 4222 */ 4223 public ElementDefinition setPath(String value) { 4224 if (this.path == null) 4225 this.path = new StringType(); 4226 this.path.setValue(value); 4227 return this; 4228 } 4229 4230 /** 4231 * @return {@link #representation} (Codes that define how this element is represented in instances, when the deviation varies from the normal case.) 4232 */ 4233 public List<Enumeration<PropertyRepresentation>> getRepresentation() { 4234 if (this.representation == null) 4235 this.representation = new ArrayList<Enumeration<PropertyRepresentation>>(); 4236 return this.representation; 4237 } 4238 4239 /** 4240 * @return Returns a reference to <code>this</code> for easy method chaining 4241 */ 4242 public ElementDefinition setRepresentation(List<Enumeration<PropertyRepresentation>> theRepresentation) { 4243 this.representation = theRepresentation; 4244 return this; 4245 } 4246 4247 public boolean hasRepresentation() { 4248 if (this.representation == null) 4249 return false; 4250 for (Enumeration<PropertyRepresentation> item : this.representation) 4251 if (!item.isEmpty()) 4252 return true; 4253 return false; 4254 } 4255 4256 /** 4257 * @return {@link #representation} (Codes that define how this element is represented in instances, when the deviation varies from the normal case.) 4258 */ 4259 public Enumeration<PropertyRepresentation> addRepresentationElement() {//2 4260 Enumeration<PropertyRepresentation> t = new Enumeration<PropertyRepresentation>(new PropertyRepresentationEnumFactory()); 4261 if (this.representation == null) 4262 this.representation = new ArrayList<Enumeration<PropertyRepresentation>>(); 4263 this.representation.add(t); 4264 return t; 4265 } 4266 4267 /** 4268 * @param value {@link #representation} (Codes that define how this element is represented in instances, when the deviation varies from the normal case.) 4269 */ 4270 public ElementDefinition addRepresentation(PropertyRepresentation value) { //1 4271 Enumeration<PropertyRepresentation> t = new Enumeration<PropertyRepresentation>(new PropertyRepresentationEnumFactory()); 4272 t.setValue(value); 4273 if (this.representation == null) 4274 this.representation = new ArrayList<Enumeration<PropertyRepresentation>>(); 4275 this.representation.add(t); 4276 return this; 4277 } 4278 4279 /** 4280 * @param value {@link #representation} (Codes that define how this element is represented in instances, when the deviation varies from the normal case.) 4281 */ 4282 public boolean hasRepresentation(PropertyRepresentation value) { 4283 if (this.representation == null) 4284 return false; 4285 for (Enumeration<PropertyRepresentation> v : this.representation) 4286 if (v.getValue().equals(value)) // code 4287 return true; 4288 return false; 4289 } 4290 4291 /** 4292 * @return {@link #sliceName} (The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.). This is the underlying object with id, value and extensions. The accessor "getSliceName" gives direct access to the value 4293 */ 4294 public StringType getSliceNameElement() { 4295 if (this.sliceName == null) 4296 if (Configuration.errorOnAutoCreate()) 4297 throw new Error("Attempt to auto-create ElementDefinition.sliceName"); 4298 else if (Configuration.doAutoCreate()) 4299 this.sliceName = new StringType(); // bb 4300 return this.sliceName; 4301 } 4302 4303 public boolean hasSliceNameElement() { 4304 return this.sliceName != null && !this.sliceName.isEmpty(); 4305 } 4306 4307 public boolean hasSliceName() { 4308 return this.sliceName != null && !this.sliceName.isEmpty(); 4309 } 4310 4311 /** 4312 * @param value {@link #sliceName} (The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.). This is the underlying object with id, value and extensions. The accessor "getSliceName" gives direct access to the value 4313 */ 4314 public ElementDefinition setSliceNameElement(StringType value) { 4315 this.sliceName = value; 4316 return this; 4317 } 4318 4319 /** 4320 * @return The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element. 4321 */ 4322 public String getSliceName() { 4323 return this.sliceName == null ? null : this.sliceName.getValue(); 4324 } 4325 4326 /** 4327 * @param value The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element. 4328 */ 4329 public ElementDefinition setSliceName(String value) { 4330 if (Utilities.noString(value)) 4331 this.sliceName = null; 4332 else { 4333 if (this.sliceName == null) 4334 this.sliceName = new StringType(); 4335 this.sliceName.setValue(value); 4336 } 4337 return this; 4338 } 4339 4340 /** 4341 * @return {@link #label} (A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value 4342 */ 4343 public StringType getLabelElement() { 4344 if (this.label == null) 4345 if (Configuration.errorOnAutoCreate()) 4346 throw new Error("Attempt to auto-create ElementDefinition.label"); 4347 else if (Configuration.doAutoCreate()) 4348 this.label = new StringType(); // bb 4349 return this.label; 4350 } 4351 4352 public boolean hasLabelElement() { 4353 return this.label != null && !this.label.isEmpty(); 4354 } 4355 4356 public boolean hasLabel() { 4357 return this.label != null && !this.label.isEmpty(); 4358 } 4359 4360 /** 4361 * @param value {@link #label} (A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value 4362 */ 4363 public ElementDefinition setLabelElement(StringType value) { 4364 this.label = value; 4365 return this; 4366 } 4367 4368 /** 4369 * @return A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form. 4370 */ 4371 public String getLabel() { 4372 return this.label == null ? null : this.label.getValue(); 4373 } 4374 4375 /** 4376 * @param value A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form. 4377 */ 4378 public ElementDefinition setLabel(String value) { 4379 if (Utilities.noString(value)) 4380 this.label = null; 4381 else { 4382 if (this.label == null) 4383 this.label = new StringType(); 4384 this.label.setValue(value); 4385 } 4386 return this; 4387 } 4388 4389 /** 4390 * @return {@link #code} (A code that has the same meaning as the element in a particular terminology.) 4391 */ 4392 public List<Coding> getCode() { 4393 if (this.code == null) 4394 this.code = new ArrayList<Coding>(); 4395 return this.code; 4396 } 4397 4398 /** 4399 * @return Returns a reference to <code>this</code> for easy method chaining 4400 */ 4401 public ElementDefinition setCode(List<Coding> theCode) { 4402 this.code = theCode; 4403 return this; 4404 } 4405 4406 public boolean hasCode() { 4407 if (this.code == null) 4408 return false; 4409 for (Coding item : this.code) 4410 if (!item.isEmpty()) 4411 return true; 4412 return false; 4413 } 4414 4415 public Coding addCode() { //3 4416 Coding t = new Coding(); 4417 if (this.code == null) 4418 this.code = new ArrayList<Coding>(); 4419 this.code.add(t); 4420 return t; 4421 } 4422 4423 public ElementDefinition addCode(Coding t) { //3 4424 if (t == null) 4425 return this; 4426 if (this.code == null) 4427 this.code = new ArrayList<Coding>(); 4428 this.code.add(t); 4429 return this; 4430 } 4431 4432 /** 4433 * @return The first repetition of repeating field {@link #code}, creating it if it does not already exist 4434 */ 4435 public Coding getCodeFirstRep() { 4436 if (getCode().isEmpty()) { 4437 addCode(); 4438 } 4439 return getCode().get(0); 4440 } 4441 4442 /** 4443 * @return {@link #slicing} (Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).) 4444 */ 4445 public ElementDefinitionSlicingComponent getSlicing() { 4446 if (this.slicing == null) 4447 if (Configuration.errorOnAutoCreate()) 4448 throw new Error("Attempt to auto-create ElementDefinition.slicing"); 4449 else if (Configuration.doAutoCreate()) 4450 this.slicing = new ElementDefinitionSlicingComponent(); // cc 4451 return this.slicing; 4452 } 4453 4454 public boolean hasSlicing() { 4455 return this.slicing != null && !this.slicing.isEmpty(); 4456 } 4457 4458 /** 4459 * @param value {@link #slicing} (Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).) 4460 */ 4461 public ElementDefinition setSlicing(ElementDefinitionSlicingComponent value) { 4462 this.slicing = value; 4463 return this; 4464 } 4465 4466 /** 4467 * @return {@link #short_} (A concise description of what this element means (e.g. for use in autogenerated summaries).). This is the underlying object with id, value and extensions. The accessor "getShort" gives direct access to the value 4468 */ 4469 public StringType getShortElement() { 4470 if (this.short_ == null) 4471 if (Configuration.errorOnAutoCreate()) 4472 throw new Error("Attempt to auto-create ElementDefinition.short_"); 4473 else if (Configuration.doAutoCreate()) 4474 this.short_ = new StringType(); // bb 4475 return this.short_; 4476 } 4477 4478 public boolean hasShortElement() { 4479 return this.short_ != null && !this.short_.isEmpty(); 4480 } 4481 4482 public boolean hasShort() { 4483 return this.short_ != null && !this.short_.isEmpty(); 4484 } 4485 4486 /** 4487 * @param value {@link #short_} (A concise description of what this element means (e.g. for use in autogenerated summaries).). This is the underlying object with id, value and extensions. The accessor "getShort" gives direct access to the value 4488 */ 4489 public ElementDefinition setShortElement(StringType value) { 4490 this.short_ = value; 4491 return this; 4492 } 4493 4494 /** 4495 * @return A concise description of what this element means (e.g. for use in autogenerated summaries). 4496 */ 4497 public String getShort() { 4498 return this.short_ == null ? null : this.short_.getValue(); 4499 } 4500 4501 /** 4502 * @param value A concise description of what this element means (e.g. for use in autogenerated summaries). 4503 */ 4504 public ElementDefinition setShort(String value) { 4505 if (Utilities.noString(value)) 4506 this.short_ = null; 4507 else { 4508 if (this.short_ == null) 4509 this.short_ = new StringType(); 4510 this.short_.setValue(value); 4511 } 4512 return this; 4513 } 4514 4515 /** 4516 * @return {@link #definition} (Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value 4517 */ 4518 public MarkdownType getDefinitionElement() { 4519 if (this.definition == null) 4520 if (Configuration.errorOnAutoCreate()) 4521 throw new Error("Attempt to auto-create ElementDefinition.definition"); 4522 else if (Configuration.doAutoCreate()) 4523 this.definition = new MarkdownType(); // bb 4524 return this.definition; 4525 } 4526 4527 public boolean hasDefinitionElement() { 4528 return this.definition != null && !this.definition.isEmpty(); 4529 } 4530 4531 public boolean hasDefinition() { 4532 return this.definition != null && !this.definition.isEmpty(); 4533 } 4534 4535 /** 4536 * @param value {@link #definition} (Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value 4537 */ 4538 public ElementDefinition setDefinitionElement(MarkdownType value) { 4539 this.definition = value; 4540 return this; 4541 } 4542 4543 /** 4544 * @return Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. 4545 */ 4546 public String getDefinition() { 4547 return this.definition == null ? null : this.definition.getValue(); 4548 } 4549 4550 /** 4551 * @param value Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. 4552 */ 4553 public ElementDefinition setDefinition(String value) { 4554 if (value == null) 4555 this.definition = null; 4556 else { 4557 if (this.definition == null) 4558 this.definition = new MarkdownType(); 4559 this.definition.setValue(value); 4560 } 4561 return this; 4562 } 4563 4564 /** 4565 * @return {@link #comment} (Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value 4566 */ 4567 public MarkdownType getCommentElement() { 4568 if (this.comment == null) 4569 if (Configuration.errorOnAutoCreate()) 4570 throw new Error("Attempt to auto-create ElementDefinition.comment"); 4571 else if (Configuration.doAutoCreate()) 4572 this.comment = new MarkdownType(); // bb 4573 return this.comment; 4574 } 4575 4576 public boolean hasCommentElement() { 4577 return this.comment != null && !this.comment.isEmpty(); 4578 } 4579 4580 public boolean hasComment() { 4581 return this.comment != null && !this.comment.isEmpty(); 4582 } 4583 4584 /** 4585 * @param value {@link #comment} (Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value 4586 */ 4587 public ElementDefinition setCommentElement(MarkdownType value) { 4588 this.comment = value; 4589 return this; 4590 } 4591 4592 /** 4593 * @return Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. 4594 */ 4595 public String getComment() { 4596 return this.comment == null ? null : this.comment.getValue(); 4597 } 4598 4599 /** 4600 * @param value Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. 4601 */ 4602 public ElementDefinition setComment(String value) { 4603 if (value == null) 4604 this.comment = null; 4605 else { 4606 if (this.comment == null) 4607 this.comment = new MarkdownType(); 4608 this.comment.setValue(value); 4609 } 4610 return this; 4611 } 4612 4613 /** 4614 * @return {@link #requirements} (This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value 4615 */ 4616 public MarkdownType getRequirementsElement() { 4617 if (this.requirements == null) 4618 if (Configuration.errorOnAutoCreate()) 4619 throw new Error("Attempt to auto-create ElementDefinition.requirements"); 4620 else if (Configuration.doAutoCreate()) 4621 this.requirements = new MarkdownType(); // bb 4622 return this.requirements; 4623 } 4624 4625 public boolean hasRequirementsElement() { 4626 return this.requirements != null && !this.requirements.isEmpty(); 4627 } 4628 4629 public boolean hasRequirements() { 4630 return this.requirements != null && !this.requirements.isEmpty(); 4631 } 4632 4633 /** 4634 * @param value {@link #requirements} (This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value 4635 */ 4636 public ElementDefinition setRequirementsElement(MarkdownType value) { 4637 this.requirements = value; 4638 return this; 4639 } 4640 4641 /** 4642 * @return This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element. 4643 */ 4644 public String getRequirements() { 4645 return this.requirements == null ? null : this.requirements.getValue(); 4646 } 4647 4648 /** 4649 * @param value This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element. 4650 */ 4651 public ElementDefinition setRequirements(String value) { 4652 if (value == null) 4653 this.requirements = null; 4654 else { 4655 if (this.requirements == null) 4656 this.requirements = new MarkdownType(); 4657 this.requirements.setValue(value); 4658 } 4659 return this; 4660 } 4661 4662 /** 4663 * @return {@link #alias} (Identifies additional names by which this element might also be known.) 4664 */ 4665 public List<StringType> getAlias() { 4666 if (this.alias == null) 4667 this.alias = new ArrayList<StringType>(); 4668 return this.alias; 4669 } 4670 4671 /** 4672 * @return Returns a reference to <code>this</code> for easy method chaining 4673 */ 4674 public ElementDefinition setAlias(List<StringType> theAlias) { 4675 this.alias = theAlias; 4676 return this; 4677 } 4678 4679 public boolean hasAlias() { 4680 if (this.alias == null) 4681 return false; 4682 for (StringType item : this.alias) 4683 if (!item.isEmpty()) 4684 return true; 4685 return false; 4686 } 4687 4688 /** 4689 * @return {@link #alias} (Identifies additional names by which this element might also be known.) 4690 */ 4691 public StringType addAliasElement() {//2 4692 StringType t = new StringType(); 4693 if (this.alias == null) 4694 this.alias = new ArrayList<StringType>(); 4695 this.alias.add(t); 4696 return t; 4697 } 4698 4699 /** 4700 * @param value {@link #alias} (Identifies additional names by which this element might also be known.) 4701 */ 4702 public ElementDefinition addAlias(String value) { //1 4703 StringType t = new StringType(); 4704 t.setValue(value); 4705 if (this.alias == null) 4706 this.alias = new ArrayList<StringType>(); 4707 this.alias.add(t); 4708 return this; 4709 } 4710 4711 /** 4712 * @param value {@link #alias} (Identifies additional names by which this element might also be known.) 4713 */ 4714 public boolean hasAlias(String value) { 4715 if (this.alias == null) 4716 return false; 4717 for (StringType v : this.alias) 4718 if (v.getValue().equals(value)) // string 4719 return true; 4720 return false; 4721 } 4722 4723 /** 4724 * @return {@link #min} (The minimum number of times this element SHALL appear in the instance.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value 4725 */ 4726 public UnsignedIntType getMinElement() { 4727 if (this.min == null) 4728 if (Configuration.errorOnAutoCreate()) 4729 throw new Error("Attempt to auto-create ElementDefinition.min"); 4730 else if (Configuration.doAutoCreate()) 4731 this.min = new UnsignedIntType(); // bb 4732 return this.min; 4733 } 4734 4735 public boolean hasMinElement() { 4736 return this.min != null && !this.min.isEmpty(); 4737 } 4738 4739 public boolean hasMin() { 4740 return this.min != null && !this.min.isEmpty(); 4741 } 4742 4743 /** 4744 * @param value {@link #min} (The minimum number of times this element SHALL appear in the instance.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value 4745 */ 4746 public ElementDefinition setMinElement(UnsignedIntType value) { 4747 this.min = value; 4748 return this; 4749 } 4750 4751 /** 4752 * @return The minimum number of times this element SHALL appear in the instance. 4753 */ 4754 public int getMin() { 4755 return this.min == null || this.min.isEmpty() ? 0 : this.min.getValue(); 4756 } 4757 4758 /** 4759 * @param value The minimum number of times this element SHALL appear in the instance. 4760 */ 4761 public ElementDefinition setMin(int value) { 4762 if (this.min == null) 4763 this.min = new UnsignedIntType(); 4764 this.min.setValue(value); 4765 return this; 4766 } 4767 4768 /** 4769 * @return {@link #max} (The maximum number of times this element is permitted to appear in the instance.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value 4770 */ 4771 public StringType getMaxElement() { 4772 if (this.max == null) 4773 if (Configuration.errorOnAutoCreate()) 4774 throw new Error("Attempt to auto-create ElementDefinition.max"); 4775 else if (Configuration.doAutoCreate()) 4776 this.max = new StringType(); // bb 4777 return this.max; 4778 } 4779 4780 public boolean hasMaxElement() { 4781 return this.max != null && !this.max.isEmpty(); 4782 } 4783 4784 public boolean hasMax() { 4785 return this.max != null && !this.max.isEmpty(); 4786 } 4787 4788 /** 4789 * @param value {@link #max} (The maximum number of times this element is permitted to appear in the instance.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value 4790 */ 4791 public ElementDefinition setMaxElement(StringType value) { 4792 this.max = value; 4793 return this; 4794 } 4795 4796 /** 4797 * @return The maximum number of times this element is permitted to appear in the instance. 4798 */ 4799 public String getMax() { 4800 return this.max == null ? null : this.max.getValue(); 4801 } 4802 4803 /** 4804 * @param value The maximum number of times this element is permitted to appear in the instance. 4805 */ 4806 public ElementDefinition setMax(String value) { 4807 if (Utilities.noString(value)) 4808 this.max = null; 4809 else { 4810 if (this.max == null) 4811 this.max = new StringType(); 4812 this.max.setValue(value); 4813 } 4814 return this; 4815 } 4816 4817 /** 4818 * @return {@link #base} (Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. This information is provided when the element definition is not the original definition of an element - i.g. either in a constraint on another type, or for elements from a super type in a snap shot.) 4819 */ 4820 public ElementDefinitionBaseComponent getBase() { 4821 if (this.base == null) 4822 if (Configuration.errorOnAutoCreate()) 4823 throw new Error("Attempt to auto-create ElementDefinition.base"); 4824 else if (Configuration.doAutoCreate()) 4825 this.base = new ElementDefinitionBaseComponent(); // cc 4826 return this.base; 4827 } 4828 4829 public boolean hasBase() { 4830 return this.base != null && !this.base.isEmpty(); 4831 } 4832 4833 /** 4834 * @param value {@link #base} (Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. This information is provided when the element definition is not the original definition of an element - i.g. either in a constraint on another type, or for elements from a super type in a snap shot.) 4835 */ 4836 public ElementDefinition setBase(ElementDefinitionBaseComponent value) { 4837 this.base = value; 4838 return this; 4839 } 4840 4841 /** 4842 * @return {@link #contentReference} (Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element.). This is the underlying object with id, value and extensions. The accessor "getContentReference" gives direct access to the value 4843 */ 4844 public UriType getContentReferenceElement() { 4845 if (this.contentReference == null) 4846 if (Configuration.errorOnAutoCreate()) 4847 throw new Error("Attempt to auto-create ElementDefinition.contentReference"); 4848 else if (Configuration.doAutoCreate()) 4849 this.contentReference = new UriType(); // bb 4850 return this.contentReference; 4851 } 4852 4853 public boolean hasContentReferenceElement() { 4854 return this.contentReference != null && !this.contentReference.isEmpty(); 4855 } 4856 4857 public boolean hasContentReference() { 4858 return this.contentReference != null && !this.contentReference.isEmpty(); 4859 } 4860 4861 /** 4862 * @param value {@link #contentReference} (Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element.). This is the underlying object with id, value and extensions. The accessor "getContentReference" gives direct access to the value 4863 */ 4864 public ElementDefinition setContentReferenceElement(UriType value) { 4865 this.contentReference = value; 4866 return this; 4867 } 4868 4869 /** 4870 * @return Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element. 4871 */ 4872 public String getContentReference() { 4873 return this.contentReference == null ? null : this.contentReference.getValue(); 4874 } 4875 4876 /** 4877 * @param value Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element. 4878 */ 4879 public ElementDefinition setContentReference(String value) { 4880 if (Utilities.noString(value)) 4881 this.contentReference = null; 4882 else { 4883 if (this.contentReference == null) 4884 this.contentReference = new UriType(); 4885 this.contentReference.setValue(value); 4886 } 4887 return this; 4888 } 4889 4890 /** 4891 * @return {@link #type} (The data type or resource that the value of this element is permitted to be.) 4892 */ 4893 public List<TypeRefComponent> getType() { 4894 if (this.type == null) 4895 this.type = new ArrayList<TypeRefComponent>(); 4896 return this.type; 4897 } 4898 4899 /** 4900 * @return Returns a reference to <code>this</code> for easy method chaining 4901 */ 4902 public ElementDefinition setType(List<TypeRefComponent> theType) { 4903 this.type = theType; 4904 return this; 4905 } 4906 4907 public boolean hasType() { 4908 if (this.type == null) 4909 return false; 4910 for (TypeRefComponent item : this.type) 4911 if (!item.isEmpty()) 4912 return true; 4913 return false; 4914 } 4915 4916 public TypeRefComponent addType() { //3 4917 TypeRefComponent t = new TypeRefComponent(); 4918 if (this.type == null) 4919 this.type = new ArrayList<TypeRefComponent>(); 4920 this.type.add(t); 4921 return t; 4922 } 4923 4924 public ElementDefinition addType(TypeRefComponent t) { //3 4925 if (t == null) 4926 return this; 4927 if (this.type == null) 4928 this.type = new ArrayList<TypeRefComponent>(); 4929 this.type.add(t); 4930 return this; 4931 } 4932 4933 /** 4934 * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist 4935 */ 4936 public TypeRefComponent getTypeFirstRep() { 4937 if (getType().isEmpty()) { 4938 addType(); 4939 } 4940 return getType().get(0); 4941 } 4942 4943 /** 4944 * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').) 4945 */ 4946 public org.hl7.fhir.dstu3.model.Type getDefaultValue() { 4947 return this.defaultValue; 4948 } 4949 4950 public boolean hasDefaultValue() { 4951 return this.defaultValue != null && !this.defaultValue.isEmpty(); 4952 } 4953 4954 /** 4955 * @param value {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').) 4956 */ 4957 public ElementDefinition setDefaultValue(org.hl7.fhir.dstu3.model.Type value) { 4958 this.defaultValue = value; 4959 return this; 4960 } 4961 4962 /** 4963 * @return {@link #meaningWhenMissing} (The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.). This is the underlying object with id, value and extensions. The accessor "getMeaningWhenMissing" gives direct access to the value 4964 */ 4965 public MarkdownType getMeaningWhenMissingElement() { 4966 if (this.meaningWhenMissing == null) 4967 if (Configuration.errorOnAutoCreate()) 4968 throw new Error("Attempt to auto-create ElementDefinition.meaningWhenMissing"); 4969 else if (Configuration.doAutoCreate()) 4970 this.meaningWhenMissing = new MarkdownType(); // bb 4971 return this.meaningWhenMissing; 4972 } 4973 4974 public boolean hasMeaningWhenMissingElement() { 4975 return this.meaningWhenMissing != null && !this.meaningWhenMissing.isEmpty(); 4976 } 4977 4978 public boolean hasMeaningWhenMissing() { 4979 return this.meaningWhenMissing != null && !this.meaningWhenMissing.isEmpty(); 4980 } 4981 4982 /** 4983 * @param value {@link #meaningWhenMissing} (The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.). This is the underlying object with id, value and extensions. The accessor "getMeaningWhenMissing" gives direct access to the value 4984 */ 4985 public ElementDefinition setMeaningWhenMissingElement(MarkdownType value) { 4986 this.meaningWhenMissing = value; 4987 return this; 4988 } 4989 4990 /** 4991 * @return The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'. 4992 */ 4993 public String getMeaningWhenMissing() { 4994 return this.meaningWhenMissing == null ? null : this.meaningWhenMissing.getValue(); 4995 } 4996 4997 /** 4998 * @param value The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'. 4999 */ 5000 public ElementDefinition setMeaningWhenMissing(String value) { 5001 if (value == null) 5002 this.meaningWhenMissing = null; 5003 else { 5004 if (this.meaningWhenMissing == null) 5005 this.meaningWhenMissing = new MarkdownType(); 5006 this.meaningWhenMissing.setValue(value); 5007 } 5008 return this; 5009 } 5010 5011 /** 5012 * @return {@link #orderMeaning} (If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning.). This is the underlying object with id, value and extensions. The accessor "getOrderMeaning" gives direct access to the value 5013 */ 5014 public StringType getOrderMeaningElement() { 5015 if (this.orderMeaning == null) 5016 if (Configuration.errorOnAutoCreate()) 5017 throw new Error("Attempt to auto-create ElementDefinition.orderMeaning"); 5018 else if (Configuration.doAutoCreate()) 5019 this.orderMeaning = new StringType(); // bb 5020 return this.orderMeaning; 5021 } 5022 5023 public boolean hasOrderMeaningElement() { 5024 return this.orderMeaning != null && !this.orderMeaning.isEmpty(); 5025 } 5026 5027 public boolean hasOrderMeaning() { 5028 return this.orderMeaning != null && !this.orderMeaning.isEmpty(); 5029 } 5030 5031 /** 5032 * @param value {@link #orderMeaning} (If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning.). This is the underlying object with id, value and extensions. The accessor "getOrderMeaning" gives direct access to the value 5033 */ 5034 public ElementDefinition setOrderMeaningElement(StringType value) { 5035 this.orderMeaning = value; 5036 return this; 5037 } 5038 5039 /** 5040 * @return If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning. 5041 */ 5042 public String getOrderMeaning() { 5043 return this.orderMeaning == null ? null : this.orderMeaning.getValue(); 5044 } 5045 5046 /** 5047 * @param value If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning. 5048 */ 5049 public ElementDefinition setOrderMeaning(String value) { 5050 if (Utilities.noString(value)) 5051 this.orderMeaning = null; 5052 else { 5053 if (this.orderMeaning == null) 5054 this.orderMeaning = new StringType(); 5055 this.orderMeaning.setValue(value); 5056 } 5057 return this; 5058 } 5059 5060 /** 5061 * @return {@link #fixed} (Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.) 5062 */ 5063 public org.hl7.fhir.dstu3.model.Type getFixed() { 5064 return this.fixed; 5065 } 5066 5067 public boolean hasFixed() { 5068 return this.fixed != null && !this.fixed.isEmpty(); 5069 } 5070 5071 /** 5072 * @param value {@link #fixed} (Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.) 5073 */ 5074 public ElementDefinition setFixed(org.hl7.fhir.dstu3.model.Type value) { 5075 this.fixed = value; 5076 return this; 5077 } 5078 5079 /** 5080 * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).) 5081 */ 5082 public org.hl7.fhir.dstu3.model.Type getPattern() { 5083 return this.pattern; 5084 } 5085 5086 public boolean hasPattern() { 5087 return this.pattern != null && !this.pattern.isEmpty(); 5088 } 5089 5090 /** 5091 * @param value {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).) 5092 */ 5093 public ElementDefinition setPattern(org.hl7.fhir.dstu3.model.Type value) { 5094 this.pattern = value; 5095 return this; 5096 } 5097 5098 /** 5099 * @return {@link #example} (A sample value for this element demonstrating the type of information that would typically be found in the element.) 5100 */ 5101 public List<ElementDefinitionExampleComponent> getExample() { 5102 if (this.example == null) 5103 this.example = new ArrayList<ElementDefinitionExampleComponent>(); 5104 return this.example; 5105 } 5106 5107 /** 5108 * @return Returns a reference to <code>this</code> for easy method chaining 5109 */ 5110 public ElementDefinition setExample(List<ElementDefinitionExampleComponent> theExample) { 5111 this.example = theExample; 5112 return this; 5113 } 5114 5115 public boolean hasExample() { 5116 if (this.example == null) 5117 return false; 5118 for (ElementDefinitionExampleComponent item : this.example) 5119 if (!item.isEmpty()) 5120 return true; 5121 return false; 5122 } 5123 5124 public ElementDefinitionExampleComponent addExample() { //3 5125 ElementDefinitionExampleComponent t = new ElementDefinitionExampleComponent(); 5126 if (this.example == null) 5127 this.example = new ArrayList<ElementDefinitionExampleComponent>(); 5128 this.example.add(t); 5129 return t; 5130 } 5131 5132 public ElementDefinition addExample(ElementDefinitionExampleComponent t) { //3 5133 if (t == null) 5134 return this; 5135 if (this.example == null) 5136 this.example = new ArrayList<ElementDefinitionExampleComponent>(); 5137 this.example.add(t); 5138 return this; 5139 } 5140 5141 /** 5142 * @return The first repetition of repeating field {@link #example}, creating it if it does not already exist 5143 */ 5144 public ElementDefinitionExampleComponent getExampleFirstRep() { 5145 if (getExample().isEmpty()) { 5146 addExample(); 5147 } 5148 return getExample().get(0); 5149 } 5150 5151 /** 5152 * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5153 */ 5154 public Type getMinValue() { 5155 return this.minValue; 5156 } 5157 5158 /** 5159 * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5160 */ 5161 public DateType getMinValueDateType() throws FHIRException { 5162 if (this.minValue == null) 5163 return null; 5164 if (!(this.minValue instanceof DateType)) 5165 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.minValue.getClass().getName()+" was encountered"); 5166 return (DateType) this.minValue; 5167 } 5168 5169 public boolean hasMinValueDateType() { 5170 return this != null && this.minValue instanceof DateType; 5171 } 5172 5173 /** 5174 * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5175 */ 5176 public DateTimeType getMinValueDateTimeType() throws FHIRException { 5177 if (this.minValue == null) 5178 return null; 5179 if (!(this.minValue instanceof DateTimeType)) 5180 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.minValue.getClass().getName()+" was encountered"); 5181 return (DateTimeType) this.minValue; 5182 } 5183 5184 public boolean hasMinValueDateTimeType() { 5185 return this != null && this.minValue instanceof DateTimeType; 5186 } 5187 5188 /** 5189 * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5190 */ 5191 public InstantType getMinValueInstantType() throws FHIRException { 5192 if (this.minValue == null) 5193 return null; 5194 if (!(this.minValue instanceof InstantType)) 5195 throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.minValue.getClass().getName()+" was encountered"); 5196 return (InstantType) this.minValue; 5197 } 5198 5199 public boolean hasMinValueInstantType() { 5200 return this != null && this.minValue instanceof InstantType; 5201 } 5202 5203 /** 5204 * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5205 */ 5206 public TimeType getMinValueTimeType() throws FHIRException { 5207 if (this.minValue == null) 5208 return null; 5209 if (!(this.minValue instanceof TimeType)) 5210 throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.minValue.getClass().getName()+" was encountered"); 5211 return (TimeType) this.minValue; 5212 } 5213 5214 public boolean hasMinValueTimeType() { 5215 return this != null && this.minValue instanceof TimeType; 5216 } 5217 5218 /** 5219 * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5220 */ 5221 public DecimalType getMinValueDecimalType() throws FHIRException { 5222 if (this.minValue == null) 5223 return null; 5224 if (!(this.minValue instanceof DecimalType)) 5225 throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.minValue.getClass().getName()+" was encountered"); 5226 return (DecimalType) this.minValue; 5227 } 5228 5229 public boolean hasMinValueDecimalType() { 5230 return this != null && this.minValue instanceof DecimalType; 5231 } 5232 5233 /** 5234 * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5235 */ 5236 public IntegerType getMinValueIntegerType() throws FHIRException { 5237 if (this.minValue == null) 5238 return null; 5239 if (!(this.minValue instanceof IntegerType)) 5240 throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.minValue.getClass().getName()+" was encountered"); 5241 return (IntegerType) this.minValue; 5242 } 5243 5244 public boolean hasMinValueIntegerType() { 5245 return this != null && this.minValue instanceof IntegerType; 5246 } 5247 5248 /** 5249 * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5250 */ 5251 public PositiveIntType getMinValuePositiveIntType() throws FHIRException { 5252 if (this.minValue == null) 5253 return null; 5254 if (!(this.minValue instanceof PositiveIntType)) 5255 throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.minValue.getClass().getName()+" was encountered"); 5256 return (PositiveIntType) this.minValue; 5257 } 5258 5259 public boolean hasMinValuePositiveIntType() { 5260 return this != null && this.minValue instanceof PositiveIntType; 5261 } 5262 5263 /** 5264 * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5265 */ 5266 public UnsignedIntType getMinValueUnsignedIntType() throws FHIRException { 5267 if (this.minValue == null) 5268 return null; 5269 if (!(this.minValue instanceof UnsignedIntType)) 5270 throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.minValue.getClass().getName()+" was encountered"); 5271 return (UnsignedIntType) this.minValue; 5272 } 5273 5274 public boolean hasMinValueUnsignedIntType() { 5275 return this != null && this.minValue instanceof UnsignedIntType; 5276 } 5277 5278 /** 5279 * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5280 */ 5281 public Quantity getMinValueQuantity() throws FHIRException { 5282 if (this.minValue == null) 5283 return null; 5284 if (!(this.minValue instanceof Quantity)) 5285 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.minValue.getClass().getName()+" was encountered"); 5286 return (Quantity) this.minValue; 5287 } 5288 5289 public boolean hasMinValueQuantity() { 5290 return this != null && this.minValue instanceof Quantity; 5291 } 5292 5293 public boolean hasMinValue() { 5294 return this.minValue != null && !this.minValue.isEmpty(); 5295 } 5296 5297 /** 5298 * @param value {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5299 */ 5300 public ElementDefinition setMinValue(Type value) throws FHIRFormatError { 5301 if (value != null && !(value instanceof DateType || value instanceof DateTimeType || value instanceof InstantType || value instanceof TimeType || value instanceof DecimalType || value instanceof IntegerType || value instanceof PositiveIntType || value instanceof UnsignedIntType || value instanceof Quantity)) 5302 throw new FHIRFormatError("Not the right type for ElementDefinition.minValue[x]: "+value.fhirType()); 5303 this.minValue = value; 5304 return this; 5305 } 5306 5307 /** 5308 * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5309 */ 5310 public Type getMaxValue() { 5311 return this.maxValue; 5312 } 5313 5314 /** 5315 * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5316 */ 5317 public DateType getMaxValueDateType() throws FHIRException { 5318 if (this.maxValue == null) 5319 return null; 5320 if (!(this.maxValue instanceof DateType)) 5321 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.maxValue.getClass().getName()+" was encountered"); 5322 return (DateType) this.maxValue; 5323 } 5324 5325 public boolean hasMaxValueDateType() { 5326 return this != null && this.maxValue instanceof DateType; 5327 } 5328 5329 /** 5330 * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5331 */ 5332 public DateTimeType getMaxValueDateTimeType() throws FHIRException { 5333 if (this.maxValue == null) 5334 return null; 5335 if (!(this.maxValue instanceof DateTimeType)) 5336 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.maxValue.getClass().getName()+" was encountered"); 5337 return (DateTimeType) this.maxValue; 5338 } 5339 5340 public boolean hasMaxValueDateTimeType() { 5341 return this != null && this.maxValue instanceof DateTimeType; 5342 } 5343 5344 /** 5345 * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5346 */ 5347 public InstantType getMaxValueInstantType() throws FHIRException { 5348 if (this.maxValue == null) 5349 return null; 5350 if (!(this.maxValue instanceof InstantType)) 5351 throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.maxValue.getClass().getName()+" was encountered"); 5352 return (InstantType) this.maxValue; 5353 } 5354 5355 public boolean hasMaxValueInstantType() { 5356 return this != null && this.maxValue instanceof InstantType; 5357 } 5358 5359 /** 5360 * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5361 */ 5362 public TimeType getMaxValueTimeType() throws FHIRException { 5363 if (this.maxValue == null) 5364 return null; 5365 if (!(this.maxValue instanceof TimeType)) 5366 throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.maxValue.getClass().getName()+" was encountered"); 5367 return (TimeType) this.maxValue; 5368 } 5369 5370 public boolean hasMaxValueTimeType() { 5371 return this != null && this.maxValue instanceof TimeType; 5372 } 5373 5374 /** 5375 * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5376 */ 5377 public DecimalType getMaxValueDecimalType() throws FHIRException { 5378 if (this.maxValue == null) 5379 return null; 5380 if (!(this.maxValue instanceof DecimalType)) 5381 throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.maxValue.getClass().getName()+" was encountered"); 5382 return (DecimalType) this.maxValue; 5383 } 5384 5385 public boolean hasMaxValueDecimalType() { 5386 return this != null && this.maxValue instanceof DecimalType; 5387 } 5388 5389 /** 5390 * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5391 */ 5392 public IntegerType getMaxValueIntegerType() throws FHIRException { 5393 if (this.maxValue == null) 5394 return null; 5395 if (!(this.maxValue instanceof IntegerType)) 5396 throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.maxValue.getClass().getName()+" was encountered"); 5397 return (IntegerType) this.maxValue; 5398 } 5399 5400 public boolean hasMaxValueIntegerType() { 5401 return this != null && this.maxValue instanceof IntegerType; 5402 } 5403 5404 /** 5405 * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5406 */ 5407 public PositiveIntType getMaxValuePositiveIntType() throws FHIRException { 5408 if (this.maxValue == null) 5409 return null; 5410 if (!(this.maxValue instanceof PositiveIntType)) 5411 throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.maxValue.getClass().getName()+" was encountered"); 5412 return (PositiveIntType) this.maxValue; 5413 } 5414 5415 public boolean hasMaxValuePositiveIntType() { 5416 return this != null && this.maxValue instanceof PositiveIntType; 5417 } 5418 5419 /** 5420 * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5421 */ 5422 public UnsignedIntType getMaxValueUnsignedIntType() throws FHIRException { 5423 if (this.maxValue == null) 5424 return null; 5425 if (!(this.maxValue instanceof UnsignedIntType)) 5426 throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.maxValue.getClass().getName()+" was encountered"); 5427 return (UnsignedIntType) this.maxValue; 5428 } 5429 5430 public boolean hasMaxValueUnsignedIntType() { 5431 return this != null && this.maxValue instanceof UnsignedIntType; 5432 } 5433 5434 /** 5435 * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5436 */ 5437 public Quantity getMaxValueQuantity() throws FHIRException { 5438 if (this.maxValue == null) 5439 return null; 5440 if (!(this.maxValue instanceof Quantity)) 5441 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.maxValue.getClass().getName()+" was encountered"); 5442 return (Quantity) this.maxValue; 5443 } 5444 5445 public boolean hasMaxValueQuantity() { 5446 return this != null && this.maxValue instanceof Quantity; 5447 } 5448 5449 public boolean hasMaxValue() { 5450 return this.maxValue != null && !this.maxValue.isEmpty(); 5451 } 5452 5453 /** 5454 * @param value {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.) 5455 */ 5456 public ElementDefinition setMaxValue(Type value) throws FHIRFormatError { 5457 if (value != null && !(value instanceof DateType || value instanceof DateTimeType || value instanceof InstantType || value instanceof TimeType || value instanceof DecimalType || value instanceof IntegerType || value instanceof PositiveIntType || value instanceof UnsignedIntType || value instanceof Quantity)) 5458 throw new FHIRFormatError("Not the right type for ElementDefinition.maxValue[x]: "+value.fhirType()); 5459 this.maxValue = value; 5460 return this; 5461 } 5462 5463 /** 5464 * @return {@link #maxLength} (Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.). This is the underlying object with id, value and extensions. The accessor "getMaxLength" gives direct access to the value 5465 */ 5466 public IntegerType getMaxLengthElement() { 5467 if (this.maxLength == null) 5468 if (Configuration.errorOnAutoCreate()) 5469 throw new Error("Attempt to auto-create ElementDefinition.maxLength"); 5470 else if (Configuration.doAutoCreate()) 5471 this.maxLength = new IntegerType(); // bb 5472 return this.maxLength; 5473 } 5474 5475 public boolean hasMaxLengthElement() { 5476 return this.maxLength != null && !this.maxLength.isEmpty(); 5477 } 5478 5479 public boolean hasMaxLength() { 5480 return this.maxLength != null && !this.maxLength.isEmpty(); 5481 } 5482 5483 /** 5484 * @param value {@link #maxLength} (Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.). This is the underlying object with id, value and extensions. The accessor "getMaxLength" gives direct access to the value 5485 */ 5486 public ElementDefinition setMaxLengthElement(IntegerType value) { 5487 this.maxLength = value; 5488 return this; 5489 } 5490 5491 /** 5492 * @return Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element. 5493 */ 5494 public int getMaxLength() { 5495 return this.maxLength == null || this.maxLength.isEmpty() ? 0 : this.maxLength.getValue(); 5496 } 5497 5498 /** 5499 * @param value Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element. 5500 */ 5501 public ElementDefinition setMaxLength(int value) { 5502 if (this.maxLength == null) 5503 this.maxLength = new IntegerType(); 5504 this.maxLength.setValue(value); 5505 return this; 5506 } 5507 5508 /** 5509 * @return {@link #condition} (A reference to an invariant that may make additional statements about the cardinality or value in the instance.) 5510 */ 5511 public List<IdType> getCondition() { 5512 if (this.condition == null) 5513 this.condition = new ArrayList<IdType>(); 5514 return this.condition; 5515 } 5516 5517 /** 5518 * @return Returns a reference to <code>this</code> for easy method chaining 5519 */ 5520 public ElementDefinition setCondition(List<IdType> theCondition) { 5521 this.condition = theCondition; 5522 return this; 5523 } 5524 5525 public boolean hasCondition() { 5526 if (this.condition == null) 5527 return false; 5528 for (IdType item : this.condition) 5529 if (!item.isEmpty()) 5530 return true; 5531 return false; 5532 } 5533 5534 /** 5535 * @return {@link #condition} (A reference to an invariant that may make additional statements about the cardinality or value in the instance.) 5536 */ 5537 public IdType addConditionElement() {//2 5538 IdType t = new IdType(); 5539 if (this.condition == null) 5540 this.condition = new ArrayList<IdType>(); 5541 this.condition.add(t); 5542 return t; 5543 } 5544 5545 /** 5546 * @param value {@link #condition} (A reference to an invariant that may make additional statements about the cardinality or value in the instance.) 5547 */ 5548 public ElementDefinition addCondition(String value) { //1 5549 IdType t = new IdType(); 5550 t.setValue(value); 5551 if (this.condition == null) 5552 this.condition = new ArrayList<IdType>(); 5553 this.condition.add(t); 5554 return this; 5555 } 5556 5557 /** 5558 * @param value {@link #condition} (A reference to an invariant that may make additional statements about the cardinality or value in the instance.) 5559 */ 5560 public boolean hasCondition(String value) { 5561 if (this.condition == null) 5562 return false; 5563 for (IdType v : this.condition) 5564 if (v.getValue().equals(value)) // id 5565 return true; 5566 return false; 5567 } 5568 5569 /** 5570 * @return {@link #constraint} (Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.) 5571 */ 5572 public List<ElementDefinitionConstraintComponent> getConstraint() { 5573 if (this.constraint == null) 5574 this.constraint = new ArrayList<ElementDefinitionConstraintComponent>(); 5575 return this.constraint; 5576 } 5577 5578 /** 5579 * @return Returns a reference to <code>this</code> for easy method chaining 5580 */ 5581 public ElementDefinition setConstraint(List<ElementDefinitionConstraintComponent> theConstraint) { 5582 this.constraint = theConstraint; 5583 return this; 5584 } 5585 5586 public boolean hasConstraint() { 5587 if (this.constraint == null) 5588 return false; 5589 for (ElementDefinitionConstraintComponent item : this.constraint) 5590 if (!item.isEmpty()) 5591 return true; 5592 return false; 5593 } 5594 5595 public ElementDefinitionConstraintComponent addConstraint() { //3 5596 ElementDefinitionConstraintComponent t = new ElementDefinitionConstraintComponent(); 5597 if (this.constraint == null) 5598 this.constraint = new ArrayList<ElementDefinitionConstraintComponent>(); 5599 this.constraint.add(t); 5600 return t; 5601 } 5602 5603 public ElementDefinition addConstraint(ElementDefinitionConstraintComponent t) { //3 5604 if (t == null) 5605 return this; 5606 if (this.constraint == null) 5607 this.constraint = new ArrayList<ElementDefinitionConstraintComponent>(); 5608 this.constraint.add(t); 5609 return this; 5610 } 5611 5612 /** 5613 * @return The first repetition of repeating field {@link #constraint}, creating it if it does not already exist 5614 */ 5615 public ElementDefinitionConstraintComponent getConstraintFirstRep() { 5616 if (getConstraint().isEmpty()) { 5617 addConstraint(); 5618 } 5619 return getConstraint().get(0); 5620 } 5621 5622 /** 5623 * @return {@link #mustSupport} (If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. If false, the element may be ignored and not supported.). This is the underlying object with id, value and extensions. The accessor "getMustSupport" gives direct access to the value 5624 */ 5625 public BooleanType getMustSupportElement() { 5626 if (this.mustSupport == null) 5627 if (Configuration.errorOnAutoCreate()) 5628 throw new Error("Attempt to auto-create ElementDefinition.mustSupport"); 5629 else if (Configuration.doAutoCreate()) 5630 this.mustSupport = new BooleanType(); // bb 5631 return this.mustSupport; 5632 } 5633 5634 public boolean hasMustSupportElement() { 5635 return this.mustSupport != null && !this.mustSupport.isEmpty(); 5636 } 5637 5638 public boolean hasMustSupport() { 5639 return this.mustSupport != null && !this.mustSupport.isEmpty(); 5640 } 5641 5642 /** 5643 * @param value {@link #mustSupport} (If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. If false, the element may be ignored and not supported.). This is the underlying object with id, value and extensions. The accessor "getMustSupport" gives direct access to the value 5644 */ 5645 public ElementDefinition setMustSupportElement(BooleanType value) { 5646 this.mustSupport = value; 5647 return this; 5648 } 5649 5650 /** 5651 * @return If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. If false, the element may be ignored and not supported. 5652 */ 5653 public boolean getMustSupport() { 5654 return this.mustSupport == null || this.mustSupport.isEmpty() ? false : this.mustSupport.getValue(); 5655 } 5656 5657 /** 5658 * @param value If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. If false, the element may be ignored and not supported. 5659 */ 5660 public ElementDefinition setMustSupport(boolean value) { 5661 if (this.mustSupport == null) 5662 this.mustSupport = new BooleanType(); 5663 this.mustSupport.setValue(value); 5664 return this; 5665 } 5666 5667 /** 5668 * @return {@link #isModifier} (If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.). This is the underlying object with id, value and extensions. The accessor "getIsModifier" gives direct access to the value 5669 */ 5670 public BooleanType getIsModifierElement() { 5671 if (this.isModifier == null) 5672 if (Configuration.errorOnAutoCreate()) 5673 throw new Error("Attempt to auto-create ElementDefinition.isModifier"); 5674 else if (Configuration.doAutoCreate()) 5675 this.isModifier = new BooleanType(); // bb 5676 return this.isModifier; 5677 } 5678 5679 public boolean hasIsModifierElement() { 5680 return this.isModifier != null && !this.isModifier.isEmpty(); 5681 } 5682 5683 public boolean hasIsModifier() { 5684 return this.isModifier != null && !this.isModifier.isEmpty(); 5685 } 5686 5687 /** 5688 * @param value {@link #isModifier} (If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.). This is the underlying object with id, value and extensions. The accessor "getIsModifier" gives direct access to the value 5689 */ 5690 public ElementDefinition setIsModifierElement(BooleanType value) { 5691 this.isModifier = value; 5692 return this; 5693 } 5694 5695 /** 5696 * @return If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system. 5697 */ 5698 public boolean getIsModifier() { 5699 return this.isModifier == null || this.isModifier.isEmpty() ? false : this.isModifier.getValue(); 5700 } 5701 5702 /** 5703 * @param value If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system. 5704 */ 5705 public ElementDefinition setIsModifier(boolean value) { 5706 if (this.isModifier == null) 5707 this.isModifier = new BooleanType(); 5708 this.isModifier.setValue(value); 5709 return this; 5710 } 5711 5712 /** 5713 * @return {@link #isSummary} (Whether the element should be included if a client requests a search with the parameter _summary=true.). This is the underlying object with id, value and extensions. The accessor "getIsSummary" gives direct access to the value 5714 */ 5715 public BooleanType getIsSummaryElement() { 5716 if (this.isSummary == null) 5717 if (Configuration.errorOnAutoCreate()) 5718 throw new Error("Attempt to auto-create ElementDefinition.isSummary"); 5719 else if (Configuration.doAutoCreate()) 5720 this.isSummary = new BooleanType(); // bb 5721 return this.isSummary; 5722 } 5723 5724 public boolean hasIsSummaryElement() { 5725 return this.isSummary != null && !this.isSummary.isEmpty(); 5726 } 5727 5728 public boolean hasIsSummary() { 5729 return this.isSummary != null && !this.isSummary.isEmpty(); 5730 } 5731 5732 /** 5733 * @param value {@link #isSummary} (Whether the element should be included if a client requests a search with the parameter _summary=true.). This is the underlying object with id, value and extensions. The accessor "getIsSummary" gives direct access to the value 5734 */ 5735 public ElementDefinition setIsSummaryElement(BooleanType value) { 5736 this.isSummary = value; 5737 return this; 5738 } 5739 5740 /** 5741 * @return Whether the element should be included if a client requests a search with the parameter _summary=true. 5742 */ 5743 public boolean getIsSummary() { 5744 return this.isSummary == null || this.isSummary.isEmpty() ? false : this.isSummary.getValue(); 5745 } 5746 5747 /** 5748 * @param value Whether the element should be included if a client requests a search with the parameter _summary=true. 5749 */ 5750 public ElementDefinition setIsSummary(boolean value) { 5751 if (this.isSummary == null) 5752 this.isSummary = new BooleanType(); 5753 this.isSummary.setValue(value); 5754 return this; 5755 } 5756 5757 /** 5758 * @return {@link #binding} (Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).) 5759 */ 5760 public ElementDefinitionBindingComponent getBinding() { 5761 if (this.binding == null) 5762 if (Configuration.errorOnAutoCreate()) 5763 throw new Error("Attempt to auto-create ElementDefinition.binding"); 5764 else if (Configuration.doAutoCreate()) 5765 this.binding = new ElementDefinitionBindingComponent(); // cc 5766 return this.binding; 5767 } 5768 5769 public boolean hasBinding() { 5770 return this.binding != null && !this.binding.isEmpty(); 5771 } 5772 5773 /** 5774 * @param value {@link #binding} (Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).) 5775 */ 5776 public ElementDefinition setBinding(ElementDefinitionBindingComponent value) { 5777 this.binding = value; 5778 return this; 5779 } 5780 5781 /** 5782 * @return {@link #mapping} (Identifies a concept from an external specification that roughly corresponds to this element.) 5783 */ 5784 public List<ElementDefinitionMappingComponent> getMapping() { 5785 if (this.mapping == null) 5786 this.mapping = new ArrayList<ElementDefinitionMappingComponent>(); 5787 return this.mapping; 5788 } 5789 5790 /** 5791 * @return Returns a reference to <code>this</code> for easy method chaining 5792 */ 5793 public ElementDefinition setMapping(List<ElementDefinitionMappingComponent> theMapping) { 5794 this.mapping = theMapping; 5795 return this; 5796 } 5797 5798 public boolean hasMapping() { 5799 if (this.mapping == null) 5800 return false; 5801 for (ElementDefinitionMappingComponent item : this.mapping) 5802 if (!item.isEmpty()) 5803 return true; 5804 return false; 5805 } 5806 5807 public ElementDefinitionMappingComponent addMapping() { //3 5808 ElementDefinitionMappingComponent t = new ElementDefinitionMappingComponent(); 5809 if (this.mapping == null) 5810 this.mapping = new ArrayList<ElementDefinitionMappingComponent>(); 5811 this.mapping.add(t); 5812 return t; 5813 } 5814 5815 public ElementDefinition addMapping(ElementDefinitionMappingComponent t) { //3 5816 if (t == null) 5817 return this; 5818 if (this.mapping == null) 5819 this.mapping = new ArrayList<ElementDefinitionMappingComponent>(); 5820 this.mapping.add(t); 5821 return this; 5822 } 5823 5824 /** 5825 * @return The first repetition of repeating field {@link #mapping}, creating it if it does not already exist 5826 */ 5827 public ElementDefinitionMappingComponent getMappingFirstRep() { 5828 if (getMapping().isEmpty()) { 5829 addMapping(); 5830 } 5831 return getMapping().get(0); 5832 } 5833 5834 protected void listChildren(List<Property> children) { 5835 super.listChildren(children); 5836 children.add(new Property("path", "string", "The path identifies the element and is expressed as a \".\"-separated list of ancestor elements, beginning with the name of the resource or extension.", 0, 1, path)); 5837 children.add(new Property("representation", "code", "Codes that define how this element is represented in instances, when the deviation varies from the normal case.", 0, java.lang.Integer.MAX_VALUE, representation)); 5838 children.add(new Property("sliceName", "string", "The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.", 0, 1, sliceName)); 5839 children.add(new Property("label", "string", "A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.", 0, 1, label)); 5840 children.add(new Property("code", "Coding", "A code that has the same meaning as the element in a particular terminology.", 0, java.lang.Integer.MAX_VALUE, code)); 5841 children.add(new Property("slicing", "", "Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).", 0, 1, slicing)); 5842 children.add(new Property("short", "string", "A concise description of what this element means (e.g. for use in autogenerated summaries).", 0, 1, short_)); 5843 children.add(new Property("definition", "markdown", "Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.", 0, 1, definition)); 5844 children.add(new Property("comment", "markdown", "Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.", 0, 1, comment)); 5845 children.add(new Property("requirements", "markdown", "This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.", 0, 1, requirements)); 5846 children.add(new Property("alias", "string", "Identifies additional names by which this element might also be known.", 0, java.lang.Integer.MAX_VALUE, alias)); 5847 children.add(new Property("min", "unsignedInt", "The minimum number of times this element SHALL appear in the instance.", 0, 1, min)); 5848 children.add(new Property("max", "string", "The maximum number of times this element is permitted to appear in the instance.", 0, 1, max)); 5849 children.add(new Property("base", "", "Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. This information is provided when the element definition is not the original definition of an element - i.g. either in a constraint on another type, or for elements from a super type in a snap shot.", 0, 1, base)); 5850 children.add(new Property("contentReference", "uri", "Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element.", 0, 1, contentReference)); 5851 children.add(new Property("type", "", "The data type or resource that the value of this element is permitted to be.", 0, java.lang.Integer.MAX_VALUE, type)); 5852 children.add(new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue)); 5853 children.add(new Property("meaningWhenMissing", "markdown", "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.", 0, 1, meaningWhenMissing)); 5854 children.add(new Property("orderMeaning", "string", "If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning.", 0, 1, orderMeaning)); 5855 children.add(new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed)); 5856 children.add(new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern)); 5857 children.add(new Property("example", "", "A sample value for this element demonstrating the type of information that would typically be found in the element.", 0, java.lang.Integer.MAX_VALUE, example)); 5858 children.add(new Property("minValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue)); 5859 children.add(new Property("maxValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue)); 5860 children.add(new Property("maxLength", "integer", "Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.", 0, 1, maxLength)); 5861 children.add(new Property("condition", "id", "A reference to an invariant that may make additional statements about the cardinality or value in the instance.", 0, java.lang.Integer.MAX_VALUE, condition)); 5862 children.add(new Property("constraint", "", "Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.", 0, java.lang.Integer.MAX_VALUE, constraint)); 5863 children.add(new Property("mustSupport", "boolean", "If true, implementations that produce or consume resources SHALL provide \"support\" for the element in some meaningful way. If false, the element may be ignored and not supported.", 0, 1, mustSupport)); 5864 children.add(new Property("isModifier", "boolean", "If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.", 0, 1, isModifier)); 5865 children.add(new Property("isSummary", "boolean", "Whether the element should be included if a client requests a search with the parameter _summary=true.", 0, 1, isSummary)); 5866 children.add(new Property("binding", "", "Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).", 0, 1, binding)); 5867 children.add(new Property("mapping", "", "Identifies a concept from an external specification that roughly corresponds to this element.", 0, java.lang.Integer.MAX_VALUE, mapping)); 5868 } 5869 5870 @Override 5871 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 5872 switch (_hash) { 5873 case 3433509: /*path*/ return new Property("path", "string", "The path identifies the element and is expressed as a \".\"-separated list of ancestor elements, beginning with the name of the resource or extension.", 0, 1, path); 5874 case -671065907: /*representation*/ return new Property("representation", "code", "Codes that define how this element is represented in instances, when the deviation varies from the normal case.", 0, java.lang.Integer.MAX_VALUE, representation); 5875 case -825289923: /*sliceName*/ return new Property("sliceName", "string", "The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.", 0, 1, sliceName); 5876 case 102727412: /*label*/ return new Property("label", "string", "A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.", 0, 1, label); 5877 case 3059181: /*code*/ return new Property("code", "Coding", "A code that has the same meaning as the element in a particular terminology.", 0, java.lang.Integer.MAX_VALUE, code); 5878 case -2119287345: /*slicing*/ return new Property("slicing", "", "Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).", 0, 1, slicing); 5879 case 109413500: /*short*/ return new Property("short", "string", "A concise description of what this element means (e.g. for use in autogenerated summaries).", 0, 1, short_); 5880 case -1014418093: /*definition*/ return new Property("definition", "markdown", "Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.", 0, 1, definition); 5881 case 950398559: /*comment*/ return new Property("comment", "markdown", "Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.", 0, 1, comment); 5882 case -1619874672: /*requirements*/ return new Property("requirements", "markdown", "This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.", 0, 1, requirements); 5883 case 92902992: /*alias*/ return new Property("alias", "string", "Identifies additional names by which this element might also be known.", 0, java.lang.Integer.MAX_VALUE, alias); 5884 case 108114: /*min*/ return new Property("min", "unsignedInt", "The minimum number of times this element SHALL appear in the instance.", 0, 1, min); 5885 case 107876: /*max*/ return new Property("max", "string", "The maximum number of times this element is permitted to appear in the instance.", 0, 1, max); 5886 case 3016401: /*base*/ return new Property("base", "", "Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. This information is provided when the element definition is not the original definition of an element - i.g. either in a constraint on another type, or for elements from a super type in a snap shot.", 0, 1, base); 5887 case 1193747154: /*contentReference*/ return new Property("contentReference", "uri", "Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element.", 0, 1, contentReference); 5888 case 3575610: /*type*/ return new Property("type", "", "The data type or resource that the value of this element is permitted to be.", 0, java.lang.Integer.MAX_VALUE, type); 5889 case 587922128: /*defaultValue[x]*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5890 case -659125328: /*defaultValue*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5891 case 1470297600: /*defaultValueBase64Binary*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5892 case 600437336: /*defaultValueBoolean*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5893 case 264593188: /*defaultValueCanonical*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5894 case 1044993469: /*defaultValueCode*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5895 case 1045010302: /*defaultValueDate*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5896 case 1220374379: /*defaultValueDateTime*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5897 case 2077989249: /*defaultValueDecimal*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5898 case -2059245333: /*defaultValueId*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5899 case -1801671663: /*defaultValueInstant*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5900 case -1801189522: /*defaultValueInteger*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5901 case -325436225: /*defaultValueMarkdown*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5902 case 587910138: /*defaultValueOid*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5903 case -737344154: /*defaultValuePositiveInt*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5904 case -320515103: /*defaultValueString*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5905 case 1045494429: /*defaultValueTime*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5906 case 539117290: /*defaultValueUnsignedInt*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5907 case 587916188: /*defaultValueUri*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5908 case 587916191: /*defaultValueUrl*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5909 case 1045535627: /*defaultValueUuid*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5910 case -611966428: /*defaultValueAddress*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5911 case -1851689217: /*defaultValueAnnotation*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5912 case 2034820339: /*defaultValueAttachment*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5913 case -410434095: /*defaultValueCodeableConcept*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5914 case -783616198: /*defaultValueCoding*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5915 case -344740576: /*defaultValueContactPoint*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5916 case -975393912: /*defaultValueHumanName*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5917 case -1915078535: /*defaultValueIdentifier*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5918 case -420255343: /*defaultValuePeriod*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5919 case -1857379237: /*defaultValueQuantity*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5920 case -1951495315: /*defaultValueRange*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5921 case -1951489477: /*defaultValueRatio*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5922 case -1488914053: /*defaultValueReference*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5923 case -449641228: /*defaultValueSampledData*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5924 case 509825768: /*defaultValueSignature*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5925 case -302193638: /*defaultValueTiming*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5926 case -754548089: /*defaultValueDosage*/ return new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue); 5927 case 1857257103: /*meaningWhenMissing*/ return new Property("meaningWhenMissing", "markdown", "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.", 0, 1, meaningWhenMissing); 5928 case 1828196047: /*orderMeaning*/ return new Property("orderMeaning", "string", "If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning.", 0, 1, orderMeaning); 5929 case -391522164: /*fixed[x]*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5930 case 97445748: /*fixed*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5931 case -799290428: /*fixedBase64Binary*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5932 case 520851988: /*fixedBoolean*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5933 case 1092485088: /*fixedCanonical*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5934 case 746991489: /*fixedCode*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5935 case 747008322: /*fixedDate*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5936 case -1246771409: /*fixedDateTime*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5937 case 1998403901: /*fixedDecimal*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5938 case -843914321: /*fixedId*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5939 case -1881257011: /*fixedInstant*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5940 case -1880774870: /*fixedInteger*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5941 case 1502385283: /*fixedMarkdown*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5942 case -391534154: /*fixedOid*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5943 case 297821986: /*fixedPositiveInt*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5944 case 1062390949: /*fixedString*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5945 case 747492449: /*fixedTime*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5946 case 1574283430: /*fixedUnsignedInt*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5947 case -391528104: /*fixedUri*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5948 case -391528101: /*fixedUrl*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5949 case 747533647: /*fixedUuid*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5950 case -691551776: /*fixedAddress*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5951 case -1956844093: /*fixedAnnotation*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5952 case 1929665463: /*fixedAttachment*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5953 case 1962764685: /*fixedCodeableConcept*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5954 case 599289854: /*fixedCoding*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5955 case 1680638692: /*fixedContactPoint*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5956 case -147502012: /*fixedHumanName*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5957 case -2020233411: /*fixedIdentifier*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5958 case 962650709: /*fixedPeriod*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5959 case -29557729: /*fixedQuantity*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5960 case 1695345193: /*fixedRange*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5961 case 1695351031: /*fixedRatio*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5962 case -661022153: /*fixedReference*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5963 case 585524912: /*fixedSampledData*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5964 case 1337717668: /*fixedSignature*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5965 case 1080712414: /*fixedTiming*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5966 case 628357963: /*fixedDosage*/ return new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed); 5967 case -885125392: /*pattern[x]*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5968 case -791090288: /*pattern*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5969 case 2127857120: /*patternBase64Binary*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5970 case -1776945544: /*patternBoolean*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5971 case 522246980: /*patternCanonical*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5972 case -1669806691: /*patternCode*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5973 case -1669789858: /*patternDate*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5974 case 535949131: /*patternDateTime*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5975 case -299393631: /*patternDecimal*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5976 case -28553013: /*patternId*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5977 case 115912753: /*patternInstant*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5978 case 116394894: /*patternInteger*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5979 case -1009861473: /*patternMarkdown*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5980 case -885137382: /*patternOid*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5981 case 2054814086: /*patternPositiveInt*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5982 case 2096647105: /*patternString*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5983 case -1669305731: /*patternTime*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5984 case -963691766: /*patternUnsignedInt*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5985 case -885131332: /*patternUri*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5986 case -885131329: /*patternUrl*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5987 case -1669264533: /*patternUuid*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5988 case 1305617988: /*patternAddress*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5989 case 1840611039: /*patternAnnotation*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5990 case 1432153299: /*patternAttachment*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5991 case -400610831: /*patternCodeableConcept*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5992 case 1633546010: /*patternCoding*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5993 case 312818944: /*patternContactPoint*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5994 case -717740120: /*patternHumanName*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5995 case 1777221721: /*patternIdentifier*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5996 case 1996906865: /*patternPeriod*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5997 case 1753162811: /*patternQuantity*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5998 case -210954355: /*patternRange*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 5999 case -210948517: /*patternRatio*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 6000 case -1231260261: /*patternReference*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 6001 case -1952450284: /*patternSampledData*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 6002 case 767479560: /*patternSignature*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 6003 case 2114968570: /*patternTiming*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 6004 case 1662614119: /*patternDosage*/ return new Property("pattern[x]", "*", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).", 0, 1, pattern); 6005 case -1322970774: /*example*/ return new Property("example", "", "A sample value for this element demonstrating the type of information that would typically be found in the element.", 0, java.lang.Integer.MAX_VALUE, example); 6006 case -55301663: /*minValue[x]*/ return new Property("minValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue); 6007 case -1376969153: /*minValue*/ return new Property("minValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue); 6008 case -1715058035: /*minValueDate*/ return new Property("minValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue); 6009 case 1635517178: /*minValueDateTime*/ return new Property("minValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue); 6010 case 151382690: /*minValueInstant*/ return new Property("minValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue); 6011 case -1714573908: /*minValueTime*/ return new Property("minValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue); 6012 case -263923694: /*minValueDecimal*/ return new Property("minValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue); 6013 case 151864831: /*minValueInteger*/ return new Property("minValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue); 6014 case 1570935671: /*minValuePositiveInt*/ return new Property("minValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue); 6015 case -1447570181: /*minValueUnsignedInt*/ return new Property("minValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue); 6016 case -1442236438: /*minValueQuantity*/ return new Property("minValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue); 6017 case 622130931: /*maxValue[x]*/ return new Property("maxValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue); 6018 case 399227501: /*maxValue*/ return new Property("maxValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue); 6019 case 2105483195: /*maxValueDate*/ return new Property("maxValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue); 6020 case 1699385640: /*maxValueDateTime*/ return new Property("maxValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue); 6021 case 1261821620: /*maxValueInstant*/ return new Property("maxValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue); 6022 case 2105967322: /*maxValueTime*/ return new Property("maxValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue); 6023 case 846515236: /*maxValueDecimal*/ return new Property("maxValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue); 6024 case 1262303761: /*maxValueInteger*/ return new Property("maxValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue); 6025 case 1605774985: /*maxValuePositiveInt*/ return new Property("maxValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue); 6026 case -1412730867: /*maxValueUnsignedInt*/ return new Property("maxValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue); 6027 case -1378367976: /*maxValueQuantity*/ return new Property("maxValue[x]", "date|dateTime|instant|time|decimal|integer|positiveInt|unsignedInt|Quantity", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue); 6028 case -791400086: /*maxLength*/ return new Property("maxLength", "integer", "Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.", 0, 1, maxLength); 6029 case -861311717: /*condition*/ return new Property("condition", "id", "A reference to an invariant that may make additional statements about the cardinality or value in the instance.", 0, java.lang.Integer.MAX_VALUE, condition); 6030 case -190376483: /*constraint*/ return new Property("constraint", "", "Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.", 0, java.lang.Integer.MAX_VALUE, constraint); 6031 case -1402857082: /*mustSupport*/ return new Property("mustSupport", "boolean", "If true, implementations that produce or consume resources SHALL provide \"support\" for the element in some meaningful way. If false, the element may be ignored and not supported.", 0, 1, mustSupport); 6032 case -1408783839: /*isModifier*/ return new Property("isModifier", "boolean", "If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.", 0, 1, isModifier); 6033 case 1857548060: /*isSummary*/ return new Property("isSummary", "boolean", "Whether the element should be included if a client requests a search with the parameter _summary=true.", 0, 1, isSummary); 6034 case -108220795: /*binding*/ return new Property("binding", "", "Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).", 0, 1, binding); 6035 case 837556430: /*mapping*/ return new Property("mapping", "", "Identifies a concept from an external specification that roughly corresponds to this element.", 0, java.lang.Integer.MAX_VALUE, mapping); 6036 default: return super.getNamedProperty(_hash, _name, _checkValid); 6037 } 6038 6039 } 6040 6041 @Override 6042 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 6043 switch (hash) { 6044 case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType 6045 case -671065907: /*representation*/ return this.representation == null ? new Base[0] : this.representation.toArray(new Base[this.representation.size()]); // Enumeration<PropertyRepresentation> 6046 case -825289923: /*sliceName*/ return this.sliceName == null ? new Base[0] : new Base[] {this.sliceName}; // StringType 6047 case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType 6048 case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // Coding 6049 case -2119287345: /*slicing*/ return this.slicing == null ? new Base[0] : new Base[] {this.slicing}; // ElementDefinitionSlicingComponent 6050 case 109413500: /*short*/ return this.short_ == null ? new Base[0] : new Base[] {this.short_}; // StringType 6051 case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // MarkdownType 6052 case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // MarkdownType 6053 case -1619874672: /*requirements*/ return this.requirements == null ? new Base[0] : new Base[] {this.requirements}; // MarkdownType 6054 case 92902992: /*alias*/ return this.alias == null ? new Base[0] : this.alias.toArray(new Base[this.alias.size()]); // StringType 6055 case 108114: /*min*/ return this.min == null ? new Base[0] : new Base[] {this.min}; // UnsignedIntType 6056 case 107876: /*max*/ return this.max == null ? new Base[0] : new Base[] {this.max}; // StringType 6057 case 3016401: /*base*/ return this.base == null ? new Base[0] : new Base[] {this.base}; // ElementDefinitionBaseComponent 6058 case 1193747154: /*contentReference*/ return this.contentReference == null ? new Base[0] : new Base[] {this.contentReference}; // UriType 6059 case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // TypeRefComponent 6060 case -659125328: /*defaultValue*/ return this.defaultValue == null ? new Base[0] : new Base[] {this.defaultValue}; // org.hl7.fhir.dstu3.model.Type 6061 case 1857257103: /*meaningWhenMissing*/ return this.meaningWhenMissing == null ? new Base[0] : new Base[] {this.meaningWhenMissing}; // MarkdownType 6062 case 1828196047: /*orderMeaning*/ return this.orderMeaning == null ? new Base[0] : new Base[] {this.orderMeaning}; // StringType 6063 case 97445748: /*fixed*/ return this.fixed == null ? new Base[0] : new Base[] {this.fixed}; // org.hl7.fhir.dstu3.model.Type 6064 case -791090288: /*pattern*/ return this.pattern == null ? new Base[0] : new Base[] {this.pattern}; // org.hl7.fhir.dstu3.model.Type 6065 case -1322970774: /*example*/ return this.example == null ? new Base[0] : this.example.toArray(new Base[this.example.size()]); // ElementDefinitionExampleComponent 6066 case -1376969153: /*minValue*/ return this.minValue == null ? new Base[0] : new Base[] {this.minValue}; // Type 6067 case 399227501: /*maxValue*/ return this.maxValue == null ? new Base[0] : new Base[] {this.maxValue}; // Type 6068 case -791400086: /*maxLength*/ return this.maxLength == null ? new Base[0] : new Base[] {this.maxLength}; // IntegerType 6069 case -861311717: /*condition*/ return this.condition == null ? new Base[0] : this.condition.toArray(new Base[this.condition.size()]); // IdType 6070 case -190376483: /*constraint*/ return this.constraint == null ? new Base[0] : this.constraint.toArray(new Base[this.constraint.size()]); // ElementDefinitionConstraintComponent 6071 case -1402857082: /*mustSupport*/ return this.mustSupport == null ? new Base[0] : new Base[] {this.mustSupport}; // BooleanType 6072 case -1408783839: /*isModifier*/ return this.isModifier == null ? new Base[0] : new Base[] {this.isModifier}; // BooleanType 6073 case 1857548060: /*isSummary*/ return this.isSummary == null ? new Base[0] : new Base[] {this.isSummary}; // BooleanType 6074 case -108220795: /*binding*/ return this.binding == null ? new Base[0] : new Base[] {this.binding}; // ElementDefinitionBindingComponent 6075 case 837556430: /*mapping*/ return this.mapping == null ? new Base[0] : this.mapping.toArray(new Base[this.mapping.size()]); // ElementDefinitionMappingComponent 6076 default: return super.getProperty(hash, name, checkValid); 6077 } 6078 6079 } 6080 6081 @Override 6082 public Base setProperty(int hash, String name, Base value) throws FHIRException { 6083 switch (hash) { 6084 case 3433509: // path 6085 this.path = castToString(value); // StringType 6086 return value; 6087 case -671065907: // representation 6088 value = new PropertyRepresentationEnumFactory().fromType(castToCode(value)); 6089 this.getRepresentation().add((Enumeration) value); // Enumeration<PropertyRepresentation> 6090 return value; 6091 case -825289923: // sliceName 6092 this.sliceName = castToString(value); // StringType 6093 return value; 6094 case 102727412: // label 6095 this.label = castToString(value); // StringType 6096 return value; 6097 case 3059181: // code 6098 this.getCode().add(castToCoding(value)); // Coding 6099 return value; 6100 case -2119287345: // slicing 6101 this.slicing = (ElementDefinitionSlicingComponent) value; // ElementDefinitionSlicingComponent 6102 return value; 6103 case 109413500: // short 6104 this.short_ = castToString(value); // StringType 6105 return value; 6106 case -1014418093: // definition 6107 this.definition = castToMarkdown(value); // MarkdownType 6108 return value; 6109 case 950398559: // comment 6110 this.comment = castToMarkdown(value); // MarkdownType 6111 return value; 6112 case -1619874672: // requirements 6113 this.requirements = castToMarkdown(value); // MarkdownType 6114 return value; 6115 case 92902992: // alias 6116 this.getAlias().add(castToString(value)); // StringType 6117 return value; 6118 case 108114: // min 6119 this.min = castToUnsignedInt(value); // UnsignedIntType 6120 return value; 6121 case 107876: // max 6122 this.max = castToString(value); // StringType 6123 return value; 6124 case 3016401: // base 6125 this.base = (ElementDefinitionBaseComponent) value; // ElementDefinitionBaseComponent 6126 return value; 6127 case 1193747154: // contentReference 6128 this.contentReference = castToUri(value); // UriType 6129 return value; 6130 case 3575610: // type 6131 this.getType().add((TypeRefComponent) value); // TypeRefComponent 6132 return value; 6133 case -659125328: // defaultValue 6134 this.defaultValue = castToType(value); // org.hl7.fhir.dstu3.model.Type 6135 return value; 6136 case 1857257103: // meaningWhenMissing 6137 this.meaningWhenMissing = castToMarkdown(value); // MarkdownType 6138 return value; 6139 case 1828196047: // orderMeaning 6140 this.orderMeaning = castToString(value); // StringType 6141 return value; 6142 case 97445748: // fixed 6143 this.fixed = castToType(value); // org.hl7.fhir.dstu3.model.Type 6144 return value; 6145 case -791090288: // pattern 6146 this.pattern = castToType(value); // org.hl7.fhir.dstu3.model.Type 6147 return value; 6148 case -1322970774: // example 6149 this.getExample().add((ElementDefinitionExampleComponent) value); // ElementDefinitionExampleComponent 6150 return value; 6151 case -1376969153: // minValue 6152 this.minValue = castToType(value); // Type 6153 return value; 6154 case 399227501: // maxValue 6155 this.maxValue = castToType(value); // Type 6156 return value; 6157 case -791400086: // maxLength 6158 this.maxLength = castToInteger(value); // IntegerType 6159 return value; 6160 case -861311717: // condition 6161 this.getCondition().add(castToId(value)); // IdType 6162 return value; 6163 case -190376483: // constraint 6164 this.getConstraint().add((ElementDefinitionConstraintComponent) value); // ElementDefinitionConstraintComponent 6165 return value; 6166 case -1402857082: // mustSupport 6167 this.mustSupport = castToBoolean(value); // BooleanType 6168 return value; 6169 case -1408783839: // isModifier 6170 this.isModifier = castToBoolean(value); // BooleanType 6171 return value; 6172 case 1857548060: // isSummary 6173 this.isSummary = castToBoolean(value); // BooleanType 6174 return value; 6175 case -108220795: // binding 6176 this.binding = (ElementDefinitionBindingComponent) value; // ElementDefinitionBindingComponent 6177 return value; 6178 case 837556430: // mapping 6179 this.getMapping().add((ElementDefinitionMappingComponent) value); // ElementDefinitionMappingComponent 6180 return value; 6181 default: return super.setProperty(hash, name, value); 6182 } 6183 6184 } 6185 6186 @Override 6187 public Base setProperty(String name, Base value) throws FHIRException { 6188 if (name.equals("path")) { 6189 this.path = castToString(value); // StringType 6190 } else if (name.equals("representation")) { 6191 value = new PropertyRepresentationEnumFactory().fromType(castToCode(value)); 6192 this.getRepresentation().add((Enumeration) value); 6193 } else if (name.equals("sliceName")) { 6194 this.sliceName = castToString(value); // StringType 6195 } else if (name.equals("label")) { 6196 this.label = castToString(value); // StringType 6197 } else if (name.equals("code")) { 6198 this.getCode().add(castToCoding(value)); 6199 } else if (name.equals("slicing")) { 6200 this.slicing = (ElementDefinitionSlicingComponent) value; // ElementDefinitionSlicingComponent 6201 } else if (name.equals("short")) { 6202 this.short_ = castToString(value); // StringType 6203 } else if (name.equals("definition")) { 6204 this.definition = castToMarkdown(value); // MarkdownType 6205 } else if (name.equals("comment")) { 6206 this.comment = castToMarkdown(value); // MarkdownType 6207 } else if (name.equals("requirements")) { 6208 this.requirements = castToMarkdown(value); // MarkdownType 6209 } else if (name.equals("alias")) { 6210 this.getAlias().add(castToString(value)); 6211 } else if (name.equals("min")) { 6212 this.min = castToUnsignedInt(value); // UnsignedIntType 6213 } else if (name.equals("max")) { 6214 this.max = castToString(value); // StringType 6215 } else if (name.equals("base")) { 6216 this.base = (ElementDefinitionBaseComponent) value; // ElementDefinitionBaseComponent 6217 } else if (name.equals("contentReference")) { 6218 this.contentReference = castToUri(value); // UriType 6219 } else if (name.equals("type")) { 6220 this.getType().add((TypeRefComponent) value); 6221 } else if (name.equals("defaultValue[x]")) { 6222 this.defaultValue = castToType(value); // org.hl7.fhir.dstu3.model.Type 6223 } else if (name.equals("meaningWhenMissing")) { 6224 this.meaningWhenMissing = castToMarkdown(value); // MarkdownType 6225 } else if (name.equals("orderMeaning")) { 6226 this.orderMeaning = castToString(value); // StringType 6227 } else if (name.equals("fixed[x]")) { 6228 this.fixed = castToType(value); // org.hl7.fhir.dstu3.model.Type 6229 } else if (name.equals("pattern[x]")) { 6230 this.pattern = castToType(value); // org.hl7.fhir.dstu3.model.Type 6231 } else if (name.equals("example")) { 6232 this.getExample().add((ElementDefinitionExampleComponent) value); 6233 } else if (name.equals("minValue[x]")) { 6234 this.minValue = castToType(value); // Type 6235 } else if (name.equals("maxValue[x]")) { 6236 this.maxValue = castToType(value); // Type 6237 } else if (name.equals("maxLength")) { 6238 this.maxLength = castToInteger(value); // IntegerType 6239 } else if (name.equals("condition")) { 6240 this.getCondition().add(castToId(value)); 6241 } else if (name.equals("constraint")) { 6242 this.getConstraint().add((ElementDefinitionConstraintComponent) value); 6243 } else if (name.equals("mustSupport")) { 6244 this.mustSupport = castToBoolean(value); // BooleanType 6245 } else if (name.equals("isModifier")) { 6246 this.isModifier = castToBoolean(value); // BooleanType 6247 } else if (name.equals("isSummary")) { 6248 this.isSummary = castToBoolean(value); // BooleanType 6249 } else if (name.equals("binding")) { 6250 this.binding = (ElementDefinitionBindingComponent) value; // ElementDefinitionBindingComponent 6251 } else if (name.equals("mapping")) { 6252 this.getMapping().add((ElementDefinitionMappingComponent) value); 6253 } else 6254 return super.setProperty(name, value); 6255 return value; 6256 } 6257 6258 @Override 6259 public Base makeProperty(int hash, String name) throws FHIRException { 6260 switch (hash) { 6261 case 3433509: return getPathElement(); 6262 case -671065907: return addRepresentationElement(); 6263 case -825289923: return getSliceNameElement(); 6264 case 102727412: return getLabelElement(); 6265 case 3059181: return addCode(); 6266 case -2119287345: return getSlicing(); 6267 case 109413500: return getShortElement(); 6268 case -1014418093: return getDefinitionElement(); 6269 case 950398559: return getCommentElement(); 6270 case -1619874672: return getRequirementsElement(); 6271 case 92902992: return addAliasElement(); 6272 case 108114: return getMinElement(); 6273 case 107876: return getMaxElement(); 6274 case 3016401: return getBase(); 6275 case 1193747154: return getContentReferenceElement(); 6276 case 3575610: return addType(); 6277 case 587922128: return getDefaultValue(); 6278 case -659125328: return getDefaultValue(); 6279 case 1857257103: return getMeaningWhenMissingElement(); 6280 case 1828196047: return getOrderMeaningElement(); 6281 case -391522164: return getFixed(); 6282 case 97445748: return getFixed(); 6283 case -885125392: return getPattern(); 6284 case -791090288: return getPattern(); 6285 case -1322970774: return addExample(); 6286 case -55301663: return getMinValue(); 6287 case -1376969153: return getMinValue(); 6288 case 622130931: return getMaxValue(); 6289 case 399227501: return getMaxValue(); 6290 case -791400086: return getMaxLengthElement(); 6291 case -861311717: return addConditionElement(); 6292 case -190376483: return addConstraint(); 6293 case -1402857082: return getMustSupportElement(); 6294 case -1408783839: return getIsModifierElement(); 6295 case 1857548060: return getIsSummaryElement(); 6296 case -108220795: return getBinding(); 6297 case 837556430: return addMapping(); 6298 default: return super.makeProperty(hash, name); 6299 } 6300 6301 } 6302 6303 @Override 6304 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 6305 switch (hash) { 6306 case 3433509: /*path*/ return new String[] {"string"}; 6307 case -671065907: /*representation*/ return new String[] {"code"}; 6308 case -825289923: /*sliceName*/ return new String[] {"string"}; 6309 case 102727412: /*label*/ return new String[] {"string"}; 6310 case 3059181: /*code*/ return new String[] {"Coding"}; 6311 case -2119287345: /*slicing*/ return new String[] {}; 6312 case 109413500: /*short*/ return new String[] {"string"}; 6313 case -1014418093: /*definition*/ return new String[] {"markdown"}; 6314 case 950398559: /*comment*/ return new String[] {"markdown"}; 6315 case -1619874672: /*requirements*/ return new String[] {"markdown"}; 6316 case 92902992: /*alias*/ return new String[] {"string"}; 6317 case 108114: /*min*/ return new String[] {"unsignedInt"}; 6318 case 107876: /*max*/ return new String[] {"string"}; 6319 case 3016401: /*base*/ return new String[] {}; 6320 case 1193747154: /*contentReference*/ return new String[] {"uri"}; 6321 case 3575610: /*type*/ return new String[] {}; 6322 case -659125328: /*defaultValue*/ return new String[] {"*"}; 6323 case 1857257103: /*meaningWhenMissing*/ return new String[] {"markdown"}; 6324 case 1828196047: /*orderMeaning*/ return new String[] {"string"}; 6325 case 97445748: /*fixed*/ return new String[] {"*"}; 6326 case -791090288: /*pattern*/ return new String[] {"*"}; 6327 case -1322970774: /*example*/ return new String[] {}; 6328 case -1376969153: /*minValue*/ return new String[] {"date", "dateTime", "instant", "time", "decimal", "integer", "positiveInt", "unsignedInt", "Quantity"}; 6329 case 399227501: /*maxValue*/ return new String[] {"date", "dateTime", "instant", "time", "decimal", "integer", "positiveInt", "unsignedInt", "Quantity"}; 6330 case -791400086: /*maxLength*/ return new String[] {"integer"}; 6331 case -861311717: /*condition*/ return new String[] {"id"}; 6332 case -190376483: /*constraint*/ return new String[] {}; 6333 case -1402857082: /*mustSupport*/ return new String[] {"boolean"}; 6334 case -1408783839: /*isModifier*/ return new String[] {"boolean"}; 6335 case 1857548060: /*isSummary*/ return new String[] {"boolean"}; 6336 case -108220795: /*binding*/ return new String[] {}; 6337 case 837556430: /*mapping*/ return new String[] {}; 6338 default: return super.getTypesForProperty(hash, name); 6339 } 6340 6341 } 6342 6343 @Override 6344 public Base addChild(String name) throws FHIRException { 6345 if (name.equals("path")) { 6346 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.path"); 6347 } 6348 else if (name.equals("representation")) { 6349 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.representation"); 6350 } 6351 else if (name.equals("sliceName")) { 6352 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.sliceName"); 6353 } 6354 else if (name.equals("label")) { 6355 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.label"); 6356 } 6357 else if (name.equals("code")) { 6358 return addCode(); 6359 } 6360 else if (name.equals("slicing")) { 6361 this.slicing = new ElementDefinitionSlicingComponent(); 6362 return this.slicing; 6363 } 6364 else if (name.equals("short")) { 6365 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.short"); 6366 } 6367 else if (name.equals("definition")) { 6368 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.definition"); 6369 } 6370 else if (name.equals("comment")) { 6371 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.comment"); 6372 } 6373 else if (name.equals("requirements")) { 6374 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.requirements"); 6375 } 6376 else if (name.equals("alias")) { 6377 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.alias"); 6378 } 6379 else if (name.equals("min")) { 6380 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.min"); 6381 } 6382 else if (name.equals("max")) { 6383 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.max"); 6384 } 6385 else if (name.equals("base")) { 6386 this.base = new ElementDefinitionBaseComponent(); 6387 return this.base; 6388 } 6389 else if (name.equals("contentReference")) { 6390 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.contentReference"); 6391 } 6392 else if (name.equals("type")) { 6393 return addType(); 6394 } 6395 else if (name.equals("defaultValueBoolean")) { 6396 this.defaultValue = new BooleanType(); 6397 return this.defaultValue; 6398 } 6399 else if (name.equals("defaultValueInteger")) { 6400 this.defaultValue = new IntegerType(); 6401 return this.defaultValue; 6402 } 6403 else if (name.equals("defaultValueDecimal")) { 6404 this.defaultValue = new DecimalType(); 6405 return this.defaultValue; 6406 } 6407 else if (name.equals("defaultValueBase64Binary")) { 6408 this.defaultValue = new Base64BinaryType(); 6409 return this.defaultValue; 6410 } 6411 else if (name.equals("defaultValueInstant")) { 6412 this.defaultValue = new InstantType(); 6413 return this.defaultValue; 6414 } 6415 else if (name.equals("defaultValueString")) { 6416 this.defaultValue = new StringType(); 6417 return this.defaultValue; 6418 } 6419 else if (name.equals("defaultValueUri")) { 6420 this.defaultValue = new UriType(); 6421 return this.defaultValue; 6422 } 6423 else if (name.equals("defaultValueDate")) { 6424 this.defaultValue = new DateType(); 6425 return this.defaultValue; 6426 } 6427 else if (name.equals("defaultValueDateTime")) { 6428 this.defaultValue = new DateTimeType(); 6429 return this.defaultValue; 6430 } 6431 else if (name.equals("defaultValueTime")) { 6432 this.defaultValue = new TimeType(); 6433 return this.defaultValue; 6434 } 6435 else if (name.equals("defaultValueCode")) { 6436 this.defaultValue = new CodeType(); 6437 return this.defaultValue; 6438 } 6439 else if (name.equals("defaultValueOid")) { 6440 this.defaultValue = new OidType(); 6441 return this.defaultValue; 6442 } 6443 else if (name.equals("defaultValueId")) { 6444 this.defaultValue = new IdType(); 6445 return this.defaultValue; 6446 } 6447 else if (name.equals("defaultValueUnsignedInt")) { 6448 this.defaultValue = new UnsignedIntType(); 6449 return this.defaultValue; 6450 } 6451 else if (name.equals("defaultValuePositiveInt")) { 6452 this.defaultValue = new PositiveIntType(); 6453 return this.defaultValue; 6454 } 6455 else if (name.equals("defaultValueMarkdown")) { 6456 this.defaultValue = new MarkdownType(); 6457 return this.defaultValue; 6458 } 6459 else if (name.equals("defaultValueAnnotation")) { 6460 this.defaultValue = new Annotation(); 6461 return this.defaultValue; 6462 } 6463 else if (name.equals("defaultValueAttachment")) { 6464 this.defaultValue = new Attachment(); 6465 return this.defaultValue; 6466 } 6467 else if (name.equals("defaultValueIdentifier")) { 6468 this.defaultValue = new Identifier(); 6469 return this.defaultValue; 6470 } 6471 else if (name.equals("defaultValueCodeableConcept")) { 6472 this.defaultValue = new CodeableConcept(); 6473 return this.defaultValue; 6474 } 6475 else if (name.equals("defaultValueCoding")) { 6476 this.defaultValue = new Coding(); 6477 return this.defaultValue; 6478 } 6479 else if (name.equals("defaultValueQuantity")) { 6480 this.defaultValue = new Quantity(); 6481 return this.defaultValue; 6482 } 6483 else if (name.equals("defaultValueRange")) { 6484 this.defaultValue = new Range(); 6485 return this.defaultValue; 6486 } 6487 else if (name.equals("defaultValuePeriod")) { 6488 this.defaultValue = new Period(); 6489 return this.defaultValue; 6490 } 6491 else if (name.equals("defaultValueRatio")) { 6492 this.defaultValue = new Ratio(); 6493 return this.defaultValue; 6494 } 6495 else if (name.equals("defaultValueSampledData")) { 6496 this.defaultValue = new SampledData(); 6497 return this.defaultValue; 6498 } 6499 else if (name.equals("defaultValueSignature")) { 6500 this.defaultValue = new Signature(); 6501 return this.defaultValue; 6502 } 6503 else if (name.equals("defaultValueHumanName")) { 6504 this.defaultValue = new HumanName(); 6505 return this.defaultValue; 6506 } 6507 else if (name.equals("defaultValueAddress")) { 6508 this.defaultValue = new Address(); 6509 return this.defaultValue; 6510 } 6511 else if (name.equals("defaultValueContactPoint")) { 6512 this.defaultValue = new ContactPoint(); 6513 return this.defaultValue; 6514 } 6515 else if (name.equals("defaultValueTiming")) { 6516 this.defaultValue = new Timing(); 6517 return this.defaultValue; 6518 } 6519 else if (name.equals("defaultValueReference")) { 6520 this.defaultValue = new Reference(); 6521 return this.defaultValue; 6522 } 6523 else if (name.equals("defaultValueMeta")) { 6524 this.defaultValue = new Meta(); 6525 return this.defaultValue; 6526 } 6527 else if (name.equals("meaningWhenMissing")) { 6528 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.meaningWhenMissing"); 6529 } 6530 else if (name.equals("orderMeaning")) { 6531 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.orderMeaning"); 6532 } 6533 else if (name.equals("fixedBoolean")) { 6534 this.fixed = new BooleanType(); 6535 return this.fixed; 6536 } 6537 else if (name.equals("fixedInteger")) { 6538 this.fixed = new IntegerType(); 6539 return this.fixed; 6540 } 6541 else if (name.equals("fixedDecimal")) { 6542 this.fixed = new DecimalType(); 6543 return this.fixed; 6544 } 6545 else if (name.equals("fixedBase64Binary")) { 6546 this.fixed = new Base64BinaryType(); 6547 return this.fixed; 6548 } 6549 else if (name.equals("fixedInstant")) { 6550 this.fixed = new InstantType(); 6551 return this.fixed; 6552 } 6553 else if (name.equals("fixedString")) { 6554 this.fixed = new StringType(); 6555 return this.fixed; 6556 } 6557 else if (name.equals("fixedUri")) { 6558 this.fixed = new UriType(); 6559 return this.fixed; 6560 } 6561 else if (name.equals("fixedDate")) { 6562 this.fixed = new DateType(); 6563 return this.fixed; 6564 } 6565 else if (name.equals("fixedDateTime")) { 6566 this.fixed = new DateTimeType(); 6567 return this.fixed; 6568 } 6569 else if (name.equals("fixedTime")) { 6570 this.fixed = new TimeType(); 6571 return this.fixed; 6572 } 6573 else if (name.equals("fixedCode")) { 6574 this.fixed = new CodeType(); 6575 return this.fixed; 6576 } 6577 else if (name.equals("fixedOid")) { 6578 this.fixed = new OidType(); 6579 return this.fixed; 6580 } 6581 else if (name.equals("fixedId")) { 6582 this.fixed = new IdType(); 6583 return this.fixed; 6584 } 6585 else if (name.equals("fixedUnsignedInt")) { 6586 this.fixed = new UnsignedIntType(); 6587 return this.fixed; 6588 } 6589 else if (name.equals("fixedPositiveInt")) { 6590 this.fixed = new PositiveIntType(); 6591 return this.fixed; 6592 } 6593 else if (name.equals("fixedMarkdown")) { 6594 this.fixed = new MarkdownType(); 6595 return this.fixed; 6596 } 6597 else if (name.equals("fixedAnnotation")) { 6598 this.fixed = new Annotation(); 6599 return this.fixed; 6600 } 6601 else if (name.equals("fixedAttachment")) { 6602 this.fixed = new Attachment(); 6603 return this.fixed; 6604 } 6605 else if (name.equals("fixedIdentifier")) { 6606 this.fixed = new Identifier(); 6607 return this.fixed; 6608 } 6609 else if (name.equals("fixedCodeableConcept")) { 6610 this.fixed = new CodeableConcept(); 6611 return this.fixed; 6612 } 6613 else if (name.equals("fixedCoding")) { 6614 this.fixed = new Coding(); 6615 return this.fixed; 6616 } 6617 else if (name.equals("fixedQuantity")) { 6618 this.fixed = new Quantity(); 6619 return this.fixed; 6620 } 6621 else if (name.equals("fixedRange")) { 6622 this.fixed = new Range(); 6623 return this.fixed; 6624 } 6625 else if (name.equals("fixedPeriod")) { 6626 this.fixed = new Period(); 6627 return this.fixed; 6628 } 6629 else if (name.equals("fixedRatio")) { 6630 this.fixed = new Ratio(); 6631 return this.fixed; 6632 } 6633 else if (name.equals("fixedSampledData")) { 6634 this.fixed = new SampledData(); 6635 return this.fixed; 6636 } 6637 else if (name.equals("fixedSignature")) { 6638 this.fixed = new Signature(); 6639 return this.fixed; 6640 } 6641 else if (name.equals("fixedHumanName")) { 6642 this.fixed = new HumanName(); 6643 return this.fixed; 6644 } 6645 else if (name.equals("fixedAddress")) { 6646 this.fixed = new Address(); 6647 return this.fixed; 6648 } 6649 else if (name.equals("fixedContactPoint")) { 6650 this.fixed = new ContactPoint(); 6651 return this.fixed; 6652 } 6653 else if (name.equals("fixedTiming")) { 6654 this.fixed = new Timing(); 6655 return this.fixed; 6656 } 6657 else if (name.equals("fixedReference")) { 6658 this.fixed = new Reference(); 6659 return this.fixed; 6660 } 6661 else if (name.equals("fixedMeta")) { 6662 this.fixed = new Meta(); 6663 return this.fixed; 6664 } 6665 else if (name.equals("patternBoolean")) { 6666 this.pattern = new BooleanType(); 6667 return this.pattern; 6668 } 6669 else if (name.equals("patternInteger")) { 6670 this.pattern = new IntegerType(); 6671 return this.pattern; 6672 } 6673 else if (name.equals("patternDecimal")) { 6674 this.pattern = new DecimalType(); 6675 return this.pattern; 6676 } 6677 else if (name.equals("patternBase64Binary")) { 6678 this.pattern = new Base64BinaryType(); 6679 return this.pattern; 6680 } 6681 else if (name.equals("patternInstant")) { 6682 this.pattern = new InstantType(); 6683 return this.pattern; 6684 } 6685 else if (name.equals("patternString")) { 6686 this.pattern = new StringType(); 6687 return this.pattern; 6688 } 6689 else if (name.equals("patternUri")) { 6690 this.pattern = new UriType(); 6691 return this.pattern; 6692 } 6693 else if (name.equals("patternDate")) { 6694 this.pattern = new DateType(); 6695 return this.pattern; 6696 } 6697 else if (name.equals("patternDateTime")) { 6698 this.pattern = new DateTimeType(); 6699 return this.pattern; 6700 } 6701 else if (name.equals("patternTime")) { 6702 this.pattern = new TimeType(); 6703 return this.pattern; 6704 } 6705 else if (name.equals("patternCode")) { 6706 this.pattern = new CodeType(); 6707 return this.pattern; 6708 } 6709 else if (name.equals("patternOid")) { 6710 this.pattern = new OidType(); 6711 return this.pattern; 6712 } 6713 else if (name.equals("patternId")) { 6714 this.pattern = new IdType(); 6715 return this.pattern; 6716 } 6717 else if (name.equals("patternUnsignedInt")) { 6718 this.pattern = new UnsignedIntType(); 6719 return this.pattern; 6720 } 6721 else if (name.equals("patternPositiveInt")) { 6722 this.pattern = new PositiveIntType(); 6723 return this.pattern; 6724 } 6725 else if (name.equals("patternMarkdown")) { 6726 this.pattern = new MarkdownType(); 6727 return this.pattern; 6728 } 6729 else if (name.equals("patternAnnotation")) { 6730 this.pattern = new Annotation(); 6731 return this.pattern; 6732 } 6733 else if (name.equals("patternAttachment")) { 6734 this.pattern = new Attachment(); 6735 return this.pattern; 6736 } 6737 else if (name.equals("patternIdentifier")) { 6738 this.pattern = new Identifier(); 6739 return this.pattern; 6740 } 6741 else if (name.equals("patternCodeableConcept")) { 6742 this.pattern = new CodeableConcept(); 6743 return this.pattern; 6744 } 6745 else if (name.equals("patternCoding")) { 6746 this.pattern = new Coding(); 6747 return this.pattern; 6748 } 6749 else if (name.equals("patternQuantity")) { 6750 this.pattern = new Quantity(); 6751 return this.pattern; 6752 } 6753 else if (name.equals("patternRange")) { 6754 this.pattern = new Range(); 6755 return this.pattern; 6756 } 6757 else if (name.equals("patternPeriod")) { 6758 this.pattern = new Period(); 6759 return this.pattern; 6760 } 6761 else if (name.equals("patternRatio")) { 6762 this.pattern = new Ratio(); 6763 return this.pattern; 6764 } 6765 else if (name.equals("patternSampledData")) { 6766 this.pattern = new SampledData(); 6767 return this.pattern; 6768 } 6769 else if (name.equals("patternSignature")) { 6770 this.pattern = new Signature(); 6771 return this.pattern; 6772 } 6773 else if (name.equals("patternHumanName")) { 6774 this.pattern = new HumanName(); 6775 return this.pattern; 6776 } 6777 else if (name.equals("patternAddress")) { 6778 this.pattern = new Address(); 6779 return this.pattern; 6780 } 6781 else if (name.equals("patternContactPoint")) { 6782 this.pattern = new ContactPoint(); 6783 return this.pattern; 6784 } 6785 else if (name.equals("patternTiming")) { 6786 this.pattern = new Timing(); 6787 return this.pattern; 6788 } 6789 else if (name.equals("patternReference")) { 6790 this.pattern = new Reference(); 6791 return this.pattern; 6792 } 6793 else if (name.equals("patternMeta")) { 6794 this.pattern = new Meta(); 6795 return this.pattern; 6796 } 6797 else if (name.equals("example")) { 6798 return addExample(); 6799 } 6800 else if (name.equals("minValueDate")) { 6801 this.minValue = new DateType(); 6802 return this.minValue; 6803 } 6804 else if (name.equals("minValueDateTime")) { 6805 this.minValue = new DateTimeType(); 6806 return this.minValue; 6807 } 6808 else if (name.equals("minValueInstant")) { 6809 this.minValue = new InstantType(); 6810 return this.minValue; 6811 } 6812 else if (name.equals("minValueTime")) { 6813 this.minValue = new TimeType(); 6814 return this.minValue; 6815 } 6816 else if (name.equals("minValueDecimal")) { 6817 this.minValue = new DecimalType(); 6818 return this.minValue; 6819 } 6820 else if (name.equals("minValueInteger")) { 6821 this.minValue = new IntegerType(); 6822 return this.minValue; 6823 } 6824 else if (name.equals("minValuePositiveInt")) { 6825 this.minValue = new PositiveIntType(); 6826 return this.minValue; 6827 } 6828 else if (name.equals("minValueUnsignedInt")) { 6829 this.minValue = new UnsignedIntType(); 6830 return this.minValue; 6831 } 6832 else if (name.equals("minValueQuantity")) { 6833 this.minValue = new Quantity(); 6834 return this.minValue; 6835 } 6836 else if (name.equals("maxValueDate")) { 6837 this.maxValue = new DateType(); 6838 return this.maxValue; 6839 } 6840 else if (name.equals("maxValueDateTime")) { 6841 this.maxValue = new DateTimeType(); 6842 return this.maxValue; 6843 } 6844 else if (name.equals("maxValueInstant")) { 6845 this.maxValue = new InstantType(); 6846 return this.maxValue; 6847 } 6848 else if (name.equals("maxValueTime")) { 6849 this.maxValue = new TimeType(); 6850 return this.maxValue; 6851 } 6852 else if (name.equals("maxValueDecimal")) { 6853 this.maxValue = new DecimalType(); 6854 return this.maxValue; 6855 } 6856 else if (name.equals("maxValueInteger")) { 6857 this.maxValue = new IntegerType(); 6858 return this.maxValue; 6859 } 6860 else if (name.equals("maxValuePositiveInt")) { 6861 this.maxValue = new PositiveIntType(); 6862 return this.maxValue; 6863 } 6864 else if (name.equals("maxValueUnsignedInt")) { 6865 this.maxValue = new UnsignedIntType(); 6866 return this.maxValue; 6867 } 6868 else if (name.equals("maxValueQuantity")) { 6869 this.maxValue = new Quantity(); 6870 return this.maxValue; 6871 } 6872 else if (name.equals("maxLength")) { 6873 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.maxLength"); 6874 } 6875 else if (name.equals("condition")) { 6876 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.condition"); 6877 } 6878 else if (name.equals("constraint")) { 6879 return addConstraint(); 6880 } 6881 else if (name.equals("mustSupport")) { 6882 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.mustSupport"); 6883 } 6884 else if (name.equals("isModifier")) { 6885 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.isModifier"); 6886 } 6887 else if (name.equals("isSummary")) { 6888 throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.isSummary"); 6889 } 6890 else if (name.equals("binding")) { 6891 this.binding = new ElementDefinitionBindingComponent(); 6892 return this.binding; 6893 } 6894 else if (name.equals("mapping")) { 6895 return addMapping(); 6896 } 6897 else 6898 return super.addChild(name); 6899 } 6900 6901 public String fhirType() { 6902 return "ElementDefinition"; 6903 6904 } 6905 6906 public ElementDefinition copy() { 6907 ElementDefinition dst = new ElementDefinition(); 6908 copyValues(dst); 6909 dst.path = path == null ? null : path.copy(); 6910 if (representation != null) { 6911 dst.representation = new ArrayList<Enumeration<PropertyRepresentation>>(); 6912 for (Enumeration<PropertyRepresentation> i : representation) 6913 dst.representation.add(i.copy()); 6914 }; 6915 dst.sliceName = sliceName == null ? null : sliceName.copy(); 6916 dst.label = label == null ? null : label.copy(); 6917 if (code != null) { 6918 dst.code = new ArrayList<Coding>(); 6919 for (Coding i : code) 6920 dst.code.add(i.copy()); 6921 }; 6922 dst.slicing = slicing == null ? null : slicing.copy(); 6923 dst.short_ = short_ == null ? null : short_.copy(); 6924 dst.definition = definition == null ? null : definition.copy(); 6925 dst.comment = comment == null ? null : comment.copy(); 6926 dst.requirements = requirements == null ? null : requirements.copy(); 6927 if (alias != null) { 6928 dst.alias = new ArrayList<StringType>(); 6929 for (StringType i : alias) 6930 dst.alias.add(i.copy()); 6931 }; 6932 dst.min = min == null ? null : min.copy(); 6933 dst.max = max == null ? null : max.copy(); 6934 dst.base = base == null ? null : base.copy(); 6935 dst.contentReference = contentReference == null ? null : contentReference.copy(); 6936 if (type != null) { 6937 dst.type = new ArrayList<TypeRefComponent>(); 6938 for (TypeRefComponent i : type) 6939 dst.type.add(i.copy()); 6940 }; 6941 dst.defaultValue = defaultValue == null ? null : defaultValue.copy(); 6942 dst.meaningWhenMissing = meaningWhenMissing == null ? null : meaningWhenMissing.copy(); 6943 dst.orderMeaning = orderMeaning == null ? null : orderMeaning.copy(); 6944 dst.fixed = fixed == null ? null : fixed.copy(); 6945 dst.pattern = pattern == null ? null : pattern.copy(); 6946 if (example != null) { 6947 dst.example = new ArrayList<ElementDefinitionExampleComponent>(); 6948 for (ElementDefinitionExampleComponent i : example) 6949 dst.example.add(i.copy()); 6950 }; 6951 dst.minValue = minValue == null ? null : minValue.copy(); 6952 dst.maxValue = maxValue == null ? null : maxValue.copy(); 6953 dst.maxLength = maxLength == null ? null : maxLength.copy(); 6954 if (condition != null) { 6955 dst.condition = new ArrayList<IdType>(); 6956 for (IdType i : condition) 6957 dst.condition.add(i.copy()); 6958 }; 6959 if (constraint != null) { 6960 dst.constraint = new ArrayList<ElementDefinitionConstraintComponent>(); 6961 for (ElementDefinitionConstraintComponent i : constraint) 6962 dst.constraint.add(i.copy()); 6963 }; 6964 dst.mustSupport = mustSupport == null ? null : mustSupport.copy(); 6965 dst.isModifier = isModifier == null ? null : isModifier.copy(); 6966 dst.isSummary = isSummary == null ? null : isSummary.copy(); 6967 dst.binding = binding == null ? null : binding.copy(); 6968 if (mapping != null) { 6969 dst.mapping = new ArrayList<ElementDefinitionMappingComponent>(); 6970 for (ElementDefinitionMappingComponent i : mapping) 6971 dst.mapping.add(i.copy()); 6972 }; 6973 return dst; 6974 } 6975 6976 protected ElementDefinition typedCopy() { 6977 return copy(); 6978 } 6979 6980 @Override 6981 public boolean equalsDeep(Base other_) { 6982 if (!super.equalsDeep(other_)) 6983 return false; 6984 if (!(other_ instanceof ElementDefinition)) 6985 return false; 6986 ElementDefinition o = (ElementDefinition) other_; 6987 return compareDeep(path, o.path, true) && compareDeep(representation, o.representation, true) && compareDeep(sliceName, o.sliceName, true) 6988 && compareDeep(label, o.label, true) && compareDeep(code, o.code, true) && compareDeep(slicing, o.slicing, true) 6989 && compareDeep(short_, o.short_, true) && compareDeep(definition, o.definition, true) && compareDeep(comment, o.comment, true) 6990 && compareDeep(requirements, o.requirements, true) && compareDeep(alias, o.alias, true) && compareDeep(min, o.min, true) 6991 && compareDeep(max, o.max, true) && compareDeep(base, o.base, true) && compareDeep(contentReference, o.contentReference, true) 6992 && compareDeep(type, o.type, true) && compareDeep(defaultValue, o.defaultValue, true) && compareDeep(meaningWhenMissing, o.meaningWhenMissing, true) 6993 && compareDeep(orderMeaning, o.orderMeaning, true) && compareDeep(fixed, o.fixed, true) && compareDeep(pattern, o.pattern, true) 6994 && compareDeep(example, o.example, true) && compareDeep(minValue, o.minValue, true) && compareDeep(maxValue, o.maxValue, true) 6995 && compareDeep(maxLength, o.maxLength, true) && compareDeep(condition, o.condition, true) && compareDeep(constraint, o.constraint, true) 6996 && compareDeep(mustSupport, o.mustSupport, true) && compareDeep(isModifier, o.isModifier, true) 6997 && compareDeep(isSummary, o.isSummary, true) && compareDeep(binding, o.binding, true) && compareDeep(mapping, o.mapping, true) 6998 ; 6999 } 7000 7001 @Override 7002 public boolean equalsShallow(Base other_) { 7003 if (!super.equalsShallow(other_)) 7004 return false; 7005 if (!(other_ instanceof ElementDefinition)) 7006 return false; 7007 ElementDefinition o = (ElementDefinition) other_; 7008 return compareValues(path, o.path, true) && compareValues(representation, o.representation, true) && compareValues(sliceName, o.sliceName, true) 7009 && compareValues(label, o.label, true) && compareValues(short_, o.short_, true) && compareValues(definition, o.definition, true) 7010 && compareValues(comment, o.comment, true) && compareValues(requirements, o.requirements, true) && compareValues(alias, o.alias, true) 7011 && compareValues(min, o.min, true) && compareValues(max, o.max, true) && compareValues(contentReference, o.contentReference, true) 7012 && compareValues(meaningWhenMissing, o.meaningWhenMissing, true) && compareValues(orderMeaning, o.orderMeaning, true) 7013 && compareValues(maxLength, o.maxLength, true) && compareValues(condition, o.condition, true) && compareValues(mustSupport, o.mustSupport, true) 7014 && compareValues(isModifier, o.isModifier, true) && compareValues(isSummary, o.isSummary, true); 7015 } 7016 7017 public boolean isEmpty() { 7018 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, representation, sliceName 7019 , label, code, slicing, short_, definition, comment, requirements, alias, min 7020 , max, base, contentReference, type, defaultValue, meaningWhenMissing, orderMeaning 7021 , fixed, pattern, example, minValue, maxValue, maxLength, condition, constraint 7022 , mustSupport, isModifier, isSummary, binding, mapping); 7023 } 7024 7025// added from java-adornments.txt: 7026 7027 public String toString() { 7028 if (hasId()) 7029 return getId(); 7030 if (hasSliceName()) 7031 return getPath()+":"+getSliceName(); 7032 else 7033 return getPath(); 7034 } 7035 7036 public void makeBase(String path, int min, String max) { 7037 ElementDefinitionBaseComponent self = getBase(); 7038 self.setPath(path); 7039 self.setMin(min); 7040 self.setMax(max); 7041 } 7042 7043 public String typeSummary() { 7044 CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder(); 7045 for (TypeRefComponent tr : type) { 7046 if (tr.hasCode()) 7047 b.append(tr.getCode()); 7048 } 7049 return b.toString(); 7050 } 7051 7052 7053// end addition 7054 7055}