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