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