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 * Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc. 072 */ 073@ResourceDef(name="Goal", profile="http://hl7.org/fhir/StructureDefinition/Goal") 074public class Goal extends DomainResource { 075 076 public enum GoalLifecycleStatus { 077 /** 078 * A goal is proposed for this patient. 079 */ 080 PROPOSED, 081 /** 082 * A goal is planned for this patient. 083 */ 084 PLANNED, 085 /** 086 * A proposed goal was accepted or acknowledged. 087 */ 088 ACCEPTED, 089 /** 090 * The goal is being sought actively. 091 */ 092 ACTIVE, 093 /** 094 * The goal remains a long term objective but is no longer being actively pursued for a temporary period of time. 095 */ 096 ONHOLD, 097 /** 098 * The goal is no longer being sought. 099 */ 100 COMPLETED, 101 /** 102 * The goal has been abandoned. 103 */ 104 CANCELLED, 105 /** 106 * The goal was entered in error and voided. 107 */ 108 ENTEREDINERROR, 109 /** 110 * A proposed goal was rejected. 111 */ 112 REJECTED, 113 /** 114 * added to help the parsers with the generic types 115 */ 116 NULL; 117 public static GoalLifecycleStatus fromCode(String codeString) throws FHIRException { 118 if (codeString == null || "".equals(codeString)) 119 return null; 120 if ("proposed".equals(codeString)) 121 return PROPOSED; 122 if ("planned".equals(codeString)) 123 return PLANNED; 124 if ("accepted".equals(codeString)) 125 return ACCEPTED; 126 if ("active".equals(codeString)) 127 return ACTIVE; 128 if ("on-hold".equals(codeString)) 129 return ONHOLD; 130 if ("completed".equals(codeString)) 131 return COMPLETED; 132 if ("cancelled".equals(codeString)) 133 return CANCELLED; 134 if ("entered-in-error".equals(codeString)) 135 return ENTEREDINERROR; 136 if ("rejected".equals(codeString)) 137 return REJECTED; 138 if (Configuration.isAcceptInvalidEnums()) 139 return null; 140 else 141 throw new FHIRException("Unknown GoalLifecycleStatus code '"+codeString+"'"); 142 } 143 public String toCode() { 144 switch (this) { 145 case PROPOSED: return "proposed"; 146 case PLANNED: return "planned"; 147 case ACCEPTED: return "accepted"; 148 case ACTIVE: return "active"; 149 case ONHOLD: return "on-hold"; 150 case COMPLETED: return "completed"; 151 case CANCELLED: return "cancelled"; 152 case ENTEREDINERROR: return "entered-in-error"; 153 case REJECTED: return "rejected"; 154 default: return "?"; 155 } 156 } 157 public String getSystem() { 158 switch (this) { 159 case PROPOSED: return "http://hl7.org/fhir/goal-status"; 160 case PLANNED: return "http://hl7.org/fhir/goal-status"; 161 case ACCEPTED: return "http://hl7.org/fhir/goal-status"; 162 case ACTIVE: return "http://hl7.org/fhir/goal-status"; 163 case ONHOLD: return "http://hl7.org/fhir/goal-status"; 164 case COMPLETED: return "http://hl7.org/fhir/goal-status"; 165 case CANCELLED: return "http://hl7.org/fhir/goal-status"; 166 case ENTEREDINERROR: return "http://hl7.org/fhir/goal-status"; 167 case REJECTED: return "http://hl7.org/fhir/goal-status"; 168 default: return "?"; 169 } 170 } 171 public String getDefinition() { 172 switch (this) { 173 case PROPOSED: return "A goal is proposed for this patient."; 174 case PLANNED: return "A goal is planned for this patient."; 175 case ACCEPTED: return "A proposed goal was accepted or acknowledged."; 176 case ACTIVE: return "The goal is being sought actively."; 177 case ONHOLD: return "The goal remains a long term objective but is no longer being actively pursued for a temporary period of time."; 178 case COMPLETED: return "The goal is no longer being sought."; 179 case CANCELLED: return "The goal has been abandoned."; 180 case ENTEREDINERROR: return "The goal was entered in error and voided."; 181 case REJECTED: return "A proposed goal was rejected."; 182 default: return "?"; 183 } 184 } 185 public String getDisplay() { 186 switch (this) { 187 case PROPOSED: return "Proposed"; 188 case PLANNED: return "Planned"; 189 case ACCEPTED: return "Accepted"; 190 case ACTIVE: return "Active"; 191 case ONHOLD: return "On Hold"; 192 case COMPLETED: return "Completed"; 193 case CANCELLED: return "Cancelled"; 194 case ENTEREDINERROR: return "Entered in Error"; 195 case REJECTED: return "Rejected"; 196 default: return "?"; 197 } 198 } 199 } 200 201 public static class GoalLifecycleStatusEnumFactory implements EnumFactory<GoalLifecycleStatus> { 202 public GoalLifecycleStatus fromCode(String codeString) throws IllegalArgumentException { 203 if (codeString == null || "".equals(codeString)) 204 if (codeString == null || "".equals(codeString)) 205 return null; 206 if ("proposed".equals(codeString)) 207 return GoalLifecycleStatus.PROPOSED; 208 if ("planned".equals(codeString)) 209 return GoalLifecycleStatus.PLANNED; 210 if ("accepted".equals(codeString)) 211 return GoalLifecycleStatus.ACCEPTED; 212 if ("active".equals(codeString)) 213 return GoalLifecycleStatus.ACTIVE; 214 if ("on-hold".equals(codeString)) 215 return GoalLifecycleStatus.ONHOLD; 216 if ("completed".equals(codeString)) 217 return GoalLifecycleStatus.COMPLETED; 218 if ("cancelled".equals(codeString)) 219 return GoalLifecycleStatus.CANCELLED; 220 if ("entered-in-error".equals(codeString)) 221 return GoalLifecycleStatus.ENTEREDINERROR; 222 if ("rejected".equals(codeString)) 223 return GoalLifecycleStatus.REJECTED; 224 throw new IllegalArgumentException("Unknown GoalLifecycleStatus code '"+codeString+"'"); 225 } 226 public Enumeration<GoalLifecycleStatus> fromType(Base code) throws FHIRException { 227 if (code == null) 228 return null; 229 if (code.isEmpty()) 230 return new Enumeration<GoalLifecycleStatus>(this); 231 String codeString = ((PrimitiveType) code).asStringValue(); 232 if (codeString == null || "".equals(codeString)) 233 return null; 234 if ("proposed".equals(codeString)) 235 return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.PROPOSED); 236 if ("planned".equals(codeString)) 237 return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.PLANNED); 238 if ("accepted".equals(codeString)) 239 return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.ACCEPTED); 240 if ("active".equals(codeString)) 241 return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.ACTIVE); 242 if ("on-hold".equals(codeString)) 243 return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.ONHOLD); 244 if ("completed".equals(codeString)) 245 return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.COMPLETED); 246 if ("cancelled".equals(codeString)) 247 return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.CANCELLED); 248 if ("entered-in-error".equals(codeString)) 249 return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.ENTEREDINERROR); 250 if ("rejected".equals(codeString)) 251 return new Enumeration<GoalLifecycleStatus>(this, GoalLifecycleStatus.REJECTED); 252 throw new FHIRException("Unknown GoalLifecycleStatus code '"+codeString+"'"); 253 } 254 public String toCode(GoalLifecycleStatus code) { 255 if (code == GoalLifecycleStatus.PROPOSED) 256 return "proposed"; 257 if (code == GoalLifecycleStatus.PLANNED) 258 return "planned"; 259 if (code == GoalLifecycleStatus.ACCEPTED) 260 return "accepted"; 261 if (code == GoalLifecycleStatus.ACTIVE) 262 return "active"; 263 if (code == GoalLifecycleStatus.ONHOLD) 264 return "on-hold"; 265 if (code == GoalLifecycleStatus.COMPLETED) 266 return "completed"; 267 if (code == GoalLifecycleStatus.CANCELLED) 268 return "cancelled"; 269 if (code == GoalLifecycleStatus.ENTEREDINERROR) 270 return "entered-in-error"; 271 if (code == GoalLifecycleStatus.REJECTED) 272 return "rejected"; 273 return "?"; 274 } 275 public String toSystem(GoalLifecycleStatus code) { 276 return code.getSystem(); 277 } 278 } 279 280 @Block() 281 public static class GoalTargetComponent extends BackboneElement implements IBaseBackboneElement { 282 /** 283 * The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level. 284 */ 285 @Child(name = "measure", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) 286 @Description(shortDefinition="The parameter whose value is being tracked", formalDefinition="The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level." ) 287 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-codes") 288 protected CodeableConcept measure; 289 290 /** 291 * The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value. 292 */ 293 @Child(name = "detail", type = {Quantity.class, Range.class, CodeableConcept.class, StringType.class, BooleanType.class, IntegerType.class, Ratio.class}, order=2, min=0, max=1, modifier=false, summary=true) 294 @Description(shortDefinition="The target value to be achieved", formalDefinition="The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value." ) 295 protected DataType detail; 296 297 /** 298 * Indicates either the date or the duration after start by which the goal should be met. 299 */ 300 @Child(name = "due", type = {DateType.class, Duration.class}, order=3, min=0, max=1, modifier=false, summary=true) 301 @Description(shortDefinition="Reach goal on or before", formalDefinition="Indicates either the date or the duration after start by which the goal should be met." ) 302 protected DataType due; 303 304 private static final long serialVersionUID = 1975697830L; 305 306 /** 307 * Constructor 308 */ 309 public GoalTargetComponent() { 310 super(); 311 } 312 313 /** 314 * @return {@link #measure} (The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.) 315 */ 316 public CodeableConcept getMeasure() { 317 if (this.measure == null) 318 if (Configuration.errorOnAutoCreate()) 319 throw new Error("Attempt to auto-create GoalTargetComponent.measure"); 320 else if (Configuration.doAutoCreate()) 321 this.measure = new CodeableConcept(); // cc 322 return this.measure; 323 } 324 325 public boolean hasMeasure() { 326 return this.measure != null && !this.measure.isEmpty(); 327 } 328 329 /** 330 * @param value {@link #measure} (The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.) 331 */ 332 public GoalTargetComponent setMeasure(CodeableConcept value) { 333 this.measure = value; 334 return this; 335 } 336 337 /** 338 * @return {@link #detail} (The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.) 339 */ 340 public DataType getDetail() { 341 return this.detail; 342 } 343 344 /** 345 * @return {@link #detail} (The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.) 346 */ 347 public Quantity getDetailQuantity() throws FHIRException { 348 if (this.detail == null) 349 this.detail = new Quantity(); 350 if (!(this.detail instanceof Quantity)) 351 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.detail.getClass().getName()+" was encountered"); 352 return (Quantity) this.detail; 353 } 354 355 public boolean hasDetailQuantity() { 356 return this != null && this.detail instanceof Quantity; 357 } 358 359 /** 360 * @return {@link #detail} (The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.) 361 */ 362 public Range getDetailRange() throws FHIRException { 363 if (this.detail == null) 364 this.detail = new Range(); 365 if (!(this.detail instanceof Range)) 366 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.detail.getClass().getName()+" was encountered"); 367 return (Range) this.detail; 368 } 369 370 public boolean hasDetailRange() { 371 return this != null && this.detail instanceof Range; 372 } 373 374 /** 375 * @return {@link #detail} (The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.) 376 */ 377 public CodeableConcept getDetailCodeableConcept() throws FHIRException { 378 if (this.detail == null) 379 this.detail = new CodeableConcept(); 380 if (!(this.detail instanceof CodeableConcept)) 381 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.detail.getClass().getName()+" was encountered"); 382 return (CodeableConcept) this.detail; 383 } 384 385 public boolean hasDetailCodeableConcept() { 386 return this != null && this.detail instanceof CodeableConcept; 387 } 388 389 /** 390 * @return {@link #detail} (The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.) 391 */ 392 public StringType getDetailStringType() throws FHIRException { 393 if (this.detail == null) 394 this.detail = new StringType(); 395 if (!(this.detail instanceof StringType)) 396 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.detail.getClass().getName()+" was encountered"); 397 return (StringType) this.detail; 398 } 399 400 public boolean hasDetailStringType() { 401 return this != null && this.detail instanceof StringType; 402 } 403 404 /** 405 * @return {@link #detail} (The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.) 406 */ 407 public BooleanType getDetailBooleanType() throws FHIRException { 408 if (this.detail == null) 409 this.detail = new BooleanType(); 410 if (!(this.detail instanceof BooleanType)) 411 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.detail.getClass().getName()+" was encountered"); 412 return (BooleanType) this.detail; 413 } 414 415 public boolean hasDetailBooleanType() { 416 return this != null && this.detail instanceof BooleanType; 417 } 418 419 /** 420 * @return {@link #detail} (The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.) 421 */ 422 public IntegerType getDetailIntegerType() throws FHIRException { 423 if (this.detail == null) 424 this.detail = new IntegerType(); 425 if (!(this.detail instanceof IntegerType)) 426 throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.detail.getClass().getName()+" was encountered"); 427 return (IntegerType) this.detail; 428 } 429 430 public boolean hasDetailIntegerType() { 431 return this != null && this.detail instanceof IntegerType; 432 } 433 434 /** 435 * @return {@link #detail} (The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.) 436 */ 437 public Ratio getDetailRatio() throws FHIRException { 438 if (this.detail == null) 439 this.detail = new Ratio(); 440 if (!(this.detail instanceof Ratio)) 441 throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.detail.getClass().getName()+" was encountered"); 442 return (Ratio) this.detail; 443 } 444 445 public boolean hasDetailRatio() { 446 return this != null && this.detail instanceof Ratio; 447 } 448 449 public boolean hasDetail() { 450 return this.detail != null && !this.detail.isEmpty(); 451 } 452 453 /** 454 * @param value {@link #detail} (The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.) 455 */ 456 public GoalTargetComponent setDetail(DataType value) { 457 if (value != null && !(value instanceof Quantity || value instanceof Range || value instanceof CodeableConcept || value instanceof StringType || value instanceof BooleanType || value instanceof IntegerType || value instanceof Ratio)) 458 throw new Error("Not the right type for Goal.target.detail[x]: "+value.fhirType()); 459 this.detail = value; 460 return this; 461 } 462 463 /** 464 * @return {@link #due} (Indicates either the date or the duration after start by which the goal should be met.) 465 */ 466 public DataType getDue() { 467 return this.due; 468 } 469 470 /** 471 * @return {@link #due} (Indicates either the date or the duration after start by which the goal should be met.) 472 */ 473 public DateType getDueDateType() throws FHIRException { 474 if (this.due == null) 475 this.due = new DateType(); 476 if (!(this.due instanceof DateType)) 477 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.due.getClass().getName()+" was encountered"); 478 return (DateType) this.due; 479 } 480 481 public boolean hasDueDateType() { 482 return this != null && this.due instanceof DateType; 483 } 484 485 /** 486 * @return {@link #due} (Indicates either the date or the duration after start by which the goal should be met.) 487 */ 488 public Duration getDueDuration() throws FHIRException { 489 if (this.due == null) 490 this.due = new Duration(); 491 if (!(this.due instanceof Duration)) 492 throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.due.getClass().getName()+" was encountered"); 493 return (Duration) this.due; 494 } 495 496 public boolean hasDueDuration() { 497 return this != null && this.due instanceof Duration; 498 } 499 500 public boolean hasDue() { 501 return this.due != null && !this.due.isEmpty(); 502 } 503 504 /** 505 * @param value {@link #due} (Indicates either the date or the duration after start by which the goal should be met.) 506 */ 507 public GoalTargetComponent setDue(DataType value) { 508 if (value != null && !(value instanceof DateType || value instanceof Duration)) 509 throw new Error("Not the right type for Goal.target.due[x]: "+value.fhirType()); 510 this.due = value; 511 return this; 512 } 513 514 protected void listChildren(List<Property> children) { 515 super.listChildren(children); 516 children.add(new Property("measure", "CodeableConcept", "The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.", 0, 1, measure)); 517 children.add(new Property("detail[x]", "Quantity|Range|CodeableConcept|string|boolean|integer|Ratio", "The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", 0, 1, detail)); 518 children.add(new Property("due[x]", "date|Duration", "Indicates either the date or the duration after start by which the goal should be met.", 0, 1, due)); 519 } 520 521 @Override 522 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 523 switch (_hash) { 524 case 938321246: /*measure*/ return new Property("measure", "CodeableConcept", "The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.", 0, 1, measure); 525 case -1973084529: /*detail[x]*/ return new Property("detail[x]", "Quantity|Range|CodeableConcept|string|boolean|integer|Ratio", "The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", 0, 1, detail); 526 case -1335224239: /*detail*/ return new Property("detail[x]", "Quantity|Range|CodeableConcept|string|boolean|integer|Ratio", "The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", 0, 1, detail); 527 case -1313079300: /*detailQuantity*/ return new Property("detail[x]", "Quantity", "The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", 0, 1, detail); 528 case -2062632084: /*detailRange*/ return new Property("detail[x]", "Range", "The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", 0, 1, detail); 529 case -175586544: /*detailCodeableConcept*/ return new Property("detail[x]", "CodeableConcept", "The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", 0, 1, detail); 530 case 529212354: /*detailString*/ return new Property("detail[x]", "string", "The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", 0, 1, detail); 531 case 1172184727: /*detailBoolean*/ return new Property("detail[x]", "boolean", "The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", 0, 1, detail); 532 case -1229442131: /*detailInteger*/ return new Property("detail[x]", "integer", "The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", 0, 1, detail); 533 case -2062626246: /*detailRatio*/ return new Property("detail[x]", "Ratio", "The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.", 0, 1, detail); 534 case -1320900084: /*due[x]*/ return new Property("due[x]", "date|Duration", "Indicates either the date or the duration after start by which the goal should be met.", 0, 1, due); 535 case 99828: /*due*/ return new Property("due[x]", "date|Duration", "Indicates either the date or the duration after start by which the goal should be met.", 0, 1, due); 536 case 2001063874: /*dueDate*/ return new Property("due[x]", "date", "Indicates either the date or the duration after start by which the goal should be met.", 0, 1, due); 537 case -620428376: /*dueDuration*/ return new Property("due[x]", "Duration", "Indicates either the date or the duration after start by which the goal should be met.", 0, 1, due); 538 default: return super.getNamedProperty(_hash, _name, _checkValid); 539 } 540 541 } 542 543 @Override 544 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 545 switch (hash) { 546 case 938321246: /*measure*/ return this.measure == null ? new Base[0] : new Base[] {this.measure}; // CodeableConcept 547 case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : new Base[] {this.detail}; // DataType 548 case 99828: /*due*/ return this.due == null ? new Base[0] : new Base[] {this.due}; // DataType 549 default: return super.getProperty(hash, name, checkValid); 550 } 551 552 } 553 554 @Override 555 public Base setProperty(int hash, String name, Base value) throws FHIRException { 556 switch (hash) { 557 case 938321246: // measure 558 this.measure = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 559 return value; 560 case -1335224239: // detail 561 this.detail = TypeConvertor.castToType(value); // DataType 562 return value; 563 case 99828: // due 564 this.due = TypeConvertor.castToType(value); // DataType 565 return value; 566 default: return super.setProperty(hash, name, value); 567 } 568 569 } 570 571 @Override 572 public Base setProperty(String name, Base value) throws FHIRException { 573 if (name.equals("measure")) { 574 this.measure = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 575 } else if (name.equals("detail[x]")) { 576 this.detail = TypeConvertor.castToType(value); // DataType 577 } else if (name.equals("due[x]")) { 578 this.due = TypeConvertor.castToType(value); // DataType 579 } else 580 return super.setProperty(name, value); 581 return value; 582 } 583 584 @Override 585 public Base makeProperty(int hash, String name) throws FHIRException { 586 switch (hash) { 587 case 938321246: return getMeasure(); 588 case -1973084529: return getDetail(); 589 case -1335224239: return getDetail(); 590 case -1320900084: return getDue(); 591 case 99828: return getDue(); 592 default: return super.makeProperty(hash, name); 593 } 594 595 } 596 597 @Override 598 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 599 switch (hash) { 600 case 938321246: /*measure*/ return new String[] {"CodeableConcept"}; 601 case -1335224239: /*detail*/ return new String[] {"Quantity", "Range", "CodeableConcept", "string", "boolean", "integer", "Ratio"}; 602 case 99828: /*due*/ return new String[] {"date", "Duration"}; 603 default: return super.getTypesForProperty(hash, name); 604 } 605 606 } 607 608 @Override 609 public Base addChild(String name) throws FHIRException { 610 if (name.equals("measure")) { 611 this.measure = new CodeableConcept(); 612 return this.measure; 613 } 614 else if (name.equals("detailQuantity")) { 615 this.detail = new Quantity(); 616 return this.detail; 617 } 618 else if (name.equals("detailRange")) { 619 this.detail = new Range(); 620 return this.detail; 621 } 622 else if (name.equals("detailCodeableConcept")) { 623 this.detail = new CodeableConcept(); 624 return this.detail; 625 } 626 else if (name.equals("detailString")) { 627 this.detail = new StringType(); 628 return this.detail; 629 } 630 else if (name.equals("detailBoolean")) { 631 this.detail = new BooleanType(); 632 return this.detail; 633 } 634 else if (name.equals("detailInteger")) { 635 this.detail = new IntegerType(); 636 return this.detail; 637 } 638 else if (name.equals("detailRatio")) { 639 this.detail = new Ratio(); 640 return this.detail; 641 } 642 else if (name.equals("dueDate")) { 643 this.due = new DateType(); 644 return this.due; 645 } 646 else if (name.equals("dueDuration")) { 647 this.due = new Duration(); 648 return this.due; 649 } 650 else 651 return super.addChild(name); 652 } 653 654 public GoalTargetComponent copy() { 655 GoalTargetComponent dst = new GoalTargetComponent(); 656 copyValues(dst); 657 return dst; 658 } 659 660 public void copyValues(GoalTargetComponent dst) { 661 super.copyValues(dst); 662 dst.measure = measure == null ? null : measure.copy(); 663 dst.detail = detail == null ? null : detail.copy(); 664 dst.due = due == null ? null : due.copy(); 665 } 666 667 @Override 668 public boolean equalsDeep(Base other_) { 669 if (!super.equalsDeep(other_)) 670 return false; 671 if (!(other_ instanceof GoalTargetComponent)) 672 return false; 673 GoalTargetComponent o = (GoalTargetComponent) other_; 674 return compareDeep(measure, o.measure, true) && compareDeep(detail, o.detail, true) && compareDeep(due, o.due, true) 675 ; 676 } 677 678 @Override 679 public boolean equalsShallow(Base other_) { 680 if (!super.equalsShallow(other_)) 681 return false; 682 if (!(other_ instanceof GoalTargetComponent)) 683 return false; 684 GoalTargetComponent o = (GoalTargetComponent) other_; 685 return true; 686 } 687 688 public boolean isEmpty() { 689 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(measure, detail, due); 690 } 691 692 public String fhirType() { 693 return "Goal.target"; 694 695 } 696 697 } 698 699 /** 700 * Business identifiers assigned to this goal by the performer or other systems which remain constant as the resource is updated and propagates from server to server. 701 */ 702 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 703 @Description(shortDefinition="External Ids for this goal", formalDefinition="Business identifiers assigned to this goal by the performer or other systems which remain constant as the resource is updated and propagates from server to server." ) 704 protected List<Identifier> identifier; 705 706 /** 707 * The state of the goal throughout its lifecycle. 708 */ 709 @Child(name = "lifecycleStatus", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) 710 @Description(shortDefinition="proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected", formalDefinition="The state of the goal throughout its lifecycle." ) 711 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-status") 712 protected Enumeration<GoalLifecycleStatus> lifecycleStatus; 713 714 /** 715 * Describes the progression, or lack thereof, towards the goal against the target. 716 */ 717 @Child(name = "achievementStatus", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 718 @Description(shortDefinition="in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable", formalDefinition="Describes the progression, or lack thereof, towards the goal against the target." ) 719 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-achievement") 720 protected CodeableConcept achievementStatus; 721 722 /** 723 * Indicates a category the goal falls within. 724 */ 725 @Child(name = "category", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 726 @Description(shortDefinition="E.g. Treatment, dietary, behavioral, etc.", formalDefinition="Indicates a category the goal falls within." ) 727 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-category") 728 protected List<CodeableConcept> category; 729 730 /** 731 * After meeting the goal, ongoing activity is needed to sustain the goal objective. 732 */ 733 @Child(name = "continuous", type = {BooleanType.class}, order=4, min=0, max=1, modifier=false, summary=false) 734 @Description(shortDefinition="After meeting the goal, ongoing activity is needed to sustain the goal objective", formalDefinition="After meeting the goal, ongoing activity is needed to sustain the goal objective." ) 735 protected BooleanType continuous; 736 737 /** 738 * Identifies the mutually agreed level of importance associated with reaching/sustaining the goal. 739 */ 740 @Child(name = "priority", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true) 741 @Description(shortDefinition="high-priority | medium-priority | low-priority", formalDefinition="Identifies the mutually agreed level of importance associated with reaching/sustaining the goal." ) 742 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-priority") 743 protected CodeableConcept priority; 744 745 /** 746 * Human-readable and/or coded description of a specific desired objective of care, such as "control blood pressure" or "negotiate an obstacle course" or "dance with child at wedding". 747 */ 748 @Child(name = "description", type = {CodeableConcept.class}, order=6, min=1, max=1, modifier=false, summary=true) 749 @Description(shortDefinition="Code or text describing goal", formalDefinition="Human-readable and/or coded description of a specific desired objective of care, such as \"control blood pressure\" or \"negotiate an obstacle course\" or \"dance with child at wedding\"." ) 750 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings") 751 protected CodeableConcept description; 752 753 /** 754 * Identifies the patient, group or organization for whom the goal is being established. 755 */ 756 @Child(name = "subject", type = {Patient.class, Group.class, Organization.class}, order=7, min=1, max=1, modifier=false, summary=true) 757 @Description(shortDefinition="Who this goal is intended for", formalDefinition="Identifies the patient, group or organization for whom the goal is being established." ) 758 protected Reference subject; 759 760 /** 761 * The date or event after which the goal should begin being pursued. 762 */ 763 @Child(name = "start", type = {DateType.class, CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=true) 764 @Description(shortDefinition="When goal pursuit begins", formalDefinition="The date or event after which the goal should begin being pursued." ) 765 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-start-event") 766 protected DataType start; 767 768 /** 769 * Indicates what should be done by when. 770 */ 771 @Child(name = "target", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 772 @Description(shortDefinition="Target outcome for the goal", formalDefinition="Indicates what should be done by when." ) 773 protected List<GoalTargetComponent> target; 774 775 /** 776 * Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc. 777 */ 778 @Child(name = "statusDate", type = {DateType.class}, order=10, min=0, max=1, modifier=false, summary=true) 779 @Description(shortDefinition="When goal status took effect", formalDefinition="Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc." ) 780 protected DateType statusDate; 781 782 /** 783 * Captures the reason for the current status. 784 */ 785 @Child(name = "statusReason", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false) 786 @Description(shortDefinition="Reason for current status", formalDefinition="Captures the reason for the current status." ) 787 protected StringType statusReason; 788 789 /** 790 * Indicates whose goal this is - patient goal, practitioner goal, etc. 791 */ 792 @Child(name = "expressedBy", type = {Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class}, order=12, min=0, max=1, modifier=false, summary=true) 793 @Description(shortDefinition="Who's responsible for creating Goal?", formalDefinition="Indicates whose goal this is - patient goal, practitioner goal, etc." ) 794 protected Reference expressedBy; 795 796 /** 797 * The identified conditions and other health record elements that are intended to be addressed by the goal. 798 */ 799 @Child(name = "addresses", type = {Condition.class, Observation.class, MedicationUsage.class, MedicationRequest.class, NutritionOrder.class, ServiceRequest.class, RiskAssessment.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 800 @Description(shortDefinition="Issues addressed by this goal", formalDefinition="The identified conditions and other health record elements that are intended to be addressed by the goal." ) 801 protected List<Reference> addresses; 802 803 /** 804 * Any comments related to the goal. 805 */ 806 @Child(name = "note", type = {Annotation.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 807 @Description(shortDefinition="Comments about the goal", formalDefinition="Any comments related to the goal." ) 808 protected List<Annotation> note; 809 810 /** 811 * Identifies the change (or lack of change) at the point when the status of the goal is assessed. 812 */ 813 @Child(name = "outcome", type = {CodeableReference.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 814 @Description(shortDefinition="What result was achieved regarding the goal?", formalDefinition="Identifies the change (or lack of change) at the point when the status of the goal is assessed." ) 815 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings") 816 protected List<CodeableReference> outcome; 817 818 private static final long serialVersionUID = -1181155521L; 819 820 /** 821 * Constructor 822 */ 823 public Goal() { 824 super(); 825 } 826 827 /** 828 * Constructor 829 */ 830 public Goal(GoalLifecycleStatus lifecycleStatus, CodeableConcept description, Reference subject) { 831 super(); 832 this.setLifecycleStatus(lifecycleStatus); 833 this.setDescription(description); 834 this.setSubject(subject); 835 } 836 837 /** 838 * @return {@link #identifier} (Business identifiers assigned to this goal by the performer or other systems which remain constant as the resource is updated and propagates from server to server.) 839 */ 840 public List<Identifier> getIdentifier() { 841 if (this.identifier == null) 842 this.identifier = new ArrayList<Identifier>(); 843 return this.identifier; 844 } 845 846 /** 847 * @return Returns a reference to <code>this</code> for easy method chaining 848 */ 849 public Goal setIdentifier(List<Identifier> theIdentifier) { 850 this.identifier = theIdentifier; 851 return this; 852 } 853 854 public boolean hasIdentifier() { 855 if (this.identifier == null) 856 return false; 857 for (Identifier item : this.identifier) 858 if (!item.isEmpty()) 859 return true; 860 return false; 861 } 862 863 public Identifier addIdentifier() { //3 864 Identifier t = new Identifier(); 865 if (this.identifier == null) 866 this.identifier = new ArrayList<Identifier>(); 867 this.identifier.add(t); 868 return t; 869 } 870 871 public Goal addIdentifier(Identifier t) { //3 872 if (t == null) 873 return this; 874 if (this.identifier == null) 875 this.identifier = new ArrayList<Identifier>(); 876 this.identifier.add(t); 877 return this; 878 } 879 880 /** 881 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 882 */ 883 public Identifier getIdentifierFirstRep() { 884 if (getIdentifier().isEmpty()) { 885 addIdentifier(); 886 } 887 return getIdentifier().get(0); 888 } 889 890 /** 891 * @return {@link #lifecycleStatus} (The state of the goal throughout its lifecycle.). This is the underlying object with id, value and extensions. The accessor "getLifecycleStatus" gives direct access to the value 892 */ 893 public Enumeration<GoalLifecycleStatus> getLifecycleStatusElement() { 894 if (this.lifecycleStatus == null) 895 if (Configuration.errorOnAutoCreate()) 896 throw new Error("Attempt to auto-create Goal.lifecycleStatus"); 897 else if (Configuration.doAutoCreate()) 898 this.lifecycleStatus = new Enumeration<GoalLifecycleStatus>(new GoalLifecycleStatusEnumFactory()); // bb 899 return this.lifecycleStatus; 900 } 901 902 public boolean hasLifecycleStatusElement() { 903 return this.lifecycleStatus != null && !this.lifecycleStatus.isEmpty(); 904 } 905 906 public boolean hasLifecycleStatus() { 907 return this.lifecycleStatus != null && !this.lifecycleStatus.isEmpty(); 908 } 909 910 /** 911 * @param value {@link #lifecycleStatus} (The state of the goal throughout its lifecycle.). This is the underlying object with id, value and extensions. The accessor "getLifecycleStatus" gives direct access to the value 912 */ 913 public Goal setLifecycleStatusElement(Enumeration<GoalLifecycleStatus> value) { 914 this.lifecycleStatus = value; 915 return this; 916 } 917 918 /** 919 * @return The state of the goal throughout its lifecycle. 920 */ 921 public GoalLifecycleStatus getLifecycleStatus() { 922 return this.lifecycleStatus == null ? null : this.lifecycleStatus.getValue(); 923 } 924 925 /** 926 * @param value The state of the goal throughout its lifecycle. 927 */ 928 public Goal setLifecycleStatus(GoalLifecycleStatus value) { 929 if (this.lifecycleStatus == null) 930 this.lifecycleStatus = new Enumeration<GoalLifecycleStatus>(new GoalLifecycleStatusEnumFactory()); 931 this.lifecycleStatus.setValue(value); 932 return this; 933 } 934 935 /** 936 * @return {@link #achievementStatus} (Describes the progression, or lack thereof, towards the goal against the target.) 937 */ 938 public CodeableConcept getAchievementStatus() { 939 if (this.achievementStatus == null) 940 if (Configuration.errorOnAutoCreate()) 941 throw new Error("Attempt to auto-create Goal.achievementStatus"); 942 else if (Configuration.doAutoCreate()) 943 this.achievementStatus = new CodeableConcept(); // cc 944 return this.achievementStatus; 945 } 946 947 public boolean hasAchievementStatus() { 948 return this.achievementStatus != null && !this.achievementStatus.isEmpty(); 949 } 950 951 /** 952 * @param value {@link #achievementStatus} (Describes the progression, or lack thereof, towards the goal against the target.) 953 */ 954 public Goal setAchievementStatus(CodeableConcept value) { 955 this.achievementStatus = value; 956 return this; 957 } 958 959 /** 960 * @return {@link #category} (Indicates a category the goal falls within.) 961 */ 962 public List<CodeableConcept> getCategory() { 963 if (this.category == null) 964 this.category = new ArrayList<CodeableConcept>(); 965 return this.category; 966 } 967 968 /** 969 * @return Returns a reference to <code>this</code> for easy method chaining 970 */ 971 public Goal setCategory(List<CodeableConcept> theCategory) { 972 this.category = theCategory; 973 return this; 974 } 975 976 public boolean hasCategory() { 977 if (this.category == null) 978 return false; 979 for (CodeableConcept item : this.category) 980 if (!item.isEmpty()) 981 return true; 982 return false; 983 } 984 985 public CodeableConcept addCategory() { //3 986 CodeableConcept t = new CodeableConcept(); 987 if (this.category == null) 988 this.category = new ArrayList<CodeableConcept>(); 989 this.category.add(t); 990 return t; 991 } 992 993 public Goal addCategory(CodeableConcept t) { //3 994 if (t == null) 995 return this; 996 if (this.category == null) 997 this.category = new ArrayList<CodeableConcept>(); 998 this.category.add(t); 999 return this; 1000 } 1001 1002 /** 1003 * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist {3} 1004 */ 1005 public CodeableConcept getCategoryFirstRep() { 1006 if (getCategory().isEmpty()) { 1007 addCategory(); 1008 } 1009 return getCategory().get(0); 1010 } 1011 1012 /** 1013 * @return {@link #continuous} (After meeting the goal, ongoing activity is needed to sustain the goal objective.). This is the underlying object with id, value and extensions. The accessor "getContinuous" gives direct access to the value 1014 */ 1015 public BooleanType getContinuousElement() { 1016 if (this.continuous == null) 1017 if (Configuration.errorOnAutoCreate()) 1018 throw new Error("Attempt to auto-create Goal.continuous"); 1019 else if (Configuration.doAutoCreate()) 1020 this.continuous = new BooleanType(); // bb 1021 return this.continuous; 1022 } 1023 1024 public boolean hasContinuousElement() { 1025 return this.continuous != null && !this.continuous.isEmpty(); 1026 } 1027 1028 public boolean hasContinuous() { 1029 return this.continuous != null && !this.continuous.isEmpty(); 1030 } 1031 1032 /** 1033 * @param value {@link #continuous} (After meeting the goal, ongoing activity is needed to sustain the goal objective.). This is the underlying object with id, value and extensions. The accessor "getContinuous" gives direct access to the value 1034 */ 1035 public Goal setContinuousElement(BooleanType value) { 1036 this.continuous = value; 1037 return this; 1038 } 1039 1040 /** 1041 * @return After meeting the goal, ongoing activity is needed to sustain the goal objective. 1042 */ 1043 public boolean getContinuous() { 1044 return this.continuous == null || this.continuous.isEmpty() ? false : this.continuous.getValue(); 1045 } 1046 1047 /** 1048 * @param value After meeting the goal, ongoing activity is needed to sustain the goal objective. 1049 */ 1050 public Goal setContinuous(boolean value) { 1051 if (this.continuous == null) 1052 this.continuous = new BooleanType(); 1053 this.continuous.setValue(value); 1054 return this; 1055 } 1056 1057 /** 1058 * @return {@link #priority} (Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.) 1059 */ 1060 public CodeableConcept getPriority() { 1061 if (this.priority == null) 1062 if (Configuration.errorOnAutoCreate()) 1063 throw new Error("Attempt to auto-create Goal.priority"); 1064 else if (Configuration.doAutoCreate()) 1065 this.priority = new CodeableConcept(); // cc 1066 return this.priority; 1067 } 1068 1069 public boolean hasPriority() { 1070 return this.priority != null && !this.priority.isEmpty(); 1071 } 1072 1073 /** 1074 * @param value {@link #priority} (Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.) 1075 */ 1076 public Goal setPriority(CodeableConcept value) { 1077 this.priority = value; 1078 return this; 1079 } 1080 1081 /** 1082 * @return {@link #description} (Human-readable and/or coded description of a specific desired objective of care, such as "control blood pressure" or "negotiate an obstacle course" or "dance with child at wedding".) 1083 */ 1084 public CodeableConcept getDescription() { 1085 if (this.description == null) 1086 if (Configuration.errorOnAutoCreate()) 1087 throw new Error("Attempt to auto-create Goal.description"); 1088 else if (Configuration.doAutoCreate()) 1089 this.description = new CodeableConcept(); // cc 1090 return this.description; 1091 } 1092 1093 public boolean hasDescription() { 1094 return this.description != null && !this.description.isEmpty(); 1095 } 1096 1097 /** 1098 * @param value {@link #description} (Human-readable and/or coded description of a specific desired objective of care, such as "control blood pressure" or "negotiate an obstacle course" or "dance with child at wedding".) 1099 */ 1100 public Goal setDescription(CodeableConcept value) { 1101 this.description = value; 1102 return this; 1103 } 1104 1105 /** 1106 * @return {@link #subject} (Identifies the patient, group or organization for whom the goal is being established.) 1107 */ 1108 public Reference getSubject() { 1109 if (this.subject == null) 1110 if (Configuration.errorOnAutoCreate()) 1111 throw new Error("Attempt to auto-create Goal.subject"); 1112 else if (Configuration.doAutoCreate()) 1113 this.subject = new Reference(); // cc 1114 return this.subject; 1115 } 1116 1117 public boolean hasSubject() { 1118 return this.subject != null && !this.subject.isEmpty(); 1119 } 1120 1121 /** 1122 * @param value {@link #subject} (Identifies the patient, group or organization for whom the goal is being established.) 1123 */ 1124 public Goal setSubject(Reference value) { 1125 this.subject = value; 1126 return this; 1127 } 1128 1129 /** 1130 * @return {@link #start} (The date or event after which the goal should begin being pursued.) 1131 */ 1132 public DataType getStart() { 1133 return this.start; 1134 } 1135 1136 /** 1137 * @return {@link #start} (The date or event after which the goal should begin being pursued.) 1138 */ 1139 public DateType getStartDateType() throws FHIRException { 1140 if (this.start == null) 1141 this.start = new DateType(); 1142 if (!(this.start instanceof DateType)) 1143 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.start.getClass().getName()+" was encountered"); 1144 return (DateType) this.start; 1145 } 1146 1147 public boolean hasStartDateType() { 1148 return this != null && this.start instanceof DateType; 1149 } 1150 1151 /** 1152 * @return {@link #start} (The date or event after which the goal should begin being pursued.) 1153 */ 1154 public CodeableConcept getStartCodeableConcept() throws FHIRException { 1155 if (this.start == null) 1156 this.start = new CodeableConcept(); 1157 if (!(this.start instanceof CodeableConcept)) 1158 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.start.getClass().getName()+" was encountered"); 1159 return (CodeableConcept) this.start; 1160 } 1161 1162 public boolean hasStartCodeableConcept() { 1163 return this != null && this.start instanceof CodeableConcept; 1164 } 1165 1166 public boolean hasStart() { 1167 return this.start != null && !this.start.isEmpty(); 1168 } 1169 1170 /** 1171 * @param value {@link #start} (The date or event after which the goal should begin being pursued.) 1172 */ 1173 public Goal setStart(DataType value) { 1174 if (value != null && !(value instanceof DateType || value instanceof CodeableConcept)) 1175 throw new Error("Not the right type for Goal.start[x]: "+value.fhirType()); 1176 this.start = value; 1177 return this; 1178 } 1179 1180 /** 1181 * @return {@link #target} (Indicates what should be done by when.) 1182 */ 1183 public List<GoalTargetComponent> getTarget() { 1184 if (this.target == null) 1185 this.target = new ArrayList<GoalTargetComponent>(); 1186 return this.target; 1187 } 1188 1189 /** 1190 * @return Returns a reference to <code>this</code> for easy method chaining 1191 */ 1192 public Goal setTarget(List<GoalTargetComponent> theTarget) { 1193 this.target = theTarget; 1194 return this; 1195 } 1196 1197 public boolean hasTarget() { 1198 if (this.target == null) 1199 return false; 1200 for (GoalTargetComponent item : this.target) 1201 if (!item.isEmpty()) 1202 return true; 1203 return false; 1204 } 1205 1206 public GoalTargetComponent addTarget() { //3 1207 GoalTargetComponent t = new GoalTargetComponent(); 1208 if (this.target == null) 1209 this.target = new ArrayList<GoalTargetComponent>(); 1210 this.target.add(t); 1211 return t; 1212 } 1213 1214 public Goal addTarget(GoalTargetComponent t) { //3 1215 if (t == null) 1216 return this; 1217 if (this.target == null) 1218 this.target = new ArrayList<GoalTargetComponent>(); 1219 this.target.add(t); 1220 return this; 1221 } 1222 1223 /** 1224 * @return The first repetition of repeating field {@link #target}, creating it if it does not already exist {3} 1225 */ 1226 public GoalTargetComponent getTargetFirstRep() { 1227 if (getTarget().isEmpty()) { 1228 addTarget(); 1229 } 1230 return getTarget().get(0); 1231 } 1232 1233 /** 1234 * @return {@link #statusDate} (Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.). This is the underlying object with id, value and extensions. The accessor "getStatusDate" gives direct access to the value 1235 */ 1236 public DateType getStatusDateElement() { 1237 if (this.statusDate == null) 1238 if (Configuration.errorOnAutoCreate()) 1239 throw new Error("Attempt to auto-create Goal.statusDate"); 1240 else if (Configuration.doAutoCreate()) 1241 this.statusDate = new DateType(); // bb 1242 return this.statusDate; 1243 } 1244 1245 public boolean hasStatusDateElement() { 1246 return this.statusDate != null && !this.statusDate.isEmpty(); 1247 } 1248 1249 public boolean hasStatusDate() { 1250 return this.statusDate != null && !this.statusDate.isEmpty(); 1251 } 1252 1253 /** 1254 * @param value {@link #statusDate} (Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.). This is the underlying object with id, value and extensions. The accessor "getStatusDate" gives direct access to the value 1255 */ 1256 public Goal setStatusDateElement(DateType value) { 1257 this.statusDate = value; 1258 return this; 1259 } 1260 1261 /** 1262 * @return Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc. 1263 */ 1264 public Date getStatusDate() { 1265 return this.statusDate == null ? null : this.statusDate.getValue(); 1266 } 1267 1268 /** 1269 * @param value Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc. 1270 */ 1271 public Goal setStatusDate(Date value) { 1272 if (value == null) 1273 this.statusDate = null; 1274 else { 1275 if (this.statusDate == null) 1276 this.statusDate = new DateType(); 1277 this.statusDate.setValue(value); 1278 } 1279 return this; 1280 } 1281 1282 /** 1283 * @return {@link #statusReason} (Captures the reason for the current status.). This is the underlying object with id, value and extensions. The accessor "getStatusReason" gives direct access to the value 1284 */ 1285 public StringType getStatusReasonElement() { 1286 if (this.statusReason == null) 1287 if (Configuration.errorOnAutoCreate()) 1288 throw new Error("Attempt to auto-create Goal.statusReason"); 1289 else if (Configuration.doAutoCreate()) 1290 this.statusReason = new StringType(); // bb 1291 return this.statusReason; 1292 } 1293 1294 public boolean hasStatusReasonElement() { 1295 return this.statusReason != null && !this.statusReason.isEmpty(); 1296 } 1297 1298 public boolean hasStatusReason() { 1299 return this.statusReason != null && !this.statusReason.isEmpty(); 1300 } 1301 1302 /** 1303 * @param value {@link #statusReason} (Captures the reason for the current status.). This is the underlying object with id, value and extensions. The accessor "getStatusReason" gives direct access to the value 1304 */ 1305 public Goal setStatusReasonElement(StringType value) { 1306 this.statusReason = value; 1307 return this; 1308 } 1309 1310 /** 1311 * @return Captures the reason for the current status. 1312 */ 1313 public String getStatusReason() { 1314 return this.statusReason == null ? null : this.statusReason.getValue(); 1315 } 1316 1317 /** 1318 * @param value Captures the reason for the current status. 1319 */ 1320 public Goal setStatusReason(String value) { 1321 if (Utilities.noString(value)) 1322 this.statusReason = null; 1323 else { 1324 if (this.statusReason == null) 1325 this.statusReason = new StringType(); 1326 this.statusReason.setValue(value); 1327 } 1328 return this; 1329 } 1330 1331 /** 1332 * @return {@link #expressedBy} (Indicates whose goal this is - patient goal, practitioner goal, etc.) 1333 */ 1334 public Reference getExpressedBy() { 1335 if (this.expressedBy == null) 1336 if (Configuration.errorOnAutoCreate()) 1337 throw new Error("Attempt to auto-create Goal.expressedBy"); 1338 else if (Configuration.doAutoCreate()) 1339 this.expressedBy = new Reference(); // cc 1340 return this.expressedBy; 1341 } 1342 1343 public boolean hasExpressedBy() { 1344 return this.expressedBy != null && !this.expressedBy.isEmpty(); 1345 } 1346 1347 /** 1348 * @param value {@link #expressedBy} (Indicates whose goal this is - patient goal, practitioner goal, etc.) 1349 */ 1350 public Goal setExpressedBy(Reference value) { 1351 this.expressedBy = value; 1352 return this; 1353 } 1354 1355 /** 1356 * @return {@link #addresses} (The identified conditions and other health record elements that are intended to be addressed by the goal.) 1357 */ 1358 public List<Reference> getAddresses() { 1359 if (this.addresses == null) 1360 this.addresses = new ArrayList<Reference>(); 1361 return this.addresses; 1362 } 1363 1364 /** 1365 * @return Returns a reference to <code>this</code> for easy method chaining 1366 */ 1367 public Goal setAddresses(List<Reference> theAddresses) { 1368 this.addresses = theAddresses; 1369 return this; 1370 } 1371 1372 public boolean hasAddresses() { 1373 if (this.addresses == null) 1374 return false; 1375 for (Reference item : this.addresses) 1376 if (!item.isEmpty()) 1377 return true; 1378 return false; 1379 } 1380 1381 public Reference addAddresses() { //3 1382 Reference t = new Reference(); 1383 if (this.addresses == null) 1384 this.addresses = new ArrayList<Reference>(); 1385 this.addresses.add(t); 1386 return t; 1387 } 1388 1389 public Goal addAddresses(Reference t) { //3 1390 if (t == null) 1391 return this; 1392 if (this.addresses == null) 1393 this.addresses = new ArrayList<Reference>(); 1394 this.addresses.add(t); 1395 return this; 1396 } 1397 1398 /** 1399 * @return The first repetition of repeating field {@link #addresses}, creating it if it does not already exist {3} 1400 */ 1401 public Reference getAddressesFirstRep() { 1402 if (getAddresses().isEmpty()) { 1403 addAddresses(); 1404 } 1405 return getAddresses().get(0); 1406 } 1407 1408 /** 1409 * @return {@link #note} (Any comments related to the goal.) 1410 */ 1411 public List<Annotation> getNote() { 1412 if (this.note == null) 1413 this.note = new ArrayList<Annotation>(); 1414 return this.note; 1415 } 1416 1417 /** 1418 * @return Returns a reference to <code>this</code> for easy method chaining 1419 */ 1420 public Goal setNote(List<Annotation> theNote) { 1421 this.note = theNote; 1422 return this; 1423 } 1424 1425 public boolean hasNote() { 1426 if (this.note == null) 1427 return false; 1428 for (Annotation item : this.note) 1429 if (!item.isEmpty()) 1430 return true; 1431 return false; 1432 } 1433 1434 public Annotation addNote() { //3 1435 Annotation t = new Annotation(); 1436 if (this.note == null) 1437 this.note = new ArrayList<Annotation>(); 1438 this.note.add(t); 1439 return t; 1440 } 1441 1442 public Goal addNote(Annotation t) { //3 1443 if (t == null) 1444 return this; 1445 if (this.note == null) 1446 this.note = new ArrayList<Annotation>(); 1447 this.note.add(t); 1448 return this; 1449 } 1450 1451 /** 1452 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3} 1453 */ 1454 public Annotation getNoteFirstRep() { 1455 if (getNote().isEmpty()) { 1456 addNote(); 1457 } 1458 return getNote().get(0); 1459 } 1460 1461 /** 1462 * @return {@link #outcome} (Identifies the change (or lack of change) at the point when the status of the goal is assessed.) 1463 */ 1464 public List<CodeableReference> getOutcome() { 1465 if (this.outcome == null) 1466 this.outcome = new ArrayList<CodeableReference>(); 1467 return this.outcome; 1468 } 1469 1470 /** 1471 * @return Returns a reference to <code>this</code> for easy method chaining 1472 */ 1473 public Goal setOutcome(List<CodeableReference> theOutcome) { 1474 this.outcome = theOutcome; 1475 return this; 1476 } 1477 1478 public boolean hasOutcome() { 1479 if (this.outcome == null) 1480 return false; 1481 for (CodeableReference item : this.outcome) 1482 if (!item.isEmpty()) 1483 return true; 1484 return false; 1485 } 1486 1487 public CodeableReference addOutcome() { //3 1488 CodeableReference t = new CodeableReference(); 1489 if (this.outcome == null) 1490 this.outcome = new ArrayList<CodeableReference>(); 1491 this.outcome.add(t); 1492 return t; 1493 } 1494 1495 public Goal addOutcome(CodeableReference t) { //3 1496 if (t == null) 1497 return this; 1498 if (this.outcome == null) 1499 this.outcome = new ArrayList<CodeableReference>(); 1500 this.outcome.add(t); 1501 return this; 1502 } 1503 1504 /** 1505 * @return The first repetition of repeating field {@link #outcome}, creating it if it does not already exist {3} 1506 */ 1507 public CodeableReference getOutcomeFirstRep() { 1508 if (getOutcome().isEmpty()) { 1509 addOutcome(); 1510 } 1511 return getOutcome().get(0); 1512 } 1513 1514 protected void listChildren(List<Property> children) { 1515 super.listChildren(children); 1516 children.add(new Property("identifier", "Identifier", "Business identifiers assigned to this goal by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1517 children.add(new Property("lifecycleStatus", "code", "The state of the goal throughout its lifecycle.", 0, 1, lifecycleStatus)); 1518 children.add(new Property("achievementStatus", "CodeableConcept", "Describes the progression, or lack thereof, towards the goal against the target.", 0, 1, achievementStatus)); 1519 children.add(new Property("category", "CodeableConcept", "Indicates a category the goal falls within.", 0, java.lang.Integer.MAX_VALUE, category)); 1520 children.add(new Property("continuous", "boolean", "After meeting the goal, ongoing activity is needed to sustain the goal objective.", 0, 1, continuous)); 1521 children.add(new Property("priority", "CodeableConcept", "Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.", 0, 1, priority)); 1522 children.add(new Property("description", "CodeableConcept", "Human-readable and/or coded description of a specific desired objective of care, such as \"control blood pressure\" or \"negotiate an obstacle course\" or \"dance with child at wedding\".", 0, 1, description)); 1523 children.add(new Property("subject", "Reference(Patient|Group|Organization)", "Identifies the patient, group or organization for whom the goal is being established.", 0, 1, subject)); 1524 children.add(new Property("start[x]", "date|CodeableConcept", "The date or event after which the goal should begin being pursued.", 0, 1, start)); 1525 children.add(new Property("target", "", "Indicates what should be done by when.", 0, java.lang.Integer.MAX_VALUE, target)); 1526 children.add(new Property("statusDate", "date", "Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.", 0, 1, statusDate)); 1527 children.add(new Property("statusReason", "string", "Captures the reason for the current status.", 0, 1, statusReason)); 1528 children.add(new Property("expressedBy", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson)", "Indicates whose goal this is - patient goal, practitioner goal, etc.", 0, 1, expressedBy)); 1529 children.add(new Property("addresses", "Reference(Condition|Observation|MedicationUsage|MedicationRequest|NutritionOrder|ServiceRequest|RiskAssessment)", "The identified conditions and other health record elements that are intended to be addressed by the goal.", 0, java.lang.Integer.MAX_VALUE, addresses)); 1530 children.add(new Property("note", "Annotation", "Any comments related to the goal.", 0, java.lang.Integer.MAX_VALUE, note)); 1531 children.add(new Property("outcome", "CodeableReference(Observation)", "Identifies the change (or lack of change) at the point when the status of the goal is assessed.", 0, java.lang.Integer.MAX_VALUE, outcome)); 1532 } 1533 1534 @Override 1535 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1536 switch (_hash) { 1537 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Business identifiers assigned to this goal by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier); 1538 case 1165552636: /*lifecycleStatus*/ return new Property("lifecycleStatus", "code", "The state of the goal throughout its lifecycle.", 0, 1, lifecycleStatus); 1539 case 104524801: /*achievementStatus*/ return new Property("achievementStatus", "CodeableConcept", "Describes the progression, or lack thereof, towards the goal against the target.", 0, 1, achievementStatus); 1540 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "Indicates a category the goal falls within.", 0, java.lang.Integer.MAX_VALUE, category); 1541 case 379114255: /*continuous*/ return new Property("continuous", "boolean", "After meeting the goal, ongoing activity is needed to sustain the goal objective.", 0, 1, continuous); 1542 case -1165461084: /*priority*/ return new Property("priority", "CodeableConcept", "Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.", 0, 1, priority); 1543 case -1724546052: /*description*/ return new Property("description", "CodeableConcept", "Human-readable and/or coded description of a specific desired objective of care, such as \"control blood pressure\" or \"negotiate an obstacle course\" or \"dance with child at wedding\".", 0, 1, description); 1544 case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group|Organization)", "Identifies the patient, group or organization for whom the goal is being established.", 0, 1, subject); 1545 case 1316793566: /*start[x]*/ return new Property("start[x]", "date|CodeableConcept", "The date or event after which the goal should begin being pursued.", 0, 1, start); 1546 case 109757538: /*start*/ return new Property("start[x]", "date|CodeableConcept", "The date or event after which the goal should begin being pursued.", 0, 1, start); 1547 case -2129778896: /*startDate*/ return new Property("start[x]", "date", "The date or event after which the goal should begin being pursued.", 0, 1, start); 1548 case -1758833953: /*startCodeableConcept*/ return new Property("start[x]", "CodeableConcept", "The date or event after which the goal should begin being pursued.", 0, 1, start); 1549 case -880905839: /*target*/ return new Property("target", "", "Indicates what should be done by when.", 0, java.lang.Integer.MAX_VALUE, target); 1550 case 247524032: /*statusDate*/ return new Property("statusDate", "date", "Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.", 0, 1, statusDate); 1551 case 2051346646: /*statusReason*/ return new Property("statusReason", "string", "Captures the reason for the current status.", 0, 1, statusReason); 1552 case 175423686: /*expressedBy*/ return new Property("expressedBy", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson)", "Indicates whose goal this is - patient goal, practitioner goal, etc.", 0, 1, expressedBy); 1553 case 874544034: /*addresses*/ return new Property("addresses", "Reference(Condition|Observation|MedicationUsage|MedicationRequest|NutritionOrder|ServiceRequest|RiskAssessment)", "The identified conditions and other health record elements that are intended to be addressed by the goal.", 0, java.lang.Integer.MAX_VALUE, addresses); 1554 case 3387378: /*note*/ return new Property("note", "Annotation", "Any comments related to the goal.", 0, java.lang.Integer.MAX_VALUE, note); 1555 case -1106507950: /*outcome*/ return new Property("outcome", "CodeableReference(Observation)", "Identifies the change (or lack of change) at the point when the status of the goal is assessed.", 0, java.lang.Integer.MAX_VALUE, outcome); 1556 default: return super.getNamedProperty(_hash, _name, _checkValid); 1557 } 1558 1559 } 1560 1561 @Override 1562 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1563 switch (hash) { 1564 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1565 case 1165552636: /*lifecycleStatus*/ return this.lifecycleStatus == null ? new Base[0] : new Base[] {this.lifecycleStatus}; // Enumeration<GoalLifecycleStatus> 1566 case 104524801: /*achievementStatus*/ return this.achievementStatus == null ? new Base[0] : new Base[] {this.achievementStatus}; // CodeableConcept 1567 case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept 1568 case 379114255: /*continuous*/ return this.continuous == null ? new Base[0] : new Base[] {this.continuous}; // BooleanType 1569 case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // CodeableConcept 1570 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // CodeableConcept 1571 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 1572 case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // DataType 1573 case -880905839: /*target*/ return this.target == null ? new Base[0] : this.target.toArray(new Base[this.target.size()]); // GoalTargetComponent 1574 case 247524032: /*statusDate*/ return this.statusDate == null ? new Base[0] : new Base[] {this.statusDate}; // DateType 1575 case 2051346646: /*statusReason*/ return this.statusReason == null ? new Base[0] : new Base[] {this.statusReason}; // StringType 1576 case 175423686: /*expressedBy*/ return this.expressedBy == null ? new Base[0] : new Base[] {this.expressedBy}; // Reference 1577 case 874544034: /*addresses*/ return this.addresses == null ? new Base[0] : this.addresses.toArray(new Base[this.addresses.size()]); // Reference 1578 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 1579 case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : this.outcome.toArray(new Base[this.outcome.size()]); // CodeableReference 1580 default: return super.getProperty(hash, name, checkValid); 1581 } 1582 1583 } 1584 1585 @Override 1586 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1587 switch (hash) { 1588 case -1618432855: // identifier 1589 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 1590 return value; 1591 case 1165552636: // lifecycleStatus 1592 value = new GoalLifecycleStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 1593 this.lifecycleStatus = (Enumeration) value; // Enumeration<GoalLifecycleStatus> 1594 return value; 1595 case 104524801: // achievementStatus 1596 this.achievementStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1597 return value; 1598 case 50511102: // category 1599 this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 1600 return value; 1601 case 379114255: // continuous 1602 this.continuous = TypeConvertor.castToBoolean(value); // BooleanType 1603 return value; 1604 case -1165461084: // priority 1605 this.priority = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1606 return value; 1607 case -1724546052: // description 1608 this.description = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1609 return value; 1610 case -1867885268: // subject 1611 this.subject = TypeConvertor.castToReference(value); // Reference 1612 return value; 1613 case 109757538: // start 1614 this.start = TypeConvertor.castToType(value); // DataType 1615 return value; 1616 case -880905839: // target 1617 this.getTarget().add((GoalTargetComponent) value); // GoalTargetComponent 1618 return value; 1619 case 247524032: // statusDate 1620 this.statusDate = TypeConvertor.castToDate(value); // DateType 1621 return value; 1622 case 2051346646: // statusReason 1623 this.statusReason = TypeConvertor.castToString(value); // StringType 1624 return value; 1625 case 175423686: // expressedBy 1626 this.expressedBy = TypeConvertor.castToReference(value); // Reference 1627 return value; 1628 case 874544034: // addresses 1629 this.getAddresses().add(TypeConvertor.castToReference(value)); // Reference 1630 return value; 1631 case 3387378: // note 1632 this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation 1633 return value; 1634 case -1106507950: // outcome 1635 this.getOutcome().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference 1636 return value; 1637 default: return super.setProperty(hash, name, value); 1638 } 1639 1640 } 1641 1642 @Override 1643 public Base setProperty(String name, Base value) throws FHIRException { 1644 if (name.equals("identifier")) { 1645 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 1646 } else if (name.equals("lifecycleStatus")) { 1647 value = new GoalLifecycleStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 1648 this.lifecycleStatus = (Enumeration) value; // Enumeration<GoalLifecycleStatus> 1649 } else if (name.equals("achievementStatus")) { 1650 this.achievementStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1651 } else if (name.equals("category")) { 1652 this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); 1653 } else if (name.equals("continuous")) { 1654 this.continuous = TypeConvertor.castToBoolean(value); // BooleanType 1655 } else if (name.equals("priority")) { 1656 this.priority = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1657 } else if (name.equals("description")) { 1658 this.description = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1659 } else if (name.equals("subject")) { 1660 this.subject = TypeConvertor.castToReference(value); // Reference 1661 } else if (name.equals("start[x]")) { 1662 this.start = TypeConvertor.castToType(value); // DataType 1663 } else if (name.equals("target")) { 1664 this.getTarget().add((GoalTargetComponent) value); 1665 } else if (name.equals("statusDate")) { 1666 this.statusDate = TypeConvertor.castToDate(value); // DateType 1667 } else if (name.equals("statusReason")) { 1668 this.statusReason = TypeConvertor.castToString(value); // StringType 1669 } else if (name.equals("expressedBy")) { 1670 this.expressedBy = TypeConvertor.castToReference(value); // Reference 1671 } else if (name.equals("addresses")) { 1672 this.getAddresses().add(TypeConvertor.castToReference(value)); 1673 } else if (name.equals("note")) { 1674 this.getNote().add(TypeConvertor.castToAnnotation(value)); 1675 } else if (name.equals("outcome")) { 1676 this.getOutcome().add(TypeConvertor.castToCodeableReference(value)); 1677 } else 1678 return super.setProperty(name, value); 1679 return value; 1680 } 1681 1682 @Override 1683 public Base makeProperty(int hash, String name) throws FHIRException { 1684 switch (hash) { 1685 case -1618432855: return addIdentifier(); 1686 case 1165552636: return getLifecycleStatusElement(); 1687 case 104524801: return getAchievementStatus(); 1688 case 50511102: return addCategory(); 1689 case 379114255: return getContinuousElement(); 1690 case -1165461084: return getPriority(); 1691 case -1724546052: return getDescription(); 1692 case -1867885268: return getSubject(); 1693 case 1316793566: return getStart(); 1694 case 109757538: return getStart(); 1695 case -880905839: return addTarget(); 1696 case 247524032: return getStatusDateElement(); 1697 case 2051346646: return getStatusReasonElement(); 1698 case 175423686: return getExpressedBy(); 1699 case 874544034: return addAddresses(); 1700 case 3387378: return addNote(); 1701 case -1106507950: return addOutcome(); 1702 default: return super.makeProperty(hash, name); 1703 } 1704 1705 } 1706 1707 @Override 1708 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1709 switch (hash) { 1710 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1711 case 1165552636: /*lifecycleStatus*/ return new String[] {"code"}; 1712 case 104524801: /*achievementStatus*/ return new String[] {"CodeableConcept"}; 1713 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 1714 case 379114255: /*continuous*/ return new String[] {"boolean"}; 1715 case -1165461084: /*priority*/ return new String[] {"CodeableConcept"}; 1716 case -1724546052: /*description*/ return new String[] {"CodeableConcept"}; 1717 case -1867885268: /*subject*/ return new String[] {"Reference"}; 1718 case 109757538: /*start*/ return new String[] {"date", "CodeableConcept"}; 1719 case -880905839: /*target*/ return new String[] {}; 1720 case 247524032: /*statusDate*/ return new String[] {"date"}; 1721 case 2051346646: /*statusReason*/ return new String[] {"string"}; 1722 case 175423686: /*expressedBy*/ return new String[] {"Reference"}; 1723 case 874544034: /*addresses*/ return new String[] {"Reference"}; 1724 case 3387378: /*note*/ return new String[] {"Annotation"}; 1725 case -1106507950: /*outcome*/ return new String[] {"CodeableReference"}; 1726 default: return super.getTypesForProperty(hash, name); 1727 } 1728 1729 } 1730 1731 @Override 1732 public Base addChild(String name) throws FHIRException { 1733 if (name.equals("identifier")) { 1734 return addIdentifier(); 1735 } 1736 else if (name.equals("lifecycleStatus")) { 1737 throw new FHIRException("Cannot call addChild on a primitive type Goal.lifecycleStatus"); 1738 } 1739 else if (name.equals("achievementStatus")) { 1740 this.achievementStatus = new CodeableConcept(); 1741 return this.achievementStatus; 1742 } 1743 else if (name.equals("category")) { 1744 return addCategory(); 1745 } 1746 else if (name.equals("continuous")) { 1747 throw new FHIRException("Cannot call addChild on a primitive type Goal.continuous"); 1748 } 1749 else if (name.equals("priority")) { 1750 this.priority = new CodeableConcept(); 1751 return this.priority; 1752 } 1753 else if (name.equals("description")) { 1754 this.description = new CodeableConcept(); 1755 return this.description; 1756 } 1757 else if (name.equals("subject")) { 1758 this.subject = new Reference(); 1759 return this.subject; 1760 } 1761 else if (name.equals("startDate")) { 1762 this.start = new DateType(); 1763 return this.start; 1764 } 1765 else if (name.equals("startCodeableConcept")) { 1766 this.start = new CodeableConcept(); 1767 return this.start; 1768 } 1769 else if (name.equals("target")) { 1770 return addTarget(); 1771 } 1772 else if (name.equals("statusDate")) { 1773 throw new FHIRException("Cannot call addChild on a primitive type Goal.statusDate"); 1774 } 1775 else if (name.equals("statusReason")) { 1776 throw new FHIRException("Cannot call addChild on a primitive type Goal.statusReason"); 1777 } 1778 else if (name.equals("expressedBy")) { 1779 this.expressedBy = new Reference(); 1780 return this.expressedBy; 1781 } 1782 else if (name.equals("addresses")) { 1783 return addAddresses(); 1784 } 1785 else if (name.equals("note")) { 1786 return addNote(); 1787 } 1788 else if (name.equals("outcome")) { 1789 return addOutcome(); 1790 } 1791 else 1792 return super.addChild(name); 1793 } 1794 1795 public String fhirType() { 1796 return "Goal"; 1797 1798 } 1799 1800 public Goal copy() { 1801 Goal dst = new Goal(); 1802 copyValues(dst); 1803 return dst; 1804 } 1805 1806 public void copyValues(Goal dst) { 1807 super.copyValues(dst); 1808 if (identifier != null) { 1809 dst.identifier = new ArrayList<Identifier>(); 1810 for (Identifier i : identifier) 1811 dst.identifier.add(i.copy()); 1812 }; 1813 dst.lifecycleStatus = lifecycleStatus == null ? null : lifecycleStatus.copy(); 1814 dst.achievementStatus = achievementStatus == null ? null : achievementStatus.copy(); 1815 if (category != null) { 1816 dst.category = new ArrayList<CodeableConcept>(); 1817 for (CodeableConcept i : category) 1818 dst.category.add(i.copy()); 1819 }; 1820 dst.continuous = continuous == null ? null : continuous.copy(); 1821 dst.priority = priority == null ? null : priority.copy(); 1822 dst.description = description == null ? null : description.copy(); 1823 dst.subject = subject == null ? null : subject.copy(); 1824 dst.start = start == null ? null : start.copy(); 1825 if (target != null) { 1826 dst.target = new ArrayList<GoalTargetComponent>(); 1827 for (GoalTargetComponent i : target) 1828 dst.target.add(i.copy()); 1829 }; 1830 dst.statusDate = statusDate == null ? null : statusDate.copy(); 1831 dst.statusReason = statusReason == null ? null : statusReason.copy(); 1832 dst.expressedBy = expressedBy == null ? null : expressedBy.copy(); 1833 if (addresses != null) { 1834 dst.addresses = new ArrayList<Reference>(); 1835 for (Reference i : addresses) 1836 dst.addresses.add(i.copy()); 1837 }; 1838 if (note != null) { 1839 dst.note = new ArrayList<Annotation>(); 1840 for (Annotation i : note) 1841 dst.note.add(i.copy()); 1842 }; 1843 if (outcome != null) { 1844 dst.outcome = new ArrayList<CodeableReference>(); 1845 for (CodeableReference i : outcome) 1846 dst.outcome.add(i.copy()); 1847 }; 1848 } 1849 1850 protected Goal typedCopy() { 1851 return copy(); 1852 } 1853 1854 @Override 1855 public boolean equalsDeep(Base other_) { 1856 if (!super.equalsDeep(other_)) 1857 return false; 1858 if (!(other_ instanceof Goal)) 1859 return false; 1860 Goal o = (Goal) other_; 1861 return compareDeep(identifier, o.identifier, true) && compareDeep(lifecycleStatus, o.lifecycleStatus, true) 1862 && compareDeep(achievementStatus, o.achievementStatus, true) && compareDeep(category, o.category, true) 1863 && compareDeep(continuous, o.continuous, true) && compareDeep(priority, o.priority, true) && compareDeep(description, o.description, true) 1864 && compareDeep(subject, o.subject, true) && compareDeep(start, o.start, true) && compareDeep(target, o.target, true) 1865 && compareDeep(statusDate, o.statusDate, true) && compareDeep(statusReason, o.statusReason, true) 1866 && compareDeep(expressedBy, o.expressedBy, true) && compareDeep(addresses, o.addresses, true) && compareDeep(note, o.note, true) 1867 && compareDeep(outcome, o.outcome, true); 1868 } 1869 1870 @Override 1871 public boolean equalsShallow(Base other_) { 1872 if (!super.equalsShallow(other_)) 1873 return false; 1874 if (!(other_ instanceof Goal)) 1875 return false; 1876 Goal o = (Goal) other_; 1877 return compareValues(lifecycleStatus, o.lifecycleStatus, true) && compareValues(continuous, o.continuous, true) 1878 && compareValues(statusDate, o.statusDate, true) && compareValues(statusReason, o.statusReason, true) 1879 ; 1880 } 1881 1882 public boolean isEmpty() { 1883 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, lifecycleStatus 1884 , achievementStatus, category, continuous, priority, description, subject, start 1885 , target, statusDate, statusReason, expressedBy, addresses, note, outcome); 1886 } 1887 1888 @Override 1889 public ResourceType getResourceType() { 1890 return ResourceType.Goal; 1891 } 1892 1893 /** 1894 * Search parameter: <b>achievement-status</b> 1895 * <p> 1896 * Description: <b>in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable</b><br> 1897 * Type: <b>token</b><br> 1898 * Path: <b>Goal.achievementStatus</b><br> 1899 * </p> 1900 */ 1901 @SearchParamDefinition(name="achievement-status", path="Goal.achievementStatus", description="in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable", type="token" ) 1902 public static final String SP_ACHIEVEMENT_STATUS = "achievement-status"; 1903 /** 1904 * <b>Fluent Client</b> search parameter constant for <b>achievement-status</b> 1905 * <p> 1906 * Description: <b>in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable</b><br> 1907 * Type: <b>token</b><br> 1908 * Path: <b>Goal.achievementStatus</b><br> 1909 * </p> 1910 */ 1911 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACHIEVEMENT_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACHIEVEMENT_STATUS); 1912 1913 /** 1914 * Search parameter: <b>category</b> 1915 * <p> 1916 * Description: <b>E.g. Treatment, dietary, behavioral, etc.</b><br> 1917 * Type: <b>token</b><br> 1918 * Path: <b>Goal.category</b><br> 1919 * </p> 1920 */ 1921 @SearchParamDefinition(name="category", path="Goal.category", description="E.g. Treatment, dietary, behavioral, etc.", type="token" ) 1922 public static final String SP_CATEGORY = "category"; 1923 /** 1924 * <b>Fluent Client</b> search parameter constant for <b>category</b> 1925 * <p> 1926 * Description: <b>E.g. Treatment, dietary, behavioral, etc.</b><br> 1927 * Type: <b>token</b><br> 1928 * Path: <b>Goal.category</b><br> 1929 * </p> 1930 */ 1931 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY); 1932 1933 /** 1934 * Search parameter: <b>lifecycle-status</b> 1935 * <p> 1936 * Description: <b>proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected</b><br> 1937 * Type: <b>token</b><br> 1938 * Path: <b>Goal.lifecycleStatus</b><br> 1939 * </p> 1940 */ 1941 @SearchParamDefinition(name="lifecycle-status", path="Goal.lifecycleStatus", description="proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected", type="token" ) 1942 public static final String SP_LIFECYCLE_STATUS = "lifecycle-status"; 1943 /** 1944 * <b>Fluent Client</b> search parameter constant for <b>lifecycle-status</b> 1945 * <p> 1946 * Description: <b>proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected</b><br> 1947 * Type: <b>token</b><br> 1948 * Path: <b>Goal.lifecycleStatus</b><br> 1949 * </p> 1950 */ 1951 public static final ca.uhn.fhir.rest.gclient.TokenClientParam LIFECYCLE_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_LIFECYCLE_STATUS); 1952 1953 /** 1954 * Search parameter: <b>start-date</b> 1955 * <p> 1956 * Description: <b>When goal pursuit begins</b><br> 1957 * Type: <b>date</b><br> 1958 * Path: <b>(Goal.start as date)</b><br> 1959 * </p> 1960 */ 1961 @SearchParamDefinition(name="start-date", path="(Goal.start as date)", description="When goal pursuit begins", type="date" ) 1962 public static final String SP_START_DATE = "start-date"; 1963 /** 1964 * <b>Fluent Client</b> search parameter constant for <b>start-date</b> 1965 * <p> 1966 * Description: <b>When goal pursuit begins</b><br> 1967 * Type: <b>date</b><br> 1968 * Path: <b>(Goal.start as date)</b><br> 1969 * </p> 1970 */ 1971 public static final ca.uhn.fhir.rest.gclient.DateClientParam START_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_START_DATE); 1972 1973 /** 1974 * Search parameter: <b>subject</b> 1975 * <p> 1976 * Description: <b>Who this goal is intended for</b><br> 1977 * Type: <b>reference</b><br> 1978 * Path: <b>Goal.subject</b><br> 1979 * </p> 1980 */ 1981 @SearchParamDefinition(name="subject", path="Goal.subject", description="Who this goal is intended for", type="reference", target={Group.class, Organization.class, Patient.class } ) 1982 public static final String SP_SUBJECT = "subject"; 1983 /** 1984 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 1985 * <p> 1986 * Description: <b>Who this goal is intended for</b><br> 1987 * Type: <b>reference</b><br> 1988 * Path: <b>Goal.subject</b><br> 1989 * </p> 1990 */ 1991 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 1992 1993/** 1994 * Constant for fluent queries to be used to add include statements. Specifies 1995 * the path value of "<b>Goal:subject</b>". 1996 */ 1997 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Goal:subject").toLocked(); 1998 1999 /** 2000 * Search parameter: <b>target-date</b> 2001 * <p> 2002 * Description: <b>Reach goal on or before</b><br> 2003 * Type: <b>date</b><br> 2004 * Path: <b>(Goal.target.due as date)</b><br> 2005 * </p> 2006 */ 2007 @SearchParamDefinition(name="target-date", path="(Goal.target.due as date)", description="Reach goal on or before", type="date" ) 2008 public static final String SP_TARGET_DATE = "target-date"; 2009 /** 2010 * <b>Fluent Client</b> search parameter constant for <b>target-date</b> 2011 * <p> 2012 * Description: <b>Reach goal on or before</b><br> 2013 * Type: <b>date</b><br> 2014 * Path: <b>(Goal.target.due as date)</b><br> 2015 * </p> 2016 */ 2017 public static final ca.uhn.fhir.rest.gclient.DateClientParam TARGET_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_TARGET_DATE); 2018 2019 /** 2020 * Search parameter: <b>identifier</b> 2021 * <p> 2022 * Description: <b>Multiple Resources: 2023 2024* [AllergyIntolerance](allergyintolerance.html): External ids for this item 2025* [CarePlan](careplan.html): External Ids for this plan 2026* [CareTeam](careteam.html): External Ids for this team 2027* [Composition](composition.html): Version-independent identifier for the Composition 2028* [Condition](condition.html): A unique identifier of the condition record 2029* [Consent](consent.html): Identifier for this record (external references) 2030* [DetectedIssue](detectedissue.html): Unique id for the detected issue 2031* [DeviceRequest](devicerequest.html): Business identifier for request/order 2032* [DiagnosticReport](diagnosticreport.html): An identifier for the report 2033* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents 2034* [DocumentReference](documentreference.html): Master Version Specific Identifier 2035* [Encounter](encounter.html): Identifier(s) by which this encounter is known 2036* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare 2037* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier 2038* [Goal](goal.html): External Ids for this goal 2039* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number 2040* [Immunization](immunization.html): Business identifier 2041* [List](list.html): Business identifier 2042* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier 2043* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier 2044* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier 2045* [MedicationUsage](medicationusage.html): Return statements with this external identifier 2046* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier 2047* [Observation](observation.html): The unique id for a particular observation 2048* [Procedure](procedure.html): A unique identifier for a procedure 2049* [RiskAssessment](riskassessment.html): Unique identifier for the assessment 2050* [ServiceRequest](servicerequest.html): Identifiers assigned to this order 2051* [SupplyDelivery](supplydelivery.html): External identifier 2052* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest 2053* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier 2054</b><br> 2055 * Type: <b>token</b><br> 2056 * Path: <b>AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier</b><br> 2057 * </p> 2058 */ 2059 @SearchParamDefinition(name="identifier", path="AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents\r\n* [DocumentReference](documentreference.html): Master Version Specific Identifier\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number\r\n* [Immunization](immunization.html): Business identifier\r\n* [List](list.html): Business identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationUsage](medicationusage.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" ) 2060 public static final String SP_IDENTIFIER = "identifier"; 2061 /** 2062 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 2063 * <p> 2064 * Description: <b>Multiple Resources: 2065 2066* [AllergyIntolerance](allergyintolerance.html): External ids for this item 2067* [CarePlan](careplan.html): External Ids for this plan 2068* [CareTeam](careteam.html): External Ids for this team 2069* [Composition](composition.html): Version-independent identifier for the Composition 2070* [Condition](condition.html): A unique identifier of the condition record 2071* [Consent](consent.html): Identifier for this record (external references) 2072* [DetectedIssue](detectedissue.html): Unique id for the detected issue 2073* [DeviceRequest](devicerequest.html): Business identifier for request/order 2074* [DiagnosticReport](diagnosticreport.html): An identifier for the report 2075* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents 2076* [DocumentReference](documentreference.html): Master Version Specific Identifier 2077* [Encounter](encounter.html): Identifier(s) by which this encounter is known 2078* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare 2079* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier 2080* [Goal](goal.html): External Ids for this goal 2081* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number 2082* [Immunization](immunization.html): Business identifier 2083* [List](list.html): Business identifier 2084* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier 2085* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier 2086* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier 2087* [MedicationUsage](medicationusage.html): Return statements with this external identifier 2088* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier 2089* [Observation](observation.html): The unique id for a particular observation 2090* [Procedure](procedure.html): A unique identifier for a procedure 2091* [RiskAssessment](riskassessment.html): Unique identifier for the assessment 2092* [ServiceRequest](servicerequest.html): Identifiers assigned to this order 2093* [SupplyDelivery](supplydelivery.html): External identifier 2094* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest 2095* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier 2096</b><br> 2097 * Type: <b>token</b><br> 2098 * Path: <b>AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier</b><br> 2099 * </p> 2100 */ 2101 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 2102 2103 /** 2104 * Search parameter: <b>patient</b> 2105 * <p> 2106 * Description: <b>Multiple Resources: 2107 2108* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for 2109* [CarePlan](careplan.html): Who the care plan is for 2110* [CareTeam](careteam.html): Who care team is for 2111* [ClinicalImpression](clinicalimpression.html): Patient or group assessed 2112* [Composition](composition.html): Who and/or what the composition is about 2113* [Condition](condition.html): Who has the condition? 2114* [Consent](consent.html): Who the consent applies to 2115* [DetectedIssue](detectedissue.html): Associated patient 2116* [DeviceRequest](devicerequest.html): Individual the service is ordered for 2117* [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient 2118* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient 2119* [DocumentManifest](documentmanifest.html): The subject of the set of documents 2120* [DocumentReference](documentreference.html): Who/what is the subject of the document 2121* [Encounter](encounter.html): The patient or group present at the encounter 2122* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care 2123* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for 2124* [Flag](flag.html): The identity of a subject to list flags for 2125* [Goal](goal.html): Who this goal is intended for 2126* [ImagingStudy](imagingstudy.html): Who the study is about 2127* [Immunization](immunization.html): The patient for the vaccination record 2128* [List](list.html): If all resources have the same subject 2129* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for 2130* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for 2131* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient 2132* [MedicationUsage](medicationusage.html): Returns statements for a specific patient. 2133* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement 2134* [Observation](observation.html): The subject that the observation is about (if patient) 2135* [Procedure](procedure.html): Search by subject - a patient 2136* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? 2137* [ServiceRequest](servicerequest.html): Search by subject - a patient 2138* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied 2139* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for 2140</b><br> 2141 * Type: <b>reference</b><br> 2142 * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient</b><br> 2143 * </p> 2144 */ 2145 @SearchParamDefinition(name="patient", path="AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ClinicalImpression](clinicalimpression.html): Patient or group assessed\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentManifest](documentmanifest.html): The subject of the set of documents\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient or group present at the encounter\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [List](list.html): If all resources have the same subject\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationUsage](medicationusage.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Group.class, Patient.class } ) 2146 public static final String SP_PATIENT = "patient"; 2147 /** 2148 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 2149 * <p> 2150 * Description: <b>Multiple Resources: 2151 2152* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for 2153* [CarePlan](careplan.html): Who the care plan is for 2154* [CareTeam](careteam.html): Who care team is for 2155* [ClinicalImpression](clinicalimpression.html): Patient or group assessed 2156* [Composition](composition.html): Who and/or what the composition is about 2157* [Condition](condition.html): Who has the condition? 2158* [Consent](consent.html): Who the consent applies to 2159* [DetectedIssue](detectedissue.html): Associated patient 2160* [DeviceRequest](devicerequest.html): Individual the service is ordered for 2161* [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient 2162* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient 2163* [DocumentManifest](documentmanifest.html): The subject of the set of documents 2164* [DocumentReference](documentreference.html): Who/what is the subject of the document 2165* [Encounter](encounter.html): The patient or group present at the encounter 2166* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care 2167* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for 2168* [Flag](flag.html): The identity of a subject to list flags for 2169* [Goal](goal.html): Who this goal is intended for 2170* [ImagingStudy](imagingstudy.html): Who the study is about 2171* [Immunization](immunization.html): The patient for the vaccination record 2172* [List](list.html): If all resources have the same subject 2173* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for 2174* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for 2175* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient 2176* [MedicationUsage](medicationusage.html): Returns statements for a specific patient. 2177* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement 2178* [Observation](observation.html): The subject that the observation is about (if patient) 2179* [Procedure](procedure.html): Search by subject - a patient 2180* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? 2181* [ServiceRequest](servicerequest.html): Search by subject - a patient 2182* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied 2183* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for 2184</b><br> 2185 * Type: <b>reference</b><br> 2186 * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient</b><br> 2187 * </p> 2188 */ 2189 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 2190 2191/** 2192 * Constant for fluent queries to be used to add include statements. Specifies 2193 * the path value of "<b>Goal:patient</b>". 2194 */ 2195 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Goal:patient").toLocked(); 2196 2197 2198} 2199