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