001package org.hl7.fhir.r4.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Thu, Dec 27, 2018 10:06-0500 for FHIR v4.0.0 033 034import java.util.*; 035 036import java.math.*; 037import org.hl7.fhir.utilities.Utilities; 038import ca.uhn.fhir.model.api.annotation.ResourceDef; 039import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 040import ca.uhn.fhir.model.api.annotation.Child; 041import ca.uhn.fhir.model.api.annotation.ChildOrder; 042import ca.uhn.fhir.model.api.annotation.Description; 043import ca.uhn.fhir.model.api.annotation.Block; 044import org.hl7.fhir.instance.model.api.*; 045import org.hl7.fhir.exceptions.FHIRException; 046/** 047 * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome. 048 */ 049@ResourceDef(name="RiskAssessment", profile="http://hl7.org/fhir/StructureDefinition/RiskAssessment") 050public class RiskAssessment extends DomainResource { 051 052 public enum RiskAssessmentStatus { 053 /** 054 * The existence of the observation is registered, but there is no result yet available. 055 */ 056 REGISTERED, 057 /** 058 * This is an initial or interim observation: data may be incomplete or unverified. 059 */ 060 PRELIMINARY, 061 /** 062 * The observation is complete and there are no further actions needed. Additional information such "released", "signed", etc would be represented using [Provenance](provenance.html) which provides not only the act but also the actors and dates and other related data. These act states would be associated with an observation status of `preliminary` until they are all completed and then a status of `final` would be applied. 063 */ 064 FINAL, 065 /** 066 * Subsequent to being Final, the observation has been modified subsequent. This includes updates/new information and corrections. 067 */ 068 AMENDED, 069 /** 070 * Subsequent to being Final, the observation has been modified to correct an error in the test result. 071 */ 072 CORRECTED, 073 /** 074 * The observation is unavailable because the measurement was not started or not completed (also sometimes called "aborted"). 075 */ 076 CANCELLED, 077 /** 078 * The observation has been withdrawn following previous final release. This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".). 079 */ 080 ENTEREDINERROR, 081 /** 082 * The authoring/source system does not know which of the status values currently applies for this observation. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which. 083 */ 084 UNKNOWN, 085 /** 086 * added to help the parsers with the generic types 087 */ 088 NULL; 089 public static RiskAssessmentStatus fromCode(String codeString) throws FHIRException { 090 if (codeString == null || "".equals(codeString)) 091 return null; 092 if ("registered".equals(codeString)) 093 return REGISTERED; 094 if ("preliminary".equals(codeString)) 095 return PRELIMINARY; 096 if ("final".equals(codeString)) 097 return FINAL; 098 if ("amended".equals(codeString)) 099 return AMENDED; 100 if ("corrected".equals(codeString)) 101 return CORRECTED; 102 if ("cancelled".equals(codeString)) 103 return CANCELLED; 104 if ("entered-in-error".equals(codeString)) 105 return ENTEREDINERROR; 106 if ("unknown".equals(codeString)) 107 return UNKNOWN; 108 if (Configuration.isAcceptInvalidEnums()) 109 return null; 110 else 111 throw new FHIRException("Unknown RiskAssessmentStatus code '"+codeString+"'"); 112 } 113 public String toCode() { 114 switch (this) { 115 case REGISTERED: return "registered"; 116 case PRELIMINARY: return "preliminary"; 117 case FINAL: return "final"; 118 case AMENDED: return "amended"; 119 case CORRECTED: return "corrected"; 120 case CANCELLED: return "cancelled"; 121 case ENTEREDINERROR: return "entered-in-error"; 122 case UNKNOWN: return "unknown"; 123 default: return "?"; 124 } 125 } 126 public String getSystem() { 127 switch (this) { 128 case REGISTERED: return "http://hl7.org/fhir/observation-status"; 129 case PRELIMINARY: return "http://hl7.org/fhir/observation-status"; 130 case FINAL: return "http://hl7.org/fhir/observation-status"; 131 case AMENDED: return "http://hl7.org/fhir/observation-status"; 132 case CORRECTED: return "http://hl7.org/fhir/observation-status"; 133 case CANCELLED: return "http://hl7.org/fhir/observation-status"; 134 case ENTEREDINERROR: return "http://hl7.org/fhir/observation-status"; 135 case UNKNOWN: return "http://hl7.org/fhir/observation-status"; 136 default: return "?"; 137 } 138 } 139 public String getDefinition() { 140 switch (this) { 141 case REGISTERED: return "The existence of the observation is registered, but there is no result yet available."; 142 case PRELIMINARY: return "This is an initial or interim observation: data may be incomplete or unverified."; 143 case FINAL: return "The observation is complete and there are no further actions needed. Additional information such \"released\", \"signed\", etc would be represented using [Provenance](provenance.html) which provides not only the act but also the actors and dates and other related data. These act states would be associated with an observation status of `preliminary` until they are all completed and then a status of `final` would be applied."; 144 case AMENDED: return "Subsequent to being Final, the observation has been modified subsequent. This includes updates/new information and corrections."; 145 case CORRECTED: return "Subsequent to being Final, the observation has been modified to correct an error in the test result."; 146 case CANCELLED: return "The observation is unavailable because the measurement was not started or not completed (also sometimes called \"aborted\")."; 147 case ENTEREDINERROR: return "The observation has been withdrawn following previous final release. This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".)."; 148 case UNKNOWN: return "The authoring/source system does not know which of the status values currently applies for this observation. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which."; 149 default: return "?"; 150 } 151 } 152 public String getDisplay() { 153 switch (this) { 154 case REGISTERED: return "Registered"; 155 case PRELIMINARY: return "Preliminary"; 156 case FINAL: return "Final"; 157 case AMENDED: return "Amended"; 158 case CORRECTED: return "Corrected"; 159 case CANCELLED: return "Cancelled"; 160 case ENTEREDINERROR: return "Entered in Error"; 161 case UNKNOWN: return "Unknown"; 162 default: return "?"; 163 } 164 } 165 } 166 167 public static class RiskAssessmentStatusEnumFactory implements EnumFactory<RiskAssessmentStatus> { 168 public RiskAssessmentStatus fromCode(String codeString) throws IllegalArgumentException { 169 if (codeString == null || "".equals(codeString)) 170 if (codeString == null || "".equals(codeString)) 171 return null; 172 if ("registered".equals(codeString)) 173 return RiskAssessmentStatus.REGISTERED; 174 if ("preliminary".equals(codeString)) 175 return RiskAssessmentStatus.PRELIMINARY; 176 if ("final".equals(codeString)) 177 return RiskAssessmentStatus.FINAL; 178 if ("amended".equals(codeString)) 179 return RiskAssessmentStatus.AMENDED; 180 if ("corrected".equals(codeString)) 181 return RiskAssessmentStatus.CORRECTED; 182 if ("cancelled".equals(codeString)) 183 return RiskAssessmentStatus.CANCELLED; 184 if ("entered-in-error".equals(codeString)) 185 return RiskAssessmentStatus.ENTEREDINERROR; 186 if ("unknown".equals(codeString)) 187 return RiskAssessmentStatus.UNKNOWN; 188 throw new IllegalArgumentException("Unknown RiskAssessmentStatus code '"+codeString+"'"); 189 } 190 public Enumeration<RiskAssessmentStatus> fromType(Base code) throws FHIRException { 191 if (code == null) 192 return null; 193 if (code.isEmpty()) 194 return new Enumeration<RiskAssessmentStatus>(this); 195 String codeString = ((PrimitiveType) code).asStringValue(); 196 if (codeString == null || "".equals(codeString)) 197 return null; 198 if ("registered".equals(codeString)) 199 return new Enumeration<RiskAssessmentStatus>(this, RiskAssessmentStatus.REGISTERED); 200 if ("preliminary".equals(codeString)) 201 return new Enumeration<RiskAssessmentStatus>(this, RiskAssessmentStatus.PRELIMINARY); 202 if ("final".equals(codeString)) 203 return new Enumeration<RiskAssessmentStatus>(this, RiskAssessmentStatus.FINAL); 204 if ("amended".equals(codeString)) 205 return new Enumeration<RiskAssessmentStatus>(this, RiskAssessmentStatus.AMENDED); 206 if ("corrected".equals(codeString)) 207 return new Enumeration<RiskAssessmentStatus>(this, RiskAssessmentStatus.CORRECTED); 208 if ("cancelled".equals(codeString)) 209 return new Enumeration<RiskAssessmentStatus>(this, RiskAssessmentStatus.CANCELLED); 210 if ("entered-in-error".equals(codeString)) 211 return new Enumeration<RiskAssessmentStatus>(this, RiskAssessmentStatus.ENTEREDINERROR); 212 if ("unknown".equals(codeString)) 213 return new Enumeration<RiskAssessmentStatus>(this, RiskAssessmentStatus.UNKNOWN); 214 throw new FHIRException("Unknown RiskAssessmentStatus code '"+codeString+"'"); 215 } 216 public String toCode(RiskAssessmentStatus code) { 217 if (code == RiskAssessmentStatus.REGISTERED) 218 return "registered"; 219 if (code == RiskAssessmentStatus.PRELIMINARY) 220 return "preliminary"; 221 if (code == RiskAssessmentStatus.FINAL) 222 return "final"; 223 if (code == RiskAssessmentStatus.AMENDED) 224 return "amended"; 225 if (code == RiskAssessmentStatus.CORRECTED) 226 return "corrected"; 227 if (code == RiskAssessmentStatus.CANCELLED) 228 return "cancelled"; 229 if (code == RiskAssessmentStatus.ENTEREDINERROR) 230 return "entered-in-error"; 231 if (code == RiskAssessmentStatus.UNKNOWN) 232 return "unknown"; 233 return "?"; 234 } 235 public String toSystem(RiskAssessmentStatus code) { 236 return code.getSystem(); 237 } 238 } 239 240 @Block() 241 public static class RiskAssessmentPredictionComponent extends BackboneElement implements IBaseBackboneElement { 242 /** 243 * One of the potential outcomes for the patient (e.g. remission, death, a particular condition). 244 */ 245 @Child(name = "outcome", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 246 @Description(shortDefinition="Possible outcome for the subject", formalDefinition="One of the potential outcomes for the patient (e.g. remission, death, a particular condition)." ) 247 protected CodeableConcept outcome; 248 249 /** 250 * Indicates how likely the outcome is (in the specified timeframe). 251 */ 252 @Child(name = "probability", type = {DecimalType.class, Range.class}, order=2, min=0, max=1, modifier=false, summary=false) 253 @Description(shortDefinition="Likelihood of specified outcome", formalDefinition="Indicates how likely the outcome is (in the specified timeframe)." ) 254 protected Type probability; 255 256 /** 257 * Indicates how likely the outcome is (in the specified timeframe), expressed as a qualitative value (e.g. low, medium, or high). 258 */ 259 @Child(name = "qualitativeRisk", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 260 @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)." ) 261 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/risk-probability") 262 protected CodeableConcept qualitativeRisk; 263 264 /** 265 * 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.). 266 */ 267 @Child(name = "relativeRisk", type = {DecimalType.class}, order=4, min=0, max=1, modifier=false, summary=false) 268 @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.)." ) 269 protected DecimalType relativeRisk; 270 271 /** 272 * Indicates the period of time or age range of the subject to which the specified probability applies. 273 */ 274 @Child(name = "when", type = {Period.class, Range.class}, order=5, min=0, max=1, modifier=false, summary=false) 275 @Description(shortDefinition="Timeframe or age range", formalDefinition="Indicates the period of time or age range of the subject to which the specified probability applies." ) 276 protected Type when; 277 278 /** 279 * Additional information explaining the basis for the prediction. 280 */ 281 @Child(name = "rationale", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) 282 @Description(shortDefinition="Explanation of prediction", formalDefinition="Additional information explaining the basis for the prediction." ) 283 protected StringType rationale; 284 285 private static final long serialVersionUID = 1283401747L; 286 287 /** 288 * Constructor 289 */ 290 public RiskAssessmentPredictionComponent() { 291 super(); 292 } 293 294 /** 295 * @return {@link #outcome} (One of the potential outcomes for the patient (e.g. remission, death, a particular condition).) 296 */ 297 public CodeableConcept getOutcome() { 298 if (this.outcome == null) 299 if (Configuration.errorOnAutoCreate()) 300 throw new Error("Attempt to auto-create RiskAssessmentPredictionComponent.outcome"); 301 else if (Configuration.doAutoCreate()) 302 this.outcome = new CodeableConcept(); // cc 303 return this.outcome; 304 } 305 306 public boolean hasOutcome() { 307 return this.outcome != null && !this.outcome.isEmpty(); 308 } 309 310 /** 311 * @param value {@link #outcome} (One of the potential outcomes for the patient (e.g. remission, death, a particular condition).) 312 */ 313 public RiskAssessmentPredictionComponent setOutcome(CodeableConcept value) { 314 this.outcome = value; 315 return this; 316 } 317 318 /** 319 * @return {@link #probability} (Indicates how likely the outcome is (in the specified timeframe).) 320 */ 321 public Type getProbability() { 322 return this.probability; 323 } 324 325 /** 326 * @return {@link #probability} (Indicates how likely the outcome is (in the specified timeframe).) 327 */ 328 public DecimalType getProbabilityDecimalType() throws FHIRException { 329 if (this.probability == null) 330 this.probability = new DecimalType(); 331 if (!(this.probability instanceof DecimalType)) 332 throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.probability.getClass().getName()+" was encountered"); 333 return (DecimalType) this.probability; 334 } 335 336 public boolean hasProbabilityDecimalType() { 337 return this != null && this.probability instanceof DecimalType; 338 } 339 340 /** 341 * @return {@link #probability} (Indicates how likely the outcome is (in the specified timeframe).) 342 */ 343 public Range getProbabilityRange() throws FHIRException { 344 if (this.probability == null) 345 this.probability = new Range(); 346 if (!(this.probability instanceof Range)) 347 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.probability.getClass().getName()+" was encountered"); 348 return (Range) this.probability; 349 } 350 351 public boolean hasProbabilityRange() { 352 return this != null && this.probability instanceof Range; 353 } 354 355 public boolean hasProbability() { 356 return this.probability != null && !this.probability.isEmpty(); 357 } 358 359 /** 360 * @param value {@link #probability} (Indicates how likely the outcome is (in the specified timeframe).) 361 */ 362 public RiskAssessmentPredictionComponent setProbability(Type value) { 363 if (value != null && !(value instanceof DecimalType || value instanceof Range)) 364 throw new Error("Not the right type for RiskAssessment.prediction.probability[x]: "+value.fhirType()); 365 this.probability = value; 366 return this; 367 } 368 369 /** 370 * @return {@link #qualitativeRisk} (Indicates how likely the outcome is (in the specified timeframe), expressed as a qualitative value (e.g. low, medium, or high).) 371 */ 372 public CodeableConcept getQualitativeRisk() { 373 if (this.qualitativeRisk == null) 374 if (Configuration.errorOnAutoCreate()) 375 throw new Error("Attempt to auto-create RiskAssessmentPredictionComponent.qualitativeRisk"); 376 else if (Configuration.doAutoCreate()) 377 this.qualitativeRisk = new CodeableConcept(); // cc 378 return this.qualitativeRisk; 379 } 380 381 public boolean hasQualitativeRisk() { 382 return this.qualitativeRisk != null && !this.qualitativeRisk.isEmpty(); 383 } 384 385 /** 386 * @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).) 387 */ 388 public RiskAssessmentPredictionComponent setQualitativeRisk(CodeableConcept value) { 389 this.qualitativeRisk = value; 390 return this; 391 } 392 393 /** 394 * @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 395 */ 396 public DecimalType getRelativeRiskElement() { 397 if (this.relativeRisk == null) 398 if (Configuration.errorOnAutoCreate()) 399 throw new Error("Attempt to auto-create RiskAssessmentPredictionComponent.relativeRisk"); 400 else if (Configuration.doAutoCreate()) 401 this.relativeRisk = new DecimalType(); // bb 402 return this.relativeRisk; 403 } 404 405 public boolean hasRelativeRiskElement() { 406 return this.relativeRisk != null && !this.relativeRisk.isEmpty(); 407 } 408 409 public boolean hasRelativeRisk() { 410 return this.relativeRisk != null && !this.relativeRisk.isEmpty(); 411 } 412 413 /** 414 * @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 415 */ 416 public RiskAssessmentPredictionComponent setRelativeRiskElement(DecimalType value) { 417 this.relativeRisk = value; 418 return this; 419 } 420 421 /** 422 * @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.). 423 */ 424 public BigDecimal getRelativeRisk() { 425 return this.relativeRisk == null ? null : this.relativeRisk.getValue(); 426 } 427 428 /** 429 * @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.). 430 */ 431 public RiskAssessmentPredictionComponent setRelativeRisk(BigDecimal value) { 432 if (value == null) 433 this.relativeRisk = null; 434 else { 435 if (this.relativeRisk == null) 436 this.relativeRisk = new DecimalType(); 437 this.relativeRisk.setValue(value); 438 } 439 return this; 440 } 441 442 /** 443 * @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.). 444 */ 445 public RiskAssessmentPredictionComponent setRelativeRisk(long value) { 446 this.relativeRisk = new DecimalType(); 447 this.relativeRisk.setValue(value); 448 return this; 449 } 450 451 /** 452 * @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.). 453 */ 454 public RiskAssessmentPredictionComponent setRelativeRisk(double value) { 455 this.relativeRisk = new DecimalType(); 456 this.relativeRisk.setValue(value); 457 return this; 458 } 459 460 /** 461 * @return {@link #when} (Indicates the period of time or age range of the subject to which the specified probability applies.) 462 */ 463 public Type getWhen() { 464 return this.when; 465 } 466 467 /** 468 * @return {@link #when} (Indicates the period of time or age range of the subject to which the specified probability applies.) 469 */ 470 public Period getWhenPeriod() throws FHIRException { 471 if (this.when == null) 472 this.when = new Period(); 473 if (!(this.when instanceof Period)) 474 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.when.getClass().getName()+" was encountered"); 475 return (Period) this.when; 476 } 477 478 public boolean hasWhenPeriod() { 479 return this != null && this.when instanceof Period; 480 } 481 482 /** 483 * @return {@link #when} (Indicates the period of time or age range of the subject to which the specified probability applies.) 484 */ 485 public Range getWhenRange() throws FHIRException { 486 if (this.when == null) 487 this.when = new Range(); 488 if (!(this.when instanceof Range)) 489 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.when.getClass().getName()+" was encountered"); 490 return (Range) this.when; 491 } 492 493 public boolean hasWhenRange() { 494 return this != null && this.when instanceof Range; 495 } 496 497 public boolean hasWhen() { 498 return this.when != null && !this.when.isEmpty(); 499 } 500 501 /** 502 * @param value {@link #when} (Indicates the period of time or age range of the subject to which the specified probability applies.) 503 */ 504 public RiskAssessmentPredictionComponent setWhen(Type value) { 505 if (value != null && !(value instanceof Period || value instanceof Range)) 506 throw new Error("Not the right type for RiskAssessment.prediction.when[x]: "+value.fhirType()); 507 this.when = value; 508 return this; 509 } 510 511 /** 512 * @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 513 */ 514 public StringType getRationaleElement() { 515 if (this.rationale == null) 516 if (Configuration.errorOnAutoCreate()) 517 throw new Error("Attempt to auto-create RiskAssessmentPredictionComponent.rationale"); 518 else if (Configuration.doAutoCreate()) 519 this.rationale = new StringType(); // bb 520 return this.rationale; 521 } 522 523 public boolean hasRationaleElement() { 524 return this.rationale != null && !this.rationale.isEmpty(); 525 } 526 527 public boolean hasRationale() { 528 return this.rationale != null && !this.rationale.isEmpty(); 529 } 530 531 /** 532 * @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 533 */ 534 public RiskAssessmentPredictionComponent setRationaleElement(StringType value) { 535 this.rationale = value; 536 return this; 537 } 538 539 /** 540 * @return Additional information explaining the basis for the prediction. 541 */ 542 public String getRationale() { 543 return this.rationale == null ? null : this.rationale.getValue(); 544 } 545 546 /** 547 * @param value Additional information explaining the basis for the prediction. 548 */ 549 public RiskAssessmentPredictionComponent setRationale(String value) { 550 if (Utilities.noString(value)) 551 this.rationale = null; 552 else { 553 if (this.rationale == null) 554 this.rationale = new StringType(); 555 this.rationale.setValue(value); 556 } 557 return this; 558 } 559 560 protected void listChildren(List<Property> children) { 561 super.listChildren(children); 562 children.add(new Property("outcome", "CodeableConcept", "One of the potential outcomes for the patient (e.g. remission, death, a particular condition).", 0, 1, outcome)); 563 children.add(new Property("probability[x]", "decimal|Range", "Indicates how likely the outcome is (in the specified timeframe).", 0, 1, probability)); 564 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)); 565 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)); 566 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)); 567 children.add(new Property("rationale", "string", "Additional information explaining the basis for the prediction.", 0, 1, rationale)); 568 } 569 570 @Override 571 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 572 switch (_hash) { 573 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); 574 case 1430185003: /*probability[x]*/ return new Property("probability[x]", "decimal|Range", "Indicates how likely the outcome is (in the specified timeframe).", 0, 1, probability); 575 case -1290561483: /*probability*/ return new Property("probability[x]", "decimal|Range", "Indicates how likely the outcome is (in the specified timeframe).", 0, 1, probability); 576 case 888495452: /*probabilityDecimal*/ return new Property("probability[x]", "decimal|Range", "Indicates how likely the outcome is (in the specified timeframe).", 0, 1, probability); 577 case 9275912: /*probabilityRange*/ return new Property("probability[x]", "decimal|Range", "Indicates how likely the outcome is (in the specified timeframe).", 0, 1, probability); 578 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); 579 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); 580 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); 581 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); 582 case 251476379: /*whenPeriod*/ 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); 583 case -1098542557: /*whenRange*/ 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); 584 case 345689335: /*rationale*/ return new Property("rationale", "string", "Additional information explaining the basis for the prediction.", 0, 1, rationale); 585 default: return super.getNamedProperty(_hash, _name, _checkValid); 586 } 587 588 } 589 590 @Override 591 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 592 switch (hash) { 593 case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // CodeableConcept 594 case -1290561483: /*probability*/ return this.probability == null ? new Base[0] : new Base[] {this.probability}; // Type 595 case 123308730: /*qualitativeRisk*/ return this.qualitativeRisk == null ? new Base[0] : new Base[] {this.qualitativeRisk}; // CodeableConcept 596 case -70741061: /*relativeRisk*/ return this.relativeRisk == null ? new Base[0] : new Base[] {this.relativeRisk}; // DecimalType 597 case 3648314: /*when*/ return this.when == null ? new Base[0] : new Base[] {this.when}; // Type 598 case 345689335: /*rationale*/ return this.rationale == null ? new Base[0] : new Base[] {this.rationale}; // StringType 599 default: return super.getProperty(hash, name, checkValid); 600 } 601 602 } 603 604 @Override 605 public Base setProperty(int hash, String name, Base value) throws FHIRException { 606 switch (hash) { 607 case -1106507950: // outcome 608 this.outcome = castToCodeableConcept(value); // CodeableConcept 609 return value; 610 case -1290561483: // probability 611 this.probability = castToType(value); // Type 612 return value; 613 case 123308730: // qualitativeRisk 614 this.qualitativeRisk = castToCodeableConcept(value); // CodeableConcept 615 return value; 616 case -70741061: // relativeRisk 617 this.relativeRisk = castToDecimal(value); // DecimalType 618 return value; 619 case 3648314: // when 620 this.when = castToType(value); // Type 621 return value; 622 case 345689335: // rationale 623 this.rationale = castToString(value); // StringType 624 return value; 625 default: return super.setProperty(hash, name, value); 626 } 627 628 } 629 630 @Override 631 public Base setProperty(String name, Base value) throws FHIRException { 632 if (name.equals("outcome")) { 633 this.outcome = castToCodeableConcept(value); // CodeableConcept 634 } else if (name.equals("probability[x]")) { 635 this.probability = castToType(value); // Type 636 } else if (name.equals("qualitativeRisk")) { 637 this.qualitativeRisk = castToCodeableConcept(value); // CodeableConcept 638 } else if (name.equals("relativeRisk")) { 639 this.relativeRisk = castToDecimal(value); // DecimalType 640 } else if (name.equals("when[x]")) { 641 this.when = castToType(value); // Type 642 } else if (name.equals("rationale")) { 643 this.rationale = castToString(value); // StringType 644 } else 645 return super.setProperty(name, value); 646 return value; 647 } 648 649 @Override 650 public Base makeProperty(int hash, String name) throws FHIRException { 651 switch (hash) { 652 case -1106507950: return getOutcome(); 653 case 1430185003: return getProbability(); 654 case -1290561483: return getProbability(); 655 case 123308730: return getQualitativeRisk(); 656 case -70741061: return getRelativeRiskElement(); 657 case 1312831238: return getWhen(); 658 case 3648314: return getWhen(); 659 case 345689335: return getRationaleElement(); 660 default: return super.makeProperty(hash, name); 661 } 662 663 } 664 665 @Override 666 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 667 switch (hash) { 668 case -1106507950: /*outcome*/ return new String[] {"CodeableConcept"}; 669 case -1290561483: /*probability*/ return new String[] {"decimal", "Range"}; 670 case 123308730: /*qualitativeRisk*/ return new String[] {"CodeableConcept"}; 671 case -70741061: /*relativeRisk*/ return new String[] {"decimal"}; 672 case 3648314: /*when*/ return new String[] {"Period", "Range"}; 673 case 345689335: /*rationale*/ return new String[] {"string"}; 674 default: return super.getTypesForProperty(hash, name); 675 } 676 677 } 678 679 @Override 680 public Base addChild(String name) throws FHIRException { 681 if (name.equals("outcome")) { 682 this.outcome = new CodeableConcept(); 683 return this.outcome; 684 } 685 else if (name.equals("probabilityDecimal")) { 686 this.probability = new DecimalType(); 687 return this.probability; 688 } 689 else if (name.equals("probabilityRange")) { 690 this.probability = new Range(); 691 return this.probability; 692 } 693 else if (name.equals("qualitativeRisk")) { 694 this.qualitativeRisk = new CodeableConcept(); 695 return this.qualitativeRisk; 696 } 697 else if (name.equals("relativeRisk")) { 698 throw new FHIRException("Cannot call addChild on a primitive type RiskAssessment.relativeRisk"); 699 } 700 else if (name.equals("whenPeriod")) { 701 this.when = new Period(); 702 return this.when; 703 } 704 else if (name.equals("whenRange")) { 705 this.when = new Range(); 706 return this.when; 707 } 708 else if (name.equals("rationale")) { 709 throw new FHIRException("Cannot call addChild on a primitive type RiskAssessment.rationale"); 710 } 711 else 712 return super.addChild(name); 713 } 714 715 public RiskAssessmentPredictionComponent copy() { 716 RiskAssessmentPredictionComponent dst = new RiskAssessmentPredictionComponent(); 717 copyValues(dst); 718 dst.outcome = outcome == null ? null : outcome.copy(); 719 dst.probability = probability == null ? null : probability.copy(); 720 dst.qualitativeRisk = qualitativeRisk == null ? null : qualitativeRisk.copy(); 721 dst.relativeRisk = relativeRisk == null ? null : relativeRisk.copy(); 722 dst.when = when == null ? null : when.copy(); 723 dst.rationale = rationale == null ? null : rationale.copy(); 724 return dst; 725 } 726 727 @Override 728 public boolean equalsDeep(Base other_) { 729 if (!super.equalsDeep(other_)) 730 return false; 731 if (!(other_ instanceof RiskAssessmentPredictionComponent)) 732 return false; 733 RiskAssessmentPredictionComponent o = (RiskAssessmentPredictionComponent) other_; 734 return compareDeep(outcome, o.outcome, true) && compareDeep(probability, o.probability, true) && compareDeep(qualitativeRisk, o.qualitativeRisk, true) 735 && compareDeep(relativeRisk, o.relativeRisk, true) && compareDeep(when, o.when, true) && compareDeep(rationale, o.rationale, true) 736 ; 737 } 738 739 @Override 740 public boolean equalsShallow(Base other_) { 741 if (!super.equalsShallow(other_)) 742 return false; 743 if (!(other_ instanceof RiskAssessmentPredictionComponent)) 744 return false; 745 RiskAssessmentPredictionComponent o = (RiskAssessmentPredictionComponent) other_; 746 return compareValues(relativeRisk, o.relativeRisk, true) && compareValues(rationale, o.rationale, true) 747 ; 748 } 749 750 public boolean isEmpty() { 751 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(outcome, probability, qualitativeRisk 752 , relativeRisk, when, rationale); 753 } 754 755 public String fhirType() { 756 return "RiskAssessment.prediction"; 757 758 } 759 760 } 761 762 /** 763 * Business identifier assigned to the risk assessment. 764 */ 765 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 766 @Description(shortDefinition="Unique identifier for the assessment", formalDefinition="Business identifier assigned to the risk assessment." ) 767 protected List<Identifier> identifier; 768 769 /** 770 * A reference to the request that is fulfilled by this risk assessment. 771 */ 772 @Child(name = "basedOn", type = {Reference.class}, order=1, min=0, max=1, modifier=false, summary=false) 773 @Description(shortDefinition="Request fulfilled by this assessment", formalDefinition="A reference to the request that is fulfilled by this risk assessment." ) 774 protected Reference basedOn; 775 776 /** 777 * The actual object that is the target of the reference (A reference to the request that is fulfilled by this risk assessment.) 778 */ 779 protected Resource basedOnTarget; 780 781 /** 782 * A reference to a resource that this risk assessment is part of, such as a Procedure. 783 */ 784 @Child(name = "parent", type = {Reference.class}, order=2, min=0, max=1, modifier=false, summary=false) 785 @Description(shortDefinition="Part of this occurrence", formalDefinition="A reference to a resource that this risk assessment is part of, such as a Procedure." ) 786 protected Reference parent; 787 788 /** 789 * The actual object that is the target of the reference (A reference to a resource that this risk assessment is part of, such as a Procedure.) 790 */ 791 protected Resource parentTarget; 792 793 /** 794 * The status of the RiskAssessment, using the same statuses as an Observation. 795 */ 796 @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true) 797 @Description(shortDefinition="registered | preliminary | final | amended +", formalDefinition="The status of the RiskAssessment, using the same statuses as an Observation." ) 798 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-status") 799 protected Enumeration<RiskAssessmentStatus> status; 800 801 /** 802 * The algorithm, process or mechanism used to evaluate the risk. 803 */ 804 @Child(name = "method", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) 805 @Description(shortDefinition="Evaluation mechanism", formalDefinition="The algorithm, process or mechanism used to evaluate the risk." ) 806 protected CodeableConcept method; 807 808 /** 809 * The type of the risk assessment performed. 810 */ 811 @Child(name = "code", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true) 812 @Description(shortDefinition="Type of assessment", formalDefinition="The type of the risk assessment performed." ) 813 protected CodeableConcept code; 814 815 /** 816 * The patient or group the risk assessment applies to. 817 */ 818 @Child(name = "subject", type = {Patient.class, Group.class}, order=6, min=1, max=1, modifier=false, summary=true) 819 @Description(shortDefinition="Who/what does assessment apply to?", formalDefinition="The patient or group the risk assessment applies to." ) 820 protected Reference subject; 821 822 /** 823 * The actual object that is the target of the reference (The patient or group the risk assessment applies to.) 824 */ 825 protected Resource subjectTarget; 826 827 /** 828 * The encounter where the assessment was performed. 829 */ 830 @Child(name = "encounter", type = {Encounter.class}, order=7, min=0, max=1, modifier=false, summary=true) 831 @Description(shortDefinition="Where was assessment performed?", formalDefinition="The encounter where the assessment was performed." ) 832 protected Reference encounter; 833 834 /** 835 * The actual object that is the target of the reference (The encounter where the assessment was performed.) 836 */ 837 protected Encounter encounterTarget; 838 839 /** 840 * The date (and possibly time) the risk assessment was performed. 841 */ 842 @Child(name = "occurrence", type = {DateTimeType.class, Period.class}, order=8, min=0, max=1, modifier=false, summary=true) 843 @Description(shortDefinition="When was assessment made?", formalDefinition="The date (and possibly time) the risk assessment was performed." ) 844 protected Type occurrence; 845 846 /** 847 * For assessments or prognosis specific to a particular condition, indicates the condition being assessed. 848 */ 849 @Child(name = "condition", type = {Condition.class}, order=9, min=0, max=1, modifier=false, summary=true) 850 @Description(shortDefinition="Condition assessed", formalDefinition="For assessments or prognosis specific to a particular condition, indicates the condition being assessed." ) 851 protected Reference condition; 852 853 /** 854 * The actual object that is the target of the reference (For assessments or prognosis specific to a particular condition, indicates the condition being assessed.) 855 */ 856 protected Condition conditionTarget; 857 858 /** 859 * The provider or software application that performed the assessment. 860 */ 861 @Child(name = "performer", type = {Practitioner.class, PractitionerRole.class, Device.class}, order=10, min=0, max=1, modifier=false, summary=true) 862 @Description(shortDefinition="Who did assessment?", formalDefinition="The provider or software application that performed the assessment." ) 863 protected Reference performer; 864 865 /** 866 * The actual object that is the target of the reference (The provider or software application that performed the assessment.) 867 */ 868 protected Resource performerTarget; 869 870 /** 871 * The reason the risk assessment was performed. 872 */ 873 @Child(name = "reasonCode", type = {CodeableConcept.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 874 @Description(shortDefinition="Why the assessment was necessary?", formalDefinition="The reason the risk assessment was performed." ) 875 protected List<CodeableConcept> reasonCode; 876 877 /** 878 * Resources supporting the reason the risk assessment was performed. 879 */ 880 @Child(name = "reasonReference", type = {Condition.class, Observation.class, DiagnosticReport.class, DocumentReference.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 881 @Description(shortDefinition="Why the assessment was necessary?", formalDefinition="Resources supporting the reason the risk assessment was performed." ) 882 protected List<Reference> reasonReference; 883 /** 884 * The actual objects that are the target of the reference (Resources supporting the reason the risk assessment was performed.) 885 */ 886 protected List<Resource> reasonReferenceTarget; 887 888 889 /** 890 * Indicates the source data considered as part of the assessment (for example, FamilyHistory, Observations, Procedures, Conditions, etc.). 891 */ 892 @Child(name = "basis", type = {Reference.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 893 @Description(shortDefinition="Information used in assessment", formalDefinition="Indicates the source data considered as part of the assessment (for example, FamilyHistory, Observations, Procedures, Conditions, etc.)." ) 894 protected List<Reference> basis; 895 /** 896 * The actual objects that are the target of the reference (Indicates the source data considered as part of the assessment (for example, FamilyHistory, Observations, Procedures, Conditions, etc.).) 897 */ 898 protected List<Resource> basisTarget; 899 900 901 /** 902 * Describes the expected outcome for the subject. 903 */ 904 @Child(name = "prediction", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 905 @Description(shortDefinition="Outcome predicted", formalDefinition="Describes the expected outcome for the subject." ) 906 protected List<RiskAssessmentPredictionComponent> prediction; 907 908 /** 909 * A description of the steps that might be taken to reduce the identified risk(s). 910 */ 911 @Child(name = "mitigation", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=false) 912 @Description(shortDefinition="How to reduce risk", formalDefinition="A description of the steps that might be taken to reduce the identified risk(s)." ) 913 protected StringType mitigation; 914 915 /** 916 * Additional comments about the risk assessment. 917 */ 918 @Child(name = "note", type = {Annotation.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 919 @Description(shortDefinition="Comments on the risk assessment", formalDefinition="Additional comments about the risk assessment." ) 920 protected List<Annotation> note; 921 922 private static final long serialVersionUID = -2137260218L; 923 924 /** 925 * Constructor 926 */ 927 public RiskAssessment() { 928 super(); 929 } 930 931 /** 932 * Constructor 933 */ 934 public RiskAssessment(Enumeration<RiskAssessmentStatus> status, Reference subject) { 935 super(); 936 this.status = status; 937 this.subject = subject; 938 } 939 940 /** 941 * @return {@link #identifier} (Business identifier assigned to the risk assessment.) 942 */ 943 public List<Identifier> getIdentifier() { 944 if (this.identifier == null) 945 this.identifier = new ArrayList<Identifier>(); 946 return this.identifier; 947 } 948 949 /** 950 * @return Returns a reference to <code>this</code> for easy method chaining 951 */ 952 public RiskAssessment setIdentifier(List<Identifier> theIdentifier) { 953 this.identifier = theIdentifier; 954 return this; 955 } 956 957 public boolean hasIdentifier() { 958 if (this.identifier == null) 959 return false; 960 for (Identifier item : this.identifier) 961 if (!item.isEmpty()) 962 return true; 963 return false; 964 } 965 966 public Identifier addIdentifier() { //3 967 Identifier t = new Identifier(); 968 if (this.identifier == null) 969 this.identifier = new ArrayList<Identifier>(); 970 this.identifier.add(t); 971 return t; 972 } 973 974 public RiskAssessment addIdentifier(Identifier t) { //3 975 if (t == null) 976 return this; 977 if (this.identifier == null) 978 this.identifier = new ArrayList<Identifier>(); 979 this.identifier.add(t); 980 return this; 981 } 982 983 /** 984 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 985 */ 986 public Identifier getIdentifierFirstRep() { 987 if (getIdentifier().isEmpty()) { 988 addIdentifier(); 989 } 990 return getIdentifier().get(0); 991 } 992 993 /** 994 * @return {@link #basedOn} (A reference to the request that is fulfilled by this risk assessment.) 995 */ 996 public Reference getBasedOn() { 997 if (this.basedOn == null) 998 if (Configuration.errorOnAutoCreate()) 999 throw new Error("Attempt to auto-create RiskAssessment.basedOn"); 1000 else if (Configuration.doAutoCreate()) 1001 this.basedOn = new Reference(); // cc 1002 return this.basedOn; 1003 } 1004 1005 public boolean hasBasedOn() { 1006 return this.basedOn != null && !this.basedOn.isEmpty(); 1007 } 1008 1009 /** 1010 * @param value {@link #basedOn} (A reference to the request that is fulfilled by this risk assessment.) 1011 */ 1012 public RiskAssessment setBasedOn(Reference value) { 1013 this.basedOn = value; 1014 return this; 1015 } 1016 1017 /** 1018 * @return {@link #basedOn} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to the request that is fulfilled by this risk assessment.) 1019 */ 1020 public Resource getBasedOnTarget() { 1021 return this.basedOnTarget; 1022 } 1023 1024 /** 1025 * @param value {@link #basedOn} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to the request that is fulfilled by this risk assessment.) 1026 */ 1027 public RiskAssessment setBasedOnTarget(Resource value) { 1028 this.basedOnTarget = value; 1029 return this; 1030 } 1031 1032 /** 1033 * @return {@link #parent} (A reference to a resource that this risk assessment is part of, such as a Procedure.) 1034 */ 1035 public Reference getParent() { 1036 if (this.parent == null) 1037 if (Configuration.errorOnAutoCreate()) 1038 throw new Error("Attempt to auto-create RiskAssessment.parent"); 1039 else if (Configuration.doAutoCreate()) 1040 this.parent = new Reference(); // cc 1041 return this.parent; 1042 } 1043 1044 public boolean hasParent() { 1045 return this.parent != null && !this.parent.isEmpty(); 1046 } 1047 1048 /** 1049 * @param value {@link #parent} (A reference to a resource that this risk assessment is part of, such as a Procedure.) 1050 */ 1051 public RiskAssessment setParent(Reference value) { 1052 this.parent = value; 1053 return this; 1054 } 1055 1056 /** 1057 * @return {@link #parent} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a resource that this risk assessment is part of, such as a Procedure.) 1058 */ 1059 public Resource getParentTarget() { 1060 return this.parentTarget; 1061 } 1062 1063 /** 1064 * @param value {@link #parent} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a resource that this risk assessment is part of, such as a Procedure.) 1065 */ 1066 public RiskAssessment setParentTarget(Resource value) { 1067 this.parentTarget = value; 1068 return this; 1069 } 1070 1071 /** 1072 * @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 1073 */ 1074 public Enumeration<RiskAssessmentStatus> getStatusElement() { 1075 if (this.status == null) 1076 if (Configuration.errorOnAutoCreate()) 1077 throw new Error("Attempt to auto-create RiskAssessment.status"); 1078 else if (Configuration.doAutoCreate()) 1079 this.status = new Enumeration<RiskAssessmentStatus>(new RiskAssessmentStatusEnumFactory()); // bb 1080 return this.status; 1081 } 1082 1083 public boolean hasStatusElement() { 1084 return this.status != null && !this.status.isEmpty(); 1085 } 1086 1087 public boolean hasStatus() { 1088 return this.status != null && !this.status.isEmpty(); 1089 } 1090 1091 /** 1092 * @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 1093 */ 1094 public RiskAssessment setStatusElement(Enumeration<RiskAssessmentStatus> value) { 1095 this.status = value; 1096 return this; 1097 } 1098 1099 /** 1100 * @return The status of the RiskAssessment, using the same statuses as an Observation. 1101 */ 1102 public RiskAssessmentStatus getStatus() { 1103 return this.status == null ? null : this.status.getValue(); 1104 } 1105 1106 /** 1107 * @param value The status of the RiskAssessment, using the same statuses as an Observation. 1108 */ 1109 public RiskAssessment setStatus(RiskAssessmentStatus value) { 1110 if (this.status == null) 1111 this.status = new Enumeration<RiskAssessmentStatus>(new RiskAssessmentStatusEnumFactory()); 1112 this.status.setValue(value); 1113 return this; 1114 } 1115 1116 /** 1117 * @return {@link #method} (The algorithm, process or mechanism used to evaluate the risk.) 1118 */ 1119 public CodeableConcept getMethod() { 1120 if (this.method == null) 1121 if (Configuration.errorOnAutoCreate()) 1122 throw new Error("Attempt to auto-create RiskAssessment.method"); 1123 else if (Configuration.doAutoCreate()) 1124 this.method = new CodeableConcept(); // cc 1125 return this.method; 1126 } 1127 1128 public boolean hasMethod() { 1129 return this.method != null && !this.method.isEmpty(); 1130 } 1131 1132 /** 1133 * @param value {@link #method} (The algorithm, process or mechanism used to evaluate the risk.) 1134 */ 1135 public RiskAssessment setMethod(CodeableConcept value) { 1136 this.method = value; 1137 return this; 1138 } 1139 1140 /** 1141 * @return {@link #code} (The type of the risk assessment performed.) 1142 */ 1143 public CodeableConcept getCode() { 1144 if (this.code == null) 1145 if (Configuration.errorOnAutoCreate()) 1146 throw new Error("Attempt to auto-create RiskAssessment.code"); 1147 else if (Configuration.doAutoCreate()) 1148 this.code = new CodeableConcept(); // cc 1149 return this.code; 1150 } 1151 1152 public boolean hasCode() { 1153 return this.code != null && !this.code.isEmpty(); 1154 } 1155 1156 /** 1157 * @param value {@link #code} (The type of the risk assessment performed.) 1158 */ 1159 public RiskAssessment setCode(CodeableConcept value) { 1160 this.code = value; 1161 return this; 1162 } 1163 1164 /** 1165 * @return {@link #subject} (The patient or group the risk assessment applies to.) 1166 */ 1167 public Reference getSubject() { 1168 if (this.subject == null) 1169 if (Configuration.errorOnAutoCreate()) 1170 throw new Error("Attempt to auto-create RiskAssessment.subject"); 1171 else if (Configuration.doAutoCreate()) 1172 this.subject = new Reference(); // cc 1173 return this.subject; 1174 } 1175 1176 public boolean hasSubject() { 1177 return this.subject != null && !this.subject.isEmpty(); 1178 } 1179 1180 /** 1181 * @param value {@link #subject} (The patient or group the risk assessment applies to.) 1182 */ 1183 public RiskAssessment setSubject(Reference value) { 1184 this.subject = value; 1185 return this; 1186 } 1187 1188 /** 1189 * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient or group the risk assessment applies to.) 1190 */ 1191 public Resource getSubjectTarget() { 1192 return this.subjectTarget; 1193 } 1194 1195 /** 1196 * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient or group the risk assessment applies to.) 1197 */ 1198 public RiskAssessment setSubjectTarget(Resource value) { 1199 this.subjectTarget = value; 1200 return this; 1201 } 1202 1203 /** 1204 * @return {@link #encounter} (The encounter where the assessment was performed.) 1205 */ 1206 public Reference getEncounter() { 1207 if (this.encounter == null) 1208 if (Configuration.errorOnAutoCreate()) 1209 throw new Error("Attempt to auto-create RiskAssessment.encounter"); 1210 else if (Configuration.doAutoCreate()) 1211 this.encounter = new Reference(); // cc 1212 return this.encounter; 1213 } 1214 1215 public boolean hasEncounter() { 1216 return this.encounter != null && !this.encounter.isEmpty(); 1217 } 1218 1219 /** 1220 * @param value {@link #encounter} (The encounter where the assessment was performed.) 1221 */ 1222 public RiskAssessment setEncounter(Reference value) { 1223 this.encounter = value; 1224 return this; 1225 } 1226 1227 /** 1228 * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The encounter where the assessment was performed.) 1229 */ 1230 public Encounter getEncounterTarget() { 1231 if (this.encounterTarget == null) 1232 if (Configuration.errorOnAutoCreate()) 1233 throw new Error("Attempt to auto-create RiskAssessment.encounter"); 1234 else if (Configuration.doAutoCreate()) 1235 this.encounterTarget = new Encounter(); // aa 1236 return this.encounterTarget; 1237 } 1238 1239 /** 1240 * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The encounter where the assessment was performed.) 1241 */ 1242 public RiskAssessment setEncounterTarget(Encounter value) { 1243 this.encounterTarget = value; 1244 return this; 1245 } 1246 1247 /** 1248 * @return {@link #occurrence} (The date (and possibly time) the risk assessment was performed.) 1249 */ 1250 public Type getOccurrence() { 1251 return this.occurrence; 1252 } 1253 1254 /** 1255 * @return {@link #occurrence} (The date (and possibly time) the risk assessment was performed.) 1256 */ 1257 public DateTimeType getOccurrenceDateTimeType() throws FHIRException { 1258 if (this.occurrence == null) 1259 this.occurrence = new DateTimeType(); 1260 if (!(this.occurrence instanceof DateTimeType)) 1261 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.occurrence.getClass().getName()+" was encountered"); 1262 return (DateTimeType) this.occurrence; 1263 } 1264 1265 public boolean hasOccurrenceDateTimeType() { 1266 return this != null && this.occurrence instanceof DateTimeType; 1267 } 1268 1269 /** 1270 * @return {@link #occurrence} (The date (and possibly time) the risk assessment was performed.) 1271 */ 1272 public Period getOccurrencePeriod() throws FHIRException { 1273 if (this.occurrence == null) 1274 this.occurrence = new Period(); 1275 if (!(this.occurrence instanceof Period)) 1276 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.occurrence.getClass().getName()+" was encountered"); 1277 return (Period) this.occurrence; 1278 } 1279 1280 public boolean hasOccurrencePeriod() { 1281 return this != null && this.occurrence instanceof Period; 1282 } 1283 1284 public boolean hasOccurrence() { 1285 return this.occurrence != null && !this.occurrence.isEmpty(); 1286 } 1287 1288 /** 1289 * @param value {@link #occurrence} (The date (and possibly time) the risk assessment was performed.) 1290 */ 1291 public RiskAssessment setOccurrence(Type value) { 1292 if (value != null && !(value instanceof DateTimeType || value instanceof Period)) 1293 throw new Error("Not the right type for RiskAssessment.occurrence[x]: "+value.fhirType()); 1294 this.occurrence = value; 1295 return this; 1296 } 1297 1298 /** 1299 * @return {@link #condition} (For assessments or prognosis specific to a particular condition, indicates the condition being assessed.) 1300 */ 1301 public Reference getCondition() { 1302 if (this.condition == null) 1303 if (Configuration.errorOnAutoCreate()) 1304 throw new Error("Attempt to auto-create RiskAssessment.condition"); 1305 else if (Configuration.doAutoCreate()) 1306 this.condition = new Reference(); // cc 1307 return this.condition; 1308 } 1309 1310 public boolean hasCondition() { 1311 return this.condition != null && !this.condition.isEmpty(); 1312 } 1313 1314 /** 1315 * @param value {@link #condition} (For assessments or prognosis specific to a particular condition, indicates the condition being assessed.) 1316 */ 1317 public RiskAssessment setCondition(Reference value) { 1318 this.condition = value; 1319 return this; 1320 } 1321 1322 /** 1323 * @return {@link #condition} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (For assessments or prognosis specific to a particular condition, indicates the condition being assessed.) 1324 */ 1325 public Condition getConditionTarget() { 1326 if (this.conditionTarget == null) 1327 if (Configuration.errorOnAutoCreate()) 1328 throw new Error("Attempt to auto-create RiskAssessment.condition"); 1329 else if (Configuration.doAutoCreate()) 1330 this.conditionTarget = new Condition(); // aa 1331 return this.conditionTarget; 1332 } 1333 1334 /** 1335 * @param value {@link #condition} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (For assessments or prognosis specific to a particular condition, indicates the condition being assessed.) 1336 */ 1337 public RiskAssessment setConditionTarget(Condition value) { 1338 this.conditionTarget = value; 1339 return this; 1340 } 1341 1342 /** 1343 * @return {@link #performer} (The provider or software application that performed the assessment.) 1344 */ 1345 public Reference getPerformer() { 1346 if (this.performer == null) 1347 if (Configuration.errorOnAutoCreate()) 1348 throw new Error("Attempt to auto-create RiskAssessment.performer"); 1349 else if (Configuration.doAutoCreate()) 1350 this.performer = new Reference(); // cc 1351 return this.performer; 1352 } 1353 1354 public boolean hasPerformer() { 1355 return this.performer != null && !this.performer.isEmpty(); 1356 } 1357 1358 /** 1359 * @param value {@link #performer} (The provider or software application that performed the assessment.) 1360 */ 1361 public RiskAssessment setPerformer(Reference value) { 1362 this.performer = value; 1363 return this; 1364 } 1365 1366 /** 1367 * @return {@link #performer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The provider or software application that performed the assessment.) 1368 */ 1369 public Resource getPerformerTarget() { 1370 return this.performerTarget; 1371 } 1372 1373 /** 1374 * @param value {@link #performer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The provider or software application that performed the assessment.) 1375 */ 1376 public RiskAssessment setPerformerTarget(Resource value) { 1377 this.performerTarget = value; 1378 return this; 1379 } 1380 1381 /** 1382 * @return {@link #reasonCode} (The reason the risk assessment was performed.) 1383 */ 1384 public List<CodeableConcept> getReasonCode() { 1385 if (this.reasonCode == null) 1386 this.reasonCode = new ArrayList<CodeableConcept>(); 1387 return this.reasonCode; 1388 } 1389 1390 /** 1391 * @return Returns a reference to <code>this</code> for easy method chaining 1392 */ 1393 public RiskAssessment setReasonCode(List<CodeableConcept> theReasonCode) { 1394 this.reasonCode = theReasonCode; 1395 return this; 1396 } 1397 1398 public boolean hasReasonCode() { 1399 if (this.reasonCode == null) 1400 return false; 1401 for (CodeableConcept item : this.reasonCode) 1402 if (!item.isEmpty()) 1403 return true; 1404 return false; 1405 } 1406 1407 public CodeableConcept addReasonCode() { //3 1408 CodeableConcept t = new CodeableConcept(); 1409 if (this.reasonCode == null) 1410 this.reasonCode = new ArrayList<CodeableConcept>(); 1411 this.reasonCode.add(t); 1412 return t; 1413 } 1414 1415 public RiskAssessment addReasonCode(CodeableConcept t) { //3 1416 if (t == null) 1417 return this; 1418 if (this.reasonCode == null) 1419 this.reasonCode = new ArrayList<CodeableConcept>(); 1420 this.reasonCode.add(t); 1421 return this; 1422 } 1423 1424 /** 1425 * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist 1426 */ 1427 public CodeableConcept getReasonCodeFirstRep() { 1428 if (getReasonCode().isEmpty()) { 1429 addReasonCode(); 1430 } 1431 return getReasonCode().get(0); 1432 } 1433 1434 /** 1435 * @return {@link #reasonReference} (Resources supporting the reason the risk assessment was performed.) 1436 */ 1437 public List<Reference> getReasonReference() { 1438 if (this.reasonReference == null) 1439 this.reasonReference = new ArrayList<Reference>(); 1440 return this.reasonReference; 1441 } 1442 1443 /** 1444 * @return Returns a reference to <code>this</code> for easy method chaining 1445 */ 1446 public RiskAssessment setReasonReference(List<Reference> theReasonReference) { 1447 this.reasonReference = theReasonReference; 1448 return this; 1449 } 1450 1451 public boolean hasReasonReference() { 1452 if (this.reasonReference == null) 1453 return false; 1454 for (Reference item : this.reasonReference) 1455 if (!item.isEmpty()) 1456 return true; 1457 return false; 1458 } 1459 1460 public Reference addReasonReference() { //3 1461 Reference t = new Reference(); 1462 if (this.reasonReference == null) 1463 this.reasonReference = new ArrayList<Reference>(); 1464 this.reasonReference.add(t); 1465 return t; 1466 } 1467 1468 public RiskAssessment addReasonReference(Reference t) { //3 1469 if (t == null) 1470 return this; 1471 if (this.reasonReference == null) 1472 this.reasonReference = new ArrayList<Reference>(); 1473 this.reasonReference.add(t); 1474 return this; 1475 } 1476 1477 /** 1478 * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist 1479 */ 1480 public Reference getReasonReferenceFirstRep() { 1481 if (getReasonReference().isEmpty()) { 1482 addReasonReference(); 1483 } 1484 return getReasonReference().get(0); 1485 } 1486 1487 /** 1488 * @deprecated Use Reference#setResource(IBaseResource) instead 1489 */ 1490 @Deprecated 1491 public List<Resource> getReasonReferenceTarget() { 1492 if (this.reasonReferenceTarget == null) 1493 this.reasonReferenceTarget = new ArrayList<Resource>(); 1494 return this.reasonReferenceTarget; 1495 } 1496 1497 /** 1498 * @return {@link #basis} (Indicates the source data considered as part of the assessment (for example, FamilyHistory, Observations, Procedures, Conditions, etc.).) 1499 */ 1500 public List<Reference> getBasis() { 1501 if (this.basis == null) 1502 this.basis = new ArrayList<Reference>(); 1503 return this.basis; 1504 } 1505 1506 /** 1507 * @return Returns a reference to <code>this</code> for easy method chaining 1508 */ 1509 public RiskAssessment setBasis(List<Reference> theBasis) { 1510 this.basis = theBasis; 1511 return this; 1512 } 1513 1514 public boolean hasBasis() { 1515 if (this.basis == null) 1516 return false; 1517 for (Reference item : this.basis) 1518 if (!item.isEmpty()) 1519 return true; 1520 return false; 1521 } 1522 1523 public Reference addBasis() { //3 1524 Reference t = new Reference(); 1525 if (this.basis == null) 1526 this.basis = new ArrayList<Reference>(); 1527 this.basis.add(t); 1528 return t; 1529 } 1530 1531 public RiskAssessment addBasis(Reference t) { //3 1532 if (t == null) 1533 return this; 1534 if (this.basis == null) 1535 this.basis = new ArrayList<Reference>(); 1536 this.basis.add(t); 1537 return this; 1538 } 1539 1540 /** 1541 * @return The first repetition of repeating field {@link #basis}, creating it if it does not already exist 1542 */ 1543 public Reference getBasisFirstRep() { 1544 if (getBasis().isEmpty()) { 1545 addBasis(); 1546 } 1547 return getBasis().get(0); 1548 } 1549 1550 /** 1551 * @deprecated Use Reference#setResource(IBaseResource) instead 1552 */ 1553 @Deprecated 1554 public List<Resource> getBasisTarget() { 1555 if (this.basisTarget == null) 1556 this.basisTarget = new ArrayList<Resource>(); 1557 return this.basisTarget; 1558 } 1559 1560 /** 1561 * @return {@link #prediction} (Describes the expected outcome for the subject.) 1562 */ 1563 public List<RiskAssessmentPredictionComponent> getPrediction() { 1564 if (this.prediction == null) 1565 this.prediction = new ArrayList<RiskAssessmentPredictionComponent>(); 1566 return this.prediction; 1567 } 1568 1569 /** 1570 * @return Returns a reference to <code>this</code> for easy method chaining 1571 */ 1572 public RiskAssessment setPrediction(List<RiskAssessmentPredictionComponent> thePrediction) { 1573 this.prediction = thePrediction; 1574 return this; 1575 } 1576 1577 public boolean hasPrediction() { 1578 if (this.prediction == null) 1579 return false; 1580 for (RiskAssessmentPredictionComponent item : this.prediction) 1581 if (!item.isEmpty()) 1582 return true; 1583 return false; 1584 } 1585 1586 public RiskAssessmentPredictionComponent addPrediction() { //3 1587 RiskAssessmentPredictionComponent t = new RiskAssessmentPredictionComponent(); 1588 if (this.prediction == null) 1589 this.prediction = new ArrayList<RiskAssessmentPredictionComponent>(); 1590 this.prediction.add(t); 1591 return t; 1592 } 1593 1594 public RiskAssessment addPrediction(RiskAssessmentPredictionComponent t) { //3 1595 if (t == null) 1596 return this; 1597 if (this.prediction == null) 1598 this.prediction = new ArrayList<RiskAssessmentPredictionComponent>(); 1599 this.prediction.add(t); 1600 return this; 1601 } 1602 1603 /** 1604 * @return The first repetition of repeating field {@link #prediction}, creating it if it does not already exist 1605 */ 1606 public RiskAssessmentPredictionComponent getPredictionFirstRep() { 1607 if (getPrediction().isEmpty()) { 1608 addPrediction(); 1609 } 1610 return getPrediction().get(0); 1611 } 1612 1613 /** 1614 * @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 1615 */ 1616 public StringType getMitigationElement() { 1617 if (this.mitigation == null) 1618 if (Configuration.errorOnAutoCreate()) 1619 throw new Error("Attempt to auto-create RiskAssessment.mitigation"); 1620 else if (Configuration.doAutoCreate()) 1621 this.mitigation = new StringType(); // bb 1622 return this.mitigation; 1623 } 1624 1625 public boolean hasMitigationElement() { 1626 return this.mitigation != null && !this.mitigation.isEmpty(); 1627 } 1628 1629 public boolean hasMitigation() { 1630 return this.mitigation != null && !this.mitigation.isEmpty(); 1631 } 1632 1633 /** 1634 * @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 1635 */ 1636 public RiskAssessment setMitigationElement(StringType value) { 1637 this.mitigation = value; 1638 return this; 1639 } 1640 1641 /** 1642 * @return A description of the steps that might be taken to reduce the identified risk(s). 1643 */ 1644 public String getMitigation() { 1645 return this.mitigation == null ? null : this.mitigation.getValue(); 1646 } 1647 1648 /** 1649 * @param value A description of the steps that might be taken to reduce the identified risk(s). 1650 */ 1651 public RiskAssessment setMitigation(String value) { 1652 if (Utilities.noString(value)) 1653 this.mitigation = null; 1654 else { 1655 if (this.mitigation == null) 1656 this.mitigation = new StringType(); 1657 this.mitigation.setValue(value); 1658 } 1659 return this; 1660 } 1661 1662 /** 1663 * @return {@link #note} (Additional comments about the risk assessment.) 1664 */ 1665 public List<Annotation> getNote() { 1666 if (this.note == null) 1667 this.note = new ArrayList<Annotation>(); 1668 return this.note; 1669 } 1670 1671 /** 1672 * @return Returns a reference to <code>this</code> for easy method chaining 1673 */ 1674 public RiskAssessment setNote(List<Annotation> theNote) { 1675 this.note = theNote; 1676 return this; 1677 } 1678 1679 public boolean hasNote() { 1680 if (this.note == null) 1681 return false; 1682 for (Annotation item : this.note) 1683 if (!item.isEmpty()) 1684 return true; 1685 return false; 1686 } 1687 1688 public Annotation addNote() { //3 1689 Annotation t = new Annotation(); 1690 if (this.note == null) 1691 this.note = new ArrayList<Annotation>(); 1692 this.note.add(t); 1693 return t; 1694 } 1695 1696 public RiskAssessment addNote(Annotation t) { //3 1697 if (t == null) 1698 return this; 1699 if (this.note == null) 1700 this.note = new ArrayList<Annotation>(); 1701 this.note.add(t); 1702 return this; 1703 } 1704 1705 /** 1706 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist 1707 */ 1708 public Annotation getNoteFirstRep() { 1709 if (getNote().isEmpty()) { 1710 addNote(); 1711 } 1712 return getNote().get(0); 1713 } 1714 1715 protected void listChildren(List<Property> children) { 1716 super.listChildren(children); 1717 children.add(new Property("identifier", "Identifier", "Business identifier assigned to the risk assessment.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1718 children.add(new Property("basedOn", "Reference(Any)", "A reference to the request that is fulfilled by this risk assessment.", 0, 1, basedOn)); 1719 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)); 1720 children.add(new Property("status", "code", "The status of the RiskAssessment, using the same statuses as an Observation.", 0, 1, status)); 1721 children.add(new Property("method", "CodeableConcept", "The algorithm, process or mechanism used to evaluate the risk.", 0, 1, method)); 1722 children.add(new Property("code", "CodeableConcept", "The type of the risk assessment performed.", 0, 1, code)); 1723 children.add(new Property("subject", "Reference(Patient|Group)", "The patient or group the risk assessment applies to.", 0, 1, subject)); 1724 children.add(new Property("encounter", "Reference(Encounter)", "The encounter where the assessment was performed.", 0, 1, encounter)); 1725 children.add(new Property("occurrence[x]", "dateTime|Period", "The date (and possibly time) the risk assessment was performed.", 0, 1, occurrence)); 1726 children.add(new Property("condition", "Reference(Condition)", "For assessments or prognosis specific to a particular condition, indicates the condition being assessed.", 0, 1, condition)); 1727 children.add(new Property("performer", "Reference(Practitioner|PractitionerRole|Device)", "The provider or software application that performed the assessment.", 0, 1, performer)); 1728 children.add(new Property("reasonCode", "CodeableConcept", "The reason the risk assessment was performed.", 0, java.lang.Integer.MAX_VALUE, reasonCode)); 1729 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)); 1730 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)); 1731 children.add(new Property("prediction", "", "Describes the expected outcome for the subject.", 0, java.lang.Integer.MAX_VALUE, prediction)); 1732 children.add(new Property("mitigation", "string", "A description of the steps that might be taken to reduce the identified risk(s).", 0, 1, mitigation)); 1733 children.add(new Property("note", "Annotation", "Additional comments about the risk assessment.", 0, java.lang.Integer.MAX_VALUE, note)); 1734 } 1735 1736 @Override 1737 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1738 switch (_hash) { 1739 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Business identifier assigned to the risk assessment.", 0, java.lang.Integer.MAX_VALUE, identifier); 1740 case -332612366: /*basedOn*/ return new Property("basedOn", "Reference(Any)", "A reference to the request that is fulfilled by this risk assessment.", 0, 1, basedOn); 1741 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); 1742 case -892481550: /*status*/ return new Property("status", "code", "The status of the RiskAssessment, using the same statuses as an Observation.", 0, 1, status); 1743 case -1077554975: /*method*/ return new Property("method", "CodeableConcept", "The algorithm, process or mechanism used to evaluate the risk.", 0, 1, method); 1744 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "The type of the risk assessment performed.", 0, 1, code); 1745 case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group)", "The patient or group the risk assessment applies to.", 0, 1, subject); 1746 case 1524132147: /*encounter*/ return new Property("encounter", "Reference(Encounter)", "The encounter where the assessment was performed.", 0, 1, encounter); 1747 case -2022646513: /*occurrence[x]*/ return new Property("occurrence[x]", "dateTime|Period", "The date (and possibly time) the risk assessment was performed.", 0, 1, occurrence); 1748 case 1687874001: /*occurrence*/ return new Property("occurrence[x]", "dateTime|Period", "The date (and possibly time) the risk assessment was performed.", 0, 1, occurrence); 1749 case -298443636: /*occurrenceDateTime*/ return new Property("occurrence[x]", "dateTime|Period", "The date (and possibly time) the risk assessment was performed.", 0, 1, occurrence); 1750 case 1397156594: /*occurrencePeriod*/ return new Property("occurrence[x]", "dateTime|Period", "The date (and possibly time) the risk assessment was performed.", 0, 1, occurrence); 1751 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); 1752 case 481140686: /*performer*/ return new Property("performer", "Reference(Practitioner|PractitionerRole|Device)", "The provider or software application that performed the assessment.", 0, 1, performer); 1753 case 722137681: /*reasonCode*/ return new Property("reasonCode", "CodeableConcept", "The reason the risk assessment was performed.", 0, java.lang.Integer.MAX_VALUE, reasonCode); 1754 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); 1755 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); 1756 case 1161234575: /*prediction*/ return new Property("prediction", "", "Describes the expected outcome for the subject.", 0, java.lang.Integer.MAX_VALUE, prediction); 1757 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); 1758 case 3387378: /*note*/ return new Property("note", "Annotation", "Additional comments about the risk assessment.", 0, java.lang.Integer.MAX_VALUE, note); 1759 default: return super.getNamedProperty(_hash, _name, _checkValid); 1760 } 1761 1762 } 1763 1764 @Override 1765 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1766 switch (hash) { 1767 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1768 case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : new Base[] {this.basedOn}; // Reference 1769 case -995424086: /*parent*/ return this.parent == null ? new Base[0] : new Base[] {this.parent}; // Reference 1770 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<RiskAssessmentStatus> 1771 case -1077554975: /*method*/ return this.method == null ? new Base[0] : new Base[] {this.method}; // CodeableConcept 1772 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 1773 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 1774 case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference 1775 case 1687874001: /*occurrence*/ return this.occurrence == null ? new Base[0] : new Base[] {this.occurrence}; // Type 1776 case -861311717: /*condition*/ return this.condition == null ? new Base[0] : new Base[] {this.condition}; // Reference 1777 case 481140686: /*performer*/ return this.performer == null ? new Base[0] : new Base[] {this.performer}; // Reference 1778 case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : this.reasonCode.toArray(new Base[this.reasonCode.size()]); // CodeableConcept 1779 case -1146218137: /*reasonReference*/ return this.reasonReference == null ? new Base[0] : this.reasonReference.toArray(new Base[this.reasonReference.size()]); // Reference 1780 case 93508670: /*basis*/ return this.basis == null ? new Base[0] : this.basis.toArray(new Base[this.basis.size()]); // Reference 1781 case 1161234575: /*prediction*/ return this.prediction == null ? new Base[0] : this.prediction.toArray(new Base[this.prediction.size()]); // RiskAssessmentPredictionComponent 1782 case 1293793087: /*mitigation*/ return this.mitigation == null ? new Base[0] : new Base[] {this.mitigation}; // StringType 1783 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 1784 default: return super.getProperty(hash, name, checkValid); 1785 } 1786 1787 } 1788 1789 @Override 1790 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1791 switch (hash) { 1792 case -1618432855: // identifier 1793 this.getIdentifier().add(castToIdentifier(value)); // Identifier 1794 return value; 1795 case -332612366: // basedOn 1796 this.basedOn = castToReference(value); // Reference 1797 return value; 1798 case -995424086: // parent 1799 this.parent = castToReference(value); // Reference 1800 return value; 1801 case -892481550: // status 1802 value = new RiskAssessmentStatusEnumFactory().fromType(castToCode(value)); 1803 this.status = (Enumeration) value; // Enumeration<RiskAssessmentStatus> 1804 return value; 1805 case -1077554975: // method 1806 this.method = castToCodeableConcept(value); // CodeableConcept 1807 return value; 1808 case 3059181: // code 1809 this.code = castToCodeableConcept(value); // CodeableConcept 1810 return value; 1811 case -1867885268: // subject 1812 this.subject = castToReference(value); // Reference 1813 return value; 1814 case 1524132147: // encounter 1815 this.encounter = castToReference(value); // Reference 1816 return value; 1817 case 1687874001: // occurrence 1818 this.occurrence = castToType(value); // Type 1819 return value; 1820 case -861311717: // condition 1821 this.condition = castToReference(value); // Reference 1822 return value; 1823 case 481140686: // performer 1824 this.performer = castToReference(value); // Reference 1825 return value; 1826 case 722137681: // reasonCode 1827 this.getReasonCode().add(castToCodeableConcept(value)); // CodeableConcept 1828 return value; 1829 case -1146218137: // reasonReference 1830 this.getReasonReference().add(castToReference(value)); // Reference 1831 return value; 1832 case 93508670: // basis 1833 this.getBasis().add(castToReference(value)); // Reference 1834 return value; 1835 case 1161234575: // prediction 1836 this.getPrediction().add((RiskAssessmentPredictionComponent) value); // RiskAssessmentPredictionComponent 1837 return value; 1838 case 1293793087: // mitigation 1839 this.mitigation = castToString(value); // StringType 1840 return value; 1841 case 3387378: // note 1842 this.getNote().add(castToAnnotation(value)); // Annotation 1843 return value; 1844 default: return super.setProperty(hash, name, value); 1845 } 1846 1847 } 1848 1849 @Override 1850 public Base setProperty(String name, Base value) throws FHIRException { 1851 if (name.equals("identifier")) { 1852 this.getIdentifier().add(castToIdentifier(value)); 1853 } else if (name.equals("basedOn")) { 1854 this.basedOn = castToReference(value); // Reference 1855 } else if (name.equals("parent")) { 1856 this.parent = castToReference(value); // Reference 1857 } else if (name.equals("status")) { 1858 value = new RiskAssessmentStatusEnumFactory().fromType(castToCode(value)); 1859 this.status = (Enumeration) value; // Enumeration<RiskAssessmentStatus> 1860 } else if (name.equals("method")) { 1861 this.method = castToCodeableConcept(value); // CodeableConcept 1862 } else if (name.equals("code")) { 1863 this.code = castToCodeableConcept(value); // CodeableConcept 1864 } else if (name.equals("subject")) { 1865 this.subject = castToReference(value); // Reference 1866 } else if (name.equals("encounter")) { 1867 this.encounter = castToReference(value); // Reference 1868 } else if (name.equals("occurrence[x]")) { 1869 this.occurrence = castToType(value); // Type 1870 } else if (name.equals("condition")) { 1871 this.condition = castToReference(value); // Reference 1872 } else if (name.equals("performer")) { 1873 this.performer = castToReference(value); // Reference 1874 } else if (name.equals("reasonCode")) { 1875 this.getReasonCode().add(castToCodeableConcept(value)); 1876 } else if (name.equals("reasonReference")) { 1877 this.getReasonReference().add(castToReference(value)); 1878 } else if (name.equals("basis")) { 1879 this.getBasis().add(castToReference(value)); 1880 } else if (name.equals("prediction")) { 1881 this.getPrediction().add((RiskAssessmentPredictionComponent) value); 1882 } else if (name.equals("mitigation")) { 1883 this.mitigation = castToString(value); // StringType 1884 } else if (name.equals("note")) { 1885 this.getNote().add(castToAnnotation(value)); 1886 } else 1887 return super.setProperty(name, value); 1888 return value; 1889 } 1890 1891 @Override 1892 public Base makeProperty(int hash, String name) throws FHIRException { 1893 switch (hash) { 1894 case -1618432855: return addIdentifier(); 1895 case -332612366: return getBasedOn(); 1896 case -995424086: return getParent(); 1897 case -892481550: return getStatusElement(); 1898 case -1077554975: return getMethod(); 1899 case 3059181: return getCode(); 1900 case -1867885268: return getSubject(); 1901 case 1524132147: return getEncounter(); 1902 case -2022646513: return getOccurrence(); 1903 case 1687874001: return getOccurrence(); 1904 case -861311717: return getCondition(); 1905 case 481140686: return getPerformer(); 1906 case 722137681: return addReasonCode(); 1907 case -1146218137: return addReasonReference(); 1908 case 93508670: return addBasis(); 1909 case 1161234575: return addPrediction(); 1910 case 1293793087: return getMitigationElement(); 1911 case 3387378: return addNote(); 1912 default: return super.makeProperty(hash, name); 1913 } 1914 1915 } 1916 1917 @Override 1918 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1919 switch (hash) { 1920 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1921 case -332612366: /*basedOn*/ return new String[] {"Reference"}; 1922 case -995424086: /*parent*/ return new String[] {"Reference"}; 1923 case -892481550: /*status*/ return new String[] {"code"}; 1924 case -1077554975: /*method*/ return new String[] {"CodeableConcept"}; 1925 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 1926 case -1867885268: /*subject*/ return new String[] {"Reference"}; 1927 case 1524132147: /*encounter*/ return new String[] {"Reference"}; 1928 case 1687874001: /*occurrence*/ return new String[] {"dateTime", "Period"}; 1929 case -861311717: /*condition*/ return new String[] {"Reference"}; 1930 case 481140686: /*performer*/ return new String[] {"Reference"}; 1931 case 722137681: /*reasonCode*/ return new String[] {"CodeableConcept"}; 1932 case -1146218137: /*reasonReference*/ return new String[] {"Reference"}; 1933 case 93508670: /*basis*/ return new String[] {"Reference"}; 1934 case 1161234575: /*prediction*/ return new String[] {}; 1935 case 1293793087: /*mitigation*/ return new String[] {"string"}; 1936 case 3387378: /*note*/ return new String[] {"Annotation"}; 1937 default: return super.getTypesForProperty(hash, name); 1938 } 1939 1940 } 1941 1942 @Override 1943 public Base addChild(String name) throws FHIRException { 1944 if (name.equals("identifier")) { 1945 return addIdentifier(); 1946 } 1947 else if (name.equals("basedOn")) { 1948 this.basedOn = new Reference(); 1949 return this.basedOn; 1950 } 1951 else if (name.equals("parent")) { 1952 this.parent = new Reference(); 1953 return this.parent; 1954 } 1955 else if (name.equals("status")) { 1956 throw new FHIRException("Cannot call addChild on a primitive type RiskAssessment.status"); 1957 } 1958 else if (name.equals("method")) { 1959 this.method = new CodeableConcept(); 1960 return this.method; 1961 } 1962 else if (name.equals("code")) { 1963 this.code = new CodeableConcept(); 1964 return this.code; 1965 } 1966 else if (name.equals("subject")) { 1967 this.subject = new Reference(); 1968 return this.subject; 1969 } 1970 else if (name.equals("encounter")) { 1971 this.encounter = new Reference(); 1972 return this.encounter; 1973 } 1974 else if (name.equals("occurrenceDateTime")) { 1975 this.occurrence = new DateTimeType(); 1976 return this.occurrence; 1977 } 1978 else if (name.equals("occurrencePeriod")) { 1979 this.occurrence = new Period(); 1980 return this.occurrence; 1981 } 1982 else if (name.equals("condition")) { 1983 this.condition = new Reference(); 1984 return this.condition; 1985 } 1986 else if (name.equals("performer")) { 1987 this.performer = new Reference(); 1988 return this.performer; 1989 } 1990 else if (name.equals("reasonCode")) { 1991 return addReasonCode(); 1992 } 1993 else if (name.equals("reasonReference")) { 1994 return addReasonReference(); 1995 } 1996 else if (name.equals("basis")) { 1997 return addBasis(); 1998 } 1999 else if (name.equals("prediction")) { 2000 return addPrediction(); 2001 } 2002 else if (name.equals("mitigation")) { 2003 throw new FHIRException("Cannot call addChild on a primitive type RiskAssessment.mitigation"); 2004 } 2005 else if (name.equals("note")) { 2006 return addNote(); 2007 } 2008 else 2009 return super.addChild(name); 2010 } 2011 2012 public String fhirType() { 2013 return "RiskAssessment"; 2014 2015 } 2016 2017 public RiskAssessment copy() { 2018 RiskAssessment dst = new RiskAssessment(); 2019 copyValues(dst); 2020 if (identifier != null) { 2021 dst.identifier = new ArrayList<Identifier>(); 2022 for (Identifier i : identifier) 2023 dst.identifier.add(i.copy()); 2024 }; 2025 dst.basedOn = basedOn == null ? null : basedOn.copy(); 2026 dst.parent = parent == null ? null : parent.copy(); 2027 dst.status = status == null ? null : status.copy(); 2028 dst.method = method == null ? null : method.copy(); 2029 dst.code = code == null ? null : code.copy(); 2030 dst.subject = subject == null ? null : subject.copy(); 2031 dst.encounter = encounter == null ? null : encounter.copy(); 2032 dst.occurrence = occurrence == null ? null : occurrence.copy(); 2033 dst.condition = condition == null ? null : condition.copy(); 2034 dst.performer = performer == null ? null : performer.copy(); 2035 if (reasonCode != null) { 2036 dst.reasonCode = new ArrayList<CodeableConcept>(); 2037 for (CodeableConcept i : reasonCode) 2038 dst.reasonCode.add(i.copy()); 2039 }; 2040 if (reasonReference != null) { 2041 dst.reasonReference = new ArrayList<Reference>(); 2042 for (Reference i : reasonReference) 2043 dst.reasonReference.add(i.copy()); 2044 }; 2045 if (basis != null) { 2046 dst.basis = new ArrayList<Reference>(); 2047 for (Reference i : basis) 2048 dst.basis.add(i.copy()); 2049 }; 2050 if (prediction != null) { 2051 dst.prediction = new ArrayList<RiskAssessmentPredictionComponent>(); 2052 for (RiskAssessmentPredictionComponent i : prediction) 2053 dst.prediction.add(i.copy()); 2054 }; 2055 dst.mitigation = mitigation == null ? null : mitigation.copy(); 2056 if (note != null) { 2057 dst.note = new ArrayList<Annotation>(); 2058 for (Annotation i : note) 2059 dst.note.add(i.copy()); 2060 }; 2061 return dst; 2062 } 2063 2064 protected RiskAssessment typedCopy() { 2065 return copy(); 2066 } 2067 2068 @Override 2069 public boolean equalsDeep(Base other_) { 2070 if (!super.equalsDeep(other_)) 2071 return false; 2072 if (!(other_ instanceof RiskAssessment)) 2073 return false; 2074 RiskAssessment o = (RiskAssessment) other_; 2075 return compareDeep(identifier, o.identifier, true) && compareDeep(basedOn, o.basedOn, true) && compareDeep(parent, o.parent, true) 2076 && compareDeep(status, o.status, true) && compareDeep(method, o.method, true) && compareDeep(code, o.code, true) 2077 && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true) && compareDeep(occurrence, o.occurrence, true) 2078 && compareDeep(condition, o.condition, true) && compareDeep(performer, o.performer, true) && compareDeep(reasonCode, o.reasonCode, true) 2079 && compareDeep(reasonReference, o.reasonReference, true) && compareDeep(basis, o.basis, true) && compareDeep(prediction, o.prediction, true) 2080 && compareDeep(mitigation, o.mitigation, true) && compareDeep(note, o.note, true); 2081 } 2082 2083 @Override 2084 public boolean equalsShallow(Base other_) { 2085 if (!super.equalsShallow(other_)) 2086 return false; 2087 if (!(other_ instanceof RiskAssessment)) 2088 return false; 2089 RiskAssessment o = (RiskAssessment) other_; 2090 return compareValues(status, o.status, true) && compareValues(mitigation, o.mitigation, true); 2091 } 2092 2093 public boolean isEmpty() { 2094 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, basedOn, parent 2095 , status, method, code, subject, encounter, occurrence, condition, performer 2096 , reasonCode, reasonReference, basis, prediction, mitigation, note); 2097 } 2098 2099 @Override 2100 public ResourceType getResourceType() { 2101 return ResourceType.RiskAssessment; 2102 } 2103 2104 /** 2105 * Search parameter: <b>date</b> 2106 * <p> 2107 * Description: <b>When was assessment made?</b><br> 2108 * Type: <b>date</b><br> 2109 * Path: <b>RiskAssessment.occurrenceDateTime</b><br> 2110 * </p> 2111 */ 2112 @SearchParamDefinition(name="date", path="(RiskAssessment.occurrence as dateTime)", description="When was assessment made?", type="date" ) 2113 public static final String SP_DATE = "date"; 2114 /** 2115 * <b>Fluent Client</b> search parameter constant for <b>date</b> 2116 * <p> 2117 * Description: <b>When was assessment made?</b><br> 2118 * Type: <b>date</b><br> 2119 * Path: <b>RiskAssessment.occurrenceDateTime</b><br> 2120 * </p> 2121 */ 2122 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 2123 2124 /** 2125 * Search parameter: <b>identifier</b> 2126 * <p> 2127 * Description: <b>Unique identifier for the assessment</b><br> 2128 * Type: <b>token</b><br> 2129 * Path: <b>RiskAssessment.identifier</b><br> 2130 * </p> 2131 */ 2132 @SearchParamDefinition(name="identifier", path="RiskAssessment.identifier", description="Unique identifier for the assessment", type="token" ) 2133 public static final String SP_IDENTIFIER = "identifier"; 2134 /** 2135 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 2136 * <p> 2137 * Description: <b>Unique identifier for the assessment</b><br> 2138 * Type: <b>token</b><br> 2139 * Path: <b>RiskAssessment.identifier</b><br> 2140 * </p> 2141 */ 2142 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 2143 2144 /** 2145 * Search parameter: <b>condition</b> 2146 * <p> 2147 * Description: <b>Condition assessed</b><br> 2148 * Type: <b>reference</b><br> 2149 * Path: <b>RiskAssessment.condition</b><br> 2150 * </p> 2151 */ 2152 @SearchParamDefinition(name="condition", path="RiskAssessment.condition", description="Condition assessed", type="reference", target={Condition.class } ) 2153 public static final String SP_CONDITION = "condition"; 2154 /** 2155 * <b>Fluent Client</b> search parameter constant for <b>condition</b> 2156 * <p> 2157 * Description: <b>Condition assessed</b><br> 2158 * Type: <b>reference</b><br> 2159 * Path: <b>RiskAssessment.condition</b><br> 2160 * </p> 2161 */ 2162 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONDITION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CONDITION); 2163 2164/** 2165 * Constant for fluent queries to be used to add include statements. Specifies 2166 * the path value of "<b>RiskAssessment:condition</b>". 2167 */ 2168 public static final ca.uhn.fhir.model.api.Include INCLUDE_CONDITION = new ca.uhn.fhir.model.api.Include("RiskAssessment:condition").toLocked(); 2169 2170 /** 2171 * Search parameter: <b>performer</b> 2172 * <p> 2173 * Description: <b>Who did assessment?</b><br> 2174 * Type: <b>reference</b><br> 2175 * Path: <b>RiskAssessment.performer</b><br> 2176 * </p> 2177 */ 2178 @SearchParamDefinition(name="performer", path="RiskAssessment.performer", description="Who did assessment?", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Device.class, Practitioner.class, PractitionerRole.class } ) 2179 public static final String SP_PERFORMER = "performer"; 2180 /** 2181 * <b>Fluent Client</b> search parameter constant for <b>performer</b> 2182 * <p> 2183 * Description: <b>Who did assessment?</b><br> 2184 * Type: <b>reference</b><br> 2185 * Path: <b>RiskAssessment.performer</b><br> 2186 * </p> 2187 */ 2188 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PERFORMER); 2189 2190/** 2191 * Constant for fluent queries to be used to add include statements. Specifies 2192 * the path value of "<b>RiskAssessment:performer</b>". 2193 */ 2194 public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER = new ca.uhn.fhir.model.api.Include("RiskAssessment:performer").toLocked(); 2195 2196 /** 2197 * Search parameter: <b>method</b> 2198 * <p> 2199 * Description: <b>Evaluation mechanism</b><br> 2200 * Type: <b>token</b><br> 2201 * Path: <b>RiskAssessment.method</b><br> 2202 * </p> 2203 */ 2204 @SearchParamDefinition(name="method", path="RiskAssessment.method", description="Evaluation mechanism", type="token" ) 2205 public static final String SP_METHOD = "method"; 2206 /** 2207 * <b>Fluent Client</b> search parameter constant for <b>method</b> 2208 * <p> 2209 * Description: <b>Evaluation mechanism</b><br> 2210 * Type: <b>token</b><br> 2211 * Path: <b>RiskAssessment.method</b><br> 2212 * </p> 2213 */ 2214 public static final ca.uhn.fhir.rest.gclient.TokenClientParam METHOD = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_METHOD); 2215 2216 /** 2217 * Search parameter: <b>subject</b> 2218 * <p> 2219 * Description: <b>Who/what does assessment apply to?</b><br> 2220 * Type: <b>reference</b><br> 2221 * Path: <b>RiskAssessment.subject</b><br> 2222 * </p> 2223 */ 2224 @SearchParamDefinition(name="subject", path="RiskAssessment.subject", description="Who/what does assessment apply to?", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Group.class, Patient.class } ) 2225 public static final String SP_SUBJECT = "subject"; 2226 /** 2227 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 2228 * <p> 2229 * Description: <b>Who/what does assessment apply to?</b><br> 2230 * Type: <b>reference</b><br> 2231 * Path: <b>RiskAssessment.subject</b><br> 2232 * </p> 2233 */ 2234 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 2235 2236/** 2237 * Constant for fluent queries to be used to add include statements. Specifies 2238 * the path value of "<b>RiskAssessment:subject</b>". 2239 */ 2240 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("RiskAssessment:subject").toLocked(); 2241 2242 /** 2243 * Search parameter: <b>patient</b> 2244 * <p> 2245 * Description: <b>Who/what does assessment apply to?</b><br> 2246 * Type: <b>reference</b><br> 2247 * Path: <b>RiskAssessment.subject</b><br> 2248 * </p> 2249 */ 2250 @SearchParamDefinition(name="patient", path="RiskAssessment.subject.where(resolve() is Patient)", description="Who/what does assessment apply to?", type="reference", target={Patient.class } ) 2251 public static final String SP_PATIENT = "patient"; 2252 /** 2253 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 2254 * <p> 2255 * Description: <b>Who/what does assessment apply to?</b><br> 2256 * Type: <b>reference</b><br> 2257 * Path: <b>RiskAssessment.subject</b><br> 2258 * </p> 2259 */ 2260 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 2261 2262/** 2263 * Constant for fluent queries to be used to add include statements. Specifies 2264 * the path value of "<b>RiskAssessment:patient</b>". 2265 */ 2266 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("RiskAssessment:patient").toLocked(); 2267 2268 /** 2269 * Search parameter: <b>probability</b> 2270 * <p> 2271 * Description: <b>Likelihood of specified outcome</b><br> 2272 * Type: <b>number</b><br> 2273 * Path: <b>RiskAssessment.prediction.probability[x]</b><br> 2274 * </p> 2275 */ 2276 @SearchParamDefinition(name="probability", path="RiskAssessment.prediction.probability", description="Likelihood of specified outcome", type="number" ) 2277 public static final String SP_PROBABILITY = "probability"; 2278 /** 2279 * <b>Fluent Client</b> search parameter constant for <b>probability</b> 2280 * <p> 2281 * Description: <b>Likelihood of specified outcome</b><br> 2282 * Type: <b>number</b><br> 2283 * Path: <b>RiskAssessment.prediction.probability[x]</b><br> 2284 * </p> 2285 */ 2286 public static final ca.uhn.fhir.rest.gclient.NumberClientParam PROBABILITY = new ca.uhn.fhir.rest.gclient.NumberClientParam(SP_PROBABILITY); 2287 2288 /** 2289 * Search parameter: <b>risk</b> 2290 * <p> 2291 * Description: <b>Likelihood of specified outcome as a qualitative value</b><br> 2292 * Type: <b>token</b><br> 2293 * Path: <b>RiskAssessment.prediction.qualitativeRisk</b><br> 2294 * </p> 2295 */ 2296 @SearchParamDefinition(name="risk", path="RiskAssessment.prediction.qualitativeRisk", description="Likelihood of specified outcome as a qualitative value", type="token" ) 2297 public static final String SP_RISK = "risk"; 2298 /** 2299 * <b>Fluent Client</b> search parameter constant for <b>risk</b> 2300 * <p> 2301 * Description: <b>Likelihood of specified outcome as a qualitative value</b><br> 2302 * Type: <b>token</b><br> 2303 * Path: <b>RiskAssessment.prediction.qualitativeRisk</b><br> 2304 * </p> 2305 */ 2306 public static final ca.uhn.fhir.rest.gclient.TokenClientParam RISK = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_RISK); 2307 2308 /** 2309 * Search parameter: <b>encounter</b> 2310 * <p> 2311 * Description: <b>Where was assessment performed?</b><br> 2312 * Type: <b>reference</b><br> 2313 * Path: <b>RiskAssessment.encounter</b><br> 2314 * </p> 2315 */ 2316 @SearchParamDefinition(name="encounter", path="RiskAssessment.encounter", description="Where was assessment performed?", type="reference", target={Encounter.class } ) 2317 public static final String SP_ENCOUNTER = "encounter"; 2318 /** 2319 * <b>Fluent Client</b> search parameter constant for <b>encounter</b> 2320 * <p> 2321 * Description: <b>Where was assessment performed?</b><br> 2322 * Type: <b>reference</b><br> 2323 * Path: <b>RiskAssessment.encounter</b><br> 2324 * </p> 2325 */ 2326 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER); 2327 2328/** 2329 * Constant for fluent queries to be used to add include statements. Specifies 2330 * the path value of "<b>RiskAssessment:encounter</b>". 2331 */ 2332 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("RiskAssessment:encounter").toLocked(); 2333 2334 2335} 2336