001package org.hl7.fhir.dstu2016may.model; 002 003 004 005 006/* 007 Copyright (c) 2011+, HL7, Inc. 008 All rights reserved. 009 010 Redistribution and use in source and binary forms, with or without modification, 011 are permitted provided that the following conditions are met: 012 013 * Redistributions of source code must retain the above copyright notice, this 014 list of conditions and the following disclaimer. 015 * Redistributions in binary form must reproduce the above copyright notice, 016 this list of conditions and the following disclaimer in the documentation 017 and/or other materials provided with the distribution. 018 * Neither the name of HL7 nor the names of its contributors may be used to 019 endorse or promote products derived from this software without specific 020 prior written permission. 021 022 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 023 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 024 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 025 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 026 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 027 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 028 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 029 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 030 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 031 POSSIBILITY OF SUCH DAMAGE. 032 033*/ 034 035// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0 036import java.util.ArrayList; 037import java.util.Date; 038import java.util.List; 039 040import org.hl7.fhir.exceptions.FHIRException; 041import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 042 043import ca.uhn.fhir.model.api.annotation.Block; 044import ca.uhn.fhir.model.api.annotation.Child; 045import ca.uhn.fhir.model.api.annotation.Description; 046import ca.uhn.fhir.model.api.annotation.ResourceDef; 047import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 048/** 049 * A record of a request for a diagnostic investigation service to be performed. 050 */ 051@ResourceDef(name="DiagnosticOrder", profile="http://hl7.org/fhir/Profile/DiagnosticOrder") 052public class DiagnosticOrder extends DomainResource { 053 054 public enum DiagnosticOrderStatus { 055 /** 056 * The request has been proposed. 057 */ 058 PROPOSED, 059 /** 060 * The request is in preliminary form prior to being sent. 061 */ 062 DRAFT, 063 /** 064 * The request has been planned. 065 */ 066 PLANNED, 067 /** 068 * The request has been placed. 069 */ 070 REQUESTED, 071 /** 072 * The receiving system has received the order, but not yet decided whether it will be performed. 073 */ 074 RECEIVED, 075 /** 076 * The receiving system has accepted the order, but work has not yet commenced. 077 */ 078 ACCEPTED, 079 /** 080 * The work to fulfill the order is happening. 081 */ 082 INPROGRESS, 083 /** 084 * The work is complete, and the outcomes are being reviewed for approval. 085 */ 086 REVIEW, 087 /** 088 * The work has been completed, the report(s) released, and no further work is planned. 089 */ 090 COMPLETED, 091 /** 092 * The request has been withdrawn. 093 */ 094 CANCELLED, 095 /** 096 * The request has been held by originating system/user request. 097 */ 098 SUSPENDED, 099 /** 100 * The receiving system has declined to fulfill the request. 101 */ 102 REJECTED, 103 /** 104 * The diagnostic investigation was attempted, but due to some procedural error, it could not be completed. 105 */ 106 FAILED, 107 /** 108 * The request was entered in error and voided. 109 */ 110 ENTEREDINERROR, 111 /** 112 * added to help the parsers 113 */ 114 NULL; 115 public static DiagnosticOrderStatus fromCode(String codeString) throws FHIRException { 116 if (codeString == null || "".equals(codeString)) 117 return null; 118 if ("proposed".equals(codeString)) 119 return PROPOSED; 120 if ("draft".equals(codeString)) 121 return DRAFT; 122 if ("planned".equals(codeString)) 123 return PLANNED; 124 if ("requested".equals(codeString)) 125 return REQUESTED; 126 if ("received".equals(codeString)) 127 return RECEIVED; 128 if ("accepted".equals(codeString)) 129 return ACCEPTED; 130 if ("in-progress".equals(codeString)) 131 return INPROGRESS; 132 if ("review".equals(codeString)) 133 return REVIEW; 134 if ("completed".equals(codeString)) 135 return COMPLETED; 136 if ("cancelled".equals(codeString)) 137 return CANCELLED; 138 if ("suspended".equals(codeString)) 139 return SUSPENDED; 140 if ("rejected".equals(codeString)) 141 return REJECTED; 142 if ("failed".equals(codeString)) 143 return FAILED; 144 if ("entered-in-error".equals(codeString)) 145 return ENTEREDINERROR; 146 throw new FHIRException("Unknown DiagnosticOrderStatus code '"+codeString+"'"); 147 } 148 public String toCode() { 149 switch (this) { 150 case PROPOSED: return "proposed"; 151 case DRAFT: return "draft"; 152 case PLANNED: return "planned"; 153 case REQUESTED: return "requested"; 154 case RECEIVED: return "received"; 155 case ACCEPTED: return "accepted"; 156 case INPROGRESS: return "in-progress"; 157 case REVIEW: return "review"; 158 case COMPLETED: return "completed"; 159 case CANCELLED: return "cancelled"; 160 case SUSPENDED: return "suspended"; 161 case REJECTED: return "rejected"; 162 case FAILED: return "failed"; 163 case ENTEREDINERROR: return "entered-in-error"; 164 case NULL: return null; 165 default: return "?"; 166 } 167 } 168 public String getSystem() { 169 switch (this) { 170 case PROPOSED: return "http://hl7.org/fhir/diagnostic-order-status"; 171 case DRAFT: return "http://hl7.org/fhir/diagnostic-order-status"; 172 case PLANNED: return "http://hl7.org/fhir/diagnostic-order-status"; 173 case REQUESTED: return "http://hl7.org/fhir/diagnostic-order-status"; 174 case RECEIVED: return "http://hl7.org/fhir/diagnostic-order-status"; 175 case ACCEPTED: return "http://hl7.org/fhir/diagnostic-order-status"; 176 case INPROGRESS: return "http://hl7.org/fhir/diagnostic-order-status"; 177 case REVIEW: return "http://hl7.org/fhir/diagnostic-order-status"; 178 case COMPLETED: return "http://hl7.org/fhir/diagnostic-order-status"; 179 case CANCELLED: return "http://hl7.org/fhir/diagnostic-order-status"; 180 case SUSPENDED: return "http://hl7.org/fhir/diagnostic-order-status"; 181 case REJECTED: return "http://hl7.org/fhir/diagnostic-order-status"; 182 case FAILED: return "http://hl7.org/fhir/diagnostic-order-status"; 183 case ENTEREDINERROR: return "http://hl7.org/fhir/diagnostic-order-status"; 184 case NULL: return null; 185 default: return "?"; 186 } 187 } 188 public String getDefinition() { 189 switch (this) { 190 case PROPOSED: return "The request has been proposed."; 191 case DRAFT: return "The request is in preliminary form prior to being sent."; 192 case PLANNED: return "The request has been planned."; 193 case REQUESTED: return "The request has been placed."; 194 case RECEIVED: return "The receiving system has received the order, but not yet decided whether it will be performed."; 195 case ACCEPTED: return "The receiving system has accepted the order, but work has not yet commenced."; 196 case INPROGRESS: return "The work to fulfill the order is happening."; 197 case REVIEW: return "The work is complete, and the outcomes are being reviewed for approval."; 198 case COMPLETED: return "The work has been completed, the report(s) released, and no further work is planned."; 199 case CANCELLED: return "The request has been withdrawn."; 200 case SUSPENDED: return "The request has been held by originating system/user request."; 201 case REJECTED: return "The receiving system has declined to fulfill the request."; 202 case FAILED: return "The diagnostic investigation was attempted, but due to some procedural error, it could not be completed."; 203 case ENTEREDINERROR: return "The request was entered in error and voided."; 204 case NULL: return null; 205 default: return "?"; 206 } 207 } 208 public String getDisplay() { 209 switch (this) { 210 case PROPOSED: return "Proposed"; 211 case DRAFT: return "Draft"; 212 case PLANNED: return "Planned"; 213 case REQUESTED: return "Requested"; 214 case RECEIVED: return "Received"; 215 case ACCEPTED: return "Accepted"; 216 case INPROGRESS: return "In-Progress"; 217 case REVIEW: return "Review"; 218 case COMPLETED: return "Completed"; 219 case CANCELLED: return "Cancelled"; 220 case SUSPENDED: return "Suspended"; 221 case REJECTED: return "Rejected"; 222 case FAILED: return "Failed"; 223 case ENTEREDINERROR: return "Entered in Error"; 224 case NULL: return null; 225 default: return "?"; 226 } 227 } 228 } 229 230 public static class DiagnosticOrderStatusEnumFactory implements EnumFactory<DiagnosticOrderStatus> { 231 public DiagnosticOrderStatus fromCode(String codeString) throws IllegalArgumentException { 232 if (codeString == null || "".equals(codeString)) 233 if (codeString == null || "".equals(codeString)) 234 return null; 235 if ("proposed".equals(codeString)) 236 return DiagnosticOrderStatus.PROPOSED; 237 if ("draft".equals(codeString)) 238 return DiagnosticOrderStatus.DRAFT; 239 if ("planned".equals(codeString)) 240 return DiagnosticOrderStatus.PLANNED; 241 if ("requested".equals(codeString)) 242 return DiagnosticOrderStatus.REQUESTED; 243 if ("received".equals(codeString)) 244 return DiagnosticOrderStatus.RECEIVED; 245 if ("accepted".equals(codeString)) 246 return DiagnosticOrderStatus.ACCEPTED; 247 if ("in-progress".equals(codeString)) 248 return DiagnosticOrderStatus.INPROGRESS; 249 if ("review".equals(codeString)) 250 return DiagnosticOrderStatus.REVIEW; 251 if ("completed".equals(codeString)) 252 return DiagnosticOrderStatus.COMPLETED; 253 if ("cancelled".equals(codeString)) 254 return DiagnosticOrderStatus.CANCELLED; 255 if ("suspended".equals(codeString)) 256 return DiagnosticOrderStatus.SUSPENDED; 257 if ("rejected".equals(codeString)) 258 return DiagnosticOrderStatus.REJECTED; 259 if ("failed".equals(codeString)) 260 return DiagnosticOrderStatus.FAILED; 261 if ("entered-in-error".equals(codeString)) 262 return DiagnosticOrderStatus.ENTEREDINERROR; 263 throw new IllegalArgumentException("Unknown DiagnosticOrderStatus code '"+codeString+"'"); 264 } 265 public Enumeration<DiagnosticOrderStatus> fromType(Base code) throws FHIRException { 266 if (code == null || code.isEmpty()) 267 return null; 268 String codeString = ((PrimitiveType) code).asStringValue(); 269 if (codeString == null || "".equals(codeString)) 270 return null; 271 if ("proposed".equals(codeString)) 272 return new Enumeration<DiagnosticOrderStatus>(this, DiagnosticOrderStatus.PROPOSED); 273 if ("draft".equals(codeString)) 274 return new Enumeration<DiagnosticOrderStatus>(this, DiagnosticOrderStatus.DRAFT); 275 if ("planned".equals(codeString)) 276 return new Enumeration<DiagnosticOrderStatus>(this, DiagnosticOrderStatus.PLANNED); 277 if ("requested".equals(codeString)) 278 return new Enumeration<DiagnosticOrderStatus>(this, DiagnosticOrderStatus.REQUESTED); 279 if ("received".equals(codeString)) 280 return new Enumeration<DiagnosticOrderStatus>(this, DiagnosticOrderStatus.RECEIVED); 281 if ("accepted".equals(codeString)) 282 return new Enumeration<DiagnosticOrderStatus>(this, DiagnosticOrderStatus.ACCEPTED); 283 if ("in-progress".equals(codeString)) 284 return new Enumeration<DiagnosticOrderStatus>(this, DiagnosticOrderStatus.INPROGRESS); 285 if ("review".equals(codeString)) 286 return new Enumeration<DiagnosticOrderStatus>(this, DiagnosticOrderStatus.REVIEW); 287 if ("completed".equals(codeString)) 288 return new Enumeration<DiagnosticOrderStatus>(this, DiagnosticOrderStatus.COMPLETED); 289 if ("cancelled".equals(codeString)) 290 return new Enumeration<DiagnosticOrderStatus>(this, DiagnosticOrderStatus.CANCELLED); 291 if ("suspended".equals(codeString)) 292 return new Enumeration<DiagnosticOrderStatus>(this, DiagnosticOrderStatus.SUSPENDED); 293 if ("rejected".equals(codeString)) 294 return new Enumeration<DiagnosticOrderStatus>(this, DiagnosticOrderStatus.REJECTED); 295 if ("failed".equals(codeString)) 296 return new Enumeration<DiagnosticOrderStatus>(this, DiagnosticOrderStatus.FAILED); 297 if ("entered-in-error".equals(codeString)) 298 return new Enumeration<DiagnosticOrderStatus>(this, DiagnosticOrderStatus.ENTEREDINERROR); 299 throw new FHIRException("Unknown DiagnosticOrderStatus code '"+codeString+"'"); 300 } 301 public String toCode(DiagnosticOrderStatus code) { 302 if (code == DiagnosticOrderStatus.PROPOSED) 303 return "proposed"; 304 if (code == DiagnosticOrderStatus.DRAFT) 305 return "draft"; 306 if (code == DiagnosticOrderStatus.PLANNED) 307 return "planned"; 308 if (code == DiagnosticOrderStatus.REQUESTED) 309 return "requested"; 310 if (code == DiagnosticOrderStatus.RECEIVED) 311 return "received"; 312 if (code == DiagnosticOrderStatus.ACCEPTED) 313 return "accepted"; 314 if (code == DiagnosticOrderStatus.INPROGRESS) 315 return "in-progress"; 316 if (code == DiagnosticOrderStatus.REVIEW) 317 return "review"; 318 if (code == DiagnosticOrderStatus.COMPLETED) 319 return "completed"; 320 if (code == DiagnosticOrderStatus.CANCELLED) 321 return "cancelled"; 322 if (code == DiagnosticOrderStatus.SUSPENDED) 323 return "suspended"; 324 if (code == DiagnosticOrderStatus.REJECTED) 325 return "rejected"; 326 if (code == DiagnosticOrderStatus.FAILED) 327 return "failed"; 328 if (code == DiagnosticOrderStatus.ENTEREDINERROR) 329 return "entered-in-error"; 330 return "?"; 331 } 332 public String toSystem(DiagnosticOrderStatus code) { 333 return code.getSystem(); 334 } 335 } 336 337 public enum DiagnosticOrderPriority { 338 /** 339 * The order has a normal priority . 340 */ 341 ROUTINE, 342 /** 343 * The order should be urgently. 344 */ 345 URGENT, 346 /** 347 * The order is time-critical. 348 */ 349 STAT, 350 /** 351 * The order should be acted on as soon as possible. 352 */ 353 ASAP, 354 /** 355 * added to help the parsers 356 */ 357 NULL; 358 public static DiagnosticOrderPriority fromCode(String codeString) throws FHIRException { 359 if (codeString == null || "".equals(codeString)) 360 return null; 361 if ("routine".equals(codeString)) 362 return ROUTINE; 363 if ("urgent".equals(codeString)) 364 return URGENT; 365 if ("stat".equals(codeString)) 366 return STAT; 367 if ("asap".equals(codeString)) 368 return ASAP; 369 throw new FHIRException("Unknown DiagnosticOrderPriority code '"+codeString+"'"); 370 } 371 public String toCode() { 372 switch (this) { 373 case ROUTINE: return "routine"; 374 case URGENT: return "urgent"; 375 case STAT: return "stat"; 376 case ASAP: return "asap"; 377 case NULL: return null; 378 default: return "?"; 379 } 380 } 381 public String getSystem() { 382 switch (this) { 383 case ROUTINE: return "http://hl7.org/fhir/diagnostic-order-priority"; 384 case URGENT: return "http://hl7.org/fhir/diagnostic-order-priority"; 385 case STAT: return "http://hl7.org/fhir/diagnostic-order-priority"; 386 case ASAP: return "http://hl7.org/fhir/diagnostic-order-priority"; 387 case NULL: return null; 388 default: return "?"; 389 } 390 } 391 public String getDefinition() { 392 switch (this) { 393 case ROUTINE: return "The order has a normal priority ."; 394 case URGENT: return "The order should be urgently."; 395 case STAT: return "The order is time-critical."; 396 case ASAP: return "The order should be acted on as soon as possible."; 397 case NULL: return null; 398 default: return "?"; 399 } 400 } 401 public String getDisplay() { 402 switch (this) { 403 case ROUTINE: return "Routine"; 404 case URGENT: return "Urgent"; 405 case STAT: return "Stat"; 406 case ASAP: return "ASAP"; 407 case NULL: return null; 408 default: return "?"; 409 } 410 } 411 } 412 413 public static class DiagnosticOrderPriorityEnumFactory implements EnumFactory<DiagnosticOrderPriority> { 414 public DiagnosticOrderPriority fromCode(String codeString) throws IllegalArgumentException { 415 if (codeString == null || "".equals(codeString)) 416 if (codeString == null || "".equals(codeString)) 417 return null; 418 if ("routine".equals(codeString)) 419 return DiagnosticOrderPriority.ROUTINE; 420 if ("urgent".equals(codeString)) 421 return DiagnosticOrderPriority.URGENT; 422 if ("stat".equals(codeString)) 423 return DiagnosticOrderPriority.STAT; 424 if ("asap".equals(codeString)) 425 return DiagnosticOrderPriority.ASAP; 426 throw new IllegalArgumentException("Unknown DiagnosticOrderPriority code '"+codeString+"'"); 427 } 428 public Enumeration<DiagnosticOrderPriority> fromType(Base code) throws FHIRException { 429 if (code == null || code.isEmpty()) 430 return null; 431 String codeString = ((PrimitiveType) code).asStringValue(); 432 if (codeString == null || "".equals(codeString)) 433 return null; 434 if ("routine".equals(codeString)) 435 return new Enumeration<DiagnosticOrderPriority>(this, DiagnosticOrderPriority.ROUTINE); 436 if ("urgent".equals(codeString)) 437 return new Enumeration<DiagnosticOrderPriority>(this, DiagnosticOrderPriority.URGENT); 438 if ("stat".equals(codeString)) 439 return new Enumeration<DiagnosticOrderPriority>(this, DiagnosticOrderPriority.STAT); 440 if ("asap".equals(codeString)) 441 return new Enumeration<DiagnosticOrderPriority>(this, DiagnosticOrderPriority.ASAP); 442 throw new FHIRException("Unknown DiagnosticOrderPriority code '"+codeString+"'"); 443 } 444 public String toCode(DiagnosticOrderPriority code) { 445 if (code == DiagnosticOrderPriority.ROUTINE) 446 return "routine"; 447 if (code == DiagnosticOrderPriority.URGENT) 448 return "urgent"; 449 if (code == DiagnosticOrderPriority.STAT) 450 return "stat"; 451 if (code == DiagnosticOrderPriority.ASAP) 452 return "asap"; 453 return "?"; 454 } 455 public String toSystem(DiagnosticOrderPriority code) { 456 return code.getSystem(); 457 } 458 } 459 460 @Block() 461 public static class DiagnosticOrderEventComponent extends BackboneElement implements IBaseBackboneElement { 462 /** 463 * The status for the event. 464 */ 465 @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 466 @Description(shortDefinition="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error", formalDefinition="The status for the event." ) 467 protected Enumeration<DiagnosticOrderStatus> status; 468 469 /** 470 * Additional information about the event that occurred - e.g. if the status remained unchanged. 471 */ 472 @Child(name = "description", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 473 @Description(shortDefinition="More information about the event and its context", formalDefinition="Additional information about the event that occurred - e.g. if the status remained unchanged." ) 474 protected CodeableConcept description; 475 476 /** 477 * The date/time at which the event occurred. 478 */ 479 @Child(name = "dateTime", type = {DateTimeType.class}, order=3, min=1, max=1, modifier=false, summary=true) 480 @Description(shortDefinition="The date at which the event happened", formalDefinition="The date/time at which the event occurred." ) 481 protected DateTimeType dateTime; 482 483 /** 484 * The person responsible for performing or recording the action. 485 */ 486 @Child(name = "actor", type = {Practitioner.class, Device.class}, order=4, min=0, max=1, modifier=false, summary=false) 487 @Description(shortDefinition="Who recorded or did this", formalDefinition="The person responsible for performing or recording the action." ) 488 protected Reference actor; 489 490 /** 491 * The actual object that is the target of the reference (The person responsible for performing or recording the action.) 492 */ 493 protected Resource actorTarget; 494 495 private static final long serialVersionUID = -370793723L; 496 497 /** 498 * Constructor 499 */ 500 public DiagnosticOrderEventComponent() { 501 super(); 502 } 503 504 /** 505 * Constructor 506 */ 507 public DiagnosticOrderEventComponent(Enumeration<DiagnosticOrderStatus> status, DateTimeType dateTime) { 508 super(); 509 this.status = status; 510 this.dateTime = dateTime; 511 } 512 513 /** 514 * @return {@link #status} (The status for the event.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 515 */ 516 public Enumeration<DiagnosticOrderStatus> getStatusElement() { 517 if (this.status == null) 518 if (Configuration.errorOnAutoCreate()) 519 throw new Error("Attempt to auto-create DiagnosticOrderEventComponent.status"); 520 else if (Configuration.doAutoCreate()) 521 this.status = new Enumeration<DiagnosticOrderStatus>(new DiagnosticOrderStatusEnumFactory()); // bb 522 return this.status; 523 } 524 525 public boolean hasStatusElement() { 526 return this.status != null && !this.status.isEmpty(); 527 } 528 529 public boolean hasStatus() { 530 return this.status != null && !this.status.isEmpty(); 531 } 532 533 /** 534 * @param value {@link #status} (The status for the event.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 535 */ 536 public DiagnosticOrderEventComponent setStatusElement(Enumeration<DiagnosticOrderStatus> value) { 537 this.status = value; 538 return this; 539 } 540 541 /** 542 * @return The status for the event. 543 */ 544 public DiagnosticOrderStatus getStatus() { 545 return this.status == null ? null : this.status.getValue(); 546 } 547 548 /** 549 * @param value The status for the event. 550 */ 551 public DiagnosticOrderEventComponent setStatus(DiagnosticOrderStatus value) { 552 if (this.status == null) 553 this.status = new Enumeration<DiagnosticOrderStatus>(new DiagnosticOrderStatusEnumFactory()); 554 this.status.setValue(value); 555 return this; 556 } 557 558 /** 559 * @return {@link #description} (Additional information about the event that occurred - e.g. if the status remained unchanged.) 560 */ 561 public CodeableConcept getDescription() { 562 if (this.description == null) 563 if (Configuration.errorOnAutoCreate()) 564 throw new Error("Attempt to auto-create DiagnosticOrderEventComponent.description"); 565 else if (Configuration.doAutoCreate()) 566 this.description = new CodeableConcept(); // cc 567 return this.description; 568 } 569 570 public boolean hasDescription() { 571 return this.description != null && !this.description.isEmpty(); 572 } 573 574 /** 575 * @param value {@link #description} (Additional information about the event that occurred - e.g. if the status remained unchanged.) 576 */ 577 public DiagnosticOrderEventComponent setDescription(CodeableConcept value) { 578 this.description = value; 579 return this; 580 } 581 582 /** 583 * @return {@link #dateTime} (The date/time at which the event occurred.). This is the underlying object with id, value and extensions. The accessor "getDateTime" gives direct access to the value 584 */ 585 public DateTimeType getDateTimeElement() { 586 if (this.dateTime == null) 587 if (Configuration.errorOnAutoCreate()) 588 throw new Error("Attempt to auto-create DiagnosticOrderEventComponent.dateTime"); 589 else if (Configuration.doAutoCreate()) 590 this.dateTime = new DateTimeType(); // bb 591 return this.dateTime; 592 } 593 594 public boolean hasDateTimeElement() { 595 return this.dateTime != null && !this.dateTime.isEmpty(); 596 } 597 598 public boolean hasDateTime() { 599 return this.dateTime != null && !this.dateTime.isEmpty(); 600 } 601 602 /** 603 * @param value {@link #dateTime} (The date/time at which the event occurred.). This is the underlying object with id, value and extensions. The accessor "getDateTime" gives direct access to the value 604 */ 605 public DiagnosticOrderEventComponent setDateTimeElement(DateTimeType value) { 606 this.dateTime = value; 607 return this; 608 } 609 610 /** 611 * @return The date/time at which the event occurred. 612 */ 613 public Date getDateTime() { 614 return this.dateTime == null ? null : this.dateTime.getValue(); 615 } 616 617 /** 618 * @param value The date/time at which the event occurred. 619 */ 620 public DiagnosticOrderEventComponent setDateTime(Date value) { 621 if (this.dateTime == null) 622 this.dateTime = new DateTimeType(); 623 this.dateTime.setValue(value); 624 return this; 625 } 626 627 /** 628 * @return {@link #actor} (The person responsible for performing or recording the action.) 629 */ 630 public Reference getActor() { 631 if (this.actor == null) 632 if (Configuration.errorOnAutoCreate()) 633 throw new Error("Attempt to auto-create DiagnosticOrderEventComponent.actor"); 634 else if (Configuration.doAutoCreate()) 635 this.actor = new Reference(); // cc 636 return this.actor; 637 } 638 639 public boolean hasActor() { 640 return this.actor != null && !this.actor.isEmpty(); 641 } 642 643 /** 644 * @param value {@link #actor} (The person responsible for performing or recording the action.) 645 */ 646 public DiagnosticOrderEventComponent setActor(Reference value) { 647 this.actor = value; 648 return this; 649 } 650 651 /** 652 * @return {@link #actor} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person responsible for performing or recording the action.) 653 */ 654 public Resource getActorTarget() { 655 return this.actorTarget; 656 } 657 658 /** 659 * @param value {@link #actor} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person responsible for performing or recording the action.) 660 */ 661 public DiagnosticOrderEventComponent setActorTarget(Resource value) { 662 this.actorTarget = value; 663 return this; 664 } 665 666 protected void listChildren(List<Property> childrenList) { 667 super.listChildren(childrenList); 668 childrenList.add(new Property("status", "code", "The status for the event.", 0, java.lang.Integer.MAX_VALUE, status)); 669 childrenList.add(new Property("description", "CodeableConcept", "Additional information about the event that occurred - e.g. if the status remained unchanged.", 0, java.lang.Integer.MAX_VALUE, description)); 670 childrenList.add(new Property("dateTime", "dateTime", "The date/time at which the event occurred.", 0, java.lang.Integer.MAX_VALUE, dateTime)); 671 childrenList.add(new Property("actor", "Reference(Practitioner|Device)", "The person responsible for performing or recording the action.", 0, java.lang.Integer.MAX_VALUE, actor)); 672 } 673 674 @Override 675 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 676 switch (hash) { 677 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<DiagnosticOrderStatus> 678 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // CodeableConcept 679 case 1792749467: /*dateTime*/ return this.dateTime == null ? new Base[0] : new Base[] {this.dateTime}; // DateTimeType 680 case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference 681 default: return super.getProperty(hash, name, checkValid); 682 } 683 684 } 685 686 @Override 687 public void setProperty(int hash, String name, Base value) throws FHIRException { 688 switch (hash) { 689 case -892481550: // status 690 this.status = new DiagnosticOrderStatusEnumFactory().fromType(value); // Enumeration<DiagnosticOrderStatus> 691 break; 692 case -1724546052: // description 693 this.description = castToCodeableConcept(value); // CodeableConcept 694 break; 695 case 1792749467: // dateTime 696 this.dateTime = castToDateTime(value); // DateTimeType 697 break; 698 case 92645877: // actor 699 this.actor = castToReference(value); // Reference 700 break; 701 default: super.setProperty(hash, name, value); 702 } 703 704 } 705 706 @Override 707 public void setProperty(String name, Base value) throws FHIRException { 708 if (name.equals("status")) 709 this.status = new DiagnosticOrderStatusEnumFactory().fromType(value); // Enumeration<DiagnosticOrderStatus> 710 else if (name.equals("description")) 711 this.description = castToCodeableConcept(value); // CodeableConcept 712 else if (name.equals("dateTime")) 713 this.dateTime = castToDateTime(value); // DateTimeType 714 else if (name.equals("actor")) 715 this.actor = castToReference(value); // Reference 716 else 717 super.setProperty(name, value); 718 } 719 720 @Override 721 public Base makeProperty(int hash, String name) throws FHIRException { 722 switch (hash) { 723 case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<DiagnosticOrderStatus> 724 case -1724546052: return getDescription(); // CodeableConcept 725 case 1792749467: throw new FHIRException("Cannot make property dateTime as it is not a complex type"); // DateTimeType 726 case 92645877: return getActor(); // Reference 727 default: return super.makeProperty(hash, name); 728 } 729 730 } 731 732 @Override 733 public Base addChild(String name) throws FHIRException { 734 if (name.equals("status")) { 735 throw new FHIRException("Cannot call addChild on a primitive type DiagnosticOrder.status"); 736 } 737 else if (name.equals("description")) { 738 this.description = new CodeableConcept(); 739 return this.description; 740 } 741 else if (name.equals("dateTime")) { 742 throw new FHIRException("Cannot call addChild on a primitive type DiagnosticOrder.dateTime"); 743 } 744 else if (name.equals("actor")) { 745 this.actor = new Reference(); 746 return this.actor; 747 } 748 else 749 return super.addChild(name); 750 } 751 752 public DiagnosticOrderEventComponent copy() { 753 DiagnosticOrderEventComponent dst = new DiagnosticOrderEventComponent(); 754 copyValues(dst); 755 dst.status = status == null ? null : status.copy(); 756 dst.description = description == null ? null : description.copy(); 757 dst.dateTime = dateTime == null ? null : dateTime.copy(); 758 dst.actor = actor == null ? null : actor.copy(); 759 return dst; 760 } 761 762 @Override 763 public boolean equalsDeep(Base other) { 764 if (!super.equalsDeep(other)) 765 return false; 766 if (!(other instanceof DiagnosticOrderEventComponent)) 767 return false; 768 DiagnosticOrderEventComponent o = (DiagnosticOrderEventComponent) other; 769 return compareDeep(status, o.status, true) && compareDeep(description, o.description, true) && compareDeep(dateTime, o.dateTime, true) 770 && compareDeep(actor, o.actor, true); 771 } 772 773 @Override 774 public boolean equalsShallow(Base other) { 775 if (!super.equalsShallow(other)) 776 return false; 777 if (!(other instanceof DiagnosticOrderEventComponent)) 778 return false; 779 DiagnosticOrderEventComponent o = (DiagnosticOrderEventComponent) other; 780 return compareValues(status, o.status, true) && compareValues(dateTime, o.dateTime, true); 781 } 782 783 public boolean isEmpty() { 784 return super.isEmpty() && (status == null || status.isEmpty()) && (description == null || description.isEmpty()) 785 && (dateTime == null || dateTime.isEmpty()) && (actor == null || actor.isEmpty()); 786 } 787 788 public String fhirType() { 789 return "DiagnosticOrder.event"; 790 791 } 792 793 } 794 795 @Block() 796 public static class DiagnosticOrderItemComponent extends BackboneElement implements IBaseBackboneElement { 797 /** 798 * A code that identifies a particular diagnostic investigation, or panel of investigations, that have been requested. 799 */ 800 @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) 801 @Description(shortDefinition="Code to indicate the item (test or panel) being ordered", formalDefinition="A code that identifies a particular diagnostic investigation, or panel of investigations, that have been requested." ) 802 protected CodeableConcept code; 803 804 /** 805 * If the item is related to a specific specimen. 806 */ 807 @Child(name = "specimen", type = {Specimen.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 808 @Description(shortDefinition="If this item relates to specific specimens", formalDefinition="If the item is related to a specific specimen." ) 809 protected List<Reference> specimen; 810 /** 811 * The actual objects that are the target of the reference (If the item is related to a specific specimen.) 812 */ 813 protected List<Specimen> specimenTarget; 814 815 816 /** 817 * Anatomical location where the request test should be performed. This is the target site. 818 */ 819 @Child(name = "bodySite", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 820 @Description(shortDefinition="Location of requested test (if applicable)", formalDefinition="Anatomical location where the request test should be performed. This is the target site." ) 821 protected CodeableConcept bodySite; 822 823 /** 824 * The status of this individual item within the order. 825 */ 826 @Child(name = "status", type = {CodeType.class}, order=4, min=0, max=1, modifier=false, summary=true) 827 @Description(shortDefinition="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error", formalDefinition="The status of this individual item within the order." ) 828 protected Enumeration<DiagnosticOrderStatus> status; 829 830 /** 831 * A summary of the events of interest that have occurred as this item of the request is processed. 832 */ 833 @Child(name = "event", type = {DiagnosticOrderEventComponent.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 834 @Description(shortDefinition="Events specific to this item", formalDefinition="A summary of the events of interest that have occurred as this item of the request is processed." ) 835 protected List<DiagnosticOrderEventComponent> event; 836 837 private static final long serialVersionUID = 381238192L; 838 839 /** 840 * Constructor 841 */ 842 public DiagnosticOrderItemComponent() { 843 super(); 844 } 845 846 /** 847 * Constructor 848 */ 849 public DiagnosticOrderItemComponent(CodeableConcept code) { 850 super(); 851 this.code = code; 852 } 853 854 /** 855 * @return {@link #code} (A code that identifies a particular diagnostic investigation, or panel of investigations, that have been requested.) 856 */ 857 public CodeableConcept getCode() { 858 if (this.code == null) 859 if (Configuration.errorOnAutoCreate()) 860 throw new Error("Attempt to auto-create DiagnosticOrderItemComponent.code"); 861 else if (Configuration.doAutoCreate()) 862 this.code = new CodeableConcept(); // cc 863 return this.code; 864 } 865 866 public boolean hasCode() { 867 return this.code != null && !this.code.isEmpty(); 868 } 869 870 /** 871 * @param value {@link #code} (A code that identifies a particular diagnostic investigation, or panel of investigations, that have been requested.) 872 */ 873 public DiagnosticOrderItemComponent setCode(CodeableConcept value) { 874 this.code = value; 875 return this; 876 } 877 878 /** 879 * @return {@link #specimen} (If the item is related to a specific specimen.) 880 */ 881 public List<Reference> getSpecimen() { 882 if (this.specimen == null) 883 this.specimen = new ArrayList<Reference>(); 884 return this.specimen; 885 } 886 887 public boolean hasSpecimen() { 888 if (this.specimen == null) 889 return false; 890 for (Reference item : this.specimen) 891 if (!item.isEmpty()) 892 return true; 893 return false; 894 } 895 896 /** 897 * @return {@link #specimen} (If the item is related to a specific specimen.) 898 */ 899 // syntactic sugar 900 public Reference addSpecimen() { //3 901 Reference t = new Reference(); 902 if (this.specimen == null) 903 this.specimen = new ArrayList<Reference>(); 904 this.specimen.add(t); 905 return t; 906 } 907 908 // syntactic sugar 909 public DiagnosticOrderItemComponent addSpecimen(Reference t) { //3 910 if (t == null) 911 return this; 912 if (this.specimen == null) 913 this.specimen = new ArrayList<Reference>(); 914 this.specimen.add(t); 915 return this; 916 } 917 918 /** 919 * @return {@link #specimen} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. If the item is related to a specific specimen.) 920 */ 921 public List<Specimen> getSpecimenTarget() { 922 if (this.specimenTarget == null) 923 this.specimenTarget = new ArrayList<Specimen>(); 924 return this.specimenTarget; 925 } 926 927 // syntactic sugar 928 /** 929 * @return {@link #specimen} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. If the item is related to a specific specimen.) 930 */ 931 public Specimen addSpecimenTarget() { 932 Specimen r = new Specimen(); 933 if (this.specimenTarget == null) 934 this.specimenTarget = new ArrayList<Specimen>(); 935 this.specimenTarget.add(r); 936 return r; 937 } 938 939 /** 940 * @return {@link #bodySite} (Anatomical location where the request test should be performed. This is the target site.) 941 */ 942 public CodeableConcept getBodySite() { 943 if (this.bodySite == null) 944 if (Configuration.errorOnAutoCreate()) 945 throw new Error("Attempt to auto-create DiagnosticOrderItemComponent.bodySite"); 946 else if (Configuration.doAutoCreate()) 947 this.bodySite = new CodeableConcept(); // cc 948 return this.bodySite; 949 } 950 951 public boolean hasBodySite() { 952 return this.bodySite != null && !this.bodySite.isEmpty(); 953 } 954 955 /** 956 * @param value {@link #bodySite} (Anatomical location where the request test should be performed. This is the target site.) 957 */ 958 public DiagnosticOrderItemComponent setBodySite(CodeableConcept value) { 959 this.bodySite = value; 960 return this; 961 } 962 963 /** 964 * @return {@link #status} (The status of this individual item within the order.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 965 */ 966 public Enumeration<DiagnosticOrderStatus> getStatusElement() { 967 if (this.status == null) 968 if (Configuration.errorOnAutoCreate()) 969 throw new Error("Attempt to auto-create DiagnosticOrderItemComponent.status"); 970 else if (Configuration.doAutoCreate()) 971 this.status = new Enumeration<DiagnosticOrderStatus>(new DiagnosticOrderStatusEnumFactory()); // bb 972 return this.status; 973 } 974 975 public boolean hasStatusElement() { 976 return this.status != null && !this.status.isEmpty(); 977 } 978 979 public boolean hasStatus() { 980 return this.status != null && !this.status.isEmpty(); 981 } 982 983 /** 984 * @param value {@link #status} (The status of this individual item within the order.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 985 */ 986 public DiagnosticOrderItemComponent setStatusElement(Enumeration<DiagnosticOrderStatus> value) { 987 this.status = value; 988 return this; 989 } 990 991 /** 992 * @return The status of this individual item within the order. 993 */ 994 public DiagnosticOrderStatus getStatus() { 995 return this.status == null ? null : this.status.getValue(); 996 } 997 998 /** 999 * @param value The status of this individual item within the order. 1000 */ 1001 public DiagnosticOrderItemComponent setStatus(DiagnosticOrderStatus value) { 1002 if (value == null) 1003 this.status = null; 1004 else { 1005 if (this.status == null) 1006 this.status = new Enumeration<DiagnosticOrderStatus>(new DiagnosticOrderStatusEnumFactory()); 1007 this.status.setValue(value); 1008 } 1009 return this; 1010 } 1011 1012 /** 1013 * @return {@link #event} (A summary of the events of interest that have occurred as this item of the request is processed.) 1014 */ 1015 public List<DiagnosticOrderEventComponent> getEvent() { 1016 if (this.event == null) 1017 this.event = new ArrayList<DiagnosticOrderEventComponent>(); 1018 return this.event; 1019 } 1020 1021 public boolean hasEvent() { 1022 if (this.event == null) 1023 return false; 1024 for (DiagnosticOrderEventComponent item : this.event) 1025 if (!item.isEmpty()) 1026 return true; 1027 return false; 1028 } 1029 1030 /** 1031 * @return {@link #event} (A summary of the events of interest that have occurred as this item of the request is processed.) 1032 */ 1033 // syntactic sugar 1034 public DiagnosticOrderEventComponent addEvent() { //3 1035 DiagnosticOrderEventComponent t = new DiagnosticOrderEventComponent(); 1036 if (this.event == null) 1037 this.event = new ArrayList<DiagnosticOrderEventComponent>(); 1038 this.event.add(t); 1039 return t; 1040 } 1041 1042 // syntactic sugar 1043 public DiagnosticOrderItemComponent addEvent(DiagnosticOrderEventComponent t) { //3 1044 if (t == null) 1045 return this; 1046 if (this.event == null) 1047 this.event = new ArrayList<DiagnosticOrderEventComponent>(); 1048 this.event.add(t); 1049 return this; 1050 } 1051 1052 protected void listChildren(List<Property> childrenList) { 1053 super.listChildren(childrenList); 1054 childrenList.add(new Property("code", "CodeableConcept", "A code that identifies a particular diagnostic investigation, or panel of investigations, that have been requested.", 0, java.lang.Integer.MAX_VALUE, code)); 1055 childrenList.add(new Property("specimen", "Reference(Specimen)", "If the item is related to a specific specimen.", 0, java.lang.Integer.MAX_VALUE, specimen)); 1056 childrenList.add(new Property("bodySite", "CodeableConcept", "Anatomical location where the request test should be performed. This is the target site.", 0, java.lang.Integer.MAX_VALUE, bodySite)); 1057 childrenList.add(new Property("status", "code", "The status of this individual item within the order.", 0, java.lang.Integer.MAX_VALUE, status)); 1058 childrenList.add(new Property("event", "@DiagnosticOrder.event", "A summary of the events of interest that have occurred as this item of the request is processed.", 0, java.lang.Integer.MAX_VALUE, event)); 1059 } 1060 1061 @Override 1062 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1063 switch (hash) { 1064 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 1065 case -2132868344: /*specimen*/ return this.specimen == null ? new Base[0] : this.specimen.toArray(new Base[this.specimen.size()]); // Reference 1066 case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : new Base[] {this.bodySite}; // CodeableConcept 1067 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<DiagnosticOrderStatus> 1068 case 96891546: /*event*/ return this.event == null ? new Base[0] : this.event.toArray(new Base[this.event.size()]); // DiagnosticOrderEventComponent 1069 default: return super.getProperty(hash, name, checkValid); 1070 } 1071 1072 } 1073 1074 @Override 1075 public void setProperty(int hash, String name, Base value) throws FHIRException { 1076 switch (hash) { 1077 case 3059181: // code 1078 this.code = castToCodeableConcept(value); // CodeableConcept 1079 break; 1080 case -2132868344: // specimen 1081 this.getSpecimen().add(castToReference(value)); // Reference 1082 break; 1083 case 1702620169: // bodySite 1084 this.bodySite = castToCodeableConcept(value); // CodeableConcept 1085 break; 1086 case -892481550: // status 1087 this.status = new DiagnosticOrderStatusEnumFactory().fromType(value); // Enumeration<DiagnosticOrderStatus> 1088 break; 1089 case 96891546: // event 1090 this.getEvent().add((DiagnosticOrderEventComponent) value); // DiagnosticOrderEventComponent 1091 break; 1092 default: super.setProperty(hash, name, value); 1093 } 1094 1095 } 1096 1097 @Override 1098 public void setProperty(String name, Base value) throws FHIRException { 1099 if (name.equals("code")) 1100 this.code = castToCodeableConcept(value); // CodeableConcept 1101 else if (name.equals("specimen")) 1102 this.getSpecimen().add(castToReference(value)); 1103 else if (name.equals("bodySite")) 1104 this.bodySite = castToCodeableConcept(value); // CodeableConcept 1105 else if (name.equals("status")) 1106 this.status = new DiagnosticOrderStatusEnumFactory().fromType(value); // Enumeration<DiagnosticOrderStatus> 1107 else if (name.equals("event")) 1108 this.getEvent().add((DiagnosticOrderEventComponent) value); 1109 else 1110 super.setProperty(name, value); 1111 } 1112 1113 @Override 1114 public Base makeProperty(int hash, String name) throws FHIRException { 1115 switch (hash) { 1116 case 3059181: return getCode(); // CodeableConcept 1117 case -2132868344: return addSpecimen(); // Reference 1118 case 1702620169: return getBodySite(); // CodeableConcept 1119 case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<DiagnosticOrderStatus> 1120 case 96891546: return addEvent(); // DiagnosticOrderEventComponent 1121 default: return super.makeProperty(hash, name); 1122 } 1123 1124 } 1125 1126 @Override 1127 public Base addChild(String name) throws FHIRException { 1128 if (name.equals("code")) { 1129 this.code = new CodeableConcept(); 1130 return this.code; 1131 } 1132 else if (name.equals("specimen")) { 1133 return addSpecimen(); 1134 } 1135 else if (name.equals("bodySite")) { 1136 this.bodySite = new CodeableConcept(); 1137 return this.bodySite; 1138 } 1139 else if (name.equals("status")) { 1140 throw new FHIRException("Cannot call addChild on a primitive type DiagnosticOrder.status"); 1141 } 1142 else if (name.equals("event")) { 1143 return addEvent(); 1144 } 1145 else 1146 return super.addChild(name); 1147 } 1148 1149 public DiagnosticOrderItemComponent copy() { 1150 DiagnosticOrderItemComponent dst = new DiagnosticOrderItemComponent(); 1151 copyValues(dst); 1152 dst.code = code == null ? null : code.copy(); 1153 if (specimen != null) { 1154 dst.specimen = new ArrayList<Reference>(); 1155 for (Reference i : specimen) 1156 dst.specimen.add(i.copy()); 1157 }; 1158 dst.bodySite = bodySite == null ? null : bodySite.copy(); 1159 dst.status = status == null ? null : status.copy(); 1160 if (event != null) { 1161 dst.event = new ArrayList<DiagnosticOrderEventComponent>(); 1162 for (DiagnosticOrderEventComponent i : event) 1163 dst.event.add(i.copy()); 1164 }; 1165 return dst; 1166 } 1167 1168 @Override 1169 public boolean equalsDeep(Base other) { 1170 if (!super.equalsDeep(other)) 1171 return false; 1172 if (!(other instanceof DiagnosticOrderItemComponent)) 1173 return false; 1174 DiagnosticOrderItemComponent o = (DiagnosticOrderItemComponent) other; 1175 return compareDeep(code, o.code, true) && compareDeep(specimen, o.specimen, true) && compareDeep(bodySite, o.bodySite, true) 1176 && compareDeep(status, o.status, true) && compareDeep(event, o.event, true); 1177 } 1178 1179 @Override 1180 public boolean equalsShallow(Base other) { 1181 if (!super.equalsShallow(other)) 1182 return false; 1183 if (!(other instanceof DiagnosticOrderItemComponent)) 1184 return false; 1185 DiagnosticOrderItemComponent o = (DiagnosticOrderItemComponent) other; 1186 return compareValues(status, o.status, true); 1187 } 1188 1189 public boolean isEmpty() { 1190 return super.isEmpty() && (code == null || code.isEmpty()) && (specimen == null || specimen.isEmpty()) 1191 && (bodySite == null || bodySite.isEmpty()) && (status == null || status.isEmpty()) && (event == null || event.isEmpty()) 1192 ; 1193 } 1194 1195 public String fhirType() { 1196 return "DiagnosticOrder.item"; 1197 1198 } 1199 1200 } 1201 1202 /** 1203 * Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller. 1204 */ 1205 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1206 @Description(shortDefinition="Identifiers assigned to this order", formalDefinition="Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller." ) 1207 protected List<Identifier> identifier; 1208 1209 /** 1210 * The status of the order. 1211 */ 1212 @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) 1213 @Description(shortDefinition="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error", formalDefinition="The status of the order." ) 1214 protected Enumeration<DiagnosticOrderStatus> status; 1215 1216 /** 1217 * The clinical priority associated with this order. 1218 */ 1219 @Child(name = "priority", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true) 1220 @Description(shortDefinition="routine | urgent | stat | asap", formalDefinition="The clinical priority associated with this order." ) 1221 protected Enumeration<DiagnosticOrderPriority> priority; 1222 1223 /** 1224 * On whom or what the investigation is to be performed. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans). 1225 */ 1226 @Child(name = "subject", type = {Patient.class, Group.class, Location.class, Device.class}, order=3, min=1, max=1, modifier=false, summary=true) 1227 @Description(shortDefinition="Who and/or what test is about", formalDefinition="On whom or what the investigation is to be performed. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans)." ) 1228 protected Reference subject; 1229 1230 /** 1231 * The actual object that is the target of the reference (On whom or what the investigation is to be performed. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).) 1232 */ 1233 protected Resource subjectTarget; 1234 1235 /** 1236 * An encounter that provides additional information about the healthcare context in which this request is made. 1237 */ 1238 @Child(name = "encounter", type = {Encounter.class}, order=4, min=0, max=1, modifier=false, summary=true) 1239 @Description(shortDefinition="The encounter that this diagnostic order is associated with", formalDefinition="An encounter that provides additional information about the healthcare context in which this request is made." ) 1240 protected Reference encounter; 1241 1242 /** 1243 * The actual object that is the target of the reference (An encounter that provides additional information about the healthcare context in which this request is made.) 1244 */ 1245 protected Encounter encounterTarget; 1246 1247 /** 1248 * The practitioner that holds legal responsibility for ordering the investigation. 1249 */ 1250 @Child(name = "orderer", type = {Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=true) 1251 @Description(shortDefinition="Who ordered the test", formalDefinition="The practitioner that holds legal responsibility for ordering the investigation." ) 1252 protected Reference orderer; 1253 1254 /** 1255 * The actual object that is the target of the reference (The practitioner that holds legal responsibility for ordering the investigation.) 1256 */ 1257 protected Practitioner ordererTarget; 1258 1259 /** 1260 * An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation. 1261 */ 1262 @Child(name = "reason", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1263 @Description(shortDefinition="Explanation/Justification for test", formalDefinition="An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation." ) 1264 protected List<CodeableConcept> reason; 1265 1266 /** 1267 * Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order. 1268 */ 1269 @Child(name = "supportingInformation", type = {Observation.class, Condition.class, DocumentReference.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1270 @Description(shortDefinition="Additional clinical information", formalDefinition="Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order." ) 1271 protected List<Reference> supportingInformation; 1272 /** 1273 * The actual objects that are the target of the reference (Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.) 1274 */ 1275 protected List<Resource> supportingInformationTarget; 1276 1277 1278 /** 1279 * One or more specimens that the diagnostic investigation is about. 1280 */ 1281 @Child(name = "specimen", type = {Specimen.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1282 @Description(shortDefinition="If the whole order relates to specific specimens", formalDefinition="One or more specimens that the diagnostic investigation is about." ) 1283 protected List<Reference> specimen; 1284 /** 1285 * The actual objects that are the target of the reference (One or more specimens that the diagnostic investigation is about.) 1286 */ 1287 protected List<Specimen> specimenTarget; 1288 1289 1290 /** 1291 * A summary of the events of interest that have occurred as the request is processed; e.g. when the order was made, various processing steps (specimens received), when it was completed. 1292 */ 1293 @Child(name = "event", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1294 @Description(shortDefinition="A list of events of interest in the lifecycle", formalDefinition="A summary of the events of interest that have occurred as the request is processed; e.g. when the order was made, various processing steps (specimens received), when it was completed." ) 1295 protected List<DiagnosticOrderEventComponent> event; 1296 1297 /** 1298 * The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested. 1299 */ 1300 @Child(name = "item", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1301 @Description(shortDefinition="The items the orderer requested", formalDefinition="The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested." ) 1302 protected List<DiagnosticOrderItemComponent> item; 1303 1304 /** 1305 * Any other notes associated with this patient, specimen or order (e.g. "patient hates needles"). 1306 */ 1307 @Child(name = "note", type = {Annotation.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1308 @Description(shortDefinition="Other notes and comments", formalDefinition="Any other notes associated with this patient, specimen or order (e.g. \"patient hates needles\")." ) 1309 protected List<Annotation> note; 1310 1311 private static final long serialVersionUID = 1170289657L; 1312 1313 /** 1314 * Constructor 1315 */ 1316 public DiagnosticOrder() { 1317 super(); 1318 } 1319 1320 /** 1321 * Constructor 1322 */ 1323 public DiagnosticOrder(Reference subject) { 1324 super(); 1325 this.subject = subject; 1326 } 1327 1328 /** 1329 * @return {@link #identifier} (Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.) 1330 */ 1331 public List<Identifier> getIdentifier() { 1332 if (this.identifier == null) 1333 this.identifier = new ArrayList<Identifier>(); 1334 return this.identifier; 1335 } 1336 1337 public boolean hasIdentifier() { 1338 if (this.identifier == null) 1339 return false; 1340 for (Identifier item : this.identifier) 1341 if (!item.isEmpty()) 1342 return true; 1343 return false; 1344 } 1345 1346 /** 1347 * @return {@link #identifier} (Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.) 1348 */ 1349 // syntactic sugar 1350 public Identifier addIdentifier() { //3 1351 Identifier t = new Identifier(); 1352 if (this.identifier == null) 1353 this.identifier = new ArrayList<Identifier>(); 1354 this.identifier.add(t); 1355 return t; 1356 } 1357 1358 // syntactic sugar 1359 public DiagnosticOrder addIdentifier(Identifier t) { //3 1360 if (t == null) 1361 return this; 1362 if (this.identifier == null) 1363 this.identifier = new ArrayList<Identifier>(); 1364 this.identifier.add(t); 1365 return this; 1366 } 1367 1368 /** 1369 * @return {@link #status} (The status of the order.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1370 */ 1371 public Enumeration<DiagnosticOrderStatus> getStatusElement() { 1372 if (this.status == null) 1373 if (Configuration.errorOnAutoCreate()) 1374 throw new Error("Attempt to auto-create DiagnosticOrder.status"); 1375 else if (Configuration.doAutoCreate()) 1376 this.status = new Enumeration<DiagnosticOrderStatus>(new DiagnosticOrderStatusEnumFactory()); // bb 1377 return this.status; 1378 } 1379 1380 public boolean hasStatusElement() { 1381 return this.status != null && !this.status.isEmpty(); 1382 } 1383 1384 public boolean hasStatus() { 1385 return this.status != null && !this.status.isEmpty(); 1386 } 1387 1388 /** 1389 * @param value {@link #status} (The status of the order.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1390 */ 1391 public DiagnosticOrder setStatusElement(Enumeration<DiagnosticOrderStatus> value) { 1392 this.status = value; 1393 return this; 1394 } 1395 1396 /** 1397 * @return The status of the order. 1398 */ 1399 public DiagnosticOrderStatus getStatus() { 1400 return this.status == null ? null : this.status.getValue(); 1401 } 1402 1403 /** 1404 * @param value The status of the order. 1405 */ 1406 public DiagnosticOrder setStatus(DiagnosticOrderStatus value) { 1407 if (value == null) 1408 this.status = null; 1409 else { 1410 if (this.status == null) 1411 this.status = new Enumeration<DiagnosticOrderStatus>(new DiagnosticOrderStatusEnumFactory()); 1412 this.status.setValue(value); 1413 } 1414 return this; 1415 } 1416 1417 /** 1418 * @return {@link #priority} (The clinical priority associated with this order.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value 1419 */ 1420 public Enumeration<DiagnosticOrderPriority> getPriorityElement() { 1421 if (this.priority == null) 1422 if (Configuration.errorOnAutoCreate()) 1423 throw new Error("Attempt to auto-create DiagnosticOrder.priority"); 1424 else if (Configuration.doAutoCreate()) 1425 this.priority = new Enumeration<DiagnosticOrderPriority>(new DiagnosticOrderPriorityEnumFactory()); // bb 1426 return this.priority; 1427 } 1428 1429 public boolean hasPriorityElement() { 1430 return this.priority != null && !this.priority.isEmpty(); 1431 } 1432 1433 public boolean hasPriority() { 1434 return this.priority != null && !this.priority.isEmpty(); 1435 } 1436 1437 /** 1438 * @param value {@link #priority} (The clinical priority associated with this order.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value 1439 */ 1440 public DiagnosticOrder setPriorityElement(Enumeration<DiagnosticOrderPriority> value) { 1441 this.priority = value; 1442 return this; 1443 } 1444 1445 /** 1446 * @return The clinical priority associated with this order. 1447 */ 1448 public DiagnosticOrderPriority getPriority() { 1449 return this.priority == null ? null : this.priority.getValue(); 1450 } 1451 1452 /** 1453 * @param value The clinical priority associated with this order. 1454 */ 1455 public DiagnosticOrder setPriority(DiagnosticOrderPriority value) { 1456 if (value == null) 1457 this.priority = null; 1458 else { 1459 if (this.priority == null) 1460 this.priority = new Enumeration<DiagnosticOrderPriority>(new DiagnosticOrderPriorityEnumFactory()); 1461 this.priority.setValue(value); 1462 } 1463 return this; 1464 } 1465 1466 /** 1467 * @return {@link #subject} (On whom or what the investigation is to be performed. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).) 1468 */ 1469 public Reference getSubject() { 1470 if (this.subject == null) 1471 if (Configuration.errorOnAutoCreate()) 1472 throw new Error("Attempt to auto-create DiagnosticOrder.subject"); 1473 else if (Configuration.doAutoCreate()) 1474 this.subject = new Reference(); // cc 1475 return this.subject; 1476 } 1477 1478 public boolean hasSubject() { 1479 return this.subject != null && !this.subject.isEmpty(); 1480 } 1481 1482 /** 1483 * @param value {@link #subject} (On whom or what the investigation is to be performed. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).) 1484 */ 1485 public DiagnosticOrder setSubject(Reference value) { 1486 this.subject = value; 1487 return this; 1488 } 1489 1490 /** 1491 * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (On whom or what the investigation is to be performed. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).) 1492 */ 1493 public Resource getSubjectTarget() { 1494 return this.subjectTarget; 1495 } 1496 1497 /** 1498 * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (On whom or what the investigation is to be performed. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).) 1499 */ 1500 public DiagnosticOrder setSubjectTarget(Resource value) { 1501 this.subjectTarget = value; 1502 return this; 1503 } 1504 1505 /** 1506 * @return {@link #encounter} (An encounter that provides additional information about the healthcare context in which this request is made.) 1507 */ 1508 public Reference getEncounter() { 1509 if (this.encounter == null) 1510 if (Configuration.errorOnAutoCreate()) 1511 throw new Error("Attempt to auto-create DiagnosticOrder.encounter"); 1512 else if (Configuration.doAutoCreate()) 1513 this.encounter = new Reference(); // cc 1514 return this.encounter; 1515 } 1516 1517 public boolean hasEncounter() { 1518 return this.encounter != null && !this.encounter.isEmpty(); 1519 } 1520 1521 /** 1522 * @param value {@link #encounter} (An encounter that provides additional information about the healthcare context in which this request is made.) 1523 */ 1524 public DiagnosticOrder setEncounter(Reference value) { 1525 this.encounter = value; 1526 return this; 1527 } 1528 1529 /** 1530 * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (An encounter that provides additional information about the healthcare context in which this request is made.) 1531 */ 1532 public Encounter getEncounterTarget() { 1533 if (this.encounterTarget == null) 1534 if (Configuration.errorOnAutoCreate()) 1535 throw new Error("Attempt to auto-create DiagnosticOrder.encounter"); 1536 else if (Configuration.doAutoCreate()) 1537 this.encounterTarget = new Encounter(); // aa 1538 return this.encounterTarget; 1539 } 1540 1541 /** 1542 * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (An encounter that provides additional information about the healthcare context in which this request is made.) 1543 */ 1544 public DiagnosticOrder setEncounterTarget(Encounter value) { 1545 this.encounterTarget = value; 1546 return this; 1547 } 1548 1549 /** 1550 * @return {@link #orderer} (The practitioner that holds legal responsibility for ordering the investigation.) 1551 */ 1552 public Reference getOrderer() { 1553 if (this.orderer == null) 1554 if (Configuration.errorOnAutoCreate()) 1555 throw new Error("Attempt to auto-create DiagnosticOrder.orderer"); 1556 else if (Configuration.doAutoCreate()) 1557 this.orderer = new Reference(); // cc 1558 return this.orderer; 1559 } 1560 1561 public boolean hasOrderer() { 1562 return this.orderer != null && !this.orderer.isEmpty(); 1563 } 1564 1565 /** 1566 * @param value {@link #orderer} (The practitioner that holds legal responsibility for ordering the investigation.) 1567 */ 1568 public DiagnosticOrder setOrderer(Reference value) { 1569 this.orderer = value; 1570 return this; 1571 } 1572 1573 /** 1574 * @return {@link #orderer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner that holds legal responsibility for ordering the investigation.) 1575 */ 1576 public Practitioner getOrdererTarget() { 1577 if (this.ordererTarget == null) 1578 if (Configuration.errorOnAutoCreate()) 1579 throw new Error("Attempt to auto-create DiagnosticOrder.orderer"); 1580 else if (Configuration.doAutoCreate()) 1581 this.ordererTarget = new Practitioner(); // aa 1582 return this.ordererTarget; 1583 } 1584 1585 /** 1586 * @param value {@link #orderer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner that holds legal responsibility for ordering the investigation.) 1587 */ 1588 public DiagnosticOrder setOrdererTarget(Practitioner value) { 1589 this.ordererTarget = value; 1590 return this; 1591 } 1592 1593 /** 1594 * @return {@link #reason} (An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation.) 1595 */ 1596 public List<CodeableConcept> getReason() { 1597 if (this.reason == null) 1598 this.reason = new ArrayList<CodeableConcept>(); 1599 return this.reason; 1600 } 1601 1602 public boolean hasReason() { 1603 if (this.reason == null) 1604 return false; 1605 for (CodeableConcept item : this.reason) 1606 if (!item.isEmpty()) 1607 return true; 1608 return false; 1609 } 1610 1611 /** 1612 * @return {@link #reason} (An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation.) 1613 */ 1614 // syntactic sugar 1615 public CodeableConcept addReason() { //3 1616 CodeableConcept t = new CodeableConcept(); 1617 if (this.reason == null) 1618 this.reason = new ArrayList<CodeableConcept>(); 1619 this.reason.add(t); 1620 return t; 1621 } 1622 1623 // syntactic sugar 1624 public DiagnosticOrder addReason(CodeableConcept t) { //3 1625 if (t == null) 1626 return this; 1627 if (this.reason == null) 1628 this.reason = new ArrayList<CodeableConcept>(); 1629 this.reason.add(t); 1630 return this; 1631 } 1632 1633 /** 1634 * @return {@link #supportingInformation} (Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.) 1635 */ 1636 public List<Reference> getSupportingInformation() { 1637 if (this.supportingInformation == null) 1638 this.supportingInformation = new ArrayList<Reference>(); 1639 return this.supportingInformation; 1640 } 1641 1642 public boolean hasSupportingInformation() { 1643 if (this.supportingInformation == null) 1644 return false; 1645 for (Reference item : this.supportingInformation) 1646 if (!item.isEmpty()) 1647 return true; 1648 return false; 1649 } 1650 1651 /** 1652 * @return {@link #supportingInformation} (Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.) 1653 */ 1654 // syntactic sugar 1655 public Reference addSupportingInformation() { //3 1656 Reference t = new Reference(); 1657 if (this.supportingInformation == null) 1658 this.supportingInformation = new ArrayList<Reference>(); 1659 this.supportingInformation.add(t); 1660 return t; 1661 } 1662 1663 // syntactic sugar 1664 public DiagnosticOrder addSupportingInformation(Reference t) { //3 1665 if (t == null) 1666 return this; 1667 if (this.supportingInformation == null) 1668 this.supportingInformation = new ArrayList<Reference>(); 1669 this.supportingInformation.add(t); 1670 return this; 1671 } 1672 1673 /** 1674 * @return {@link #supportingInformation} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.) 1675 */ 1676 public List<Resource> getSupportingInformationTarget() { 1677 if (this.supportingInformationTarget == null) 1678 this.supportingInformationTarget = new ArrayList<Resource>(); 1679 return this.supportingInformationTarget; 1680 } 1681 1682 /** 1683 * @return {@link #specimen} (One or more specimens that the diagnostic investigation is about.) 1684 */ 1685 public List<Reference> getSpecimen() { 1686 if (this.specimen == null) 1687 this.specimen = new ArrayList<Reference>(); 1688 return this.specimen; 1689 } 1690 1691 public boolean hasSpecimen() { 1692 if (this.specimen == null) 1693 return false; 1694 for (Reference item : this.specimen) 1695 if (!item.isEmpty()) 1696 return true; 1697 return false; 1698 } 1699 1700 /** 1701 * @return {@link #specimen} (One or more specimens that the diagnostic investigation is about.) 1702 */ 1703 // syntactic sugar 1704 public Reference addSpecimen() { //3 1705 Reference t = new Reference(); 1706 if (this.specimen == null) 1707 this.specimen = new ArrayList<Reference>(); 1708 this.specimen.add(t); 1709 return t; 1710 } 1711 1712 // syntactic sugar 1713 public DiagnosticOrder addSpecimen(Reference t) { //3 1714 if (t == null) 1715 return this; 1716 if (this.specimen == null) 1717 this.specimen = new ArrayList<Reference>(); 1718 this.specimen.add(t); 1719 return this; 1720 } 1721 1722 /** 1723 * @return {@link #specimen} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. One or more specimens that the diagnostic investigation is about.) 1724 */ 1725 public List<Specimen> getSpecimenTarget() { 1726 if (this.specimenTarget == null) 1727 this.specimenTarget = new ArrayList<Specimen>(); 1728 return this.specimenTarget; 1729 } 1730 1731 // syntactic sugar 1732 /** 1733 * @return {@link #specimen} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. One or more specimens that the diagnostic investigation is about.) 1734 */ 1735 public Specimen addSpecimenTarget() { 1736 Specimen r = new Specimen(); 1737 if (this.specimenTarget == null) 1738 this.specimenTarget = new ArrayList<Specimen>(); 1739 this.specimenTarget.add(r); 1740 return r; 1741 } 1742 1743 /** 1744 * @return {@link #event} (A summary of the events of interest that have occurred as the request is processed; e.g. when the order was made, various processing steps (specimens received), when it was completed.) 1745 */ 1746 public List<DiagnosticOrderEventComponent> getEvent() { 1747 if (this.event == null) 1748 this.event = new ArrayList<DiagnosticOrderEventComponent>(); 1749 return this.event; 1750 } 1751 1752 public boolean hasEvent() { 1753 if (this.event == null) 1754 return false; 1755 for (DiagnosticOrderEventComponent item : this.event) 1756 if (!item.isEmpty()) 1757 return true; 1758 return false; 1759 } 1760 1761 /** 1762 * @return {@link #event} (A summary of the events of interest that have occurred as the request is processed; e.g. when the order was made, various processing steps (specimens received), when it was completed.) 1763 */ 1764 // syntactic sugar 1765 public DiagnosticOrderEventComponent addEvent() { //3 1766 DiagnosticOrderEventComponent t = new DiagnosticOrderEventComponent(); 1767 if (this.event == null) 1768 this.event = new ArrayList<DiagnosticOrderEventComponent>(); 1769 this.event.add(t); 1770 return t; 1771 } 1772 1773 // syntactic sugar 1774 public DiagnosticOrder addEvent(DiagnosticOrderEventComponent t) { //3 1775 if (t == null) 1776 return this; 1777 if (this.event == null) 1778 this.event = new ArrayList<DiagnosticOrderEventComponent>(); 1779 this.event.add(t); 1780 return this; 1781 } 1782 1783 /** 1784 * @return {@link #item} (The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested.) 1785 */ 1786 public List<DiagnosticOrderItemComponent> getItem() { 1787 if (this.item == null) 1788 this.item = new ArrayList<DiagnosticOrderItemComponent>(); 1789 return this.item; 1790 } 1791 1792 public boolean hasItem() { 1793 if (this.item == null) 1794 return false; 1795 for (DiagnosticOrderItemComponent item : this.item) 1796 if (!item.isEmpty()) 1797 return true; 1798 return false; 1799 } 1800 1801 /** 1802 * @return {@link #item} (The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested.) 1803 */ 1804 // syntactic sugar 1805 public DiagnosticOrderItemComponent addItem() { //3 1806 DiagnosticOrderItemComponent t = new DiagnosticOrderItemComponent(); 1807 if (this.item == null) 1808 this.item = new ArrayList<DiagnosticOrderItemComponent>(); 1809 this.item.add(t); 1810 return t; 1811 } 1812 1813 // syntactic sugar 1814 public DiagnosticOrder addItem(DiagnosticOrderItemComponent t) { //3 1815 if (t == null) 1816 return this; 1817 if (this.item == null) 1818 this.item = new ArrayList<DiagnosticOrderItemComponent>(); 1819 this.item.add(t); 1820 return this; 1821 } 1822 1823 /** 1824 * @return {@link #note} (Any other notes associated with this patient, specimen or order (e.g. "patient hates needles").) 1825 */ 1826 public List<Annotation> getNote() { 1827 if (this.note == null) 1828 this.note = new ArrayList<Annotation>(); 1829 return this.note; 1830 } 1831 1832 public boolean hasNote() { 1833 if (this.note == null) 1834 return false; 1835 for (Annotation item : this.note) 1836 if (!item.isEmpty()) 1837 return true; 1838 return false; 1839 } 1840 1841 /** 1842 * @return {@link #note} (Any other notes associated with this patient, specimen or order (e.g. "patient hates needles").) 1843 */ 1844 // syntactic sugar 1845 public Annotation addNote() { //3 1846 Annotation t = new Annotation(); 1847 if (this.note == null) 1848 this.note = new ArrayList<Annotation>(); 1849 this.note.add(t); 1850 return t; 1851 } 1852 1853 // syntactic sugar 1854 public DiagnosticOrder addNote(Annotation t) { //3 1855 if (t == null) 1856 return this; 1857 if (this.note == null) 1858 this.note = new ArrayList<Annotation>(); 1859 this.note.add(t); 1860 return this; 1861 } 1862 1863 protected void listChildren(List<Property> childrenList) { 1864 super.listChildren(childrenList); 1865 childrenList.add(new Property("identifier", "Identifier", "Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1866 childrenList.add(new Property("status", "code", "The status of the order.", 0, java.lang.Integer.MAX_VALUE, status)); 1867 childrenList.add(new Property("priority", "code", "The clinical priority associated with this order.", 0, java.lang.Integer.MAX_VALUE, priority)); 1868 childrenList.add(new Property("subject", "Reference(Patient|Group|Location|Device)", "On whom or what the investigation is to be performed. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).", 0, java.lang.Integer.MAX_VALUE, subject)); 1869 childrenList.add(new Property("encounter", "Reference(Encounter)", "An encounter that provides additional information about the healthcare context in which this request is made.", 0, java.lang.Integer.MAX_VALUE, encounter)); 1870 childrenList.add(new Property("orderer", "Reference(Practitioner)", "The practitioner that holds legal responsibility for ordering the investigation.", 0, java.lang.Integer.MAX_VALUE, orderer)); 1871 childrenList.add(new Property("reason", "CodeableConcept", "An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation.", 0, java.lang.Integer.MAX_VALUE, reason)); 1872 childrenList.add(new Property("supportingInformation", "Reference(Observation|Condition|DocumentReference)", "Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.", 0, java.lang.Integer.MAX_VALUE, supportingInformation)); 1873 childrenList.add(new Property("specimen", "Reference(Specimen)", "One or more specimens that the diagnostic investigation is about.", 0, java.lang.Integer.MAX_VALUE, specimen)); 1874 childrenList.add(new Property("event", "", "A summary of the events of interest that have occurred as the request is processed; e.g. when the order was made, various processing steps (specimens received), when it was completed.", 0, java.lang.Integer.MAX_VALUE, event)); 1875 childrenList.add(new Property("item", "", "The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested.", 0, java.lang.Integer.MAX_VALUE, item)); 1876 childrenList.add(new Property("note", "Annotation", "Any other notes associated with this patient, specimen or order (e.g. \"patient hates needles\").", 0, java.lang.Integer.MAX_VALUE, note)); 1877 } 1878 1879 @Override 1880 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1881 switch (hash) { 1882 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1883 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<DiagnosticOrderStatus> 1884 case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration<DiagnosticOrderPriority> 1885 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 1886 case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference 1887 case -1207109509: /*orderer*/ return this.orderer == null ? new Base[0] : new Base[] {this.orderer}; // Reference 1888 case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableConcept 1889 case -1248768647: /*supportingInformation*/ return this.supportingInformation == null ? new Base[0] : this.supportingInformation.toArray(new Base[this.supportingInformation.size()]); // Reference 1890 case -2132868344: /*specimen*/ return this.specimen == null ? new Base[0] : this.specimen.toArray(new Base[this.specimen.size()]); // Reference 1891 case 96891546: /*event*/ return this.event == null ? new Base[0] : this.event.toArray(new Base[this.event.size()]); // DiagnosticOrderEventComponent 1892 case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // DiagnosticOrderItemComponent 1893 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 1894 default: return super.getProperty(hash, name, checkValid); 1895 } 1896 1897 } 1898 1899 @Override 1900 public void setProperty(int hash, String name, Base value) throws FHIRException { 1901 switch (hash) { 1902 case -1618432855: // identifier 1903 this.getIdentifier().add(castToIdentifier(value)); // Identifier 1904 break; 1905 case -892481550: // status 1906 this.status = new DiagnosticOrderStatusEnumFactory().fromType(value); // Enumeration<DiagnosticOrderStatus> 1907 break; 1908 case -1165461084: // priority 1909 this.priority = new DiagnosticOrderPriorityEnumFactory().fromType(value); // Enumeration<DiagnosticOrderPriority> 1910 break; 1911 case -1867885268: // subject 1912 this.subject = castToReference(value); // Reference 1913 break; 1914 case 1524132147: // encounter 1915 this.encounter = castToReference(value); // Reference 1916 break; 1917 case -1207109509: // orderer 1918 this.orderer = castToReference(value); // Reference 1919 break; 1920 case -934964668: // reason 1921 this.getReason().add(castToCodeableConcept(value)); // CodeableConcept 1922 break; 1923 case -1248768647: // supportingInformation 1924 this.getSupportingInformation().add(castToReference(value)); // Reference 1925 break; 1926 case -2132868344: // specimen 1927 this.getSpecimen().add(castToReference(value)); // Reference 1928 break; 1929 case 96891546: // event 1930 this.getEvent().add((DiagnosticOrderEventComponent) value); // DiagnosticOrderEventComponent 1931 break; 1932 case 3242771: // item 1933 this.getItem().add((DiagnosticOrderItemComponent) value); // DiagnosticOrderItemComponent 1934 break; 1935 case 3387378: // note 1936 this.getNote().add(castToAnnotation(value)); // Annotation 1937 break; 1938 default: super.setProperty(hash, name, value); 1939 } 1940 1941 } 1942 1943 @Override 1944 public void setProperty(String name, Base value) throws FHIRException { 1945 if (name.equals("identifier")) 1946 this.getIdentifier().add(castToIdentifier(value)); 1947 else if (name.equals("status")) 1948 this.status = new DiagnosticOrderStatusEnumFactory().fromType(value); // Enumeration<DiagnosticOrderStatus> 1949 else if (name.equals("priority")) 1950 this.priority = new DiagnosticOrderPriorityEnumFactory().fromType(value); // Enumeration<DiagnosticOrderPriority> 1951 else if (name.equals("subject")) 1952 this.subject = castToReference(value); // Reference 1953 else if (name.equals("encounter")) 1954 this.encounter = castToReference(value); // Reference 1955 else if (name.equals("orderer")) 1956 this.orderer = castToReference(value); // Reference 1957 else if (name.equals("reason")) 1958 this.getReason().add(castToCodeableConcept(value)); 1959 else if (name.equals("supportingInformation")) 1960 this.getSupportingInformation().add(castToReference(value)); 1961 else if (name.equals("specimen")) 1962 this.getSpecimen().add(castToReference(value)); 1963 else if (name.equals("event")) 1964 this.getEvent().add((DiagnosticOrderEventComponent) value); 1965 else if (name.equals("item")) 1966 this.getItem().add((DiagnosticOrderItemComponent) value); 1967 else if (name.equals("note")) 1968 this.getNote().add(castToAnnotation(value)); 1969 else 1970 super.setProperty(name, value); 1971 } 1972 1973 @Override 1974 public Base makeProperty(int hash, String name) throws FHIRException { 1975 switch (hash) { 1976 case -1618432855: return addIdentifier(); // Identifier 1977 case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<DiagnosticOrderStatus> 1978 case -1165461084: throw new FHIRException("Cannot make property priority as it is not a complex type"); // Enumeration<DiagnosticOrderPriority> 1979 case -1867885268: return getSubject(); // Reference 1980 case 1524132147: return getEncounter(); // Reference 1981 case -1207109509: return getOrderer(); // Reference 1982 case -934964668: return addReason(); // CodeableConcept 1983 case -1248768647: return addSupportingInformation(); // Reference 1984 case -2132868344: return addSpecimen(); // Reference 1985 case 96891546: return addEvent(); // DiagnosticOrderEventComponent 1986 case 3242771: return addItem(); // DiagnosticOrderItemComponent 1987 case 3387378: return addNote(); // Annotation 1988 default: return super.makeProperty(hash, name); 1989 } 1990 1991 } 1992 1993 @Override 1994 public Base addChild(String name) throws FHIRException { 1995 if (name.equals("identifier")) { 1996 return addIdentifier(); 1997 } 1998 else if (name.equals("status")) { 1999 throw new FHIRException("Cannot call addChild on a primitive type DiagnosticOrder.status"); 2000 } 2001 else if (name.equals("priority")) { 2002 throw new FHIRException("Cannot call addChild on a primitive type DiagnosticOrder.priority"); 2003 } 2004 else if (name.equals("subject")) { 2005 this.subject = new Reference(); 2006 return this.subject; 2007 } 2008 else if (name.equals("encounter")) { 2009 this.encounter = new Reference(); 2010 return this.encounter; 2011 } 2012 else if (name.equals("orderer")) { 2013 this.orderer = new Reference(); 2014 return this.orderer; 2015 } 2016 else if (name.equals("reason")) { 2017 return addReason(); 2018 } 2019 else if (name.equals("supportingInformation")) { 2020 return addSupportingInformation(); 2021 } 2022 else if (name.equals("specimen")) { 2023 return addSpecimen(); 2024 } 2025 else if (name.equals("event")) { 2026 return addEvent(); 2027 } 2028 else if (name.equals("item")) { 2029 return addItem(); 2030 } 2031 else if (name.equals("note")) { 2032 return addNote(); 2033 } 2034 else 2035 return super.addChild(name); 2036 } 2037 2038 public String fhirType() { 2039 return "DiagnosticOrder"; 2040 2041 } 2042 2043 public DiagnosticOrder copy() { 2044 DiagnosticOrder dst = new DiagnosticOrder(); 2045 copyValues(dst); 2046 if (identifier != null) { 2047 dst.identifier = new ArrayList<Identifier>(); 2048 for (Identifier i : identifier) 2049 dst.identifier.add(i.copy()); 2050 }; 2051 dst.status = status == null ? null : status.copy(); 2052 dst.priority = priority == null ? null : priority.copy(); 2053 dst.subject = subject == null ? null : subject.copy(); 2054 dst.encounter = encounter == null ? null : encounter.copy(); 2055 dst.orderer = orderer == null ? null : orderer.copy(); 2056 if (reason != null) { 2057 dst.reason = new ArrayList<CodeableConcept>(); 2058 for (CodeableConcept i : reason) 2059 dst.reason.add(i.copy()); 2060 }; 2061 if (supportingInformation != null) { 2062 dst.supportingInformation = new ArrayList<Reference>(); 2063 for (Reference i : supportingInformation) 2064 dst.supportingInformation.add(i.copy()); 2065 }; 2066 if (specimen != null) { 2067 dst.specimen = new ArrayList<Reference>(); 2068 for (Reference i : specimen) 2069 dst.specimen.add(i.copy()); 2070 }; 2071 if (event != null) { 2072 dst.event = new ArrayList<DiagnosticOrderEventComponent>(); 2073 for (DiagnosticOrderEventComponent i : event) 2074 dst.event.add(i.copy()); 2075 }; 2076 if (item != null) { 2077 dst.item = new ArrayList<DiagnosticOrderItemComponent>(); 2078 for (DiagnosticOrderItemComponent i : item) 2079 dst.item.add(i.copy()); 2080 }; 2081 if (note != null) { 2082 dst.note = new ArrayList<Annotation>(); 2083 for (Annotation i : note) 2084 dst.note.add(i.copy()); 2085 }; 2086 return dst; 2087 } 2088 2089 protected DiagnosticOrder typedCopy() { 2090 return copy(); 2091 } 2092 2093 @Override 2094 public boolean equalsDeep(Base other) { 2095 if (!super.equalsDeep(other)) 2096 return false; 2097 if (!(other instanceof DiagnosticOrder)) 2098 return false; 2099 DiagnosticOrder o = (DiagnosticOrder) other; 2100 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(priority, o.priority, true) 2101 && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true) && compareDeep(orderer, o.orderer, true) 2102 && compareDeep(reason, o.reason, true) && compareDeep(supportingInformation, o.supportingInformation, true) 2103 && compareDeep(specimen, o.specimen, true) && compareDeep(event, o.event, true) && compareDeep(item, o.item, true) 2104 && compareDeep(note, o.note, true); 2105 } 2106 2107 @Override 2108 public boolean equalsShallow(Base other) { 2109 if (!super.equalsShallow(other)) 2110 return false; 2111 if (!(other instanceof DiagnosticOrder)) 2112 return false; 2113 DiagnosticOrder o = (DiagnosticOrder) other; 2114 return compareValues(status, o.status, true) && compareValues(priority, o.priority, true); 2115 } 2116 2117 public boolean isEmpty() { 2118 return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) 2119 && (priority == null || priority.isEmpty()) && (subject == null || subject.isEmpty()) && (encounter == null || encounter.isEmpty()) 2120 && (orderer == null || orderer.isEmpty()) && (reason == null || reason.isEmpty()) && (supportingInformation == null || supportingInformation.isEmpty()) 2121 && (specimen == null || specimen.isEmpty()) && (event == null || event.isEmpty()) && (item == null || item.isEmpty()) 2122 && (note == null || note.isEmpty()); 2123 } 2124 2125 @Override 2126 public ResourceType getResourceType() { 2127 return ResourceType.DiagnosticOrder; 2128 } 2129 2130 /** 2131 * Search parameter: <b>orderer</b> 2132 * <p> 2133 * Description: <b>Who ordered the test</b><br> 2134 * Type: <b>reference</b><br> 2135 * Path: <b>DiagnosticOrder.orderer</b><br> 2136 * </p> 2137 */ 2138 @SearchParamDefinition(name="orderer", path="DiagnosticOrder.orderer", description="Who ordered the test", type="reference" ) 2139 public static final String SP_ORDERER = "orderer"; 2140 /** 2141 * <b>Fluent Client</b> search parameter constant for <b>orderer</b> 2142 * <p> 2143 * Description: <b>Who ordered the test</b><br> 2144 * Type: <b>reference</b><br> 2145 * Path: <b>DiagnosticOrder.orderer</b><br> 2146 * </p> 2147 */ 2148 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORDERER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORDERER); 2149 2150/** 2151 * Constant for fluent queries to be used to add include statements. Specifies 2152 * the path value of "<b>DiagnosticOrder:orderer</b>". 2153 */ 2154 public static final ca.uhn.fhir.model.api.Include INCLUDE_ORDERER = new ca.uhn.fhir.model.api.Include("DiagnosticOrder:orderer").toLocked(); 2155 2156 /** 2157 * Search parameter: <b>status</b> 2158 * <p> 2159 * Description: <b>proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error</b><br> 2160 * Type: <b>token</b><br> 2161 * Path: <b>DiagnosticOrder.status</b><br> 2162 * </p> 2163 */ 2164 @SearchParamDefinition(name="status", path="DiagnosticOrder.status", description="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error", type="token" ) 2165 public static final String SP_STATUS = "status"; 2166 /** 2167 * <b>Fluent Client</b> search parameter constant for <b>status</b> 2168 * <p> 2169 * Description: <b>proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error</b><br> 2170 * Type: <b>token</b><br> 2171 * Path: <b>DiagnosticOrder.status</b><br> 2172 * </p> 2173 */ 2174 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 2175 2176 /** 2177 * Search parameter: <b>subject</b> 2178 * <p> 2179 * Description: <b>Who and/or what test is about</b><br> 2180 * Type: <b>reference</b><br> 2181 * Path: <b>DiagnosticOrder.subject</b><br> 2182 * </p> 2183 */ 2184 @SearchParamDefinition(name="subject", path="DiagnosticOrder.subject", description="Who and/or what test is about", type="reference" ) 2185 public static final String SP_SUBJECT = "subject"; 2186 /** 2187 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 2188 * <p> 2189 * Description: <b>Who and/or what test is about</b><br> 2190 * Type: <b>reference</b><br> 2191 * Path: <b>DiagnosticOrder.subject</b><br> 2192 * </p> 2193 */ 2194 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 2195 2196/** 2197 * Constant for fluent queries to be used to add include statements. Specifies 2198 * the path value of "<b>DiagnosticOrder:subject</b>". 2199 */ 2200 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("DiagnosticOrder:subject").toLocked(); 2201 2202 /** 2203 * Search parameter: <b>item-status</b> 2204 * <p> 2205 * Description: <b>proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error</b><br> 2206 * Type: <b>token</b><br> 2207 * Path: <b>DiagnosticOrder.item.status</b><br> 2208 * </p> 2209 */ 2210 @SearchParamDefinition(name="item-status", path="DiagnosticOrder.item.status", description="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error", type="token" ) 2211 public static final String SP_ITEM_STATUS = "item-status"; 2212 /** 2213 * <b>Fluent Client</b> search parameter constant for <b>item-status</b> 2214 * <p> 2215 * Description: <b>proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error</b><br> 2216 * Type: <b>token</b><br> 2217 * Path: <b>DiagnosticOrder.item.status</b><br> 2218 * </p> 2219 */ 2220 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ITEM_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ITEM_STATUS); 2221 2222 /** 2223 * Search parameter: <b>event-status</b> 2224 * <p> 2225 * Description: <b>proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error</b><br> 2226 * Type: <b>token</b><br> 2227 * Path: <b>DiagnosticOrder.event.status</b><br> 2228 * </p> 2229 */ 2230 @SearchParamDefinition(name="event-status", path="DiagnosticOrder.event.status", description="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error", type="token" ) 2231 public static final String SP_EVENT_STATUS = "event-status"; 2232 /** 2233 * <b>Fluent Client</b> search parameter constant for <b>event-status</b> 2234 * <p> 2235 * Description: <b>proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error</b><br> 2236 * Type: <b>token</b><br> 2237 * Path: <b>DiagnosticOrder.event.status</b><br> 2238 * </p> 2239 */ 2240 public static final ca.uhn.fhir.rest.gclient.TokenClientParam EVENT_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EVENT_STATUS); 2241 2242 /** 2243 * Search parameter: <b>actor</b> 2244 * <p> 2245 * Description: <b>Who recorded or did this</b><br> 2246 * Type: <b>reference</b><br> 2247 * Path: <b>DiagnosticOrder.event.actor, DiagnosticOrder.item.event.actor</b><br> 2248 * </p> 2249 */ 2250 @SearchParamDefinition(name="actor", path="DiagnosticOrder.event.actor | DiagnosticOrder.item.event.actor", description="Who recorded or did this", type="reference" ) 2251 public static final String SP_ACTOR = "actor"; 2252 /** 2253 * <b>Fluent Client</b> search parameter constant for <b>actor</b> 2254 * <p> 2255 * Description: <b>Who recorded or did this</b><br> 2256 * Type: <b>reference</b><br> 2257 * Path: <b>DiagnosticOrder.event.actor, DiagnosticOrder.item.event.actor</b><br> 2258 * </p> 2259 */ 2260 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ACTOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ACTOR); 2261 2262/** 2263 * Constant for fluent queries to be used to add include statements. Specifies 2264 * the path value of "<b>DiagnosticOrder:actor</b>". 2265 */ 2266 public static final ca.uhn.fhir.model.api.Include INCLUDE_ACTOR = new ca.uhn.fhir.model.api.Include("DiagnosticOrder:actor").toLocked(); 2267 2268 /** 2269 * Search parameter: <b>code</b> 2270 * <p> 2271 * Description: <b>Code to indicate the item (test or panel) being ordered</b><br> 2272 * Type: <b>token</b><br> 2273 * Path: <b>DiagnosticOrder.item.code</b><br> 2274 * </p> 2275 */ 2276 @SearchParamDefinition(name="code", path="DiagnosticOrder.item.code", description="Code to indicate the item (test or panel) being ordered", type="token" ) 2277 public static final String SP_CODE = "code"; 2278 /** 2279 * <b>Fluent Client</b> search parameter constant for <b>code</b> 2280 * <p> 2281 * Description: <b>Code to indicate the item (test or panel) being ordered</b><br> 2282 * Type: <b>token</b><br> 2283 * Path: <b>DiagnosticOrder.item.code</b><br> 2284 * </p> 2285 */ 2286 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); 2287 2288 /** 2289 * Search parameter: <b>encounter</b> 2290 * <p> 2291 * Description: <b>The encounter that this diagnostic order is associated with</b><br> 2292 * Type: <b>reference</b><br> 2293 * Path: <b>DiagnosticOrder.encounter</b><br> 2294 * </p> 2295 */ 2296 @SearchParamDefinition(name="encounter", path="DiagnosticOrder.encounter", description="The encounter that this diagnostic order is associated with", type="reference" ) 2297 public static final String SP_ENCOUNTER = "encounter"; 2298 /** 2299 * <b>Fluent Client</b> search parameter constant for <b>encounter</b> 2300 * <p> 2301 * Description: <b>The encounter that this diagnostic order is associated with</b><br> 2302 * Type: <b>reference</b><br> 2303 * Path: <b>DiagnosticOrder.encounter</b><br> 2304 * </p> 2305 */ 2306 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER); 2307 2308/** 2309 * Constant for fluent queries to be used to add include statements. Specifies 2310 * the path value of "<b>DiagnosticOrder:encounter</b>". 2311 */ 2312 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("DiagnosticOrder:encounter").toLocked(); 2313 2314 /** 2315 * Search parameter: <b>item-past-status</b> 2316 * <p> 2317 * Description: <b>proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error</b><br> 2318 * Type: <b>token</b><br> 2319 * Path: <b>DiagnosticOrder.item.event.status</b><br> 2320 * </p> 2321 */ 2322 @SearchParamDefinition(name="item-past-status", path="DiagnosticOrder.item.event.status", description="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error", type="token" ) 2323 public static final String SP_ITEM_PAST_STATUS = "item-past-status"; 2324 /** 2325 * <b>Fluent Client</b> search parameter constant for <b>item-past-status</b> 2326 * <p> 2327 * Description: <b>proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error</b><br> 2328 * Type: <b>token</b><br> 2329 * Path: <b>DiagnosticOrder.item.event.status</b><br> 2330 * </p> 2331 */ 2332 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ITEM_PAST_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ITEM_PAST_STATUS); 2333 2334 /** 2335 * Search parameter: <b>patient</b> 2336 * <p> 2337 * Description: <b>Who and/or what test is about</b><br> 2338 * Type: <b>reference</b><br> 2339 * Path: <b>DiagnosticOrder.subject</b><br> 2340 * </p> 2341 */ 2342 @SearchParamDefinition(name="patient", path="DiagnosticOrder.subject", description="Who and/or what test is about", type="reference" ) 2343 public static final String SP_PATIENT = "patient"; 2344 /** 2345 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 2346 * <p> 2347 * Description: <b>Who and/or what test is about</b><br> 2348 * Type: <b>reference</b><br> 2349 * Path: <b>DiagnosticOrder.subject</b><br> 2350 * </p> 2351 */ 2352 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 2353 2354/** 2355 * Constant for fluent queries to be used to add include statements. Specifies 2356 * the path value of "<b>DiagnosticOrder:patient</b>". 2357 */ 2358 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("DiagnosticOrder:patient").toLocked(); 2359 2360 /** 2361 * Search parameter: <b>bodysite</b> 2362 * <p> 2363 * Description: <b>Location of requested test (if applicable)</b><br> 2364 * Type: <b>token</b><br> 2365 * Path: <b>DiagnosticOrder.item.bodySite</b><br> 2366 * </p> 2367 */ 2368 @SearchParamDefinition(name="bodysite", path="DiagnosticOrder.item.bodySite", description="Location of requested test (if applicable)", type="token" ) 2369 public static final String SP_BODYSITE = "bodysite"; 2370 /** 2371 * <b>Fluent Client</b> search parameter constant for <b>bodysite</b> 2372 * <p> 2373 * Description: <b>Location of requested test (if applicable)</b><br> 2374 * Type: <b>token</b><br> 2375 * Path: <b>DiagnosticOrder.item.bodySite</b><br> 2376 * </p> 2377 */ 2378 public static final ca.uhn.fhir.rest.gclient.TokenClientParam BODYSITE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_BODYSITE); 2379 2380 /** 2381 * Search parameter: <b>item-date</b> 2382 * <p> 2383 * Description: <b>The date at which the event happened</b><br> 2384 * Type: <b>date</b><br> 2385 * Path: <b>DiagnosticOrder.item.event.dateTime</b><br> 2386 * </p> 2387 */ 2388 @SearchParamDefinition(name="item-date", path="DiagnosticOrder.item.event.dateTime", description="The date at which the event happened", type="date" ) 2389 public static final String SP_ITEM_DATE = "item-date"; 2390 /** 2391 * <b>Fluent Client</b> search parameter constant for <b>item-date</b> 2392 * <p> 2393 * Description: <b>The date at which the event happened</b><br> 2394 * Type: <b>date</b><br> 2395 * Path: <b>DiagnosticOrder.item.event.dateTime</b><br> 2396 * </p> 2397 */ 2398 public static final ca.uhn.fhir.rest.gclient.DateClientParam ITEM_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_ITEM_DATE); 2399 2400 /** 2401 * Search parameter: <b>specimen</b> 2402 * <p> 2403 * Description: <b>If the whole order relates to specific specimens</b><br> 2404 * Type: <b>reference</b><br> 2405 * Path: <b>DiagnosticOrder.specimen, DiagnosticOrder.item.specimen</b><br> 2406 * </p> 2407 */ 2408 @SearchParamDefinition(name="specimen", path="DiagnosticOrder.specimen | DiagnosticOrder.item.specimen", description="If the whole order relates to specific specimens", type="reference" ) 2409 public static final String SP_SPECIMEN = "specimen"; 2410 /** 2411 * <b>Fluent Client</b> search parameter constant for <b>specimen</b> 2412 * <p> 2413 * Description: <b>If the whole order relates to specific specimens</b><br> 2414 * Type: <b>reference</b><br> 2415 * Path: <b>DiagnosticOrder.specimen, DiagnosticOrder.item.specimen</b><br> 2416 * </p> 2417 */ 2418 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SPECIMEN = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SPECIMEN); 2419 2420/** 2421 * Constant for fluent queries to be used to add include statements. Specifies 2422 * the path value of "<b>DiagnosticOrder:specimen</b>". 2423 */ 2424 public static final ca.uhn.fhir.model.api.Include INCLUDE_SPECIMEN = new ca.uhn.fhir.model.api.Include("DiagnosticOrder:specimen").toLocked(); 2425 2426 /** 2427 * Search parameter: <b>event-status-date</b> 2428 * <p> 2429 * Description: <b>A combination of past-status and date</b><br> 2430 * Type: <b>composite</b><br> 2431 * Path: <b></b><br> 2432 * </p> 2433 */ 2434 @SearchParamDefinition(name="event-status-date", path="", description="A combination of past-status and date", type="composite", compositeOf={"event-status", "event-date"} ) 2435 public static final String SP_EVENT_STATUS_DATE = "event-status-date"; 2436 /** 2437 * <b>Fluent Client</b> search parameter constant for <b>event-status-date</b> 2438 * <p> 2439 * Description: <b>A combination of past-status and date</b><br> 2440 * Type: <b>composite</b><br> 2441 * Path: <b></b><br> 2442 * </p> 2443 */ 2444 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.DateClientParam> EVENT_STATUS_DATE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.DateClientParam>(SP_EVENT_STATUS_DATE); 2445 2446 /** 2447 * Search parameter: <b>event-date</b> 2448 * <p> 2449 * Description: <b>The date at which the event happened</b><br> 2450 * Type: <b>date</b><br> 2451 * Path: <b>DiagnosticOrder.event.dateTime</b><br> 2452 * </p> 2453 */ 2454 @SearchParamDefinition(name="event-date", path="DiagnosticOrder.event.dateTime", description="The date at which the event happened", type="date" ) 2455 public static final String SP_EVENT_DATE = "event-date"; 2456 /** 2457 * <b>Fluent Client</b> search parameter constant for <b>event-date</b> 2458 * <p> 2459 * Description: <b>The date at which the event happened</b><br> 2460 * Type: <b>date</b><br> 2461 * Path: <b>DiagnosticOrder.event.dateTime</b><br> 2462 * </p> 2463 */ 2464 public static final ca.uhn.fhir.rest.gclient.DateClientParam EVENT_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_EVENT_DATE); 2465 2466 /** 2467 * Search parameter: <b>identifier</b> 2468 * <p> 2469 * Description: <b>Identifiers assigned to this order</b><br> 2470 * Type: <b>token</b><br> 2471 * Path: <b>DiagnosticOrder.identifier</b><br> 2472 * </p> 2473 */ 2474 @SearchParamDefinition(name="identifier", path="DiagnosticOrder.identifier", description="Identifiers assigned to this order", type="token" ) 2475 public static final String SP_IDENTIFIER = "identifier"; 2476 /** 2477 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 2478 * <p> 2479 * Description: <b>Identifiers assigned to this order</b><br> 2480 * Type: <b>token</b><br> 2481 * Path: <b>DiagnosticOrder.identifier</b><br> 2482 * </p> 2483 */ 2484 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 2485 2486 /** 2487 * Search parameter: <b>item-status-date</b> 2488 * <p> 2489 * Description: <b>A combination of item-past-status and item-date</b><br> 2490 * Type: <b>composite</b><br> 2491 * Path: <b></b><br> 2492 * </p> 2493 */ 2494 @SearchParamDefinition(name="item-status-date", path="", description="A combination of item-past-status and item-date", type="composite", compositeOf={"item-past-status", "item-date"} ) 2495 public static final String SP_ITEM_STATUS_DATE = "item-status-date"; 2496 /** 2497 * <b>Fluent Client</b> search parameter constant for <b>item-status-date</b> 2498 * <p> 2499 * Description: <b>A combination of item-past-status and item-date</b><br> 2500 * Type: <b>composite</b><br> 2501 * Path: <b></b><br> 2502 * </p> 2503 */ 2504 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.DateClientParam> ITEM_STATUS_DATE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.DateClientParam>(SP_ITEM_STATUS_DATE); 2505 2506 2507}