001package org.hl7.fhir.r5.model; 002 003/*- 004 * #%L 005 * org.hl7.fhir.r5 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023/* 024 Copyright (c) 2011+, HL7, Inc. 025 All rights reserved. 026 027 Redistribution and use in source and binary forms, with or without modification, 028 are permitted provided that the following conditions are met: 029 030 * Redistributions of source code must retain the above copyright notice, this 031 list of conditions and the following disclaimer. 032 * Redistributions in binary form must reproduce the above copyright notice, 033 this list of conditions and the following disclaimer in the documentation 034 and/or other materials provided with the distribution. 035 * Neither the name of HL7 nor the names of its contributors may be used to 036 endorse or promote products derived from this software without specific 037 prior written permission. 038 039 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 040 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 041 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 042 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 043 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 044 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 045 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 046 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 047 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 048 POSSIBILITY OF SUCH DAMAGE. 049 050*/ 051 052// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0 053import java.util.ArrayList; 054import java.util.Date; 055import java.util.List; 056import org.hl7.fhir.exceptions.FHIRException; 057import org.hl7.fhir.instance.model.api.ICompositeType; 058 059import org.hl7.fhir.instance.model.api.IBaseDatatypeElement; 060import org.hl7.fhir.utilities.Utilities; 061import ca.uhn.fhir.model.api.annotation.ResourceDef; 062import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 063import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 064import ca.uhn.fhir.model.api.annotation.Child; 065import ca.uhn.fhir.model.api.annotation.ChildOrder; 066import ca.uhn.fhir.model.api.annotation.Description; 067import ca.uhn.fhir.model.api.annotation.Block; 068/** 069 * A sample to be used for analysis. 070 */ 071@ResourceDef(name="Specimen", profile="http://hl7.org/fhir/StructureDefinition/Specimen") 072public class Specimen extends DomainResource { 073 074 public enum SpecimenStatus { 075 /** 076 * The physical specimen is present and in good condition. 077 */ 078 AVAILABLE, 079 /** 080 * There is no physical specimen because it is either lost, destroyed or consumed. 081 */ 082 UNAVAILABLE, 083 /** 084 * The specimen cannot be used because of a quality issue such as a broken container, contamination, or too old. 085 */ 086 UNSATISFACTORY, 087 /** 088 * The specimen was entered in error and therefore nullified. 089 */ 090 ENTEREDINERROR, 091 /** 092 * added to help the parsers with the generic types 093 */ 094 NULL; 095 public static SpecimenStatus fromCode(String codeString) throws FHIRException { 096 if (codeString == null || "".equals(codeString)) 097 return null; 098 if ("available".equals(codeString)) 099 return AVAILABLE; 100 if ("unavailable".equals(codeString)) 101 return UNAVAILABLE; 102 if ("unsatisfactory".equals(codeString)) 103 return UNSATISFACTORY; 104 if ("entered-in-error".equals(codeString)) 105 return ENTEREDINERROR; 106 if (Configuration.isAcceptInvalidEnums()) 107 return null; 108 else 109 throw new FHIRException("Unknown SpecimenStatus code '"+codeString+"'"); 110 } 111 public String toCode() { 112 switch (this) { 113 case AVAILABLE: return "available"; 114 case UNAVAILABLE: return "unavailable"; 115 case UNSATISFACTORY: return "unsatisfactory"; 116 case ENTEREDINERROR: return "entered-in-error"; 117 default: return "?"; 118 } 119 } 120 public String getSystem() { 121 switch (this) { 122 case AVAILABLE: return "http://hl7.org/fhir/specimen-status"; 123 case UNAVAILABLE: return "http://hl7.org/fhir/specimen-status"; 124 case UNSATISFACTORY: return "http://hl7.org/fhir/specimen-status"; 125 case ENTEREDINERROR: return "http://hl7.org/fhir/specimen-status"; 126 default: return "?"; 127 } 128 } 129 public String getDefinition() { 130 switch (this) { 131 case AVAILABLE: return "The physical specimen is present and in good condition."; 132 case UNAVAILABLE: return "There is no physical specimen because it is either lost, destroyed or consumed."; 133 case UNSATISFACTORY: return "The specimen cannot be used because of a quality issue such as a broken container, contamination, or too old."; 134 case ENTEREDINERROR: return "The specimen was entered in error and therefore nullified."; 135 default: return "?"; 136 } 137 } 138 public String getDisplay() { 139 switch (this) { 140 case AVAILABLE: return "Available"; 141 case UNAVAILABLE: return "Unavailable"; 142 case UNSATISFACTORY: return "Unsatisfactory"; 143 case ENTEREDINERROR: return "Entered in Error"; 144 default: return "?"; 145 } 146 } 147 } 148 149 public static class SpecimenStatusEnumFactory implements EnumFactory<SpecimenStatus> { 150 public SpecimenStatus fromCode(String codeString) throws IllegalArgumentException { 151 if (codeString == null || "".equals(codeString)) 152 if (codeString == null || "".equals(codeString)) 153 return null; 154 if ("available".equals(codeString)) 155 return SpecimenStatus.AVAILABLE; 156 if ("unavailable".equals(codeString)) 157 return SpecimenStatus.UNAVAILABLE; 158 if ("unsatisfactory".equals(codeString)) 159 return SpecimenStatus.UNSATISFACTORY; 160 if ("entered-in-error".equals(codeString)) 161 return SpecimenStatus.ENTEREDINERROR; 162 throw new IllegalArgumentException("Unknown SpecimenStatus code '"+codeString+"'"); 163 } 164 public Enumeration<SpecimenStatus> fromType(Base code) throws FHIRException { 165 if (code == null) 166 return null; 167 if (code.isEmpty()) 168 return new Enumeration<SpecimenStatus>(this); 169 String codeString = ((PrimitiveType) code).asStringValue(); 170 if (codeString == null || "".equals(codeString)) 171 return null; 172 if ("available".equals(codeString)) 173 return new Enumeration<SpecimenStatus>(this, SpecimenStatus.AVAILABLE); 174 if ("unavailable".equals(codeString)) 175 return new Enumeration<SpecimenStatus>(this, SpecimenStatus.UNAVAILABLE); 176 if ("unsatisfactory".equals(codeString)) 177 return new Enumeration<SpecimenStatus>(this, SpecimenStatus.UNSATISFACTORY); 178 if ("entered-in-error".equals(codeString)) 179 return new Enumeration<SpecimenStatus>(this, SpecimenStatus.ENTEREDINERROR); 180 throw new FHIRException("Unknown SpecimenStatus code '"+codeString+"'"); 181 } 182 public String toCode(SpecimenStatus code) { 183 if (code == SpecimenStatus.AVAILABLE) 184 return "available"; 185 if (code == SpecimenStatus.UNAVAILABLE) 186 return "unavailable"; 187 if (code == SpecimenStatus.UNSATISFACTORY) 188 return "unsatisfactory"; 189 if (code == SpecimenStatus.ENTEREDINERROR) 190 return "entered-in-error"; 191 return "?"; 192 } 193 public String toSystem(SpecimenStatus code) { 194 return code.getSystem(); 195 } 196 } 197 198 @Block() 199 public static class SpecimenCollectionComponent extends BackboneElement implements IBaseBackboneElement { 200 /** 201 * Person who collected the specimen. 202 */ 203 @Child(name = "collector", type = {Practitioner.class, PractitionerRole.class}, order=1, min=0, max=1, modifier=false, summary=true) 204 @Description(shortDefinition="Who collected the specimen", formalDefinition="Person who collected the specimen." ) 205 protected Reference collector; 206 207 /** 208 * Time when specimen was collected from subject - the physiologically relevant time. 209 */ 210 @Child(name = "collected", type = {DateTimeType.class, Period.class}, order=2, min=0, max=1, modifier=false, summary=true) 211 @Description(shortDefinition="Collection time", formalDefinition="Time when specimen was collected from subject - the physiologically relevant time." ) 212 protected Type collected; 213 214 /** 215 * The span of time over which the collection of a specimen occurred. 216 */ 217 @Child(name = "duration", type = {Duration.class}, order=3, min=0, max=1, modifier=false, summary=true) 218 @Description(shortDefinition="How long it took to collect specimen", formalDefinition="The span of time over which the collection of a specimen occurred." ) 219 protected Duration duration; 220 221 /** 222 * The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample. 223 */ 224 @Child(name = "quantity", type = {Quantity.class}, order=4, min=0, max=1, modifier=false, summary=false) 225 @Description(shortDefinition="The quantity of specimen collected", formalDefinition="The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample." ) 226 protected Quantity quantity; 227 228 /** 229 * A coded value specifying the technique that is used to perform the procedure. 230 */ 231 @Child(name = "method", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) 232 @Description(shortDefinition="Technique used to perform collection", formalDefinition="A coded value specifying the technique that is used to perform the procedure." ) 233 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/specimen-collection-method") 234 protected CodeableConcept method; 235 236 /** 237 * Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens. 238 */ 239 @Child(name = "bodySite", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false) 240 @Description(shortDefinition="Anatomical collection site", formalDefinition="Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens." ) 241 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/body-site") 242 protected CodeableConcept bodySite; 243 244 /** 245 * Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection. 246 */ 247 @Child(name = "fastingStatus", type = {CodeableConcept.class, Duration.class}, order=7, min=0, max=1, modifier=false, summary=true) 248 @Description(shortDefinition="Whether or how long patient abstained from food and/or drink", formalDefinition="Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection." ) 249 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v2-0916") 250 protected Type fastingStatus; 251 252 private static final long serialVersionUID = -193148073L; 253 254 /** 255 * Constructor 256 */ 257 public SpecimenCollectionComponent() { 258 super(); 259 } 260 261 /** 262 * @return {@link #collector} (Person who collected the specimen.) 263 */ 264 public Reference getCollector() { 265 if (this.collector == null) 266 if (Configuration.errorOnAutoCreate()) 267 throw new Error("Attempt to auto-create SpecimenCollectionComponent.collector"); 268 else if (Configuration.doAutoCreate()) 269 this.collector = new Reference(); // cc 270 return this.collector; 271 } 272 273 public boolean hasCollector() { 274 return this.collector != null && !this.collector.isEmpty(); 275 } 276 277 /** 278 * @param value {@link #collector} (Person who collected the specimen.) 279 */ 280 public SpecimenCollectionComponent setCollector(Reference value) { 281 this.collector = value; 282 return this; 283 } 284 285 /** 286 * @return {@link #collected} (Time when specimen was collected from subject - the physiologically relevant time.) 287 */ 288 public Type getCollected() { 289 return this.collected; 290 } 291 292 /** 293 * @return {@link #collected} (Time when specimen was collected from subject - the physiologically relevant time.) 294 */ 295 public DateTimeType getCollectedDateTimeType() throws FHIRException { 296 if (this.collected == null) 297 this.collected = new DateTimeType(); 298 if (!(this.collected instanceof DateTimeType)) 299 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.collected.getClass().getName()+" was encountered"); 300 return (DateTimeType) this.collected; 301 } 302 303 public boolean hasCollectedDateTimeType() { 304 return this != null && this.collected instanceof DateTimeType; 305 } 306 307 /** 308 * @return {@link #collected} (Time when specimen was collected from subject - the physiologically relevant time.) 309 */ 310 public Period getCollectedPeriod() throws FHIRException { 311 if (this.collected == null) 312 this.collected = new Period(); 313 if (!(this.collected instanceof Period)) 314 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.collected.getClass().getName()+" was encountered"); 315 return (Period) this.collected; 316 } 317 318 public boolean hasCollectedPeriod() { 319 return this != null && this.collected instanceof Period; 320 } 321 322 public boolean hasCollected() { 323 return this.collected != null && !this.collected.isEmpty(); 324 } 325 326 /** 327 * @param value {@link #collected} (Time when specimen was collected from subject - the physiologically relevant time.) 328 */ 329 public SpecimenCollectionComponent setCollected(Type value) { 330 if (value != null && !(value instanceof DateTimeType || value instanceof Period)) 331 throw new Error("Not the right type for Specimen.collection.collected[x]: "+value.fhirType()); 332 this.collected = value; 333 return this; 334 } 335 336 /** 337 * @return {@link #duration} (The span of time over which the collection of a specimen occurred.) 338 */ 339 public Duration getDuration() { 340 if (this.duration == null) 341 if (Configuration.errorOnAutoCreate()) 342 throw new Error("Attempt to auto-create SpecimenCollectionComponent.duration"); 343 else if (Configuration.doAutoCreate()) 344 this.duration = new Duration(); // cc 345 return this.duration; 346 } 347 348 public boolean hasDuration() { 349 return this.duration != null && !this.duration.isEmpty(); 350 } 351 352 /** 353 * @param value {@link #duration} (The span of time over which the collection of a specimen occurred.) 354 */ 355 public SpecimenCollectionComponent setDuration(Duration value) { 356 this.duration = value; 357 return this; 358 } 359 360 /** 361 * @return {@link #quantity} (The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.) 362 */ 363 public Quantity getQuantity() { 364 if (this.quantity == null) 365 if (Configuration.errorOnAutoCreate()) 366 throw new Error("Attempt to auto-create SpecimenCollectionComponent.quantity"); 367 else if (Configuration.doAutoCreate()) 368 this.quantity = new Quantity(); // cc 369 return this.quantity; 370 } 371 372 public boolean hasQuantity() { 373 return this.quantity != null && !this.quantity.isEmpty(); 374 } 375 376 /** 377 * @param value {@link #quantity} (The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.) 378 */ 379 public SpecimenCollectionComponent setQuantity(Quantity value) { 380 this.quantity = value; 381 return this; 382 } 383 384 /** 385 * @return {@link #method} (A coded value specifying the technique that is used to perform the procedure.) 386 */ 387 public CodeableConcept getMethod() { 388 if (this.method == null) 389 if (Configuration.errorOnAutoCreate()) 390 throw new Error("Attempt to auto-create SpecimenCollectionComponent.method"); 391 else if (Configuration.doAutoCreate()) 392 this.method = new CodeableConcept(); // cc 393 return this.method; 394 } 395 396 public boolean hasMethod() { 397 return this.method != null && !this.method.isEmpty(); 398 } 399 400 /** 401 * @param value {@link #method} (A coded value specifying the technique that is used to perform the procedure.) 402 */ 403 public SpecimenCollectionComponent setMethod(CodeableConcept value) { 404 this.method = value; 405 return this; 406 } 407 408 /** 409 * @return {@link #bodySite} (Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens.) 410 */ 411 public CodeableConcept getBodySite() { 412 if (this.bodySite == null) 413 if (Configuration.errorOnAutoCreate()) 414 throw new Error("Attempt to auto-create SpecimenCollectionComponent.bodySite"); 415 else if (Configuration.doAutoCreate()) 416 this.bodySite = new CodeableConcept(); // cc 417 return this.bodySite; 418 } 419 420 public boolean hasBodySite() { 421 return this.bodySite != null && !this.bodySite.isEmpty(); 422 } 423 424 /** 425 * @param value {@link #bodySite} (Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens.) 426 */ 427 public SpecimenCollectionComponent setBodySite(CodeableConcept value) { 428 this.bodySite = value; 429 return this; 430 } 431 432 /** 433 * @return {@link #fastingStatus} (Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection.) 434 */ 435 public Type getFastingStatus() { 436 return this.fastingStatus; 437 } 438 439 /** 440 * @return {@link #fastingStatus} (Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection.) 441 */ 442 public CodeableConcept getFastingStatusCodeableConcept() throws FHIRException { 443 if (this.fastingStatus == null) 444 this.fastingStatus = new CodeableConcept(); 445 if (!(this.fastingStatus instanceof CodeableConcept)) 446 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.fastingStatus.getClass().getName()+" was encountered"); 447 return (CodeableConcept) this.fastingStatus; 448 } 449 450 public boolean hasFastingStatusCodeableConcept() { 451 return this != null && this.fastingStatus instanceof CodeableConcept; 452 } 453 454 /** 455 * @return {@link #fastingStatus} (Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection.) 456 */ 457 public Duration getFastingStatusDuration() throws FHIRException { 458 if (this.fastingStatus == null) 459 this.fastingStatus = new Duration(); 460 if (!(this.fastingStatus instanceof Duration)) 461 throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.fastingStatus.getClass().getName()+" was encountered"); 462 return (Duration) this.fastingStatus; 463 } 464 465 public boolean hasFastingStatusDuration() { 466 return this != null && this.fastingStatus instanceof Duration; 467 } 468 469 public boolean hasFastingStatus() { 470 return this.fastingStatus != null && !this.fastingStatus.isEmpty(); 471 } 472 473 /** 474 * @param value {@link #fastingStatus} (Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection.) 475 */ 476 public SpecimenCollectionComponent setFastingStatus(Type value) { 477 if (value != null && !(value instanceof CodeableConcept || value instanceof Duration)) 478 throw new Error("Not the right type for Specimen.collection.fastingStatus[x]: "+value.fhirType()); 479 this.fastingStatus = value; 480 return this; 481 } 482 483 protected void listChildren(List<Property> children) { 484 super.listChildren(children); 485 children.add(new Property("collector", "Reference(Practitioner|PractitionerRole)", "Person who collected the specimen.", 0, 1, collector)); 486 children.add(new Property("collected[x]", "dateTime|Period", "Time when specimen was collected from subject - the physiologically relevant time.", 0, 1, collected)); 487 children.add(new Property("duration", "Duration", "The span of time over which the collection of a specimen occurred.", 0, 1, duration)); 488 children.add(new Property("quantity", "SimpleQuantity", "The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.", 0, 1, quantity)); 489 children.add(new Property("method", "CodeableConcept", "A coded value specifying the technique that is used to perform the procedure.", 0, 1, method)); 490 children.add(new Property("bodySite", "CodeableConcept", "Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens.", 0, 1, bodySite)); 491 children.add(new Property("fastingStatus[x]", "CodeableConcept|Duration", "Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection.", 0, 1, fastingStatus)); 492 } 493 494 @Override 495 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 496 switch (_hash) { 497 case 1883491469: /*collector*/ return new Property("collector", "Reference(Practitioner|PractitionerRole)", "Person who collected the specimen.", 0, 1, collector); 498 case 1632037015: /*collected[x]*/ return new Property("collected[x]", "dateTime|Period", "Time when specimen was collected from subject - the physiologically relevant time.", 0, 1, collected); 499 case 1883491145: /*collected*/ return new Property("collected[x]", "dateTime|Period", "Time when specimen was collected from subject - the physiologically relevant time.", 0, 1, collected); 500 case 2005009924: /*collectedDateTime*/ return new Property("collected[x]", "dateTime|Period", "Time when specimen was collected from subject - the physiologically relevant time.", 0, 1, collected); 501 case 653185642: /*collectedPeriod*/ return new Property("collected[x]", "dateTime|Period", "Time when specimen was collected from subject - the physiologically relevant time.", 0, 1, collected); 502 case -1992012396: /*duration*/ return new Property("duration", "Duration", "The span of time over which the collection of a specimen occurred.", 0, 1, duration); 503 case -1285004149: /*quantity*/ return new Property("quantity", "SimpleQuantity", "The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.", 0, 1, quantity); 504 case -1077554975: /*method*/ return new Property("method", "CodeableConcept", "A coded value specifying the technique that is used to perform the procedure.", 0, 1, method); 505 case 1702620169: /*bodySite*/ return new Property("bodySite", "CodeableConcept", "Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens.", 0, 1, bodySite); 506 case -570577944: /*fastingStatus[x]*/ return new Property("fastingStatus[x]", "CodeableConcept|Duration", "Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection.", 0, 1, fastingStatus); 507 case -701550184: /*fastingStatus*/ return new Property("fastingStatus[x]", "CodeableConcept|Duration", "Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection.", 0, 1, fastingStatus); 508 case -1153232151: /*fastingStatusCodeableConcept*/ return new Property("fastingStatus[x]", "CodeableConcept|Duration", "Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection.", 0, 1, fastingStatus); 509 case -433140916: /*fastingStatusDuration*/ return new Property("fastingStatus[x]", "CodeableConcept|Duration", "Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection.", 0, 1, fastingStatus); 510 default: return super.getNamedProperty(_hash, _name, _checkValid); 511 } 512 513 } 514 515 @Override 516 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 517 switch (hash) { 518 case 1883491469: /*collector*/ return this.collector == null ? new Base[0] : new Base[] {this.collector}; // Reference 519 case 1883491145: /*collected*/ return this.collected == null ? new Base[0] : new Base[] {this.collected}; // Type 520 case -1992012396: /*duration*/ return this.duration == null ? new Base[0] : new Base[] {this.duration}; // Duration 521 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity 522 case -1077554975: /*method*/ return this.method == null ? new Base[0] : new Base[] {this.method}; // CodeableConcept 523 case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : new Base[] {this.bodySite}; // CodeableConcept 524 case -701550184: /*fastingStatus*/ return this.fastingStatus == null ? new Base[0] : new Base[] {this.fastingStatus}; // Type 525 default: return super.getProperty(hash, name, checkValid); 526 } 527 528 } 529 530 @Override 531 public Base setProperty(int hash, String name, Base value) throws FHIRException { 532 switch (hash) { 533 case 1883491469: // collector 534 this.collector = castToReference(value); // Reference 535 return value; 536 case 1883491145: // collected 537 this.collected = castToType(value); // Type 538 return value; 539 case -1992012396: // duration 540 this.duration = castToDuration(value); // Duration 541 return value; 542 case -1285004149: // quantity 543 this.quantity = castToQuantity(value); // Quantity 544 return value; 545 case -1077554975: // method 546 this.method = castToCodeableConcept(value); // CodeableConcept 547 return value; 548 case 1702620169: // bodySite 549 this.bodySite = castToCodeableConcept(value); // CodeableConcept 550 return value; 551 case -701550184: // fastingStatus 552 this.fastingStatus = castToType(value); // Type 553 return value; 554 default: return super.setProperty(hash, name, value); 555 } 556 557 } 558 559 @Override 560 public Base setProperty(String name, Base value) throws FHIRException { 561 if (name.equals("collector")) { 562 this.collector = castToReference(value); // Reference 563 } else if (name.equals("collected[x]")) { 564 this.collected = castToType(value); // Type 565 } else if (name.equals("duration")) { 566 this.duration = castToDuration(value); // Duration 567 } else if (name.equals("quantity")) { 568 this.quantity = castToQuantity(value); // Quantity 569 } else if (name.equals("method")) { 570 this.method = castToCodeableConcept(value); // CodeableConcept 571 } else if (name.equals("bodySite")) { 572 this.bodySite = castToCodeableConcept(value); // CodeableConcept 573 } else if (name.equals("fastingStatus[x]")) { 574 this.fastingStatus = castToType(value); // Type 575 } else 576 return super.setProperty(name, value); 577 return value; 578 } 579 580 @Override 581 public Base makeProperty(int hash, String name) throws FHIRException { 582 switch (hash) { 583 case 1883491469: return getCollector(); 584 case 1632037015: return getCollected(); 585 case 1883491145: return getCollected(); 586 case -1992012396: return getDuration(); 587 case -1285004149: return getQuantity(); 588 case -1077554975: return getMethod(); 589 case 1702620169: return getBodySite(); 590 case -570577944: return getFastingStatus(); 591 case -701550184: return getFastingStatus(); 592 default: return super.makeProperty(hash, name); 593 } 594 595 } 596 597 @Override 598 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 599 switch (hash) { 600 case 1883491469: /*collector*/ return new String[] {"Reference"}; 601 case 1883491145: /*collected*/ return new String[] {"dateTime", "Period"}; 602 case -1992012396: /*duration*/ return new String[] {"Duration"}; 603 case -1285004149: /*quantity*/ return new String[] {"SimpleQuantity"}; 604 case -1077554975: /*method*/ return new String[] {"CodeableConcept"}; 605 case 1702620169: /*bodySite*/ return new String[] {"CodeableConcept"}; 606 case -701550184: /*fastingStatus*/ return new String[] {"CodeableConcept", "Duration"}; 607 default: return super.getTypesForProperty(hash, name); 608 } 609 610 } 611 612 @Override 613 public Base addChild(String name) throws FHIRException { 614 if (name.equals("collector")) { 615 this.collector = new Reference(); 616 return this.collector; 617 } 618 else if (name.equals("collectedDateTime")) { 619 this.collected = new DateTimeType(); 620 return this.collected; 621 } 622 else if (name.equals("collectedPeriod")) { 623 this.collected = new Period(); 624 return this.collected; 625 } 626 else if (name.equals("duration")) { 627 this.duration = new Duration(); 628 return this.duration; 629 } 630 else if (name.equals("quantity")) { 631 this.quantity = new Quantity(); 632 return this.quantity; 633 } 634 else if (name.equals("method")) { 635 this.method = new CodeableConcept(); 636 return this.method; 637 } 638 else if (name.equals("bodySite")) { 639 this.bodySite = new CodeableConcept(); 640 return this.bodySite; 641 } 642 else if (name.equals("fastingStatusCodeableConcept")) { 643 this.fastingStatus = new CodeableConcept(); 644 return this.fastingStatus; 645 } 646 else if (name.equals("fastingStatusDuration")) { 647 this.fastingStatus = new Duration(); 648 return this.fastingStatus; 649 } 650 else 651 return super.addChild(name); 652 } 653 654 public SpecimenCollectionComponent copy() { 655 SpecimenCollectionComponent dst = new SpecimenCollectionComponent(); 656 copyValues(dst); 657 return dst; 658 } 659 660 public void copyValues(SpecimenCollectionComponent dst) { 661 super.copyValues(dst); 662 dst.collector = collector == null ? null : collector.copy(); 663 dst.collected = collected == null ? null : collected.copy(); 664 dst.duration = duration == null ? null : duration.copy(); 665 dst.quantity = quantity == null ? null : quantity.copy(); 666 dst.method = method == null ? null : method.copy(); 667 dst.bodySite = bodySite == null ? null : bodySite.copy(); 668 dst.fastingStatus = fastingStatus == null ? null : fastingStatus.copy(); 669 } 670 671 @Override 672 public boolean equalsDeep(Base other_) { 673 if (!super.equalsDeep(other_)) 674 return false; 675 if (!(other_ instanceof SpecimenCollectionComponent)) 676 return false; 677 SpecimenCollectionComponent o = (SpecimenCollectionComponent) other_; 678 return compareDeep(collector, o.collector, true) && compareDeep(collected, o.collected, true) && compareDeep(duration, o.duration, true) 679 && compareDeep(quantity, o.quantity, true) && compareDeep(method, o.method, true) && compareDeep(bodySite, o.bodySite, true) 680 && compareDeep(fastingStatus, o.fastingStatus, true); 681 } 682 683 @Override 684 public boolean equalsShallow(Base other_) { 685 if (!super.equalsShallow(other_)) 686 return false; 687 if (!(other_ instanceof SpecimenCollectionComponent)) 688 return false; 689 SpecimenCollectionComponent o = (SpecimenCollectionComponent) other_; 690 return true; 691 } 692 693 public boolean isEmpty() { 694 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(collector, collected, duration 695 , quantity, method, bodySite, fastingStatus); 696 } 697 698 public String fhirType() { 699 return "Specimen.collection"; 700 701 } 702 703 } 704 705 @Block() 706 public static class SpecimenProcessingComponent extends BackboneElement implements IBaseBackboneElement { 707 /** 708 * Textual description of procedure. 709 */ 710 @Child(name = "description", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 711 @Description(shortDefinition="Textual description of procedure", formalDefinition="Textual description of procedure." ) 712 protected StringType description; 713 714 /** 715 * A coded value specifying the procedure used to process the specimen. 716 */ 717 @Child(name = "procedure", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 718 @Description(shortDefinition="Indicates the treatment step applied to the specimen", formalDefinition="A coded value specifying the procedure used to process the specimen." ) 719 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/specimen-processing-procedure") 720 protected CodeableConcept procedure; 721 722 /** 723 * Material used in the processing step. 724 */ 725 @Child(name = "additive", type = {Substance.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 726 @Description(shortDefinition="Material used in the processing step", formalDefinition="Material used in the processing step." ) 727 protected List<Reference> additive; 728 729 /** 730 * A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin. 731 */ 732 @Child(name = "time", type = {DateTimeType.class, Period.class}, order=4, min=0, max=1, modifier=false, summary=false) 733 @Description(shortDefinition="Date and time of specimen processing", formalDefinition="A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin." ) 734 protected Type time; 735 736 private static final long serialVersionUID = 1180205613L; 737 738 /** 739 * Constructor 740 */ 741 public SpecimenProcessingComponent() { 742 super(); 743 } 744 745 /** 746 * @return {@link #description} (Textual description of procedure.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 747 */ 748 public StringType getDescriptionElement() { 749 if (this.description == null) 750 if (Configuration.errorOnAutoCreate()) 751 throw new Error("Attempt to auto-create SpecimenProcessingComponent.description"); 752 else if (Configuration.doAutoCreate()) 753 this.description = new StringType(); // bb 754 return this.description; 755 } 756 757 public boolean hasDescriptionElement() { 758 return this.description != null && !this.description.isEmpty(); 759 } 760 761 public boolean hasDescription() { 762 return this.description != null && !this.description.isEmpty(); 763 } 764 765 /** 766 * @param value {@link #description} (Textual description of procedure.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 767 */ 768 public SpecimenProcessingComponent setDescriptionElement(StringType value) { 769 this.description = value; 770 return this; 771 } 772 773 /** 774 * @return Textual description of procedure. 775 */ 776 public String getDescription() { 777 return this.description == null ? null : this.description.getValue(); 778 } 779 780 /** 781 * @param value Textual description of procedure. 782 */ 783 public SpecimenProcessingComponent setDescription(String value) { 784 if (Utilities.noString(value)) 785 this.description = null; 786 else { 787 if (this.description == null) 788 this.description = new StringType(); 789 this.description.setValue(value); 790 } 791 return this; 792 } 793 794 /** 795 * @return {@link #procedure} (A coded value specifying the procedure used to process the specimen.) 796 */ 797 public CodeableConcept getProcedure() { 798 if (this.procedure == null) 799 if (Configuration.errorOnAutoCreate()) 800 throw new Error("Attempt to auto-create SpecimenProcessingComponent.procedure"); 801 else if (Configuration.doAutoCreate()) 802 this.procedure = new CodeableConcept(); // cc 803 return this.procedure; 804 } 805 806 public boolean hasProcedure() { 807 return this.procedure != null && !this.procedure.isEmpty(); 808 } 809 810 /** 811 * @param value {@link #procedure} (A coded value specifying the procedure used to process the specimen.) 812 */ 813 public SpecimenProcessingComponent setProcedure(CodeableConcept value) { 814 this.procedure = value; 815 return this; 816 } 817 818 /** 819 * @return {@link #additive} (Material used in the processing step.) 820 */ 821 public List<Reference> getAdditive() { 822 if (this.additive == null) 823 this.additive = new ArrayList<Reference>(); 824 return this.additive; 825 } 826 827 /** 828 * @return Returns a reference to <code>this</code> for easy method chaining 829 */ 830 public SpecimenProcessingComponent setAdditive(List<Reference> theAdditive) { 831 this.additive = theAdditive; 832 return this; 833 } 834 835 public boolean hasAdditive() { 836 if (this.additive == null) 837 return false; 838 for (Reference item : this.additive) 839 if (!item.isEmpty()) 840 return true; 841 return false; 842 } 843 844 public Reference addAdditive() { //3 845 Reference t = new Reference(); 846 if (this.additive == null) 847 this.additive = new ArrayList<Reference>(); 848 this.additive.add(t); 849 return t; 850 } 851 852 public SpecimenProcessingComponent addAdditive(Reference t) { //3 853 if (t == null) 854 return this; 855 if (this.additive == null) 856 this.additive = new ArrayList<Reference>(); 857 this.additive.add(t); 858 return this; 859 } 860 861 /** 862 * @return The first repetition of repeating field {@link #additive}, creating it if it does not already exist 863 */ 864 public Reference getAdditiveFirstRep() { 865 if (getAdditive().isEmpty()) { 866 addAdditive(); 867 } 868 return getAdditive().get(0); 869 } 870 871 /** 872 * @return {@link #time} (A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.) 873 */ 874 public Type getTime() { 875 return this.time; 876 } 877 878 /** 879 * @return {@link #time} (A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.) 880 */ 881 public DateTimeType getTimeDateTimeType() throws FHIRException { 882 if (this.time == null) 883 this.time = new DateTimeType(); 884 if (!(this.time instanceof DateTimeType)) 885 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.time.getClass().getName()+" was encountered"); 886 return (DateTimeType) this.time; 887 } 888 889 public boolean hasTimeDateTimeType() { 890 return this != null && this.time instanceof DateTimeType; 891 } 892 893 /** 894 * @return {@link #time} (A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.) 895 */ 896 public Period getTimePeriod() throws FHIRException { 897 if (this.time == null) 898 this.time = new Period(); 899 if (!(this.time instanceof Period)) 900 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.time.getClass().getName()+" was encountered"); 901 return (Period) this.time; 902 } 903 904 public boolean hasTimePeriod() { 905 return this != null && this.time instanceof Period; 906 } 907 908 public boolean hasTime() { 909 return this.time != null && !this.time.isEmpty(); 910 } 911 912 /** 913 * @param value {@link #time} (A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.) 914 */ 915 public SpecimenProcessingComponent setTime(Type value) { 916 if (value != null && !(value instanceof DateTimeType || value instanceof Period)) 917 throw new Error("Not the right type for Specimen.processing.time[x]: "+value.fhirType()); 918 this.time = value; 919 return this; 920 } 921 922 protected void listChildren(List<Property> children) { 923 super.listChildren(children); 924 children.add(new Property("description", "string", "Textual description of procedure.", 0, 1, description)); 925 children.add(new Property("procedure", "CodeableConcept", "A coded value specifying the procedure used to process the specimen.", 0, 1, procedure)); 926 children.add(new Property("additive", "Reference(Substance)", "Material used in the processing step.", 0, java.lang.Integer.MAX_VALUE, additive)); 927 children.add(new Property("time[x]", "dateTime|Period", "A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.", 0, 1, time)); 928 } 929 930 @Override 931 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 932 switch (_hash) { 933 case -1724546052: /*description*/ return new Property("description", "string", "Textual description of procedure.", 0, 1, description); 934 case -1095204141: /*procedure*/ return new Property("procedure", "CodeableConcept", "A coded value specifying the procedure used to process the specimen.", 0, 1, procedure); 935 case -1226589236: /*additive*/ return new Property("additive", "Reference(Substance)", "Material used in the processing step.", 0, java.lang.Integer.MAX_VALUE, additive); 936 case -1313930605: /*time[x]*/ return new Property("time[x]", "dateTime|Period", "A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.", 0, 1, time); 937 case 3560141: /*time*/ return new Property("time[x]", "dateTime|Period", "A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.", 0, 1, time); 938 case 2135345544: /*timeDateTime*/ return new Property("time[x]", "dateTime|Period", "A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.", 0, 1, time); 939 case 693544686: /*timePeriod*/ return new Property("time[x]", "dateTime|Period", "A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.", 0, 1, time); 940 default: return super.getNamedProperty(_hash, _name, _checkValid); 941 } 942 943 } 944 945 @Override 946 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 947 switch (hash) { 948 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 949 case -1095204141: /*procedure*/ return this.procedure == null ? new Base[0] : new Base[] {this.procedure}; // CodeableConcept 950 case -1226589236: /*additive*/ return this.additive == null ? new Base[0] : this.additive.toArray(new Base[this.additive.size()]); // Reference 951 case 3560141: /*time*/ return this.time == null ? new Base[0] : new Base[] {this.time}; // Type 952 default: return super.getProperty(hash, name, checkValid); 953 } 954 955 } 956 957 @Override 958 public Base setProperty(int hash, String name, Base value) throws FHIRException { 959 switch (hash) { 960 case -1724546052: // description 961 this.description = castToString(value); // StringType 962 return value; 963 case -1095204141: // procedure 964 this.procedure = castToCodeableConcept(value); // CodeableConcept 965 return value; 966 case -1226589236: // additive 967 this.getAdditive().add(castToReference(value)); // Reference 968 return value; 969 case 3560141: // time 970 this.time = castToType(value); // Type 971 return value; 972 default: return super.setProperty(hash, name, value); 973 } 974 975 } 976 977 @Override 978 public Base setProperty(String name, Base value) throws FHIRException { 979 if (name.equals("description")) { 980 this.description = castToString(value); // StringType 981 } else if (name.equals("procedure")) { 982 this.procedure = castToCodeableConcept(value); // CodeableConcept 983 } else if (name.equals("additive")) { 984 this.getAdditive().add(castToReference(value)); 985 } else if (name.equals("time[x]")) { 986 this.time = castToType(value); // Type 987 } else 988 return super.setProperty(name, value); 989 return value; 990 } 991 992 @Override 993 public Base makeProperty(int hash, String name) throws FHIRException { 994 switch (hash) { 995 case -1724546052: return getDescriptionElement(); 996 case -1095204141: return getProcedure(); 997 case -1226589236: return addAdditive(); 998 case -1313930605: return getTime(); 999 case 3560141: return getTime(); 1000 default: return super.makeProperty(hash, name); 1001 } 1002 1003 } 1004 1005 @Override 1006 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1007 switch (hash) { 1008 case -1724546052: /*description*/ return new String[] {"string"}; 1009 case -1095204141: /*procedure*/ return new String[] {"CodeableConcept"}; 1010 case -1226589236: /*additive*/ return new String[] {"Reference"}; 1011 case 3560141: /*time*/ return new String[] {"dateTime", "Period"}; 1012 default: return super.getTypesForProperty(hash, name); 1013 } 1014 1015 } 1016 1017 @Override 1018 public Base addChild(String name) throws FHIRException { 1019 if (name.equals("description")) { 1020 throw new FHIRException("Cannot call addChild on a primitive type Specimen.description"); 1021 } 1022 else if (name.equals("procedure")) { 1023 this.procedure = new CodeableConcept(); 1024 return this.procedure; 1025 } 1026 else if (name.equals("additive")) { 1027 return addAdditive(); 1028 } 1029 else if (name.equals("timeDateTime")) { 1030 this.time = new DateTimeType(); 1031 return this.time; 1032 } 1033 else if (name.equals("timePeriod")) { 1034 this.time = new Period(); 1035 return this.time; 1036 } 1037 else 1038 return super.addChild(name); 1039 } 1040 1041 public SpecimenProcessingComponent copy() { 1042 SpecimenProcessingComponent dst = new SpecimenProcessingComponent(); 1043 copyValues(dst); 1044 return dst; 1045 } 1046 1047 public void copyValues(SpecimenProcessingComponent dst) { 1048 super.copyValues(dst); 1049 dst.description = description == null ? null : description.copy(); 1050 dst.procedure = procedure == null ? null : procedure.copy(); 1051 if (additive != null) { 1052 dst.additive = new ArrayList<Reference>(); 1053 for (Reference i : additive) 1054 dst.additive.add(i.copy()); 1055 }; 1056 dst.time = time == null ? null : time.copy(); 1057 } 1058 1059 @Override 1060 public boolean equalsDeep(Base other_) { 1061 if (!super.equalsDeep(other_)) 1062 return false; 1063 if (!(other_ instanceof SpecimenProcessingComponent)) 1064 return false; 1065 SpecimenProcessingComponent o = (SpecimenProcessingComponent) other_; 1066 return compareDeep(description, o.description, true) && compareDeep(procedure, o.procedure, true) 1067 && compareDeep(additive, o.additive, true) && compareDeep(time, o.time, true); 1068 } 1069 1070 @Override 1071 public boolean equalsShallow(Base other_) { 1072 if (!super.equalsShallow(other_)) 1073 return false; 1074 if (!(other_ instanceof SpecimenProcessingComponent)) 1075 return false; 1076 SpecimenProcessingComponent o = (SpecimenProcessingComponent) other_; 1077 return compareValues(description, o.description, true); 1078 } 1079 1080 public boolean isEmpty() { 1081 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, procedure, additive 1082 , time); 1083 } 1084 1085 public String fhirType() { 1086 return "Specimen.processing"; 1087 1088 } 1089 1090 } 1091 1092 @Block() 1093 public static class SpecimenContainerComponent extends BackboneElement implements IBaseBackboneElement { 1094 /** 1095 * Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances. 1096 */ 1097 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1098 @Description(shortDefinition="Id for the container", formalDefinition="Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances." ) 1099 protected List<Identifier> identifier; 1100 1101 /** 1102 * Textual description of the container. 1103 */ 1104 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1105 @Description(shortDefinition="Textual description of the container", formalDefinition="Textual description of the container." ) 1106 protected StringType description; 1107 1108 /** 1109 * The type of container associated with the specimen (e.g. slide, aliquot, etc.). 1110 */ 1111 @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 1112 @Description(shortDefinition="Kind of container directly associated with specimen", formalDefinition="The type of container associated with the specimen (e.g. slide, aliquot, etc.)." ) 1113 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/specimen-container-type") 1114 protected CodeableConcept type; 1115 1116 /** 1117 * The capacity (volume or other measure) the container may contain. 1118 */ 1119 @Child(name = "capacity", type = {Quantity.class}, order=4, min=0, max=1, modifier=false, summary=false) 1120 @Description(shortDefinition="Container volume or size", formalDefinition="The capacity (volume or other measure) the container may contain." ) 1121 protected Quantity capacity; 1122 1123 /** 1124 * The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type. 1125 */ 1126 @Child(name = "specimenQuantity", type = {Quantity.class}, order=5, min=0, max=1, modifier=false, summary=false) 1127 @Description(shortDefinition="Quantity of specimen within container", formalDefinition="The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type." ) 1128 protected Quantity specimenQuantity; 1129 1130 /** 1131 * Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA. 1132 */ 1133 @Child(name = "additive", type = {CodeableConcept.class, Substance.class}, order=6, min=0, max=1, modifier=false, summary=false) 1134 @Description(shortDefinition="Additive associated with container", formalDefinition="Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA." ) 1135 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v2-0371") 1136 protected Type additive; 1137 1138 private static final long serialVersionUID = -1608132325L; 1139 1140 /** 1141 * Constructor 1142 */ 1143 public SpecimenContainerComponent() { 1144 super(); 1145 } 1146 1147 /** 1148 * @return {@link #identifier} (Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances.) 1149 */ 1150 public List<Identifier> getIdentifier() { 1151 if (this.identifier == null) 1152 this.identifier = new ArrayList<Identifier>(); 1153 return this.identifier; 1154 } 1155 1156 /** 1157 * @return Returns a reference to <code>this</code> for easy method chaining 1158 */ 1159 public SpecimenContainerComponent setIdentifier(List<Identifier> theIdentifier) { 1160 this.identifier = theIdentifier; 1161 return this; 1162 } 1163 1164 public boolean hasIdentifier() { 1165 if (this.identifier == null) 1166 return false; 1167 for (Identifier item : this.identifier) 1168 if (!item.isEmpty()) 1169 return true; 1170 return false; 1171 } 1172 1173 public Identifier addIdentifier() { //3 1174 Identifier t = new Identifier(); 1175 if (this.identifier == null) 1176 this.identifier = new ArrayList<Identifier>(); 1177 this.identifier.add(t); 1178 return t; 1179 } 1180 1181 public SpecimenContainerComponent addIdentifier(Identifier t) { //3 1182 if (t == null) 1183 return this; 1184 if (this.identifier == null) 1185 this.identifier = new ArrayList<Identifier>(); 1186 this.identifier.add(t); 1187 return this; 1188 } 1189 1190 /** 1191 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 1192 */ 1193 public Identifier getIdentifierFirstRep() { 1194 if (getIdentifier().isEmpty()) { 1195 addIdentifier(); 1196 } 1197 return getIdentifier().get(0); 1198 } 1199 1200 /** 1201 * @return {@link #description} (Textual description of the container.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1202 */ 1203 public StringType getDescriptionElement() { 1204 if (this.description == null) 1205 if (Configuration.errorOnAutoCreate()) 1206 throw new Error("Attempt to auto-create SpecimenContainerComponent.description"); 1207 else if (Configuration.doAutoCreate()) 1208 this.description = new StringType(); // bb 1209 return this.description; 1210 } 1211 1212 public boolean hasDescriptionElement() { 1213 return this.description != null && !this.description.isEmpty(); 1214 } 1215 1216 public boolean hasDescription() { 1217 return this.description != null && !this.description.isEmpty(); 1218 } 1219 1220 /** 1221 * @param value {@link #description} (Textual description of the container.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1222 */ 1223 public SpecimenContainerComponent setDescriptionElement(StringType value) { 1224 this.description = value; 1225 return this; 1226 } 1227 1228 /** 1229 * @return Textual description of the container. 1230 */ 1231 public String getDescription() { 1232 return this.description == null ? null : this.description.getValue(); 1233 } 1234 1235 /** 1236 * @param value Textual description of the container. 1237 */ 1238 public SpecimenContainerComponent setDescription(String value) { 1239 if (Utilities.noString(value)) 1240 this.description = null; 1241 else { 1242 if (this.description == null) 1243 this.description = new StringType(); 1244 this.description.setValue(value); 1245 } 1246 return this; 1247 } 1248 1249 /** 1250 * @return {@link #type} (The type of container associated with the specimen (e.g. slide, aliquot, etc.).) 1251 */ 1252 public CodeableConcept getType() { 1253 if (this.type == null) 1254 if (Configuration.errorOnAutoCreate()) 1255 throw new Error("Attempt to auto-create SpecimenContainerComponent.type"); 1256 else if (Configuration.doAutoCreate()) 1257 this.type = new CodeableConcept(); // cc 1258 return this.type; 1259 } 1260 1261 public boolean hasType() { 1262 return this.type != null && !this.type.isEmpty(); 1263 } 1264 1265 /** 1266 * @param value {@link #type} (The type of container associated with the specimen (e.g. slide, aliquot, etc.).) 1267 */ 1268 public SpecimenContainerComponent setType(CodeableConcept value) { 1269 this.type = value; 1270 return this; 1271 } 1272 1273 /** 1274 * @return {@link #capacity} (The capacity (volume or other measure) the container may contain.) 1275 */ 1276 public Quantity getCapacity() { 1277 if (this.capacity == null) 1278 if (Configuration.errorOnAutoCreate()) 1279 throw new Error("Attempt to auto-create SpecimenContainerComponent.capacity"); 1280 else if (Configuration.doAutoCreate()) 1281 this.capacity = new Quantity(); // cc 1282 return this.capacity; 1283 } 1284 1285 public boolean hasCapacity() { 1286 return this.capacity != null && !this.capacity.isEmpty(); 1287 } 1288 1289 /** 1290 * @param value {@link #capacity} (The capacity (volume or other measure) the container may contain.) 1291 */ 1292 public SpecimenContainerComponent setCapacity(Quantity value) { 1293 this.capacity = value; 1294 return this; 1295 } 1296 1297 /** 1298 * @return {@link #specimenQuantity} (The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.) 1299 */ 1300 public Quantity getSpecimenQuantity() { 1301 if (this.specimenQuantity == null) 1302 if (Configuration.errorOnAutoCreate()) 1303 throw new Error("Attempt to auto-create SpecimenContainerComponent.specimenQuantity"); 1304 else if (Configuration.doAutoCreate()) 1305 this.specimenQuantity = new Quantity(); // cc 1306 return this.specimenQuantity; 1307 } 1308 1309 public boolean hasSpecimenQuantity() { 1310 return this.specimenQuantity != null && !this.specimenQuantity.isEmpty(); 1311 } 1312 1313 /** 1314 * @param value {@link #specimenQuantity} (The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.) 1315 */ 1316 public SpecimenContainerComponent setSpecimenQuantity(Quantity value) { 1317 this.specimenQuantity = value; 1318 return this; 1319 } 1320 1321 /** 1322 * @return {@link #additive} (Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.) 1323 */ 1324 public Type getAdditive() { 1325 return this.additive; 1326 } 1327 1328 /** 1329 * @return {@link #additive} (Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.) 1330 */ 1331 public CodeableConcept getAdditiveCodeableConcept() throws FHIRException { 1332 if (this.additive == null) 1333 this.additive = new CodeableConcept(); 1334 if (!(this.additive instanceof CodeableConcept)) 1335 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.additive.getClass().getName()+" was encountered"); 1336 return (CodeableConcept) this.additive; 1337 } 1338 1339 public boolean hasAdditiveCodeableConcept() { 1340 return this != null && this.additive instanceof CodeableConcept; 1341 } 1342 1343 /** 1344 * @return {@link #additive} (Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.) 1345 */ 1346 public Reference getAdditiveReference() throws FHIRException { 1347 if (this.additive == null) 1348 this.additive = new Reference(); 1349 if (!(this.additive instanceof Reference)) 1350 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.additive.getClass().getName()+" was encountered"); 1351 return (Reference) this.additive; 1352 } 1353 1354 public boolean hasAdditiveReference() { 1355 return this != null && this.additive instanceof Reference; 1356 } 1357 1358 public boolean hasAdditive() { 1359 return this.additive != null && !this.additive.isEmpty(); 1360 } 1361 1362 /** 1363 * @param value {@link #additive} (Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.) 1364 */ 1365 public SpecimenContainerComponent setAdditive(Type value) { 1366 if (value != null && !(value instanceof CodeableConcept || value instanceof Reference)) 1367 throw new Error("Not the right type for Specimen.container.additive[x]: "+value.fhirType()); 1368 this.additive = value; 1369 return this; 1370 } 1371 1372 protected void listChildren(List<Property> children) { 1373 super.listChildren(children); 1374 children.add(new Property("identifier", "Identifier", "Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1375 children.add(new Property("description", "string", "Textual description of the container.", 0, 1, description)); 1376 children.add(new Property("type", "CodeableConcept", "The type of container associated with the specimen (e.g. slide, aliquot, etc.).", 0, 1, type)); 1377 children.add(new Property("capacity", "SimpleQuantity", "The capacity (volume or other measure) the container may contain.", 0, 1, capacity)); 1378 children.add(new Property("specimenQuantity", "SimpleQuantity", "The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.", 0, 1, specimenQuantity)); 1379 children.add(new Property("additive[x]", "CodeableConcept|Reference(Substance)", "Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", 0, 1, additive)); 1380 } 1381 1382 @Override 1383 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1384 switch (_hash) { 1385 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances.", 0, java.lang.Integer.MAX_VALUE, identifier); 1386 case -1724546052: /*description*/ return new Property("description", "string", "Textual description of the container.", 0, 1, description); 1387 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The type of container associated with the specimen (e.g. slide, aliquot, etc.).", 0, 1, type); 1388 case -67824454: /*capacity*/ return new Property("capacity", "SimpleQuantity", "The capacity (volume or other measure) the container may contain.", 0, 1, capacity); 1389 case 1485980595: /*specimenQuantity*/ return new Property("specimenQuantity", "SimpleQuantity", "The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.", 0, 1, specimenQuantity); 1390 case 261915956: /*additive[x]*/ return new Property("additive[x]", "CodeableConcept|Reference(Substance)", "Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", 0, 1, additive); 1391 case -1226589236: /*additive*/ return new Property("additive[x]", "CodeableConcept|Reference(Substance)", "Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", 0, 1, additive); 1392 case 1330272821: /*additiveCodeableConcept*/ return new Property("additive[x]", "CodeableConcept|Reference(Substance)", "Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", 0, 1, additive); 1393 case -386783009: /*additiveReference*/ return new Property("additive[x]", "CodeableConcept|Reference(Substance)", "Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", 0, 1, additive); 1394 default: return super.getNamedProperty(_hash, _name, _checkValid); 1395 } 1396 1397 } 1398 1399 @Override 1400 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1401 switch (hash) { 1402 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1403 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 1404 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1405 case -67824454: /*capacity*/ return this.capacity == null ? new Base[0] : new Base[] {this.capacity}; // Quantity 1406 case 1485980595: /*specimenQuantity*/ return this.specimenQuantity == null ? new Base[0] : new Base[] {this.specimenQuantity}; // Quantity 1407 case -1226589236: /*additive*/ return this.additive == null ? new Base[0] : new Base[] {this.additive}; // Type 1408 default: return super.getProperty(hash, name, checkValid); 1409 } 1410 1411 } 1412 1413 @Override 1414 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1415 switch (hash) { 1416 case -1618432855: // identifier 1417 this.getIdentifier().add(castToIdentifier(value)); // Identifier 1418 return value; 1419 case -1724546052: // description 1420 this.description = castToString(value); // StringType 1421 return value; 1422 case 3575610: // type 1423 this.type = castToCodeableConcept(value); // CodeableConcept 1424 return value; 1425 case -67824454: // capacity 1426 this.capacity = castToQuantity(value); // Quantity 1427 return value; 1428 case 1485980595: // specimenQuantity 1429 this.specimenQuantity = castToQuantity(value); // Quantity 1430 return value; 1431 case -1226589236: // additive 1432 this.additive = castToType(value); // Type 1433 return value; 1434 default: return super.setProperty(hash, name, value); 1435 } 1436 1437 } 1438 1439 @Override 1440 public Base setProperty(String name, Base value) throws FHIRException { 1441 if (name.equals("identifier")) { 1442 this.getIdentifier().add(castToIdentifier(value)); 1443 } else if (name.equals("description")) { 1444 this.description = castToString(value); // StringType 1445 } else if (name.equals("type")) { 1446 this.type = castToCodeableConcept(value); // CodeableConcept 1447 } else if (name.equals("capacity")) { 1448 this.capacity = castToQuantity(value); // Quantity 1449 } else if (name.equals("specimenQuantity")) { 1450 this.specimenQuantity = castToQuantity(value); // Quantity 1451 } else if (name.equals("additive[x]")) { 1452 this.additive = castToType(value); // Type 1453 } else 1454 return super.setProperty(name, value); 1455 return value; 1456 } 1457 1458 @Override 1459 public Base makeProperty(int hash, String name) throws FHIRException { 1460 switch (hash) { 1461 case -1618432855: return addIdentifier(); 1462 case -1724546052: return getDescriptionElement(); 1463 case 3575610: return getType(); 1464 case -67824454: return getCapacity(); 1465 case 1485980595: return getSpecimenQuantity(); 1466 case 261915956: return getAdditive(); 1467 case -1226589236: return getAdditive(); 1468 default: return super.makeProperty(hash, name); 1469 } 1470 1471 } 1472 1473 @Override 1474 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1475 switch (hash) { 1476 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1477 case -1724546052: /*description*/ return new String[] {"string"}; 1478 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1479 case -67824454: /*capacity*/ return new String[] {"SimpleQuantity"}; 1480 case 1485980595: /*specimenQuantity*/ return new String[] {"SimpleQuantity"}; 1481 case -1226589236: /*additive*/ return new String[] {"CodeableConcept", "Reference"}; 1482 default: return super.getTypesForProperty(hash, name); 1483 } 1484 1485 } 1486 1487 @Override 1488 public Base addChild(String name) throws FHIRException { 1489 if (name.equals("identifier")) { 1490 return addIdentifier(); 1491 } 1492 else if (name.equals("description")) { 1493 throw new FHIRException("Cannot call addChild on a primitive type Specimen.description"); 1494 } 1495 else if (name.equals("type")) { 1496 this.type = new CodeableConcept(); 1497 return this.type; 1498 } 1499 else if (name.equals("capacity")) { 1500 this.capacity = new Quantity(); 1501 return this.capacity; 1502 } 1503 else if (name.equals("specimenQuantity")) { 1504 this.specimenQuantity = new Quantity(); 1505 return this.specimenQuantity; 1506 } 1507 else if (name.equals("additiveCodeableConcept")) { 1508 this.additive = new CodeableConcept(); 1509 return this.additive; 1510 } 1511 else if (name.equals("additiveReference")) { 1512 this.additive = new Reference(); 1513 return this.additive; 1514 } 1515 else 1516 return super.addChild(name); 1517 } 1518 1519 public SpecimenContainerComponent copy() { 1520 SpecimenContainerComponent dst = new SpecimenContainerComponent(); 1521 copyValues(dst); 1522 return dst; 1523 } 1524 1525 public void copyValues(SpecimenContainerComponent dst) { 1526 super.copyValues(dst); 1527 if (identifier != null) { 1528 dst.identifier = new ArrayList<Identifier>(); 1529 for (Identifier i : identifier) 1530 dst.identifier.add(i.copy()); 1531 }; 1532 dst.description = description == null ? null : description.copy(); 1533 dst.type = type == null ? null : type.copy(); 1534 dst.capacity = capacity == null ? null : capacity.copy(); 1535 dst.specimenQuantity = specimenQuantity == null ? null : specimenQuantity.copy(); 1536 dst.additive = additive == null ? null : additive.copy(); 1537 } 1538 1539 @Override 1540 public boolean equalsDeep(Base other_) { 1541 if (!super.equalsDeep(other_)) 1542 return false; 1543 if (!(other_ instanceof SpecimenContainerComponent)) 1544 return false; 1545 SpecimenContainerComponent o = (SpecimenContainerComponent) other_; 1546 return compareDeep(identifier, o.identifier, true) && compareDeep(description, o.description, true) 1547 && compareDeep(type, o.type, true) && compareDeep(capacity, o.capacity, true) && compareDeep(specimenQuantity, o.specimenQuantity, true) 1548 && compareDeep(additive, o.additive, true); 1549 } 1550 1551 @Override 1552 public boolean equalsShallow(Base other_) { 1553 if (!super.equalsShallow(other_)) 1554 return false; 1555 if (!(other_ instanceof SpecimenContainerComponent)) 1556 return false; 1557 SpecimenContainerComponent o = (SpecimenContainerComponent) other_; 1558 return compareValues(description, o.description, true); 1559 } 1560 1561 public boolean isEmpty() { 1562 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, description, type 1563 , capacity, specimenQuantity, additive); 1564 } 1565 1566 public String fhirType() { 1567 return "Specimen.container"; 1568 1569 } 1570 1571 } 1572 1573 /** 1574 * Id for specimen. 1575 */ 1576 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1577 @Description(shortDefinition="External Identifier", formalDefinition="Id for specimen." ) 1578 protected List<Identifier> identifier; 1579 1580 /** 1581 * The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures. 1582 */ 1583 @Child(name = "accessionIdentifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) 1584 @Description(shortDefinition="Identifier assigned by the lab", formalDefinition="The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures." ) 1585 protected Identifier accessionIdentifier; 1586 1587 /** 1588 * The availability of the specimen. 1589 */ 1590 @Child(name = "status", type = {CodeType.class}, order=2, min=0, max=1, modifier=true, summary=true) 1591 @Description(shortDefinition="available | unavailable | unsatisfactory | entered-in-error", formalDefinition="The availability of the specimen." ) 1592 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/specimen-status") 1593 protected Enumeration<SpecimenStatus> status; 1594 1595 /** 1596 * The kind of material that forms the specimen. 1597 */ 1598 @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) 1599 @Description(shortDefinition="Kind of material that forms the specimen", formalDefinition="The kind of material that forms the specimen." ) 1600 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v2-0487") 1601 protected CodeableConcept type; 1602 1603 /** 1604 * Where the specimen came from. This may be from patient(s), from a location (e.g., the source of an environmental sample), or a sampling of a substance or a device. 1605 */ 1606 @Child(name = "subject", type = {Patient.class, Group.class, Device.class, Substance.class, Location.class}, order=4, min=0, max=1, modifier=false, summary=true) 1607 @Description(shortDefinition="Where the specimen came from. This may be from patient(s), from a location (e.g., the source of an environmental sample), or a sampling of a substance or a device", formalDefinition="Where the specimen came from. This may be from patient(s), from a location (e.g., the source of an environmental sample), or a sampling of a substance or a device." ) 1608 protected Reference subject; 1609 1610 /** 1611 * Time when specimen was received for processing or testing. 1612 */ 1613 @Child(name = "receivedTime", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=true) 1614 @Description(shortDefinition="The time when specimen was received for processing", formalDefinition="Time when specimen was received for processing or testing." ) 1615 protected DateTimeType receivedTime; 1616 1617 /** 1618 * Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen. 1619 */ 1620 @Child(name = "parent", type = {Specimen.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1621 @Description(shortDefinition="Specimen from which this specimen originated", formalDefinition="Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen." ) 1622 protected List<Reference> parent; 1623 1624 /** 1625 * Details concerning a service request that required a specimen to be collected. 1626 */ 1627 @Child(name = "request", type = {ServiceRequest.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1628 @Description(shortDefinition="Why the specimen was collected", formalDefinition="Details concerning a service request that required a specimen to be collected." ) 1629 protected List<Reference> request; 1630 1631 /** 1632 * Details concerning the specimen collection. 1633 */ 1634 @Child(name = "collection", type = {}, order=8, min=0, max=1, modifier=false, summary=false) 1635 @Description(shortDefinition="Collection details", formalDefinition="Details concerning the specimen collection." ) 1636 protected SpecimenCollectionComponent collection; 1637 1638 /** 1639 * Details concerning processing and processing steps for the specimen. 1640 */ 1641 @Child(name = "processing", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1642 @Description(shortDefinition="Processing and processing step details", formalDefinition="Details concerning processing and processing steps for the specimen." ) 1643 protected List<SpecimenProcessingComponent> processing; 1644 1645 /** 1646 * The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here. 1647 */ 1648 @Child(name = "container", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1649 @Description(shortDefinition="Direct container of specimen (tube/slide, etc.)", formalDefinition="The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here." ) 1650 protected List<SpecimenContainerComponent> container; 1651 1652 /** 1653 * A mode or state of being that describes the nature of the specimen. 1654 */ 1655 @Child(name = "condition", type = {CodeableConcept.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1656 @Description(shortDefinition="State of the specimen", formalDefinition="A mode or state of being that describes the nature of the specimen." ) 1657 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v2-0493") 1658 protected List<CodeableConcept> condition; 1659 1660 /** 1661 * To communicate any details or issues about the specimen or during the specimen collection. (for example: broken vial, sent with patient, frozen). 1662 */ 1663 @Child(name = "note", type = {Annotation.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1664 @Description(shortDefinition="Comments", formalDefinition="To communicate any details or issues about the specimen or during the specimen collection. (for example: broken vial, sent with patient, frozen)." ) 1665 protected List<Annotation> note; 1666 1667 private static final long serialVersionUID = -1069243129L; 1668 1669 /** 1670 * Constructor 1671 */ 1672 public Specimen() { 1673 super(); 1674 } 1675 1676 /** 1677 * @return {@link #identifier} (Id for specimen.) 1678 */ 1679 public List<Identifier> getIdentifier() { 1680 if (this.identifier == null) 1681 this.identifier = new ArrayList<Identifier>(); 1682 return this.identifier; 1683 } 1684 1685 /** 1686 * @return Returns a reference to <code>this</code> for easy method chaining 1687 */ 1688 public Specimen setIdentifier(List<Identifier> theIdentifier) { 1689 this.identifier = theIdentifier; 1690 return this; 1691 } 1692 1693 public boolean hasIdentifier() { 1694 if (this.identifier == null) 1695 return false; 1696 for (Identifier item : this.identifier) 1697 if (!item.isEmpty()) 1698 return true; 1699 return false; 1700 } 1701 1702 public Identifier addIdentifier() { //3 1703 Identifier t = new Identifier(); 1704 if (this.identifier == null) 1705 this.identifier = new ArrayList<Identifier>(); 1706 this.identifier.add(t); 1707 return t; 1708 } 1709 1710 public Specimen addIdentifier(Identifier t) { //3 1711 if (t == null) 1712 return this; 1713 if (this.identifier == null) 1714 this.identifier = new ArrayList<Identifier>(); 1715 this.identifier.add(t); 1716 return this; 1717 } 1718 1719 /** 1720 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 1721 */ 1722 public Identifier getIdentifierFirstRep() { 1723 if (getIdentifier().isEmpty()) { 1724 addIdentifier(); 1725 } 1726 return getIdentifier().get(0); 1727 } 1728 1729 /** 1730 * @return {@link #accessionIdentifier} (The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.) 1731 */ 1732 public Identifier getAccessionIdentifier() { 1733 if (this.accessionIdentifier == null) 1734 if (Configuration.errorOnAutoCreate()) 1735 throw new Error("Attempt to auto-create Specimen.accessionIdentifier"); 1736 else if (Configuration.doAutoCreate()) 1737 this.accessionIdentifier = new Identifier(); // cc 1738 return this.accessionIdentifier; 1739 } 1740 1741 public boolean hasAccessionIdentifier() { 1742 return this.accessionIdentifier != null && !this.accessionIdentifier.isEmpty(); 1743 } 1744 1745 /** 1746 * @param value {@link #accessionIdentifier} (The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.) 1747 */ 1748 public Specimen setAccessionIdentifier(Identifier value) { 1749 this.accessionIdentifier = value; 1750 return this; 1751 } 1752 1753 /** 1754 * @return {@link #status} (The availability of the specimen.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1755 */ 1756 public Enumeration<SpecimenStatus> getStatusElement() { 1757 if (this.status == null) 1758 if (Configuration.errorOnAutoCreate()) 1759 throw new Error("Attempt to auto-create Specimen.status"); 1760 else if (Configuration.doAutoCreate()) 1761 this.status = new Enumeration<SpecimenStatus>(new SpecimenStatusEnumFactory()); // bb 1762 return this.status; 1763 } 1764 1765 public boolean hasStatusElement() { 1766 return this.status != null && !this.status.isEmpty(); 1767 } 1768 1769 public boolean hasStatus() { 1770 return this.status != null && !this.status.isEmpty(); 1771 } 1772 1773 /** 1774 * @param value {@link #status} (The availability of the specimen.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1775 */ 1776 public Specimen setStatusElement(Enumeration<SpecimenStatus> value) { 1777 this.status = value; 1778 return this; 1779 } 1780 1781 /** 1782 * @return The availability of the specimen. 1783 */ 1784 public SpecimenStatus getStatus() { 1785 return this.status == null ? null : this.status.getValue(); 1786 } 1787 1788 /** 1789 * @param value The availability of the specimen. 1790 */ 1791 public Specimen setStatus(SpecimenStatus value) { 1792 if (value == null) 1793 this.status = null; 1794 else { 1795 if (this.status == null) 1796 this.status = new Enumeration<SpecimenStatus>(new SpecimenStatusEnumFactory()); 1797 this.status.setValue(value); 1798 } 1799 return this; 1800 } 1801 1802 /** 1803 * @return {@link #type} (The kind of material that forms the specimen.) 1804 */ 1805 public CodeableConcept getType() { 1806 if (this.type == null) 1807 if (Configuration.errorOnAutoCreate()) 1808 throw new Error("Attempt to auto-create Specimen.type"); 1809 else if (Configuration.doAutoCreate()) 1810 this.type = new CodeableConcept(); // cc 1811 return this.type; 1812 } 1813 1814 public boolean hasType() { 1815 return this.type != null && !this.type.isEmpty(); 1816 } 1817 1818 /** 1819 * @param value {@link #type} (The kind of material that forms the specimen.) 1820 */ 1821 public Specimen setType(CodeableConcept value) { 1822 this.type = value; 1823 return this; 1824 } 1825 1826 /** 1827 * @return {@link #subject} (Where the specimen came from. This may be from patient(s), from a location (e.g., the source of an environmental sample), or a sampling of a substance or a device.) 1828 */ 1829 public Reference getSubject() { 1830 if (this.subject == null) 1831 if (Configuration.errorOnAutoCreate()) 1832 throw new Error("Attempt to auto-create Specimen.subject"); 1833 else if (Configuration.doAutoCreate()) 1834 this.subject = new Reference(); // cc 1835 return this.subject; 1836 } 1837 1838 public boolean hasSubject() { 1839 return this.subject != null && !this.subject.isEmpty(); 1840 } 1841 1842 /** 1843 * @param value {@link #subject} (Where the specimen came from. This may be from patient(s), from a location (e.g., the source of an environmental sample), or a sampling of a substance or a device.) 1844 */ 1845 public Specimen setSubject(Reference value) { 1846 this.subject = value; 1847 return this; 1848 } 1849 1850 /** 1851 * @return {@link #receivedTime} (Time when specimen was received for processing or testing.). This is the underlying object with id, value and extensions. The accessor "getReceivedTime" gives direct access to the value 1852 */ 1853 public DateTimeType getReceivedTimeElement() { 1854 if (this.receivedTime == null) 1855 if (Configuration.errorOnAutoCreate()) 1856 throw new Error("Attempt to auto-create Specimen.receivedTime"); 1857 else if (Configuration.doAutoCreate()) 1858 this.receivedTime = new DateTimeType(); // bb 1859 return this.receivedTime; 1860 } 1861 1862 public boolean hasReceivedTimeElement() { 1863 return this.receivedTime != null && !this.receivedTime.isEmpty(); 1864 } 1865 1866 public boolean hasReceivedTime() { 1867 return this.receivedTime != null && !this.receivedTime.isEmpty(); 1868 } 1869 1870 /** 1871 * @param value {@link #receivedTime} (Time when specimen was received for processing or testing.). This is the underlying object with id, value and extensions. The accessor "getReceivedTime" gives direct access to the value 1872 */ 1873 public Specimen setReceivedTimeElement(DateTimeType value) { 1874 this.receivedTime = value; 1875 return this; 1876 } 1877 1878 /** 1879 * @return Time when specimen was received for processing or testing. 1880 */ 1881 public Date getReceivedTime() { 1882 return this.receivedTime == null ? null : this.receivedTime.getValue(); 1883 } 1884 1885 /** 1886 * @param value Time when specimen was received for processing or testing. 1887 */ 1888 public Specimen setReceivedTime(Date value) { 1889 if (value == null) 1890 this.receivedTime = null; 1891 else { 1892 if (this.receivedTime == null) 1893 this.receivedTime = new DateTimeType(); 1894 this.receivedTime.setValue(value); 1895 } 1896 return this; 1897 } 1898 1899 /** 1900 * @return {@link #parent} (Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.) 1901 */ 1902 public List<Reference> getParent() { 1903 if (this.parent == null) 1904 this.parent = new ArrayList<Reference>(); 1905 return this.parent; 1906 } 1907 1908 /** 1909 * @return Returns a reference to <code>this</code> for easy method chaining 1910 */ 1911 public Specimen setParent(List<Reference> theParent) { 1912 this.parent = theParent; 1913 return this; 1914 } 1915 1916 public boolean hasParent() { 1917 if (this.parent == null) 1918 return false; 1919 for (Reference item : this.parent) 1920 if (!item.isEmpty()) 1921 return true; 1922 return false; 1923 } 1924 1925 public Reference addParent() { //3 1926 Reference t = new Reference(); 1927 if (this.parent == null) 1928 this.parent = new ArrayList<Reference>(); 1929 this.parent.add(t); 1930 return t; 1931 } 1932 1933 public Specimen addParent(Reference t) { //3 1934 if (t == null) 1935 return this; 1936 if (this.parent == null) 1937 this.parent = new ArrayList<Reference>(); 1938 this.parent.add(t); 1939 return this; 1940 } 1941 1942 /** 1943 * @return The first repetition of repeating field {@link #parent}, creating it if it does not already exist 1944 */ 1945 public Reference getParentFirstRep() { 1946 if (getParent().isEmpty()) { 1947 addParent(); 1948 } 1949 return getParent().get(0); 1950 } 1951 1952 /** 1953 * @return {@link #request} (Details concerning a service request that required a specimen to be collected.) 1954 */ 1955 public List<Reference> getRequest() { 1956 if (this.request == null) 1957 this.request = new ArrayList<Reference>(); 1958 return this.request; 1959 } 1960 1961 /** 1962 * @return Returns a reference to <code>this</code> for easy method chaining 1963 */ 1964 public Specimen setRequest(List<Reference> theRequest) { 1965 this.request = theRequest; 1966 return this; 1967 } 1968 1969 public boolean hasRequest() { 1970 if (this.request == null) 1971 return false; 1972 for (Reference item : this.request) 1973 if (!item.isEmpty()) 1974 return true; 1975 return false; 1976 } 1977 1978 public Reference addRequest() { //3 1979 Reference t = new Reference(); 1980 if (this.request == null) 1981 this.request = new ArrayList<Reference>(); 1982 this.request.add(t); 1983 return t; 1984 } 1985 1986 public Specimen addRequest(Reference t) { //3 1987 if (t == null) 1988 return this; 1989 if (this.request == null) 1990 this.request = new ArrayList<Reference>(); 1991 this.request.add(t); 1992 return this; 1993 } 1994 1995 /** 1996 * @return The first repetition of repeating field {@link #request}, creating it if it does not already exist 1997 */ 1998 public Reference getRequestFirstRep() { 1999 if (getRequest().isEmpty()) { 2000 addRequest(); 2001 } 2002 return getRequest().get(0); 2003 } 2004 2005 /** 2006 * @return {@link #collection} (Details concerning the specimen collection.) 2007 */ 2008 public SpecimenCollectionComponent getCollection() { 2009 if (this.collection == null) 2010 if (Configuration.errorOnAutoCreate()) 2011 throw new Error("Attempt to auto-create Specimen.collection"); 2012 else if (Configuration.doAutoCreate()) 2013 this.collection = new SpecimenCollectionComponent(); // cc 2014 return this.collection; 2015 } 2016 2017 public boolean hasCollection() { 2018 return this.collection != null && !this.collection.isEmpty(); 2019 } 2020 2021 /** 2022 * @param value {@link #collection} (Details concerning the specimen collection.) 2023 */ 2024 public Specimen setCollection(SpecimenCollectionComponent value) { 2025 this.collection = value; 2026 return this; 2027 } 2028 2029 /** 2030 * @return {@link #processing} (Details concerning processing and processing steps for the specimen.) 2031 */ 2032 public List<SpecimenProcessingComponent> getProcessing() { 2033 if (this.processing == null) 2034 this.processing = new ArrayList<SpecimenProcessingComponent>(); 2035 return this.processing; 2036 } 2037 2038 /** 2039 * @return Returns a reference to <code>this</code> for easy method chaining 2040 */ 2041 public Specimen setProcessing(List<SpecimenProcessingComponent> theProcessing) { 2042 this.processing = theProcessing; 2043 return this; 2044 } 2045 2046 public boolean hasProcessing() { 2047 if (this.processing == null) 2048 return false; 2049 for (SpecimenProcessingComponent item : this.processing) 2050 if (!item.isEmpty()) 2051 return true; 2052 return false; 2053 } 2054 2055 public SpecimenProcessingComponent addProcessing() { //3 2056 SpecimenProcessingComponent t = new SpecimenProcessingComponent(); 2057 if (this.processing == null) 2058 this.processing = new ArrayList<SpecimenProcessingComponent>(); 2059 this.processing.add(t); 2060 return t; 2061 } 2062 2063 public Specimen addProcessing(SpecimenProcessingComponent t) { //3 2064 if (t == null) 2065 return this; 2066 if (this.processing == null) 2067 this.processing = new ArrayList<SpecimenProcessingComponent>(); 2068 this.processing.add(t); 2069 return this; 2070 } 2071 2072 /** 2073 * @return The first repetition of repeating field {@link #processing}, creating it if it does not already exist 2074 */ 2075 public SpecimenProcessingComponent getProcessingFirstRep() { 2076 if (getProcessing().isEmpty()) { 2077 addProcessing(); 2078 } 2079 return getProcessing().get(0); 2080 } 2081 2082 /** 2083 * @return {@link #container} (The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.) 2084 */ 2085 public List<SpecimenContainerComponent> getContainer() { 2086 if (this.container == null) 2087 this.container = new ArrayList<SpecimenContainerComponent>(); 2088 return this.container; 2089 } 2090 2091 /** 2092 * @return Returns a reference to <code>this</code> for easy method chaining 2093 */ 2094 public Specimen setContainer(List<SpecimenContainerComponent> theContainer) { 2095 this.container = theContainer; 2096 return this; 2097 } 2098 2099 public boolean hasContainer() { 2100 if (this.container == null) 2101 return false; 2102 for (SpecimenContainerComponent item : this.container) 2103 if (!item.isEmpty()) 2104 return true; 2105 return false; 2106 } 2107 2108 public SpecimenContainerComponent addContainer() { //3 2109 SpecimenContainerComponent t = new SpecimenContainerComponent(); 2110 if (this.container == null) 2111 this.container = new ArrayList<SpecimenContainerComponent>(); 2112 this.container.add(t); 2113 return t; 2114 } 2115 2116 public Specimen addContainer(SpecimenContainerComponent t) { //3 2117 if (t == null) 2118 return this; 2119 if (this.container == null) 2120 this.container = new ArrayList<SpecimenContainerComponent>(); 2121 this.container.add(t); 2122 return this; 2123 } 2124 2125 /** 2126 * @return The first repetition of repeating field {@link #container}, creating it if it does not already exist 2127 */ 2128 public SpecimenContainerComponent getContainerFirstRep() { 2129 if (getContainer().isEmpty()) { 2130 addContainer(); 2131 } 2132 return getContainer().get(0); 2133 } 2134 2135 /** 2136 * @return {@link #condition} (A mode or state of being that describes the nature of the specimen.) 2137 */ 2138 public List<CodeableConcept> getCondition() { 2139 if (this.condition == null) 2140 this.condition = new ArrayList<CodeableConcept>(); 2141 return this.condition; 2142 } 2143 2144 /** 2145 * @return Returns a reference to <code>this</code> for easy method chaining 2146 */ 2147 public Specimen setCondition(List<CodeableConcept> theCondition) { 2148 this.condition = theCondition; 2149 return this; 2150 } 2151 2152 public boolean hasCondition() { 2153 if (this.condition == null) 2154 return false; 2155 for (CodeableConcept item : this.condition) 2156 if (!item.isEmpty()) 2157 return true; 2158 return false; 2159 } 2160 2161 public CodeableConcept addCondition() { //3 2162 CodeableConcept t = new CodeableConcept(); 2163 if (this.condition == null) 2164 this.condition = new ArrayList<CodeableConcept>(); 2165 this.condition.add(t); 2166 return t; 2167 } 2168 2169 public Specimen addCondition(CodeableConcept t) { //3 2170 if (t == null) 2171 return this; 2172 if (this.condition == null) 2173 this.condition = new ArrayList<CodeableConcept>(); 2174 this.condition.add(t); 2175 return this; 2176 } 2177 2178 /** 2179 * @return The first repetition of repeating field {@link #condition}, creating it if it does not already exist 2180 */ 2181 public CodeableConcept getConditionFirstRep() { 2182 if (getCondition().isEmpty()) { 2183 addCondition(); 2184 } 2185 return getCondition().get(0); 2186 } 2187 2188 /** 2189 * @return {@link #note} (To communicate any details or issues about the specimen or during the specimen collection. (for example: broken vial, sent with patient, frozen).) 2190 */ 2191 public List<Annotation> getNote() { 2192 if (this.note == null) 2193 this.note = new ArrayList<Annotation>(); 2194 return this.note; 2195 } 2196 2197 /** 2198 * @return Returns a reference to <code>this</code> for easy method chaining 2199 */ 2200 public Specimen setNote(List<Annotation> theNote) { 2201 this.note = theNote; 2202 return this; 2203 } 2204 2205 public boolean hasNote() { 2206 if (this.note == null) 2207 return false; 2208 for (Annotation item : this.note) 2209 if (!item.isEmpty()) 2210 return true; 2211 return false; 2212 } 2213 2214 public Annotation addNote() { //3 2215 Annotation t = new Annotation(); 2216 if (this.note == null) 2217 this.note = new ArrayList<Annotation>(); 2218 this.note.add(t); 2219 return t; 2220 } 2221 2222 public Specimen addNote(Annotation t) { //3 2223 if (t == null) 2224 return this; 2225 if (this.note == null) 2226 this.note = new ArrayList<Annotation>(); 2227 this.note.add(t); 2228 return this; 2229 } 2230 2231 /** 2232 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist 2233 */ 2234 public Annotation getNoteFirstRep() { 2235 if (getNote().isEmpty()) { 2236 addNote(); 2237 } 2238 return getNote().get(0); 2239 } 2240 2241 protected void listChildren(List<Property> children) { 2242 super.listChildren(children); 2243 children.add(new Property("identifier", "Identifier", "Id for specimen.", 0, java.lang.Integer.MAX_VALUE, identifier)); 2244 children.add(new Property("accessionIdentifier", "Identifier", "The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.", 0, 1, accessionIdentifier)); 2245 children.add(new Property("status", "code", "The availability of the specimen.", 0, 1, status)); 2246 children.add(new Property("type", "CodeableConcept", "The kind of material that forms the specimen.", 0, 1, type)); 2247 children.add(new Property("subject", "Reference(Patient|Group|Device|Substance|Location)", "Where the specimen came from. This may be from patient(s), from a location (e.g., the source of an environmental sample), or a sampling of a substance or a device.", 0, 1, subject)); 2248 children.add(new Property("receivedTime", "dateTime", "Time when specimen was received for processing or testing.", 0, 1, receivedTime)); 2249 children.add(new Property("parent", "Reference(Specimen)", "Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.", 0, java.lang.Integer.MAX_VALUE, parent)); 2250 children.add(new Property("request", "Reference(ServiceRequest)", "Details concerning a service request that required a specimen to be collected.", 0, java.lang.Integer.MAX_VALUE, request)); 2251 children.add(new Property("collection", "", "Details concerning the specimen collection.", 0, 1, collection)); 2252 children.add(new Property("processing", "", "Details concerning processing and processing steps for the specimen.", 0, java.lang.Integer.MAX_VALUE, processing)); 2253 children.add(new Property("container", "", "The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.", 0, java.lang.Integer.MAX_VALUE, container)); 2254 children.add(new Property("condition", "CodeableConcept", "A mode or state of being that describes the nature of the specimen.", 0, java.lang.Integer.MAX_VALUE, condition)); 2255 children.add(new Property("note", "Annotation", "To communicate any details or issues about the specimen or during the specimen collection. (for example: broken vial, sent with patient, frozen).", 0, java.lang.Integer.MAX_VALUE, note)); 2256 } 2257 2258 @Override 2259 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2260 switch (_hash) { 2261 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Id for specimen.", 0, java.lang.Integer.MAX_VALUE, identifier); 2262 case 818734061: /*accessionIdentifier*/ return new Property("accessionIdentifier", "Identifier", "The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.", 0, 1, accessionIdentifier); 2263 case -892481550: /*status*/ return new Property("status", "code", "The availability of the specimen.", 0, 1, status); 2264 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The kind of material that forms the specimen.", 0, 1, type); 2265 case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group|Device|Substance|Location)", "Where the specimen came from. This may be from patient(s), from a location (e.g., the source of an environmental sample), or a sampling of a substance or a device.", 0, 1, subject); 2266 case -767961010: /*receivedTime*/ return new Property("receivedTime", "dateTime", "Time when specimen was received for processing or testing.", 0, 1, receivedTime); 2267 case -995424086: /*parent*/ return new Property("parent", "Reference(Specimen)", "Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.", 0, java.lang.Integer.MAX_VALUE, parent); 2268 case 1095692943: /*request*/ return new Property("request", "Reference(ServiceRequest)", "Details concerning a service request that required a specimen to be collected.", 0, java.lang.Integer.MAX_VALUE, request); 2269 case -1741312354: /*collection*/ return new Property("collection", "", "Details concerning the specimen collection.", 0, 1, collection); 2270 case 422194963: /*processing*/ return new Property("processing", "", "Details concerning processing and processing steps for the specimen.", 0, java.lang.Integer.MAX_VALUE, processing); 2271 case -410956671: /*container*/ return new Property("container", "", "The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.", 0, java.lang.Integer.MAX_VALUE, container); 2272 case -861311717: /*condition*/ return new Property("condition", "CodeableConcept", "A mode or state of being that describes the nature of the specimen.", 0, java.lang.Integer.MAX_VALUE, condition); 2273 case 3387378: /*note*/ return new Property("note", "Annotation", "To communicate any details or issues about the specimen or during the specimen collection. (for example: broken vial, sent with patient, frozen).", 0, java.lang.Integer.MAX_VALUE, note); 2274 default: return super.getNamedProperty(_hash, _name, _checkValid); 2275 } 2276 2277 } 2278 2279 @Override 2280 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2281 switch (hash) { 2282 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 2283 case 818734061: /*accessionIdentifier*/ return this.accessionIdentifier == null ? new Base[0] : new Base[] {this.accessionIdentifier}; // Identifier 2284 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<SpecimenStatus> 2285 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 2286 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 2287 case -767961010: /*receivedTime*/ return this.receivedTime == null ? new Base[0] : new Base[] {this.receivedTime}; // DateTimeType 2288 case -995424086: /*parent*/ return this.parent == null ? new Base[0] : this.parent.toArray(new Base[this.parent.size()]); // Reference 2289 case 1095692943: /*request*/ return this.request == null ? new Base[0] : this.request.toArray(new Base[this.request.size()]); // Reference 2290 case -1741312354: /*collection*/ return this.collection == null ? new Base[0] : new Base[] {this.collection}; // SpecimenCollectionComponent 2291 case 422194963: /*processing*/ return this.processing == null ? new Base[0] : this.processing.toArray(new Base[this.processing.size()]); // SpecimenProcessingComponent 2292 case -410956671: /*container*/ return this.container == null ? new Base[0] : this.container.toArray(new Base[this.container.size()]); // SpecimenContainerComponent 2293 case -861311717: /*condition*/ return this.condition == null ? new Base[0] : this.condition.toArray(new Base[this.condition.size()]); // CodeableConcept 2294 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 2295 default: return super.getProperty(hash, name, checkValid); 2296 } 2297 2298 } 2299 2300 @Override 2301 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2302 switch (hash) { 2303 case -1618432855: // identifier 2304 this.getIdentifier().add(castToIdentifier(value)); // Identifier 2305 return value; 2306 case 818734061: // accessionIdentifier 2307 this.accessionIdentifier = castToIdentifier(value); // Identifier 2308 return value; 2309 case -892481550: // status 2310 value = new SpecimenStatusEnumFactory().fromType(castToCode(value)); 2311 this.status = (Enumeration) value; // Enumeration<SpecimenStatus> 2312 return value; 2313 case 3575610: // type 2314 this.type = castToCodeableConcept(value); // CodeableConcept 2315 return value; 2316 case -1867885268: // subject 2317 this.subject = castToReference(value); // Reference 2318 return value; 2319 case -767961010: // receivedTime 2320 this.receivedTime = castToDateTime(value); // DateTimeType 2321 return value; 2322 case -995424086: // parent 2323 this.getParent().add(castToReference(value)); // Reference 2324 return value; 2325 case 1095692943: // request 2326 this.getRequest().add(castToReference(value)); // Reference 2327 return value; 2328 case -1741312354: // collection 2329 this.collection = (SpecimenCollectionComponent) value; // SpecimenCollectionComponent 2330 return value; 2331 case 422194963: // processing 2332 this.getProcessing().add((SpecimenProcessingComponent) value); // SpecimenProcessingComponent 2333 return value; 2334 case -410956671: // container 2335 this.getContainer().add((SpecimenContainerComponent) value); // SpecimenContainerComponent 2336 return value; 2337 case -861311717: // condition 2338 this.getCondition().add(castToCodeableConcept(value)); // CodeableConcept 2339 return value; 2340 case 3387378: // note 2341 this.getNote().add(castToAnnotation(value)); // Annotation 2342 return value; 2343 default: return super.setProperty(hash, name, value); 2344 } 2345 2346 } 2347 2348 @Override 2349 public Base setProperty(String name, Base value) throws FHIRException { 2350 if (name.equals("identifier")) { 2351 this.getIdentifier().add(castToIdentifier(value)); 2352 } else if (name.equals("accessionIdentifier")) { 2353 this.accessionIdentifier = castToIdentifier(value); // Identifier 2354 } else if (name.equals("status")) { 2355 value = new SpecimenStatusEnumFactory().fromType(castToCode(value)); 2356 this.status = (Enumeration) value; // Enumeration<SpecimenStatus> 2357 } else if (name.equals("type")) { 2358 this.type = castToCodeableConcept(value); // CodeableConcept 2359 } else if (name.equals("subject")) { 2360 this.subject = castToReference(value); // Reference 2361 } else if (name.equals("receivedTime")) { 2362 this.receivedTime = castToDateTime(value); // DateTimeType 2363 } else if (name.equals("parent")) { 2364 this.getParent().add(castToReference(value)); 2365 } else if (name.equals("request")) { 2366 this.getRequest().add(castToReference(value)); 2367 } else if (name.equals("collection")) { 2368 this.collection = (SpecimenCollectionComponent) value; // SpecimenCollectionComponent 2369 } else if (name.equals("processing")) { 2370 this.getProcessing().add((SpecimenProcessingComponent) value); 2371 } else if (name.equals("container")) { 2372 this.getContainer().add((SpecimenContainerComponent) value); 2373 } else if (name.equals("condition")) { 2374 this.getCondition().add(castToCodeableConcept(value)); 2375 } else if (name.equals("note")) { 2376 this.getNote().add(castToAnnotation(value)); 2377 } else 2378 return super.setProperty(name, value); 2379 return value; 2380 } 2381 2382 @Override 2383 public Base makeProperty(int hash, String name) throws FHIRException { 2384 switch (hash) { 2385 case -1618432855: return addIdentifier(); 2386 case 818734061: return getAccessionIdentifier(); 2387 case -892481550: return getStatusElement(); 2388 case 3575610: return getType(); 2389 case -1867885268: return getSubject(); 2390 case -767961010: return getReceivedTimeElement(); 2391 case -995424086: return addParent(); 2392 case 1095692943: return addRequest(); 2393 case -1741312354: return getCollection(); 2394 case 422194963: return addProcessing(); 2395 case -410956671: return addContainer(); 2396 case -861311717: return addCondition(); 2397 case 3387378: return addNote(); 2398 default: return super.makeProperty(hash, name); 2399 } 2400 2401 } 2402 2403 @Override 2404 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2405 switch (hash) { 2406 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 2407 case 818734061: /*accessionIdentifier*/ return new String[] {"Identifier"}; 2408 case -892481550: /*status*/ return new String[] {"code"}; 2409 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 2410 case -1867885268: /*subject*/ return new String[] {"Reference"}; 2411 case -767961010: /*receivedTime*/ return new String[] {"dateTime"}; 2412 case -995424086: /*parent*/ return new String[] {"Reference"}; 2413 case 1095692943: /*request*/ return new String[] {"Reference"}; 2414 case -1741312354: /*collection*/ return new String[] {}; 2415 case 422194963: /*processing*/ return new String[] {}; 2416 case -410956671: /*container*/ return new String[] {}; 2417 case -861311717: /*condition*/ return new String[] {"CodeableConcept"}; 2418 case 3387378: /*note*/ return new String[] {"Annotation"}; 2419 default: return super.getTypesForProperty(hash, name); 2420 } 2421 2422 } 2423 2424 @Override 2425 public Base addChild(String name) throws FHIRException { 2426 if (name.equals("identifier")) { 2427 return addIdentifier(); 2428 } 2429 else if (name.equals("accessionIdentifier")) { 2430 this.accessionIdentifier = new Identifier(); 2431 return this.accessionIdentifier; 2432 } 2433 else if (name.equals("status")) { 2434 throw new FHIRException("Cannot call addChild on a primitive type Specimen.status"); 2435 } 2436 else if (name.equals("type")) { 2437 this.type = new CodeableConcept(); 2438 return this.type; 2439 } 2440 else if (name.equals("subject")) { 2441 this.subject = new Reference(); 2442 return this.subject; 2443 } 2444 else if (name.equals("receivedTime")) { 2445 throw new FHIRException("Cannot call addChild on a primitive type Specimen.receivedTime"); 2446 } 2447 else if (name.equals("parent")) { 2448 return addParent(); 2449 } 2450 else if (name.equals("request")) { 2451 return addRequest(); 2452 } 2453 else if (name.equals("collection")) { 2454 this.collection = new SpecimenCollectionComponent(); 2455 return this.collection; 2456 } 2457 else if (name.equals("processing")) { 2458 return addProcessing(); 2459 } 2460 else if (name.equals("container")) { 2461 return addContainer(); 2462 } 2463 else if (name.equals("condition")) { 2464 return addCondition(); 2465 } 2466 else if (name.equals("note")) { 2467 return addNote(); 2468 } 2469 else 2470 return super.addChild(name); 2471 } 2472 2473 public String fhirType() { 2474 return "Specimen"; 2475 2476 } 2477 2478 public Specimen copy() { 2479 Specimen dst = new Specimen(); 2480 copyValues(dst); 2481 return dst; 2482 } 2483 2484 public void copyValues(Specimen dst) { 2485 super.copyValues(dst); 2486 if (identifier != null) { 2487 dst.identifier = new ArrayList<Identifier>(); 2488 for (Identifier i : identifier) 2489 dst.identifier.add(i.copy()); 2490 }; 2491 dst.accessionIdentifier = accessionIdentifier == null ? null : accessionIdentifier.copy(); 2492 dst.status = status == null ? null : status.copy(); 2493 dst.type = type == null ? null : type.copy(); 2494 dst.subject = subject == null ? null : subject.copy(); 2495 dst.receivedTime = receivedTime == null ? null : receivedTime.copy(); 2496 if (parent != null) { 2497 dst.parent = new ArrayList<Reference>(); 2498 for (Reference i : parent) 2499 dst.parent.add(i.copy()); 2500 }; 2501 if (request != null) { 2502 dst.request = new ArrayList<Reference>(); 2503 for (Reference i : request) 2504 dst.request.add(i.copy()); 2505 }; 2506 dst.collection = collection == null ? null : collection.copy(); 2507 if (processing != null) { 2508 dst.processing = new ArrayList<SpecimenProcessingComponent>(); 2509 for (SpecimenProcessingComponent i : processing) 2510 dst.processing.add(i.copy()); 2511 }; 2512 if (container != null) { 2513 dst.container = new ArrayList<SpecimenContainerComponent>(); 2514 for (SpecimenContainerComponent i : container) 2515 dst.container.add(i.copy()); 2516 }; 2517 if (condition != null) { 2518 dst.condition = new ArrayList<CodeableConcept>(); 2519 for (CodeableConcept i : condition) 2520 dst.condition.add(i.copy()); 2521 }; 2522 if (note != null) { 2523 dst.note = new ArrayList<Annotation>(); 2524 for (Annotation i : note) 2525 dst.note.add(i.copy()); 2526 }; 2527 } 2528 2529 protected Specimen typedCopy() { 2530 return copy(); 2531 } 2532 2533 @Override 2534 public boolean equalsDeep(Base other_) { 2535 if (!super.equalsDeep(other_)) 2536 return false; 2537 if (!(other_ instanceof Specimen)) 2538 return false; 2539 Specimen o = (Specimen) other_; 2540 return compareDeep(identifier, o.identifier, true) && compareDeep(accessionIdentifier, o.accessionIdentifier, true) 2541 && compareDeep(status, o.status, true) && compareDeep(type, o.type, true) && compareDeep(subject, o.subject, true) 2542 && compareDeep(receivedTime, o.receivedTime, true) && compareDeep(parent, o.parent, true) && compareDeep(request, o.request, true) 2543 && compareDeep(collection, o.collection, true) && compareDeep(processing, o.processing, true) && compareDeep(container, o.container, true) 2544 && compareDeep(condition, o.condition, true) && compareDeep(note, o.note, true); 2545 } 2546 2547 @Override 2548 public boolean equalsShallow(Base other_) { 2549 if (!super.equalsShallow(other_)) 2550 return false; 2551 if (!(other_ instanceof Specimen)) 2552 return false; 2553 Specimen o = (Specimen) other_; 2554 return compareValues(status, o.status, true) && compareValues(receivedTime, o.receivedTime, true); 2555 } 2556 2557 public boolean isEmpty() { 2558 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, accessionIdentifier 2559 , status, type, subject, receivedTime, parent, request, collection, processing 2560 , container, condition, note); 2561 } 2562 2563 @Override 2564 public ResourceType getResourceType() { 2565 return ResourceType.Specimen; 2566 } 2567 2568 /** 2569 * Search parameter: <b>container</b> 2570 * <p> 2571 * Description: <b>The kind of specimen container</b><br> 2572 * Type: <b>token</b><br> 2573 * Path: <b>Specimen.container.type</b><br> 2574 * </p> 2575 */ 2576 @SearchParamDefinition(name="container", path="Specimen.container.type", description="The kind of specimen container", type="token" ) 2577 public static final String SP_CONTAINER = "container"; 2578 /** 2579 * <b>Fluent Client</b> search parameter constant for <b>container</b> 2580 * <p> 2581 * Description: <b>The kind of specimen container</b><br> 2582 * Type: <b>token</b><br> 2583 * Path: <b>Specimen.container.type</b><br> 2584 * </p> 2585 */ 2586 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTAINER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTAINER); 2587 2588 /** 2589 * Search parameter: <b>identifier</b> 2590 * <p> 2591 * Description: <b>The unique identifier associated with the specimen</b><br> 2592 * Type: <b>token</b><br> 2593 * Path: <b>Specimen.identifier</b><br> 2594 * </p> 2595 */ 2596 @SearchParamDefinition(name="identifier", path="Specimen.identifier", description="The unique identifier associated with the specimen", type="token" ) 2597 public static final String SP_IDENTIFIER = "identifier"; 2598 /** 2599 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 2600 * <p> 2601 * Description: <b>The unique identifier associated with the specimen</b><br> 2602 * Type: <b>token</b><br> 2603 * Path: <b>Specimen.identifier</b><br> 2604 * </p> 2605 */ 2606 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 2607 2608 /** 2609 * Search parameter: <b>parent</b> 2610 * <p> 2611 * Description: <b>The parent of the specimen</b><br> 2612 * Type: <b>reference</b><br> 2613 * Path: <b>Specimen.parent</b><br> 2614 * </p> 2615 */ 2616 @SearchParamDefinition(name="parent", path="Specimen.parent", description="The parent of the specimen", type="reference", target={Specimen.class } ) 2617 public static final String SP_PARENT = "parent"; 2618 /** 2619 * <b>Fluent Client</b> search parameter constant for <b>parent</b> 2620 * <p> 2621 * Description: <b>The parent of the specimen</b><br> 2622 * Type: <b>reference</b><br> 2623 * Path: <b>Specimen.parent</b><br> 2624 * </p> 2625 */ 2626 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARENT); 2627 2628/** 2629 * Constant for fluent queries to be used to add include statements. Specifies 2630 * the path value of "<b>Specimen:parent</b>". 2631 */ 2632 public static final ca.uhn.fhir.model.api.Include INCLUDE_PARENT = new ca.uhn.fhir.model.api.Include("Specimen:parent").toLocked(); 2633 2634 /** 2635 * Search parameter: <b>container-id</b> 2636 * <p> 2637 * Description: <b>The unique identifier associated with the specimen container</b><br> 2638 * Type: <b>token</b><br> 2639 * Path: <b>Specimen.container.identifier</b><br> 2640 * </p> 2641 */ 2642 @SearchParamDefinition(name="container-id", path="Specimen.container.identifier", description="The unique identifier associated with the specimen container", type="token" ) 2643 public static final String SP_CONTAINER_ID = "container-id"; 2644 /** 2645 * <b>Fluent Client</b> search parameter constant for <b>container-id</b> 2646 * <p> 2647 * Description: <b>The unique identifier associated with the specimen container</b><br> 2648 * Type: <b>token</b><br> 2649 * Path: <b>Specimen.container.identifier</b><br> 2650 * </p> 2651 */ 2652 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTAINER_ID = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTAINER_ID); 2653 2654 /** 2655 * Search parameter: <b>bodysite</b> 2656 * <p> 2657 * Description: <b>The code for the body site from where the specimen originated</b><br> 2658 * Type: <b>token</b><br> 2659 * Path: <b>Specimen.collection.bodySite</b><br> 2660 * </p> 2661 */ 2662 @SearchParamDefinition(name="bodysite", path="Specimen.collection.bodySite", description="The code for the body site from where the specimen originated", type="token" ) 2663 public static final String SP_BODYSITE = "bodysite"; 2664 /** 2665 * <b>Fluent Client</b> search parameter constant for <b>bodysite</b> 2666 * <p> 2667 * Description: <b>The code for the body site from where the specimen originated</b><br> 2668 * Type: <b>token</b><br> 2669 * Path: <b>Specimen.collection.bodySite</b><br> 2670 * </p> 2671 */ 2672 public static final ca.uhn.fhir.rest.gclient.TokenClientParam BODYSITE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_BODYSITE); 2673 2674 /** 2675 * Search parameter: <b>subject</b> 2676 * <p> 2677 * Description: <b>The subject of the specimen</b><br> 2678 * Type: <b>reference</b><br> 2679 * Path: <b>Specimen.subject</b><br> 2680 * </p> 2681 */ 2682 @SearchParamDefinition(name="subject", path="Specimen.subject", description="The subject of the specimen", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Device.class, Group.class, Location.class, Patient.class, Substance.class } ) 2683 public static final String SP_SUBJECT = "subject"; 2684 /** 2685 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 2686 * <p> 2687 * Description: <b>The subject of the specimen</b><br> 2688 * Type: <b>reference</b><br> 2689 * Path: <b>Specimen.subject</b><br> 2690 * </p> 2691 */ 2692 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 2693 2694/** 2695 * Constant for fluent queries to be used to add include statements. Specifies 2696 * the path value of "<b>Specimen:subject</b>". 2697 */ 2698 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Specimen:subject").toLocked(); 2699 2700 /** 2701 * Search parameter: <b>patient</b> 2702 * <p> 2703 * Description: <b>The patient the specimen comes from</b><br> 2704 * Type: <b>reference</b><br> 2705 * Path: <b>Specimen.subject</b><br> 2706 * </p> 2707 */ 2708 @SearchParamDefinition(name="patient", path="Specimen.subject.where(resolve() is Patient)", description="The patient the specimen comes from", type="reference", target={Patient.class } ) 2709 public static final String SP_PATIENT = "patient"; 2710 /** 2711 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 2712 * <p> 2713 * Description: <b>The patient the specimen comes from</b><br> 2714 * Type: <b>reference</b><br> 2715 * Path: <b>Specimen.subject</b><br> 2716 * </p> 2717 */ 2718 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 2719 2720/** 2721 * Constant for fluent queries to be used to add include statements. Specifies 2722 * the path value of "<b>Specimen:patient</b>". 2723 */ 2724 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Specimen:patient").toLocked(); 2725 2726 /** 2727 * Search parameter: <b>collected</b> 2728 * <p> 2729 * Description: <b>The date the specimen was collected</b><br> 2730 * Type: <b>date</b><br> 2731 * Path: <b>Specimen.collection.collected[x]</b><br> 2732 * </p> 2733 */ 2734 @SearchParamDefinition(name="collected", path="Specimen.collection.collected", description="The date the specimen was collected", type="date" ) 2735 public static final String SP_COLLECTED = "collected"; 2736 /** 2737 * <b>Fluent Client</b> search parameter constant for <b>collected</b> 2738 * <p> 2739 * Description: <b>The date the specimen was collected</b><br> 2740 * Type: <b>date</b><br> 2741 * Path: <b>Specimen.collection.collected[x]</b><br> 2742 * </p> 2743 */ 2744 public static final ca.uhn.fhir.rest.gclient.DateClientParam COLLECTED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_COLLECTED); 2745 2746 /** 2747 * Search parameter: <b>accession</b> 2748 * <p> 2749 * Description: <b>The accession number associated with the specimen</b><br> 2750 * Type: <b>token</b><br> 2751 * Path: <b>Specimen.accessionIdentifier</b><br> 2752 * </p> 2753 */ 2754 @SearchParamDefinition(name="accession", path="Specimen.accessionIdentifier", description="The accession number associated with the specimen", type="token" ) 2755 public static final String SP_ACCESSION = "accession"; 2756 /** 2757 * <b>Fluent Client</b> search parameter constant for <b>accession</b> 2758 * <p> 2759 * Description: <b>The accession number associated with the specimen</b><br> 2760 * Type: <b>token</b><br> 2761 * Path: <b>Specimen.accessionIdentifier</b><br> 2762 * </p> 2763 */ 2764 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACCESSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACCESSION); 2765 2766 /** 2767 * Search parameter: <b>type</b> 2768 * <p> 2769 * Description: <b>The specimen type</b><br> 2770 * Type: <b>token</b><br> 2771 * Path: <b>Specimen.type</b><br> 2772 * </p> 2773 */ 2774 @SearchParamDefinition(name="type", path="Specimen.type", description="The specimen type", type="token" ) 2775 public static final String SP_TYPE = "type"; 2776 /** 2777 * <b>Fluent Client</b> search parameter constant for <b>type</b> 2778 * <p> 2779 * Description: <b>The specimen type</b><br> 2780 * Type: <b>token</b><br> 2781 * Path: <b>Specimen.type</b><br> 2782 * </p> 2783 */ 2784 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); 2785 2786 /** 2787 * Search parameter: <b>collector</b> 2788 * <p> 2789 * Description: <b>Who collected the specimen</b><br> 2790 * Type: <b>reference</b><br> 2791 * Path: <b>Specimen.collection.collector</b><br> 2792 * </p> 2793 */ 2794 @SearchParamDefinition(name="collector", path="Specimen.collection.collector", description="Who collected the specimen", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Practitioner.class, PractitionerRole.class } ) 2795 public static final String SP_COLLECTOR = "collector"; 2796 /** 2797 * <b>Fluent Client</b> search parameter constant for <b>collector</b> 2798 * <p> 2799 * Description: <b>Who collected the specimen</b><br> 2800 * Type: <b>reference</b><br> 2801 * Path: <b>Specimen.collection.collector</b><br> 2802 * </p> 2803 */ 2804 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COLLECTOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_COLLECTOR); 2805 2806/** 2807 * Constant for fluent queries to be used to add include statements. Specifies 2808 * the path value of "<b>Specimen:collector</b>". 2809 */ 2810 public static final ca.uhn.fhir.model.api.Include INCLUDE_COLLECTOR = new ca.uhn.fhir.model.api.Include("Specimen:collector").toLocked(); 2811 2812 /** 2813 * Search parameter: <b>status</b> 2814 * <p> 2815 * Description: <b>available | unavailable | unsatisfactory | entered-in-error</b><br> 2816 * Type: <b>token</b><br> 2817 * Path: <b>Specimen.status</b><br> 2818 * </p> 2819 */ 2820 @SearchParamDefinition(name="status", path="Specimen.status", description="available | unavailable | unsatisfactory | entered-in-error", type="token" ) 2821 public static final String SP_STATUS = "status"; 2822 /** 2823 * <b>Fluent Client</b> search parameter constant for <b>status</b> 2824 * <p> 2825 * Description: <b>available | unavailable | unsatisfactory | entered-in-error</b><br> 2826 * Type: <b>token</b><br> 2827 * Path: <b>Specimen.status</b><br> 2828 * </p> 2829 */ 2830 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 2831 2832 2833} 2834