001package org.hl7.fhir.r4b.model; 002 003 004/* 005 Copyright (c) 2011+, HL7, Inc. 006 All rights reserved. 007 008 Redistribution and use in source and binary forms, with or without modification, \ 009 are permitted provided that the following conditions are met: 010 011 * Redistributions of source code must retain the above copyright notice, this \ 012 list of conditions and the following disclaimer. 013 * Redistributions in binary form must reproduce the above copyright notice, \ 014 this list of conditions and the following disclaimer in the documentation \ 015 and/or other materials provided with the distribution. 016 * Neither the name of HL7 nor the names of its contributors may be used to 017 endorse or promote products derived from this software without specific 018 prior written permission. 019 020 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 021 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 022 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 023 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 024 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 025 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 027 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 028 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 029 POSSIBILITY OF SUCH DAMAGE. 030 */ 031 032// Generated on Fri, Dec 31, 2021 05:58+1100 for FHIR v4.3.0-snapshot1 033 034import java.util.ArrayList; 035import java.util.Date; 036import java.util.List; 037import java.math.*; 038import org.hl7.fhir.utilities.Utilities; 039import org.hl7.fhir.r4b.model.Enumerations.*; 040import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 041import org.hl7.fhir.exceptions.FHIRException; 042import org.hl7.fhir.instance.model.api.ICompositeType; 043import ca.uhn.fhir.model.api.annotation.ResourceDef; 044import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 045import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 046import ca.uhn.fhir.model.api.annotation.Child; 047import ca.uhn.fhir.model.api.annotation.ChildOrder; 048import ca.uhn.fhir.model.api.annotation.Description; 049import ca.uhn.fhir.model.api.annotation.Block; 050 051/** 052 * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome. 053 */ 054@ResourceDef(name="RiskAssessment", profile="http://hl7.org/fhir/StructureDefinition/RiskAssessment") 055public class RiskAssessment extends DomainResource { 056 057 @Block() 058 public static class RiskAssessmentPredictionComponent extends BackboneElement implements IBaseBackboneElement { 059 /** 060 * One of the potential outcomes for the patient (e.g. remission, death, a particular condition). 061 */ 062 @Child(name = "outcome", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 063 @Description(shortDefinition="Possible outcome for the subject", formalDefinition="One of the potential outcomes for the patient (e.g. remission, death, a particular condition)." ) 064 protected CodeableConcept outcome; 065 066 /** 067 * Indicates how likely the outcome is (in the specified timeframe). 068 */ 069 @Child(name = "probability", type = {DecimalType.class, Range.class}, order=2, min=0, max=1, modifier=false, summary=false) 070 @Description(shortDefinition="Likelihood of specified outcome", formalDefinition="Indicates how likely the outcome is (in the specified timeframe)." ) 071 protected DataType probability; 072 073 /** 074 * Indicates how likely the outcome is (in the specified timeframe), expressed as a qualitative value (e.g. low, medium, or high). 075 */ 076 @Child(name = "qualitativeRisk", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 077 @Description(shortDefinition="Likelihood of specified outcome as a qualitative value", formalDefinition="Indicates how likely the outcome is (in the specified timeframe), expressed as a qualitative value (e.g. low, medium, or high)." ) 078 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/risk-probability") 079 protected CodeableConcept qualitativeRisk; 080 081 /** 082 * Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.). 083 */ 084 @Child(name = "relativeRisk", type = {DecimalType.class}, order=4, min=0, max=1, modifier=false, summary=false) 085 @Description(shortDefinition="Relative likelihood", formalDefinition="Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.)." ) 086 protected DecimalType relativeRisk; 087 088 /** 089 * Indicates the period of time or age range of the subject to which the specified probability applies. 090 */ 091 @Child(name = "when", type = {Period.class, Range.class}, order=5, min=0, max=1, modifier=false, summary=false) 092 @Description(shortDefinition="Timeframe or age range", formalDefinition="Indicates the period of time or age range of the subject to which the specified probability applies." ) 093 protected DataType when; 094 095 /** 096 * Additional information explaining the basis for the prediction. 097 */ 098 @Child(name = "rationale", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) 099 @Description(shortDefinition="Explanation of prediction", formalDefinition="Additional information explaining the basis for the prediction." ) 100 protected StringType rationale; 101 102 private static final long serialVersionUID = -1559504257L; 103 104 /** 105 * Constructor 106 */ 107 public RiskAssessmentPredictionComponent() { 108 super(); 109 } 110 111 /** 112 * @return {@link #outcome} (One of the potential outcomes for the patient (e.g. remission, death, a particular condition).) 113 */ 114 public CodeableConcept getOutcome() { 115 if (this.outcome == null) 116 if (Configuration.errorOnAutoCreate()) 117 throw new Error("Attempt to auto-create RiskAssessmentPredictionComponent.outcome"); 118 else if (Configuration.doAutoCreate()) 119 this.outcome = new CodeableConcept(); // cc 120 return this.outcome; 121 } 122 123 public boolean hasOutcome() { 124 return this.outcome != null && !this.outcome.isEmpty(); 125 } 126 127 /** 128 * @param value {@link #outcome} (One of the potential outcomes for the patient (e.g. remission, death, a particular condition).) 129 */ 130 public RiskAssessmentPredictionComponent setOutcome(CodeableConcept value) { 131 this.outcome = value; 132 return this; 133 } 134 135 /** 136 * @return {@link #probability} (Indicates how likely the outcome is (in the specified timeframe).) 137 */ 138 public DataType getProbability() { 139 return this.probability; 140 } 141 142 /** 143 * @return {@link #probability} (Indicates how likely the outcome is (in the specified timeframe).) 144 */ 145 public DecimalType getProbabilityDecimalType() throws FHIRException { 146 if (this.probability == null) 147 this.probability = new DecimalType(); 148 if (!(this.probability instanceof DecimalType)) 149 throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.probability.getClass().getName()+" was encountered"); 150 return (DecimalType) this.probability; 151 } 152 153 public boolean hasProbabilityDecimalType() { 154 return this != null && this.probability instanceof DecimalType; 155 } 156 157 /** 158 * @return {@link #probability} (Indicates how likely the outcome is (in the specified timeframe).) 159 */ 160 public Range getProbabilityRange() throws FHIRException { 161 if (this.probability == null) 162 this.probability = new Range(); 163 if (!(this.probability instanceof Range)) 164 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.probability.getClass().getName()+" was encountered"); 165 return (Range) this.probability; 166 } 167 168 public boolean hasProbabilityRange() { 169 return this != null && this.probability instanceof Range; 170 } 171 172 public boolean hasProbability() { 173 return this.probability != null && !this.probability.isEmpty(); 174 } 175 176 /** 177 * @param value {@link #probability} (Indicates how likely the outcome is (in the specified timeframe).) 178 */ 179 public RiskAssessmentPredictionComponent setProbability(DataType value) { 180 if (value != null && !(value instanceof DecimalType || value instanceof Range)) 181 throw new Error("Not the right type for RiskAssessment.prediction.probability[x]: "+value.fhirType()); 182 this.probability = value; 183 return this; 184 } 185 186 /** 187 * @return {@link #qualitativeRisk} (Indicates how likely the outcome is (in the specified timeframe), expressed as a qualitative value (e.g. low, medium, or high).) 188 */ 189 public CodeableConcept getQualitativeRisk() { 190 if (this.qualitativeRisk == null) 191 if (Configuration.errorOnAutoCreate()) 192 throw new Error("Attempt to auto-create RiskAssessmentPredictionComponent.qualitativeRisk"); 193 else if (Configuration.doAutoCreate()) 194 this.qualitativeRisk = new CodeableConcept(); // cc 195 return this.qualitativeRisk; 196 } 197 198 public boolean hasQualitativeRisk() { 199 return this.qualitativeRisk != null && !this.qualitativeRisk.isEmpty(); 200 } 201 202 /** 203 * @param value {@link #qualitativeRisk} (Indicates how likely the outcome is (in the specified timeframe), expressed as a qualitative value (e.g. low, medium, or high).) 204 */ 205 public RiskAssessmentPredictionComponent setQualitativeRisk(CodeableConcept value) { 206 this.qualitativeRisk = value; 207 return this; 208 } 209 210 /** 211 * @return {@link #relativeRisk} (Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).). This is the underlying object with id, value and extensions. The accessor "getRelativeRisk" gives direct access to the value 212 */ 213 public DecimalType getRelativeRiskElement() { 214 if (this.relativeRisk == null) 215 if (Configuration.errorOnAutoCreate()) 216 throw new Error("Attempt to auto-create RiskAssessmentPredictionComponent.relativeRisk"); 217 else if (Configuration.doAutoCreate()) 218 this.relativeRisk = new DecimalType(); // bb 219 return this.relativeRisk; 220 } 221 222 public boolean hasRelativeRiskElement() { 223 return this.relativeRisk != null && !this.relativeRisk.isEmpty(); 224 } 225 226 public boolean hasRelativeRisk() { 227 return this.relativeRisk != null && !this.relativeRisk.isEmpty(); 228 } 229 230 /** 231 * @param value {@link #relativeRisk} (Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).). This is the underlying object with id, value and extensions. The accessor "getRelativeRisk" gives direct access to the value 232 */ 233 public RiskAssessmentPredictionComponent setRelativeRiskElement(DecimalType value) { 234 this.relativeRisk = value; 235 return this; 236 } 237 238 /** 239 * @return Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.). 240 */ 241 public BigDecimal getRelativeRisk() { 242 return this.relativeRisk == null ? null : this.relativeRisk.getValue(); 243 } 244 245 /** 246 * @param value Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.). 247 */ 248 public RiskAssessmentPredictionComponent setRelativeRisk(BigDecimal value) { 249 if (value == null) 250 this.relativeRisk = null; 251 else { 252 if (this.relativeRisk == null) 253 this.relativeRisk = new DecimalType(); 254 this.relativeRisk.setValue(value); 255 } 256 return this; 257 } 258 259 /** 260 * @param value Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.). 261 */ 262 public RiskAssessmentPredictionComponent setRelativeRisk(long value) { 263 this.relativeRisk = new DecimalType(); 264 this.relativeRisk.setValue(value); 265 return this; 266 } 267 268 /** 269 * @param value Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.). 270 */ 271 public RiskAssessmentPredictionComponent setRelativeRisk(double value) { 272 this.relativeRisk = new DecimalType(); 273 this.relativeRisk.setValue(value); 274 return this; 275 } 276 277 /** 278 * @return {@link #when} (Indicates the period of time or age range of the subject to which the specified probability applies.) 279 */ 280 public DataType getWhen() { 281 return this.when; 282 } 283 284 /** 285 * @return {@link #when} (Indicates the period of time or age range of the subject to which the specified probability applies.) 286 */ 287 public Period getWhenPeriod() throws FHIRException { 288 if (this.when == null) 289 this.when = new Period(); 290 if (!(this.when instanceof Period)) 291 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.when.getClass().getName()+" was encountered"); 292 return (Period) this.when; 293 } 294 295 public boolean hasWhenPeriod() { 296 return this != null && this.when instanceof Period; 297 } 298 299 /** 300 * @return {@link #when} (Indicates the period of time or age range of the subject to which the specified probability applies.) 301 */ 302 public Range getWhenRange() throws FHIRException { 303 if (this.when == null) 304 this.when = new Range(); 305 if (!(this.when instanceof Range)) 306 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.when.getClass().getName()+" was encountered"); 307 return (Range) this.when; 308 } 309 310 public boolean hasWhenRange() { 311 return this != null && this.when instanceof Range; 312 } 313 314 public boolean hasWhen() { 315 return this.when != null && !this.when.isEmpty(); 316 } 317 318 /** 319 * @param value {@link #when} (Indicates the period of time or age range of the subject to which the specified probability applies.) 320 */ 321 public RiskAssessmentPredictionComponent setWhen(DataType value) { 322 if (value != null && !(value instanceof Period || value instanceof Range)) 323 throw new Error("Not the right type for RiskAssessment.prediction.when[x]: "+value.fhirType()); 324 this.when = value; 325 return this; 326 } 327 328 /** 329 * @return {@link #rationale} (Additional information explaining the basis for the prediction.). This is the underlying object with id, value and extensions. The accessor "getRationale" gives direct access to the value 330 */ 331 public StringType getRationaleElement() { 332 if (this.rationale == null) 333 if (Configuration.errorOnAutoCreate()) 334 throw new Error("Attempt to auto-create RiskAssessmentPredictionComponent.rationale"); 335 else if (Configuration.doAutoCreate()) 336 this.rationale = new StringType(); // bb 337 return this.rationale; 338 } 339 340 public boolean hasRationaleElement() { 341 return this.rationale != null && !this.rationale.isEmpty(); 342 } 343 344 public boolean hasRationale() { 345 return this.rationale != null && !this.rationale.isEmpty(); 346 } 347 348 /** 349 * @param value {@link #rationale} (Additional information explaining the basis for the prediction.). This is the underlying object with id, value and extensions. The accessor "getRationale" gives direct access to the value 350 */ 351 public RiskAssessmentPredictionComponent setRationaleElement(StringType value) { 352 this.rationale = value; 353 return this; 354 } 355 356 /** 357 * @return Additional information explaining the basis for the prediction. 358 */ 359 public String getRationale() { 360 return this.rationale == null ? null : this.rationale.getValue(); 361 } 362 363 /** 364 * @param value Additional information explaining the basis for the prediction. 365 */ 366 public RiskAssessmentPredictionComponent setRationale(String value) { 367 if (Utilities.noString(value)) 368 this.rationale = null; 369 else { 370 if (this.rationale == null) 371 this.rationale = new StringType(); 372 this.rationale.setValue(value); 373 } 374 return this; 375 } 376 377 protected void listChildren(List<Property> children) { 378 super.listChildren(children); 379 children.add(new Property("outcome", "CodeableConcept", "One of the potential outcomes for the patient (e.g. remission, death, a particular condition).", 0, 1, outcome)); 380 children.add(new Property("probability[x]", "decimal|Range", "Indicates how likely the outcome is (in the specified timeframe).", 0, 1, probability)); 381 children.add(new Property("qualitativeRisk", "CodeableConcept", "Indicates how likely the outcome is (in the specified timeframe), expressed as a qualitative value (e.g. low, medium, or high).", 0, 1, qualitativeRisk)); 382 children.add(new Property("relativeRisk", "decimal", "Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).", 0, 1, relativeRisk)); 383 children.add(new Property("when[x]", "Period|Range", "Indicates the period of time or age range of the subject to which the specified probability applies.", 0, 1, when)); 384 children.add(new Property("rationale", "string", "Additional information explaining the basis for the prediction.", 0, 1, rationale)); 385 } 386 387 @Override 388 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 389 switch (_hash) { 390 case -1106507950: /*outcome*/ return new Property("outcome", "CodeableConcept", "One of the potential outcomes for the patient (e.g. remission, death, a particular condition).", 0, 1, outcome); 391 case 1430185003: /*probability[x]*/ return new Property("probability[x]", "decimal|Range", "Indicates how likely the outcome is (in the specified timeframe).", 0, 1, probability); 392 case -1290561483: /*probability*/ return new Property("probability[x]", "decimal|Range", "Indicates how likely the outcome is (in the specified timeframe).", 0, 1, probability); 393 case 888495452: /*probabilityDecimal*/ return new Property("probability[x]", "decimal", "Indicates how likely the outcome is (in the specified timeframe).", 0, 1, probability); 394 case 9275912: /*probabilityRange*/ return new Property("probability[x]", "Range", "Indicates how likely the outcome is (in the specified timeframe).", 0, 1, probability); 395 case 123308730: /*qualitativeRisk*/ return new Property("qualitativeRisk", "CodeableConcept", "Indicates how likely the outcome is (in the specified timeframe), expressed as a qualitative value (e.g. low, medium, or high).", 0, 1, qualitativeRisk); 396 case -70741061: /*relativeRisk*/ return new Property("relativeRisk", "decimal", "Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).", 0, 1, relativeRisk); 397 case 1312831238: /*when[x]*/ return new Property("when[x]", "Period|Range", "Indicates the period of time or age range of the subject to which the specified probability applies.", 0, 1, when); 398 case 3648314: /*when*/ return new Property("when[x]", "Period|Range", "Indicates the period of time or age range of the subject to which the specified probability applies.", 0, 1, when); 399 case 251476379: /*whenPeriod*/ return new Property("when[x]", "Period", "Indicates the period of time or age range of the subject to which the specified probability applies.", 0, 1, when); 400 case -1098542557: /*whenRange*/ return new Property("when[x]", "Range", "Indicates the period of time or age range of the subject to which the specified probability applies.", 0, 1, when); 401 case 345689335: /*rationale*/ return new Property("rationale", "string", "Additional information explaining the basis for the prediction.", 0, 1, rationale); 402 default: return super.getNamedProperty(_hash, _name, _checkValid); 403 } 404 405 } 406 407 @Override 408 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 409 switch (hash) { 410 case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // CodeableConcept 411 case -1290561483: /*probability*/ return this.probability == null ? new Base[0] : new Base[] {this.probability}; // DataType 412 case 123308730: /*qualitativeRisk*/ return this.qualitativeRisk == null ? new Base[0] : new Base[] {this.qualitativeRisk}; // CodeableConcept 413 case -70741061: /*relativeRisk*/ return this.relativeRisk == null ? new Base[0] : new Base[] {this.relativeRisk}; // DecimalType 414 case 3648314: /*when*/ return this.when == null ? new Base[0] : new Base[] {this.when}; // DataType 415 case 345689335: /*rationale*/ return this.rationale == null ? new Base[0] : new Base[] {this.rationale}; // StringType 416 default: return super.getProperty(hash, name, checkValid); 417 } 418 419 } 420 421 @Override 422 public Base setProperty(int hash, String name, Base value) throws FHIRException { 423 switch (hash) { 424 case -1106507950: // outcome 425 this.outcome = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 426 return value; 427 case -1290561483: // probability 428 this.probability = TypeConvertor.castToType(value); // DataType 429 return value; 430 case 123308730: // qualitativeRisk 431 this.qualitativeRisk = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 432 return value; 433 case -70741061: // relativeRisk 434 this.relativeRisk = TypeConvertor.castToDecimal(value); // DecimalType 435 return value; 436 case 3648314: // when 437 this.when = TypeConvertor.castToType(value); // DataType 438 return value; 439 case 345689335: // rationale 440 this.rationale = TypeConvertor.castToString(value); // StringType 441 return value; 442 default: return super.setProperty(hash, name, value); 443 } 444 445 } 446 447 @Override 448 public Base setProperty(String name, Base value) throws FHIRException { 449 if (name.equals("outcome")) { 450 this.outcome = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 451 } else if (name.equals("probability[x]")) { 452 this.probability = TypeConvertor.castToType(value); // DataType 453 } else if (name.equals("qualitativeRisk")) { 454 this.qualitativeRisk = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 455 } else if (name.equals("relativeRisk")) { 456 this.relativeRisk = TypeConvertor.castToDecimal(value); // DecimalType 457 } else if (name.equals("when[x]")) { 458 this.when = TypeConvertor.castToType(value); // DataType 459 } else if (name.equals("rationale")) { 460 this.rationale = TypeConvertor.castToString(value); // StringType 461 } else 462 return super.setProperty(name, value); 463 return value; 464 } 465 466 @Override 467 public Base makeProperty(int hash, String name) throws FHIRException { 468 switch (hash) { 469 case -1106507950: return getOutcome(); 470 case 1430185003: return getProbability(); 471 case -1290561483: return getProbability(); 472 case 123308730: return getQualitativeRisk(); 473 case -70741061: return getRelativeRiskElement(); 474 case 1312831238: return getWhen(); 475 case 3648314: return getWhen(); 476 case 345689335: return getRationaleElement(); 477 default: return super.makeProperty(hash, name); 478 } 479 480 } 481 482 @Override 483 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 484 switch (hash) { 485 case -1106507950: /*outcome*/ return new String[] {"CodeableConcept"}; 486 case -1290561483: /*probability*/ return new String[] {"decimal", "Range"}; 487 case 123308730: /*qualitativeRisk*/ return new String[] {"CodeableConcept"}; 488 case -70741061: /*relativeRisk*/ return new String[] {"decimal"}; 489 case 3648314: /*when*/ return new String[] {"Period", "Range"}; 490 case 345689335: /*rationale*/ return new String[] {"string"}; 491 default: return super.getTypesForProperty(hash, name); 492 } 493 494 } 495 496 @Override 497 public Base addChild(String name) throws FHIRException { 498 if (name.equals("outcome")) { 499 this.outcome = new CodeableConcept(); 500 return this.outcome; 501 } 502 else if (name.equals("probabilityDecimal")) { 503 this.probability = new DecimalType(); 504 return this.probability; 505 } 506 else if (name.equals("probabilityRange")) { 507 this.probability = new Range(); 508 return this.probability; 509 } 510 else if (name.equals("qualitativeRisk")) { 511 this.qualitativeRisk = new CodeableConcept(); 512 return this.qualitativeRisk; 513 } 514 else if (name.equals("relativeRisk")) { 515 throw new FHIRException("Cannot call addChild on a primitive type RiskAssessment.prediction.relativeRisk"); 516 } 517 else if (name.equals("whenPeriod")) { 518 this.when = new Period(); 519 return this.when; 520 } 521 else if (name.equals("whenRange")) { 522 this.when = new Range(); 523 return this.when; 524 } 525 else if (name.equals("rationale")) { 526 throw new FHIRException("Cannot call addChild on a primitive type RiskAssessment.prediction.rationale"); 527 } 528 else 529 return super.addChild(name); 530 } 531 532 public RiskAssessmentPredictionComponent copy() { 533 RiskAssessmentPredictionComponent dst = new RiskAssessmentPredictionComponent(); 534 copyValues(dst); 535 return dst; 536 } 537 538 public void copyValues(RiskAssessmentPredictionComponent dst) { 539 super.copyValues(dst); 540 dst.outcome = outcome == null ? null : outcome.copy(); 541 dst.probability = probability == null ? null : probability.copy(); 542 dst.qualitativeRisk = qualitativeRisk == null ? null : qualitativeRisk.copy(); 543 dst.relativeRisk = relativeRisk == null ? null : relativeRisk.copy(); 544 dst.when = when == null ? null : when.copy(); 545 dst.rationale = rationale == null ? null : rationale.copy(); 546 } 547 548 @Override 549 public boolean equalsDeep(Base other_) { 550 if (!super.equalsDeep(other_)) 551 return false; 552 if (!(other_ instanceof RiskAssessmentPredictionComponent)) 553 return false; 554 RiskAssessmentPredictionComponent o = (RiskAssessmentPredictionComponent) other_; 555 return compareDeep(outcome, o.outcome, true) && compareDeep(probability, o.probability, true) && compareDeep(qualitativeRisk, o.qualitativeRisk, true) 556 && compareDeep(relativeRisk, o.relativeRisk, true) && compareDeep(when, o.when, true) && compareDeep(rationale, o.rationale, true) 557 ; 558 } 559 560 @Override 561 public boolean equalsShallow(Base other_) { 562 if (!super.equalsShallow(other_)) 563 return false; 564 if (!(other_ instanceof RiskAssessmentPredictionComponent)) 565 return false; 566 RiskAssessmentPredictionComponent o = (RiskAssessmentPredictionComponent) other_; 567 return compareValues(relativeRisk, o.relativeRisk, true) && compareValues(rationale, o.rationale, true) 568 ; 569 } 570 571 public boolean isEmpty() { 572 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(outcome, probability, qualitativeRisk 573 , relativeRisk, when, rationale); 574 } 575 576 public String fhirType() { 577 return "RiskAssessment.prediction"; 578 579 } 580 581 } 582 583 /** 584 * Business identifier assigned to the risk assessment. 585 */ 586 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 587 @Description(shortDefinition="Unique identifier for the assessment", formalDefinition="Business identifier assigned to the risk assessment." ) 588 protected List<Identifier> identifier; 589 590 /** 591 * A reference to the request that is fulfilled by this risk assessment. 592 */ 593 @Child(name = "basedOn", type = {Reference.class}, order=1, min=0, max=1, modifier=false, summary=false) 594 @Description(shortDefinition="Request fulfilled by this assessment", formalDefinition="A reference to the request that is fulfilled by this risk assessment." ) 595 protected Reference basedOn; 596 597 /** 598 * A reference to a resource that this risk assessment is part of, such as a Procedure. 599 */ 600 @Child(name = "parent", type = {Reference.class}, order=2, min=0, max=1, modifier=false, summary=false) 601 @Description(shortDefinition="Part of this occurrence", formalDefinition="A reference to a resource that this risk assessment is part of, such as a Procedure." ) 602 protected Reference parent; 603 604 /** 605 * The status of the RiskAssessment, using the same statuses as an Observation. 606 */ 607 @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true) 608 @Description(shortDefinition="registered | preliminary | final | amended +", formalDefinition="The status of the RiskAssessment, using the same statuses as an Observation." ) 609 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-status") 610 protected Enumeration<ObservationStatus> status; 611 612 /** 613 * The algorithm, process or mechanism used to evaluate the risk. 614 */ 615 @Child(name = "method", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) 616 @Description(shortDefinition="Evaluation mechanism", formalDefinition="The algorithm, process or mechanism used to evaluate the risk." ) 617 protected CodeableConcept method; 618 619 /** 620 * The type of the risk assessment performed. 621 */ 622 @Child(name = "code", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true) 623 @Description(shortDefinition="Type of assessment", formalDefinition="The type of the risk assessment performed." ) 624 protected CodeableConcept code; 625 626 /** 627 * The patient or group the risk assessment applies to. 628 */ 629 @Child(name = "subject", type = {Patient.class, Group.class}, order=6, min=1, max=1, modifier=false, summary=true) 630 @Description(shortDefinition="Who/what does assessment apply to?", formalDefinition="The patient or group the risk assessment applies to." ) 631 protected Reference subject; 632 633 /** 634 * The encounter where the assessment was performed. 635 */ 636 @Child(name = "encounter", type = {Encounter.class}, order=7, min=0, max=1, modifier=false, summary=true) 637 @Description(shortDefinition="Where was assessment performed?", formalDefinition="The encounter where the assessment was performed." ) 638 protected Reference encounter; 639 640 /** 641 * The date (and possibly time) the risk assessment was performed. 642 */ 643 @Child(name = "occurrence", type = {DateTimeType.class, Period.class}, order=8, min=0, max=1, modifier=false, summary=true) 644 @Description(shortDefinition="When was assessment made?", formalDefinition="The date (and possibly time) the risk assessment was performed." ) 645 protected DataType occurrence; 646 647 /** 648 * For assessments or prognosis specific to a particular condition, indicates the condition being assessed. 649 */ 650 @Child(name = "condition", type = {Condition.class}, order=9, min=0, max=1, modifier=false, summary=true) 651 @Description(shortDefinition="Condition assessed", formalDefinition="For assessments or prognosis specific to a particular condition, indicates the condition being assessed." ) 652 protected Reference condition; 653 654 /** 655 * The provider or software application that performed the assessment. 656 */ 657 @Child(name = "performer", type = {Practitioner.class, PractitionerRole.class, Device.class}, order=10, min=0, max=1, modifier=false, summary=true) 658 @Description(shortDefinition="Who did assessment?", formalDefinition="The provider or software application that performed the assessment." ) 659 protected Reference performer; 660 661 /** 662 * The reason the risk assessment was performed. 663 */ 664 @Child(name = "reasonCode", type = {CodeableConcept.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 665 @Description(shortDefinition="Why the assessment was necessary?", formalDefinition="The reason the risk assessment was performed." ) 666 protected List<CodeableConcept> reasonCode; 667 668 /** 669 * Resources supporting the reason the risk assessment was performed. 670 */ 671 @Child(name = "reasonReference", type = {Condition.class, Observation.class, DiagnosticReport.class, DocumentReference.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 672 @Description(shortDefinition="Why the assessment was necessary?", formalDefinition="Resources supporting the reason the risk assessment was performed." ) 673 protected List<Reference> reasonReference; 674 675 /** 676 * Indicates the source data considered as part of the assessment (for example, FamilyHistory, Observations, Procedures, Conditions, etc.). 677 */ 678 @Child(name = "basis", type = {Reference.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 679 @Description(shortDefinition="Information used in assessment", formalDefinition="Indicates the source data considered as part of the assessment (for example, FamilyHistory, Observations, Procedures, Conditions, etc.)." ) 680 protected List<Reference> basis; 681 682 /** 683 * Describes the expected outcome for the subject. 684 */ 685 @Child(name = "prediction", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 686 @Description(shortDefinition="Outcome predicted", formalDefinition="Describes the expected outcome for the subject." ) 687 protected List<RiskAssessmentPredictionComponent> prediction; 688 689 /** 690 * A description of the steps that might be taken to reduce the identified risk(s). 691 */ 692 @Child(name = "mitigation", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=false) 693 @Description(shortDefinition="How to reduce risk", formalDefinition="A description of the steps that might be taken to reduce the identified risk(s)." ) 694 protected StringType mitigation; 695 696 /** 697 * Additional comments about the risk assessment. 698 */ 699 @Child(name = "note", type = {Annotation.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 700 @Description(shortDefinition="Comments on the risk assessment", formalDefinition="Additional comments about the risk assessment." ) 701 protected List<Annotation> note; 702 703 private static final long serialVersionUID = 818388748L; 704 705 /** 706 * Constructor 707 */ 708 public RiskAssessment() { 709 super(); 710 } 711 712 /** 713 * Constructor 714 */ 715 public RiskAssessment(ObservationStatus status, Reference subject) { 716 super(); 717 this.setStatus(status); 718 this.setSubject(subject); 719 } 720 721 /** 722 * @return {@link #identifier} (Business identifier assigned to the risk assessment.) 723 */ 724 public List<Identifier> getIdentifier() { 725 if (this.identifier == null) 726 this.identifier = new ArrayList<Identifier>(); 727 return this.identifier; 728 } 729 730 /** 731 * @return Returns a reference to <code>this</code> for easy method chaining 732 */ 733 public RiskAssessment setIdentifier(List<Identifier> theIdentifier) { 734 this.identifier = theIdentifier; 735 return this; 736 } 737 738 public boolean hasIdentifier() { 739 if (this.identifier == null) 740 return false; 741 for (Identifier item : this.identifier) 742 if (!item.isEmpty()) 743 return true; 744 return false; 745 } 746 747 public Identifier addIdentifier() { //3 748 Identifier t = new Identifier(); 749 if (this.identifier == null) 750 this.identifier = new ArrayList<Identifier>(); 751 this.identifier.add(t); 752 return t; 753 } 754 755 public RiskAssessment addIdentifier(Identifier t) { //3 756 if (t == null) 757 return this; 758 if (this.identifier == null) 759 this.identifier = new ArrayList<Identifier>(); 760 this.identifier.add(t); 761 return this; 762 } 763 764 /** 765 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 766 */ 767 public Identifier getIdentifierFirstRep() { 768 if (getIdentifier().isEmpty()) { 769 addIdentifier(); 770 } 771 return getIdentifier().get(0); 772 } 773 774 /** 775 * @return {@link #basedOn} (A reference to the request that is fulfilled by this risk assessment.) 776 */ 777 public Reference getBasedOn() { 778 if (this.basedOn == null) 779 if (Configuration.errorOnAutoCreate()) 780 throw new Error("Attempt to auto-create RiskAssessment.basedOn"); 781 else if (Configuration.doAutoCreate()) 782 this.basedOn = new Reference(); // cc 783 return this.basedOn; 784 } 785 786 public boolean hasBasedOn() { 787 return this.basedOn != null && !this.basedOn.isEmpty(); 788 } 789 790 /** 791 * @param value {@link #basedOn} (A reference to the request that is fulfilled by this risk assessment.) 792 */ 793 public RiskAssessment setBasedOn(Reference value) { 794 this.basedOn = value; 795 return this; 796 } 797 798 /** 799 * @return {@link #parent} (A reference to a resource that this risk assessment is part of, such as a Procedure.) 800 */ 801 public Reference getParent() { 802 if (this.parent == null) 803 if (Configuration.errorOnAutoCreate()) 804 throw new Error("Attempt to auto-create RiskAssessment.parent"); 805 else if (Configuration.doAutoCreate()) 806 this.parent = new Reference(); // cc 807 return this.parent; 808 } 809 810 public boolean hasParent() { 811 return this.parent != null && !this.parent.isEmpty(); 812 } 813 814 /** 815 * @param value {@link #parent} (A reference to a resource that this risk assessment is part of, such as a Procedure.) 816 */ 817 public RiskAssessment setParent(Reference value) { 818 this.parent = value; 819 return this; 820 } 821 822 /** 823 * @return {@link #status} (The status of the RiskAssessment, using the same statuses as an Observation.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 824 */ 825 public Enumeration<ObservationStatus> getStatusElement() { 826 if (this.status == null) 827 if (Configuration.errorOnAutoCreate()) 828 throw new Error("Attempt to auto-create RiskAssessment.status"); 829 else if (Configuration.doAutoCreate()) 830 this.status = new Enumeration<ObservationStatus>(new ObservationStatusEnumFactory()); // bb 831 return this.status; 832 } 833 834 public boolean hasStatusElement() { 835 return this.status != null && !this.status.isEmpty(); 836 } 837 838 public boolean hasStatus() { 839 return this.status != null && !this.status.isEmpty(); 840 } 841 842 /** 843 * @param value {@link #status} (The status of the RiskAssessment, using the same statuses as an Observation.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 844 */ 845 public RiskAssessment setStatusElement(Enumeration<ObservationStatus> value) { 846 this.status = value; 847 return this; 848 } 849 850 /** 851 * @return The status of the RiskAssessment, using the same statuses as an Observation. 852 */ 853 public ObservationStatus getStatus() { 854 return this.status == null ? null : this.status.getValue(); 855 } 856 857 /** 858 * @param value The status of the RiskAssessment, using the same statuses as an Observation. 859 */ 860 public RiskAssessment setStatus(ObservationStatus value) { 861 if (this.status == null) 862 this.status = new Enumeration<ObservationStatus>(new ObservationStatusEnumFactory()); 863 this.status.setValue(value); 864 return this; 865 } 866 867 /** 868 * @return {@link #method} (The algorithm, process or mechanism used to evaluate the risk.) 869 */ 870 public CodeableConcept getMethod() { 871 if (this.method == null) 872 if (Configuration.errorOnAutoCreate()) 873 throw new Error("Attempt to auto-create RiskAssessment.method"); 874 else if (Configuration.doAutoCreate()) 875 this.method = new CodeableConcept(); // cc 876 return this.method; 877 } 878 879 public boolean hasMethod() { 880 return this.method != null && !this.method.isEmpty(); 881 } 882 883 /** 884 * @param value {@link #method} (The algorithm, process or mechanism used to evaluate the risk.) 885 */ 886 public RiskAssessment setMethod(CodeableConcept value) { 887 this.method = value; 888 return this; 889 } 890 891 /** 892 * @return {@link #code} (The type of the risk assessment performed.) 893 */ 894 public CodeableConcept getCode() { 895 if (this.code == null) 896 if (Configuration.errorOnAutoCreate()) 897 throw new Error("Attempt to auto-create RiskAssessment.code"); 898 else if (Configuration.doAutoCreate()) 899 this.code = new CodeableConcept(); // cc 900 return this.code; 901 } 902 903 public boolean hasCode() { 904 return this.code != null && !this.code.isEmpty(); 905 } 906 907 /** 908 * @param value {@link #code} (The type of the risk assessment performed.) 909 */ 910 public RiskAssessment setCode(CodeableConcept value) { 911 this.code = value; 912 return this; 913 } 914 915 /** 916 * @return {@link #subject} (The patient or group the risk assessment applies to.) 917 */ 918 public Reference getSubject() { 919 if (this.subject == null) 920 if (Configuration.errorOnAutoCreate()) 921 throw new Error("Attempt to auto-create RiskAssessment.subject"); 922 else if (Configuration.doAutoCreate()) 923 this.subject = new Reference(); // cc 924 return this.subject; 925 } 926 927 public boolean hasSubject() { 928 return this.subject != null && !this.subject.isEmpty(); 929 } 930 931 /** 932 * @param value {@link #subject} (The patient or group the risk assessment applies to.) 933 */ 934 public RiskAssessment setSubject(Reference value) { 935 this.subject = value; 936 return this; 937 } 938 939 /** 940 * @return {@link #encounter} (The encounter where the assessment was performed.) 941 */ 942 public Reference getEncounter() { 943 if (this.encounter == null) 944 if (Configuration.errorOnAutoCreate()) 945 throw new Error("Attempt to auto-create RiskAssessment.encounter"); 946 else if (Configuration.doAutoCreate()) 947 this.encounter = new Reference(); // cc 948 return this.encounter; 949 } 950 951 public boolean hasEncounter() { 952 return this.encounter != null && !this.encounter.isEmpty(); 953 } 954 955 /** 956 * @param value {@link #encounter} (The encounter where the assessment was performed.) 957 */ 958 public RiskAssessment setEncounter(Reference value) { 959 this.encounter = value; 960 return this; 961 } 962 963 /** 964 * @return {@link #occurrence} (The date (and possibly time) the risk assessment was performed.) 965 */ 966 public DataType getOccurrence() { 967 return this.occurrence; 968 } 969 970 /** 971 * @return {@link #occurrence} (The date (and possibly time) the risk assessment was performed.) 972 */ 973 public DateTimeType getOccurrenceDateTimeType() throws FHIRException { 974 if (this.occurrence == null) 975 this.occurrence = new DateTimeType(); 976 if (!(this.occurrence instanceof DateTimeType)) 977 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.occurrence.getClass().getName()+" was encountered"); 978 return (DateTimeType) this.occurrence; 979 } 980 981 public boolean hasOccurrenceDateTimeType() { 982 return this != null && this.occurrence instanceof DateTimeType; 983 } 984 985 /** 986 * @return {@link #occurrence} (The date (and possibly time) the risk assessment was performed.) 987 */ 988 public Period getOccurrencePeriod() throws FHIRException { 989 if (this.occurrence == null) 990 this.occurrence = new Period(); 991 if (!(this.occurrence instanceof Period)) 992 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.occurrence.getClass().getName()+" was encountered"); 993 return (Period) this.occurrence; 994 } 995 996 public boolean hasOccurrencePeriod() { 997 return this != null && this.occurrence instanceof Period; 998 } 999 1000 public boolean hasOccurrence() { 1001 return this.occurrence != null && !this.occurrence.isEmpty(); 1002 } 1003 1004 /** 1005 * @param value {@link #occurrence} (The date (and possibly time) the risk assessment was performed.) 1006 */ 1007 public RiskAssessment setOccurrence(DataType value) { 1008 if (value != null && !(value instanceof DateTimeType || value instanceof Period)) 1009 throw new Error("Not the right type for RiskAssessment.occurrence[x]: "+value.fhirType()); 1010 this.occurrence = value; 1011 return this; 1012 } 1013 1014 /** 1015 * @return {@link #condition} (For assessments or prognosis specific to a particular condition, indicates the condition being assessed.) 1016 */ 1017 public Reference getCondition() { 1018 if (this.condition == null) 1019 if (Configuration.errorOnAutoCreate()) 1020 throw new Error("Attempt to auto-create RiskAssessment.condition"); 1021 else if (Configuration.doAutoCreate()) 1022 this.condition = new Reference(); // cc 1023 return this.condition; 1024 } 1025 1026 public boolean hasCondition() { 1027 return this.condition != null && !this.condition.isEmpty(); 1028 } 1029 1030 /** 1031 * @param value {@link #condition} (For assessments or prognosis specific to a particular condition, indicates the condition being assessed.) 1032 */ 1033 public RiskAssessment setCondition(Reference value) { 1034 this.condition = value; 1035 return this; 1036 } 1037 1038 /** 1039 * @return {@link #performer} (The provider or software application that performed the assessment.) 1040 */ 1041 public Reference getPerformer() { 1042 if (this.performer == null) 1043 if (Configuration.errorOnAutoCreate()) 1044 throw new Error("Attempt to auto-create RiskAssessment.performer"); 1045 else if (Configuration.doAutoCreate()) 1046 this.performer = new Reference(); // cc 1047 return this.performer; 1048 } 1049 1050 public boolean hasPerformer() { 1051 return this.performer != null && !this.performer.isEmpty(); 1052 } 1053 1054 /** 1055 * @param value {@link #performer} (The provider or software application that performed the assessment.) 1056 */ 1057 public RiskAssessment setPerformer(Reference value) { 1058 this.performer = value; 1059 return this; 1060 } 1061 1062 /** 1063 * @return {@link #reasonCode} (The reason the risk assessment was performed.) 1064 */ 1065 public List<CodeableConcept> getReasonCode() { 1066 if (this.reasonCode == null) 1067 this.reasonCode = new ArrayList<CodeableConcept>(); 1068 return this.reasonCode; 1069 } 1070 1071 /** 1072 * @return Returns a reference to <code>this</code> for easy method chaining 1073 */ 1074 public RiskAssessment setReasonCode(List<CodeableConcept> theReasonCode) { 1075 this.reasonCode = theReasonCode; 1076 return this; 1077 } 1078 1079 public boolean hasReasonCode() { 1080 if (this.reasonCode == null) 1081 return false; 1082 for (CodeableConcept item : this.reasonCode) 1083 if (!item.isEmpty()) 1084 return true; 1085 return false; 1086 } 1087 1088 public CodeableConcept addReasonCode() { //3 1089 CodeableConcept t = new CodeableConcept(); 1090 if (this.reasonCode == null) 1091 this.reasonCode = new ArrayList<CodeableConcept>(); 1092 this.reasonCode.add(t); 1093 return t; 1094 } 1095 1096 public RiskAssessment addReasonCode(CodeableConcept t) { //3 1097 if (t == null) 1098 return this; 1099 if (this.reasonCode == null) 1100 this.reasonCode = new ArrayList<CodeableConcept>(); 1101 this.reasonCode.add(t); 1102 return this; 1103 } 1104 1105 /** 1106 * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist {3} 1107 */ 1108 public CodeableConcept getReasonCodeFirstRep() { 1109 if (getReasonCode().isEmpty()) { 1110 addReasonCode(); 1111 } 1112 return getReasonCode().get(0); 1113 } 1114 1115 /** 1116 * @return {@link #reasonReference} (Resources supporting the reason the risk assessment was performed.) 1117 */ 1118 public List<Reference> getReasonReference() { 1119 if (this.reasonReference == null) 1120 this.reasonReference = new ArrayList<Reference>(); 1121 return this.reasonReference; 1122 } 1123 1124 /** 1125 * @return Returns a reference to <code>this</code> for easy method chaining 1126 */ 1127 public RiskAssessment setReasonReference(List<Reference> theReasonReference) { 1128 this.reasonReference = theReasonReference; 1129 return this; 1130 } 1131 1132 public boolean hasReasonReference() { 1133 if (this.reasonReference == null) 1134 return false; 1135 for (Reference item : this.reasonReference) 1136 if (!item.isEmpty()) 1137 return true; 1138 return false; 1139 } 1140 1141 public Reference addReasonReference() { //3 1142 Reference t = new Reference(); 1143 if (this.reasonReference == null) 1144 this.reasonReference = new ArrayList<Reference>(); 1145 this.reasonReference.add(t); 1146 return t; 1147 } 1148 1149 public RiskAssessment addReasonReference(Reference t) { //3 1150 if (t == null) 1151 return this; 1152 if (this.reasonReference == null) 1153 this.reasonReference = new ArrayList<Reference>(); 1154 this.reasonReference.add(t); 1155 return this; 1156 } 1157 1158 /** 1159 * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist {3} 1160 */ 1161 public Reference getReasonReferenceFirstRep() { 1162 if (getReasonReference().isEmpty()) { 1163 addReasonReference(); 1164 } 1165 return getReasonReference().get(0); 1166 } 1167 1168 /** 1169 * @return {@link #basis} (Indicates the source data considered as part of the assessment (for example, FamilyHistory, Observations, Procedures, Conditions, etc.).) 1170 */ 1171 public List<Reference> getBasis() { 1172 if (this.basis == null) 1173 this.basis = new ArrayList<Reference>(); 1174 return this.basis; 1175 } 1176 1177 /** 1178 * @return Returns a reference to <code>this</code> for easy method chaining 1179 */ 1180 public RiskAssessment setBasis(List<Reference> theBasis) { 1181 this.basis = theBasis; 1182 return this; 1183 } 1184 1185 public boolean hasBasis() { 1186 if (this.basis == null) 1187 return false; 1188 for (Reference item : this.basis) 1189 if (!item.isEmpty()) 1190 return true; 1191 return false; 1192 } 1193 1194 public Reference addBasis() { //3 1195 Reference t = new Reference(); 1196 if (this.basis == null) 1197 this.basis = new ArrayList<Reference>(); 1198 this.basis.add(t); 1199 return t; 1200 } 1201 1202 public RiskAssessment addBasis(Reference t) { //3 1203 if (t == null) 1204 return this; 1205 if (this.basis == null) 1206 this.basis = new ArrayList<Reference>(); 1207 this.basis.add(t); 1208 return this; 1209 } 1210 1211 /** 1212 * @return The first repetition of repeating field {@link #basis}, creating it if it does not already exist {3} 1213 */ 1214 public Reference getBasisFirstRep() { 1215 if (getBasis().isEmpty()) { 1216 addBasis(); 1217 } 1218 return getBasis().get(0); 1219 } 1220 1221 /** 1222 * @return {@link #prediction} (Describes the expected outcome for the subject.) 1223 */ 1224 public List<RiskAssessmentPredictionComponent> getPrediction() { 1225 if (this.prediction == null) 1226 this.prediction = new ArrayList<RiskAssessmentPredictionComponent>(); 1227 return this.prediction; 1228 } 1229 1230 /** 1231 * @return Returns a reference to <code>this</code> for easy method chaining 1232 */ 1233 public RiskAssessment setPrediction(List<RiskAssessmentPredictionComponent> thePrediction) { 1234 this.prediction = thePrediction; 1235 return this; 1236 } 1237 1238 public boolean hasPrediction() { 1239 if (this.prediction == null) 1240 return false; 1241 for (RiskAssessmentPredictionComponent item : this.prediction) 1242 if (!item.isEmpty()) 1243 return true; 1244 return false; 1245 } 1246 1247 public RiskAssessmentPredictionComponent addPrediction() { //3 1248 RiskAssessmentPredictionComponent t = new RiskAssessmentPredictionComponent(); 1249 if (this.prediction == null) 1250 this.prediction = new ArrayList<RiskAssessmentPredictionComponent>(); 1251 this.prediction.add(t); 1252 return t; 1253 } 1254 1255 public RiskAssessment addPrediction(RiskAssessmentPredictionComponent t) { //3 1256 if (t == null) 1257 return this; 1258 if (this.prediction == null) 1259 this.prediction = new ArrayList<RiskAssessmentPredictionComponent>(); 1260 this.prediction.add(t); 1261 return this; 1262 } 1263 1264 /** 1265 * @return The first repetition of repeating field {@link #prediction}, creating it if it does not already exist {3} 1266 */ 1267 public RiskAssessmentPredictionComponent getPredictionFirstRep() { 1268 if (getPrediction().isEmpty()) { 1269 addPrediction(); 1270 } 1271 return getPrediction().get(0); 1272 } 1273 1274 /** 1275 * @return {@link #mitigation} (A description of the steps that might be taken to reduce the identified risk(s).). This is the underlying object with id, value and extensions. The accessor "getMitigation" gives direct access to the value 1276 */ 1277 public StringType getMitigationElement() { 1278 if (this.mitigation == null) 1279 if (Configuration.errorOnAutoCreate()) 1280 throw new Error("Attempt to auto-create RiskAssessment.mitigation"); 1281 else if (Configuration.doAutoCreate()) 1282 this.mitigation = new StringType(); // bb 1283 return this.mitigation; 1284 } 1285 1286 public boolean hasMitigationElement() { 1287 return this.mitigation != null && !this.mitigation.isEmpty(); 1288 } 1289 1290 public boolean hasMitigation() { 1291 return this.mitigation != null && !this.mitigation.isEmpty(); 1292 } 1293 1294 /** 1295 * @param value {@link #mitigation} (A description of the steps that might be taken to reduce the identified risk(s).). This is the underlying object with id, value and extensions. The accessor "getMitigation" gives direct access to the value 1296 */ 1297 public RiskAssessment setMitigationElement(StringType value) { 1298 this.mitigation = value; 1299 return this; 1300 } 1301 1302 /** 1303 * @return A description of the steps that might be taken to reduce the identified risk(s). 1304 */ 1305 public String getMitigation() { 1306 return this.mitigation == null ? null : this.mitigation.getValue(); 1307 } 1308 1309 /** 1310 * @param value A description of the steps that might be taken to reduce the identified risk(s). 1311 */ 1312 public RiskAssessment setMitigation(String value) { 1313 if (Utilities.noString(value)) 1314 this.mitigation = null; 1315 else { 1316 if (this.mitigation == null) 1317 this.mitigation = new StringType(); 1318 this.mitigation.setValue(value); 1319 } 1320 return this; 1321 } 1322 1323 /** 1324 * @return {@link #note} (Additional comments about the risk assessment.) 1325 */ 1326 public List<Annotation> getNote() { 1327 if (this.note == null) 1328 this.note = new ArrayList<Annotation>(); 1329 return this.note; 1330 } 1331 1332 /** 1333 * @return Returns a reference to <code>this</code> for easy method chaining 1334 */ 1335 public RiskAssessment setNote(List<Annotation> theNote) { 1336 this.note = theNote; 1337 return this; 1338 } 1339 1340 public boolean hasNote() { 1341 if (this.note == null) 1342 return false; 1343 for (Annotation item : this.note) 1344 if (!item.isEmpty()) 1345 return true; 1346 return false; 1347 } 1348 1349 public Annotation addNote() { //3 1350 Annotation t = new Annotation(); 1351 if (this.note == null) 1352 this.note = new ArrayList<Annotation>(); 1353 this.note.add(t); 1354 return t; 1355 } 1356 1357 public RiskAssessment addNote(Annotation t) { //3 1358 if (t == null) 1359 return this; 1360 if (this.note == null) 1361 this.note = new ArrayList<Annotation>(); 1362 this.note.add(t); 1363 return this; 1364 } 1365 1366 /** 1367 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3} 1368 */ 1369 public Annotation getNoteFirstRep() { 1370 if (getNote().isEmpty()) { 1371 addNote(); 1372 } 1373 return getNote().get(0); 1374 } 1375 1376 protected void listChildren(List<Property> children) { 1377 super.listChildren(children); 1378 children.add(new Property("identifier", "Identifier", "Business identifier assigned to the risk assessment.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1379 children.add(new Property("basedOn", "Reference(Any)", "A reference to the request that is fulfilled by this risk assessment.", 0, 1, basedOn)); 1380 children.add(new Property("parent", "Reference(Any)", "A reference to a resource that this risk assessment is part of, such as a Procedure.", 0, 1, parent)); 1381 children.add(new Property("status", "code", "The status of the RiskAssessment, using the same statuses as an Observation.", 0, 1, status)); 1382 children.add(new Property("method", "CodeableConcept", "The algorithm, process or mechanism used to evaluate the risk.", 0, 1, method)); 1383 children.add(new Property("code", "CodeableConcept", "The type of the risk assessment performed.", 0, 1, code)); 1384 children.add(new Property("subject", "Reference(Patient|Group)", "The patient or group the risk assessment applies to.", 0, 1, subject)); 1385 children.add(new Property("encounter", "Reference(Encounter)", "The encounter where the assessment was performed.", 0, 1, encounter)); 1386 children.add(new Property("occurrence[x]", "dateTime|Period", "The date (and possibly time) the risk assessment was performed.", 0, 1, occurrence)); 1387 children.add(new Property("condition", "Reference(Condition)", "For assessments or prognosis specific to a particular condition, indicates the condition being assessed.", 0, 1, condition)); 1388 children.add(new Property("performer", "Reference(Practitioner|PractitionerRole|Device)", "The provider or software application that performed the assessment.", 0, 1, performer)); 1389 children.add(new Property("reasonCode", "CodeableConcept", "The reason the risk assessment was performed.", 0, java.lang.Integer.MAX_VALUE, reasonCode)); 1390 children.add(new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport|DocumentReference)", "Resources supporting the reason the risk assessment was performed.", 0, java.lang.Integer.MAX_VALUE, reasonReference)); 1391 children.add(new Property("basis", "Reference(Any)", "Indicates the source data considered as part of the assessment (for example, FamilyHistory, Observations, Procedures, Conditions, etc.).", 0, java.lang.Integer.MAX_VALUE, basis)); 1392 children.add(new Property("prediction", "", "Describes the expected outcome for the subject.", 0, java.lang.Integer.MAX_VALUE, prediction)); 1393 children.add(new Property("mitigation", "string", "A description of the steps that might be taken to reduce the identified risk(s).", 0, 1, mitigation)); 1394 children.add(new Property("note", "Annotation", "Additional comments about the risk assessment.", 0, java.lang.Integer.MAX_VALUE, note)); 1395 } 1396 1397 @Override 1398 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1399 switch (_hash) { 1400 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Business identifier assigned to the risk assessment.", 0, java.lang.Integer.MAX_VALUE, identifier); 1401 case -332612366: /*basedOn*/ return new Property("basedOn", "Reference(Any)", "A reference to the request that is fulfilled by this risk assessment.", 0, 1, basedOn); 1402 case -995424086: /*parent*/ return new Property("parent", "Reference(Any)", "A reference to a resource that this risk assessment is part of, such as a Procedure.", 0, 1, parent); 1403 case -892481550: /*status*/ return new Property("status", "code", "The status of the RiskAssessment, using the same statuses as an Observation.", 0, 1, status); 1404 case -1077554975: /*method*/ return new Property("method", "CodeableConcept", "The algorithm, process or mechanism used to evaluate the risk.", 0, 1, method); 1405 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "The type of the risk assessment performed.", 0, 1, code); 1406 case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group)", "The patient or group the risk assessment applies to.", 0, 1, subject); 1407 case 1524132147: /*encounter*/ return new Property("encounter", "Reference(Encounter)", "The encounter where the assessment was performed.", 0, 1, encounter); 1408 case -2022646513: /*occurrence[x]*/ return new Property("occurrence[x]", "dateTime|Period", "The date (and possibly time) the risk assessment was performed.", 0, 1, occurrence); 1409 case 1687874001: /*occurrence*/ return new Property("occurrence[x]", "dateTime|Period", "The date (and possibly time) the risk assessment was performed.", 0, 1, occurrence); 1410 case -298443636: /*occurrenceDateTime*/ return new Property("occurrence[x]", "dateTime", "The date (and possibly time) the risk assessment was performed.", 0, 1, occurrence); 1411 case 1397156594: /*occurrencePeriod*/ return new Property("occurrence[x]", "Period", "The date (and possibly time) the risk assessment was performed.", 0, 1, occurrence); 1412 case -861311717: /*condition*/ return new Property("condition", "Reference(Condition)", "For assessments or prognosis specific to a particular condition, indicates the condition being assessed.", 0, 1, condition); 1413 case 481140686: /*performer*/ return new Property("performer", "Reference(Practitioner|PractitionerRole|Device)", "The provider or software application that performed the assessment.", 0, 1, performer); 1414 case 722137681: /*reasonCode*/ return new Property("reasonCode", "CodeableConcept", "The reason the risk assessment was performed.", 0, java.lang.Integer.MAX_VALUE, reasonCode); 1415 case -1146218137: /*reasonReference*/ return new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport|DocumentReference)", "Resources supporting the reason the risk assessment was performed.", 0, java.lang.Integer.MAX_VALUE, reasonReference); 1416 case 93508670: /*basis*/ return new Property("basis", "Reference(Any)", "Indicates the source data considered as part of the assessment (for example, FamilyHistory, Observations, Procedures, Conditions, etc.).", 0, java.lang.Integer.MAX_VALUE, basis); 1417 case 1161234575: /*prediction*/ return new Property("prediction", "", "Describes the expected outcome for the subject.", 0, java.lang.Integer.MAX_VALUE, prediction); 1418 case 1293793087: /*mitigation*/ return new Property("mitigation", "string", "A description of the steps that might be taken to reduce the identified risk(s).", 0, 1, mitigation); 1419 case 3387378: /*note*/ return new Property("note", "Annotation", "Additional comments about the risk assessment.", 0, java.lang.Integer.MAX_VALUE, note); 1420 default: return super.getNamedProperty(_hash, _name, _checkValid); 1421 } 1422 1423 } 1424 1425 @Override 1426 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1427 switch (hash) { 1428 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1429 case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : new Base[] {this.basedOn}; // Reference 1430 case -995424086: /*parent*/ return this.parent == null ? new Base[0] : new Base[] {this.parent}; // Reference 1431 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ObservationStatus> 1432 case -1077554975: /*method*/ return this.method == null ? new Base[0] : new Base[] {this.method}; // CodeableConcept 1433 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 1434 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 1435 case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference 1436 case 1687874001: /*occurrence*/ return this.occurrence == null ? new Base[0] : new Base[] {this.occurrence}; // DataType 1437 case -861311717: /*condition*/ return this.condition == null ? new Base[0] : new Base[] {this.condition}; // Reference 1438 case 481140686: /*performer*/ return this.performer == null ? new Base[0] : new Base[] {this.performer}; // Reference 1439 case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : this.reasonCode.toArray(new Base[this.reasonCode.size()]); // CodeableConcept 1440 case -1146218137: /*reasonReference*/ return this.reasonReference == null ? new Base[0] : this.reasonReference.toArray(new Base[this.reasonReference.size()]); // Reference 1441 case 93508670: /*basis*/ return this.basis == null ? new Base[0] : this.basis.toArray(new Base[this.basis.size()]); // Reference 1442 case 1161234575: /*prediction*/ return this.prediction == null ? new Base[0] : this.prediction.toArray(new Base[this.prediction.size()]); // RiskAssessmentPredictionComponent 1443 case 1293793087: /*mitigation*/ return this.mitigation == null ? new Base[0] : new Base[] {this.mitigation}; // StringType 1444 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 1445 default: return super.getProperty(hash, name, checkValid); 1446 } 1447 1448 } 1449 1450 @Override 1451 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1452 switch (hash) { 1453 case -1618432855: // identifier 1454 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 1455 return value; 1456 case -332612366: // basedOn 1457 this.basedOn = TypeConvertor.castToReference(value); // Reference 1458 return value; 1459 case -995424086: // parent 1460 this.parent = TypeConvertor.castToReference(value); // Reference 1461 return value; 1462 case -892481550: // status 1463 value = new ObservationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 1464 this.status = (Enumeration) value; // Enumeration<ObservationStatus> 1465 return value; 1466 case -1077554975: // method 1467 this.method = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1468 return value; 1469 case 3059181: // code 1470 this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1471 return value; 1472 case -1867885268: // subject 1473 this.subject = TypeConvertor.castToReference(value); // Reference 1474 return value; 1475 case 1524132147: // encounter 1476 this.encounter = TypeConvertor.castToReference(value); // Reference 1477 return value; 1478 case 1687874001: // occurrence 1479 this.occurrence = TypeConvertor.castToType(value); // DataType 1480 return value; 1481 case -861311717: // condition 1482 this.condition = TypeConvertor.castToReference(value); // Reference 1483 return value; 1484 case 481140686: // performer 1485 this.performer = TypeConvertor.castToReference(value); // Reference 1486 return value; 1487 case 722137681: // reasonCode 1488 this.getReasonCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 1489 return value; 1490 case -1146218137: // reasonReference 1491 this.getReasonReference().add(TypeConvertor.castToReference(value)); // Reference 1492 return value; 1493 case 93508670: // basis 1494 this.getBasis().add(TypeConvertor.castToReference(value)); // Reference 1495 return value; 1496 case 1161234575: // prediction 1497 this.getPrediction().add((RiskAssessmentPredictionComponent) value); // RiskAssessmentPredictionComponent 1498 return value; 1499 case 1293793087: // mitigation 1500 this.mitigation = TypeConvertor.castToString(value); // StringType 1501 return value; 1502 case 3387378: // note 1503 this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation 1504 return value; 1505 default: return super.setProperty(hash, name, value); 1506 } 1507 1508 } 1509 1510 @Override 1511 public Base setProperty(String name, Base value) throws FHIRException { 1512 if (name.equals("identifier")) { 1513 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 1514 } else if (name.equals("basedOn")) { 1515 this.basedOn = TypeConvertor.castToReference(value); // Reference 1516 } else if (name.equals("parent")) { 1517 this.parent = TypeConvertor.castToReference(value); // Reference 1518 } else if (name.equals("status")) { 1519 value = new ObservationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 1520 this.status = (Enumeration) value; // Enumeration<ObservationStatus> 1521 } else if (name.equals("method")) { 1522 this.method = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1523 } else if (name.equals("code")) { 1524 this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1525 } else if (name.equals("subject")) { 1526 this.subject = TypeConvertor.castToReference(value); // Reference 1527 } else if (name.equals("encounter")) { 1528 this.encounter = TypeConvertor.castToReference(value); // Reference 1529 } else if (name.equals("occurrence[x]")) { 1530 this.occurrence = TypeConvertor.castToType(value); // DataType 1531 } else if (name.equals("condition")) { 1532 this.condition = TypeConvertor.castToReference(value); // Reference 1533 } else if (name.equals("performer")) { 1534 this.performer = TypeConvertor.castToReference(value); // Reference 1535 } else if (name.equals("reasonCode")) { 1536 this.getReasonCode().add(TypeConvertor.castToCodeableConcept(value)); 1537 } else if (name.equals("reasonReference")) { 1538 this.getReasonReference().add(TypeConvertor.castToReference(value)); 1539 } else if (name.equals("basis")) { 1540 this.getBasis().add(TypeConvertor.castToReference(value)); 1541 } else if (name.equals("prediction")) { 1542 this.getPrediction().add((RiskAssessmentPredictionComponent) value); 1543 } else if (name.equals("mitigation")) { 1544 this.mitigation = TypeConvertor.castToString(value); // StringType 1545 } else if (name.equals("note")) { 1546 this.getNote().add(TypeConvertor.castToAnnotation(value)); 1547 } else 1548 return super.setProperty(name, value); 1549 return value; 1550 } 1551 1552 @Override 1553 public Base makeProperty(int hash, String name) throws FHIRException { 1554 switch (hash) { 1555 case -1618432855: return addIdentifier(); 1556 case -332612366: return getBasedOn(); 1557 case -995424086: return getParent(); 1558 case -892481550: return getStatusElement(); 1559 case -1077554975: return getMethod(); 1560 case 3059181: return getCode(); 1561 case -1867885268: return getSubject(); 1562 case 1524132147: return getEncounter(); 1563 case -2022646513: return getOccurrence(); 1564 case 1687874001: return getOccurrence(); 1565 case -861311717: return getCondition(); 1566 case 481140686: return getPerformer(); 1567 case 722137681: return addReasonCode(); 1568 case -1146218137: return addReasonReference(); 1569 case 93508670: return addBasis(); 1570 case 1161234575: return addPrediction(); 1571 case 1293793087: return getMitigationElement(); 1572 case 3387378: return addNote(); 1573 default: return super.makeProperty(hash, name); 1574 } 1575 1576 } 1577 1578 @Override 1579 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1580 switch (hash) { 1581 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1582 case -332612366: /*basedOn*/ return new String[] {"Reference"}; 1583 case -995424086: /*parent*/ return new String[] {"Reference"}; 1584 case -892481550: /*status*/ return new String[] {"code"}; 1585 case -1077554975: /*method*/ return new String[] {"CodeableConcept"}; 1586 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 1587 case -1867885268: /*subject*/ return new String[] {"Reference"}; 1588 case 1524132147: /*encounter*/ return new String[] {"Reference"}; 1589 case 1687874001: /*occurrence*/ return new String[] {"dateTime", "Period"}; 1590 case -861311717: /*condition*/ return new String[] {"Reference"}; 1591 case 481140686: /*performer*/ return new String[] {"Reference"}; 1592 case 722137681: /*reasonCode*/ return new String[] {"CodeableConcept"}; 1593 case -1146218137: /*reasonReference*/ return new String[] {"Reference"}; 1594 case 93508670: /*basis*/ return new String[] {"Reference"}; 1595 case 1161234575: /*prediction*/ return new String[] {}; 1596 case 1293793087: /*mitigation*/ return new String[] {"string"}; 1597 case 3387378: /*note*/ return new String[] {"Annotation"}; 1598 default: return super.getTypesForProperty(hash, name); 1599 } 1600 1601 } 1602 1603 @Override 1604 public Base addChild(String name) throws FHIRException { 1605 if (name.equals("identifier")) { 1606 return addIdentifier(); 1607 } 1608 else if (name.equals("basedOn")) { 1609 this.basedOn = new Reference(); 1610 return this.basedOn; 1611 } 1612 else if (name.equals("parent")) { 1613 this.parent = new Reference(); 1614 return this.parent; 1615 } 1616 else if (name.equals("status")) { 1617 throw new FHIRException("Cannot call addChild on a primitive type RiskAssessment.status"); 1618 } 1619 else if (name.equals("method")) { 1620 this.method = new CodeableConcept(); 1621 return this.method; 1622 } 1623 else if (name.equals("code")) { 1624 this.code = new CodeableConcept(); 1625 return this.code; 1626 } 1627 else if (name.equals("subject")) { 1628 this.subject = new Reference(); 1629 return this.subject; 1630 } 1631 else if (name.equals("encounter")) { 1632 this.encounter = new Reference(); 1633 return this.encounter; 1634 } 1635 else if (name.equals("occurrenceDateTime")) { 1636 this.occurrence = new DateTimeType(); 1637 return this.occurrence; 1638 } 1639 else if (name.equals("occurrencePeriod")) { 1640 this.occurrence = new Period(); 1641 return this.occurrence; 1642 } 1643 else if (name.equals("condition")) { 1644 this.condition = new Reference(); 1645 return this.condition; 1646 } 1647 else if (name.equals("performer")) { 1648 this.performer = new Reference(); 1649 return this.performer; 1650 } 1651 else if (name.equals("reasonCode")) { 1652 return addReasonCode(); 1653 } 1654 else if (name.equals("reasonReference")) { 1655 return addReasonReference(); 1656 } 1657 else if (name.equals("basis")) { 1658 return addBasis(); 1659 } 1660 else if (name.equals("prediction")) { 1661 return addPrediction(); 1662 } 1663 else if (name.equals("mitigation")) { 1664 throw new FHIRException("Cannot call addChild on a primitive type RiskAssessment.mitigation"); 1665 } 1666 else if (name.equals("note")) { 1667 return addNote(); 1668 } 1669 else 1670 return super.addChild(name); 1671 } 1672 1673 public String fhirType() { 1674 return "RiskAssessment"; 1675 1676 } 1677 1678 public RiskAssessment copy() { 1679 RiskAssessment dst = new RiskAssessment(); 1680 copyValues(dst); 1681 return dst; 1682 } 1683 1684 public void copyValues(RiskAssessment dst) { 1685 super.copyValues(dst); 1686 if (identifier != null) { 1687 dst.identifier = new ArrayList<Identifier>(); 1688 for (Identifier i : identifier) 1689 dst.identifier.add(i.copy()); 1690 }; 1691 dst.basedOn = basedOn == null ? null : basedOn.copy(); 1692 dst.parent = parent == null ? null : parent.copy(); 1693 dst.status = status == null ? null : status.copy(); 1694 dst.method = method == null ? null : method.copy(); 1695 dst.code = code == null ? null : code.copy(); 1696 dst.subject = subject == null ? null : subject.copy(); 1697 dst.encounter = encounter == null ? null : encounter.copy(); 1698 dst.occurrence = occurrence == null ? null : occurrence.copy(); 1699 dst.condition = condition == null ? null : condition.copy(); 1700 dst.performer = performer == null ? null : performer.copy(); 1701 if (reasonCode != null) { 1702 dst.reasonCode = new ArrayList<CodeableConcept>(); 1703 for (CodeableConcept i : reasonCode) 1704 dst.reasonCode.add(i.copy()); 1705 }; 1706 if (reasonReference != null) { 1707 dst.reasonReference = new ArrayList<Reference>(); 1708 for (Reference i : reasonReference) 1709 dst.reasonReference.add(i.copy()); 1710 }; 1711 if (basis != null) { 1712 dst.basis = new ArrayList<Reference>(); 1713 for (Reference i : basis) 1714 dst.basis.add(i.copy()); 1715 }; 1716 if (prediction != null) { 1717 dst.prediction = new ArrayList<RiskAssessmentPredictionComponent>(); 1718 for (RiskAssessmentPredictionComponent i : prediction) 1719 dst.prediction.add(i.copy()); 1720 }; 1721 dst.mitigation = mitigation == null ? null : mitigation.copy(); 1722 if (note != null) { 1723 dst.note = new ArrayList<Annotation>(); 1724 for (Annotation i : note) 1725 dst.note.add(i.copy()); 1726 }; 1727 } 1728 1729 protected RiskAssessment typedCopy() { 1730 return copy(); 1731 } 1732 1733 @Override 1734 public boolean equalsDeep(Base other_) { 1735 if (!super.equalsDeep(other_)) 1736 return false; 1737 if (!(other_ instanceof RiskAssessment)) 1738 return false; 1739 RiskAssessment o = (RiskAssessment) other_; 1740 return compareDeep(identifier, o.identifier, true) && compareDeep(basedOn, o.basedOn, true) && compareDeep(parent, o.parent, true) 1741 && compareDeep(status, o.status, true) && compareDeep(method, o.method, true) && compareDeep(code, o.code, true) 1742 && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true) && compareDeep(occurrence, o.occurrence, true) 1743 && compareDeep(condition, o.condition, true) && compareDeep(performer, o.performer, true) && compareDeep(reasonCode, o.reasonCode, true) 1744 && compareDeep(reasonReference, o.reasonReference, true) && compareDeep(basis, o.basis, true) && compareDeep(prediction, o.prediction, true) 1745 && compareDeep(mitigation, o.mitigation, true) && compareDeep(note, o.note, true); 1746 } 1747 1748 @Override 1749 public boolean equalsShallow(Base other_) { 1750 if (!super.equalsShallow(other_)) 1751 return false; 1752 if (!(other_ instanceof RiskAssessment)) 1753 return false; 1754 RiskAssessment o = (RiskAssessment) other_; 1755 return compareValues(status, o.status, true) && compareValues(mitigation, o.mitigation, true); 1756 } 1757 1758 public boolean isEmpty() { 1759 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, basedOn, parent 1760 , status, method, code, subject, encounter, occurrence, condition, performer 1761 , reasonCode, reasonReference, basis, prediction, mitigation, note); 1762 } 1763 1764 @Override 1765 public ResourceType getResourceType() { 1766 return ResourceType.RiskAssessment; 1767 } 1768 1769 /** 1770 * Search parameter: <b>condition</b> 1771 * <p> 1772 * Description: <b>Condition assessed</b><br> 1773 * Type: <b>reference</b><br> 1774 * Path: <b>RiskAssessment.condition</b><br> 1775 * </p> 1776 */ 1777 @SearchParamDefinition(name="condition", path="RiskAssessment.condition", description="Condition assessed", type="reference", target={Condition.class } ) 1778 public static final String SP_CONDITION = "condition"; 1779 /** 1780 * <b>Fluent Client</b> search parameter constant for <b>condition</b> 1781 * <p> 1782 * Description: <b>Condition assessed</b><br> 1783 * Type: <b>reference</b><br> 1784 * Path: <b>RiskAssessment.condition</b><br> 1785 * </p> 1786 */ 1787 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONDITION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CONDITION); 1788 1789/** 1790 * Constant for fluent queries to be used to add include statements. Specifies 1791 * the path value of "<b>RiskAssessment:condition</b>". 1792 */ 1793 public static final ca.uhn.fhir.model.api.Include INCLUDE_CONDITION = new ca.uhn.fhir.model.api.Include("RiskAssessment:condition").toLocked(); 1794 1795 /** 1796 * Search parameter: <b>method</b> 1797 * <p> 1798 * Description: <b>Evaluation mechanism</b><br> 1799 * Type: <b>token</b><br> 1800 * Path: <b>RiskAssessment.method</b><br> 1801 * </p> 1802 */ 1803 @SearchParamDefinition(name="method", path="RiskAssessment.method", description="Evaluation mechanism", type="token" ) 1804 public static final String SP_METHOD = "method"; 1805 /** 1806 * <b>Fluent Client</b> search parameter constant for <b>method</b> 1807 * <p> 1808 * Description: <b>Evaluation mechanism</b><br> 1809 * Type: <b>token</b><br> 1810 * Path: <b>RiskAssessment.method</b><br> 1811 * </p> 1812 */ 1813 public static final ca.uhn.fhir.rest.gclient.TokenClientParam METHOD = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_METHOD); 1814 1815 /** 1816 * Search parameter: <b>performer</b> 1817 * <p> 1818 * Description: <b>Who did assessment?</b><br> 1819 * Type: <b>reference</b><br> 1820 * Path: <b>RiskAssessment.performer</b><br> 1821 * </p> 1822 */ 1823 @SearchParamDefinition(name="performer", path="RiskAssessment.performer", description="Who did assessment?", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Device.class, Practitioner.class, PractitionerRole.class } ) 1824 public static final String SP_PERFORMER = "performer"; 1825 /** 1826 * <b>Fluent Client</b> search parameter constant for <b>performer</b> 1827 * <p> 1828 * Description: <b>Who did assessment?</b><br> 1829 * Type: <b>reference</b><br> 1830 * Path: <b>RiskAssessment.performer</b><br> 1831 * </p> 1832 */ 1833 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PERFORMER); 1834 1835/** 1836 * Constant for fluent queries to be used to add include statements. Specifies 1837 * the path value of "<b>RiskAssessment:performer</b>". 1838 */ 1839 public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER = new ca.uhn.fhir.model.api.Include("RiskAssessment:performer").toLocked(); 1840 1841 /** 1842 * Search parameter: <b>probability</b> 1843 * <p> 1844 * Description: <b>Likelihood of specified outcome</b><br> 1845 * Type: <b>number</b><br> 1846 * Path: <b>RiskAssessment.prediction.probability</b><br> 1847 * </p> 1848 */ 1849 @SearchParamDefinition(name="probability", path="RiskAssessment.prediction.probability", description="Likelihood of specified outcome", type="number" ) 1850 public static final String SP_PROBABILITY = "probability"; 1851 /** 1852 * <b>Fluent Client</b> search parameter constant for <b>probability</b> 1853 * <p> 1854 * Description: <b>Likelihood of specified outcome</b><br> 1855 * Type: <b>number</b><br> 1856 * Path: <b>RiskAssessment.prediction.probability</b><br> 1857 * </p> 1858 */ 1859 public static final ca.uhn.fhir.rest.gclient.NumberClientParam PROBABILITY = new ca.uhn.fhir.rest.gclient.NumberClientParam(SP_PROBABILITY); 1860 1861 /** 1862 * Search parameter: <b>risk</b> 1863 * <p> 1864 * Description: <b>Likelihood of specified outcome as a qualitative value</b><br> 1865 * Type: <b>token</b><br> 1866 * Path: <b>RiskAssessment.prediction.qualitativeRisk</b><br> 1867 * </p> 1868 */ 1869 @SearchParamDefinition(name="risk", path="RiskAssessment.prediction.qualitativeRisk", description="Likelihood of specified outcome as a qualitative value", type="token" ) 1870 public static final String SP_RISK = "risk"; 1871 /** 1872 * <b>Fluent Client</b> search parameter constant for <b>risk</b> 1873 * <p> 1874 * Description: <b>Likelihood of specified outcome as a qualitative value</b><br> 1875 * Type: <b>token</b><br> 1876 * Path: <b>RiskAssessment.prediction.qualitativeRisk</b><br> 1877 * </p> 1878 */ 1879 public static final ca.uhn.fhir.rest.gclient.TokenClientParam RISK = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_RISK); 1880 1881 /** 1882 * Search parameter: <b>subject</b> 1883 * <p> 1884 * Description: <b>Who/what does assessment apply to?</b><br> 1885 * Type: <b>reference</b><br> 1886 * Path: <b>RiskAssessment.subject</b><br> 1887 * </p> 1888 */ 1889 @SearchParamDefinition(name="subject", path="RiskAssessment.subject", description="Who/what does assessment apply to?", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Group.class, Patient.class } ) 1890 public static final String SP_SUBJECT = "subject"; 1891 /** 1892 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 1893 * <p> 1894 * Description: <b>Who/what does assessment apply to?</b><br> 1895 * Type: <b>reference</b><br> 1896 * Path: <b>RiskAssessment.subject</b><br> 1897 * </p> 1898 */ 1899 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 1900 1901/** 1902 * Constant for fluent queries to be used to add include statements. Specifies 1903 * the path value of "<b>RiskAssessment:subject</b>". 1904 */ 1905 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("RiskAssessment:subject").toLocked(); 1906 1907 /** 1908 * Search parameter: <b>date</b> 1909 * <p> 1910 * Description: <b>Multiple Resources: 1911 1912* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded 1913* [CarePlan](careplan.html): Time period plan covers 1914* [CareTeam](careteam.html): Time period team covers 1915* [ClinicalImpression](clinicalimpression.html): When the assessment was documented 1916* [Composition](composition.html): Composition editing time 1917* [Consent](consent.html): When this Consent was created or indexed 1918* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report 1919* [Encounter](encounter.html): A date within the period the Encounter lasted 1920* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period 1921* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated 1922* [Flag](flag.html): Time period when flag is active 1923* [Immunization](immunization.html): Vaccination (non)-Administration Date 1924* [List](list.html): When the list was prepared 1925* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period 1926* [Procedure](procedure.html): When the procedure was performed 1927* [RiskAssessment](riskassessment.html): When was assessment made? 1928* [SupplyRequest](supplyrequest.html): When the request was made 1929</b><br> 1930 * Type: <b>date</b><br> 1931 * Path: <b>AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn</b><br> 1932 * </p> 1933 */ 1934 @SearchParamDefinition(name="date", path="AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): Time period team covers\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When this Consent was created or indexed\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [Encounter](encounter.html): A date within the period the Encounter lasted\r\n* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period\r\n* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated\r\n* [Flag](flag.html): Time period when flag is active\r\n* [Immunization](immunization.html): Vaccination (non)-Administration Date\r\n* [List](list.html): When the list was prepared\r\n* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period\r\n* [Procedure](procedure.html): When the procedure was performed\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", type="date" ) 1935 public static final String SP_DATE = "date"; 1936 /** 1937 * <b>Fluent Client</b> search parameter constant for <b>date</b> 1938 * <p> 1939 * Description: <b>Multiple Resources: 1940 1941* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded 1942* [CarePlan](careplan.html): Time period plan covers 1943* [CareTeam](careteam.html): Time period team covers 1944* [ClinicalImpression](clinicalimpression.html): When the assessment was documented 1945* [Composition](composition.html): Composition editing time 1946* [Consent](consent.html): When this Consent was created or indexed 1947* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report 1948* [Encounter](encounter.html): A date within the period the Encounter lasted 1949* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period 1950* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated 1951* [Flag](flag.html): Time period when flag is active 1952* [Immunization](immunization.html): Vaccination (non)-Administration Date 1953* [List](list.html): When the list was prepared 1954* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period 1955* [Procedure](procedure.html): When the procedure was performed 1956* [RiskAssessment](riskassessment.html): When was assessment made? 1957* [SupplyRequest](supplyrequest.html): When the request was made 1958</b><br> 1959 * Type: <b>date</b><br> 1960 * Path: <b>AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn</b><br> 1961 * </p> 1962 */ 1963 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 1964 1965 /** 1966 * Search parameter: <b>encounter</b> 1967 * <p> 1968 * Description: <b>Multiple Resources: 1969 1970* [Composition](composition.html): Context of the Composition 1971* [DeviceRequest](devicerequest.html): Encounter during which request was created 1972* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made 1973* [DocumentReference](documentreference.html): Context of the document content 1974* [Flag](flag.html): Alert relevant during encounter 1975* [List](list.html): Context in which list created 1976* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier 1977* [Observation](observation.html): Encounter related to the observation 1978* [Procedure](procedure.html): Encounter created as part of 1979* [RiskAssessment](riskassessment.html): Where was assessment performed? 1980* [ServiceRequest](servicerequest.html): An encounter in which this request is made 1981* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier 1982</b><br> 1983 * Type: <b>reference</b><br> 1984 * Path: <b>Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | DocumentReference.context.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter</b><br> 1985 * </p> 1986 */ 1987 @SearchParamDefinition(name="encounter", path="Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | DocumentReference.context.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter", description="Multiple Resources: \r\n\r\n* [Composition](composition.html): Context of the Composition\r\n* [DeviceRequest](devicerequest.html): Encounter during which request was created\r\n* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made\r\n* [DocumentReference](documentreference.html): Context of the document content\r\n* [Flag](flag.html): Alert relevant during encounter\r\n* [List](list.html): Context in which list created\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier\r\n* [Observation](observation.html): Encounter related to the observation\r\n* [Procedure](procedure.html): Encounter created as part of\r\n* [RiskAssessment](riskassessment.html): Where was assessment performed?\r\n* [ServiceRequest](servicerequest.html): An encounter in which this request is made\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier\r\n", type="reference", target={Encounter.class, EpisodeOfCare.class } ) 1988 public static final String SP_ENCOUNTER = "encounter"; 1989 /** 1990 * <b>Fluent Client</b> search parameter constant for <b>encounter</b> 1991 * <p> 1992 * Description: <b>Multiple Resources: 1993 1994* [Composition](composition.html): Context of the Composition 1995* [DeviceRequest](devicerequest.html): Encounter during which request was created 1996* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made 1997* [DocumentReference](documentreference.html): Context of the document content 1998* [Flag](flag.html): Alert relevant during encounter 1999* [List](list.html): Context in which list created 2000* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier 2001* [Observation](observation.html): Encounter related to the observation 2002* [Procedure](procedure.html): Encounter created as part of 2003* [RiskAssessment](riskassessment.html): Where was assessment performed? 2004* [ServiceRequest](servicerequest.html): An encounter in which this request is made 2005* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier 2006</b><br> 2007 * Type: <b>reference</b><br> 2008 * Path: <b>Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | DocumentReference.context.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter</b><br> 2009 * </p> 2010 */ 2011 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER); 2012 2013/** 2014 * Constant for fluent queries to be used to add include statements. Specifies 2015 * the path value of "<b>RiskAssessment:encounter</b>". 2016 */ 2017 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("RiskAssessment:encounter").toLocked(); 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* [MedicationStatement](medicationstatement.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 | MedicationStatement.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 | MedicationStatement.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* [MedicationStatement](medicationstatement.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* [MedicationStatement](medicationstatement.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 | MedicationStatement.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* [MedicationStatement](medicationstatement.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.where(resolve() is Patient) | 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) | MedicationStatement.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.where(resolve() is Patient) | 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) | MedicationStatement.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* [MedicationStatement](medicationstatement.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", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, CatalogEntry.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceMetric.class, DeviceRequest.class, DeviceUseStatement.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Media.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchDefinition.class, ResearchElementDefinition.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.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* [MedicationStatement](medicationstatement.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.where(resolve() is Patient) | 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) | MedicationStatement.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>RiskAssessment:patient</b>". 2194 */ 2195 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("RiskAssessment:patient").toLocked(); 2196 2197 2198} 2199