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