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