001package org.hl7.fhir.dstu2016may.model; 002 003import java.math.BigDecimal; 004 005/* 006 Copyright (c) 2011+, HL7, Inc. 007 All rights reserved. 008 009 Redistribution and use in source and binary forms, with or without modification, 010 are permitted provided that the following conditions are met: 011 012 * Redistributions of source code must retain the above copyright notice, this 013 list of conditions and the following disclaimer. 014 * Redistributions in binary form must reproduce the above copyright notice, 015 this list of conditions and the following disclaimer in the documentation 016 and/or other materials provided with the distribution. 017 * Neither the name of HL7 nor the names of its contributors may be used to 018 endorse or promote products derived from this software without specific 019 prior written permission. 020 021 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 022 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 023 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 024 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 025 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 026 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 027 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 028 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 029 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 030 POSSIBILITY OF SUCH DAMAGE. 031 032*/ 033 034// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0 035import java.util.ArrayList; 036import java.util.Date; 037import java.util.List; 038 039import org.hl7.fhir.exceptions.FHIRException; 040import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 041import org.hl7.fhir.utilities.Utilities; 042 043import ca.uhn.fhir.model.api.annotation.Block; 044import ca.uhn.fhir.model.api.annotation.Child; 045import ca.uhn.fhir.model.api.annotation.Description; 046import ca.uhn.fhir.model.api.annotation.ResourceDef; 047import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 048/** 049 * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome. 050 */ 051@ResourceDef(name="RiskAssessment", profile="http://hl7.org/fhir/Profile/RiskAssessment") 052public class RiskAssessment extends DomainResource { 053 054 @Block() 055 public static class RiskAssessmentPredictionComponent extends BackboneElement implements IBaseBackboneElement { 056 /** 057 * One of the potential outcomes for the patient (e.g. remission, death, a particular condition). 058 */ 059 @Child(name = "outcome", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 060 @Description(shortDefinition="Possible outcome for the subject", formalDefinition="One of the potential outcomes for the patient (e.g. remission, death, a particular condition)." ) 061 protected CodeableConcept outcome; 062 063 /** 064 * How likely is the outcome (in the specified timeframe). 065 */ 066 @Child(name = "probability", type = {DecimalType.class, Range.class, CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 067 @Description(shortDefinition="Likelihood of specified outcome", formalDefinition="How likely is the outcome (in the specified timeframe)." ) 068 protected Type probability; 069 070 /** 071 * 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.). 072 */ 073 @Child(name = "relativeRisk", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=false) 074 @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.)." ) 075 protected DecimalType relativeRisk; 076 077 /** 078 * Indicates the period of time or age range of the subject to which the specified probability applies. 079 */ 080 @Child(name = "when", type = {Period.class, Range.class}, order=4, min=0, max=1, modifier=false, summary=false) 081 @Description(shortDefinition="Timeframe or age range", formalDefinition="Indicates the period of time or age range of the subject to which the specified probability applies." ) 082 protected Type when; 083 084 /** 085 * Additional information explaining the basis for the prediction. 086 */ 087 @Child(name = "rationale", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) 088 @Description(shortDefinition="Explanation of prediction", formalDefinition="Additional information explaining the basis for the prediction." ) 089 protected StringType rationale; 090 091 private static final long serialVersionUID = 647967428L; 092 093 /** 094 * Constructor 095 */ 096 public RiskAssessmentPredictionComponent() { 097 super(); 098 } 099 100 /** 101 * Constructor 102 */ 103 public RiskAssessmentPredictionComponent(CodeableConcept outcome) { 104 super(); 105 this.outcome = outcome; 106 } 107 108 /** 109 * @return {@link #outcome} (One of the potential outcomes for the patient (e.g. remission, death, a particular condition).) 110 */ 111 public CodeableConcept getOutcome() { 112 if (this.outcome == null) 113 if (Configuration.errorOnAutoCreate()) 114 throw new Error("Attempt to auto-create RiskAssessmentPredictionComponent.outcome"); 115 else if (Configuration.doAutoCreate()) 116 this.outcome = new CodeableConcept(); // cc 117 return this.outcome; 118 } 119 120 public boolean hasOutcome() { 121 return this.outcome != null && !this.outcome.isEmpty(); 122 } 123 124 /** 125 * @param value {@link #outcome} (One of the potential outcomes for the patient (e.g. remission, death, a particular condition).) 126 */ 127 public RiskAssessmentPredictionComponent setOutcome(CodeableConcept value) { 128 this.outcome = value; 129 return this; 130 } 131 132 /** 133 * @return {@link #probability} (How likely is the outcome (in the specified timeframe).) 134 */ 135 public Type getProbability() { 136 return this.probability; 137 } 138 139 /** 140 * @return {@link #probability} (How likely is the outcome (in the specified timeframe).) 141 */ 142 public DecimalType getProbabilityDecimalType() throws FHIRException { 143 if (!(this.probability instanceof DecimalType)) 144 throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.probability.getClass().getName()+" was encountered"); 145 return (DecimalType) this.probability; 146 } 147 148 public boolean hasProbabilityDecimalType() { 149 return this.probability instanceof DecimalType; 150 } 151 152 /** 153 * @return {@link #probability} (How likely is the outcome (in the specified timeframe).) 154 */ 155 public Range getProbabilityRange() throws FHIRException { 156 if (!(this.probability instanceof Range)) 157 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.probability.getClass().getName()+" was encountered"); 158 return (Range) this.probability; 159 } 160 161 public boolean hasProbabilityRange() { 162 return this.probability instanceof Range; 163 } 164 165 /** 166 * @return {@link #probability} (How likely is the outcome (in the specified timeframe).) 167 */ 168 public CodeableConcept getProbabilityCodeableConcept() throws FHIRException { 169 if (!(this.probability instanceof CodeableConcept)) 170 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.probability.getClass().getName()+" was encountered"); 171 return (CodeableConcept) this.probability; 172 } 173 174 public boolean hasProbabilityCodeableConcept() { 175 return this.probability instanceof CodeableConcept; 176 } 177 178 public boolean hasProbability() { 179 return this.probability != null && !this.probability.isEmpty(); 180 } 181 182 /** 183 * @param value {@link #probability} (How likely is the outcome (in the specified timeframe).) 184 */ 185 public RiskAssessmentPredictionComponent setProbability(Type value) { 186 this.probability = value; 187 return this; 188 } 189 190 /** 191 * @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 192 */ 193 public DecimalType getRelativeRiskElement() { 194 if (this.relativeRisk == null) 195 if (Configuration.errorOnAutoCreate()) 196 throw new Error("Attempt to auto-create RiskAssessmentPredictionComponent.relativeRisk"); 197 else if (Configuration.doAutoCreate()) 198 this.relativeRisk = new DecimalType(); // bb 199 return this.relativeRisk; 200 } 201 202 public boolean hasRelativeRiskElement() { 203 return this.relativeRisk != null && !this.relativeRisk.isEmpty(); 204 } 205 206 public boolean hasRelativeRisk() { 207 return this.relativeRisk != null && !this.relativeRisk.isEmpty(); 208 } 209 210 /** 211 * @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 212 */ 213 public RiskAssessmentPredictionComponent setRelativeRiskElement(DecimalType value) { 214 this.relativeRisk = value; 215 return this; 216 } 217 218 /** 219 * @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.). 220 */ 221 public BigDecimal getRelativeRisk() { 222 return this.relativeRisk == null ? null : this.relativeRisk.getValue(); 223 } 224 225 /** 226 * @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.). 227 */ 228 public RiskAssessmentPredictionComponent setRelativeRisk(BigDecimal value) { 229 if (value == null) 230 this.relativeRisk = null; 231 else { 232 if (this.relativeRisk == null) 233 this.relativeRisk = new DecimalType(); 234 this.relativeRisk.setValue(value); 235 } 236 return this; 237 } 238 239 /** 240 * @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.). 241 */ 242 public RiskAssessmentPredictionComponent setRelativeRisk(long value) { 243 this.relativeRisk = new DecimalType(); 244 this.relativeRisk.setValue(value); 245 return this; 246 } 247 248 /** 249 * @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.). 250 */ 251 public RiskAssessmentPredictionComponent setRelativeRisk(double value) { 252 this.relativeRisk = new DecimalType(); 253 this.relativeRisk.setValue(value); 254 return this; 255 } 256 257 /** 258 * @return {@link #when} (Indicates the period of time or age range of the subject to which the specified probability applies.) 259 */ 260 public Type getWhen() { 261 return this.when; 262 } 263 264 /** 265 * @return {@link #when} (Indicates the period of time or age range of the subject to which the specified probability applies.) 266 */ 267 public Period getWhenPeriod() throws FHIRException { 268 if (!(this.when instanceof Period)) 269 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.when.getClass().getName()+" was encountered"); 270 return (Period) this.when; 271 } 272 273 public boolean hasWhenPeriod() { 274 return this.when instanceof Period; 275 } 276 277 /** 278 * @return {@link #when} (Indicates the period of time or age range of the subject to which the specified probability applies.) 279 */ 280 public Range getWhenRange() throws FHIRException { 281 if (!(this.when instanceof Range)) 282 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.when.getClass().getName()+" was encountered"); 283 return (Range) this.when; 284 } 285 286 public boolean hasWhenRange() { 287 return this.when instanceof Range; 288 } 289 290 public boolean hasWhen() { 291 return this.when != null && !this.when.isEmpty(); 292 } 293 294 /** 295 * @param value {@link #when} (Indicates the period of time or age range of the subject to which the specified probability applies.) 296 */ 297 public RiskAssessmentPredictionComponent setWhen(Type value) { 298 this.when = value; 299 return this; 300 } 301 302 /** 303 * @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 304 */ 305 public StringType getRationaleElement() { 306 if (this.rationale == null) 307 if (Configuration.errorOnAutoCreate()) 308 throw new Error("Attempt to auto-create RiskAssessmentPredictionComponent.rationale"); 309 else if (Configuration.doAutoCreate()) 310 this.rationale = new StringType(); // bb 311 return this.rationale; 312 } 313 314 public boolean hasRationaleElement() { 315 return this.rationale != null && !this.rationale.isEmpty(); 316 } 317 318 public boolean hasRationale() { 319 return this.rationale != null && !this.rationale.isEmpty(); 320 } 321 322 /** 323 * @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 324 */ 325 public RiskAssessmentPredictionComponent setRationaleElement(StringType value) { 326 this.rationale = value; 327 return this; 328 } 329 330 /** 331 * @return Additional information explaining the basis for the prediction. 332 */ 333 public String getRationale() { 334 return this.rationale == null ? null : this.rationale.getValue(); 335 } 336 337 /** 338 * @param value Additional information explaining the basis for the prediction. 339 */ 340 public RiskAssessmentPredictionComponent setRationale(String value) { 341 if (Utilities.noString(value)) 342 this.rationale = null; 343 else { 344 if (this.rationale == null) 345 this.rationale = new StringType(); 346 this.rationale.setValue(value); 347 } 348 return this; 349 } 350 351 protected void listChildren(List<Property> childrenList) { 352 super.listChildren(childrenList); 353 childrenList.add(new Property("outcome", "CodeableConcept", "One of the potential outcomes for the patient (e.g. remission, death, a particular condition).", 0, java.lang.Integer.MAX_VALUE, outcome)); 354 childrenList.add(new Property("probability[x]", "decimal|Range|CodeableConcept", "How likely is the outcome (in the specified timeframe).", 0, java.lang.Integer.MAX_VALUE, probability)); 355 childrenList.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, java.lang.Integer.MAX_VALUE, relativeRisk)); 356 childrenList.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, java.lang.Integer.MAX_VALUE, when)); 357 childrenList.add(new Property("rationale", "string", "Additional information explaining the basis for the prediction.", 0, java.lang.Integer.MAX_VALUE, rationale)); 358 } 359 360 @Override 361 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 362 switch (hash) { 363 case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // CodeableConcept 364 case -1290561483: /*probability*/ return this.probability == null ? new Base[0] : new Base[] {this.probability}; // Type 365 case -70741061: /*relativeRisk*/ return this.relativeRisk == null ? new Base[0] : new Base[] {this.relativeRisk}; // DecimalType 366 case 3648314: /*when*/ return this.when == null ? new Base[0] : new Base[] {this.when}; // Type 367 case 345689335: /*rationale*/ return this.rationale == null ? new Base[0] : new Base[] {this.rationale}; // StringType 368 default: return super.getProperty(hash, name, checkValid); 369 } 370 371 } 372 373 @Override 374 public void setProperty(int hash, String name, Base value) throws FHIRException { 375 switch (hash) { 376 case -1106507950: // outcome 377 this.outcome = castToCodeableConcept(value); // CodeableConcept 378 break; 379 case -1290561483: // probability 380 this.probability = (Type) value; // Type 381 break; 382 case -70741061: // relativeRisk 383 this.relativeRisk = castToDecimal(value); // DecimalType 384 break; 385 case 3648314: // when 386 this.when = (Type) value; // Type 387 break; 388 case 345689335: // rationale 389 this.rationale = castToString(value); // StringType 390 break; 391 default: super.setProperty(hash, name, value); 392 } 393 394 } 395 396 @Override 397 public void setProperty(String name, Base value) throws FHIRException { 398 if (name.equals("outcome")) 399 this.outcome = castToCodeableConcept(value); // CodeableConcept 400 else if (name.equals("probability[x]")) 401 this.probability = (Type) value; // Type 402 else if (name.equals("relativeRisk")) 403 this.relativeRisk = castToDecimal(value); // DecimalType 404 else if (name.equals("when[x]")) 405 this.when = (Type) value; // Type 406 else if (name.equals("rationale")) 407 this.rationale = castToString(value); // StringType 408 else 409 super.setProperty(name, value); 410 } 411 412 @Override 413 public Base makeProperty(int hash, String name) throws FHIRException { 414 switch (hash) { 415 case -1106507950: return getOutcome(); // CodeableConcept 416 case 1430185003: return getProbability(); // Type 417 case -70741061: throw new FHIRException("Cannot make property relativeRisk as it is not a complex type"); // DecimalType 418 case 1312831238: return getWhen(); // Type 419 case 345689335: throw new FHIRException("Cannot make property rationale as it is not a complex type"); // StringType 420 default: return super.makeProperty(hash, name); 421 } 422 423 } 424 425 @Override 426 public Base addChild(String name) throws FHIRException { 427 if (name.equals("outcome")) { 428 this.outcome = new CodeableConcept(); 429 return this.outcome; 430 } 431 else if (name.equals("probabilityDecimal")) { 432 this.probability = new DecimalType(); 433 return this.probability; 434 } 435 else if (name.equals("probabilityRange")) { 436 this.probability = new Range(); 437 return this.probability; 438 } 439 else if (name.equals("probabilityCodeableConcept")) { 440 this.probability = new CodeableConcept(); 441 return this.probability; 442 } 443 else if (name.equals("relativeRisk")) { 444 throw new FHIRException("Cannot call addChild on a primitive type RiskAssessment.relativeRisk"); 445 } 446 else if (name.equals("whenPeriod")) { 447 this.when = new Period(); 448 return this.when; 449 } 450 else if (name.equals("whenRange")) { 451 this.when = new Range(); 452 return this.when; 453 } 454 else if (name.equals("rationale")) { 455 throw new FHIRException("Cannot call addChild on a primitive type RiskAssessment.rationale"); 456 } 457 else 458 return super.addChild(name); 459 } 460 461 public RiskAssessmentPredictionComponent copy() { 462 RiskAssessmentPredictionComponent dst = new RiskAssessmentPredictionComponent(); 463 copyValues(dst); 464 dst.outcome = outcome == null ? null : outcome.copy(); 465 dst.probability = probability == null ? null : probability.copy(); 466 dst.relativeRisk = relativeRisk == null ? null : relativeRisk.copy(); 467 dst.when = when == null ? null : when.copy(); 468 dst.rationale = rationale == null ? null : rationale.copy(); 469 return dst; 470 } 471 472 @Override 473 public boolean equalsDeep(Base other) { 474 if (!super.equalsDeep(other)) 475 return false; 476 if (!(other instanceof RiskAssessmentPredictionComponent)) 477 return false; 478 RiskAssessmentPredictionComponent o = (RiskAssessmentPredictionComponent) other; 479 return compareDeep(outcome, o.outcome, true) && compareDeep(probability, o.probability, true) && compareDeep(relativeRisk, o.relativeRisk, true) 480 && compareDeep(when, o.when, true) && compareDeep(rationale, o.rationale, true); 481 } 482 483 @Override 484 public boolean equalsShallow(Base other) { 485 if (!super.equalsShallow(other)) 486 return false; 487 if (!(other instanceof RiskAssessmentPredictionComponent)) 488 return false; 489 RiskAssessmentPredictionComponent o = (RiskAssessmentPredictionComponent) other; 490 return compareValues(relativeRisk, o.relativeRisk, true) && compareValues(rationale, o.rationale, true) 491 ; 492 } 493 494 public boolean isEmpty() { 495 return super.isEmpty() && (outcome == null || outcome.isEmpty()) && (probability == null || probability.isEmpty()) 496 && (relativeRisk == null || relativeRisk.isEmpty()) && (when == null || when.isEmpty()) && (rationale == null || rationale.isEmpty()) 497 ; 498 } 499 500 public String fhirType() { 501 return "RiskAssessment.prediction"; 502 503 } 504 505 } 506 507 /** 508 * The patient or group the risk assessment applies to. 509 */ 510 @Child(name = "subject", type = {Patient.class, Group.class}, order=0, min=0, max=1, modifier=false, summary=true) 511 @Description(shortDefinition="Who/what does assessment apply to?", formalDefinition="The patient or group the risk assessment applies to." ) 512 protected Reference subject; 513 514 /** 515 * The actual object that is the target of the reference (The patient or group the risk assessment applies to.) 516 */ 517 protected Resource subjectTarget; 518 519 /** 520 * The date (and possibly time) the risk assessment was performed. 521 */ 522 @Child(name = "date", type = {DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=true) 523 @Description(shortDefinition="When was assessment made?", formalDefinition="The date (and possibly time) the risk assessment was performed." ) 524 protected DateTimeType date; 525 526 /** 527 * For assessments or prognosis specific to a particular condition, indicates the condition being assessed. 528 */ 529 @Child(name = "condition", type = {Condition.class}, order=2, min=0, max=1, modifier=false, summary=true) 530 @Description(shortDefinition="Condition assessed", formalDefinition="For assessments or prognosis specific to a particular condition, indicates the condition being assessed." ) 531 protected Reference condition; 532 533 /** 534 * The actual object that is the target of the reference (For assessments or prognosis specific to a particular condition, indicates the condition being assessed.) 535 */ 536 protected Condition conditionTarget; 537 538 /** 539 * The encounter where the assessment was performed. 540 */ 541 @Child(name = "encounter", type = {Encounter.class}, order=3, min=0, max=1, modifier=false, summary=true) 542 @Description(shortDefinition="Where was assessment performed?", formalDefinition="The encounter where the assessment was performed." ) 543 protected Reference encounter; 544 545 /** 546 * The actual object that is the target of the reference (The encounter where the assessment was performed.) 547 */ 548 protected Encounter encounterTarget; 549 550 /** 551 * The provider or software application that performed the assessment. 552 */ 553 @Child(name = "performer", type = {Practitioner.class, Device.class}, order=4, min=0, max=1, modifier=false, summary=true) 554 @Description(shortDefinition="Who did assessment?", formalDefinition="The provider or software application that performed the assessment." ) 555 protected Reference performer; 556 557 /** 558 * The actual object that is the target of the reference (The provider or software application that performed the assessment.) 559 */ 560 protected Resource performerTarget; 561 562 /** 563 * Business identifier assigned to the risk assessment. 564 */ 565 @Child(name = "identifier", type = {Identifier.class}, order=5, min=0, max=1, modifier=false, summary=true) 566 @Description(shortDefinition="Unique identifier for the assessment", formalDefinition="Business identifier assigned to the risk assessment." ) 567 protected Identifier identifier; 568 569 /** 570 * The algorithm, process or mechanism used to evaluate the risk. 571 */ 572 @Child(name = "method", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true) 573 @Description(shortDefinition="Evaluation mechanism", formalDefinition="The algorithm, process or mechanism used to evaluate the risk." ) 574 protected CodeableConcept method; 575 576 /** 577 * Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.). 578 */ 579 @Child(name = "basis", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 580 @Description(shortDefinition="Information used in assessment", formalDefinition="Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.)." ) 581 protected List<Reference> basis; 582 /** 583 * The actual objects that are the target of the reference (Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.).) 584 */ 585 protected List<Resource> basisTarget; 586 587 588 /** 589 * Describes the expected outcome for the subject. 590 */ 591 @Child(name = "prediction", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 592 @Description(shortDefinition="Outcome predicted", formalDefinition="Describes the expected outcome for the subject." ) 593 protected List<RiskAssessmentPredictionComponent> prediction; 594 595 /** 596 * A description of the steps that might be taken to reduce the identified risk(s). 597 */ 598 @Child(name = "mitigation", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) 599 @Description(shortDefinition="How to reduce risk", formalDefinition="A description of the steps that might be taken to reduce the identified risk(s)." ) 600 protected StringType mitigation; 601 602 private static final long serialVersionUID = 724306293L; 603 604 /** 605 * Constructor 606 */ 607 public RiskAssessment() { 608 super(); 609 } 610 611 /** 612 * @return {@link #subject} (The patient or group the risk assessment applies to.) 613 */ 614 public Reference getSubject() { 615 if (this.subject == null) 616 if (Configuration.errorOnAutoCreate()) 617 throw new Error("Attempt to auto-create RiskAssessment.subject"); 618 else if (Configuration.doAutoCreate()) 619 this.subject = new Reference(); // cc 620 return this.subject; 621 } 622 623 public boolean hasSubject() { 624 return this.subject != null && !this.subject.isEmpty(); 625 } 626 627 /** 628 * @param value {@link #subject} (The patient or group the risk assessment applies to.) 629 */ 630 public RiskAssessment setSubject(Reference value) { 631 this.subject = value; 632 return this; 633 } 634 635 /** 636 * @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.) 637 */ 638 public Resource getSubjectTarget() { 639 return this.subjectTarget; 640 } 641 642 /** 643 * @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.) 644 */ 645 public RiskAssessment setSubjectTarget(Resource value) { 646 this.subjectTarget = value; 647 return this; 648 } 649 650 /** 651 * @return {@link #date} (The date (and possibly time) the risk assessment was performed.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 652 */ 653 public DateTimeType getDateElement() { 654 if (this.date == null) 655 if (Configuration.errorOnAutoCreate()) 656 throw new Error("Attempt to auto-create RiskAssessment.date"); 657 else if (Configuration.doAutoCreate()) 658 this.date = new DateTimeType(); // bb 659 return this.date; 660 } 661 662 public boolean hasDateElement() { 663 return this.date != null && !this.date.isEmpty(); 664 } 665 666 public boolean hasDate() { 667 return this.date != null && !this.date.isEmpty(); 668 } 669 670 /** 671 * @param value {@link #date} (The date (and possibly time) the risk assessment was performed.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 672 */ 673 public RiskAssessment setDateElement(DateTimeType value) { 674 this.date = value; 675 return this; 676 } 677 678 /** 679 * @return The date (and possibly time) the risk assessment was performed. 680 */ 681 public Date getDate() { 682 return this.date == null ? null : this.date.getValue(); 683 } 684 685 /** 686 * @param value The date (and possibly time) the risk assessment was performed. 687 */ 688 public RiskAssessment setDate(Date value) { 689 if (value == null) 690 this.date = null; 691 else { 692 if (this.date == null) 693 this.date = new DateTimeType(); 694 this.date.setValue(value); 695 } 696 return this; 697 } 698 699 /** 700 * @return {@link #condition} (For assessments or prognosis specific to a particular condition, indicates the condition being assessed.) 701 */ 702 public Reference getCondition() { 703 if (this.condition == null) 704 if (Configuration.errorOnAutoCreate()) 705 throw new Error("Attempt to auto-create RiskAssessment.condition"); 706 else if (Configuration.doAutoCreate()) 707 this.condition = new Reference(); // cc 708 return this.condition; 709 } 710 711 public boolean hasCondition() { 712 return this.condition != null && !this.condition.isEmpty(); 713 } 714 715 /** 716 * @param value {@link #condition} (For assessments or prognosis specific to a particular condition, indicates the condition being assessed.) 717 */ 718 public RiskAssessment setCondition(Reference value) { 719 this.condition = value; 720 return this; 721 } 722 723 /** 724 * @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.) 725 */ 726 public Condition getConditionTarget() { 727 if (this.conditionTarget == null) 728 if (Configuration.errorOnAutoCreate()) 729 throw new Error("Attempt to auto-create RiskAssessment.condition"); 730 else if (Configuration.doAutoCreate()) 731 this.conditionTarget = new Condition(); // aa 732 return this.conditionTarget; 733 } 734 735 /** 736 * @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.) 737 */ 738 public RiskAssessment setConditionTarget(Condition value) { 739 this.conditionTarget = value; 740 return this; 741 } 742 743 /** 744 * @return {@link #encounter} (The encounter where the assessment was performed.) 745 */ 746 public Reference getEncounter() { 747 if (this.encounter == null) 748 if (Configuration.errorOnAutoCreate()) 749 throw new Error("Attempt to auto-create RiskAssessment.encounter"); 750 else if (Configuration.doAutoCreate()) 751 this.encounter = new Reference(); // cc 752 return this.encounter; 753 } 754 755 public boolean hasEncounter() { 756 return this.encounter != null && !this.encounter.isEmpty(); 757 } 758 759 /** 760 * @param value {@link #encounter} (The encounter where the assessment was performed.) 761 */ 762 public RiskAssessment setEncounter(Reference value) { 763 this.encounter = value; 764 return this; 765 } 766 767 /** 768 * @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.) 769 */ 770 public Encounter getEncounterTarget() { 771 if (this.encounterTarget == null) 772 if (Configuration.errorOnAutoCreate()) 773 throw new Error("Attempt to auto-create RiskAssessment.encounter"); 774 else if (Configuration.doAutoCreate()) 775 this.encounterTarget = new Encounter(); // aa 776 return this.encounterTarget; 777 } 778 779 /** 780 * @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.) 781 */ 782 public RiskAssessment setEncounterTarget(Encounter value) { 783 this.encounterTarget = value; 784 return this; 785 } 786 787 /** 788 * @return {@link #performer} (The provider or software application that performed the assessment.) 789 */ 790 public Reference getPerformer() { 791 if (this.performer == null) 792 if (Configuration.errorOnAutoCreate()) 793 throw new Error("Attempt to auto-create RiskAssessment.performer"); 794 else if (Configuration.doAutoCreate()) 795 this.performer = new Reference(); // cc 796 return this.performer; 797 } 798 799 public boolean hasPerformer() { 800 return this.performer != null && !this.performer.isEmpty(); 801 } 802 803 /** 804 * @param value {@link #performer} (The provider or software application that performed the assessment.) 805 */ 806 public RiskAssessment setPerformer(Reference value) { 807 this.performer = value; 808 return this; 809 } 810 811 /** 812 * @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.) 813 */ 814 public Resource getPerformerTarget() { 815 return this.performerTarget; 816 } 817 818 /** 819 * @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.) 820 */ 821 public RiskAssessment setPerformerTarget(Resource value) { 822 this.performerTarget = value; 823 return this; 824 } 825 826 /** 827 * @return {@link #identifier} (Business identifier assigned to the risk assessment.) 828 */ 829 public Identifier getIdentifier() { 830 if (this.identifier == null) 831 if (Configuration.errorOnAutoCreate()) 832 throw new Error("Attempt to auto-create RiskAssessment.identifier"); 833 else if (Configuration.doAutoCreate()) 834 this.identifier = new Identifier(); // cc 835 return this.identifier; 836 } 837 838 public boolean hasIdentifier() { 839 return this.identifier != null && !this.identifier.isEmpty(); 840 } 841 842 /** 843 * @param value {@link #identifier} (Business identifier assigned to the risk assessment.) 844 */ 845 public RiskAssessment setIdentifier(Identifier value) { 846 this.identifier = value; 847 return this; 848 } 849 850 /** 851 * @return {@link #method} (The algorithm, process or mechanism used to evaluate the risk.) 852 */ 853 public CodeableConcept getMethod() { 854 if (this.method == null) 855 if (Configuration.errorOnAutoCreate()) 856 throw new Error("Attempt to auto-create RiskAssessment.method"); 857 else if (Configuration.doAutoCreate()) 858 this.method = new CodeableConcept(); // cc 859 return this.method; 860 } 861 862 public boolean hasMethod() { 863 return this.method != null && !this.method.isEmpty(); 864 } 865 866 /** 867 * @param value {@link #method} (The algorithm, process or mechanism used to evaluate the risk.) 868 */ 869 public RiskAssessment setMethod(CodeableConcept value) { 870 this.method = value; 871 return this; 872 } 873 874 /** 875 * @return {@link #basis} (Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.).) 876 */ 877 public List<Reference> getBasis() { 878 if (this.basis == null) 879 this.basis = new ArrayList<Reference>(); 880 return this.basis; 881 } 882 883 public boolean hasBasis() { 884 if (this.basis == null) 885 return false; 886 for (Reference item : this.basis) 887 if (!item.isEmpty()) 888 return true; 889 return false; 890 } 891 892 /** 893 * @return {@link #basis} (Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.).) 894 */ 895 // syntactic sugar 896 public Reference addBasis() { //3 897 Reference t = new Reference(); 898 if (this.basis == null) 899 this.basis = new ArrayList<Reference>(); 900 this.basis.add(t); 901 return t; 902 } 903 904 // syntactic sugar 905 public RiskAssessment addBasis(Reference t) { //3 906 if (t == null) 907 return this; 908 if (this.basis == null) 909 this.basis = new ArrayList<Reference>(); 910 this.basis.add(t); 911 return this; 912 } 913 914 /** 915 * @return {@link #basis} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.).) 916 */ 917 public List<Resource> getBasisTarget() { 918 if (this.basisTarget == null) 919 this.basisTarget = new ArrayList<Resource>(); 920 return this.basisTarget; 921 } 922 923 /** 924 * @return {@link #prediction} (Describes the expected outcome for the subject.) 925 */ 926 public List<RiskAssessmentPredictionComponent> getPrediction() { 927 if (this.prediction == null) 928 this.prediction = new ArrayList<RiskAssessmentPredictionComponent>(); 929 return this.prediction; 930 } 931 932 public boolean hasPrediction() { 933 if (this.prediction == null) 934 return false; 935 for (RiskAssessmentPredictionComponent item : this.prediction) 936 if (!item.isEmpty()) 937 return true; 938 return false; 939 } 940 941 /** 942 * @return {@link #prediction} (Describes the expected outcome for the subject.) 943 */ 944 // syntactic sugar 945 public RiskAssessmentPredictionComponent addPrediction() { //3 946 RiskAssessmentPredictionComponent t = new RiskAssessmentPredictionComponent(); 947 if (this.prediction == null) 948 this.prediction = new ArrayList<RiskAssessmentPredictionComponent>(); 949 this.prediction.add(t); 950 return t; 951 } 952 953 // syntactic sugar 954 public RiskAssessment addPrediction(RiskAssessmentPredictionComponent t) { //3 955 if (t == null) 956 return this; 957 if (this.prediction == null) 958 this.prediction = new ArrayList<RiskAssessmentPredictionComponent>(); 959 this.prediction.add(t); 960 return this; 961 } 962 963 /** 964 * @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 965 */ 966 public StringType getMitigationElement() { 967 if (this.mitigation == null) 968 if (Configuration.errorOnAutoCreate()) 969 throw new Error("Attempt to auto-create RiskAssessment.mitigation"); 970 else if (Configuration.doAutoCreate()) 971 this.mitigation = new StringType(); // bb 972 return this.mitigation; 973 } 974 975 public boolean hasMitigationElement() { 976 return this.mitigation != null && !this.mitigation.isEmpty(); 977 } 978 979 public boolean hasMitigation() { 980 return this.mitigation != null && !this.mitigation.isEmpty(); 981 } 982 983 /** 984 * @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 985 */ 986 public RiskAssessment setMitigationElement(StringType value) { 987 this.mitigation = value; 988 return this; 989 } 990 991 /** 992 * @return A description of the steps that might be taken to reduce the identified risk(s). 993 */ 994 public String getMitigation() { 995 return this.mitigation == null ? null : this.mitigation.getValue(); 996 } 997 998 /** 999 * @param value A description of the steps that might be taken to reduce the identified risk(s). 1000 */ 1001 public RiskAssessment setMitigation(String value) { 1002 if (Utilities.noString(value)) 1003 this.mitigation = null; 1004 else { 1005 if (this.mitigation == null) 1006 this.mitigation = new StringType(); 1007 this.mitigation.setValue(value); 1008 } 1009 return this; 1010 } 1011 1012 protected void listChildren(List<Property> childrenList) { 1013 super.listChildren(childrenList); 1014 childrenList.add(new Property("subject", "Reference(Patient|Group)", "The patient or group the risk assessment applies to.", 0, java.lang.Integer.MAX_VALUE, subject)); 1015 childrenList.add(new Property("date", "dateTime", "The date (and possibly time) the risk assessment was performed.", 0, java.lang.Integer.MAX_VALUE, date)); 1016 childrenList.add(new Property("condition", "Reference(Condition)", "For assessments or prognosis specific to a particular condition, indicates the condition being assessed.", 0, java.lang.Integer.MAX_VALUE, condition)); 1017 childrenList.add(new Property("encounter", "Reference(Encounter)", "The encounter where the assessment was performed.", 0, java.lang.Integer.MAX_VALUE, encounter)); 1018 childrenList.add(new Property("performer", "Reference(Practitioner|Device)", "The provider or software application that performed the assessment.", 0, java.lang.Integer.MAX_VALUE, performer)); 1019 childrenList.add(new Property("identifier", "Identifier", "Business identifier assigned to the risk assessment.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1020 childrenList.add(new Property("method", "CodeableConcept", "The algorithm, process or mechanism used to evaluate the risk.", 0, java.lang.Integer.MAX_VALUE, method)); 1021 childrenList.add(new Property("basis", "Reference(Any)", "Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.).", 0, java.lang.Integer.MAX_VALUE, basis)); 1022 childrenList.add(new Property("prediction", "", "Describes the expected outcome for the subject.", 0, java.lang.Integer.MAX_VALUE, prediction)); 1023 childrenList.add(new Property("mitigation", "string", "A description of the steps that might be taken to reduce the identified risk(s).", 0, java.lang.Integer.MAX_VALUE, mitigation)); 1024 } 1025 1026 @Override 1027 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1028 switch (hash) { 1029 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 1030 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 1031 case -861311717: /*condition*/ return this.condition == null ? new Base[0] : new Base[] {this.condition}; // Reference 1032 case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference 1033 case 481140686: /*performer*/ return this.performer == null ? new Base[0] : new Base[] {this.performer}; // Reference 1034 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 1035 case -1077554975: /*method*/ return this.method == null ? new Base[0] : new Base[] {this.method}; // CodeableConcept 1036 case 93508670: /*basis*/ return this.basis == null ? new Base[0] : this.basis.toArray(new Base[this.basis.size()]); // Reference 1037 case 1161234575: /*prediction*/ return this.prediction == null ? new Base[0] : this.prediction.toArray(new Base[this.prediction.size()]); // RiskAssessmentPredictionComponent 1038 case 1293793087: /*mitigation*/ return this.mitigation == null ? new Base[0] : new Base[] {this.mitigation}; // StringType 1039 default: return super.getProperty(hash, name, checkValid); 1040 } 1041 1042 } 1043 1044 @Override 1045 public void setProperty(int hash, String name, Base value) throws FHIRException { 1046 switch (hash) { 1047 case -1867885268: // subject 1048 this.subject = castToReference(value); // Reference 1049 break; 1050 case 3076014: // date 1051 this.date = castToDateTime(value); // DateTimeType 1052 break; 1053 case -861311717: // condition 1054 this.condition = castToReference(value); // Reference 1055 break; 1056 case 1524132147: // encounter 1057 this.encounter = castToReference(value); // Reference 1058 break; 1059 case 481140686: // performer 1060 this.performer = castToReference(value); // Reference 1061 break; 1062 case -1618432855: // identifier 1063 this.identifier = castToIdentifier(value); // Identifier 1064 break; 1065 case -1077554975: // method 1066 this.method = castToCodeableConcept(value); // CodeableConcept 1067 break; 1068 case 93508670: // basis 1069 this.getBasis().add(castToReference(value)); // Reference 1070 break; 1071 case 1161234575: // prediction 1072 this.getPrediction().add((RiskAssessmentPredictionComponent) value); // RiskAssessmentPredictionComponent 1073 break; 1074 case 1293793087: // mitigation 1075 this.mitigation = castToString(value); // StringType 1076 break; 1077 default: super.setProperty(hash, name, value); 1078 } 1079 1080 } 1081 1082 @Override 1083 public void setProperty(String name, Base value) throws FHIRException { 1084 if (name.equals("subject")) 1085 this.subject = castToReference(value); // Reference 1086 else if (name.equals("date")) 1087 this.date = castToDateTime(value); // DateTimeType 1088 else if (name.equals("condition")) 1089 this.condition = castToReference(value); // Reference 1090 else if (name.equals("encounter")) 1091 this.encounter = castToReference(value); // Reference 1092 else if (name.equals("performer")) 1093 this.performer = castToReference(value); // Reference 1094 else if (name.equals("identifier")) 1095 this.identifier = castToIdentifier(value); // Identifier 1096 else if (name.equals("method")) 1097 this.method = castToCodeableConcept(value); // CodeableConcept 1098 else if (name.equals("basis")) 1099 this.getBasis().add(castToReference(value)); 1100 else if (name.equals("prediction")) 1101 this.getPrediction().add((RiskAssessmentPredictionComponent) value); 1102 else if (name.equals("mitigation")) 1103 this.mitigation = castToString(value); // StringType 1104 else 1105 super.setProperty(name, value); 1106 } 1107 1108 @Override 1109 public Base makeProperty(int hash, String name) throws FHIRException { 1110 switch (hash) { 1111 case -1867885268: return getSubject(); // Reference 1112 case 3076014: throw new FHIRException("Cannot make property date as it is not a complex type"); // DateTimeType 1113 case -861311717: return getCondition(); // Reference 1114 case 1524132147: return getEncounter(); // Reference 1115 case 481140686: return getPerformer(); // Reference 1116 case -1618432855: return getIdentifier(); // Identifier 1117 case -1077554975: return getMethod(); // CodeableConcept 1118 case 93508670: return addBasis(); // Reference 1119 case 1161234575: return addPrediction(); // RiskAssessmentPredictionComponent 1120 case 1293793087: throw new FHIRException("Cannot make property mitigation as it is not a complex type"); // StringType 1121 default: return super.makeProperty(hash, name); 1122 } 1123 1124 } 1125 1126 @Override 1127 public Base addChild(String name) throws FHIRException { 1128 if (name.equals("subject")) { 1129 this.subject = new Reference(); 1130 return this.subject; 1131 } 1132 else if (name.equals("date")) { 1133 throw new FHIRException("Cannot call addChild on a primitive type RiskAssessment.date"); 1134 } 1135 else if (name.equals("condition")) { 1136 this.condition = new Reference(); 1137 return this.condition; 1138 } 1139 else if (name.equals("encounter")) { 1140 this.encounter = new Reference(); 1141 return this.encounter; 1142 } 1143 else if (name.equals("performer")) { 1144 this.performer = new Reference(); 1145 return this.performer; 1146 } 1147 else if (name.equals("identifier")) { 1148 this.identifier = new Identifier(); 1149 return this.identifier; 1150 } 1151 else if (name.equals("method")) { 1152 this.method = new CodeableConcept(); 1153 return this.method; 1154 } 1155 else if (name.equals("basis")) { 1156 return addBasis(); 1157 } 1158 else if (name.equals("prediction")) { 1159 return addPrediction(); 1160 } 1161 else if (name.equals("mitigation")) { 1162 throw new FHIRException("Cannot call addChild on a primitive type RiskAssessment.mitigation"); 1163 } 1164 else 1165 return super.addChild(name); 1166 } 1167 1168 public String fhirType() { 1169 return "RiskAssessment"; 1170 1171 } 1172 1173 public RiskAssessment copy() { 1174 RiskAssessment dst = new RiskAssessment(); 1175 copyValues(dst); 1176 dst.subject = subject == null ? null : subject.copy(); 1177 dst.date = date == null ? null : date.copy(); 1178 dst.condition = condition == null ? null : condition.copy(); 1179 dst.encounter = encounter == null ? null : encounter.copy(); 1180 dst.performer = performer == null ? null : performer.copy(); 1181 dst.identifier = identifier == null ? null : identifier.copy(); 1182 dst.method = method == null ? null : method.copy(); 1183 if (basis != null) { 1184 dst.basis = new ArrayList<Reference>(); 1185 for (Reference i : basis) 1186 dst.basis.add(i.copy()); 1187 }; 1188 if (prediction != null) { 1189 dst.prediction = new ArrayList<RiskAssessmentPredictionComponent>(); 1190 for (RiskAssessmentPredictionComponent i : prediction) 1191 dst.prediction.add(i.copy()); 1192 }; 1193 dst.mitigation = mitigation == null ? null : mitigation.copy(); 1194 return dst; 1195 } 1196 1197 protected RiskAssessment typedCopy() { 1198 return copy(); 1199 } 1200 1201 @Override 1202 public boolean equalsDeep(Base other) { 1203 if (!super.equalsDeep(other)) 1204 return false; 1205 if (!(other instanceof RiskAssessment)) 1206 return false; 1207 RiskAssessment o = (RiskAssessment) other; 1208 return compareDeep(subject, o.subject, true) && compareDeep(date, o.date, true) && compareDeep(condition, o.condition, true) 1209 && compareDeep(encounter, o.encounter, true) && compareDeep(performer, o.performer, true) && compareDeep(identifier, o.identifier, true) 1210 && compareDeep(method, o.method, true) && compareDeep(basis, o.basis, true) && compareDeep(prediction, o.prediction, true) 1211 && compareDeep(mitigation, o.mitigation, true); 1212 } 1213 1214 @Override 1215 public boolean equalsShallow(Base other) { 1216 if (!super.equalsShallow(other)) 1217 return false; 1218 if (!(other instanceof RiskAssessment)) 1219 return false; 1220 RiskAssessment o = (RiskAssessment) other; 1221 return compareValues(date, o.date, true) && compareValues(mitigation, o.mitigation, true); 1222 } 1223 1224 public boolean isEmpty() { 1225 return super.isEmpty() && (subject == null || subject.isEmpty()) && (date == null || date.isEmpty()) 1226 && (condition == null || condition.isEmpty()) && (encounter == null || encounter.isEmpty()) 1227 && (performer == null || performer.isEmpty()) && (identifier == null || identifier.isEmpty()) 1228 && (method == null || method.isEmpty()) && (basis == null || basis.isEmpty()) && (prediction == null || prediction.isEmpty()) 1229 && (mitigation == null || mitigation.isEmpty()); 1230 } 1231 1232 @Override 1233 public ResourceType getResourceType() { 1234 return ResourceType.RiskAssessment; 1235 } 1236 1237 /** 1238 * Search parameter: <b>patient</b> 1239 * <p> 1240 * Description: <b>Who/what does assessment apply to?</b><br> 1241 * Type: <b>reference</b><br> 1242 * Path: <b>RiskAssessment.subject</b><br> 1243 * </p> 1244 */ 1245 @SearchParamDefinition(name="patient", path="RiskAssessment.subject", description="Who/what does assessment apply to?", type="reference" ) 1246 public static final String SP_PATIENT = "patient"; 1247 /** 1248 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 1249 * <p> 1250 * Description: <b>Who/what does assessment apply to?</b><br> 1251 * Type: <b>reference</b><br> 1252 * Path: <b>RiskAssessment.subject</b><br> 1253 * </p> 1254 */ 1255 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 1256 1257/** 1258 * Constant for fluent queries to be used to add include statements. Specifies 1259 * the path value of "<b>RiskAssessment:patient</b>". 1260 */ 1261 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("RiskAssessment:patient").toLocked(); 1262 1263 /** 1264 * Search parameter: <b>condition</b> 1265 * <p> 1266 * Description: <b>Condition assessed</b><br> 1267 * Type: <b>reference</b><br> 1268 * Path: <b>RiskAssessment.condition</b><br> 1269 * </p> 1270 */ 1271 @SearchParamDefinition(name="condition", path="RiskAssessment.condition", description="Condition assessed", type="reference" ) 1272 public static final String SP_CONDITION = "condition"; 1273 /** 1274 * <b>Fluent Client</b> search parameter constant for <b>condition</b> 1275 * <p> 1276 * Description: <b>Condition assessed</b><br> 1277 * Type: <b>reference</b><br> 1278 * Path: <b>RiskAssessment.condition</b><br> 1279 * </p> 1280 */ 1281 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONDITION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CONDITION); 1282 1283/** 1284 * Constant for fluent queries to be used to add include statements. Specifies 1285 * the path value of "<b>RiskAssessment:condition</b>". 1286 */ 1287 public static final ca.uhn.fhir.model.api.Include INCLUDE_CONDITION = new ca.uhn.fhir.model.api.Include("RiskAssessment:condition").toLocked(); 1288 1289 /** 1290 * Search parameter: <b>subject</b> 1291 * <p> 1292 * Description: <b>Who/what does assessment apply to?</b><br> 1293 * Type: <b>reference</b><br> 1294 * Path: <b>RiskAssessment.subject</b><br> 1295 * </p> 1296 */ 1297 @SearchParamDefinition(name="subject", path="RiskAssessment.subject", description="Who/what does assessment apply to?", type="reference" ) 1298 public static final String SP_SUBJECT = "subject"; 1299 /** 1300 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 1301 * <p> 1302 * Description: <b>Who/what does assessment apply to?</b><br> 1303 * Type: <b>reference</b><br> 1304 * Path: <b>RiskAssessment.subject</b><br> 1305 * </p> 1306 */ 1307 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 1308 1309/** 1310 * Constant for fluent queries to be used to add include statements. Specifies 1311 * the path value of "<b>RiskAssessment:subject</b>". 1312 */ 1313 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("RiskAssessment:subject").toLocked(); 1314 1315 /** 1316 * Search parameter: <b>performer</b> 1317 * <p> 1318 * Description: <b>Who did assessment?</b><br> 1319 * Type: <b>reference</b><br> 1320 * Path: <b>RiskAssessment.performer</b><br> 1321 * </p> 1322 */ 1323 @SearchParamDefinition(name="performer", path="RiskAssessment.performer", description="Who did assessment?", type="reference" ) 1324 public static final String SP_PERFORMER = "performer"; 1325 /** 1326 * <b>Fluent Client</b> search parameter constant for <b>performer</b> 1327 * <p> 1328 * Description: <b>Who did assessment?</b><br> 1329 * Type: <b>reference</b><br> 1330 * Path: <b>RiskAssessment.performer</b><br> 1331 * </p> 1332 */ 1333 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PERFORMER); 1334 1335/** 1336 * Constant for fluent queries to be used to add include statements. Specifies 1337 * the path value of "<b>RiskAssessment:performer</b>". 1338 */ 1339 public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER = new ca.uhn.fhir.model.api.Include("RiskAssessment:performer").toLocked(); 1340 1341 /** 1342 * Search parameter: <b>method</b> 1343 * <p> 1344 * Description: <b>Evaluation mechanism</b><br> 1345 * Type: <b>token</b><br> 1346 * Path: <b>RiskAssessment.method</b><br> 1347 * </p> 1348 */ 1349 @SearchParamDefinition(name="method", path="RiskAssessment.method", description="Evaluation mechanism", type="token" ) 1350 public static final String SP_METHOD = "method"; 1351 /** 1352 * <b>Fluent Client</b> search parameter constant for <b>method</b> 1353 * <p> 1354 * Description: <b>Evaluation mechanism</b><br> 1355 * Type: <b>token</b><br> 1356 * Path: <b>RiskAssessment.method</b><br> 1357 * </p> 1358 */ 1359 public static final ca.uhn.fhir.rest.gclient.TokenClientParam METHOD = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_METHOD); 1360 1361 /** 1362 * Search parameter: <b>encounter</b> 1363 * <p> 1364 * Description: <b>Where was assessment performed?</b><br> 1365 * Type: <b>reference</b><br> 1366 * Path: <b>RiskAssessment.encounter</b><br> 1367 * </p> 1368 */ 1369 @SearchParamDefinition(name="encounter", path="RiskAssessment.encounter", description="Where was assessment performed?", type="reference" ) 1370 public static final String SP_ENCOUNTER = "encounter"; 1371 /** 1372 * <b>Fluent Client</b> search parameter constant for <b>encounter</b> 1373 * <p> 1374 * Description: <b>Where was assessment performed?</b><br> 1375 * Type: <b>reference</b><br> 1376 * Path: <b>RiskAssessment.encounter</b><br> 1377 * </p> 1378 */ 1379 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER); 1380 1381/** 1382 * Constant for fluent queries to be used to add include statements. Specifies 1383 * the path value of "<b>RiskAssessment:encounter</b>". 1384 */ 1385 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("RiskAssessment:encounter").toLocked(); 1386 1387 /** 1388 * Search parameter: <b>date</b> 1389 * <p> 1390 * Description: <b>When was assessment made?</b><br> 1391 * Type: <b>date</b><br> 1392 * Path: <b>RiskAssessment.date</b><br> 1393 * </p> 1394 */ 1395 @SearchParamDefinition(name="date", path="RiskAssessment.date", description="When was assessment made?", type="date" ) 1396 public static final String SP_DATE = "date"; 1397 /** 1398 * <b>Fluent Client</b> search parameter constant for <b>date</b> 1399 * <p> 1400 * Description: <b>When was assessment made?</b><br> 1401 * Type: <b>date</b><br> 1402 * Path: <b>RiskAssessment.date</b><br> 1403 * </p> 1404 */ 1405 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 1406 1407 /** 1408 * Search parameter: <b>identifier</b> 1409 * <p> 1410 * Description: <b>Unique identifier for the assessment</b><br> 1411 * Type: <b>token</b><br> 1412 * Path: <b>RiskAssessment.identifier</b><br> 1413 * </p> 1414 */ 1415 @SearchParamDefinition(name="identifier", path="RiskAssessment.identifier", description="Unique identifier for the assessment", type="token" ) 1416 public static final String SP_IDENTIFIER = "identifier"; 1417 /** 1418 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 1419 * <p> 1420 * Description: <b>Unique identifier for the assessment</b><br> 1421 * Type: <b>token</b><br> 1422 * Path: <b>RiskAssessment.identifier</b><br> 1423 * </p> 1424 */ 1425 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 1426 1427 1428} 1429