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