001package org.hl7.fhir.r4.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0 033 034import java.util.*; 035 036import org.hl7.fhir.utilities.Utilities; 037import ca.uhn.fhir.model.api.annotation.ResourceDef; 038import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 039import ca.uhn.fhir.model.api.annotation.Child; 040import ca.uhn.fhir.model.api.annotation.ChildOrder; 041import ca.uhn.fhir.model.api.annotation.Description; 042import ca.uhn.fhir.model.api.annotation.Block; 043import org.hl7.fhir.instance.model.api.*; 044import org.hl7.fhir.exceptions.FHIRException; 045/** 046 * Measurements and simple assertions made about a patient, device or other subject. 047 */ 048@ResourceDef(name="Observation", profile="http://hl7.org/fhir/StructureDefinition/Observation") 049public class Observation extends DomainResource { 050 051 public enum ObservationStatus { 052 /** 053 * The existence of the observation is registered, but there is no result yet available. 054 */ 055 REGISTERED, 056 /** 057 * This is an initial or interim observation: data may be incomplete or unverified. 058 */ 059 PRELIMINARY, 060 /** 061 * The observation is complete and there are no further actions needed. Additional information such "released", "signed", etc would be represented using [Provenance](provenance.html) which provides not only the act but also the actors and dates and other related data. These act states would be associated with an observation status of `preliminary` until they are all completed and then a status of `final` would be applied. 062 */ 063 FINAL, 064 /** 065 * Subsequent to being Final, the observation has been modified subsequent. This includes updates/new information and corrections. 066 */ 067 AMENDED, 068 /** 069 * Subsequent to being Final, the observation has been modified to correct an error in the test result. 070 */ 071 CORRECTED, 072 /** 073 * The observation is unavailable because the measurement was not started or not completed (also sometimes called "aborted"). 074 */ 075 CANCELLED, 076 /** 077 * The observation has been withdrawn following previous final release. This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".). 078 */ 079 ENTEREDINERROR, 080 /** 081 * The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, but the authoring system does not know which. 082 */ 083 UNKNOWN, 084 /** 085 * added to help the parsers with the generic types 086 */ 087 NULL; 088 public static ObservationStatus fromCode(String codeString) throws FHIRException { 089 if (codeString == null || "".equals(codeString)) 090 return null; 091 if ("registered".equals(codeString)) 092 return REGISTERED; 093 if ("preliminary".equals(codeString)) 094 return PRELIMINARY; 095 if ("final".equals(codeString)) 096 return FINAL; 097 if ("amended".equals(codeString)) 098 return AMENDED; 099 if ("corrected".equals(codeString)) 100 return CORRECTED; 101 if ("cancelled".equals(codeString)) 102 return CANCELLED; 103 if ("entered-in-error".equals(codeString)) 104 return ENTEREDINERROR; 105 if ("unknown".equals(codeString)) 106 return UNKNOWN; 107 if (Configuration.isAcceptInvalidEnums()) 108 return null; 109 else 110 throw new FHIRException("Unknown ObservationStatus code '"+codeString+"'"); 111 } 112 public String toCode() { 113 switch (this) { 114 case REGISTERED: return "registered"; 115 case PRELIMINARY: return "preliminary"; 116 case FINAL: return "final"; 117 case AMENDED: return "amended"; 118 case CORRECTED: return "corrected"; 119 case CANCELLED: return "cancelled"; 120 case ENTEREDINERROR: return "entered-in-error"; 121 case UNKNOWN: return "unknown"; 122 default: return "?"; 123 } 124 } 125 public String getSystem() { 126 switch (this) { 127 case REGISTERED: return "http://hl7.org/fhir/observation-status"; 128 case PRELIMINARY: return "http://hl7.org/fhir/observation-status"; 129 case FINAL: return "http://hl7.org/fhir/observation-status"; 130 case AMENDED: return "http://hl7.org/fhir/observation-status"; 131 case CORRECTED: return "http://hl7.org/fhir/observation-status"; 132 case CANCELLED: return "http://hl7.org/fhir/observation-status"; 133 case ENTEREDINERROR: return "http://hl7.org/fhir/observation-status"; 134 case UNKNOWN: return "http://hl7.org/fhir/observation-status"; 135 default: return "?"; 136 } 137 } 138 public String getDefinition() { 139 switch (this) { 140 case REGISTERED: return "The existence of the observation is registered, but there is no result yet available."; 141 case PRELIMINARY: return "This is an initial or interim observation: data may be incomplete or unverified."; 142 case FINAL: return "The observation is complete and there are no further actions needed. Additional information such \"released\", \"signed\", etc would be represented using [Provenance](provenance.html) which provides not only the act but also the actors and dates and other related data. These act states would be associated with an observation status of `preliminary` until they are all completed and then a status of `final` would be applied."; 143 case AMENDED: return "Subsequent to being Final, the observation has been modified subsequent. This includes updates/new information and corrections."; 144 case CORRECTED: return "Subsequent to being Final, the observation has been modified to correct an error in the test result."; 145 case CANCELLED: return "The observation is unavailable because the measurement was not started or not completed (also sometimes called \"aborted\")."; 146 case ENTEREDINERROR: return "The observation has been withdrawn following previous final release. This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".)."; 147 case UNKNOWN: return "The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, but the authoring system does not know which."; 148 default: return "?"; 149 } 150 } 151 public String getDisplay() { 152 switch (this) { 153 case REGISTERED: return "Registered"; 154 case PRELIMINARY: return "Preliminary"; 155 case FINAL: return "Final"; 156 case AMENDED: return "Amended"; 157 case CORRECTED: return "Corrected"; 158 case CANCELLED: return "Cancelled"; 159 case ENTEREDINERROR: return "Entered in Error"; 160 case UNKNOWN: return "Unknown"; 161 default: return "?"; 162 } 163 } 164 } 165 166 public static class ObservationStatusEnumFactory implements EnumFactory<ObservationStatus> { 167 public ObservationStatus fromCode(String codeString) throws IllegalArgumentException { 168 if (codeString == null || "".equals(codeString)) 169 if (codeString == null || "".equals(codeString)) 170 return null; 171 if ("registered".equals(codeString)) 172 return ObservationStatus.REGISTERED; 173 if ("preliminary".equals(codeString)) 174 return ObservationStatus.PRELIMINARY; 175 if ("final".equals(codeString)) 176 return ObservationStatus.FINAL; 177 if ("amended".equals(codeString)) 178 return ObservationStatus.AMENDED; 179 if ("corrected".equals(codeString)) 180 return ObservationStatus.CORRECTED; 181 if ("cancelled".equals(codeString)) 182 return ObservationStatus.CANCELLED; 183 if ("entered-in-error".equals(codeString)) 184 return ObservationStatus.ENTEREDINERROR; 185 if ("unknown".equals(codeString)) 186 return ObservationStatus.UNKNOWN; 187 throw new IllegalArgumentException("Unknown ObservationStatus code '"+codeString+"'"); 188 } 189 public Enumeration<ObservationStatus> fromType(Base code) throws FHIRException { 190 if (code == null) 191 return null; 192 if (code.isEmpty()) 193 return new Enumeration<ObservationStatus>(this); 194 String codeString = ((PrimitiveType) code).asStringValue(); 195 if (codeString == null || "".equals(codeString)) 196 return null; 197 if ("registered".equals(codeString)) 198 return new Enumeration<ObservationStatus>(this, ObservationStatus.REGISTERED); 199 if ("preliminary".equals(codeString)) 200 return new Enumeration<ObservationStatus>(this, ObservationStatus.PRELIMINARY); 201 if ("final".equals(codeString)) 202 return new Enumeration<ObservationStatus>(this, ObservationStatus.FINAL); 203 if ("amended".equals(codeString)) 204 return new Enumeration<ObservationStatus>(this, ObservationStatus.AMENDED); 205 if ("corrected".equals(codeString)) 206 return new Enumeration<ObservationStatus>(this, ObservationStatus.CORRECTED); 207 if ("cancelled".equals(codeString)) 208 return new Enumeration<ObservationStatus>(this, ObservationStatus.CANCELLED); 209 if ("entered-in-error".equals(codeString)) 210 return new Enumeration<ObservationStatus>(this, ObservationStatus.ENTEREDINERROR); 211 if ("unknown".equals(codeString)) 212 return new Enumeration<ObservationStatus>(this, ObservationStatus.UNKNOWN); 213 throw new FHIRException("Unknown ObservationStatus code '"+codeString+"'"); 214 } 215 public String toCode(ObservationStatus code) { 216 if (code == ObservationStatus.REGISTERED) 217 return "registered"; 218 if (code == ObservationStatus.PRELIMINARY) 219 return "preliminary"; 220 if (code == ObservationStatus.FINAL) 221 return "final"; 222 if (code == ObservationStatus.AMENDED) 223 return "amended"; 224 if (code == ObservationStatus.CORRECTED) 225 return "corrected"; 226 if (code == ObservationStatus.CANCELLED) 227 return "cancelled"; 228 if (code == ObservationStatus.ENTEREDINERROR) 229 return "entered-in-error"; 230 if (code == ObservationStatus.UNKNOWN) 231 return "unknown"; 232 return "?"; 233 } 234 public String toSystem(ObservationStatus code) { 235 return code.getSystem(); 236 } 237 } 238 239 @Block() 240 public static class ObservationReferenceRangeComponent extends BackboneElement implements IBaseBackboneElement { 241 /** 242 * The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3). 243 */ 244 @Child(name = "low", type = {Quantity.class}, order=1, min=0, max=1, modifier=false, summary=false) 245 @Description(shortDefinition="Low Range, if relevant", formalDefinition="The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3)." ) 246 protected Quantity low; 247 248 /** 249 * The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3). 250 */ 251 @Child(name = "high", type = {Quantity.class}, order=2, min=0, max=1, modifier=false, summary=false) 252 @Description(shortDefinition="High Range, if relevant", formalDefinition="The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3)." ) 253 protected Quantity high; 254 255 /** 256 * Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range. 257 */ 258 @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 259 @Description(shortDefinition="Reference range qualifier", formalDefinition="Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range." ) 260 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/referencerange-meaning") 261 protected CodeableConcept type; 262 263 /** 264 * Codes to indicate the target population this reference range applies to. For example, a reference range may be based on the normal population or a particular sex or race. 265 */ 266 @Child(name = "appliesTo", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 267 @Description(shortDefinition="Reference range population", formalDefinition="Codes to indicate the target population this reference range applies to. For example, a reference range may be based on the normal population or a particular sex or race." ) 268 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/referencerange-appliesto") 269 protected List<CodeableConcept> appliesTo; 270 271 /** 272 * The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so. 273 */ 274 @Child(name = "age", type = {Range.class}, order=5, min=0, max=1, modifier=false, summary=false) 275 @Description(shortDefinition="Applicable age range, if relevant", formalDefinition="The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so." ) 276 protected Range age; 277 278 /** 279 * Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of "Negative" or a list or table of "normals". 280 */ 281 @Child(name = "text", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) 282 @Description(shortDefinition="Text based reference range in an observation", formalDefinition="Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of \"Negative\" or a list or table of \"normals\"." ) 283 protected StringType text; 284 285 private static final long serialVersionUID = -305128879L; 286 287 /** 288 * Constructor 289 */ 290 public ObservationReferenceRangeComponent() { 291 super(); 292 } 293 294 /** 295 * @return {@link #low} (The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3).) 296 */ 297 public Quantity getLow() { 298 if (this.low == null) 299 if (Configuration.errorOnAutoCreate()) 300 throw new Error("Attempt to auto-create ObservationReferenceRangeComponent.low"); 301 else if (Configuration.doAutoCreate()) 302 this.low = new Quantity(); // cc 303 return this.low; 304 } 305 306 public boolean hasLow() { 307 return this.low != null && !this.low.isEmpty(); 308 } 309 310 /** 311 * @param value {@link #low} (The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3).) 312 */ 313 public ObservationReferenceRangeComponent setLow(Quantity value) { 314 this.low = value; 315 return this; 316 } 317 318 /** 319 * @return {@link #high} (The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3).) 320 */ 321 public Quantity getHigh() { 322 if (this.high == null) 323 if (Configuration.errorOnAutoCreate()) 324 throw new Error("Attempt to auto-create ObservationReferenceRangeComponent.high"); 325 else if (Configuration.doAutoCreate()) 326 this.high = new Quantity(); // cc 327 return this.high; 328 } 329 330 public boolean hasHigh() { 331 return this.high != null && !this.high.isEmpty(); 332 } 333 334 /** 335 * @param value {@link #high} (The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3).) 336 */ 337 public ObservationReferenceRangeComponent setHigh(Quantity value) { 338 this.high = value; 339 return this; 340 } 341 342 /** 343 * @return {@link #type} (Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range.) 344 */ 345 public CodeableConcept getType() { 346 if (this.type == null) 347 if (Configuration.errorOnAutoCreate()) 348 throw new Error("Attempt to auto-create ObservationReferenceRangeComponent.type"); 349 else if (Configuration.doAutoCreate()) 350 this.type = new CodeableConcept(); // cc 351 return this.type; 352 } 353 354 public boolean hasType() { 355 return this.type != null && !this.type.isEmpty(); 356 } 357 358 /** 359 * @param value {@link #type} (Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range.) 360 */ 361 public ObservationReferenceRangeComponent setType(CodeableConcept value) { 362 this.type = value; 363 return this; 364 } 365 366 /** 367 * @return {@link #appliesTo} (Codes to indicate the target population this reference range applies to. For example, a reference range may be based on the normal population or a particular sex or race.) 368 */ 369 public List<CodeableConcept> getAppliesTo() { 370 if (this.appliesTo == null) 371 this.appliesTo = new ArrayList<CodeableConcept>(); 372 return this.appliesTo; 373 } 374 375 /** 376 * @return Returns a reference to <code>this</code> for easy method chaining 377 */ 378 public ObservationReferenceRangeComponent setAppliesTo(List<CodeableConcept> theAppliesTo) { 379 this.appliesTo = theAppliesTo; 380 return this; 381 } 382 383 public boolean hasAppliesTo() { 384 if (this.appliesTo == null) 385 return false; 386 for (CodeableConcept item : this.appliesTo) 387 if (!item.isEmpty()) 388 return true; 389 return false; 390 } 391 392 public CodeableConcept addAppliesTo() { //3 393 CodeableConcept t = new CodeableConcept(); 394 if (this.appliesTo == null) 395 this.appliesTo = new ArrayList<CodeableConcept>(); 396 this.appliesTo.add(t); 397 return t; 398 } 399 400 public ObservationReferenceRangeComponent addAppliesTo(CodeableConcept t) { //3 401 if (t == null) 402 return this; 403 if (this.appliesTo == null) 404 this.appliesTo = new ArrayList<CodeableConcept>(); 405 this.appliesTo.add(t); 406 return this; 407 } 408 409 /** 410 * @return The first repetition of repeating field {@link #appliesTo}, creating it if it does not already exist 411 */ 412 public CodeableConcept getAppliesToFirstRep() { 413 if (getAppliesTo().isEmpty()) { 414 addAppliesTo(); 415 } 416 return getAppliesTo().get(0); 417 } 418 419 /** 420 * @return {@link #age} (The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.) 421 */ 422 public Range getAge() { 423 if (this.age == null) 424 if (Configuration.errorOnAutoCreate()) 425 throw new Error("Attempt to auto-create ObservationReferenceRangeComponent.age"); 426 else if (Configuration.doAutoCreate()) 427 this.age = new Range(); // cc 428 return this.age; 429 } 430 431 public boolean hasAge() { 432 return this.age != null && !this.age.isEmpty(); 433 } 434 435 /** 436 * @param value {@link #age} (The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.) 437 */ 438 public ObservationReferenceRangeComponent setAge(Range value) { 439 this.age = value; 440 return this; 441 } 442 443 /** 444 * @return {@link #text} (Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of "Negative" or a list or table of "normals".). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 445 */ 446 public StringType getTextElement() { 447 if (this.text == null) 448 if (Configuration.errorOnAutoCreate()) 449 throw new Error("Attempt to auto-create ObservationReferenceRangeComponent.text"); 450 else if (Configuration.doAutoCreate()) 451 this.text = new StringType(); // bb 452 return this.text; 453 } 454 455 public boolean hasTextElement() { 456 return this.text != null && !this.text.isEmpty(); 457 } 458 459 public boolean hasText() { 460 return this.text != null && !this.text.isEmpty(); 461 } 462 463 /** 464 * @param value {@link #text} (Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of "Negative" or a list or table of "normals".). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 465 */ 466 public ObservationReferenceRangeComponent setTextElement(StringType value) { 467 this.text = value; 468 return this; 469 } 470 471 /** 472 * @return Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of "Negative" or a list or table of "normals". 473 */ 474 public String getText() { 475 return this.text == null ? null : this.text.getValue(); 476 } 477 478 /** 479 * @param value Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of "Negative" or a list or table of "normals". 480 */ 481 public ObservationReferenceRangeComponent setText(String value) { 482 if (Utilities.noString(value)) 483 this.text = null; 484 else { 485 if (this.text == null) 486 this.text = new StringType(); 487 this.text.setValue(value); 488 } 489 return this; 490 } 491 492 protected void listChildren(List<Property> children) { 493 super.listChildren(children); 494 children.add(new Property("low", "SimpleQuantity", "The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3).", 0, 1, low)); 495 children.add(new Property("high", "SimpleQuantity", "The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3).", 0, 1, high)); 496 children.add(new Property("type", "CodeableConcept", "Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range.", 0, 1, type)); 497 children.add(new Property("appliesTo", "CodeableConcept", "Codes to indicate the target population this reference range applies to. For example, a reference range may be based on the normal population or a particular sex or race.", 0, java.lang.Integer.MAX_VALUE, appliesTo)); 498 children.add(new Property("age", "Range", "The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.", 0, 1, age)); 499 children.add(new Property("text", "string", "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of \"Negative\" or a list or table of \"normals\".", 0, 1, text)); 500 } 501 502 @Override 503 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 504 switch (_hash) { 505 case 107348: /*low*/ return new Property("low", "SimpleQuantity", "The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3).", 0, 1, low); 506 case 3202466: /*high*/ return new Property("high", "SimpleQuantity", "The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3).", 0, 1, high); 507 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range.", 0, 1, type); 508 case -2089924569: /*appliesTo*/ return new Property("appliesTo", "CodeableConcept", "Codes to indicate the target population this reference range applies to. For example, a reference range may be based on the normal population or a particular sex or race.", 0, java.lang.Integer.MAX_VALUE, appliesTo); 509 case 96511: /*age*/ return new Property("age", "Range", "The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.", 0, 1, age); 510 case 3556653: /*text*/ return new Property("text", "string", "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of \"Negative\" or a list or table of \"normals\".", 0, 1, text); 511 default: return super.getNamedProperty(_hash, _name, _checkValid); 512 } 513 514 } 515 516 @Override 517 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 518 switch (hash) { 519 case 107348: /*low*/ return this.low == null ? new Base[0] : new Base[] {this.low}; // Quantity 520 case 3202466: /*high*/ return this.high == null ? new Base[0] : new Base[] {this.high}; // Quantity 521 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 522 case -2089924569: /*appliesTo*/ return this.appliesTo == null ? new Base[0] : this.appliesTo.toArray(new Base[this.appliesTo.size()]); // CodeableConcept 523 case 96511: /*age*/ return this.age == null ? new Base[0] : new Base[] {this.age}; // Range 524 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType 525 default: return super.getProperty(hash, name, checkValid); 526 } 527 528 } 529 530 @Override 531 public Base setProperty(int hash, String name, Base value) throws FHIRException { 532 switch (hash) { 533 case 107348: // low 534 this.low = castToQuantity(value); // Quantity 535 return value; 536 case 3202466: // high 537 this.high = castToQuantity(value); // Quantity 538 return value; 539 case 3575610: // type 540 this.type = castToCodeableConcept(value); // CodeableConcept 541 return value; 542 case -2089924569: // appliesTo 543 this.getAppliesTo().add(castToCodeableConcept(value)); // CodeableConcept 544 return value; 545 case 96511: // age 546 this.age = castToRange(value); // Range 547 return value; 548 case 3556653: // text 549 this.text = castToString(value); // StringType 550 return value; 551 default: return super.setProperty(hash, name, value); 552 } 553 554 } 555 556 @Override 557 public Base setProperty(String name, Base value) throws FHIRException { 558 if (name.equals("low")) { 559 this.low = castToQuantity(value); // Quantity 560 } else if (name.equals("high")) { 561 this.high = castToQuantity(value); // Quantity 562 } else if (name.equals("type")) { 563 this.type = castToCodeableConcept(value); // CodeableConcept 564 } else if (name.equals("appliesTo")) { 565 this.getAppliesTo().add(castToCodeableConcept(value)); 566 } else if (name.equals("age")) { 567 this.age = castToRange(value); // Range 568 } else if (name.equals("text")) { 569 this.text = castToString(value); // StringType 570 } else 571 return super.setProperty(name, value); 572 return value; 573 } 574 575 @Override 576 public Base makeProperty(int hash, String name) throws FHIRException { 577 switch (hash) { 578 case 107348: return getLow(); 579 case 3202466: return getHigh(); 580 case 3575610: return getType(); 581 case -2089924569: return addAppliesTo(); 582 case 96511: return getAge(); 583 case 3556653: return getTextElement(); 584 default: return super.makeProperty(hash, name); 585 } 586 587 } 588 589 @Override 590 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 591 switch (hash) { 592 case 107348: /*low*/ return new String[] {"SimpleQuantity"}; 593 case 3202466: /*high*/ return new String[] {"SimpleQuantity"}; 594 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 595 case -2089924569: /*appliesTo*/ return new String[] {"CodeableConcept"}; 596 case 96511: /*age*/ return new String[] {"Range"}; 597 case 3556653: /*text*/ return new String[] {"string"}; 598 default: return super.getTypesForProperty(hash, name); 599 } 600 601 } 602 603 @Override 604 public Base addChild(String name) throws FHIRException { 605 if (name.equals("low")) { 606 this.low = new Quantity(); 607 return this.low; 608 } 609 else if (name.equals("high")) { 610 this.high = new Quantity(); 611 return this.high; 612 } 613 else if (name.equals("type")) { 614 this.type = new CodeableConcept(); 615 return this.type; 616 } 617 else if (name.equals("appliesTo")) { 618 return addAppliesTo(); 619 } 620 else if (name.equals("age")) { 621 this.age = new Range(); 622 return this.age; 623 } 624 else if (name.equals("text")) { 625 throw new FHIRException("Cannot call addChild on a primitive type Observation.text"); 626 } 627 else 628 return super.addChild(name); 629 } 630 631 public ObservationReferenceRangeComponent copy() { 632 ObservationReferenceRangeComponent dst = new ObservationReferenceRangeComponent(); 633 copyValues(dst); 634 dst.low = low == null ? null : low.copy(); 635 dst.high = high == null ? null : high.copy(); 636 dst.type = type == null ? null : type.copy(); 637 if (appliesTo != null) { 638 dst.appliesTo = new ArrayList<CodeableConcept>(); 639 for (CodeableConcept i : appliesTo) 640 dst.appliesTo.add(i.copy()); 641 }; 642 dst.age = age == null ? null : age.copy(); 643 dst.text = text == null ? null : text.copy(); 644 return dst; 645 } 646 647 @Override 648 public boolean equalsDeep(Base other_) { 649 if (!super.equalsDeep(other_)) 650 return false; 651 if (!(other_ instanceof ObservationReferenceRangeComponent)) 652 return false; 653 ObservationReferenceRangeComponent o = (ObservationReferenceRangeComponent) other_; 654 return compareDeep(low, o.low, true) && compareDeep(high, o.high, true) && compareDeep(type, o.type, true) 655 && compareDeep(appliesTo, o.appliesTo, true) && compareDeep(age, o.age, true) && compareDeep(text, o.text, true) 656 ; 657 } 658 659 @Override 660 public boolean equalsShallow(Base other_) { 661 if (!super.equalsShallow(other_)) 662 return false; 663 if (!(other_ instanceof ObservationReferenceRangeComponent)) 664 return false; 665 ObservationReferenceRangeComponent o = (ObservationReferenceRangeComponent) other_; 666 return compareValues(text, o.text, true); 667 } 668 669 public boolean isEmpty() { 670 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(low, high, type, appliesTo 671 , age, text); 672 } 673 674 public String fhirType() { 675 return "Observation.referenceRange"; 676 677 } 678 679 } 680 681 @Block() 682 public static class ObservationComponentComponent extends BackboneElement implements IBaseBackboneElement { 683 /** 684 * Describes what was observed. Sometimes this is called the observation "code". 685 */ 686 @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) 687 @Description(shortDefinition="Type of component observation (code / type)", formalDefinition="Describes what was observed. Sometimes this is called the observation \"code\"." ) 688 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-codes") 689 protected CodeableConcept code; 690 691 /** 692 * The information determined as a result of making the observation, if the information has a simple value. 693 */ 694 @Child(name = "value", type = {Quantity.class, CodeableConcept.class, StringType.class, BooleanType.class, IntegerType.class, Range.class, Ratio.class, SampledData.class, TimeType.class, DateTimeType.class, Period.class}, order=2, min=0, max=1, modifier=false, summary=true) 695 @Description(shortDefinition="Actual component result", formalDefinition="The information determined as a result of making the observation, if the information has a simple value." ) 696 protected Type value; 697 698 /** 699 * Provides a reason why the expected value in the element Observation.component.value[x] is missing. 700 */ 701 @Child(name = "dataAbsentReason", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 702 @Description(shortDefinition="Why the component result is missing", formalDefinition="Provides a reason why the expected value in the element Observation.component.value[x] is missing." ) 703 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/data-absent-reason") 704 protected CodeableConcept dataAbsentReason; 705 706 /** 707 * A categorical assessment of an observation value. For example, high, low, normal. 708 */ 709 @Child(name = "interpretation", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 710 @Description(shortDefinition="High, low, normal, etc.", formalDefinition="A categorical assessment of an observation value. For example, high, low, normal." ) 711 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-interpretation") 712 protected List<CodeableConcept> interpretation; 713 714 /** 715 * Guidance on how to interpret the value by comparison to a normal or recommended range. 716 */ 717 @Child(name = "referenceRange", type = {ObservationReferenceRangeComponent.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 718 @Description(shortDefinition="Provides guide for interpretation of component result", formalDefinition="Guidance on how to interpret the value by comparison to a normal or recommended range." ) 719 protected List<ObservationReferenceRangeComponent> referenceRange; 720 721 private static final long serialVersionUID = 576590931L; 722 723 /** 724 * Constructor 725 */ 726 public ObservationComponentComponent() { 727 super(); 728 } 729 730 /** 731 * Constructor 732 */ 733 public ObservationComponentComponent(CodeableConcept code) { 734 super(); 735 this.code = code; 736 } 737 738 /** 739 * @return {@link #code} (Describes what was observed. Sometimes this is called the observation "code".) 740 */ 741 public CodeableConcept getCode() { 742 if (this.code == null) 743 if (Configuration.errorOnAutoCreate()) 744 throw new Error("Attempt to auto-create ObservationComponentComponent.code"); 745 else if (Configuration.doAutoCreate()) 746 this.code = new CodeableConcept(); // cc 747 return this.code; 748 } 749 750 public boolean hasCode() { 751 return this.code != null && !this.code.isEmpty(); 752 } 753 754 /** 755 * @param value {@link #code} (Describes what was observed. Sometimes this is called the observation "code".) 756 */ 757 public ObservationComponentComponent setCode(CodeableConcept value) { 758 this.code = value; 759 return this; 760 } 761 762 /** 763 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 764 */ 765 public Type getValue() { 766 return this.value; 767 } 768 769 /** 770 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 771 */ 772 public Quantity getValueQuantity() throws FHIRException { 773 if (this.value == null) 774 return null; 775 if (!(this.value instanceof Quantity)) 776 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered"); 777 return (Quantity) this.value; 778 } 779 780 public boolean hasValueQuantity() { 781 return this != null && this.value instanceof Quantity; 782 } 783 784 /** 785 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 786 */ 787 public CodeableConcept getValueCodeableConcept() throws FHIRException { 788 if (this.value == null) 789 return null; 790 if (!(this.value instanceof CodeableConcept)) 791 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered"); 792 return (CodeableConcept) this.value; 793 } 794 795 public boolean hasValueCodeableConcept() { 796 return this != null && this.value instanceof CodeableConcept; 797 } 798 799 /** 800 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 801 */ 802 public StringType getValueStringType() throws FHIRException { 803 if (this.value == null) 804 return null; 805 if (!(this.value instanceof StringType)) 806 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); 807 return (StringType) this.value; 808 } 809 810 public boolean hasValueStringType() { 811 return this != null && this.value instanceof StringType; 812 } 813 814 /** 815 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 816 */ 817 public BooleanType getValueBooleanType() throws FHIRException { 818 if (this.value == null) 819 return null; 820 if (!(this.value instanceof BooleanType)) 821 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); 822 return (BooleanType) this.value; 823 } 824 825 public boolean hasValueBooleanType() { 826 return this != null && this.value instanceof BooleanType; 827 } 828 829 /** 830 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 831 */ 832 public IntegerType getValueIntegerType() throws FHIRException { 833 if (this.value == null) 834 return null; 835 if (!(this.value instanceof IntegerType)) 836 throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered"); 837 return (IntegerType) this.value; 838 } 839 840 public boolean hasValueIntegerType() { 841 return this != null && this.value instanceof IntegerType; 842 } 843 844 /** 845 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 846 */ 847 public Range getValueRange() throws FHIRException { 848 if (this.value == null) 849 return null; 850 if (!(this.value instanceof Range)) 851 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered"); 852 return (Range) this.value; 853 } 854 855 public boolean hasValueRange() { 856 return this != null && this.value instanceof Range; 857 } 858 859 /** 860 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 861 */ 862 public Ratio getValueRatio() throws FHIRException { 863 if (this.value == null) 864 return null; 865 if (!(this.value instanceof Ratio)) 866 throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.value.getClass().getName()+" was encountered"); 867 return (Ratio) this.value; 868 } 869 870 public boolean hasValueRatio() { 871 return this != null && this.value instanceof Ratio; 872 } 873 874 /** 875 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 876 */ 877 public SampledData getValueSampledData() throws FHIRException { 878 if (this.value == null) 879 return null; 880 if (!(this.value instanceof SampledData)) 881 throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.value.getClass().getName()+" was encountered"); 882 return (SampledData) this.value; 883 } 884 885 public boolean hasValueSampledData() { 886 return this != null && this.value instanceof SampledData; 887 } 888 889 /** 890 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 891 */ 892 public TimeType getValueTimeType() throws FHIRException { 893 if (this.value == null) 894 return null; 895 if (!(this.value instanceof TimeType)) 896 throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered"); 897 return (TimeType) this.value; 898 } 899 900 public boolean hasValueTimeType() { 901 return this != null && this.value instanceof TimeType; 902 } 903 904 /** 905 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 906 */ 907 public DateTimeType getValueDateTimeType() throws FHIRException { 908 if (this.value == null) 909 return null; 910 if (!(this.value instanceof DateTimeType)) 911 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered"); 912 return (DateTimeType) this.value; 913 } 914 915 public boolean hasValueDateTimeType() { 916 return this != null && this.value instanceof DateTimeType; 917 } 918 919 /** 920 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 921 */ 922 public Period getValuePeriod() throws FHIRException { 923 if (this.value == null) 924 return null; 925 if (!(this.value instanceof Period)) 926 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered"); 927 return (Period) this.value; 928 } 929 930 public boolean hasValuePeriod() { 931 return this != null && this.value instanceof Period; 932 } 933 934 public boolean hasValue() { 935 return this.value != null && !this.value.isEmpty(); 936 } 937 938 /** 939 * @param value {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 940 */ 941 public ObservationComponentComponent setValue(Type value) { 942 if (value != null && !(value instanceof Quantity || value instanceof CodeableConcept || value instanceof StringType || value instanceof BooleanType || value instanceof IntegerType || value instanceof Range || value instanceof Ratio || value instanceof SampledData || value instanceof TimeType || value instanceof DateTimeType || value instanceof Period)) 943 throw new Error("Not the right type for Observation.component.value[x]: "+value.fhirType()); 944 this.value = value; 945 return this; 946 } 947 948 /** 949 * @return {@link #dataAbsentReason} (Provides a reason why the expected value in the element Observation.component.value[x] is missing.) 950 */ 951 public CodeableConcept getDataAbsentReason() { 952 if (this.dataAbsentReason == null) 953 if (Configuration.errorOnAutoCreate()) 954 throw new Error("Attempt to auto-create ObservationComponentComponent.dataAbsentReason"); 955 else if (Configuration.doAutoCreate()) 956 this.dataAbsentReason = new CodeableConcept(); // cc 957 return this.dataAbsentReason; 958 } 959 960 public boolean hasDataAbsentReason() { 961 return this.dataAbsentReason != null && !this.dataAbsentReason.isEmpty(); 962 } 963 964 /** 965 * @param value {@link #dataAbsentReason} (Provides a reason why the expected value in the element Observation.component.value[x] is missing.) 966 */ 967 public ObservationComponentComponent setDataAbsentReason(CodeableConcept value) { 968 this.dataAbsentReason = value; 969 return this; 970 } 971 972 /** 973 * @return {@link #interpretation} (A categorical assessment of an observation value. For example, high, low, normal.) 974 */ 975 public List<CodeableConcept> getInterpretation() { 976 if (this.interpretation == null) 977 this.interpretation = new ArrayList<CodeableConcept>(); 978 return this.interpretation; 979 } 980 981 /** 982 * @return Returns a reference to <code>this</code> for easy method chaining 983 */ 984 public ObservationComponentComponent setInterpretation(List<CodeableConcept> theInterpretation) { 985 this.interpretation = theInterpretation; 986 return this; 987 } 988 989 public boolean hasInterpretation() { 990 if (this.interpretation == null) 991 return false; 992 for (CodeableConcept item : this.interpretation) 993 if (!item.isEmpty()) 994 return true; 995 return false; 996 } 997 998 public CodeableConcept addInterpretation() { //3 999 CodeableConcept t = new CodeableConcept(); 1000 if (this.interpretation == null) 1001 this.interpretation = new ArrayList<CodeableConcept>(); 1002 this.interpretation.add(t); 1003 return t; 1004 } 1005 1006 public ObservationComponentComponent addInterpretation(CodeableConcept t) { //3 1007 if (t == null) 1008 return this; 1009 if (this.interpretation == null) 1010 this.interpretation = new ArrayList<CodeableConcept>(); 1011 this.interpretation.add(t); 1012 return this; 1013 } 1014 1015 /** 1016 * @return The first repetition of repeating field {@link #interpretation}, creating it if it does not already exist 1017 */ 1018 public CodeableConcept getInterpretationFirstRep() { 1019 if (getInterpretation().isEmpty()) { 1020 addInterpretation(); 1021 } 1022 return getInterpretation().get(0); 1023 } 1024 1025 /** 1026 * @return {@link #referenceRange} (Guidance on how to interpret the value by comparison to a normal or recommended range.) 1027 */ 1028 public List<ObservationReferenceRangeComponent> getReferenceRange() { 1029 if (this.referenceRange == null) 1030 this.referenceRange = new ArrayList<ObservationReferenceRangeComponent>(); 1031 return this.referenceRange; 1032 } 1033 1034 /** 1035 * @return Returns a reference to <code>this</code> for easy method chaining 1036 */ 1037 public ObservationComponentComponent setReferenceRange(List<ObservationReferenceRangeComponent> theReferenceRange) { 1038 this.referenceRange = theReferenceRange; 1039 return this; 1040 } 1041 1042 public boolean hasReferenceRange() { 1043 if (this.referenceRange == null) 1044 return false; 1045 for (ObservationReferenceRangeComponent item : this.referenceRange) 1046 if (!item.isEmpty()) 1047 return true; 1048 return false; 1049 } 1050 1051 public ObservationReferenceRangeComponent addReferenceRange() { //3 1052 ObservationReferenceRangeComponent t = new ObservationReferenceRangeComponent(); 1053 if (this.referenceRange == null) 1054 this.referenceRange = new ArrayList<ObservationReferenceRangeComponent>(); 1055 this.referenceRange.add(t); 1056 return t; 1057 } 1058 1059 public ObservationComponentComponent addReferenceRange(ObservationReferenceRangeComponent t) { //3 1060 if (t == null) 1061 return this; 1062 if (this.referenceRange == null) 1063 this.referenceRange = new ArrayList<ObservationReferenceRangeComponent>(); 1064 this.referenceRange.add(t); 1065 return this; 1066 } 1067 1068 /** 1069 * @return The first repetition of repeating field {@link #referenceRange}, creating it if it does not already exist 1070 */ 1071 public ObservationReferenceRangeComponent getReferenceRangeFirstRep() { 1072 if (getReferenceRange().isEmpty()) { 1073 addReferenceRange(); 1074 } 1075 return getReferenceRange().get(0); 1076 } 1077 1078 protected void listChildren(List<Property> children) { 1079 super.listChildren(children); 1080 children.add(new Property("code", "CodeableConcept", "Describes what was observed. Sometimes this is called the observation \"code\".", 0, 1, code)); 1081 children.add(new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value)); 1082 children.add(new Property("dataAbsentReason", "CodeableConcept", "Provides a reason why the expected value in the element Observation.component.value[x] is missing.", 0, 1, dataAbsentReason)); 1083 children.add(new Property("interpretation", "CodeableConcept", "A categorical assessment of an observation value. For example, high, low, normal.", 0, java.lang.Integer.MAX_VALUE, interpretation)); 1084 children.add(new Property("referenceRange", "@Observation.referenceRange", "Guidance on how to interpret the value by comparison to a normal or recommended range.", 0, java.lang.Integer.MAX_VALUE, referenceRange)); 1085 } 1086 1087 @Override 1088 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1089 switch (_hash) { 1090 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "Describes what was observed. Sometimes this is called the observation \"code\".", 0, 1, code); 1091 case -1410166417: /*value[x]*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 1092 case 111972721: /*value*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 1093 case -2029823716: /*valueQuantity*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 1094 case 924902896: /*valueCodeableConcept*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 1095 case -1424603934: /*valueString*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 1096 case 733421943: /*valueBoolean*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 1097 case -1668204915: /*valueInteger*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 1098 case 2030761548: /*valueRange*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 1099 case 2030767386: /*valueRatio*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 1100 case -962229101: /*valueSampledData*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 1101 case -765708322: /*valueTime*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 1102 case 1047929900: /*valueDateTime*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 1103 case -1524344174: /*valuePeriod*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 1104 case 1034315687: /*dataAbsentReason*/ return new Property("dataAbsentReason", "CodeableConcept", "Provides a reason why the expected value in the element Observation.component.value[x] is missing.", 0, 1, dataAbsentReason); 1105 case -297950712: /*interpretation*/ return new Property("interpretation", "CodeableConcept", "A categorical assessment of an observation value. For example, high, low, normal.", 0, java.lang.Integer.MAX_VALUE, interpretation); 1106 case -1912545102: /*referenceRange*/ return new Property("referenceRange", "@Observation.referenceRange", "Guidance on how to interpret the value by comparison to a normal or recommended range.", 0, java.lang.Integer.MAX_VALUE, referenceRange); 1107 default: return super.getNamedProperty(_hash, _name, _checkValid); 1108 } 1109 1110 } 1111 1112 @Override 1113 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1114 switch (hash) { 1115 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 1116 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Type 1117 case 1034315687: /*dataAbsentReason*/ return this.dataAbsentReason == null ? new Base[0] : new Base[] {this.dataAbsentReason}; // CodeableConcept 1118 case -297950712: /*interpretation*/ return this.interpretation == null ? new Base[0] : this.interpretation.toArray(new Base[this.interpretation.size()]); // CodeableConcept 1119 case -1912545102: /*referenceRange*/ return this.referenceRange == null ? new Base[0] : this.referenceRange.toArray(new Base[this.referenceRange.size()]); // ObservationReferenceRangeComponent 1120 default: return super.getProperty(hash, name, checkValid); 1121 } 1122 1123 } 1124 1125 @Override 1126 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1127 switch (hash) { 1128 case 3059181: // code 1129 this.code = castToCodeableConcept(value); // CodeableConcept 1130 return value; 1131 case 111972721: // value 1132 this.value = castToType(value); // Type 1133 return value; 1134 case 1034315687: // dataAbsentReason 1135 this.dataAbsentReason = castToCodeableConcept(value); // CodeableConcept 1136 return value; 1137 case -297950712: // interpretation 1138 this.getInterpretation().add(castToCodeableConcept(value)); // CodeableConcept 1139 return value; 1140 case -1912545102: // referenceRange 1141 this.getReferenceRange().add((ObservationReferenceRangeComponent) value); // ObservationReferenceRangeComponent 1142 return value; 1143 default: return super.setProperty(hash, name, value); 1144 } 1145 1146 } 1147 1148 @Override 1149 public Base setProperty(String name, Base value) throws FHIRException { 1150 if (name.equals("code")) { 1151 this.code = castToCodeableConcept(value); // CodeableConcept 1152 } else if (name.equals("value[x]")) { 1153 this.value = castToType(value); // Type 1154 } else if (name.equals("dataAbsentReason")) { 1155 this.dataAbsentReason = castToCodeableConcept(value); // CodeableConcept 1156 } else if (name.equals("interpretation")) { 1157 this.getInterpretation().add(castToCodeableConcept(value)); 1158 } else if (name.equals("referenceRange")) { 1159 this.getReferenceRange().add((ObservationReferenceRangeComponent) value); 1160 } else 1161 return super.setProperty(name, value); 1162 return value; 1163 } 1164 1165 @Override 1166 public Base makeProperty(int hash, String name) throws FHIRException { 1167 switch (hash) { 1168 case 3059181: return getCode(); 1169 case -1410166417: return getValue(); 1170 case 111972721: return getValue(); 1171 case 1034315687: return getDataAbsentReason(); 1172 case -297950712: return addInterpretation(); 1173 case -1912545102: return addReferenceRange(); 1174 default: return super.makeProperty(hash, name); 1175 } 1176 1177 } 1178 1179 @Override 1180 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1181 switch (hash) { 1182 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 1183 case 111972721: /*value*/ return new String[] {"Quantity", "CodeableConcept", "string", "boolean", "integer", "Range", "Ratio", "SampledData", "time", "dateTime", "Period"}; 1184 case 1034315687: /*dataAbsentReason*/ return new String[] {"CodeableConcept"}; 1185 case -297950712: /*interpretation*/ return new String[] {"CodeableConcept"}; 1186 case -1912545102: /*referenceRange*/ return new String[] {"@Observation.referenceRange"}; 1187 default: return super.getTypesForProperty(hash, name); 1188 } 1189 1190 } 1191 1192 @Override 1193 public Base addChild(String name) throws FHIRException { 1194 if (name.equals("code")) { 1195 this.code = new CodeableConcept(); 1196 return this.code; 1197 } 1198 else if (name.equals("valueQuantity")) { 1199 this.value = new Quantity(); 1200 return this.value; 1201 } 1202 else if (name.equals("valueCodeableConcept")) { 1203 this.value = new CodeableConcept(); 1204 return this.value; 1205 } 1206 else if (name.equals("valueString")) { 1207 this.value = new StringType(); 1208 return this.value; 1209 } 1210 else if (name.equals("valueBoolean")) { 1211 this.value = new BooleanType(); 1212 return this.value; 1213 } 1214 else if (name.equals("valueInteger")) { 1215 this.value = new IntegerType(); 1216 return this.value; 1217 } 1218 else if (name.equals("valueRange")) { 1219 this.value = new Range(); 1220 return this.value; 1221 } 1222 else if (name.equals("valueRatio")) { 1223 this.value = new Ratio(); 1224 return this.value; 1225 } 1226 else if (name.equals("valueSampledData")) { 1227 this.value = new SampledData(); 1228 return this.value; 1229 } 1230 else if (name.equals("valueTime")) { 1231 this.value = new TimeType(); 1232 return this.value; 1233 } 1234 else if (name.equals("valueDateTime")) { 1235 this.value = new DateTimeType(); 1236 return this.value; 1237 } 1238 else if (name.equals("valuePeriod")) { 1239 this.value = new Period(); 1240 return this.value; 1241 } 1242 else if (name.equals("dataAbsentReason")) { 1243 this.dataAbsentReason = new CodeableConcept(); 1244 return this.dataAbsentReason; 1245 } 1246 else if (name.equals("interpretation")) { 1247 return addInterpretation(); 1248 } 1249 else if (name.equals("referenceRange")) { 1250 return addReferenceRange(); 1251 } 1252 else 1253 return super.addChild(name); 1254 } 1255 1256 public ObservationComponentComponent copy() { 1257 ObservationComponentComponent dst = new ObservationComponentComponent(); 1258 copyValues(dst); 1259 dst.code = code == null ? null : code.copy(); 1260 dst.value = value == null ? null : value.copy(); 1261 dst.dataAbsentReason = dataAbsentReason == null ? null : dataAbsentReason.copy(); 1262 if (interpretation != null) { 1263 dst.interpretation = new ArrayList<CodeableConcept>(); 1264 for (CodeableConcept i : interpretation) 1265 dst.interpretation.add(i.copy()); 1266 }; 1267 if (referenceRange != null) { 1268 dst.referenceRange = new ArrayList<ObservationReferenceRangeComponent>(); 1269 for (ObservationReferenceRangeComponent i : referenceRange) 1270 dst.referenceRange.add(i.copy()); 1271 }; 1272 return dst; 1273 } 1274 1275 @Override 1276 public boolean equalsDeep(Base other_) { 1277 if (!super.equalsDeep(other_)) 1278 return false; 1279 if (!(other_ instanceof ObservationComponentComponent)) 1280 return false; 1281 ObservationComponentComponent o = (ObservationComponentComponent) other_; 1282 return compareDeep(code, o.code, true) && compareDeep(value, o.value, true) && compareDeep(dataAbsentReason, o.dataAbsentReason, true) 1283 && compareDeep(interpretation, o.interpretation, true) && compareDeep(referenceRange, o.referenceRange, true) 1284 ; 1285 } 1286 1287 @Override 1288 public boolean equalsShallow(Base other_) { 1289 if (!super.equalsShallow(other_)) 1290 return false; 1291 if (!(other_ instanceof ObservationComponentComponent)) 1292 return false; 1293 ObservationComponentComponent o = (ObservationComponentComponent) other_; 1294 return true; 1295 } 1296 1297 public boolean isEmpty() { 1298 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, value, dataAbsentReason 1299 , interpretation, referenceRange); 1300 } 1301 1302 public String fhirType() { 1303 return "Observation.component"; 1304 1305 } 1306 1307 } 1308 1309 /** 1310 * A unique identifier assigned to this observation. 1311 */ 1312 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1313 @Description(shortDefinition="Business Identifier for observation", formalDefinition="A unique identifier assigned to this observation." ) 1314 protected List<Identifier> identifier; 1315 1316 /** 1317 * A plan, proposal or order that is fulfilled in whole or in part by this event. For example, a MedicationRequest may require a patient to have laboratory test performed before it is dispensed. 1318 */ 1319 @Child(name = "basedOn", type = {CarePlan.class, DeviceRequest.class, ImmunizationRecommendation.class, MedicationRequest.class, NutritionOrder.class, ServiceRequest.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1320 @Description(shortDefinition="Fulfills plan, proposal or order", formalDefinition="A plan, proposal or order that is fulfilled in whole or in part by this event. For example, a MedicationRequest may require a patient to have laboratory test performed before it is dispensed." ) 1321 protected List<Reference> basedOn; 1322 /** 1323 * The actual objects that are the target of the reference (A plan, proposal or order that is fulfilled in whole or in part by this event. For example, a MedicationRequest may require a patient to have laboratory test performed before it is dispensed.) 1324 */ 1325 protected List<Resource> basedOnTarget; 1326 1327 1328 /** 1329 * A larger event of which this particular Observation is a component or step. For example, an observation as part of a procedure. 1330 */ 1331 @Child(name = "partOf", type = {MedicationAdministration.class, MedicationDispense.class, MedicationStatement.class, Procedure.class, Immunization.class, ImagingStudy.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1332 @Description(shortDefinition="Part of referenced event", formalDefinition="A larger event of which this particular Observation is a component or step. For example, an observation as part of a procedure." ) 1333 protected List<Reference> partOf; 1334 /** 1335 * The actual objects that are the target of the reference (A larger event of which this particular Observation is a component or step. For example, an observation as part of a procedure.) 1336 */ 1337 protected List<Resource> partOfTarget; 1338 1339 1340 /** 1341 * The status of the result value. 1342 */ 1343 @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true) 1344 @Description(shortDefinition="registered | preliminary | final | amended +", formalDefinition="The status of the result value." ) 1345 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-status") 1346 protected Enumeration<ObservationStatus> status; 1347 1348 /** 1349 * A code that classifies the general type of observation being made. 1350 */ 1351 @Child(name = "category", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1352 @Description(shortDefinition="Classification of type of observation", formalDefinition="A code that classifies the general type of observation being made." ) 1353 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-category") 1354 protected List<CodeableConcept> category; 1355 1356 /** 1357 * Describes what was observed. Sometimes this is called the observation "name". 1358 */ 1359 @Child(name = "code", type = {CodeableConcept.class}, order=5, min=1, max=1, modifier=false, summary=true) 1360 @Description(shortDefinition="Type of observation (code / type)", formalDefinition="Describes what was observed. Sometimes this is called the observation \"name\"." ) 1361 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-codes") 1362 protected CodeableConcept code; 1363 1364 /** 1365 * The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation. 1366 */ 1367 @Child(name = "subject", type = {Patient.class, Group.class, Device.class, Location.class}, order=6, min=0, max=1, modifier=false, summary=true) 1368 @Description(shortDefinition="Who and/or what the observation is about", formalDefinition="The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation." ) 1369 protected Reference subject; 1370 1371 /** 1372 * The actual object that is the target of the reference (The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.) 1373 */ 1374 protected Resource subjectTarget; 1375 1376 /** 1377 * The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record. The focus of an observation could also be an existing condition, an intervention, the subject's diet, another observation of the subject, or a body structure such as tumor or implanted device. An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus. 1378 */ 1379 @Child(name = "focus", type = {Reference.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1380 @Description(shortDefinition="What the observation is about, when it is not about the subject of record", formalDefinition="The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record. The focus of an observation could also be an existing condition, an intervention, the subject's diet, another observation of the subject, or a body structure such as tumor or implanted device. An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus." ) 1381 protected List<Reference> focus; 1382 /** 1383 * The actual objects that are the target of the reference (The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record. The focus of an observation could also be an existing condition, an intervention, the subject's diet, another observation of the subject, or a body structure such as tumor or implanted device. An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus.) 1384 */ 1385 protected List<Resource> focusTarget; 1386 1387 1388 /** 1389 * The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made. 1390 */ 1391 @Child(name = "encounter", type = {Encounter.class}, order=8, min=0, max=1, modifier=false, summary=true) 1392 @Description(shortDefinition="Healthcare event during which this observation is made", formalDefinition="The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made." ) 1393 protected Reference encounter; 1394 1395 /** 1396 * The actual object that is the target of the reference (The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.) 1397 */ 1398 protected Encounter encounterTarget; 1399 1400 /** 1401 * The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself. 1402 */ 1403 @Child(name = "effective", type = {DateTimeType.class, Period.class, Timing.class, InstantType.class}, order=9, min=0, max=1, modifier=false, summary=true) 1404 @Description(shortDefinition="Clinically relevant time/time-period for observation", formalDefinition="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself." ) 1405 protected Type effective; 1406 1407 /** 1408 * The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified. 1409 */ 1410 @Child(name = "issued", type = {InstantType.class}, order=10, min=0, max=1, modifier=false, summary=true) 1411 @Description(shortDefinition="Date/Time this version was made available", formalDefinition="The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified." ) 1412 protected InstantType issued; 1413 1414 /** 1415 * Who was responsible for asserting the observed value as "true". 1416 */ 1417 @Child(name = "performer", type = {Practitioner.class, PractitionerRole.class, Organization.class, CareTeam.class, Patient.class, RelatedPerson.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1418 @Description(shortDefinition="Who is responsible for the observation", formalDefinition="Who was responsible for asserting the observed value as \"true\"." ) 1419 protected List<Reference> performer; 1420 /** 1421 * The actual objects that are the target of the reference (Who was responsible for asserting the observed value as "true".) 1422 */ 1423 protected List<Resource> performerTarget; 1424 1425 1426 /** 1427 * The information determined as a result of making the observation, if the information has a simple value. 1428 */ 1429 @Child(name = "value", type = {Quantity.class, CodeableConcept.class, StringType.class, BooleanType.class, IntegerType.class, Range.class, Ratio.class, SampledData.class, TimeType.class, DateTimeType.class, Period.class}, order=12, min=0, max=1, modifier=false, summary=true) 1430 @Description(shortDefinition="Actual result", formalDefinition="The information determined as a result of making the observation, if the information has a simple value." ) 1431 protected Type value; 1432 1433 /** 1434 * Provides a reason why the expected value in the element Observation.value[x] is missing. 1435 */ 1436 @Child(name = "dataAbsentReason", type = {CodeableConcept.class}, order=13, min=0, max=1, modifier=false, summary=false) 1437 @Description(shortDefinition="Why the result is missing", formalDefinition="Provides a reason why the expected value in the element Observation.value[x] is missing." ) 1438 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/data-absent-reason") 1439 protected CodeableConcept dataAbsentReason; 1440 1441 /** 1442 * A categorical assessment of an observation value. For example, high, low, normal. 1443 */ 1444 @Child(name = "interpretation", type = {CodeableConcept.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1445 @Description(shortDefinition="High, low, normal, etc.", formalDefinition="A categorical assessment of an observation value. For example, high, low, normal." ) 1446 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-interpretation") 1447 protected List<CodeableConcept> interpretation; 1448 1449 /** 1450 * Comments about the test result value may include statements about significant, unexpected or unreliable results values, or information about the its source when this is relevant to its interpretation. 1451 */ 1452 @Child(name = "comment", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=false) 1453 @Description(shortDefinition="Comments about the test result value", formalDefinition="Comments about the test result value may include statements about significant, unexpected or unreliable results values, or information about the its source when this is relevant to its interpretation." ) 1454 protected StringType comment; 1455 1456 /** 1457 * Indicates the site on the subject's body where the observation was made (i.e. the target site). 1458 */ 1459 @Child(name = "bodySite", type = {CodeableConcept.class}, order=16, min=0, max=1, modifier=false, summary=false) 1460 @Description(shortDefinition="Observed body part", formalDefinition="Indicates the site on the subject's body where the observation was made (i.e. the target site)." ) 1461 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/body-site") 1462 protected CodeableConcept bodySite; 1463 1464 /** 1465 * Indicates the mechanism used to perform the observation. 1466 */ 1467 @Child(name = "method", type = {CodeableConcept.class}, order=17, min=0, max=1, modifier=false, summary=false) 1468 @Description(shortDefinition="How it was done", formalDefinition="Indicates the mechanism used to perform the observation." ) 1469 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-methods") 1470 protected CodeableConcept method; 1471 1472 /** 1473 * The specimen that was used when this observation was made. 1474 */ 1475 @Child(name = "specimen", type = {Specimen.class}, order=18, min=0, max=1, modifier=false, summary=false) 1476 @Description(shortDefinition="Specimen used for this observation", formalDefinition="The specimen that was used when this observation was made." ) 1477 protected Reference specimen; 1478 1479 /** 1480 * The actual object that is the target of the reference (The specimen that was used when this observation was made.) 1481 */ 1482 protected Specimen specimenTarget; 1483 1484 /** 1485 * The device used to generate the observation data. 1486 */ 1487 @Child(name = "device", type = {Device.class, DeviceMetric.class}, order=19, min=0, max=1, modifier=false, summary=false) 1488 @Description(shortDefinition="(Measurement) Device", formalDefinition="The device used to generate the observation data." ) 1489 protected Reference device; 1490 1491 /** 1492 * The actual object that is the target of the reference (The device used to generate the observation data.) 1493 */ 1494 protected Resource deviceTarget; 1495 1496 /** 1497 * Guidance on how to interpret the value by comparison to a normal or recommended range. 1498 */ 1499 @Child(name = "referenceRange", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1500 @Description(shortDefinition="Provides guide for interpretation", formalDefinition="Guidance on how to interpret the value by comparison to a normal or recommended range." ) 1501 protected List<ObservationReferenceRangeComponent> referenceRange; 1502 1503 /** 1504 * This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group. 1505 */ 1506 @Child(name = "hasMember", type = {Observation.class, QuestionnaireResponse.class, Sequence.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1507 @Description(shortDefinition="Related resource that belongs to the Observation group", formalDefinition="This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group." ) 1508 protected List<Reference> hasMember; 1509 /** 1510 * The actual objects that are the target of the reference (This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.) 1511 */ 1512 protected List<Resource> hasMemberTarget; 1513 1514 1515 /** 1516 * The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image. 1517 */ 1518 @Child(name = "derivedFrom", type = {DocumentReference.class, ImagingStudy.class, Media.class, QuestionnaireResponse.class, Observation.class, Sequence.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1519 @Description(shortDefinition="Related measurements the observation is made from", formalDefinition="The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image." ) 1520 protected List<Reference> derivedFrom; 1521 /** 1522 * The actual objects that are the target of the reference (The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image.) 1523 */ 1524 protected List<Resource> derivedFromTarget; 1525 1526 1527 /** 1528 * Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations. 1529 */ 1530 @Child(name = "component", type = {}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1531 @Description(shortDefinition="Component results", formalDefinition="Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations." ) 1532 protected List<ObservationComponentComponent> component; 1533 1534 private static final long serialVersionUID = 1014801256L; 1535 1536 /** 1537 * Constructor 1538 */ 1539 public Observation() { 1540 super(); 1541 } 1542 1543 /** 1544 * Constructor 1545 */ 1546 public Observation(Enumeration<ObservationStatus> status, CodeableConcept code) { 1547 super(); 1548 this.status = status; 1549 this.code = code; 1550 } 1551 1552 /** 1553 * @return {@link #identifier} (A unique identifier assigned to this observation.) 1554 */ 1555 public List<Identifier> getIdentifier() { 1556 if (this.identifier == null) 1557 this.identifier = new ArrayList<Identifier>(); 1558 return this.identifier; 1559 } 1560 1561 /** 1562 * @return Returns a reference to <code>this</code> for easy method chaining 1563 */ 1564 public Observation setIdentifier(List<Identifier> theIdentifier) { 1565 this.identifier = theIdentifier; 1566 return this; 1567 } 1568 1569 public boolean hasIdentifier() { 1570 if (this.identifier == null) 1571 return false; 1572 for (Identifier item : this.identifier) 1573 if (!item.isEmpty()) 1574 return true; 1575 return false; 1576 } 1577 1578 public Identifier addIdentifier() { //3 1579 Identifier t = new Identifier(); 1580 if (this.identifier == null) 1581 this.identifier = new ArrayList<Identifier>(); 1582 this.identifier.add(t); 1583 return t; 1584 } 1585 1586 public Observation addIdentifier(Identifier t) { //3 1587 if (t == null) 1588 return this; 1589 if (this.identifier == null) 1590 this.identifier = new ArrayList<Identifier>(); 1591 this.identifier.add(t); 1592 return this; 1593 } 1594 1595 /** 1596 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 1597 */ 1598 public Identifier getIdentifierFirstRep() { 1599 if (getIdentifier().isEmpty()) { 1600 addIdentifier(); 1601 } 1602 return getIdentifier().get(0); 1603 } 1604 1605 /** 1606 * @return {@link #basedOn} (A plan, proposal or order that is fulfilled in whole or in part by this event. For example, a MedicationRequest may require a patient to have laboratory test performed before it is dispensed.) 1607 */ 1608 public List<Reference> getBasedOn() { 1609 if (this.basedOn == null) 1610 this.basedOn = new ArrayList<Reference>(); 1611 return this.basedOn; 1612 } 1613 1614 /** 1615 * @return Returns a reference to <code>this</code> for easy method chaining 1616 */ 1617 public Observation setBasedOn(List<Reference> theBasedOn) { 1618 this.basedOn = theBasedOn; 1619 return this; 1620 } 1621 1622 public boolean hasBasedOn() { 1623 if (this.basedOn == null) 1624 return false; 1625 for (Reference item : this.basedOn) 1626 if (!item.isEmpty()) 1627 return true; 1628 return false; 1629 } 1630 1631 public Reference addBasedOn() { //3 1632 Reference t = new Reference(); 1633 if (this.basedOn == null) 1634 this.basedOn = new ArrayList<Reference>(); 1635 this.basedOn.add(t); 1636 return t; 1637 } 1638 1639 public Observation addBasedOn(Reference t) { //3 1640 if (t == null) 1641 return this; 1642 if (this.basedOn == null) 1643 this.basedOn = new ArrayList<Reference>(); 1644 this.basedOn.add(t); 1645 return this; 1646 } 1647 1648 /** 1649 * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist 1650 */ 1651 public Reference getBasedOnFirstRep() { 1652 if (getBasedOn().isEmpty()) { 1653 addBasedOn(); 1654 } 1655 return getBasedOn().get(0); 1656 } 1657 1658 /** 1659 * @deprecated Use Reference#setResource(IBaseResource) instead 1660 */ 1661 @Deprecated 1662 public List<Resource> getBasedOnTarget() { 1663 if (this.basedOnTarget == null) 1664 this.basedOnTarget = new ArrayList<Resource>(); 1665 return this.basedOnTarget; 1666 } 1667 1668 /** 1669 * @return {@link #partOf} (A larger event of which this particular Observation is a component or step. For example, an observation as part of a procedure.) 1670 */ 1671 public List<Reference> getPartOf() { 1672 if (this.partOf == null) 1673 this.partOf = new ArrayList<Reference>(); 1674 return this.partOf; 1675 } 1676 1677 /** 1678 * @return Returns a reference to <code>this</code> for easy method chaining 1679 */ 1680 public Observation setPartOf(List<Reference> thePartOf) { 1681 this.partOf = thePartOf; 1682 return this; 1683 } 1684 1685 public boolean hasPartOf() { 1686 if (this.partOf == null) 1687 return false; 1688 for (Reference item : this.partOf) 1689 if (!item.isEmpty()) 1690 return true; 1691 return false; 1692 } 1693 1694 public Reference addPartOf() { //3 1695 Reference t = new Reference(); 1696 if (this.partOf == null) 1697 this.partOf = new ArrayList<Reference>(); 1698 this.partOf.add(t); 1699 return t; 1700 } 1701 1702 public Observation addPartOf(Reference t) { //3 1703 if (t == null) 1704 return this; 1705 if (this.partOf == null) 1706 this.partOf = new ArrayList<Reference>(); 1707 this.partOf.add(t); 1708 return this; 1709 } 1710 1711 /** 1712 * @return The first repetition of repeating field {@link #partOf}, creating it if it does not already exist 1713 */ 1714 public Reference getPartOfFirstRep() { 1715 if (getPartOf().isEmpty()) { 1716 addPartOf(); 1717 } 1718 return getPartOf().get(0); 1719 } 1720 1721 /** 1722 * @deprecated Use Reference#setResource(IBaseResource) instead 1723 */ 1724 @Deprecated 1725 public List<Resource> getPartOfTarget() { 1726 if (this.partOfTarget == null) 1727 this.partOfTarget = new ArrayList<Resource>(); 1728 return this.partOfTarget; 1729 } 1730 1731 /** 1732 * @return {@link #status} (The status of the result value.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1733 */ 1734 public Enumeration<ObservationStatus> getStatusElement() { 1735 if (this.status == null) 1736 if (Configuration.errorOnAutoCreate()) 1737 throw new Error("Attempt to auto-create Observation.status"); 1738 else if (Configuration.doAutoCreate()) 1739 this.status = new Enumeration<ObservationStatus>(new ObservationStatusEnumFactory()); // bb 1740 return this.status; 1741 } 1742 1743 public boolean hasStatusElement() { 1744 return this.status != null && !this.status.isEmpty(); 1745 } 1746 1747 public boolean hasStatus() { 1748 return this.status != null && !this.status.isEmpty(); 1749 } 1750 1751 /** 1752 * @param value {@link #status} (The status of the result value.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1753 */ 1754 public Observation setStatusElement(Enumeration<ObservationStatus> value) { 1755 this.status = value; 1756 return this; 1757 } 1758 1759 /** 1760 * @return The status of the result value. 1761 */ 1762 public ObservationStatus getStatus() { 1763 return this.status == null ? null : this.status.getValue(); 1764 } 1765 1766 /** 1767 * @param value The status of the result value. 1768 */ 1769 public Observation setStatus(ObservationStatus value) { 1770 if (this.status == null) 1771 this.status = new Enumeration<ObservationStatus>(new ObservationStatusEnumFactory()); 1772 this.status.setValue(value); 1773 return this; 1774 } 1775 1776 /** 1777 * @return {@link #category} (A code that classifies the general type of observation being made.) 1778 */ 1779 public List<CodeableConcept> getCategory() { 1780 if (this.category == null) 1781 this.category = new ArrayList<CodeableConcept>(); 1782 return this.category; 1783 } 1784 1785 /** 1786 * @return Returns a reference to <code>this</code> for easy method chaining 1787 */ 1788 public Observation setCategory(List<CodeableConcept> theCategory) { 1789 this.category = theCategory; 1790 return this; 1791 } 1792 1793 public boolean hasCategory() { 1794 if (this.category == null) 1795 return false; 1796 for (CodeableConcept item : this.category) 1797 if (!item.isEmpty()) 1798 return true; 1799 return false; 1800 } 1801 1802 public CodeableConcept addCategory() { //3 1803 CodeableConcept t = new CodeableConcept(); 1804 if (this.category == null) 1805 this.category = new ArrayList<CodeableConcept>(); 1806 this.category.add(t); 1807 return t; 1808 } 1809 1810 public Observation addCategory(CodeableConcept t) { //3 1811 if (t == null) 1812 return this; 1813 if (this.category == null) 1814 this.category = new ArrayList<CodeableConcept>(); 1815 this.category.add(t); 1816 return this; 1817 } 1818 1819 /** 1820 * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist 1821 */ 1822 public CodeableConcept getCategoryFirstRep() { 1823 if (getCategory().isEmpty()) { 1824 addCategory(); 1825 } 1826 return getCategory().get(0); 1827 } 1828 1829 /** 1830 * @return {@link #code} (Describes what was observed. Sometimes this is called the observation "name".) 1831 */ 1832 public CodeableConcept getCode() { 1833 if (this.code == null) 1834 if (Configuration.errorOnAutoCreate()) 1835 throw new Error("Attempt to auto-create Observation.code"); 1836 else if (Configuration.doAutoCreate()) 1837 this.code = new CodeableConcept(); // cc 1838 return this.code; 1839 } 1840 1841 public boolean hasCode() { 1842 return this.code != null && !this.code.isEmpty(); 1843 } 1844 1845 /** 1846 * @param value {@link #code} (Describes what was observed. Sometimes this is called the observation "name".) 1847 */ 1848 public Observation setCode(CodeableConcept value) { 1849 this.code = value; 1850 return this; 1851 } 1852 1853 /** 1854 * @return {@link #subject} (The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.) 1855 */ 1856 public Reference getSubject() { 1857 if (this.subject == null) 1858 if (Configuration.errorOnAutoCreate()) 1859 throw new Error("Attempt to auto-create Observation.subject"); 1860 else if (Configuration.doAutoCreate()) 1861 this.subject = new Reference(); // cc 1862 return this.subject; 1863 } 1864 1865 public boolean hasSubject() { 1866 return this.subject != null && !this.subject.isEmpty(); 1867 } 1868 1869 /** 1870 * @param value {@link #subject} (The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.) 1871 */ 1872 public Observation setSubject(Reference value) { 1873 this.subject = value; 1874 return this; 1875 } 1876 1877 /** 1878 * @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 of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.) 1879 */ 1880 public Resource getSubjectTarget() { 1881 return this.subjectTarget; 1882 } 1883 1884 /** 1885 * @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 of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.) 1886 */ 1887 public Observation setSubjectTarget(Resource value) { 1888 this.subjectTarget = value; 1889 return this; 1890 } 1891 1892 /** 1893 * @return {@link #focus} (The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record. The focus of an observation could also be an existing condition, an intervention, the subject's diet, another observation of the subject, or a body structure such as tumor or implanted device. An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus.) 1894 */ 1895 public List<Reference> getFocus() { 1896 if (this.focus == null) 1897 this.focus = new ArrayList<Reference>(); 1898 return this.focus; 1899 } 1900 1901 /** 1902 * @return Returns a reference to <code>this</code> for easy method chaining 1903 */ 1904 public Observation setFocus(List<Reference> theFocus) { 1905 this.focus = theFocus; 1906 return this; 1907 } 1908 1909 public boolean hasFocus() { 1910 if (this.focus == null) 1911 return false; 1912 for (Reference item : this.focus) 1913 if (!item.isEmpty()) 1914 return true; 1915 return false; 1916 } 1917 1918 public Reference addFocus() { //3 1919 Reference t = new Reference(); 1920 if (this.focus == null) 1921 this.focus = new ArrayList<Reference>(); 1922 this.focus.add(t); 1923 return t; 1924 } 1925 1926 public Observation addFocus(Reference t) { //3 1927 if (t == null) 1928 return this; 1929 if (this.focus == null) 1930 this.focus = new ArrayList<Reference>(); 1931 this.focus.add(t); 1932 return this; 1933 } 1934 1935 /** 1936 * @return The first repetition of repeating field {@link #focus}, creating it if it does not already exist 1937 */ 1938 public Reference getFocusFirstRep() { 1939 if (getFocus().isEmpty()) { 1940 addFocus(); 1941 } 1942 return getFocus().get(0); 1943 } 1944 1945 /** 1946 * @deprecated Use Reference#setResource(IBaseResource) instead 1947 */ 1948 @Deprecated 1949 public List<Resource> getFocusTarget() { 1950 if (this.focusTarget == null) 1951 this.focusTarget = new ArrayList<Resource>(); 1952 return this.focusTarget; 1953 } 1954 1955 /** 1956 * @return {@link #encounter} (The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.) 1957 */ 1958 public Reference getEncounter() { 1959 if (this.encounter == null) 1960 if (Configuration.errorOnAutoCreate()) 1961 throw new Error("Attempt to auto-create Observation.encounter"); 1962 else if (Configuration.doAutoCreate()) 1963 this.encounter = new Reference(); // cc 1964 return this.encounter; 1965 } 1966 1967 public boolean hasEncounter() { 1968 return this.encounter != null && !this.encounter.isEmpty(); 1969 } 1970 1971 /** 1972 * @param value {@link #encounter} (The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.) 1973 */ 1974 public Observation setEncounter(Reference value) { 1975 this.encounter = value; 1976 return this; 1977 } 1978 1979 /** 1980 * @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 healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.) 1981 */ 1982 public Encounter getEncounterTarget() { 1983 if (this.encounterTarget == null) 1984 if (Configuration.errorOnAutoCreate()) 1985 throw new Error("Attempt to auto-create Observation.encounter"); 1986 else if (Configuration.doAutoCreate()) 1987 this.encounterTarget = new Encounter(); // aa 1988 return this.encounterTarget; 1989 } 1990 1991 /** 1992 * @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 healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.) 1993 */ 1994 public Observation setEncounterTarget(Encounter value) { 1995 this.encounterTarget = value; 1996 return this; 1997 } 1998 1999 /** 2000 * @return {@link #effective} (The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.) 2001 */ 2002 public Type getEffective() { 2003 return this.effective; 2004 } 2005 2006 /** 2007 * @return {@link #effective} (The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.) 2008 */ 2009 public DateTimeType getEffectiveDateTimeType() throws FHIRException { 2010 if (this.effective == null) 2011 return null; 2012 if (!(this.effective instanceof DateTimeType)) 2013 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.effective.getClass().getName()+" was encountered"); 2014 return (DateTimeType) this.effective; 2015 } 2016 2017 public boolean hasEffectiveDateTimeType() { 2018 return this != null && this.effective instanceof DateTimeType; 2019 } 2020 2021 /** 2022 * @return {@link #effective} (The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.) 2023 */ 2024 public Period getEffectivePeriod() throws FHIRException { 2025 if (this.effective == null) 2026 return null; 2027 if (!(this.effective instanceof Period)) 2028 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.effective.getClass().getName()+" was encountered"); 2029 return (Period) this.effective; 2030 } 2031 2032 public boolean hasEffectivePeriod() { 2033 return this != null && this.effective instanceof Period; 2034 } 2035 2036 /** 2037 * @return {@link #effective} (The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.) 2038 */ 2039 public Timing getEffectiveTiming() throws FHIRException { 2040 if (this.effective == null) 2041 return null; 2042 if (!(this.effective instanceof Timing)) 2043 throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.effective.getClass().getName()+" was encountered"); 2044 return (Timing) this.effective; 2045 } 2046 2047 public boolean hasEffectiveTiming() { 2048 return this != null && this.effective instanceof Timing; 2049 } 2050 2051 /** 2052 * @return {@link #effective} (The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.) 2053 */ 2054 public InstantType getEffectiveInstantType() throws FHIRException { 2055 if (this.effective == null) 2056 return null; 2057 if (!(this.effective instanceof InstantType)) 2058 throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.effective.getClass().getName()+" was encountered"); 2059 return (InstantType) this.effective; 2060 } 2061 2062 public boolean hasEffectiveInstantType() { 2063 return this != null && this.effective instanceof InstantType; 2064 } 2065 2066 public boolean hasEffective() { 2067 return this.effective != null && !this.effective.isEmpty(); 2068 } 2069 2070 /** 2071 * @param value {@link #effective} (The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.) 2072 */ 2073 public Observation setEffective(Type value) { 2074 if (value != null && !(value instanceof DateTimeType || value instanceof Period || value instanceof Timing || value instanceof InstantType)) 2075 throw new Error("Not the right type for Observation.effective[x]: "+value.fhirType()); 2076 this.effective = value; 2077 return this; 2078 } 2079 2080 /** 2081 * @return {@link #issued} (The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value 2082 */ 2083 public InstantType getIssuedElement() { 2084 if (this.issued == null) 2085 if (Configuration.errorOnAutoCreate()) 2086 throw new Error("Attempt to auto-create Observation.issued"); 2087 else if (Configuration.doAutoCreate()) 2088 this.issued = new InstantType(); // bb 2089 return this.issued; 2090 } 2091 2092 public boolean hasIssuedElement() { 2093 return this.issued != null && !this.issued.isEmpty(); 2094 } 2095 2096 public boolean hasIssued() { 2097 return this.issued != null && !this.issued.isEmpty(); 2098 } 2099 2100 /** 2101 * @param value {@link #issued} (The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value 2102 */ 2103 public Observation setIssuedElement(InstantType value) { 2104 this.issued = value; 2105 return this; 2106 } 2107 2108 /** 2109 * @return The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified. 2110 */ 2111 public Date getIssued() { 2112 return this.issued == null ? null : this.issued.getValue(); 2113 } 2114 2115 /** 2116 * @param value The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified. 2117 */ 2118 public Observation setIssued(Date value) { 2119 if (value == null) 2120 this.issued = null; 2121 else { 2122 if (this.issued == null) 2123 this.issued = new InstantType(); 2124 this.issued.setValue(value); 2125 } 2126 return this; 2127 } 2128 2129 /** 2130 * @return {@link #performer} (Who was responsible for asserting the observed value as "true".) 2131 */ 2132 public List<Reference> getPerformer() { 2133 if (this.performer == null) 2134 this.performer = new ArrayList<Reference>(); 2135 return this.performer; 2136 } 2137 2138 /** 2139 * @return Returns a reference to <code>this</code> for easy method chaining 2140 */ 2141 public Observation setPerformer(List<Reference> thePerformer) { 2142 this.performer = thePerformer; 2143 return this; 2144 } 2145 2146 public boolean hasPerformer() { 2147 if (this.performer == null) 2148 return false; 2149 for (Reference item : this.performer) 2150 if (!item.isEmpty()) 2151 return true; 2152 return false; 2153 } 2154 2155 public Reference addPerformer() { //3 2156 Reference t = new Reference(); 2157 if (this.performer == null) 2158 this.performer = new ArrayList<Reference>(); 2159 this.performer.add(t); 2160 return t; 2161 } 2162 2163 public Observation addPerformer(Reference t) { //3 2164 if (t == null) 2165 return this; 2166 if (this.performer == null) 2167 this.performer = new ArrayList<Reference>(); 2168 this.performer.add(t); 2169 return this; 2170 } 2171 2172 /** 2173 * @return The first repetition of repeating field {@link #performer}, creating it if it does not already exist 2174 */ 2175 public Reference getPerformerFirstRep() { 2176 if (getPerformer().isEmpty()) { 2177 addPerformer(); 2178 } 2179 return getPerformer().get(0); 2180 } 2181 2182 /** 2183 * @deprecated Use Reference#setResource(IBaseResource) instead 2184 */ 2185 @Deprecated 2186 public List<Resource> getPerformerTarget() { 2187 if (this.performerTarget == null) 2188 this.performerTarget = new ArrayList<Resource>(); 2189 return this.performerTarget; 2190 } 2191 2192 /** 2193 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 2194 */ 2195 public Type getValue() { 2196 return this.value; 2197 } 2198 2199 /** 2200 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 2201 */ 2202 public Quantity getValueQuantity() throws FHIRException { 2203 if (this.value == null) 2204 return null; 2205 if (!(this.value instanceof Quantity)) 2206 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered"); 2207 return (Quantity) this.value; 2208 } 2209 2210 public boolean hasValueQuantity() { 2211 return this != null && this.value instanceof Quantity; 2212 } 2213 2214 /** 2215 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 2216 */ 2217 public CodeableConcept getValueCodeableConcept() throws FHIRException { 2218 if (this.value == null) 2219 return null; 2220 if (!(this.value instanceof CodeableConcept)) 2221 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered"); 2222 return (CodeableConcept) this.value; 2223 } 2224 2225 public boolean hasValueCodeableConcept() { 2226 return this != null && this.value instanceof CodeableConcept; 2227 } 2228 2229 /** 2230 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 2231 */ 2232 public StringType getValueStringType() throws FHIRException { 2233 if (this.value == null) 2234 return null; 2235 if (!(this.value instanceof StringType)) 2236 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); 2237 return (StringType) this.value; 2238 } 2239 2240 public boolean hasValueStringType() { 2241 return this != null && this.value instanceof StringType; 2242 } 2243 2244 /** 2245 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 2246 */ 2247 public BooleanType getValueBooleanType() throws FHIRException { 2248 if (this.value == null) 2249 return null; 2250 if (!(this.value instanceof BooleanType)) 2251 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); 2252 return (BooleanType) this.value; 2253 } 2254 2255 public boolean hasValueBooleanType() { 2256 return this != null && this.value instanceof BooleanType; 2257 } 2258 2259 /** 2260 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 2261 */ 2262 public IntegerType getValueIntegerType() throws FHIRException { 2263 if (this.value == null) 2264 return null; 2265 if (!(this.value instanceof IntegerType)) 2266 throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered"); 2267 return (IntegerType) this.value; 2268 } 2269 2270 public boolean hasValueIntegerType() { 2271 return this != null && this.value instanceof IntegerType; 2272 } 2273 2274 /** 2275 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 2276 */ 2277 public Range getValueRange() throws FHIRException { 2278 if (this.value == null) 2279 return null; 2280 if (!(this.value instanceof Range)) 2281 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered"); 2282 return (Range) this.value; 2283 } 2284 2285 public boolean hasValueRange() { 2286 return this != null && this.value instanceof Range; 2287 } 2288 2289 /** 2290 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 2291 */ 2292 public Ratio getValueRatio() throws FHIRException { 2293 if (this.value == null) 2294 return null; 2295 if (!(this.value instanceof Ratio)) 2296 throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.value.getClass().getName()+" was encountered"); 2297 return (Ratio) this.value; 2298 } 2299 2300 public boolean hasValueRatio() { 2301 return this != null && this.value instanceof Ratio; 2302 } 2303 2304 /** 2305 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 2306 */ 2307 public SampledData getValueSampledData() throws FHIRException { 2308 if (this.value == null) 2309 return null; 2310 if (!(this.value instanceof SampledData)) 2311 throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.value.getClass().getName()+" was encountered"); 2312 return (SampledData) this.value; 2313 } 2314 2315 public boolean hasValueSampledData() { 2316 return this != null && this.value instanceof SampledData; 2317 } 2318 2319 /** 2320 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 2321 */ 2322 public TimeType getValueTimeType() throws FHIRException { 2323 if (this.value == null) 2324 return null; 2325 if (!(this.value instanceof TimeType)) 2326 throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered"); 2327 return (TimeType) this.value; 2328 } 2329 2330 public boolean hasValueTimeType() { 2331 return this != null && this.value instanceof TimeType; 2332 } 2333 2334 /** 2335 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 2336 */ 2337 public DateTimeType getValueDateTimeType() throws FHIRException { 2338 if (this.value == null) 2339 return null; 2340 if (!(this.value instanceof DateTimeType)) 2341 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered"); 2342 return (DateTimeType) this.value; 2343 } 2344 2345 public boolean hasValueDateTimeType() { 2346 return this != null && this.value instanceof DateTimeType; 2347 } 2348 2349 /** 2350 * @return {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 2351 */ 2352 public Period getValuePeriod() throws FHIRException { 2353 if (this.value == null) 2354 return null; 2355 if (!(this.value instanceof Period)) 2356 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered"); 2357 return (Period) this.value; 2358 } 2359 2360 public boolean hasValuePeriod() { 2361 return this != null && this.value instanceof Period; 2362 } 2363 2364 public boolean hasValue() { 2365 return this.value != null && !this.value.isEmpty(); 2366 } 2367 2368 /** 2369 * @param value {@link #value} (The information determined as a result of making the observation, if the information has a simple value.) 2370 */ 2371 public Observation setValue(Type value) { 2372 if (value != null && !(value instanceof Quantity || value instanceof CodeableConcept || value instanceof StringType || value instanceof BooleanType || value instanceof IntegerType || value instanceof Range || value instanceof Ratio || value instanceof SampledData || value instanceof TimeType || value instanceof DateTimeType || value instanceof Period)) 2373 throw new Error("Not the right type for Observation.value[x]: "+value.fhirType()); 2374 this.value = value; 2375 return this; 2376 } 2377 2378 /** 2379 * @return {@link #dataAbsentReason} (Provides a reason why the expected value in the element Observation.value[x] is missing.) 2380 */ 2381 public CodeableConcept getDataAbsentReason() { 2382 if (this.dataAbsentReason == null) 2383 if (Configuration.errorOnAutoCreate()) 2384 throw new Error("Attempt to auto-create Observation.dataAbsentReason"); 2385 else if (Configuration.doAutoCreate()) 2386 this.dataAbsentReason = new CodeableConcept(); // cc 2387 return this.dataAbsentReason; 2388 } 2389 2390 public boolean hasDataAbsentReason() { 2391 return this.dataAbsentReason != null && !this.dataAbsentReason.isEmpty(); 2392 } 2393 2394 /** 2395 * @param value {@link #dataAbsentReason} (Provides a reason why the expected value in the element Observation.value[x] is missing.) 2396 */ 2397 public Observation setDataAbsentReason(CodeableConcept value) { 2398 this.dataAbsentReason = value; 2399 return this; 2400 } 2401 2402 /** 2403 * @return {@link #interpretation} (A categorical assessment of an observation value. For example, high, low, normal.) 2404 */ 2405 public List<CodeableConcept> getInterpretation() { 2406 if (this.interpretation == null) 2407 this.interpretation = new ArrayList<CodeableConcept>(); 2408 return this.interpretation; 2409 } 2410 2411 /** 2412 * @return Returns a reference to <code>this</code> for easy method chaining 2413 */ 2414 public Observation setInterpretation(List<CodeableConcept> theInterpretation) { 2415 this.interpretation = theInterpretation; 2416 return this; 2417 } 2418 2419 public boolean hasInterpretation() { 2420 if (this.interpretation == null) 2421 return false; 2422 for (CodeableConcept item : this.interpretation) 2423 if (!item.isEmpty()) 2424 return true; 2425 return false; 2426 } 2427 2428 public CodeableConcept addInterpretation() { //3 2429 CodeableConcept t = new CodeableConcept(); 2430 if (this.interpretation == null) 2431 this.interpretation = new ArrayList<CodeableConcept>(); 2432 this.interpretation.add(t); 2433 return t; 2434 } 2435 2436 public Observation addInterpretation(CodeableConcept t) { //3 2437 if (t == null) 2438 return this; 2439 if (this.interpretation == null) 2440 this.interpretation = new ArrayList<CodeableConcept>(); 2441 this.interpretation.add(t); 2442 return this; 2443 } 2444 2445 /** 2446 * @return The first repetition of repeating field {@link #interpretation}, creating it if it does not already exist 2447 */ 2448 public CodeableConcept getInterpretationFirstRep() { 2449 if (getInterpretation().isEmpty()) { 2450 addInterpretation(); 2451 } 2452 return getInterpretation().get(0); 2453 } 2454 2455 /** 2456 * @return {@link #comment} (Comments about the test result value may include statements about significant, unexpected or unreliable results values, or information about the its source when this is relevant to its interpretation.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value 2457 */ 2458 public StringType getCommentElement() { 2459 if (this.comment == null) 2460 if (Configuration.errorOnAutoCreate()) 2461 throw new Error("Attempt to auto-create Observation.comment"); 2462 else if (Configuration.doAutoCreate()) 2463 this.comment = new StringType(); // bb 2464 return this.comment; 2465 } 2466 2467 public boolean hasCommentElement() { 2468 return this.comment != null && !this.comment.isEmpty(); 2469 } 2470 2471 public boolean hasComment() { 2472 return this.comment != null && !this.comment.isEmpty(); 2473 } 2474 2475 /** 2476 * @param value {@link #comment} (Comments about the test result value may include statements about significant, unexpected or unreliable results values, or information about the its source when this is relevant to its interpretation.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value 2477 */ 2478 public Observation setCommentElement(StringType value) { 2479 this.comment = value; 2480 return this; 2481 } 2482 2483 /** 2484 * @return Comments about the test result value may include statements about significant, unexpected or unreliable results values, or information about the its source when this is relevant to its interpretation. 2485 */ 2486 public String getComment() { 2487 return this.comment == null ? null : this.comment.getValue(); 2488 } 2489 2490 /** 2491 * @param value Comments about the test result value may include statements about significant, unexpected or unreliable results values, or information about the its source when this is relevant to its interpretation. 2492 */ 2493 public Observation setComment(String value) { 2494 if (Utilities.noString(value)) 2495 this.comment = null; 2496 else { 2497 if (this.comment == null) 2498 this.comment = new StringType(); 2499 this.comment.setValue(value); 2500 } 2501 return this; 2502 } 2503 2504 /** 2505 * @return {@link #bodySite} (Indicates the site on the subject's body where the observation was made (i.e. the target site).) 2506 */ 2507 public CodeableConcept getBodySite() { 2508 if (this.bodySite == null) 2509 if (Configuration.errorOnAutoCreate()) 2510 throw new Error("Attempt to auto-create Observation.bodySite"); 2511 else if (Configuration.doAutoCreate()) 2512 this.bodySite = new CodeableConcept(); // cc 2513 return this.bodySite; 2514 } 2515 2516 public boolean hasBodySite() { 2517 return this.bodySite != null && !this.bodySite.isEmpty(); 2518 } 2519 2520 /** 2521 * @param value {@link #bodySite} (Indicates the site on the subject's body where the observation was made (i.e. the target site).) 2522 */ 2523 public Observation setBodySite(CodeableConcept value) { 2524 this.bodySite = value; 2525 return this; 2526 } 2527 2528 /** 2529 * @return {@link #method} (Indicates the mechanism used to perform the observation.) 2530 */ 2531 public CodeableConcept getMethod() { 2532 if (this.method == null) 2533 if (Configuration.errorOnAutoCreate()) 2534 throw new Error("Attempt to auto-create Observation.method"); 2535 else if (Configuration.doAutoCreate()) 2536 this.method = new CodeableConcept(); // cc 2537 return this.method; 2538 } 2539 2540 public boolean hasMethod() { 2541 return this.method != null && !this.method.isEmpty(); 2542 } 2543 2544 /** 2545 * @param value {@link #method} (Indicates the mechanism used to perform the observation.) 2546 */ 2547 public Observation setMethod(CodeableConcept value) { 2548 this.method = value; 2549 return this; 2550 } 2551 2552 /** 2553 * @return {@link #specimen} (The specimen that was used when this observation was made.) 2554 */ 2555 public Reference getSpecimen() { 2556 if (this.specimen == null) 2557 if (Configuration.errorOnAutoCreate()) 2558 throw new Error("Attempt to auto-create Observation.specimen"); 2559 else if (Configuration.doAutoCreate()) 2560 this.specimen = new Reference(); // cc 2561 return this.specimen; 2562 } 2563 2564 public boolean hasSpecimen() { 2565 return this.specimen != null && !this.specimen.isEmpty(); 2566 } 2567 2568 /** 2569 * @param value {@link #specimen} (The specimen that was used when this observation was made.) 2570 */ 2571 public Observation setSpecimen(Reference value) { 2572 this.specimen = value; 2573 return this; 2574 } 2575 2576 /** 2577 * @return {@link #specimen} 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 specimen that was used when this observation was made.) 2578 */ 2579 public Specimen getSpecimenTarget() { 2580 if (this.specimenTarget == null) 2581 if (Configuration.errorOnAutoCreate()) 2582 throw new Error("Attempt to auto-create Observation.specimen"); 2583 else if (Configuration.doAutoCreate()) 2584 this.specimenTarget = new Specimen(); // aa 2585 return this.specimenTarget; 2586 } 2587 2588 /** 2589 * @param value {@link #specimen} 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 specimen that was used when this observation was made.) 2590 */ 2591 public Observation setSpecimenTarget(Specimen value) { 2592 this.specimenTarget = value; 2593 return this; 2594 } 2595 2596 /** 2597 * @return {@link #device} (The device used to generate the observation data.) 2598 */ 2599 public Reference getDevice() { 2600 if (this.device == null) 2601 if (Configuration.errorOnAutoCreate()) 2602 throw new Error("Attempt to auto-create Observation.device"); 2603 else if (Configuration.doAutoCreate()) 2604 this.device = new Reference(); // cc 2605 return this.device; 2606 } 2607 2608 public boolean hasDevice() { 2609 return this.device != null && !this.device.isEmpty(); 2610 } 2611 2612 /** 2613 * @param value {@link #device} (The device used to generate the observation data.) 2614 */ 2615 public Observation setDevice(Reference value) { 2616 this.device = value; 2617 return this; 2618 } 2619 2620 /** 2621 * @return {@link #device} 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 device used to generate the observation data.) 2622 */ 2623 public Resource getDeviceTarget() { 2624 return this.deviceTarget; 2625 } 2626 2627 /** 2628 * @param value {@link #device} 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 device used to generate the observation data.) 2629 */ 2630 public Observation setDeviceTarget(Resource value) { 2631 this.deviceTarget = value; 2632 return this; 2633 } 2634 2635 /** 2636 * @return {@link #referenceRange} (Guidance on how to interpret the value by comparison to a normal or recommended range.) 2637 */ 2638 public List<ObservationReferenceRangeComponent> getReferenceRange() { 2639 if (this.referenceRange == null) 2640 this.referenceRange = new ArrayList<ObservationReferenceRangeComponent>(); 2641 return this.referenceRange; 2642 } 2643 2644 /** 2645 * @return Returns a reference to <code>this</code> for easy method chaining 2646 */ 2647 public Observation setReferenceRange(List<ObservationReferenceRangeComponent> theReferenceRange) { 2648 this.referenceRange = theReferenceRange; 2649 return this; 2650 } 2651 2652 public boolean hasReferenceRange() { 2653 if (this.referenceRange == null) 2654 return false; 2655 for (ObservationReferenceRangeComponent item : this.referenceRange) 2656 if (!item.isEmpty()) 2657 return true; 2658 return false; 2659 } 2660 2661 public ObservationReferenceRangeComponent addReferenceRange() { //3 2662 ObservationReferenceRangeComponent t = new ObservationReferenceRangeComponent(); 2663 if (this.referenceRange == null) 2664 this.referenceRange = new ArrayList<ObservationReferenceRangeComponent>(); 2665 this.referenceRange.add(t); 2666 return t; 2667 } 2668 2669 public Observation addReferenceRange(ObservationReferenceRangeComponent t) { //3 2670 if (t == null) 2671 return this; 2672 if (this.referenceRange == null) 2673 this.referenceRange = new ArrayList<ObservationReferenceRangeComponent>(); 2674 this.referenceRange.add(t); 2675 return this; 2676 } 2677 2678 /** 2679 * @return The first repetition of repeating field {@link #referenceRange}, creating it if it does not already exist 2680 */ 2681 public ObservationReferenceRangeComponent getReferenceRangeFirstRep() { 2682 if (getReferenceRange().isEmpty()) { 2683 addReferenceRange(); 2684 } 2685 return getReferenceRange().get(0); 2686 } 2687 2688 /** 2689 * @return {@link #hasMember} (This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.) 2690 */ 2691 public List<Reference> getHasMember() { 2692 if (this.hasMember == null) 2693 this.hasMember = new ArrayList<Reference>(); 2694 return this.hasMember; 2695 } 2696 2697 /** 2698 * @return Returns a reference to <code>this</code> for easy method chaining 2699 */ 2700 public Observation setHasMember(List<Reference> theHasMember) { 2701 this.hasMember = theHasMember; 2702 return this; 2703 } 2704 2705 public boolean hasHasMember() { 2706 if (this.hasMember == null) 2707 return false; 2708 for (Reference item : this.hasMember) 2709 if (!item.isEmpty()) 2710 return true; 2711 return false; 2712 } 2713 2714 public Reference addHasMember() { //3 2715 Reference t = new Reference(); 2716 if (this.hasMember == null) 2717 this.hasMember = new ArrayList<Reference>(); 2718 this.hasMember.add(t); 2719 return t; 2720 } 2721 2722 public Observation addHasMember(Reference t) { //3 2723 if (t == null) 2724 return this; 2725 if (this.hasMember == null) 2726 this.hasMember = new ArrayList<Reference>(); 2727 this.hasMember.add(t); 2728 return this; 2729 } 2730 2731 /** 2732 * @return The first repetition of repeating field {@link #hasMember}, creating it if it does not already exist 2733 */ 2734 public Reference getHasMemberFirstRep() { 2735 if (getHasMember().isEmpty()) { 2736 addHasMember(); 2737 } 2738 return getHasMember().get(0); 2739 } 2740 2741 /** 2742 * @deprecated Use Reference#setResource(IBaseResource) instead 2743 */ 2744 @Deprecated 2745 public List<Resource> getHasMemberTarget() { 2746 if (this.hasMemberTarget == null) 2747 this.hasMemberTarget = new ArrayList<Resource>(); 2748 return this.hasMemberTarget; 2749 } 2750 2751 /** 2752 * @return {@link #derivedFrom} (The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image.) 2753 */ 2754 public List<Reference> getDerivedFrom() { 2755 if (this.derivedFrom == null) 2756 this.derivedFrom = new ArrayList<Reference>(); 2757 return this.derivedFrom; 2758 } 2759 2760 /** 2761 * @return Returns a reference to <code>this</code> for easy method chaining 2762 */ 2763 public Observation setDerivedFrom(List<Reference> theDerivedFrom) { 2764 this.derivedFrom = theDerivedFrom; 2765 return this; 2766 } 2767 2768 public boolean hasDerivedFrom() { 2769 if (this.derivedFrom == null) 2770 return false; 2771 for (Reference item : this.derivedFrom) 2772 if (!item.isEmpty()) 2773 return true; 2774 return false; 2775 } 2776 2777 public Reference addDerivedFrom() { //3 2778 Reference t = new Reference(); 2779 if (this.derivedFrom == null) 2780 this.derivedFrom = new ArrayList<Reference>(); 2781 this.derivedFrom.add(t); 2782 return t; 2783 } 2784 2785 public Observation addDerivedFrom(Reference t) { //3 2786 if (t == null) 2787 return this; 2788 if (this.derivedFrom == null) 2789 this.derivedFrom = new ArrayList<Reference>(); 2790 this.derivedFrom.add(t); 2791 return this; 2792 } 2793 2794 /** 2795 * @return The first repetition of repeating field {@link #derivedFrom}, creating it if it does not already exist 2796 */ 2797 public Reference getDerivedFromFirstRep() { 2798 if (getDerivedFrom().isEmpty()) { 2799 addDerivedFrom(); 2800 } 2801 return getDerivedFrom().get(0); 2802 } 2803 2804 /** 2805 * @deprecated Use Reference#setResource(IBaseResource) instead 2806 */ 2807 @Deprecated 2808 public List<Resource> getDerivedFromTarget() { 2809 if (this.derivedFromTarget == null) 2810 this.derivedFromTarget = new ArrayList<Resource>(); 2811 return this.derivedFromTarget; 2812 } 2813 2814 /** 2815 * @return {@link #component} (Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.) 2816 */ 2817 public List<ObservationComponentComponent> getComponent() { 2818 if (this.component == null) 2819 this.component = new ArrayList<ObservationComponentComponent>(); 2820 return this.component; 2821 } 2822 2823 /** 2824 * @return Returns a reference to <code>this</code> for easy method chaining 2825 */ 2826 public Observation setComponent(List<ObservationComponentComponent> theComponent) { 2827 this.component = theComponent; 2828 return this; 2829 } 2830 2831 public boolean hasComponent() { 2832 if (this.component == null) 2833 return false; 2834 for (ObservationComponentComponent item : this.component) 2835 if (!item.isEmpty()) 2836 return true; 2837 return false; 2838 } 2839 2840 public ObservationComponentComponent addComponent() { //3 2841 ObservationComponentComponent t = new ObservationComponentComponent(); 2842 if (this.component == null) 2843 this.component = new ArrayList<ObservationComponentComponent>(); 2844 this.component.add(t); 2845 return t; 2846 } 2847 2848 public Observation addComponent(ObservationComponentComponent t) { //3 2849 if (t == null) 2850 return this; 2851 if (this.component == null) 2852 this.component = new ArrayList<ObservationComponentComponent>(); 2853 this.component.add(t); 2854 return this; 2855 } 2856 2857 /** 2858 * @return The first repetition of repeating field {@link #component}, creating it if it does not already exist 2859 */ 2860 public ObservationComponentComponent getComponentFirstRep() { 2861 if (getComponent().isEmpty()) { 2862 addComponent(); 2863 } 2864 return getComponent().get(0); 2865 } 2866 2867 protected void listChildren(List<Property> children) { 2868 super.listChildren(children); 2869 children.add(new Property("identifier", "Identifier", "A unique identifier assigned to this observation.", 0, java.lang.Integer.MAX_VALUE, identifier)); 2870 children.add(new Property("basedOn", "Reference(CarePlan|DeviceRequest|ImmunizationRecommendation|MedicationRequest|NutritionOrder|ServiceRequest)", "A plan, proposal or order that is fulfilled in whole or in part by this event. For example, a MedicationRequest may require a patient to have laboratory test performed before it is dispensed.", 0, java.lang.Integer.MAX_VALUE, basedOn)); 2871 children.add(new Property("partOf", "Reference(MedicationAdministration|MedicationDispense|MedicationStatement|Procedure|Immunization|ImagingStudy)", "A larger event of which this particular Observation is a component or step. For example, an observation as part of a procedure.", 0, java.lang.Integer.MAX_VALUE, partOf)); 2872 children.add(new Property("status", "code", "The status of the result value.", 0, 1, status)); 2873 children.add(new Property("category", "CodeableConcept", "A code that classifies the general type of observation being made.", 0, java.lang.Integer.MAX_VALUE, category)); 2874 children.add(new Property("code", "CodeableConcept", "Describes what was observed. Sometimes this is called the observation \"name\".", 0, 1, code)); 2875 children.add(new Property("subject", "Reference(Patient|Group|Device|Location)", "The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.", 0, 1, subject)); 2876 children.add(new Property("focus", "Reference(Any)", "The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record. The focus of an observation could also be an existing condition, an intervention, the subject's diet, another observation of the subject, or a body structure such as tumor or implanted device. An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus.", 0, java.lang.Integer.MAX_VALUE, focus)); 2877 children.add(new Property("encounter", "Reference(Encounter)", "The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.", 0, 1, encounter)); 2878 children.add(new Property("effective[x]", "dateTime|Period|Timing|instant", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective)); 2879 children.add(new Property("issued", "instant", "The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.", 0, 1, issued)); 2880 children.add(new Property("performer", "Reference(Practitioner|PractitionerRole|Organization|CareTeam|Patient|RelatedPerson)", "Who was responsible for asserting the observed value as \"true\".", 0, java.lang.Integer.MAX_VALUE, performer)); 2881 children.add(new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value)); 2882 children.add(new Property("dataAbsentReason", "CodeableConcept", "Provides a reason why the expected value in the element Observation.value[x] is missing.", 0, 1, dataAbsentReason)); 2883 children.add(new Property("interpretation", "CodeableConcept", "A categorical assessment of an observation value. For example, high, low, normal.", 0, java.lang.Integer.MAX_VALUE, interpretation)); 2884 children.add(new Property("comment", "string", "Comments about the test result value may include statements about significant, unexpected or unreliable results values, or information about the its source when this is relevant to its interpretation.", 0, 1, comment)); 2885 children.add(new Property("bodySite", "CodeableConcept", "Indicates the site on the subject's body where the observation was made (i.e. the target site).", 0, 1, bodySite)); 2886 children.add(new Property("method", "CodeableConcept", "Indicates the mechanism used to perform the observation.", 0, 1, method)); 2887 children.add(new Property("specimen", "Reference(Specimen)", "The specimen that was used when this observation was made.", 0, 1, specimen)); 2888 children.add(new Property("device", "Reference(Device|DeviceMetric)", "The device used to generate the observation data.", 0, 1, device)); 2889 children.add(new Property("referenceRange", "", "Guidance on how to interpret the value by comparison to a normal or recommended range.", 0, java.lang.Integer.MAX_VALUE, referenceRange)); 2890 children.add(new Property("hasMember", "Reference(Observation|QuestionnaireResponse|Sequence)", "This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.", 0, java.lang.Integer.MAX_VALUE, hasMember)); 2891 children.add(new Property("derivedFrom", "Reference(DocumentReference|ImagingStudy|Media|QuestionnaireResponse|Observation|Sequence)", "The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image.", 0, java.lang.Integer.MAX_VALUE, derivedFrom)); 2892 children.add(new Property("component", "", "Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.", 0, java.lang.Integer.MAX_VALUE, component)); 2893 } 2894 2895 @Override 2896 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2897 switch (_hash) { 2898 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "A unique identifier assigned to this observation.", 0, java.lang.Integer.MAX_VALUE, identifier); 2899 case -332612366: /*basedOn*/ return new Property("basedOn", "Reference(CarePlan|DeviceRequest|ImmunizationRecommendation|MedicationRequest|NutritionOrder|ServiceRequest)", "A plan, proposal or order that is fulfilled in whole or in part by this event. For example, a MedicationRequest may require a patient to have laboratory test performed before it is dispensed.", 0, java.lang.Integer.MAX_VALUE, basedOn); 2900 case -995410646: /*partOf*/ return new Property("partOf", "Reference(MedicationAdministration|MedicationDispense|MedicationStatement|Procedure|Immunization|ImagingStudy)", "A larger event of which this particular Observation is a component or step. For example, an observation as part of a procedure.", 0, java.lang.Integer.MAX_VALUE, partOf); 2901 case -892481550: /*status*/ return new Property("status", "code", "The status of the result value.", 0, 1, status); 2902 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "A code that classifies the general type of observation being made.", 0, java.lang.Integer.MAX_VALUE, category); 2903 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "Describes what was observed. Sometimes this is called the observation \"name\".", 0, 1, code); 2904 case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group|Device|Location)", "The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.", 0, 1, subject); 2905 case 97604824: /*focus*/ return new Property("focus", "Reference(Any)", "The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record. The focus of an observation could also be an existing condition, an intervention, the subject's diet, another observation of the subject, or a body structure such as tumor or implanted device. An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus.", 0, java.lang.Integer.MAX_VALUE, focus); 2906 case 1524132147: /*encounter*/ return new Property("encounter", "Reference(Encounter)", "The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.", 0, 1, encounter); 2907 case 247104889: /*effective[x]*/ return new Property("effective[x]", "dateTime|Period|Timing|instant", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective); 2908 case -1468651097: /*effective*/ return new Property("effective[x]", "dateTime|Period|Timing|instant", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective); 2909 case -275306910: /*effectiveDateTime*/ return new Property("effective[x]", "dateTime|Period|Timing|instant", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective); 2910 case -403934648: /*effectivePeriod*/ return new Property("effective[x]", "dateTime|Period|Timing|instant", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective); 2911 case -285872943: /*effectiveTiming*/ return new Property("effective[x]", "dateTime|Period|Timing|instant", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective); 2912 case -1295730118: /*effectiveInstant*/ return new Property("effective[x]", "dateTime|Period|Timing|instant", "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective); 2913 case -1179159893: /*issued*/ return new Property("issued", "instant", "The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.", 0, 1, issued); 2914 case 481140686: /*performer*/ return new Property("performer", "Reference(Practitioner|PractitionerRole|Organization|CareTeam|Patient|RelatedPerson)", "Who was responsible for asserting the observed value as \"true\".", 0, java.lang.Integer.MAX_VALUE, performer); 2915 case -1410166417: /*value[x]*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 2916 case 111972721: /*value*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 2917 case -2029823716: /*valueQuantity*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 2918 case 924902896: /*valueCodeableConcept*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 2919 case -1424603934: /*valueString*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 2920 case 733421943: /*valueBoolean*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 2921 case -1668204915: /*valueInteger*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 2922 case 2030761548: /*valueRange*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 2923 case 2030767386: /*valueRatio*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 2924 case -962229101: /*valueSampledData*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 2925 case -765708322: /*valueTime*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 2926 case 1047929900: /*valueDateTime*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 2927 case -1524344174: /*valuePeriod*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Ratio|SampledData|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, 1, value); 2928 case 1034315687: /*dataAbsentReason*/ return new Property("dataAbsentReason", "CodeableConcept", "Provides a reason why the expected value in the element Observation.value[x] is missing.", 0, 1, dataAbsentReason); 2929 case -297950712: /*interpretation*/ return new Property("interpretation", "CodeableConcept", "A categorical assessment of an observation value. For example, high, low, normal.", 0, java.lang.Integer.MAX_VALUE, interpretation); 2930 case 950398559: /*comment*/ return new Property("comment", "string", "Comments about the test result value may include statements about significant, unexpected or unreliable results values, or information about the its source when this is relevant to its interpretation.", 0, 1, comment); 2931 case 1702620169: /*bodySite*/ return new Property("bodySite", "CodeableConcept", "Indicates the site on the subject's body where the observation was made (i.e. the target site).", 0, 1, bodySite); 2932 case -1077554975: /*method*/ return new Property("method", "CodeableConcept", "Indicates the mechanism used to perform the observation.", 0, 1, method); 2933 case -2132868344: /*specimen*/ return new Property("specimen", "Reference(Specimen)", "The specimen that was used when this observation was made.", 0, 1, specimen); 2934 case -1335157162: /*device*/ return new Property("device", "Reference(Device|DeviceMetric)", "The device used to generate the observation data.", 0, 1, device); 2935 case -1912545102: /*referenceRange*/ return new Property("referenceRange", "", "Guidance on how to interpret the value by comparison to a normal or recommended range.", 0, java.lang.Integer.MAX_VALUE, referenceRange); 2936 case -458019372: /*hasMember*/ return new Property("hasMember", "Reference(Observation|QuestionnaireResponse|Sequence)", "This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.", 0, java.lang.Integer.MAX_VALUE, hasMember); 2937 case 1077922663: /*derivedFrom*/ return new Property("derivedFrom", "Reference(DocumentReference|ImagingStudy|Media|QuestionnaireResponse|Observation|Sequence)", "The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image.", 0, java.lang.Integer.MAX_VALUE, derivedFrom); 2938 case -1399907075: /*component*/ return new Property("component", "", "Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.", 0, java.lang.Integer.MAX_VALUE, component); 2939 default: return super.getNamedProperty(_hash, _name, _checkValid); 2940 } 2941 2942 } 2943 2944 @Override 2945 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2946 switch (hash) { 2947 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 2948 case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference 2949 case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // Reference 2950 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ObservationStatus> 2951 case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept 2952 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 2953 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 2954 case 97604824: /*focus*/ return this.focus == null ? new Base[0] : this.focus.toArray(new Base[this.focus.size()]); // Reference 2955 case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference 2956 case -1468651097: /*effective*/ return this.effective == null ? new Base[0] : new Base[] {this.effective}; // Type 2957 case -1179159893: /*issued*/ return this.issued == null ? new Base[0] : new Base[] {this.issued}; // InstantType 2958 case 481140686: /*performer*/ return this.performer == null ? new Base[0] : this.performer.toArray(new Base[this.performer.size()]); // Reference 2959 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Type 2960 case 1034315687: /*dataAbsentReason*/ return this.dataAbsentReason == null ? new Base[0] : new Base[] {this.dataAbsentReason}; // CodeableConcept 2961 case -297950712: /*interpretation*/ return this.interpretation == null ? new Base[0] : this.interpretation.toArray(new Base[this.interpretation.size()]); // CodeableConcept 2962 case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // StringType 2963 case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : new Base[] {this.bodySite}; // CodeableConcept 2964 case -1077554975: /*method*/ return this.method == null ? new Base[0] : new Base[] {this.method}; // CodeableConcept 2965 case -2132868344: /*specimen*/ return this.specimen == null ? new Base[0] : new Base[] {this.specimen}; // Reference 2966 case -1335157162: /*device*/ return this.device == null ? new Base[0] : new Base[] {this.device}; // Reference 2967 case -1912545102: /*referenceRange*/ return this.referenceRange == null ? new Base[0] : this.referenceRange.toArray(new Base[this.referenceRange.size()]); // ObservationReferenceRangeComponent 2968 case -458019372: /*hasMember*/ return this.hasMember == null ? new Base[0] : this.hasMember.toArray(new Base[this.hasMember.size()]); // Reference 2969 case 1077922663: /*derivedFrom*/ return this.derivedFrom == null ? new Base[0] : this.derivedFrom.toArray(new Base[this.derivedFrom.size()]); // Reference 2970 case -1399907075: /*component*/ return this.component == null ? new Base[0] : this.component.toArray(new Base[this.component.size()]); // ObservationComponentComponent 2971 default: return super.getProperty(hash, name, checkValid); 2972 } 2973 2974 } 2975 2976 @Override 2977 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2978 switch (hash) { 2979 case -1618432855: // identifier 2980 this.getIdentifier().add(castToIdentifier(value)); // Identifier 2981 return value; 2982 case -332612366: // basedOn 2983 this.getBasedOn().add(castToReference(value)); // Reference 2984 return value; 2985 case -995410646: // partOf 2986 this.getPartOf().add(castToReference(value)); // Reference 2987 return value; 2988 case -892481550: // status 2989 value = new ObservationStatusEnumFactory().fromType(castToCode(value)); 2990 this.status = (Enumeration) value; // Enumeration<ObservationStatus> 2991 return value; 2992 case 50511102: // category 2993 this.getCategory().add(castToCodeableConcept(value)); // CodeableConcept 2994 return value; 2995 case 3059181: // code 2996 this.code = castToCodeableConcept(value); // CodeableConcept 2997 return value; 2998 case -1867885268: // subject 2999 this.subject = castToReference(value); // Reference 3000 return value; 3001 case 97604824: // focus 3002 this.getFocus().add(castToReference(value)); // Reference 3003 return value; 3004 case 1524132147: // encounter 3005 this.encounter = castToReference(value); // Reference 3006 return value; 3007 case -1468651097: // effective 3008 this.effective = castToType(value); // Type 3009 return value; 3010 case -1179159893: // issued 3011 this.issued = castToInstant(value); // InstantType 3012 return value; 3013 case 481140686: // performer 3014 this.getPerformer().add(castToReference(value)); // Reference 3015 return value; 3016 case 111972721: // value 3017 this.value = castToType(value); // Type 3018 return value; 3019 case 1034315687: // dataAbsentReason 3020 this.dataAbsentReason = castToCodeableConcept(value); // CodeableConcept 3021 return value; 3022 case -297950712: // interpretation 3023 this.getInterpretation().add(castToCodeableConcept(value)); // CodeableConcept 3024 return value; 3025 case 950398559: // comment 3026 this.comment = castToString(value); // StringType 3027 return value; 3028 case 1702620169: // bodySite 3029 this.bodySite = castToCodeableConcept(value); // CodeableConcept 3030 return value; 3031 case -1077554975: // method 3032 this.method = castToCodeableConcept(value); // CodeableConcept 3033 return value; 3034 case -2132868344: // specimen 3035 this.specimen = castToReference(value); // Reference 3036 return value; 3037 case -1335157162: // device 3038 this.device = castToReference(value); // Reference 3039 return value; 3040 case -1912545102: // referenceRange 3041 this.getReferenceRange().add((ObservationReferenceRangeComponent) value); // ObservationReferenceRangeComponent 3042 return value; 3043 case -458019372: // hasMember 3044 this.getHasMember().add(castToReference(value)); // Reference 3045 return value; 3046 case 1077922663: // derivedFrom 3047 this.getDerivedFrom().add(castToReference(value)); // Reference 3048 return value; 3049 case -1399907075: // component 3050 this.getComponent().add((ObservationComponentComponent) value); // ObservationComponentComponent 3051 return value; 3052 default: return super.setProperty(hash, name, value); 3053 } 3054 3055 } 3056 3057 @Override 3058 public Base setProperty(String name, Base value) throws FHIRException { 3059 if (name.equals("identifier")) { 3060 this.getIdentifier().add(castToIdentifier(value)); 3061 } else if (name.equals("basedOn")) { 3062 this.getBasedOn().add(castToReference(value)); 3063 } else if (name.equals("partOf")) { 3064 this.getPartOf().add(castToReference(value)); 3065 } else if (name.equals("status")) { 3066 value = new ObservationStatusEnumFactory().fromType(castToCode(value)); 3067 this.status = (Enumeration) value; // Enumeration<ObservationStatus> 3068 } else if (name.equals("category")) { 3069 this.getCategory().add(castToCodeableConcept(value)); 3070 } else if (name.equals("code")) { 3071 this.code = castToCodeableConcept(value); // CodeableConcept 3072 } else if (name.equals("subject")) { 3073 this.subject = castToReference(value); // Reference 3074 } else if (name.equals("focus")) { 3075 this.getFocus().add(castToReference(value)); 3076 } else if (name.equals("encounter")) { 3077 this.encounter = castToReference(value); // Reference 3078 } else if (name.equals("effective[x]")) { 3079 this.effective = castToType(value); // Type 3080 } else if (name.equals("issued")) { 3081 this.issued = castToInstant(value); // InstantType 3082 } else if (name.equals("performer")) { 3083 this.getPerformer().add(castToReference(value)); 3084 } else if (name.equals("value[x]")) { 3085 this.value = castToType(value); // Type 3086 } else if (name.equals("dataAbsentReason")) { 3087 this.dataAbsentReason = castToCodeableConcept(value); // CodeableConcept 3088 } else if (name.equals("interpretation")) { 3089 this.getInterpretation().add(castToCodeableConcept(value)); 3090 } else if (name.equals("comment")) { 3091 this.comment = castToString(value); // StringType 3092 } else if (name.equals("bodySite")) { 3093 this.bodySite = castToCodeableConcept(value); // CodeableConcept 3094 } else if (name.equals("method")) { 3095 this.method = castToCodeableConcept(value); // CodeableConcept 3096 } else if (name.equals("specimen")) { 3097 this.specimen = castToReference(value); // Reference 3098 } else if (name.equals("device")) { 3099 this.device = castToReference(value); // Reference 3100 } else if (name.equals("referenceRange")) { 3101 this.getReferenceRange().add((ObservationReferenceRangeComponent) value); 3102 } else if (name.equals("hasMember")) { 3103 this.getHasMember().add(castToReference(value)); 3104 } else if (name.equals("derivedFrom")) { 3105 this.getDerivedFrom().add(castToReference(value)); 3106 } else if (name.equals("component")) { 3107 this.getComponent().add((ObservationComponentComponent) value); 3108 } else 3109 return super.setProperty(name, value); 3110 return value; 3111 } 3112 3113 @Override 3114 public Base makeProperty(int hash, String name) throws FHIRException { 3115 switch (hash) { 3116 case -1618432855: return addIdentifier(); 3117 case -332612366: return addBasedOn(); 3118 case -995410646: return addPartOf(); 3119 case -892481550: return getStatusElement(); 3120 case 50511102: return addCategory(); 3121 case 3059181: return getCode(); 3122 case -1867885268: return getSubject(); 3123 case 97604824: return addFocus(); 3124 case 1524132147: return getEncounter(); 3125 case 247104889: return getEffective(); 3126 case -1468651097: return getEffective(); 3127 case -1179159893: return getIssuedElement(); 3128 case 481140686: return addPerformer(); 3129 case -1410166417: return getValue(); 3130 case 111972721: return getValue(); 3131 case 1034315687: return getDataAbsentReason(); 3132 case -297950712: return addInterpretation(); 3133 case 950398559: return getCommentElement(); 3134 case 1702620169: return getBodySite(); 3135 case -1077554975: return getMethod(); 3136 case -2132868344: return getSpecimen(); 3137 case -1335157162: return getDevice(); 3138 case -1912545102: return addReferenceRange(); 3139 case -458019372: return addHasMember(); 3140 case 1077922663: return addDerivedFrom(); 3141 case -1399907075: return addComponent(); 3142 default: return super.makeProperty(hash, name); 3143 } 3144 3145 } 3146 3147 @Override 3148 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3149 switch (hash) { 3150 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 3151 case -332612366: /*basedOn*/ return new String[] {"Reference"}; 3152 case -995410646: /*partOf*/ return new String[] {"Reference"}; 3153 case -892481550: /*status*/ return new String[] {"code"}; 3154 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 3155 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 3156 case -1867885268: /*subject*/ return new String[] {"Reference"}; 3157 case 97604824: /*focus*/ return new String[] {"Reference"}; 3158 case 1524132147: /*encounter*/ return new String[] {"Reference"}; 3159 case -1468651097: /*effective*/ return new String[] {"dateTime", "Period", "Timing", "instant"}; 3160 case -1179159893: /*issued*/ return new String[] {"instant"}; 3161 case 481140686: /*performer*/ return new String[] {"Reference"}; 3162 case 111972721: /*value*/ return new String[] {"Quantity", "CodeableConcept", "string", "boolean", "integer", "Range", "Ratio", "SampledData", "time", "dateTime", "Period"}; 3163 case 1034315687: /*dataAbsentReason*/ return new String[] {"CodeableConcept"}; 3164 case -297950712: /*interpretation*/ return new String[] {"CodeableConcept"}; 3165 case 950398559: /*comment*/ return new String[] {"string"}; 3166 case 1702620169: /*bodySite*/ return new String[] {"CodeableConcept"}; 3167 case -1077554975: /*method*/ return new String[] {"CodeableConcept"}; 3168 case -2132868344: /*specimen*/ return new String[] {"Reference"}; 3169 case -1335157162: /*device*/ return new String[] {"Reference"}; 3170 case -1912545102: /*referenceRange*/ return new String[] {}; 3171 case -458019372: /*hasMember*/ return new String[] {"Reference"}; 3172 case 1077922663: /*derivedFrom*/ return new String[] {"Reference"}; 3173 case -1399907075: /*component*/ return new String[] {}; 3174 default: return super.getTypesForProperty(hash, name); 3175 } 3176 3177 } 3178 3179 @Override 3180 public Base addChild(String name) throws FHIRException { 3181 if (name.equals("identifier")) { 3182 return addIdentifier(); 3183 } 3184 else if (name.equals("basedOn")) { 3185 return addBasedOn(); 3186 } 3187 else if (name.equals("partOf")) { 3188 return addPartOf(); 3189 } 3190 else if (name.equals("status")) { 3191 throw new FHIRException("Cannot call addChild on a primitive type Observation.status"); 3192 } 3193 else if (name.equals("category")) { 3194 return addCategory(); 3195 } 3196 else if (name.equals("code")) { 3197 this.code = new CodeableConcept(); 3198 return this.code; 3199 } 3200 else if (name.equals("subject")) { 3201 this.subject = new Reference(); 3202 return this.subject; 3203 } 3204 else if (name.equals("focus")) { 3205 return addFocus(); 3206 } 3207 else if (name.equals("encounter")) { 3208 this.encounter = new Reference(); 3209 return this.encounter; 3210 } 3211 else if (name.equals("effectiveDateTime")) { 3212 this.effective = new DateTimeType(); 3213 return this.effective; 3214 } 3215 else if (name.equals("effectivePeriod")) { 3216 this.effective = new Period(); 3217 return this.effective; 3218 } 3219 else if (name.equals("effectiveTiming")) { 3220 this.effective = new Timing(); 3221 return this.effective; 3222 } 3223 else if (name.equals("effectiveInstant")) { 3224 this.effective = new InstantType(); 3225 return this.effective; 3226 } 3227 else if (name.equals("issued")) { 3228 throw new FHIRException("Cannot call addChild on a primitive type Observation.issued"); 3229 } 3230 else if (name.equals("performer")) { 3231 return addPerformer(); 3232 } 3233 else if (name.equals("valueQuantity")) { 3234 this.value = new Quantity(); 3235 return this.value; 3236 } 3237 else if (name.equals("valueCodeableConcept")) { 3238 this.value = new CodeableConcept(); 3239 return this.value; 3240 } 3241 else if (name.equals("valueString")) { 3242 this.value = new StringType(); 3243 return this.value; 3244 } 3245 else if (name.equals("valueBoolean")) { 3246 this.value = new BooleanType(); 3247 return this.value; 3248 } 3249 else if (name.equals("valueInteger")) { 3250 this.value = new IntegerType(); 3251 return this.value; 3252 } 3253 else if (name.equals("valueRange")) { 3254 this.value = new Range(); 3255 return this.value; 3256 } 3257 else if (name.equals("valueRatio")) { 3258 this.value = new Ratio(); 3259 return this.value; 3260 } 3261 else if (name.equals("valueSampledData")) { 3262 this.value = new SampledData(); 3263 return this.value; 3264 } 3265 else if (name.equals("valueTime")) { 3266 this.value = new TimeType(); 3267 return this.value; 3268 } 3269 else if (name.equals("valueDateTime")) { 3270 this.value = new DateTimeType(); 3271 return this.value; 3272 } 3273 else if (name.equals("valuePeriod")) { 3274 this.value = new Period(); 3275 return this.value; 3276 } 3277 else if (name.equals("dataAbsentReason")) { 3278 this.dataAbsentReason = new CodeableConcept(); 3279 return this.dataAbsentReason; 3280 } 3281 else if (name.equals("interpretation")) { 3282 return addInterpretation(); 3283 } 3284 else if (name.equals("comment")) { 3285 throw new FHIRException("Cannot call addChild on a primitive type Observation.comment"); 3286 } 3287 else if (name.equals("bodySite")) { 3288 this.bodySite = new CodeableConcept(); 3289 return this.bodySite; 3290 } 3291 else if (name.equals("method")) { 3292 this.method = new CodeableConcept(); 3293 return this.method; 3294 } 3295 else if (name.equals("specimen")) { 3296 this.specimen = new Reference(); 3297 return this.specimen; 3298 } 3299 else if (name.equals("device")) { 3300 this.device = new Reference(); 3301 return this.device; 3302 } 3303 else if (name.equals("referenceRange")) { 3304 return addReferenceRange(); 3305 } 3306 else if (name.equals("hasMember")) { 3307 return addHasMember(); 3308 } 3309 else if (name.equals("derivedFrom")) { 3310 return addDerivedFrom(); 3311 } 3312 else if (name.equals("component")) { 3313 return addComponent(); 3314 } 3315 else 3316 return super.addChild(name); 3317 } 3318 3319 public String fhirType() { 3320 return "Observation"; 3321 3322 } 3323 3324 public Observation copy() { 3325 Observation dst = new Observation(); 3326 copyValues(dst); 3327 if (identifier != null) { 3328 dst.identifier = new ArrayList<Identifier>(); 3329 for (Identifier i : identifier) 3330 dst.identifier.add(i.copy()); 3331 }; 3332 if (basedOn != null) { 3333 dst.basedOn = new ArrayList<Reference>(); 3334 for (Reference i : basedOn) 3335 dst.basedOn.add(i.copy()); 3336 }; 3337 if (partOf != null) { 3338 dst.partOf = new ArrayList<Reference>(); 3339 for (Reference i : partOf) 3340 dst.partOf.add(i.copy()); 3341 }; 3342 dst.status = status == null ? null : status.copy(); 3343 if (category != null) { 3344 dst.category = new ArrayList<CodeableConcept>(); 3345 for (CodeableConcept i : category) 3346 dst.category.add(i.copy()); 3347 }; 3348 dst.code = code == null ? null : code.copy(); 3349 dst.subject = subject == null ? null : subject.copy(); 3350 if (focus != null) { 3351 dst.focus = new ArrayList<Reference>(); 3352 for (Reference i : focus) 3353 dst.focus.add(i.copy()); 3354 }; 3355 dst.encounter = encounter == null ? null : encounter.copy(); 3356 dst.effective = effective == null ? null : effective.copy(); 3357 dst.issued = issued == null ? null : issued.copy(); 3358 if (performer != null) { 3359 dst.performer = new ArrayList<Reference>(); 3360 for (Reference i : performer) 3361 dst.performer.add(i.copy()); 3362 }; 3363 dst.value = value == null ? null : value.copy(); 3364 dst.dataAbsentReason = dataAbsentReason == null ? null : dataAbsentReason.copy(); 3365 if (interpretation != null) { 3366 dst.interpretation = new ArrayList<CodeableConcept>(); 3367 for (CodeableConcept i : interpretation) 3368 dst.interpretation.add(i.copy()); 3369 }; 3370 dst.comment = comment == null ? null : comment.copy(); 3371 dst.bodySite = bodySite == null ? null : bodySite.copy(); 3372 dst.method = method == null ? null : method.copy(); 3373 dst.specimen = specimen == null ? null : specimen.copy(); 3374 dst.device = device == null ? null : device.copy(); 3375 if (referenceRange != null) { 3376 dst.referenceRange = new ArrayList<ObservationReferenceRangeComponent>(); 3377 for (ObservationReferenceRangeComponent i : referenceRange) 3378 dst.referenceRange.add(i.copy()); 3379 }; 3380 if (hasMember != null) { 3381 dst.hasMember = new ArrayList<Reference>(); 3382 for (Reference i : hasMember) 3383 dst.hasMember.add(i.copy()); 3384 }; 3385 if (derivedFrom != null) { 3386 dst.derivedFrom = new ArrayList<Reference>(); 3387 for (Reference i : derivedFrom) 3388 dst.derivedFrom.add(i.copy()); 3389 }; 3390 if (component != null) { 3391 dst.component = new ArrayList<ObservationComponentComponent>(); 3392 for (ObservationComponentComponent i : component) 3393 dst.component.add(i.copy()); 3394 }; 3395 return dst; 3396 } 3397 3398 protected Observation typedCopy() { 3399 return copy(); 3400 } 3401 3402 @Override 3403 public boolean equalsDeep(Base other_) { 3404 if (!super.equalsDeep(other_)) 3405 return false; 3406 if (!(other_ instanceof Observation)) 3407 return false; 3408 Observation o = (Observation) other_; 3409 return compareDeep(identifier, o.identifier, true) && compareDeep(basedOn, o.basedOn, true) && compareDeep(partOf, o.partOf, true) 3410 && compareDeep(status, o.status, true) && compareDeep(category, o.category, true) && compareDeep(code, o.code, true) 3411 && compareDeep(subject, o.subject, true) && compareDeep(focus, o.focus, true) && compareDeep(encounter, o.encounter, true) 3412 && compareDeep(effective, o.effective, true) && compareDeep(issued, o.issued, true) && compareDeep(performer, o.performer, true) 3413 && compareDeep(value, o.value, true) && compareDeep(dataAbsentReason, o.dataAbsentReason, true) 3414 && compareDeep(interpretation, o.interpretation, true) && compareDeep(comment, o.comment, true) 3415 && compareDeep(bodySite, o.bodySite, true) && compareDeep(method, o.method, true) && compareDeep(specimen, o.specimen, true) 3416 && compareDeep(device, o.device, true) && compareDeep(referenceRange, o.referenceRange, true) && compareDeep(hasMember, o.hasMember, true) 3417 && compareDeep(derivedFrom, o.derivedFrom, true) && compareDeep(component, o.component, true); 3418 } 3419 3420 @Override 3421 public boolean equalsShallow(Base other_) { 3422 if (!super.equalsShallow(other_)) 3423 return false; 3424 if (!(other_ instanceof Observation)) 3425 return false; 3426 Observation o = (Observation) other_; 3427 return compareValues(status, o.status, true) && compareValues(issued, o.issued, true) && compareValues(comment, o.comment, true) 3428 ; 3429 } 3430 3431 public boolean isEmpty() { 3432 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, basedOn, partOf 3433 , status, category, code, subject, focus, encounter, effective, issued, performer 3434 , value, dataAbsentReason, interpretation, comment, bodySite, method, specimen 3435 , device, referenceRange, hasMember, derivedFrom, component); 3436 } 3437 3438 @Override 3439 public ResourceType getResourceType() { 3440 return ResourceType.Observation; 3441 } 3442 3443 /** 3444 * Search parameter: <b>date</b> 3445 * <p> 3446 * Description: <b>Obtained date/time. If the obtained element is a period, a date that falls in the period</b><br> 3447 * Type: <b>date</b><br> 3448 * Path: <b>Observation.effective[x]</b><br> 3449 * </p> 3450 */ 3451 @SearchParamDefinition(name="date", path="Observation.effective", description="Obtained date/time. If the obtained element is a period, a date that falls in the period", type="date" ) 3452 public static final String SP_DATE = "date"; 3453 /** 3454 * <b>Fluent Client</b> search parameter constant for <b>date</b> 3455 * <p> 3456 * Description: <b>Obtained date/time. If the obtained element is a period, a date that falls in the period</b><br> 3457 * Type: <b>date</b><br> 3458 * Path: <b>Observation.effective[x]</b><br> 3459 * </p> 3460 */ 3461 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 3462 3463 /** 3464 * Search parameter: <b>combo-data-absent-reason</b> 3465 * <p> 3466 * Description: <b>The reason why the expected value in the element Observation.value[x] or Observation.component.value[x] is missing.</b><br> 3467 * Type: <b>token</b><br> 3468 * Path: <b>Observation.dataAbsentReason, Observation.component.dataAbsentReason</b><br> 3469 * </p> 3470 */ 3471 @SearchParamDefinition(name="combo-data-absent-reason", path="Observation.dataAbsentReason | Observation.component.dataAbsentReason", description="The reason why the expected value in the element Observation.value[x] or Observation.component.value[x] is missing.", type="token" ) 3472 public static final String SP_COMBO_DATA_ABSENT_REASON = "combo-data-absent-reason"; 3473 /** 3474 * <b>Fluent Client</b> search parameter constant for <b>combo-data-absent-reason</b> 3475 * <p> 3476 * Description: <b>The reason why the expected value in the element Observation.value[x] or Observation.component.value[x] is missing.</b><br> 3477 * Type: <b>token</b><br> 3478 * Path: <b>Observation.dataAbsentReason, Observation.component.dataAbsentReason</b><br> 3479 * </p> 3480 */ 3481 public static final ca.uhn.fhir.rest.gclient.TokenClientParam COMBO_DATA_ABSENT_REASON = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_COMBO_DATA_ABSENT_REASON); 3482 3483 /** 3484 * Search parameter: <b>code</b> 3485 * <p> 3486 * Description: <b>The code of the observation type</b><br> 3487 * Type: <b>token</b><br> 3488 * Path: <b>Observation.code</b><br> 3489 * </p> 3490 */ 3491 @SearchParamDefinition(name="code", path="Observation.code", description="The code of the observation type", type="token" ) 3492 public static final String SP_CODE = "code"; 3493 /** 3494 * <b>Fluent Client</b> search parameter constant for <b>code</b> 3495 * <p> 3496 * Description: <b>The code of the observation type</b><br> 3497 * Type: <b>token</b><br> 3498 * Path: <b>Observation.code</b><br> 3499 * </p> 3500 */ 3501 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); 3502 3503 /** 3504 * Search parameter: <b>combo-code-value-quantity</b> 3505 * <p> 3506 * Description: <b>Code and quantity value parameter pair, including in components</b><br> 3507 * Type: <b>composite</b><br> 3508 * Path: <b></b><br> 3509 * </p> 3510 */ 3511 @SearchParamDefinition(name="combo-code-value-quantity", path="Observation | Observation.component", description="Code and quantity value parameter pair, including in components", type="composite", compositeOf={"combo-code", "combo-value-quantity"} ) 3512 public static final String SP_COMBO_CODE_VALUE_QUANTITY = "combo-code-value-quantity"; 3513 /** 3514 * <b>Fluent Client</b> search parameter constant for <b>combo-code-value-quantity</b> 3515 * <p> 3516 * Description: <b>Code and quantity value parameter pair, including in components</b><br> 3517 * Type: <b>composite</b><br> 3518 * Path: <b></b><br> 3519 * </p> 3520 */ 3521 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> COMBO_CODE_VALUE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_COMBO_CODE_VALUE_QUANTITY); 3522 3523 /** 3524 * Search parameter: <b>subject</b> 3525 * <p> 3526 * Description: <b>The subject that the observation is about</b><br> 3527 * Type: <b>reference</b><br> 3528 * Path: <b>Observation.subject</b><br> 3529 * </p> 3530 */ 3531 @SearchParamDefinition(name="subject", path="Observation.subject", description="The subject that the observation is about", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Device.class, Group.class, Location.class, Patient.class } ) 3532 public static final String SP_SUBJECT = "subject"; 3533 /** 3534 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 3535 * <p> 3536 * Description: <b>The subject that the observation is about</b><br> 3537 * Type: <b>reference</b><br> 3538 * Path: <b>Observation.subject</b><br> 3539 * </p> 3540 */ 3541 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 3542 3543/** 3544 * Constant for fluent queries to be used to add include statements. Specifies 3545 * the path value of "<b>Observation:subject</b>". 3546 */ 3547 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Observation:subject").toLocked(); 3548 3549 /** 3550 * Search parameter: <b>component-data-absent-reason</b> 3551 * <p> 3552 * Description: <b>The reason why the expected value in the element Observation.component.value[x] is missing.</b><br> 3553 * Type: <b>token</b><br> 3554 * Path: <b>Observation.component.dataAbsentReason</b><br> 3555 * </p> 3556 */ 3557 @SearchParamDefinition(name="component-data-absent-reason", path="Observation.component.dataAbsentReason", description="The reason why the expected value in the element Observation.component.value[x] is missing.", type="token" ) 3558 public static final String SP_COMPONENT_DATA_ABSENT_REASON = "component-data-absent-reason"; 3559 /** 3560 * <b>Fluent Client</b> search parameter constant for <b>component-data-absent-reason</b> 3561 * <p> 3562 * Description: <b>The reason why the expected value in the element Observation.component.value[x] is missing.</b><br> 3563 * Type: <b>token</b><br> 3564 * Path: <b>Observation.component.dataAbsentReason</b><br> 3565 * </p> 3566 */ 3567 public static final ca.uhn.fhir.rest.gclient.TokenClientParam COMPONENT_DATA_ABSENT_REASON = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_COMPONENT_DATA_ABSENT_REASON); 3568 3569 /** 3570 * Search parameter: <b>value-concept</b> 3571 * <p> 3572 * Description: <b>The value of the observation, if the value is a CodeableConcept</b><br> 3573 * Type: <b>token</b><br> 3574 * Path: <b>Observation.valueCodeableConcept</b><br> 3575 * </p> 3576 */ 3577 @SearchParamDefinition(name="value-concept", path="(Observation.value as CodeableConcept)", description="The value of the observation, if the value is a CodeableConcept", type="token" ) 3578 public static final String SP_VALUE_CONCEPT = "value-concept"; 3579 /** 3580 * <b>Fluent Client</b> search parameter constant for <b>value-concept</b> 3581 * <p> 3582 * Description: <b>The value of the observation, if the value is a CodeableConcept</b><br> 3583 * Type: <b>token</b><br> 3584 * Path: <b>Observation.valueCodeableConcept</b><br> 3585 * </p> 3586 */ 3587 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VALUE_CONCEPT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VALUE_CONCEPT); 3588 3589 /** 3590 * Search parameter: <b>value-date</b> 3591 * <p> 3592 * Description: <b>The value of the observation, if the value is a date or period of time</b><br> 3593 * Type: <b>date</b><br> 3594 * Path: <b>Observation.valueDateTime, Observation.valuePeriod</b><br> 3595 * </p> 3596 */ 3597 @SearchParamDefinition(name="value-date", path="(Observation.value as dateTime) | (Observation.value as Period)", description="The value of the observation, if the value is a date or period of time", type="date" ) 3598 public static final String SP_VALUE_DATE = "value-date"; 3599 /** 3600 * <b>Fluent Client</b> search parameter constant for <b>value-date</b> 3601 * <p> 3602 * Description: <b>The value of the observation, if the value is a date or period of time</b><br> 3603 * Type: <b>date</b><br> 3604 * Path: <b>Observation.valueDateTime, Observation.valuePeriod</b><br> 3605 * </p> 3606 */ 3607 public static final ca.uhn.fhir.rest.gclient.DateClientParam VALUE_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_VALUE_DATE); 3608 3609 /** 3610 * Search parameter: <b>focus</b> 3611 * <p> 3612 * Description: <b>The focus of an observation when the focus is not the patient of record.</b><br> 3613 * Type: <b>reference</b><br> 3614 * Path: <b>Observation.focus</b><br> 3615 * </p> 3616 */ 3617 @SearchParamDefinition(name="focus", path="Observation.focus", description="The focus of an observation when the focus is not the patient of record.", type="reference" ) 3618 public static final String SP_FOCUS = "focus"; 3619 /** 3620 * <b>Fluent Client</b> search parameter constant for <b>focus</b> 3621 * <p> 3622 * Description: <b>The focus of an observation when the focus is not the patient of record.</b><br> 3623 * Type: <b>reference</b><br> 3624 * Path: <b>Observation.focus</b><br> 3625 * </p> 3626 */ 3627 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FOCUS = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_FOCUS); 3628 3629/** 3630 * Constant for fluent queries to be used to add include statements. Specifies 3631 * the path value of "<b>Observation:focus</b>". 3632 */ 3633 public static final ca.uhn.fhir.model.api.Include INCLUDE_FOCUS = new ca.uhn.fhir.model.api.Include("Observation:focus").toLocked(); 3634 3635 /** 3636 * Search parameter: <b>derived-from</b> 3637 * <p> 3638 * Description: <b>Related measurements the observation is made from</b><br> 3639 * Type: <b>reference</b><br> 3640 * Path: <b>Observation.derivedFrom</b><br> 3641 * </p> 3642 */ 3643 @SearchParamDefinition(name="derived-from", path="Observation.derivedFrom", description="Related measurements the observation is made from", type="reference", target={DocumentReference.class, ImagingStudy.class, Media.class, Observation.class, QuestionnaireResponse.class, Sequence.class } ) 3644 public static final String SP_DERIVED_FROM = "derived-from"; 3645 /** 3646 * <b>Fluent Client</b> search parameter constant for <b>derived-from</b> 3647 * <p> 3648 * Description: <b>Related measurements the observation is made from</b><br> 3649 * Type: <b>reference</b><br> 3650 * Path: <b>Observation.derivedFrom</b><br> 3651 * </p> 3652 */ 3653 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DERIVED_FROM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DERIVED_FROM); 3654 3655/** 3656 * Constant for fluent queries to be used to add include statements. Specifies 3657 * the path value of "<b>Observation:derived-from</b>". 3658 */ 3659 public static final ca.uhn.fhir.model.api.Include INCLUDE_DERIVED_FROM = new ca.uhn.fhir.model.api.Include("Observation:derived-from").toLocked(); 3660 3661 /** 3662 * Search parameter: <b>part-of</b> 3663 * <p> 3664 * Description: <b>Part of referenced event</b><br> 3665 * Type: <b>reference</b><br> 3666 * Path: <b>Observation.partOf</b><br> 3667 * </p> 3668 */ 3669 @SearchParamDefinition(name="part-of", path="Observation.partOf", description="Part of referenced event", type="reference", target={ImagingStudy.class, Immunization.class, MedicationAdministration.class, MedicationDispense.class, MedicationStatement.class, Procedure.class } ) 3670 public static final String SP_PART_OF = "part-of"; 3671 /** 3672 * <b>Fluent Client</b> search parameter constant for <b>part-of</b> 3673 * <p> 3674 * Description: <b>Part of referenced event</b><br> 3675 * Type: <b>reference</b><br> 3676 * Path: <b>Observation.partOf</b><br> 3677 * </p> 3678 */ 3679 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PART_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PART_OF); 3680 3681/** 3682 * Constant for fluent queries to be used to add include statements. Specifies 3683 * the path value of "<b>Observation:part-of</b>". 3684 */ 3685 public static final ca.uhn.fhir.model.api.Include INCLUDE_PART_OF = new ca.uhn.fhir.model.api.Include("Observation:part-of").toLocked(); 3686 3687 /** 3688 * Search parameter: <b>has-member</b> 3689 * <p> 3690 * Description: <b>Related resource that belongs to the Observation group</b><br> 3691 * Type: <b>reference</b><br> 3692 * Path: <b>Observation.hasMember</b><br> 3693 * </p> 3694 */ 3695 @SearchParamDefinition(name="has-member", path="Observation.hasMember", description="Related resource that belongs to the Observation group", type="reference", target={Observation.class, QuestionnaireResponse.class, Sequence.class } ) 3696 public static final String SP_HAS_MEMBER = "has-member"; 3697 /** 3698 * <b>Fluent Client</b> search parameter constant for <b>has-member</b> 3699 * <p> 3700 * Description: <b>Related resource that belongs to the Observation group</b><br> 3701 * Type: <b>reference</b><br> 3702 * Path: <b>Observation.hasMember</b><br> 3703 * </p> 3704 */ 3705 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam HAS_MEMBER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_HAS_MEMBER); 3706 3707/** 3708 * Constant for fluent queries to be used to add include statements. Specifies 3709 * the path value of "<b>Observation:has-member</b>". 3710 */ 3711 public static final ca.uhn.fhir.model.api.Include INCLUDE_HAS_MEMBER = new ca.uhn.fhir.model.api.Include("Observation:has-member").toLocked(); 3712 3713 /** 3714 * Search parameter: <b>code-value-string</b> 3715 * <p> 3716 * Description: <b>Code and string value parameter pair</b><br> 3717 * Type: <b>composite</b><br> 3718 * Path: <b></b><br> 3719 * </p> 3720 */ 3721 @SearchParamDefinition(name="code-value-string", path="Observation", description="Code and string value parameter pair", type="composite", compositeOf={"code", "value-string"} ) 3722 public static final String SP_CODE_VALUE_STRING = "code-value-string"; 3723 /** 3724 * <b>Fluent Client</b> search parameter constant for <b>code-value-string</b> 3725 * <p> 3726 * Description: <b>Code and string value parameter pair</b><br> 3727 * Type: <b>composite</b><br> 3728 * Path: <b></b><br> 3729 * </p> 3730 */ 3731 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.StringClientParam> CODE_VALUE_STRING = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.StringClientParam>(SP_CODE_VALUE_STRING); 3732 3733 /** 3734 * Search parameter: <b>component-code-value-quantity</b> 3735 * <p> 3736 * Description: <b>Component code and component quantity value parameter pair</b><br> 3737 * Type: <b>composite</b><br> 3738 * Path: <b></b><br> 3739 * </p> 3740 */ 3741 @SearchParamDefinition(name="component-code-value-quantity", path="Observation.component", description="Component code and component quantity value parameter pair", type="composite", compositeOf={"component-code", "component-value-quantity"} ) 3742 public static final String SP_COMPONENT_CODE_VALUE_QUANTITY = "component-code-value-quantity"; 3743 /** 3744 * <b>Fluent Client</b> search parameter constant for <b>component-code-value-quantity</b> 3745 * <p> 3746 * Description: <b>Component code and component quantity value parameter pair</b><br> 3747 * Type: <b>composite</b><br> 3748 * Path: <b></b><br> 3749 * </p> 3750 */ 3751 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> COMPONENT_CODE_VALUE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_COMPONENT_CODE_VALUE_QUANTITY); 3752 3753 /** 3754 * Search parameter: <b>based-on</b> 3755 * <p> 3756 * Description: <b>Reference to the service request.</b><br> 3757 * Type: <b>reference</b><br> 3758 * Path: <b>Observation.basedOn</b><br> 3759 * </p> 3760 */ 3761 @SearchParamDefinition(name="based-on", path="Observation.basedOn", description="Reference to the service request.", type="reference", target={CarePlan.class, DeviceRequest.class, ImmunizationRecommendation.class, MedicationRequest.class, NutritionOrder.class, ServiceRequest.class } ) 3762 public static final String SP_BASED_ON = "based-on"; 3763 /** 3764 * <b>Fluent Client</b> search parameter constant for <b>based-on</b> 3765 * <p> 3766 * Description: <b>Reference to the service request.</b><br> 3767 * Type: <b>reference</b><br> 3768 * Path: <b>Observation.basedOn</b><br> 3769 * </p> 3770 */ 3771 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON); 3772 3773/** 3774 * Constant for fluent queries to be used to add include statements. Specifies 3775 * the path value of "<b>Observation:based-on</b>". 3776 */ 3777 public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("Observation:based-on").toLocked(); 3778 3779 /** 3780 * Search parameter: <b>code-value-date</b> 3781 * <p> 3782 * Description: <b>Code and date/time value parameter pair</b><br> 3783 * Type: <b>composite</b><br> 3784 * Path: <b></b><br> 3785 * </p> 3786 */ 3787 @SearchParamDefinition(name="code-value-date", path="Observation", description="Code and date/time value parameter pair", type="composite", compositeOf={"code", "value-date"} ) 3788 public static final String SP_CODE_VALUE_DATE = "code-value-date"; 3789 /** 3790 * <b>Fluent Client</b> search parameter constant for <b>code-value-date</b> 3791 * <p> 3792 * Description: <b>Code and date/time value parameter pair</b><br> 3793 * Type: <b>composite</b><br> 3794 * Path: <b></b><br> 3795 * </p> 3796 */ 3797 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.DateClientParam> CODE_VALUE_DATE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.DateClientParam>(SP_CODE_VALUE_DATE); 3798 3799 /** 3800 * Search parameter: <b>patient</b> 3801 * <p> 3802 * Description: <b>The subject that the observation is about (if patient)</b><br> 3803 * Type: <b>reference</b><br> 3804 * Path: <b>Observation.subject</b><br> 3805 * </p> 3806 */ 3807 @SearchParamDefinition(name="patient", path="Observation.subject.where(resolve() is Patient)", description="The subject that the observation is about (if patient)", type="reference", target={Patient.class } ) 3808 public static final String SP_PATIENT = "patient"; 3809 /** 3810 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 3811 * <p> 3812 * Description: <b>The subject that the observation is about (if patient)</b><br> 3813 * Type: <b>reference</b><br> 3814 * Path: <b>Observation.subject</b><br> 3815 * </p> 3816 */ 3817 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 3818 3819/** 3820 * Constant for fluent queries to be used to add include statements. Specifies 3821 * the path value of "<b>Observation:patient</b>". 3822 */ 3823 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Observation:patient").toLocked(); 3824 3825 /** 3826 * Search parameter: <b>specimen</b> 3827 * <p> 3828 * Description: <b>Specimen used for this observation</b><br> 3829 * Type: <b>reference</b><br> 3830 * Path: <b>Observation.specimen</b><br> 3831 * </p> 3832 */ 3833 @SearchParamDefinition(name="specimen", path="Observation.specimen", description="Specimen used for this observation", type="reference", target={Specimen.class } ) 3834 public static final String SP_SPECIMEN = "specimen"; 3835 /** 3836 * <b>Fluent Client</b> search parameter constant for <b>specimen</b> 3837 * <p> 3838 * Description: <b>Specimen used for this observation</b><br> 3839 * Type: <b>reference</b><br> 3840 * Path: <b>Observation.specimen</b><br> 3841 * </p> 3842 */ 3843 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SPECIMEN = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SPECIMEN); 3844 3845/** 3846 * Constant for fluent queries to be used to add include statements. Specifies 3847 * the path value of "<b>Observation:specimen</b>". 3848 */ 3849 public static final ca.uhn.fhir.model.api.Include INCLUDE_SPECIMEN = new ca.uhn.fhir.model.api.Include("Observation:specimen").toLocked(); 3850 3851 /** 3852 * Search parameter: <b>component-code</b> 3853 * <p> 3854 * Description: <b>The component code of the observation type</b><br> 3855 * Type: <b>token</b><br> 3856 * Path: <b>Observation.component.code</b><br> 3857 * </p> 3858 */ 3859 @SearchParamDefinition(name="component-code", path="Observation.component.code", description="The component code of the observation type", type="token" ) 3860 public static final String SP_COMPONENT_CODE = "component-code"; 3861 /** 3862 * <b>Fluent Client</b> search parameter constant for <b>component-code</b> 3863 * <p> 3864 * Description: <b>The component code of the observation type</b><br> 3865 * Type: <b>token</b><br> 3866 * Path: <b>Observation.component.code</b><br> 3867 * </p> 3868 */ 3869 public static final ca.uhn.fhir.rest.gclient.TokenClientParam COMPONENT_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_COMPONENT_CODE); 3870 3871 /** 3872 * Search parameter: <b>code-value-quantity</b> 3873 * <p> 3874 * Description: <b>Code and quantity value parameter pair</b><br> 3875 * Type: <b>composite</b><br> 3876 * Path: <b></b><br> 3877 * </p> 3878 */ 3879 @SearchParamDefinition(name="code-value-quantity", path="Observation", description="Code and quantity value parameter pair", type="composite", compositeOf={"code", "value-quantity"} ) 3880 public static final String SP_CODE_VALUE_QUANTITY = "code-value-quantity"; 3881 /** 3882 * <b>Fluent Client</b> search parameter constant for <b>code-value-quantity</b> 3883 * <p> 3884 * Description: <b>Code and quantity value parameter pair</b><br> 3885 * Type: <b>composite</b><br> 3886 * Path: <b></b><br> 3887 * </p> 3888 */ 3889 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CODE_VALUE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_CODE_VALUE_QUANTITY); 3890 3891 /** 3892 * Search parameter: <b>combo-code-value-concept</b> 3893 * <p> 3894 * Description: <b>Code and coded value parameter pair, including in components</b><br> 3895 * Type: <b>composite</b><br> 3896 * Path: <b></b><br> 3897 * </p> 3898 */ 3899 @SearchParamDefinition(name="combo-code-value-concept", path="Observation | Observation.component", description="Code and coded value parameter pair, including in components", type="composite", compositeOf={"combo-code", "combo-value-concept"} ) 3900 public static final String SP_COMBO_CODE_VALUE_CONCEPT = "combo-code-value-concept"; 3901 /** 3902 * <b>Fluent Client</b> search parameter constant for <b>combo-code-value-concept</b> 3903 * <p> 3904 * Description: <b>Code and coded value parameter pair, including in components</b><br> 3905 * Type: <b>composite</b><br> 3906 * Path: <b></b><br> 3907 * </p> 3908 */ 3909 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> COMBO_CODE_VALUE_CONCEPT = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_COMBO_CODE_VALUE_CONCEPT); 3910 3911 /** 3912 * Search parameter: <b>value-string</b> 3913 * <p> 3914 * Description: <b>The value of the observation, if the value is a string, and also searches in CodeableConcept.text</b><br> 3915 * Type: <b>string</b><br> 3916 * Path: <b>Observation.valueString</b><br> 3917 * </p> 3918 */ 3919 @SearchParamDefinition(name="value-string", path="(Observation.value as string)", description="The value of the observation, if the value is a string, and also searches in CodeableConcept.text", type="string" ) 3920 public static final String SP_VALUE_STRING = "value-string"; 3921 /** 3922 * <b>Fluent Client</b> search parameter constant for <b>value-string</b> 3923 * <p> 3924 * Description: <b>The value of the observation, if the value is a string, and also searches in CodeableConcept.text</b><br> 3925 * Type: <b>string</b><br> 3926 * Path: <b>Observation.valueString</b><br> 3927 * </p> 3928 */ 3929 public static final ca.uhn.fhir.rest.gclient.StringClientParam VALUE_STRING = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_VALUE_STRING); 3930 3931 /** 3932 * Search parameter: <b>identifier</b> 3933 * <p> 3934 * Description: <b>The unique id for a particular observation</b><br> 3935 * Type: <b>token</b><br> 3936 * Path: <b>Observation.identifier</b><br> 3937 * </p> 3938 */ 3939 @SearchParamDefinition(name="identifier", path="Observation.identifier", description="The unique id for a particular observation", type="token" ) 3940 public static final String SP_IDENTIFIER = "identifier"; 3941 /** 3942 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 3943 * <p> 3944 * Description: <b>The unique id for a particular observation</b><br> 3945 * Type: <b>token</b><br> 3946 * Path: <b>Observation.identifier</b><br> 3947 * </p> 3948 */ 3949 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 3950 3951 /** 3952 * Search parameter: <b>performer</b> 3953 * <p> 3954 * Description: <b>Who performed the observation</b><br> 3955 * Type: <b>reference</b><br> 3956 * Path: <b>Observation.performer</b><br> 3957 * </p> 3958 */ 3959 @SearchParamDefinition(name="performer", path="Observation.performer", description="Who performed the observation", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") }, target={CareTeam.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) 3960 public static final String SP_PERFORMER = "performer"; 3961 /** 3962 * <b>Fluent Client</b> search parameter constant for <b>performer</b> 3963 * <p> 3964 * Description: <b>Who performed the observation</b><br> 3965 * Type: <b>reference</b><br> 3966 * Path: <b>Observation.performer</b><br> 3967 * </p> 3968 */ 3969 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PERFORMER); 3970 3971/** 3972 * Constant for fluent queries to be used to add include statements. Specifies 3973 * the path value of "<b>Observation:performer</b>". 3974 */ 3975 public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER = new ca.uhn.fhir.model.api.Include("Observation:performer").toLocked(); 3976 3977 /** 3978 * Search parameter: <b>combo-code</b> 3979 * <p> 3980 * Description: <b>The code of the observation type or component type</b><br> 3981 * Type: <b>token</b><br> 3982 * Path: <b>Observation.code, Observation.component.code</b><br> 3983 * </p> 3984 */ 3985 @SearchParamDefinition(name="combo-code", path="Observation.code | Observation.component.code", description="The code of the observation type or component type", type="token" ) 3986 public static final String SP_COMBO_CODE = "combo-code"; 3987 /** 3988 * <b>Fluent Client</b> search parameter constant for <b>combo-code</b> 3989 * <p> 3990 * Description: <b>The code of the observation type or component type</b><br> 3991 * Type: <b>token</b><br> 3992 * Path: <b>Observation.code, Observation.component.code</b><br> 3993 * </p> 3994 */ 3995 public static final ca.uhn.fhir.rest.gclient.TokenClientParam COMBO_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_COMBO_CODE); 3996 3997 /** 3998 * Search parameter: <b>method</b> 3999 * <p> 4000 * Description: <b>The method used for the observation</b><br> 4001 * Type: <b>token</b><br> 4002 * Path: <b>Observation.method</b><br> 4003 * </p> 4004 */ 4005 @SearchParamDefinition(name="method", path="Observation.method", description="The method used for the observation", type="token" ) 4006 public static final String SP_METHOD = "method"; 4007 /** 4008 * <b>Fluent Client</b> search parameter constant for <b>method</b> 4009 * <p> 4010 * Description: <b>The method used for the observation</b><br> 4011 * Type: <b>token</b><br> 4012 * Path: <b>Observation.method</b><br> 4013 * </p> 4014 */ 4015 public static final ca.uhn.fhir.rest.gclient.TokenClientParam METHOD = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_METHOD); 4016 4017 /** 4018 * Search parameter: <b>value-quantity</b> 4019 * <p> 4020 * Description: <b>The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)</b><br> 4021 * Type: <b>quantity</b><br> 4022 * Path: <b>Observation.valueQuantity</b><br> 4023 * </p> 4024 */ 4025 @SearchParamDefinition(name="value-quantity", path="(Observation.value as Quantity)", description="The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)", type="quantity" ) 4026 public static final String SP_VALUE_QUANTITY = "value-quantity"; 4027 /** 4028 * <b>Fluent Client</b> search parameter constant for <b>value-quantity</b> 4029 * <p> 4030 * Description: <b>The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)</b><br> 4031 * Type: <b>quantity</b><br> 4032 * Path: <b>Observation.valueQuantity</b><br> 4033 * </p> 4034 */ 4035 public static final ca.uhn.fhir.rest.gclient.QuantityClientParam VALUE_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_VALUE_QUANTITY); 4036 4037 /** 4038 * Search parameter: <b>component-value-quantity</b> 4039 * <p> 4040 * Description: <b>The value of the component observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)</b><br> 4041 * Type: <b>quantity</b><br> 4042 * Path: <b>Observation.component.valueQuantity</b><br> 4043 * </p> 4044 */ 4045 @SearchParamDefinition(name="component-value-quantity", path="(Observation.component.value as Quantity)", description="The value of the component observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)", type="quantity" ) 4046 public static final String SP_COMPONENT_VALUE_QUANTITY = "component-value-quantity"; 4047 /** 4048 * <b>Fluent Client</b> search parameter constant for <b>component-value-quantity</b> 4049 * <p> 4050 * Description: <b>The value of the component observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)</b><br> 4051 * Type: <b>quantity</b><br> 4052 * Path: <b>Observation.component.valueQuantity</b><br> 4053 * </p> 4054 */ 4055 public static final ca.uhn.fhir.rest.gclient.QuantityClientParam COMPONENT_VALUE_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_COMPONENT_VALUE_QUANTITY); 4056 4057 /** 4058 * Search parameter: <b>data-absent-reason</b> 4059 * <p> 4060 * Description: <b>The reason why the expected value in the element Observation.value[x] is missing.</b><br> 4061 * Type: <b>token</b><br> 4062 * Path: <b>Observation.dataAbsentReason</b><br> 4063 * </p> 4064 */ 4065 @SearchParamDefinition(name="data-absent-reason", path="Observation.dataAbsentReason", description="The reason why the expected value in the element Observation.value[x] is missing.", type="token" ) 4066 public static final String SP_DATA_ABSENT_REASON = "data-absent-reason"; 4067 /** 4068 * <b>Fluent Client</b> search parameter constant for <b>data-absent-reason</b> 4069 * <p> 4070 * Description: <b>The reason why the expected value in the element Observation.value[x] is missing.</b><br> 4071 * Type: <b>token</b><br> 4072 * Path: <b>Observation.dataAbsentReason</b><br> 4073 * </p> 4074 */ 4075 public static final ca.uhn.fhir.rest.gclient.TokenClientParam DATA_ABSENT_REASON = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_DATA_ABSENT_REASON); 4076 4077 /** 4078 * Search parameter: <b>combo-value-quantity</b> 4079 * <p> 4080 * Description: <b>The value or component value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)</b><br> 4081 * Type: <b>quantity</b><br> 4082 * Path: <b>Observation.valueQuantity, Observation.component.valueQuantity</b><br> 4083 * </p> 4084 */ 4085 @SearchParamDefinition(name="combo-value-quantity", path="(Observation.value as Quantity) | (Observation.component.value as Quantity)", description="The value or component value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)", type="quantity" ) 4086 public static final String SP_COMBO_VALUE_QUANTITY = "combo-value-quantity"; 4087 /** 4088 * <b>Fluent Client</b> search parameter constant for <b>combo-value-quantity</b> 4089 * <p> 4090 * Description: <b>The value or component value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)</b><br> 4091 * Type: <b>quantity</b><br> 4092 * Path: <b>Observation.valueQuantity, Observation.component.valueQuantity</b><br> 4093 * </p> 4094 */ 4095 public static final ca.uhn.fhir.rest.gclient.QuantityClientParam COMBO_VALUE_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_COMBO_VALUE_QUANTITY); 4096 4097 /** 4098 * Search parameter: <b>encounter</b> 4099 * <p> 4100 * Description: <b>Encounter related to the observation</b><br> 4101 * Type: <b>reference</b><br> 4102 * Path: <b>Observation.encounter</b><br> 4103 * </p> 4104 */ 4105 @SearchParamDefinition(name="encounter", path="Observation.encounter", description="Encounter related to the observation", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") }, target={Encounter.class } ) 4106 public static final String SP_ENCOUNTER = "encounter"; 4107 /** 4108 * <b>Fluent Client</b> search parameter constant for <b>encounter</b> 4109 * <p> 4110 * Description: <b>Encounter related to the observation</b><br> 4111 * Type: <b>reference</b><br> 4112 * Path: <b>Observation.encounter</b><br> 4113 * </p> 4114 */ 4115 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER); 4116 4117/** 4118 * Constant for fluent queries to be used to add include statements. Specifies 4119 * the path value of "<b>Observation:encounter</b>". 4120 */ 4121 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("Observation:encounter").toLocked(); 4122 4123 /** 4124 * Search parameter: <b>code-value-concept</b> 4125 * <p> 4126 * Description: <b>Code and coded value parameter pair</b><br> 4127 * Type: <b>composite</b><br> 4128 * Path: <b></b><br> 4129 * </p> 4130 */ 4131 @SearchParamDefinition(name="code-value-concept", path="Observation", description="Code and coded value parameter pair", type="composite", compositeOf={"code", "value-concept"} ) 4132 public static final String SP_CODE_VALUE_CONCEPT = "code-value-concept"; 4133 /** 4134 * <b>Fluent Client</b> search parameter constant for <b>code-value-concept</b> 4135 * <p> 4136 * Description: <b>Code and coded value parameter pair</b><br> 4137 * Type: <b>composite</b><br> 4138 * Path: <b></b><br> 4139 * </p> 4140 */ 4141 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CODE_VALUE_CONCEPT = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_CODE_VALUE_CONCEPT); 4142 4143 /** 4144 * Search parameter: <b>component-code-value-concept</b> 4145 * <p> 4146 * Description: <b>Component code and component coded value parameter pair</b><br> 4147 * Type: <b>composite</b><br> 4148 * Path: <b></b><br> 4149 * </p> 4150 */ 4151 @SearchParamDefinition(name="component-code-value-concept", path="Observation.component", description="Component code and component coded value parameter pair", type="composite", compositeOf={"component-code", "component-value-concept"} ) 4152 public static final String SP_COMPONENT_CODE_VALUE_CONCEPT = "component-code-value-concept"; 4153 /** 4154 * <b>Fluent Client</b> search parameter constant for <b>component-code-value-concept</b> 4155 * <p> 4156 * Description: <b>Component code and component coded value parameter pair</b><br> 4157 * Type: <b>composite</b><br> 4158 * Path: <b></b><br> 4159 * </p> 4160 */ 4161 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> COMPONENT_CODE_VALUE_CONCEPT = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_COMPONENT_CODE_VALUE_CONCEPT); 4162 4163 /** 4164 * Search parameter: <b>component-value-concept</b> 4165 * <p> 4166 * Description: <b>The value of the component observation, if the value is a CodeableConcept</b><br> 4167 * Type: <b>token</b><br> 4168 * Path: <b>Observation.component.valueCodeableConcept</b><br> 4169 * </p> 4170 */ 4171 @SearchParamDefinition(name="component-value-concept", path="(Observation.component.value as CodeableConcept)", description="The value of the component observation, if the value is a CodeableConcept", type="token" ) 4172 public static final String SP_COMPONENT_VALUE_CONCEPT = "component-value-concept"; 4173 /** 4174 * <b>Fluent Client</b> search parameter constant for <b>component-value-concept</b> 4175 * <p> 4176 * Description: <b>The value of the component observation, if the value is a CodeableConcept</b><br> 4177 * Type: <b>token</b><br> 4178 * Path: <b>Observation.component.valueCodeableConcept</b><br> 4179 * </p> 4180 */ 4181 public static final ca.uhn.fhir.rest.gclient.TokenClientParam COMPONENT_VALUE_CONCEPT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_COMPONENT_VALUE_CONCEPT); 4182 4183 /** 4184 * Search parameter: <b>category</b> 4185 * <p> 4186 * Description: <b>The classification of the type of observation</b><br> 4187 * Type: <b>token</b><br> 4188 * Path: <b>Observation.category</b><br> 4189 * </p> 4190 */ 4191 @SearchParamDefinition(name="category", path="Observation.category", description="The classification of the type of observation", type="token" ) 4192 public static final String SP_CATEGORY = "category"; 4193 /** 4194 * <b>Fluent Client</b> search parameter constant for <b>category</b> 4195 * <p> 4196 * Description: <b>The classification of the type of observation</b><br> 4197 * Type: <b>token</b><br> 4198 * Path: <b>Observation.category</b><br> 4199 * </p> 4200 */ 4201 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY); 4202 4203 /** 4204 * Search parameter: <b>device</b> 4205 * <p> 4206 * Description: <b>The Device that generated the observation data.</b><br> 4207 * Type: <b>reference</b><br> 4208 * Path: <b>Observation.device</b><br> 4209 * </p> 4210 */ 4211 @SearchParamDefinition(name="device", path="Observation.device", description="The Device that generated the observation data.", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device") }, target={Device.class, DeviceMetric.class } ) 4212 public static final String SP_DEVICE = "device"; 4213 /** 4214 * <b>Fluent Client</b> search parameter constant for <b>device</b> 4215 * <p> 4216 * Description: <b>The Device that generated the observation data.</b><br> 4217 * Type: <b>reference</b><br> 4218 * Path: <b>Observation.device</b><br> 4219 * </p> 4220 */ 4221 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEVICE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DEVICE); 4222 4223/** 4224 * Constant for fluent queries to be used to add include statements. Specifies 4225 * the path value of "<b>Observation:device</b>". 4226 */ 4227 public static final ca.uhn.fhir.model.api.Include INCLUDE_DEVICE = new ca.uhn.fhir.model.api.Include("Observation:device").toLocked(); 4228 4229 /** 4230 * Search parameter: <b>combo-value-concept</b> 4231 * <p> 4232 * Description: <b>The value or component value of the observation, if the value is a CodeableConcept</b><br> 4233 * Type: <b>token</b><br> 4234 * Path: <b>Observation.valueCodeableConcept, Observation.component.valueCodeableConcept</b><br> 4235 * </p> 4236 */ 4237 @SearchParamDefinition(name="combo-value-concept", path="(Observation.value as CodeableConcept) | (Observation.component.value as CodeableConcept)", description="The value or component value of the observation, if the value is a CodeableConcept", type="token" ) 4238 public static final String SP_COMBO_VALUE_CONCEPT = "combo-value-concept"; 4239 /** 4240 * <b>Fluent Client</b> search parameter constant for <b>combo-value-concept</b> 4241 * <p> 4242 * Description: <b>The value or component value of the observation, if the value is a CodeableConcept</b><br> 4243 * Type: <b>token</b><br> 4244 * Path: <b>Observation.valueCodeableConcept, Observation.component.valueCodeableConcept</b><br> 4245 * </p> 4246 */ 4247 public static final ca.uhn.fhir.rest.gclient.TokenClientParam COMBO_VALUE_CONCEPT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_COMBO_VALUE_CONCEPT); 4248 4249 /** 4250 * Search parameter: <b>status</b> 4251 * <p> 4252 * Description: <b>The status of the observation</b><br> 4253 * Type: <b>token</b><br> 4254 * Path: <b>Observation.status</b><br> 4255 * </p> 4256 */ 4257 @SearchParamDefinition(name="status", path="Observation.status", description="The status of the observation", type="token" ) 4258 public static final String SP_STATUS = "status"; 4259 /** 4260 * <b>Fluent Client</b> search parameter constant for <b>status</b> 4261 * <p> 4262 * Description: <b>The status of the observation</b><br> 4263 * Type: <b>token</b><br> 4264 * Path: <b>Observation.status</b><br> 4265 * </p> 4266 */ 4267 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 4268 4269 4270} 4271