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