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