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