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