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