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 * A search parameter that defines a named search item that can be used to search/filter on a resource. 048 */ 049@ResourceDef(name="SearchParameter", profile="http://hl7.org/fhir/Profile/SearchParameter") 050@ChildOrder(names={"url", "version", "name", "derivedFrom", "status", "experimental", "date", "publisher", "contact", "description", "useContext", "jurisdiction", "purpose", "code", "base", "type", "expression", "xpath", "xpathUsage", "target", "multipleOr", "multipleAnd", "comparator", "modifier", "chain", "component"}) 051public class SearchParameter extends MetadataResource { 052 053 public enum XPathUsageType { 054 /** 055 * The search parameter is derived directly from the selected nodes based on the type definitions. 056 */ 057 NORMAL, 058 /** 059 * The search parameter is derived by a phonetic transform from the selected nodes. 060 */ 061 PHONETIC, 062 /** 063 * The search parameter is based on a spatial transform of the selected nodes. 064 */ 065 NEARBY, 066 /** 067 * The search parameter is based on a spatial transform of the selected nodes, using physical distance from the middle. 068 */ 069 DISTANCE, 070 /** 071 * The interpretation of the xpath statement is unknown (and can't be automated). 072 */ 073 OTHER, 074 /** 075 * added to help the parsers with the generic types 076 */ 077 NULL; 078 public static XPathUsageType fromCode(String codeString) throws FHIRException { 079 if (codeString == null || "".equals(codeString)) 080 return null; 081 if ("normal".equals(codeString)) 082 return NORMAL; 083 if ("phonetic".equals(codeString)) 084 return PHONETIC; 085 if ("nearby".equals(codeString)) 086 return NEARBY; 087 if ("distance".equals(codeString)) 088 return DISTANCE; 089 if ("other".equals(codeString)) 090 return OTHER; 091 if (Configuration.isAcceptInvalidEnums()) 092 return null; 093 else 094 throw new FHIRException("Unknown XPathUsageType code '"+codeString+"'"); 095 } 096 public String toCode() { 097 switch (this) { 098 case NORMAL: return "normal"; 099 case PHONETIC: return "phonetic"; 100 case NEARBY: return "nearby"; 101 case DISTANCE: return "distance"; 102 case OTHER: return "other"; 103 default: return "?"; 104 } 105 } 106 public String getSystem() { 107 switch (this) { 108 case NORMAL: return "http://hl7.org/fhir/search-xpath-usage"; 109 case PHONETIC: return "http://hl7.org/fhir/search-xpath-usage"; 110 case NEARBY: return "http://hl7.org/fhir/search-xpath-usage"; 111 case DISTANCE: return "http://hl7.org/fhir/search-xpath-usage"; 112 case OTHER: return "http://hl7.org/fhir/search-xpath-usage"; 113 default: return "?"; 114 } 115 } 116 public String getDefinition() { 117 switch (this) { 118 case NORMAL: return "The search parameter is derived directly from the selected nodes based on the type definitions."; 119 case PHONETIC: return "The search parameter is derived by a phonetic transform from the selected nodes."; 120 case NEARBY: return "The search parameter is based on a spatial transform of the selected nodes."; 121 case DISTANCE: return "The search parameter is based on a spatial transform of the selected nodes, using physical distance from the middle."; 122 case OTHER: return "The interpretation of the xpath statement is unknown (and can't be automated)."; 123 default: return "?"; 124 } 125 } 126 public String getDisplay() { 127 switch (this) { 128 case NORMAL: return "Normal"; 129 case PHONETIC: return "Phonetic"; 130 case NEARBY: return "Nearby"; 131 case DISTANCE: return "Distance"; 132 case OTHER: return "Other"; 133 default: return "?"; 134 } 135 } 136 } 137 138 public static class XPathUsageTypeEnumFactory implements EnumFactory<XPathUsageType> { 139 public XPathUsageType fromCode(String codeString) throws IllegalArgumentException { 140 if (codeString == null || "".equals(codeString)) 141 if (codeString == null || "".equals(codeString)) 142 return null; 143 if ("normal".equals(codeString)) 144 return XPathUsageType.NORMAL; 145 if ("phonetic".equals(codeString)) 146 return XPathUsageType.PHONETIC; 147 if ("nearby".equals(codeString)) 148 return XPathUsageType.NEARBY; 149 if ("distance".equals(codeString)) 150 return XPathUsageType.DISTANCE; 151 if ("other".equals(codeString)) 152 return XPathUsageType.OTHER; 153 throw new IllegalArgumentException("Unknown XPathUsageType code '"+codeString+"'"); 154 } 155 public Enumeration<XPathUsageType> fromType(Base code) throws FHIRException { 156 if (code == null) 157 return null; 158 if (code.isEmpty()) 159 return new Enumeration<XPathUsageType>(this); 160 String codeString = ((PrimitiveType) code).asStringValue(); 161 if (codeString == null || "".equals(codeString)) 162 return null; 163 if ("normal".equals(codeString)) 164 return new Enumeration<XPathUsageType>(this, XPathUsageType.NORMAL); 165 if ("phonetic".equals(codeString)) 166 return new Enumeration<XPathUsageType>(this, XPathUsageType.PHONETIC); 167 if ("nearby".equals(codeString)) 168 return new Enumeration<XPathUsageType>(this, XPathUsageType.NEARBY); 169 if ("distance".equals(codeString)) 170 return new Enumeration<XPathUsageType>(this, XPathUsageType.DISTANCE); 171 if ("other".equals(codeString)) 172 return new Enumeration<XPathUsageType>(this, XPathUsageType.OTHER); 173 throw new FHIRException("Unknown XPathUsageType code '"+codeString+"'"); 174 } 175 public String toCode(XPathUsageType code) { 176 if (code == XPathUsageType.NORMAL) 177 return "normal"; 178 if (code == XPathUsageType.PHONETIC) 179 return "phonetic"; 180 if (code == XPathUsageType.NEARBY) 181 return "nearby"; 182 if (code == XPathUsageType.DISTANCE) 183 return "distance"; 184 if (code == XPathUsageType.OTHER) 185 return "other"; 186 return "?"; 187 } 188 public String toSystem(XPathUsageType code) { 189 return code.getSystem(); 190 } 191 } 192 193 public enum SearchComparator { 194 /** 195 * the value for the parameter in the resource is equal to the provided value 196 */ 197 EQ, 198 /** 199 * the value for the parameter in the resource is not equal to the provided value 200 */ 201 NE, 202 /** 203 * the value for the parameter in the resource is greater than the provided value 204 */ 205 GT, 206 /** 207 * the value for the parameter in the resource is less than the provided value 208 */ 209 LT, 210 /** 211 * the value for the parameter in the resource is greater or equal to the provided value 212 */ 213 GE, 214 /** 215 * the value for the parameter in the resource is less or equal to the provided value 216 */ 217 LE, 218 /** 219 * the value for the parameter in the resource starts after the provided value 220 */ 221 SA, 222 /** 223 * the value for the parameter in the resource ends before the provided value 224 */ 225 EB, 226 /** 227 * the value for the parameter in the resource is approximately the same to the provided value. 228 */ 229 AP, 230 /** 231 * added to help the parsers with the generic types 232 */ 233 NULL; 234 public static SearchComparator fromCode(String codeString) throws FHIRException { 235 if (codeString == null || "".equals(codeString)) 236 return null; 237 if ("eq".equals(codeString)) 238 return EQ; 239 if ("ne".equals(codeString)) 240 return NE; 241 if ("gt".equals(codeString)) 242 return GT; 243 if ("lt".equals(codeString)) 244 return LT; 245 if ("ge".equals(codeString)) 246 return GE; 247 if ("le".equals(codeString)) 248 return LE; 249 if ("sa".equals(codeString)) 250 return SA; 251 if ("eb".equals(codeString)) 252 return EB; 253 if ("ap".equals(codeString)) 254 return AP; 255 if (Configuration.isAcceptInvalidEnums()) 256 return null; 257 else 258 throw new FHIRException("Unknown SearchComparator code '"+codeString+"'"); 259 } 260 public String toCode() { 261 switch (this) { 262 case EQ: return "eq"; 263 case NE: return "ne"; 264 case GT: return "gt"; 265 case LT: return "lt"; 266 case GE: return "ge"; 267 case LE: return "le"; 268 case SA: return "sa"; 269 case EB: return "eb"; 270 case AP: return "ap"; 271 default: return "?"; 272 } 273 } 274 public String getSystem() { 275 switch (this) { 276 case EQ: return "http://hl7.org/fhir/search-comparator"; 277 case NE: return "http://hl7.org/fhir/search-comparator"; 278 case GT: return "http://hl7.org/fhir/search-comparator"; 279 case LT: return "http://hl7.org/fhir/search-comparator"; 280 case GE: return "http://hl7.org/fhir/search-comparator"; 281 case LE: return "http://hl7.org/fhir/search-comparator"; 282 case SA: return "http://hl7.org/fhir/search-comparator"; 283 case EB: return "http://hl7.org/fhir/search-comparator"; 284 case AP: return "http://hl7.org/fhir/search-comparator"; 285 default: return "?"; 286 } 287 } 288 public String getDefinition() { 289 switch (this) { 290 case EQ: return "the value for the parameter in the resource is equal to the provided value"; 291 case NE: return "the value for the parameter in the resource is not equal to the provided value"; 292 case GT: return "the value for the parameter in the resource is greater than the provided value"; 293 case LT: return "the value for the parameter in the resource is less than the provided value"; 294 case GE: return "the value for the parameter in the resource is greater or equal to the provided value"; 295 case LE: return "the value for the parameter in the resource is less or equal to the provided value"; 296 case SA: return "the value for the parameter in the resource starts after the provided value"; 297 case EB: return "the value for the parameter in the resource ends before the provided value"; 298 case AP: return "the value for the parameter in the resource is approximately the same to the provided value."; 299 default: return "?"; 300 } 301 } 302 public String getDisplay() { 303 switch (this) { 304 case EQ: return "Equals"; 305 case NE: return "Not Equals"; 306 case GT: return "Greater Than"; 307 case LT: return "Less Then"; 308 case GE: return "Greater or Equals"; 309 case LE: return "Less of Equal"; 310 case SA: return "Starts After"; 311 case EB: return "Ends Before"; 312 case AP: return "Approximately"; 313 default: return "?"; 314 } 315 } 316 } 317 318 public static class SearchComparatorEnumFactory implements EnumFactory<SearchComparator> { 319 public SearchComparator fromCode(String codeString) throws IllegalArgumentException { 320 if (codeString == null || "".equals(codeString)) 321 if (codeString == null || "".equals(codeString)) 322 return null; 323 if ("eq".equals(codeString)) 324 return SearchComparator.EQ; 325 if ("ne".equals(codeString)) 326 return SearchComparator.NE; 327 if ("gt".equals(codeString)) 328 return SearchComparator.GT; 329 if ("lt".equals(codeString)) 330 return SearchComparator.LT; 331 if ("ge".equals(codeString)) 332 return SearchComparator.GE; 333 if ("le".equals(codeString)) 334 return SearchComparator.LE; 335 if ("sa".equals(codeString)) 336 return SearchComparator.SA; 337 if ("eb".equals(codeString)) 338 return SearchComparator.EB; 339 if ("ap".equals(codeString)) 340 return SearchComparator.AP; 341 throw new IllegalArgumentException("Unknown SearchComparator code '"+codeString+"'"); 342 } 343 public Enumeration<SearchComparator> fromType(Base code) throws FHIRException { 344 if (code == null) 345 return null; 346 if (code.isEmpty()) 347 return new Enumeration<SearchComparator>(this); 348 String codeString = ((PrimitiveType) code).asStringValue(); 349 if (codeString == null || "".equals(codeString)) 350 return null; 351 if ("eq".equals(codeString)) 352 return new Enumeration<SearchComparator>(this, SearchComparator.EQ); 353 if ("ne".equals(codeString)) 354 return new Enumeration<SearchComparator>(this, SearchComparator.NE); 355 if ("gt".equals(codeString)) 356 return new Enumeration<SearchComparator>(this, SearchComparator.GT); 357 if ("lt".equals(codeString)) 358 return new Enumeration<SearchComparator>(this, SearchComparator.LT); 359 if ("ge".equals(codeString)) 360 return new Enumeration<SearchComparator>(this, SearchComparator.GE); 361 if ("le".equals(codeString)) 362 return new Enumeration<SearchComparator>(this, SearchComparator.LE); 363 if ("sa".equals(codeString)) 364 return new Enumeration<SearchComparator>(this, SearchComparator.SA); 365 if ("eb".equals(codeString)) 366 return new Enumeration<SearchComparator>(this, SearchComparator.EB); 367 if ("ap".equals(codeString)) 368 return new Enumeration<SearchComparator>(this, SearchComparator.AP); 369 throw new FHIRException("Unknown SearchComparator code '"+codeString+"'"); 370 } 371 public String toCode(SearchComparator code) { 372 if (code == SearchComparator.EQ) 373 return "eq"; 374 if (code == SearchComparator.NE) 375 return "ne"; 376 if (code == SearchComparator.GT) 377 return "gt"; 378 if (code == SearchComparator.LT) 379 return "lt"; 380 if (code == SearchComparator.GE) 381 return "ge"; 382 if (code == SearchComparator.LE) 383 return "le"; 384 if (code == SearchComparator.SA) 385 return "sa"; 386 if (code == SearchComparator.EB) 387 return "eb"; 388 if (code == SearchComparator.AP) 389 return "ap"; 390 return "?"; 391 } 392 public String toSystem(SearchComparator code) { 393 return code.getSystem(); 394 } 395 } 396 397 public enum SearchModifierCode { 398 /** 399 * The search parameter returns resources that have a value or not. 400 */ 401 MISSING, 402 /** 403 * The search parameter returns resources that have a value that exactly matches the supplied parameter (the whole string, including casing and accents). 404 */ 405 EXACT, 406 /** 407 * The search parameter returns resources that include the supplied parameter value anywhere within the field being searched. 408 */ 409 CONTAINS, 410 /** 411 * The search parameter returns resources that do not contain a match. 412 */ 413 NOT, 414 /** 415 * The search parameter is processed as a string that searches text associated with the code/value - either CodeableConcept.text, Coding.display, or Identifier.type.text. 416 */ 417 TEXT, 418 /** 419 * The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is in the specified value set. 420 */ 421 IN, 422 /** 423 * The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is not in the specified value set. 424 */ 425 NOTIN, 426 /** 427 * The search parameter tests whether the value in a resource is subsumed by the specified value (is-a, or hierarchical relationships). 428 */ 429 BELOW, 430 /** 431 * The search parameter tests whether the value in a resource subsumes the specified value (is-a, or hierarchical relationships). 432 */ 433 ABOVE, 434 /** 435 * The search parameter only applies to the Resource Type specified as a modifier (e.g. the modifier is not actually :type, but :Patient etc.). 436 */ 437 TYPE, 438 /** 439 * added to help the parsers with the generic types 440 */ 441 NULL; 442 public static SearchModifierCode fromCode(String codeString) throws FHIRException { 443 if (codeString == null || "".equals(codeString)) 444 return null; 445 if ("missing".equals(codeString)) 446 return MISSING; 447 if ("exact".equals(codeString)) 448 return EXACT; 449 if ("contains".equals(codeString)) 450 return CONTAINS; 451 if ("not".equals(codeString)) 452 return NOT; 453 if ("text".equals(codeString)) 454 return TEXT; 455 if ("in".equals(codeString)) 456 return IN; 457 if ("not-in".equals(codeString)) 458 return NOTIN; 459 if ("below".equals(codeString)) 460 return BELOW; 461 if ("above".equals(codeString)) 462 return ABOVE; 463 if ("type".equals(codeString)) 464 return TYPE; 465 if (Configuration.isAcceptInvalidEnums()) 466 return null; 467 else 468 throw new FHIRException("Unknown SearchModifierCode code '"+codeString+"'"); 469 } 470 public String toCode() { 471 switch (this) { 472 case MISSING: return "missing"; 473 case EXACT: return "exact"; 474 case CONTAINS: return "contains"; 475 case NOT: return "not"; 476 case TEXT: return "text"; 477 case IN: return "in"; 478 case NOTIN: return "not-in"; 479 case BELOW: return "below"; 480 case ABOVE: return "above"; 481 case TYPE: return "type"; 482 default: return "?"; 483 } 484 } 485 public String getSystem() { 486 switch (this) { 487 case MISSING: return "http://hl7.org/fhir/search-modifier-code"; 488 case EXACT: return "http://hl7.org/fhir/search-modifier-code"; 489 case CONTAINS: return "http://hl7.org/fhir/search-modifier-code"; 490 case NOT: return "http://hl7.org/fhir/search-modifier-code"; 491 case TEXT: return "http://hl7.org/fhir/search-modifier-code"; 492 case IN: return "http://hl7.org/fhir/search-modifier-code"; 493 case NOTIN: return "http://hl7.org/fhir/search-modifier-code"; 494 case BELOW: return "http://hl7.org/fhir/search-modifier-code"; 495 case ABOVE: return "http://hl7.org/fhir/search-modifier-code"; 496 case TYPE: return "http://hl7.org/fhir/search-modifier-code"; 497 default: return "?"; 498 } 499 } 500 public String getDefinition() { 501 switch (this) { 502 case MISSING: return "The search parameter returns resources that have a value or not."; 503 case EXACT: return "The search parameter returns resources that have a value that exactly matches the supplied parameter (the whole string, including casing and accents)."; 504 case CONTAINS: return "The search parameter returns resources that include the supplied parameter value anywhere within the field being searched."; 505 case NOT: return "The search parameter returns resources that do not contain a match."; 506 case TEXT: return "The search parameter is processed as a string that searches text associated with the code/value - either CodeableConcept.text, Coding.display, or Identifier.type.text."; 507 case IN: return "The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is in the specified value set."; 508 case NOTIN: return "The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is not in the specified value set."; 509 case BELOW: return "The search parameter tests whether the value in a resource is subsumed by the specified value (is-a, or hierarchical relationships)."; 510 case ABOVE: return "The search parameter tests whether the value in a resource subsumes the specified value (is-a, or hierarchical relationships)."; 511 case TYPE: return "The search parameter only applies to the Resource Type specified as a modifier (e.g. the modifier is not actually :type, but :Patient etc.)."; 512 default: return "?"; 513 } 514 } 515 public String getDisplay() { 516 switch (this) { 517 case MISSING: return "Missing"; 518 case EXACT: return "Exact"; 519 case CONTAINS: return "Contains"; 520 case NOT: return "Not"; 521 case TEXT: return "Text"; 522 case IN: return "In"; 523 case NOTIN: return "Not In"; 524 case BELOW: return "Below"; 525 case ABOVE: return "Above"; 526 case TYPE: return "Type"; 527 default: return "?"; 528 } 529 } 530 } 531 532 public static class SearchModifierCodeEnumFactory implements EnumFactory<SearchModifierCode> { 533 public SearchModifierCode fromCode(String codeString) throws IllegalArgumentException { 534 if (codeString == null || "".equals(codeString)) 535 if (codeString == null || "".equals(codeString)) 536 return null; 537 if ("missing".equals(codeString)) 538 return SearchModifierCode.MISSING; 539 if ("exact".equals(codeString)) 540 return SearchModifierCode.EXACT; 541 if ("contains".equals(codeString)) 542 return SearchModifierCode.CONTAINS; 543 if ("not".equals(codeString)) 544 return SearchModifierCode.NOT; 545 if ("text".equals(codeString)) 546 return SearchModifierCode.TEXT; 547 if ("in".equals(codeString)) 548 return SearchModifierCode.IN; 549 if ("not-in".equals(codeString)) 550 return SearchModifierCode.NOTIN; 551 if ("below".equals(codeString)) 552 return SearchModifierCode.BELOW; 553 if ("above".equals(codeString)) 554 return SearchModifierCode.ABOVE; 555 if ("type".equals(codeString)) 556 return SearchModifierCode.TYPE; 557 throw new IllegalArgumentException("Unknown SearchModifierCode code '"+codeString+"'"); 558 } 559 public Enumeration<SearchModifierCode> fromType(Base code) throws FHIRException { 560 if (code == null) 561 return null; 562 if (code.isEmpty()) 563 return new Enumeration<SearchModifierCode>(this); 564 String codeString = ((PrimitiveType) code).asStringValue(); 565 if (codeString == null || "".equals(codeString)) 566 return null; 567 if ("missing".equals(codeString)) 568 return new Enumeration<SearchModifierCode>(this, SearchModifierCode.MISSING); 569 if ("exact".equals(codeString)) 570 return new Enumeration<SearchModifierCode>(this, SearchModifierCode.EXACT); 571 if ("contains".equals(codeString)) 572 return new Enumeration<SearchModifierCode>(this, SearchModifierCode.CONTAINS); 573 if ("not".equals(codeString)) 574 return new Enumeration<SearchModifierCode>(this, SearchModifierCode.NOT); 575 if ("text".equals(codeString)) 576 return new Enumeration<SearchModifierCode>(this, SearchModifierCode.TEXT); 577 if ("in".equals(codeString)) 578 return new Enumeration<SearchModifierCode>(this, SearchModifierCode.IN); 579 if ("not-in".equals(codeString)) 580 return new Enumeration<SearchModifierCode>(this, SearchModifierCode.NOTIN); 581 if ("below".equals(codeString)) 582 return new Enumeration<SearchModifierCode>(this, SearchModifierCode.BELOW); 583 if ("above".equals(codeString)) 584 return new Enumeration<SearchModifierCode>(this, SearchModifierCode.ABOVE); 585 if ("type".equals(codeString)) 586 return new Enumeration<SearchModifierCode>(this, SearchModifierCode.TYPE); 587 throw new FHIRException("Unknown SearchModifierCode code '"+codeString+"'"); 588 } 589 public String toCode(SearchModifierCode code) { 590 if (code == SearchModifierCode.MISSING) 591 return "missing"; 592 if (code == SearchModifierCode.EXACT) 593 return "exact"; 594 if (code == SearchModifierCode.CONTAINS) 595 return "contains"; 596 if (code == SearchModifierCode.NOT) 597 return "not"; 598 if (code == SearchModifierCode.TEXT) 599 return "text"; 600 if (code == SearchModifierCode.IN) 601 return "in"; 602 if (code == SearchModifierCode.NOTIN) 603 return "not-in"; 604 if (code == SearchModifierCode.BELOW) 605 return "below"; 606 if (code == SearchModifierCode.ABOVE) 607 return "above"; 608 if (code == SearchModifierCode.TYPE) 609 return "type"; 610 return "?"; 611 } 612 public String toSystem(SearchModifierCode code) { 613 return code.getSystem(); 614 } 615 } 616 617 @Block() 618 public static class SearchParameterComponentComponent extends BackboneElement implements IBaseBackboneElement { 619 /** 620 * The definition of the search parameter that describes this part. 621 */ 622 @Child(name = "definition", type = {CanonicalType.class}, order=1, min=1, max=1, modifier=false, summary=false) 623 @Description(shortDefinition="Defines how the part works", formalDefinition="The definition of the search parameter that describes this part." ) 624 protected CanonicalType definition; 625 626 /** 627 * A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression. 628 */ 629 @Child(name = "expression", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 630 @Description(shortDefinition="Subexpression relative to main expression", formalDefinition="A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression." ) 631 protected StringType expression; 632 633 private static final long serialVersionUID = -1469435618L; 634 635 /** 636 * Constructor 637 */ 638 public SearchParameterComponentComponent() { 639 super(); 640 } 641 642 /** 643 * Constructor 644 */ 645 public SearchParameterComponentComponent(CanonicalType definition, StringType expression) { 646 super(); 647 this.definition = definition; 648 this.expression = expression; 649 } 650 651 /** 652 * @return {@link #definition} (The definition of the search parameter that describes this part.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value 653 */ 654 public CanonicalType getDefinitionElement() { 655 if (this.definition == null) 656 if (Configuration.errorOnAutoCreate()) 657 throw new Error("Attempt to auto-create SearchParameterComponentComponent.definition"); 658 else if (Configuration.doAutoCreate()) 659 this.definition = new CanonicalType(); // bb 660 return this.definition; 661 } 662 663 public boolean hasDefinitionElement() { 664 return this.definition != null && !this.definition.isEmpty(); 665 } 666 667 public boolean hasDefinition() { 668 return this.definition != null && !this.definition.isEmpty(); 669 } 670 671 /** 672 * @param value {@link #definition} (The definition of the search parameter that describes this part.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value 673 */ 674 public SearchParameterComponentComponent setDefinitionElement(CanonicalType value) { 675 this.definition = value; 676 return this; 677 } 678 679 /** 680 * @return The definition of the search parameter that describes this part. 681 */ 682 public String getDefinition() { 683 return this.definition == null ? null : this.definition.getValue(); 684 } 685 686 /** 687 * @param value The definition of the search parameter that describes this part. 688 */ 689 public SearchParameterComponentComponent setDefinition(String value) { 690 if (this.definition == null) 691 this.definition = new CanonicalType(); 692 this.definition.setValue(value); 693 return this; 694 } 695 696 /** 697 * @return {@link #expression} (A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value 698 */ 699 public StringType getExpressionElement() { 700 if (this.expression == null) 701 if (Configuration.errorOnAutoCreate()) 702 throw new Error("Attempt to auto-create SearchParameterComponentComponent.expression"); 703 else if (Configuration.doAutoCreate()) 704 this.expression = new StringType(); // bb 705 return this.expression; 706 } 707 708 public boolean hasExpressionElement() { 709 return this.expression != null && !this.expression.isEmpty(); 710 } 711 712 public boolean hasExpression() { 713 return this.expression != null && !this.expression.isEmpty(); 714 } 715 716 /** 717 * @param value {@link #expression} (A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value 718 */ 719 public SearchParameterComponentComponent setExpressionElement(StringType value) { 720 this.expression = value; 721 return this; 722 } 723 724 /** 725 * @return A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression. 726 */ 727 public String getExpression() { 728 return this.expression == null ? null : this.expression.getValue(); 729 } 730 731 /** 732 * @param value A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression. 733 */ 734 public SearchParameterComponentComponent setExpression(String value) { 735 if (this.expression == null) 736 this.expression = new StringType(); 737 this.expression.setValue(value); 738 return this; 739 } 740 741 protected void listChildren(List<Property> children) { 742 super.listChildren(children); 743 children.add(new Property("definition", "canonical(SearchParameter)", "The definition of the search parameter that describes this part.", 0, 1, definition)); 744 children.add(new Property("expression", "string", "A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.", 0, 1, expression)); 745 } 746 747 @Override 748 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 749 switch (_hash) { 750 case -1014418093: /*definition*/ return new Property("definition", "canonical(SearchParameter)", "The definition of the search parameter that describes this part.", 0, 1, definition); 751 case -1795452264: /*expression*/ return new Property("expression", "string", "A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.", 0, 1, expression); 752 default: return super.getNamedProperty(_hash, _name, _checkValid); 753 } 754 755 } 756 757 @Override 758 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 759 switch (hash) { 760 case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // CanonicalType 761 case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType 762 default: return super.getProperty(hash, name, checkValid); 763 } 764 765 } 766 767 @Override 768 public Base setProperty(int hash, String name, Base value) throws FHIRException { 769 switch (hash) { 770 case -1014418093: // definition 771 this.definition = castToCanonical(value); // CanonicalType 772 return value; 773 case -1795452264: // expression 774 this.expression = castToString(value); // StringType 775 return value; 776 default: return super.setProperty(hash, name, value); 777 } 778 779 } 780 781 @Override 782 public Base setProperty(String name, Base value) throws FHIRException { 783 if (name.equals("definition")) { 784 this.definition = castToCanonical(value); // CanonicalType 785 } else if (name.equals("expression")) { 786 this.expression = castToString(value); // StringType 787 } else 788 return super.setProperty(name, value); 789 return value; 790 } 791 792 @Override 793 public Base makeProperty(int hash, String name) throws FHIRException { 794 switch (hash) { 795 case -1014418093: return getDefinitionElement(); 796 case -1795452264: return getExpressionElement(); 797 default: return super.makeProperty(hash, name); 798 } 799 800 } 801 802 @Override 803 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 804 switch (hash) { 805 case -1014418093: /*definition*/ return new String[] {"canonical"}; 806 case -1795452264: /*expression*/ return new String[] {"string"}; 807 default: return super.getTypesForProperty(hash, name); 808 } 809 810 } 811 812 @Override 813 public Base addChild(String name) throws FHIRException { 814 if (name.equals("definition")) { 815 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.definition"); 816 } 817 else if (name.equals("expression")) { 818 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.expression"); 819 } 820 else 821 return super.addChild(name); 822 } 823 824 public SearchParameterComponentComponent copy() { 825 SearchParameterComponentComponent dst = new SearchParameterComponentComponent(); 826 copyValues(dst); 827 dst.definition = definition == null ? null : definition.copy(); 828 dst.expression = expression == null ? null : expression.copy(); 829 return dst; 830 } 831 832 @Override 833 public boolean equalsDeep(Base other_) { 834 if (!super.equalsDeep(other_)) 835 return false; 836 if (!(other_ instanceof SearchParameterComponentComponent)) 837 return false; 838 SearchParameterComponentComponent o = (SearchParameterComponentComponent) other_; 839 return compareDeep(definition, o.definition, true) && compareDeep(expression, o.expression, true) 840 ; 841 } 842 843 @Override 844 public boolean equalsShallow(Base other_) { 845 if (!super.equalsShallow(other_)) 846 return false; 847 if (!(other_ instanceof SearchParameterComponentComponent)) 848 return false; 849 SearchParameterComponentComponent o = (SearchParameterComponentComponent) other_; 850 return compareValues(expression, o.expression, true); 851 } 852 853 public boolean isEmpty() { 854 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(definition, expression); 855 } 856 857 public String fhirType() { 858 return "SearchParameter.component"; 859 860 } 861 862 } 863 864 /** 865 * Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter. 866 */ 867 @Child(name = "derivedFrom", type = {CanonicalType.class}, order=0, min=0, max=1, modifier=false, summary=false) 868 @Description(shortDefinition="Original definition for the search parameter", formalDefinition="Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter." ) 869 protected CanonicalType derivedFrom; 870 871 /** 872 * Explanation of why this search parameter is needed and why it has been designed as it has. 873 */ 874 @Child(name = "purpose", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=false) 875 @Description(shortDefinition="Why this search parameter is defined", formalDefinition="Explanation of why this search parameter is needed and why it has been designed as it has." ) 876 protected MarkdownType purpose; 877 878 /** 879 * The code used in the URL or the parameter name in a parameters resource for this search parameter. 880 */ 881 @Child(name = "code", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true) 882 @Description(shortDefinition="Code used in URL", formalDefinition="The code used in the URL or the parameter name in a parameters resource for this search parameter." ) 883 protected CodeType code; 884 885 /** 886 * The base resource type(s) that this search parameter can be used against. 887 */ 888 @Child(name = "base", type = {CodeType.class}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 889 @Description(shortDefinition="The resource type(s) this search parameter applies to", formalDefinition="The base resource type(s) that this search parameter can be used against." ) 890 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types") 891 protected List<CodeType> base; 892 893 /** 894 * The type of value a search parameter refers to, and how the content is interpreted. 895 */ 896 @Child(name = "type", type = {CodeType.class}, order=4, min=1, max=1, modifier=false, summary=true) 897 @Description(shortDefinition="number | date | string | token | reference | composite | quantity | uri", formalDefinition="The type of value a search parameter refers to, and how the content is interpreted." ) 898 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/search-param-type") 899 protected Enumeration<SearchParamType> type; 900 901 /** 902 * A FHIRPath expression that returns a set of elements for the search parameter. 903 */ 904 @Child(name = "expression", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) 905 @Description(shortDefinition="FHIRPath expression that extracts the values", formalDefinition="A FHIRPath expression that returns a set of elements for the search parameter." ) 906 protected StringType expression; 907 908 /** 909 * An XPath expression that returns a set of elements for the search parameter. 910 */ 911 @Child(name = "xpath", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) 912 @Description(shortDefinition="XPath that extracts the values", formalDefinition="An XPath expression that returns a set of elements for the search parameter." ) 913 protected StringType xpath; 914 915 /** 916 * How the search parameter relates to the set of elements returned by evaluating the xpath query. 917 */ 918 @Child(name = "xpathUsage", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=false) 919 @Description(shortDefinition="normal | phonetic | nearby | distance | other", formalDefinition="How the search parameter relates to the set of elements returned by evaluating the xpath query." ) 920 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/search-xpath-usage") 921 protected Enumeration<XPathUsageType> xpathUsage; 922 923 /** 924 * Types of resource (if a resource is referenced). 925 */ 926 @Child(name = "target", type = {CodeType.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 927 @Description(shortDefinition="Types of resource (if a resource reference)", formalDefinition="Types of resource (if a resource is referenced)." ) 928 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types") 929 protected List<CodeType> target; 930 931 /** 932 * Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match. 933 */ 934 @Child(name = "multipleOr", type = {BooleanType.class}, order=9, min=0, max=1, modifier=false, summary=false) 935 @Description(shortDefinition="Allow multiple values per parameter (or)", formalDefinition="Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match." ) 936 protected BooleanType multipleOr; 937 938 /** 939 * Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match. 940 */ 941 @Child(name = "multipleAnd", type = {BooleanType.class}, order=10, min=0, max=1, modifier=false, summary=false) 942 @Description(shortDefinition="Allow multiple parameters (and)", formalDefinition="Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match." ) 943 protected BooleanType multipleAnd; 944 945 /** 946 * Comparators supported for the search parameter. 947 */ 948 @Child(name = "comparator", type = {CodeType.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 949 @Description(shortDefinition="eq | ne | gt | lt | ge | le | sa | eb | ap", formalDefinition="Comparators supported for the search parameter." ) 950 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/search-comparator") 951 protected List<Enumeration<SearchComparator>> comparator; 952 953 /** 954 * A modifier supported for the search parameter. 955 */ 956 @Child(name = "modifier", type = {CodeType.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 957 @Description(shortDefinition="missing | exact | contains | not | text | in | not-in | below | above | type", formalDefinition="A modifier supported for the search parameter." ) 958 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/search-modifier-code") 959 protected List<Enumeration<SearchModifierCode>> modifier; 960 961 /** 962 * Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type. 963 */ 964 @Child(name = "chain", type = {StringType.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 965 @Description(shortDefinition="Chained names supported", formalDefinition="Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type." ) 966 protected List<StringType> chain; 967 968 /** 969 * Used to define the parts of a composite search parameter. 970 */ 971 @Child(name = "component", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 972 @Description(shortDefinition="For Composite resources to define the parts", formalDefinition="Used to define the parts of a composite search parameter." ) 973 protected List<SearchParameterComponentComponent> component; 974 975 private static final long serialVersionUID = -533803519L; 976 977 /** 978 * Constructor 979 */ 980 public SearchParameter() { 981 super(); 982 } 983 984 /** 985 * Constructor 986 */ 987 public SearchParameter(UriType url, StringType name, Enumeration<PublicationStatus> status, MarkdownType description, CodeType code, Enumeration<SearchParamType> type) { 988 super(); 989 this.url = url; 990 this.name = name; 991 this.status = status; 992 this.description = description; 993 this.code = code; 994 this.type = type; 995 } 996 997 /** 998 * @return {@link #url} (An absolute URI that is used to identify this search parameter 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 search parameter is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 999 */ 1000 public UriType getUrlElement() { 1001 if (this.url == null) 1002 if (Configuration.errorOnAutoCreate()) 1003 throw new Error("Attempt to auto-create SearchParameter.url"); 1004 else if (Configuration.doAutoCreate()) 1005 this.url = new UriType(); // bb 1006 return this.url; 1007 } 1008 1009 public boolean hasUrlElement() { 1010 return this.url != null && !this.url.isEmpty(); 1011 } 1012 1013 public boolean hasUrl() { 1014 return this.url != null && !this.url.isEmpty(); 1015 } 1016 1017 /** 1018 * @param value {@link #url} (An absolute URI that is used to identify this search parameter 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 search parameter is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 1019 */ 1020 public SearchParameter setUrlElement(UriType value) { 1021 this.url = value; 1022 return this; 1023 } 1024 1025 /** 1026 * @return An absolute URI that is used to identify this search parameter 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 search parameter is (or will be) published. 1027 */ 1028 public String getUrl() { 1029 return this.url == null ? null : this.url.getValue(); 1030 } 1031 1032 /** 1033 * @param value An absolute URI that is used to identify this search parameter 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 search parameter is (or will be) published. 1034 */ 1035 public SearchParameter setUrl(String value) { 1036 if (this.url == null) 1037 this.url = new UriType(); 1038 this.url.setValue(value); 1039 return this; 1040 } 1041 1042 /** 1043 * @return {@link #version} (The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter 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 the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 1044 */ 1045 public StringType getVersionElement() { 1046 if (this.version == null) 1047 if (Configuration.errorOnAutoCreate()) 1048 throw new Error("Attempt to auto-create SearchParameter.version"); 1049 else if (Configuration.doAutoCreate()) 1050 this.version = new StringType(); // bb 1051 return this.version; 1052 } 1053 1054 public boolean hasVersionElement() { 1055 return this.version != null && !this.version.isEmpty(); 1056 } 1057 1058 public boolean hasVersion() { 1059 return this.version != null && !this.version.isEmpty(); 1060 } 1061 1062 /** 1063 * @param value {@link #version} (The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter 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 the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 1064 */ 1065 public SearchParameter setVersionElement(StringType value) { 1066 this.version = value; 1067 return this; 1068 } 1069 1070 /** 1071 * @return The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter 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. 1072 */ 1073 public String getVersion() { 1074 return this.version == null ? null : this.version.getValue(); 1075 } 1076 1077 /** 1078 * @param value The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter 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. 1079 */ 1080 public SearchParameter setVersion(String value) { 1081 if (Utilities.noString(value)) 1082 this.version = null; 1083 else { 1084 if (this.version == null) 1085 this.version = new StringType(); 1086 this.version.setValue(value); 1087 } 1088 return this; 1089 } 1090 1091 /** 1092 * @return {@link #name} (A natural language name identifying the search parameter. 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 1093 */ 1094 public StringType getNameElement() { 1095 if (this.name == null) 1096 if (Configuration.errorOnAutoCreate()) 1097 throw new Error("Attempt to auto-create SearchParameter.name"); 1098 else if (Configuration.doAutoCreate()) 1099 this.name = new StringType(); // bb 1100 return this.name; 1101 } 1102 1103 public boolean hasNameElement() { 1104 return this.name != null && !this.name.isEmpty(); 1105 } 1106 1107 public boolean hasName() { 1108 return this.name != null && !this.name.isEmpty(); 1109 } 1110 1111 /** 1112 * @param value {@link #name} (A natural language name identifying the search parameter. 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 1113 */ 1114 public SearchParameter setNameElement(StringType value) { 1115 this.name = value; 1116 return this; 1117 } 1118 1119 /** 1120 * @return A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation. 1121 */ 1122 public String getName() { 1123 return this.name == null ? null : this.name.getValue(); 1124 } 1125 1126 /** 1127 * @param value A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation. 1128 */ 1129 public SearchParameter setName(String value) { 1130 if (this.name == null) 1131 this.name = new StringType(); 1132 this.name.setValue(value); 1133 return this; 1134 } 1135 1136 /** 1137 * @return {@link #derivedFrom} (Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.). This is the underlying object with id, value and extensions. The accessor "getDerivedFrom" gives direct access to the value 1138 */ 1139 public CanonicalType getDerivedFromElement() { 1140 if (this.derivedFrom == null) 1141 if (Configuration.errorOnAutoCreate()) 1142 throw new Error("Attempt to auto-create SearchParameter.derivedFrom"); 1143 else if (Configuration.doAutoCreate()) 1144 this.derivedFrom = new CanonicalType(); // bb 1145 return this.derivedFrom; 1146 } 1147 1148 public boolean hasDerivedFromElement() { 1149 return this.derivedFrom != null && !this.derivedFrom.isEmpty(); 1150 } 1151 1152 public boolean hasDerivedFrom() { 1153 return this.derivedFrom != null && !this.derivedFrom.isEmpty(); 1154 } 1155 1156 /** 1157 * @param value {@link #derivedFrom} (Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.). This is the underlying object with id, value and extensions. The accessor "getDerivedFrom" gives direct access to the value 1158 */ 1159 public SearchParameter setDerivedFromElement(CanonicalType value) { 1160 this.derivedFrom = value; 1161 return this; 1162 } 1163 1164 /** 1165 * @return Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter. 1166 */ 1167 public String getDerivedFrom() { 1168 return this.derivedFrom == null ? null : this.derivedFrom.getValue(); 1169 } 1170 1171 /** 1172 * @param value Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter. 1173 */ 1174 public SearchParameter setDerivedFrom(String value) { 1175 if (Utilities.noString(value)) 1176 this.derivedFrom = null; 1177 else { 1178 if (this.derivedFrom == null) 1179 this.derivedFrom = new CanonicalType(); 1180 this.derivedFrom.setValue(value); 1181 } 1182 return this; 1183 } 1184 1185 /** 1186 * @return {@link #status} (The status of this search parameter. 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 1187 */ 1188 public Enumeration<PublicationStatus> getStatusElement() { 1189 if (this.status == null) 1190 if (Configuration.errorOnAutoCreate()) 1191 throw new Error("Attempt to auto-create SearchParameter.status"); 1192 else if (Configuration.doAutoCreate()) 1193 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb 1194 return this.status; 1195 } 1196 1197 public boolean hasStatusElement() { 1198 return this.status != null && !this.status.isEmpty(); 1199 } 1200 1201 public boolean hasStatus() { 1202 return this.status != null && !this.status.isEmpty(); 1203 } 1204 1205 /** 1206 * @param value {@link #status} (The status of this search parameter. 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 1207 */ 1208 public SearchParameter setStatusElement(Enumeration<PublicationStatus> value) { 1209 this.status = value; 1210 return this; 1211 } 1212 1213 /** 1214 * @return The status of this search parameter. Enables tracking the life-cycle of the content. 1215 */ 1216 public PublicationStatus getStatus() { 1217 return this.status == null ? null : this.status.getValue(); 1218 } 1219 1220 /** 1221 * @param value The status of this search parameter. Enables tracking the life-cycle of the content. 1222 */ 1223 public SearchParameter setStatus(PublicationStatus value) { 1224 if (this.status == null) 1225 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); 1226 this.status.setValue(value); 1227 return this; 1228 } 1229 1230 /** 1231 * @return {@link #experimental} (A Boolean value to indicate that this search parameter 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 1232 */ 1233 public BooleanType getExperimentalElement() { 1234 if (this.experimental == null) 1235 if (Configuration.errorOnAutoCreate()) 1236 throw new Error("Attempt to auto-create SearchParameter.experimental"); 1237 else if (Configuration.doAutoCreate()) 1238 this.experimental = new BooleanType(); // bb 1239 return this.experimental; 1240 } 1241 1242 public boolean hasExperimentalElement() { 1243 return this.experimental != null && !this.experimental.isEmpty(); 1244 } 1245 1246 public boolean hasExperimental() { 1247 return this.experimental != null && !this.experimental.isEmpty(); 1248 } 1249 1250 /** 1251 * @param value {@link #experimental} (A Boolean value to indicate that this search parameter 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 1252 */ 1253 public SearchParameter setExperimentalElement(BooleanType value) { 1254 this.experimental = value; 1255 return this; 1256 } 1257 1258 /** 1259 * @return A Boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage. 1260 */ 1261 public boolean getExperimental() { 1262 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 1263 } 1264 1265 /** 1266 * @param value A Boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage. 1267 */ 1268 public SearchParameter setExperimental(boolean value) { 1269 if (this.experimental == null) 1270 this.experimental = new BooleanType(); 1271 this.experimental.setValue(value); 1272 return this; 1273 } 1274 1275 /** 1276 * @return {@link #date} (The date (and optionally time) when the search parameter 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 search parameter changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 1277 */ 1278 public DateTimeType getDateElement() { 1279 if (this.date == null) 1280 if (Configuration.errorOnAutoCreate()) 1281 throw new Error("Attempt to auto-create SearchParameter.date"); 1282 else if (Configuration.doAutoCreate()) 1283 this.date = new DateTimeType(); // bb 1284 return this.date; 1285 } 1286 1287 public boolean hasDateElement() { 1288 return this.date != null && !this.date.isEmpty(); 1289 } 1290 1291 public boolean hasDate() { 1292 return this.date != null && !this.date.isEmpty(); 1293 } 1294 1295 /** 1296 * @param value {@link #date} (The date (and optionally time) when the search parameter 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 search parameter changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 1297 */ 1298 public SearchParameter setDateElement(DateTimeType value) { 1299 this.date = value; 1300 return this; 1301 } 1302 1303 /** 1304 * @return The date (and optionally time) when the search parameter 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 search parameter changes. 1305 */ 1306 public Date getDate() { 1307 return this.date == null ? null : this.date.getValue(); 1308 } 1309 1310 /** 1311 * @param value The date (and optionally time) when the search parameter 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 search parameter changes. 1312 */ 1313 public SearchParameter setDate(Date value) { 1314 if (value == null) 1315 this.date = null; 1316 else { 1317 if (this.date == null) 1318 this.date = new DateTimeType(); 1319 this.date.setValue(value); 1320 } 1321 return this; 1322 } 1323 1324 /** 1325 * @return {@link #publisher} (The name of the organization or individual that published the search parameter.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 1326 */ 1327 public StringType getPublisherElement() { 1328 if (this.publisher == null) 1329 if (Configuration.errorOnAutoCreate()) 1330 throw new Error("Attempt to auto-create SearchParameter.publisher"); 1331 else if (Configuration.doAutoCreate()) 1332 this.publisher = new StringType(); // bb 1333 return this.publisher; 1334 } 1335 1336 public boolean hasPublisherElement() { 1337 return this.publisher != null && !this.publisher.isEmpty(); 1338 } 1339 1340 public boolean hasPublisher() { 1341 return this.publisher != null && !this.publisher.isEmpty(); 1342 } 1343 1344 /** 1345 * @param value {@link #publisher} (The name of the organization or individual that published the search parameter.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 1346 */ 1347 public SearchParameter setPublisherElement(StringType value) { 1348 this.publisher = value; 1349 return this; 1350 } 1351 1352 /** 1353 * @return The name of the organization or individual that published the search parameter. 1354 */ 1355 public String getPublisher() { 1356 return this.publisher == null ? null : this.publisher.getValue(); 1357 } 1358 1359 /** 1360 * @param value The name of the organization or individual that published the search parameter. 1361 */ 1362 public SearchParameter setPublisher(String value) { 1363 if (Utilities.noString(value)) 1364 this.publisher = null; 1365 else { 1366 if (this.publisher == null) 1367 this.publisher = new StringType(); 1368 this.publisher.setValue(value); 1369 } 1370 return this; 1371 } 1372 1373 /** 1374 * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.) 1375 */ 1376 public List<ContactDetail> getContact() { 1377 if (this.contact == null) 1378 this.contact = new ArrayList<ContactDetail>(); 1379 return this.contact; 1380 } 1381 1382 /** 1383 * @return Returns a reference to <code>this</code> for easy method chaining 1384 */ 1385 public SearchParameter setContact(List<ContactDetail> theContact) { 1386 this.contact = theContact; 1387 return this; 1388 } 1389 1390 public boolean hasContact() { 1391 if (this.contact == null) 1392 return false; 1393 for (ContactDetail item : this.contact) 1394 if (!item.isEmpty()) 1395 return true; 1396 return false; 1397 } 1398 1399 public ContactDetail addContact() { //3 1400 ContactDetail t = new ContactDetail(); 1401 if (this.contact == null) 1402 this.contact = new ArrayList<ContactDetail>(); 1403 this.contact.add(t); 1404 return t; 1405 } 1406 1407 public SearchParameter addContact(ContactDetail t) { //3 1408 if (t == null) 1409 return this; 1410 if (this.contact == null) 1411 this.contact = new ArrayList<ContactDetail>(); 1412 this.contact.add(t); 1413 return this; 1414 } 1415 1416 /** 1417 * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist 1418 */ 1419 public ContactDetail getContactFirstRep() { 1420 if (getContact().isEmpty()) { 1421 addContact(); 1422 } 1423 return getContact().get(0); 1424 } 1425 1426 /** 1427 * @return {@link #description} (A free text natural language description of the search parameter from a consumer's perspective. and how it used.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1428 */ 1429 public MarkdownType getDescriptionElement() { 1430 if (this.description == null) 1431 if (Configuration.errorOnAutoCreate()) 1432 throw new Error("Attempt to auto-create SearchParameter.description"); 1433 else if (Configuration.doAutoCreate()) 1434 this.description = new MarkdownType(); // bb 1435 return this.description; 1436 } 1437 1438 public boolean hasDescriptionElement() { 1439 return this.description != null && !this.description.isEmpty(); 1440 } 1441 1442 public boolean hasDescription() { 1443 return this.description != null && !this.description.isEmpty(); 1444 } 1445 1446 /** 1447 * @param value {@link #description} (A free text natural language description of the search parameter from a consumer's perspective. and how it used.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1448 */ 1449 public SearchParameter setDescriptionElement(MarkdownType value) { 1450 this.description = value; 1451 return this; 1452 } 1453 1454 /** 1455 * @return A free text natural language description of the search parameter from a consumer's perspective. and how it used. 1456 */ 1457 public String getDescription() { 1458 return this.description == null ? null : this.description.getValue(); 1459 } 1460 1461 /** 1462 * @param value A free text natural language description of the search parameter from a consumer's perspective. and how it used. 1463 */ 1464 public SearchParameter setDescription(String value) { 1465 if (this.description == null) 1466 this.description = new MarkdownType(); 1467 this.description.setValue(value); 1468 return this; 1469 } 1470 1471 /** 1472 * @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 search parameter instances.) 1473 */ 1474 public List<UsageContext> getUseContext() { 1475 if (this.useContext == null) 1476 this.useContext = new ArrayList<UsageContext>(); 1477 return this.useContext; 1478 } 1479 1480 /** 1481 * @return Returns a reference to <code>this</code> for easy method chaining 1482 */ 1483 public SearchParameter setUseContext(List<UsageContext> theUseContext) { 1484 this.useContext = theUseContext; 1485 return this; 1486 } 1487 1488 public boolean hasUseContext() { 1489 if (this.useContext == null) 1490 return false; 1491 for (UsageContext item : this.useContext) 1492 if (!item.isEmpty()) 1493 return true; 1494 return false; 1495 } 1496 1497 public UsageContext addUseContext() { //3 1498 UsageContext t = new UsageContext(); 1499 if (this.useContext == null) 1500 this.useContext = new ArrayList<UsageContext>(); 1501 this.useContext.add(t); 1502 return t; 1503 } 1504 1505 public SearchParameter addUseContext(UsageContext t) { //3 1506 if (t == null) 1507 return this; 1508 if (this.useContext == null) 1509 this.useContext = new ArrayList<UsageContext>(); 1510 this.useContext.add(t); 1511 return this; 1512 } 1513 1514 /** 1515 * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist 1516 */ 1517 public UsageContext getUseContextFirstRep() { 1518 if (getUseContext().isEmpty()) { 1519 addUseContext(); 1520 } 1521 return getUseContext().get(0); 1522 } 1523 1524 /** 1525 * @return {@link #jurisdiction} (A legal or geographic region in which the search parameter is intended to be used.) 1526 */ 1527 public List<CodeableConcept> getJurisdiction() { 1528 if (this.jurisdiction == null) 1529 this.jurisdiction = new ArrayList<CodeableConcept>(); 1530 return this.jurisdiction; 1531 } 1532 1533 /** 1534 * @return Returns a reference to <code>this</code> for easy method chaining 1535 */ 1536 public SearchParameter setJurisdiction(List<CodeableConcept> theJurisdiction) { 1537 this.jurisdiction = theJurisdiction; 1538 return this; 1539 } 1540 1541 public boolean hasJurisdiction() { 1542 if (this.jurisdiction == null) 1543 return false; 1544 for (CodeableConcept item : this.jurisdiction) 1545 if (!item.isEmpty()) 1546 return true; 1547 return false; 1548 } 1549 1550 public CodeableConcept addJurisdiction() { //3 1551 CodeableConcept t = new CodeableConcept(); 1552 if (this.jurisdiction == null) 1553 this.jurisdiction = new ArrayList<CodeableConcept>(); 1554 this.jurisdiction.add(t); 1555 return t; 1556 } 1557 1558 public SearchParameter addJurisdiction(CodeableConcept t) { //3 1559 if (t == null) 1560 return this; 1561 if (this.jurisdiction == null) 1562 this.jurisdiction = new ArrayList<CodeableConcept>(); 1563 this.jurisdiction.add(t); 1564 return this; 1565 } 1566 1567 /** 1568 * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist 1569 */ 1570 public CodeableConcept getJurisdictionFirstRep() { 1571 if (getJurisdiction().isEmpty()) { 1572 addJurisdiction(); 1573 } 1574 return getJurisdiction().get(0); 1575 } 1576 1577 /** 1578 * @return {@link #purpose} (Explanation of why this search parameter 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 1579 */ 1580 public MarkdownType getPurposeElement() { 1581 if (this.purpose == null) 1582 if (Configuration.errorOnAutoCreate()) 1583 throw new Error("Attempt to auto-create SearchParameter.purpose"); 1584 else if (Configuration.doAutoCreate()) 1585 this.purpose = new MarkdownType(); // bb 1586 return this.purpose; 1587 } 1588 1589 public boolean hasPurposeElement() { 1590 return this.purpose != null && !this.purpose.isEmpty(); 1591 } 1592 1593 public boolean hasPurpose() { 1594 return this.purpose != null && !this.purpose.isEmpty(); 1595 } 1596 1597 /** 1598 * @param value {@link #purpose} (Explanation of why this search parameter 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 1599 */ 1600 public SearchParameter setPurposeElement(MarkdownType value) { 1601 this.purpose = value; 1602 return this; 1603 } 1604 1605 /** 1606 * @return Explanation of why this search parameter is needed and why it has been designed as it has. 1607 */ 1608 public String getPurpose() { 1609 return this.purpose == null ? null : this.purpose.getValue(); 1610 } 1611 1612 /** 1613 * @param value Explanation of why this search parameter is needed and why it has been designed as it has. 1614 */ 1615 public SearchParameter setPurpose(String value) { 1616 if (value == null) 1617 this.purpose = null; 1618 else { 1619 if (this.purpose == null) 1620 this.purpose = new MarkdownType(); 1621 this.purpose.setValue(value); 1622 } 1623 return this; 1624 } 1625 1626 /** 1627 * @return {@link #code} (The code used in the URL or the parameter name in a parameters resource for this search parameter.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 1628 */ 1629 public CodeType getCodeElement() { 1630 if (this.code == null) 1631 if (Configuration.errorOnAutoCreate()) 1632 throw new Error("Attempt to auto-create SearchParameter.code"); 1633 else if (Configuration.doAutoCreate()) 1634 this.code = new CodeType(); // bb 1635 return this.code; 1636 } 1637 1638 public boolean hasCodeElement() { 1639 return this.code != null && !this.code.isEmpty(); 1640 } 1641 1642 public boolean hasCode() { 1643 return this.code != null && !this.code.isEmpty(); 1644 } 1645 1646 /** 1647 * @param value {@link #code} (The code used in the URL or the parameter name in a parameters resource for this search parameter.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 1648 */ 1649 public SearchParameter setCodeElement(CodeType value) { 1650 this.code = value; 1651 return this; 1652 } 1653 1654 /** 1655 * @return The code used in the URL or the parameter name in a parameters resource for this search parameter. 1656 */ 1657 public String getCode() { 1658 return this.code == null ? null : this.code.getValue(); 1659 } 1660 1661 /** 1662 * @param value The code used in the URL or the parameter name in a parameters resource for this search parameter. 1663 */ 1664 public SearchParameter setCode(String value) { 1665 if (this.code == null) 1666 this.code = new CodeType(); 1667 this.code.setValue(value); 1668 return this; 1669 } 1670 1671 /** 1672 * @return {@link #base} (The base resource type(s) that this search parameter can be used against.) 1673 */ 1674 public List<CodeType> getBase() { 1675 if (this.base == null) 1676 this.base = new ArrayList<CodeType>(); 1677 return this.base; 1678 } 1679 1680 /** 1681 * @return Returns a reference to <code>this</code> for easy method chaining 1682 */ 1683 public SearchParameter setBase(List<CodeType> theBase) { 1684 this.base = theBase; 1685 return this; 1686 } 1687 1688 public boolean hasBase() { 1689 if (this.base == null) 1690 return false; 1691 for (CodeType item : this.base) 1692 if (!item.isEmpty()) 1693 return true; 1694 return false; 1695 } 1696 1697 /** 1698 * @return {@link #base} (The base resource type(s) that this search parameter can be used against.) 1699 */ 1700 public CodeType addBaseElement() {//2 1701 CodeType t = new CodeType(); 1702 if (this.base == null) 1703 this.base = new ArrayList<CodeType>(); 1704 this.base.add(t); 1705 return t; 1706 } 1707 1708 /** 1709 * @param value {@link #base} (The base resource type(s) that this search parameter can be used against.) 1710 */ 1711 public SearchParameter addBase(String value) { //1 1712 CodeType t = new CodeType(); 1713 t.setValue(value); 1714 if (this.base == null) 1715 this.base = new ArrayList<CodeType>(); 1716 this.base.add(t); 1717 return this; 1718 } 1719 1720 /** 1721 * @param value {@link #base} (The base resource type(s) that this search parameter can be used against.) 1722 */ 1723 public boolean hasBase(String value) { 1724 if (this.base == null) 1725 return false; 1726 for (CodeType v : this.base) 1727 if (v.getValue().equals(value)) // code 1728 return true; 1729 return false; 1730 } 1731 1732 /** 1733 * @return {@link #type} (The type of value a search parameter refers to, and how the content is interpreted.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1734 */ 1735 public Enumeration<SearchParamType> getTypeElement() { 1736 if (this.type == null) 1737 if (Configuration.errorOnAutoCreate()) 1738 throw new Error("Attempt to auto-create SearchParameter.type"); 1739 else if (Configuration.doAutoCreate()) 1740 this.type = new Enumeration<SearchParamType>(new SearchParamTypeEnumFactory()); // bb 1741 return this.type; 1742 } 1743 1744 public boolean hasTypeElement() { 1745 return this.type != null && !this.type.isEmpty(); 1746 } 1747 1748 public boolean hasType() { 1749 return this.type != null && !this.type.isEmpty(); 1750 } 1751 1752 /** 1753 * @param value {@link #type} (The type of value a search parameter refers to, and how the content is interpreted.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1754 */ 1755 public SearchParameter setTypeElement(Enumeration<SearchParamType> value) { 1756 this.type = value; 1757 return this; 1758 } 1759 1760 /** 1761 * @return The type of value a search parameter refers to, and how the content is interpreted. 1762 */ 1763 public SearchParamType getType() { 1764 return this.type == null ? null : this.type.getValue(); 1765 } 1766 1767 /** 1768 * @param value The type of value a search parameter refers to, and how the content is interpreted. 1769 */ 1770 public SearchParameter setType(SearchParamType value) { 1771 if (this.type == null) 1772 this.type = new Enumeration<SearchParamType>(new SearchParamTypeEnumFactory()); 1773 this.type.setValue(value); 1774 return this; 1775 } 1776 1777 /** 1778 * @return {@link #expression} (A FHIRPath expression that returns a set of elements for the search parameter.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value 1779 */ 1780 public StringType getExpressionElement() { 1781 if (this.expression == null) 1782 if (Configuration.errorOnAutoCreate()) 1783 throw new Error("Attempt to auto-create SearchParameter.expression"); 1784 else if (Configuration.doAutoCreate()) 1785 this.expression = new StringType(); // bb 1786 return this.expression; 1787 } 1788 1789 public boolean hasExpressionElement() { 1790 return this.expression != null && !this.expression.isEmpty(); 1791 } 1792 1793 public boolean hasExpression() { 1794 return this.expression != null && !this.expression.isEmpty(); 1795 } 1796 1797 /** 1798 * @param value {@link #expression} (A FHIRPath expression that returns a set of elements for the search parameter.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value 1799 */ 1800 public SearchParameter setExpressionElement(StringType value) { 1801 this.expression = value; 1802 return this; 1803 } 1804 1805 /** 1806 * @return A FHIRPath expression that returns a set of elements for the search parameter. 1807 */ 1808 public String getExpression() { 1809 return this.expression == null ? null : this.expression.getValue(); 1810 } 1811 1812 /** 1813 * @param value A FHIRPath expression that returns a set of elements for the search parameter. 1814 */ 1815 public SearchParameter setExpression(String value) { 1816 if (Utilities.noString(value)) 1817 this.expression = null; 1818 else { 1819 if (this.expression == null) 1820 this.expression = new StringType(); 1821 this.expression.setValue(value); 1822 } 1823 return this; 1824 } 1825 1826 /** 1827 * @return {@link #xpath} (An XPath expression that returns a set of elements for the search parameter.). This is the underlying object with id, value and extensions. The accessor "getXpath" gives direct access to the value 1828 */ 1829 public StringType getXpathElement() { 1830 if (this.xpath == null) 1831 if (Configuration.errorOnAutoCreate()) 1832 throw new Error("Attempt to auto-create SearchParameter.xpath"); 1833 else if (Configuration.doAutoCreate()) 1834 this.xpath = new StringType(); // bb 1835 return this.xpath; 1836 } 1837 1838 public boolean hasXpathElement() { 1839 return this.xpath != null && !this.xpath.isEmpty(); 1840 } 1841 1842 public boolean hasXpath() { 1843 return this.xpath != null && !this.xpath.isEmpty(); 1844 } 1845 1846 /** 1847 * @param value {@link #xpath} (An XPath expression that returns a set of elements for the search parameter.). This is the underlying object with id, value and extensions. The accessor "getXpath" gives direct access to the value 1848 */ 1849 public SearchParameter setXpathElement(StringType value) { 1850 this.xpath = value; 1851 return this; 1852 } 1853 1854 /** 1855 * @return An XPath expression that returns a set of elements for the search parameter. 1856 */ 1857 public String getXpath() { 1858 return this.xpath == null ? null : this.xpath.getValue(); 1859 } 1860 1861 /** 1862 * @param value An XPath expression that returns a set of elements for the search parameter. 1863 */ 1864 public SearchParameter setXpath(String value) { 1865 if (Utilities.noString(value)) 1866 this.xpath = null; 1867 else { 1868 if (this.xpath == null) 1869 this.xpath = new StringType(); 1870 this.xpath.setValue(value); 1871 } 1872 return this; 1873 } 1874 1875 /** 1876 * @return {@link #xpathUsage} (How the search parameter relates to the set of elements returned by evaluating the xpath query.). This is the underlying object with id, value and extensions. The accessor "getXpathUsage" gives direct access to the value 1877 */ 1878 public Enumeration<XPathUsageType> getXpathUsageElement() { 1879 if (this.xpathUsage == null) 1880 if (Configuration.errorOnAutoCreate()) 1881 throw new Error("Attempt to auto-create SearchParameter.xpathUsage"); 1882 else if (Configuration.doAutoCreate()) 1883 this.xpathUsage = new Enumeration<XPathUsageType>(new XPathUsageTypeEnumFactory()); // bb 1884 return this.xpathUsage; 1885 } 1886 1887 public boolean hasXpathUsageElement() { 1888 return this.xpathUsage != null && !this.xpathUsage.isEmpty(); 1889 } 1890 1891 public boolean hasXpathUsage() { 1892 return this.xpathUsage != null && !this.xpathUsage.isEmpty(); 1893 } 1894 1895 /** 1896 * @param value {@link #xpathUsage} (How the search parameter relates to the set of elements returned by evaluating the xpath query.). This is the underlying object with id, value and extensions. The accessor "getXpathUsage" gives direct access to the value 1897 */ 1898 public SearchParameter setXpathUsageElement(Enumeration<XPathUsageType> value) { 1899 this.xpathUsage = value; 1900 return this; 1901 } 1902 1903 /** 1904 * @return How the search parameter relates to the set of elements returned by evaluating the xpath query. 1905 */ 1906 public XPathUsageType getXpathUsage() { 1907 return this.xpathUsage == null ? null : this.xpathUsage.getValue(); 1908 } 1909 1910 /** 1911 * @param value How the search parameter relates to the set of elements returned by evaluating the xpath query. 1912 */ 1913 public SearchParameter setXpathUsage(XPathUsageType value) { 1914 if (value == null) 1915 this.xpathUsage = null; 1916 else { 1917 if (this.xpathUsage == null) 1918 this.xpathUsage = new Enumeration<XPathUsageType>(new XPathUsageTypeEnumFactory()); 1919 this.xpathUsage.setValue(value); 1920 } 1921 return this; 1922 } 1923 1924 /** 1925 * @return {@link #target} (Types of resource (if a resource is referenced).) 1926 */ 1927 public List<CodeType> getTarget() { 1928 if (this.target == null) 1929 this.target = new ArrayList<CodeType>(); 1930 return this.target; 1931 } 1932 1933 /** 1934 * @return Returns a reference to <code>this</code> for easy method chaining 1935 */ 1936 public SearchParameter setTarget(List<CodeType> theTarget) { 1937 this.target = theTarget; 1938 return this; 1939 } 1940 1941 public boolean hasTarget() { 1942 if (this.target == null) 1943 return false; 1944 for (CodeType item : this.target) 1945 if (!item.isEmpty()) 1946 return true; 1947 return false; 1948 } 1949 1950 /** 1951 * @return {@link #target} (Types of resource (if a resource is referenced).) 1952 */ 1953 public CodeType addTargetElement() {//2 1954 CodeType t = new CodeType(); 1955 if (this.target == null) 1956 this.target = new ArrayList<CodeType>(); 1957 this.target.add(t); 1958 return t; 1959 } 1960 1961 /** 1962 * @param value {@link #target} (Types of resource (if a resource is referenced).) 1963 */ 1964 public SearchParameter addTarget(String value) { //1 1965 CodeType t = new CodeType(); 1966 t.setValue(value); 1967 if (this.target == null) 1968 this.target = new ArrayList<CodeType>(); 1969 this.target.add(t); 1970 return this; 1971 } 1972 1973 /** 1974 * @param value {@link #target} (Types of resource (if a resource is referenced).) 1975 */ 1976 public boolean hasTarget(String value) { 1977 if (this.target == null) 1978 return false; 1979 for (CodeType v : this.target) 1980 if (v.getValue().equals(value)) // code 1981 return true; 1982 return false; 1983 } 1984 1985 /** 1986 * @return {@link #multipleOr} (Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match.). This is the underlying object with id, value and extensions. The accessor "getMultipleOr" gives direct access to the value 1987 */ 1988 public BooleanType getMultipleOrElement() { 1989 if (this.multipleOr == null) 1990 if (Configuration.errorOnAutoCreate()) 1991 throw new Error("Attempt to auto-create SearchParameter.multipleOr"); 1992 else if (Configuration.doAutoCreate()) 1993 this.multipleOr = new BooleanType(); // bb 1994 return this.multipleOr; 1995 } 1996 1997 public boolean hasMultipleOrElement() { 1998 return this.multipleOr != null && !this.multipleOr.isEmpty(); 1999 } 2000 2001 public boolean hasMultipleOr() { 2002 return this.multipleOr != null && !this.multipleOr.isEmpty(); 2003 } 2004 2005 /** 2006 * @param value {@link #multipleOr} (Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match.). This is the underlying object with id, value and extensions. The accessor "getMultipleOr" gives direct access to the value 2007 */ 2008 public SearchParameter setMultipleOrElement(BooleanType value) { 2009 this.multipleOr = value; 2010 return this; 2011 } 2012 2013 /** 2014 * @return Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match. 2015 */ 2016 public boolean getMultipleOr() { 2017 return this.multipleOr == null || this.multipleOr.isEmpty() ? false : this.multipleOr.getValue(); 2018 } 2019 2020 /** 2021 * @param value Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match. 2022 */ 2023 public SearchParameter setMultipleOr(boolean value) { 2024 if (this.multipleOr == null) 2025 this.multipleOr = new BooleanType(); 2026 this.multipleOr.setValue(value); 2027 return this; 2028 } 2029 2030 /** 2031 * @return {@link #multipleAnd} (Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match.). This is the underlying object with id, value and extensions. The accessor "getMultipleAnd" gives direct access to the value 2032 */ 2033 public BooleanType getMultipleAndElement() { 2034 if (this.multipleAnd == null) 2035 if (Configuration.errorOnAutoCreate()) 2036 throw new Error("Attempt to auto-create SearchParameter.multipleAnd"); 2037 else if (Configuration.doAutoCreate()) 2038 this.multipleAnd = new BooleanType(); // bb 2039 return this.multipleAnd; 2040 } 2041 2042 public boolean hasMultipleAndElement() { 2043 return this.multipleAnd != null && !this.multipleAnd.isEmpty(); 2044 } 2045 2046 public boolean hasMultipleAnd() { 2047 return this.multipleAnd != null && !this.multipleAnd.isEmpty(); 2048 } 2049 2050 /** 2051 * @param value {@link #multipleAnd} (Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match.). This is the underlying object with id, value and extensions. The accessor "getMultipleAnd" gives direct access to the value 2052 */ 2053 public SearchParameter setMultipleAndElement(BooleanType value) { 2054 this.multipleAnd = value; 2055 return this; 2056 } 2057 2058 /** 2059 * @return Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match. 2060 */ 2061 public boolean getMultipleAnd() { 2062 return this.multipleAnd == null || this.multipleAnd.isEmpty() ? false : this.multipleAnd.getValue(); 2063 } 2064 2065 /** 2066 * @param value Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match. 2067 */ 2068 public SearchParameter setMultipleAnd(boolean value) { 2069 if (this.multipleAnd == null) 2070 this.multipleAnd = new BooleanType(); 2071 this.multipleAnd.setValue(value); 2072 return this; 2073 } 2074 2075 /** 2076 * @return {@link #comparator} (Comparators supported for the search parameter.) 2077 */ 2078 public List<Enumeration<SearchComparator>> getComparator() { 2079 if (this.comparator == null) 2080 this.comparator = new ArrayList<Enumeration<SearchComparator>>(); 2081 return this.comparator; 2082 } 2083 2084 /** 2085 * @return Returns a reference to <code>this</code> for easy method chaining 2086 */ 2087 public SearchParameter setComparator(List<Enumeration<SearchComparator>> theComparator) { 2088 this.comparator = theComparator; 2089 return this; 2090 } 2091 2092 public boolean hasComparator() { 2093 if (this.comparator == null) 2094 return false; 2095 for (Enumeration<SearchComparator> item : this.comparator) 2096 if (!item.isEmpty()) 2097 return true; 2098 return false; 2099 } 2100 2101 /** 2102 * @return {@link #comparator} (Comparators supported for the search parameter.) 2103 */ 2104 public Enumeration<SearchComparator> addComparatorElement() {//2 2105 Enumeration<SearchComparator> t = new Enumeration<SearchComparator>(new SearchComparatorEnumFactory()); 2106 if (this.comparator == null) 2107 this.comparator = new ArrayList<Enumeration<SearchComparator>>(); 2108 this.comparator.add(t); 2109 return t; 2110 } 2111 2112 /** 2113 * @param value {@link #comparator} (Comparators supported for the search parameter.) 2114 */ 2115 public SearchParameter addComparator(SearchComparator value) { //1 2116 Enumeration<SearchComparator> t = new Enumeration<SearchComparator>(new SearchComparatorEnumFactory()); 2117 t.setValue(value); 2118 if (this.comparator == null) 2119 this.comparator = new ArrayList<Enumeration<SearchComparator>>(); 2120 this.comparator.add(t); 2121 return this; 2122 } 2123 2124 /** 2125 * @param value {@link #comparator} (Comparators supported for the search parameter.) 2126 */ 2127 public boolean hasComparator(SearchComparator value) { 2128 if (this.comparator == null) 2129 return false; 2130 for (Enumeration<SearchComparator> v : this.comparator) 2131 if (v.getValue().equals(value)) // code 2132 return true; 2133 return false; 2134 } 2135 2136 /** 2137 * @return {@link #modifier} (A modifier supported for the search parameter.) 2138 */ 2139 public List<Enumeration<SearchModifierCode>> getModifier() { 2140 if (this.modifier == null) 2141 this.modifier = new ArrayList<Enumeration<SearchModifierCode>>(); 2142 return this.modifier; 2143 } 2144 2145 /** 2146 * @return Returns a reference to <code>this</code> for easy method chaining 2147 */ 2148 public SearchParameter setModifier(List<Enumeration<SearchModifierCode>> theModifier) { 2149 this.modifier = theModifier; 2150 return this; 2151 } 2152 2153 public boolean hasModifier() { 2154 if (this.modifier == null) 2155 return false; 2156 for (Enumeration<SearchModifierCode> item : this.modifier) 2157 if (!item.isEmpty()) 2158 return true; 2159 return false; 2160 } 2161 2162 /** 2163 * @return {@link #modifier} (A modifier supported for the search parameter.) 2164 */ 2165 public Enumeration<SearchModifierCode> addModifierElement() {//2 2166 Enumeration<SearchModifierCode> t = new Enumeration<SearchModifierCode>(new SearchModifierCodeEnumFactory()); 2167 if (this.modifier == null) 2168 this.modifier = new ArrayList<Enumeration<SearchModifierCode>>(); 2169 this.modifier.add(t); 2170 return t; 2171 } 2172 2173 /** 2174 * @param value {@link #modifier} (A modifier supported for the search parameter.) 2175 */ 2176 public SearchParameter addModifier(SearchModifierCode value) { //1 2177 Enumeration<SearchModifierCode> t = new Enumeration<SearchModifierCode>(new SearchModifierCodeEnumFactory()); 2178 t.setValue(value); 2179 if (this.modifier == null) 2180 this.modifier = new ArrayList<Enumeration<SearchModifierCode>>(); 2181 this.modifier.add(t); 2182 return this; 2183 } 2184 2185 /** 2186 * @param value {@link #modifier} (A modifier supported for the search parameter.) 2187 */ 2188 public boolean hasModifier(SearchModifierCode value) { 2189 if (this.modifier == null) 2190 return false; 2191 for (Enumeration<SearchModifierCode> v : this.modifier) 2192 if (v.getValue().equals(value)) // code 2193 return true; 2194 return false; 2195 } 2196 2197 /** 2198 * @return {@link #chain} (Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.) 2199 */ 2200 public List<StringType> getChain() { 2201 if (this.chain == null) 2202 this.chain = new ArrayList<StringType>(); 2203 return this.chain; 2204 } 2205 2206 /** 2207 * @return Returns a reference to <code>this</code> for easy method chaining 2208 */ 2209 public SearchParameter setChain(List<StringType> theChain) { 2210 this.chain = theChain; 2211 return this; 2212 } 2213 2214 public boolean hasChain() { 2215 if (this.chain == null) 2216 return false; 2217 for (StringType item : this.chain) 2218 if (!item.isEmpty()) 2219 return true; 2220 return false; 2221 } 2222 2223 /** 2224 * @return {@link #chain} (Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.) 2225 */ 2226 public StringType addChainElement() {//2 2227 StringType t = new StringType(); 2228 if (this.chain == null) 2229 this.chain = new ArrayList<StringType>(); 2230 this.chain.add(t); 2231 return t; 2232 } 2233 2234 /** 2235 * @param value {@link #chain} (Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.) 2236 */ 2237 public SearchParameter addChain(String value) { //1 2238 StringType t = new StringType(); 2239 t.setValue(value); 2240 if (this.chain == null) 2241 this.chain = new ArrayList<StringType>(); 2242 this.chain.add(t); 2243 return this; 2244 } 2245 2246 /** 2247 * @param value {@link #chain} (Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.) 2248 */ 2249 public boolean hasChain(String value) { 2250 if (this.chain == null) 2251 return false; 2252 for (StringType v : this.chain) 2253 if (v.getValue().equals(value)) // string 2254 return true; 2255 return false; 2256 } 2257 2258 /** 2259 * @return {@link #component} (Used to define the parts of a composite search parameter.) 2260 */ 2261 public List<SearchParameterComponentComponent> getComponent() { 2262 if (this.component == null) 2263 this.component = new ArrayList<SearchParameterComponentComponent>(); 2264 return this.component; 2265 } 2266 2267 /** 2268 * @return Returns a reference to <code>this</code> for easy method chaining 2269 */ 2270 public SearchParameter setComponent(List<SearchParameterComponentComponent> theComponent) { 2271 this.component = theComponent; 2272 return this; 2273 } 2274 2275 public boolean hasComponent() { 2276 if (this.component == null) 2277 return false; 2278 for (SearchParameterComponentComponent item : this.component) 2279 if (!item.isEmpty()) 2280 return true; 2281 return false; 2282 } 2283 2284 public SearchParameterComponentComponent addComponent() { //3 2285 SearchParameterComponentComponent t = new SearchParameterComponentComponent(); 2286 if (this.component == null) 2287 this.component = new ArrayList<SearchParameterComponentComponent>(); 2288 this.component.add(t); 2289 return t; 2290 } 2291 2292 public SearchParameter addComponent(SearchParameterComponentComponent t) { //3 2293 if (t == null) 2294 return this; 2295 if (this.component == null) 2296 this.component = new ArrayList<SearchParameterComponentComponent>(); 2297 this.component.add(t); 2298 return this; 2299 } 2300 2301 /** 2302 * @return The first repetition of repeating field {@link #component}, creating it if it does not already exist 2303 */ 2304 public SearchParameterComponentComponent getComponentFirstRep() { 2305 if (getComponent().isEmpty()) { 2306 addComponent(); 2307 } 2308 return getComponent().get(0); 2309 } 2310 2311 protected void listChildren(List<Property> children) { 2312 super.listChildren(children); 2313 children.add(new Property("url", "uri", "An absolute URI that is used to identify this search parameter 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 search parameter is (or will be) published.", 0, 1, url)); 2314 children.add(new Property("version", "string", "The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter 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.", 0, 1, version)); 2315 children.add(new Property("name", "string", "A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name)); 2316 children.add(new Property("derivedFrom", "canonical(SearchParameter)", "Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.", 0, 1, derivedFrom)); 2317 children.add(new Property("status", "code", "The status of this search parameter. Enables tracking the life-cycle of the content.", 0, 1, status)); 2318 children.add(new Property("experimental", "boolean", "A Boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental)); 2319 children.add(new Property("date", "dateTime", "The date (and optionally time) when the search parameter 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 search parameter changes.", 0, 1, date)); 2320 children.add(new Property("publisher", "string", "The name of the organization or individual that published the search parameter.", 0, 1, publisher)); 2321 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)); 2322 children.add(new Property("description", "markdown", "A free text natural language description of the search parameter from a consumer's perspective. and how it used.", 0, 1, description)); 2323 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 search parameter instances.", 0, java.lang.Integer.MAX_VALUE, useContext)); 2324 children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the search parameter is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction)); 2325 children.add(new Property("purpose", "markdown", "Explanation of why this search parameter is needed and why it has been designed as it has.", 0, 1, purpose)); 2326 children.add(new Property("code", "code", "The code used in the URL or the parameter name in a parameters resource for this search parameter.", 0, 1, code)); 2327 children.add(new Property("base", "code", "The base resource type(s) that this search parameter can be used against.", 0, java.lang.Integer.MAX_VALUE, base)); 2328 children.add(new Property("type", "code", "The type of value a search parameter refers to, and how the content is interpreted.", 0, 1, type)); 2329 children.add(new Property("expression", "string", "A FHIRPath expression that returns a set of elements for the search parameter.", 0, 1, expression)); 2330 children.add(new Property("xpath", "string", "An XPath expression that returns a set of elements for the search parameter.", 0, 1, xpath)); 2331 children.add(new Property("xpathUsage", "code", "How the search parameter relates to the set of elements returned by evaluating the xpath query.", 0, 1, xpathUsage)); 2332 children.add(new Property("target", "code", "Types of resource (if a resource is referenced).", 0, java.lang.Integer.MAX_VALUE, target)); 2333 children.add(new Property("multipleOr", "boolean", "Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match.", 0, 1, multipleOr)); 2334 children.add(new Property("multipleAnd", "boolean", "Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match.", 0, 1, multipleAnd)); 2335 children.add(new Property("comparator", "code", "Comparators supported for the search parameter.", 0, java.lang.Integer.MAX_VALUE, comparator)); 2336 children.add(new Property("modifier", "code", "A modifier supported for the search parameter.", 0, java.lang.Integer.MAX_VALUE, modifier)); 2337 children.add(new Property("chain", "string", "Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.", 0, java.lang.Integer.MAX_VALUE, chain)); 2338 children.add(new Property("component", "", "Used to define the parts of a composite search parameter.", 0, java.lang.Integer.MAX_VALUE, component)); 2339 } 2340 2341 @Override 2342 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2343 switch (_hash) { 2344 case 116079: /*url*/ return new Property("url", "uri", "An absolute URI that is used to identify this search parameter 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 search parameter is (or will be) published.", 0, 1, url); 2345 case 351608024: /*version*/ return new Property("version", "string", "The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter 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.", 0, 1, version); 2346 case 3373707: /*name*/ return new Property("name", "string", "A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name); 2347 case 1077922663: /*derivedFrom*/ return new Property("derivedFrom", "canonical(SearchParameter)", "Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.", 0, 1, derivedFrom); 2348 case -892481550: /*status*/ return new Property("status", "code", "The status of this search parameter. Enables tracking the life-cycle of the content.", 0, 1, status); 2349 case -404562712: /*experimental*/ return new Property("experimental", "boolean", "A Boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental); 2350 case 3076014: /*date*/ return new Property("date", "dateTime", "The date (and optionally time) when the search parameter 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 search parameter changes.", 0, 1, date); 2351 case 1447404028: /*publisher*/ return new Property("publisher", "string", "The name of the organization or individual that published the search parameter.", 0, 1, publisher); 2352 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); 2353 case -1724546052: /*description*/ return new Property("description", "markdown", "A free text natural language description of the search parameter from a consumer's perspective. and how it used.", 0, 1, description); 2354 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 search parameter instances.", 0, java.lang.Integer.MAX_VALUE, useContext); 2355 case -507075711: /*jurisdiction*/ return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the search parameter is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction); 2356 case -220463842: /*purpose*/ return new Property("purpose", "markdown", "Explanation of why this search parameter is needed and why it has been designed as it has.", 0, 1, purpose); 2357 case 3059181: /*code*/ return new Property("code", "code", "The code used in the URL or the parameter name in a parameters resource for this search parameter.", 0, 1, code); 2358 case 3016401: /*base*/ return new Property("base", "code", "The base resource type(s) that this search parameter can be used against.", 0, java.lang.Integer.MAX_VALUE, base); 2359 case 3575610: /*type*/ return new Property("type", "code", "The type of value a search parameter refers to, and how the content is interpreted.", 0, 1, type); 2360 case -1795452264: /*expression*/ return new Property("expression", "string", "A FHIRPath expression that returns a set of elements for the search parameter.", 0, 1, expression); 2361 case 114256029: /*xpath*/ return new Property("xpath", "string", "An XPath expression that returns a set of elements for the search parameter.", 0, 1, xpath); 2362 case 1801322244: /*xpathUsage*/ return new Property("xpathUsage", "code", "How the search parameter relates to the set of elements returned by evaluating the xpath query.", 0, 1, xpathUsage); 2363 case -880905839: /*target*/ return new Property("target", "code", "Types of resource (if a resource is referenced).", 0, java.lang.Integer.MAX_VALUE, target); 2364 case 1265069075: /*multipleOr*/ return new Property("multipleOr", "boolean", "Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match.", 0, 1, multipleOr); 2365 case 562422183: /*multipleAnd*/ return new Property("multipleAnd", "boolean", "Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match.", 0, 1, multipleAnd); 2366 case -844673834: /*comparator*/ return new Property("comparator", "code", "Comparators supported for the search parameter.", 0, java.lang.Integer.MAX_VALUE, comparator); 2367 case -615513385: /*modifier*/ return new Property("modifier", "code", "A modifier supported for the search parameter.", 0, java.lang.Integer.MAX_VALUE, modifier); 2368 case 94623425: /*chain*/ return new Property("chain", "string", "Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.", 0, java.lang.Integer.MAX_VALUE, chain); 2369 case -1399907075: /*component*/ return new Property("component", "", "Used to define the parts of a composite search parameter.", 0, java.lang.Integer.MAX_VALUE, component); 2370 default: return super.getNamedProperty(_hash, _name, _checkValid); 2371 } 2372 2373 } 2374 2375 @Override 2376 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2377 switch (hash) { 2378 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 2379 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 2380 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 2381 case 1077922663: /*derivedFrom*/ return this.derivedFrom == null ? new Base[0] : new Base[] {this.derivedFrom}; // CanonicalType 2382 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus> 2383 case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType 2384 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 2385 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType 2386 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail 2387 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType 2388 case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext 2389 case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept 2390 case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType 2391 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType 2392 case 3016401: /*base*/ return this.base == null ? new Base[0] : this.base.toArray(new Base[this.base.size()]); // CodeType 2393 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<SearchParamType> 2394 case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType 2395 case 114256029: /*xpath*/ return this.xpath == null ? new Base[0] : new Base[] {this.xpath}; // StringType 2396 case 1801322244: /*xpathUsage*/ return this.xpathUsage == null ? new Base[0] : new Base[] {this.xpathUsage}; // Enumeration<XPathUsageType> 2397 case -880905839: /*target*/ return this.target == null ? new Base[0] : this.target.toArray(new Base[this.target.size()]); // CodeType 2398 case 1265069075: /*multipleOr*/ return this.multipleOr == null ? new Base[0] : new Base[] {this.multipleOr}; // BooleanType 2399 case 562422183: /*multipleAnd*/ return this.multipleAnd == null ? new Base[0] : new Base[] {this.multipleAnd}; // BooleanType 2400 case -844673834: /*comparator*/ return this.comparator == null ? new Base[0] : this.comparator.toArray(new Base[this.comparator.size()]); // Enumeration<SearchComparator> 2401 case -615513385: /*modifier*/ return this.modifier == null ? new Base[0] : this.modifier.toArray(new Base[this.modifier.size()]); // Enumeration<SearchModifierCode> 2402 case 94623425: /*chain*/ return this.chain == null ? new Base[0] : this.chain.toArray(new Base[this.chain.size()]); // StringType 2403 case -1399907075: /*component*/ return this.component == null ? new Base[0] : this.component.toArray(new Base[this.component.size()]); // SearchParameterComponentComponent 2404 default: return super.getProperty(hash, name, checkValid); 2405 } 2406 2407 } 2408 2409 @Override 2410 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2411 switch (hash) { 2412 case 116079: // url 2413 this.url = castToUri(value); // UriType 2414 return value; 2415 case 351608024: // version 2416 this.version = castToString(value); // StringType 2417 return value; 2418 case 3373707: // name 2419 this.name = castToString(value); // StringType 2420 return value; 2421 case 1077922663: // derivedFrom 2422 this.derivedFrom = castToCanonical(value); // CanonicalType 2423 return value; 2424 case -892481550: // status 2425 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 2426 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 2427 return value; 2428 case -404562712: // experimental 2429 this.experimental = castToBoolean(value); // BooleanType 2430 return value; 2431 case 3076014: // date 2432 this.date = castToDateTime(value); // DateTimeType 2433 return value; 2434 case 1447404028: // publisher 2435 this.publisher = castToString(value); // StringType 2436 return value; 2437 case 951526432: // contact 2438 this.getContact().add(castToContactDetail(value)); // ContactDetail 2439 return value; 2440 case -1724546052: // description 2441 this.description = castToMarkdown(value); // MarkdownType 2442 return value; 2443 case -669707736: // useContext 2444 this.getUseContext().add(castToUsageContext(value)); // UsageContext 2445 return value; 2446 case -507075711: // jurisdiction 2447 this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept 2448 return value; 2449 case -220463842: // purpose 2450 this.purpose = castToMarkdown(value); // MarkdownType 2451 return value; 2452 case 3059181: // code 2453 this.code = castToCode(value); // CodeType 2454 return value; 2455 case 3016401: // base 2456 this.getBase().add(castToCode(value)); // CodeType 2457 return value; 2458 case 3575610: // type 2459 value = new SearchParamTypeEnumFactory().fromType(castToCode(value)); 2460 this.type = (Enumeration) value; // Enumeration<SearchParamType> 2461 return value; 2462 case -1795452264: // expression 2463 this.expression = castToString(value); // StringType 2464 return value; 2465 case 114256029: // xpath 2466 this.xpath = castToString(value); // StringType 2467 return value; 2468 case 1801322244: // xpathUsage 2469 value = new XPathUsageTypeEnumFactory().fromType(castToCode(value)); 2470 this.xpathUsage = (Enumeration) value; // Enumeration<XPathUsageType> 2471 return value; 2472 case -880905839: // target 2473 this.getTarget().add(castToCode(value)); // CodeType 2474 return value; 2475 case 1265069075: // multipleOr 2476 this.multipleOr = castToBoolean(value); // BooleanType 2477 return value; 2478 case 562422183: // multipleAnd 2479 this.multipleAnd = castToBoolean(value); // BooleanType 2480 return value; 2481 case -844673834: // comparator 2482 value = new SearchComparatorEnumFactory().fromType(castToCode(value)); 2483 this.getComparator().add((Enumeration) value); // Enumeration<SearchComparator> 2484 return value; 2485 case -615513385: // modifier 2486 value = new SearchModifierCodeEnumFactory().fromType(castToCode(value)); 2487 this.getModifier().add((Enumeration) value); // Enumeration<SearchModifierCode> 2488 return value; 2489 case 94623425: // chain 2490 this.getChain().add(castToString(value)); // StringType 2491 return value; 2492 case -1399907075: // component 2493 this.getComponent().add((SearchParameterComponentComponent) value); // SearchParameterComponentComponent 2494 return value; 2495 default: return super.setProperty(hash, name, value); 2496 } 2497 2498 } 2499 2500 @Override 2501 public Base setProperty(String name, Base value) throws FHIRException { 2502 if (name.equals("url")) { 2503 this.url = castToUri(value); // UriType 2504 } else if (name.equals("version")) { 2505 this.version = castToString(value); // StringType 2506 } else if (name.equals("name")) { 2507 this.name = castToString(value); // StringType 2508 } else if (name.equals("derivedFrom")) { 2509 this.derivedFrom = castToCanonical(value); // CanonicalType 2510 } else if (name.equals("status")) { 2511 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 2512 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 2513 } else if (name.equals("experimental")) { 2514 this.experimental = castToBoolean(value); // BooleanType 2515 } else if (name.equals("date")) { 2516 this.date = castToDateTime(value); // DateTimeType 2517 } else if (name.equals("publisher")) { 2518 this.publisher = castToString(value); // StringType 2519 } else if (name.equals("contact")) { 2520 this.getContact().add(castToContactDetail(value)); 2521 } else if (name.equals("description")) { 2522 this.description = castToMarkdown(value); // MarkdownType 2523 } else if (name.equals("useContext")) { 2524 this.getUseContext().add(castToUsageContext(value)); 2525 } else if (name.equals("jurisdiction")) { 2526 this.getJurisdiction().add(castToCodeableConcept(value)); 2527 } else if (name.equals("purpose")) { 2528 this.purpose = castToMarkdown(value); // MarkdownType 2529 } else if (name.equals("code")) { 2530 this.code = castToCode(value); // CodeType 2531 } else if (name.equals("base")) { 2532 this.getBase().add(castToCode(value)); 2533 } else if (name.equals("type")) { 2534 value = new SearchParamTypeEnumFactory().fromType(castToCode(value)); 2535 this.type = (Enumeration) value; // Enumeration<SearchParamType> 2536 } else if (name.equals("expression")) { 2537 this.expression = castToString(value); // StringType 2538 } else if (name.equals("xpath")) { 2539 this.xpath = castToString(value); // StringType 2540 } else if (name.equals("xpathUsage")) { 2541 value = new XPathUsageTypeEnumFactory().fromType(castToCode(value)); 2542 this.xpathUsage = (Enumeration) value; // Enumeration<XPathUsageType> 2543 } else if (name.equals("target")) { 2544 this.getTarget().add(castToCode(value)); 2545 } else if (name.equals("multipleOr")) { 2546 this.multipleOr = castToBoolean(value); // BooleanType 2547 } else if (name.equals("multipleAnd")) { 2548 this.multipleAnd = castToBoolean(value); // BooleanType 2549 } else if (name.equals("comparator")) { 2550 value = new SearchComparatorEnumFactory().fromType(castToCode(value)); 2551 this.getComparator().add((Enumeration) value); 2552 } else if (name.equals("modifier")) { 2553 value = new SearchModifierCodeEnumFactory().fromType(castToCode(value)); 2554 this.getModifier().add((Enumeration) value); 2555 } else if (name.equals("chain")) { 2556 this.getChain().add(castToString(value)); 2557 } else if (name.equals("component")) { 2558 this.getComponent().add((SearchParameterComponentComponent) value); 2559 } else 2560 return super.setProperty(name, value); 2561 return value; 2562 } 2563 2564 @Override 2565 public Base makeProperty(int hash, String name) throws FHIRException { 2566 switch (hash) { 2567 case 116079: return getUrlElement(); 2568 case 351608024: return getVersionElement(); 2569 case 3373707: return getNameElement(); 2570 case 1077922663: return getDerivedFromElement(); 2571 case -892481550: return getStatusElement(); 2572 case -404562712: return getExperimentalElement(); 2573 case 3076014: return getDateElement(); 2574 case 1447404028: return getPublisherElement(); 2575 case 951526432: return addContact(); 2576 case -1724546052: return getDescriptionElement(); 2577 case -669707736: return addUseContext(); 2578 case -507075711: return addJurisdiction(); 2579 case -220463842: return getPurposeElement(); 2580 case 3059181: return getCodeElement(); 2581 case 3016401: return addBaseElement(); 2582 case 3575610: return getTypeElement(); 2583 case -1795452264: return getExpressionElement(); 2584 case 114256029: return getXpathElement(); 2585 case 1801322244: return getXpathUsageElement(); 2586 case -880905839: return addTargetElement(); 2587 case 1265069075: return getMultipleOrElement(); 2588 case 562422183: return getMultipleAndElement(); 2589 case -844673834: return addComparatorElement(); 2590 case -615513385: return addModifierElement(); 2591 case 94623425: return addChainElement(); 2592 case -1399907075: return addComponent(); 2593 default: return super.makeProperty(hash, name); 2594 } 2595 2596 } 2597 2598 @Override 2599 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2600 switch (hash) { 2601 case 116079: /*url*/ return new String[] {"uri"}; 2602 case 351608024: /*version*/ return new String[] {"string"}; 2603 case 3373707: /*name*/ return new String[] {"string"}; 2604 case 1077922663: /*derivedFrom*/ return new String[] {"canonical"}; 2605 case -892481550: /*status*/ return new String[] {"code"}; 2606 case -404562712: /*experimental*/ return new String[] {"boolean"}; 2607 case 3076014: /*date*/ return new String[] {"dateTime"}; 2608 case 1447404028: /*publisher*/ return new String[] {"string"}; 2609 case 951526432: /*contact*/ return new String[] {"ContactDetail"}; 2610 case -1724546052: /*description*/ return new String[] {"markdown"}; 2611 case -669707736: /*useContext*/ return new String[] {"UsageContext"}; 2612 case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"}; 2613 case -220463842: /*purpose*/ return new String[] {"markdown"}; 2614 case 3059181: /*code*/ return new String[] {"code"}; 2615 case 3016401: /*base*/ return new String[] {"code"}; 2616 case 3575610: /*type*/ return new String[] {"code"}; 2617 case -1795452264: /*expression*/ return new String[] {"string"}; 2618 case 114256029: /*xpath*/ return new String[] {"string"}; 2619 case 1801322244: /*xpathUsage*/ return new String[] {"code"}; 2620 case -880905839: /*target*/ return new String[] {"code"}; 2621 case 1265069075: /*multipleOr*/ return new String[] {"boolean"}; 2622 case 562422183: /*multipleAnd*/ return new String[] {"boolean"}; 2623 case -844673834: /*comparator*/ return new String[] {"code"}; 2624 case -615513385: /*modifier*/ return new String[] {"code"}; 2625 case 94623425: /*chain*/ return new String[] {"string"}; 2626 case -1399907075: /*component*/ return new String[] {}; 2627 default: return super.getTypesForProperty(hash, name); 2628 } 2629 2630 } 2631 2632 @Override 2633 public Base addChild(String name) throws FHIRException { 2634 if (name.equals("url")) { 2635 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.url"); 2636 } 2637 else if (name.equals("version")) { 2638 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.version"); 2639 } 2640 else if (name.equals("name")) { 2641 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.name"); 2642 } 2643 else if (name.equals("derivedFrom")) { 2644 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.derivedFrom"); 2645 } 2646 else if (name.equals("status")) { 2647 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.status"); 2648 } 2649 else if (name.equals("experimental")) { 2650 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.experimental"); 2651 } 2652 else if (name.equals("date")) { 2653 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.date"); 2654 } 2655 else if (name.equals("publisher")) { 2656 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.publisher"); 2657 } 2658 else if (name.equals("contact")) { 2659 return addContact(); 2660 } 2661 else if (name.equals("description")) { 2662 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.description"); 2663 } 2664 else if (name.equals("useContext")) { 2665 return addUseContext(); 2666 } 2667 else if (name.equals("jurisdiction")) { 2668 return addJurisdiction(); 2669 } 2670 else if (name.equals("purpose")) { 2671 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.purpose"); 2672 } 2673 else if (name.equals("code")) { 2674 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.code"); 2675 } 2676 else if (name.equals("base")) { 2677 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.base"); 2678 } 2679 else if (name.equals("type")) { 2680 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.type"); 2681 } 2682 else if (name.equals("expression")) { 2683 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.expression"); 2684 } 2685 else if (name.equals("xpath")) { 2686 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.xpath"); 2687 } 2688 else if (name.equals("xpathUsage")) { 2689 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.xpathUsage"); 2690 } 2691 else if (name.equals("target")) { 2692 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.target"); 2693 } 2694 else if (name.equals("multipleOr")) { 2695 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.multipleOr"); 2696 } 2697 else if (name.equals("multipleAnd")) { 2698 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.multipleAnd"); 2699 } 2700 else if (name.equals("comparator")) { 2701 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.comparator"); 2702 } 2703 else if (name.equals("modifier")) { 2704 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.modifier"); 2705 } 2706 else if (name.equals("chain")) { 2707 throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.chain"); 2708 } 2709 else if (name.equals("component")) { 2710 return addComponent(); 2711 } 2712 else 2713 return super.addChild(name); 2714 } 2715 2716 public String fhirType() { 2717 return "SearchParameter"; 2718 2719 } 2720 2721 public SearchParameter copy() { 2722 SearchParameter dst = new SearchParameter(); 2723 copyValues(dst); 2724 dst.url = url == null ? null : url.copy(); 2725 dst.version = version == null ? null : version.copy(); 2726 dst.name = name == null ? null : name.copy(); 2727 dst.derivedFrom = derivedFrom == null ? null : derivedFrom.copy(); 2728 dst.status = status == null ? null : status.copy(); 2729 dst.experimental = experimental == null ? null : experimental.copy(); 2730 dst.date = date == null ? null : date.copy(); 2731 dst.publisher = publisher == null ? null : publisher.copy(); 2732 if (contact != null) { 2733 dst.contact = new ArrayList<ContactDetail>(); 2734 for (ContactDetail i : contact) 2735 dst.contact.add(i.copy()); 2736 }; 2737 dst.description = description == null ? null : description.copy(); 2738 if (useContext != null) { 2739 dst.useContext = new ArrayList<UsageContext>(); 2740 for (UsageContext i : useContext) 2741 dst.useContext.add(i.copy()); 2742 }; 2743 if (jurisdiction != null) { 2744 dst.jurisdiction = new ArrayList<CodeableConcept>(); 2745 for (CodeableConcept i : jurisdiction) 2746 dst.jurisdiction.add(i.copy()); 2747 }; 2748 dst.purpose = purpose == null ? null : purpose.copy(); 2749 dst.code = code == null ? null : code.copy(); 2750 if (base != null) { 2751 dst.base = new ArrayList<CodeType>(); 2752 for (CodeType i : base) 2753 dst.base.add(i.copy()); 2754 }; 2755 dst.type = type == null ? null : type.copy(); 2756 dst.expression = expression == null ? null : expression.copy(); 2757 dst.xpath = xpath == null ? null : xpath.copy(); 2758 dst.xpathUsage = xpathUsage == null ? null : xpathUsage.copy(); 2759 if (target != null) { 2760 dst.target = new ArrayList<CodeType>(); 2761 for (CodeType i : target) 2762 dst.target.add(i.copy()); 2763 }; 2764 dst.multipleOr = multipleOr == null ? null : multipleOr.copy(); 2765 dst.multipleAnd = multipleAnd == null ? null : multipleAnd.copy(); 2766 if (comparator != null) { 2767 dst.comparator = new ArrayList<Enumeration<SearchComparator>>(); 2768 for (Enumeration<SearchComparator> i : comparator) 2769 dst.comparator.add(i.copy()); 2770 }; 2771 if (modifier != null) { 2772 dst.modifier = new ArrayList<Enumeration<SearchModifierCode>>(); 2773 for (Enumeration<SearchModifierCode> i : modifier) 2774 dst.modifier.add(i.copy()); 2775 }; 2776 if (chain != null) { 2777 dst.chain = new ArrayList<StringType>(); 2778 for (StringType i : chain) 2779 dst.chain.add(i.copy()); 2780 }; 2781 if (component != null) { 2782 dst.component = new ArrayList<SearchParameterComponentComponent>(); 2783 for (SearchParameterComponentComponent i : component) 2784 dst.component.add(i.copy()); 2785 }; 2786 return dst; 2787 } 2788 2789 protected SearchParameter typedCopy() { 2790 return copy(); 2791 } 2792 2793 @Override 2794 public boolean equalsDeep(Base other_) { 2795 if (!super.equalsDeep(other_)) 2796 return false; 2797 if (!(other_ instanceof SearchParameter)) 2798 return false; 2799 SearchParameter o = (SearchParameter) other_; 2800 return compareDeep(derivedFrom, o.derivedFrom, true) && compareDeep(purpose, o.purpose, true) && compareDeep(code, o.code, true) 2801 && compareDeep(base, o.base, true) && compareDeep(type, o.type, true) && compareDeep(expression, o.expression, true) 2802 && compareDeep(xpath, o.xpath, true) && compareDeep(xpathUsage, o.xpathUsage, true) && compareDeep(target, o.target, true) 2803 && compareDeep(multipleOr, o.multipleOr, true) && compareDeep(multipleAnd, o.multipleAnd, true) 2804 && compareDeep(comparator, o.comparator, true) && compareDeep(modifier, o.modifier, true) && compareDeep(chain, o.chain, true) 2805 && compareDeep(component, o.component, true); 2806 } 2807 2808 @Override 2809 public boolean equalsShallow(Base other_) { 2810 if (!super.equalsShallow(other_)) 2811 return false; 2812 if (!(other_ instanceof SearchParameter)) 2813 return false; 2814 SearchParameter o = (SearchParameter) other_; 2815 return compareValues(purpose, o.purpose, true) && compareValues(code, o.code, true) && compareValues(base, o.base, true) 2816 && compareValues(type, o.type, true) && compareValues(expression, o.expression, true) && compareValues(xpath, o.xpath, true) 2817 && compareValues(xpathUsage, o.xpathUsage, true) && compareValues(target, o.target, true) && compareValues(multipleOr, o.multipleOr, true) 2818 && compareValues(multipleAnd, o.multipleAnd, true) && compareValues(comparator, o.comparator, true) 2819 && compareValues(modifier, o.modifier, true) && compareValues(chain, o.chain, true); 2820 } 2821 2822 public boolean isEmpty() { 2823 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(derivedFrom, purpose, code 2824 , base, type, expression, xpath, xpathUsage, target, multipleOr, multipleAnd 2825 , comparator, modifier, chain, component); 2826 } 2827 2828 @Override 2829 public ResourceType getResourceType() { 2830 return ResourceType.SearchParameter; 2831 } 2832 2833 /** 2834 * Search parameter: <b>date</b> 2835 * <p> 2836 * Description: <b>The search parameter publication date</b><br> 2837 * Type: <b>date</b><br> 2838 * Path: <b>SearchParameter.date</b><br> 2839 * </p> 2840 */ 2841 @SearchParamDefinition(name="date", path="SearchParameter.date", description="The search parameter publication date", type="date" ) 2842 public static final String SP_DATE = "date"; 2843 /** 2844 * <b>Fluent Client</b> search parameter constant for <b>date</b> 2845 * <p> 2846 * Description: <b>The search parameter publication date</b><br> 2847 * Type: <b>date</b><br> 2848 * Path: <b>SearchParameter.date</b><br> 2849 * </p> 2850 */ 2851 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 2852 2853 /** 2854 * Search parameter: <b>code</b> 2855 * <p> 2856 * Description: <b>Code used in URL</b><br> 2857 * Type: <b>token</b><br> 2858 * Path: <b>SearchParameter.code</b><br> 2859 * </p> 2860 */ 2861 @SearchParamDefinition(name="code", path="SearchParameter.code", description="Code used in URL", type="token" ) 2862 public static final String SP_CODE = "code"; 2863 /** 2864 * <b>Fluent Client</b> search parameter constant for <b>code</b> 2865 * <p> 2866 * Description: <b>Code used in URL</b><br> 2867 * Type: <b>token</b><br> 2868 * Path: <b>SearchParameter.code</b><br> 2869 * </p> 2870 */ 2871 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); 2872 2873 /** 2874 * Search parameter: <b>jurisdiction</b> 2875 * <p> 2876 * Description: <b>Intended jurisdiction for the search parameter</b><br> 2877 * Type: <b>token</b><br> 2878 * Path: <b>SearchParameter.jurisdiction</b><br> 2879 * </p> 2880 */ 2881 @SearchParamDefinition(name="jurisdiction", path="SearchParameter.jurisdiction", description="Intended jurisdiction for the search parameter", type="token" ) 2882 public static final String SP_JURISDICTION = "jurisdiction"; 2883 /** 2884 * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b> 2885 * <p> 2886 * Description: <b>Intended jurisdiction for the search parameter</b><br> 2887 * Type: <b>token</b><br> 2888 * Path: <b>SearchParameter.jurisdiction</b><br> 2889 * </p> 2890 */ 2891 public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION); 2892 2893 /** 2894 * Search parameter: <b>description</b> 2895 * <p> 2896 * Description: <b>The description of the search parameter</b><br> 2897 * Type: <b>string</b><br> 2898 * Path: <b>SearchParameter.description</b><br> 2899 * </p> 2900 */ 2901 @SearchParamDefinition(name="description", path="SearchParameter.description", description="The description of the search parameter", type="string" ) 2902 public static final String SP_DESCRIPTION = "description"; 2903 /** 2904 * <b>Fluent Client</b> search parameter constant for <b>description</b> 2905 * <p> 2906 * Description: <b>The description of the search parameter</b><br> 2907 * Type: <b>string</b><br> 2908 * Path: <b>SearchParameter.description</b><br> 2909 * </p> 2910 */ 2911 public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); 2912 2913 /** 2914 * Search parameter: <b>derived-from</b> 2915 * <p> 2916 * Description: <b>Original definition for the search parameter</b><br> 2917 * Type: <b>reference</b><br> 2918 * Path: <b>SearchParameter.derivedFrom</b><br> 2919 * </p> 2920 */ 2921 @SearchParamDefinition(name="derived-from", path="SearchParameter.derivedFrom", description="Original definition for the search parameter", type="reference", target={SearchParameter.class } ) 2922 public static final String SP_DERIVED_FROM = "derived-from"; 2923 /** 2924 * <b>Fluent Client</b> search parameter constant for <b>derived-from</b> 2925 * <p> 2926 * Description: <b>Original definition for the search parameter</b><br> 2927 * Type: <b>reference</b><br> 2928 * Path: <b>SearchParameter.derivedFrom</b><br> 2929 * </p> 2930 */ 2931 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DERIVED_FROM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DERIVED_FROM); 2932 2933/** 2934 * Constant for fluent queries to be used to add include statements. Specifies 2935 * the path value of "<b>SearchParameter:derived-from</b>". 2936 */ 2937 public static final ca.uhn.fhir.model.api.Include INCLUDE_DERIVED_FROM = new ca.uhn.fhir.model.api.Include("SearchParameter:derived-from").toLocked(); 2938 2939 /** 2940 * Search parameter: <b>context-type</b> 2941 * <p> 2942 * Description: <b>A type of use context assigned to the search parameter</b><br> 2943 * Type: <b>token</b><br> 2944 * Path: <b>SearchParameter.useContext.code</b><br> 2945 * </p> 2946 */ 2947 @SearchParamDefinition(name="context-type", path="SearchParameter.useContext.code", description="A type of use context assigned to the search parameter", type="token" ) 2948 public static final String SP_CONTEXT_TYPE = "context-type"; 2949 /** 2950 * <b>Fluent Client</b> search parameter constant for <b>context-type</b> 2951 * <p> 2952 * Description: <b>A type of use context assigned to the search parameter</b><br> 2953 * Type: <b>token</b><br> 2954 * Path: <b>SearchParameter.useContext.code</b><br> 2955 * </p> 2956 */ 2957 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE); 2958 2959 /** 2960 * Search parameter: <b>type</b> 2961 * <p> 2962 * Description: <b>number | date | string | token | reference | composite | quantity | uri</b><br> 2963 * Type: <b>token</b><br> 2964 * Path: <b>SearchParameter.type</b><br> 2965 * </p> 2966 */ 2967 @SearchParamDefinition(name="type", path="SearchParameter.type", description="number | date | string | token | reference | composite | quantity | uri", type="token" ) 2968 public static final String SP_TYPE = "type"; 2969 /** 2970 * <b>Fluent Client</b> search parameter constant for <b>type</b> 2971 * <p> 2972 * Description: <b>number | date | string | token | reference | composite | quantity | uri</b><br> 2973 * Type: <b>token</b><br> 2974 * Path: <b>SearchParameter.type</b><br> 2975 * </p> 2976 */ 2977 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); 2978 2979 /** 2980 * Search parameter: <b>version</b> 2981 * <p> 2982 * Description: <b>The business version of the search parameter</b><br> 2983 * Type: <b>token</b><br> 2984 * Path: <b>SearchParameter.version</b><br> 2985 * </p> 2986 */ 2987 @SearchParamDefinition(name="version", path="SearchParameter.version", description="The business version of the search parameter", type="token" ) 2988 public static final String SP_VERSION = "version"; 2989 /** 2990 * <b>Fluent Client</b> search parameter constant for <b>version</b> 2991 * <p> 2992 * Description: <b>The business version of the search parameter</b><br> 2993 * Type: <b>token</b><br> 2994 * Path: <b>SearchParameter.version</b><br> 2995 * </p> 2996 */ 2997 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION); 2998 2999 /** 3000 * Search parameter: <b>url</b> 3001 * <p> 3002 * Description: <b>The uri that identifies the search parameter</b><br> 3003 * Type: <b>uri</b><br> 3004 * Path: <b>SearchParameter.url</b><br> 3005 * </p> 3006 */ 3007 @SearchParamDefinition(name="url", path="SearchParameter.url", description="The uri that identifies the search parameter", type="uri" ) 3008 public static final String SP_URL = "url"; 3009 /** 3010 * <b>Fluent Client</b> search parameter constant for <b>url</b> 3011 * <p> 3012 * Description: <b>The uri that identifies the search parameter</b><br> 3013 * Type: <b>uri</b><br> 3014 * Path: <b>SearchParameter.url</b><br> 3015 * </p> 3016 */ 3017 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 3018 3019 /** 3020 * Search parameter: <b>target</b> 3021 * <p> 3022 * Description: <b>Types of resource (if a resource reference)</b><br> 3023 * Type: <b>token</b><br> 3024 * Path: <b>SearchParameter.target</b><br> 3025 * </p> 3026 */ 3027 @SearchParamDefinition(name="target", path="SearchParameter.target", description="Types of resource (if a resource reference)", type="token" ) 3028 public static final String SP_TARGET = "target"; 3029 /** 3030 * <b>Fluent Client</b> search parameter constant for <b>target</b> 3031 * <p> 3032 * Description: <b>Types of resource (if a resource reference)</b><br> 3033 * Type: <b>token</b><br> 3034 * Path: <b>SearchParameter.target</b><br> 3035 * </p> 3036 */ 3037 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TARGET = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TARGET); 3038 3039 /** 3040 * Search parameter: <b>component</b> 3041 * <p> 3042 * Description: <b>Defines how the part works</b><br> 3043 * Type: <b>reference</b><br> 3044 * Path: <b>SearchParameter.component.definition</b><br> 3045 * </p> 3046 */ 3047 @SearchParamDefinition(name="component", path="SearchParameter.component.definition", description="Defines how the part works", type="reference", target={SearchParameter.class } ) 3048 public static final String SP_COMPONENT = "component"; 3049 /** 3050 * <b>Fluent Client</b> search parameter constant for <b>component</b> 3051 * <p> 3052 * Description: <b>Defines how the part works</b><br> 3053 * Type: <b>reference</b><br> 3054 * Path: <b>SearchParameter.component.definition</b><br> 3055 * </p> 3056 */ 3057 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COMPONENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_COMPONENT); 3058 3059/** 3060 * Constant for fluent queries to be used to add include statements. Specifies 3061 * the path value of "<b>SearchParameter:component</b>". 3062 */ 3063 public static final ca.uhn.fhir.model.api.Include INCLUDE_COMPONENT = new ca.uhn.fhir.model.api.Include("SearchParameter:component").toLocked(); 3064 3065 /** 3066 * Search parameter: <b>name</b> 3067 * <p> 3068 * Description: <b>Computationally friendly name of the search parameter</b><br> 3069 * Type: <b>string</b><br> 3070 * Path: <b>SearchParameter.name</b><br> 3071 * </p> 3072 */ 3073 @SearchParamDefinition(name="name", path="SearchParameter.name", description="Computationally friendly name of the search parameter", type="string" ) 3074 public static final String SP_NAME = "name"; 3075 /** 3076 * <b>Fluent Client</b> search parameter constant for <b>name</b> 3077 * <p> 3078 * Description: <b>Computationally friendly name of the search parameter</b><br> 3079 * Type: <b>string</b><br> 3080 * Path: <b>SearchParameter.name</b><br> 3081 * </p> 3082 */ 3083 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); 3084 3085 /** 3086 * Search parameter: <b>publisher</b> 3087 * <p> 3088 * Description: <b>Name of the publisher of the search parameter</b><br> 3089 * Type: <b>string</b><br> 3090 * Path: <b>SearchParameter.publisher</b><br> 3091 * </p> 3092 */ 3093 @SearchParamDefinition(name="publisher", path="SearchParameter.publisher", description="Name of the publisher of the search parameter", type="string" ) 3094 public static final String SP_PUBLISHER = "publisher"; 3095 /** 3096 * <b>Fluent Client</b> search parameter constant for <b>publisher</b> 3097 * <p> 3098 * Description: <b>Name of the publisher of the search parameter</b><br> 3099 * Type: <b>string</b><br> 3100 * Path: <b>SearchParameter.publisher</b><br> 3101 * </p> 3102 */ 3103 public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); 3104 3105 /** 3106 * Search parameter: <b>status</b> 3107 * <p> 3108 * Description: <b>The current status of the search parameter</b><br> 3109 * Type: <b>token</b><br> 3110 * Path: <b>SearchParameter.status</b><br> 3111 * </p> 3112 */ 3113 @SearchParamDefinition(name="status", path="SearchParameter.status", description="The current status of the search parameter", type="token" ) 3114 public static final String SP_STATUS = "status"; 3115 /** 3116 * <b>Fluent Client</b> search parameter constant for <b>status</b> 3117 * <p> 3118 * Description: <b>The current status of the search parameter</b><br> 3119 * Type: <b>token</b><br> 3120 * Path: <b>SearchParameter.status</b><br> 3121 * </p> 3122 */ 3123 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 3124 3125 /** 3126 * Search parameter: <b>base</b> 3127 * <p> 3128 * Description: <b>The resource type(s) this search parameter applies to</b><br> 3129 * Type: <b>token</b><br> 3130 * Path: <b>SearchParameter.base</b><br> 3131 * </p> 3132 */ 3133 @SearchParamDefinition(name="base", path="SearchParameter.base", description="The resource type(s) this search parameter applies to", type="token" ) 3134 public static final String SP_BASE = "base"; 3135 /** 3136 * <b>Fluent Client</b> search parameter constant for <b>base</b> 3137 * <p> 3138 * Description: <b>The resource type(s) this search parameter applies to</b><br> 3139 * Type: <b>token</b><br> 3140 * Path: <b>SearchParameter.base</b><br> 3141 * </p> 3142 */ 3143 public static final ca.uhn.fhir.rest.gclient.TokenClientParam BASE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_BASE); 3144 3145 3146} 3147