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