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