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