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