001package org.hl7.fhir.r4.model; 002 003 004 005/* 006 Copyright (c) 2011+, HL7, Inc. 007 All rights reserved. 008 009 Redistribution and use in source and binary forms, with or without modification, 010 are permitted provided that the following conditions are met: 011 012 * Redistributions of source code must retain the above copyright notice, this 013 list of conditions and the following disclaimer. 014 * Redistributions in binary form must reproduce the above copyright notice, 015 this list of conditions and the following disclaimer in the documentation 016 and/or other materials provided with the distribution. 017 * Neither the name of HL7 nor the names of its contributors may be used to 018 endorse or promote products derived from this software without specific 019 prior written permission. 020 021 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 022 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 023 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 024 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 025 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 026 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 027 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 028 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 029 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 030 POSSIBILITY OF SUCH DAMAGE. 031 032*/ 033 034 035// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1 036 037import java.util.*; 038 039import org.hl7.fhir.utilities.Utilities; 040import ca.uhn.fhir.model.api.annotation.ResourceDef; 041import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 042import ca.uhn.fhir.model.api.annotation.Child; 043import ca.uhn.fhir.model.api.annotation.ChildOrder; 044import ca.uhn.fhir.model.api.annotation.Description; 045import ca.uhn.fhir.model.api.annotation.Block; 046import org.hl7.fhir.instance.model.api.*; 047import org.hl7.fhir.exceptions.FHIRException; 048/** 049 * Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively, and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization. 050 */ 051@ResourceDef(name="Group", profile="http://hl7.org/fhir/StructureDefinition/Group") 052public class Group extends DomainResource { 053 054 public enum GroupType { 055 /** 056 * Group contains "person" Patient resources. 057 */ 058 PERSON, 059 /** 060 * Group contains "animal" Patient resources. 061 */ 062 ANIMAL, 063 /** 064 * Group contains healthcare practitioner resources (Practitioner or PractitionerRole). 065 */ 066 PRACTITIONER, 067 /** 068 * Group contains Device resources. 069 */ 070 DEVICE, 071 /** 072 * Group contains Medication resources. 073 */ 074 MEDICATION, 075 /** 076 * Group contains Substance resources. 077 */ 078 SUBSTANCE, 079 /** 080 * added to help the parsers with the generic types 081 */ 082 NULL; 083 public static GroupType fromCode(String codeString) throws FHIRException { 084 if (codeString == null || "".equals(codeString)) 085 return null; 086 if ("person".equals(codeString)) 087 return PERSON; 088 if ("animal".equals(codeString)) 089 return ANIMAL; 090 if ("practitioner".equals(codeString)) 091 return PRACTITIONER; 092 if ("device".equals(codeString)) 093 return DEVICE; 094 if ("medication".equals(codeString)) 095 return MEDICATION; 096 if ("substance".equals(codeString)) 097 return SUBSTANCE; 098 if (Configuration.isAcceptInvalidEnums()) 099 return null; 100 else 101 throw new FHIRException("Unknown GroupType code '"+codeString+"'"); 102 } 103 public String toCode() { 104 switch (this) { 105 case PERSON: return "person"; 106 case ANIMAL: return "animal"; 107 case PRACTITIONER: return "practitioner"; 108 case DEVICE: return "device"; 109 case MEDICATION: return "medication"; 110 case SUBSTANCE: return "substance"; 111 case NULL: return null; 112 default: return "?"; 113 } 114 } 115 public String getSystem() { 116 switch (this) { 117 case PERSON: return "http://hl7.org/fhir/group-type"; 118 case ANIMAL: return "http://hl7.org/fhir/group-type"; 119 case PRACTITIONER: return "http://hl7.org/fhir/group-type"; 120 case DEVICE: return "http://hl7.org/fhir/group-type"; 121 case MEDICATION: return "http://hl7.org/fhir/group-type"; 122 case SUBSTANCE: return "http://hl7.org/fhir/group-type"; 123 case NULL: return null; 124 default: return "?"; 125 } 126 } 127 public String getDefinition() { 128 switch (this) { 129 case PERSON: return "Group contains \"person\" Patient resources."; 130 case ANIMAL: return "Group contains \"animal\" Patient resources."; 131 case PRACTITIONER: return "Group contains healthcare practitioner resources (Practitioner or PractitionerRole)."; 132 case DEVICE: return "Group contains Device resources."; 133 case MEDICATION: return "Group contains Medication resources."; 134 case SUBSTANCE: return "Group contains Substance resources."; 135 case NULL: return null; 136 default: return "?"; 137 } 138 } 139 public String getDisplay() { 140 switch (this) { 141 case PERSON: return "Person"; 142 case ANIMAL: return "Animal"; 143 case PRACTITIONER: return "Practitioner"; 144 case DEVICE: return "Device"; 145 case MEDICATION: return "Medication"; 146 case SUBSTANCE: return "Substance"; 147 case NULL: return null; 148 default: return "?"; 149 } 150 } 151 } 152 153 public static class GroupTypeEnumFactory implements EnumFactory<GroupType> { 154 public GroupType fromCode(String codeString) throws IllegalArgumentException { 155 if (codeString == null || "".equals(codeString)) 156 if (codeString == null || "".equals(codeString)) 157 return null; 158 if ("person".equals(codeString)) 159 return GroupType.PERSON; 160 if ("animal".equals(codeString)) 161 return GroupType.ANIMAL; 162 if ("practitioner".equals(codeString)) 163 return GroupType.PRACTITIONER; 164 if ("device".equals(codeString)) 165 return GroupType.DEVICE; 166 if ("medication".equals(codeString)) 167 return GroupType.MEDICATION; 168 if ("substance".equals(codeString)) 169 return GroupType.SUBSTANCE; 170 throw new IllegalArgumentException("Unknown GroupType code '"+codeString+"'"); 171 } 172 public Enumeration<GroupType> fromType(Base code) throws FHIRException { 173 if (code == null) 174 return null; 175 if (code.isEmpty()) 176 return new Enumeration<GroupType>(this); 177 String codeString = ((PrimitiveType) code).asStringValue(); 178 if (codeString == null || "".equals(codeString)) 179 return null; 180 if ("person".equals(codeString)) 181 return new Enumeration<GroupType>(this, GroupType.PERSON); 182 if ("animal".equals(codeString)) 183 return new Enumeration<GroupType>(this, GroupType.ANIMAL); 184 if ("practitioner".equals(codeString)) 185 return new Enumeration<GroupType>(this, GroupType.PRACTITIONER); 186 if ("device".equals(codeString)) 187 return new Enumeration<GroupType>(this, GroupType.DEVICE); 188 if ("medication".equals(codeString)) 189 return new Enumeration<GroupType>(this, GroupType.MEDICATION); 190 if ("substance".equals(codeString)) 191 return new Enumeration<GroupType>(this, GroupType.SUBSTANCE); 192 throw new FHIRException("Unknown GroupType code '"+codeString+"'"); 193 } 194 public String toCode(GroupType code) { 195 if (code == GroupType.PERSON) 196 return "person"; 197 if (code == GroupType.ANIMAL) 198 return "animal"; 199 if (code == GroupType.PRACTITIONER) 200 return "practitioner"; 201 if (code == GroupType.DEVICE) 202 return "device"; 203 if (code == GroupType.MEDICATION) 204 return "medication"; 205 if (code == GroupType.SUBSTANCE) 206 return "substance"; 207 return "?"; 208 } 209 public String toSystem(GroupType code) { 210 return code.getSystem(); 211 } 212 } 213 214 @Block() 215 public static class GroupCharacteristicComponent extends BackboneElement implements IBaseBackboneElement { 216 /** 217 * A code that identifies the kind of trait being asserted. 218 */ 219 @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 220 @Description(shortDefinition="Kind of characteristic", formalDefinition="A code that identifies the kind of trait being asserted." ) 221 protected CodeableConcept code; 222 223 /** 224 * The value of the trait that holds (or does not hold - see 'exclude') for members of the group. 225 */ 226 @Child(name = "value", type = {CodeableConcept.class, BooleanType.class, Quantity.class, Range.class, Reference.class}, order=2, min=1, max=1, modifier=false, summary=false) 227 @Description(shortDefinition="Value held by characteristic", formalDefinition="The value of the trait that holds (or does not hold - see 'exclude') for members of the group." ) 228 protected Type value; 229 230 /** 231 * If true, indicates the characteristic is one that is NOT held by members of the group. 232 */ 233 @Child(name = "exclude", type = {BooleanType.class}, order=3, min=1, max=1, modifier=false, summary=false) 234 @Description(shortDefinition="Group includes or excludes", formalDefinition="If true, indicates the characteristic is one that is NOT held by members of the group." ) 235 protected BooleanType exclude; 236 237 /** 238 * The period over which the characteristic is tested; e.g. the patient had an operation during the month of June. 239 */ 240 @Child(name = "period", type = {Period.class}, order=4, min=0, max=1, modifier=false, summary=false) 241 @Description(shortDefinition="Period over which characteristic is tested", formalDefinition="The period over which the characteristic is tested; e.g. the patient had an operation during the month of June." ) 242 protected Period period; 243 244 private static final long serialVersionUID = -1000688967L; 245 246 /** 247 * Constructor 248 */ 249 public GroupCharacteristicComponent() { 250 super(); 251 } 252 253 /** 254 * Constructor 255 */ 256 public GroupCharacteristicComponent(CodeableConcept code, Type value, BooleanType exclude) { 257 super(); 258 this.code = code; 259 this.value = value; 260 this.exclude = exclude; 261 } 262 263 /** 264 * @return {@link #code} (A code that identifies the kind of trait being asserted.) 265 */ 266 public CodeableConcept getCode() { 267 if (this.code == null) 268 if (Configuration.errorOnAutoCreate()) 269 throw new Error("Attempt to auto-create GroupCharacteristicComponent.code"); 270 else if (Configuration.doAutoCreate()) 271 this.code = new CodeableConcept(); // cc 272 return this.code; 273 } 274 275 public boolean hasCode() { 276 return this.code != null && !this.code.isEmpty(); 277 } 278 279 /** 280 * @param value {@link #code} (A code that identifies the kind of trait being asserted.) 281 */ 282 public GroupCharacteristicComponent setCode(CodeableConcept value) { 283 this.code = value; 284 return this; 285 } 286 287 /** 288 * @return {@link #value} (The value of the trait that holds (or does not hold - see 'exclude') for members of the group.) 289 */ 290 public Type getValue() { 291 return this.value; 292 } 293 294 /** 295 * @return {@link #value} (The value of the trait that holds (or does not hold - see 'exclude') for members of the group.) 296 */ 297 public CodeableConcept getValueCodeableConcept() throws FHIRException { 298 if (this.value == null) 299 this.value = new CodeableConcept(); 300 if (!(this.value instanceof CodeableConcept)) 301 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered"); 302 return (CodeableConcept) this.value; 303 } 304 305 public boolean hasValueCodeableConcept() { 306 return this != null && this.value instanceof CodeableConcept; 307 } 308 309 /** 310 * @return {@link #value} (The value of the trait that holds (or does not hold - see 'exclude') for members of the group.) 311 */ 312 public BooleanType getValueBooleanType() throws FHIRException { 313 if (this.value == null) 314 this.value = new BooleanType(); 315 if (!(this.value instanceof BooleanType)) 316 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); 317 return (BooleanType) this.value; 318 } 319 320 public boolean hasValueBooleanType() { 321 return this != null && this.value instanceof BooleanType; 322 } 323 324 /** 325 * @return {@link #value} (The value of the trait that holds (or does not hold - see 'exclude') for members of the group.) 326 */ 327 public Quantity getValueQuantity() throws FHIRException { 328 if (this.value == null) 329 this.value = new Quantity(); 330 if (!(this.value instanceof Quantity)) 331 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered"); 332 return (Quantity) this.value; 333 } 334 335 public boolean hasValueQuantity() { 336 return this != null && this.value instanceof Quantity; 337 } 338 339 /** 340 * @return {@link #value} (The value of the trait that holds (or does not hold - see 'exclude') for members of the group.) 341 */ 342 public Range getValueRange() throws FHIRException { 343 if (this.value == null) 344 this.value = new Range(); 345 if (!(this.value instanceof Range)) 346 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered"); 347 return (Range) this.value; 348 } 349 350 public boolean hasValueRange() { 351 return this != null && this.value instanceof Range; 352 } 353 354 /** 355 * @return {@link #value} (The value of the trait that holds (or does not hold - see 'exclude') for members of the group.) 356 */ 357 public Reference getValueReference() throws FHIRException { 358 if (this.value == null) 359 this.value = new Reference(); 360 if (!(this.value instanceof Reference)) 361 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered"); 362 return (Reference) this.value; 363 } 364 365 public boolean hasValueReference() { 366 return this != null && this.value instanceof Reference; 367 } 368 369 public boolean hasValue() { 370 return this.value != null && !this.value.isEmpty(); 371 } 372 373 /** 374 * @param value {@link #value} (The value of the trait that holds (or does not hold - see 'exclude') for members of the group.) 375 */ 376 public GroupCharacteristicComponent setValue(Type value) { 377 if (value != null && !(value instanceof CodeableConcept || value instanceof BooleanType || value instanceof Quantity || value instanceof Range || value instanceof Reference)) 378 throw new Error("Not the right type for Group.characteristic.value[x]: "+value.fhirType()); 379 this.value = value; 380 return this; 381 } 382 383 /** 384 * @return {@link #exclude} (If true, indicates the characteristic is one that is NOT held by members of the group.). This is the underlying object with id, value and extensions. The accessor "getExclude" gives direct access to the value 385 */ 386 public BooleanType getExcludeElement() { 387 if (this.exclude == null) 388 if (Configuration.errorOnAutoCreate()) 389 throw new Error("Attempt to auto-create GroupCharacteristicComponent.exclude"); 390 else if (Configuration.doAutoCreate()) 391 this.exclude = new BooleanType(); // bb 392 return this.exclude; 393 } 394 395 public boolean hasExcludeElement() { 396 return this.exclude != null && !this.exclude.isEmpty(); 397 } 398 399 public boolean hasExclude() { 400 return this.exclude != null && !this.exclude.isEmpty(); 401 } 402 403 /** 404 * @param value {@link #exclude} (If true, indicates the characteristic is one that is NOT held by members of the group.). This is the underlying object with id, value and extensions. The accessor "getExclude" gives direct access to the value 405 */ 406 public GroupCharacteristicComponent setExcludeElement(BooleanType value) { 407 this.exclude = value; 408 return this; 409 } 410 411 /** 412 * @return If true, indicates the characteristic is one that is NOT held by members of the group. 413 */ 414 public boolean getExclude() { 415 return this.exclude == null || this.exclude.isEmpty() ? false : this.exclude.getValue(); 416 } 417 418 /** 419 * @param value If true, indicates the characteristic is one that is NOT held by members of the group. 420 */ 421 public GroupCharacteristicComponent setExclude(boolean value) { 422 if (this.exclude == null) 423 this.exclude = new BooleanType(); 424 this.exclude.setValue(value); 425 return this; 426 } 427 428 /** 429 * @return {@link #period} (The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.) 430 */ 431 public Period getPeriod() { 432 if (this.period == null) 433 if (Configuration.errorOnAutoCreate()) 434 throw new Error("Attempt to auto-create GroupCharacteristicComponent.period"); 435 else if (Configuration.doAutoCreate()) 436 this.period = new Period(); // cc 437 return this.period; 438 } 439 440 public boolean hasPeriod() { 441 return this.period != null && !this.period.isEmpty(); 442 } 443 444 /** 445 * @param value {@link #period} (The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.) 446 */ 447 public GroupCharacteristicComponent setPeriod(Period value) { 448 this.period = value; 449 return this; 450 } 451 452 protected void listChildren(List<Property> children) { 453 super.listChildren(children); 454 children.add(new Property("code", "CodeableConcept", "A code that identifies the kind of trait being asserted.", 0, 1, code)); 455 children.add(new Property("value[x]", "CodeableConcept|boolean|Quantity|Range|Reference", "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", 0, 1, value)); 456 children.add(new Property("exclude", "boolean", "If true, indicates the characteristic is one that is NOT held by members of the group.", 0, 1, exclude)); 457 children.add(new Property("period", "Period", "The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.", 0, 1, period)); 458 } 459 460 @Override 461 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 462 switch (_hash) { 463 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "A code that identifies the kind of trait being asserted.", 0, 1, code); 464 case -1410166417: /*value[x]*/ return new Property("value[x]", "CodeableConcept|boolean|Quantity|Range|Reference", "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", 0, 1, value); 465 case 111972721: /*value*/ return new Property("value[x]", "CodeableConcept|boolean|Quantity|Range|Reference", "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", 0, 1, value); 466 case 924902896: /*valueCodeableConcept*/ return new Property("value[x]", "CodeableConcept|boolean|Quantity|Range|Reference", "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", 0, 1, value); 467 case 733421943: /*valueBoolean*/ return new Property("value[x]", "CodeableConcept|boolean|Quantity|Range|Reference", "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", 0, 1, value); 468 case -2029823716: /*valueQuantity*/ return new Property("value[x]", "CodeableConcept|boolean|Quantity|Range|Reference", "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", 0, 1, value); 469 case 2030761548: /*valueRange*/ return new Property("value[x]", "CodeableConcept|boolean|Quantity|Range|Reference", "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", 0, 1, value); 470 case 1755241690: /*valueReference*/ return new Property("value[x]", "CodeableConcept|boolean|Quantity|Range|Reference", "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", 0, 1, value); 471 case -1321148966: /*exclude*/ return new Property("exclude", "boolean", "If true, indicates the characteristic is one that is NOT held by members of the group.", 0, 1, exclude); 472 case -991726143: /*period*/ return new Property("period", "Period", "The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.", 0, 1, period); 473 default: return super.getNamedProperty(_hash, _name, _checkValid); 474 } 475 476 } 477 478 @Override 479 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 480 switch (hash) { 481 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 482 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Type 483 case -1321148966: /*exclude*/ return this.exclude == null ? new Base[0] : new Base[] {this.exclude}; // BooleanType 484 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 485 default: return super.getProperty(hash, name, checkValid); 486 } 487 488 } 489 490 @Override 491 public Base setProperty(int hash, String name, Base value) throws FHIRException { 492 switch (hash) { 493 case 3059181: // code 494 this.code = castToCodeableConcept(value); // CodeableConcept 495 return value; 496 case 111972721: // value 497 this.value = castToType(value); // Type 498 return value; 499 case -1321148966: // exclude 500 this.exclude = castToBoolean(value); // BooleanType 501 return value; 502 case -991726143: // period 503 this.period = castToPeriod(value); // Period 504 return value; 505 default: return super.setProperty(hash, name, value); 506 } 507 508 } 509 510 @Override 511 public Base setProperty(String name, Base value) throws FHIRException { 512 if (name.equals("code")) { 513 this.code = castToCodeableConcept(value); // CodeableConcept 514 } else if (name.equals("value[x]")) { 515 this.value = castToType(value); // Type 516 } else if (name.equals("exclude")) { 517 this.exclude = castToBoolean(value); // BooleanType 518 } else if (name.equals("period")) { 519 this.period = castToPeriod(value); // Period 520 } else 521 return super.setProperty(name, value); 522 return value; 523 } 524 525 @Override 526 public Base makeProperty(int hash, String name) throws FHIRException { 527 switch (hash) { 528 case 3059181: return getCode(); 529 case -1410166417: return getValue(); 530 case 111972721: return getValue(); 531 case -1321148966: return getExcludeElement(); 532 case -991726143: return getPeriod(); 533 default: return super.makeProperty(hash, name); 534 } 535 536 } 537 538 @Override 539 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 540 switch (hash) { 541 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 542 case 111972721: /*value*/ return new String[] {"CodeableConcept", "boolean", "Quantity", "Range", "Reference"}; 543 case -1321148966: /*exclude*/ return new String[] {"boolean"}; 544 case -991726143: /*period*/ return new String[] {"Period"}; 545 default: return super.getTypesForProperty(hash, name); 546 } 547 548 } 549 550 @Override 551 public Base addChild(String name) throws FHIRException { 552 if (name.equals("code")) { 553 this.code = new CodeableConcept(); 554 return this.code; 555 } 556 else if (name.equals("valueCodeableConcept")) { 557 this.value = new CodeableConcept(); 558 return this.value; 559 } 560 else if (name.equals("valueBoolean")) { 561 this.value = new BooleanType(); 562 return this.value; 563 } 564 else if (name.equals("valueQuantity")) { 565 this.value = new Quantity(); 566 return this.value; 567 } 568 else if (name.equals("valueRange")) { 569 this.value = new Range(); 570 return this.value; 571 } 572 else if (name.equals("valueReference")) { 573 this.value = new Reference(); 574 return this.value; 575 } 576 else if (name.equals("exclude")) { 577 throw new FHIRException("Cannot call addChild on a primitive type Group.exclude"); 578 } 579 else if (name.equals("period")) { 580 this.period = new Period(); 581 return this.period; 582 } 583 else 584 return super.addChild(name); 585 } 586 587 public GroupCharacteristicComponent copy() { 588 GroupCharacteristicComponent dst = new GroupCharacteristicComponent(); 589 copyValues(dst); 590 return dst; 591 } 592 593 public void copyValues(GroupCharacteristicComponent dst) { 594 super.copyValues(dst); 595 dst.code = code == null ? null : code.copy(); 596 dst.value = value == null ? null : value.copy(); 597 dst.exclude = exclude == null ? null : exclude.copy(); 598 dst.period = period == null ? null : period.copy(); 599 } 600 601 @Override 602 public boolean equalsDeep(Base other_) { 603 if (!super.equalsDeep(other_)) 604 return false; 605 if (!(other_ instanceof GroupCharacteristicComponent)) 606 return false; 607 GroupCharacteristicComponent o = (GroupCharacteristicComponent) other_; 608 return compareDeep(code, o.code, true) && compareDeep(value, o.value, true) && compareDeep(exclude, o.exclude, true) 609 && compareDeep(period, o.period, true); 610 } 611 612 @Override 613 public boolean equalsShallow(Base other_) { 614 if (!super.equalsShallow(other_)) 615 return false; 616 if (!(other_ instanceof GroupCharacteristicComponent)) 617 return false; 618 GroupCharacteristicComponent o = (GroupCharacteristicComponent) other_; 619 return compareValues(exclude, o.exclude, true); 620 } 621 622 public boolean isEmpty() { 623 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, value, exclude, period 624 ); 625 } 626 627 public String fhirType() { 628 return "Group.characteristic"; 629 630 } 631 632 } 633 634 @Block() 635 public static class GroupMemberComponent extends BackboneElement implements IBaseBackboneElement { 636 /** 637 * A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same. 638 */ 639 @Child(name = "entity", type = {Patient.class, Practitioner.class, PractitionerRole.class, Device.class, Medication.class, Substance.class, Group.class}, order=1, min=1, max=1, modifier=false, summary=false) 640 @Description(shortDefinition="Reference to the group member", formalDefinition="A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same." ) 641 protected Reference entity; 642 643 /** 644 * The actual object that is the target of the reference (A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same.) 645 */ 646 protected Resource entityTarget; 647 648 /** 649 * The period that the member was in the group, if known. 650 */ 651 @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false) 652 @Description(shortDefinition="Period member belonged to the group", formalDefinition="The period that the member was in the group, if known." ) 653 protected Period period; 654 655 /** 656 * A flag to indicate that the member is no longer in the group, but previously may have been a member. 657 */ 658 @Child(name = "inactive", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false) 659 @Description(shortDefinition="If member is no longer in group", formalDefinition="A flag to indicate that the member is no longer in the group, but previously may have been a member." ) 660 protected BooleanType inactive; 661 662 private static final long serialVersionUID = -333869055L; 663 664 /** 665 * Constructor 666 */ 667 public GroupMemberComponent() { 668 super(); 669 } 670 671 /** 672 * Constructor 673 */ 674 public GroupMemberComponent(Reference entity) { 675 super(); 676 this.entity = entity; 677 } 678 679 /** 680 * @return {@link #entity} (A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same.) 681 */ 682 public Reference getEntity() { 683 if (this.entity == null) 684 if (Configuration.errorOnAutoCreate()) 685 throw new Error("Attempt to auto-create GroupMemberComponent.entity"); 686 else if (Configuration.doAutoCreate()) 687 this.entity = new Reference(); // cc 688 return this.entity; 689 } 690 691 public boolean hasEntity() { 692 return this.entity != null && !this.entity.isEmpty(); 693 } 694 695 /** 696 * @param value {@link #entity} (A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same.) 697 */ 698 public GroupMemberComponent setEntity(Reference value) { 699 this.entity = value; 700 return this; 701 } 702 703 /** 704 * @return {@link #entity} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same.) 705 */ 706 public Resource getEntityTarget() { 707 return this.entityTarget; 708 } 709 710 /** 711 * @param value {@link #entity} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same.) 712 */ 713 public GroupMemberComponent setEntityTarget(Resource value) { 714 this.entityTarget = value; 715 return this; 716 } 717 718 /** 719 * @return {@link #period} (The period that the member was in the group, if known.) 720 */ 721 public Period getPeriod() { 722 if (this.period == null) 723 if (Configuration.errorOnAutoCreate()) 724 throw new Error("Attempt to auto-create GroupMemberComponent.period"); 725 else if (Configuration.doAutoCreate()) 726 this.period = new Period(); // cc 727 return this.period; 728 } 729 730 public boolean hasPeriod() { 731 return this.period != null && !this.period.isEmpty(); 732 } 733 734 /** 735 * @param value {@link #period} (The period that the member was in the group, if known.) 736 */ 737 public GroupMemberComponent setPeriod(Period value) { 738 this.period = value; 739 return this; 740 } 741 742 /** 743 * @return {@link #inactive} (A flag to indicate that the member is no longer in the group, but previously may have been a member.). This is the underlying object with id, value and extensions. The accessor "getInactive" gives direct access to the value 744 */ 745 public BooleanType getInactiveElement() { 746 if (this.inactive == null) 747 if (Configuration.errorOnAutoCreate()) 748 throw new Error("Attempt to auto-create GroupMemberComponent.inactive"); 749 else if (Configuration.doAutoCreate()) 750 this.inactive = new BooleanType(); // bb 751 return this.inactive; 752 } 753 754 public boolean hasInactiveElement() { 755 return this.inactive != null && !this.inactive.isEmpty(); 756 } 757 758 public boolean hasInactive() { 759 return this.inactive != null && !this.inactive.isEmpty(); 760 } 761 762 /** 763 * @param value {@link #inactive} (A flag to indicate that the member is no longer in the group, but previously may have been a member.). This is the underlying object with id, value and extensions. The accessor "getInactive" gives direct access to the value 764 */ 765 public GroupMemberComponent setInactiveElement(BooleanType value) { 766 this.inactive = value; 767 return this; 768 } 769 770 /** 771 * @return A flag to indicate that the member is no longer in the group, but previously may have been a member. 772 */ 773 public boolean getInactive() { 774 return this.inactive == null || this.inactive.isEmpty() ? false : this.inactive.getValue(); 775 } 776 777 /** 778 * @param value A flag to indicate that the member is no longer in the group, but previously may have been a member. 779 */ 780 public GroupMemberComponent setInactive(boolean value) { 781 if (this.inactive == null) 782 this.inactive = new BooleanType(); 783 this.inactive.setValue(value); 784 return this; 785 } 786 787 protected void listChildren(List<Property> children) { 788 super.listChildren(children); 789 children.add(new Property("entity", "Reference(Patient|Practitioner|PractitionerRole|Device|Medication|Substance|Group)", "A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same.", 0, 1, entity)); 790 children.add(new Property("period", "Period", "The period that the member was in the group, if known.", 0, 1, period)); 791 children.add(new Property("inactive", "boolean", "A flag to indicate that the member is no longer in the group, but previously may have been a member.", 0, 1, inactive)); 792 } 793 794 @Override 795 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 796 switch (_hash) { 797 case -1298275357: /*entity*/ return new Property("entity", "Reference(Patient|Practitioner|PractitionerRole|Device|Medication|Substance|Group)", "A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same.", 0, 1, entity); 798 case -991726143: /*period*/ return new Property("period", "Period", "The period that the member was in the group, if known.", 0, 1, period); 799 case 24665195: /*inactive*/ return new Property("inactive", "boolean", "A flag to indicate that the member is no longer in the group, but previously may have been a member.", 0, 1, inactive); 800 default: return super.getNamedProperty(_hash, _name, _checkValid); 801 } 802 803 } 804 805 @Override 806 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 807 switch (hash) { 808 case -1298275357: /*entity*/ return this.entity == null ? new Base[0] : new Base[] {this.entity}; // Reference 809 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 810 case 24665195: /*inactive*/ return this.inactive == null ? new Base[0] : new Base[] {this.inactive}; // BooleanType 811 default: return super.getProperty(hash, name, checkValid); 812 } 813 814 } 815 816 @Override 817 public Base setProperty(int hash, String name, Base value) throws FHIRException { 818 switch (hash) { 819 case -1298275357: // entity 820 this.entity = castToReference(value); // Reference 821 return value; 822 case -991726143: // period 823 this.period = castToPeriod(value); // Period 824 return value; 825 case 24665195: // inactive 826 this.inactive = castToBoolean(value); // BooleanType 827 return value; 828 default: return super.setProperty(hash, name, value); 829 } 830 831 } 832 833 @Override 834 public Base setProperty(String name, Base value) throws FHIRException { 835 if (name.equals("entity")) { 836 this.entity = castToReference(value); // Reference 837 } else if (name.equals("period")) { 838 this.period = castToPeriod(value); // Period 839 } else if (name.equals("inactive")) { 840 this.inactive = castToBoolean(value); // BooleanType 841 } else 842 return super.setProperty(name, value); 843 return value; 844 } 845 846 @Override 847 public Base makeProperty(int hash, String name) throws FHIRException { 848 switch (hash) { 849 case -1298275357: return getEntity(); 850 case -991726143: return getPeriod(); 851 case 24665195: return getInactiveElement(); 852 default: return super.makeProperty(hash, name); 853 } 854 855 } 856 857 @Override 858 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 859 switch (hash) { 860 case -1298275357: /*entity*/ return new String[] {"Reference"}; 861 case -991726143: /*period*/ return new String[] {"Period"}; 862 case 24665195: /*inactive*/ return new String[] {"boolean"}; 863 default: return super.getTypesForProperty(hash, name); 864 } 865 866 } 867 868 @Override 869 public Base addChild(String name) throws FHIRException { 870 if (name.equals("entity")) { 871 this.entity = new Reference(); 872 return this.entity; 873 } 874 else if (name.equals("period")) { 875 this.period = new Period(); 876 return this.period; 877 } 878 else if (name.equals("inactive")) { 879 throw new FHIRException("Cannot call addChild on a primitive type Group.inactive"); 880 } 881 else 882 return super.addChild(name); 883 } 884 885 public GroupMemberComponent copy() { 886 GroupMemberComponent dst = new GroupMemberComponent(); 887 copyValues(dst); 888 return dst; 889 } 890 891 public void copyValues(GroupMemberComponent dst) { 892 super.copyValues(dst); 893 dst.entity = entity == null ? null : entity.copy(); 894 dst.period = period == null ? null : period.copy(); 895 dst.inactive = inactive == null ? null : inactive.copy(); 896 } 897 898 @Override 899 public boolean equalsDeep(Base other_) { 900 if (!super.equalsDeep(other_)) 901 return false; 902 if (!(other_ instanceof GroupMemberComponent)) 903 return false; 904 GroupMemberComponent o = (GroupMemberComponent) other_; 905 return compareDeep(entity, o.entity, true) && compareDeep(period, o.period, true) && compareDeep(inactive, o.inactive, true) 906 ; 907 } 908 909 @Override 910 public boolean equalsShallow(Base other_) { 911 if (!super.equalsShallow(other_)) 912 return false; 913 if (!(other_ instanceof GroupMemberComponent)) 914 return false; 915 GroupMemberComponent o = (GroupMemberComponent) other_; 916 return compareValues(inactive, o.inactive, true); 917 } 918 919 public boolean isEmpty() { 920 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(entity, period, inactive 921 ); 922 } 923 924 public String fhirType() { 925 return "Group.member"; 926 927 } 928 929 } 930 931 /** 932 * A unique business identifier for this group. 933 */ 934 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 935 @Description(shortDefinition="Unique id", formalDefinition="A unique business identifier for this group." ) 936 protected List<Identifier> identifier; 937 938 /** 939 * Indicates whether the record for the group is available for use or is merely being retained for historical purposes. 940 */ 941 @Child(name = "active", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=true) 942 @Description(shortDefinition="Whether this group's record is in active use", formalDefinition="Indicates whether the record for the group is available for use or is merely being retained for historical purposes." ) 943 protected BooleanType active; 944 945 /** 946 * Identifies the broad classification of the kind of resources the group includes. 947 */ 948 @Child(name = "type", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true) 949 @Description(shortDefinition="person | animal | practitioner | device | medication | substance", formalDefinition="Identifies the broad classification of the kind of resources the group includes." ) 950 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/group-type") 951 protected Enumeration<GroupType> type; 952 953 /** 954 * If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals. 955 */ 956 @Child(name = "actual", type = {BooleanType.class}, order=3, min=1, max=1, modifier=false, summary=true) 957 @Description(shortDefinition="Descriptive or actual", formalDefinition="If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals." ) 958 protected BooleanType actual; 959 960 /** 961 * Provides a specific type of resource the group includes; e.g. "cow", "syringe", etc. 962 */ 963 @Child(name = "code", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) 964 @Description(shortDefinition="Kind of Group members", formalDefinition="Provides a specific type of resource the group includes; e.g. \"cow\", \"syringe\", etc." ) 965 protected CodeableConcept code; 966 967 /** 968 * A label assigned to the group for human identification and communication. 969 */ 970 @Child(name = "name", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) 971 @Description(shortDefinition="Label for Group", formalDefinition="A label assigned to the group for human identification and communication." ) 972 protected StringType name; 973 974 /** 975 * A count of the number of resource instances that are part of the group. 976 */ 977 @Child(name = "quantity", type = {UnsignedIntType.class}, order=6, min=0, max=1, modifier=false, summary=true) 978 @Description(shortDefinition="Number of members", formalDefinition="A count of the number of resource instances that are part of the group." ) 979 protected UnsignedIntType quantity; 980 981 /** 982 * Entity responsible for defining and maintaining Group characteristics and/or registered members. 983 */ 984 @Child(name = "managingEntity", type = {Organization.class, RelatedPerson.class, Practitioner.class, PractitionerRole.class}, order=7, min=0, max=1, modifier=false, summary=true) 985 @Description(shortDefinition="Entity that is the custodian of the Group's definition", formalDefinition="Entity responsible for defining and maintaining Group characteristics and/or registered members." ) 986 protected Reference managingEntity; 987 988 /** 989 * The actual object that is the target of the reference (Entity responsible for defining and maintaining Group characteristics and/or registered members.) 990 */ 991 protected Resource managingEntityTarget; 992 993 /** 994 * Identifies traits whose presence r absence is shared by members of the group. 995 */ 996 @Child(name = "characteristic", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 997 @Description(shortDefinition="Include / Exclude group members by Trait", formalDefinition="Identifies traits whose presence r absence is shared by members of the group." ) 998 protected List<GroupCharacteristicComponent> characteristic; 999 1000 /** 1001 * Identifies the resource instances that are members of the group. 1002 */ 1003 @Child(name = "member", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1004 @Description(shortDefinition="Who or what is in group", formalDefinition="Identifies the resource instances that are members of the group." ) 1005 protected List<GroupMemberComponent> member; 1006 1007 private static final long serialVersionUID = -550945963L; 1008 1009 /** 1010 * Constructor 1011 */ 1012 public Group() { 1013 super(); 1014 } 1015 1016 /** 1017 * Constructor 1018 */ 1019 public Group(Enumeration<GroupType> type, BooleanType actual) { 1020 super(); 1021 this.type = type; 1022 this.actual = actual; 1023 } 1024 1025 /** 1026 * @return {@link #identifier} (A unique business identifier for this group.) 1027 */ 1028 public List<Identifier> getIdentifier() { 1029 if (this.identifier == null) 1030 this.identifier = new ArrayList<Identifier>(); 1031 return this.identifier; 1032 } 1033 1034 /** 1035 * @return Returns a reference to <code>this</code> for easy method chaining 1036 */ 1037 public Group setIdentifier(List<Identifier> theIdentifier) { 1038 this.identifier = theIdentifier; 1039 return this; 1040 } 1041 1042 public boolean hasIdentifier() { 1043 if (this.identifier == null) 1044 return false; 1045 for (Identifier item : this.identifier) 1046 if (!item.isEmpty()) 1047 return true; 1048 return false; 1049 } 1050 1051 public Identifier addIdentifier() { //3 1052 Identifier t = new Identifier(); 1053 if (this.identifier == null) 1054 this.identifier = new ArrayList<Identifier>(); 1055 this.identifier.add(t); 1056 return t; 1057 } 1058 1059 public Group addIdentifier(Identifier t) { //3 1060 if (t == null) 1061 return this; 1062 if (this.identifier == null) 1063 this.identifier = new ArrayList<Identifier>(); 1064 this.identifier.add(t); 1065 return this; 1066 } 1067 1068 /** 1069 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 1070 */ 1071 public Identifier getIdentifierFirstRep() { 1072 if (getIdentifier().isEmpty()) { 1073 addIdentifier(); 1074 } 1075 return getIdentifier().get(0); 1076 } 1077 1078 /** 1079 * @return {@link #active} (Indicates whether the record for the group is available for use or is merely being retained for historical purposes.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value 1080 */ 1081 public BooleanType getActiveElement() { 1082 if (this.active == null) 1083 if (Configuration.errorOnAutoCreate()) 1084 throw new Error("Attempt to auto-create Group.active"); 1085 else if (Configuration.doAutoCreate()) 1086 this.active = new BooleanType(); // bb 1087 return this.active; 1088 } 1089 1090 public boolean hasActiveElement() { 1091 return this.active != null && !this.active.isEmpty(); 1092 } 1093 1094 public boolean hasActive() { 1095 return this.active != null && !this.active.isEmpty(); 1096 } 1097 1098 /** 1099 * @param value {@link #active} (Indicates whether the record for the group is available for use or is merely being retained for historical purposes.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value 1100 */ 1101 public Group setActiveElement(BooleanType value) { 1102 this.active = value; 1103 return this; 1104 } 1105 1106 /** 1107 * @return Indicates whether the record for the group is available for use or is merely being retained for historical purposes. 1108 */ 1109 public boolean getActive() { 1110 return this.active == null || this.active.isEmpty() ? false : this.active.getValue(); 1111 } 1112 1113 /** 1114 * @param value Indicates whether the record for the group is available for use or is merely being retained for historical purposes. 1115 */ 1116 public Group setActive(boolean value) { 1117 if (this.active == null) 1118 this.active = new BooleanType(); 1119 this.active.setValue(value); 1120 return this; 1121 } 1122 1123 /** 1124 * @return {@link #type} (Identifies the broad classification of the kind of resources the group includes.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1125 */ 1126 public Enumeration<GroupType> getTypeElement() { 1127 if (this.type == null) 1128 if (Configuration.errorOnAutoCreate()) 1129 throw new Error("Attempt to auto-create Group.type"); 1130 else if (Configuration.doAutoCreate()) 1131 this.type = new Enumeration<GroupType>(new GroupTypeEnumFactory()); // bb 1132 return this.type; 1133 } 1134 1135 public boolean hasTypeElement() { 1136 return this.type != null && !this.type.isEmpty(); 1137 } 1138 1139 public boolean hasType() { 1140 return this.type != null && !this.type.isEmpty(); 1141 } 1142 1143 /** 1144 * @param value {@link #type} (Identifies the broad classification of the kind of resources the group includes.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1145 */ 1146 public Group setTypeElement(Enumeration<GroupType> value) { 1147 this.type = value; 1148 return this; 1149 } 1150 1151 /** 1152 * @return Identifies the broad classification of the kind of resources the group includes. 1153 */ 1154 public GroupType getType() { 1155 return this.type == null ? null : this.type.getValue(); 1156 } 1157 1158 /** 1159 * @param value Identifies the broad classification of the kind of resources the group includes. 1160 */ 1161 public Group setType(GroupType value) { 1162 if (this.type == null) 1163 this.type = new Enumeration<GroupType>(new GroupTypeEnumFactory()); 1164 this.type.setValue(value); 1165 return this; 1166 } 1167 1168 /** 1169 * @return {@link #actual} (If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.). This is the underlying object with id, value and extensions. The accessor "getActual" gives direct access to the value 1170 */ 1171 public BooleanType getActualElement() { 1172 if (this.actual == null) 1173 if (Configuration.errorOnAutoCreate()) 1174 throw new Error("Attempt to auto-create Group.actual"); 1175 else if (Configuration.doAutoCreate()) 1176 this.actual = new BooleanType(); // bb 1177 return this.actual; 1178 } 1179 1180 public boolean hasActualElement() { 1181 return this.actual != null && !this.actual.isEmpty(); 1182 } 1183 1184 public boolean hasActual() { 1185 return this.actual != null && !this.actual.isEmpty(); 1186 } 1187 1188 /** 1189 * @param value {@link #actual} (If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.). This is the underlying object with id, value and extensions. The accessor "getActual" gives direct access to the value 1190 */ 1191 public Group setActualElement(BooleanType value) { 1192 this.actual = value; 1193 return this; 1194 } 1195 1196 /** 1197 * @return If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals. 1198 */ 1199 public boolean getActual() { 1200 return this.actual == null || this.actual.isEmpty() ? false : this.actual.getValue(); 1201 } 1202 1203 /** 1204 * @param value If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals. 1205 */ 1206 public Group setActual(boolean value) { 1207 if (this.actual == null) 1208 this.actual = new BooleanType(); 1209 this.actual.setValue(value); 1210 return this; 1211 } 1212 1213 /** 1214 * @return {@link #code} (Provides a specific type of resource the group includes; e.g. "cow", "syringe", etc.) 1215 */ 1216 public CodeableConcept getCode() { 1217 if (this.code == null) 1218 if (Configuration.errorOnAutoCreate()) 1219 throw new Error("Attempt to auto-create Group.code"); 1220 else if (Configuration.doAutoCreate()) 1221 this.code = new CodeableConcept(); // cc 1222 return this.code; 1223 } 1224 1225 public boolean hasCode() { 1226 return this.code != null && !this.code.isEmpty(); 1227 } 1228 1229 /** 1230 * @param value {@link #code} (Provides a specific type of resource the group includes; e.g. "cow", "syringe", etc.) 1231 */ 1232 public Group setCode(CodeableConcept value) { 1233 this.code = value; 1234 return this; 1235 } 1236 1237 /** 1238 * @return {@link #name} (A label assigned to the group for human identification and communication.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1239 */ 1240 public StringType getNameElement() { 1241 if (this.name == null) 1242 if (Configuration.errorOnAutoCreate()) 1243 throw new Error("Attempt to auto-create Group.name"); 1244 else if (Configuration.doAutoCreate()) 1245 this.name = new StringType(); // bb 1246 return this.name; 1247 } 1248 1249 public boolean hasNameElement() { 1250 return this.name != null && !this.name.isEmpty(); 1251 } 1252 1253 public boolean hasName() { 1254 return this.name != null && !this.name.isEmpty(); 1255 } 1256 1257 /** 1258 * @param value {@link #name} (A label assigned to the group for human identification and communication.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1259 */ 1260 public Group setNameElement(StringType value) { 1261 this.name = value; 1262 return this; 1263 } 1264 1265 /** 1266 * @return A label assigned to the group for human identification and communication. 1267 */ 1268 public String getName() { 1269 return this.name == null ? null : this.name.getValue(); 1270 } 1271 1272 /** 1273 * @param value A label assigned to the group for human identification and communication. 1274 */ 1275 public Group setName(String value) { 1276 if (Utilities.noString(value)) 1277 this.name = null; 1278 else { 1279 if (this.name == null) 1280 this.name = new StringType(); 1281 this.name.setValue(value); 1282 } 1283 return this; 1284 } 1285 1286 /** 1287 * @return {@link #quantity} (A count of the number of resource instances that are part of the group.). This is the underlying object with id, value and extensions. The accessor "getQuantity" gives direct access to the value 1288 */ 1289 public UnsignedIntType getQuantityElement() { 1290 if (this.quantity == null) 1291 if (Configuration.errorOnAutoCreate()) 1292 throw new Error("Attempt to auto-create Group.quantity"); 1293 else if (Configuration.doAutoCreate()) 1294 this.quantity = new UnsignedIntType(); // bb 1295 return this.quantity; 1296 } 1297 1298 public boolean hasQuantityElement() { 1299 return this.quantity != null && !this.quantity.isEmpty(); 1300 } 1301 1302 public boolean hasQuantity() { 1303 return this.quantity != null && !this.quantity.isEmpty(); 1304 } 1305 1306 /** 1307 * @param value {@link #quantity} (A count of the number of resource instances that are part of the group.). This is the underlying object with id, value and extensions. The accessor "getQuantity" gives direct access to the value 1308 */ 1309 public Group setQuantityElement(UnsignedIntType value) { 1310 this.quantity = value; 1311 return this; 1312 } 1313 1314 /** 1315 * @return A count of the number of resource instances that are part of the group. 1316 */ 1317 public int getQuantity() { 1318 return this.quantity == null || this.quantity.isEmpty() ? 0 : this.quantity.getValue(); 1319 } 1320 1321 /** 1322 * @param value A count of the number of resource instances that are part of the group. 1323 */ 1324 public Group setQuantity(int value) { 1325 if (this.quantity == null) 1326 this.quantity = new UnsignedIntType(); 1327 this.quantity.setValue(value); 1328 return this; 1329 } 1330 1331 /** 1332 * @return {@link #managingEntity} (Entity responsible for defining and maintaining Group characteristics and/or registered members.) 1333 */ 1334 public Reference getManagingEntity() { 1335 if (this.managingEntity == null) 1336 if (Configuration.errorOnAutoCreate()) 1337 throw new Error("Attempt to auto-create Group.managingEntity"); 1338 else if (Configuration.doAutoCreate()) 1339 this.managingEntity = new Reference(); // cc 1340 return this.managingEntity; 1341 } 1342 1343 public boolean hasManagingEntity() { 1344 return this.managingEntity != null && !this.managingEntity.isEmpty(); 1345 } 1346 1347 /** 1348 * @param value {@link #managingEntity} (Entity responsible for defining and maintaining Group characteristics and/or registered members.) 1349 */ 1350 public Group setManagingEntity(Reference value) { 1351 this.managingEntity = value; 1352 return this; 1353 } 1354 1355 /** 1356 * @return {@link #managingEntity} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Entity responsible for defining and maintaining Group characteristics and/or registered members.) 1357 */ 1358 public Resource getManagingEntityTarget() { 1359 return this.managingEntityTarget; 1360 } 1361 1362 /** 1363 * @param value {@link #managingEntity} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Entity responsible for defining and maintaining Group characteristics and/or registered members.) 1364 */ 1365 public Group setManagingEntityTarget(Resource value) { 1366 this.managingEntityTarget = value; 1367 return this; 1368 } 1369 1370 /** 1371 * @return {@link #characteristic} (Identifies traits whose presence r absence is shared by members of the group.) 1372 */ 1373 public List<GroupCharacteristicComponent> getCharacteristic() { 1374 if (this.characteristic == null) 1375 this.characteristic = new ArrayList<GroupCharacteristicComponent>(); 1376 return this.characteristic; 1377 } 1378 1379 /** 1380 * @return Returns a reference to <code>this</code> for easy method chaining 1381 */ 1382 public Group setCharacteristic(List<GroupCharacteristicComponent> theCharacteristic) { 1383 this.characteristic = theCharacteristic; 1384 return this; 1385 } 1386 1387 public boolean hasCharacteristic() { 1388 if (this.characteristic == null) 1389 return false; 1390 for (GroupCharacteristicComponent item : this.characteristic) 1391 if (!item.isEmpty()) 1392 return true; 1393 return false; 1394 } 1395 1396 public GroupCharacteristicComponent addCharacteristic() { //3 1397 GroupCharacteristicComponent t = new GroupCharacteristicComponent(); 1398 if (this.characteristic == null) 1399 this.characteristic = new ArrayList<GroupCharacteristicComponent>(); 1400 this.characteristic.add(t); 1401 return t; 1402 } 1403 1404 public Group addCharacteristic(GroupCharacteristicComponent t) { //3 1405 if (t == null) 1406 return this; 1407 if (this.characteristic == null) 1408 this.characteristic = new ArrayList<GroupCharacteristicComponent>(); 1409 this.characteristic.add(t); 1410 return this; 1411 } 1412 1413 /** 1414 * @return The first repetition of repeating field {@link #characteristic}, creating it if it does not already exist 1415 */ 1416 public GroupCharacteristicComponent getCharacteristicFirstRep() { 1417 if (getCharacteristic().isEmpty()) { 1418 addCharacteristic(); 1419 } 1420 return getCharacteristic().get(0); 1421 } 1422 1423 /** 1424 * @return {@link #member} (Identifies the resource instances that are members of the group.) 1425 */ 1426 public List<GroupMemberComponent> getMember() { 1427 if (this.member == null) 1428 this.member = new ArrayList<GroupMemberComponent>(); 1429 return this.member; 1430 } 1431 1432 /** 1433 * @return Returns a reference to <code>this</code> for easy method chaining 1434 */ 1435 public Group setMember(List<GroupMemberComponent> theMember) { 1436 this.member = theMember; 1437 return this; 1438 } 1439 1440 public boolean hasMember() { 1441 if (this.member == null) 1442 return false; 1443 for (GroupMemberComponent item : this.member) 1444 if (!item.isEmpty()) 1445 return true; 1446 return false; 1447 } 1448 1449 public GroupMemberComponent addMember() { //3 1450 GroupMemberComponent t = new GroupMemberComponent(); 1451 if (this.member == null) 1452 this.member = new ArrayList<GroupMemberComponent>(); 1453 this.member.add(t); 1454 return t; 1455 } 1456 1457 public Group addMember(GroupMemberComponent t) { //3 1458 if (t == null) 1459 return this; 1460 if (this.member == null) 1461 this.member = new ArrayList<GroupMemberComponent>(); 1462 this.member.add(t); 1463 return this; 1464 } 1465 1466 /** 1467 * @return The first repetition of repeating field {@link #member}, creating it if it does not already exist 1468 */ 1469 public GroupMemberComponent getMemberFirstRep() { 1470 if (getMember().isEmpty()) { 1471 addMember(); 1472 } 1473 return getMember().get(0); 1474 } 1475 1476 protected void listChildren(List<Property> children) { 1477 super.listChildren(children); 1478 children.add(new Property("identifier", "Identifier", "A unique business identifier for this group.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1479 children.add(new Property("active", "boolean", "Indicates whether the record for the group is available for use or is merely being retained for historical purposes.", 0, 1, active)); 1480 children.add(new Property("type", "code", "Identifies the broad classification of the kind of resources the group includes.", 0, 1, type)); 1481 children.add(new Property("actual", "boolean", "If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.", 0, 1, actual)); 1482 children.add(new Property("code", "CodeableConcept", "Provides a specific type of resource the group includes; e.g. \"cow\", \"syringe\", etc.", 0, 1, code)); 1483 children.add(new Property("name", "string", "A label assigned to the group for human identification and communication.", 0, 1, name)); 1484 children.add(new Property("quantity", "unsignedInt", "A count of the number of resource instances that are part of the group.", 0, 1, quantity)); 1485 children.add(new Property("managingEntity", "Reference(Organization|RelatedPerson|Practitioner|PractitionerRole)", "Entity responsible for defining and maintaining Group characteristics and/or registered members.", 0, 1, managingEntity)); 1486 children.add(new Property("characteristic", "", "Identifies traits whose presence r absence is shared by members of the group.", 0, java.lang.Integer.MAX_VALUE, characteristic)); 1487 children.add(new Property("member", "", "Identifies the resource instances that are members of the group.", 0, java.lang.Integer.MAX_VALUE, member)); 1488 } 1489 1490 @Override 1491 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1492 switch (_hash) { 1493 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "A unique business identifier for this group.", 0, java.lang.Integer.MAX_VALUE, identifier); 1494 case -1422950650: /*active*/ return new Property("active", "boolean", "Indicates whether the record for the group is available for use or is merely being retained for historical purposes.", 0, 1, active); 1495 case 3575610: /*type*/ return new Property("type", "code", "Identifies the broad classification of the kind of resources the group includes.", 0, 1, type); 1496 case -1422939762: /*actual*/ return new Property("actual", "boolean", "If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.", 0, 1, actual); 1497 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "Provides a specific type of resource the group includes; e.g. \"cow\", \"syringe\", etc.", 0, 1, code); 1498 case 3373707: /*name*/ return new Property("name", "string", "A label assigned to the group for human identification and communication.", 0, 1, name); 1499 case -1285004149: /*quantity*/ return new Property("quantity", "unsignedInt", "A count of the number of resource instances that are part of the group.", 0, 1, quantity); 1500 case -988474523: /*managingEntity*/ return new Property("managingEntity", "Reference(Organization|RelatedPerson|Practitioner|PractitionerRole)", "Entity responsible for defining and maintaining Group characteristics and/or registered members.", 0, 1, managingEntity); 1501 case 366313883: /*characteristic*/ return new Property("characteristic", "", "Identifies traits whose presence r absence is shared by members of the group.", 0, java.lang.Integer.MAX_VALUE, characteristic); 1502 case -1077769574: /*member*/ return new Property("member", "", "Identifies the resource instances that are members of the group.", 0, java.lang.Integer.MAX_VALUE, member); 1503 default: return super.getNamedProperty(_hash, _name, _checkValid); 1504 } 1505 1506 } 1507 1508 @Override 1509 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1510 switch (hash) { 1511 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1512 case -1422950650: /*active*/ return this.active == null ? new Base[0] : new Base[] {this.active}; // BooleanType 1513 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<GroupType> 1514 case -1422939762: /*actual*/ return this.actual == null ? new Base[0] : new Base[] {this.actual}; // BooleanType 1515 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 1516 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 1517 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // UnsignedIntType 1518 case -988474523: /*managingEntity*/ return this.managingEntity == null ? new Base[0] : new Base[] {this.managingEntity}; // Reference 1519 case 366313883: /*characteristic*/ return this.characteristic == null ? new Base[0] : this.characteristic.toArray(new Base[this.characteristic.size()]); // GroupCharacteristicComponent 1520 case -1077769574: /*member*/ return this.member == null ? new Base[0] : this.member.toArray(new Base[this.member.size()]); // GroupMemberComponent 1521 default: return super.getProperty(hash, name, checkValid); 1522 } 1523 1524 } 1525 1526 @Override 1527 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1528 switch (hash) { 1529 case -1618432855: // identifier 1530 this.getIdentifier().add(castToIdentifier(value)); // Identifier 1531 return value; 1532 case -1422950650: // active 1533 this.active = castToBoolean(value); // BooleanType 1534 return value; 1535 case 3575610: // type 1536 value = new GroupTypeEnumFactory().fromType(castToCode(value)); 1537 this.type = (Enumeration) value; // Enumeration<GroupType> 1538 return value; 1539 case -1422939762: // actual 1540 this.actual = castToBoolean(value); // BooleanType 1541 return value; 1542 case 3059181: // code 1543 this.code = castToCodeableConcept(value); // CodeableConcept 1544 return value; 1545 case 3373707: // name 1546 this.name = castToString(value); // StringType 1547 return value; 1548 case -1285004149: // quantity 1549 this.quantity = castToUnsignedInt(value); // UnsignedIntType 1550 return value; 1551 case -988474523: // managingEntity 1552 this.managingEntity = castToReference(value); // Reference 1553 return value; 1554 case 366313883: // characteristic 1555 this.getCharacteristic().add((GroupCharacteristicComponent) value); // GroupCharacteristicComponent 1556 return value; 1557 case -1077769574: // member 1558 this.getMember().add((GroupMemberComponent) value); // GroupMemberComponent 1559 return value; 1560 default: return super.setProperty(hash, name, value); 1561 } 1562 1563 } 1564 1565 @Override 1566 public Base setProperty(String name, Base value) throws FHIRException { 1567 if (name.equals("identifier")) { 1568 this.getIdentifier().add(castToIdentifier(value)); 1569 } else if (name.equals("active")) { 1570 this.active = castToBoolean(value); // BooleanType 1571 } else if (name.equals("type")) { 1572 value = new GroupTypeEnumFactory().fromType(castToCode(value)); 1573 this.type = (Enumeration) value; // Enumeration<GroupType> 1574 } else if (name.equals("actual")) { 1575 this.actual = castToBoolean(value); // BooleanType 1576 } else if (name.equals("code")) { 1577 this.code = castToCodeableConcept(value); // CodeableConcept 1578 } else if (name.equals("name")) { 1579 this.name = castToString(value); // StringType 1580 } else if (name.equals("quantity")) { 1581 this.quantity = castToUnsignedInt(value); // UnsignedIntType 1582 } else if (name.equals("managingEntity")) { 1583 this.managingEntity = castToReference(value); // Reference 1584 } else if (name.equals("characteristic")) { 1585 this.getCharacteristic().add((GroupCharacteristicComponent) value); 1586 } else if (name.equals("member")) { 1587 this.getMember().add((GroupMemberComponent) value); 1588 } else 1589 return super.setProperty(name, value); 1590 return value; 1591 } 1592 1593 @Override 1594 public Base makeProperty(int hash, String name) throws FHIRException { 1595 switch (hash) { 1596 case -1618432855: return addIdentifier(); 1597 case -1422950650: return getActiveElement(); 1598 case 3575610: return getTypeElement(); 1599 case -1422939762: return getActualElement(); 1600 case 3059181: return getCode(); 1601 case 3373707: return getNameElement(); 1602 case -1285004149: return getQuantityElement(); 1603 case -988474523: return getManagingEntity(); 1604 case 366313883: return addCharacteristic(); 1605 case -1077769574: return addMember(); 1606 default: return super.makeProperty(hash, name); 1607 } 1608 1609 } 1610 1611 @Override 1612 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1613 switch (hash) { 1614 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1615 case -1422950650: /*active*/ return new String[] {"boolean"}; 1616 case 3575610: /*type*/ return new String[] {"code"}; 1617 case -1422939762: /*actual*/ return new String[] {"boolean"}; 1618 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 1619 case 3373707: /*name*/ return new String[] {"string"}; 1620 case -1285004149: /*quantity*/ return new String[] {"unsignedInt"}; 1621 case -988474523: /*managingEntity*/ return new String[] {"Reference"}; 1622 case 366313883: /*characteristic*/ return new String[] {}; 1623 case -1077769574: /*member*/ return new String[] {}; 1624 default: return super.getTypesForProperty(hash, name); 1625 } 1626 1627 } 1628 1629 @Override 1630 public Base addChild(String name) throws FHIRException { 1631 if (name.equals("identifier")) { 1632 return addIdentifier(); 1633 } 1634 else if (name.equals("active")) { 1635 throw new FHIRException("Cannot call addChild on a primitive type Group.active"); 1636 } 1637 else if (name.equals("type")) { 1638 throw new FHIRException("Cannot call addChild on a primitive type Group.type"); 1639 } 1640 else if (name.equals("actual")) { 1641 throw new FHIRException("Cannot call addChild on a primitive type Group.actual"); 1642 } 1643 else if (name.equals("code")) { 1644 this.code = new CodeableConcept(); 1645 return this.code; 1646 } 1647 else if (name.equals("name")) { 1648 throw new FHIRException("Cannot call addChild on a primitive type Group.name"); 1649 } 1650 else if (name.equals("quantity")) { 1651 throw new FHIRException("Cannot call addChild on a primitive type Group.quantity"); 1652 } 1653 else if (name.equals("managingEntity")) { 1654 this.managingEntity = new Reference(); 1655 return this.managingEntity; 1656 } 1657 else if (name.equals("characteristic")) { 1658 return addCharacteristic(); 1659 } 1660 else if (name.equals("member")) { 1661 return addMember(); 1662 } 1663 else 1664 return super.addChild(name); 1665 } 1666 1667 public String fhirType() { 1668 return "Group"; 1669 1670 } 1671 1672 public Group copy() { 1673 Group dst = new Group(); 1674 copyValues(dst); 1675 return dst; 1676 } 1677 1678 public void copyValues(Group dst) { 1679 super.copyValues(dst); 1680 if (identifier != null) { 1681 dst.identifier = new ArrayList<Identifier>(); 1682 for (Identifier i : identifier) 1683 dst.identifier.add(i.copy()); 1684 }; 1685 dst.active = active == null ? null : active.copy(); 1686 dst.type = type == null ? null : type.copy(); 1687 dst.actual = actual == null ? null : actual.copy(); 1688 dst.code = code == null ? null : code.copy(); 1689 dst.name = name == null ? null : name.copy(); 1690 dst.quantity = quantity == null ? null : quantity.copy(); 1691 dst.managingEntity = managingEntity == null ? null : managingEntity.copy(); 1692 if (characteristic != null) { 1693 dst.characteristic = new ArrayList<GroupCharacteristicComponent>(); 1694 for (GroupCharacteristicComponent i : characteristic) 1695 dst.characteristic.add(i.copy()); 1696 }; 1697 if (member != null) { 1698 dst.member = new ArrayList<GroupMemberComponent>(); 1699 for (GroupMemberComponent i : member) 1700 dst.member.add(i.copy()); 1701 }; 1702 } 1703 1704 protected Group typedCopy() { 1705 return copy(); 1706 } 1707 1708 @Override 1709 public boolean equalsDeep(Base other_) { 1710 if (!super.equalsDeep(other_)) 1711 return false; 1712 if (!(other_ instanceof Group)) 1713 return false; 1714 Group o = (Group) other_; 1715 return compareDeep(identifier, o.identifier, true) && compareDeep(active, o.active, true) && compareDeep(type, o.type, true) 1716 && compareDeep(actual, o.actual, true) && compareDeep(code, o.code, true) && compareDeep(name, o.name, true) 1717 && compareDeep(quantity, o.quantity, true) && compareDeep(managingEntity, o.managingEntity, true) 1718 && compareDeep(characteristic, o.characteristic, true) && compareDeep(member, o.member, true); 1719 } 1720 1721 @Override 1722 public boolean equalsShallow(Base other_) { 1723 if (!super.equalsShallow(other_)) 1724 return false; 1725 if (!(other_ instanceof Group)) 1726 return false; 1727 Group o = (Group) other_; 1728 return compareValues(active, o.active, true) && compareValues(type, o.type, true) && compareValues(actual, o.actual, true) 1729 && compareValues(name, o.name, true) && compareValues(quantity, o.quantity, true); 1730 } 1731 1732 public boolean isEmpty() { 1733 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, active, type 1734 , actual, code, name, quantity, managingEntity, characteristic, member); 1735 } 1736 1737 @Override 1738 public ResourceType getResourceType() { 1739 return ResourceType.Group; 1740 } 1741 1742 /** 1743 * Search parameter: <b>actual</b> 1744 * <p> 1745 * Description: <b>Descriptive or actual</b><br> 1746 * Type: <b>token</b><br> 1747 * Path: <b>Group.actual</b><br> 1748 * </p> 1749 */ 1750 @SearchParamDefinition(name="actual", path="Group.actual", description="Descriptive or actual", type="token" ) 1751 public static final String SP_ACTUAL = "actual"; 1752 /** 1753 * <b>Fluent Client</b> search parameter constant for <b>actual</b> 1754 * <p> 1755 * Description: <b>Descriptive or actual</b><br> 1756 * Type: <b>token</b><br> 1757 * Path: <b>Group.actual</b><br> 1758 * </p> 1759 */ 1760 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACTUAL = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACTUAL); 1761 1762 /** 1763 * Search parameter: <b>identifier</b> 1764 * <p> 1765 * Description: <b>Unique id</b><br> 1766 * Type: <b>token</b><br> 1767 * Path: <b>Group.identifier</b><br> 1768 * </p> 1769 */ 1770 @SearchParamDefinition(name="identifier", path="Group.identifier", description="Unique id", type="token" ) 1771 public static final String SP_IDENTIFIER = "identifier"; 1772 /** 1773 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 1774 * <p> 1775 * Description: <b>Unique id</b><br> 1776 * Type: <b>token</b><br> 1777 * Path: <b>Group.identifier</b><br> 1778 * </p> 1779 */ 1780 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 1781 1782 /** 1783 * Search parameter: <b>characteristic-value</b> 1784 * <p> 1785 * Description: <b>A composite of both characteristic and value</b><br> 1786 * Type: <b>composite</b><br> 1787 * Path: <b></b><br> 1788 * </p> 1789 */ 1790 @SearchParamDefinition(name="characteristic-value", path="Group.characteristic", description="A composite of both characteristic and value", type="composite", compositeOf={"characteristic", "value"} ) 1791 public static final String SP_CHARACTERISTIC_VALUE = "characteristic-value"; 1792 /** 1793 * <b>Fluent Client</b> search parameter constant for <b>characteristic-value</b> 1794 * <p> 1795 * Description: <b>A composite of both characteristic and value</b><br> 1796 * Type: <b>composite</b><br> 1797 * Path: <b></b><br> 1798 * </p> 1799 */ 1800 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CHARACTERISTIC_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_CHARACTERISTIC_VALUE); 1801 1802 /** 1803 * Search parameter: <b>managing-entity</b> 1804 * <p> 1805 * Description: <b>Entity that is the custodian of the Group's definition</b><br> 1806 * Type: <b>reference</b><br> 1807 * Path: <b>Group.managingEntity</b><br> 1808 * </p> 1809 */ 1810 @SearchParamDefinition(name="managing-entity", path="Group.managingEntity", description="Entity that is the custodian of the Group's definition", type="reference", target={Organization.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) 1811 public static final String SP_MANAGING_ENTITY = "managing-entity"; 1812 /** 1813 * <b>Fluent Client</b> search parameter constant for <b>managing-entity</b> 1814 * <p> 1815 * Description: <b>Entity that is the custodian of the Group's definition</b><br> 1816 * Type: <b>reference</b><br> 1817 * Path: <b>Group.managingEntity</b><br> 1818 * </p> 1819 */ 1820 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MANAGING_ENTITY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_MANAGING_ENTITY); 1821 1822/** 1823 * Constant for fluent queries to be used to add include statements. Specifies 1824 * the path value of "<b>Group:managing-entity</b>". 1825 */ 1826 public static final ca.uhn.fhir.model.api.Include INCLUDE_MANAGING_ENTITY = new ca.uhn.fhir.model.api.Include("Group:managing-entity").toLocked(); 1827 1828 /** 1829 * Search parameter: <b>code</b> 1830 * <p> 1831 * Description: <b>The kind of resources contained</b><br> 1832 * Type: <b>token</b><br> 1833 * Path: <b>Group.code</b><br> 1834 * </p> 1835 */ 1836 @SearchParamDefinition(name="code", path="Group.code", description="The kind of resources contained", type="token" ) 1837 public static final String SP_CODE = "code"; 1838 /** 1839 * <b>Fluent Client</b> search parameter constant for <b>code</b> 1840 * <p> 1841 * Description: <b>The kind of resources contained</b><br> 1842 * Type: <b>token</b><br> 1843 * Path: <b>Group.code</b><br> 1844 * </p> 1845 */ 1846 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); 1847 1848 /** 1849 * Search parameter: <b>member</b> 1850 * <p> 1851 * Description: <b>Reference to the group member</b><br> 1852 * Type: <b>reference</b><br> 1853 * Path: <b>Group.member.entity</b><br> 1854 * </p> 1855 */ 1856 @SearchParamDefinition(name="member", path="Group.member.entity", description="Reference to the group member", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Device.class, Group.class, Medication.class, Patient.class, Practitioner.class, PractitionerRole.class, Substance.class } ) 1857 public static final String SP_MEMBER = "member"; 1858 /** 1859 * <b>Fluent Client</b> search parameter constant for <b>member</b> 1860 * <p> 1861 * Description: <b>Reference to the group member</b><br> 1862 * Type: <b>reference</b><br> 1863 * Path: <b>Group.member.entity</b><br> 1864 * </p> 1865 */ 1866 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MEMBER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_MEMBER); 1867 1868/** 1869 * Constant for fluent queries to be used to add include statements. Specifies 1870 * the path value of "<b>Group:member</b>". 1871 */ 1872 public static final ca.uhn.fhir.model.api.Include INCLUDE_MEMBER = new ca.uhn.fhir.model.api.Include("Group:member").toLocked(); 1873 1874 /** 1875 * Search parameter: <b>exclude</b> 1876 * <p> 1877 * Description: <b>Group includes or excludes</b><br> 1878 * Type: <b>token</b><br> 1879 * Path: <b>Group.characteristic.exclude</b><br> 1880 * </p> 1881 */ 1882 @SearchParamDefinition(name="exclude", path="Group.characteristic.exclude", description="Group includes or excludes", type="token" ) 1883 public static final String SP_EXCLUDE = "exclude"; 1884 /** 1885 * <b>Fluent Client</b> search parameter constant for <b>exclude</b> 1886 * <p> 1887 * Description: <b>Group includes or excludes</b><br> 1888 * Type: <b>token</b><br> 1889 * Path: <b>Group.characteristic.exclude</b><br> 1890 * </p> 1891 */ 1892 public static final ca.uhn.fhir.rest.gclient.TokenClientParam EXCLUDE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EXCLUDE); 1893 1894 /** 1895 * Search parameter: <b>type</b> 1896 * <p> 1897 * Description: <b>The type of resources the group contains</b><br> 1898 * Type: <b>token</b><br> 1899 * Path: <b>Group.type</b><br> 1900 * </p> 1901 */ 1902 @SearchParamDefinition(name="type", path="Group.type", description="The type of resources the group contains", type="token" ) 1903 public static final String SP_TYPE = "type"; 1904 /** 1905 * <b>Fluent Client</b> search parameter constant for <b>type</b> 1906 * <p> 1907 * Description: <b>The type of resources the group contains</b><br> 1908 * Type: <b>token</b><br> 1909 * Path: <b>Group.type</b><br> 1910 * </p> 1911 */ 1912 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); 1913 1914 /** 1915 * Search parameter: <b>value</b> 1916 * <p> 1917 * Description: <b>Value held by characteristic</b><br> 1918 * Type: <b>token</b><br> 1919 * Path: <b>Group.characteristic.value[x]</b><br> 1920 * </p> 1921 */ 1922 @SearchParamDefinition(name="value", path="(Group.characteristic.value as CodeableConcept) | (Group.characteristic.value as boolean)", description="Value held by characteristic", type="token" ) 1923 public static final String SP_VALUE = "value"; 1924 /** 1925 * <b>Fluent Client</b> search parameter constant for <b>value</b> 1926 * <p> 1927 * Description: <b>Value held by characteristic</b><br> 1928 * Type: <b>token</b><br> 1929 * Path: <b>Group.characteristic.value[x]</b><br> 1930 * </p> 1931 */ 1932 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VALUE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VALUE); 1933 1934 /** 1935 * Search parameter: <b>characteristic</b> 1936 * <p> 1937 * Description: <b>Kind of characteristic</b><br> 1938 * Type: <b>token</b><br> 1939 * Path: <b>Group.characteristic.code</b><br> 1940 * </p> 1941 */ 1942 @SearchParamDefinition(name="characteristic", path="Group.characteristic.code", description="Kind of characteristic", type="token" ) 1943 public static final String SP_CHARACTERISTIC = "characteristic"; 1944 /** 1945 * <b>Fluent Client</b> search parameter constant for <b>characteristic</b> 1946 * <p> 1947 * Description: <b>Kind of characteristic</b><br> 1948 * Type: <b>token</b><br> 1949 * Path: <b>Group.characteristic.code</b><br> 1950 * </p> 1951 */ 1952 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CHARACTERISTIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CHARACTERISTIC); 1953 1954 1955}