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