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