001package org.hl7.fhir.dstu3.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.1 033 034import java.util.*; 035 036import org.hl7.fhir.utilities.Utilities; 037import ca.uhn.fhir.model.api.annotation.ResourceDef; 038import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 039import ca.uhn.fhir.model.api.annotation.Child; 040import ca.uhn.fhir.model.api.annotation.ChildOrder; 041import ca.uhn.fhir.model.api.annotation.Description; 042import ca.uhn.fhir.model.api.annotation.Block; 043import org.hl7.fhir.instance.model.api.*; 044import org.hl7.fhir.exceptions.FHIRException; 045import org.hl7.fhir.exceptions.FHIRFormatError; 046/** 047 * A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained. 048 */ 049@ResourceDef(name="Composition", profile="http://hl7.org/fhir/StructureDefinition/Composition") 050public class Composition extends DomainResource { 051 052 public enum CompositionStatus { 053 /** 054 * This is a preliminary composition or document (also known as initial or interim). The content may be incomplete or unverified. 055 */ 056 PRELIMINARY, 057 /** 058 * This version of the composition is complete and verified by an appropriate person and no further work is planned. Any subsequent updates would be on a new version of the composition. 059 */ 060 FINAL, 061 /** 062 * The composition content or the referenced resources have been modified (edited or added to) subsequent to being released as "final" and the composition is complete and verified by an authorized person. 063 */ 064 AMENDED, 065 /** 066 * The composition or document was originally created/issued in error, and this is an amendment that marks that the entire series should not be considered as valid. 067 */ 068 ENTEREDINERROR, 069 /** 070 * added to help the parsers with the generic types 071 */ 072 NULL; 073 public static CompositionStatus fromCode(String codeString) throws FHIRException { 074 if (codeString == null || "".equals(codeString)) 075 return null; 076 if ("preliminary".equals(codeString)) 077 return PRELIMINARY; 078 if ("final".equals(codeString)) 079 return FINAL; 080 if ("amended".equals(codeString)) 081 return AMENDED; 082 if ("entered-in-error".equals(codeString)) 083 return ENTEREDINERROR; 084 if (Configuration.isAcceptInvalidEnums()) 085 return null; 086 else 087 throw new FHIRException("Unknown CompositionStatus code '"+codeString+"'"); 088 } 089 public String toCode() { 090 switch (this) { 091 case PRELIMINARY: return "preliminary"; 092 case FINAL: return "final"; 093 case AMENDED: return "amended"; 094 case ENTEREDINERROR: return "entered-in-error"; 095 default: return "?"; 096 } 097 } 098 public String getSystem() { 099 switch (this) { 100 case PRELIMINARY: return "http://hl7.org/fhir/composition-status"; 101 case FINAL: return "http://hl7.org/fhir/composition-status"; 102 case AMENDED: return "http://hl7.org/fhir/composition-status"; 103 case ENTEREDINERROR: return "http://hl7.org/fhir/composition-status"; 104 default: return "?"; 105 } 106 } 107 public String getDefinition() { 108 switch (this) { 109 case PRELIMINARY: return "This is a preliminary composition or document (also known as initial or interim). The content may be incomplete or unverified."; 110 case FINAL: return "This version of the composition is complete and verified by an appropriate person and no further work is planned. Any subsequent updates would be on a new version of the composition."; 111 case AMENDED: return "The composition content or the referenced resources have been modified (edited or added to) subsequent to being released as \"final\" and the composition is complete and verified by an authorized person."; 112 case ENTEREDINERROR: return "The composition or document was originally created/issued in error, and this is an amendment that marks that the entire series should not be considered as valid."; 113 default: return "?"; 114 } 115 } 116 public String getDisplay() { 117 switch (this) { 118 case PRELIMINARY: return "Preliminary"; 119 case FINAL: return "Final"; 120 case AMENDED: return "Amended"; 121 case ENTEREDINERROR: return "Entered in Error"; 122 default: return "?"; 123 } 124 } 125 } 126 127 public static class CompositionStatusEnumFactory implements EnumFactory<CompositionStatus> { 128 public CompositionStatus fromCode(String codeString) throws IllegalArgumentException { 129 if (codeString == null || "".equals(codeString)) 130 if (codeString == null || "".equals(codeString)) 131 return null; 132 if ("preliminary".equals(codeString)) 133 return CompositionStatus.PRELIMINARY; 134 if ("final".equals(codeString)) 135 return CompositionStatus.FINAL; 136 if ("amended".equals(codeString)) 137 return CompositionStatus.AMENDED; 138 if ("entered-in-error".equals(codeString)) 139 return CompositionStatus.ENTEREDINERROR; 140 throw new IllegalArgumentException("Unknown CompositionStatus code '"+codeString+"'"); 141 } 142 public Enumeration<CompositionStatus> fromType(Base code) throws FHIRException { 143 if (code == null) 144 return null; 145 if (code.isEmpty()) 146 return new Enumeration<CompositionStatus>(this); 147 String codeString = ((PrimitiveType) code).asStringValue(); 148 if (codeString == null || "".equals(codeString)) 149 return null; 150 if ("preliminary".equals(codeString)) 151 return new Enumeration<CompositionStatus>(this, CompositionStatus.PRELIMINARY); 152 if ("final".equals(codeString)) 153 return new Enumeration<CompositionStatus>(this, CompositionStatus.FINAL); 154 if ("amended".equals(codeString)) 155 return new Enumeration<CompositionStatus>(this, CompositionStatus.AMENDED); 156 if ("entered-in-error".equals(codeString)) 157 return new Enumeration<CompositionStatus>(this, CompositionStatus.ENTEREDINERROR); 158 throw new FHIRException("Unknown CompositionStatus code '"+codeString+"'"); 159 } 160 public String toCode(CompositionStatus code) { 161 if (code == CompositionStatus.PRELIMINARY) 162 return "preliminary"; 163 if (code == CompositionStatus.FINAL) 164 return "final"; 165 if (code == CompositionStatus.AMENDED) 166 return "amended"; 167 if (code == CompositionStatus.ENTEREDINERROR) 168 return "entered-in-error"; 169 return "?"; 170 } 171 public String toSystem(CompositionStatus code) { 172 return code.getSystem(); 173 } 174 } 175 176 public enum DocumentConfidentiality { 177 /** 178 * null 179 */ 180 U, 181 /** 182 * null 183 */ 184 L, 185 /** 186 * null 187 */ 188 M, 189 /** 190 * null 191 */ 192 N, 193 /** 194 * null 195 */ 196 R, 197 /** 198 * null 199 */ 200 V, 201 /** 202 * added to help the parsers with the generic types 203 */ 204 NULL; 205 public static DocumentConfidentiality fromCode(String codeString) throws FHIRException { 206 if (codeString == null || "".equals(codeString)) 207 return null; 208 if ("U".equals(codeString)) 209 return U; 210 if ("L".equals(codeString)) 211 return L; 212 if ("M".equals(codeString)) 213 return M; 214 if ("N".equals(codeString)) 215 return N; 216 if ("R".equals(codeString)) 217 return R; 218 if ("V".equals(codeString)) 219 return V; 220 if (Configuration.isAcceptInvalidEnums()) 221 return null; 222 else 223 throw new FHIRException("Unknown DocumentConfidentiality code '"+codeString+"'"); 224 } 225 public String toCode() { 226 switch (this) { 227 case U: return "U"; 228 case L: return "L"; 229 case M: return "M"; 230 case N: return "N"; 231 case R: return "R"; 232 case V: return "V"; 233 default: return "?"; 234 } 235 } 236 public String getSystem() { 237 switch (this) { 238 case U: return "http://hl7.org/fhir/v3/Confidentiality"; 239 case L: return "http://hl7.org/fhir/v3/Confidentiality"; 240 case M: return "http://hl7.org/fhir/v3/Confidentiality"; 241 case N: return "http://hl7.org/fhir/v3/Confidentiality"; 242 case R: return "http://hl7.org/fhir/v3/Confidentiality"; 243 case V: return "http://hl7.org/fhir/v3/Confidentiality"; 244 default: return "?"; 245 } 246 } 247 public String getDefinition() { 248 switch (this) { 249 case U: return ""; 250 case L: return ""; 251 case M: return ""; 252 case N: return ""; 253 case R: return ""; 254 case V: return ""; 255 default: return "?"; 256 } 257 } 258 public String getDisplay() { 259 switch (this) { 260 case U: return "U"; 261 case L: return "L"; 262 case M: return "M"; 263 case N: return "N"; 264 case R: return "R"; 265 case V: return "V"; 266 default: return "?"; 267 } 268 } 269 } 270 271 public static class DocumentConfidentialityEnumFactory implements EnumFactory<DocumentConfidentiality> { 272 public DocumentConfidentiality fromCode(String codeString) throws IllegalArgumentException { 273 if (codeString == null || "".equals(codeString)) 274 if (codeString == null || "".equals(codeString)) 275 return null; 276 if ("U".equals(codeString)) 277 return DocumentConfidentiality.U; 278 if ("L".equals(codeString)) 279 return DocumentConfidentiality.L; 280 if ("M".equals(codeString)) 281 return DocumentConfidentiality.M; 282 if ("N".equals(codeString)) 283 return DocumentConfidentiality.N; 284 if ("R".equals(codeString)) 285 return DocumentConfidentiality.R; 286 if ("V".equals(codeString)) 287 return DocumentConfidentiality.V; 288 throw new IllegalArgumentException("Unknown DocumentConfidentiality code '"+codeString+"'"); 289 } 290 public Enumeration<DocumentConfidentiality> fromType(Base code) throws FHIRException { 291 if (code == null) 292 return null; 293 if (code.isEmpty()) 294 return new Enumeration<DocumentConfidentiality>(this); 295 String codeString = ((PrimitiveType) code).asStringValue(); 296 if (codeString == null || "".equals(codeString)) 297 return null; 298 if ("U".equals(codeString)) 299 return new Enumeration<DocumentConfidentiality>(this, DocumentConfidentiality.U); 300 if ("L".equals(codeString)) 301 return new Enumeration<DocumentConfidentiality>(this, DocumentConfidentiality.L); 302 if ("M".equals(codeString)) 303 return new Enumeration<DocumentConfidentiality>(this, DocumentConfidentiality.M); 304 if ("N".equals(codeString)) 305 return new Enumeration<DocumentConfidentiality>(this, DocumentConfidentiality.N); 306 if ("R".equals(codeString)) 307 return new Enumeration<DocumentConfidentiality>(this, DocumentConfidentiality.R); 308 if ("V".equals(codeString)) 309 return new Enumeration<DocumentConfidentiality>(this, DocumentConfidentiality.V); 310 throw new FHIRException("Unknown DocumentConfidentiality code '"+codeString+"'"); 311 } 312 public String toCode(DocumentConfidentiality code) { 313 if (code == DocumentConfidentiality.U) 314 return "U"; 315 if (code == DocumentConfidentiality.L) 316 return "L"; 317 if (code == DocumentConfidentiality.M) 318 return "M"; 319 if (code == DocumentConfidentiality.N) 320 return "N"; 321 if (code == DocumentConfidentiality.R) 322 return "R"; 323 if (code == DocumentConfidentiality.V) 324 return "V"; 325 return "?"; 326 } 327 public String toSystem(DocumentConfidentiality code) { 328 return code.getSystem(); 329 } 330 } 331 332 public enum CompositionAttestationMode { 333 /** 334 * The person authenticated the content in their personal capacity. 335 */ 336 PERSONAL, 337 /** 338 * The person authenticated the content in their professional capacity. 339 */ 340 PROFESSIONAL, 341 /** 342 * The person authenticated the content and accepted legal responsibility for its content. 343 */ 344 LEGAL, 345 /** 346 * The organization authenticated the content as consistent with their policies and procedures. 347 */ 348 OFFICIAL, 349 /** 350 * added to help the parsers with the generic types 351 */ 352 NULL; 353 public static CompositionAttestationMode fromCode(String codeString) throws FHIRException { 354 if (codeString == null || "".equals(codeString)) 355 return null; 356 if ("personal".equals(codeString)) 357 return PERSONAL; 358 if ("professional".equals(codeString)) 359 return PROFESSIONAL; 360 if ("legal".equals(codeString)) 361 return LEGAL; 362 if ("official".equals(codeString)) 363 return OFFICIAL; 364 if (Configuration.isAcceptInvalidEnums()) 365 return null; 366 else 367 throw new FHIRException("Unknown CompositionAttestationMode code '"+codeString+"'"); 368 } 369 public String toCode() { 370 switch (this) { 371 case PERSONAL: return "personal"; 372 case PROFESSIONAL: return "professional"; 373 case LEGAL: return "legal"; 374 case OFFICIAL: return "official"; 375 default: return "?"; 376 } 377 } 378 public String getSystem() { 379 switch (this) { 380 case PERSONAL: return "http://hl7.org/fhir/composition-attestation-mode"; 381 case PROFESSIONAL: return "http://hl7.org/fhir/composition-attestation-mode"; 382 case LEGAL: return "http://hl7.org/fhir/composition-attestation-mode"; 383 case OFFICIAL: return "http://hl7.org/fhir/composition-attestation-mode"; 384 default: return "?"; 385 } 386 } 387 public String getDefinition() { 388 switch (this) { 389 case PERSONAL: return "The person authenticated the content in their personal capacity."; 390 case PROFESSIONAL: return "The person authenticated the content in their professional capacity."; 391 case LEGAL: return "The person authenticated the content and accepted legal responsibility for its content."; 392 case OFFICIAL: return "The organization authenticated the content as consistent with their policies and procedures."; 393 default: return "?"; 394 } 395 } 396 public String getDisplay() { 397 switch (this) { 398 case PERSONAL: return "Personal"; 399 case PROFESSIONAL: return "Professional"; 400 case LEGAL: return "Legal"; 401 case OFFICIAL: return "Official"; 402 default: return "?"; 403 } 404 } 405 } 406 407 public static class CompositionAttestationModeEnumFactory implements EnumFactory<CompositionAttestationMode> { 408 public CompositionAttestationMode fromCode(String codeString) throws IllegalArgumentException { 409 if (codeString == null || "".equals(codeString)) 410 if (codeString == null || "".equals(codeString)) 411 return null; 412 if ("personal".equals(codeString)) 413 return CompositionAttestationMode.PERSONAL; 414 if ("professional".equals(codeString)) 415 return CompositionAttestationMode.PROFESSIONAL; 416 if ("legal".equals(codeString)) 417 return CompositionAttestationMode.LEGAL; 418 if ("official".equals(codeString)) 419 return CompositionAttestationMode.OFFICIAL; 420 throw new IllegalArgumentException("Unknown CompositionAttestationMode code '"+codeString+"'"); 421 } 422 public Enumeration<CompositionAttestationMode> fromType(Base code) throws FHIRException { 423 if (code == null) 424 return null; 425 if (code.isEmpty()) 426 return new Enumeration<CompositionAttestationMode>(this); 427 String codeString = ((PrimitiveType) code).asStringValue(); 428 if (codeString == null || "".equals(codeString)) 429 return null; 430 if ("personal".equals(codeString)) 431 return new Enumeration<CompositionAttestationMode>(this, CompositionAttestationMode.PERSONAL); 432 if ("professional".equals(codeString)) 433 return new Enumeration<CompositionAttestationMode>(this, CompositionAttestationMode.PROFESSIONAL); 434 if ("legal".equals(codeString)) 435 return new Enumeration<CompositionAttestationMode>(this, CompositionAttestationMode.LEGAL); 436 if ("official".equals(codeString)) 437 return new Enumeration<CompositionAttestationMode>(this, CompositionAttestationMode.OFFICIAL); 438 throw new FHIRException("Unknown CompositionAttestationMode code '"+codeString+"'"); 439 } 440 public String toCode(CompositionAttestationMode code) { 441 if (code == CompositionAttestationMode.PERSONAL) 442 return "personal"; 443 if (code == CompositionAttestationMode.PROFESSIONAL) 444 return "professional"; 445 if (code == CompositionAttestationMode.LEGAL) 446 return "legal"; 447 if (code == CompositionAttestationMode.OFFICIAL) 448 return "official"; 449 return "?"; 450 } 451 public String toSystem(CompositionAttestationMode code) { 452 return code.getSystem(); 453 } 454 } 455 456 public enum DocumentRelationshipType { 457 /** 458 * This document logically replaces or supersedes the target document. 459 */ 460 REPLACES, 461 /** 462 * This document was generated by transforming the target document (e.g. format or language conversion). 463 */ 464 TRANSFORMS, 465 /** 466 * This document is a signature of the target document. 467 */ 468 SIGNS, 469 /** 470 * This document adds additional information to the target document. 471 */ 472 APPENDS, 473 /** 474 * added to help the parsers with the generic types 475 */ 476 NULL; 477 public static DocumentRelationshipType fromCode(String codeString) throws FHIRException { 478 if (codeString == null || "".equals(codeString)) 479 return null; 480 if ("replaces".equals(codeString)) 481 return REPLACES; 482 if ("transforms".equals(codeString)) 483 return TRANSFORMS; 484 if ("signs".equals(codeString)) 485 return SIGNS; 486 if ("appends".equals(codeString)) 487 return APPENDS; 488 if (Configuration.isAcceptInvalidEnums()) 489 return null; 490 else 491 throw new FHIRException("Unknown DocumentRelationshipType code '"+codeString+"'"); 492 } 493 public String toCode() { 494 switch (this) { 495 case REPLACES: return "replaces"; 496 case TRANSFORMS: return "transforms"; 497 case SIGNS: return "signs"; 498 case APPENDS: return "appends"; 499 default: return "?"; 500 } 501 } 502 public String getSystem() { 503 switch (this) { 504 case REPLACES: return "http://hl7.org/fhir/document-relationship-type"; 505 case TRANSFORMS: return "http://hl7.org/fhir/document-relationship-type"; 506 case SIGNS: return "http://hl7.org/fhir/document-relationship-type"; 507 case APPENDS: return "http://hl7.org/fhir/document-relationship-type"; 508 default: return "?"; 509 } 510 } 511 public String getDefinition() { 512 switch (this) { 513 case REPLACES: return "This document logically replaces or supersedes the target document."; 514 case TRANSFORMS: return "This document was generated by transforming the target document (e.g. format or language conversion)."; 515 case SIGNS: return "This document is a signature of the target document."; 516 case APPENDS: return "This document adds additional information to the target document."; 517 default: return "?"; 518 } 519 } 520 public String getDisplay() { 521 switch (this) { 522 case REPLACES: return "Replaces"; 523 case TRANSFORMS: return "Transforms"; 524 case SIGNS: return "Signs"; 525 case APPENDS: return "Appends"; 526 default: return "?"; 527 } 528 } 529 } 530 531 public static class DocumentRelationshipTypeEnumFactory implements EnumFactory<DocumentRelationshipType> { 532 public DocumentRelationshipType fromCode(String codeString) throws IllegalArgumentException { 533 if (codeString == null || "".equals(codeString)) 534 if (codeString == null || "".equals(codeString)) 535 return null; 536 if ("replaces".equals(codeString)) 537 return DocumentRelationshipType.REPLACES; 538 if ("transforms".equals(codeString)) 539 return DocumentRelationshipType.TRANSFORMS; 540 if ("signs".equals(codeString)) 541 return DocumentRelationshipType.SIGNS; 542 if ("appends".equals(codeString)) 543 return DocumentRelationshipType.APPENDS; 544 throw new IllegalArgumentException("Unknown DocumentRelationshipType code '"+codeString+"'"); 545 } 546 public Enumeration<DocumentRelationshipType> fromType(Base code) throws FHIRException { 547 if (code == null) 548 return null; 549 if (code.isEmpty()) 550 return new Enumeration<DocumentRelationshipType>(this); 551 String codeString = ((PrimitiveType) code).asStringValue(); 552 if (codeString == null || "".equals(codeString)) 553 return null; 554 if ("replaces".equals(codeString)) 555 return new Enumeration<DocumentRelationshipType>(this, DocumentRelationshipType.REPLACES); 556 if ("transforms".equals(codeString)) 557 return new Enumeration<DocumentRelationshipType>(this, DocumentRelationshipType.TRANSFORMS); 558 if ("signs".equals(codeString)) 559 return new Enumeration<DocumentRelationshipType>(this, DocumentRelationshipType.SIGNS); 560 if ("appends".equals(codeString)) 561 return new Enumeration<DocumentRelationshipType>(this, DocumentRelationshipType.APPENDS); 562 throw new FHIRException("Unknown DocumentRelationshipType code '"+codeString+"'"); 563 } 564 public String toCode(DocumentRelationshipType code) { 565 if (code == DocumentRelationshipType.REPLACES) 566 return "replaces"; 567 if (code == DocumentRelationshipType.TRANSFORMS) 568 return "transforms"; 569 if (code == DocumentRelationshipType.SIGNS) 570 return "signs"; 571 if (code == DocumentRelationshipType.APPENDS) 572 return "appends"; 573 return "?"; 574 } 575 public String toSystem(DocumentRelationshipType code) { 576 return code.getSystem(); 577 } 578 } 579 580 public enum SectionMode { 581 /** 582 * This list is the master list, maintained in an ongoing fashion with regular updates as the real world list it is tracking changes 583 */ 584 WORKING, 585 /** 586 * This list was prepared as a snapshot. It should not be assumed to be current 587 */ 588 SNAPSHOT, 589 /** 590 * A list that indicates where changes have been made or recommended 591 */ 592 CHANGES, 593 /** 594 * added to help the parsers with the generic types 595 */ 596 NULL; 597 public static SectionMode fromCode(String codeString) throws FHIRException { 598 if (codeString == null || "".equals(codeString)) 599 return null; 600 if ("working".equals(codeString)) 601 return WORKING; 602 if ("snapshot".equals(codeString)) 603 return SNAPSHOT; 604 if ("changes".equals(codeString)) 605 return CHANGES; 606 if (Configuration.isAcceptInvalidEnums()) 607 return null; 608 else 609 throw new FHIRException("Unknown SectionMode code '"+codeString+"'"); 610 } 611 public String toCode() { 612 switch (this) { 613 case WORKING: return "working"; 614 case SNAPSHOT: return "snapshot"; 615 case CHANGES: return "changes"; 616 default: return "?"; 617 } 618 } 619 public String getSystem() { 620 switch (this) { 621 case WORKING: return "http://hl7.org/fhir/list-mode"; 622 case SNAPSHOT: return "http://hl7.org/fhir/list-mode"; 623 case CHANGES: return "http://hl7.org/fhir/list-mode"; 624 default: return "?"; 625 } 626 } 627 public String getDefinition() { 628 switch (this) { 629 case WORKING: return "This list is the master list, maintained in an ongoing fashion with regular updates as the real world list it is tracking changes"; 630 case SNAPSHOT: return "This list was prepared as a snapshot. It should not be assumed to be current"; 631 case CHANGES: return "A list that indicates where changes have been made or recommended"; 632 default: return "?"; 633 } 634 } 635 public String getDisplay() { 636 switch (this) { 637 case WORKING: return "Working List"; 638 case SNAPSHOT: return "Snapshot List"; 639 case CHANGES: return "Change List"; 640 default: return "?"; 641 } 642 } 643 } 644 645 public static class SectionModeEnumFactory implements EnumFactory<SectionMode> { 646 public SectionMode fromCode(String codeString) throws IllegalArgumentException { 647 if (codeString == null || "".equals(codeString)) 648 if (codeString == null || "".equals(codeString)) 649 return null; 650 if ("working".equals(codeString)) 651 return SectionMode.WORKING; 652 if ("snapshot".equals(codeString)) 653 return SectionMode.SNAPSHOT; 654 if ("changes".equals(codeString)) 655 return SectionMode.CHANGES; 656 throw new IllegalArgumentException("Unknown SectionMode code '"+codeString+"'"); 657 } 658 public Enumeration<SectionMode> fromType(Base code) throws FHIRException { 659 if (code == null) 660 return null; 661 if (code.isEmpty()) 662 return new Enumeration<SectionMode>(this); 663 String codeString = ((PrimitiveType) code).asStringValue(); 664 if (codeString == null || "".equals(codeString)) 665 return null; 666 if ("working".equals(codeString)) 667 return new Enumeration<SectionMode>(this, SectionMode.WORKING); 668 if ("snapshot".equals(codeString)) 669 return new Enumeration<SectionMode>(this, SectionMode.SNAPSHOT); 670 if ("changes".equals(codeString)) 671 return new Enumeration<SectionMode>(this, SectionMode.CHANGES); 672 throw new FHIRException("Unknown SectionMode code '"+codeString+"'"); 673 } 674 public String toCode(SectionMode code) { 675 if (code == SectionMode.WORKING) 676 return "working"; 677 if (code == SectionMode.SNAPSHOT) 678 return "snapshot"; 679 if (code == SectionMode.CHANGES) 680 return "changes"; 681 return "?"; 682 } 683 public String toSystem(SectionMode code) { 684 return code.getSystem(); 685 } 686 } 687 688 @Block() 689 public static class CompositionAttesterComponent extends BackboneElement implements IBaseBackboneElement { 690 /** 691 * The type of attestation the authenticator offers. 692 */ 693 @Child(name = "mode", type = {CodeType.class}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 694 @Description(shortDefinition="personal | professional | legal | official", formalDefinition="The type of attestation the authenticator offers." ) 695 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/composition-attestation-mode") 696 protected List<Enumeration<CompositionAttestationMode>> mode; 697 698 /** 699 * When the composition was attested by the party. 700 */ 701 @Child(name = "time", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) 702 @Description(shortDefinition="When the composition was attested", formalDefinition="When the composition was attested by the party." ) 703 protected DateTimeType time; 704 705 /** 706 * Who attested the composition in the specified way. 707 */ 708 @Child(name = "party", type = {Patient.class, Practitioner.class, Organization.class}, order=3, min=0, max=1, modifier=false, summary=true) 709 @Description(shortDefinition="Who attested the composition", formalDefinition="Who attested the composition in the specified way." ) 710 protected Reference party; 711 712 /** 713 * The actual object that is the target of the reference (Who attested the composition in the specified way.) 714 */ 715 protected Resource partyTarget; 716 717 private static final long serialVersionUID = -436604745L; 718 719 /** 720 * Constructor 721 */ 722 public CompositionAttesterComponent() { 723 super(); 724 } 725 726 /** 727 * @return {@link #mode} (The type of attestation the authenticator offers.) 728 */ 729 public List<Enumeration<CompositionAttestationMode>> getMode() { 730 if (this.mode == null) 731 this.mode = new ArrayList<Enumeration<CompositionAttestationMode>>(); 732 return this.mode; 733 } 734 735 /** 736 * @return Returns a reference to <code>this</code> for easy method chaining 737 */ 738 public CompositionAttesterComponent setMode(List<Enumeration<CompositionAttestationMode>> theMode) { 739 this.mode = theMode; 740 return this; 741 } 742 743 public boolean hasMode() { 744 if (this.mode == null) 745 return false; 746 for (Enumeration<CompositionAttestationMode> item : this.mode) 747 if (!item.isEmpty()) 748 return true; 749 return false; 750 } 751 752 /** 753 * @return {@link #mode} (The type of attestation the authenticator offers.) 754 */ 755 public Enumeration<CompositionAttestationMode> addModeElement() {//2 756 Enumeration<CompositionAttestationMode> t = new Enumeration<CompositionAttestationMode>(new CompositionAttestationModeEnumFactory()); 757 if (this.mode == null) 758 this.mode = new ArrayList<Enumeration<CompositionAttestationMode>>(); 759 this.mode.add(t); 760 return t; 761 } 762 763 /** 764 * @param value {@link #mode} (The type of attestation the authenticator offers.) 765 */ 766 public CompositionAttesterComponent addMode(CompositionAttestationMode value) { //1 767 Enumeration<CompositionAttestationMode> t = new Enumeration<CompositionAttestationMode>(new CompositionAttestationModeEnumFactory()); 768 t.setValue(value); 769 if (this.mode == null) 770 this.mode = new ArrayList<Enumeration<CompositionAttestationMode>>(); 771 this.mode.add(t); 772 return this; 773 } 774 775 /** 776 * @param value {@link #mode} (The type of attestation the authenticator offers.) 777 */ 778 public boolean hasMode(CompositionAttestationMode value) { 779 if (this.mode == null) 780 return false; 781 for (Enumeration<CompositionAttestationMode> v : this.mode) 782 if (v.getValue().equals(value)) // code 783 return true; 784 return false; 785 } 786 787 /** 788 * @return {@link #time} (When the composition was attested by the party.). This is the underlying object with id, value and extensions. The accessor "getTime" gives direct access to the value 789 */ 790 public DateTimeType getTimeElement() { 791 if (this.time == null) 792 if (Configuration.errorOnAutoCreate()) 793 throw new Error("Attempt to auto-create CompositionAttesterComponent.time"); 794 else if (Configuration.doAutoCreate()) 795 this.time = new DateTimeType(); // bb 796 return this.time; 797 } 798 799 public boolean hasTimeElement() { 800 return this.time != null && !this.time.isEmpty(); 801 } 802 803 public boolean hasTime() { 804 return this.time != null && !this.time.isEmpty(); 805 } 806 807 /** 808 * @param value {@link #time} (When the composition was attested by the party.). This is the underlying object with id, value and extensions. The accessor "getTime" gives direct access to the value 809 */ 810 public CompositionAttesterComponent setTimeElement(DateTimeType value) { 811 this.time = value; 812 return this; 813 } 814 815 /** 816 * @return When the composition was attested by the party. 817 */ 818 public Date getTime() { 819 return this.time == null ? null : this.time.getValue(); 820 } 821 822 /** 823 * @param value When the composition was attested by the party. 824 */ 825 public CompositionAttesterComponent setTime(Date value) { 826 if (value == null) 827 this.time = null; 828 else { 829 if (this.time == null) 830 this.time = new DateTimeType(); 831 this.time.setValue(value); 832 } 833 return this; 834 } 835 836 /** 837 * @return {@link #party} (Who attested the composition in the specified way.) 838 */ 839 public Reference getParty() { 840 if (this.party == null) 841 if (Configuration.errorOnAutoCreate()) 842 throw new Error("Attempt to auto-create CompositionAttesterComponent.party"); 843 else if (Configuration.doAutoCreate()) 844 this.party = new Reference(); // cc 845 return this.party; 846 } 847 848 public boolean hasParty() { 849 return this.party != null && !this.party.isEmpty(); 850 } 851 852 /** 853 * @param value {@link #party} (Who attested the composition in the specified way.) 854 */ 855 public CompositionAttesterComponent setParty(Reference value) { 856 this.party = value; 857 return this; 858 } 859 860 /** 861 * @return {@link #party} 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. (Who attested the composition in the specified way.) 862 */ 863 public Resource getPartyTarget() { 864 return this.partyTarget; 865 } 866 867 /** 868 * @param value {@link #party} 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. (Who attested the composition in the specified way.) 869 */ 870 public CompositionAttesterComponent setPartyTarget(Resource value) { 871 this.partyTarget = value; 872 return this; 873 } 874 875 protected void listChildren(List<Property> children) { 876 super.listChildren(children); 877 children.add(new Property("mode", "code", "The type of attestation the authenticator offers.", 0, java.lang.Integer.MAX_VALUE, mode)); 878 children.add(new Property("time", "dateTime", "When the composition was attested by the party.", 0, 1, time)); 879 children.add(new Property("party", "Reference(Patient|Practitioner|Organization)", "Who attested the composition in the specified way.", 0, 1, party)); 880 } 881 882 @Override 883 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 884 switch (_hash) { 885 case 3357091: /*mode*/ return new Property("mode", "code", "The type of attestation the authenticator offers.", 0, java.lang.Integer.MAX_VALUE, mode); 886 case 3560141: /*time*/ return new Property("time", "dateTime", "When the composition was attested by the party.", 0, 1, time); 887 case 106437350: /*party*/ return new Property("party", "Reference(Patient|Practitioner|Organization)", "Who attested the composition in the specified way.", 0, 1, party); 888 default: return super.getNamedProperty(_hash, _name, _checkValid); 889 } 890 891 } 892 893 @Override 894 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 895 switch (hash) { 896 case 3357091: /*mode*/ return this.mode == null ? new Base[0] : this.mode.toArray(new Base[this.mode.size()]); // Enumeration<CompositionAttestationMode> 897 case 3560141: /*time*/ return this.time == null ? new Base[0] : new Base[] {this.time}; // DateTimeType 898 case 106437350: /*party*/ return this.party == null ? new Base[0] : new Base[] {this.party}; // Reference 899 default: return super.getProperty(hash, name, checkValid); 900 } 901 902 } 903 904 @Override 905 public Base setProperty(int hash, String name, Base value) throws FHIRException { 906 switch (hash) { 907 case 3357091: // mode 908 value = new CompositionAttestationModeEnumFactory().fromType(castToCode(value)); 909 this.getMode().add((Enumeration) value); // Enumeration<CompositionAttestationMode> 910 return value; 911 case 3560141: // time 912 this.time = castToDateTime(value); // DateTimeType 913 return value; 914 case 106437350: // party 915 this.party = castToReference(value); // Reference 916 return value; 917 default: return super.setProperty(hash, name, value); 918 } 919 920 } 921 922 @Override 923 public Base setProperty(String name, Base value) throws FHIRException { 924 if (name.equals("mode")) { 925 value = new CompositionAttestationModeEnumFactory().fromType(castToCode(value)); 926 this.getMode().add((Enumeration) value); 927 } else if (name.equals("time")) { 928 this.time = castToDateTime(value); // DateTimeType 929 } else if (name.equals("party")) { 930 this.party = castToReference(value); // Reference 931 } else 932 return super.setProperty(name, value); 933 return value; 934 } 935 936 @Override 937 public Base makeProperty(int hash, String name) throws FHIRException { 938 switch (hash) { 939 case 3357091: return addModeElement(); 940 case 3560141: return getTimeElement(); 941 case 106437350: return getParty(); 942 default: return super.makeProperty(hash, name); 943 } 944 945 } 946 947 @Override 948 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 949 switch (hash) { 950 case 3357091: /*mode*/ return new String[] {"code"}; 951 case 3560141: /*time*/ return new String[] {"dateTime"}; 952 case 106437350: /*party*/ return new String[] {"Reference"}; 953 default: return super.getTypesForProperty(hash, name); 954 } 955 956 } 957 958 @Override 959 public Base addChild(String name) throws FHIRException { 960 if (name.equals("mode")) { 961 throw new FHIRException("Cannot call addChild on a primitive type Composition.mode"); 962 } 963 else if (name.equals("time")) { 964 throw new FHIRException("Cannot call addChild on a primitive type Composition.time"); 965 } 966 else if (name.equals("party")) { 967 this.party = new Reference(); 968 return this.party; 969 } 970 else 971 return super.addChild(name); 972 } 973 974 public CompositionAttesterComponent copy() { 975 CompositionAttesterComponent dst = new CompositionAttesterComponent(); 976 copyValues(dst); 977 if (mode != null) { 978 dst.mode = new ArrayList<Enumeration<CompositionAttestationMode>>(); 979 for (Enumeration<CompositionAttestationMode> i : mode) 980 dst.mode.add(i.copy()); 981 }; 982 dst.time = time == null ? null : time.copy(); 983 dst.party = party == null ? null : party.copy(); 984 return dst; 985 } 986 987 @Override 988 public boolean equalsDeep(Base other_) { 989 if (!super.equalsDeep(other_)) 990 return false; 991 if (!(other_ instanceof CompositionAttesterComponent)) 992 return false; 993 CompositionAttesterComponent o = (CompositionAttesterComponent) other_; 994 return compareDeep(mode, o.mode, true) && compareDeep(time, o.time, true) && compareDeep(party, o.party, true) 995 ; 996 } 997 998 @Override 999 public boolean equalsShallow(Base other_) { 1000 if (!super.equalsShallow(other_)) 1001 return false; 1002 if (!(other_ instanceof CompositionAttesterComponent)) 1003 return false; 1004 CompositionAttesterComponent o = (CompositionAttesterComponent) other_; 1005 return compareValues(mode, o.mode, true) && compareValues(time, o.time, true); 1006 } 1007 1008 public boolean isEmpty() { 1009 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(mode, time, party); 1010 } 1011 1012 public String fhirType() { 1013 return "Composition.attester"; 1014 1015 } 1016 1017 } 1018 1019 @Block() 1020 public static class CompositionRelatesToComponent extends BackboneElement implements IBaseBackboneElement { 1021 /** 1022 * The type of relationship that this composition has with anther composition or document. 1023 */ 1024 @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 1025 @Description(shortDefinition="replaces | transforms | signs | appends", formalDefinition="The type of relationship that this composition has with anther composition or document." ) 1026 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/document-relationship-type") 1027 protected Enumeration<DocumentRelationshipType> code; 1028 1029 /** 1030 * The target composition/document of this relationship. 1031 */ 1032 @Child(name = "target", type = {Identifier.class, Composition.class}, order=2, min=1, max=1, modifier=false, summary=true) 1033 @Description(shortDefinition="Target of the relationship", formalDefinition="The target composition/document of this relationship." ) 1034 protected Type target; 1035 1036 private static final long serialVersionUID = 1536930280L; 1037 1038 /** 1039 * Constructor 1040 */ 1041 public CompositionRelatesToComponent() { 1042 super(); 1043 } 1044 1045 /** 1046 * Constructor 1047 */ 1048 public CompositionRelatesToComponent(Enumeration<DocumentRelationshipType> code, Type target) { 1049 super(); 1050 this.code = code; 1051 this.target = target; 1052 } 1053 1054 /** 1055 * @return {@link #code} (The type of relationship that this composition has with anther composition or document.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 1056 */ 1057 public Enumeration<DocumentRelationshipType> getCodeElement() { 1058 if (this.code == null) 1059 if (Configuration.errorOnAutoCreate()) 1060 throw new Error("Attempt to auto-create CompositionRelatesToComponent.code"); 1061 else if (Configuration.doAutoCreate()) 1062 this.code = new Enumeration<DocumentRelationshipType>(new DocumentRelationshipTypeEnumFactory()); // bb 1063 return this.code; 1064 } 1065 1066 public boolean hasCodeElement() { 1067 return this.code != null && !this.code.isEmpty(); 1068 } 1069 1070 public boolean hasCode() { 1071 return this.code != null && !this.code.isEmpty(); 1072 } 1073 1074 /** 1075 * @param value {@link #code} (The type of relationship that this composition has with anther composition or document.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 1076 */ 1077 public CompositionRelatesToComponent setCodeElement(Enumeration<DocumentRelationshipType> value) { 1078 this.code = value; 1079 return this; 1080 } 1081 1082 /** 1083 * @return The type of relationship that this composition has with anther composition or document. 1084 */ 1085 public DocumentRelationshipType getCode() { 1086 return this.code == null ? null : this.code.getValue(); 1087 } 1088 1089 /** 1090 * @param value The type of relationship that this composition has with anther composition or document. 1091 */ 1092 public CompositionRelatesToComponent setCode(DocumentRelationshipType value) { 1093 if (this.code == null) 1094 this.code = new Enumeration<DocumentRelationshipType>(new DocumentRelationshipTypeEnumFactory()); 1095 this.code.setValue(value); 1096 return this; 1097 } 1098 1099 /** 1100 * @return {@link #target} (The target composition/document of this relationship.) 1101 */ 1102 public Type getTarget() { 1103 return this.target; 1104 } 1105 1106 /** 1107 * @return {@link #target} (The target composition/document of this relationship.) 1108 */ 1109 public Identifier getTargetIdentifier() throws FHIRException { 1110 if (this.target == null) 1111 return null; 1112 if (!(this.target instanceof Identifier)) 1113 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.target.getClass().getName()+" was encountered"); 1114 return (Identifier) this.target; 1115 } 1116 1117 public boolean hasTargetIdentifier() { 1118 return this != null && this.target instanceof Identifier; 1119 } 1120 1121 /** 1122 * @return {@link #target} (The target composition/document of this relationship.) 1123 */ 1124 public Reference getTargetReference() throws FHIRException { 1125 if (this.target == null) 1126 return null; 1127 if (!(this.target instanceof Reference)) 1128 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.target.getClass().getName()+" was encountered"); 1129 return (Reference) this.target; 1130 } 1131 1132 public boolean hasTargetReference() { 1133 return this != null && this.target instanceof Reference; 1134 } 1135 1136 public boolean hasTarget() { 1137 return this.target != null && !this.target.isEmpty(); 1138 } 1139 1140 /** 1141 * @param value {@link #target} (The target composition/document of this relationship.) 1142 */ 1143 public CompositionRelatesToComponent setTarget(Type value) throws FHIRFormatError { 1144 if (value != null && !(value instanceof Identifier || value instanceof Reference)) 1145 throw new FHIRFormatError("Not the right type for Composition.relatesTo.target[x]: "+value.fhirType()); 1146 this.target = value; 1147 return this; 1148 } 1149 1150 protected void listChildren(List<Property> children) { 1151 super.listChildren(children); 1152 children.add(new Property("code", "code", "The type of relationship that this composition has with anther composition or document.", 0, 1, code)); 1153 children.add(new Property("target[x]", "Identifier|Reference(Composition)", "The target composition/document of this relationship.", 0, 1, target)); 1154 } 1155 1156 @Override 1157 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1158 switch (_hash) { 1159 case 3059181: /*code*/ return new Property("code", "code", "The type of relationship that this composition has with anther composition or document.", 0, 1, code); 1160 case -815579825: /*target[x]*/ return new Property("target[x]", "Identifier|Reference(Composition)", "The target composition/document of this relationship.", 0, 1, target); 1161 case -880905839: /*target*/ return new Property("target[x]", "Identifier|Reference(Composition)", "The target composition/document of this relationship.", 0, 1, target); 1162 case 1690892570: /*targetIdentifier*/ return new Property("target[x]", "Identifier|Reference(Composition)", "The target composition/document of this relationship.", 0, 1, target); 1163 case 1259806906: /*targetReference*/ return new Property("target[x]", "Identifier|Reference(Composition)", "The target composition/document of this relationship.", 0, 1, target); 1164 default: return super.getNamedProperty(_hash, _name, _checkValid); 1165 } 1166 1167 } 1168 1169 @Override 1170 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1171 switch (hash) { 1172 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // Enumeration<DocumentRelationshipType> 1173 case -880905839: /*target*/ return this.target == null ? new Base[0] : new Base[] {this.target}; // Type 1174 default: return super.getProperty(hash, name, checkValid); 1175 } 1176 1177 } 1178 1179 @Override 1180 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1181 switch (hash) { 1182 case 3059181: // code 1183 value = new DocumentRelationshipTypeEnumFactory().fromType(castToCode(value)); 1184 this.code = (Enumeration) value; // Enumeration<DocumentRelationshipType> 1185 return value; 1186 case -880905839: // target 1187 this.target = castToType(value); // Type 1188 return value; 1189 default: return super.setProperty(hash, name, value); 1190 } 1191 1192 } 1193 1194 @Override 1195 public Base setProperty(String name, Base value) throws FHIRException { 1196 if (name.equals("code")) { 1197 value = new DocumentRelationshipTypeEnumFactory().fromType(castToCode(value)); 1198 this.code = (Enumeration) value; // Enumeration<DocumentRelationshipType> 1199 } else if (name.equals("target[x]")) { 1200 this.target = castToType(value); // Type 1201 } else 1202 return super.setProperty(name, value); 1203 return value; 1204 } 1205 1206 @Override 1207 public Base makeProperty(int hash, String name) throws FHIRException { 1208 switch (hash) { 1209 case 3059181: return getCodeElement(); 1210 case -815579825: return getTarget(); 1211 case -880905839: return getTarget(); 1212 default: return super.makeProperty(hash, name); 1213 } 1214 1215 } 1216 1217 @Override 1218 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1219 switch (hash) { 1220 case 3059181: /*code*/ return new String[] {"code"}; 1221 case -880905839: /*target*/ return new String[] {"Identifier", "Reference"}; 1222 default: return super.getTypesForProperty(hash, name); 1223 } 1224 1225 } 1226 1227 @Override 1228 public Base addChild(String name) throws FHIRException { 1229 if (name.equals("code")) { 1230 throw new FHIRException("Cannot call addChild on a primitive type Composition.code"); 1231 } 1232 else if (name.equals("targetIdentifier")) { 1233 this.target = new Identifier(); 1234 return this.target; 1235 } 1236 else if (name.equals("targetReference")) { 1237 this.target = new Reference(); 1238 return this.target; 1239 } 1240 else 1241 return super.addChild(name); 1242 } 1243 1244 public CompositionRelatesToComponent copy() { 1245 CompositionRelatesToComponent dst = new CompositionRelatesToComponent(); 1246 copyValues(dst); 1247 dst.code = code == null ? null : code.copy(); 1248 dst.target = target == null ? null : target.copy(); 1249 return dst; 1250 } 1251 1252 @Override 1253 public boolean equalsDeep(Base other_) { 1254 if (!super.equalsDeep(other_)) 1255 return false; 1256 if (!(other_ instanceof CompositionRelatesToComponent)) 1257 return false; 1258 CompositionRelatesToComponent o = (CompositionRelatesToComponent) other_; 1259 return compareDeep(code, o.code, true) && compareDeep(target, o.target, true); 1260 } 1261 1262 @Override 1263 public boolean equalsShallow(Base other_) { 1264 if (!super.equalsShallow(other_)) 1265 return false; 1266 if (!(other_ instanceof CompositionRelatesToComponent)) 1267 return false; 1268 CompositionRelatesToComponent o = (CompositionRelatesToComponent) other_; 1269 return compareValues(code, o.code, true); 1270 } 1271 1272 public boolean isEmpty() { 1273 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, target); 1274 } 1275 1276 public String fhirType() { 1277 return "Composition.relatesTo"; 1278 1279 } 1280 1281 } 1282 1283 @Block() 1284 public static class CompositionEventComponent extends BackboneElement implements IBaseBackboneElement { 1285 /** 1286 * This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a "History and Physical Report" in which the procedure being documented is necessarily a "History and Physical" act. 1287 */ 1288 @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1289 @Description(shortDefinition="Code(s) that apply to the event being documented", formalDefinition="This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a \"History and Physical Report\" in which the procedure being documented is necessarily a \"History and Physical\" act." ) 1290 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v3-ActCode") 1291 protected List<CodeableConcept> code; 1292 1293 /** 1294 * The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time. 1295 */ 1296 @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=true) 1297 @Description(shortDefinition="The period covered by the documentation", formalDefinition="The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time." ) 1298 protected Period period; 1299 1300 /** 1301 * The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy. 1302 */ 1303 @Child(name = "detail", type = {Reference.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1304 @Description(shortDefinition="The event(s) being documented", formalDefinition="The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy." ) 1305 protected List<Reference> detail; 1306 /** 1307 * The actual objects that are the target of the reference (The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.) 1308 */ 1309 protected List<Resource> detailTarget; 1310 1311 1312 private static final long serialVersionUID = -1581379774L; 1313 1314 /** 1315 * Constructor 1316 */ 1317 public CompositionEventComponent() { 1318 super(); 1319 } 1320 1321 /** 1322 * @return {@link #code} (This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a "History and Physical Report" in which the procedure being documented is necessarily a "History and Physical" act.) 1323 */ 1324 public List<CodeableConcept> getCode() { 1325 if (this.code == null) 1326 this.code = new ArrayList<CodeableConcept>(); 1327 return this.code; 1328 } 1329 1330 /** 1331 * @return Returns a reference to <code>this</code> for easy method chaining 1332 */ 1333 public CompositionEventComponent setCode(List<CodeableConcept> theCode) { 1334 this.code = theCode; 1335 return this; 1336 } 1337 1338 public boolean hasCode() { 1339 if (this.code == null) 1340 return false; 1341 for (CodeableConcept item : this.code) 1342 if (!item.isEmpty()) 1343 return true; 1344 return false; 1345 } 1346 1347 public CodeableConcept addCode() { //3 1348 CodeableConcept t = new CodeableConcept(); 1349 if (this.code == null) 1350 this.code = new ArrayList<CodeableConcept>(); 1351 this.code.add(t); 1352 return t; 1353 } 1354 1355 public CompositionEventComponent addCode(CodeableConcept t) { //3 1356 if (t == null) 1357 return this; 1358 if (this.code == null) 1359 this.code = new ArrayList<CodeableConcept>(); 1360 this.code.add(t); 1361 return this; 1362 } 1363 1364 /** 1365 * @return The first repetition of repeating field {@link #code}, creating it if it does not already exist 1366 */ 1367 public CodeableConcept getCodeFirstRep() { 1368 if (getCode().isEmpty()) { 1369 addCode(); 1370 } 1371 return getCode().get(0); 1372 } 1373 1374 /** 1375 * @return {@link #period} (The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.) 1376 */ 1377 public Period getPeriod() { 1378 if (this.period == null) 1379 if (Configuration.errorOnAutoCreate()) 1380 throw new Error("Attempt to auto-create CompositionEventComponent.period"); 1381 else if (Configuration.doAutoCreate()) 1382 this.period = new Period(); // cc 1383 return this.period; 1384 } 1385 1386 public boolean hasPeriod() { 1387 return this.period != null && !this.period.isEmpty(); 1388 } 1389 1390 /** 1391 * @param value {@link #period} (The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.) 1392 */ 1393 public CompositionEventComponent setPeriod(Period value) { 1394 this.period = value; 1395 return this; 1396 } 1397 1398 /** 1399 * @return {@link #detail} (The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.) 1400 */ 1401 public List<Reference> getDetail() { 1402 if (this.detail == null) 1403 this.detail = new ArrayList<Reference>(); 1404 return this.detail; 1405 } 1406 1407 /** 1408 * @return Returns a reference to <code>this</code> for easy method chaining 1409 */ 1410 public CompositionEventComponent setDetail(List<Reference> theDetail) { 1411 this.detail = theDetail; 1412 return this; 1413 } 1414 1415 public boolean hasDetail() { 1416 if (this.detail == null) 1417 return false; 1418 for (Reference item : this.detail) 1419 if (!item.isEmpty()) 1420 return true; 1421 return false; 1422 } 1423 1424 public Reference addDetail() { //3 1425 Reference t = new Reference(); 1426 if (this.detail == null) 1427 this.detail = new ArrayList<Reference>(); 1428 this.detail.add(t); 1429 return t; 1430 } 1431 1432 public CompositionEventComponent addDetail(Reference t) { //3 1433 if (t == null) 1434 return this; 1435 if (this.detail == null) 1436 this.detail = new ArrayList<Reference>(); 1437 this.detail.add(t); 1438 return this; 1439 } 1440 1441 /** 1442 * @return The first repetition of repeating field {@link #detail}, creating it if it does not already exist 1443 */ 1444 public Reference getDetailFirstRep() { 1445 if (getDetail().isEmpty()) { 1446 addDetail(); 1447 } 1448 return getDetail().get(0); 1449 } 1450 1451 /** 1452 * @deprecated Use Reference#setResource(IBaseResource) instead 1453 */ 1454 @Deprecated 1455 public List<Resource> getDetailTarget() { 1456 if (this.detailTarget == null) 1457 this.detailTarget = new ArrayList<Resource>(); 1458 return this.detailTarget; 1459 } 1460 1461 protected void listChildren(List<Property> children) { 1462 super.listChildren(children); 1463 children.add(new Property("code", "CodeableConcept", "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a \"History and Physical Report\" in which the procedure being documented is necessarily a \"History and Physical\" act.", 0, java.lang.Integer.MAX_VALUE, code)); 1464 children.add(new Property("period", "Period", "The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.", 0, 1, period)); 1465 children.add(new Property("detail", "Reference(Any)", "The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.", 0, java.lang.Integer.MAX_VALUE, detail)); 1466 } 1467 1468 @Override 1469 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1470 switch (_hash) { 1471 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a \"History and Physical Report\" in which the procedure being documented is necessarily a \"History and Physical\" act.", 0, java.lang.Integer.MAX_VALUE, code); 1472 case -991726143: /*period*/ return new Property("period", "Period", "The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.", 0, 1, period); 1473 case -1335224239: /*detail*/ return new Property("detail", "Reference(Any)", "The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.", 0, java.lang.Integer.MAX_VALUE, detail); 1474 default: return super.getNamedProperty(_hash, _name, _checkValid); 1475 } 1476 1477 } 1478 1479 @Override 1480 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1481 switch (hash) { 1482 case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // CodeableConcept 1483 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 1484 case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : this.detail.toArray(new Base[this.detail.size()]); // Reference 1485 default: return super.getProperty(hash, name, checkValid); 1486 } 1487 1488 } 1489 1490 @Override 1491 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1492 switch (hash) { 1493 case 3059181: // code 1494 this.getCode().add(castToCodeableConcept(value)); // CodeableConcept 1495 return value; 1496 case -991726143: // period 1497 this.period = castToPeriod(value); // Period 1498 return value; 1499 case -1335224239: // detail 1500 this.getDetail().add(castToReference(value)); // Reference 1501 return value; 1502 default: return super.setProperty(hash, name, value); 1503 } 1504 1505 } 1506 1507 @Override 1508 public Base setProperty(String name, Base value) throws FHIRException { 1509 if (name.equals("code")) { 1510 this.getCode().add(castToCodeableConcept(value)); 1511 } else if (name.equals("period")) { 1512 this.period = castToPeriod(value); // Period 1513 } else if (name.equals("detail")) { 1514 this.getDetail().add(castToReference(value)); 1515 } else 1516 return super.setProperty(name, value); 1517 return value; 1518 } 1519 1520 @Override 1521 public Base makeProperty(int hash, String name) throws FHIRException { 1522 switch (hash) { 1523 case 3059181: return addCode(); 1524 case -991726143: return getPeriod(); 1525 case -1335224239: return addDetail(); 1526 default: return super.makeProperty(hash, name); 1527 } 1528 1529 } 1530 1531 @Override 1532 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1533 switch (hash) { 1534 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 1535 case -991726143: /*period*/ return new String[] {"Period"}; 1536 case -1335224239: /*detail*/ return new String[] {"Reference"}; 1537 default: return super.getTypesForProperty(hash, name); 1538 } 1539 1540 } 1541 1542 @Override 1543 public Base addChild(String name) throws FHIRException { 1544 if (name.equals("code")) { 1545 return addCode(); 1546 } 1547 else if (name.equals("period")) { 1548 this.period = new Period(); 1549 return this.period; 1550 } 1551 else if (name.equals("detail")) { 1552 return addDetail(); 1553 } 1554 else 1555 return super.addChild(name); 1556 } 1557 1558 public CompositionEventComponent copy() { 1559 CompositionEventComponent dst = new CompositionEventComponent(); 1560 copyValues(dst); 1561 if (code != null) { 1562 dst.code = new ArrayList<CodeableConcept>(); 1563 for (CodeableConcept i : code) 1564 dst.code.add(i.copy()); 1565 }; 1566 dst.period = period == null ? null : period.copy(); 1567 if (detail != null) { 1568 dst.detail = new ArrayList<Reference>(); 1569 for (Reference i : detail) 1570 dst.detail.add(i.copy()); 1571 }; 1572 return dst; 1573 } 1574 1575 @Override 1576 public boolean equalsDeep(Base other_) { 1577 if (!super.equalsDeep(other_)) 1578 return false; 1579 if (!(other_ instanceof CompositionEventComponent)) 1580 return false; 1581 CompositionEventComponent o = (CompositionEventComponent) other_; 1582 return compareDeep(code, o.code, true) && compareDeep(period, o.period, true) && compareDeep(detail, o.detail, true) 1583 ; 1584 } 1585 1586 @Override 1587 public boolean equalsShallow(Base other_) { 1588 if (!super.equalsShallow(other_)) 1589 return false; 1590 if (!(other_ instanceof CompositionEventComponent)) 1591 return false; 1592 CompositionEventComponent o = (CompositionEventComponent) other_; 1593 return true; 1594 } 1595 1596 public boolean isEmpty() { 1597 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, period, detail); 1598 } 1599 1600 public String fhirType() { 1601 return "Composition.event"; 1602 1603 } 1604 1605 } 1606 1607 @Block() 1608 public static class SectionComponent extends BackboneElement implements IBaseBackboneElement { 1609 /** 1610 * The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents. 1611 */ 1612 @Child(name = "title", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1613 @Description(shortDefinition="Label for section (e.g. for ToC)", formalDefinition="The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents." ) 1614 protected StringType title; 1615 1616 /** 1617 * A code identifying the kind of content contained within the section. This must be consistent with the section title. 1618 */ 1619 @Child(name = "code", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 1620 @Description(shortDefinition="Classification of section (recommended)", formalDefinition="A code identifying the kind of content contained within the section. This must be consistent with the section title." ) 1621 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/doc-section-codes") 1622 protected CodeableConcept code; 1623 1624 /** 1625 * A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. 1626 */ 1627 @Child(name = "text", type = {Narrative.class}, order=3, min=0, max=1, modifier=false, summary=false) 1628 @Description(shortDefinition="Text summary of the section, for human interpretation", formalDefinition="A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative." ) 1629 protected Narrative text; 1630 1631 /** 1632 * How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted. 1633 */ 1634 @Child(name = "mode", type = {CodeType.class}, order=4, min=0, max=1, modifier=true, summary=true) 1635 @Description(shortDefinition="working | snapshot | changes", formalDefinition="How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted." ) 1636 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/list-mode") 1637 protected Enumeration<SectionMode> mode; 1638 1639 /** 1640 * Specifies the order applied to the items in the section entries. 1641 */ 1642 @Child(name = "orderedBy", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) 1643 @Description(shortDefinition="Order of section entries", formalDefinition="Specifies the order applied to the items in the section entries." ) 1644 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/list-order") 1645 protected CodeableConcept orderedBy; 1646 1647 /** 1648 * A reference to the actual resource from which the narrative in the section is derived. 1649 */ 1650 @Child(name = "entry", type = {Reference.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1651 @Description(shortDefinition="A reference to data that supports this section", formalDefinition="A reference to the actual resource from which the narrative in the section is derived." ) 1652 protected List<Reference> entry; 1653 /** 1654 * The actual objects that are the target of the reference (A reference to the actual resource from which the narrative in the section is derived.) 1655 */ 1656 protected List<Resource> entryTarget; 1657 1658 1659 /** 1660 * If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason. 1661 */ 1662 @Child(name = "emptyReason", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=false) 1663 @Description(shortDefinition="Why the section is empty", formalDefinition="If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason." ) 1664 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/list-empty-reason") 1665 protected CodeableConcept emptyReason; 1666 1667 /** 1668 * A nested sub-section within this section. 1669 */ 1670 @Child(name = "section", type = {SectionComponent.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1671 @Description(shortDefinition="Nested Section", formalDefinition="A nested sub-section within this section." ) 1672 protected List<SectionComponent> section; 1673 1674 private static final long serialVersionUID = -128426142L; 1675 1676 /** 1677 * Constructor 1678 */ 1679 public SectionComponent() { 1680 super(); 1681 } 1682 1683 /** 1684 * @return {@link #title} (The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 1685 */ 1686 public StringType getTitleElement() { 1687 if (this.title == null) 1688 if (Configuration.errorOnAutoCreate()) 1689 throw new Error("Attempt to auto-create SectionComponent.title"); 1690 else if (Configuration.doAutoCreate()) 1691 this.title = new StringType(); // bb 1692 return this.title; 1693 } 1694 1695 public boolean hasTitleElement() { 1696 return this.title != null && !this.title.isEmpty(); 1697 } 1698 1699 public boolean hasTitle() { 1700 return this.title != null && !this.title.isEmpty(); 1701 } 1702 1703 /** 1704 * @param value {@link #title} (The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 1705 */ 1706 public SectionComponent setTitleElement(StringType value) { 1707 this.title = value; 1708 return this; 1709 } 1710 1711 /** 1712 * @return The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents. 1713 */ 1714 public String getTitle() { 1715 return this.title == null ? null : this.title.getValue(); 1716 } 1717 1718 /** 1719 * @param value The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents. 1720 */ 1721 public SectionComponent setTitle(String value) { 1722 if (Utilities.noString(value)) 1723 this.title = null; 1724 else { 1725 if (this.title == null) 1726 this.title = new StringType(); 1727 this.title.setValue(value); 1728 } 1729 return this; 1730 } 1731 1732 /** 1733 * @return {@link #code} (A code identifying the kind of content contained within the section. This must be consistent with the section title.) 1734 */ 1735 public CodeableConcept getCode() { 1736 if (this.code == null) 1737 if (Configuration.errorOnAutoCreate()) 1738 throw new Error("Attempt to auto-create SectionComponent.code"); 1739 else if (Configuration.doAutoCreate()) 1740 this.code = new CodeableConcept(); // cc 1741 return this.code; 1742 } 1743 1744 public boolean hasCode() { 1745 return this.code != null && !this.code.isEmpty(); 1746 } 1747 1748 /** 1749 * @param value {@link #code} (A code identifying the kind of content contained within the section. This must be consistent with the section title.) 1750 */ 1751 public SectionComponent setCode(CodeableConcept value) { 1752 this.code = value; 1753 return this; 1754 } 1755 1756 /** 1757 * @return {@link #text} (A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative.) 1758 */ 1759 public Narrative getText() { 1760 if (this.text == null) 1761 if (Configuration.errorOnAutoCreate()) 1762 throw new Error("Attempt to auto-create SectionComponent.text"); 1763 else if (Configuration.doAutoCreate()) 1764 this.text = new Narrative(); // cc 1765 return this.text; 1766 } 1767 1768 public boolean hasText() { 1769 return this.text != null && !this.text.isEmpty(); 1770 } 1771 1772 /** 1773 * @param value {@link #text} (A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative.) 1774 */ 1775 public SectionComponent setText(Narrative value) { 1776 this.text = value; 1777 return this; 1778 } 1779 1780 /** 1781 * @return {@link #mode} (How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value 1782 */ 1783 public Enumeration<SectionMode> getModeElement() { 1784 if (this.mode == null) 1785 if (Configuration.errorOnAutoCreate()) 1786 throw new Error("Attempt to auto-create SectionComponent.mode"); 1787 else if (Configuration.doAutoCreate()) 1788 this.mode = new Enumeration<SectionMode>(new SectionModeEnumFactory()); // bb 1789 return this.mode; 1790 } 1791 1792 public boolean hasModeElement() { 1793 return this.mode != null && !this.mode.isEmpty(); 1794 } 1795 1796 public boolean hasMode() { 1797 return this.mode != null && !this.mode.isEmpty(); 1798 } 1799 1800 /** 1801 * @param value {@link #mode} (How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value 1802 */ 1803 public SectionComponent setModeElement(Enumeration<SectionMode> value) { 1804 this.mode = value; 1805 return this; 1806 } 1807 1808 /** 1809 * @return How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted. 1810 */ 1811 public SectionMode getMode() { 1812 return this.mode == null ? null : this.mode.getValue(); 1813 } 1814 1815 /** 1816 * @param value How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted. 1817 */ 1818 public SectionComponent setMode(SectionMode value) { 1819 if (value == null) 1820 this.mode = null; 1821 else { 1822 if (this.mode == null) 1823 this.mode = new Enumeration<SectionMode>(new SectionModeEnumFactory()); 1824 this.mode.setValue(value); 1825 } 1826 return this; 1827 } 1828 1829 /** 1830 * @return {@link #orderedBy} (Specifies the order applied to the items in the section entries.) 1831 */ 1832 public CodeableConcept getOrderedBy() { 1833 if (this.orderedBy == null) 1834 if (Configuration.errorOnAutoCreate()) 1835 throw new Error("Attempt to auto-create SectionComponent.orderedBy"); 1836 else if (Configuration.doAutoCreate()) 1837 this.orderedBy = new CodeableConcept(); // cc 1838 return this.orderedBy; 1839 } 1840 1841 public boolean hasOrderedBy() { 1842 return this.orderedBy != null && !this.orderedBy.isEmpty(); 1843 } 1844 1845 /** 1846 * @param value {@link #orderedBy} (Specifies the order applied to the items in the section entries.) 1847 */ 1848 public SectionComponent setOrderedBy(CodeableConcept value) { 1849 this.orderedBy = value; 1850 return this; 1851 } 1852 1853 /** 1854 * @return {@link #entry} (A reference to the actual resource from which the narrative in the section is derived.) 1855 */ 1856 public List<Reference> getEntry() { 1857 if (this.entry == null) 1858 this.entry = new ArrayList<Reference>(); 1859 return this.entry; 1860 } 1861 1862 /** 1863 * @return Returns a reference to <code>this</code> for easy method chaining 1864 */ 1865 public SectionComponent setEntry(List<Reference> theEntry) { 1866 this.entry = theEntry; 1867 return this; 1868 } 1869 1870 public boolean hasEntry() { 1871 if (this.entry == null) 1872 return false; 1873 for (Reference item : this.entry) 1874 if (!item.isEmpty()) 1875 return true; 1876 return false; 1877 } 1878 1879 public Reference addEntry() { //3 1880 Reference t = new Reference(); 1881 if (this.entry == null) 1882 this.entry = new ArrayList<Reference>(); 1883 this.entry.add(t); 1884 return t; 1885 } 1886 1887 public SectionComponent addEntry(Reference t) { //3 1888 if (t == null) 1889 return this; 1890 if (this.entry == null) 1891 this.entry = new ArrayList<Reference>(); 1892 this.entry.add(t); 1893 return this; 1894 } 1895 1896 /** 1897 * @return The first repetition of repeating field {@link #entry}, creating it if it does not already exist 1898 */ 1899 public Reference getEntryFirstRep() { 1900 if (getEntry().isEmpty()) { 1901 addEntry(); 1902 } 1903 return getEntry().get(0); 1904 } 1905 1906 /** 1907 * @deprecated Use Reference#setResource(IBaseResource) instead 1908 */ 1909 @Deprecated 1910 public List<Resource> getEntryTarget() { 1911 if (this.entryTarget == null) 1912 this.entryTarget = new ArrayList<Resource>(); 1913 return this.entryTarget; 1914 } 1915 1916 /** 1917 * @return {@link #emptyReason} (If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.) 1918 */ 1919 public CodeableConcept getEmptyReason() { 1920 if (this.emptyReason == null) 1921 if (Configuration.errorOnAutoCreate()) 1922 throw new Error("Attempt to auto-create SectionComponent.emptyReason"); 1923 else if (Configuration.doAutoCreate()) 1924 this.emptyReason = new CodeableConcept(); // cc 1925 return this.emptyReason; 1926 } 1927 1928 public boolean hasEmptyReason() { 1929 return this.emptyReason != null && !this.emptyReason.isEmpty(); 1930 } 1931 1932 /** 1933 * @param value {@link #emptyReason} (If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.) 1934 */ 1935 public SectionComponent setEmptyReason(CodeableConcept value) { 1936 this.emptyReason = value; 1937 return this; 1938 } 1939 1940 /** 1941 * @return {@link #section} (A nested sub-section within this section.) 1942 */ 1943 public List<SectionComponent> getSection() { 1944 if (this.section == null) 1945 this.section = new ArrayList<SectionComponent>(); 1946 return this.section; 1947 } 1948 1949 /** 1950 * @return Returns a reference to <code>this</code> for easy method chaining 1951 */ 1952 public SectionComponent setSection(List<SectionComponent> theSection) { 1953 this.section = theSection; 1954 return this; 1955 } 1956 1957 public boolean hasSection() { 1958 if (this.section == null) 1959 return false; 1960 for (SectionComponent item : this.section) 1961 if (!item.isEmpty()) 1962 return true; 1963 return false; 1964 } 1965 1966 public SectionComponent addSection() { //3 1967 SectionComponent t = new SectionComponent(); 1968 if (this.section == null) 1969 this.section = new ArrayList<SectionComponent>(); 1970 this.section.add(t); 1971 return t; 1972 } 1973 1974 public SectionComponent addSection(SectionComponent t) { //3 1975 if (t == null) 1976 return this; 1977 if (this.section == null) 1978 this.section = new ArrayList<SectionComponent>(); 1979 this.section.add(t); 1980 return this; 1981 } 1982 1983 /** 1984 * @return The first repetition of repeating field {@link #section}, creating it if it does not already exist 1985 */ 1986 public SectionComponent getSectionFirstRep() { 1987 if (getSection().isEmpty()) { 1988 addSection(); 1989 } 1990 return getSection().get(0); 1991 } 1992 1993 protected void listChildren(List<Property> children) { 1994 super.listChildren(children); 1995 children.add(new Property("title", "string", "The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.", 0, 1, title)); 1996 children.add(new Property("code", "CodeableConcept", "A code identifying the kind of content contained within the section. This must be consistent with the section title.", 0, 1, code)); 1997 children.add(new Property("text", "Narrative", "A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative.", 0, 1, text)); 1998 children.add(new Property("mode", "code", "How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.", 0, 1, mode)); 1999 children.add(new Property("orderedBy", "CodeableConcept", "Specifies the order applied to the items in the section entries.", 0, 1, orderedBy)); 2000 children.add(new Property("entry", "Reference(Any)", "A reference to the actual resource from which the narrative in the section is derived.", 0, java.lang.Integer.MAX_VALUE, entry)); 2001 children.add(new Property("emptyReason", "CodeableConcept", "If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.", 0, 1, emptyReason)); 2002 children.add(new Property("section", "@Composition.section", "A nested sub-section within this section.", 0, java.lang.Integer.MAX_VALUE, section)); 2003 } 2004 2005 @Override 2006 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2007 switch (_hash) { 2008 case 110371416: /*title*/ return new Property("title", "string", "The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.", 0, 1, title); 2009 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "A code identifying the kind of content contained within the section. This must be consistent with the section title.", 0, 1, code); 2010 case 3556653: /*text*/ return new Property("text", "Narrative", "A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative.", 0, 1, text); 2011 case 3357091: /*mode*/ return new Property("mode", "code", "How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.", 0, 1, mode); 2012 case -391079516: /*orderedBy*/ return new Property("orderedBy", "CodeableConcept", "Specifies the order applied to the items in the section entries.", 0, 1, orderedBy); 2013 case 96667762: /*entry*/ return new Property("entry", "Reference(Any)", "A reference to the actual resource from which the narrative in the section is derived.", 0, java.lang.Integer.MAX_VALUE, entry); 2014 case 1140135409: /*emptyReason*/ return new Property("emptyReason", "CodeableConcept", "If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.", 0, 1, emptyReason); 2015 case 1970241253: /*section*/ return new Property("section", "@Composition.section", "A nested sub-section within this section.", 0, java.lang.Integer.MAX_VALUE, section); 2016 default: return super.getNamedProperty(_hash, _name, _checkValid); 2017 } 2018 2019 } 2020 2021 @Override 2022 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2023 switch (hash) { 2024 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 2025 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 2026 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // Narrative 2027 case 3357091: /*mode*/ return this.mode == null ? new Base[0] : new Base[] {this.mode}; // Enumeration<SectionMode> 2028 case -391079516: /*orderedBy*/ return this.orderedBy == null ? new Base[0] : new Base[] {this.orderedBy}; // CodeableConcept 2029 case 96667762: /*entry*/ return this.entry == null ? new Base[0] : this.entry.toArray(new Base[this.entry.size()]); // Reference 2030 case 1140135409: /*emptyReason*/ return this.emptyReason == null ? new Base[0] : new Base[] {this.emptyReason}; // CodeableConcept 2031 case 1970241253: /*section*/ return this.section == null ? new Base[0] : this.section.toArray(new Base[this.section.size()]); // SectionComponent 2032 default: return super.getProperty(hash, name, checkValid); 2033 } 2034 2035 } 2036 2037 @Override 2038 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2039 switch (hash) { 2040 case 110371416: // title 2041 this.title = castToString(value); // StringType 2042 return value; 2043 case 3059181: // code 2044 this.code = castToCodeableConcept(value); // CodeableConcept 2045 return value; 2046 case 3556653: // text 2047 this.text = castToNarrative(value); // Narrative 2048 return value; 2049 case 3357091: // mode 2050 value = new SectionModeEnumFactory().fromType(castToCode(value)); 2051 this.mode = (Enumeration) value; // Enumeration<SectionMode> 2052 return value; 2053 case -391079516: // orderedBy 2054 this.orderedBy = castToCodeableConcept(value); // CodeableConcept 2055 return value; 2056 case 96667762: // entry 2057 this.getEntry().add(castToReference(value)); // Reference 2058 return value; 2059 case 1140135409: // emptyReason 2060 this.emptyReason = castToCodeableConcept(value); // CodeableConcept 2061 return value; 2062 case 1970241253: // section 2063 this.getSection().add((SectionComponent) value); // SectionComponent 2064 return value; 2065 default: return super.setProperty(hash, name, value); 2066 } 2067 2068 } 2069 2070 @Override 2071 public Base setProperty(String name, Base value) throws FHIRException { 2072 if (name.equals("title")) { 2073 this.title = castToString(value); // StringType 2074 } else if (name.equals("code")) { 2075 this.code = castToCodeableConcept(value); // CodeableConcept 2076 } else if (name.equals("text")) { 2077 this.text = castToNarrative(value); // Narrative 2078 } else if (name.equals("mode")) { 2079 value = new SectionModeEnumFactory().fromType(castToCode(value)); 2080 this.mode = (Enumeration) value; // Enumeration<SectionMode> 2081 } else if (name.equals("orderedBy")) { 2082 this.orderedBy = castToCodeableConcept(value); // CodeableConcept 2083 } else if (name.equals("entry")) { 2084 this.getEntry().add(castToReference(value)); 2085 } else if (name.equals("emptyReason")) { 2086 this.emptyReason = castToCodeableConcept(value); // CodeableConcept 2087 } else if (name.equals("section")) { 2088 this.getSection().add((SectionComponent) value); 2089 } else 2090 return super.setProperty(name, value); 2091 return value; 2092 } 2093 2094 @Override 2095 public Base makeProperty(int hash, String name) throws FHIRException { 2096 switch (hash) { 2097 case 110371416: return getTitleElement(); 2098 case 3059181: return getCode(); 2099 case 3556653: return getText(); 2100 case 3357091: return getModeElement(); 2101 case -391079516: return getOrderedBy(); 2102 case 96667762: return addEntry(); 2103 case 1140135409: return getEmptyReason(); 2104 case 1970241253: return addSection(); 2105 default: return super.makeProperty(hash, name); 2106 } 2107 2108 } 2109 2110 @Override 2111 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2112 switch (hash) { 2113 case 110371416: /*title*/ return new String[] {"string"}; 2114 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 2115 case 3556653: /*text*/ return new String[] {"Narrative"}; 2116 case 3357091: /*mode*/ return new String[] {"code"}; 2117 case -391079516: /*orderedBy*/ return new String[] {"CodeableConcept"}; 2118 case 96667762: /*entry*/ return new String[] {"Reference"}; 2119 case 1140135409: /*emptyReason*/ return new String[] {"CodeableConcept"}; 2120 case 1970241253: /*section*/ return new String[] {"@Composition.section"}; 2121 default: return super.getTypesForProperty(hash, name); 2122 } 2123 2124 } 2125 2126 @Override 2127 public Base addChild(String name) throws FHIRException { 2128 if (name.equals("title")) { 2129 throw new FHIRException("Cannot call addChild on a primitive type Composition.title"); 2130 } 2131 else if (name.equals("code")) { 2132 this.code = new CodeableConcept(); 2133 return this.code; 2134 } 2135 else if (name.equals("text")) { 2136 this.text = new Narrative(); 2137 return this.text; 2138 } 2139 else if (name.equals("mode")) { 2140 throw new FHIRException("Cannot call addChild on a primitive type Composition.mode"); 2141 } 2142 else if (name.equals("orderedBy")) { 2143 this.orderedBy = new CodeableConcept(); 2144 return this.orderedBy; 2145 } 2146 else if (name.equals("entry")) { 2147 return addEntry(); 2148 } 2149 else if (name.equals("emptyReason")) { 2150 this.emptyReason = new CodeableConcept(); 2151 return this.emptyReason; 2152 } 2153 else if (name.equals("section")) { 2154 return addSection(); 2155 } 2156 else 2157 return super.addChild(name); 2158 } 2159 2160 public SectionComponent copy() { 2161 SectionComponent dst = new SectionComponent(); 2162 copyValues(dst); 2163 dst.title = title == null ? null : title.copy(); 2164 dst.code = code == null ? null : code.copy(); 2165 dst.text = text == null ? null : text.copy(); 2166 dst.mode = mode == null ? null : mode.copy(); 2167 dst.orderedBy = orderedBy == null ? null : orderedBy.copy(); 2168 if (entry != null) { 2169 dst.entry = new ArrayList<Reference>(); 2170 for (Reference i : entry) 2171 dst.entry.add(i.copy()); 2172 }; 2173 dst.emptyReason = emptyReason == null ? null : emptyReason.copy(); 2174 if (section != null) { 2175 dst.section = new ArrayList<SectionComponent>(); 2176 for (SectionComponent i : section) 2177 dst.section.add(i.copy()); 2178 }; 2179 return dst; 2180 } 2181 2182 @Override 2183 public boolean equalsDeep(Base other_) { 2184 if (!super.equalsDeep(other_)) 2185 return false; 2186 if (!(other_ instanceof SectionComponent)) 2187 return false; 2188 SectionComponent o = (SectionComponent) other_; 2189 return compareDeep(title, o.title, true) && compareDeep(code, o.code, true) && compareDeep(text, o.text, true) 2190 && compareDeep(mode, o.mode, true) && compareDeep(orderedBy, o.orderedBy, true) && compareDeep(entry, o.entry, true) 2191 && compareDeep(emptyReason, o.emptyReason, true) && compareDeep(section, o.section, true); 2192 } 2193 2194 @Override 2195 public boolean equalsShallow(Base other_) { 2196 if (!super.equalsShallow(other_)) 2197 return false; 2198 if (!(other_ instanceof SectionComponent)) 2199 return false; 2200 SectionComponent o = (SectionComponent) other_; 2201 return compareValues(title, o.title, true) && compareValues(mode, o.mode, true); 2202 } 2203 2204 public boolean isEmpty() { 2205 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(title, code, text, mode 2206 , orderedBy, entry, emptyReason, section); 2207 } 2208 2209 public String fhirType() { 2210 return "Composition.section"; 2211 2212 } 2213 2214 } 2215 2216 /** 2217 * Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time. 2218 */ 2219 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) 2220 @Description(shortDefinition="Logical identifier of composition (version-independent)", formalDefinition="Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time." ) 2221 protected Identifier identifier; 2222 2223 /** 2224 * The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document. 2225 */ 2226 @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) 2227 @Description(shortDefinition="preliminary | final | amended | entered-in-error", formalDefinition="The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document." ) 2228 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/composition-status") 2229 protected Enumeration<CompositionStatus> status; 2230 2231 /** 2232 * Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition. 2233 */ 2234 @Child(name = "type", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=true) 2235 @Description(shortDefinition="Kind of composition (LOINC if possible)", formalDefinition="Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition." ) 2236 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/doc-typecodes") 2237 protected CodeableConcept type; 2238 2239 /** 2240 * A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type. 2241 */ 2242 @Child(name = "class", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) 2243 @Description(shortDefinition="Categorization of Composition", formalDefinition="A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type." ) 2244 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/doc-classcodes") 2245 protected CodeableConcept class_; 2246 2247 /** 2248 * Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure). 2249 */ 2250 @Child(name = "subject", type = {Reference.class}, order=4, min=1, max=1, modifier=false, summary=true) 2251 @Description(shortDefinition="Who and/or what the composition is about", formalDefinition="Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure)." ) 2252 protected Reference subject; 2253 2254 /** 2255 * The actual object that is the target of the reference (Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).) 2256 */ 2257 protected Resource subjectTarget; 2258 2259 /** 2260 * Describes the clinical encounter or type of care this documentation is associated with. 2261 */ 2262 @Child(name = "encounter", type = {Encounter.class}, order=5, min=0, max=1, modifier=false, summary=true) 2263 @Description(shortDefinition="Context of the Composition", formalDefinition="Describes the clinical encounter or type of care this documentation is associated with." ) 2264 protected Reference encounter; 2265 2266 /** 2267 * The actual object that is the target of the reference (Describes the clinical encounter or type of care this documentation is associated with.) 2268 */ 2269 protected Encounter encounterTarget; 2270 2271 /** 2272 * The composition editing time, when the composition was last logically changed by the author. 2273 */ 2274 @Child(name = "date", type = {DateTimeType.class}, order=6, min=1, max=1, modifier=false, summary=true) 2275 @Description(shortDefinition="Composition editing time", formalDefinition="The composition editing time, when the composition was last logically changed by the author." ) 2276 protected DateTimeType date; 2277 2278 /** 2279 * Identifies who is responsible for the information in the composition, not necessarily who typed it in. 2280 */ 2281 @Child(name = "author", type = {Practitioner.class, Device.class, Patient.class, RelatedPerson.class}, order=7, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2282 @Description(shortDefinition="Who and/or what authored the composition", formalDefinition="Identifies who is responsible for the information in the composition, not necessarily who typed it in." ) 2283 protected List<Reference> author; 2284 /** 2285 * The actual objects that are the target of the reference (Identifies who is responsible for the information in the composition, not necessarily who typed it in.) 2286 */ 2287 protected List<Resource> authorTarget; 2288 2289 2290 /** 2291 * Official human-readable label for the composition. 2292 */ 2293 @Child(name = "title", type = {StringType.class}, order=8, min=1, max=1, modifier=false, summary=true) 2294 @Description(shortDefinition="Human Readable name/title", formalDefinition="Official human-readable label for the composition." ) 2295 protected StringType title; 2296 2297 /** 2298 * The code specifying the level of confidentiality of the Composition. 2299 */ 2300 @Child(name = "confidentiality", type = {CodeType.class}, order=9, min=0, max=1, modifier=true, summary=true) 2301 @Description(shortDefinition="As defined by affinity domain", formalDefinition="The code specifying the level of confidentiality of the Composition." ) 2302 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v3-ConfidentialityClassification") 2303 protected Enumeration<DocumentConfidentiality> confidentiality; 2304 2305 /** 2306 * A participant who has attested to the accuracy of the composition/document. 2307 */ 2308 @Child(name = "attester", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2309 @Description(shortDefinition="Attests to accuracy of composition", formalDefinition="A participant who has attested to the accuracy of the composition/document." ) 2310 protected List<CompositionAttesterComponent> attester; 2311 2312 /** 2313 * Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information. 2314 */ 2315 @Child(name = "custodian", type = {Organization.class}, order=11, min=0, max=1, modifier=false, summary=true) 2316 @Description(shortDefinition="Organization which maintains the composition", formalDefinition="Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information." ) 2317 protected Reference custodian; 2318 2319 /** 2320 * The actual object that is the target of the reference (Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.) 2321 */ 2322 protected Organization custodianTarget; 2323 2324 /** 2325 * Relationships that this composition has with other compositions or documents that already exist. 2326 */ 2327 @Child(name = "relatesTo", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2328 @Description(shortDefinition="Relationships to other compositions/documents", formalDefinition="Relationships that this composition has with other compositions or documents that already exist." ) 2329 protected List<CompositionRelatesToComponent> relatesTo; 2330 2331 /** 2332 * The clinical service, such as a colonoscopy or an appendectomy, being documented. 2333 */ 2334 @Child(name = "event", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2335 @Description(shortDefinition="The clinical service(s) being documented", formalDefinition="The clinical service, such as a colonoscopy or an appendectomy, being documented." ) 2336 protected List<CompositionEventComponent> event; 2337 2338 /** 2339 * The root of the sections that make up the composition. 2340 */ 2341 @Child(name = "section", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2342 @Description(shortDefinition="Composition is broken into sections", formalDefinition="The root of the sections that make up the composition." ) 2343 protected List<SectionComponent> section; 2344 2345 private static final long serialVersionUID = -1422555114L; 2346 2347 /** 2348 * Constructor 2349 */ 2350 public Composition() { 2351 super(); 2352 } 2353 2354 /** 2355 * Constructor 2356 */ 2357 public Composition(Enumeration<CompositionStatus> status, CodeableConcept type, Reference subject, DateTimeType date, StringType title) { 2358 super(); 2359 this.status = status; 2360 this.type = type; 2361 this.subject = subject; 2362 this.date = date; 2363 this.title = title; 2364 } 2365 2366 /** 2367 * @return {@link #identifier} (Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time.) 2368 */ 2369 public Identifier getIdentifier() { 2370 if (this.identifier == null) 2371 if (Configuration.errorOnAutoCreate()) 2372 throw new Error("Attempt to auto-create Composition.identifier"); 2373 else if (Configuration.doAutoCreate()) 2374 this.identifier = new Identifier(); // cc 2375 return this.identifier; 2376 } 2377 2378 public boolean hasIdentifier() { 2379 return this.identifier != null && !this.identifier.isEmpty(); 2380 } 2381 2382 /** 2383 * @param value {@link #identifier} (Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time.) 2384 */ 2385 public Composition setIdentifier(Identifier value) { 2386 this.identifier = value; 2387 return this; 2388 } 2389 2390 /** 2391 * @return {@link #status} (The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2392 */ 2393 public Enumeration<CompositionStatus> getStatusElement() { 2394 if (this.status == null) 2395 if (Configuration.errorOnAutoCreate()) 2396 throw new Error("Attempt to auto-create Composition.status"); 2397 else if (Configuration.doAutoCreate()) 2398 this.status = new Enumeration<CompositionStatus>(new CompositionStatusEnumFactory()); // bb 2399 return this.status; 2400 } 2401 2402 public boolean hasStatusElement() { 2403 return this.status != null && !this.status.isEmpty(); 2404 } 2405 2406 public boolean hasStatus() { 2407 return this.status != null && !this.status.isEmpty(); 2408 } 2409 2410 /** 2411 * @param value {@link #status} (The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2412 */ 2413 public Composition setStatusElement(Enumeration<CompositionStatus> value) { 2414 this.status = value; 2415 return this; 2416 } 2417 2418 /** 2419 * @return The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document. 2420 */ 2421 public CompositionStatus getStatus() { 2422 return this.status == null ? null : this.status.getValue(); 2423 } 2424 2425 /** 2426 * @param value The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document. 2427 */ 2428 public Composition setStatus(CompositionStatus value) { 2429 if (this.status == null) 2430 this.status = new Enumeration<CompositionStatus>(new CompositionStatusEnumFactory()); 2431 this.status.setValue(value); 2432 return this; 2433 } 2434 2435 /** 2436 * @return {@link #type} (Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.) 2437 */ 2438 public CodeableConcept getType() { 2439 if (this.type == null) 2440 if (Configuration.errorOnAutoCreate()) 2441 throw new Error("Attempt to auto-create Composition.type"); 2442 else if (Configuration.doAutoCreate()) 2443 this.type = new CodeableConcept(); // cc 2444 return this.type; 2445 } 2446 2447 public boolean hasType() { 2448 return this.type != null && !this.type.isEmpty(); 2449 } 2450 2451 /** 2452 * @param value {@link #type} (Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.) 2453 */ 2454 public Composition setType(CodeableConcept value) { 2455 this.type = value; 2456 return this; 2457 } 2458 2459 /** 2460 * @return {@link #class_} (A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.) 2461 */ 2462 public CodeableConcept getClass_() { 2463 if (this.class_ == null) 2464 if (Configuration.errorOnAutoCreate()) 2465 throw new Error("Attempt to auto-create Composition.class_"); 2466 else if (Configuration.doAutoCreate()) 2467 this.class_ = new CodeableConcept(); // cc 2468 return this.class_; 2469 } 2470 2471 public boolean hasClass_() { 2472 return this.class_ != null && !this.class_.isEmpty(); 2473 } 2474 2475 /** 2476 * @param value {@link #class_} (A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.) 2477 */ 2478 public Composition setClass_(CodeableConcept value) { 2479 this.class_ = value; 2480 return this; 2481 } 2482 2483 /** 2484 * @return {@link #subject} (Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).) 2485 */ 2486 public Reference getSubject() { 2487 if (this.subject == null) 2488 if (Configuration.errorOnAutoCreate()) 2489 throw new Error("Attempt to auto-create Composition.subject"); 2490 else if (Configuration.doAutoCreate()) 2491 this.subject = new Reference(); // cc 2492 return this.subject; 2493 } 2494 2495 public boolean hasSubject() { 2496 return this.subject != null && !this.subject.isEmpty(); 2497 } 2498 2499 /** 2500 * @param value {@link #subject} (Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).) 2501 */ 2502 public Composition setSubject(Reference value) { 2503 this.subject = value; 2504 return this; 2505 } 2506 2507 /** 2508 * @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. (Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).) 2509 */ 2510 public Resource getSubjectTarget() { 2511 return this.subjectTarget; 2512 } 2513 2514 /** 2515 * @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. (Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).) 2516 */ 2517 public Composition setSubjectTarget(Resource value) { 2518 this.subjectTarget = value; 2519 return this; 2520 } 2521 2522 /** 2523 * @return {@link #encounter} (Describes the clinical encounter or type of care this documentation is associated with.) 2524 */ 2525 public Reference getEncounter() { 2526 if (this.encounter == null) 2527 if (Configuration.errorOnAutoCreate()) 2528 throw new Error("Attempt to auto-create Composition.encounter"); 2529 else if (Configuration.doAutoCreate()) 2530 this.encounter = new Reference(); // cc 2531 return this.encounter; 2532 } 2533 2534 public boolean hasEncounter() { 2535 return this.encounter != null && !this.encounter.isEmpty(); 2536 } 2537 2538 /** 2539 * @param value {@link #encounter} (Describes the clinical encounter or type of care this documentation is associated with.) 2540 */ 2541 public Composition setEncounter(Reference value) { 2542 this.encounter = value; 2543 return this; 2544 } 2545 2546 /** 2547 * @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. (Describes the clinical encounter or type of care this documentation is associated with.) 2548 */ 2549 public Encounter getEncounterTarget() { 2550 if (this.encounterTarget == null) 2551 if (Configuration.errorOnAutoCreate()) 2552 throw new Error("Attempt to auto-create Composition.encounter"); 2553 else if (Configuration.doAutoCreate()) 2554 this.encounterTarget = new Encounter(); // aa 2555 return this.encounterTarget; 2556 } 2557 2558 /** 2559 * @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. (Describes the clinical encounter or type of care this documentation is associated with.) 2560 */ 2561 public Composition setEncounterTarget(Encounter value) { 2562 this.encounterTarget = value; 2563 return this; 2564 } 2565 2566 /** 2567 * @return {@link #date} (The composition editing time, when the composition was last logically changed by the author.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 2568 */ 2569 public DateTimeType getDateElement() { 2570 if (this.date == null) 2571 if (Configuration.errorOnAutoCreate()) 2572 throw new Error("Attempt to auto-create Composition.date"); 2573 else if (Configuration.doAutoCreate()) 2574 this.date = new DateTimeType(); // bb 2575 return this.date; 2576 } 2577 2578 public boolean hasDateElement() { 2579 return this.date != null && !this.date.isEmpty(); 2580 } 2581 2582 public boolean hasDate() { 2583 return this.date != null && !this.date.isEmpty(); 2584 } 2585 2586 /** 2587 * @param value {@link #date} (The composition editing time, when the composition was last logically changed by the author.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 2588 */ 2589 public Composition setDateElement(DateTimeType value) { 2590 this.date = value; 2591 return this; 2592 } 2593 2594 /** 2595 * @return The composition editing time, when the composition was last logically changed by the author. 2596 */ 2597 public Date getDate() { 2598 return this.date == null ? null : this.date.getValue(); 2599 } 2600 2601 /** 2602 * @param value The composition editing time, when the composition was last logically changed by the author. 2603 */ 2604 public Composition setDate(Date value) { 2605 if (this.date == null) 2606 this.date = new DateTimeType(); 2607 this.date.setValue(value); 2608 return this; 2609 } 2610 2611 /** 2612 * @return {@link #author} (Identifies who is responsible for the information in the composition, not necessarily who typed it in.) 2613 */ 2614 public List<Reference> getAuthor() { 2615 if (this.author == null) 2616 this.author = new ArrayList<Reference>(); 2617 return this.author; 2618 } 2619 2620 /** 2621 * @return Returns a reference to <code>this</code> for easy method chaining 2622 */ 2623 public Composition setAuthor(List<Reference> theAuthor) { 2624 this.author = theAuthor; 2625 return this; 2626 } 2627 2628 public boolean hasAuthor() { 2629 if (this.author == null) 2630 return false; 2631 for (Reference item : this.author) 2632 if (!item.isEmpty()) 2633 return true; 2634 return false; 2635 } 2636 2637 public Reference addAuthor() { //3 2638 Reference t = new Reference(); 2639 if (this.author == null) 2640 this.author = new ArrayList<Reference>(); 2641 this.author.add(t); 2642 return t; 2643 } 2644 2645 public Composition addAuthor(Reference t) { //3 2646 if (t == null) 2647 return this; 2648 if (this.author == null) 2649 this.author = new ArrayList<Reference>(); 2650 this.author.add(t); 2651 return this; 2652 } 2653 2654 /** 2655 * @return The first repetition of repeating field {@link #author}, creating it if it does not already exist 2656 */ 2657 public Reference getAuthorFirstRep() { 2658 if (getAuthor().isEmpty()) { 2659 addAuthor(); 2660 } 2661 return getAuthor().get(0); 2662 } 2663 2664 /** 2665 * @deprecated Use Reference#setResource(IBaseResource) instead 2666 */ 2667 @Deprecated 2668 public List<Resource> getAuthorTarget() { 2669 if (this.authorTarget == null) 2670 this.authorTarget = new ArrayList<Resource>(); 2671 return this.authorTarget; 2672 } 2673 2674 /** 2675 * @return {@link #title} (Official human-readable label for the composition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 2676 */ 2677 public StringType getTitleElement() { 2678 if (this.title == null) 2679 if (Configuration.errorOnAutoCreate()) 2680 throw new Error("Attempt to auto-create Composition.title"); 2681 else if (Configuration.doAutoCreate()) 2682 this.title = new StringType(); // bb 2683 return this.title; 2684 } 2685 2686 public boolean hasTitleElement() { 2687 return this.title != null && !this.title.isEmpty(); 2688 } 2689 2690 public boolean hasTitle() { 2691 return this.title != null && !this.title.isEmpty(); 2692 } 2693 2694 /** 2695 * @param value {@link #title} (Official human-readable label for the composition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 2696 */ 2697 public Composition setTitleElement(StringType value) { 2698 this.title = value; 2699 return this; 2700 } 2701 2702 /** 2703 * @return Official human-readable label for the composition. 2704 */ 2705 public String getTitle() { 2706 return this.title == null ? null : this.title.getValue(); 2707 } 2708 2709 /** 2710 * @param value Official human-readable label for the composition. 2711 */ 2712 public Composition setTitle(String value) { 2713 if (this.title == null) 2714 this.title = new StringType(); 2715 this.title.setValue(value); 2716 return this; 2717 } 2718 2719 /** 2720 * @return {@link #confidentiality} (The code specifying the level of confidentiality of the Composition.). This is the underlying object with id, value and extensions. The accessor "getConfidentiality" gives direct access to the value 2721 */ 2722 public Enumeration<DocumentConfidentiality> getConfidentialityElement() { 2723 if (this.confidentiality == null) 2724 if (Configuration.errorOnAutoCreate()) 2725 throw new Error("Attempt to auto-create Composition.confidentiality"); 2726 else if (Configuration.doAutoCreate()) 2727 this.confidentiality = new Enumeration<DocumentConfidentiality>(new DocumentConfidentialityEnumFactory()); // bb 2728 return this.confidentiality; 2729 } 2730 2731 public boolean hasConfidentialityElement() { 2732 return this.confidentiality != null && !this.confidentiality.isEmpty(); 2733 } 2734 2735 public boolean hasConfidentiality() { 2736 return this.confidentiality != null && !this.confidentiality.isEmpty(); 2737 } 2738 2739 /** 2740 * @param value {@link #confidentiality} (The code specifying the level of confidentiality of the Composition.). This is the underlying object with id, value and extensions. The accessor "getConfidentiality" gives direct access to the value 2741 */ 2742 public Composition setConfidentialityElement(Enumeration<DocumentConfidentiality> value) { 2743 this.confidentiality = value; 2744 return this; 2745 } 2746 2747 /** 2748 * @return The code specifying the level of confidentiality of the Composition. 2749 */ 2750 public DocumentConfidentiality getConfidentiality() { 2751 return this.confidentiality == null ? null : this.confidentiality.getValue(); 2752 } 2753 2754 /** 2755 * @param value The code specifying the level of confidentiality of the Composition. 2756 */ 2757 public Composition setConfidentiality(DocumentConfidentiality value) { 2758 if (value == null) 2759 this.confidentiality = null; 2760 else { 2761 if (this.confidentiality == null) 2762 this.confidentiality = new Enumeration<DocumentConfidentiality>(new DocumentConfidentialityEnumFactory()); 2763 this.confidentiality.setValue(value); 2764 } 2765 return this; 2766 } 2767 2768 /** 2769 * @return {@link #attester} (A participant who has attested to the accuracy of the composition/document.) 2770 */ 2771 public List<CompositionAttesterComponent> getAttester() { 2772 if (this.attester == null) 2773 this.attester = new ArrayList<CompositionAttesterComponent>(); 2774 return this.attester; 2775 } 2776 2777 /** 2778 * @return Returns a reference to <code>this</code> for easy method chaining 2779 */ 2780 public Composition setAttester(List<CompositionAttesterComponent> theAttester) { 2781 this.attester = theAttester; 2782 return this; 2783 } 2784 2785 public boolean hasAttester() { 2786 if (this.attester == null) 2787 return false; 2788 for (CompositionAttesterComponent item : this.attester) 2789 if (!item.isEmpty()) 2790 return true; 2791 return false; 2792 } 2793 2794 public CompositionAttesterComponent addAttester() { //3 2795 CompositionAttesterComponent t = new CompositionAttesterComponent(); 2796 if (this.attester == null) 2797 this.attester = new ArrayList<CompositionAttesterComponent>(); 2798 this.attester.add(t); 2799 return t; 2800 } 2801 2802 public Composition addAttester(CompositionAttesterComponent t) { //3 2803 if (t == null) 2804 return this; 2805 if (this.attester == null) 2806 this.attester = new ArrayList<CompositionAttesterComponent>(); 2807 this.attester.add(t); 2808 return this; 2809 } 2810 2811 /** 2812 * @return The first repetition of repeating field {@link #attester}, creating it if it does not already exist 2813 */ 2814 public CompositionAttesterComponent getAttesterFirstRep() { 2815 if (getAttester().isEmpty()) { 2816 addAttester(); 2817 } 2818 return getAttester().get(0); 2819 } 2820 2821 /** 2822 * @return {@link #custodian} (Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.) 2823 */ 2824 public Reference getCustodian() { 2825 if (this.custodian == null) 2826 if (Configuration.errorOnAutoCreate()) 2827 throw new Error("Attempt to auto-create Composition.custodian"); 2828 else if (Configuration.doAutoCreate()) 2829 this.custodian = new Reference(); // cc 2830 return this.custodian; 2831 } 2832 2833 public boolean hasCustodian() { 2834 return this.custodian != null && !this.custodian.isEmpty(); 2835 } 2836 2837 /** 2838 * @param value {@link #custodian} (Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.) 2839 */ 2840 public Composition setCustodian(Reference value) { 2841 this.custodian = value; 2842 return this; 2843 } 2844 2845 /** 2846 * @return {@link #custodian} 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. (Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.) 2847 */ 2848 public Organization getCustodianTarget() { 2849 if (this.custodianTarget == null) 2850 if (Configuration.errorOnAutoCreate()) 2851 throw new Error("Attempt to auto-create Composition.custodian"); 2852 else if (Configuration.doAutoCreate()) 2853 this.custodianTarget = new Organization(); // aa 2854 return this.custodianTarget; 2855 } 2856 2857 /** 2858 * @param value {@link #custodian} 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. (Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.) 2859 */ 2860 public Composition setCustodianTarget(Organization value) { 2861 this.custodianTarget = value; 2862 return this; 2863 } 2864 2865 /** 2866 * @return {@link #relatesTo} (Relationships that this composition has with other compositions or documents that already exist.) 2867 */ 2868 public List<CompositionRelatesToComponent> getRelatesTo() { 2869 if (this.relatesTo == null) 2870 this.relatesTo = new ArrayList<CompositionRelatesToComponent>(); 2871 return this.relatesTo; 2872 } 2873 2874 /** 2875 * @return Returns a reference to <code>this</code> for easy method chaining 2876 */ 2877 public Composition setRelatesTo(List<CompositionRelatesToComponent> theRelatesTo) { 2878 this.relatesTo = theRelatesTo; 2879 return this; 2880 } 2881 2882 public boolean hasRelatesTo() { 2883 if (this.relatesTo == null) 2884 return false; 2885 for (CompositionRelatesToComponent item : this.relatesTo) 2886 if (!item.isEmpty()) 2887 return true; 2888 return false; 2889 } 2890 2891 public CompositionRelatesToComponent addRelatesTo() { //3 2892 CompositionRelatesToComponent t = new CompositionRelatesToComponent(); 2893 if (this.relatesTo == null) 2894 this.relatesTo = new ArrayList<CompositionRelatesToComponent>(); 2895 this.relatesTo.add(t); 2896 return t; 2897 } 2898 2899 public Composition addRelatesTo(CompositionRelatesToComponent t) { //3 2900 if (t == null) 2901 return this; 2902 if (this.relatesTo == null) 2903 this.relatesTo = new ArrayList<CompositionRelatesToComponent>(); 2904 this.relatesTo.add(t); 2905 return this; 2906 } 2907 2908 /** 2909 * @return The first repetition of repeating field {@link #relatesTo}, creating it if it does not already exist 2910 */ 2911 public CompositionRelatesToComponent getRelatesToFirstRep() { 2912 if (getRelatesTo().isEmpty()) { 2913 addRelatesTo(); 2914 } 2915 return getRelatesTo().get(0); 2916 } 2917 2918 /** 2919 * @return {@link #event} (The clinical service, such as a colonoscopy or an appendectomy, being documented.) 2920 */ 2921 public List<CompositionEventComponent> getEvent() { 2922 if (this.event == null) 2923 this.event = new ArrayList<CompositionEventComponent>(); 2924 return this.event; 2925 } 2926 2927 /** 2928 * @return Returns a reference to <code>this</code> for easy method chaining 2929 */ 2930 public Composition setEvent(List<CompositionEventComponent> theEvent) { 2931 this.event = theEvent; 2932 return this; 2933 } 2934 2935 public boolean hasEvent() { 2936 if (this.event == null) 2937 return false; 2938 for (CompositionEventComponent item : this.event) 2939 if (!item.isEmpty()) 2940 return true; 2941 return false; 2942 } 2943 2944 public CompositionEventComponent addEvent() { //3 2945 CompositionEventComponent t = new CompositionEventComponent(); 2946 if (this.event == null) 2947 this.event = new ArrayList<CompositionEventComponent>(); 2948 this.event.add(t); 2949 return t; 2950 } 2951 2952 public Composition addEvent(CompositionEventComponent t) { //3 2953 if (t == null) 2954 return this; 2955 if (this.event == null) 2956 this.event = new ArrayList<CompositionEventComponent>(); 2957 this.event.add(t); 2958 return this; 2959 } 2960 2961 /** 2962 * @return The first repetition of repeating field {@link #event}, creating it if it does not already exist 2963 */ 2964 public CompositionEventComponent getEventFirstRep() { 2965 if (getEvent().isEmpty()) { 2966 addEvent(); 2967 } 2968 return getEvent().get(0); 2969 } 2970 2971 /** 2972 * @return {@link #section} (The root of the sections that make up the composition.) 2973 */ 2974 public List<SectionComponent> getSection() { 2975 if (this.section == null) 2976 this.section = new ArrayList<SectionComponent>(); 2977 return this.section; 2978 } 2979 2980 /** 2981 * @return Returns a reference to <code>this</code> for easy method chaining 2982 */ 2983 public Composition setSection(List<SectionComponent> theSection) { 2984 this.section = theSection; 2985 return this; 2986 } 2987 2988 public boolean hasSection() { 2989 if (this.section == null) 2990 return false; 2991 for (SectionComponent item : this.section) 2992 if (!item.isEmpty()) 2993 return true; 2994 return false; 2995 } 2996 2997 public SectionComponent addSection() { //3 2998 SectionComponent t = new SectionComponent(); 2999 if (this.section == null) 3000 this.section = new ArrayList<SectionComponent>(); 3001 this.section.add(t); 3002 return t; 3003 } 3004 3005 public Composition addSection(SectionComponent t) { //3 3006 if (t == null) 3007 return this; 3008 if (this.section == null) 3009 this.section = new ArrayList<SectionComponent>(); 3010 this.section.add(t); 3011 return this; 3012 } 3013 3014 /** 3015 * @return The first repetition of repeating field {@link #section}, creating it if it does not already exist 3016 */ 3017 public SectionComponent getSectionFirstRep() { 3018 if (getSection().isEmpty()) { 3019 addSection(); 3020 } 3021 return getSection().get(0); 3022 } 3023 3024 protected void listChildren(List<Property> children) { 3025 super.listChildren(children); 3026 children.add(new Property("identifier", "Identifier", "Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time.", 0, 1, identifier)); 3027 children.add(new Property("status", "code", "The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.", 0, 1, status)); 3028 children.add(new Property("type", "CodeableConcept", "Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.", 0, 1, type)); 3029 children.add(new Property("class", "CodeableConcept", "A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.", 0, 1, class_)); 3030 children.add(new Property("subject", "Reference(Any)", "Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).", 0, 1, subject)); 3031 children.add(new Property("encounter", "Reference(Encounter)", "Describes the clinical encounter or type of care this documentation is associated with.", 0, 1, encounter)); 3032 children.add(new Property("date", "dateTime", "The composition editing time, when the composition was last logically changed by the author.", 0, 1, date)); 3033 children.add(new Property("author", "Reference(Practitioner|Device|Patient|RelatedPerson)", "Identifies who is responsible for the information in the composition, not necessarily who typed it in.", 0, java.lang.Integer.MAX_VALUE, author)); 3034 children.add(new Property("title", "string", "Official human-readable label for the composition.", 0, 1, title)); 3035 children.add(new Property("confidentiality", "code", "The code specifying the level of confidentiality of the Composition.", 0, 1, confidentiality)); 3036 children.add(new Property("attester", "", "A participant who has attested to the accuracy of the composition/document.", 0, java.lang.Integer.MAX_VALUE, attester)); 3037 children.add(new Property("custodian", "Reference(Organization)", "Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.", 0, 1, custodian)); 3038 children.add(new Property("relatesTo", "", "Relationships that this composition has with other compositions or documents that already exist.", 0, java.lang.Integer.MAX_VALUE, relatesTo)); 3039 children.add(new Property("event", "", "The clinical service, such as a colonoscopy or an appendectomy, being documented.", 0, java.lang.Integer.MAX_VALUE, event)); 3040 children.add(new Property("section", "", "The root of the sections that make up the composition.", 0, java.lang.Integer.MAX_VALUE, section)); 3041 } 3042 3043 @Override 3044 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3045 switch (_hash) { 3046 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time.", 0, 1, identifier); 3047 case -892481550: /*status*/ return new Property("status", "code", "The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.", 0, 1, status); 3048 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.", 0, 1, type); 3049 case 94742904: /*class*/ return new Property("class", "CodeableConcept", "A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.", 0, 1, class_); 3050 case -1867885268: /*subject*/ return new Property("subject", "Reference(Any)", "Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).", 0, 1, subject); 3051 case 1524132147: /*encounter*/ return new Property("encounter", "Reference(Encounter)", "Describes the clinical encounter or type of care this documentation is associated with.", 0, 1, encounter); 3052 case 3076014: /*date*/ return new Property("date", "dateTime", "The composition editing time, when the composition was last logically changed by the author.", 0, 1, date); 3053 case -1406328437: /*author*/ return new Property("author", "Reference(Practitioner|Device|Patient|RelatedPerson)", "Identifies who is responsible for the information in the composition, not necessarily who typed it in.", 0, java.lang.Integer.MAX_VALUE, author); 3054 case 110371416: /*title*/ return new Property("title", "string", "Official human-readable label for the composition.", 0, 1, title); 3055 case -1923018202: /*confidentiality*/ return new Property("confidentiality", "code", "The code specifying the level of confidentiality of the Composition.", 0, 1, confidentiality); 3056 case 542920370: /*attester*/ return new Property("attester", "", "A participant who has attested to the accuracy of the composition/document.", 0, java.lang.Integer.MAX_VALUE, attester); 3057 case 1611297262: /*custodian*/ return new Property("custodian", "Reference(Organization)", "Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.", 0, 1, custodian); 3058 case -7765931: /*relatesTo*/ return new Property("relatesTo", "", "Relationships that this composition has with other compositions or documents that already exist.", 0, java.lang.Integer.MAX_VALUE, relatesTo); 3059 case 96891546: /*event*/ return new Property("event", "", "The clinical service, such as a colonoscopy or an appendectomy, being documented.", 0, java.lang.Integer.MAX_VALUE, event); 3060 case 1970241253: /*section*/ return new Property("section", "", "The root of the sections that make up the composition.", 0, java.lang.Integer.MAX_VALUE, section); 3061 default: return super.getNamedProperty(_hash, _name, _checkValid); 3062 } 3063 3064 } 3065 3066 @Override 3067 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3068 switch (hash) { 3069 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 3070 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<CompositionStatus> 3071 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 3072 case 94742904: /*class*/ return this.class_ == null ? new Base[0] : new Base[] {this.class_}; // CodeableConcept 3073 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 3074 case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference 3075 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 3076 case -1406328437: /*author*/ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // Reference 3077 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 3078 case -1923018202: /*confidentiality*/ return this.confidentiality == null ? new Base[0] : new Base[] {this.confidentiality}; // Enumeration<DocumentConfidentiality> 3079 case 542920370: /*attester*/ return this.attester == null ? new Base[0] : this.attester.toArray(new Base[this.attester.size()]); // CompositionAttesterComponent 3080 case 1611297262: /*custodian*/ return this.custodian == null ? new Base[0] : new Base[] {this.custodian}; // Reference 3081 case -7765931: /*relatesTo*/ return this.relatesTo == null ? new Base[0] : this.relatesTo.toArray(new Base[this.relatesTo.size()]); // CompositionRelatesToComponent 3082 case 96891546: /*event*/ return this.event == null ? new Base[0] : this.event.toArray(new Base[this.event.size()]); // CompositionEventComponent 3083 case 1970241253: /*section*/ return this.section == null ? new Base[0] : this.section.toArray(new Base[this.section.size()]); // SectionComponent 3084 default: return super.getProperty(hash, name, checkValid); 3085 } 3086 3087 } 3088 3089 @Override 3090 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3091 switch (hash) { 3092 case -1618432855: // identifier 3093 this.identifier = castToIdentifier(value); // Identifier 3094 return value; 3095 case -892481550: // status 3096 value = new CompositionStatusEnumFactory().fromType(castToCode(value)); 3097 this.status = (Enumeration) value; // Enumeration<CompositionStatus> 3098 return value; 3099 case 3575610: // type 3100 this.type = castToCodeableConcept(value); // CodeableConcept 3101 return value; 3102 case 94742904: // class 3103 this.class_ = castToCodeableConcept(value); // CodeableConcept 3104 return value; 3105 case -1867885268: // subject 3106 this.subject = castToReference(value); // Reference 3107 return value; 3108 case 1524132147: // encounter 3109 this.encounter = castToReference(value); // Reference 3110 return value; 3111 case 3076014: // date 3112 this.date = castToDateTime(value); // DateTimeType 3113 return value; 3114 case -1406328437: // author 3115 this.getAuthor().add(castToReference(value)); // Reference 3116 return value; 3117 case 110371416: // title 3118 this.title = castToString(value); // StringType 3119 return value; 3120 case -1923018202: // confidentiality 3121 value = new DocumentConfidentialityEnumFactory().fromType(castToCode(value)); 3122 this.confidentiality = (Enumeration) value; // Enumeration<DocumentConfidentiality> 3123 return value; 3124 case 542920370: // attester 3125 this.getAttester().add((CompositionAttesterComponent) value); // CompositionAttesterComponent 3126 return value; 3127 case 1611297262: // custodian 3128 this.custodian = castToReference(value); // Reference 3129 return value; 3130 case -7765931: // relatesTo 3131 this.getRelatesTo().add((CompositionRelatesToComponent) value); // CompositionRelatesToComponent 3132 return value; 3133 case 96891546: // event 3134 this.getEvent().add((CompositionEventComponent) value); // CompositionEventComponent 3135 return value; 3136 case 1970241253: // section 3137 this.getSection().add((SectionComponent) value); // SectionComponent 3138 return value; 3139 default: return super.setProperty(hash, name, value); 3140 } 3141 3142 } 3143 3144 @Override 3145 public Base setProperty(String name, Base value) throws FHIRException { 3146 if (name.equals("identifier")) { 3147 this.identifier = castToIdentifier(value); // Identifier 3148 } else if (name.equals("status")) { 3149 value = new CompositionStatusEnumFactory().fromType(castToCode(value)); 3150 this.status = (Enumeration) value; // Enumeration<CompositionStatus> 3151 } else if (name.equals("type")) { 3152 this.type = castToCodeableConcept(value); // CodeableConcept 3153 } else if (name.equals("class")) { 3154 this.class_ = castToCodeableConcept(value); // CodeableConcept 3155 } else if (name.equals("subject")) { 3156 this.subject = castToReference(value); // Reference 3157 } else if (name.equals("encounter")) { 3158 this.encounter = castToReference(value); // Reference 3159 } else if (name.equals("date")) { 3160 this.date = castToDateTime(value); // DateTimeType 3161 } else if (name.equals("author")) { 3162 this.getAuthor().add(castToReference(value)); 3163 } else if (name.equals("title")) { 3164 this.title = castToString(value); // StringType 3165 } else if (name.equals("confidentiality")) { 3166 value = new DocumentConfidentialityEnumFactory().fromType(castToCode(value)); 3167 this.confidentiality = (Enumeration) value; // Enumeration<DocumentConfidentiality> 3168 } else if (name.equals("attester")) { 3169 this.getAttester().add((CompositionAttesterComponent) value); 3170 } else if (name.equals("custodian")) { 3171 this.custodian = castToReference(value); // Reference 3172 } else if (name.equals("relatesTo")) { 3173 this.getRelatesTo().add((CompositionRelatesToComponent) value); 3174 } else if (name.equals("event")) { 3175 this.getEvent().add((CompositionEventComponent) value); 3176 } else if (name.equals("section")) { 3177 this.getSection().add((SectionComponent) value); 3178 } else 3179 return super.setProperty(name, value); 3180 return value; 3181 } 3182 3183 @Override 3184 public Base makeProperty(int hash, String name) throws FHIRException { 3185 switch (hash) { 3186 case -1618432855: return getIdentifier(); 3187 case -892481550: return getStatusElement(); 3188 case 3575610: return getType(); 3189 case 94742904: return getClass_(); 3190 case -1867885268: return getSubject(); 3191 case 1524132147: return getEncounter(); 3192 case 3076014: return getDateElement(); 3193 case -1406328437: return addAuthor(); 3194 case 110371416: return getTitleElement(); 3195 case -1923018202: return getConfidentialityElement(); 3196 case 542920370: return addAttester(); 3197 case 1611297262: return getCustodian(); 3198 case -7765931: return addRelatesTo(); 3199 case 96891546: return addEvent(); 3200 case 1970241253: return addSection(); 3201 default: return super.makeProperty(hash, name); 3202 } 3203 3204 } 3205 3206 @Override 3207 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3208 switch (hash) { 3209 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 3210 case -892481550: /*status*/ return new String[] {"code"}; 3211 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 3212 case 94742904: /*class*/ return new String[] {"CodeableConcept"}; 3213 case -1867885268: /*subject*/ return new String[] {"Reference"}; 3214 case 1524132147: /*encounter*/ return new String[] {"Reference"}; 3215 case 3076014: /*date*/ return new String[] {"dateTime"}; 3216 case -1406328437: /*author*/ return new String[] {"Reference"}; 3217 case 110371416: /*title*/ return new String[] {"string"}; 3218 case -1923018202: /*confidentiality*/ return new String[] {"code"}; 3219 case 542920370: /*attester*/ return new String[] {}; 3220 case 1611297262: /*custodian*/ return new String[] {"Reference"}; 3221 case -7765931: /*relatesTo*/ return new String[] {}; 3222 case 96891546: /*event*/ return new String[] {}; 3223 case 1970241253: /*section*/ return new String[] {}; 3224 default: return super.getTypesForProperty(hash, name); 3225 } 3226 3227 } 3228 3229 @Override 3230 public Base addChild(String name) throws FHIRException { 3231 if (name.equals("identifier")) { 3232 this.identifier = new Identifier(); 3233 return this.identifier; 3234 } 3235 else if (name.equals("status")) { 3236 throw new FHIRException("Cannot call addChild on a primitive type Composition.status"); 3237 } 3238 else if (name.equals("type")) { 3239 this.type = new CodeableConcept(); 3240 return this.type; 3241 } 3242 else if (name.equals("class")) { 3243 this.class_ = new CodeableConcept(); 3244 return this.class_; 3245 } 3246 else if (name.equals("subject")) { 3247 this.subject = new Reference(); 3248 return this.subject; 3249 } 3250 else if (name.equals("encounter")) { 3251 this.encounter = new Reference(); 3252 return this.encounter; 3253 } 3254 else if (name.equals("date")) { 3255 throw new FHIRException("Cannot call addChild on a primitive type Composition.date"); 3256 } 3257 else if (name.equals("author")) { 3258 return addAuthor(); 3259 } 3260 else if (name.equals("title")) { 3261 throw new FHIRException("Cannot call addChild on a primitive type Composition.title"); 3262 } 3263 else if (name.equals("confidentiality")) { 3264 throw new FHIRException("Cannot call addChild on a primitive type Composition.confidentiality"); 3265 } 3266 else if (name.equals("attester")) { 3267 return addAttester(); 3268 } 3269 else if (name.equals("custodian")) { 3270 this.custodian = new Reference(); 3271 return this.custodian; 3272 } 3273 else if (name.equals("relatesTo")) { 3274 return addRelatesTo(); 3275 } 3276 else if (name.equals("event")) { 3277 return addEvent(); 3278 } 3279 else if (name.equals("section")) { 3280 return addSection(); 3281 } 3282 else 3283 return super.addChild(name); 3284 } 3285 3286 public String fhirType() { 3287 return "Composition"; 3288 3289 } 3290 3291 public Composition copy() { 3292 Composition dst = new Composition(); 3293 copyValues(dst); 3294 dst.identifier = identifier == null ? null : identifier.copy(); 3295 dst.status = status == null ? null : status.copy(); 3296 dst.type = type == null ? null : type.copy(); 3297 dst.class_ = class_ == null ? null : class_.copy(); 3298 dst.subject = subject == null ? null : subject.copy(); 3299 dst.encounter = encounter == null ? null : encounter.copy(); 3300 dst.date = date == null ? null : date.copy(); 3301 if (author != null) { 3302 dst.author = new ArrayList<Reference>(); 3303 for (Reference i : author) 3304 dst.author.add(i.copy()); 3305 }; 3306 dst.title = title == null ? null : title.copy(); 3307 dst.confidentiality = confidentiality == null ? null : confidentiality.copy(); 3308 if (attester != null) { 3309 dst.attester = new ArrayList<CompositionAttesterComponent>(); 3310 for (CompositionAttesterComponent i : attester) 3311 dst.attester.add(i.copy()); 3312 }; 3313 dst.custodian = custodian == null ? null : custodian.copy(); 3314 if (relatesTo != null) { 3315 dst.relatesTo = new ArrayList<CompositionRelatesToComponent>(); 3316 for (CompositionRelatesToComponent i : relatesTo) 3317 dst.relatesTo.add(i.copy()); 3318 }; 3319 if (event != null) { 3320 dst.event = new ArrayList<CompositionEventComponent>(); 3321 for (CompositionEventComponent i : event) 3322 dst.event.add(i.copy()); 3323 }; 3324 if (section != null) { 3325 dst.section = new ArrayList<SectionComponent>(); 3326 for (SectionComponent i : section) 3327 dst.section.add(i.copy()); 3328 }; 3329 return dst; 3330 } 3331 3332 protected Composition typedCopy() { 3333 return copy(); 3334 } 3335 3336 @Override 3337 public boolean equalsDeep(Base other_) { 3338 if (!super.equalsDeep(other_)) 3339 return false; 3340 if (!(other_ instanceof Composition)) 3341 return false; 3342 Composition o = (Composition) other_; 3343 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(type, o.type, true) 3344 && compareDeep(class_, o.class_, true) && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true) 3345 && compareDeep(date, o.date, true) && compareDeep(author, o.author, true) && compareDeep(title, o.title, true) 3346 && compareDeep(confidentiality, o.confidentiality, true) && compareDeep(attester, o.attester, true) 3347 && compareDeep(custodian, o.custodian, true) && compareDeep(relatesTo, o.relatesTo, true) && compareDeep(event, o.event, true) 3348 && compareDeep(section, o.section, true); 3349 } 3350 3351 @Override 3352 public boolean equalsShallow(Base other_) { 3353 if (!super.equalsShallow(other_)) 3354 return false; 3355 if (!(other_ instanceof Composition)) 3356 return false; 3357 Composition o = (Composition) other_; 3358 return compareValues(status, o.status, true) && compareValues(date, o.date, true) && compareValues(title, o.title, true) 3359 && compareValues(confidentiality, o.confidentiality, true); 3360 } 3361 3362 public boolean isEmpty() { 3363 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, type 3364 , class_, subject, encounter, date, author, title, confidentiality, attester 3365 , custodian, relatesTo, event, section); 3366 } 3367 3368 @Override 3369 public ResourceType getResourceType() { 3370 return ResourceType.Composition; 3371 } 3372 3373 /** 3374 * Search parameter: <b>date</b> 3375 * <p> 3376 * Description: <b>Composition editing time</b><br> 3377 * Type: <b>date</b><br> 3378 * Path: <b>Composition.date</b><br> 3379 * </p> 3380 */ 3381 @SearchParamDefinition(name="date", path="Composition.date", description="Composition editing time", type="date" ) 3382 public static final String SP_DATE = "date"; 3383 /** 3384 * <b>Fluent Client</b> search parameter constant for <b>date</b> 3385 * <p> 3386 * Description: <b>Composition editing time</b><br> 3387 * Type: <b>date</b><br> 3388 * Path: <b>Composition.date</b><br> 3389 * </p> 3390 */ 3391 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 3392 3393 /** 3394 * Search parameter: <b>identifier</b> 3395 * <p> 3396 * Description: <b>Logical identifier of composition (version-independent)</b><br> 3397 * Type: <b>token</b><br> 3398 * Path: <b>Composition.identifier</b><br> 3399 * </p> 3400 */ 3401 @SearchParamDefinition(name="identifier", path="Composition.identifier", description="Logical identifier of composition (version-independent)", type="token" ) 3402 public static final String SP_IDENTIFIER = "identifier"; 3403 /** 3404 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 3405 * <p> 3406 * Description: <b>Logical identifier of composition (version-independent)</b><br> 3407 * Type: <b>token</b><br> 3408 * Path: <b>Composition.identifier</b><br> 3409 * </p> 3410 */ 3411 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 3412 3413 /** 3414 * Search parameter: <b>period</b> 3415 * <p> 3416 * Description: <b>The period covered by the documentation</b><br> 3417 * Type: <b>date</b><br> 3418 * Path: <b>Composition.event.period</b><br> 3419 * </p> 3420 */ 3421 @SearchParamDefinition(name="period", path="Composition.event.period", description="The period covered by the documentation", type="date" ) 3422 public static final String SP_PERIOD = "period"; 3423 /** 3424 * <b>Fluent Client</b> search parameter constant for <b>period</b> 3425 * <p> 3426 * Description: <b>The period covered by the documentation</b><br> 3427 * Type: <b>date</b><br> 3428 * Path: <b>Composition.event.period</b><br> 3429 * </p> 3430 */ 3431 public static final ca.uhn.fhir.rest.gclient.DateClientParam PERIOD = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_PERIOD); 3432 3433 /** 3434 * Search parameter: <b>related-id</b> 3435 * <p> 3436 * Description: <b>Target of the relationship</b><br> 3437 * Type: <b>token</b><br> 3438 * Path: <b>Composition.relatesTo.targetIdentifier</b><br> 3439 * </p> 3440 */ 3441 @SearchParamDefinition(name="related-id", path="Composition.relatesTo.target.as(Identifier)", description="Target of the relationship", type="token" ) 3442 public static final String SP_RELATED_ID = "related-id"; 3443 /** 3444 * <b>Fluent Client</b> search parameter constant for <b>related-id</b> 3445 * <p> 3446 * Description: <b>Target of the relationship</b><br> 3447 * Type: <b>token</b><br> 3448 * Path: <b>Composition.relatesTo.targetIdentifier</b><br> 3449 * </p> 3450 */ 3451 public static final ca.uhn.fhir.rest.gclient.TokenClientParam RELATED_ID = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_RELATED_ID); 3452 3453 /** 3454 * Search parameter: <b>subject</b> 3455 * <p> 3456 * Description: <b>Who and/or what the composition is about</b><br> 3457 * Type: <b>reference</b><br> 3458 * Path: <b>Composition.subject</b><br> 3459 * </p> 3460 */ 3461 @SearchParamDefinition(name="subject", path="Composition.subject", description="Who and/or what the composition is about", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) 3462 public static final String SP_SUBJECT = "subject"; 3463 /** 3464 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 3465 * <p> 3466 * Description: <b>Who and/or what the composition is about</b><br> 3467 * Type: <b>reference</b><br> 3468 * Path: <b>Composition.subject</b><br> 3469 * </p> 3470 */ 3471 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 3472 3473/** 3474 * Constant for fluent queries to be used to add include statements. Specifies 3475 * the path value of "<b>Composition:subject</b>". 3476 */ 3477 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Composition:subject").toLocked(); 3478 3479 /** 3480 * Search parameter: <b>author</b> 3481 * <p> 3482 * Description: <b>Who and/or what authored the composition</b><br> 3483 * Type: <b>reference</b><br> 3484 * Path: <b>Composition.author</b><br> 3485 * </p> 3486 */ 3487 @SearchParamDefinition(name="author", path="Composition.author", description="Who and/or what authored the composition", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") }, target={Device.class, Patient.class, Practitioner.class, RelatedPerson.class } ) 3488 public static final String SP_AUTHOR = "author"; 3489 /** 3490 * <b>Fluent Client</b> search parameter constant for <b>author</b> 3491 * <p> 3492 * Description: <b>Who and/or what authored the composition</b><br> 3493 * Type: <b>reference</b><br> 3494 * Path: <b>Composition.author</b><br> 3495 * </p> 3496 */ 3497 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AUTHOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AUTHOR); 3498 3499/** 3500 * Constant for fluent queries to be used to add include statements. Specifies 3501 * the path value of "<b>Composition:author</b>". 3502 */ 3503 public static final ca.uhn.fhir.model.api.Include INCLUDE_AUTHOR = new ca.uhn.fhir.model.api.Include("Composition:author").toLocked(); 3504 3505 /** 3506 * Search parameter: <b>confidentiality</b> 3507 * <p> 3508 * Description: <b>As defined by affinity domain</b><br> 3509 * Type: <b>token</b><br> 3510 * Path: <b>Composition.confidentiality</b><br> 3511 * </p> 3512 */ 3513 @SearchParamDefinition(name="confidentiality", path="Composition.confidentiality", description="As defined by affinity domain", type="token" ) 3514 public static final String SP_CONFIDENTIALITY = "confidentiality"; 3515 /** 3516 * <b>Fluent Client</b> search parameter constant for <b>confidentiality</b> 3517 * <p> 3518 * Description: <b>As defined by affinity domain</b><br> 3519 * Type: <b>token</b><br> 3520 * Path: <b>Composition.confidentiality</b><br> 3521 * </p> 3522 */ 3523 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONFIDENTIALITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONFIDENTIALITY); 3524 3525 /** 3526 * Search parameter: <b>section</b> 3527 * <p> 3528 * Description: <b>Classification of section (recommended)</b><br> 3529 * Type: <b>token</b><br> 3530 * Path: <b>Composition.section.code</b><br> 3531 * </p> 3532 */ 3533 @SearchParamDefinition(name="section", path="Composition.section.code", description="Classification of section (recommended)", type="token" ) 3534 public static final String SP_SECTION = "section"; 3535 /** 3536 * <b>Fluent Client</b> search parameter constant for <b>section</b> 3537 * <p> 3538 * Description: <b>Classification of section (recommended)</b><br> 3539 * Type: <b>token</b><br> 3540 * Path: <b>Composition.section.code</b><br> 3541 * </p> 3542 */ 3543 public static final ca.uhn.fhir.rest.gclient.TokenClientParam SECTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SECTION); 3544 3545 /** 3546 * Search parameter: <b>encounter</b> 3547 * <p> 3548 * Description: <b>Context of the Composition</b><br> 3549 * Type: <b>reference</b><br> 3550 * Path: <b>Composition.encounter</b><br> 3551 * </p> 3552 */ 3553 @SearchParamDefinition(name="encounter", path="Composition.encounter", description="Context of the Composition", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") }, target={Encounter.class } ) 3554 public static final String SP_ENCOUNTER = "encounter"; 3555 /** 3556 * <b>Fluent Client</b> search parameter constant for <b>encounter</b> 3557 * <p> 3558 * Description: <b>Context of the Composition</b><br> 3559 * Type: <b>reference</b><br> 3560 * Path: <b>Composition.encounter</b><br> 3561 * </p> 3562 */ 3563 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER); 3564 3565/** 3566 * Constant for fluent queries to be used to add include statements. Specifies 3567 * the path value of "<b>Composition:encounter</b>". 3568 */ 3569 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("Composition:encounter").toLocked(); 3570 3571 /** 3572 * Search parameter: <b>type</b> 3573 * <p> 3574 * Description: <b>Kind of composition (LOINC if possible)</b><br> 3575 * Type: <b>token</b><br> 3576 * Path: <b>Composition.type</b><br> 3577 * </p> 3578 */ 3579 @SearchParamDefinition(name="type", path="Composition.type", description="Kind of composition (LOINC if possible)", type="token" ) 3580 public static final String SP_TYPE = "type"; 3581 /** 3582 * <b>Fluent Client</b> search parameter constant for <b>type</b> 3583 * <p> 3584 * Description: <b>Kind of composition (LOINC if possible)</b><br> 3585 * Type: <b>token</b><br> 3586 * Path: <b>Composition.type</b><br> 3587 * </p> 3588 */ 3589 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); 3590 3591 /** 3592 * Search parameter: <b>title</b> 3593 * <p> 3594 * Description: <b>Human Readable name/title</b><br> 3595 * Type: <b>string</b><br> 3596 * Path: <b>Composition.title</b><br> 3597 * </p> 3598 */ 3599 @SearchParamDefinition(name="title", path="Composition.title", description="Human Readable name/title", type="string" ) 3600 public static final String SP_TITLE = "title"; 3601 /** 3602 * <b>Fluent Client</b> search parameter constant for <b>title</b> 3603 * <p> 3604 * Description: <b>Human Readable name/title</b><br> 3605 * Type: <b>string</b><br> 3606 * Path: <b>Composition.title</b><br> 3607 * </p> 3608 */ 3609 public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE); 3610 3611 /** 3612 * Search parameter: <b>attester</b> 3613 * <p> 3614 * Description: <b>Who attested the composition</b><br> 3615 * Type: <b>reference</b><br> 3616 * Path: <b>Composition.attester.party</b><br> 3617 * </p> 3618 */ 3619 @SearchParamDefinition(name="attester", path="Composition.attester.party", description="Who attested the composition", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Organization.class, Patient.class, Practitioner.class } ) 3620 public static final String SP_ATTESTER = "attester"; 3621 /** 3622 * <b>Fluent Client</b> search parameter constant for <b>attester</b> 3623 * <p> 3624 * Description: <b>Who attested the composition</b><br> 3625 * Type: <b>reference</b><br> 3626 * Path: <b>Composition.attester.party</b><br> 3627 * </p> 3628 */ 3629 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ATTESTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ATTESTER); 3630 3631/** 3632 * Constant for fluent queries to be used to add include statements. Specifies 3633 * the path value of "<b>Composition:attester</b>". 3634 */ 3635 public static final ca.uhn.fhir.model.api.Include INCLUDE_ATTESTER = new ca.uhn.fhir.model.api.Include("Composition:attester").toLocked(); 3636 3637 /** 3638 * Search parameter: <b>entry</b> 3639 * <p> 3640 * Description: <b>A reference to data that supports this section</b><br> 3641 * Type: <b>reference</b><br> 3642 * Path: <b>Composition.section.entry</b><br> 3643 * </p> 3644 */ 3645 @SearchParamDefinition(name="entry", path="Composition.section.entry", description="A reference to data that supports this section", type="reference" ) 3646 public static final String SP_ENTRY = "entry"; 3647 /** 3648 * <b>Fluent Client</b> search parameter constant for <b>entry</b> 3649 * <p> 3650 * Description: <b>A reference to data that supports this section</b><br> 3651 * Type: <b>reference</b><br> 3652 * Path: <b>Composition.section.entry</b><br> 3653 * </p> 3654 */ 3655 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENTRY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENTRY); 3656 3657/** 3658 * Constant for fluent queries to be used to add include statements. Specifies 3659 * the path value of "<b>Composition:entry</b>". 3660 */ 3661 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENTRY = new ca.uhn.fhir.model.api.Include("Composition:entry").toLocked(); 3662 3663 /** 3664 * Search parameter: <b>related-ref</b> 3665 * <p> 3666 * Description: <b>Target of the relationship</b><br> 3667 * Type: <b>reference</b><br> 3668 * Path: <b>Composition.relatesTo.targetReference</b><br> 3669 * </p> 3670 */ 3671 @SearchParamDefinition(name="related-ref", path="Composition.relatesTo.target.as(Reference)", description="Target of the relationship", type="reference", target={Composition.class } ) 3672 public static final String SP_RELATED_REF = "related-ref"; 3673 /** 3674 * <b>Fluent Client</b> search parameter constant for <b>related-ref</b> 3675 * <p> 3676 * Description: <b>Target of the relationship</b><br> 3677 * Type: <b>reference</b><br> 3678 * Path: <b>Composition.relatesTo.targetReference</b><br> 3679 * </p> 3680 */ 3681 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RELATED_REF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RELATED_REF); 3682 3683/** 3684 * Constant for fluent queries to be used to add include statements. Specifies 3685 * the path value of "<b>Composition:related-ref</b>". 3686 */ 3687 public static final ca.uhn.fhir.model.api.Include INCLUDE_RELATED_REF = new ca.uhn.fhir.model.api.Include("Composition:related-ref").toLocked(); 3688 3689 /** 3690 * Search parameter: <b>patient</b> 3691 * <p> 3692 * Description: <b>Who and/or what the composition is about</b><br> 3693 * Type: <b>reference</b><br> 3694 * Path: <b>Composition.subject</b><br> 3695 * </p> 3696 */ 3697 @SearchParamDefinition(name="patient", path="Composition.subject", description="Who and/or what the composition is about", type="reference", target={Patient.class } ) 3698 public static final String SP_PATIENT = "patient"; 3699 /** 3700 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 3701 * <p> 3702 * Description: <b>Who and/or what the composition is about</b><br> 3703 * Type: <b>reference</b><br> 3704 * Path: <b>Composition.subject</b><br> 3705 * </p> 3706 */ 3707 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 3708 3709/** 3710 * Constant for fluent queries to be used to add include statements. Specifies 3711 * the path value of "<b>Composition:patient</b>". 3712 */ 3713 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Composition:patient").toLocked(); 3714 3715 /** 3716 * Search parameter: <b>context</b> 3717 * <p> 3718 * Description: <b>Code(s) that apply to the event being documented</b><br> 3719 * Type: <b>token</b><br> 3720 * Path: <b>Composition.event.code</b><br> 3721 * </p> 3722 */ 3723 @SearchParamDefinition(name="context", path="Composition.event.code", description="Code(s) that apply to the event being documented", type="token" ) 3724 public static final String SP_CONTEXT = "context"; 3725 /** 3726 * <b>Fluent Client</b> search parameter constant for <b>context</b> 3727 * <p> 3728 * Description: <b>Code(s) that apply to the event being documented</b><br> 3729 * Type: <b>token</b><br> 3730 * Path: <b>Composition.event.code</b><br> 3731 * </p> 3732 */ 3733 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT); 3734 3735 /** 3736 * Search parameter: <b>class</b> 3737 * <p> 3738 * Description: <b>Categorization of Composition</b><br> 3739 * Type: <b>token</b><br> 3740 * Path: <b>Composition.class</b><br> 3741 * </p> 3742 */ 3743 @SearchParamDefinition(name="class", path="Composition.class", description="Categorization of Composition", type="token" ) 3744 public static final String SP_CLASS = "class"; 3745 /** 3746 * <b>Fluent Client</b> search parameter constant for <b>class</b> 3747 * <p> 3748 * Description: <b>Categorization of Composition</b><br> 3749 * Type: <b>token</b><br> 3750 * Path: <b>Composition.class</b><br> 3751 * </p> 3752 */ 3753 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CLASS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CLASS); 3754 3755 /** 3756 * Search parameter: <b>status</b> 3757 * <p> 3758 * Description: <b>preliminary | final | amended | entered-in-error</b><br> 3759 * Type: <b>token</b><br> 3760 * Path: <b>Composition.status</b><br> 3761 * </p> 3762 */ 3763 @SearchParamDefinition(name="status", path="Composition.status", description="preliminary | final | amended | entered-in-error", type="token" ) 3764 public static final String SP_STATUS = "status"; 3765 /** 3766 * <b>Fluent Client</b> search parameter constant for <b>status</b> 3767 * <p> 3768 * Description: <b>preliminary | final | amended | entered-in-error</b><br> 3769 * Type: <b>token</b><br> 3770 * Path: <b>Composition.status</b><br> 3771 * </p> 3772 */ 3773 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 3774 3775 3776} 3777