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