
001package org.hl7.fhir.r4.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1 033import java.util.ArrayList; 034import java.util.Date; 035import java.util.List; 036 037import org.hl7.fhir.exceptions.FHIRException; 038import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 039import org.hl7.fhir.r4.model.Enumerations.FHIRVersion; 040import org.hl7.fhir.r4.model.Enumerations.FHIRVersionEnumFactory; 041import org.hl7.fhir.r4.model.Enumerations.PublicationStatus; 042import org.hl7.fhir.r4.model.Enumerations.PublicationStatusEnumFactory; 043import org.hl7.fhir.utilities.Utilities; 044 045import ca.uhn.fhir.model.api.annotation.Block; 046import ca.uhn.fhir.model.api.annotation.Child; 047import ca.uhn.fhir.model.api.annotation.ChildOrder; 048import ca.uhn.fhir.model.api.annotation.Description; 049import ca.uhn.fhir.model.api.annotation.ResourceDef; 050import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 051 052/** 053 * A definition of a FHIR structure. This resource is used to describe the 054 * underlying resources, data types defined in FHIR, and also for describing 055 * extensions and constraints on resources and data types. 056 */ 057@ResourceDef(name = "StructureDefinition", profile = "http://hl7.org/fhir/StructureDefinition/StructureDefinition") 058@ChildOrder(names = { "url", "identifier", "version", "name", "title", "status", "experimental", "date", "publisher", 059 "contact", "description", "useContext", "jurisdiction", "purpose", "copyright", "keyword", "fhirVersion", "mapping", 060 "kind", "abstract", "context", "contextInvariant", "type", "baseDefinition", "derivation", "snapshot", 061 "differential" }) 062public class StructureDefinition extends MetadataResource { 063 064 public enum StructureDefinitionKind { 065 /** 066 * A primitive type that has a value and an extension. These can be used 067 * throughout complex datatype, Resource and extension definitions. Only the 068 * base specification can define primitive types. 069 */ 070 PRIMITIVETYPE, 071 /** 072 * A complex structure that defines a set of data elements that is suitable for 073 * use in 'resources'. The base specification defines a number of complex types, 074 * and other specifications can define additional types. These structures do not 075 * have a maintained identity. 076 */ 077 COMPLEXTYPE, 078 /** 079 * A 'resource' - a directed acyclic graph of elements that aggregrates other 080 * types into an identifiable entity. The base FHIR resources are defined by the 081 * FHIR specification itself but other 'resources' can be defined in additional 082 * specifications (though these will not be recognised as 'resources' by the 083 * FHIR specification (i.e. they do not get end-points etc, or act as the 084 * targets of references in FHIR defined resources - though other specificatiosn 085 * can treat them this way). 086 */ 087 RESOURCE, 088 /** 089 * A pattern or a template that is not intended to be a real resource or complex 090 * type. 091 */ 092 LOGICAL, 093 /** 094 * added to help the parsers with the generic types 095 */ 096 NULL; 097 098 public static StructureDefinitionKind fromCode(String codeString) throws FHIRException { 099 if (codeString == null || "".equals(codeString)) 100 return null; 101 if ("primitive-type".equals(codeString)) 102 return PRIMITIVETYPE; 103 if ("complex-type".equals(codeString)) 104 return COMPLEXTYPE; 105 if ("resource".equals(codeString)) 106 return RESOURCE; 107 if ("logical".equals(codeString)) 108 return LOGICAL; 109 if (Configuration.isAcceptInvalidEnums()) 110 return null; 111 else 112 throw new FHIRException("Unknown StructureDefinitionKind code '" + codeString + "'"); 113 } 114 115 public String toCode() { 116 switch (this) { 117 case PRIMITIVETYPE: 118 return "primitive-type"; 119 case COMPLEXTYPE: 120 return "complex-type"; 121 case RESOURCE: 122 return "resource"; 123 case LOGICAL: 124 return "logical"; 125 case NULL: 126 return null; 127 default: 128 return "?"; 129 } 130 } 131 132 public String getSystem() { 133 switch (this) { 134 case PRIMITIVETYPE: 135 return "http://hl7.org/fhir/structure-definition-kind"; 136 case COMPLEXTYPE: 137 return "http://hl7.org/fhir/structure-definition-kind"; 138 case RESOURCE: 139 return "http://hl7.org/fhir/structure-definition-kind"; 140 case LOGICAL: 141 return "http://hl7.org/fhir/structure-definition-kind"; 142 case NULL: 143 return null; 144 default: 145 return "?"; 146 } 147 } 148 149 public String getDefinition() { 150 switch (this) { 151 case PRIMITIVETYPE: 152 return "A primitive type that has a value and an extension. These can be used throughout complex datatype, Resource and extension definitions. Only the base specification can define primitive types."; 153 case COMPLEXTYPE: 154 return "A complex structure that defines a set of data elements that is suitable for use in 'resources'. The base specification defines a number of complex types, and other specifications can define additional types. These structures do not have a maintained identity."; 155 case RESOURCE: 156 return "A 'resource' - a directed acyclic graph of elements that aggregrates other types into an identifiable entity. The base FHIR resources are defined by the FHIR specification itself but other 'resources' can be defined in additional specifications (though these will not be recognised as 'resources' by the FHIR specification (i.e. they do not get end-points etc, or act as the targets of references in FHIR defined resources - though other specificatiosn can treat them this way)."; 157 case LOGICAL: 158 return "A pattern or a template that is not intended to be a real resource or complex type."; 159 case NULL: 160 return null; 161 default: 162 return "?"; 163 } 164 } 165 166 public String getDisplay() { 167 switch (this) { 168 case PRIMITIVETYPE: 169 return "Primitive Data Type"; 170 case COMPLEXTYPE: 171 return "Complex Data Type"; 172 case RESOURCE: 173 return "Resource"; 174 case LOGICAL: 175 return "Logical"; 176 case NULL: 177 return null; 178 default: 179 return "?"; 180 } 181 } 182 } 183 184 public static class StructureDefinitionKindEnumFactory implements EnumFactory<StructureDefinitionKind> { 185 public StructureDefinitionKind fromCode(String codeString) throws IllegalArgumentException { 186 if (codeString == null || "".equals(codeString)) 187 if (codeString == null || "".equals(codeString)) 188 return null; 189 if ("primitive-type".equals(codeString)) 190 return StructureDefinitionKind.PRIMITIVETYPE; 191 if ("complex-type".equals(codeString)) 192 return StructureDefinitionKind.COMPLEXTYPE; 193 if ("resource".equals(codeString)) 194 return StructureDefinitionKind.RESOURCE; 195 if ("logical".equals(codeString)) 196 return StructureDefinitionKind.LOGICAL; 197 throw new IllegalArgumentException("Unknown StructureDefinitionKind code '" + codeString + "'"); 198 } 199 200 public Enumeration<StructureDefinitionKind> fromType(PrimitiveType<?> code) throws FHIRException { 201 if (code == null) 202 return null; 203 if (code.isEmpty()) 204 return new Enumeration<StructureDefinitionKind>(this, StructureDefinitionKind.NULL, code); 205 String codeString = code.asStringValue(); 206 if (codeString == null || "".equals(codeString)) 207 return new Enumeration<StructureDefinitionKind>(this, StructureDefinitionKind.NULL, code); 208 if ("primitive-type".equals(codeString)) 209 return new Enumeration<StructureDefinitionKind>(this, StructureDefinitionKind.PRIMITIVETYPE, code); 210 if ("complex-type".equals(codeString)) 211 return new Enumeration<StructureDefinitionKind>(this, StructureDefinitionKind.COMPLEXTYPE, code); 212 if ("resource".equals(codeString)) 213 return new Enumeration<StructureDefinitionKind>(this, StructureDefinitionKind.RESOURCE, code); 214 if ("logical".equals(codeString)) 215 return new Enumeration<StructureDefinitionKind>(this, StructureDefinitionKind.LOGICAL, code); 216 throw new FHIRException("Unknown StructureDefinitionKind code '" + codeString + "'"); 217 } 218 219 public String toCode(StructureDefinitionKind code) { 220 if (code == StructureDefinitionKind.PRIMITIVETYPE) 221 return "primitive-type"; 222 if (code == StructureDefinitionKind.COMPLEXTYPE) 223 return "complex-type"; 224 if (code == StructureDefinitionKind.RESOURCE) 225 return "resource"; 226 if (code == StructureDefinitionKind.LOGICAL) 227 return "logical"; 228 return "?"; 229 } 230 231 public String toSystem(StructureDefinitionKind code) { 232 return code.getSystem(); 233 } 234 } 235 236 public enum ExtensionContextType { 237 /** 238 * The context is all elements that match the FHIRPath query found in the 239 * expression. 240 */ 241 FHIRPATH, 242 /** 243 * The context is any element that has an ElementDefinition.id that matches that 244 * found in the expression. This includes ElementDefinition Ids that have 245 * slicing identifiers. The full path for the element is [url]#[elementid]. If 246 * there is no #, the Element id is one defined in the base specification. 247 */ 248 ELEMENT, 249 /** 250 * The context is a particular extension from a particular StructureDefinition, 251 * and the expression is just a uri that identifies the extension. 252 */ 253 EXTENSION, 254 /** 255 * added to help the parsers with the generic types 256 */ 257 NULL; 258 259 public static ExtensionContextType fromCode(String codeString) throws FHIRException { 260 if (codeString == null || "".equals(codeString)) 261 return null; 262 if ("fhirpath".equals(codeString)) 263 return FHIRPATH; 264 if ("element".equals(codeString)) 265 return ELEMENT; 266 if ("extension".equals(codeString)) 267 return EXTENSION; 268 if (Configuration.isAcceptInvalidEnums()) 269 return null; 270 else 271 throw new FHIRException("Unknown ExtensionContextType code '" + codeString + "'"); 272 } 273 274 public String toCode() { 275 switch (this) { 276 case FHIRPATH: 277 return "fhirpath"; 278 case ELEMENT: 279 return "element"; 280 case EXTENSION: 281 return "extension"; 282 case NULL: 283 return null; 284 default: 285 return "?"; 286 } 287 } 288 289 public String getSystem() { 290 switch (this) { 291 case FHIRPATH: 292 return "http://hl7.org/fhir/extension-context-type"; 293 case ELEMENT: 294 return "http://hl7.org/fhir/extension-context-type"; 295 case EXTENSION: 296 return "http://hl7.org/fhir/extension-context-type"; 297 case NULL: 298 return null; 299 default: 300 return "?"; 301 } 302 } 303 304 public String getDefinition() { 305 switch (this) { 306 case FHIRPATH: 307 return "The context is all elements that match the FHIRPath query found in the expression."; 308 case ELEMENT: 309 return "The context is any element that has an ElementDefinition.id that matches that found in the expression. This includes ElementDefinition Ids that have slicing identifiers. The full path for the element is [url]#[elementid]. If there is no #, the Element id is one defined in the base specification."; 310 case EXTENSION: 311 return "The context is a particular extension from a particular StructureDefinition, and the expression is just a uri that identifies the extension."; 312 case NULL: 313 return null; 314 default: 315 return "?"; 316 } 317 } 318 319 public String getDisplay() { 320 switch (this) { 321 case FHIRPATH: 322 return "FHIRPath"; 323 case ELEMENT: 324 return "Element ID"; 325 case EXTENSION: 326 return "Extension URL"; 327 case NULL: 328 return null; 329 default: 330 return "?"; 331 } 332 } 333 } 334 335 public static class ExtensionContextTypeEnumFactory implements EnumFactory<ExtensionContextType> { 336 public ExtensionContextType fromCode(String codeString) throws IllegalArgumentException { 337 if (codeString == null || "".equals(codeString)) 338 if (codeString == null || "".equals(codeString)) 339 return null; 340 if ("fhirpath".equals(codeString)) 341 return ExtensionContextType.FHIRPATH; 342 if ("element".equals(codeString)) 343 return ExtensionContextType.ELEMENT; 344 if ("extension".equals(codeString)) 345 return ExtensionContextType.EXTENSION; 346 throw new IllegalArgumentException("Unknown ExtensionContextType code '" + codeString + "'"); 347 } 348 349 public Enumeration<ExtensionContextType> fromType(PrimitiveType<?> code) throws FHIRException { 350 if (code == null) 351 return null; 352 if (code.isEmpty()) 353 return new Enumeration<ExtensionContextType>(this, ExtensionContextType.NULL, code); 354 String codeString = code.asStringValue(); 355 if (codeString == null || "".equals(codeString)) 356 return new Enumeration<ExtensionContextType>(this, ExtensionContextType.NULL, code); 357 if ("fhirpath".equals(codeString)) 358 return new Enumeration<ExtensionContextType>(this, ExtensionContextType.FHIRPATH, code); 359 if ("element".equals(codeString)) 360 return new Enumeration<ExtensionContextType>(this, ExtensionContextType.ELEMENT, code); 361 if ("extension".equals(codeString)) 362 return new Enumeration<ExtensionContextType>(this, ExtensionContextType.EXTENSION, code); 363 throw new FHIRException("Unknown ExtensionContextType code '" + codeString + "'"); 364 } 365 366 public String toCode(ExtensionContextType code) { 367 if (code == ExtensionContextType.FHIRPATH) 368 return "fhirpath"; 369 if (code == ExtensionContextType.ELEMENT) 370 return "element"; 371 if (code == ExtensionContextType.EXTENSION) 372 return "extension"; 373 return "?"; 374 } 375 376 public String toSystem(ExtensionContextType code) { 377 return code.getSystem(); 378 } 379 } 380 381 public enum TypeDerivationRule { 382 /** 383 * This definition defines a new type that adds additional elements to the base 384 * type. 385 */ 386 SPECIALIZATION, 387 /** 388 * This definition adds additional rules to an existing concrete type. 389 */ 390 CONSTRAINT, 391 /** 392 * added to help the parsers with the generic types 393 */ 394 NULL; 395 396 public static TypeDerivationRule fromCode(String codeString) throws FHIRException { 397 if (codeString == null || "".equals(codeString)) 398 return null; 399 if ("specialization".equals(codeString)) 400 return SPECIALIZATION; 401 if ("constraint".equals(codeString)) 402 return CONSTRAINT; 403 if (Configuration.isAcceptInvalidEnums()) 404 return null; 405 else 406 throw new FHIRException("Unknown TypeDerivationRule code '" + codeString + "'"); 407 } 408 409 public String toCode() { 410 switch (this) { 411 case SPECIALIZATION: 412 return "specialization"; 413 case CONSTRAINT: 414 return "constraint"; 415 case NULL: 416 return null; 417 default: 418 return "?"; 419 } 420 } 421 422 public String getSystem() { 423 switch (this) { 424 case SPECIALIZATION: 425 return "http://hl7.org/fhir/type-derivation-rule"; 426 case CONSTRAINT: 427 return "http://hl7.org/fhir/type-derivation-rule"; 428 case NULL: 429 return null; 430 default: 431 return "?"; 432 } 433 } 434 435 public String getDefinition() { 436 switch (this) { 437 case SPECIALIZATION: 438 return "This definition defines a new type that adds additional elements to the base type."; 439 case CONSTRAINT: 440 return "This definition adds additional rules to an existing concrete type."; 441 case NULL: 442 return null; 443 default: 444 return "?"; 445 } 446 } 447 448 public String getDisplay() { 449 switch (this) { 450 case SPECIALIZATION: 451 return "Specialization"; 452 case CONSTRAINT: 453 return "Constraint"; 454 case NULL: 455 return null; 456 default: 457 return "?"; 458 } 459 } 460 } 461 462 public static class TypeDerivationRuleEnumFactory implements EnumFactory<TypeDerivationRule> { 463 public TypeDerivationRule fromCode(String codeString) throws IllegalArgumentException { 464 if (codeString == null || "".equals(codeString)) 465 if (codeString == null || "".equals(codeString)) 466 return null; 467 if ("specialization".equals(codeString)) 468 return TypeDerivationRule.SPECIALIZATION; 469 if ("constraint".equals(codeString)) 470 return TypeDerivationRule.CONSTRAINT; 471 throw new IllegalArgumentException("Unknown TypeDerivationRule code '" + codeString + "'"); 472 } 473 474 public Enumeration<TypeDerivationRule> fromType(PrimitiveType<?> code) throws FHIRException { 475 if (code == null) 476 return null; 477 if (code.isEmpty()) 478 return new Enumeration<TypeDerivationRule>(this, TypeDerivationRule.NULL, code); 479 String codeString = code.asStringValue(); 480 if (codeString == null || "".equals(codeString)) 481 return new Enumeration<TypeDerivationRule>(this, TypeDerivationRule.NULL, code); 482 if ("specialization".equals(codeString)) 483 return new Enumeration<TypeDerivationRule>(this, TypeDerivationRule.SPECIALIZATION, code); 484 if ("constraint".equals(codeString)) 485 return new Enumeration<TypeDerivationRule>(this, TypeDerivationRule.CONSTRAINT, code); 486 throw new FHIRException("Unknown TypeDerivationRule code '" + codeString + "'"); 487 } 488 489 public String toCode(TypeDerivationRule code) { 490 if (code == TypeDerivationRule.SPECIALIZATION) 491 return "specialization"; 492 if (code == TypeDerivationRule.CONSTRAINT) 493 return "constraint"; 494 return "?"; 495 } 496 497 public String toSystem(TypeDerivationRule code) { 498 return code.getSystem(); 499 } 500 } 501 502 @Block() 503 public static class StructureDefinitionMappingComponent extends BackboneElement implements IBaseBackboneElement { 504 /** 505 * An Internal id that is used to identify this mapping set when specific 506 * mappings are made. 507 */ 508 @Child(name = "identity", type = { IdType.class }, order = 1, min = 1, max = 1, modifier = false, summary = false) 509 @Description(shortDefinition = "Internal id when this mapping is used", formalDefinition = "An Internal id that is used to identify this mapping set when specific mappings are made.") 510 protected IdType identity; 511 512 /** 513 * An absolute URI that identifies the specification that this mapping is 514 * expressed to. 515 */ 516 @Child(name = "uri", type = { UriType.class }, order = 2, min = 0, max = 1, modifier = false, summary = false) 517 @Description(shortDefinition = "Identifies what this mapping refers to", formalDefinition = "An absolute URI that identifies the specification that this mapping is expressed to.") 518 protected UriType uri; 519 520 /** 521 * A name for the specification that is being mapped to. 522 */ 523 @Child(name = "name", type = { StringType.class }, order = 3, min = 0, max = 1, modifier = false, summary = false) 524 @Description(shortDefinition = "Names what this mapping refers to", formalDefinition = "A name for the specification that is being mapped to.") 525 protected StringType name; 526 527 /** 528 * Comments about this mapping, including version notes, issues, scope 529 * limitations, and other important notes for usage. 530 */ 531 @Child(name = "comment", type = { 532 StringType.class }, order = 4, min = 0, max = 1, modifier = false, summary = false) 533 @Description(shortDefinition = "Versions, Issues, Scope limitations etc.", formalDefinition = "Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.") 534 protected StringType comment; 535 536 private static final long serialVersionUID = 9610265L; 537 538 /** 539 * Constructor 540 */ 541 public StructureDefinitionMappingComponent() { 542 super(); 543 } 544 545 /** 546 * Constructor 547 */ 548 public StructureDefinitionMappingComponent(IdType identity) { 549 super(); 550 this.identity = identity; 551 } 552 553 /** 554 * @return {@link #identity} (An Internal id that is used to identify this 555 * mapping set when specific mappings are made.). This is the underlying 556 * object with id, value and extensions. The accessor "getIdentity" 557 * gives direct access to the value 558 */ 559 public IdType getIdentityElement() { 560 if (this.identity == null) 561 if (Configuration.errorOnAutoCreate()) 562 throw new Error("Attempt to auto-create StructureDefinitionMappingComponent.identity"); 563 else if (Configuration.doAutoCreate()) 564 this.identity = new IdType(); // bb 565 return this.identity; 566 } 567 568 public boolean hasIdentityElement() { 569 return this.identity != null && !this.identity.isEmpty(); 570 } 571 572 public boolean hasIdentity() { 573 return this.identity != null && !this.identity.isEmpty(); 574 } 575 576 /** 577 * @param value {@link #identity} (An Internal id that is used to identify this 578 * mapping set when specific mappings are made.). This is the 579 * underlying object with id, value and extensions. The accessor 580 * "getIdentity" gives direct access to the value 581 */ 582 public StructureDefinitionMappingComponent setIdentityElement(IdType value) { 583 this.identity = value; 584 return this; 585 } 586 587 /** 588 * @return An Internal id that is used to identify this mapping set when 589 * specific mappings are made. 590 */ 591 public String getIdentity() { 592 return this.identity == null ? null : this.identity.getValue(); 593 } 594 595 /** 596 * @param value An Internal id that is used to identify this mapping set when 597 * specific mappings are made. 598 */ 599 public StructureDefinitionMappingComponent setIdentity(String value) { 600 if (this.identity == null) 601 this.identity = new IdType(); 602 this.identity.setValue(value); 603 return this; 604 } 605 606 /** 607 * @return {@link #uri} (An absolute URI that identifies the specification that 608 * this mapping is expressed to.). This is the underlying object with 609 * id, value and extensions. The accessor "getUri" gives direct access 610 * to the value 611 */ 612 public UriType getUriElement() { 613 if (this.uri == null) 614 if (Configuration.errorOnAutoCreate()) 615 throw new Error("Attempt to auto-create StructureDefinitionMappingComponent.uri"); 616 else if (Configuration.doAutoCreate()) 617 this.uri = new UriType(); // bb 618 return this.uri; 619 } 620 621 public boolean hasUriElement() { 622 return this.uri != null && !this.uri.isEmpty(); 623 } 624 625 public boolean hasUri() { 626 return this.uri != null && !this.uri.isEmpty(); 627 } 628 629 /** 630 * @param value {@link #uri} (An absolute URI that identifies the specification 631 * that this mapping is expressed to.). This is the underlying 632 * object with id, value and extensions. The accessor "getUri" 633 * gives direct access to the value 634 */ 635 public StructureDefinitionMappingComponent setUriElement(UriType value) { 636 this.uri = value; 637 return this; 638 } 639 640 /** 641 * @return An absolute URI that identifies the specification that this mapping 642 * is expressed to. 643 */ 644 public String getUri() { 645 return this.uri == null ? null : this.uri.getValue(); 646 } 647 648 /** 649 * @param value An absolute URI that identifies the specification that this 650 * mapping is expressed to. 651 */ 652 public StructureDefinitionMappingComponent setUri(String value) { 653 if (Utilities.noString(value)) 654 this.uri = null; 655 else { 656 if (this.uri == null) 657 this.uri = new UriType(); 658 this.uri.setValue(value); 659 } 660 return this; 661 } 662 663 /** 664 * @return {@link #name} (A name for the specification that is being mapped 665 * to.). This is the underlying object with id, value and extensions. 666 * The accessor "getName" gives direct access to the value 667 */ 668 public StringType getNameElement() { 669 if (this.name == null) 670 if (Configuration.errorOnAutoCreate()) 671 throw new Error("Attempt to auto-create StructureDefinitionMappingComponent.name"); 672 else if (Configuration.doAutoCreate()) 673 this.name = new StringType(); // bb 674 return this.name; 675 } 676 677 public boolean hasNameElement() { 678 return this.name != null && !this.name.isEmpty(); 679 } 680 681 public boolean hasName() { 682 return this.name != null && !this.name.isEmpty(); 683 } 684 685 /** 686 * @param value {@link #name} (A name for the specification that is being mapped 687 * to.). This is the underlying object with id, value and 688 * extensions. The accessor "getName" gives direct access to the 689 * value 690 */ 691 public StructureDefinitionMappingComponent setNameElement(StringType value) { 692 this.name = value; 693 return this; 694 } 695 696 /** 697 * @return A name for the specification that is being mapped to. 698 */ 699 public String getName() { 700 return this.name == null ? null : this.name.getValue(); 701 } 702 703 /** 704 * @param value A name for the specification that is being mapped to. 705 */ 706 public StructureDefinitionMappingComponent setName(String value) { 707 if (Utilities.noString(value)) 708 this.name = null; 709 else { 710 if (this.name == null) 711 this.name = new StringType(); 712 this.name.setValue(value); 713 } 714 return this; 715 } 716 717 /** 718 * @return {@link #comment} (Comments about this mapping, including version 719 * notes, issues, scope limitations, and other important notes for 720 * usage.). This is the underlying object with id, value and extensions. 721 * The accessor "getComment" gives direct access to the value 722 */ 723 public StringType getCommentElement() { 724 if (this.comment == null) 725 if (Configuration.errorOnAutoCreate()) 726 throw new Error("Attempt to auto-create StructureDefinitionMappingComponent.comment"); 727 else if (Configuration.doAutoCreate()) 728 this.comment = new StringType(); // bb 729 return this.comment; 730 } 731 732 public boolean hasCommentElement() { 733 return this.comment != null && !this.comment.isEmpty(); 734 } 735 736 public boolean hasComment() { 737 return this.comment != null && !this.comment.isEmpty(); 738 } 739 740 /** 741 * @param value {@link #comment} (Comments about this mapping, including version 742 * notes, issues, scope limitations, and other important notes for 743 * usage.). This is the underlying object with id, value and 744 * extensions. The accessor "getComment" gives direct access to the 745 * value 746 */ 747 public StructureDefinitionMappingComponent setCommentElement(StringType value) { 748 this.comment = value; 749 return this; 750 } 751 752 /** 753 * @return Comments about this mapping, including version notes, issues, scope 754 * limitations, and other important notes for usage. 755 */ 756 public String getComment() { 757 return this.comment == null ? null : this.comment.getValue(); 758 } 759 760 /** 761 * @param value Comments about this mapping, including version notes, issues, 762 * scope limitations, and other important notes for usage. 763 */ 764 public StructureDefinitionMappingComponent setComment(String value) { 765 if (Utilities.noString(value)) 766 this.comment = null; 767 else { 768 if (this.comment == null) 769 this.comment = new StringType(); 770 this.comment.setValue(value); 771 } 772 return this; 773 } 774 775 protected void listChildren(List<Property> children) { 776 super.listChildren(children); 777 children.add(new Property("identity", "id", 778 "An Internal id that is used to identify this mapping set when specific mappings are made.", 0, 1, identity)); 779 children.add(new Property("uri", "uri", 780 "An absolute URI that identifies the specification that this mapping is expressed to.", 0, 1, uri)); 781 children.add(new Property("name", "string", "A name for the specification that is being mapped to.", 0, 1, name)); 782 children.add(new Property("comment", "string", 783 "Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.", 784 0, 1, comment)); 785 } 786 787 @Override 788 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 789 switch (_hash) { 790 case -135761730: 791 /* identity */ return new Property("identity", "id", 792 "An Internal id that is used to identify this mapping set when specific mappings are made.", 0, 1, 793 identity); 794 case 116076: 795 /* uri */ return new Property("uri", "uri", 796 "An absolute URI that identifies the specification that this mapping is expressed to.", 0, 1, uri); 797 case 3373707: 798 /* name */ return new Property("name", "string", "A name for the specification that is being mapped to.", 0, 1, 799 name); 800 case 950398559: 801 /* comment */ return new Property("comment", "string", 802 "Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.", 803 0, 1, comment); 804 default: 805 return super.getNamedProperty(_hash, _name, _checkValid); 806 } 807 808 } 809 810 @Override 811 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 812 switch (hash) { 813 case -135761730: 814 /* identity */ return this.identity == null ? new Base[0] : new Base[] { this.identity }; // IdType 815 case 116076: 816 /* uri */ return this.uri == null ? new Base[0] : new Base[] { this.uri }; // UriType 817 case 3373707: 818 /* name */ return this.name == null ? new Base[0] : new Base[] { this.name }; // StringType 819 case 950398559: 820 /* comment */ return this.comment == null ? new Base[0] : new Base[] { this.comment }; // StringType 821 default: 822 return super.getProperty(hash, name, checkValid); 823 } 824 825 } 826 827 @Override 828 public Base setProperty(int hash, String name, Base value) throws FHIRException { 829 switch (hash) { 830 case -135761730: // identity 831 this.identity = castToId(value); // IdType 832 return value; 833 case 116076: // uri 834 this.uri = castToUri(value); // UriType 835 return value; 836 case 3373707: // name 837 this.name = castToString(value); // StringType 838 return value; 839 case 950398559: // comment 840 this.comment = castToString(value); // StringType 841 return value; 842 default: 843 return super.setProperty(hash, name, value); 844 } 845 846 } 847 848 @Override 849 public Base setProperty(String name, Base value) throws FHIRException { 850 if (name.equals("identity")) { 851 this.identity = castToId(value); // IdType 852 } else if (name.equals("uri")) { 853 this.uri = castToUri(value); // UriType 854 } else if (name.equals("name")) { 855 this.name = castToString(value); // StringType 856 } else if (name.equals("comment")) { 857 this.comment = castToString(value); // StringType 858 } else 859 return super.setProperty(name, value); 860 return value; 861 } 862 863 @Override 864 public Base makeProperty(int hash, String name) throws FHIRException { 865 switch (hash) { 866 case -135761730: 867 return getIdentityElement(); 868 case 116076: 869 return getUriElement(); 870 case 3373707: 871 return getNameElement(); 872 case 950398559: 873 return getCommentElement(); 874 default: 875 return super.makeProperty(hash, name); 876 } 877 878 } 879 880 @Override 881 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 882 switch (hash) { 883 case -135761730: 884 /* identity */ return new String[] { "id" }; 885 case 116076: 886 /* uri */ return new String[] { "uri" }; 887 case 3373707: 888 /* name */ return new String[] { "string" }; 889 case 950398559: 890 /* comment */ return new String[] { "string" }; 891 default: 892 return super.getTypesForProperty(hash, name); 893 } 894 895 } 896 897 @Override 898 public Base addChild(String name) throws FHIRException { 899 if (name.equals("identity")) { 900 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.identity"); 901 } else if (name.equals("uri")) { 902 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.uri"); 903 } else if (name.equals("name")) { 904 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.name"); 905 } else if (name.equals("comment")) { 906 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.comment"); 907 } else 908 return super.addChild(name); 909 } 910 911 public StructureDefinitionMappingComponent copy() { 912 StructureDefinitionMappingComponent dst = new StructureDefinitionMappingComponent(); 913 copyValues(dst); 914 return dst; 915 } 916 917 public void copyValues(StructureDefinitionMappingComponent dst) { 918 super.copyValues(dst); 919 dst.identity = identity == null ? null : identity.copy(); 920 dst.uri = uri == null ? null : uri.copy(); 921 dst.name = name == null ? null : name.copy(); 922 dst.comment = comment == null ? null : comment.copy(); 923 } 924 925 @Override 926 public boolean equalsDeep(Base other_) { 927 if (!super.equalsDeep(other_)) 928 return false; 929 if (!(other_ instanceof StructureDefinitionMappingComponent)) 930 return false; 931 StructureDefinitionMappingComponent o = (StructureDefinitionMappingComponent) other_; 932 return compareDeep(identity, o.identity, true) && compareDeep(uri, o.uri, true) && compareDeep(name, o.name, true) 933 && compareDeep(comment, o.comment, true); 934 } 935 936 @Override 937 public boolean equalsShallow(Base other_) { 938 if (!super.equalsShallow(other_)) 939 return false; 940 if (!(other_ instanceof StructureDefinitionMappingComponent)) 941 return false; 942 StructureDefinitionMappingComponent o = (StructureDefinitionMappingComponent) other_; 943 return compareValues(identity, o.identity, true) && compareValues(uri, o.uri, true) 944 && compareValues(name, o.name, true) && compareValues(comment, o.comment, true); 945 } 946 947 public boolean isEmpty() { 948 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identity, uri, name, comment); 949 } 950 951 public String fhirType() { 952 return "StructureDefinition.mapping"; 953 954 } 955 956 } 957 958 @Block() 959 public static class StructureDefinitionContextComponent extends BackboneElement implements IBaseBackboneElement { 960 /** 961 * Defines how to interpret the expression that defines what the context of the 962 * extension is. 963 */ 964 @Child(name = "type", type = { CodeType.class }, order = 1, min = 1, max = 1, modifier = false, summary = true) 965 @Description(shortDefinition = "fhirpath | element | extension", formalDefinition = "Defines how to interpret the expression that defines what the context of the extension is.") 966 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/extension-context-type") 967 protected Enumeration<ExtensionContextType> type; 968 969 /** 970 * An expression that defines where an extension can be used in resources. 971 */ 972 @Child(name = "expression", type = { 973 StringType.class }, order = 2, min = 1, max = 1, modifier = false, summary = true) 974 @Description(shortDefinition = "Where the extension can be used in instances", formalDefinition = "An expression that defines where an extension can be used in resources.") 975 protected StringType expression; 976 977 private static final long serialVersionUID = 1958074856L; 978 979 /** 980 * Constructor 981 */ 982 public StructureDefinitionContextComponent() { 983 super(); 984 } 985 986 /** 987 * Constructor 988 */ 989 public StructureDefinitionContextComponent(Enumeration<ExtensionContextType> type, StringType expression) { 990 super(); 991 this.type = type; 992 this.expression = expression; 993 } 994 995 /** 996 * @return {@link #type} (Defines how to interpret the expression that defines 997 * what the context of the extension is.). This is the underlying object 998 * with id, value and extensions. The accessor "getType" gives direct 999 * access to the value 1000 */ 1001 public Enumeration<ExtensionContextType> getTypeElement() { 1002 if (this.type == null) 1003 if (Configuration.errorOnAutoCreate()) 1004 throw new Error("Attempt to auto-create StructureDefinitionContextComponent.type"); 1005 else if (Configuration.doAutoCreate()) 1006 this.type = new Enumeration<ExtensionContextType>(new ExtensionContextTypeEnumFactory()); // bb 1007 return this.type; 1008 } 1009 1010 public boolean hasTypeElement() { 1011 return this.type != null && !this.type.isEmpty(); 1012 } 1013 1014 public boolean hasType() { 1015 return this.type != null && !this.type.isEmpty(); 1016 } 1017 1018 /** 1019 * @param value {@link #type} (Defines how to interpret the expression that 1020 * defines what the context of the extension is.). This is the 1021 * underlying object with id, value and extensions. The accessor 1022 * "getType" gives direct access to the value 1023 */ 1024 public StructureDefinitionContextComponent setTypeElement(Enumeration<ExtensionContextType> value) { 1025 this.type = value; 1026 return this; 1027 } 1028 1029 /** 1030 * @return Defines how to interpret the expression that defines what the context 1031 * of the extension is. 1032 */ 1033 public ExtensionContextType getType() { 1034 return this.type == null ? null : this.type.getValue(); 1035 } 1036 1037 /** 1038 * @param value Defines how to interpret the expression that defines what the 1039 * context of the extension is. 1040 */ 1041 public StructureDefinitionContextComponent setType(ExtensionContextType value) { 1042 if (this.type == null) 1043 this.type = new Enumeration<ExtensionContextType>(new ExtensionContextTypeEnumFactory()); 1044 this.type.setValue(value); 1045 return this; 1046 } 1047 1048 /** 1049 * @return {@link #expression} (An expression that defines where an extension 1050 * can be used in resources.). This is the underlying object with id, 1051 * value and extensions. The accessor "getExpression" gives direct 1052 * access to the value 1053 */ 1054 public StringType getExpressionElement() { 1055 if (this.expression == null) 1056 if (Configuration.errorOnAutoCreate()) 1057 throw new Error("Attempt to auto-create StructureDefinitionContextComponent.expression"); 1058 else if (Configuration.doAutoCreate()) 1059 this.expression = new StringType(); // bb 1060 return this.expression; 1061 } 1062 1063 public boolean hasExpressionElement() { 1064 return this.expression != null && !this.expression.isEmpty(); 1065 } 1066 1067 public boolean hasExpression() { 1068 return this.expression != null && !this.expression.isEmpty(); 1069 } 1070 1071 /** 1072 * @param value {@link #expression} (An expression that defines where an 1073 * extension can be used in resources.). This is the underlying 1074 * object with id, value and extensions. The accessor 1075 * "getExpression" gives direct access to the value 1076 */ 1077 public StructureDefinitionContextComponent setExpressionElement(StringType value) { 1078 this.expression = value; 1079 return this; 1080 } 1081 1082 /** 1083 * @return An expression that defines where an extension can be used in 1084 * resources. 1085 */ 1086 public String getExpression() { 1087 return this.expression == null ? null : this.expression.getValue(); 1088 } 1089 1090 /** 1091 * @param value An expression that defines where an extension can be used in 1092 * resources. 1093 */ 1094 public StructureDefinitionContextComponent setExpression(String value) { 1095 if (this.expression == null) 1096 this.expression = new StringType(); 1097 this.expression.setValue(value); 1098 return this; 1099 } 1100 1101 protected void listChildren(List<Property> children) { 1102 super.listChildren(children); 1103 children.add(new Property("type", "code", 1104 "Defines how to interpret the expression that defines what the context of the extension is.", 0, 1, type)); 1105 children.add(new Property("expression", "string", 1106 "An expression that defines where an extension can be used in resources.", 0, 1, expression)); 1107 } 1108 1109 @Override 1110 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1111 switch (_hash) { 1112 case 3575610: 1113 /* type */ return new Property("type", "code", 1114 "Defines how to interpret the expression that defines what the context of the extension is.", 0, 1, type); 1115 case -1795452264: 1116 /* expression */ return new Property("expression", "string", 1117 "An expression that defines where an extension can be used in resources.", 0, 1, expression); 1118 default: 1119 return super.getNamedProperty(_hash, _name, _checkValid); 1120 } 1121 1122 } 1123 1124 @Override 1125 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1126 switch (hash) { 1127 case 3575610: 1128 /* type */ return this.type == null ? new Base[0] : new Base[] { this.type }; // Enumeration<ExtensionContextType> 1129 case -1795452264: 1130 /* expression */ return this.expression == null ? new Base[0] : new Base[] { this.expression }; // StringType 1131 default: 1132 return super.getProperty(hash, name, checkValid); 1133 } 1134 1135 } 1136 1137 @Override 1138 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1139 switch (hash) { 1140 case 3575610: // type 1141 value = new ExtensionContextTypeEnumFactory().fromType(castToCode(value)); 1142 this.type = (Enumeration) value; // Enumeration<ExtensionContextType> 1143 return value; 1144 case -1795452264: // expression 1145 this.expression = castToString(value); // StringType 1146 return value; 1147 default: 1148 return super.setProperty(hash, name, value); 1149 } 1150 1151 } 1152 1153 @Override 1154 public Base setProperty(String name, Base value) throws FHIRException { 1155 if (name.equals("type")) { 1156 value = new ExtensionContextTypeEnumFactory().fromType(castToCode(value)); 1157 this.type = (Enumeration) value; // Enumeration<ExtensionContextType> 1158 } else if (name.equals("expression")) { 1159 this.expression = castToString(value); // StringType 1160 } else 1161 return super.setProperty(name, value); 1162 return value; 1163 } 1164 1165 @Override 1166 public Base makeProperty(int hash, String name) throws FHIRException { 1167 switch (hash) { 1168 case 3575610: 1169 return getTypeElement(); 1170 case -1795452264: 1171 return getExpressionElement(); 1172 default: 1173 return super.makeProperty(hash, name); 1174 } 1175 1176 } 1177 1178 @Override 1179 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1180 switch (hash) { 1181 case 3575610: 1182 /* type */ return new String[] { "code" }; 1183 case -1795452264: 1184 /* expression */ return new String[] { "string" }; 1185 default: 1186 return super.getTypesForProperty(hash, name); 1187 } 1188 1189 } 1190 1191 @Override 1192 public Base addChild(String name) throws FHIRException { 1193 if (name.equals("type")) { 1194 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.type"); 1195 } else if (name.equals("expression")) { 1196 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.expression"); 1197 } else 1198 return super.addChild(name); 1199 } 1200 1201 public StructureDefinitionContextComponent copy() { 1202 StructureDefinitionContextComponent dst = new StructureDefinitionContextComponent(); 1203 copyValues(dst); 1204 return dst; 1205 } 1206 1207 public void copyValues(StructureDefinitionContextComponent dst) { 1208 super.copyValues(dst); 1209 dst.type = type == null ? null : type.copy(); 1210 dst.expression = expression == null ? null : expression.copy(); 1211 } 1212 1213 @Override 1214 public boolean equalsDeep(Base other_) { 1215 if (!super.equalsDeep(other_)) 1216 return false; 1217 if (!(other_ instanceof StructureDefinitionContextComponent)) 1218 return false; 1219 StructureDefinitionContextComponent o = (StructureDefinitionContextComponent) other_; 1220 return compareDeep(type, o.type, true) && compareDeep(expression, o.expression, true); 1221 } 1222 1223 @Override 1224 public boolean equalsShallow(Base other_) { 1225 if (!super.equalsShallow(other_)) 1226 return false; 1227 if (!(other_ instanceof StructureDefinitionContextComponent)) 1228 return false; 1229 StructureDefinitionContextComponent o = (StructureDefinitionContextComponent) other_; 1230 return compareValues(type, o.type, true) && compareValues(expression, o.expression, true); 1231 } 1232 1233 public boolean isEmpty() { 1234 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, expression); 1235 } 1236 1237 public String fhirType() { 1238 return "StructureDefinition.context"; 1239 1240 } 1241 1242 } 1243 1244 @Block() 1245 public static class StructureDefinitionSnapshotComponent extends BackboneElement implements IBaseBackboneElement { 1246 /** 1247 * Captures constraints on each element within the resource. 1248 */ 1249 @Child(name = "element", type = { 1250 ElementDefinition.class }, order = 1, min = 1, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 1251 @Description(shortDefinition = "Definition of elements in the resource (if no StructureDefinition)", formalDefinition = "Captures constraints on each element within the resource.") 1252 protected List<ElementDefinition> element; 1253 1254 private static final long serialVersionUID = 53896641L; 1255 1256 /** 1257 * Constructor 1258 */ 1259 public StructureDefinitionSnapshotComponent() { 1260 super(); 1261 } 1262 1263 /** 1264 * @return {@link #element} (Captures constraints on each element within the 1265 * resource.) 1266 */ 1267 public List<ElementDefinition> getElement() { 1268 if (this.element == null) 1269 this.element = new ArrayList<ElementDefinition>(); 1270 return this.element; 1271 } 1272 1273 /** 1274 * @return Returns a reference to <code>this</code> for easy method chaining 1275 */ 1276 public StructureDefinitionSnapshotComponent setElement(List<ElementDefinition> theElement) { 1277 this.element = theElement; 1278 return this; 1279 } 1280 1281 public boolean hasElement() { 1282 if (this.element == null) 1283 return false; 1284 for (ElementDefinition item : this.element) 1285 if (!item.isEmpty()) 1286 return true; 1287 return false; 1288 } 1289 1290 public ElementDefinition addElement() { // 3 1291 ElementDefinition t = new ElementDefinition(); 1292 if (this.element == null) 1293 this.element = new ArrayList<ElementDefinition>(); 1294 this.element.add(t); 1295 return t; 1296 } 1297 1298 public StructureDefinitionSnapshotComponent addElement(ElementDefinition t) { // 3 1299 if (t == null) 1300 return this; 1301 if (this.element == null) 1302 this.element = new ArrayList<ElementDefinition>(); 1303 this.element.add(t); 1304 return this; 1305 } 1306 1307 /** 1308 * @return The first repetition of repeating field {@link #element}, creating it 1309 * if it does not already exist 1310 */ 1311 public ElementDefinition getElementFirstRep() { 1312 if (getElement().isEmpty()) { 1313 addElement(); 1314 } 1315 return getElement().get(0); 1316 } 1317 1318 protected void listChildren(List<Property> children) { 1319 super.listChildren(children); 1320 children.add(new Property("element", "ElementDefinition", 1321 "Captures constraints on each element within the resource.", 0, java.lang.Integer.MAX_VALUE, element)); 1322 } 1323 1324 @Override 1325 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1326 switch (_hash) { 1327 case -1662836996: 1328 /* element */ return new Property("element", "ElementDefinition", 1329 "Captures constraints on each element within the resource.", 0, java.lang.Integer.MAX_VALUE, element); 1330 default: 1331 return super.getNamedProperty(_hash, _name, _checkValid); 1332 } 1333 1334 } 1335 1336 @Override 1337 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1338 switch (hash) { 1339 case -1662836996: 1340 /* element */ return this.element == null ? new Base[0] : this.element.toArray(new Base[this.element.size()]); // ElementDefinition 1341 default: 1342 return super.getProperty(hash, name, checkValid); 1343 } 1344 1345 } 1346 1347 @Override 1348 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1349 switch (hash) { 1350 case -1662836996: // element 1351 this.getElement().add(castToElementDefinition(value)); // ElementDefinition 1352 return value; 1353 default: 1354 return super.setProperty(hash, name, value); 1355 } 1356 1357 } 1358 1359 @Override 1360 public Base setProperty(String name, Base value) throws FHIRException { 1361 if (name.equals("element")) { 1362 this.getElement().add(castToElementDefinition(value)); 1363 } else 1364 return super.setProperty(name, value); 1365 return value; 1366 } 1367 1368 @Override 1369 public Base makeProperty(int hash, String name) throws FHIRException { 1370 switch (hash) { 1371 case -1662836996: 1372 return addElement(); 1373 default: 1374 return super.makeProperty(hash, name); 1375 } 1376 1377 } 1378 1379 @Override 1380 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1381 switch (hash) { 1382 case -1662836996: 1383 /* element */ return new String[] { "ElementDefinition" }; 1384 default: 1385 return super.getTypesForProperty(hash, name); 1386 } 1387 1388 } 1389 1390 @Override 1391 public Base addChild(String name) throws FHIRException { 1392 if (name.equals("element")) { 1393 return addElement(); 1394 } else 1395 return super.addChild(name); 1396 } 1397 1398 public StructureDefinitionSnapshotComponent copy() { 1399 StructureDefinitionSnapshotComponent dst = new StructureDefinitionSnapshotComponent(); 1400 copyValues(dst); 1401 return dst; 1402 } 1403 1404 public void copyValues(StructureDefinitionSnapshotComponent dst) { 1405 super.copyValues(dst); 1406 if (element != null) { 1407 dst.element = new ArrayList<ElementDefinition>(); 1408 for (ElementDefinition i : element) 1409 dst.element.add(i.copy()); 1410 } 1411 ; 1412 } 1413 1414 @Override 1415 public boolean equalsDeep(Base other_) { 1416 if (!super.equalsDeep(other_)) 1417 return false; 1418 if (!(other_ instanceof StructureDefinitionSnapshotComponent)) 1419 return false; 1420 StructureDefinitionSnapshotComponent o = (StructureDefinitionSnapshotComponent) other_; 1421 return compareDeep(element, o.element, true); 1422 } 1423 1424 @Override 1425 public boolean equalsShallow(Base other_) { 1426 if (!super.equalsShallow(other_)) 1427 return false; 1428 if (!(other_ instanceof StructureDefinitionSnapshotComponent)) 1429 return false; 1430 StructureDefinitionSnapshotComponent o = (StructureDefinitionSnapshotComponent) other_; 1431 return true; 1432 } 1433 1434 public boolean isEmpty() { 1435 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(element); 1436 } 1437 1438 public String fhirType() { 1439 return "StructureDefinition.snapshot"; 1440 1441 } 1442 1443 } 1444 1445 @Block() 1446 public static class StructureDefinitionDifferentialComponent extends BackboneElement implements IBaseBackboneElement { 1447 /** 1448 * Captures constraints on each element within the resource. 1449 */ 1450 @Child(name = "element", type = { 1451 ElementDefinition.class }, order = 1, min = 1, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 1452 @Description(shortDefinition = "Definition of elements in the resource (if no StructureDefinition)", formalDefinition = "Captures constraints on each element within the resource.") 1453 protected List<ElementDefinition> element; 1454 1455 private static final long serialVersionUID = 53896641L; 1456 1457 /** 1458 * Constructor 1459 */ 1460 public StructureDefinitionDifferentialComponent() { 1461 super(); 1462 } 1463 1464 /** 1465 * @return {@link #element} (Captures constraints on each element within the 1466 * resource.) 1467 */ 1468 public List<ElementDefinition> getElement() { 1469 if (this.element == null) 1470 this.element = new ArrayList<ElementDefinition>(); 1471 return this.element; 1472 } 1473 1474 /** 1475 * @return Returns a reference to <code>this</code> for easy method chaining 1476 */ 1477 public StructureDefinitionDifferentialComponent setElement(List<ElementDefinition> theElement) { 1478 this.element = theElement; 1479 return this; 1480 } 1481 1482 public boolean hasElement() { 1483 if (this.element == null) 1484 return false; 1485 for (ElementDefinition item : this.element) 1486 if (!item.isEmpty()) 1487 return true; 1488 return false; 1489 } 1490 1491 public ElementDefinition addElement() { // 3 1492 ElementDefinition t = new ElementDefinition(); 1493 if (this.element == null) 1494 this.element = new ArrayList<ElementDefinition>(); 1495 this.element.add(t); 1496 return t; 1497 } 1498 1499 public StructureDefinitionDifferentialComponent addElement(ElementDefinition t) { // 3 1500 if (t == null) 1501 return this; 1502 if (this.element == null) 1503 this.element = new ArrayList<ElementDefinition>(); 1504 this.element.add(t); 1505 return this; 1506 } 1507 1508 /** 1509 * @return The first repetition of repeating field {@link #element}, creating it 1510 * if it does not already exist 1511 */ 1512 public ElementDefinition getElementFirstRep() { 1513 if (getElement().isEmpty()) { 1514 addElement(); 1515 } 1516 return getElement().get(0); 1517 } 1518 1519 protected void listChildren(List<Property> children) { 1520 super.listChildren(children); 1521 children.add(new Property("element", "ElementDefinition", 1522 "Captures constraints on each element within the resource.", 0, java.lang.Integer.MAX_VALUE, element)); 1523 } 1524 1525 @Override 1526 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1527 switch (_hash) { 1528 case -1662836996: 1529 /* element */ return new Property("element", "ElementDefinition", 1530 "Captures constraints on each element within the resource.", 0, java.lang.Integer.MAX_VALUE, element); 1531 default: 1532 return super.getNamedProperty(_hash, _name, _checkValid); 1533 } 1534 1535 } 1536 1537 @Override 1538 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1539 switch (hash) { 1540 case -1662836996: 1541 /* element */ return this.element == null ? new Base[0] : this.element.toArray(new Base[this.element.size()]); // ElementDefinition 1542 default: 1543 return super.getProperty(hash, name, checkValid); 1544 } 1545 1546 } 1547 1548 @Override 1549 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1550 switch (hash) { 1551 case -1662836996: // element 1552 this.getElement().add(castToElementDefinition(value)); // ElementDefinition 1553 return value; 1554 default: 1555 return super.setProperty(hash, name, value); 1556 } 1557 1558 } 1559 1560 @Override 1561 public Base setProperty(String name, Base value) throws FHIRException { 1562 if (name.equals("element")) { 1563 this.getElement().add(castToElementDefinition(value)); 1564 } else 1565 return super.setProperty(name, value); 1566 return value; 1567 } 1568 1569 @Override 1570 public Base makeProperty(int hash, String name) throws FHIRException { 1571 switch (hash) { 1572 case -1662836996: 1573 return addElement(); 1574 default: 1575 return super.makeProperty(hash, name); 1576 } 1577 1578 } 1579 1580 @Override 1581 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1582 switch (hash) { 1583 case -1662836996: 1584 /* element */ return new String[] { "ElementDefinition" }; 1585 default: 1586 return super.getTypesForProperty(hash, name); 1587 } 1588 1589 } 1590 1591 @Override 1592 public Base addChild(String name) throws FHIRException { 1593 if (name.equals("element")) { 1594 return addElement(); 1595 } else 1596 return super.addChild(name); 1597 } 1598 1599 public StructureDefinitionDifferentialComponent copy() { 1600 StructureDefinitionDifferentialComponent dst = new StructureDefinitionDifferentialComponent(); 1601 copyValues(dst); 1602 return dst; 1603 } 1604 1605 public void copyValues(StructureDefinitionDifferentialComponent dst) { 1606 super.copyValues(dst); 1607 if (element != null) { 1608 dst.element = new ArrayList<ElementDefinition>(); 1609 for (ElementDefinition i : element) 1610 dst.element.add(i.copy()); 1611 } 1612 ; 1613 } 1614 1615 @Override 1616 public boolean equalsDeep(Base other_) { 1617 if (!super.equalsDeep(other_)) 1618 return false; 1619 if (!(other_ instanceof StructureDefinitionDifferentialComponent)) 1620 return false; 1621 StructureDefinitionDifferentialComponent o = (StructureDefinitionDifferentialComponent) other_; 1622 return compareDeep(element, o.element, true); 1623 } 1624 1625 @Override 1626 public boolean equalsShallow(Base other_) { 1627 if (!super.equalsShallow(other_)) 1628 return false; 1629 if (!(other_ instanceof StructureDefinitionDifferentialComponent)) 1630 return false; 1631 StructureDefinitionDifferentialComponent o = (StructureDefinitionDifferentialComponent) other_; 1632 return true; 1633 } 1634 1635 public boolean isEmpty() { 1636 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(element); 1637 } 1638 1639 public String fhirType() { 1640 return "StructureDefinition.differential"; 1641 1642 } 1643 1644 } 1645 1646 /** 1647 * A formal identifier that is used to identify this structure definition when 1648 * it is represented in other formats, or referenced in a specification, model, 1649 * design or an instance. 1650 */ 1651 @Child(name = "identifier", type = { 1652 Identifier.class }, order = 0, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 1653 @Description(shortDefinition = "Additional identifier for the structure definition", formalDefinition = "A formal identifier that is used to identify this structure definition when it is represented in other formats, or referenced in a specification, model, design or an instance.") 1654 protected List<Identifier> identifier; 1655 1656 /** 1657 * Explanation of why this structure definition is needed and why it has been 1658 * designed as it has. 1659 */ 1660 @Child(name = "purpose", type = { 1661 MarkdownType.class }, order = 1, min = 0, max = 1, modifier = false, summary = false) 1662 @Description(shortDefinition = "Why this structure definition is defined", formalDefinition = "Explanation of why this structure definition is needed and why it has been designed as it has.") 1663 protected MarkdownType purpose; 1664 1665 /** 1666 * A copyright statement relating to the structure definition and/or its 1667 * contents. Copyright statements are generally legal restrictions on the use 1668 * and publishing of the structure definition. 1669 */ 1670 @Child(name = "copyright", type = { 1671 MarkdownType.class }, order = 2, min = 0, max = 1, modifier = false, summary = false) 1672 @Description(shortDefinition = "Use and/or publishing restrictions", formalDefinition = "A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition.") 1673 protected MarkdownType copyright; 1674 1675 /** 1676 * A set of key words or terms from external terminologies that may be used to 1677 * assist with indexing and searching of templates nby describing the use of 1678 * this structure definition, or the content it describes. 1679 */ 1680 @Child(name = "keyword", type = { 1681 Coding.class }, order = 3, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 1682 @Description(shortDefinition = "Assist with indexing and finding", formalDefinition = "A set of key words or terms from external terminologies that may be used to assist with indexing and searching of templates nby describing the use of this structure definition, or the content it describes.") 1683 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/definition-use") 1684 protected List<Coding> keyword; 1685 1686 /** 1687 * The version of the FHIR specification on which this StructureDefinition is 1688 * based - this is the formal version of the specification, without the revision 1689 * number, e.g. [publication].[major].[minor], which is 4.0.1. for this version. 1690 */ 1691 @Child(name = "fhirVersion", type = { CodeType.class }, order = 4, min = 0, max = 1, modifier = false, summary = true) 1692 @Description(shortDefinition = "FHIR Version this StructureDefinition targets", formalDefinition = "The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 4.0.1. for this version.") 1693 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/FHIR-version") 1694 protected Enumeration<FHIRVersion> fhirVersion; 1695 1696 /** 1697 * An external specification that the content is mapped to. 1698 */ 1699 @Child(name = "mapping", type = {}, order = 5, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 1700 @Description(shortDefinition = "External specification that the content is mapped to", formalDefinition = "An external specification that the content is mapped to.") 1701 protected List<StructureDefinitionMappingComponent> mapping; 1702 1703 /** 1704 * Defines the kind of structure that this definition is describing. 1705 */ 1706 @Child(name = "kind", type = { CodeType.class }, order = 6, min = 1, max = 1, modifier = false, summary = true) 1707 @Description(shortDefinition = "primitive-type | complex-type | resource | logical", formalDefinition = "Defines the kind of structure that this definition is describing.") 1708 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/structure-definition-kind") 1709 protected Enumeration<StructureDefinitionKind> kind; 1710 1711 /** 1712 * Whether structure this definition describes is abstract or not - that is, 1713 * whether the structure is not intended to be instantiated. For Resources and 1714 * Data types, abstract types will never be exchanged between systems. 1715 */ 1716 @Child(name = "abstract", type = { BooleanType.class }, order = 7, min = 1, max = 1, modifier = false, summary = true) 1717 @Description(shortDefinition = "Whether the structure is abstract", formalDefinition = "Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems.") 1718 protected BooleanType abstract_; 1719 1720 /** 1721 * Identifies the types of resource or data type elements to which the extension 1722 * can be applied. 1723 */ 1724 @Child(name = "context", type = {}, order = 8, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 1725 @Description(shortDefinition = "If an extension, where it can be used in instances", formalDefinition = "Identifies the types of resource or data type elements to which the extension can be applied.") 1726 protected List<StructureDefinitionContextComponent> context; 1727 1728 /** 1729 * A set of rules as FHIRPath Invariants about when the extension can be used 1730 * (e.g. co-occurrence variants for the extension). All the rules must be true. 1731 */ 1732 @Child(name = "contextInvariant", type = { 1733 StringType.class }, order = 9, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 1734 @Description(shortDefinition = "FHIRPath invariants - when the extension can be used", formalDefinition = "A set of rules as FHIRPath Invariants about when the extension can be used (e.g. co-occurrence variants for the extension). All the rules must be true.") 1735 protected List<StringType> contextInvariant; 1736 1737 /** 1738 * The type this structure describes. If the derivation kind is 'specialization' 1739 * then this is the master definition for a type, and there is always one of 1740 * these (a data type, an extension, a resource, including abstract ones). 1741 * Otherwise the structure definition is a constraint on the stated type (and in 1742 * this case, the type cannot be an abstract type). References are URLs that are 1743 * relative to http://hl7.org/fhir/StructureDefinition e.g. "string" is a 1744 * reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs 1745 * are only allowed in logical models. 1746 */ 1747 @Child(name = "type", type = { UriType.class }, order = 10, min = 1, max = 1, modifier = false, summary = true) 1748 @Description(shortDefinition = "Type defined or constrained by this structure", formalDefinition = "The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type). 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.") 1749 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/defined-types") 1750 protected UriType type; 1751 1752 /** 1753 * An absolute URI that is the base structure from which this type is derived, 1754 * either by specialization or constraint. 1755 */ 1756 @Child(name = "baseDefinition", type = { 1757 CanonicalType.class }, order = 11, min = 0, max = 1, modifier = false, summary = true) 1758 @Description(shortDefinition = "Definition that this type is constrained/specialized from", formalDefinition = "An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.") 1759 protected CanonicalType baseDefinition; 1760 1761 /** 1762 * How the type relates to the baseDefinition. 1763 */ 1764 @Child(name = "derivation", type = { CodeType.class }, order = 12, min = 0, max = 1, modifier = false, summary = true) 1765 @Description(shortDefinition = "specialization | constraint - How relates to base definition", formalDefinition = "How the type relates to the baseDefinition.") 1766 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/type-derivation-rule") 1767 protected Enumeration<TypeDerivationRule> derivation; 1768 1769 /** 1770 * A snapshot view is expressed in a standalone form that can be used and 1771 * interpreted without considering the base StructureDefinition. 1772 */ 1773 @Child(name = "snapshot", type = {}, order = 13, min = 0, max = 1, modifier = false, summary = false) 1774 @Description(shortDefinition = "Snapshot view of the structure", formalDefinition = "A snapshot view is expressed in a standalone form that can be used and interpreted without considering the base StructureDefinition.") 1775 protected StructureDefinitionSnapshotComponent snapshot; 1776 1777 /** 1778 * A differential view is expressed relative to the base StructureDefinition - a 1779 * statement of differences that it applies. 1780 */ 1781 @Child(name = "differential", type = {}, order = 14, min = 0, max = 1, modifier = false, summary = false) 1782 @Description(shortDefinition = "Differential view of the structure", formalDefinition = "A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.") 1783 protected StructureDefinitionDifferentialComponent differential; 1784 1785 private static final long serialVersionUID = 316076774L; 1786 1787 /** 1788 * Constructor 1789 */ 1790 public StructureDefinition() { 1791 super(); 1792 } 1793 1794 /** 1795 * Constructor 1796 */ 1797 public StructureDefinition(UriType url, StringType name, Enumeration<PublicationStatus> status, 1798 Enumeration<StructureDefinitionKind> kind, BooleanType abstract_, UriType type) { 1799 super(); 1800 this.url = url; 1801 this.name = name; 1802 this.status = status; 1803 this.kind = kind; 1804 this.abstract_ = abstract_; 1805 this.type = type; 1806 } 1807 1808 /** 1809 * @return {@link #url} (An absolute URI that is used to identify this structure 1810 * definition when it is referenced in a specification, model, design or 1811 * an instance; also called its canonical identifier. This SHOULD be 1812 * globally unique and SHOULD be a literal address at which at which an 1813 * authoritative instance of this structure definition is (or will be) 1814 * published. This URL can be the target of a canonical reference. It 1815 * SHALL remain the same when the structure definition is stored on 1816 * different servers.). This is the underlying object with id, value and 1817 * extensions. The accessor "getUrl" gives direct access to the value 1818 */ 1819 public UriType getUrlElement() { 1820 if (this.url == null) 1821 if (Configuration.errorOnAutoCreate()) 1822 throw new Error("Attempt to auto-create StructureDefinition.url"); 1823 else if (Configuration.doAutoCreate()) 1824 this.url = new UriType(); // bb 1825 return this.url; 1826 } 1827 1828 public boolean hasUrlElement() { 1829 return this.url != null && !this.url.isEmpty(); 1830 } 1831 1832 public boolean hasUrl() { 1833 return this.url != null && !this.url.isEmpty(); 1834 } 1835 1836 /** 1837 * @param value {@link #url} (An absolute URI that is used to identify this 1838 * structure definition when it is referenced in a specification, 1839 * model, design or an instance; also called its canonical 1840 * identifier. This SHOULD be globally unique and SHOULD be a 1841 * literal address at which at which an authoritative instance of 1842 * this structure definition is (or will be) published. This URL 1843 * can be the target of a canonical reference. It SHALL remain the 1844 * same when the structure definition is stored on different 1845 * servers.). This is the underlying object with id, value and 1846 * extensions. The accessor "getUrl" gives direct access to the 1847 * value 1848 */ 1849 public StructureDefinition setUrlElement(UriType value) { 1850 this.url = value; 1851 return this; 1852 } 1853 1854 /** 1855 * @return An absolute URI that is used to identify this structure definition 1856 * when it is referenced in a specification, model, design or an 1857 * instance; also called its canonical identifier. This SHOULD be 1858 * globally unique and SHOULD be a literal address at which at which an 1859 * authoritative instance of this structure definition is (or will be) 1860 * published. This URL can be the target of a canonical reference. It 1861 * SHALL remain the same when the structure definition is stored on 1862 * different servers. 1863 */ 1864 public String getUrl() { 1865 return this.url == null ? null : this.url.getValue(); 1866 } 1867 1868 /** 1869 * @param value An absolute URI that is used to identify this structure 1870 * definition when it is referenced in a specification, model, 1871 * design or an instance; also called its canonical identifier. 1872 * This SHOULD be globally unique and SHOULD be a literal address 1873 * at which at which an authoritative instance of this structure 1874 * definition is (or will be) published. This URL can be the target 1875 * of a canonical reference. It SHALL remain the same when the 1876 * structure definition is stored on different servers. 1877 */ 1878 public StructureDefinition setUrl(String value) { 1879 if (this.url == null) 1880 this.url = new UriType(); 1881 this.url.setValue(value); 1882 return this; 1883 } 1884 1885 /** 1886 * @return {@link #identifier} (A formal identifier that is used to identify 1887 * this structure definition when it is represented in other formats, or 1888 * referenced in a specification, model, design or an instance.) 1889 */ 1890 public List<Identifier> getIdentifier() { 1891 if (this.identifier == null) 1892 this.identifier = new ArrayList<Identifier>(); 1893 return this.identifier; 1894 } 1895 1896 /** 1897 * @return Returns a reference to <code>this</code> for easy method chaining 1898 */ 1899 public StructureDefinition setIdentifier(List<Identifier> theIdentifier) { 1900 this.identifier = theIdentifier; 1901 return this; 1902 } 1903 1904 public boolean hasIdentifier() { 1905 if (this.identifier == null) 1906 return false; 1907 for (Identifier item : this.identifier) 1908 if (!item.isEmpty()) 1909 return true; 1910 return false; 1911 } 1912 1913 public Identifier addIdentifier() { // 3 1914 Identifier t = new Identifier(); 1915 if (this.identifier == null) 1916 this.identifier = new ArrayList<Identifier>(); 1917 this.identifier.add(t); 1918 return t; 1919 } 1920 1921 public StructureDefinition addIdentifier(Identifier t) { // 3 1922 if (t == null) 1923 return this; 1924 if (this.identifier == null) 1925 this.identifier = new ArrayList<Identifier>(); 1926 this.identifier.add(t); 1927 return this; 1928 } 1929 1930 /** 1931 * @return The first repetition of repeating field {@link #identifier}, creating 1932 * it if it does not already exist 1933 */ 1934 public Identifier getIdentifierFirstRep() { 1935 if (getIdentifier().isEmpty()) { 1936 addIdentifier(); 1937 } 1938 return getIdentifier().get(0); 1939 } 1940 1941 /** 1942 * @return {@link #version} (The identifier that is used to identify this 1943 * version of the structure definition when it is referenced in a 1944 * specification, model, design or instance. This is an arbitrary value 1945 * managed by the structure definition author and is not expected to be 1946 * globally unique. For example, it might be a timestamp (e.g. yyyymmdd) 1947 * if a managed version is not available. There is also no expectation 1948 * that versions can be placed in a lexicographical sequence.). This is 1949 * the underlying object with id, value and extensions. The accessor 1950 * "getVersion" gives direct access to the value 1951 */ 1952 public StringType getVersionElement() { 1953 if (this.version == null) 1954 if (Configuration.errorOnAutoCreate()) 1955 throw new Error("Attempt to auto-create StructureDefinition.version"); 1956 else if (Configuration.doAutoCreate()) 1957 this.version = new StringType(); // bb 1958 return this.version; 1959 } 1960 1961 public boolean hasVersionElement() { 1962 return this.version != null && !this.version.isEmpty(); 1963 } 1964 1965 public boolean hasVersion() { 1966 return this.version != null && !this.version.isEmpty(); 1967 } 1968 1969 /** 1970 * @param value {@link #version} (The identifier that is used to identify this 1971 * version of the structure definition when it is referenced in a 1972 * specification, model, design or instance. This is an arbitrary 1973 * value managed by the structure definition author and is not 1974 * expected to be globally unique. For example, it might be a 1975 * timestamp (e.g. yyyymmdd) if a managed version is not available. 1976 * There is also no expectation that versions can be placed in a 1977 * lexicographical sequence.). This is the underlying object with 1978 * id, value and extensions. The accessor "getVersion" gives direct 1979 * access to the value 1980 */ 1981 public StructureDefinition setVersionElement(StringType value) { 1982 this.version = value; 1983 return this; 1984 } 1985 1986 /** 1987 * @return The identifier that is used to identify this version of the structure 1988 * definition when it is referenced in a specification, model, design or 1989 * instance. This is an arbitrary value managed by the structure 1990 * definition author and is not expected to be globally unique. For 1991 * example, it might be a timestamp (e.g. yyyymmdd) if a managed version 1992 * is not available. There is also no expectation that versions can be 1993 * placed in a lexicographical sequence. 1994 */ 1995 public String getVersion() { 1996 return this.version == null ? null : this.version.getValue(); 1997 } 1998 1999 /** 2000 * @param value The identifier that is used to identify this version of the 2001 * structure definition when it is referenced in a specification, 2002 * model, design or instance. This is an arbitrary value managed by 2003 * the structure definition author and is not expected to be 2004 * globally unique. For example, it might be a timestamp (e.g. 2005 * yyyymmdd) if a managed version is not available. There is also 2006 * no expectation that versions can be placed in a lexicographical 2007 * sequence. 2008 */ 2009 public StructureDefinition setVersion(String value) { 2010 if (Utilities.noString(value)) 2011 this.version = null; 2012 else { 2013 if (this.version == null) 2014 this.version = new StringType(); 2015 this.version.setValue(value); 2016 } 2017 return this; 2018 } 2019 2020 /** 2021 * @return {@link #name} (A natural language name identifying the structure 2022 * definition. This name should be usable as an identifier for the 2023 * module by machine processing applications such as code generation.). 2024 * This is the underlying object with id, value and extensions. The 2025 * accessor "getName" gives direct access to the value 2026 */ 2027 public StringType getNameElement() { 2028 if (this.name == null) 2029 if (Configuration.errorOnAutoCreate()) 2030 throw new Error("Attempt to auto-create StructureDefinition.name"); 2031 else if (Configuration.doAutoCreate()) 2032 this.name = new StringType(); // bb 2033 return this.name; 2034 } 2035 2036 public boolean hasNameElement() { 2037 return this.name != null && !this.name.isEmpty(); 2038 } 2039 2040 public boolean hasName() { 2041 return this.name != null && !this.name.isEmpty(); 2042 } 2043 2044 /** 2045 * @param value {@link #name} (A natural language name identifying the structure 2046 * definition. This name should be usable as an identifier for the 2047 * module by machine processing applications such as code 2048 * generation.). This is the underlying object with id, value and 2049 * extensions. The accessor "getName" gives direct access to the 2050 * value 2051 */ 2052 public StructureDefinition setNameElement(StringType value) { 2053 this.name = value; 2054 return this; 2055 } 2056 2057 /** 2058 * @return A natural language name identifying the structure definition. This 2059 * name should be usable as an identifier for the module by machine 2060 * processing applications such as code generation. 2061 */ 2062 public String getName() { 2063 return this.name == null ? null : this.name.getValue(); 2064 } 2065 2066 /** 2067 * @param value A natural language name identifying the structure definition. 2068 * This name should be usable as an identifier for the module by 2069 * machine processing applications such as code generation. 2070 */ 2071 public StructureDefinition setName(String value) { 2072 if (this.name == null) 2073 this.name = new StringType(); 2074 this.name.setValue(value); 2075 return this; 2076 } 2077 2078 /** 2079 * @return {@link #title} (A short, descriptive, user-friendly title for the 2080 * structure definition.). This is the underlying object with id, value 2081 * and extensions. The accessor "getTitle" gives direct access to the 2082 * value 2083 */ 2084 public StringType getTitleElement() { 2085 if (this.title == null) 2086 if (Configuration.errorOnAutoCreate()) 2087 throw new Error("Attempt to auto-create StructureDefinition.title"); 2088 else if (Configuration.doAutoCreate()) 2089 this.title = new StringType(); // bb 2090 return this.title; 2091 } 2092 2093 public boolean hasTitleElement() { 2094 return this.title != null && !this.title.isEmpty(); 2095 } 2096 2097 public boolean hasTitle() { 2098 return this.title != null && !this.title.isEmpty(); 2099 } 2100 2101 /** 2102 * @param value {@link #title} (A short, descriptive, user-friendly title for 2103 * the structure definition.). This is the underlying object with 2104 * id, value and extensions. The accessor "getTitle" gives direct 2105 * access to the value 2106 */ 2107 public StructureDefinition setTitleElement(StringType value) { 2108 this.title = value; 2109 return this; 2110 } 2111 2112 /** 2113 * @return A short, descriptive, user-friendly title for the structure 2114 * definition. 2115 */ 2116 public String getTitle() { 2117 return this.title == null ? null : this.title.getValue(); 2118 } 2119 2120 /** 2121 * @param value A short, descriptive, user-friendly title for the structure 2122 * definition. 2123 */ 2124 public StructureDefinition setTitle(String value) { 2125 if (Utilities.noString(value)) 2126 this.title = null; 2127 else { 2128 if (this.title == null) 2129 this.title = new StringType(); 2130 this.title.setValue(value); 2131 } 2132 return this; 2133 } 2134 2135 /** 2136 * @return {@link #status} (The status of this structure definition. Enables 2137 * tracking the life-cycle of the content.). This is the underlying 2138 * object with id, value and extensions. The accessor "getStatus" gives 2139 * direct access to the value 2140 */ 2141 public Enumeration<PublicationStatus> getStatusElement() { 2142 if (this.status == null) 2143 if (Configuration.errorOnAutoCreate()) 2144 throw new Error("Attempt to auto-create StructureDefinition.status"); 2145 else if (Configuration.doAutoCreate()) 2146 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb 2147 return this.status; 2148 } 2149 2150 public boolean hasStatusElement() { 2151 return this.status != null && !this.status.isEmpty(); 2152 } 2153 2154 public boolean hasStatus() { 2155 return this.status != null && !this.status.isEmpty(); 2156 } 2157 2158 /** 2159 * @param value {@link #status} (The status of this structure definition. 2160 * Enables tracking the life-cycle of the content.). This is the 2161 * underlying object with id, value and extensions. The accessor 2162 * "getStatus" gives direct access to the value 2163 */ 2164 public StructureDefinition setStatusElement(Enumeration<PublicationStatus> value) { 2165 this.status = value; 2166 return this; 2167 } 2168 2169 /** 2170 * @return The status of this structure definition. Enables tracking the 2171 * life-cycle of the content. 2172 */ 2173 public PublicationStatus getStatus() { 2174 return this.status == null ? null : this.status.getValue(); 2175 } 2176 2177 /** 2178 * @param value The status of this structure definition. Enables tracking the 2179 * life-cycle of the content. 2180 */ 2181 public StructureDefinition setStatus(PublicationStatus value) { 2182 if (this.status == null) 2183 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); 2184 this.status.setValue(value); 2185 return this; 2186 } 2187 2188 /** 2189 * @return {@link #experimental} (A Boolean value to indicate that this 2190 * structure definition is authored for testing purposes (or 2191 * education/evaluation/marketing) and is not intended to be used for 2192 * genuine usage.). This is the underlying object with id, value and 2193 * extensions. The accessor "getExperimental" gives direct access to the 2194 * value 2195 */ 2196 public BooleanType getExperimentalElement() { 2197 if (this.experimental == null) 2198 if (Configuration.errorOnAutoCreate()) 2199 throw new Error("Attempt to auto-create StructureDefinition.experimental"); 2200 else if (Configuration.doAutoCreate()) 2201 this.experimental = new BooleanType(); // bb 2202 return this.experimental; 2203 } 2204 2205 public boolean hasExperimentalElement() { 2206 return this.experimental != null && !this.experimental.isEmpty(); 2207 } 2208 2209 public boolean hasExperimental() { 2210 return this.experimental != null && !this.experimental.isEmpty(); 2211 } 2212 2213 /** 2214 * @param value {@link #experimental} (A Boolean value to indicate that this 2215 * structure definition is authored for testing purposes (or 2216 * education/evaluation/marketing) and is not intended to be used 2217 * for genuine usage.). This is the underlying object with id, 2218 * value and extensions. The accessor "getExperimental" gives 2219 * direct access to the value 2220 */ 2221 public StructureDefinition setExperimentalElement(BooleanType value) { 2222 this.experimental = value; 2223 return this; 2224 } 2225 2226 /** 2227 * @return A Boolean value to indicate that this structure definition is 2228 * authored for testing purposes (or education/evaluation/marketing) and 2229 * is not intended to be used for genuine usage. 2230 */ 2231 public boolean getExperimental() { 2232 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 2233 } 2234 2235 /** 2236 * @param value A Boolean value to indicate that this structure definition is 2237 * authored for testing purposes (or 2238 * education/evaluation/marketing) and is not intended to be used 2239 * for genuine usage. 2240 */ 2241 public StructureDefinition setExperimental(boolean value) { 2242 if (this.experimental == null) 2243 this.experimental = new BooleanType(); 2244 this.experimental.setValue(value); 2245 return this; 2246 } 2247 2248 /** 2249 * @return {@link #date} (The date (and optionally time) when the structure 2250 * definition was published. The date must change when the business 2251 * version changes and it must change if the status code changes. In 2252 * addition, it should change when the substantive content of the 2253 * structure definition changes.). This is the underlying object with 2254 * id, value and extensions. The accessor "getDate" gives direct access 2255 * to the value 2256 */ 2257 public DateTimeType getDateElement() { 2258 if (this.date == null) 2259 if (Configuration.errorOnAutoCreate()) 2260 throw new Error("Attempt to auto-create StructureDefinition.date"); 2261 else if (Configuration.doAutoCreate()) 2262 this.date = new DateTimeType(); // bb 2263 return this.date; 2264 } 2265 2266 public boolean hasDateElement() { 2267 return this.date != null && !this.date.isEmpty(); 2268 } 2269 2270 public boolean hasDate() { 2271 return this.date != null && !this.date.isEmpty(); 2272 } 2273 2274 /** 2275 * @param value {@link #date} (The date (and optionally time) when the structure 2276 * definition was published. The date must change when the business 2277 * version changes and it must change if the status code changes. 2278 * In addition, it should change when the substantive content of 2279 * the structure definition changes.). This is the underlying 2280 * object with id, value and extensions. The accessor "getDate" 2281 * gives direct access to the value 2282 */ 2283 public StructureDefinition setDateElement(DateTimeType value) { 2284 this.date = value; 2285 return this; 2286 } 2287 2288 /** 2289 * @return The date (and optionally time) when the structure definition was 2290 * published. The date must change when the business version changes and 2291 * it must change if the status code changes. In addition, it should 2292 * change when the substantive content of the structure definition 2293 * changes. 2294 */ 2295 public Date getDate() { 2296 return this.date == null ? null : this.date.getValue(); 2297 } 2298 2299 /** 2300 * @param value The date (and optionally time) when the structure definition was 2301 * published. The date must change when the business version 2302 * changes and it must change if the status code changes. In 2303 * addition, it should change when the substantive content of the 2304 * structure definition changes. 2305 */ 2306 public StructureDefinition setDate(Date value) { 2307 if (value == null) 2308 this.date = null; 2309 else { 2310 if (this.date == null) 2311 this.date = new DateTimeType(); 2312 this.date.setValue(value); 2313 } 2314 return this; 2315 } 2316 2317 /** 2318 * @return {@link #publisher} (The name of the organization or individual that 2319 * published the structure definition.). This is the underlying object 2320 * with id, value and extensions. The accessor "getPublisher" gives 2321 * direct access to the value 2322 */ 2323 public StringType getPublisherElement() { 2324 if (this.publisher == null) 2325 if (Configuration.errorOnAutoCreate()) 2326 throw new Error("Attempt to auto-create StructureDefinition.publisher"); 2327 else if (Configuration.doAutoCreate()) 2328 this.publisher = new StringType(); // bb 2329 return this.publisher; 2330 } 2331 2332 public boolean hasPublisherElement() { 2333 return this.publisher != null && !this.publisher.isEmpty(); 2334 } 2335 2336 public boolean hasPublisher() { 2337 return this.publisher != null && !this.publisher.isEmpty(); 2338 } 2339 2340 /** 2341 * @param value {@link #publisher} (The name of the organization or individual 2342 * that published the structure definition.). This is the 2343 * underlying object with id, value and extensions. The accessor 2344 * "getPublisher" gives direct access to the value 2345 */ 2346 public StructureDefinition setPublisherElement(StringType value) { 2347 this.publisher = value; 2348 return this; 2349 } 2350 2351 /** 2352 * @return The name of the organization or individual that published the 2353 * structure definition. 2354 */ 2355 public String getPublisher() { 2356 return this.publisher == null ? null : this.publisher.getValue(); 2357 } 2358 2359 /** 2360 * @param value The name of the organization or individual that published the 2361 * structure definition. 2362 */ 2363 public StructureDefinition setPublisher(String value) { 2364 if (Utilities.noString(value)) 2365 this.publisher = null; 2366 else { 2367 if (this.publisher == null) 2368 this.publisher = new StringType(); 2369 this.publisher.setValue(value); 2370 } 2371 return this; 2372 } 2373 2374 /** 2375 * @return {@link #contact} (Contact details to assist a user in finding and 2376 * communicating with the publisher.) 2377 */ 2378 public List<ContactDetail> getContact() { 2379 if (this.contact == null) 2380 this.contact = new ArrayList<ContactDetail>(); 2381 return this.contact; 2382 } 2383 2384 /** 2385 * @return Returns a reference to <code>this</code> for easy method chaining 2386 */ 2387 public StructureDefinition setContact(List<ContactDetail> theContact) { 2388 this.contact = theContact; 2389 return this; 2390 } 2391 2392 public boolean hasContact() { 2393 if (this.contact == null) 2394 return false; 2395 for (ContactDetail item : this.contact) 2396 if (!item.isEmpty()) 2397 return true; 2398 return false; 2399 } 2400 2401 public ContactDetail addContact() { // 3 2402 ContactDetail t = new ContactDetail(); 2403 if (this.contact == null) 2404 this.contact = new ArrayList<ContactDetail>(); 2405 this.contact.add(t); 2406 return t; 2407 } 2408 2409 public StructureDefinition addContact(ContactDetail t) { // 3 2410 if (t == null) 2411 return this; 2412 if (this.contact == null) 2413 this.contact = new ArrayList<ContactDetail>(); 2414 this.contact.add(t); 2415 return this; 2416 } 2417 2418 /** 2419 * @return The first repetition of repeating field {@link #contact}, creating it 2420 * if it does not already exist 2421 */ 2422 public ContactDetail getContactFirstRep() { 2423 if (getContact().isEmpty()) { 2424 addContact(); 2425 } 2426 return getContact().get(0); 2427 } 2428 2429 /** 2430 * @return {@link #description} (A free text natural language description of the 2431 * structure definition from a consumer's perspective.). This is the 2432 * underlying object with id, value and extensions. The accessor 2433 * "getDescription" gives direct access to the value 2434 */ 2435 public MarkdownType getDescriptionElement() { 2436 if (this.description == null) 2437 if (Configuration.errorOnAutoCreate()) 2438 throw new Error("Attempt to auto-create StructureDefinition.description"); 2439 else if (Configuration.doAutoCreate()) 2440 this.description = new MarkdownType(); // bb 2441 return this.description; 2442 } 2443 2444 public boolean hasDescriptionElement() { 2445 return this.description != null && !this.description.isEmpty(); 2446 } 2447 2448 public boolean hasDescription() { 2449 return this.description != null && !this.description.isEmpty(); 2450 } 2451 2452 /** 2453 * @param value {@link #description} (A free text natural language description 2454 * of the structure definition from a consumer's perspective.). 2455 * This is the underlying object with id, value and extensions. The 2456 * accessor "getDescription" gives direct access to the value 2457 */ 2458 public StructureDefinition setDescriptionElement(MarkdownType value) { 2459 this.description = value; 2460 return this; 2461 } 2462 2463 /** 2464 * @return A free text natural language description of the structure definition 2465 * from a consumer's perspective. 2466 */ 2467 public String getDescription() { 2468 return this.description == null ? null : this.description.getValue(); 2469 } 2470 2471 /** 2472 * @param value A free text natural language description of the structure 2473 * definition from a consumer's perspective. 2474 */ 2475 public StructureDefinition setDescription(String value) { 2476 if (value == null) 2477 this.description = null; 2478 else { 2479 if (this.description == null) 2480 this.description = new MarkdownType(); 2481 this.description.setValue(value); 2482 } 2483 return this; 2484 } 2485 2486 /** 2487 * @return {@link #useContext} (The content was developed with a focus and 2488 * intent of supporting the contexts that are listed. These contexts may 2489 * be general categories (gender, age, ...) or may be references to 2490 * specific programs (insurance plans, studies, ...) and may be used to 2491 * assist with indexing and searching for appropriate structure 2492 * definition instances.) 2493 */ 2494 public List<UsageContext> getUseContext() { 2495 if (this.useContext == null) 2496 this.useContext = new ArrayList<UsageContext>(); 2497 return this.useContext; 2498 } 2499 2500 /** 2501 * @return Returns a reference to <code>this</code> for easy method chaining 2502 */ 2503 public StructureDefinition setUseContext(List<UsageContext> theUseContext) { 2504 this.useContext = theUseContext; 2505 return this; 2506 } 2507 2508 public boolean hasUseContext() { 2509 if (this.useContext == null) 2510 return false; 2511 for (UsageContext item : this.useContext) 2512 if (!item.isEmpty()) 2513 return true; 2514 return false; 2515 } 2516 2517 public UsageContext addUseContext() { // 3 2518 UsageContext t = new UsageContext(); 2519 if (this.useContext == null) 2520 this.useContext = new ArrayList<UsageContext>(); 2521 this.useContext.add(t); 2522 return t; 2523 } 2524 2525 public StructureDefinition addUseContext(UsageContext t) { // 3 2526 if (t == null) 2527 return this; 2528 if (this.useContext == null) 2529 this.useContext = new ArrayList<UsageContext>(); 2530 this.useContext.add(t); 2531 return this; 2532 } 2533 2534 /** 2535 * @return The first repetition of repeating field {@link #useContext}, creating 2536 * it if it does not already exist 2537 */ 2538 public UsageContext getUseContextFirstRep() { 2539 if (getUseContext().isEmpty()) { 2540 addUseContext(); 2541 } 2542 return getUseContext().get(0); 2543 } 2544 2545 /** 2546 * @return {@link #jurisdiction} (A legal or geographic region in which the 2547 * structure definition is intended to be used.) 2548 */ 2549 public List<CodeableConcept> getJurisdiction() { 2550 if (this.jurisdiction == null) 2551 this.jurisdiction = new ArrayList<CodeableConcept>(); 2552 return this.jurisdiction; 2553 } 2554 2555 /** 2556 * @return Returns a reference to <code>this</code> for easy method chaining 2557 */ 2558 public StructureDefinition setJurisdiction(List<CodeableConcept> theJurisdiction) { 2559 this.jurisdiction = theJurisdiction; 2560 return this; 2561 } 2562 2563 public boolean hasJurisdiction() { 2564 if (this.jurisdiction == null) 2565 return false; 2566 for (CodeableConcept item : this.jurisdiction) 2567 if (!item.isEmpty()) 2568 return true; 2569 return false; 2570 } 2571 2572 public CodeableConcept addJurisdiction() { // 3 2573 CodeableConcept t = new CodeableConcept(); 2574 if (this.jurisdiction == null) 2575 this.jurisdiction = new ArrayList<CodeableConcept>(); 2576 this.jurisdiction.add(t); 2577 return t; 2578 } 2579 2580 public StructureDefinition addJurisdiction(CodeableConcept t) { // 3 2581 if (t == null) 2582 return this; 2583 if (this.jurisdiction == null) 2584 this.jurisdiction = new ArrayList<CodeableConcept>(); 2585 this.jurisdiction.add(t); 2586 return this; 2587 } 2588 2589 /** 2590 * @return The first repetition of repeating field {@link #jurisdiction}, 2591 * creating it if it does not already exist 2592 */ 2593 public CodeableConcept getJurisdictionFirstRep() { 2594 if (getJurisdiction().isEmpty()) { 2595 addJurisdiction(); 2596 } 2597 return getJurisdiction().get(0); 2598 } 2599 2600 /** 2601 * @return {@link #purpose} (Explanation of why this structure definition is 2602 * needed and why it has been designed as it has.). This is the 2603 * underlying object with id, value and extensions. The accessor 2604 * "getPurpose" gives direct access to the value 2605 */ 2606 public MarkdownType getPurposeElement() { 2607 if (this.purpose == null) 2608 if (Configuration.errorOnAutoCreate()) 2609 throw new Error("Attempt to auto-create StructureDefinition.purpose"); 2610 else if (Configuration.doAutoCreate()) 2611 this.purpose = new MarkdownType(); // bb 2612 return this.purpose; 2613 } 2614 2615 public boolean hasPurposeElement() { 2616 return this.purpose != null && !this.purpose.isEmpty(); 2617 } 2618 2619 public boolean hasPurpose() { 2620 return this.purpose != null && !this.purpose.isEmpty(); 2621 } 2622 2623 /** 2624 * @param value {@link #purpose} (Explanation of why this structure definition 2625 * is needed and why it has been designed as it has.). This is the 2626 * underlying object with id, value and extensions. The accessor 2627 * "getPurpose" gives direct access to the value 2628 */ 2629 public StructureDefinition setPurposeElement(MarkdownType value) { 2630 this.purpose = value; 2631 return this; 2632 } 2633 2634 /** 2635 * @return Explanation of why this structure definition is needed and why it has 2636 * been designed as it has. 2637 */ 2638 public String getPurpose() { 2639 return this.purpose == null ? null : this.purpose.getValue(); 2640 } 2641 2642 /** 2643 * @param value Explanation of why this structure definition is needed and why 2644 * it has been designed as it has. 2645 */ 2646 public StructureDefinition setPurpose(String value) { 2647 if (value == null) 2648 this.purpose = null; 2649 else { 2650 if (this.purpose == null) 2651 this.purpose = new MarkdownType(); 2652 this.purpose.setValue(value); 2653 } 2654 return this; 2655 } 2656 2657 /** 2658 * @return {@link #copyright} (A copyright statement relating to the structure 2659 * definition and/or its contents. Copyright statements are generally 2660 * legal restrictions on the use and publishing of the structure 2661 * definition.). This is the underlying object with id, value and 2662 * extensions. The accessor "getCopyright" gives direct access to the 2663 * value 2664 */ 2665 public MarkdownType getCopyrightElement() { 2666 if (this.copyright == null) 2667 if (Configuration.errorOnAutoCreate()) 2668 throw new Error("Attempt to auto-create StructureDefinition.copyright"); 2669 else if (Configuration.doAutoCreate()) 2670 this.copyright = new MarkdownType(); // bb 2671 return this.copyright; 2672 } 2673 2674 public boolean hasCopyrightElement() { 2675 return this.copyright != null && !this.copyright.isEmpty(); 2676 } 2677 2678 public boolean hasCopyright() { 2679 return this.copyright != null && !this.copyright.isEmpty(); 2680 } 2681 2682 /** 2683 * @param value {@link #copyright} (A copyright statement relating to the 2684 * structure definition and/or its contents. Copyright statements 2685 * are generally legal restrictions on the use and publishing of 2686 * the structure definition.). This is the underlying object with 2687 * id, value and extensions. The accessor "getCopyright" gives 2688 * direct access to the value 2689 */ 2690 public StructureDefinition setCopyrightElement(MarkdownType value) { 2691 this.copyright = value; 2692 return this; 2693 } 2694 2695 /** 2696 * @return A copyright statement relating to the structure definition and/or its 2697 * contents. Copyright statements are generally legal restrictions on 2698 * the use and publishing of the structure definition. 2699 */ 2700 public String getCopyright() { 2701 return this.copyright == null ? null : this.copyright.getValue(); 2702 } 2703 2704 /** 2705 * @param value A copyright statement relating to the structure definition 2706 * and/or its contents. Copyright statements are generally legal 2707 * restrictions on the use and publishing of the structure 2708 * definition. 2709 */ 2710 public StructureDefinition setCopyright(String value) { 2711 if (value == null) 2712 this.copyright = null; 2713 else { 2714 if (this.copyright == null) 2715 this.copyright = new MarkdownType(); 2716 this.copyright.setValue(value); 2717 } 2718 return this; 2719 } 2720 2721 /** 2722 * @return {@link #keyword} (A set of key words or terms from external 2723 * terminologies that may be used to assist with indexing and searching 2724 * of templates nby describing the use of this structure definition, or 2725 * the content it describes.) 2726 */ 2727 public List<Coding> getKeyword() { 2728 if (this.keyword == null) 2729 this.keyword = new ArrayList<Coding>(); 2730 return this.keyword; 2731 } 2732 2733 /** 2734 * @return Returns a reference to <code>this</code> for easy method chaining 2735 */ 2736 public StructureDefinition setKeyword(List<Coding> theKeyword) { 2737 this.keyword = theKeyword; 2738 return this; 2739 } 2740 2741 public boolean hasKeyword() { 2742 if (this.keyword == null) 2743 return false; 2744 for (Coding item : this.keyword) 2745 if (!item.isEmpty()) 2746 return true; 2747 return false; 2748 } 2749 2750 public Coding addKeyword() { // 3 2751 Coding t = new Coding(); 2752 if (this.keyword == null) 2753 this.keyword = new ArrayList<Coding>(); 2754 this.keyword.add(t); 2755 return t; 2756 } 2757 2758 public StructureDefinition addKeyword(Coding t) { // 3 2759 if (t == null) 2760 return this; 2761 if (this.keyword == null) 2762 this.keyword = new ArrayList<Coding>(); 2763 this.keyword.add(t); 2764 return this; 2765 } 2766 2767 /** 2768 * @return The first repetition of repeating field {@link #keyword}, creating it 2769 * if it does not already exist 2770 */ 2771 public Coding getKeywordFirstRep() { 2772 if (getKeyword().isEmpty()) { 2773 addKeyword(); 2774 } 2775 return getKeyword().get(0); 2776 } 2777 2778 /** 2779 * @return {@link #fhirVersion} (The version of the FHIR specification on which 2780 * this StructureDefinition is based - this is the formal version of the 2781 * specification, without the revision number, e.g. 2782 * [publication].[major].[minor], which is 4.0.1. for this version.). 2783 * This is the underlying object with id, value and extensions. The 2784 * accessor "getFhirVersion" gives direct access to the value 2785 */ 2786 public Enumeration<FHIRVersion> getFhirVersionElement() { 2787 if (this.fhirVersion == null) 2788 if (Configuration.errorOnAutoCreate()) 2789 throw new Error("Attempt to auto-create StructureDefinition.fhirVersion"); 2790 else if (Configuration.doAutoCreate()) 2791 this.fhirVersion = new Enumeration<FHIRVersion>(new FHIRVersionEnumFactory()); // bb 2792 return this.fhirVersion; 2793 } 2794 2795 public boolean hasFhirVersionElement() { 2796 return this.fhirVersion != null && !this.fhirVersion.isEmpty(); 2797 } 2798 2799 public boolean hasFhirVersion() { 2800 return this.fhirVersion != null && !this.fhirVersion.isEmpty(); 2801 } 2802 2803 /** 2804 * @param value {@link #fhirVersion} (The version of the FHIR specification on 2805 * which this StructureDefinition is based - this is the formal 2806 * version of the specification, without the revision number, e.g. 2807 * [publication].[major].[minor], which is 4.0.1. for this 2808 * version.). This is the underlying object with id, value and 2809 * extensions. The accessor "getFhirVersion" gives direct access to 2810 * the value 2811 */ 2812 public StructureDefinition setFhirVersionElement(Enumeration<FHIRVersion> value) { 2813 this.fhirVersion = value; 2814 return this; 2815 } 2816 2817 /** 2818 * @return The version of the FHIR specification on which this 2819 * StructureDefinition is based - this is the formal version of the 2820 * specification, without the revision number, e.g. 2821 * [publication].[major].[minor], which is 4.0.1. for this version. 2822 */ 2823 public FHIRVersion getFhirVersion() { 2824 return this.fhirVersion == null ? null : this.fhirVersion.getValue(); 2825 } 2826 2827 /** 2828 * @param value The version of the FHIR specification on which this 2829 * StructureDefinition is based - this is the formal version of the 2830 * specification, without the revision number, e.g. 2831 * [publication].[major].[minor], which is 4.0.1. for this version. 2832 */ 2833 public StructureDefinition setFhirVersion(FHIRVersion value) { 2834 if (value == null) 2835 this.fhirVersion = null; 2836 else { 2837 if (this.fhirVersion == null) 2838 this.fhirVersion = new Enumeration<FHIRVersion>(new FHIRVersionEnumFactory()); 2839 this.fhirVersion.setValue(value); 2840 } 2841 return this; 2842 } 2843 2844 /** 2845 * @return {@link #mapping} (An external specification that the content is 2846 * mapped to.) 2847 */ 2848 public List<StructureDefinitionMappingComponent> getMapping() { 2849 if (this.mapping == null) 2850 this.mapping = new ArrayList<StructureDefinitionMappingComponent>(); 2851 return this.mapping; 2852 } 2853 2854 /** 2855 * @return Returns a reference to <code>this</code> for easy method chaining 2856 */ 2857 public StructureDefinition setMapping(List<StructureDefinitionMappingComponent> theMapping) { 2858 this.mapping = theMapping; 2859 return this; 2860 } 2861 2862 public boolean hasMapping() { 2863 if (this.mapping == null) 2864 return false; 2865 for (StructureDefinitionMappingComponent item : this.mapping) 2866 if (!item.isEmpty()) 2867 return true; 2868 return false; 2869 } 2870 2871 public StructureDefinitionMappingComponent addMapping() { // 3 2872 StructureDefinitionMappingComponent t = new StructureDefinitionMappingComponent(); 2873 if (this.mapping == null) 2874 this.mapping = new ArrayList<StructureDefinitionMappingComponent>(); 2875 this.mapping.add(t); 2876 return t; 2877 } 2878 2879 public StructureDefinition addMapping(StructureDefinitionMappingComponent t) { // 3 2880 if (t == null) 2881 return this; 2882 if (this.mapping == null) 2883 this.mapping = new ArrayList<StructureDefinitionMappingComponent>(); 2884 this.mapping.add(t); 2885 return this; 2886 } 2887 2888 /** 2889 * @return The first repetition of repeating field {@link #mapping}, creating it 2890 * if it does not already exist 2891 */ 2892 public StructureDefinitionMappingComponent getMappingFirstRep() { 2893 if (getMapping().isEmpty()) { 2894 addMapping(); 2895 } 2896 return getMapping().get(0); 2897 } 2898 2899 /** 2900 * @return {@link #kind} (Defines the kind of structure that this definition is 2901 * describing.). This is the underlying object with id, value and 2902 * extensions. The accessor "getKind" gives direct access to the value 2903 */ 2904 public Enumeration<StructureDefinitionKind> getKindElement() { 2905 if (this.kind == null) 2906 if (Configuration.errorOnAutoCreate()) 2907 throw new Error("Attempt to auto-create StructureDefinition.kind"); 2908 else if (Configuration.doAutoCreate()) 2909 this.kind = new Enumeration<StructureDefinitionKind>(new StructureDefinitionKindEnumFactory()); // bb 2910 return this.kind; 2911 } 2912 2913 public boolean hasKindElement() { 2914 return this.kind != null && !this.kind.isEmpty(); 2915 } 2916 2917 public boolean hasKind() { 2918 return this.kind != null && !this.kind.isEmpty(); 2919 } 2920 2921 /** 2922 * @param value {@link #kind} (Defines the kind of structure that this 2923 * definition is describing.). This is the underlying object with 2924 * id, value and extensions. The accessor "getKind" gives direct 2925 * access to the value 2926 */ 2927 public StructureDefinition setKindElement(Enumeration<StructureDefinitionKind> value) { 2928 this.kind = value; 2929 return this; 2930 } 2931 2932 /** 2933 * @return Defines the kind of structure that this definition is describing. 2934 */ 2935 public StructureDefinitionKind getKind() { 2936 return this.kind == null ? null : this.kind.getValue(); 2937 } 2938 2939 /** 2940 * @param value Defines the kind of structure that this definition is 2941 * describing. 2942 */ 2943 public StructureDefinition setKind(StructureDefinitionKind value) { 2944 if (this.kind == null) 2945 this.kind = new Enumeration<StructureDefinitionKind>(new StructureDefinitionKindEnumFactory()); 2946 this.kind.setValue(value); 2947 return this; 2948 } 2949 2950 /** 2951 * @return {@link #abstract_} (Whether structure this definition describes is 2952 * abstract or not - that is, whether the structure is not intended to 2953 * be instantiated. For Resources and Data types, abstract types will 2954 * never be exchanged between systems.). This is the underlying object 2955 * with id, value and extensions. The accessor "getAbstract" gives 2956 * direct access to the value 2957 */ 2958 public BooleanType getAbstractElement() { 2959 if (this.abstract_ == null) 2960 if (Configuration.errorOnAutoCreate()) 2961 throw new Error("Attempt to auto-create StructureDefinition.abstract_"); 2962 else if (Configuration.doAutoCreate()) 2963 this.abstract_ = new BooleanType(); // bb 2964 return this.abstract_; 2965 } 2966 2967 public boolean hasAbstractElement() { 2968 return this.abstract_ != null && !this.abstract_.isEmpty(); 2969 } 2970 2971 public boolean hasAbstract() { 2972 return this.abstract_ != null && !this.abstract_.isEmpty(); 2973 } 2974 2975 /** 2976 * @param value {@link #abstract_} (Whether structure this definition describes 2977 * is abstract or not - that is, whether the structure is not 2978 * intended to be instantiated. For Resources and Data types, 2979 * abstract types will never be exchanged between systems.). This 2980 * is the underlying object with id, value and extensions. The 2981 * accessor "getAbstract" gives direct access to the value 2982 */ 2983 public StructureDefinition setAbstractElement(BooleanType value) { 2984 this.abstract_ = value; 2985 return this; 2986 } 2987 2988 /** 2989 * @return Whether structure this definition describes is abstract or not - that 2990 * is, whether the structure is not intended to be instantiated. For 2991 * Resources and Data types, abstract types will never be exchanged 2992 * between systems. 2993 */ 2994 public boolean getAbstract() { 2995 return this.abstract_ == null || this.abstract_.isEmpty() ? false : this.abstract_.getValue(); 2996 } 2997 2998 /** 2999 * @param value Whether structure this definition describes is abstract or not - 3000 * that is, whether the structure is not intended to be 3001 * instantiated. For Resources and Data types, abstract types will 3002 * never be exchanged between systems. 3003 */ 3004 public StructureDefinition setAbstract(boolean value) { 3005 if (this.abstract_ == null) 3006 this.abstract_ = new BooleanType(); 3007 this.abstract_.setValue(value); 3008 return this; 3009 } 3010 3011 /** 3012 * @return {@link #context} (Identifies the types of resource or data type 3013 * elements to which the extension can be applied.) 3014 */ 3015 public List<StructureDefinitionContextComponent> getContext() { 3016 if (this.context == null) 3017 this.context = new ArrayList<StructureDefinitionContextComponent>(); 3018 return this.context; 3019 } 3020 3021 /** 3022 * @return Returns a reference to <code>this</code> for easy method chaining 3023 */ 3024 public StructureDefinition setContext(List<StructureDefinitionContextComponent> theContext) { 3025 this.context = theContext; 3026 return this; 3027 } 3028 3029 public boolean hasContext() { 3030 if (this.context == null) 3031 return false; 3032 for (StructureDefinitionContextComponent item : this.context) 3033 if (!item.isEmpty()) 3034 return true; 3035 return false; 3036 } 3037 3038 public StructureDefinitionContextComponent addContext() { // 3 3039 StructureDefinitionContextComponent t = new StructureDefinitionContextComponent(); 3040 if (this.context == null) 3041 this.context = new ArrayList<StructureDefinitionContextComponent>(); 3042 this.context.add(t); 3043 return t; 3044 } 3045 3046 public StructureDefinition addContext(StructureDefinitionContextComponent t) { // 3 3047 if (t == null) 3048 return this; 3049 if (this.context == null) 3050 this.context = new ArrayList<StructureDefinitionContextComponent>(); 3051 this.context.add(t); 3052 return this; 3053 } 3054 3055 /** 3056 * @return The first repetition of repeating field {@link #context}, creating it 3057 * if it does not already exist 3058 */ 3059 public StructureDefinitionContextComponent getContextFirstRep() { 3060 if (getContext().isEmpty()) { 3061 addContext(); 3062 } 3063 return getContext().get(0); 3064 } 3065 3066 /** 3067 * @return {@link #contextInvariant} (A set of rules as FHIRPath Invariants 3068 * about when the extension can be used (e.g. co-occurrence variants for 3069 * the extension). All the rules must be true.) 3070 */ 3071 public List<StringType> getContextInvariant() { 3072 if (this.contextInvariant == null) 3073 this.contextInvariant = new ArrayList<StringType>(); 3074 return this.contextInvariant; 3075 } 3076 3077 /** 3078 * @return Returns a reference to <code>this</code> for easy method chaining 3079 */ 3080 public StructureDefinition setContextInvariant(List<StringType> theContextInvariant) { 3081 this.contextInvariant = theContextInvariant; 3082 return this; 3083 } 3084 3085 public boolean hasContextInvariant() { 3086 if (this.contextInvariant == null) 3087 return false; 3088 for (StringType item : this.contextInvariant) 3089 if (!item.isEmpty()) 3090 return true; 3091 return false; 3092 } 3093 3094 /** 3095 * @return {@link #contextInvariant} (A set of rules as FHIRPath Invariants 3096 * about when the extension can be used (e.g. co-occurrence variants for 3097 * the extension). All the rules must be true.) 3098 */ 3099 public StringType addContextInvariantElement() {// 2 3100 StringType t = new StringType(); 3101 if (this.contextInvariant == null) 3102 this.contextInvariant = new ArrayList<StringType>(); 3103 this.contextInvariant.add(t); 3104 return t; 3105 } 3106 3107 /** 3108 * @param value {@link #contextInvariant} (A set of rules as FHIRPath Invariants 3109 * about when the extension can be used (e.g. co-occurrence 3110 * variants for the extension). All the rules must be true.) 3111 */ 3112 public StructureDefinition addContextInvariant(String value) { // 1 3113 StringType t = new StringType(); 3114 t.setValue(value); 3115 if (this.contextInvariant == null) 3116 this.contextInvariant = new ArrayList<StringType>(); 3117 this.contextInvariant.add(t); 3118 return this; 3119 } 3120 3121 /** 3122 * @param value {@link #contextInvariant} (A set of rules as FHIRPath Invariants 3123 * about when the extension can be used (e.g. co-occurrence 3124 * variants for the extension). All the rules must be true.) 3125 */ 3126 public boolean hasContextInvariant(String value) { 3127 if (this.contextInvariant == null) 3128 return false; 3129 for (StringType v : this.contextInvariant) 3130 if (v.getValue().equals(value)) // string 3131 return true; 3132 return false; 3133 } 3134 3135 /** 3136 * @return {@link #type} (The type this structure describes. If the derivation 3137 * kind is 'specialization' then this is the master definition for a 3138 * type, and there is always one of these (a data type, an extension, a 3139 * resource, including abstract ones). Otherwise the structure 3140 * definition is a constraint on the stated type (and in this case, the 3141 * type cannot be an abstract type). References are URLs that are 3142 * relative to http://hl7.org/fhir/StructureDefinition e.g. "string" is 3143 * a reference to http://hl7.org/fhir/StructureDefinition/string. 3144 * Absolute URLs are only allowed in logical models.). This is the 3145 * underlying object with id, value and extensions. The accessor 3146 * "getType" gives direct access to the value 3147 */ 3148 public UriType getTypeElement() { 3149 if (this.type == null) 3150 if (Configuration.errorOnAutoCreate()) 3151 throw new Error("Attempt to auto-create StructureDefinition.type"); 3152 else if (Configuration.doAutoCreate()) 3153 this.type = new UriType(); // bb 3154 return this.type; 3155 } 3156 3157 public boolean hasTypeElement() { 3158 return this.type != null && !this.type.isEmpty(); 3159 } 3160 3161 public boolean hasType() { 3162 return this.type != null && !this.type.isEmpty(); 3163 } 3164 3165 /** 3166 * @param value {@link #type} (The type this structure describes. If the 3167 * derivation kind is 'specialization' then this is the master 3168 * definition for a type, and there is always one of these (a data 3169 * type, an extension, a resource, including abstract ones). 3170 * Otherwise the structure definition is a constraint on the stated 3171 * type (and in this case, the type cannot be an abstract type). 3172 * References are URLs that are relative to 3173 * http://hl7.org/fhir/StructureDefinition e.g. "string" is a 3174 * reference to http://hl7.org/fhir/StructureDefinition/string. 3175 * Absolute URLs are only allowed in logical models.). This is the 3176 * underlying object with id, value and extensions. The accessor 3177 * "getType" gives direct access to the value 3178 */ 3179 public StructureDefinition setTypeElement(UriType value) { 3180 this.type = value; 3181 return this; 3182 } 3183 3184 /** 3185 * @return The type this structure describes. If the derivation kind is 3186 * 'specialization' then this is the master definition for a type, and 3187 * there is always one of these (a data type, an extension, a resource, 3188 * including abstract ones). Otherwise the structure definition is a 3189 * constraint on the stated type (and in this case, the type cannot be 3190 * an abstract type). References are URLs that are relative to 3191 * http://hl7.org/fhir/StructureDefinition e.g. "string" is a reference 3192 * to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are 3193 * only allowed in logical models. 3194 */ 3195 public String getType() { 3196 return this.type == null ? null : this.type.getValue(); 3197 } 3198 3199 /** 3200 * @param value The type this structure describes. If the derivation kind is 3201 * 'specialization' then this is the master definition for a type, 3202 * and there is always one of these (a data type, an extension, a 3203 * resource, including abstract ones). Otherwise the structure 3204 * definition is a constraint on the stated type (and in this case, 3205 * the type cannot be an abstract type). References are URLs that 3206 * are relative to http://hl7.org/fhir/StructureDefinition e.g. 3207 * "string" is a reference to 3208 * http://hl7.org/fhir/StructureDefinition/string. Absolute URLs 3209 * are only allowed in logical models. 3210 */ 3211 public StructureDefinition setType(String value) { 3212 if (this.type == null) 3213 this.type = new UriType(); 3214 this.type.setValue(value); 3215 return this; 3216 } 3217 3218 /** 3219 * @return {@link #baseDefinition} (An absolute URI that is the base structure 3220 * from which this type is derived, either by specialization or 3221 * constraint.). This is the underlying object with id, value and 3222 * extensions. The accessor "getBaseDefinition" gives direct access to 3223 * the value 3224 */ 3225 public CanonicalType getBaseDefinitionElement() { 3226 if (this.baseDefinition == null) 3227 if (Configuration.errorOnAutoCreate()) 3228 throw new Error("Attempt to auto-create StructureDefinition.baseDefinition"); 3229 else if (Configuration.doAutoCreate()) 3230 this.baseDefinition = new CanonicalType(); // bb 3231 return this.baseDefinition; 3232 } 3233 3234 public boolean hasBaseDefinitionElement() { 3235 return this.baseDefinition != null && !this.baseDefinition.isEmpty(); 3236 } 3237 3238 public boolean hasBaseDefinition() { 3239 return this.baseDefinition != null && !this.baseDefinition.isEmpty(); 3240 } 3241 3242 /** 3243 * @param value {@link #baseDefinition} (An absolute URI that is the base 3244 * structure from which this type is derived, either by 3245 * specialization or constraint.). This is the underlying object 3246 * with id, value and extensions. The accessor "getBaseDefinition" 3247 * gives direct access to the value 3248 */ 3249 public StructureDefinition setBaseDefinitionElement(CanonicalType value) { 3250 this.baseDefinition = value; 3251 return this; 3252 } 3253 3254 /** 3255 * @return An absolute URI that is the base structure from which this type is 3256 * derived, either by specialization or constraint. 3257 */ 3258 public String getBaseDefinition() { 3259 return this.baseDefinition == null ? null : this.baseDefinition.getValue(); 3260 } 3261 3262 /** 3263 * @param value An absolute URI that is the base structure from which this type 3264 * is derived, either by specialization or constraint. 3265 */ 3266 public StructureDefinition setBaseDefinition(String value) { 3267 if (Utilities.noString(value)) 3268 this.baseDefinition = null; 3269 else { 3270 if (this.baseDefinition == null) 3271 this.baseDefinition = new CanonicalType(); 3272 this.baseDefinition.setValue(value); 3273 } 3274 return this; 3275 } 3276 3277 /** 3278 * @return {@link #derivation} (How the type relates to the baseDefinition.). 3279 * This is the underlying object with id, value and extensions. The 3280 * accessor "getDerivation" gives direct access to the value 3281 */ 3282 public Enumeration<TypeDerivationRule> getDerivationElement() { 3283 if (this.derivation == null) 3284 if (Configuration.errorOnAutoCreate()) 3285 throw new Error("Attempt to auto-create StructureDefinition.derivation"); 3286 else if (Configuration.doAutoCreate()) 3287 this.derivation = new Enumeration<TypeDerivationRule>(new TypeDerivationRuleEnumFactory()); // bb 3288 return this.derivation; 3289 } 3290 3291 public boolean hasDerivationElement() { 3292 return this.derivation != null && !this.derivation.isEmpty(); 3293 } 3294 3295 public boolean hasDerivation() { 3296 return this.derivation != null && !this.derivation.isEmpty(); 3297 } 3298 3299 /** 3300 * @param value {@link #derivation} (How the type relates to the 3301 * baseDefinition.). This is the underlying object with id, value 3302 * and extensions. The accessor "getDerivation" gives direct access 3303 * to the value 3304 */ 3305 public StructureDefinition setDerivationElement(Enumeration<TypeDerivationRule> value) { 3306 this.derivation = value; 3307 return this; 3308 } 3309 3310 /** 3311 * @return How the type relates to the baseDefinition. 3312 */ 3313 public TypeDerivationRule getDerivation() { 3314 return this.derivation == null ? null : this.derivation.getValue(); 3315 } 3316 3317 /** 3318 * @param value How the type relates to the baseDefinition. 3319 */ 3320 public StructureDefinition setDerivation(TypeDerivationRule value) { 3321 if (value == null) 3322 this.derivation = null; 3323 else { 3324 if (this.derivation == null) 3325 this.derivation = new Enumeration<TypeDerivationRule>(new TypeDerivationRuleEnumFactory()); 3326 this.derivation.setValue(value); 3327 } 3328 return this; 3329 } 3330 3331 /** 3332 * @return {@link #snapshot} (A snapshot view is expressed in a standalone form 3333 * that can be used and interpreted without considering the base 3334 * StructureDefinition.) 3335 */ 3336 public StructureDefinitionSnapshotComponent getSnapshot() { 3337 if (this.snapshot == null) 3338 if (Configuration.errorOnAutoCreate()) 3339 throw new Error("Attempt to auto-create StructureDefinition.snapshot"); 3340 else if (Configuration.doAutoCreate()) 3341 this.snapshot = new StructureDefinitionSnapshotComponent(); // cc 3342 return this.snapshot; 3343 } 3344 3345 public boolean hasSnapshot() { 3346 return this.snapshot != null && !this.snapshot.isEmpty(); 3347 } 3348 3349 /** 3350 * @param value {@link #snapshot} (A snapshot view is expressed in a standalone 3351 * form that can be used and interpreted without considering the 3352 * base StructureDefinition.) 3353 */ 3354 public StructureDefinition setSnapshot(StructureDefinitionSnapshotComponent value) { 3355 this.snapshot = value; 3356 return this; 3357 } 3358 3359 /** 3360 * @return {@link #differential} (A differential view is expressed relative to 3361 * the base StructureDefinition - a statement of differences that it 3362 * applies.) 3363 */ 3364 public StructureDefinitionDifferentialComponent getDifferential() { 3365 if (this.differential == null) 3366 if (Configuration.errorOnAutoCreate()) 3367 throw new Error("Attempt to auto-create StructureDefinition.differential"); 3368 else if (Configuration.doAutoCreate()) 3369 this.differential = new StructureDefinitionDifferentialComponent(); // cc 3370 return this.differential; 3371 } 3372 3373 public boolean hasDifferential() { 3374 return this.differential != null && !this.differential.isEmpty(); 3375 } 3376 3377 /** 3378 * @param value {@link #differential} (A differential view is expressed relative 3379 * to the base StructureDefinition - a statement of differences 3380 * that it applies.) 3381 */ 3382 public StructureDefinition setDifferential(StructureDefinitionDifferentialComponent value) { 3383 this.differential = value; 3384 return this; 3385 } 3386 3387 protected void listChildren(List<Property> children) { 3388 super.listChildren(children); 3389 children.add(new Property("url", "uri", 3390 "An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this structure definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure definition is stored on different servers.", 3391 0, 1, url)); 3392 children.add(new Property("identifier", "Identifier", 3393 "A formal identifier that is used to identify this structure definition when it is represented in other formats, or referenced in a specification, model, design or an instance.", 3394 0, java.lang.Integer.MAX_VALUE, identifier)); 3395 children.add(new Property("version", "string", 3396 "The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 3397 0, 1, version)); 3398 children.add(new Property("name", "string", 3399 "A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 3400 0, 1, name)); 3401 children.add(new Property("title", "string", 3402 "A short, descriptive, user-friendly title for the structure definition.", 0, 1, title)); 3403 children.add(new Property("status", "code", 3404 "The status of this structure definition. Enables tracking the life-cycle of the content.", 0, 1, status)); 3405 children.add(new Property("experimental", "boolean", 3406 "A Boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 3407 0, 1, experimental)); 3408 children.add(new Property("date", "dateTime", 3409 "The date (and optionally time) when the structure definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.", 3410 0, 1, date)); 3411 children.add(new Property("publisher", "string", 3412 "The name of the organization or individual that published the structure definition.", 0, 1, publisher)); 3413 children.add(new Property("contact", "ContactDetail", 3414 "Contact details to assist a user in finding and communicating with the publisher.", 0, 3415 java.lang.Integer.MAX_VALUE, contact)); 3416 children.add(new Property("description", "markdown", 3417 "A free text natural language description of the structure definition from a consumer's perspective.", 0, 1, 3418 description)); 3419 children.add(new Property("useContext", "UsageContext", 3420 "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate structure definition instances.", 3421 0, java.lang.Integer.MAX_VALUE, useContext)); 3422 children.add(new Property("jurisdiction", "CodeableConcept", 3423 "A legal or geographic region in which the structure definition is intended to be used.", 0, 3424 java.lang.Integer.MAX_VALUE, jurisdiction)); 3425 children.add(new Property("purpose", "markdown", 3426 "Explanation of why this structure definition is needed and why it has been designed as it has.", 0, 1, 3427 purpose)); 3428 children.add(new Property("copyright", "markdown", 3429 "A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition.", 3430 0, 1, copyright)); 3431 children.add(new Property("keyword", "Coding", 3432 "A set of key words or terms from external terminologies that may be used to assist with indexing and searching of templates nby describing the use of this structure definition, or the content it describes.", 3433 0, java.lang.Integer.MAX_VALUE, keyword)); 3434 children.add(new Property("fhirVersion", "code", 3435 "The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 4.0.1. for this version.", 3436 0, 1, fhirVersion)); 3437 children.add(new Property("mapping", "", "An external specification that the content is mapped to.", 0, 3438 java.lang.Integer.MAX_VALUE, mapping)); 3439 children.add( 3440 new Property("kind", "code", "Defines the kind of structure that this definition is describing.", 0, 1, kind)); 3441 children.add(new Property("abstract", "boolean", 3442 "Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems.", 3443 0, 1, abstract_)); 3444 children.add(new Property("context", "", 3445 "Identifies the types of resource or data type elements to which the extension can be applied.", 0, 3446 java.lang.Integer.MAX_VALUE, context)); 3447 children.add(new Property("contextInvariant", "string", 3448 "A set of rules as FHIRPath Invariants about when the extension can be used (e.g. co-occurrence variants for the extension). All the rules must be true.", 3449 0, java.lang.Integer.MAX_VALUE, contextInvariant)); 3450 children.add(new Property("type", "uri", 3451 "The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type). 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.", 3452 0, 1, type)); 3453 children.add(new Property("baseDefinition", "canonical(StructureDefinition)", 3454 "An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.", 3455 0, 1, baseDefinition)); 3456 children.add(new Property("derivation", "code", "How the type relates to the baseDefinition.", 0, 1, derivation)); 3457 children.add(new Property("snapshot", "", 3458 "A snapshot view is expressed in a standalone form that can be used and interpreted without considering the base StructureDefinition.", 3459 0, 1, snapshot)); 3460 children.add(new Property("differential", "", 3461 "A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.", 3462 0, 1, differential)); 3463 } 3464 3465 @Override 3466 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3467 switch (_hash) { 3468 case 116079: 3469 /* url */ return new Property("url", "uri", 3470 "An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this structure definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure definition is stored on different servers.", 3471 0, 1, url); 3472 case -1618432855: 3473 /* identifier */ return new Property("identifier", "Identifier", 3474 "A formal identifier that is used to identify this structure definition when it is represented in other formats, or referenced in a specification, model, design or an instance.", 3475 0, java.lang.Integer.MAX_VALUE, identifier); 3476 case 351608024: 3477 /* version */ return new Property("version", "string", 3478 "The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 3479 0, 1, version); 3480 case 3373707: 3481 /* name */ return new Property("name", "string", 3482 "A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 3483 0, 1, name); 3484 case 110371416: 3485 /* title */ return new Property("title", "string", 3486 "A short, descriptive, user-friendly title for the structure definition.", 0, 1, title); 3487 case -892481550: 3488 /* status */ return new Property("status", "code", 3489 "The status of this structure definition. Enables tracking the life-cycle of the content.", 0, 1, status); 3490 case -404562712: 3491 /* experimental */ return new Property("experimental", "boolean", 3492 "A Boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 3493 0, 1, experimental); 3494 case 3076014: 3495 /* date */ return new Property("date", "dateTime", 3496 "The date (and optionally time) when the structure definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.", 3497 0, 1, date); 3498 case 1447404028: 3499 /* publisher */ return new Property("publisher", "string", 3500 "The name of the organization or individual that published the structure definition.", 0, 1, publisher); 3501 case 951526432: 3502 /* contact */ return new Property("contact", "ContactDetail", 3503 "Contact details to assist a user in finding and communicating with the publisher.", 0, 3504 java.lang.Integer.MAX_VALUE, contact); 3505 case -1724546052: 3506 /* description */ return new Property("description", "markdown", 3507 "A free text natural language description of the structure definition from a consumer's perspective.", 0, 1, 3508 description); 3509 case -669707736: 3510 /* useContext */ return new Property("useContext", "UsageContext", 3511 "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate structure definition instances.", 3512 0, java.lang.Integer.MAX_VALUE, useContext); 3513 case -507075711: 3514 /* jurisdiction */ return new Property("jurisdiction", "CodeableConcept", 3515 "A legal or geographic region in which the structure definition is intended to be used.", 0, 3516 java.lang.Integer.MAX_VALUE, jurisdiction); 3517 case -220463842: 3518 /* purpose */ return new Property("purpose", "markdown", 3519 "Explanation of why this structure definition is needed and why it has been designed as it has.", 0, 1, 3520 purpose); 3521 case 1522889671: 3522 /* copyright */ return new Property("copyright", "markdown", 3523 "A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition.", 3524 0, 1, copyright); 3525 case -814408215: 3526 /* keyword */ return new Property("keyword", "Coding", 3527 "A set of key words or terms from external terminologies that may be used to assist with indexing and searching of templates nby describing the use of this structure definition, or the content it describes.", 3528 0, java.lang.Integer.MAX_VALUE, keyword); 3529 case 461006061: 3530 /* fhirVersion */ return new Property("fhirVersion", "code", 3531 "The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 4.0.1. for this version.", 3532 0, 1, fhirVersion); 3533 case 837556430: 3534 /* mapping */ return new Property("mapping", "", "An external specification that the content is mapped to.", 0, 3535 java.lang.Integer.MAX_VALUE, mapping); 3536 case 3292052: 3537 /* kind */ return new Property("kind", "code", 3538 "Defines the kind of structure that this definition is describing.", 0, 1, kind); 3539 case 1732898850: 3540 /* abstract */ return new Property("abstract", "boolean", 3541 "Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems.", 3542 0, 1, abstract_); 3543 case 951530927: 3544 /* context */ return new Property("context", "", 3545 "Identifies the types of resource or data type elements to which the extension can be applied.", 0, 3546 java.lang.Integer.MAX_VALUE, context); 3547 case -802505007: 3548 /* contextInvariant */ return new Property("contextInvariant", "string", 3549 "A set of rules as FHIRPath Invariants about when the extension can be used (e.g. co-occurrence variants for the extension). All the rules must be true.", 3550 0, java.lang.Integer.MAX_VALUE, contextInvariant); 3551 case 3575610: 3552 /* type */ return new Property("type", "uri", 3553 "The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type). 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.", 3554 0, 1, type); 3555 case 1139771140: 3556 /* baseDefinition */ return new Property("baseDefinition", "canonical(StructureDefinition)", 3557 "An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.", 3558 0, 1, baseDefinition); 3559 case -1353885513: 3560 /* derivation */ return new Property("derivation", "code", "How the type relates to the baseDefinition.", 0, 1, 3561 derivation); 3562 case 284874180: 3563 /* snapshot */ return new Property("snapshot", "", 3564 "A snapshot view is expressed in a standalone form that can be used and interpreted without considering the base StructureDefinition.", 3565 0, 1, snapshot); 3566 case -1196150917: 3567 /* differential */ return new Property("differential", "", 3568 "A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.", 3569 0, 1, differential); 3570 default: 3571 return super.getNamedProperty(_hash, _name, _checkValid); 3572 } 3573 3574 } 3575 3576 @Override 3577 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3578 switch (hash) { 3579 case 116079: 3580 /* url */ return this.url == null ? new Base[0] : new Base[] { this.url }; // UriType 3581 case -1618432855: 3582 /* identifier */ return this.identifier == null ? new Base[0] 3583 : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 3584 case 351608024: 3585 /* version */ return this.version == null ? new Base[0] : new Base[] { this.version }; // StringType 3586 case 3373707: 3587 /* name */ return this.name == null ? new Base[0] : new Base[] { this.name }; // StringType 3588 case 110371416: 3589 /* title */ return this.title == null ? new Base[0] : new Base[] { this.title }; // StringType 3590 case -892481550: 3591 /* status */ return this.status == null ? new Base[0] : new Base[] { this.status }; // Enumeration<PublicationStatus> 3592 case -404562712: 3593 /* experimental */ return this.experimental == null ? new Base[0] : new Base[] { this.experimental }; // BooleanType 3594 case 3076014: 3595 /* date */ return this.date == null ? new Base[0] : new Base[] { this.date }; // DateTimeType 3596 case 1447404028: 3597 /* publisher */ return this.publisher == null ? new Base[0] : new Base[] { this.publisher }; // StringType 3598 case 951526432: 3599 /* contact */ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail 3600 case -1724546052: 3601 /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // MarkdownType 3602 case -669707736: 3603 /* useContext */ return this.useContext == null ? new Base[0] 3604 : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext 3605 case -507075711: 3606 /* jurisdiction */ return this.jurisdiction == null ? new Base[0] 3607 : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept 3608 case -220463842: 3609 /* purpose */ return this.purpose == null ? new Base[0] : new Base[] { this.purpose }; // MarkdownType 3610 case 1522889671: 3611 /* copyright */ return this.copyright == null ? new Base[0] : new Base[] { this.copyright }; // MarkdownType 3612 case -814408215: 3613 /* keyword */ return this.keyword == null ? new Base[0] : this.keyword.toArray(new Base[this.keyword.size()]); // Coding 3614 case 461006061: 3615 /* fhirVersion */ return this.fhirVersion == null ? new Base[0] : new Base[] { this.fhirVersion }; // Enumeration<FHIRVersion> 3616 case 837556430: 3617 /* mapping */ return this.mapping == null ? new Base[0] : this.mapping.toArray(new Base[this.mapping.size()]); // StructureDefinitionMappingComponent 3618 case 3292052: 3619 /* kind */ return this.kind == null ? new Base[0] : new Base[] { this.kind }; // Enumeration<StructureDefinitionKind> 3620 case 1732898850: 3621 /* abstract */ return this.abstract_ == null ? new Base[0] : new Base[] { this.abstract_ }; // BooleanType 3622 case 951530927: 3623 /* context */ return this.context == null ? new Base[0] : this.context.toArray(new Base[this.context.size()]); // StructureDefinitionContextComponent 3624 case -802505007: 3625 /* contextInvariant */ return this.contextInvariant == null ? new Base[0] 3626 : this.contextInvariant.toArray(new Base[this.contextInvariant.size()]); // StringType 3627 case 3575610: 3628 /* type */ return this.type == null ? new Base[0] : new Base[] { this.type }; // UriType 3629 case 1139771140: 3630 /* baseDefinition */ return this.baseDefinition == null ? new Base[0] : new Base[] { this.baseDefinition }; // CanonicalType 3631 case -1353885513: 3632 /* derivation */ return this.derivation == null ? new Base[0] : new Base[] { this.derivation }; // Enumeration<TypeDerivationRule> 3633 case 284874180: 3634 /* snapshot */ return this.snapshot == null ? new Base[0] : new Base[] { this.snapshot }; // StructureDefinitionSnapshotComponent 3635 case -1196150917: 3636 /* differential */ return this.differential == null ? new Base[0] : new Base[] { this.differential }; // StructureDefinitionDifferentialComponent 3637 default: 3638 return super.getProperty(hash, name, checkValid); 3639 } 3640 3641 } 3642 3643 @Override 3644 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3645 switch (hash) { 3646 case 116079: // url 3647 this.url = castToUri(value); // UriType 3648 return value; 3649 case -1618432855: // identifier 3650 this.getIdentifier().add(castToIdentifier(value)); // Identifier 3651 return value; 3652 case 351608024: // version 3653 this.version = castToString(value); // StringType 3654 return value; 3655 case 3373707: // name 3656 this.name = castToString(value); // StringType 3657 return value; 3658 case 110371416: // title 3659 this.title = castToString(value); // StringType 3660 return value; 3661 case -892481550: // status 3662 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 3663 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 3664 return value; 3665 case -404562712: // experimental 3666 this.experimental = castToBoolean(value); // BooleanType 3667 return value; 3668 case 3076014: // date 3669 this.date = castToDateTime(value); // DateTimeType 3670 return value; 3671 case 1447404028: // publisher 3672 this.publisher = castToString(value); // StringType 3673 return value; 3674 case 951526432: // contact 3675 this.getContact().add(castToContactDetail(value)); // ContactDetail 3676 return value; 3677 case -1724546052: // description 3678 this.description = castToMarkdown(value); // MarkdownType 3679 return value; 3680 case -669707736: // useContext 3681 this.getUseContext().add(castToUsageContext(value)); // UsageContext 3682 return value; 3683 case -507075711: // jurisdiction 3684 this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept 3685 return value; 3686 case -220463842: // purpose 3687 this.purpose = castToMarkdown(value); // MarkdownType 3688 return value; 3689 case 1522889671: // copyright 3690 this.copyright = castToMarkdown(value); // MarkdownType 3691 return value; 3692 case -814408215: // keyword 3693 this.getKeyword().add(castToCoding(value)); // Coding 3694 return value; 3695 case 461006061: // fhirVersion 3696 value = new FHIRVersionEnumFactory().fromType(castToCode(value)); 3697 this.fhirVersion = (Enumeration) value; // Enumeration<FHIRVersion> 3698 return value; 3699 case 837556430: // mapping 3700 this.getMapping().add((StructureDefinitionMappingComponent) value); // StructureDefinitionMappingComponent 3701 return value; 3702 case 3292052: // kind 3703 value = new StructureDefinitionKindEnumFactory().fromType(castToCode(value)); 3704 this.kind = (Enumeration) value; // Enumeration<StructureDefinitionKind> 3705 return value; 3706 case 1732898850: // abstract 3707 this.abstract_ = castToBoolean(value); // BooleanType 3708 return value; 3709 case 951530927: // context 3710 this.getContext().add((StructureDefinitionContextComponent) value); // StructureDefinitionContextComponent 3711 return value; 3712 case -802505007: // contextInvariant 3713 this.getContextInvariant().add(castToString(value)); // StringType 3714 return value; 3715 case 3575610: // type 3716 this.type = castToUri(value); // UriType 3717 return value; 3718 case 1139771140: // baseDefinition 3719 this.baseDefinition = castToCanonical(value); // CanonicalType 3720 return value; 3721 case -1353885513: // derivation 3722 value = new TypeDerivationRuleEnumFactory().fromType(castToCode(value)); 3723 this.derivation = (Enumeration) value; // Enumeration<TypeDerivationRule> 3724 return value; 3725 case 284874180: // snapshot 3726 this.snapshot = (StructureDefinitionSnapshotComponent) value; // StructureDefinitionSnapshotComponent 3727 return value; 3728 case -1196150917: // differential 3729 this.differential = (StructureDefinitionDifferentialComponent) value; // StructureDefinitionDifferentialComponent 3730 return value; 3731 default: 3732 return super.setProperty(hash, name, value); 3733 } 3734 3735 } 3736 3737 @Override 3738 public Base setProperty(String name, Base value) throws FHIRException { 3739 if (name.equals("url")) { 3740 this.url = castToUri(value); // UriType 3741 } else if (name.equals("identifier")) { 3742 this.getIdentifier().add(castToIdentifier(value)); 3743 } else if (name.equals("version")) { 3744 this.version = castToString(value); // StringType 3745 } else if (name.equals("name")) { 3746 this.name = castToString(value); // StringType 3747 } else if (name.equals("title")) { 3748 this.title = castToString(value); // StringType 3749 } else if (name.equals("status")) { 3750 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 3751 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 3752 } else if (name.equals("experimental")) { 3753 this.experimental = castToBoolean(value); // BooleanType 3754 } else if (name.equals("date")) { 3755 this.date = castToDateTime(value); // DateTimeType 3756 } else if (name.equals("publisher")) { 3757 this.publisher = castToString(value); // StringType 3758 } else if (name.equals("contact")) { 3759 this.getContact().add(castToContactDetail(value)); 3760 } else if (name.equals("description")) { 3761 this.description = castToMarkdown(value); // MarkdownType 3762 } else if (name.equals("useContext")) { 3763 this.getUseContext().add(castToUsageContext(value)); 3764 } else if (name.equals("jurisdiction")) { 3765 this.getJurisdiction().add(castToCodeableConcept(value)); 3766 } else if (name.equals("purpose")) { 3767 this.purpose = castToMarkdown(value); // MarkdownType 3768 } else if (name.equals("copyright")) { 3769 this.copyright = castToMarkdown(value); // MarkdownType 3770 } else if (name.equals("keyword")) { 3771 this.getKeyword().add(castToCoding(value)); 3772 } else if (name.equals("fhirVersion")) { 3773 value = new FHIRVersionEnumFactory().fromType(castToCode(value)); 3774 this.fhirVersion = (Enumeration) value; // Enumeration<FHIRVersion> 3775 } else if (name.equals("mapping")) { 3776 this.getMapping().add((StructureDefinitionMappingComponent) value); 3777 } else if (name.equals("kind")) { 3778 value = new StructureDefinitionKindEnumFactory().fromType(castToCode(value)); 3779 this.kind = (Enumeration) value; // Enumeration<StructureDefinitionKind> 3780 } else if (name.equals("abstract")) { 3781 this.abstract_ = castToBoolean(value); // BooleanType 3782 } else if (name.equals("context")) { 3783 this.getContext().add((StructureDefinitionContextComponent) value); 3784 } else if (name.equals("contextInvariant")) { 3785 this.getContextInvariant().add(castToString(value)); 3786 } else if (name.equals("type")) { 3787 this.type = castToUri(value); // UriType 3788 } else if (name.equals("baseDefinition")) { 3789 this.baseDefinition = castToCanonical(value); // CanonicalType 3790 } else if (name.equals("derivation")) { 3791 value = new TypeDerivationRuleEnumFactory().fromType(castToCode(value)); 3792 this.derivation = (Enumeration) value; // Enumeration<TypeDerivationRule> 3793 } else if (name.equals("snapshot")) { 3794 this.snapshot = (StructureDefinitionSnapshotComponent) value; // StructureDefinitionSnapshotComponent 3795 } else if (name.equals("differential")) { 3796 this.differential = (StructureDefinitionDifferentialComponent) value; // StructureDefinitionDifferentialComponent 3797 } else 3798 return super.setProperty(name, value); 3799 return value; 3800 } 3801 3802 @Override 3803 public Base makeProperty(int hash, String name) throws FHIRException { 3804 switch (hash) { 3805 case 116079: 3806 return getUrlElement(); 3807 case -1618432855: 3808 return addIdentifier(); 3809 case 351608024: 3810 return getVersionElement(); 3811 case 3373707: 3812 return getNameElement(); 3813 case 110371416: 3814 return getTitleElement(); 3815 case -892481550: 3816 return getStatusElement(); 3817 case -404562712: 3818 return getExperimentalElement(); 3819 case 3076014: 3820 return getDateElement(); 3821 case 1447404028: 3822 return getPublisherElement(); 3823 case 951526432: 3824 return addContact(); 3825 case -1724546052: 3826 return getDescriptionElement(); 3827 case -669707736: 3828 return addUseContext(); 3829 case -507075711: 3830 return addJurisdiction(); 3831 case -220463842: 3832 return getPurposeElement(); 3833 case 1522889671: 3834 return getCopyrightElement(); 3835 case -814408215: 3836 return addKeyword(); 3837 case 461006061: 3838 return getFhirVersionElement(); 3839 case 837556430: 3840 return addMapping(); 3841 case 3292052: 3842 return getKindElement(); 3843 case 1732898850: 3844 return getAbstractElement(); 3845 case 951530927: 3846 return addContext(); 3847 case -802505007: 3848 return addContextInvariantElement(); 3849 case 3575610: 3850 return getTypeElement(); 3851 case 1139771140: 3852 return getBaseDefinitionElement(); 3853 case -1353885513: 3854 return getDerivationElement(); 3855 case 284874180: 3856 return getSnapshot(); 3857 case -1196150917: 3858 return getDifferential(); 3859 default: 3860 return super.makeProperty(hash, name); 3861 } 3862 3863 } 3864 3865 @Override 3866 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3867 switch (hash) { 3868 case 116079: 3869 /* url */ return new String[] { "uri" }; 3870 case -1618432855: 3871 /* identifier */ return new String[] { "Identifier" }; 3872 case 351608024: 3873 /* version */ return new String[] { "string" }; 3874 case 3373707: 3875 /* name */ return new String[] { "string" }; 3876 case 110371416: 3877 /* title */ return new String[] { "string" }; 3878 case -892481550: 3879 /* status */ return new String[] { "code" }; 3880 case -404562712: 3881 /* experimental */ return new String[] { "boolean" }; 3882 case 3076014: 3883 /* date */ return new String[] { "dateTime" }; 3884 case 1447404028: 3885 /* publisher */ return new String[] { "string" }; 3886 case 951526432: 3887 /* contact */ return new String[] { "ContactDetail" }; 3888 case -1724546052: 3889 /* description */ return new String[] { "markdown" }; 3890 case -669707736: 3891 /* useContext */ return new String[] { "UsageContext" }; 3892 case -507075711: 3893 /* jurisdiction */ return new String[] { "CodeableConcept" }; 3894 case -220463842: 3895 /* purpose */ return new String[] { "markdown" }; 3896 case 1522889671: 3897 /* copyright */ return new String[] { "markdown" }; 3898 case -814408215: 3899 /* keyword */ return new String[] { "Coding" }; 3900 case 461006061: 3901 /* fhirVersion */ return new String[] { "code" }; 3902 case 837556430: 3903 /* mapping */ return new String[] {}; 3904 case 3292052: 3905 /* kind */ return new String[] { "code" }; 3906 case 1732898850: 3907 /* abstract */ return new String[] { "boolean" }; 3908 case 951530927: 3909 /* context */ return new String[] {}; 3910 case -802505007: 3911 /* contextInvariant */ return new String[] { "string" }; 3912 case 3575610: 3913 /* type */ return new String[] { "uri" }; 3914 case 1139771140: 3915 /* baseDefinition */ return new String[] { "canonical" }; 3916 case -1353885513: 3917 /* derivation */ return new String[] { "code" }; 3918 case 284874180: 3919 /* snapshot */ return new String[] {}; 3920 case -1196150917: 3921 /* differential */ return new String[] {}; 3922 default: 3923 return super.getTypesForProperty(hash, name); 3924 } 3925 3926 } 3927 3928 @Override 3929 public Base addChild(String name) throws FHIRException { 3930 if (name.equals("url")) { 3931 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.url"); 3932 } else if (name.equals("identifier")) { 3933 return addIdentifier(); 3934 } else if (name.equals("version")) { 3935 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.version"); 3936 } else if (name.equals("name")) { 3937 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.name"); 3938 } else if (name.equals("title")) { 3939 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.title"); 3940 } else if (name.equals("status")) { 3941 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.status"); 3942 } else if (name.equals("experimental")) { 3943 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.experimental"); 3944 } else if (name.equals("date")) { 3945 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.date"); 3946 } else if (name.equals("publisher")) { 3947 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.publisher"); 3948 } else if (name.equals("contact")) { 3949 return addContact(); 3950 } else if (name.equals("description")) { 3951 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.description"); 3952 } else if (name.equals("useContext")) { 3953 return addUseContext(); 3954 } else if (name.equals("jurisdiction")) { 3955 return addJurisdiction(); 3956 } else if (name.equals("purpose")) { 3957 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.purpose"); 3958 } else if (name.equals("copyright")) { 3959 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.copyright"); 3960 } else if (name.equals("keyword")) { 3961 return addKeyword(); 3962 } else if (name.equals("fhirVersion")) { 3963 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.fhirVersion"); 3964 } else if (name.equals("mapping")) { 3965 return addMapping(); 3966 } else if (name.equals("kind")) { 3967 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.kind"); 3968 } else if (name.equals("abstract")) { 3969 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.abstract"); 3970 } else if (name.equals("context")) { 3971 return addContext(); 3972 } else if (name.equals("contextInvariant")) { 3973 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.contextInvariant"); 3974 } else if (name.equals("type")) { 3975 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.type"); 3976 } else if (name.equals("baseDefinition")) { 3977 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.baseDefinition"); 3978 } else if (name.equals("derivation")) { 3979 throw new FHIRException("Cannot call addChild on a singleton property StructureDefinition.derivation"); 3980 } else if (name.equals("snapshot")) { 3981 this.snapshot = new StructureDefinitionSnapshotComponent(); 3982 return this.snapshot; 3983 } else if (name.equals("differential")) { 3984 this.differential = new StructureDefinitionDifferentialComponent(); 3985 return this.differential; 3986 } else 3987 return super.addChild(name); 3988 } 3989 3990 public String fhirType() { 3991 return "StructureDefinition"; 3992 3993 } 3994 3995 public StructureDefinition copy() { 3996 StructureDefinition dst = new StructureDefinition(); 3997 copyValues(dst); 3998 return dst; 3999 } 4000 4001 public void copyValues(StructureDefinition dst) { 4002 super.copyValues(dst); 4003 dst.url = url == null ? null : url.copy(); 4004 if (identifier != null) { 4005 dst.identifier = new ArrayList<Identifier>(); 4006 for (Identifier i : identifier) 4007 dst.identifier.add(i.copy()); 4008 } 4009 ; 4010 dst.version = version == null ? null : version.copy(); 4011 dst.name = name == null ? null : name.copy(); 4012 dst.title = title == null ? null : title.copy(); 4013 dst.status = status == null ? null : status.copy(); 4014 dst.experimental = experimental == null ? null : experimental.copy(); 4015 dst.date = date == null ? null : date.copy(); 4016 dst.publisher = publisher == null ? null : publisher.copy(); 4017 if (contact != null) { 4018 dst.contact = new ArrayList<ContactDetail>(); 4019 for (ContactDetail i : contact) 4020 dst.contact.add(i.copy()); 4021 } 4022 ; 4023 dst.description = description == null ? null : description.copy(); 4024 if (useContext != null) { 4025 dst.useContext = new ArrayList<UsageContext>(); 4026 for (UsageContext i : useContext) 4027 dst.useContext.add(i.copy()); 4028 } 4029 ; 4030 if (jurisdiction != null) { 4031 dst.jurisdiction = new ArrayList<CodeableConcept>(); 4032 for (CodeableConcept i : jurisdiction) 4033 dst.jurisdiction.add(i.copy()); 4034 } 4035 ; 4036 dst.purpose = purpose == null ? null : purpose.copy(); 4037 dst.copyright = copyright == null ? null : copyright.copy(); 4038 if (keyword != null) { 4039 dst.keyword = new ArrayList<Coding>(); 4040 for (Coding i : keyword) 4041 dst.keyword.add(i.copy()); 4042 } 4043 ; 4044 dst.fhirVersion = fhirVersion == null ? null : fhirVersion.copy(); 4045 if (mapping != null) { 4046 dst.mapping = new ArrayList<StructureDefinitionMappingComponent>(); 4047 for (StructureDefinitionMappingComponent i : mapping) 4048 dst.mapping.add(i.copy()); 4049 } 4050 ; 4051 dst.kind = kind == null ? null : kind.copy(); 4052 dst.abstract_ = abstract_ == null ? null : abstract_.copy(); 4053 if (context != null) { 4054 dst.context = new ArrayList<StructureDefinitionContextComponent>(); 4055 for (StructureDefinitionContextComponent i : context) 4056 dst.context.add(i.copy()); 4057 } 4058 ; 4059 if (contextInvariant != null) { 4060 dst.contextInvariant = new ArrayList<StringType>(); 4061 for (StringType i : contextInvariant) 4062 dst.contextInvariant.add(i.copy()); 4063 } 4064 ; 4065 dst.type = type == null ? null : type.copy(); 4066 dst.baseDefinition = baseDefinition == null ? null : baseDefinition.copy(); 4067 dst.derivation = derivation == null ? null : derivation.copy(); 4068 dst.snapshot = snapshot == null ? null : snapshot.copy(); 4069 dst.differential = differential == null ? null : differential.copy(); 4070 } 4071 4072 protected StructureDefinition typedCopy() { 4073 return copy(); 4074 } 4075 4076 @Override 4077 public boolean equalsDeep(Base other_) { 4078 if (!super.equalsDeep(other_)) 4079 return false; 4080 if (!(other_ instanceof StructureDefinition)) 4081 return false; 4082 StructureDefinition o = (StructureDefinition) other_; 4083 return compareDeep(identifier, o.identifier, true) && compareDeep(purpose, o.purpose, true) 4084 && compareDeep(copyright, o.copyright, true) && compareDeep(keyword, o.keyword, true) 4085 && compareDeep(fhirVersion, o.fhirVersion, true) && compareDeep(mapping, o.mapping, true) 4086 && compareDeep(kind, o.kind, true) && compareDeep(abstract_, o.abstract_, true) 4087 && compareDeep(context, o.context, true) && compareDeep(contextInvariant, o.contextInvariant, true) 4088 && compareDeep(type, o.type, true) && compareDeep(baseDefinition, o.baseDefinition, true) 4089 && compareDeep(derivation, o.derivation, true) && compareDeep(snapshot, o.snapshot, true) 4090 && compareDeep(differential, o.differential, true); 4091 } 4092 4093 @Override 4094 public boolean equalsShallow(Base other_) { 4095 if (!super.equalsShallow(other_)) 4096 return false; 4097 if (!(other_ instanceof StructureDefinition)) 4098 return false; 4099 StructureDefinition o = (StructureDefinition) other_; 4100 return compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true) 4101 && compareValues(fhirVersion, o.fhirVersion, true) && compareValues(kind, o.kind, true) 4102 && compareValues(abstract_, o.abstract_, true) && compareValues(contextInvariant, o.contextInvariant, true) 4103 && compareValues(type, o.type, true) && compareValues(derivation, o.derivation, true); 4104 } 4105 4106 public boolean isEmpty() { 4107 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, purpose, copyright, keyword, fhirVersion, 4108 mapping, kind, abstract_, context, contextInvariant, type, baseDefinition, derivation, snapshot, differential); 4109 } 4110 4111 @Override 4112 public ResourceType getResourceType() { 4113 return ResourceType.StructureDefinition; 4114 } 4115 4116 /** 4117 * Search parameter: <b>date</b> 4118 * <p> 4119 * Description: <b>The structure definition publication date</b><br> 4120 * Type: <b>date</b><br> 4121 * Path: <b>StructureDefinition.date</b><br> 4122 * </p> 4123 */ 4124 @SearchParamDefinition(name = "date", path = "StructureDefinition.date", description = "The structure definition publication date", type = "date") 4125 public static final String SP_DATE = "date"; 4126 /** 4127 * <b>Fluent Client</b> search parameter constant for <b>date</b> 4128 * <p> 4129 * Description: <b>The structure definition publication date</b><br> 4130 * Type: <b>date</b><br> 4131 * Path: <b>StructureDefinition.date</b><br> 4132 * </p> 4133 */ 4134 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam( 4135 SP_DATE); 4136 4137 /** 4138 * Search parameter: <b>context-type-value</b> 4139 * <p> 4140 * Description: <b>A use context type and value assigned to the structure 4141 * definition</b><br> 4142 * Type: <b>composite</b><br> 4143 * Path: <b></b><br> 4144 * </p> 4145 */ 4146 @SearchParamDefinition(name = "context-type-value", path = "StructureDefinition.useContext", description = "A use context type and value assigned to the structure definition", type = "composite", compositeOf = { 4147 "context-type", "context" }) 4148 public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value"; 4149 /** 4150 * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b> 4151 * <p> 4152 * Description: <b>A use context type and value assigned to the structure 4153 * definition</b><br> 4154 * Type: <b>composite</b><br> 4155 * Path: <b></b><br> 4156 * </p> 4157 */ 4158 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CONTEXT_TYPE_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>( 4159 SP_CONTEXT_TYPE_VALUE); 4160 4161 /** 4162 * Search parameter: <b>jurisdiction</b> 4163 * <p> 4164 * Description: <b>Intended jurisdiction for the structure definition</b><br> 4165 * Type: <b>token</b><br> 4166 * Path: <b>StructureDefinition.jurisdiction</b><br> 4167 * </p> 4168 */ 4169 @SearchParamDefinition(name = "jurisdiction", path = "StructureDefinition.jurisdiction", description = "Intended jurisdiction for the structure definition", type = "token") 4170 public static final String SP_JURISDICTION = "jurisdiction"; 4171 /** 4172 * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b> 4173 * <p> 4174 * Description: <b>Intended jurisdiction for the structure definition</b><br> 4175 * Type: <b>token</b><br> 4176 * Path: <b>StructureDefinition.jurisdiction</b><br> 4177 * </p> 4178 */ 4179 public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4180 SP_JURISDICTION); 4181 4182 /** 4183 * Search parameter: <b>description</b> 4184 * <p> 4185 * Description: <b>The description of the structure definition</b><br> 4186 * Type: <b>string</b><br> 4187 * Path: <b>StructureDefinition.description</b><br> 4188 * </p> 4189 */ 4190 @SearchParamDefinition(name = "description", path = "StructureDefinition.description", description = "The description of the structure definition", type = "string") 4191 public static final String SP_DESCRIPTION = "description"; 4192 /** 4193 * <b>Fluent Client</b> search parameter constant for <b>description</b> 4194 * <p> 4195 * Description: <b>The description of the structure definition</b><br> 4196 * Type: <b>string</b><br> 4197 * Path: <b>StructureDefinition.description</b><br> 4198 * </p> 4199 */ 4200 public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam( 4201 SP_DESCRIPTION); 4202 4203 /** 4204 * Search parameter: <b>context-type</b> 4205 * <p> 4206 * Description: <b>A type of use context assigned to the structure 4207 * definition</b><br> 4208 * Type: <b>token</b><br> 4209 * Path: <b>StructureDefinition.useContext.code</b><br> 4210 * </p> 4211 */ 4212 @SearchParamDefinition(name = "context-type", path = "StructureDefinition.useContext.code", description = "A type of use context assigned to the structure definition", type = "token") 4213 public static final String SP_CONTEXT_TYPE = "context-type"; 4214 /** 4215 * <b>Fluent Client</b> search parameter constant for <b>context-type</b> 4216 * <p> 4217 * Description: <b>A type of use context assigned to the structure 4218 * definition</b><br> 4219 * Type: <b>token</b><br> 4220 * Path: <b>StructureDefinition.useContext.code</b><br> 4221 * </p> 4222 */ 4223 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4224 SP_CONTEXT_TYPE); 4225 4226 /** 4227 * Search parameter: <b>experimental</b> 4228 * <p> 4229 * Description: <b>For testing purposes, not real usage</b><br> 4230 * Type: <b>token</b><br> 4231 * Path: <b>StructureDefinition.experimental</b><br> 4232 * </p> 4233 */ 4234 @SearchParamDefinition(name = "experimental", path = "StructureDefinition.experimental", description = "For testing purposes, not real usage", type = "token") 4235 public static final String SP_EXPERIMENTAL = "experimental"; 4236 /** 4237 * <b>Fluent Client</b> search parameter constant for <b>experimental</b> 4238 * <p> 4239 * Description: <b>For testing purposes, not real usage</b><br> 4240 * Type: <b>token</b><br> 4241 * Path: <b>StructureDefinition.experimental</b><br> 4242 * </p> 4243 */ 4244 public static final ca.uhn.fhir.rest.gclient.TokenClientParam EXPERIMENTAL = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4245 SP_EXPERIMENTAL); 4246 4247 /** 4248 * Search parameter: <b>title</b> 4249 * <p> 4250 * Description: <b>The human-friendly name of the structure definition</b><br> 4251 * Type: <b>string</b><br> 4252 * Path: <b>StructureDefinition.title</b><br> 4253 * </p> 4254 */ 4255 @SearchParamDefinition(name = "title", path = "StructureDefinition.title", description = "The human-friendly name of the structure definition", type = "string") 4256 public static final String SP_TITLE = "title"; 4257 /** 4258 * <b>Fluent Client</b> search parameter constant for <b>title</b> 4259 * <p> 4260 * Description: <b>The human-friendly name of the structure definition</b><br> 4261 * Type: <b>string</b><br> 4262 * Path: <b>StructureDefinition.title</b><br> 4263 * </p> 4264 */ 4265 public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam( 4266 SP_TITLE); 4267 4268 /** 4269 * Search parameter: <b>type</b> 4270 * <p> 4271 * Description: <b>Type defined or constrained by this structure</b><br> 4272 * Type: <b>uri</b><br> 4273 * Path: <b>StructureDefinition.type</b><br> 4274 * </p> 4275 */ 4276 @SearchParamDefinition(name = "type", path = "StructureDefinition.type", description = "Type defined or constrained by this structure", type = "uri") 4277 public static final String SP_TYPE = "type"; 4278 /** 4279 * <b>Fluent Client</b> search parameter constant for <b>type</b> 4280 * <p> 4281 * Description: <b>Type defined or constrained by this structure</b><br> 4282 * Type: <b>uri</b><br> 4283 * Path: <b>StructureDefinition.type</b><br> 4284 * </p> 4285 */ 4286 public static final ca.uhn.fhir.rest.gclient.UriClientParam TYPE = new ca.uhn.fhir.rest.gclient.UriClientParam( 4287 SP_TYPE); 4288 4289 /** 4290 * Search parameter: <b>context-quantity</b> 4291 * <p> 4292 * Description: <b>A quantity- or range-valued use context assigned to the 4293 * structure definition</b><br> 4294 * Type: <b>quantity</b><br> 4295 * Path: <b>StructureDefinition.useContext.valueQuantity, 4296 * StructureDefinition.useContext.valueRange</b><br> 4297 * </p> 4298 */ 4299 @SearchParamDefinition(name = "context-quantity", path = "(StructureDefinition.useContext.value as Quantity) | (StructureDefinition.useContext.value as Range)", description = "A quantity- or range-valued use context assigned to the structure definition", type = "quantity") 4300 public static final String SP_CONTEXT_QUANTITY = "context-quantity"; 4301 /** 4302 * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b> 4303 * <p> 4304 * Description: <b>A quantity- or range-valued use context assigned to the 4305 * structure definition</b><br> 4306 * Type: <b>quantity</b><br> 4307 * Path: <b>StructureDefinition.useContext.valueQuantity, 4308 * StructureDefinition.useContext.valueRange</b><br> 4309 * </p> 4310 */ 4311 public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam( 4312 SP_CONTEXT_QUANTITY); 4313 4314 /** 4315 * Search parameter: <b>path</b> 4316 * <p> 4317 * Description: <b>A path that is constrained in the StructureDefinition</b><br> 4318 * Type: <b>token</b><br> 4319 * Path: <b>StructureDefinition.snapshot.element.path, 4320 * StructureDefinition.differential.element.path</b><br> 4321 * </p> 4322 */ 4323 @SearchParamDefinition(name = "path", path = "StructureDefinition.snapshot.element.path | StructureDefinition.differential.element.path", description = "A path that is constrained in the StructureDefinition", type = "token") 4324 public static final String SP_PATH = "path"; 4325 /** 4326 * <b>Fluent Client</b> search parameter constant for <b>path</b> 4327 * <p> 4328 * Description: <b>A path that is constrained in the StructureDefinition</b><br> 4329 * Type: <b>token</b><br> 4330 * Path: <b>StructureDefinition.snapshot.element.path, 4331 * StructureDefinition.differential.element.path</b><br> 4332 * </p> 4333 */ 4334 public static final ca.uhn.fhir.rest.gclient.TokenClientParam PATH = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4335 SP_PATH); 4336 4337 /** 4338 * Search parameter: <b>context</b> 4339 * <p> 4340 * Description: <b>A use context assigned to the structure definition</b><br> 4341 * Type: <b>token</b><br> 4342 * Path: <b>StructureDefinition.useContext.valueCodeableConcept</b><br> 4343 * </p> 4344 */ 4345 @SearchParamDefinition(name = "context", path = "(StructureDefinition.useContext.value as CodeableConcept)", description = "A use context assigned to the structure definition", type = "token") 4346 public static final String SP_CONTEXT = "context"; 4347 /** 4348 * <b>Fluent Client</b> search parameter constant for <b>context</b> 4349 * <p> 4350 * Description: <b>A use context assigned to the structure definition</b><br> 4351 * Type: <b>token</b><br> 4352 * Path: <b>StructureDefinition.useContext.valueCodeableConcept</b><br> 4353 * </p> 4354 */ 4355 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4356 SP_CONTEXT); 4357 4358 /** 4359 * Search parameter: <b>base-path</b> 4360 * <p> 4361 * Description: <b>Path that identifies the base element</b><br> 4362 * Type: <b>token</b><br> 4363 * Path: <b>StructureDefinition.snapshot.element.base.path, 4364 * StructureDefinition.differential.element.base.path</b><br> 4365 * </p> 4366 */ 4367 @SearchParamDefinition(name = "base-path", path = "StructureDefinition.snapshot.element.base.path | StructureDefinition.differential.element.base.path", description = "Path that identifies the base element", type = "token") 4368 public static final String SP_BASE_PATH = "base-path"; 4369 /** 4370 * <b>Fluent Client</b> search parameter constant for <b>base-path</b> 4371 * <p> 4372 * Description: <b>Path that identifies the base element</b><br> 4373 * Type: <b>token</b><br> 4374 * Path: <b>StructureDefinition.snapshot.element.base.path, 4375 * StructureDefinition.differential.element.base.path</b><br> 4376 * </p> 4377 */ 4378 public static final ca.uhn.fhir.rest.gclient.TokenClientParam BASE_PATH = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4379 SP_BASE_PATH); 4380 4381 /** 4382 * Search parameter: <b>keyword</b> 4383 * <p> 4384 * Description: <b>A code for the StructureDefinition</b><br> 4385 * Type: <b>token</b><br> 4386 * Path: <b>StructureDefinition.keyword</b><br> 4387 * </p> 4388 */ 4389 @SearchParamDefinition(name = "keyword", path = "StructureDefinition.keyword", description = "A code for the StructureDefinition", type = "token") 4390 public static final String SP_KEYWORD = "keyword"; 4391 /** 4392 * <b>Fluent Client</b> search parameter constant for <b>keyword</b> 4393 * <p> 4394 * Description: <b>A code for the StructureDefinition</b><br> 4395 * Type: <b>token</b><br> 4396 * Path: <b>StructureDefinition.keyword</b><br> 4397 * </p> 4398 */ 4399 public static final ca.uhn.fhir.rest.gclient.TokenClientParam KEYWORD = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4400 SP_KEYWORD); 4401 4402 /** 4403 * Search parameter: <b>context-type-quantity</b> 4404 * <p> 4405 * Description: <b>A use context type and quantity- or range-based value 4406 * assigned to the structure definition</b><br> 4407 * Type: <b>composite</b><br> 4408 * Path: <b></b><br> 4409 * </p> 4410 */ 4411 @SearchParamDefinition(name = "context-type-quantity", path = "StructureDefinition.useContext", description = "A use context type and quantity- or range-based value assigned to the structure definition", type = "composite", compositeOf = { 4412 "context-type", "context-quantity" }) 4413 public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity"; 4414 /** 4415 * <b>Fluent Client</b> search parameter constant for 4416 * <b>context-type-quantity</b> 4417 * <p> 4418 * Description: <b>A use context type and quantity- or range-based value 4419 * assigned to the structure definition</b><br> 4420 * Type: <b>composite</b><br> 4421 * Path: <b></b><br> 4422 * </p> 4423 */ 4424 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CONTEXT_TYPE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>( 4425 SP_CONTEXT_TYPE_QUANTITY); 4426 4427 /** 4428 * Search parameter: <b>identifier</b> 4429 * <p> 4430 * Description: <b>External identifier for the structure definition</b><br> 4431 * Type: <b>token</b><br> 4432 * Path: <b>StructureDefinition.identifier</b><br> 4433 * </p> 4434 */ 4435 @SearchParamDefinition(name = "identifier", path = "StructureDefinition.identifier", description = "External identifier for the structure definition", type = "token") 4436 public static final String SP_IDENTIFIER = "identifier"; 4437 /** 4438 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 4439 * <p> 4440 * Description: <b>External identifier for the structure definition</b><br> 4441 * Type: <b>token</b><br> 4442 * Path: <b>StructureDefinition.identifier</b><br> 4443 * </p> 4444 */ 4445 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4446 SP_IDENTIFIER); 4447 4448 /** 4449 * Search parameter: <b>valueset</b> 4450 * <p> 4451 * Description: <b>A vocabulary binding reference</b><br> 4452 * Type: <b>reference</b><br> 4453 * Path: <b>StructureDefinition.snapshot.element.binding.valueSet</b><br> 4454 * </p> 4455 */ 4456 @SearchParamDefinition(name = "valueset", path = "StructureDefinition.snapshot.element.binding.valueSet", description = "A vocabulary binding reference", type = "reference", target = { 4457 ValueSet.class }) 4458 public static final String SP_VALUESET = "valueset"; 4459 /** 4460 * <b>Fluent Client</b> search parameter constant for <b>valueset</b> 4461 * <p> 4462 * Description: <b>A vocabulary binding reference</b><br> 4463 * Type: <b>reference</b><br> 4464 * Path: <b>StructureDefinition.snapshot.element.binding.valueSet</b><br> 4465 * </p> 4466 */ 4467 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam VALUESET = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 4468 SP_VALUESET); 4469 4470 /** 4471 * Constant for fluent queries to be used to add include statements. Specifies 4472 * the path value of "<b>StructureDefinition:valueset</b>". 4473 */ 4474 public static final ca.uhn.fhir.model.api.Include INCLUDE_VALUESET = new ca.uhn.fhir.model.api.Include( 4475 "StructureDefinition:valueset").toLocked(); 4476 4477 /** 4478 * Search parameter: <b>kind</b> 4479 * <p> 4480 * Description: <b>primitive-type | complex-type | resource | logical</b><br> 4481 * Type: <b>token</b><br> 4482 * Path: <b>StructureDefinition.kind</b><br> 4483 * </p> 4484 */ 4485 @SearchParamDefinition(name = "kind", path = "StructureDefinition.kind", description = "primitive-type | complex-type | resource | logical", type = "token") 4486 public static final String SP_KIND = "kind"; 4487 /** 4488 * <b>Fluent Client</b> search parameter constant for <b>kind</b> 4489 * <p> 4490 * Description: <b>primitive-type | complex-type | resource | logical</b><br> 4491 * Type: <b>token</b><br> 4492 * Path: <b>StructureDefinition.kind</b><br> 4493 * </p> 4494 */ 4495 public static final ca.uhn.fhir.rest.gclient.TokenClientParam KIND = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4496 SP_KIND); 4497 4498 /** 4499 * Search parameter: <b>abstract</b> 4500 * <p> 4501 * Description: <b>Whether the structure is abstract</b><br> 4502 * Type: <b>token</b><br> 4503 * Path: <b>StructureDefinition.abstract</b><br> 4504 * </p> 4505 */ 4506 @SearchParamDefinition(name = "abstract", path = "StructureDefinition.abstract", description = "Whether the structure is abstract", type = "token") 4507 public static final String SP_ABSTRACT = "abstract"; 4508 /** 4509 * <b>Fluent Client</b> search parameter constant for <b>abstract</b> 4510 * <p> 4511 * Description: <b>Whether the structure is abstract</b><br> 4512 * Type: <b>token</b><br> 4513 * Path: <b>StructureDefinition.abstract</b><br> 4514 * </p> 4515 */ 4516 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ABSTRACT = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4517 SP_ABSTRACT); 4518 4519 /** 4520 * Search parameter: <b>version</b> 4521 * <p> 4522 * Description: <b>The business version of the structure definition</b><br> 4523 * Type: <b>token</b><br> 4524 * Path: <b>StructureDefinition.version</b><br> 4525 * </p> 4526 */ 4527 @SearchParamDefinition(name = "version", path = "StructureDefinition.version", description = "The business version of the structure definition", type = "token") 4528 public static final String SP_VERSION = "version"; 4529 /** 4530 * <b>Fluent Client</b> search parameter constant for <b>version</b> 4531 * <p> 4532 * Description: <b>The business version of the structure definition</b><br> 4533 * Type: <b>token</b><br> 4534 * Path: <b>StructureDefinition.version</b><br> 4535 * </p> 4536 */ 4537 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4538 SP_VERSION); 4539 4540 /** 4541 * Search parameter: <b>url</b> 4542 * <p> 4543 * Description: <b>The uri that identifies the structure definition</b><br> 4544 * Type: <b>uri</b><br> 4545 * Path: <b>StructureDefinition.url</b><br> 4546 * </p> 4547 */ 4548 @SearchParamDefinition(name = "url", path = "StructureDefinition.url", description = "The uri that identifies the structure definition", type = "uri") 4549 public static final String SP_URL = "url"; 4550 /** 4551 * <b>Fluent Client</b> search parameter constant for <b>url</b> 4552 * <p> 4553 * Description: <b>The uri that identifies the structure definition</b><br> 4554 * Type: <b>uri</b><br> 4555 * Path: <b>StructureDefinition.url</b><br> 4556 * </p> 4557 */ 4558 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 4559 4560 /** 4561 * Search parameter: <b>ext-context</b> 4562 * <p> 4563 * Description: <b>The system is the URL for the context-type: e.g. 4564 * http://hl7.org/fhir/extension-context-type#element|CodeableConcept.text</b><br> 4565 * Type: <b>token</b><br> 4566 * Path: <b>StructureDefinition.context.type</b><br> 4567 * </p> 4568 */ 4569 @SearchParamDefinition(name = "ext-context", path = "StructureDefinition.context.type", description = "The system is the URL for the context-type: e.g. http://hl7.org/fhir/extension-context-type#element|CodeableConcept.text", type = "token") 4570 public static final String SP_EXT_CONTEXT = "ext-context"; 4571 /** 4572 * <b>Fluent Client</b> search parameter constant for <b>ext-context</b> 4573 * <p> 4574 * Description: <b>The system is the URL for the context-type: e.g. 4575 * http://hl7.org/fhir/extension-context-type#element|CodeableConcept.text</b><br> 4576 * Type: <b>token</b><br> 4577 * Path: <b>StructureDefinition.context.type</b><br> 4578 * </p> 4579 */ 4580 public static final ca.uhn.fhir.rest.gclient.TokenClientParam EXT_CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4581 SP_EXT_CONTEXT); 4582 4583 /** 4584 * Search parameter: <b>name</b> 4585 * <p> 4586 * Description: <b>Computationally friendly name of the structure 4587 * definition</b><br> 4588 * Type: <b>string</b><br> 4589 * Path: <b>StructureDefinition.name</b><br> 4590 * </p> 4591 */ 4592 @SearchParamDefinition(name = "name", path = "StructureDefinition.name", description = "Computationally friendly name of the structure definition", type = "string") 4593 public static final String SP_NAME = "name"; 4594 /** 4595 * <b>Fluent Client</b> search parameter constant for <b>name</b> 4596 * <p> 4597 * Description: <b>Computationally friendly name of the structure 4598 * definition</b><br> 4599 * Type: <b>string</b><br> 4600 * Path: <b>StructureDefinition.name</b><br> 4601 * </p> 4602 */ 4603 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam( 4604 SP_NAME); 4605 4606 /** 4607 * Search parameter: <b>publisher</b> 4608 * <p> 4609 * Description: <b>Name of the publisher of the structure definition</b><br> 4610 * Type: <b>string</b><br> 4611 * Path: <b>StructureDefinition.publisher</b><br> 4612 * </p> 4613 */ 4614 @SearchParamDefinition(name = "publisher", path = "StructureDefinition.publisher", description = "Name of the publisher of the structure definition", type = "string") 4615 public static final String SP_PUBLISHER = "publisher"; 4616 /** 4617 * <b>Fluent Client</b> search parameter constant for <b>publisher</b> 4618 * <p> 4619 * Description: <b>Name of the publisher of the structure definition</b><br> 4620 * Type: <b>string</b><br> 4621 * Path: <b>StructureDefinition.publisher</b><br> 4622 * </p> 4623 */ 4624 public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam( 4625 SP_PUBLISHER); 4626 4627 /** 4628 * Search parameter: <b>derivation</b> 4629 * <p> 4630 * Description: <b>specialization | constraint - How relates to base 4631 * definition</b><br> 4632 * Type: <b>token</b><br> 4633 * Path: <b>StructureDefinition.derivation</b><br> 4634 * </p> 4635 */ 4636 @SearchParamDefinition(name = "derivation", path = "StructureDefinition.derivation", description = "specialization | constraint - How relates to base definition", type = "token") 4637 public static final String SP_DERIVATION = "derivation"; 4638 /** 4639 * <b>Fluent Client</b> search parameter constant for <b>derivation</b> 4640 * <p> 4641 * Description: <b>specialization | constraint - How relates to base 4642 * definition</b><br> 4643 * Type: <b>token</b><br> 4644 * Path: <b>StructureDefinition.derivation</b><br> 4645 * </p> 4646 */ 4647 public static final ca.uhn.fhir.rest.gclient.TokenClientParam DERIVATION = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4648 SP_DERIVATION); 4649 4650 /** 4651 * Search parameter: <b>status</b> 4652 * <p> 4653 * Description: <b>The current status of the structure definition</b><br> 4654 * Type: <b>token</b><br> 4655 * Path: <b>StructureDefinition.status</b><br> 4656 * </p> 4657 */ 4658 @SearchParamDefinition(name = "status", path = "StructureDefinition.status", description = "The current status of the structure definition", type = "token") 4659 public static final String SP_STATUS = "status"; 4660 /** 4661 * <b>Fluent Client</b> search parameter constant for <b>status</b> 4662 * <p> 4663 * Description: <b>The current status of the structure definition</b><br> 4664 * Type: <b>token</b><br> 4665 * Path: <b>StructureDefinition.status</b><br> 4666 * </p> 4667 */ 4668 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4669 SP_STATUS); 4670 4671 /** 4672 * Search parameter: <b>base</b> 4673 * <p> 4674 * Description: <b>Definition that this type is constrained/specialized 4675 * from</b><br> 4676 * Type: <b>reference</b><br> 4677 * Path: <b>StructureDefinition.baseDefinition</b><br> 4678 * </p> 4679 */ 4680 @SearchParamDefinition(name = "base", path = "StructureDefinition.baseDefinition", description = "Definition that this type is constrained/specialized from", type = "reference", target = { 4681 StructureDefinition.class }) 4682 public static final String SP_BASE = "base"; 4683 /** 4684 * <b>Fluent Client</b> search parameter constant for <b>base</b> 4685 * <p> 4686 * Description: <b>Definition that this type is constrained/specialized 4687 * from</b><br> 4688 * Type: <b>reference</b><br> 4689 * Path: <b>StructureDefinition.baseDefinition</b><br> 4690 * </p> 4691 */ 4692 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 4693 SP_BASE); 4694 4695 /** 4696 * Constant for fluent queries to be used to add include statements. Specifies 4697 * the path value of "<b>StructureDefinition:base</b>". 4698 */ 4699 public static final ca.uhn.fhir.model.api.Include INCLUDE_BASE = new ca.uhn.fhir.model.api.Include( 4700 "StructureDefinition:base").toLocked(); 4701 4702}