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