![](/hapi-fhir/images/logos/raccoon-forwards.png)
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.Collections; 035import java.util.Comparator; 036import java.util.Date; 037import java.util.List; 038 039import org.hl7.fhir.exceptions.FHIRException; 040import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 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 * The CodeSystem resource is used to declare the existence of and describe a 054 * code system or code system supplement and its key properties, and optionally 055 * define a part or all of its content. 056 */ 057@ResourceDef(name = "CodeSystem", profile = "http://hl7.org/fhir/StructureDefinition/CodeSystem") 058@ChildOrder(names = { "url", "identifier", "version", "name", "title", "status", "experimental", "date", "publisher", 059 "contact", "description", "useContext", "jurisdiction", "purpose", "copyright", "caseSensitive", "valueSet", 060 "hierarchyMeaning", "compositional", "versionNeeded", "content", "supplements", "count", "filter", "property", 061 "concept" }) 062public class CodeSystem extends MetadataResource { 063 064 public enum CodeSystemHierarchyMeaning { 065 /** 066 * No particular relationship between the concepts can be assumed, except what 067 * can be determined by inspection of the definitions of the elements (possible 068 * reasons to use this: importing from a source where this is not defined, or 069 * where various parts of the hierarchy have different meanings). 070 */ 071 GROUPEDBY, 072 /** 073 * A hierarchy where the child concepts have an IS-A relationship with the 074 * parents - that is, all the properties of the parent are also true for its 075 * child concepts. Not that is-a is a property of the concepts, so additional 076 * subsumption relationships may be defined using properties or the 077 * [subsumes](extension-codesystem-subsumes.html) extension. 078 */ 079 ISA, 080 /** 081 * Child elements list the individual parts of a composite whole (e.g. body 082 * site). 083 */ 084 PARTOF, 085 /** 086 * Child concepts in the hierarchy may have only one parent, and there is a 087 * presumption that the code system is a "closed world" meaning all things must 088 * be in the hierarchy. This results in concepts such as "not otherwise 089 * classified.". 090 */ 091 CLASSIFIEDWITH, 092 /** 093 * added to help the parsers with the generic types 094 */ 095 NULL; 096 097 public static CodeSystemHierarchyMeaning fromCode(String codeString) throws FHIRException { 098 if (codeString == null || "".equals(codeString)) 099 return null; 100 if ("grouped-by".equals(codeString)) 101 return GROUPEDBY; 102 if ("is-a".equals(codeString)) 103 return ISA; 104 if ("part-of".equals(codeString)) 105 return PARTOF; 106 if ("classified-with".equals(codeString)) 107 return CLASSIFIEDWITH; 108 if (Configuration.isAcceptInvalidEnums()) 109 return null; 110 else 111 throw new FHIRException("Unknown CodeSystemHierarchyMeaning code '" + codeString + "'"); 112 } 113 114 public String toCode() { 115 switch (this) { 116 case GROUPEDBY: 117 return "grouped-by"; 118 case ISA: 119 return "is-a"; 120 case PARTOF: 121 return "part-of"; 122 case CLASSIFIEDWITH: 123 return "classified-with"; 124 case NULL: 125 return null; 126 default: 127 return "?"; 128 } 129 } 130 131 public String getSystem() { 132 switch (this) { 133 case GROUPEDBY: 134 return "http://hl7.org/fhir/codesystem-hierarchy-meaning"; 135 case ISA: 136 return "http://hl7.org/fhir/codesystem-hierarchy-meaning"; 137 case PARTOF: 138 return "http://hl7.org/fhir/codesystem-hierarchy-meaning"; 139 case CLASSIFIEDWITH: 140 return "http://hl7.org/fhir/codesystem-hierarchy-meaning"; 141 case NULL: 142 return null; 143 default: 144 return "?"; 145 } 146 } 147 148 public String getDefinition() { 149 switch (this) { 150 case GROUPEDBY: 151 return "No particular relationship between the concepts can be assumed, except what can be determined by inspection of the definitions of the elements (possible reasons to use this: importing from a source where this is not defined, or where various parts of the hierarchy have different meanings)."; 152 case ISA: 153 return "A hierarchy where the child concepts have an IS-A relationship with the parents - that is, all the properties of the parent are also true for its child concepts. Not that is-a is a property of the concepts, so additional subsumption relationships may be defined using properties or the [subsumes](extension-codesystem-subsumes.html) extension."; 154 case PARTOF: 155 return "Child elements list the individual parts of a composite whole (e.g. body site)."; 156 case CLASSIFIEDWITH: 157 return "Child concepts in the hierarchy may have only one parent, and there is a presumption that the code system is a \"closed world\" meaning all things must be in the hierarchy. This results in concepts such as \"not otherwise classified.\"."; 158 case NULL: 159 return null; 160 default: 161 return "?"; 162 } 163 } 164 165 public String getDisplay() { 166 switch (this) { 167 case GROUPEDBY: 168 return "Grouped By"; 169 case ISA: 170 return "Is-A"; 171 case PARTOF: 172 return "Part Of"; 173 case CLASSIFIEDWITH: 174 return "Classified With"; 175 case NULL: 176 return null; 177 default: 178 return "?"; 179 } 180 } 181 } 182 183 public static class CodeSystemHierarchyMeaningEnumFactory implements EnumFactory<CodeSystemHierarchyMeaning> { 184 public CodeSystemHierarchyMeaning fromCode(String codeString) throws IllegalArgumentException { 185 if (codeString == null || "".equals(codeString)) 186 if (codeString == null || "".equals(codeString)) 187 return null; 188 if ("grouped-by".equals(codeString)) 189 return CodeSystemHierarchyMeaning.GROUPEDBY; 190 if ("is-a".equals(codeString)) 191 return CodeSystemHierarchyMeaning.ISA; 192 if ("part-of".equals(codeString)) 193 return CodeSystemHierarchyMeaning.PARTOF; 194 if ("classified-with".equals(codeString)) 195 return CodeSystemHierarchyMeaning.CLASSIFIEDWITH; 196 throw new IllegalArgumentException("Unknown CodeSystemHierarchyMeaning code '" + codeString + "'"); 197 } 198 199 public Enumeration<CodeSystemHierarchyMeaning> fromType(PrimitiveType<?> code) throws FHIRException { 200 if (code == null) 201 return null; 202 if (code.isEmpty()) 203 return new Enumeration<CodeSystemHierarchyMeaning>(this, CodeSystemHierarchyMeaning.NULL, code); 204 String codeString = code.asStringValue(); 205 if (codeString == null || "".equals(codeString)) 206 return new Enumeration<CodeSystemHierarchyMeaning>(this, CodeSystemHierarchyMeaning.NULL, code); 207 if ("grouped-by".equals(codeString)) 208 return new Enumeration<CodeSystemHierarchyMeaning>(this, CodeSystemHierarchyMeaning.GROUPEDBY, code); 209 if ("is-a".equals(codeString)) 210 return new Enumeration<CodeSystemHierarchyMeaning>(this, CodeSystemHierarchyMeaning.ISA, code); 211 if ("part-of".equals(codeString)) 212 return new Enumeration<CodeSystemHierarchyMeaning>(this, CodeSystemHierarchyMeaning.PARTOF, code); 213 if ("classified-with".equals(codeString)) 214 return new Enumeration<CodeSystemHierarchyMeaning>(this, CodeSystemHierarchyMeaning.CLASSIFIEDWITH, code); 215 throw new FHIRException("Unknown CodeSystemHierarchyMeaning code '" + codeString + "'"); 216 } 217 218 public String toCode(CodeSystemHierarchyMeaning code) { 219 if (code == CodeSystemHierarchyMeaning.GROUPEDBY) 220 return "grouped-by"; 221 if (code == CodeSystemHierarchyMeaning.ISA) 222 return "is-a"; 223 if (code == CodeSystemHierarchyMeaning.PARTOF) 224 return "part-of"; 225 if (code == CodeSystemHierarchyMeaning.CLASSIFIEDWITH) 226 return "classified-with"; 227 return "?"; 228 } 229 230 public String toSystem(CodeSystemHierarchyMeaning code) { 231 return code.getSystem(); 232 } 233 } 234 235 public enum CodeSystemContentMode { 236 /** 237 * None of the concepts defined by the code system are included in the code 238 * system resource. 239 */ 240 NOTPRESENT, 241 /** 242 * A few representative concepts are included in the code system resource. There 243 * is no useful intent in the subset choice and there's no process to make it 244 * workable: it's not intended to be workable. 245 */ 246 EXAMPLE, 247 /** 248 * A subset of the code system concepts are included in the code system 249 * resource. This is a curated subset released for a specific purpose under the 250 * governance of the code system steward, and that the intent, bounds and 251 * consequences of the fragmentation are clearly defined in the fragment or the 252 * code system documentation. Fragments are also known as partitions. 253 */ 254 FRAGMENT, 255 /** 256 * All the concepts defined by the code system are included in the code system 257 * resource. 258 */ 259 COMPLETE, 260 /** 261 * The resource doesn't define any new concepts; it just provides additional 262 * designations and properties to another code system. 263 */ 264 SUPPLEMENT, 265 /** 266 * added to help the parsers with the generic types 267 */ 268 NULL; 269 270 public static CodeSystemContentMode fromCode(String codeString) throws FHIRException { 271 if (codeString == null || "".equals(codeString)) 272 return null; 273 if ("not-present".equals(codeString)) 274 return NOTPRESENT; 275 if ("example".equals(codeString)) 276 return EXAMPLE; 277 if ("fragment".equals(codeString)) 278 return FRAGMENT; 279 if ("complete".equals(codeString)) 280 return COMPLETE; 281 if ("supplement".equals(codeString)) 282 return SUPPLEMENT; 283 if (Configuration.isAcceptInvalidEnums()) 284 return null; 285 else 286 throw new FHIRException("Unknown CodeSystemContentMode code '" + codeString + "'"); 287 } 288 289 public String toCode() { 290 switch (this) { 291 case NOTPRESENT: 292 return "not-present"; 293 case EXAMPLE: 294 return "example"; 295 case FRAGMENT: 296 return "fragment"; 297 case COMPLETE: 298 return "complete"; 299 case SUPPLEMENT: 300 return "supplement"; 301 case NULL: 302 return null; 303 default: 304 return "?"; 305 } 306 } 307 308 public String getSystem() { 309 switch (this) { 310 case NOTPRESENT: 311 return "http://hl7.org/fhir/codesystem-content-mode"; 312 case EXAMPLE: 313 return "http://hl7.org/fhir/codesystem-content-mode"; 314 case FRAGMENT: 315 return "http://hl7.org/fhir/codesystem-content-mode"; 316 case COMPLETE: 317 return "http://hl7.org/fhir/codesystem-content-mode"; 318 case SUPPLEMENT: 319 return "http://hl7.org/fhir/codesystem-content-mode"; 320 case NULL: 321 return null; 322 default: 323 return "?"; 324 } 325 } 326 327 public String getDefinition() { 328 switch (this) { 329 case NOTPRESENT: 330 return "None of the concepts defined by the code system are included in the code system resource."; 331 case EXAMPLE: 332 return "A few representative concepts are included in the code system resource. There is no useful intent in the subset choice and there's no process to make it workable: it's not intended to be workable."; 333 case FRAGMENT: 334 return "A subset of the code system concepts are included in the code system resource. This is a curated subset released for a specific purpose under the governance of the code system steward, and that the intent, bounds and consequences of the fragmentation are clearly defined in the fragment or the code system documentation. Fragments are also known as partitions."; 335 case COMPLETE: 336 return "All the concepts defined by the code system are included in the code system resource."; 337 case SUPPLEMENT: 338 return "The resource doesn't define any new concepts; it just provides additional designations and properties to another code system."; 339 case NULL: 340 return null; 341 default: 342 return "?"; 343 } 344 } 345 346 public String getDisplay() { 347 switch (this) { 348 case NOTPRESENT: 349 return "Not Present"; 350 case EXAMPLE: 351 return "Example"; 352 case FRAGMENT: 353 return "Fragment"; 354 case COMPLETE: 355 return "Complete"; 356 case SUPPLEMENT: 357 return "Supplement"; 358 case NULL: 359 return null; 360 default: 361 return "?"; 362 } 363 } 364 } 365 366 public static class CodeSystemContentModeEnumFactory implements EnumFactory<CodeSystemContentMode> { 367 public CodeSystemContentMode fromCode(String codeString) throws IllegalArgumentException { 368 if (codeString == null || "".equals(codeString)) 369 if (codeString == null || "".equals(codeString)) 370 return null; 371 if ("not-present".equals(codeString)) 372 return CodeSystemContentMode.NOTPRESENT; 373 if ("example".equals(codeString)) 374 return CodeSystemContentMode.EXAMPLE; 375 if ("fragment".equals(codeString)) 376 return CodeSystemContentMode.FRAGMENT; 377 if ("complete".equals(codeString)) 378 return CodeSystemContentMode.COMPLETE; 379 if ("supplement".equals(codeString)) 380 return CodeSystemContentMode.SUPPLEMENT; 381 throw new IllegalArgumentException("Unknown CodeSystemContentMode code '" + codeString + "'"); 382 } 383 384 public Enumeration<CodeSystemContentMode> fromType(PrimitiveType<?> code) throws FHIRException { 385 if (code == null) 386 return null; 387 if (code.isEmpty()) 388 return new Enumeration<CodeSystemContentMode>(this, CodeSystemContentMode.NULL, code); 389 String codeString = code.asStringValue(); 390 if (codeString == null || "".equals(codeString)) 391 return new Enumeration<CodeSystemContentMode>(this, CodeSystemContentMode.NULL, code); 392 if ("not-present".equals(codeString)) 393 return new Enumeration<CodeSystemContentMode>(this, CodeSystemContentMode.NOTPRESENT, code); 394 if ("example".equals(codeString)) 395 return new Enumeration<CodeSystemContentMode>(this, CodeSystemContentMode.EXAMPLE, code); 396 if ("fragment".equals(codeString)) 397 return new Enumeration<CodeSystemContentMode>(this, CodeSystemContentMode.FRAGMENT, code); 398 if ("complete".equals(codeString)) 399 return new Enumeration<CodeSystemContentMode>(this, CodeSystemContentMode.COMPLETE, code); 400 if ("supplement".equals(codeString)) 401 return new Enumeration<CodeSystemContentMode>(this, CodeSystemContentMode.SUPPLEMENT, code); 402 throw new FHIRException("Unknown CodeSystemContentMode code '" + codeString + "'"); 403 } 404 405 public String toCode(CodeSystemContentMode code) { 406 if (code == CodeSystemContentMode.NOTPRESENT) 407 return "not-present"; 408 if (code == CodeSystemContentMode.EXAMPLE) 409 return "example"; 410 if (code == CodeSystemContentMode.FRAGMENT) 411 return "fragment"; 412 if (code == CodeSystemContentMode.COMPLETE) 413 return "complete"; 414 if (code == CodeSystemContentMode.SUPPLEMENT) 415 return "supplement"; 416 return "?"; 417 } 418 419 public String toSystem(CodeSystemContentMode code) { 420 return code.getSystem(); 421 } 422 } 423 424 public enum FilterOperator { 425 /** 426 * The specified property of the code equals the provided value. 427 */ 428 EQUAL, 429 /** 430 * Includes all concept ids that have a transitive is-a relationship with the 431 * concept Id provided as the value, including the provided concept itself 432 * (include descendant codes and self). 433 */ 434 ISA, 435 /** 436 * Includes all concept ids that have a transitive is-a relationship with the 437 * concept Id provided as the value, excluding the provided concept itself i.e. 438 * include descendant codes only). 439 */ 440 DESCENDENTOF, 441 /** 442 * The specified property of the code does not have an is-a relationship with 443 * the provided value. 444 */ 445 ISNOTA, 446 /** 447 * The specified property of the code matches the regex specified in the 448 * provided value. 449 */ 450 REGEX, 451 /** 452 * The specified property of the code is in the set of codes or concepts 453 * specified in the provided value (comma separated list). 454 */ 455 IN, 456 /** 457 * The specified property of the code is not in the set of codes or concepts 458 * specified in the provided value (comma separated list). 459 */ 460 NOTIN, 461 /** 462 * Includes all concept ids that have a transitive is-a relationship from the 463 * concept Id provided as the value, including the provided concept itself (i.e. 464 * include ancestor codes and self). 465 */ 466 GENERALIZES, 467 /** 468 * The specified property of the code has at least one value (if the specified 469 * value is true; if the specified value is false, then matches when the 470 * specified property of the code has no values). 471 */ 472 EXISTS, 473 /** 474 * added to help the parsers with the generic types 475 */ 476 NULL; 477 478 public static FilterOperator fromCode(String codeString) throws FHIRException { 479 if (codeString == null || "".equals(codeString)) 480 return null; 481 if ("=".equals(codeString)) 482 return EQUAL; 483 if ("is-a".equals(codeString)) 484 return ISA; 485 if ("descendent-of".equals(codeString)) 486 return DESCENDENTOF; 487 if ("is-not-a".equals(codeString)) 488 return ISNOTA; 489 if ("regex".equals(codeString)) 490 return REGEX; 491 if ("in".equals(codeString)) 492 return IN; 493 if ("not-in".equals(codeString)) 494 return NOTIN; 495 if ("generalizes".equals(codeString)) 496 return GENERALIZES; 497 if ("exists".equals(codeString)) 498 return EXISTS; 499 if (Configuration.isAcceptInvalidEnums()) 500 return null; 501 else 502 throw new FHIRException("Unknown FilterOperator code '" + codeString + "'"); 503 } 504 505 public String toCode() { 506 switch (this) { 507 case EQUAL: 508 return "="; 509 case ISA: 510 return "is-a"; 511 case DESCENDENTOF: 512 return "descendent-of"; 513 case ISNOTA: 514 return "is-not-a"; 515 case REGEX: 516 return "regex"; 517 case IN: 518 return "in"; 519 case NOTIN: 520 return "not-in"; 521 case GENERALIZES: 522 return "generalizes"; 523 case EXISTS: 524 return "exists"; 525 case NULL: 526 return null; 527 default: 528 return "?"; 529 } 530 } 531 532 public String getSystem() { 533 switch (this) { 534 case EQUAL: 535 return "http://hl7.org/fhir/filter-operator"; 536 case ISA: 537 return "http://hl7.org/fhir/filter-operator"; 538 case DESCENDENTOF: 539 return "http://hl7.org/fhir/filter-operator"; 540 case ISNOTA: 541 return "http://hl7.org/fhir/filter-operator"; 542 case REGEX: 543 return "http://hl7.org/fhir/filter-operator"; 544 case IN: 545 return "http://hl7.org/fhir/filter-operator"; 546 case NOTIN: 547 return "http://hl7.org/fhir/filter-operator"; 548 case GENERALIZES: 549 return "http://hl7.org/fhir/filter-operator"; 550 case EXISTS: 551 return "http://hl7.org/fhir/filter-operator"; 552 case NULL: 553 return null; 554 default: 555 return "?"; 556 } 557 } 558 559 public String getDefinition() { 560 switch (this) { 561 case EQUAL: 562 return "The specified property of the code equals the provided value."; 563 case ISA: 564 return "Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, including the provided concept itself (include descendant codes and self)."; 565 case DESCENDENTOF: 566 return "Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, excluding the provided concept itself i.e. include descendant codes only)."; 567 case ISNOTA: 568 return "The specified property of the code does not have an is-a relationship with the provided value."; 569 case REGEX: 570 return "The specified property of the code matches the regex specified in the provided value."; 571 case IN: 572 return "The specified property of the code is in the set of codes or concepts specified in the provided value (comma separated list)."; 573 case NOTIN: 574 return "The specified property of the code is not in the set of codes or concepts specified in the provided value (comma separated list)."; 575 case GENERALIZES: 576 return "Includes all concept ids that have a transitive is-a relationship from the concept Id provided as the value, including the provided concept itself (i.e. include ancestor codes and self)."; 577 case EXISTS: 578 return "The specified property of the code has at least one value (if the specified value is true; if the specified value is false, then matches when the specified property of the code has no values)."; 579 case NULL: 580 return null; 581 default: 582 return "?"; 583 } 584 } 585 586 public String getDisplay() { 587 switch (this) { 588 case EQUAL: 589 return "Equals"; 590 case ISA: 591 return "Is A (by subsumption)"; 592 case DESCENDENTOF: 593 return "Descendent Of (by subsumption)"; 594 case ISNOTA: 595 return "Not (Is A) (by subsumption)"; 596 case REGEX: 597 return "Regular Expression"; 598 case IN: 599 return "In Set"; 600 case NOTIN: 601 return "Not in Set"; 602 case GENERALIZES: 603 return "Generalizes (by Subsumption)"; 604 case EXISTS: 605 return "Exists"; 606 case NULL: 607 return null; 608 default: 609 return "?"; 610 } 611 } 612 } 613 614 public static class FilterOperatorEnumFactory implements EnumFactory<FilterOperator> { 615 public FilterOperator fromCode(String codeString) throws IllegalArgumentException { 616 if (codeString == null || "".equals(codeString)) 617 if (codeString == null || "".equals(codeString)) 618 return null; 619 if ("=".equals(codeString)) 620 return FilterOperator.EQUAL; 621 if ("is-a".equals(codeString)) 622 return FilterOperator.ISA; 623 if ("descendent-of".equals(codeString)) 624 return FilterOperator.DESCENDENTOF; 625 if ("is-not-a".equals(codeString)) 626 return FilterOperator.ISNOTA; 627 if ("regex".equals(codeString)) 628 return FilterOperator.REGEX; 629 if ("in".equals(codeString)) 630 return FilterOperator.IN; 631 if ("not-in".equals(codeString)) 632 return FilterOperator.NOTIN; 633 if ("generalizes".equals(codeString)) 634 return FilterOperator.GENERALIZES; 635 if ("exists".equals(codeString)) 636 return FilterOperator.EXISTS; 637 throw new IllegalArgumentException("Unknown FilterOperator code '" + codeString + "'"); 638 } 639 640 public Enumeration<FilterOperator> fromType(PrimitiveType<?> code) throws FHIRException { 641 if (code == null) 642 return null; 643 if (code.isEmpty()) 644 return new Enumeration<FilterOperator>(this, FilterOperator.NULL, code); 645 String codeString = code.asStringValue(); 646 if (codeString == null || "".equals(codeString)) 647 return new Enumeration<FilterOperator>(this, FilterOperator.NULL, code); 648 if ("=".equals(codeString)) 649 return new Enumeration<FilterOperator>(this, FilterOperator.EQUAL, code); 650 if ("is-a".equals(codeString)) 651 return new Enumeration<FilterOperator>(this, FilterOperator.ISA, code); 652 if ("descendent-of".equals(codeString)) 653 return new Enumeration<FilterOperator>(this, FilterOperator.DESCENDENTOF, code); 654 if ("is-not-a".equals(codeString)) 655 return new Enumeration<FilterOperator>(this, FilterOperator.ISNOTA, code); 656 if ("regex".equals(codeString)) 657 return new Enumeration<FilterOperator>(this, FilterOperator.REGEX, code); 658 if ("in".equals(codeString)) 659 return new Enumeration<FilterOperator>(this, FilterOperator.IN, code); 660 if ("not-in".equals(codeString)) 661 return new Enumeration<FilterOperator>(this, FilterOperator.NOTIN, code); 662 if ("generalizes".equals(codeString)) 663 return new Enumeration<FilterOperator>(this, FilterOperator.GENERALIZES, code); 664 if ("exists".equals(codeString)) 665 return new Enumeration<FilterOperator>(this, FilterOperator.EXISTS, code); 666 throw new FHIRException("Unknown FilterOperator code '" + codeString + "'"); 667 } 668 669 public String toCode(FilterOperator code) { 670 if (code == FilterOperator.EQUAL) 671 return "="; 672 if (code == FilterOperator.ISA) 673 return "is-a"; 674 if (code == FilterOperator.DESCENDENTOF) 675 return "descendent-of"; 676 if (code == FilterOperator.ISNOTA) 677 return "is-not-a"; 678 if (code == FilterOperator.REGEX) 679 return "regex"; 680 if (code == FilterOperator.IN) 681 return "in"; 682 if (code == FilterOperator.NOTIN) 683 return "not-in"; 684 if (code == FilterOperator.GENERALIZES) 685 return "generalizes"; 686 if (code == FilterOperator.EXISTS) 687 return "exists"; 688 return "?"; 689 } 690 691 public String toSystem(FilterOperator code) { 692 return code.getSystem(); 693 } 694 } 695 696 public enum PropertyType { 697 /** 698 * The property value is a code that identifies a concept defined in the code 699 * system. 700 */ 701 CODE, 702 /** 703 * The property value is a code defined in an external code system. This may be 704 * used for translations, but is not the intent. 705 */ 706 CODING, 707 /** 708 * The property value is a string. 709 */ 710 STRING, 711 /** 712 * The property value is a string (often used to assign ranking values to 713 * concepts for supporting score assessments). 714 */ 715 INTEGER, 716 /** 717 * The property value is a boolean true | false. 718 */ 719 BOOLEAN, 720 /** 721 * The property is a date or a date + time. 722 */ 723 DATETIME, 724 /** 725 * The property value is a decimal number. 726 */ 727 DECIMAL, 728 /** 729 * added to help the parsers with the generic types 730 */ 731 NULL; 732 733 public static PropertyType fromCode(String codeString) throws FHIRException { 734 if (codeString == null || "".equals(codeString)) 735 return null; 736 if ("code".equals(codeString)) 737 return CODE; 738 if ("Coding".equals(codeString)) 739 return CODING; 740 if ("string".equals(codeString)) 741 return STRING; 742 if ("integer".equals(codeString)) 743 return INTEGER; 744 if ("boolean".equals(codeString)) 745 return BOOLEAN; 746 if ("dateTime".equals(codeString)) 747 return DATETIME; 748 if ("decimal".equals(codeString)) 749 return DECIMAL; 750 if (Configuration.isAcceptInvalidEnums()) 751 return null; 752 else 753 throw new FHIRException("Unknown PropertyType code '" + codeString + "'"); 754 } 755 756 public String toCode() { 757 switch (this) { 758 case CODE: 759 return "code"; 760 case CODING: 761 return "Coding"; 762 case STRING: 763 return "string"; 764 case INTEGER: 765 return "integer"; 766 case BOOLEAN: 767 return "boolean"; 768 case DATETIME: 769 return "dateTime"; 770 case DECIMAL: 771 return "decimal"; 772 case NULL: 773 return null; 774 default: 775 return "?"; 776 } 777 } 778 779 public String getSystem() { 780 switch (this) { 781 case CODE: 782 return "http://hl7.org/fhir/concept-property-type"; 783 case CODING: 784 return "http://hl7.org/fhir/concept-property-type"; 785 case STRING: 786 return "http://hl7.org/fhir/concept-property-type"; 787 case INTEGER: 788 return "http://hl7.org/fhir/concept-property-type"; 789 case BOOLEAN: 790 return "http://hl7.org/fhir/concept-property-type"; 791 case DATETIME: 792 return "http://hl7.org/fhir/concept-property-type"; 793 case DECIMAL: 794 return "http://hl7.org/fhir/concept-property-type"; 795 case NULL: 796 return null; 797 default: 798 return "?"; 799 } 800 } 801 802 public String getDefinition() { 803 switch (this) { 804 case CODE: 805 return "The property value is a code that identifies a concept defined in the code system."; 806 case CODING: 807 return "The property value is a code defined in an external code system. This may be used for translations, but is not the intent."; 808 case STRING: 809 return "The property value is a string."; 810 case INTEGER: 811 return "The property value is a string (often used to assign ranking values to concepts for supporting score assessments)."; 812 case BOOLEAN: 813 return "The property value is a boolean true | false."; 814 case DATETIME: 815 return "The property is a date or a date + time."; 816 case DECIMAL: 817 return "The property value is a decimal number."; 818 case NULL: 819 return null; 820 default: 821 return "?"; 822 } 823 } 824 825 public String getDisplay() { 826 switch (this) { 827 case CODE: 828 return "code (internal reference)"; 829 case CODING: 830 return "Coding (external reference)"; 831 case STRING: 832 return "string"; 833 case INTEGER: 834 return "integer"; 835 case BOOLEAN: 836 return "boolean"; 837 case DATETIME: 838 return "dateTime"; 839 case DECIMAL: 840 return "decimal"; 841 case NULL: 842 return null; 843 default: 844 return "?"; 845 } 846 } 847 } 848 849 public static class PropertyTypeEnumFactory implements EnumFactory<PropertyType> { 850 public PropertyType fromCode(String codeString) throws IllegalArgumentException { 851 if (codeString == null || "".equals(codeString)) 852 if (codeString == null || "".equals(codeString)) 853 return null; 854 if ("code".equals(codeString)) 855 return PropertyType.CODE; 856 if ("Coding".equals(codeString)) 857 return PropertyType.CODING; 858 if ("string".equals(codeString)) 859 return PropertyType.STRING; 860 if ("integer".equals(codeString)) 861 return PropertyType.INTEGER; 862 if ("boolean".equals(codeString)) 863 return PropertyType.BOOLEAN; 864 if ("dateTime".equals(codeString)) 865 return PropertyType.DATETIME; 866 if ("decimal".equals(codeString)) 867 return PropertyType.DECIMAL; 868 throw new IllegalArgumentException("Unknown PropertyType code '" + codeString + "'"); 869 } 870 871 public Enumeration<PropertyType> fromType(PrimitiveType<?> code) throws FHIRException { 872 if (code == null) 873 return null; 874 if (code.isEmpty()) 875 return new Enumeration<PropertyType>(this, PropertyType.NULL, code); 876 String codeString = code.asStringValue(); 877 if (codeString == null || "".equals(codeString)) 878 return new Enumeration<PropertyType>(this, PropertyType.NULL, code); 879 if ("code".equals(codeString)) 880 return new Enumeration<PropertyType>(this, PropertyType.CODE, code); 881 if ("Coding".equals(codeString)) 882 return new Enumeration<PropertyType>(this, PropertyType.CODING, code); 883 if ("string".equals(codeString)) 884 return new Enumeration<PropertyType>(this, PropertyType.STRING, code); 885 if ("integer".equals(codeString)) 886 return new Enumeration<PropertyType>(this, PropertyType.INTEGER, code); 887 if ("boolean".equals(codeString)) 888 return new Enumeration<PropertyType>(this, PropertyType.BOOLEAN, code); 889 if ("dateTime".equals(codeString)) 890 return new Enumeration<PropertyType>(this, PropertyType.DATETIME, code); 891 if ("decimal".equals(codeString)) 892 return new Enumeration<PropertyType>(this, PropertyType.DECIMAL, code); 893 throw new FHIRException("Unknown PropertyType code '" + codeString + "'"); 894 } 895 896 public String toCode(PropertyType code) { 897 if (code == PropertyType.CODE) 898 return "code"; 899 if (code == PropertyType.CODING) 900 return "Coding"; 901 if (code == PropertyType.STRING) 902 return "string"; 903 if (code == PropertyType.INTEGER) 904 return "integer"; 905 if (code == PropertyType.BOOLEAN) 906 return "boolean"; 907 if (code == PropertyType.DATETIME) 908 return "dateTime"; 909 if (code == PropertyType.DECIMAL) 910 return "decimal"; 911 return "?"; 912 } 913 914 public String toSystem(PropertyType code) { 915 return code.getSystem(); 916 } 917 } 918 919 @Block() 920 public static class CodeSystemFilterComponent extends BackboneElement implements IBaseBackboneElement { 921 /** 922 * The code that identifies this filter when it is used as a filter in 923 * [[[ValueSet]]].compose.include.filter. 924 */ 925 @Child(name = "code", type = { CodeType.class }, order = 1, min = 1, max = 1, modifier = false, summary = true) 926 @Description(shortDefinition = "Code that identifies the filter", formalDefinition = "The code that identifies this filter when it is used as a filter in [[[ValueSet]]].compose.include.filter.") 927 protected CodeType code; 928 929 /** 930 * A description of how or why the filter is used. 931 */ 932 @Child(name = "description", type = { 933 StringType.class }, order = 2, min = 0, max = 1, modifier = false, summary = true) 934 @Description(shortDefinition = "How or why the filter is used", formalDefinition = "A description of how or why the filter is used.") 935 protected StringType description; 936 937 /** 938 * A list of operators that can be used with the filter. 939 */ 940 @Child(name = "operator", type = { 941 CodeType.class }, order = 3, min = 1, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 942 @Description(shortDefinition = "= | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | exists", formalDefinition = "A list of operators that can be used with the filter.") 943 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/filter-operator") 944 protected List<Enumeration<FilterOperator>> operator; 945 946 /** 947 * A description of what the value for the filter should be. 948 */ 949 @Child(name = "value", type = { StringType.class }, order = 4, min = 1, max = 1, modifier = false, summary = true) 950 @Description(shortDefinition = "What to use for the value", formalDefinition = "A description of what the value for the filter should be.") 951 protected StringType value; 952 953 private static final long serialVersionUID = -1087409836L; 954 955 /** 956 * Constructor 957 */ 958 public CodeSystemFilterComponent() { 959 super(); 960 } 961 962 /** 963 * Constructor 964 */ 965 public CodeSystemFilterComponent(CodeType code, StringType value) { 966 super(); 967 this.code = code; 968 this.value = value; 969 } 970 971 /** 972 * @return {@link #code} (The code that identifies this filter when it is used 973 * as a filter in [[[ValueSet]]].compose.include.filter.). This is the 974 * underlying object with id, value and extensions. The accessor 975 * "getCode" gives direct access to the value 976 */ 977 public CodeType getCodeElement() { 978 if (this.code == null) 979 if (Configuration.errorOnAutoCreate()) 980 throw new Error("Attempt to auto-create CodeSystemFilterComponent.code"); 981 else if (Configuration.doAutoCreate()) 982 this.code = new CodeType(); // bb 983 return this.code; 984 } 985 986 public boolean hasCodeElement() { 987 return this.code != null && !this.code.isEmpty(); 988 } 989 990 public boolean hasCode() { 991 return this.code != null && !this.code.isEmpty(); 992 } 993 994 /** 995 * @param value {@link #code} (The code that identifies this filter when it is 996 * used as a filter in [[[ValueSet]]].compose.include.filter.). 997 * This is the underlying object with id, value and extensions. The 998 * accessor "getCode" gives direct access to the value 999 */ 1000 public CodeSystemFilterComponent setCodeElement(CodeType value) { 1001 this.code = value; 1002 return this; 1003 } 1004 1005 /** 1006 * @return The code that identifies this filter when it is used as a filter in 1007 * [[[ValueSet]]].compose.include.filter. 1008 */ 1009 public String getCode() { 1010 return this.code == null ? null : this.code.getValue(); 1011 } 1012 1013 /** 1014 * @param value The code that identifies this filter when it is used as a filter 1015 * in [[[ValueSet]]].compose.include.filter. 1016 */ 1017 public CodeSystemFilterComponent setCode(String value) { 1018 if (this.code == null) 1019 this.code = new CodeType(); 1020 this.code.setValue(value); 1021 return this; 1022 } 1023 1024 /** 1025 * @return {@link #description} (A description of how or why the filter is 1026 * used.). This is the underlying object with id, value and extensions. 1027 * The accessor "getDescription" gives direct access to the value 1028 */ 1029 public StringType getDescriptionElement() { 1030 if (this.description == null) 1031 if (Configuration.errorOnAutoCreate()) 1032 throw new Error("Attempt to auto-create CodeSystemFilterComponent.description"); 1033 else if (Configuration.doAutoCreate()) 1034 this.description = new StringType(); // bb 1035 return this.description; 1036 } 1037 1038 public boolean hasDescriptionElement() { 1039 return this.description != null && !this.description.isEmpty(); 1040 } 1041 1042 public boolean hasDescription() { 1043 return this.description != null && !this.description.isEmpty(); 1044 } 1045 1046 /** 1047 * @param value {@link #description} (A description of how or why the filter is 1048 * used.). This is the underlying object with id, value and 1049 * extensions. The accessor "getDescription" gives direct access to 1050 * the value 1051 */ 1052 public CodeSystemFilterComponent setDescriptionElement(StringType value) { 1053 this.description = value; 1054 return this; 1055 } 1056 1057 /** 1058 * @return A description of how or why the filter is used. 1059 */ 1060 public String getDescription() { 1061 return this.description == null ? null : this.description.getValue(); 1062 } 1063 1064 /** 1065 * @param value A description of how or why the filter is used. 1066 */ 1067 public CodeSystemFilterComponent setDescription(String value) { 1068 if (Utilities.noString(value)) 1069 this.description = null; 1070 else { 1071 if (this.description == null) 1072 this.description = new StringType(); 1073 this.description.setValue(value); 1074 } 1075 return this; 1076 } 1077 1078 /** 1079 * @return {@link #operator} (A list of operators that can be used with the 1080 * filter.) 1081 */ 1082 public List<Enumeration<FilterOperator>> getOperator() { 1083 if (this.operator == null) 1084 this.operator = new ArrayList<Enumeration<FilterOperator>>(); 1085 return this.operator; 1086 } 1087 1088 /** 1089 * @return Returns a reference to <code>this</code> for easy method chaining 1090 */ 1091 public CodeSystemFilterComponent setOperator(List<Enumeration<FilterOperator>> theOperator) { 1092 this.operator = theOperator; 1093 return this; 1094 } 1095 1096 public boolean hasOperator() { 1097 if (this.operator == null) 1098 return false; 1099 for (Enumeration<FilterOperator> item : this.operator) 1100 if (!item.isEmpty()) 1101 return true; 1102 return false; 1103 } 1104 1105 /** 1106 * @return {@link #operator} (A list of operators that can be used with the 1107 * filter.) 1108 */ 1109 public Enumeration<FilterOperator> addOperatorElement() {// 2 1110 Enumeration<FilterOperator> t = new Enumeration<FilterOperator>(new FilterOperatorEnumFactory()); 1111 if (this.operator == null) 1112 this.operator = new ArrayList<Enumeration<FilterOperator>>(); 1113 this.operator.add(t); 1114 return t; 1115 } 1116 1117 /** 1118 * @param value {@link #operator} (A list of operators that can be used with the 1119 * filter.) 1120 */ 1121 public CodeSystemFilterComponent addOperator(FilterOperator value) { // 1 1122 Enumeration<FilterOperator> t = new Enumeration<FilterOperator>(new FilterOperatorEnumFactory()); 1123 t.setValue(value); 1124 if (this.operator == null) 1125 this.operator = new ArrayList<Enumeration<FilterOperator>>(); 1126 this.operator.add(t); 1127 return this; 1128 } 1129 1130 /** 1131 * @param value {@link #operator} (A list of operators that can be used with the 1132 * filter.) 1133 */ 1134 public boolean hasOperator(FilterOperator value) { 1135 if (this.operator == null) 1136 return false; 1137 for (Enumeration<FilterOperator> v : this.operator) 1138 if (v.getValue().equals(value)) // code 1139 return true; 1140 return false; 1141 } 1142 1143 /** 1144 * @return {@link #value} (A description of what the value for the filter should 1145 * be.). This is the underlying object with id, value and extensions. 1146 * The accessor "getValue" gives direct access to the value 1147 */ 1148 public StringType getValueElement() { 1149 if (this.value == null) 1150 if (Configuration.errorOnAutoCreate()) 1151 throw new Error("Attempt to auto-create CodeSystemFilterComponent.value"); 1152 else if (Configuration.doAutoCreate()) 1153 this.value = new StringType(); // bb 1154 return this.value; 1155 } 1156 1157 public boolean hasValueElement() { 1158 return this.value != null && !this.value.isEmpty(); 1159 } 1160 1161 public boolean hasValue() { 1162 return this.value != null && !this.value.isEmpty(); 1163 } 1164 1165 /** 1166 * @param value {@link #value} (A description of what the value for the filter 1167 * should be.). This is the underlying object with id, value and 1168 * extensions. The accessor "getValue" gives direct access to the 1169 * value 1170 */ 1171 public CodeSystemFilterComponent setValueElement(StringType value) { 1172 this.value = value; 1173 return this; 1174 } 1175 1176 /** 1177 * @return A description of what the value for the filter should be. 1178 */ 1179 public String getValue() { 1180 return this.value == null ? null : this.value.getValue(); 1181 } 1182 1183 /** 1184 * @param value A description of what the value for the filter should be. 1185 */ 1186 public CodeSystemFilterComponent setValue(String value) { 1187 if (this.value == null) 1188 this.value = new StringType(); 1189 this.value.setValue(value); 1190 return this; 1191 } 1192 1193 protected void listChildren(List<Property> children) { 1194 super.listChildren(children); 1195 children.add(new Property("code", "code", 1196 "The code that identifies this filter when it is used as a filter in [[[ValueSet]]].compose.include.filter.", 1197 0, 1, code)); 1198 children.add( 1199 new Property("description", "string", "A description of how or why the filter is used.", 0, 1, description)); 1200 children.add(new Property("operator", "code", "A list of operators that can be used with the filter.", 0, 1201 java.lang.Integer.MAX_VALUE, operator)); 1202 children.add( 1203 new Property("value", "string", "A description of what the value for the filter should be.", 0, 1, value)); 1204 } 1205 1206 @Override 1207 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1208 switch (_hash) { 1209 case 3059181: 1210 /* code */ return new Property("code", "code", 1211 "The code that identifies this filter when it is used as a filter in [[[ValueSet]]].compose.include.filter.", 1212 0, 1, code); 1213 case -1724546052: 1214 /* description */ return new Property("description", "string", 1215 "A description of how or why the filter is used.", 0, 1, description); 1216 case -500553564: 1217 /* operator */ return new Property("operator", "code", "A list of operators that can be used with the filter.", 1218 0, java.lang.Integer.MAX_VALUE, operator); 1219 case 111972721: 1220 /* value */ return new Property("value", "string", "A description of what the value for the filter should be.", 1221 0, 1, value); 1222 default: 1223 return super.getNamedProperty(_hash, _name, _checkValid); 1224 } 1225 1226 } 1227 1228 @Override 1229 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1230 switch (hash) { 1231 case 3059181: 1232 /* code */ return this.code == null ? new Base[0] : new Base[] { this.code }; // CodeType 1233 case -1724546052: 1234 /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // StringType 1235 case -500553564: 1236 /* operator */ return this.operator == null ? new Base[0] 1237 : this.operator.toArray(new Base[this.operator.size()]); // Enumeration<FilterOperator> 1238 case 111972721: 1239 /* value */ return this.value == null ? new Base[0] : new Base[] { this.value }; // StringType 1240 default: 1241 return super.getProperty(hash, name, checkValid); 1242 } 1243 1244 } 1245 1246 @Override 1247 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1248 switch (hash) { 1249 case 3059181: // code 1250 this.code = castToCode(value); // CodeType 1251 return value; 1252 case -1724546052: // description 1253 this.description = castToString(value); // StringType 1254 return value; 1255 case -500553564: // operator 1256 value = new FilterOperatorEnumFactory().fromType(castToCode(value)); 1257 this.getOperator().add((Enumeration) value); // Enumeration<FilterOperator> 1258 return value; 1259 case 111972721: // value 1260 this.value = castToString(value); // StringType 1261 return value; 1262 default: 1263 return super.setProperty(hash, name, value); 1264 } 1265 1266 } 1267 1268 @Override 1269 public Base setProperty(String name, Base value) throws FHIRException { 1270 if (name.equals("code")) { 1271 this.code = castToCode(value); // CodeType 1272 } else if (name.equals("description")) { 1273 this.description = castToString(value); // StringType 1274 } else if (name.equals("operator")) { 1275 value = new FilterOperatorEnumFactory().fromType(castToCode(value)); 1276 this.getOperator().add((Enumeration) value); 1277 } else if (name.equals("value")) { 1278 this.value = castToString(value); // StringType 1279 } else 1280 return super.setProperty(name, value); 1281 return value; 1282 } 1283 1284 @Override 1285 public void removeChild(String name, Base value) throws FHIRException { 1286 if (name.equals("code")) { 1287 this.code = null; 1288 } else if (name.equals("description")) { 1289 this.description = null; 1290 } else if (name.equals("operator")) { 1291 this.getOperator().remove((Enumeration) value); 1292 } else if (name.equals("value")) { 1293 this.value = null; 1294 } else 1295 super.removeChild(name, value); 1296 1297 } 1298 1299 @Override 1300 public Base makeProperty(int hash, String name) throws FHIRException { 1301 switch (hash) { 1302 case 3059181: 1303 return getCodeElement(); 1304 case -1724546052: 1305 return getDescriptionElement(); 1306 case -500553564: 1307 return addOperatorElement(); 1308 case 111972721: 1309 return getValueElement(); 1310 default: 1311 return super.makeProperty(hash, name); 1312 } 1313 1314 } 1315 1316 @Override 1317 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1318 switch (hash) { 1319 case 3059181: 1320 /* code */ return new String[] { "code" }; 1321 case -1724546052: 1322 /* description */ return new String[] { "string" }; 1323 case -500553564: 1324 /* operator */ return new String[] { "code" }; 1325 case 111972721: 1326 /* value */ return new String[] { "string" }; 1327 default: 1328 return super.getTypesForProperty(hash, name); 1329 } 1330 1331 } 1332 1333 @Override 1334 public Base addChild(String name) throws FHIRException { 1335 if (name.equals("code")) { 1336 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.code"); 1337 } else if (name.equals("description")) { 1338 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.description"); 1339 } else if (name.equals("operator")) { 1340 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.operator"); 1341 } else if (name.equals("value")) { 1342 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.value"); 1343 } else 1344 return super.addChild(name); 1345 } 1346 1347 public CodeSystemFilterComponent copy() { 1348 CodeSystemFilterComponent dst = new CodeSystemFilterComponent(); 1349 copyValues(dst); 1350 return dst; 1351 } 1352 1353 public void copyValues(CodeSystemFilterComponent dst) { 1354 super.copyValues(dst); 1355 dst.code = code == null ? null : code.copy(); 1356 dst.description = description == null ? null : description.copy(); 1357 if (operator != null) { 1358 dst.operator = new ArrayList<Enumeration<FilterOperator>>(); 1359 for (Enumeration<FilterOperator> i : operator) 1360 dst.operator.add(i.copy()); 1361 } 1362 ; 1363 dst.value = value == null ? null : value.copy(); 1364 } 1365 1366 @Override 1367 public boolean equalsDeep(Base other_) { 1368 if (!super.equalsDeep(other_)) 1369 return false; 1370 if (!(other_ instanceof CodeSystemFilterComponent)) 1371 return false; 1372 CodeSystemFilterComponent o = (CodeSystemFilterComponent) other_; 1373 return compareDeep(code, o.code, true) && compareDeep(description, o.description, true) 1374 && compareDeep(operator, o.operator, true) && compareDeep(value, o.value, true); 1375 } 1376 1377 @Override 1378 public boolean equalsShallow(Base other_) { 1379 if (!super.equalsShallow(other_)) 1380 return false; 1381 if (!(other_ instanceof CodeSystemFilterComponent)) 1382 return false; 1383 CodeSystemFilterComponent o = (CodeSystemFilterComponent) other_; 1384 return compareValues(code, o.code, true) && compareValues(description, o.description, true) 1385 && compareValues(operator, o.operator, true) && compareValues(value, o.value, true); 1386 } 1387 1388 public boolean isEmpty() { 1389 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, description, operator, value); 1390 } 1391 1392 public String fhirType() { 1393 return "CodeSystem.filter"; 1394 1395 } 1396 1397 } 1398 1399 @Block() 1400 public static class PropertyComponent extends BackboneElement implements IBaseBackboneElement { 1401 /** 1402 * A code that is used to identify the property. The code is used internally (in 1403 * CodeSystem.concept.property.code) and also externally, such as in property 1404 * filters. 1405 */ 1406 @Child(name = "code", type = { CodeType.class }, order = 1, min = 1, max = 1, modifier = false, summary = true) 1407 @Description(shortDefinition = "Identifies the property on the concepts, and when referred to in operations", formalDefinition = "A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters.") 1408 protected CodeType code; 1409 1410 /** 1411 * Reference to the formal meaning of the property. One possible source of 1412 * meaning is the [Concept Properties](codesystem-concept-properties.html) code 1413 * system. 1414 */ 1415 @Child(name = "uri", type = { UriType.class }, order = 2, min = 0, max = 1, modifier = false, summary = true) 1416 @Description(shortDefinition = "Formal identifier for the property", formalDefinition = "Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.") 1417 protected UriType uri; 1418 1419 /** 1420 * A description of the property- why it is defined, and how its value might be 1421 * used. 1422 */ 1423 @Child(name = "description", type = { 1424 StringType.class }, order = 3, min = 0, max = 1, modifier = false, summary = true) 1425 @Description(shortDefinition = "Why the property is defined, and/or what it conveys", formalDefinition = "A description of the property- why it is defined, and how its value might be used.") 1426 protected StringType description; 1427 1428 /** 1429 * The type of the property value. Properties of type "code" contain a code 1430 * defined by the code system (e.g. a reference to another defined concept). 1431 */ 1432 @Child(name = "type", type = { CodeType.class }, order = 4, min = 1, max = 1, modifier = false, summary = true) 1433 @Description(shortDefinition = "code | Coding | string | integer | boolean | dateTime | decimal", formalDefinition = "The type of the property value. Properties of type \"code\" contain a code defined by the code system (e.g. a reference to another defined concept).") 1434 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/concept-property-type") 1435 protected Enumeration<PropertyType> type; 1436 1437 private static final long serialVersionUID = -1810713373L; 1438 1439 /** 1440 * Constructor 1441 */ 1442 public PropertyComponent() { 1443 super(); 1444 } 1445 1446 /** 1447 * Constructor 1448 */ 1449 public PropertyComponent(CodeType code, Enumeration<PropertyType> type) { 1450 super(); 1451 this.code = code; 1452 this.type = type; 1453 } 1454 1455 /** 1456 * @return {@link #code} (A code that is used to identify the property. The code 1457 * is used internally (in CodeSystem.concept.property.code) and also 1458 * externally, such as in property filters.). This is the underlying 1459 * object with id, value and extensions. The accessor "getCode" gives 1460 * direct access to the value 1461 */ 1462 public CodeType getCodeElement() { 1463 if (this.code == null) 1464 if (Configuration.errorOnAutoCreate()) 1465 throw new Error("Attempt to auto-create PropertyComponent.code"); 1466 else if (Configuration.doAutoCreate()) 1467 this.code = new CodeType(); // bb 1468 return this.code; 1469 } 1470 1471 public boolean hasCodeElement() { 1472 return this.code != null && !this.code.isEmpty(); 1473 } 1474 1475 public boolean hasCode() { 1476 return this.code != null && !this.code.isEmpty(); 1477 } 1478 1479 /** 1480 * @param value {@link #code} (A code that is used to identify the property. The 1481 * code is used internally (in CodeSystem.concept.property.code) 1482 * and also externally, such as in property filters.). This is the 1483 * underlying object with id, value and extensions. The accessor 1484 * "getCode" gives direct access to the value 1485 */ 1486 public PropertyComponent setCodeElement(CodeType value) { 1487 this.code = value; 1488 return this; 1489 } 1490 1491 /** 1492 * @return A code that is used to identify the property. The code is used 1493 * internally (in CodeSystem.concept.property.code) and also externally, 1494 * such as in property filters. 1495 */ 1496 public String getCode() { 1497 return this.code == null ? null : this.code.getValue(); 1498 } 1499 1500 /** 1501 * @param value A code that is used to identify the property. The code is used 1502 * internally (in CodeSystem.concept.property.code) and also 1503 * externally, such as in property filters. 1504 */ 1505 public PropertyComponent setCode(String value) { 1506 if (this.code == null) 1507 this.code = new CodeType(); 1508 this.code.setValue(value); 1509 return this; 1510 } 1511 1512 /** 1513 * @return {@link #uri} (Reference to the formal meaning of the property. One 1514 * possible source of meaning is the [Concept 1515 * Properties](codesystem-concept-properties.html) code system.). This 1516 * is the underlying object with id, value and extensions. The accessor 1517 * "getUri" gives direct access to the value 1518 */ 1519 public UriType getUriElement() { 1520 if (this.uri == null) 1521 if (Configuration.errorOnAutoCreate()) 1522 throw new Error("Attempt to auto-create PropertyComponent.uri"); 1523 else if (Configuration.doAutoCreate()) 1524 this.uri = new UriType(); // bb 1525 return this.uri; 1526 } 1527 1528 public boolean hasUriElement() { 1529 return this.uri != null && !this.uri.isEmpty(); 1530 } 1531 1532 public boolean hasUri() { 1533 return this.uri != null && !this.uri.isEmpty(); 1534 } 1535 1536 /** 1537 * @param value {@link #uri} (Reference to the formal meaning of the property. 1538 * One possible source of meaning is the [Concept 1539 * Properties](codesystem-concept-properties.html) code system.). 1540 * This is the underlying object with id, value and extensions. The 1541 * accessor "getUri" gives direct access to the value 1542 */ 1543 public PropertyComponent setUriElement(UriType value) { 1544 this.uri = value; 1545 return this; 1546 } 1547 1548 /** 1549 * @return Reference to the formal meaning of the property. One possible source 1550 * of meaning is the [Concept 1551 * Properties](codesystem-concept-properties.html) code system. 1552 */ 1553 public String getUri() { 1554 return this.uri == null ? null : this.uri.getValue(); 1555 } 1556 1557 /** 1558 * @param value Reference to the formal meaning of the property. One possible 1559 * source of meaning is the [Concept 1560 * Properties](codesystem-concept-properties.html) code system. 1561 */ 1562 public PropertyComponent setUri(String value) { 1563 if (Utilities.noString(value)) 1564 this.uri = null; 1565 else { 1566 if (this.uri == null) 1567 this.uri = new UriType(); 1568 this.uri.setValue(value); 1569 } 1570 return this; 1571 } 1572 1573 /** 1574 * @return {@link #description} (A description of the property- why it is 1575 * defined, and how its value might be used.). This is the underlying 1576 * object with id, value and extensions. The accessor "getDescription" 1577 * gives direct access to the value 1578 */ 1579 public StringType getDescriptionElement() { 1580 if (this.description == null) 1581 if (Configuration.errorOnAutoCreate()) 1582 throw new Error("Attempt to auto-create PropertyComponent.description"); 1583 else if (Configuration.doAutoCreate()) 1584 this.description = new StringType(); // bb 1585 return this.description; 1586 } 1587 1588 public boolean hasDescriptionElement() { 1589 return this.description != null && !this.description.isEmpty(); 1590 } 1591 1592 public boolean hasDescription() { 1593 return this.description != null && !this.description.isEmpty(); 1594 } 1595 1596 /** 1597 * @param value {@link #description} (A description of the property- why it is 1598 * defined, and how its value might be used.). This is the 1599 * underlying object with id, value and extensions. The accessor 1600 * "getDescription" gives direct access to the value 1601 */ 1602 public PropertyComponent setDescriptionElement(StringType value) { 1603 this.description = value; 1604 return this; 1605 } 1606 1607 /** 1608 * @return A description of the property- why it is defined, and how its value 1609 * might be used. 1610 */ 1611 public String getDescription() { 1612 return this.description == null ? null : this.description.getValue(); 1613 } 1614 1615 /** 1616 * @param value A description of the property- why it is defined, and how its 1617 * value might be used. 1618 */ 1619 public PropertyComponent setDescription(String value) { 1620 if (Utilities.noString(value)) 1621 this.description = null; 1622 else { 1623 if (this.description == null) 1624 this.description = new StringType(); 1625 this.description.setValue(value); 1626 } 1627 return this; 1628 } 1629 1630 /** 1631 * @return {@link #type} (The type of the property value. Properties of type 1632 * "code" contain a code defined by the code system (e.g. a reference to 1633 * another defined concept).). This is the underlying object with id, 1634 * value and extensions. The accessor "getType" gives direct access to 1635 * the value 1636 */ 1637 public Enumeration<PropertyType> getTypeElement() { 1638 if (this.type == null) 1639 if (Configuration.errorOnAutoCreate()) 1640 throw new Error("Attempt to auto-create PropertyComponent.type"); 1641 else if (Configuration.doAutoCreate()) 1642 this.type = new Enumeration<PropertyType>(new PropertyTypeEnumFactory()); // bb 1643 return this.type; 1644 } 1645 1646 public boolean hasTypeElement() { 1647 return this.type != null && !this.type.isEmpty(); 1648 } 1649 1650 public boolean hasType() { 1651 return this.type != null && !this.type.isEmpty(); 1652 } 1653 1654 /** 1655 * @param value {@link #type} (The type of the property value. Properties of 1656 * type "code" contain a code defined by the code system (e.g. a 1657 * reference to another defined concept).). This is the underlying 1658 * object with id, value and extensions. The accessor "getType" 1659 * gives direct access to the value 1660 */ 1661 public PropertyComponent setTypeElement(Enumeration<PropertyType> value) { 1662 this.type = value; 1663 return this; 1664 } 1665 1666 /** 1667 * @return The type of the property value. Properties of type "code" contain a 1668 * code defined by the code system (e.g. a reference to another defined 1669 * concept). 1670 */ 1671 public PropertyType getType() { 1672 return this.type == null ? null : this.type.getValue(); 1673 } 1674 1675 /** 1676 * @param value The type of the property value. Properties of type "code" 1677 * contain a code defined by the code system (e.g. a reference to 1678 * another defined concept). 1679 */ 1680 public PropertyComponent setType(PropertyType value) { 1681 if (this.type == null) 1682 this.type = new Enumeration<PropertyType>(new PropertyTypeEnumFactory()); 1683 this.type.setValue(value); 1684 return this; 1685 } 1686 1687 protected void listChildren(List<Property> children) { 1688 super.listChildren(children); 1689 children.add(new Property("code", "code", 1690 "A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters.", 1691 0, 1, code)); 1692 children.add(new Property("uri", "uri", 1693 "Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.", 1694 0, 1, uri)); 1695 children.add(new Property("description", "string", 1696 "A description of the property- why it is defined, and how its value might be used.", 0, 1, description)); 1697 children.add(new Property("type", "code", 1698 "The type of the property value. Properties of type \"code\" contain a code defined by the code system (e.g. a reference to another defined concept).", 1699 0, 1, type)); 1700 } 1701 1702 @Override 1703 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1704 switch (_hash) { 1705 case 3059181: 1706 /* code */ return new Property("code", "code", 1707 "A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters.", 1708 0, 1, code); 1709 case 116076: 1710 /* uri */ return new Property("uri", "uri", 1711 "Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.", 1712 0, 1, uri); 1713 case -1724546052: 1714 /* description */ return new Property("description", "string", 1715 "A description of the property- why it is defined, and how its value might be used.", 0, 1, description); 1716 case 3575610: 1717 /* type */ return new Property("type", "code", 1718 "The type of the property value. Properties of type \"code\" contain a code defined by the code system (e.g. a reference to another defined concept).", 1719 0, 1, type); 1720 default: 1721 return super.getNamedProperty(_hash, _name, _checkValid); 1722 } 1723 1724 } 1725 1726 @Override 1727 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1728 switch (hash) { 1729 case 3059181: 1730 /* code */ return this.code == null ? new Base[0] : new Base[] { this.code }; // CodeType 1731 case 116076: 1732 /* uri */ return this.uri == null ? new Base[0] : new Base[] { this.uri }; // UriType 1733 case -1724546052: 1734 /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // StringType 1735 case 3575610: 1736 /* type */ return this.type == null ? new Base[0] : new Base[] { this.type }; // Enumeration<PropertyType> 1737 default: 1738 return super.getProperty(hash, name, checkValid); 1739 } 1740 1741 } 1742 1743 @Override 1744 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1745 switch (hash) { 1746 case 3059181: // code 1747 this.code = castToCode(value); // CodeType 1748 return value; 1749 case 116076: // uri 1750 this.uri = castToUri(value); // UriType 1751 return value; 1752 case -1724546052: // description 1753 this.description = castToString(value); // StringType 1754 return value; 1755 case 3575610: // type 1756 value = new PropertyTypeEnumFactory().fromType(castToCode(value)); 1757 this.type = (Enumeration) value; // Enumeration<PropertyType> 1758 return value; 1759 default: 1760 return super.setProperty(hash, name, value); 1761 } 1762 1763 } 1764 1765 @Override 1766 public Base setProperty(String name, Base value) throws FHIRException { 1767 if (name.equals("code")) { 1768 this.code = castToCode(value); // CodeType 1769 } else if (name.equals("uri")) { 1770 this.uri = castToUri(value); // UriType 1771 } else if (name.equals("description")) { 1772 this.description = castToString(value); // StringType 1773 } else if (name.equals("type")) { 1774 value = new PropertyTypeEnumFactory().fromType(castToCode(value)); 1775 this.type = (Enumeration) value; // Enumeration<PropertyType> 1776 } else 1777 return super.setProperty(name, value); 1778 return value; 1779 } 1780 1781 @Override 1782 public void removeChild(String name, Base value) throws FHIRException { 1783 if (name.equals("code")) { 1784 this.code = null; 1785 } else if (name.equals("uri")) { 1786 this.uri = null; 1787 } else if (name.equals("description")) { 1788 this.description = null; 1789 } else if (name.equals("type")) { 1790 this.type = null; 1791 } else 1792 super.removeChild(name, value); 1793 1794 } 1795 1796 @Override 1797 public Base makeProperty(int hash, String name) throws FHIRException { 1798 switch (hash) { 1799 case 3059181: 1800 return getCodeElement(); 1801 case 116076: 1802 return getUriElement(); 1803 case -1724546052: 1804 return getDescriptionElement(); 1805 case 3575610: 1806 return getTypeElement(); 1807 default: 1808 return super.makeProperty(hash, name); 1809 } 1810 1811 } 1812 1813 @Override 1814 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1815 switch (hash) { 1816 case 3059181: 1817 /* code */ return new String[] { "code" }; 1818 case 116076: 1819 /* uri */ return new String[] { "uri" }; 1820 case -1724546052: 1821 /* description */ return new String[] { "string" }; 1822 case 3575610: 1823 /* type */ return new String[] { "code" }; 1824 default: 1825 return super.getTypesForProperty(hash, name); 1826 } 1827 1828 } 1829 1830 @Override 1831 public Base addChild(String name) throws FHIRException { 1832 if (name.equals("code")) { 1833 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.code"); 1834 } else if (name.equals("uri")) { 1835 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.uri"); 1836 } else if (name.equals("description")) { 1837 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.description"); 1838 } else if (name.equals("type")) { 1839 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.type"); 1840 } else 1841 return super.addChild(name); 1842 } 1843 1844 public PropertyComponent copy() { 1845 PropertyComponent dst = new PropertyComponent(); 1846 copyValues(dst); 1847 return dst; 1848 } 1849 1850 public void copyValues(PropertyComponent dst) { 1851 super.copyValues(dst); 1852 dst.code = code == null ? null : code.copy(); 1853 dst.uri = uri == null ? null : uri.copy(); 1854 dst.description = description == null ? null : description.copy(); 1855 dst.type = type == null ? null : type.copy(); 1856 } 1857 1858 @Override 1859 public boolean equalsDeep(Base other_) { 1860 if (!super.equalsDeep(other_)) 1861 return false; 1862 if (!(other_ instanceof PropertyComponent)) 1863 return false; 1864 PropertyComponent o = (PropertyComponent) other_; 1865 return compareDeep(code, o.code, true) && compareDeep(uri, o.uri, true) 1866 && compareDeep(description, o.description, true) && compareDeep(type, o.type, true); 1867 } 1868 1869 @Override 1870 public boolean equalsShallow(Base other_) { 1871 if (!super.equalsShallow(other_)) 1872 return false; 1873 if (!(other_ instanceof PropertyComponent)) 1874 return false; 1875 PropertyComponent o = (PropertyComponent) other_; 1876 return compareValues(code, o.code, true) && compareValues(uri, o.uri, true) 1877 && compareValues(description, o.description, true) && compareValues(type, o.type, true); 1878 } 1879 1880 public boolean isEmpty() { 1881 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, uri, description, type); 1882 } 1883 1884 public String fhirType() { 1885 return "CodeSystem.property"; 1886 1887 } 1888 1889 } 1890 1891 @Block() 1892 public static class ConceptDefinitionComponent extends BackboneElement implements IBaseBackboneElement { 1893 /** 1894 * A code - a text symbol - that uniquely identifies the concept within the code 1895 * system. 1896 */ 1897 @Child(name = "code", type = { CodeType.class }, order = 1, min = 1, max = 1, modifier = false, summary = false) 1898 @Description(shortDefinition = "Code that identifies concept", formalDefinition = "A code - a text symbol - that uniquely identifies the concept within the code system.") 1899 protected CodeType code; 1900 1901 /** 1902 * A human readable string that is the recommended default way to present this 1903 * concept to a user. 1904 */ 1905 @Child(name = "display", type = { 1906 StringType.class }, order = 2, min = 0, max = 1, modifier = false, summary = false) 1907 @Description(shortDefinition = "Text to display to the user", formalDefinition = "A human readable string that is the recommended default way to present this concept to a user.") 1908 protected StringType display; 1909 1910 /** 1911 * The formal definition of the concept. The code system resource does not make 1912 * formal definitions required, because of the prevalence of legacy systems. 1913 * However, they are highly recommended, as without them there is no formal 1914 * meaning associated with the concept. 1915 */ 1916 @Child(name = "definition", type = { 1917 StringType.class }, order = 3, min = 0, max = 1, modifier = false, summary = false) 1918 @Description(shortDefinition = "Formal definition", formalDefinition = "The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.") 1919 protected StringType definition; 1920 1921 /** 1922 * Additional representations for the concept - other languages, aliases, 1923 * specialized purposes, used for particular purposes, etc. 1924 */ 1925 @Child(name = "designation", type = {}, order = 4, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 1926 @Description(shortDefinition = "Additional representations for the concept", formalDefinition = "Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.") 1927 protected List<ConceptDefinitionDesignationComponent> designation; 1928 1929 /** 1930 * A property value for this concept. 1931 */ 1932 @Child(name = "property", type = {}, order = 5, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 1933 @Description(shortDefinition = "Property value for the concept", formalDefinition = "A property value for this concept.") 1934 protected List<ConceptPropertyComponent> property; 1935 1936 /** 1937 * Defines children of a concept to produce a hierarchy of concepts. The nature 1938 * of the relationships is variable (is-a/contains/categorizes) - see 1939 * hierarchyMeaning. 1940 */ 1941 @Child(name = "concept", type = { 1942 ConceptDefinitionComponent.class }, order = 6, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 1943 @Description(shortDefinition = "Child Concepts (is-a/contains/categorizes)", formalDefinition = "Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) - see hierarchyMeaning.") 1944 protected List<ConceptDefinitionComponent> concept; 1945 1946 private static final long serialVersionUID = 878320988L; 1947 1948 /** 1949 * Constructor 1950 */ 1951 public ConceptDefinitionComponent() { 1952 super(); 1953 } 1954 1955 /** 1956 * Constructor 1957 */ 1958 public ConceptDefinitionComponent(CodeType code) { 1959 super(); 1960 this.code = code; 1961 } 1962 1963 /** 1964 * @return {@link #code} (A code - a text symbol - that uniquely identifies the 1965 * concept within the code system.). This is the underlying object with 1966 * id, value and extensions. The accessor "getCode" gives direct access 1967 * to the value 1968 */ 1969 public CodeType getCodeElement() { 1970 if (this.code == null) 1971 if (Configuration.errorOnAutoCreate()) 1972 throw new Error("Attempt to auto-create ConceptDefinitionComponent.code"); 1973 else if (Configuration.doAutoCreate()) 1974 this.code = new CodeType(); // bb 1975 return this.code; 1976 } 1977 1978 public boolean hasCodeElement() { 1979 return this.code != null && !this.code.isEmpty(); 1980 } 1981 1982 public boolean hasCode() { 1983 return this.code != null && !this.code.isEmpty(); 1984 } 1985 1986 /** 1987 * @param value {@link #code} (A code - a text symbol - that uniquely identifies 1988 * the concept within the code system.). This is the underlying 1989 * object with id, value and extensions. The accessor "getCode" 1990 * gives direct access to the value 1991 */ 1992 public ConceptDefinitionComponent setCodeElement(CodeType value) { 1993 this.code = value; 1994 return this; 1995 } 1996 1997 /** 1998 * @return A code - a text symbol - that uniquely identifies the concept within 1999 * the code system. 2000 */ 2001 public String getCode() { 2002 return this.code == null ? null : this.code.getValue(); 2003 } 2004 2005 /** 2006 * @param value A code - a text symbol - that uniquely identifies the concept 2007 * within the code system. 2008 */ 2009 public ConceptDefinitionComponent setCode(String value) { 2010 if (this.code == null) 2011 this.code = new CodeType(); 2012 this.code.setValue(value); 2013 return this; 2014 } 2015 2016 /** 2017 * @return {@link #display} (A human readable string that is the recommended 2018 * default way to present this concept to a user.). This is the 2019 * underlying object with id, value and extensions. The accessor 2020 * "getDisplay" gives direct access to the value 2021 */ 2022 public StringType getDisplayElement() { 2023 if (this.display == null) 2024 if (Configuration.errorOnAutoCreate()) 2025 throw new Error("Attempt to auto-create ConceptDefinitionComponent.display"); 2026 else if (Configuration.doAutoCreate()) 2027 this.display = new StringType(); // bb 2028 return this.display; 2029 } 2030 2031 public boolean hasDisplayElement() { 2032 return this.display != null && !this.display.isEmpty(); 2033 } 2034 2035 public boolean hasDisplay() { 2036 return this.display != null && !this.display.isEmpty(); 2037 } 2038 2039 /** 2040 * @param value {@link #display} (A human readable string that is the 2041 * recommended default way to present this concept to a user.). 2042 * This is the underlying object with id, value and extensions. The 2043 * accessor "getDisplay" gives direct access to the value 2044 */ 2045 public ConceptDefinitionComponent setDisplayElement(StringType value) { 2046 this.display = value; 2047 return this; 2048 } 2049 2050 /** 2051 * @return A human readable string that is the recommended default way to 2052 * present this concept to a user. 2053 */ 2054 public String getDisplay() { 2055 return this.display == null ? null : this.display.getValue(); 2056 } 2057 2058 /** 2059 * @param value A human readable string that is the recommended default way to 2060 * present this concept to a user. 2061 */ 2062 public ConceptDefinitionComponent setDisplay(String value) { 2063 if (Utilities.noString(value)) 2064 this.display = null; 2065 else { 2066 if (this.display == null) 2067 this.display = new StringType(); 2068 this.display.setValue(value); 2069 } 2070 return this; 2071 } 2072 2073 /** 2074 * @return {@link #definition} (The formal definition of the concept. The code 2075 * system resource does not make formal definitions required, because of 2076 * the prevalence of legacy systems. However, they are highly 2077 * recommended, as without them there is no formal meaning associated 2078 * with the concept.). This is the underlying object with id, value and 2079 * extensions. The accessor "getDefinition" gives direct access to the 2080 * value 2081 */ 2082 public StringType getDefinitionElement() { 2083 if (this.definition == null) 2084 if (Configuration.errorOnAutoCreate()) 2085 throw new Error("Attempt to auto-create ConceptDefinitionComponent.definition"); 2086 else if (Configuration.doAutoCreate()) 2087 this.definition = new StringType(); // bb 2088 return this.definition; 2089 } 2090 2091 public boolean hasDefinitionElement() { 2092 return this.definition != null && !this.definition.isEmpty(); 2093 } 2094 2095 public boolean hasDefinition() { 2096 return this.definition != null && !this.definition.isEmpty(); 2097 } 2098 2099 /** 2100 * @param value {@link #definition} (The formal definition of the concept. The 2101 * code system resource does not make formal definitions required, 2102 * because of the prevalence of legacy systems. However, they are 2103 * highly recommended, as without them there is no formal meaning 2104 * associated with the concept.). This is the underlying object 2105 * with id, value and extensions. The accessor "getDefinition" 2106 * gives direct access to the value 2107 */ 2108 public ConceptDefinitionComponent setDefinitionElement(StringType value) { 2109 this.definition = value; 2110 return this; 2111 } 2112 2113 /** 2114 * @return The formal definition of the concept. The code system resource does 2115 * not make formal definitions required, because of the prevalence of 2116 * legacy systems. However, they are highly recommended, as without them 2117 * there is no formal meaning associated with the concept. 2118 */ 2119 public String getDefinition() { 2120 return this.definition == null ? null : this.definition.getValue(); 2121 } 2122 2123 /** 2124 * @param value The formal definition of the concept. The code system resource 2125 * does not make formal definitions required, because of the 2126 * prevalence of legacy systems. However, they are highly 2127 * recommended, as without them there is no formal meaning 2128 * associated with the concept. 2129 */ 2130 public ConceptDefinitionComponent setDefinition(String value) { 2131 if (Utilities.noString(value)) 2132 this.definition = null; 2133 else { 2134 if (this.definition == null) 2135 this.definition = new StringType(); 2136 this.definition.setValue(value); 2137 } 2138 return this; 2139 } 2140 2141 /** 2142 * @return {@link #designation} (Additional representations for the concept - 2143 * other languages, aliases, specialized purposes, used for particular 2144 * purposes, etc.) 2145 */ 2146 public List<ConceptDefinitionDesignationComponent> getDesignation() { 2147 if (this.designation == null) 2148 this.designation = new ArrayList<ConceptDefinitionDesignationComponent>(); 2149 return this.designation; 2150 } 2151 2152 /** 2153 * @return Returns a reference to <code>this</code> for easy method chaining 2154 */ 2155 public ConceptDefinitionComponent setDesignation(List<ConceptDefinitionDesignationComponent> theDesignation) { 2156 this.designation = theDesignation; 2157 return this; 2158 } 2159 2160 public boolean hasDesignation() { 2161 if (this.designation == null) 2162 return false; 2163 for (ConceptDefinitionDesignationComponent item : this.designation) 2164 if (!item.isEmpty()) 2165 return true; 2166 return false; 2167 } 2168 2169 public ConceptDefinitionDesignationComponent addDesignation() { // 3 2170 ConceptDefinitionDesignationComponent t = new ConceptDefinitionDesignationComponent(); 2171 if (this.designation == null) 2172 this.designation = new ArrayList<ConceptDefinitionDesignationComponent>(); 2173 this.designation.add(t); 2174 return t; 2175 } 2176 2177 public ConceptDefinitionComponent addDesignation(ConceptDefinitionDesignationComponent t) { // 3 2178 if (t == null) 2179 return this; 2180 if (this.designation == null) 2181 this.designation = new ArrayList<ConceptDefinitionDesignationComponent>(); 2182 this.designation.add(t); 2183 return this; 2184 } 2185 2186 /** 2187 * @return The first repetition of repeating field {@link #designation}, 2188 * creating it if it does not already exist 2189 */ 2190 public ConceptDefinitionDesignationComponent getDesignationFirstRep() { 2191 if (getDesignation().isEmpty()) { 2192 addDesignation(); 2193 } 2194 return getDesignation().get(0); 2195 } 2196 2197 /** 2198 * @return {@link #property} (A property value for this concept.) 2199 */ 2200 public List<ConceptPropertyComponent> getProperty() { 2201 if (this.property == null) 2202 this.property = new ArrayList<ConceptPropertyComponent>(); 2203 return this.property; 2204 } 2205 2206 /** 2207 * @return Returns a reference to <code>this</code> for easy method chaining 2208 */ 2209 public ConceptDefinitionComponent setProperty(List<ConceptPropertyComponent> theProperty) { 2210 this.property = theProperty; 2211 return this; 2212 } 2213 2214 public boolean hasProperty() { 2215 if (this.property == null) 2216 return false; 2217 for (ConceptPropertyComponent item : this.property) 2218 if (!item.isEmpty()) 2219 return true; 2220 return false; 2221 } 2222 2223 public ConceptPropertyComponent addProperty() { // 3 2224 ConceptPropertyComponent t = new ConceptPropertyComponent(); 2225 if (this.property == null) 2226 this.property = new ArrayList<ConceptPropertyComponent>(); 2227 this.property.add(t); 2228 return t; 2229 } 2230 2231 public ConceptDefinitionComponent addProperty(ConceptPropertyComponent t) { // 3 2232 if (t == null) 2233 return this; 2234 if (this.property == null) 2235 this.property = new ArrayList<ConceptPropertyComponent>(); 2236 this.property.add(t); 2237 return this; 2238 } 2239 2240 /** 2241 * @return The first repetition of repeating field {@link #property}, creating 2242 * it if it does not already exist 2243 */ 2244 public ConceptPropertyComponent getPropertyFirstRep() { 2245 if (getProperty().isEmpty()) { 2246 addProperty(); 2247 } 2248 return getProperty().get(0); 2249 } 2250 2251 /** 2252 * @return {@link #concept} (Defines children of a concept to produce a 2253 * hierarchy of concepts. The nature of the relationships is variable 2254 * (is-a/contains/categorizes) - see hierarchyMeaning.) 2255 */ 2256 public List<ConceptDefinitionComponent> getConcept() { 2257 if (this.concept == null) 2258 this.concept = new ArrayList<ConceptDefinitionComponent>(); 2259 return this.concept; 2260 } 2261 2262 /** 2263 * @return Returns a reference to <code>this</code> for easy method chaining 2264 */ 2265 public ConceptDefinitionComponent setConcept(List<ConceptDefinitionComponent> theConcept) { 2266 this.concept = theConcept; 2267 return this; 2268 } 2269 2270 public boolean hasConcept() { 2271 if (this.concept == null) 2272 return false; 2273 for (ConceptDefinitionComponent item : this.concept) 2274 if (!item.isEmpty()) 2275 return true; 2276 return false; 2277 } 2278 2279 public ConceptDefinitionComponent addConcept() { // 3 2280 ConceptDefinitionComponent t = new ConceptDefinitionComponent(); 2281 if (this.concept == null) 2282 this.concept = new ArrayList<ConceptDefinitionComponent>(); 2283 this.concept.add(t); 2284 return t; 2285 } 2286 2287 public ConceptDefinitionComponent addConcept(ConceptDefinitionComponent t) { // 3 2288 if (t == null) 2289 return this; 2290 if (this.concept == null) 2291 this.concept = new ArrayList<ConceptDefinitionComponent>(); 2292 this.concept.add(t); 2293 return this; 2294 } 2295 2296 /** 2297 * @return The first repetition of repeating field {@link #concept}, creating it 2298 * if it does not already exist 2299 */ 2300 public ConceptDefinitionComponent getConceptFirstRep() { 2301 if (getConcept().isEmpty()) { 2302 addConcept(); 2303 } 2304 return getConcept().get(0); 2305 } 2306 2307 protected void listChildren(List<Property> children) { 2308 super.listChildren(children); 2309 children.add(new Property("code", "code", 2310 "A code - a text symbol - that uniquely identifies the concept within the code system.", 0, 1, code)); 2311 children.add(new Property("display", "string", 2312 "A human readable string that is the recommended default way to present this concept to a user.", 0, 1, 2313 display)); 2314 children.add(new Property("definition", "string", 2315 "The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.", 2316 0, 1, definition)); 2317 children.add(new Property("designation", "", 2318 "Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.", 2319 0, java.lang.Integer.MAX_VALUE, designation)); 2320 children.add( 2321 new Property("property", "", "A property value for this concept.", 0, java.lang.Integer.MAX_VALUE, property)); 2322 children.add(new Property("concept", "@CodeSystem.concept", 2323 "Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) - see hierarchyMeaning.", 2324 0, java.lang.Integer.MAX_VALUE, concept)); 2325 } 2326 2327 @Override 2328 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2329 switch (_hash) { 2330 case 3059181: 2331 /* code */ return new Property("code", "code", 2332 "A code - a text symbol - that uniquely identifies the concept within the code system.", 0, 1, code); 2333 case 1671764162: 2334 /* display */ return new Property("display", "string", 2335 "A human readable string that is the recommended default way to present this concept to a user.", 0, 1, 2336 display); 2337 case -1014418093: 2338 /* definition */ return new Property("definition", "string", 2339 "The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.", 2340 0, 1, definition); 2341 case -900931593: 2342 /* designation */ return new Property("designation", "", 2343 "Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.", 2344 0, java.lang.Integer.MAX_VALUE, designation); 2345 case -993141291: 2346 /* property */ return new Property("property", "", "A property value for this concept.", 0, 2347 java.lang.Integer.MAX_VALUE, property); 2348 case 951024232: 2349 /* concept */ return new Property("concept", "@CodeSystem.concept", 2350 "Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) - see hierarchyMeaning.", 2351 0, java.lang.Integer.MAX_VALUE, concept); 2352 default: 2353 return super.getNamedProperty(_hash, _name, _checkValid); 2354 } 2355 2356 } 2357 2358 @Override 2359 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2360 switch (hash) { 2361 case 3059181: 2362 /* code */ return this.code == null ? new Base[0] : new Base[] { this.code }; // CodeType 2363 case 1671764162: 2364 /* display */ return this.display == null ? new Base[0] : new Base[] { this.display }; // StringType 2365 case -1014418093: 2366 /* definition */ return this.definition == null ? new Base[0] : new Base[] { this.definition }; // StringType 2367 case -900931593: 2368 /* designation */ return this.designation == null ? new Base[0] 2369 : this.designation.toArray(new Base[this.designation.size()]); // ConceptDefinitionDesignationComponent 2370 case -993141291: 2371 /* property */ return this.property == null ? new Base[0] 2372 : this.property.toArray(new Base[this.property.size()]); // ConceptPropertyComponent 2373 case 951024232: 2374 /* concept */ return this.concept == null ? new Base[0] : this.concept.toArray(new Base[this.concept.size()]); // ConceptDefinitionComponent 2375 default: 2376 return super.getProperty(hash, name, checkValid); 2377 } 2378 2379 } 2380 2381 @Override 2382 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2383 switch (hash) { 2384 case 3059181: // code 2385 this.code = castToCode(value); // CodeType 2386 return value; 2387 case 1671764162: // display 2388 this.display = castToString(value); // StringType 2389 return value; 2390 case -1014418093: // definition 2391 this.definition = castToString(value); // StringType 2392 return value; 2393 case -900931593: // designation 2394 this.getDesignation().add((ConceptDefinitionDesignationComponent) value); // ConceptDefinitionDesignationComponent 2395 return value; 2396 case -993141291: // property 2397 this.getProperty().add((ConceptPropertyComponent) value); // ConceptPropertyComponent 2398 return value; 2399 case 951024232: // concept 2400 this.getConcept().add((ConceptDefinitionComponent) value); // ConceptDefinitionComponent 2401 return value; 2402 default: 2403 return super.setProperty(hash, name, value); 2404 } 2405 2406 } 2407 2408 @Override 2409 public Base setProperty(String name, Base value) throws FHIRException { 2410 if (name.equals("code")) { 2411 this.code = castToCode(value); // CodeType 2412 } else if (name.equals("display")) { 2413 this.display = castToString(value); // StringType 2414 } else if (name.equals("definition")) { 2415 this.definition = castToString(value); // StringType 2416 } else if (name.equals("designation")) { 2417 this.getDesignation().add((ConceptDefinitionDesignationComponent) value); 2418 } else if (name.equals("property")) { 2419 this.getProperty().add((ConceptPropertyComponent) value); 2420 } else if (name.equals("concept")) { 2421 this.getConcept().add((ConceptDefinitionComponent) value); 2422 } else 2423 return super.setProperty(name, value); 2424 return value; 2425 } 2426 2427 @Override 2428 public void removeChild(String name, Base value) throws FHIRException { 2429 if (name.equals("code")) { 2430 this.code = null; 2431 } else if (name.equals("display")) { 2432 this.display = null; 2433 } else if (name.equals("definition")) { 2434 this.definition = null; 2435 } else if (name.equals("designation")) { 2436 this.getDesignation().remove((ConceptDefinitionDesignationComponent) value); 2437 } else if (name.equals("property")) { 2438 this.getProperty().remove((ConceptPropertyComponent) value); 2439 } else if (name.equals("concept")) { 2440 this.getConcept().remove((ConceptDefinitionComponent) value); 2441 } else 2442 super.removeChild(name, value); 2443 2444 } 2445 2446 @Override 2447 public Base makeProperty(int hash, String name) throws FHIRException { 2448 switch (hash) { 2449 case 3059181: 2450 return getCodeElement(); 2451 case 1671764162: 2452 return getDisplayElement(); 2453 case -1014418093: 2454 return getDefinitionElement(); 2455 case -900931593: 2456 return addDesignation(); 2457 case -993141291: 2458 return addProperty(); 2459 case 951024232: 2460 return addConcept(); 2461 default: 2462 return super.makeProperty(hash, name); 2463 } 2464 2465 } 2466 2467 @Override 2468 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2469 switch (hash) { 2470 case 3059181: 2471 /* code */ return new String[] { "code" }; 2472 case 1671764162: 2473 /* display */ return new String[] { "string" }; 2474 case -1014418093: 2475 /* definition */ return new String[] { "string" }; 2476 case -900931593: 2477 /* designation */ return new String[] {}; 2478 case -993141291: 2479 /* property */ return new String[] {}; 2480 case 951024232: 2481 /* concept */ return new String[] { "@CodeSystem.concept" }; 2482 default: 2483 return super.getTypesForProperty(hash, name); 2484 } 2485 2486 } 2487 2488 @Override 2489 public Base addChild(String name) throws FHIRException { 2490 if (name.equals("code")) { 2491 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.code"); 2492 } else if (name.equals("display")) { 2493 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.display"); 2494 } else if (name.equals("definition")) { 2495 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.definition"); 2496 } else if (name.equals("designation")) { 2497 return addDesignation(); 2498 } else if (name.equals("property")) { 2499 return addProperty(); 2500 } else if (name.equals("concept")) { 2501 return addConcept(); 2502 } else 2503 return super.addChild(name); 2504 } 2505 2506 public ConceptDefinitionComponent copy() { 2507 ConceptDefinitionComponent dst = new ConceptDefinitionComponent(); 2508 copyValues(dst); 2509 return dst; 2510 } 2511 2512 public void copyValues(ConceptDefinitionComponent dst) { 2513 super.copyValues(dst); 2514 dst.code = code == null ? null : code.copy(); 2515 dst.display = display == null ? null : display.copy(); 2516 dst.definition = definition == null ? null : definition.copy(); 2517 if (designation != null) { 2518 dst.designation = new ArrayList<ConceptDefinitionDesignationComponent>(); 2519 for (ConceptDefinitionDesignationComponent i : designation) 2520 dst.designation.add(i.copy()); 2521 } 2522 ; 2523 if (property != null) { 2524 dst.property = new ArrayList<ConceptPropertyComponent>(); 2525 for (ConceptPropertyComponent i : property) 2526 dst.property.add(i.copy()); 2527 } 2528 ; 2529 if (concept != null) { 2530 dst.concept = new ArrayList<ConceptDefinitionComponent>(); 2531 for (ConceptDefinitionComponent i : concept) 2532 dst.concept.add(i.copy()); 2533 } 2534 ; 2535 } 2536 2537 @Override 2538 public boolean equalsDeep(Base other_) { 2539 if (!super.equalsDeep(other_)) 2540 return false; 2541 if (!(other_ instanceof ConceptDefinitionComponent)) 2542 return false; 2543 ConceptDefinitionComponent o = (ConceptDefinitionComponent) other_; 2544 return compareDeep(code, o.code, true) && compareDeep(display, o.display, true) 2545 && compareDeep(definition, o.definition, true) && compareDeep(designation, o.designation, true) 2546 && compareDeep(property, o.property, true) && compareDeep(concept, o.concept, true); 2547 } 2548 2549 @Override 2550 public boolean equalsShallow(Base other_) { 2551 if (!super.equalsShallow(other_)) 2552 return false; 2553 if (!(other_ instanceof ConceptDefinitionComponent)) 2554 return false; 2555 ConceptDefinitionComponent o = (ConceptDefinitionComponent) other_; 2556 return compareValues(code, o.code, true) && compareValues(display, o.display, true) 2557 && compareValues(definition, o.definition, true); 2558 } 2559 2560 public boolean isEmpty() { 2561 return super.isEmpty() 2562 && ca.uhn.fhir.util.ElementUtil.isEmpty(code, display, definition, designation, property, concept); 2563 } 2564 2565 public String fhirType() { 2566 return "CodeSystem.concept"; 2567 2568 } 2569 2570 public ConceptPropertyComponent forceProperty(String code) { 2571 for (ConceptPropertyComponent prop : getProperty()) { 2572 if (code.equals(prop.getCode())) { 2573 return prop; 2574 } 2575 } 2576 return addProperty().setCode(code); 2577 } 2578 2579 } 2580 2581 @Block() 2582 public static class ConceptDefinitionDesignationComponent extends BackboneElement implements IBaseBackboneElement { 2583 /** 2584 * The language this designation is defined for. 2585 */ 2586 @Child(name = "language", type = { CodeType.class }, order = 1, min = 0, max = 1, modifier = false, summary = false) 2587 @Description(shortDefinition = "Human language of the designation", formalDefinition = "The language this designation is defined for.") 2588 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/languages") 2589 protected CodeType language; 2590 2591 /** 2592 * A code that details how this designation would be used. 2593 */ 2594 @Child(name = "use", type = { Coding.class }, order = 2, min = 0, max = 1, modifier = false, summary = false) 2595 @Description(shortDefinition = "Details how this designation would be used", formalDefinition = "A code that details how this designation would be used.") 2596 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/designation-use") 2597 protected Coding use; 2598 2599 /** 2600 * The text value for this designation. 2601 */ 2602 @Child(name = "value", type = { StringType.class }, order = 3, min = 1, max = 1, modifier = false, summary = false) 2603 @Description(shortDefinition = "The text value for this designation", formalDefinition = "The text value for this designation.") 2604 protected StringType value; 2605 2606 private static final long serialVersionUID = 1515662414L; 2607 2608 /** 2609 * Constructor 2610 */ 2611 public ConceptDefinitionDesignationComponent() { 2612 super(); 2613 } 2614 2615 /** 2616 * Constructor 2617 */ 2618 public ConceptDefinitionDesignationComponent(StringType value) { 2619 super(); 2620 this.value = value; 2621 } 2622 2623 /** 2624 * @return {@link #language} (The language this designation is defined for.). 2625 * This is the underlying object with id, value and extensions. The 2626 * accessor "getLanguage" gives direct access to the value 2627 */ 2628 public CodeType getLanguageElement() { 2629 if (this.language == null) 2630 if (Configuration.errorOnAutoCreate()) 2631 throw new Error("Attempt to auto-create ConceptDefinitionDesignationComponent.language"); 2632 else if (Configuration.doAutoCreate()) 2633 this.language = new CodeType(); // bb 2634 return this.language; 2635 } 2636 2637 public boolean hasLanguageElement() { 2638 return this.language != null && !this.language.isEmpty(); 2639 } 2640 2641 public boolean hasLanguage() { 2642 return this.language != null && !this.language.isEmpty(); 2643 } 2644 2645 /** 2646 * @param value {@link #language} (The language this designation is defined 2647 * for.). This is the underlying object with id, value and 2648 * extensions. The accessor "getLanguage" gives direct access to 2649 * the value 2650 */ 2651 public ConceptDefinitionDesignationComponent setLanguageElement(CodeType value) { 2652 this.language = value; 2653 return this; 2654 } 2655 2656 /** 2657 * @return The language this designation is defined for. 2658 */ 2659 public String getLanguage() { 2660 return this.language == null ? null : this.language.getValue(); 2661 } 2662 2663 /** 2664 * @param value The language this designation is defined for. 2665 */ 2666 public ConceptDefinitionDesignationComponent setLanguage(String value) { 2667 if (Utilities.noString(value)) 2668 this.language = null; 2669 else { 2670 if (this.language == null) 2671 this.language = new CodeType(); 2672 this.language.setValue(value); 2673 } 2674 return this; 2675 } 2676 2677 /** 2678 * @return {@link #use} (A code that details how this designation would be 2679 * used.) 2680 */ 2681 public Coding getUse() { 2682 if (this.use == null) 2683 if (Configuration.errorOnAutoCreate()) 2684 throw new Error("Attempt to auto-create ConceptDefinitionDesignationComponent.use"); 2685 else if (Configuration.doAutoCreate()) 2686 this.use = new Coding(); // cc 2687 return this.use; 2688 } 2689 2690 public boolean hasUse() { 2691 return this.use != null && !this.use.isEmpty(); 2692 } 2693 2694 /** 2695 * @param value {@link #use} (A code that details how this designation would be 2696 * used.) 2697 */ 2698 public ConceptDefinitionDesignationComponent setUse(Coding value) { 2699 this.use = value; 2700 return this; 2701 } 2702 2703 /** 2704 * @return {@link #value} (The text value for this designation.). This is the 2705 * underlying object with id, value and extensions. The accessor 2706 * "getValue" gives direct access to the value 2707 */ 2708 public StringType getValueElement() { 2709 if (this.value == null) 2710 if (Configuration.errorOnAutoCreate()) 2711 throw new Error("Attempt to auto-create ConceptDefinitionDesignationComponent.value"); 2712 else if (Configuration.doAutoCreate()) 2713 this.value = new StringType(); // bb 2714 return this.value; 2715 } 2716 2717 public boolean hasValueElement() { 2718 return this.value != null && !this.value.isEmpty(); 2719 } 2720 2721 public boolean hasValue() { 2722 return this.value != null && !this.value.isEmpty(); 2723 } 2724 2725 /** 2726 * @param value {@link #value} (The text value for this designation.). This is 2727 * the underlying object with id, value and extensions. The 2728 * accessor "getValue" gives direct access to the value 2729 */ 2730 public ConceptDefinitionDesignationComponent setValueElement(StringType value) { 2731 this.value = value; 2732 return this; 2733 } 2734 2735 /** 2736 * @return The text value for this designation. 2737 */ 2738 public String getValue() { 2739 return this.value == null ? null : this.value.getValue(); 2740 } 2741 2742 /** 2743 * @param value The text value for this designation. 2744 */ 2745 public ConceptDefinitionDesignationComponent setValue(String value) { 2746 if (this.value == null) 2747 this.value = new StringType(); 2748 this.value.setValue(value); 2749 return this; 2750 } 2751 2752 protected void listChildren(List<Property> children) { 2753 super.listChildren(children); 2754 children.add(new Property("language", "code", "The language this designation is defined for.", 0, 1, language)); 2755 children.add(new Property("use", "Coding", "A code that details how this designation would be used.", 0, 1, use)); 2756 children.add(new Property("value", "string", "The text value for this designation.", 0, 1, value)); 2757 } 2758 2759 @Override 2760 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2761 switch (_hash) { 2762 case -1613589672: 2763 /* language */ return new Property("language", "code", "The language this designation is defined for.", 0, 1, 2764 language); 2765 case 116103: 2766 /* use */ return new Property("use", "Coding", "A code that details how this designation would be used.", 0, 1, 2767 use); 2768 case 111972721: 2769 /* value */ return new Property("value", "string", "The text value for this designation.", 0, 1, value); 2770 default: 2771 return super.getNamedProperty(_hash, _name, _checkValid); 2772 } 2773 2774 } 2775 2776 @Override 2777 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2778 switch (hash) { 2779 case -1613589672: 2780 /* language */ return this.language == null ? new Base[0] : new Base[] { this.language }; // CodeType 2781 case 116103: 2782 /* use */ return this.use == null ? new Base[0] : new Base[] { this.use }; // Coding 2783 case 111972721: 2784 /* value */ return this.value == null ? new Base[0] : new Base[] { this.value }; // StringType 2785 default: 2786 return super.getProperty(hash, name, checkValid); 2787 } 2788 2789 } 2790 2791 @Override 2792 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2793 switch (hash) { 2794 case -1613589672: // language 2795 this.language = castToCode(value); // CodeType 2796 return value; 2797 case 116103: // use 2798 this.use = castToCoding(value); // Coding 2799 return value; 2800 case 111972721: // value 2801 this.value = castToString(value); // StringType 2802 return value; 2803 default: 2804 return super.setProperty(hash, name, value); 2805 } 2806 2807 } 2808 2809 @Override 2810 public Base setProperty(String name, Base value) throws FHIRException { 2811 if (name.equals("language")) { 2812 this.language = castToCode(value); // CodeType 2813 } else if (name.equals("use")) { 2814 this.use = castToCoding(value); // Coding 2815 } else if (name.equals("value")) { 2816 this.value = castToString(value); // StringType 2817 } else 2818 return super.setProperty(name, value); 2819 return value; 2820 } 2821 2822 @Override 2823 public void removeChild(String name, Base value) throws FHIRException { 2824 if (name.equals("language")) { 2825 this.language = null; 2826 } else if (name.equals("use")) { 2827 this.use = null; 2828 } else if (name.equals("value")) { 2829 this.value = null; 2830 } else 2831 super.removeChild(name, value); 2832 2833 } 2834 2835 @Override 2836 public Base makeProperty(int hash, String name) throws FHIRException { 2837 switch (hash) { 2838 case -1613589672: 2839 return getLanguageElement(); 2840 case 116103: 2841 return getUse(); 2842 case 111972721: 2843 return getValueElement(); 2844 default: 2845 return super.makeProperty(hash, name); 2846 } 2847 2848 } 2849 2850 @Override 2851 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2852 switch (hash) { 2853 case -1613589672: 2854 /* language */ return new String[] { "code" }; 2855 case 116103: 2856 /* use */ return new String[] { "Coding" }; 2857 case 111972721: 2858 /* value */ return new String[] { "string" }; 2859 default: 2860 return super.getTypesForProperty(hash, name); 2861 } 2862 2863 } 2864 2865 @Override 2866 public Base addChild(String name) throws FHIRException { 2867 if (name.equals("language")) { 2868 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.language"); 2869 } else if (name.equals("use")) { 2870 this.use = new Coding(); 2871 return this.use; 2872 } else if (name.equals("value")) { 2873 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.value"); 2874 } else 2875 return super.addChild(name); 2876 } 2877 2878 public ConceptDefinitionDesignationComponent copy() { 2879 ConceptDefinitionDesignationComponent dst = new ConceptDefinitionDesignationComponent(); 2880 copyValues(dst); 2881 return dst; 2882 } 2883 2884 public void copyValues(ConceptDefinitionDesignationComponent dst) { 2885 super.copyValues(dst); 2886 dst.language = language == null ? null : language.copy(); 2887 dst.use = use == null ? null : use.copy(); 2888 dst.value = value == null ? null : value.copy(); 2889 } 2890 2891 @Override 2892 public boolean equalsDeep(Base other_) { 2893 if (!super.equalsDeep(other_)) 2894 return false; 2895 if (!(other_ instanceof ConceptDefinitionDesignationComponent)) 2896 return false; 2897 ConceptDefinitionDesignationComponent o = (ConceptDefinitionDesignationComponent) other_; 2898 return compareDeep(language, o.language, true) && compareDeep(use, o.use, true) 2899 && compareDeep(value, o.value, true); 2900 } 2901 2902 @Override 2903 public boolean equalsShallow(Base other_) { 2904 if (!super.equalsShallow(other_)) 2905 return false; 2906 if (!(other_ instanceof ConceptDefinitionDesignationComponent)) 2907 return false; 2908 ConceptDefinitionDesignationComponent o = (ConceptDefinitionDesignationComponent) other_; 2909 return compareValues(language, o.language, true) && compareValues(value, o.value, true); 2910 } 2911 2912 public boolean isEmpty() { 2913 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(language, use, value); 2914 } 2915 2916 public String fhirType() { 2917 return "CodeSystem.concept.designation"; 2918 2919 } 2920 2921 } 2922 2923 @Block() 2924 public static class ConceptPropertyComponent extends BackboneElement implements IBaseBackboneElement { 2925 /** 2926 * A code that is a reference to CodeSystem.property.code. 2927 */ 2928 @Child(name = "code", type = { CodeType.class }, order = 1, min = 1, max = 1, modifier = false, summary = false) 2929 @Description(shortDefinition = "Reference to CodeSystem.property.code", formalDefinition = "A code that is a reference to CodeSystem.property.code.") 2930 protected CodeType code; 2931 2932 /** 2933 * The value of this property. 2934 */ 2935 @Child(name = "value", type = { CodeType.class, Coding.class, StringType.class, IntegerType.class, 2936 BooleanType.class, DateTimeType.class, 2937 DecimalType.class }, order = 2, min = 1, max = 1, modifier = false, summary = false) 2938 @Description(shortDefinition = "Value of the property for this concept", formalDefinition = "The value of this property.") 2939 protected Type value; 2940 2941 private static final long serialVersionUID = 1742812311L; 2942 2943 /** 2944 * Constructor 2945 */ 2946 public ConceptPropertyComponent() { 2947 super(); 2948 } 2949 2950 /** 2951 * Constructor 2952 */ 2953 public ConceptPropertyComponent(CodeType code, Type value) { 2954 super(); 2955 this.code = code; 2956 this.value = value; 2957 } 2958 2959 /** 2960 * @return {@link #code} (A code that is a reference to 2961 * CodeSystem.property.code.). This is the underlying object with id, 2962 * value and extensions. The accessor "getCode" gives direct access to 2963 * the value 2964 */ 2965 public CodeType getCodeElement() { 2966 if (this.code == null) 2967 if (Configuration.errorOnAutoCreate()) 2968 throw new Error("Attempt to auto-create ConceptPropertyComponent.code"); 2969 else if (Configuration.doAutoCreate()) 2970 this.code = new CodeType(); // bb 2971 return this.code; 2972 } 2973 2974 public boolean hasCodeElement() { 2975 return this.code != null && !this.code.isEmpty(); 2976 } 2977 2978 public boolean hasCode() { 2979 return this.code != null && !this.code.isEmpty(); 2980 } 2981 2982 /** 2983 * @param value {@link #code} (A code that is a reference to 2984 * CodeSystem.property.code.). This is the underlying object with 2985 * id, value and extensions. The accessor "getCode" gives direct 2986 * access to the value 2987 */ 2988 public ConceptPropertyComponent setCodeElement(CodeType value) { 2989 this.code = value; 2990 return this; 2991 } 2992 2993 /** 2994 * @return A code that is a reference to CodeSystem.property.code. 2995 */ 2996 public String getCode() { 2997 return this.code == null ? null : this.code.getValue(); 2998 } 2999 3000 /** 3001 * @param value A code that is a reference to CodeSystem.property.code. 3002 */ 3003 public ConceptPropertyComponent setCode(String value) { 3004 if (this.code == null) 3005 this.code = new CodeType(); 3006 this.code.setValue(value); 3007 return this; 3008 } 3009 3010 /** 3011 * @return {@link #value} (The value of this property.) 3012 */ 3013 public Type getValue() { 3014 return this.value; 3015 } 3016 3017 /** 3018 * @return {@link #value} (The value of this property.) 3019 */ 3020 public CodeType getValueCodeType() throws FHIRException { 3021 if (this.value == null) 3022 this.value = new CodeType(); 3023 if (!(this.value instanceof CodeType)) 3024 throw new FHIRException("Type mismatch: the type CodeType was expected, but " + this.value.getClass().getName() 3025 + " was encountered"); 3026 return (CodeType) this.value; 3027 } 3028 3029 public boolean hasValueCodeType() { 3030 return this != null && this.value instanceof CodeType; 3031 } 3032 3033 /** 3034 * @return {@link #value} (The value of this property.) 3035 */ 3036 public Coding getValueCoding() throws FHIRException { 3037 if (this.value == null) 3038 this.value = new Coding(); 3039 if (!(this.value instanceof Coding)) 3040 throw new FHIRException( 3041 "Type mismatch: the type Coding was expected, but " + this.value.getClass().getName() + " was encountered"); 3042 return (Coding) this.value; 3043 } 3044 3045 public boolean hasValueCoding() { 3046 return this != null && this.value instanceof Coding; 3047 } 3048 3049 /** 3050 * @return {@link #value} (The value of this property.) 3051 */ 3052 public StringType getValueStringType() throws FHIRException { 3053 if (this.value == null) 3054 this.value = new StringType(); 3055 if (!(this.value instanceof StringType)) 3056 throw new FHIRException("Type mismatch: the type StringType was expected, but " 3057 + this.value.getClass().getName() + " was encountered"); 3058 return (StringType) this.value; 3059 } 3060 3061 public boolean hasValueStringType() { 3062 return this != null && this.value instanceof StringType; 3063 } 3064 3065 /** 3066 * @return {@link #value} (The value of this property.) 3067 */ 3068 public IntegerType getValueIntegerType() throws FHIRException { 3069 if (this.value == null) 3070 this.value = new IntegerType(); 3071 if (!(this.value instanceof IntegerType)) 3072 throw new FHIRException("Type mismatch: the type IntegerType was expected, but " 3073 + this.value.getClass().getName() + " was encountered"); 3074 return (IntegerType) this.value; 3075 } 3076 3077 public boolean hasValueIntegerType() { 3078 return this != null && this.value instanceof IntegerType; 3079 } 3080 3081 /** 3082 * @return {@link #value} (The value of this property.) 3083 */ 3084 public BooleanType getValueBooleanType() throws FHIRException { 3085 if (this.value == null) 3086 this.value = new BooleanType(); 3087 if (!(this.value instanceof BooleanType)) 3088 throw new FHIRException("Type mismatch: the type BooleanType was expected, but " 3089 + this.value.getClass().getName() + " was encountered"); 3090 return (BooleanType) this.value; 3091 } 3092 3093 public boolean hasValueBooleanType() { 3094 return this != null && this.value instanceof BooleanType; 3095 } 3096 3097 /** 3098 * @return {@link #value} (The value of this property.) 3099 */ 3100 public DateTimeType getValueDateTimeType() throws FHIRException { 3101 if (this.value == null) 3102 this.value = new DateTimeType(); 3103 if (!(this.value instanceof DateTimeType)) 3104 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but " 3105 + this.value.getClass().getName() + " was encountered"); 3106 return (DateTimeType) this.value; 3107 } 3108 3109 public boolean hasValueDateTimeType() { 3110 return this != null && this.value instanceof DateTimeType; 3111 } 3112 3113 /** 3114 * @return {@link #value} (The value of this property.) 3115 */ 3116 public DecimalType getValueDecimalType() throws FHIRException { 3117 if (this.value == null) 3118 this.value = new DecimalType(); 3119 if (!(this.value instanceof DecimalType)) 3120 throw new FHIRException("Type mismatch: the type DecimalType was expected, but " 3121 + this.value.getClass().getName() + " was encountered"); 3122 return (DecimalType) this.value; 3123 } 3124 3125 public boolean hasValueDecimalType() { 3126 return this != null && this.value instanceof DecimalType; 3127 } 3128 3129 public boolean hasValue() { 3130 return this.value != null && !this.value.isEmpty(); 3131 } 3132 3133 /** 3134 * @param value {@link #value} (The value of this property.) 3135 */ 3136 public ConceptPropertyComponent setValue(Type value) { 3137 if (value != null && !(value instanceof CodeType || value instanceof Coding || value instanceof StringType 3138 || value instanceof IntegerType || value instanceof BooleanType || value instanceof DateTimeType 3139 || value instanceof DecimalType)) 3140 throw new Error("Not the right type for CodeSystem.concept.property.value[x]: " + value.fhirType()); 3141 this.value = value; 3142 return this; 3143 } 3144 3145 protected void listChildren(List<Property> children) { 3146 super.listChildren(children); 3147 children.add(new Property("code", "code", "A code that is a reference to CodeSystem.property.code.", 0, 1, code)); 3148 children.add(new Property("value[x]", "code|Coding|string|integer|boolean|dateTime|decimal", 3149 "The value of this property.", 0, 1, value)); 3150 } 3151 3152 @Override 3153 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3154 switch (_hash) { 3155 case 3059181: 3156 /* code */ return new Property("code", "code", "A code that is a reference to CodeSystem.property.code.", 0, 1, 3157 code); 3158 case -1410166417: 3159 /* value[x] */ return new Property("value[x]", "code|Coding|string|integer|boolean|dateTime|decimal", 3160 "The value of this property.", 0, 1, value); 3161 case 111972721: 3162 /* value */ return new Property("value[x]", "code|Coding|string|integer|boolean|dateTime|decimal", 3163 "The value of this property.", 0, 1, value); 3164 case -766209282: 3165 /* valueCode */ return new Property("value[x]", "code|Coding|string|integer|boolean|dateTime|decimal", 3166 "The value of this property.", 0, 1, value); 3167 case -1887705029: 3168 /* valueCoding */ return new Property("value[x]", "code|Coding|string|integer|boolean|dateTime|decimal", 3169 "The value of this property.", 0, 1, value); 3170 case -1424603934: 3171 /* valueString */ return new Property("value[x]", "code|Coding|string|integer|boolean|dateTime|decimal", 3172 "The value of this property.", 0, 1, value); 3173 case -1668204915: 3174 /* valueInteger */ return new Property("value[x]", "code|Coding|string|integer|boolean|dateTime|decimal", 3175 "The value of this property.", 0, 1, value); 3176 case 733421943: 3177 /* valueBoolean */ return new Property("value[x]", "code|Coding|string|integer|boolean|dateTime|decimal", 3178 "The value of this property.", 0, 1, value); 3179 case 1047929900: 3180 /* valueDateTime */ return new Property("value[x]", "code|Coding|string|integer|boolean|dateTime|decimal", 3181 "The value of this property.", 0, 1, value); 3182 case -2083993440: 3183 /* valueDecimal */ return new Property("value[x]", "code|Coding|string|integer|boolean|dateTime|decimal", 3184 "The value of this property.", 0, 1, value); 3185 default: 3186 return super.getNamedProperty(_hash, _name, _checkValid); 3187 } 3188 3189 } 3190 3191 @Override 3192 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3193 switch (hash) { 3194 case 3059181: 3195 /* code */ return this.code == null ? new Base[0] : new Base[] { this.code }; // CodeType 3196 case 111972721: 3197 /* value */ return this.value == null ? new Base[0] : new Base[] { this.value }; // Type 3198 default: 3199 return super.getProperty(hash, name, checkValid); 3200 } 3201 3202 } 3203 3204 @Override 3205 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3206 switch (hash) { 3207 case 3059181: // code 3208 this.code = castToCode(value); // CodeType 3209 return value; 3210 case 111972721: // value 3211 this.value = castToType(value); // Type 3212 return value; 3213 default: 3214 return super.setProperty(hash, name, value); 3215 } 3216 3217 } 3218 3219 @Override 3220 public Base setProperty(String name, Base value) throws FHIRException { 3221 if (name.equals("code")) { 3222 this.code = castToCode(value); // CodeType 3223 } else if (name.equals("value[x]")) { 3224 this.value = castToType(value); // Type 3225 } else 3226 return super.setProperty(name, value); 3227 return value; 3228 } 3229 3230 @Override 3231 public void removeChild(String name, Base value) throws FHIRException { 3232 if (name.equals("code")) { 3233 this.code = null; 3234 } else if (name.equals("value[x]")) { 3235 this.value = null; 3236 } else 3237 super.removeChild(name, value); 3238 3239 } 3240 3241 @Override 3242 public Base makeProperty(int hash, String name) throws FHIRException { 3243 switch (hash) { 3244 case 3059181: 3245 return getCodeElement(); 3246 case -1410166417: 3247 return getValue(); 3248 case 111972721: 3249 return getValue(); 3250 default: 3251 return super.makeProperty(hash, name); 3252 } 3253 3254 } 3255 3256 @Override 3257 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3258 switch (hash) { 3259 case 3059181: 3260 /* code */ return new String[] { "code" }; 3261 case 111972721: 3262 /* value */ return new String[] { "code", "Coding", "string", "integer", "boolean", "dateTime", "decimal" }; 3263 default: 3264 return super.getTypesForProperty(hash, name); 3265 } 3266 3267 } 3268 3269 @Override 3270 public Base addChild(String name) throws FHIRException { 3271 if (name.equals("code")) { 3272 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.code"); 3273 } else if (name.equals("valueCode")) { 3274 this.value = new CodeType(); 3275 return this.value; 3276 } else if (name.equals("valueCoding")) { 3277 this.value = new Coding(); 3278 return this.value; 3279 } else if (name.equals("valueString")) { 3280 this.value = new StringType(); 3281 return this.value; 3282 } else if (name.equals("valueInteger")) { 3283 this.value = new IntegerType(); 3284 return this.value; 3285 } else if (name.equals("valueBoolean")) { 3286 this.value = new BooleanType(); 3287 return this.value; 3288 } else if (name.equals("valueDateTime")) { 3289 this.value = new DateTimeType(); 3290 return this.value; 3291 } else if (name.equals("valueDecimal")) { 3292 this.value = new DecimalType(); 3293 return this.value; 3294 } else 3295 return super.addChild(name); 3296 } 3297 3298 public ConceptPropertyComponent copy() { 3299 ConceptPropertyComponent dst = new ConceptPropertyComponent(); 3300 copyValues(dst); 3301 return dst; 3302 } 3303 3304 public void copyValues(ConceptPropertyComponent dst) { 3305 super.copyValues(dst); 3306 dst.code = code == null ? null : code.copy(); 3307 dst.value = value == null ? null : value.copy(); 3308 } 3309 3310 @Override 3311 public boolean equalsDeep(Base other_) { 3312 if (!super.equalsDeep(other_)) 3313 return false; 3314 if (!(other_ instanceof ConceptPropertyComponent)) 3315 return false; 3316 ConceptPropertyComponent o = (ConceptPropertyComponent) other_; 3317 return compareDeep(code, o.code, true) && compareDeep(value, o.value, true); 3318 } 3319 3320 @Override 3321 public boolean equalsShallow(Base other_) { 3322 if (!super.equalsShallow(other_)) 3323 return false; 3324 if (!(other_ instanceof ConceptPropertyComponent)) 3325 return false; 3326 ConceptPropertyComponent o = (ConceptPropertyComponent) other_; 3327 return compareValues(code, o.code, true); 3328 } 3329 3330 public boolean isEmpty() { 3331 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, value); 3332 } 3333 3334 public String fhirType() { 3335 return "CodeSystem.concept.property"; 3336 3337 } 3338 3339 } 3340 3341 /** 3342 * A formal identifier that is used to identify this code system when it is 3343 * represented in other formats, or referenced in a specification, model, design 3344 * or an instance. 3345 */ 3346 @Child(name = "identifier", type = { 3347 Identifier.class }, order = 0, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 3348 @Description(shortDefinition = "Additional identifier for the code system (business identifier)", formalDefinition = "A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance.") 3349 protected List<Identifier> identifier; 3350 3351 /** 3352 * Explanation of why this code system is needed and why it has been designed as 3353 * it has. 3354 */ 3355 @Child(name = "purpose", type = { 3356 MarkdownType.class }, order = 1, min = 0, max = 1, modifier = false, summary = false) 3357 @Description(shortDefinition = "Why this code system is defined", formalDefinition = "Explanation of why this code system is needed and why it has been designed as it has.") 3358 protected MarkdownType purpose; 3359 3360 /** 3361 * A copyright statement relating to the code system and/or its contents. 3362 * Copyright statements are generally legal restrictions on the use and 3363 * publishing of the code system. 3364 */ 3365 @Child(name = "copyright", type = { 3366 MarkdownType.class }, order = 2, min = 0, max = 1, modifier = false, summary = false) 3367 @Description(shortDefinition = "Use and/or publishing restrictions", formalDefinition = "A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system.") 3368 protected MarkdownType copyright; 3369 3370 /** 3371 * If code comparison is case sensitive when codes within this system are 3372 * compared to each other. 3373 */ 3374 @Child(name = "caseSensitive", type = { 3375 BooleanType.class }, order = 3, min = 0, max = 1, modifier = false, summary = true) 3376 @Description(shortDefinition = "If code comparison is case sensitive", formalDefinition = "If code comparison is case sensitive when codes within this system are compared to each other.") 3377 protected BooleanType caseSensitive; 3378 3379 /** 3380 * Canonical reference to the value set that contains the entire code system. 3381 */ 3382 @Child(name = "valueSet", type = { 3383 CanonicalType.class }, order = 4, min = 0, max = 1, modifier = false, summary = true) 3384 @Description(shortDefinition = "Canonical reference to the value set with entire code system", formalDefinition = "Canonical reference to the value set that contains the entire code system.") 3385 protected CanonicalType valueSet; 3386 3387 /** 3388 * The meaning of the hierarchy of concepts as represented in this resource. 3389 */ 3390 @Child(name = "hierarchyMeaning", type = { 3391 CodeType.class }, order = 5, min = 0, max = 1, modifier = false, summary = true) 3392 @Description(shortDefinition = "grouped-by | is-a | part-of | classified-with", formalDefinition = "The meaning of the hierarchy of concepts as represented in this resource.") 3393 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/codesystem-hierarchy-meaning") 3394 protected Enumeration<CodeSystemHierarchyMeaning> hierarchyMeaning; 3395 3396 /** 3397 * The code system defines a compositional (post-coordination) grammar. 3398 */ 3399 @Child(name = "compositional", type = { 3400 BooleanType.class }, order = 6, min = 0, max = 1, modifier = false, summary = true) 3401 @Description(shortDefinition = "If code system defines a compositional grammar", formalDefinition = "The code system defines a compositional (post-coordination) grammar.") 3402 protected BooleanType compositional; 3403 3404 /** 3405 * This flag is used to signify that the code system does not commit to concept 3406 * permanence across versions. If true, a version must be specified when 3407 * referencing this code system. 3408 */ 3409 @Child(name = "versionNeeded", type = { 3410 BooleanType.class }, order = 7, min = 0, max = 1, modifier = false, summary = true) 3411 @Description(shortDefinition = "If definitions are not stable", formalDefinition = "This flag is used to signify that the code system does not commit to concept permanence across versions. If true, a version must be specified when referencing this code system.") 3412 protected BooleanType versionNeeded; 3413 3414 /** 3415 * The extent of the content of the code system (the concepts and codes it 3416 * defines) are represented in this resource instance. 3417 */ 3418 @Child(name = "content", type = { CodeType.class }, order = 8, min = 1, max = 1, modifier = false, summary = true) 3419 @Description(shortDefinition = "not-present | example | fragment | complete | supplement", formalDefinition = "The extent of the content of the code system (the concepts and codes it defines) are represented in this resource instance.") 3420 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/codesystem-content-mode") 3421 protected Enumeration<CodeSystemContentMode> content; 3422 3423 /** 3424 * The canonical URL of the code system that this code system supplement is 3425 * adding designations and properties to. 3426 */ 3427 @Child(name = "supplements", type = { 3428 CanonicalType.class }, order = 9, min = 0, max = 1, modifier = false, summary = true) 3429 @Description(shortDefinition = "Canonical URL of Code System this adds designations and properties to", formalDefinition = "The canonical URL of the code system that this code system supplement is adding designations and properties to.") 3430 protected CanonicalType supplements; 3431 3432 /** 3433 * The total number of concepts defined by the code system. Where the code 3434 * system has a compositional grammar, the basis of this count is defined by the 3435 * system steward. 3436 */ 3437 @Child(name = "count", type = { 3438 UnsignedIntType.class }, order = 10, min = 0, max = 1, modifier = false, summary = true) 3439 @Description(shortDefinition = "Total concepts in the code system", formalDefinition = "The total number of concepts defined by the code system. Where the code system has a compositional grammar, the basis of this count is defined by the system steward.") 3440 protected UnsignedIntType count; 3441 3442 /** 3443 * A filter that can be used in a value set compose statement when selecting 3444 * concepts using a filter. 3445 */ 3446 @Child(name = "filter", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 3447 @Description(shortDefinition = "Filter that can be used in a value set", formalDefinition = "A filter that can be used in a value set compose statement when selecting concepts using a filter.") 3448 protected List<CodeSystemFilterComponent> filter; 3449 3450 /** 3451 * A property defines an additional slot through which additional information 3452 * can be provided about a concept. 3453 */ 3454 @Child(name = "property", type = {}, order = 12, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 3455 @Description(shortDefinition = "Additional information supplied about each concept", formalDefinition = "A property defines an additional slot through which additional information can be provided about a concept.") 3456 protected List<PropertyComponent> property; 3457 3458 /** 3459 * Concepts that are in the code system. The concept definitions are inherently 3460 * hierarchical, but the definitions must be consulted to determine what the 3461 * meanings of the hierarchical relationships are. 3462 */ 3463 @Child(name = "concept", type = {}, order = 13, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 3464 @Description(shortDefinition = "Concepts in the code system", formalDefinition = "Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meanings of the hierarchical relationships are.") 3465 protected List<ConceptDefinitionComponent> concept; 3466 3467 private static final long serialVersionUID = -1735124584L; 3468 3469 /** 3470 * Constructor 3471 */ 3472 public CodeSystem() { 3473 super(); 3474 } 3475 3476 /** 3477 * Constructor 3478 */ 3479 public CodeSystem(Enumeration<PublicationStatus> status, Enumeration<CodeSystemContentMode> content) { 3480 super(); 3481 this.status = status; 3482 this.content = content; 3483 } 3484 3485 /** 3486 * @return {@link #url} (An absolute URI that is used to identify this code 3487 * system when it is referenced in a specification, model, design or an 3488 * instance; also called its canonical identifier. This SHOULD be 3489 * globally unique and SHOULD be a literal address at which at which an 3490 * authoritative instance of this code system is (or will be) published. 3491 * This URL can be the target of a canonical reference. It SHALL remain 3492 * the same when the code system is stored on different servers. This is 3493 * used in [Coding](datatypes.html#Coding).system.). This is the 3494 * underlying object with id, value and extensions. The accessor 3495 * "getUrl" gives direct access to the value 3496 */ 3497 public UriType getUrlElement() { 3498 if (this.url == null) 3499 if (Configuration.errorOnAutoCreate()) 3500 throw new Error("Attempt to auto-create CodeSystem.url"); 3501 else if (Configuration.doAutoCreate()) 3502 this.url = new UriType(); // bb 3503 return this.url; 3504 } 3505 3506 public boolean hasUrlElement() { 3507 return this.url != null && !this.url.isEmpty(); 3508 } 3509 3510 public boolean hasUrl() { 3511 return this.url != null && !this.url.isEmpty(); 3512 } 3513 3514 /** 3515 * @param value {@link #url} (An absolute URI that is used to identify this code 3516 * system when it is referenced in a specification, model, design 3517 * or an instance; also called its canonical identifier. This 3518 * SHOULD be globally unique and SHOULD be a literal address at 3519 * which at which an authoritative instance of this code system is 3520 * (or will be) published. This URL can be the target of a 3521 * canonical reference. It SHALL remain the same when the code 3522 * system is stored on different servers. This is used in 3523 * [Coding](datatypes.html#Coding).system.). This is the underlying 3524 * object with id, value and extensions. The accessor "getUrl" 3525 * gives direct access to the value 3526 */ 3527 public CodeSystem setUrlElement(UriType value) { 3528 this.url = value; 3529 return this; 3530 } 3531 3532 /** 3533 * @return An absolute URI that is used to identify this code system when it is 3534 * referenced in a specification, model, design or an instance; also 3535 * called its canonical identifier. This SHOULD be globally unique and 3536 * SHOULD be a literal address at which at which an authoritative 3537 * instance of this code system is (or will be) published. This URL can 3538 * be the target of a canonical reference. It SHALL remain the same when 3539 * the code system is stored on different servers. This is used in 3540 * [Coding](datatypes.html#Coding).system. 3541 */ 3542 public String getUrl() { 3543 return this.url == null ? null : this.url.getValue(); 3544 } 3545 3546 /** 3547 * @param value An absolute URI that is used to identify this code system when 3548 * it is referenced in a specification, model, design or an 3549 * instance; also called its canonical identifier. This SHOULD be 3550 * globally unique and SHOULD be a literal address at which at 3551 * which an authoritative instance of this code system is (or will 3552 * be) published. This URL can be the target of a canonical 3553 * reference. It SHALL remain the same when the code system is 3554 * stored on different servers. This is used in 3555 * [Coding](datatypes.html#Coding).system. 3556 */ 3557 public CodeSystem setUrl(String value) { 3558 if (Utilities.noString(value)) 3559 this.url = null; 3560 else { 3561 if (this.url == null) 3562 this.url = new UriType(); 3563 this.url.setValue(value); 3564 } 3565 return this; 3566 } 3567 3568 /** 3569 * @return {@link #identifier} (A formal identifier that is used to identify 3570 * this code system when it is represented in other formats, or 3571 * referenced in a specification, model, design or an instance.) 3572 */ 3573 public List<Identifier> getIdentifier() { 3574 if (this.identifier == null) 3575 this.identifier = new ArrayList<Identifier>(); 3576 return this.identifier; 3577 } 3578 3579 /** 3580 * @return Returns a reference to <code>this</code> for easy method chaining 3581 */ 3582 public CodeSystem setIdentifier(List<Identifier> theIdentifier) { 3583 this.identifier = theIdentifier; 3584 return this; 3585 } 3586 3587 public boolean hasIdentifier() { 3588 if (this.identifier == null) 3589 return false; 3590 for (Identifier item : this.identifier) 3591 if (!item.isEmpty()) 3592 return true; 3593 return false; 3594 } 3595 3596 public Identifier addIdentifier() { // 3 3597 Identifier t = new Identifier(); 3598 if (this.identifier == null) 3599 this.identifier = new ArrayList<Identifier>(); 3600 this.identifier.add(t); 3601 return t; 3602 } 3603 3604 public CodeSystem addIdentifier(Identifier t) { // 3 3605 if (t == null) 3606 return this; 3607 if (this.identifier == null) 3608 this.identifier = new ArrayList<Identifier>(); 3609 this.identifier.add(t); 3610 return this; 3611 } 3612 3613 /** 3614 * @return The first repetition of repeating field {@link #identifier}, creating 3615 * it if it does not already exist 3616 */ 3617 public Identifier getIdentifierFirstRep() { 3618 if (getIdentifier().isEmpty()) { 3619 addIdentifier(); 3620 } 3621 return getIdentifier().get(0); 3622 } 3623 3624 /** 3625 * @return {@link #version} (The identifier that is used to identify this 3626 * version of the code system when it is referenced in a specification, 3627 * model, design or instance. This is an arbitrary value managed by the 3628 * code system author and is not expected to be globally unique. For 3629 * example, it might be a timestamp (e.g. yyyymmdd) if a managed version 3630 * is not available. There is also no expectation that versions can be 3631 * placed in a lexicographical sequence. This is used in 3632 * [Coding](datatypes.html#Coding).version.). This is the underlying 3633 * object with id, value and extensions. The accessor "getVersion" gives 3634 * direct access to the value 3635 */ 3636 public StringType getVersionElement() { 3637 if (this.version == null) 3638 if (Configuration.errorOnAutoCreate()) 3639 throw new Error("Attempt to auto-create CodeSystem.version"); 3640 else if (Configuration.doAutoCreate()) 3641 this.version = new StringType(); // bb 3642 return this.version; 3643 } 3644 3645 public boolean hasVersionElement() { 3646 return this.version != null && !this.version.isEmpty(); 3647 } 3648 3649 public boolean hasVersion() { 3650 return this.version != null && !this.version.isEmpty(); 3651 } 3652 3653 /** 3654 * @param value {@link #version} (The identifier that is used to identify this 3655 * version of the code system when it is referenced in a 3656 * specification, model, design or instance. This is an arbitrary 3657 * value managed by the code system author and is not expected to 3658 * be globally unique. For example, it might be a timestamp (e.g. 3659 * yyyymmdd) if a managed version is not available. There is also 3660 * no expectation that versions can be placed in a lexicographical 3661 * sequence. This is used in 3662 * [Coding](datatypes.html#Coding).version.). This is the 3663 * underlying object with id, value and extensions. The accessor 3664 * "getVersion" gives direct access to the value 3665 */ 3666 public CodeSystem setVersionElement(StringType value) { 3667 this.version = value; 3668 return this; 3669 } 3670 3671 /** 3672 * @return The identifier that is used to identify this version of the code 3673 * system when it is referenced in a specification, model, design or 3674 * instance. This is an arbitrary value managed by the code system 3675 * author and is not expected to be globally unique. For example, it 3676 * might be a timestamp (e.g. yyyymmdd) if a managed version is not 3677 * available. There is also no expectation that versions can be placed 3678 * in a lexicographical sequence. This is used in 3679 * [Coding](datatypes.html#Coding).version. 3680 */ 3681 public String getVersion() { 3682 return this.version == null ? null : this.version.getValue(); 3683 } 3684 3685 /** 3686 * @param value The identifier that is used to identify this version of the code 3687 * system when it is referenced in a specification, model, design 3688 * or instance. This is an arbitrary value managed by the code 3689 * system author and is not expected to be globally unique. For 3690 * example, it might be a timestamp (e.g. yyyymmdd) if a managed 3691 * version is not available. There is also no expectation that 3692 * versions can be placed in a lexicographical sequence. This is 3693 * used in [Coding](datatypes.html#Coding).version. 3694 */ 3695 public CodeSystem setVersion(String value) { 3696 if (Utilities.noString(value)) 3697 this.version = null; 3698 else { 3699 if (this.version == null) 3700 this.version = new StringType(); 3701 this.version.setValue(value); 3702 } 3703 return this; 3704 } 3705 3706 /** 3707 * @return {@link #name} (A natural language name identifying the code system. 3708 * This name should be usable as an identifier for the module by machine 3709 * processing applications such as code generation.). This is the 3710 * underlying object with id, value and extensions. The accessor 3711 * "getName" gives direct access to the value 3712 */ 3713 public StringType getNameElement() { 3714 if (this.name == null) 3715 if (Configuration.errorOnAutoCreate()) 3716 throw new Error("Attempt to auto-create CodeSystem.name"); 3717 else if (Configuration.doAutoCreate()) 3718 this.name = new StringType(); // bb 3719 return this.name; 3720 } 3721 3722 public boolean hasNameElement() { 3723 return this.name != null && !this.name.isEmpty(); 3724 } 3725 3726 public boolean hasName() { 3727 return this.name != null && !this.name.isEmpty(); 3728 } 3729 3730 /** 3731 * @param value {@link #name} (A natural language name identifying the code 3732 * system. This name should be usable as an identifier for the 3733 * module by machine processing applications such as code 3734 * generation.). This is the underlying object with id, value and 3735 * extensions. The accessor "getName" gives direct access to the 3736 * value 3737 */ 3738 public CodeSystem setNameElement(StringType value) { 3739 this.name = value; 3740 return this; 3741 } 3742 3743 /** 3744 * @return A natural language name identifying the code system. This name should 3745 * be usable as an identifier for the module by machine processing 3746 * applications such as code generation. 3747 */ 3748 public String getName() { 3749 return this.name == null ? null : this.name.getValue(); 3750 } 3751 3752 /** 3753 * @param value A natural language name identifying the code system. This name 3754 * should be usable as an identifier for the module by machine 3755 * processing applications such as code generation. 3756 */ 3757 public CodeSystem setName(String value) { 3758 if (Utilities.noString(value)) 3759 this.name = null; 3760 else { 3761 if (this.name == null) 3762 this.name = new StringType(); 3763 this.name.setValue(value); 3764 } 3765 return this; 3766 } 3767 3768 /** 3769 * @return {@link #title} (A short, descriptive, user-friendly title for the 3770 * code system.). This is the underlying object with id, value and 3771 * extensions. The accessor "getTitle" gives direct access to the value 3772 */ 3773 public StringType getTitleElement() { 3774 if (this.title == null) 3775 if (Configuration.errorOnAutoCreate()) 3776 throw new Error("Attempt to auto-create CodeSystem.title"); 3777 else if (Configuration.doAutoCreate()) 3778 this.title = new StringType(); // bb 3779 return this.title; 3780 } 3781 3782 public boolean hasTitleElement() { 3783 return this.title != null && !this.title.isEmpty(); 3784 } 3785 3786 public boolean hasTitle() { 3787 return this.title != null && !this.title.isEmpty(); 3788 } 3789 3790 /** 3791 * @param value {@link #title} (A short, descriptive, user-friendly title for 3792 * the code system.). This is the underlying object with id, value 3793 * and extensions. The accessor "getTitle" gives direct access to 3794 * the value 3795 */ 3796 public CodeSystem setTitleElement(StringType value) { 3797 this.title = value; 3798 return this; 3799 } 3800 3801 /** 3802 * @return A short, descriptive, user-friendly title for the code system. 3803 */ 3804 public String getTitle() { 3805 return this.title == null ? null : this.title.getValue(); 3806 } 3807 3808 /** 3809 * @param value A short, descriptive, user-friendly title for the code system. 3810 */ 3811 public CodeSystem setTitle(String value) { 3812 if (Utilities.noString(value)) 3813 this.title = null; 3814 else { 3815 if (this.title == null) 3816 this.title = new StringType(); 3817 this.title.setValue(value); 3818 } 3819 return this; 3820 } 3821 3822 /** 3823 * @return {@link #status} (The date (and optionally time) when the code system 3824 * resource was created or revised.). This is the underlying object with 3825 * id, value and extensions. The accessor "getStatus" gives direct 3826 * access to the value 3827 */ 3828 public Enumeration<PublicationStatus> getStatusElement() { 3829 if (this.status == null) 3830 if (Configuration.errorOnAutoCreate()) 3831 throw new Error("Attempt to auto-create CodeSystem.status"); 3832 else if (Configuration.doAutoCreate()) 3833 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb 3834 return this.status; 3835 } 3836 3837 public boolean hasStatusElement() { 3838 return this.status != null && !this.status.isEmpty(); 3839 } 3840 3841 public boolean hasStatus() { 3842 return this.status != null && !this.status.isEmpty(); 3843 } 3844 3845 /** 3846 * @param value {@link #status} (The date (and optionally time) when the code 3847 * system resource was created or revised.). This is the underlying 3848 * object with id, value and extensions. The accessor "getStatus" 3849 * gives direct access to the value 3850 */ 3851 public CodeSystem setStatusElement(Enumeration<PublicationStatus> value) { 3852 this.status = value; 3853 return this; 3854 } 3855 3856 /** 3857 * @return The date (and optionally time) when the code system resource was 3858 * created or revised. 3859 */ 3860 public PublicationStatus getStatus() { 3861 return this.status == null ? null : this.status.getValue(); 3862 } 3863 3864 /** 3865 * @param value The date (and optionally time) when the code system resource was 3866 * created or revised. 3867 */ 3868 public CodeSystem setStatus(PublicationStatus value) { 3869 if (this.status == null) 3870 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); 3871 this.status.setValue(value); 3872 return this; 3873 } 3874 3875 /** 3876 * @return {@link #experimental} (A Boolean value to indicate that this code 3877 * system is authored for testing purposes (or 3878 * education/evaluation/marketing) and is not intended to be used for 3879 * genuine usage.). This is the underlying object with id, value and 3880 * extensions. The accessor "getExperimental" gives direct access to the 3881 * value 3882 */ 3883 public BooleanType getExperimentalElement() { 3884 if (this.experimental == null) 3885 if (Configuration.errorOnAutoCreate()) 3886 throw new Error("Attempt to auto-create CodeSystem.experimental"); 3887 else if (Configuration.doAutoCreate()) 3888 this.experimental = new BooleanType(); // bb 3889 return this.experimental; 3890 } 3891 3892 public boolean hasExperimentalElement() { 3893 return this.experimental != null && !this.experimental.isEmpty(); 3894 } 3895 3896 public boolean hasExperimental() { 3897 return this.experimental != null && !this.experimental.isEmpty(); 3898 } 3899 3900 /** 3901 * @param value {@link #experimental} (A Boolean value to indicate that this 3902 * code system is authored for testing purposes (or 3903 * education/evaluation/marketing) and is not intended to be used 3904 * for genuine usage.). This is the underlying object with id, 3905 * value and extensions. The accessor "getExperimental" gives 3906 * direct access to the value 3907 */ 3908 public CodeSystem setExperimentalElement(BooleanType value) { 3909 this.experimental = value; 3910 return this; 3911 } 3912 3913 /** 3914 * @return A Boolean value to indicate that this code system is authored for 3915 * testing purposes (or education/evaluation/marketing) and is not 3916 * intended to be used for genuine usage. 3917 */ 3918 public boolean getExperimental() { 3919 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 3920 } 3921 3922 /** 3923 * @param value A Boolean value to indicate that this code system is authored 3924 * for testing purposes (or education/evaluation/marketing) and is 3925 * not intended to be used for genuine usage. 3926 */ 3927 public CodeSystem setExperimental(boolean value) { 3928 if (this.experimental == null) 3929 this.experimental = new BooleanType(); 3930 this.experimental.setValue(value); 3931 return this; 3932 } 3933 3934 /** 3935 * @return {@link #date} (The date (and optionally time) when the code system 3936 * was published. The date must change when the business version changes 3937 * and it must change if the status code changes. In addition, it should 3938 * change when the substantive content of the code system changes.). 3939 * This is the underlying object with id, value and extensions. The 3940 * accessor "getDate" gives direct access to the value 3941 */ 3942 public DateTimeType getDateElement() { 3943 if (this.date == null) 3944 if (Configuration.errorOnAutoCreate()) 3945 throw new Error("Attempt to auto-create CodeSystem.date"); 3946 else if (Configuration.doAutoCreate()) 3947 this.date = new DateTimeType(); // bb 3948 return this.date; 3949 } 3950 3951 public boolean hasDateElement() { 3952 return this.date != null && !this.date.isEmpty(); 3953 } 3954 3955 public boolean hasDate() { 3956 return this.date != null && !this.date.isEmpty(); 3957 } 3958 3959 /** 3960 * @param value {@link #date} (The date (and optionally time) when the code 3961 * system was published. The date must change when the business 3962 * version changes and it must change if the status code changes. 3963 * In addition, it should change when the substantive content of 3964 * the code system changes.). This is the underlying object with 3965 * id, value and extensions. The accessor "getDate" gives direct 3966 * access to the value 3967 */ 3968 public CodeSystem setDateElement(DateTimeType value) { 3969 this.date = value; 3970 return this; 3971 } 3972 3973 /** 3974 * @return The date (and optionally time) when the code system was published. 3975 * The date must change when the business version changes and it must 3976 * change if the status code changes. In addition, it should change when 3977 * the substantive content of the code system changes. 3978 */ 3979 public Date getDate() { 3980 return this.date == null ? null : this.date.getValue(); 3981 } 3982 3983 /** 3984 * @param value The date (and optionally time) when the code system was 3985 * published. The date must change when the business version 3986 * changes and it must change if the status code changes. In 3987 * addition, it should change when the substantive content of the 3988 * code system changes. 3989 */ 3990 public CodeSystem setDate(Date value) { 3991 if (value == null) 3992 this.date = null; 3993 else { 3994 if (this.date == null) 3995 this.date = new DateTimeType(); 3996 this.date.setValue(value); 3997 } 3998 return this; 3999 } 4000 4001 /** 4002 * @return {@link #publisher} (The name of the organization or individual that 4003 * published the code system.). This is the underlying object with id, 4004 * value and extensions. The accessor "getPublisher" gives direct access 4005 * to the value 4006 */ 4007 public StringType getPublisherElement() { 4008 if (this.publisher == null) 4009 if (Configuration.errorOnAutoCreate()) 4010 throw new Error("Attempt to auto-create CodeSystem.publisher"); 4011 else if (Configuration.doAutoCreate()) 4012 this.publisher = new StringType(); // bb 4013 return this.publisher; 4014 } 4015 4016 public boolean hasPublisherElement() { 4017 return this.publisher != null && !this.publisher.isEmpty(); 4018 } 4019 4020 public boolean hasPublisher() { 4021 return this.publisher != null && !this.publisher.isEmpty(); 4022 } 4023 4024 /** 4025 * @param value {@link #publisher} (The name of the organization or individual 4026 * that published the code system.). This is the underlying object 4027 * with id, value and extensions. The accessor "getPublisher" gives 4028 * direct access to the value 4029 */ 4030 public CodeSystem setPublisherElement(StringType value) { 4031 this.publisher = value; 4032 return this; 4033 } 4034 4035 /** 4036 * @return The name of the organization or individual that published the code 4037 * system. 4038 */ 4039 public String getPublisher() { 4040 return this.publisher == null ? null : this.publisher.getValue(); 4041 } 4042 4043 /** 4044 * @param value The name of the organization or individual that published the 4045 * code system. 4046 */ 4047 public CodeSystem setPublisher(String value) { 4048 if (Utilities.noString(value)) 4049 this.publisher = null; 4050 else { 4051 if (this.publisher == null) 4052 this.publisher = new StringType(); 4053 this.publisher.setValue(value); 4054 } 4055 return this; 4056 } 4057 4058 /** 4059 * @return {@link #contact} (Contact details to assist a user in finding and 4060 * communicating with the publisher.) 4061 */ 4062 public List<ContactDetail> getContact() { 4063 if (this.contact == null) 4064 this.contact = new ArrayList<ContactDetail>(); 4065 return this.contact; 4066 } 4067 4068 /** 4069 * @return Returns a reference to <code>this</code> for easy method chaining 4070 */ 4071 public CodeSystem setContact(List<ContactDetail> theContact) { 4072 this.contact = theContact; 4073 return this; 4074 } 4075 4076 public boolean hasContact() { 4077 if (this.contact == null) 4078 return false; 4079 for (ContactDetail item : this.contact) 4080 if (!item.isEmpty()) 4081 return true; 4082 return false; 4083 } 4084 4085 public ContactDetail addContact() { // 3 4086 ContactDetail t = new ContactDetail(); 4087 if (this.contact == null) 4088 this.contact = new ArrayList<ContactDetail>(); 4089 this.contact.add(t); 4090 return t; 4091 } 4092 4093 public CodeSystem addContact(ContactDetail t) { // 3 4094 if (t == null) 4095 return this; 4096 if (this.contact == null) 4097 this.contact = new ArrayList<ContactDetail>(); 4098 this.contact.add(t); 4099 return this; 4100 } 4101 4102 /** 4103 * @return The first repetition of repeating field {@link #contact}, creating it 4104 * if it does not already exist 4105 */ 4106 public ContactDetail getContactFirstRep() { 4107 if (getContact().isEmpty()) { 4108 addContact(); 4109 } 4110 return getContact().get(0); 4111 } 4112 4113 /** 4114 * @return {@link #description} (A free text natural language description of the 4115 * code system from a consumer's perspective.). This is the underlying 4116 * object with id, value and extensions. The accessor "getDescription" 4117 * gives direct access to the value 4118 */ 4119 public MarkdownType getDescriptionElement() { 4120 if (this.description == null) 4121 if (Configuration.errorOnAutoCreate()) 4122 throw new Error("Attempt to auto-create CodeSystem.description"); 4123 else if (Configuration.doAutoCreate()) 4124 this.description = new MarkdownType(); // bb 4125 return this.description; 4126 } 4127 4128 public boolean hasDescriptionElement() { 4129 return this.description != null && !this.description.isEmpty(); 4130 } 4131 4132 public boolean hasDescription() { 4133 return this.description != null && !this.description.isEmpty(); 4134 } 4135 4136 /** 4137 * @param value {@link #description} (A free text natural language description 4138 * of the code system from a consumer's perspective.). This is the 4139 * underlying object with id, value and extensions. The accessor 4140 * "getDescription" gives direct access to the value 4141 */ 4142 public CodeSystem setDescriptionElement(MarkdownType value) { 4143 this.description = value; 4144 return this; 4145 } 4146 4147 /** 4148 * @return A free text natural language description of the code system from a 4149 * consumer's perspective. 4150 */ 4151 public String getDescription() { 4152 return this.description == null ? null : this.description.getValue(); 4153 } 4154 4155 /** 4156 * @param value A free text natural language description of the code system from 4157 * a consumer's perspective. 4158 */ 4159 public CodeSystem setDescription(String value) { 4160 if (value == null) 4161 this.description = null; 4162 else { 4163 if (this.description == null) 4164 this.description = new MarkdownType(); 4165 this.description.setValue(value); 4166 } 4167 return this; 4168 } 4169 4170 /** 4171 * @return {@link #useContext} (The content was developed with a focus and 4172 * intent of supporting the contexts that are listed. These contexts may 4173 * be general categories (gender, age, ...) or may be references to 4174 * specific programs (insurance plans, studies, ...) and may be used to 4175 * assist with indexing and searching for appropriate code system 4176 * instances.) 4177 */ 4178 public List<UsageContext> getUseContext() { 4179 if (this.useContext == null) 4180 this.useContext = new ArrayList<UsageContext>(); 4181 return this.useContext; 4182 } 4183 4184 /** 4185 * @return Returns a reference to <code>this</code> for easy method chaining 4186 */ 4187 public CodeSystem setUseContext(List<UsageContext> theUseContext) { 4188 this.useContext = theUseContext; 4189 return this; 4190 } 4191 4192 public boolean hasUseContext() { 4193 if (this.useContext == null) 4194 return false; 4195 for (UsageContext item : this.useContext) 4196 if (!item.isEmpty()) 4197 return true; 4198 return false; 4199 } 4200 4201 public UsageContext addUseContext() { // 3 4202 UsageContext t = new UsageContext(); 4203 if (this.useContext == null) 4204 this.useContext = new ArrayList<UsageContext>(); 4205 this.useContext.add(t); 4206 return t; 4207 } 4208 4209 public CodeSystem addUseContext(UsageContext t) { // 3 4210 if (t == null) 4211 return this; 4212 if (this.useContext == null) 4213 this.useContext = new ArrayList<UsageContext>(); 4214 this.useContext.add(t); 4215 return this; 4216 } 4217 4218 /** 4219 * @return The first repetition of repeating field {@link #useContext}, creating 4220 * it if it does not already exist 4221 */ 4222 public UsageContext getUseContextFirstRep() { 4223 if (getUseContext().isEmpty()) { 4224 addUseContext(); 4225 } 4226 return getUseContext().get(0); 4227 } 4228 4229 /** 4230 * @return {@link #jurisdiction} (A legal or geographic region in which the code 4231 * system is intended to be used.) 4232 */ 4233 public List<CodeableConcept> getJurisdiction() { 4234 if (this.jurisdiction == null) 4235 this.jurisdiction = new ArrayList<CodeableConcept>(); 4236 return this.jurisdiction; 4237 } 4238 4239 /** 4240 * @return Returns a reference to <code>this</code> for easy method chaining 4241 */ 4242 public CodeSystem setJurisdiction(List<CodeableConcept> theJurisdiction) { 4243 this.jurisdiction = theJurisdiction; 4244 return this; 4245 } 4246 4247 public boolean hasJurisdiction() { 4248 if (this.jurisdiction == null) 4249 return false; 4250 for (CodeableConcept item : this.jurisdiction) 4251 if (!item.isEmpty()) 4252 return true; 4253 return false; 4254 } 4255 4256 public CodeableConcept addJurisdiction() { // 3 4257 CodeableConcept t = new CodeableConcept(); 4258 if (this.jurisdiction == null) 4259 this.jurisdiction = new ArrayList<CodeableConcept>(); 4260 this.jurisdiction.add(t); 4261 return t; 4262 } 4263 4264 public CodeSystem addJurisdiction(CodeableConcept t) { // 3 4265 if (t == null) 4266 return this; 4267 if (this.jurisdiction == null) 4268 this.jurisdiction = new ArrayList<CodeableConcept>(); 4269 this.jurisdiction.add(t); 4270 return this; 4271 } 4272 4273 /** 4274 * @return The first repetition of repeating field {@link #jurisdiction}, 4275 * creating it if it does not already exist 4276 */ 4277 public CodeableConcept getJurisdictionFirstRep() { 4278 if (getJurisdiction().isEmpty()) { 4279 addJurisdiction(); 4280 } 4281 return getJurisdiction().get(0); 4282 } 4283 4284 /** 4285 * @return {@link #purpose} (Explanation of why this code system is needed and 4286 * why it has been designed as it has.). This is the underlying object 4287 * with id, value and extensions. The accessor "getPurpose" gives direct 4288 * access to the value 4289 */ 4290 public MarkdownType getPurposeElement() { 4291 if (this.purpose == null) 4292 if (Configuration.errorOnAutoCreate()) 4293 throw new Error("Attempt to auto-create CodeSystem.purpose"); 4294 else if (Configuration.doAutoCreate()) 4295 this.purpose = new MarkdownType(); // bb 4296 return this.purpose; 4297 } 4298 4299 public boolean hasPurposeElement() { 4300 return this.purpose != null && !this.purpose.isEmpty(); 4301 } 4302 4303 public boolean hasPurpose() { 4304 return this.purpose != null && !this.purpose.isEmpty(); 4305 } 4306 4307 /** 4308 * @param value {@link #purpose} (Explanation of why this code system is needed 4309 * and why it has been designed as it has.). This is the underlying 4310 * object with id, value and extensions. The accessor "getPurpose" 4311 * gives direct access to the value 4312 */ 4313 public CodeSystem setPurposeElement(MarkdownType value) { 4314 this.purpose = value; 4315 return this; 4316 } 4317 4318 /** 4319 * @return Explanation of why this code system is needed and why it has been 4320 * designed as it has. 4321 */ 4322 public String getPurpose() { 4323 return this.purpose == null ? null : this.purpose.getValue(); 4324 } 4325 4326 /** 4327 * @param value Explanation of why this code system is needed and why it has 4328 * been designed as it has. 4329 */ 4330 public CodeSystem setPurpose(String value) { 4331 if (value == null) 4332 this.purpose = null; 4333 else { 4334 if (this.purpose == null) 4335 this.purpose = new MarkdownType(); 4336 this.purpose.setValue(value); 4337 } 4338 return this; 4339 } 4340 4341 /** 4342 * @return {@link #copyright} (A copyright statement relating to the code system 4343 * and/or its contents. Copyright statements are generally legal 4344 * restrictions on the use and publishing of the code system.). This is 4345 * the underlying object with id, value and extensions. The accessor 4346 * "getCopyright" gives direct access to the value 4347 */ 4348 public MarkdownType getCopyrightElement() { 4349 if (this.copyright == null) 4350 if (Configuration.errorOnAutoCreate()) 4351 throw new Error("Attempt to auto-create CodeSystem.copyright"); 4352 else if (Configuration.doAutoCreate()) 4353 this.copyright = new MarkdownType(); // bb 4354 return this.copyright; 4355 } 4356 4357 public boolean hasCopyrightElement() { 4358 return this.copyright != null && !this.copyright.isEmpty(); 4359 } 4360 4361 public boolean hasCopyright() { 4362 return this.copyright != null && !this.copyright.isEmpty(); 4363 } 4364 4365 /** 4366 * @param value {@link #copyright} (A copyright statement relating to the code 4367 * system and/or its contents. Copyright statements are generally 4368 * legal restrictions on the use and publishing of the code 4369 * system.). This is the underlying object with id, value and 4370 * extensions. The accessor "getCopyright" gives direct access to 4371 * the value 4372 */ 4373 public CodeSystem setCopyrightElement(MarkdownType value) { 4374 this.copyright = value; 4375 return this; 4376 } 4377 4378 /** 4379 * @return A copyright statement relating to the code system and/or its 4380 * contents. Copyright statements are generally legal restrictions on 4381 * the use and publishing of the code system. 4382 */ 4383 public String getCopyright() { 4384 return this.copyright == null ? null : this.copyright.getValue(); 4385 } 4386 4387 /** 4388 * @param value A copyright statement relating to the code system and/or its 4389 * contents. Copyright statements are generally legal restrictions 4390 * on the use and publishing of the code system. 4391 */ 4392 public CodeSystem setCopyright(String value) { 4393 if (value == null) 4394 this.copyright = null; 4395 else { 4396 if (this.copyright == null) 4397 this.copyright = new MarkdownType(); 4398 this.copyright.setValue(value); 4399 } 4400 return this; 4401 } 4402 4403 /** 4404 * @return {@link #caseSensitive} (If code comparison is case sensitive when 4405 * codes within this system are compared to each other.). This is the 4406 * underlying object with id, value and extensions. The accessor 4407 * "getCaseSensitive" gives direct access to the value 4408 */ 4409 public BooleanType getCaseSensitiveElement() { 4410 if (this.caseSensitive == null) 4411 if (Configuration.errorOnAutoCreate()) 4412 throw new Error("Attempt to auto-create CodeSystem.caseSensitive"); 4413 else if (Configuration.doAutoCreate()) 4414 this.caseSensitive = new BooleanType(); // bb 4415 return this.caseSensitive; 4416 } 4417 4418 public boolean hasCaseSensitiveElement() { 4419 return this.caseSensitive != null && !this.caseSensitive.isEmpty(); 4420 } 4421 4422 public boolean hasCaseSensitive() { 4423 return this.caseSensitive != null && !this.caseSensitive.isEmpty(); 4424 } 4425 4426 /** 4427 * @param value {@link #caseSensitive} (If code comparison is case sensitive 4428 * when codes within this system are compared to each other.). This 4429 * is the underlying object with id, value and extensions. The 4430 * accessor "getCaseSensitive" gives direct access to the value 4431 */ 4432 public CodeSystem setCaseSensitiveElement(BooleanType value) { 4433 this.caseSensitive = value; 4434 return this; 4435 } 4436 4437 /** 4438 * @return If code comparison is case sensitive when codes within this system 4439 * are compared to each other. 4440 */ 4441 public boolean getCaseSensitive() { 4442 return this.caseSensitive == null || this.caseSensitive.isEmpty() ? false : this.caseSensitive.getValue(); 4443 } 4444 4445 /** 4446 * @param value If code comparison is case sensitive when codes within this 4447 * system are compared to each other. 4448 */ 4449 public CodeSystem setCaseSensitive(boolean value) { 4450 if (this.caseSensitive == null) 4451 this.caseSensitive = new BooleanType(); 4452 this.caseSensitive.setValue(value); 4453 return this; 4454 } 4455 4456 /** 4457 * @return {@link #valueSet} (Canonical reference to the value set that contains 4458 * the entire code system.). This is the underlying object with id, 4459 * value and extensions. The accessor "getValueSet" gives direct access 4460 * to the value 4461 */ 4462 public CanonicalType getValueSetElement() { 4463 if (this.valueSet == null) 4464 if (Configuration.errorOnAutoCreate()) 4465 throw new Error("Attempt to auto-create CodeSystem.valueSet"); 4466 else if (Configuration.doAutoCreate()) 4467 this.valueSet = new CanonicalType(); // bb 4468 return this.valueSet; 4469 } 4470 4471 public boolean hasValueSetElement() { 4472 return this.valueSet != null && !this.valueSet.isEmpty(); 4473 } 4474 4475 public boolean hasValueSet() { 4476 return this.valueSet != null && !this.valueSet.isEmpty(); 4477 } 4478 4479 /** 4480 * @param value {@link #valueSet} (Canonical reference to the value set that 4481 * contains the entire code system.). This is the underlying object 4482 * with id, value and extensions. The accessor "getValueSet" gives 4483 * direct access to the value 4484 */ 4485 public CodeSystem setValueSetElement(CanonicalType value) { 4486 this.valueSet = value; 4487 return this; 4488 } 4489 4490 /** 4491 * @return Canonical reference to the value set that contains the entire code 4492 * system. 4493 */ 4494 public String getValueSet() { 4495 return this.valueSet == null ? null : this.valueSet.getValue(); 4496 } 4497 4498 /** 4499 * @param value Canonical reference to the value set that contains the entire 4500 * code system. 4501 */ 4502 public CodeSystem setValueSet(String value) { 4503 if (Utilities.noString(value)) 4504 this.valueSet = null; 4505 else { 4506 if (this.valueSet == null) 4507 this.valueSet = new CanonicalType(); 4508 this.valueSet.setValue(value); 4509 } 4510 return this; 4511 } 4512 4513 /** 4514 * @return {@link #hierarchyMeaning} (The meaning of the hierarchy of concepts 4515 * as represented in this resource.). This is the underlying object with 4516 * id, value and extensions. The accessor "getHierarchyMeaning" gives 4517 * direct access to the value 4518 */ 4519 public Enumeration<CodeSystemHierarchyMeaning> getHierarchyMeaningElement() { 4520 if (this.hierarchyMeaning == null) 4521 if (Configuration.errorOnAutoCreate()) 4522 throw new Error("Attempt to auto-create CodeSystem.hierarchyMeaning"); 4523 else if (Configuration.doAutoCreate()) 4524 this.hierarchyMeaning = new Enumeration<CodeSystemHierarchyMeaning>( 4525 new CodeSystemHierarchyMeaningEnumFactory()); // bb 4526 return this.hierarchyMeaning; 4527 } 4528 4529 public boolean hasHierarchyMeaningElement() { 4530 return this.hierarchyMeaning != null && !this.hierarchyMeaning.isEmpty(); 4531 } 4532 4533 public boolean hasHierarchyMeaning() { 4534 return this.hierarchyMeaning != null && !this.hierarchyMeaning.isEmpty(); 4535 } 4536 4537 /** 4538 * @param value {@link #hierarchyMeaning} (The meaning of the hierarchy of 4539 * concepts as represented in this resource.). This is the 4540 * underlying object with id, value and extensions. The accessor 4541 * "getHierarchyMeaning" gives direct access to the value 4542 */ 4543 public CodeSystem setHierarchyMeaningElement(Enumeration<CodeSystemHierarchyMeaning> value) { 4544 this.hierarchyMeaning = value; 4545 return this; 4546 } 4547 4548 /** 4549 * @return The meaning of the hierarchy of concepts as represented in this 4550 * resource. 4551 */ 4552 public CodeSystemHierarchyMeaning getHierarchyMeaning() { 4553 return this.hierarchyMeaning == null ? null : this.hierarchyMeaning.getValue(); 4554 } 4555 4556 /** 4557 * @param value The meaning of the hierarchy of concepts as represented in this 4558 * resource. 4559 */ 4560 public CodeSystem setHierarchyMeaning(CodeSystemHierarchyMeaning value) { 4561 if (value == null) 4562 this.hierarchyMeaning = null; 4563 else { 4564 if (this.hierarchyMeaning == null) 4565 this.hierarchyMeaning = new Enumeration<CodeSystemHierarchyMeaning>( 4566 new CodeSystemHierarchyMeaningEnumFactory()); 4567 this.hierarchyMeaning.setValue(value); 4568 } 4569 return this; 4570 } 4571 4572 /** 4573 * @return {@link #compositional} (The code system defines a compositional 4574 * (post-coordination) grammar.). This is the underlying object with id, 4575 * value and extensions. The accessor "getCompositional" gives direct 4576 * access to the value 4577 */ 4578 public BooleanType getCompositionalElement() { 4579 if (this.compositional == null) 4580 if (Configuration.errorOnAutoCreate()) 4581 throw new Error("Attempt to auto-create CodeSystem.compositional"); 4582 else if (Configuration.doAutoCreate()) 4583 this.compositional = new BooleanType(); // bb 4584 return this.compositional; 4585 } 4586 4587 public boolean hasCompositionalElement() { 4588 return this.compositional != null && !this.compositional.isEmpty(); 4589 } 4590 4591 public boolean hasCompositional() { 4592 return this.compositional != null && !this.compositional.isEmpty(); 4593 } 4594 4595 /** 4596 * @param value {@link #compositional} (The code system defines a compositional 4597 * (post-coordination) grammar.). This is the underlying object 4598 * with id, value and extensions. The accessor "getCompositional" 4599 * gives direct access to the value 4600 */ 4601 public CodeSystem setCompositionalElement(BooleanType value) { 4602 this.compositional = value; 4603 return this; 4604 } 4605 4606 /** 4607 * @return The code system defines a compositional (post-coordination) grammar. 4608 */ 4609 public boolean getCompositional() { 4610 return this.compositional == null || this.compositional.isEmpty() ? false : this.compositional.getValue(); 4611 } 4612 4613 /** 4614 * @param value The code system defines a compositional (post-coordination) 4615 * grammar. 4616 */ 4617 public CodeSystem setCompositional(boolean value) { 4618 if (this.compositional == null) 4619 this.compositional = new BooleanType(); 4620 this.compositional.setValue(value); 4621 return this; 4622 } 4623 4624 /** 4625 * @return {@link #versionNeeded} (This flag is used to signify that the code 4626 * system does not commit to concept permanence across versions. If 4627 * true, a version must be specified when referencing this code 4628 * system.). This is the underlying object with id, value and 4629 * extensions. The accessor "getVersionNeeded" gives direct access to 4630 * the value 4631 */ 4632 public BooleanType getVersionNeededElement() { 4633 if (this.versionNeeded == null) 4634 if (Configuration.errorOnAutoCreate()) 4635 throw new Error("Attempt to auto-create CodeSystem.versionNeeded"); 4636 else if (Configuration.doAutoCreate()) 4637 this.versionNeeded = new BooleanType(); // bb 4638 return this.versionNeeded; 4639 } 4640 4641 public boolean hasVersionNeededElement() { 4642 return this.versionNeeded != null && !this.versionNeeded.isEmpty(); 4643 } 4644 4645 public boolean hasVersionNeeded() { 4646 return this.versionNeeded != null && !this.versionNeeded.isEmpty(); 4647 } 4648 4649 /** 4650 * @param value {@link #versionNeeded} (This flag is used to signify that the 4651 * code system does not commit to concept permanence across 4652 * versions. If true, a version must be specified when referencing 4653 * this code system.). This is the underlying object with id, value 4654 * and extensions. The accessor "getVersionNeeded" gives direct 4655 * access to the value 4656 */ 4657 public CodeSystem setVersionNeededElement(BooleanType value) { 4658 this.versionNeeded = value; 4659 return this; 4660 } 4661 4662 /** 4663 * @return This flag is used to signify that the code system does not commit to 4664 * concept permanence across versions. If true, a version must be 4665 * specified when referencing this code system. 4666 */ 4667 public boolean getVersionNeeded() { 4668 return this.versionNeeded == null || this.versionNeeded.isEmpty() ? false : this.versionNeeded.getValue(); 4669 } 4670 4671 /** 4672 * @param value This flag is used to signify that the code system does not 4673 * commit to concept permanence across versions. If true, a version 4674 * must be specified when referencing this code system. 4675 */ 4676 public CodeSystem setVersionNeeded(boolean value) { 4677 if (this.versionNeeded == null) 4678 this.versionNeeded = new BooleanType(); 4679 this.versionNeeded.setValue(value); 4680 return this; 4681 } 4682 4683 /** 4684 * @return {@link #content} (The extent of the content of the code system (the 4685 * concepts and codes it defines) are represented in this resource 4686 * instance.). This is the underlying object with id, value and 4687 * extensions. The accessor "getContent" gives direct access to the 4688 * value 4689 */ 4690 public Enumeration<CodeSystemContentMode> getContentElement() { 4691 if (this.content == null) 4692 if (Configuration.errorOnAutoCreate()) 4693 throw new Error("Attempt to auto-create CodeSystem.content"); 4694 else if (Configuration.doAutoCreate()) 4695 this.content = new Enumeration<CodeSystemContentMode>(new CodeSystemContentModeEnumFactory()); // bb 4696 return this.content; 4697 } 4698 4699 public boolean hasContentElement() { 4700 return this.content != null && !this.content.isEmpty(); 4701 } 4702 4703 public boolean hasContent() { 4704 return this.content != null && !this.content.isEmpty(); 4705 } 4706 4707 /** 4708 * @param value {@link #content} (The extent of the content of the code system 4709 * (the concepts and codes it defines) are represented in this 4710 * resource instance.). This is the underlying object with id, 4711 * value and extensions. The accessor "getContent" gives direct 4712 * access to the value 4713 */ 4714 public CodeSystem setContentElement(Enumeration<CodeSystemContentMode> value) { 4715 this.content = value; 4716 return this; 4717 } 4718 4719 /** 4720 * @return The extent of the content of the code system (the concepts and codes 4721 * it defines) are represented in this resource instance. 4722 */ 4723 public CodeSystemContentMode getContent() { 4724 return this.content == null ? null : this.content.getValue(); 4725 } 4726 4727 /** 4728 * @param value The extent of the content of the code system (the concepts and 4729 * codes it defines) are represented in this resource instance. 4730 */ 4731 public CodeSystem setContent(CodeSystemContentMode value) { 4732 if (this.content == null) 4733 this.content = new Enumeration<CodeSystemContentMode>(new CodeSystemContentModeEnumFactory()); 4734 this.content.setValue(value); 4735 return this; 4736 } 4737 4738 /** 4739 * @return {@link #supplements} (The canonical URL of the code system that this 4740 * code system supplement is adding designations and properties to.). 4741 * This is the underlying object with id, value and extensions. The 4742 * accessor "getSupplements" gives direct access to the value 4743 */ 4744 public CanonicalType getSupplementsElement() { 4745 if (this.supplements == null) 4746 if (Configuration.errorOnAutoCreate()) 4747 throw new Error("Attempt to auto-create CodeSystem.supplements"); 4748 else if (Configuration.doAutoCreate()) 4749 this.supplements = new CanonicalType(); // bb 4750 return this.supplements; 4751 } 4752 4753 public boolean hasSupplementsElement() { 4754 return this.supplements != null && !this.supplements.isEmpty(); 4755 } 4756 4757 public boolean hasSupplements() { 4758 return this.supplements != null && !this.supplements.isEmpty(); 4759 } 4760 4761 /** 4762 * @param value {@link #supplements} (The canonical URL of the code system that 4763 * this code system supplement is adding designations and 4764 * properties to.). This is the underlying object with id, value 4765 * and extensions. The accessor "getSupplements" gives direct 4766 * access to the value 4767 */ 4768 public CodeSystem setSupplementsElement(CanonicalType value) { 4769 this.supplements = value; 4770 return this; 4771 } 4772 4773 /** 4774 * @return The canonical URL of the code system that this code system supplement 4775 * is adding designations and properties to. 4776 */ 4777 public String getSupplements() { 4778 return this.supplements == null ? null : this.supplements.getValue(); 4779 } 4780 4781 /** 4782 * @param value The canonical URL of the code system that this code system 4783 * supplement is adding designations and properties to. 4784 */ 4785 public CodeSystem setSupplements(String value) { 4786 if (Utilities.noString(value)) 4787 this.supplements = null; 4788 else { 4789 if (this.supplements == null) 4790 this.supplements = new CanonicalType(); 4791 this.supplements.setValue(value); 4792 } 4793 return this; 4794 } 4795 4796 /** 4797 * @return {@link #count} (The total number of concepts defined by the code 4798 * system. Where the code system has a compositional grammar, the basis 4799 * of this count is defined by the system steward.). This is the 4800 * underlying object with id, value and extensions. The accessor 4801 * "getCount" gives direct access to the value 4802 */ 4803 public UnsignedIntType getCountElement() { 4804 if (this.count == null) 4805 if (Configuration.errorOnAutoCreate()) 4806 throw new Error("Attempt to auto-create CodeSystem.count"); 4807 else if (Configuration.doAutoCreate()) 4808 this.count = new UnsignedIntType(); // bb 4809 return this.count; 4810 } 4811 4812 public boolean hasCountElement() { 4813 return this.count != null && !this.count.isEmpty(); 4814 } 4815 4816 public boolean hasCount() { 4817 return this.count != null && !this.count.isEmpty(); 4818 } 4819 4820 /** 4821 * @param value {@link #count} (The total number of concepts defined by the code 4822 * system. Where the code system has a compositional grammar, the 4823 * basis of this count is defined by the system steward.). This is 4824 * the underlying object with id, value and extensions. The 4825 * accessor "getCount" gives direct access to the value 4826 */ 4827 public CodeSystem setCountElement(UnsignedIntType value) { 4828 this.count = value; 4829 return this; 4830 } 4831 4832 /** 4833 * @return The total number of concepts defined by the code system. Where the 4834 * code system has a compositional grammar, the basis of this count is 4835 * defined by the system steward. 4836 */ 4837 public int getCount() { 4838 return this.count == null || this.count.isEmpty() ? 0 : this.count.getValue(); 4839 } 4840 4841 /** 4842 * @param value The total number of concepts defined by the code system. Where 4843 * the code system has a compositional grammar, the basis of this 4844 * count is defined by the system steward. 4845 */ 4846 public CodeSystem setCount(int value) { 4847 if (this.count == null) 4848 this.count = new UnsignedIntType(); 4849 this.count.setValue(value); 4850 return this; 4851 } 4852 4853 /** 4854 * @return {@link #filter} (A filter that can be used in a value set compose 4855 * statement when selecting concepts using a filter.) 4856 */ 4857 public List<CodeSystemFilterComponent> getFilter() { 4858 if (this.filter == null) 4859 this.filter = new ArrayList<CodeSystemFilterComponent>(); 4860 return this.filter; 4861 } 4862 4863 /** 4864 * @return Returns a reference to <code>this</code> for easy method chaining 4865 */ 4866 public CodeSystem setFilter(List<CodeSystemFilterComponent> theFilter) { 4867 this.filter = theFilter; 4868 return this; 4869 } 4870 4871 public boolean hasFilter() { 4872 if (this.filter == null) 4873 return false; 4874 for (CodeSystemFilterComponent item : this.filter) 4875 if (!item.isEmpty()) 4876 return true; 4877 return false; 4878 } 4879 4880 public CodeSystemFilterComponent addFilter() { // 3 4881 CodeSystemFilterComponent t = new CodeSystemFilterComponent(); 4882 if (this.filter == null) 4883 this.filter = new ArrayList<CodeSystemFilterComponent>(); 4884 this.filter.add(t); 4885 return t; 4886 } 4887 4888 public CodeSystem addFilter(CodeSystemFilterComponent t) { // 3 4889 if (t == null) 4890 return this; 4891 if (this.filter == null) 4892 this.filter = new ArrayList<CodeSystemFilterComponent>(); 4893 this.filter.add(t); 4894 return this; 4895 } 4896 4897 /** 4898 * @return The first repetition of repeating field {@link #filter}, creating it 4899 * if it does not already exist 4900 */ 4901 public CodeSystemFilterComponent getFilterFirstRep() { 4902 if (getFilter().isEmpty()) { 4903 addFilter(); 4904 } 4905 return getFilter().get(0); 4906 } 4907 4908 /** 4909 * @return {@link #property} (A property defines an additional slot through 4910 * which additional information can be provided about a concept.) 4911 */ 4912 public List<PropertyComponent> getProperty() { 4913 if (this.property == null) 4914 this.property = new ArrayList<PropertyComponent>(); 4915 return this.property; 4916 } 4917 4918 /** 4919 * @return Returns a reference to <code>this</code> for easy method chaining 4920 */ 4921 public CodeSystem setProperty(List<PropertyComponent> theProperty) { 4922 this.property = theProperty; 4923 return this; 4924 } 4925 4926 public boolean hasProperty() { 4927 if (this.property == null) 4928 return false; 4929 for (PropertyComponent item : this.property) 4930 if (!item.isEmpty()) 4931 return true; 4932 return false; 4933 } 4934 4935 public PropertyComponent addProperty() { // 3 4936 PropertyComponent t = new PropertyComponent(); 4937 if (this.property == null) 4938 this.property = new ArrayList<PropertyComponent>(); 4939 this.property.add(t); 4940 return t; 4941 } 4942 4943 public CodeSystem addProperty(PropertyComponent t) { // 3 4944 if (t == null) 4945 return this; 4946 if (this.property == null) 4947 this.property = new ArrayList<PropertyComponent>(); 4948 this.property.add(t); 4949 return this; 4950 } 4951 4952 /** 4953 * @return The first repetition of repeating field {@link #property}, creating 4954 * it if it does not already exist 4955 */ 4956 public PropertyComponent getPropertyFirstRep() { 4957 if (getProperty().isEmpty()) { 4958 addProperty(); 4959 } 4960 return getProperty().get(0); 4961 } 4962 4963 /** 4964 * @return {@link #concept} (Concepts that are in the code system. The concept 4965 * definitions are inherently hierarchical, but the definitions must be 4966 * consulted to determine what the meanings of the hierarchical 4967 * relationships are.) 4968 */ 4969 public List<ConceptDefinitionComponent> getConcept() { 4970 if (this.concept == null) 4971 this.concept = new ArrayList<ConceptDefinitionComponent>(); 4972 return this.concept; 4973 } 4974 4975 /** 4976 * @return Returns a reference to <code>this</code> for easy method chaining 4977 */ 4978 public CodeSystem setConcept(List<ConceptDefinitionComponent> theConcept) { 4979 this.concept = theConcept; 4980 return this; 4981 } 4982 4983 public boolean hasConcept() { 4984 if (this.concept == null) 4985 return false; 4986 for (ConceptDefinitionComponent item : this.concept) 4987 if (!item.isEmpty()) 4988 return true; 4989 return false; 4990 } 4991 4992 public ConceptDefinitionComponent addConcept() { // 3 4993 ConceptDefinitionComponent t = new ConceptDefinitionComponent(); 4994 if (this.concept == null) 4995 this.concept = new ArrayList<ConceptDefinitionComponent>(); 4996 this.concept.add(t); 4997 return t; 4998 } 4999 5000 public CodeSystem addConcept(ConceptDefinitionComponent t) { // 3 5001 if (t == null) 5002 return this; 5003 if (this.concept == null) 5004 this.concept = new ArrayList<ConceptDefinitionComponent>(); 5005 this.concept.add(t); 5006 return this; 5007 } 5008 5009 /** 5010 * @return The first repetition of repeating field {@link #concept}, creating it 5011 * if it does not already exist 5012 */ 5013 public ConceptDefinitionComponent getConceptFirstRep() { 5014 if (getConcept().isEmpty()) { 5015 addConcept(); 5016 } 5017 return getConcept().get(0); 5018 } 5019 5020 protected void listChildren(List<Property> children) { 5021 super.listChildren(children); 5022 children.add(new Property("url", "uri", 5023 "An absolute URI that is used to identify this code system 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 code system is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the code system is stored on different servers. This is used in [Coding](datatypes.html#Coding).system.", 5024 0, 1, url)); 5025 children.add(new Property("identifier", "Identifier", 5026 "A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance.", 5027 0, java.lang.Integer.MAX_VALUE, identifier)); 5028 children.add(new Property("version", "string", 5029 "The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system 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. This is used in [Coding](datatypes.html#Coding).version.", 5030 0, 1, version)); 5031 children.add(new Property("name", "string", 5032 "A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 5033 0, 1, name)); 5034 children.add( 5035 new Property("title", "string", "A short, descriptive, user-friendly title for the code system.", 0, 1, title)); 5036 children.add(new Property("status", "code", 5037 "The date (and optionally time) when the code system resource was created or revised.", 0, 1, status)); 5038 children.add(new Property("experimental", "boolean", 5039 "A Boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 5040 0, 1, experimental)); 5041 children.add(new Property("date", "dateTime", 5042 "The date (and optionally time) when the code system 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 code system changes.", 5043 0, 1, date)); 5044 children.add(new Property("publisher", "string", 5045 "The name of the organization or individual that published the code system.", 0, 1, publisher)); 5046 children.add(new Property("contact", "ContactDetail", 5047 "Contact details to assist a user in finding and communicating with the publisher.", 0, 5048 java.lang.Integer.MAX_VALUE, contact)); 5049 children.add(new Property("description", "markdown", 5050 "A free text natural language description of the code system from a consumer's perspective.", 0, 1, 5051 description)); 5052 children.add(new Property("useContext", "UsageContext", 5053 "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 code system instances.", 5054 0, java.lang.Integer.MAX_VALUE, useContext)); 5055 children.add(new Property("jurisdiction", "CodeableConcept", 5056 "A legal or geographic region in which the code system is intended to be used.", 0, java.lang.Integer.MAX_VALUE, 5057 jurisdiction)); 5058 children.add(new Property("purpose", "markdown", 5059 "Explanation of why this code system is needed and why it has been designed as it has.", 0, 1, purpose)); 5060 children.add(new Property("copyright", "markdown", 5061 "A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system.", 5062 0, 1, copyright)); 5063 children.add(new Property("caseSensitive", "boolean", 5064 "If code comparison is case sensitive when codes within this system are compared to each other.", 0, 1, 5065 caseSensitive)); 5066 children.add(new Property("valueSet", "canonical(ValueSet)", 5067 "Canonical reference to the value set that contains the entire code system.", 0, 1, valueSet)); 5068 children.add(new Property("hierarchyMeaning", "code", 5069 "The meaning of the hierarchy of concepts as represented in this resource.", 0, 1, hierarchyMeaning)); 5070 children.add(new Property("compositional", "boolean", 5071 "The code system defines a compositional (post-coordination) grammar.", 0, 1, compositional)); 5072 children.add(new Property("versionNeeded", "boolean", 5073 "This flag is used to signify that the code system does not commit to concept permanence across versions. If true, a version must be specified when referencing this code system.", 5074 0, 1, versionNeeded)); 5075 children.add(new Property("content", "code", 5076 "The extent of the content of the code system (the concepts and codes it defines) are represented in this resource instance.", 5077 0, 1, content)); 5078 children.add(new Property("supplements", "canonical(CodeSystem)", 5079 "The canonical URL of the code system that this code system supplement is adding designations and properties to.", 5080 0, 1, supplements)); 5081 children.add(new Property("count", "unsignedInt", 5082 "The total number of concepts defined by the code system. Where the code system has a compositional grammar, the basis of this count is defined by the system steward.", 5083 0, 1, count)); 5084 children.add(new Property("filter", "", 5085 "A filter that can be used in a value set compose statement when selecting concepts using a filter.", 0, 5086 java.lang.Integer.MAX_VALUE, filter)); 5087 children.add(new Property("property", "", 5088 "A property defines an additional slot through which additional information can be provided about a concept.", 5089 0, java.lang.Integer.MAX_VALUE, property)); 5090 children.add(new Property("concept", "", 5091 "Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meanings of the hierarchical relationships are.", 5092 0, java.lang.Integer.MAX_VALUE, concept)); 5093 } 5094 5095 @Override 5096 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 5097 switch (_hash) { 5098 case 116079: 5099 /* url */ return new Property("url", "uri", 5100 "An absolute URI that is used to identify this code system 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 code system is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the code system is stored on different servers. This is used in [Coding](datatypes.html#Coding).system.", 5101 0, 1, url); 5102 case -1618432855: 5103 /* identifier */ return new Property("identifier", "Identifier", 5104 "A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance.", 5105 0, java.lang.Integer.MAX_VALUE, identifier); 5106 case 351608024: 5107 /* version */ return new Property("version", "string", 5108 "The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system 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. This is used in [Coding](datatypes.html#Coding).version.", 5109 0, 1, version); 5110 case 3373707: 5111 /* name */ return new Property("name", "string", 5112 "A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 5113 0, 1, name); 5114 case 110371416: 5115 /* title */ return new Property("title", "string", 5116 "A short, descriptive, user-friendly title for the code system.", 0, 1, title); 5117 case -892481550: 5118 /* status */ return new Property("status", "code", 5119 "The date (and optionally time) when the code system resource was created or revised.", 0, 1, status); 5120 case -404562712: 5121 /* experimental */ return new Property("experimental", "boolean", 5122 "A Boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 5123 0, 1, experimental); 5124 case 3076014: 5125 /* date */ return new Property("date", "dateTime", 5126 "The date (and optionally time) when the code system 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 code system changes.", 5127 0, 1, date); 5128 case 1447404028: 5129 /* publisher */ return new Property("publisher", "string", 5130 "The name of the organization or individual that published the code system.", 0, 1, publisher); 5131 case 951526432: 5132 /* contact */ return new Property("contact", "ContactDetail", 5133 "Contact details to assist a user in finding and communicating with the publisher.", 0, 5134 java.lang.Integer.MAX_VALUE, contact); 5135 case -1724546052: 5136 /* description */ return new Property("description", "markdown", 5137 "A free text natural language description of the code system from a consumer's perspective.", 0, 1, 5138 description); 5139 case -669707736: 5140 /* useContext */ return new Property("useContext", "UsageContext", 5141 "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 code system instances.", 5142 0, java.lang.Integer.MAX_VALUE, useContext); 5143 case -507075711: 5144 /* jurisdiction */ return new Property("jurisdiction", "CodeableConcept", 5145 "A legal or geographic region in which the code system is intended to be used.", 0, 5146 java.lang.Integer.MAX_VALUE, jurisdiction); 5147 case -220463842: 5148 /* purpose */ return new Property("purpose", "markdown", 5149 "Explanation of why this code system is needed and why it has been designed as it has.", 0, 1, purpose); 5150 case 1522889671: 5151 /* copyright */ return new Property("copyright", "markdown", 5152 "A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system.", 5153 0, 1, copyright); 5154 case -35616442: 5155 /* caseSensitive */ return new Property("caseSensitive", "boolean", 5156 "If code comparison is case sensitive when codes within this system are compared to each other.", 0, 1, 5157 caseSensitive); 5158 case -1410174671: 5159 /* valueSet */ return new Property("valueSet", "canonical(ValueSet)", 5160 "Canonical reference to the value set that contains the entire code system.", 0, 1, valueSet); 5161 case 1913078280: 5162 /* hierarchyMeaning */ return new Property("hierarchyMeaning", "code", 5163 "The meaning of the hierarchy of concepts as represented in this resource.", 0, 1, hierarchyMeaning); 5164 case 1248023381: 5165 /* compositional */ return new Property("compositional", "boolean", 5166 "The code system defines a compositional (post-coordination) grammar.", 0, 1, compositional); 5167 case 617270957: 5168 /* versionNeeded */ return new Property("versionNeeded", "boolean", 5169 "This flag is used to signify that the code system does not commit to concept permanence across versions. If true, a version must be specified when referencing this code system.", 5170 0, 1, versionNeeded); 5171 case 951530617: 5172 /* content */ return new Property("content", "code", 5173 "The extent of the content of the code system (the concepts and codes it defines) are represented in this resource instance.", 5174 0, 1, content); 5175 case -596951334: 5176 /* supplements */ return new Property("supplements", "canonical(CodeSystem)", 5177 "The canonical URL of the code system that this code system supplement is adding designations and properties to.", 5178 0, 1, supplements); 5179 case 94851343: 5180 /* count */ return new Property("count", "unsignedInt", 5181 "The total number of concepts defined by the code system. Where the code system has a compositional grammar, the basis of this count is defined by the system steward.", 5182 0, 1, count); 5183 case -1274492040: 5184 /* filter */ return new Property("filter", "", 5185 "A filter that can be used in a value set compose statement when selecting concepts using a filter.", 0, 5186 java.lang.Integer.MAX_VALUE, filter); 5187 case -993141291: 5188 /* property */ return new Property("property", "", 5189 "A property defines an additional slot through which additional information can be provided about a concept.", 5190 0, java.lang.Integer.MAX_VALUE, property); 5191 case 951024232: 5192 /* concept */ return new Property("concept", "", 5193 "Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meanings of the hierarchical relationships are.", 5194 0, java.lang.Integer.MAX_VALUE, concept); 5195 default: 5196 return super.getNamedProperty(_hash, _name, _checkValid); 5197 } 5198 5199 } 5200 5201 @Override 5202 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 5203 switch (hash) { 5204 case 116079: 5205 /* url */ return this.url == null ? new Base[0] : new Base[] { this.url }; // UriType 5206 case -1618432855: 5207 /* identifier */ return this.identifier == null ? new Base[0] 5208 : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 5209 case 351608024: 5210 /* version */ return this.version == null ? new Base[0] : new Base[] { this.version }; // StringType 5211 case 3373707: 5212 /* name */ return this.name == null ? new Base[0] : new Base[] { this.name }; // StringType 5213 case 110371416: 5214 /* title */ return this.title == null ? new Base[0] : new Base[] { this.title }; // StringType 5215 case -892481550: 5216 /* status */ return this.status == null ? new Base[0] : new Base[] { this.status }; // Enumeration<PublicationStatus> 5217 case -404562712: 5218 /* experimental */ return this.experimental == null ? new Base[0] : new Base[] { this.experimental }; // BooleanType 5219 case 3076014: 5220 /* date */ return this.date == null ? new Base[0] : new Base[] { this.date }; // DateTimeType 5221 case 1447404028: 5222 /* publisher */ return this.publisher == null ? new Base[0] : new Base[] { this.publisher }; // StringType 5223 case 951526432: 5224 /* contact */ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail 5225 case -1724546052: 5226 /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // MarkdownType 5227 case -669707736: 5228 /* useContext */ return this.useContext == null ? new Base[0] 5229 : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext 5230 case -507075711: 5231 /* jurisdiction */ return this.jurisdiction == null ? new Base[0] 5232 : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept 5233 case -220463842: 5234 /* purpose */ return this.purpose == null ? new Base[0] : new Base[] { this.purpose }; // MarkdownType 5235 case 1522889671: 5236 /* copyright */ return this.copyright == null ? new Base[0] : new Base[] { this.copyright }; // MarkdownType 5237 case -35616442: 5238 /* caseSensitive */ return this.caseSensitive == null ? new Base[0] : new Base[] { this.caseSensitive }; // BooleanType 5239 case -1410174671: 5240 /* valueSet */ return this.valueSet == null ? new Base[0] : new Base[] { this.valueSet }; // CanonicalType 5241 case 1913078280: 5242 /* hierarchyMeaning */ return this.hierarchyMeaning == null ? new Base[0] : new Base[] { this.hierarchyMeaning }; // Enumeration<CodeSystemHierarchyMeaning> 5243 case 1248023381: 5244 /* compositional */ return this.compositional == null ? new Base[0] : new Base[] { this.compositional }; // BooleanType 5245 case 617270957: 5246 /* versionNeeded */ return this.versionNeeded == null ? new Base[0] : new Base[] { this.versionNeeded }; // BooleanType 5247 case 951530617: 5248 /* content */ return this.content == null ? new Base[0] : new Base[] { this.content }; // Enumeration<CodeSystemContentMode> 5249 case -596951334: 5250 /* supplements */ return this.supplements == null ? new Base[0] : new Base[] { this.supplements }; // CanonicalType 5251 case 94851343: 5252 /* count */ return this.count == null ? new Base[0] : new Base[] { this.count }; // UnsignedIntType 5253 case -1274492040: 5254 /* filter */ return this.filter == null ? new Base[0] : this.filter.toArray(new Base[this.filter.size()]); // CodeSystemFilterComponent 5255 case -993141291: 5256 /* property */ return this.property == null ? new Base[0] : this.property.toArray(new Base[this.property.size()]); // PropertyComponent 5257 case 951024232: 5258 /* concept */ return this.concept == null ? new Base[0] : this.concept.toArray(new Base[this.concept.size()]); // ConceptDefinitionComponent 5259 default: 5260 return super.getProperty(hash, name, checkValid); 5261 } 5262 5263 } 5264 5265 @Override 5266 public Base setProperty(int hash, String name, Base value) throws FHIRException { 5267 switch (hash) { 5268 case 116079: // url 5269 this.url = castToUri(value); // UriType 5270 return value; 5271 case -1618432855: // identifier 5272 this.getIdentifier().add(castToIdentifier(value)); // Identifier 5273 return value; 5274 case 351608024: // version 5275 this.version = castToString(value); // StringType 5276 return value; 5277 case 3373707: // name 5278 this.name = castToString(value); // StringType 5279 return value; 5280 case 110371416: // title 5281 this.title = castToString(value); // StringType 5282 return value; 5283 case -892481550: // status 5284 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 5285 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 5286 return value; 5287 case -404562712: // experimental 5288 this.experimental = castToBoolean(value); // BooleanType 5289 return value; 5290 case 3076014: // date 5291 this.date = castToDateTime(value); // DateTimeType 5292 return value; 5293 case 1447404028: // publisher 5294 this.publisher = castToString(value); // StringType 5295 return value; 5296 case 951526432: // contact 5297 this.getContact().add(castToContactDetail(value)); // ContactDetail 5298 return value; 5299 case -1724546052: // description 5300 this.description = castToMarkdown(value); // MarkdownType 5301 return value; 5302 case -669707736: // useContext 5303 this.getUseContext().add(castToUsageContext(value)); // UsageContext 5304 return value; 5305 case -507075711: // jurisdiction 5306 this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept 5307 return value; 5308 case -220463842: // purpose 5309 this.purpose = castToMarkdown(value); // MarkdownType 5310 return value; 5311 case 1522889671: // copyright 5312 this.copyright = castToMarkdown(value); // MarkdownType 5313 return value; 5314 case -35616442: // caseSensitive 5315 this.caseSensitive = castToBoolean(value); // BooleanType 5316 return value; 5317 case -1410174671: // valueSet 5318 this.valueSet = castToCanonical(value); // CanonicalType 5319 return value; 5320 case 1913078280: // hierarchyMeaning 5321 value = new CodeSystemHierarchyMeaningEnumFactory().fromType(castToCode(value)); 5322 this.hierarchyMeaning = (Enumeration) value; // Enumeration<CodeSystemHierarchyMeaning> 5323 return value; 5324 case 1248023381: // compositional 5325 this.compositional = castToBoolean(value); // BooleanType 5326 return value; 5327 case 617270957: // versionNeeded 5328 this.versionNeeded = castToBoolean(value); // BooleanType 5329 return value; 5330 case 951530617: // content 5331 value = new CodeSystemContentModeEnumFactory().fromType(castToCode(value)); 5332 this.content = (Enumeration) value; // Enumeration<CodeSystemContentMode> 5333 return value; 5334 case -596951334: // supplements 5335 this.supplements = castToCanonical(value); // CanonicalType 5336 return value; 5337 case 94851343: // count 5338 this.count = castToUnsignedInt(value); // UnsignedIntType 5339 return value; 5340 case -1274492040: // filter 5341 this.getFilter().add((CodeSystemFilterComponent) value); // CodeSystemFilterComponent 5342 return value; 5343 case -993141291: // property 5344 this.getProperty().add((PropertyComponent) value); // PropertyComponent 5345 return value; 5346 case 951024232: // concept 5347 this.getConcept().add((ConceptDefinitionComponent) value); // ConceptDefinitionComponent 5348 return value; 5349 default: 5350 return super.setProperty(hash, name, value); 5351 } 5352 5353 } 5354 5355 @Override 5356 public Base setProperty(String name, Base value) throws FHIRException { 5357 if (name.equals("url")) { 5358 this.url = castToUri(value); // UriType 5359 } else if (name.equals("identifier")) { 5360 this.getIdentifier().add(castToIdentifier(value)); 5361 } else if (name.equals("version")) { 5362 this.version = castToString(value); // StringType 5363 } else if (name.equals("name")) { 5364 this.name = castToString(value); // StringType 5365 } else if (name.equals("title")) { 5366 this.title = castToString(value); // StringType 5367 } else if (name.equals("status")) { 5368 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 5369 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 5370 } else if (name.equals("experimental")) { 5371 this.experimental = castToBoolean(value); // BooleanType 5372 } else if (name.equals("date")) { 5373 this.date = castToDateTime(value); // DateTimeType 5374 } else if (name.equals("publisher")) { 5375 this.publisher = castToString(value); // StringType 5376 } else if (name.equals("contact")) { 5377 this.getContact().add(castToContactDetail(value)); 5378 } else if (name.equals("description")) { 5379 this.description = castToMarkdown(value); // MarkdownType 5380 } else if (name.equals("useContext")) { 5381 this.getUseContext().add(castToUsageContext(value)); 5382 } else if (name.equals("jurisdiction")) { 5383 this.getJurisdiction().add(castToCodeableConcept(value)); 5384 } else if (name.equals("purpose")) { 5385 this.purpose = castToMarkdown(value); // MarkdownType 5386 } else if (name.equals("copyright")) { 5387 this.copyright = castToMarkdown(value); // MarkdownType 5388 } else if (name.equals("caseSensitive")) { 5389 this.caseSensitive = castToBoolean(value); // BooleanType 5390 } else if (name.equals("valueSet")) { 5391 this.valueSet = castToCanonical(value); // CanonicalType 5392 } else if (name.equals("hierarchyMeaning")) { 5393 value = new CodeSystemHierarchyMeaningEnumFactory().fromType(castToCode(value)); 5394 this.hierarchyMeaning = (Enumeration) value; // Enumeration<CodeSystemHierarchyMeaning> 5395 } else if (name.equals("compositional")) { 5396 this.compositional = castToBoolean(value); // BooleanType 5397 } else if (name.equals("versionNeeded")) { 5398 this.versionNeeded = castToBoolean(value); // BooleanType 5399 } else if (name.equals("content")) { 5400 value = new CodeSystemContentModeEnumFactory().fromType(castToCode(value)); 5401 this.content = (Enumeration) value; // Enumeration<CodeSystemContentMode> 5402 } else if (name.equals("supplements")) { 5403 this.supplements = castToCanonical(value); // CanonicalType 5404 } else if (name.equals("count")) { 5405 this.count = castToUnsignedInt(value); // UnsignedIntType 5406 } else if (name.equals("filter")) { 5407 this.getFilter().add((CodeSystemFilterComponent) value); 5408 } else if (name.equals("property")) { 5409 this.getProperty().add((PropertyComponent) value); 5410 } else if (name.equals("concept")) { 5411 this.getConcept().add((ConceptDefinitionComponent) value); 5412 } else 5413 return super.setProperty(name, value); 5414 return value; 5415 } 5416 5417 @Override 5418 public void removeChild(String name, Base value) throws FHIRException { 5419 if (name.equals("url")) { 5420 this.url = null; 5421 } else if (name.equals("identifier")) { 5422 this.getIdentifier().remove(castToIdentifier(value)); 5423 } else if (name.equals("version")) { 5424 this.version = null; 5425 } else if (name.equals("name")) { 5426 this.name = null; 5427 } else if (name.equals("title")) { 5428 this.title = null; 5429 } else if (name.equals("status")) { 5430 this.status = null; 5431 } else if (name.equals("experimental")) { 5432 this.experimental = null; 5433 } else if (name.equals("date")) { 5434 this.date = null; 5435 } else if (name.equals("publisher")) { 5436 this.publisher = null; 5437 } else if (name.equals("contact")) { 5438 this.getContact().remove(castToContactDetail(value)); 5439 } else if (name.equals("description")) { 5440 this.description = null; 5441 } else if (name.equals("useContext")) { 5442 this.getUseContext().remove(castToUsageContext(value)); 5443 } else if (name.equals("jurisdiction")) { 5444 this.getJurisdiction().remove(castToCodeableConcept(value)); 5445 } else if (name.equals("purpose")) { 5446 this.purpose = null; 5447 } else if (name.equals("copyright")) { 5448 this.copyright = null; 5449 } else if (name.equals("caseSensitive")) { 5450 this.caseSensitive = null; 5451 } else if (name.equals("valueSet")) { 5452 this.valueSet = null; 5453 } else if (name.equals("hierarchyMeaning")) { 5454 this.hierarchyMeaning = null; 5455 } else if (name.equals("compositional")) { 5456 this.compositional = null; 5457 } else if (name.equals("versionNeeded")) { 5458 this.versionNeeded = null; 5459 } else if (name.equals("content")) { 5460 this.content = null; 5461 } else if (name.equals("supplements")) { 5462 this.supplements = null; 5463 } else if (name.equals("count")) { 5464 this.count = null; 5465 } else if (name.equals("filter")) { 5466 this.getFilter().remove((CodeSystemFilterComponent) value); 5467 } else if (name.equals("property")) { 5468 this.getProperty().remove((PropertyComponent) value); 5469 } else if (name.equals("concept")) { 5470 this.getConcept().remove((ConceptDefinitionComponent) value); 5471 } else 5472 super.removeChild(name, value); 5473 5474 } 5475 5476 @Override 5477 public Base makeProperty(int hash, String name) throws FHIRException { 5478 switch (hash) { 5479 case 116079: 5480 return getUrlElement(); 5481 case -1618432855: 5482 return addIdentifier(); 5483 case 351608024: 5484 return getVersionElement(); 5485 case 3373707: 5486 return getNameElement(); 5487 case 110371416: 5488 return getTitleElement(); 5489 case -892481550: 5490 return getStatusElement(); 5491 case -404562712: 5492 return getExperimentalElement(); 5493 case 3076014: 5494 return getDateElement(); 5495 case 1447404028: 5496 return getPublisherElement(); 5497 case 951526432: 5498 return addContact(); 5499 case -1724546052: 5500 return getDescriptionElement(); 5501 case -669707736: 5502 return addUseContext(); 5503 case -507075711: 5504 return addJurisdiction(); 5505 case -220463842: 5506 return getPurposeElement(); 5507 case 1522889671: 5508 return getCopyrightElement(); 5509 case -35616442: 5510 return getCaseSensitiveElement(); 5511 case -1410174671: 5512 return getValueSetElement(); 5513 case 1913078280: 5514 return getHierarchyMeaningElement(); 5515 case 1248023381: 5516 return getCompositionalElement(); 5517 case 617270957: 5518 return getVersionNeededElement(); 5519 case 951530617: 5520 return getContentElement(); 5521 case -596951334: 5522 return getSupplementsElement(); 5523 case 94851343: 5524 return getCountElement(); 5525 case -1274492040: 5526 return addFilter(); 5527 case -993141291: 5528 return addProperty(); 5529 case 951024232: 5530 return addConcept(); 5531 default: 5532 return super.makeProperty(hash, name); 5533 } 5534 5535 } 5536 5537 @Override 5538 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 5539 switch (hash) { 5540 case 116079: 5541 /* url */ return new String[] { "uri" }; 5542 case -1618432855: 5543 /* identifier */ return new String[] { "Identifier" }; 5544 case 351608024: 5545 /* version */ return new String[] { "string" }; 5546 case 3373707: 5547 /* name */ return new String[] { "string" }; 5548 case 110371416: 5549 /* title */ return new String[] { "string" }; 5550 case -892481550: 5551 /* status */ return new String[] { "code" }; 5552 case -404562712: 5553 /* experimental */ return new String[] { "boolean" }; 5554 case 3076014: 5555 /* date */ return new String[] { "dateTime" }; 5556 case 1447404028: 5557 /* publisher */ return new String[] { "string" }; 5558 case 951526432: 5559 /* contact */ return new String[] { "ContactDetail" }; 5560 case -1724546052: 5561 /* description */ return new String[] { "markdown" }; 5562 case -669707736: 5563 /* useContext */ return new String[] { "UsageContext" }; 5564 case -507075711: 5565 /* jurisdiction */ return new String[] { "CodeableConcept" }; 5566 case -220463842: 5567 /* purpose */ return new String[] { "markdown" }; 5568 case 1522889671: 5569 /* copyright */ return new String[] { "markdown" }; 5570 case -35616442: 5571 /* caseSensitive */ return new String[] { "boolean" }; 5572 case -1410174671: 5573 /* valueSet */ return new String[] { "canonical" }; 5574 case 1913078280: 5575 /* hierarchyMeaning */ return new String[] { "code" }; 5576 case 1248023381: 5577 /* compositional */ return new String[] { "boolean" }; 5578 case 617270957: 5579 /* versionNeeded */ return new String[] { "boolean" }; 5580 case 951530617: 5581 /* content */ return new String[] { "code" }; 5582 case -596951334: 5583 /* supplements */ return new String[] { "canonical" }; 5584 case 94851343: 5585 /* count */ return new String[] { "unsignedInt" }; 5586 case -1274492040: 5587 /* filter */ return new String[] {}; 5588 case -993141291: 5589 /* property */ return new String[] {}; 5590 case 951024232: 5591 /* concept */ return new String[] {}; 5592 default: 5593 return super.getTypesForProperty(hash, name); 5594 } 5595 5596 } 5597 5598 @Override 5599 public Base addChild(String name) throws FHIRException { 5600 if (name.equals("url")) { 5601 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.url"); 5602 } else if (name.equals("identifier")) { 5603 return addIdentifier(); 5604 } else if (name.equals("version")) { 5605 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.version"); 5606 } else if (name.equals("name")) { 5607 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.name"); 5608 } else if (name.equals("title")) { 5609 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.title"); 5610 } else if (name.equals("status")) { 5611 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.status"); 5612 } else if (name.equals("experimental")) { 5613 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.experimental"); 5614 } else if (name.equals("date")) { 5615 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.date"); 5616 } else if (name.equals("publisher")) { 5617 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.publisher"); 5618 } else if (name.equals("contact")) { 5619 return addContact(); 5620 } else if (name.equals("description")) { 5621 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.description"); 5622 } else if (name.equals("useContext")) { 5623 return addUseContext(); 5624 } else if (name.equals("jurisdiction")) { 5625 return addJurisdiction(); 5626 } else if (name.equals("purpose")) { 5627 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.purpose"); 5628 } else if (name.equals("copyright")) { 5629 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.copyright"); 5630 } else if (name.equals("caseSensitive")) { 5631 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.caseSensitive"); 5632 } else if (name.equals("valueSet")) { 5633 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.valueSet"); 5634 } else if (name.equals("hierarchyMeaning")) { 5635 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.hierarchyMeaning"); 5636 } else if (name.equals("compositional")) { 5637 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.compositional"); 5638 } else if (name.equals("versionNeeded")) { 5639 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.versionNeeded"); 5640 } else if (name.equals("content")) { 5641 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.content"); 5642 } else if (name.equals("supplements")) { 5643 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.supplements"); 5644 } else if (name.equals("count")) { 5645 throw new FHIRException("Cannot call addChild on a singleton property CodeSystem.count"); 5646 } else if (name.equals("filter")) { 5647 return addFilter(); 5648 } else if (name.equals("property")) { 5649 return addProperty(); 5650 } else if (name.equals("concept")) { 5651 return addConcept(); 5652 } else 5653 return super.addChild(name); 5654 } 5655 5656 public String fhirType() { 5657 return "CodeSystem"; 5658 5659 } 5660 5661 public CodeSystem copy() { 5662 CodeSystem dst = new CodeSystem(); 5663 copyValues(dst); 5664 return dst; 5665 } 5666 5667 public void copyValues(CodeSystem dst) { 5668 super.copyValues(dst); 5669 dst.url = url == null ? null : url.copy(); 5670 if (identifier != null) { 5671 dst.identifier = new ArrayList<Identifier>(); 5672 for (Identifier i : identifier) 5673 dst.identifier.add(i.copy()); 5674 } 5675 ; 5676 dst.version = version == null ? null : version.copy(); 5677 dst.name = name == null ? null : name.copy(); 5678 dst.title = title == null ? null : title.copy(); 5679 dst.status = status == null ? null : status.copy(); 5680 dst.experimental = experimental == null ? null : experimental.copy(); 5681 dst.date = date == null ? null : date.copy(); 5682 dst.publisher = publisher == null ? null : publisher.copy(); 5683 if (contact != null) { 5684 dst.contact = new ArrayList<ContactDetail>(); 5685 for (ContactDetail i : contact) 5686 dst.contact.add(i.copy()); 5687 } 5688 ; 5689 dst.description = description == null ? null : description.copy(); 5690 if (useContext != null) { 5691 dst.useContext = new ArrayList<UsageContext>(); 5692 for (UsageContext i : useContext) 5693 dst.useContext.add(i.copy()); 5694 } 5695 ; 5696 if (jurisdiction != null) { 5697 dst.jurisdiction = new ArrayList<CodeableConcept>(); 5698 for (CodeableConcept i : jurisdiction) 5699 dst.jurisdiction.add(i.copy()); 5700 } 5701 ; 5702 dst.purpose = purpose == null ? null : purpose.copy(); 5703 dst.copyright = copyright == null ? null : copyright.copy(); 5704 dst.caseSensitive = caseSensitive == null ? null : caseSensitive.copy(); 5705 dst.valueSet = valueSet == null ? null : valueSet.copy(); 5706 dst.hierarchyMeaning = hierarchyMeaning == null ? null : hierarchyMeaning.copy(); 5707 dst.compositional = compositional == null ? null : compositional.copy(); 5708 dst.versionNeeded = versionNeeded == null ? null : versionNeeded.copy(); 5709 dst.content = content == null ? null : content.copy(); 5710 dst.supplements = supplements == null ? null : supplements.copy(); 5711 dst.count = count == null ? null : count.copy(); 5712 if (filter != null) { 5713 dst.filter = new ArrayList<CodeSystemFilterComponent>(); 5714 for (CodeSystemFilterComponent i : filter) 5715 dst.filter.add(i.copy()); 5716 } 5717 ; 5718 if (property != null) { 5719 dst.property = new ArrayList<PropertyComponent>(); 5720 for (PropertyComponent i : property) 5721 dst.property.add(i.copy()); 5722 } 5723 ; 5724 if (concept != null) { 5725 dst.concept = new ArrayList<ConceptDefinitionComponent>(); 5726 for (ConceptDefinitionComponent i : concept) 5727 dst.concept.add(i.copy()); 5728 } 5729 ; 5730 } 5731 5732 protected CodeSystem typedCopy() { 5733 return copy(); 5734 } 5735 5736 @Override 5737 public boolean equalsDeep(Base other_) { 5738 if (!super.equalsDeep(other_)) 5739 return false; 5740 if (!(other_ instanceof CodeSystem)) 5741 return false; 5742 CodeSystem o = (CodeSystem) other_; 5743 return compareDeep(identifier, o.identifier, true) && compareDeep(purpose, o.purpose, true) 5744 && compareDeep(copyright, o.copyright, true) && compareDeep(caseSensitive, o.caseSensitive, true) 5745 && compareDeep(valueSet, o.valueSet, true) && compareDeep(hierarchyMeaning, o.hierarchyMeaning, true) 5746 && compareDeep(compositional, o.compositional, true) && compareDeep(versionNeeded, o.versionNeeded, true) 5747 && compareDeep(content, o.content, true) && compareDeep(supplements, o.supplements, true) 5748 && compareDeep(count, o.count, true) && compareDeep(filter, o.filter, true) 5749 && compareDeep(property, o.property, true) && compareDeep(concept, o.concept, true); 5750 } 5751 5752 @Override 5753 public boolean equalsShallow(Base other_) { 5754 if (!super.equalsShallow(other_)) 5755 return false; 5756 if (!(other_ instanceof CodeSystem)) 5757 return false; 5758 CodeSystem o = (CodeSystem) other_; 5759 return compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true) 5760 && compareValues(caseSensitive, o.caseSensitive, true) 5761 && compareValues(hierarchyMeaning, o.hierarchyMeaning, true) 5762 && compareValues(compositional, o.compositional, true) && compareValues(versionNeeded, o.versionNeeded, true) 5763 && compareValues(content, o.content, true) && compareValues(count, o.count, true); 5764 } 5765 5766 public boolean isEmpty() { 5767 return super.isEmpty() 5768 && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, purpose, copyright, caseSensitive, valueSet, 5769 hierarchyMeaning, compositional, versionNeeded, content, supplements, count, filter, property, concept); 5770 } 5771 5772 @Override 5773 public ResourceType getResourceType() { 5774 return ResourceType.CodeSystem; 5775 } 5776 5777 /** 5778 * Search parameter: <b>date</b> 5779 * <p> 5780 * Description: <b>The code system publication date</b><br> 5781 * Type: <b>date</b><br> 5782 * Path: <b>CodeSystem.date</b><br> 5783 * </p> 5784 */ 5785 @SearchParamDefinition(name = "date", path = "CodeSystem.date", description = "The code system publication date", type = "date") 5786 public static final String SP_DATE = "date"; 5787 /** 5788 * <b>Fluent Client</b> search parameter constant for <b>date</b> 5789 * <p> 5790 * Description: <b>The code system publication date</b><br> 5791 * Type: <b>date</b><br> 5792 * Path: <b>CodeSystem.date</b><br> 5793 * </p> 5794 */ 5795 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam( 5796 SP_DATE); 5797 5798 /** 5799 * Search parameter: <b>identifier</b> 5800 * <p> 5801 * Description: <b>External identifier for the code system</b><br> 5802 * Type: <b>token</b><br> 5803 * Path: <b>CodeSystem.identifier</b><br> 5804 * </p> 5805 */ 5806 @SearchParamDefinition(name = "identifier", path = "CodeSystem.identifier", description = "External identifier for the code system", type = "token") 5807 public static final String SP_IDENTIFIER = "identifier"; 5808 /** 5809 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 5810 * <p> 5811 * Description: <b>External identifier for the code system</b><br> 5812 * Type: <b>token</b><br> 5813 * Path: <b>CodeSystem.identifier</b><br> 5814 * </p> 5815 */ 5816 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam( 5817 SP_IDENTIFIER); 5818 5819 /** 5820 * Search parameter: <b>code</b> 5821 * <p> 5822 * Description: <b>A code defined in the code system</b><br> 5823 * Type: <b>token</b><br> 5824 * Path: <b>CodeSystem.concept.code</b><br> 5825 * </p> 5826 */ 5827 @SearchParamDefinition(name = "code", path = "CodeSystem.concept.code", description = "A code defined in the code system", type = "token") 5828 public static final String SP_CODE = "code"; 5829 /** 5830 * <b>Fluent Client</b> search parameter constant for <b>code</b> 5831 * <p> 5832 * Description: <b>A code defined in the code system</b><br> 5833 * Type: <b>token</b><br> 5834 * Path: <b>CodeSystem.concept.code</b><br> 5835 * </p> 5836 */ 5837 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam( 5838 SP_CODE); 5839 5840 /** 5841 * Search parameter: <b>context-type-value</b> 5842 * <p> 5843 * Description: <b>A use context type and value assigned to the code 5844 * system</b><br> 5845 * Type: <b>composite</b><br> 5846 * Path: <b></b><br> 5847 * </p> 5848 */ 5849 @SearchParamDefinition(name = "context-type-value", path = "CodeSystem.useContext", description = "A use context type and value assigned to the code system", type = "composite", compositeOf = { 5850 "context-type", "context" }) 5851 public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value"; 5852 /** 5853 * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b> 5854 * <p> 5855 * Description: <b>A use context type and value assigned to the code 5856 * system</b><br> 5857 * Type: <b>composite</b><br> 5858 * Path: <b></b><br> 5859 * </p> 5860 */ 5861 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>( 5862 SP_CONTEXT_TYPE_VALUE); 5863 5864 /** 5865 * Search parameter: <b>content-mode</b> 5866 * <p> 5867 * Description: <b>not-present | example | fragment | complete | 5868 * supplement</b><br> 5869 * Type: <b>token</b><br> 5870 * Path: <b>CodeSystem.content</b><br> 5871 * </p> 5872 */ 5873 @SearchParamDefinition(name = "content-mode", path = "CodeSystem.content", description = "not-present | example | fragment | complete | supplement", type = "token") 5874 public static final String SP_CONTENT_MODE = "content-mode"; 5875 /** 5876 * <b>Fluent Client</b> search parameter constant for <b>content-mode</b> 5877 * <p> 5878 * Description: <b>not-present | example | fragment | complete | 5879 * supplement</b><br> 5880 * Type: <b>token</b><br> 5881 * Path: <b>CodeSystem.content</b><br> 5882 * </p> 5883 */ 5884 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTENT_MODE = new ca.uhn.fhir.rest.gclient.TokenClientParam( 5885 SP_CONTENT_MODE); 5886 5887 /** 5888 * Search parameter: <b>jurisdiction</b> 5889 * <p> 5890 * Description: <b>Intended jurisdiction for the code system</b><br> 5891 * Type: <b>token</b><br> 5892 * Path: <b>CodeSystem.jurisdiction</b><br> 5893 * </p> 5894 */ 5895 @SearchParamDefinition(name = "jurisdiction", path = "CodeSystem.jurisdiction", description = "Intended jurisdiction for the code system", type = "token") 5896 public static final String SP_JURISDICTION = "jurisdiction"; 5897 /** 5898 * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b> 5899 * <p> 5900 * Description: <b>Intended jurisdiction for the code system</b><br> 5901 * Type: <b>token</b><br> 5902 * Path: <b>CodeSystem.jurisdiction</b><br> 5903 * </p> 5904 */ 5905 public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam( 5906 SP_JURISDICTION); 5907 5908 /** 5909 * Search parameter: <b>description</b> 5910 * <p> 5911 * Description: <b>The description of the code system</b><br> 5912 * Type: <b>string</b><br> 5913 * Path: <b>CodeSystem.description</b><br> 5914 * </p> 5915 */ 5916 @SearchParamDefinition(name = "description", path = "CodeSystem.description", description = "The description of the code system", type = "string") 5917 public static final String SP_DESCRIPTION = "description"; 5918 /** 5919 * <b>Fluent Client</b> search parameter constant for <b>description</b> 5920 * <p> 5921 * Description: <b>The description of the code system</b><br> 5922 * Type: <b>string</b><br> 5923 * Path: <b>CodeSystem.description</b><br> 5924 * </p> 5925 */ 5926 public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam( 5927 SP_DESCRIPTION); 5928 5929 /** 5930 * Search parameter: <b>context-type</b> 5931 * <p> 5932 * Description: <b>A type of use context assigned to the code system</b><br> 5933 * Type: <b>token</b><br> 5934 * Path: <b>CodeSystem.useContext.code</b><br> 5935 * </p> 5936 */ 5937 @SearchParamDefinition(name = "context-type", path = "CodeSystem.useContext.code", description = "A type of use context assigned to the code system", type = "token") 5938 public static final String SP_CONTEXT_TYPE = "context-type"; 5939 /** 5940 * <b>Fluent Client</b> search parameter constant for <b>context-type</b> 5941 * <p> 5942 * Description: <b>A type of use context assigned to the code system</b><br> 5943 * Type: <b>token</b><br> 5944 * Path: <b>CodeSystem.useContext.code</b><br> 5945 * </p> 5946 */ 5947 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam( 5948 SP_CONTEXT_TYPE); 5949 5950 /** 5951 * Search parameter: <b>language</b> 5952 * <p> 5953 * Description: <b>A language in which a designation is provided</b><br> 5954 * Type: <b>token</b><br> 5955 * Path: <b>CodeSystem.concept.designation.language</b><br> 5956 * </p> 5957 */ 5958 @SearchParamDefinition(name = "language", path = "CodeSystem.concept.designation.language", description = "A language in which a designation is provided", type = "token") 5959 public static final String SP_LANGUAGE = "language"; 5960 /** 5961 * <b>Fluent Client</b> search parameter constant for <b>language</b> 5962 * <p> 5963 * Description: <b>A language in which a designation is provided</b><br> 5964 * Type: <b>token</b><br> 5965 * Path: <b>CodeSystem.concept.designation.language</b><br> 5966 * </p> 5967 */ 5968 public static final ca.uhn.fhir.rest.gclient.TokenClientParam LANGUAGE = new ca.uhn.fhir.rest.gclient.TokenClientParam( 5969 SP_LANGUAGE); 5970 5971 /** 5972 * Search parameter: <b>title</b> 5973 * <p> 5974 * Description: <b>The human-friendly name of the code system</b><br> 5975 * Type: <b>string</b><br> 5976 * Path: <b>CodeSystem.title</b><br> 5977 * </p> 5978 */ 5979 @SearchParamDefinition(name = "title", path = "CodeSystem.title", description = "The human-friendly name of the code system", type = "string") 5980 public static final String SP_TITLE = "title"; 5981 /** 5982 * <b>Fluent Client</b> search parameter constant for <b>title</b> 5983 * <p> 5984 * Description: <b>The human-friendly name of the code system</b><br> 5985 * Type: <b>string</b><br> 5986 * Path: <b>CodeSystem.title</b><br> 5987 * </p> 5988 */ 5989 public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam( 5990 SP_TITLE); 5991 5992 /** 5993 * Search parameter: <b>version</b> 5994 * <p> 5995 * Description: <b>The business version of the code system</b><br> 5996 * Type: <b>token</b><br> 5997 * Path: <b>CodeSystem.version</b><br> 5998 * </p> 5999 */ 6000 @SearchParamDefinition(name = "version", path = "CodeSystem.version", description = "The business version of the code system", type = "token") 6001 public static final String SP_VERSION = "version"; 6002 /** 6003 * <b>Fluent Client</b> search parameter constant for <b>version</b> 6004 * <p> 6005 * Description: <b>The business version of the code system</b><br> 6006 * Type: <b>token</b><br> 6007 * Path: <b>CodeSystem.version</b><br> 6008 * </p> 6009 */ 6010 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam( 6011 SP_VERSION); 6012 6013 /** 6014 * Search parameter: <b>url</b> 6015 * <p> 6016 * Description: <b>The uri that identifies the code system</b><br> 6017 * Type: <b>uri</b><br> 6018 * Path: <b>CodeSystem.url</b><br> 6019 * </p> 6020 */ 6021 @SearchParamDefinition(name = "url", path = "CodeSystem.url", description = "The uri that identifies the code system", type = "uri") 6022 public static final String SP_URL = "url"; 6023 /** 6024 * <b>Fluent Client</b> search parameter constant for <b>url</b> 6025 * <p> 6026 * Description: <b>The uri that identifies the code system</b><br> 6027 * Type: <b>uri</b><br> 6028 * Path: <b>CodeSystem.url</b><br> 6029 * </p> 6030 */ 6031 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 6032 6033 /** 6034 * Search parameter: <b>context-quantity</b> 6035 * <p> 6036 * Description: <b>A quantity- or range-valued use context assigned to the code 6037 * system</b><br> 6038 * Type: <b>quantity</b><br> 6039 * Path: <b>CodeSystem.useContext.valueQuantity, 6040 * CodeSystem.useContext.valueRange</b><br> 6041 * </p> 6042 */ 6043 @SearchParamDefinition(name = "context-quantity", path = "(CodeSystem.useContext.value as Quantity) | (CodeSystem.useContext.value as Range)", description = "A quantity- or range-valued use context assigned to the code system", type = "quantity") 6044 public static final String SP_CONTEXT_QUANTITY = "context-quantity"; 6045 /** 6046 * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b> 6047 * <p> 6048 * Description: <b>A quantity- or range-valued use context assigned to the code 6049 * system</b><br> 6050 * Type: <b>quantity</b><br> 6051 * Path: <b>CodeSystem.useContext.valueQuantity, 6052 * CodeSystem.useContext.valueRange</b><br> 6053 * </p> 6054 */ 6055 public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam( 6056 SP_CONTEXT_QUANTITY); 6057 6058 /** 6059 * Search parameter: <b>supplements</b> 6060 * <p> 6061 * Description: <b>Find code system supplements for the referenced code 6062 * system</b><br> 6063 * Type: <b>reference</b><br> 6064 * Path: <b>CodeSystem.supplements</b><br> 6065 * </p> 6066 */ 6067 @SearchParamDefinition(name = "supplements", path = "CodeSystem.supplements", description = "Find code system supplements for the referenced code system", type = "reference", target = { 6068 CodeSystem.class }) 6069 public static final String SP_SUPPLEMENTS = "supplements"; 6070 /** 6071 * <b>Fluent Client</b> search parameter constant for <b>supplements</b> 6072 * <p> 6073 * Description: <b>Find code system supplements for the referenced code 6074 * system</b><br> 6075 * Type: <b>reference</b><br> 6076 * Path: <b>CodeSystem.supplements</b><br> 6077 * </p> 6078 */ 6079 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUPPLEMENTS = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 6080 SP_SUPPLEMENTS); 6081 6082 /** 6083 * Constant for fluent queries to be used to add include statements. Specifies 6084 * the path value of "<b>CodeSystem:supplements</b>". 6085 */ 6086 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUPPLEMENTS = new ca.uhn.fhir.model.api.Include( 6087 "CodeSystem:supplements").toLocked(); 6088 6089 /** 6090 * Search parameter: <b>system</b> 6091 * <p> 6092 * Description: <b>The system for any codes defined by this code system (same as 6093 * 'url')</b><br> 6094 * Type: <b>uri</b><br> 6095 * Path: <b>CodeSystem.url</b><br> 6096 * </p> 6097 */ 6098 @SearchParamDefinition(name = "system", path = "CodeSystem.url", description = "The system for any codes defined by this code system (same as 'url')", type = "uri") 6099 public static final String SP_SYSTEM = "system"; 6100 /** 6101 * <b>Fluent Client</b> search parameter constant for <b>system</b> 6102 * <p> 6103 * Description: <b>The system for any codes defined by this code system (same as 6104 * 'url')</b><br> 6105 * Type: <b>uri</b><br> 6106 * Path: <b>CodeSystem.url</b><br> 6107 * </p> 6108 */ 6109 public static final ca.uhn.fhir.rest.gclient.UriClientParam SYSTEM = new ca.uhn.fhir.rest.gclient.UriClientParam( 6110 SP_SYSTEM); 6111 6112 /** 6113 * Search parameter: <b>name</b> 6114 * <p> 6115 * Description: <b>Computationally friendly name of the code system</b><br> 6116 * Type: <b>string</b><br> 6117 * Path: <b>CodeSystem.name</b><br> 6118 * </p> 6119 */ 6120 @SearchParamDefinition(name = "name", path = "CodeSystem.name", description = "Computationally friendly name of the code system", type = "string") 6121 public static final String SP_NAME = "name"; 6122 /** 6123 * <b>Fluent Client</b> search parameter constant for <b>name</b> 6124 * <p> 6125 * Description: <b>Computationally friendly name of the code system</b><br> 6126 * Type: <b>string</b><br> 6127 * Path: <b>CodeSystem.name</b><br> 6128 * </p> 6129 */ 6130 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam( 6131 SP_NAME); 6132 6133 /** 6134 * Search parameter: <b>context</b> 6135 * <p> 6136 * Description: <b>A use context assigned to the code system</b><br> 6137 * Type: <b>token</b><br> 6138 * Path: <b>CodeSystem.useContext.valueCodeableConcept</b><br> 6139 * </p> 6140 */ 6141 @SearchParamDefinition(name = "context", path = "(CodeSystem.useContext.value as CodeableConcept)", description = "A use context assigned to the code system", type = "token") 6142 public static final String SP_CONTEXT = "context"; 6143 /** 6144 * <b>Fluent Client</b> search parameter constant for <b>context</b> 6145 * <p> 6146 * Description: <b>A use context assigned to the code system</b><br> 6147 * Type: <b>token</b><br> 6148 * Path: <b>CodeSystem.useContext.valueCodeableConcept</b><br> 6149 * </p> 6150 */ 6151 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam( 6152 SP_CONTEXT); 6153 6154 /** 6155 * Search parameter: <b>publisher</b> 6156 * <p> 6157 * Description: <b>Name of the publisher of the code system</b><br> 6158 * Type: <b>string</b><br> 6159 * Path: <b>CodeSystem.publisher</b><br> 6160 * </p> 6161 */ 6162 @SearchParamDefinition(name = "publisher", path = "CodeSystem.publisher", description = "Name of the publisher of the code system", type = "string") 6163 public static final String SP_PUBLISHER = "publisher"; 6164 /** 6165 * <b>Fluent Client</b> search parameter constant for <b>publisher</b> 6166 * <p> 6167 * Description: <b>Name of the publisher of the code system</b><br> 6168 * Type: <b>string</b><br> 6169 * Path: <b>CodeSystem.publisher</b><br> 6170 * </p> 6171 */ 6172 public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam( 6173 SP_PUBLISHER); 6174 6175 /** 6176 * Search parameter: <b>context-type-quantity</b> 6177 * <p> 6178 * Description: <b>A use context type and quantity- or range-based value 6179 * assigned to the code system</b><br> 6180 * Type: <b>composite</b><br> 6181 * Path: <b></b><br> 6182 * </p> 6183 */ 6184 @SearchParamDefinition(name = "context-type-quantity", path = "CodeSystem.useContext", description = "A use context type and quantity- or range-based value assigned to the code system", type = "composite", compositeOf = { 6185 "context-type", "context-quantity" }) 6186 public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity"; 6187 /** 6188 * <b>Fluent Client</b> search parameter constant for 6189 * <b>context-type-quantity</b> 6190 * <p> 6191 * Description: <b>A use context type and quantity- or range-based value 6192 * assigned to the code system</b><br> 6193 * Type: <b>composite</b><br> 6194 * Path: <b></b><br> 6195 * </p> 6196 */ 6197 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>( 6198 SP_CONTEXT_TYPE_QUANTITY); 6199 6200 /** 6201 * Search parameter: <b>status</b> 6202 * <p> 6203 * Description: <b>The current status of the code system</b><br> 6204 * Type: <b>token</b><br> 6205 * Path: <b>CodeSystem.status</b><br> 6206 * </p> 6207 */ 6208 @SearchParamDefinition(name = "status", path = "CodeSystem.status", description = "The current status of the code system", type = "token") 6209 public static final String SP_STATUS = "status"; 6210 /** 6211 * <b>Fluent Client</b> search parameter constant for <b>status</b> 6212 * <p> 6213 * Description: <b>The current status of the code system</b><br> 6214 * Type: <b>token</b><br> 6215 * Path: <b>CodeSystem.status</b><br> 6216 * </p> 6217 */ 6218 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam( 6219 SP_STATUS); 6220 6221// added from java-adornments.txt: 6222 public PropertyComponent getProperty(String code) { 6223 for (PropertyComponent pd : getProperty()) { 6224 if (pd.getCode().equalsIgnoreCase(code)) 6225 return pd; 6226 } 6227 return null; 6228 } 6229 6230 public class ConceptDefinitionComponentSorter implements Comparator<ConceptDefinitionComponent> { 6231 @Override 6232 public int compare(ConceptDefinitionComponent l, ConceptDefinitionComponent r) { 6233 return l.getCode().compareTo(r.getCode()); 6234 } 6235 } 6236 6237 public void sort() { 6238 sort(getConcept(), new ConceptDefinitionComponentSorter()); 6239 } 6240 6241 public void sort(List<ConceptDefinitionComponent> list, Comparator<ConceptDefinitionComponent> comp) { 6242 Collections.sort(list, comp); 6243 for (ConceptDefinitionComponent def : list) { 6244 if (def.hasConcept()) { 6245 sort(def.getConcept(), comp); 6246 } 6247 } 6248 } 6249 6250 public void sort(Comparator<ConceptDefinitionComponent> comp) { 6251 sort(getConcept(), comp); 6252 } 6253 6254// end addition 6255 6256}