001package org.hl7.fhir.r5.model; 002 003/*- 004 * #%L 005 * org.hl7.fhir.r5 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023/* 024 Copyright (c) 2011+, HL7, Inc. 025 All rights reserved. 026 027 Redistribution and use in source and binary forms, with or without modification, 028 are permitted provided that the following conditions are met: 029 030 * Redistributions of source code must retain the above copyright notice, this 031 list of conditions and the following disclaimer. 032 * Redistributions in binary form must reproduce the above copyright notice, 033 this list of conditions and the following disclaimer in the documentation 034 and/or other materials provided with the distribution. 035 * Neither the name of HL7 nor the names of its contributors may be used to 036 endorse or promote products derived from this software without specific 037 prior written permission. 038 039 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 040 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 041 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 042 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 043 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 044 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 045 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 046 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 047 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 048 POSSIBILITY OF SUCH DAMAGE. 049 050*/ 051 052// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0 053import java.util.ArrayList; 054import java.util.Date; 055import java.util.List; 056import org.hl7.fhir.exceptions.FHIRException; 057import org.hl7.fhir.instance.model.api.ICompositeType; 058 059import org.hl7.fhir.instance.model.api.IBaseDatatypeElement; 060import org.hl7.fhir.utilities.Utilities; 061import org.hl7.fhir.r5.model.Enumerations.*; 062import ca.uhn.fhir.model.api.annotation.ResourceDef; 063import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 064import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 065import ca.uhn.fhir.model.api.annotation.Child; 066import ca.uhn.fhir.model.api.annotation.ChildOrder; 067import ca.uhn.fhir.model.api.annotation.Description; 068import ca.uhn.fhir.model.api.annotation.Block; 069/** 070 * A collection of documents compiled for a purpose together with metadata that applies to the collection. 071 */ 072@ResourceDef(name="DocumentManifest", profile="http://hl7.org/fhir/StructureDefinition/DocumentManifest") 073public class DocumentManifest extends DomainResource { 074 075 @Block() 076 public static class DocumentManifestRelatedComponent extends BackboneElement implements IBaseBackboneElement { 077 /** 078 * Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers. 079 */ 080 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=false) 081 @Description(shortDefinition="Identifiers of things that are related", formalDefinition="Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers." ) 082 protected Identifier identifier; 083 084 /** 085 * Related Resource to this DocumentManifest. For example, Order, ServiceRequest, Procedure, EligibilityRequest, etc. 086 */ 087 @Child(name = "ref", type = {Reference.class}, order=2, min=0, max=1, modifier=false, summary=false) 088 @Description(shortDefinition="Related Resource", formalDefinition="Related Resource to this DocumentManifest. For example, Order, ServiceRequest, Procedure, EligibilityRequest, etc." ) 089 protected Reference ref; 090 091 private static final long serialVersionUID = -1464616234L; 092 093 /** 094 * Constructor 095 */ 096 public DocumentManifestRelatedComponent() { 097 super(); 098 } 099 100 /** 101 * @return {@link #identifier} (Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers.) 102 */ 103 public Identifier getIdentifier() { 104 if (this.identifier == null) 105 if (Configuration.errorOnAutoCreate()) 106 throw new Error("Attempt to auto-create DocumentManifestRelatedComponent.identifier"); 107 else if (Configuration.doAutoCreate()) 108 this.identifier = new Identifier(); // cc 109 return this.identifier; 110 } 111 112 public boolean hasIdentifier() { 113 return this.identifier != null && !this.identifier.isEmpty(); 114 } 115 116 /** 117 * @param value {@link #identifier} (Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers.) 118 */ 119 public DocumentManifestRelatedComponent setIdentifier(Identifier value) { 120 this.identifier = value; 121 return this; 122 } 123 124 /** 125 * @return {@link #ref} (Related Resource to this DocumentManifest. For example, Order, ServiceRequest, Procedure, EligibilityRequest, etc.) 126 */ 127 public Reference getRef() { 128 if (this.ref == null) 129 if (Configuration.errorOnAutoCreate()) 130 throw new Error("Attempt to auto-create DocumentManifestRelatedComponent.ref"); 131 else if (Configuration.doAutoCreate()) 132 this.ref = new Reference(); // cc 133 return this.ref; 134 } 135 136 public boolean hasRef() { 137 return this.ref != null && !this.ref.isEmpty(); 138 } 139 140 /** 141 * @param value {@link #ref} (Related Resource to this DocumentManifest. For example, Order, ServiceRequest, Procedure, EligibilityRequest, etc.) 142 */ 143 public DocumentManifestRelatedComponent setRef(Reference value) { 144 this.ref = value; 145 return this; 146 } 147 148 protected void listChildren(List<Property> children) { 149 super.listChildren(children); 150 children.add(new Property("identifier", "Identifier", "Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers.", 0, 1, identifier)); 151 children.add(new Property("ref", "Reference(Any)", "Related Resource to this DocumentManifest. For example, Order, ServiceRequest, Procedure, EligibilityRequest, etc.", 0, 1, ref)); 152 } 153 154 @Override 155 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 156 switch (_hash) { 157 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers.", 0, 1, identifier); 158 case 112787: /*ref*/ return new Property("ref", "Reference(Any)", "Related Resource to this DocumentManifest. For example, Order, ServiceRequest, Procedure, EligibilityRequest, etc.", 0, 1, ref); 159 default: return super.getNamedProperty(_hash, _name, _checkValid); 160 } 161 162 } 163 164 @Override 165 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 166 switch (hash) { 167 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 168 case 112787: /*ref*/ return this.ref == null ? new Base[0] : new Base[] {this.ref}; // Reference 169 default: return super.getProperty(hash, name, checkValid); 170 } 171 172 } 173 174 @Override 175 public Base setProperty(int hash, String name, Base value) throws FHIRException { 176 switch (hash) { 177 case -1618432855: // identifier 178 this.identifier = castToIdentifier(value); // Identifier 179 return value; 180 case 112787: // ref 181 this.ref = castToReference(value); // Reference 182 return value; 183 default: return super.setProperty(hash, name, value); 184 } 185 186 } 187 188 @Override 189 public Base setProperty(String name, Base value) throws FHIRException { 190 if (name.equals("identifier")) { 191 this.identifier = castToIdentifier(value); // Identifier 192 } else if (name.equals("ref")) { 193 this.ref = castToReference(value); // Reference 194 } else 195 return super.setProperty(name, value); 196 return value; 197 } 198 199 @Override 200 public Base makeProperty(int hash, String name) throws FHIRException { 201 switch (hash) { 202 case -1618432855: return getIdentifier(); 203 case 112787: return getRef(); 204 default: return super.makeProperty(hash, name); 205 } 206 207 } 208 209 @Override 210 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 211 switch (hash) { 212 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 213 case 112787: /*ref*/ return new String[] {"Reference"}; 214 default: return super.getTypesForProperty(hash, name); 215 } 216 217 } 218 219 @Override 220 public Base addChild(String name) throws FHIRException { 221 if (name.equals("identifier")) { 222 this.identifier = new Identifier(); 223 return this.identifier; 224 } 225 else if (name.equals("ref")) { 226 this.ref = new Reference(); 227 return this.ref; 228 } 229 else 230 return super.addChild(name); 231 } 232 233 public DocumentManifestRelatedComponent copy() { 234 DocumentManifestRelatedComponent dst = new DocumentManifestRelatedComponent(); 235 copyValues(dst); 236 return dst; 237 } 238 239 public void copyValues(DocumentManifestRelatedComponent dst) { 240 super.copyValues(dst); 241 dst.identifier = identifier == null ? null : identifier.copy(); 242 dst.ref = ref == null ? null : ref.copy(); 243 } 244 245 @Override 246 public boolean equalsDeep(Base other_) { 247 if (!super.equalsDeep(other_)) 248 return false; 249 if (!(other_ instanceof DocumentManifestRelatedComponent)) 250 return false; 251 DocumentManifestRelatedComponent o = (DocumentManifestRelatedComponent) other_; 252 return compareDeep(identifier, o.identifier, true) && compareDeep(ref, o.ref, true); 253 } 254 255 @Override 256 public boolean equalsShallow(Base other_) { 257 if (!super.equalsShallow(other_)) 258 return false; 259 if (!(other_ instanceof DocumentManifestRelatedComponent)) 260 return false; 261 DocumentManifestRelatedComponent o = (DocumentManifestRelatedComponent) other_; 262 return true; 263 } 264 265 public boolean isEmpty() { 266 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, ref); 267 } 268 269 public String fhirType() { 270 return "DocumentManifest.related"; 271 272 } 273 274 } 275 276 /** 277 * A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts. 278 */ 279 @Child(name = "masterIdentifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) 280 @Description(shortDefinition="Unique Identifier for the set of documents", formalDefinition="A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts." ) 281 protected Identifier masterIdentifier; 282 283 /** 284 * Other identifiers associated with the document manifest, including version independent identifiers. 285 */ 286 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 287 @Description(shortDefinition="Other identifiers for the manifest", formalDefinition="Other identifiers associated with the document manifest, including version independent identifiers." ) 288 protected List<Identifier> identifier; 289 290 /** 291 * The status of this document manifest. 292 */ 293 @Child(name = "status", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true) 294 @Description(shortDefinition="current | superseded | entered-in-error", formalDefinition="The status of this document manifest." ) 295 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/document-reference-status") 296 protected Enumeration<DocumentReferenceStatus> status; 297 298 /** 299 * The code specifying the type of clinical activity that resulted in placing the associated content into the DocumentManifest. 300 */ 301 @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) 302 @Description(shortDefinition="Kind of document set", formalDefinition="The code specifying the type of clinical activity that resulted in placing the associated content into the DocumentManifest." ) 303 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-ActCode") 304 protected CodeableConcept type; 305 306 /** 307 * Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case). 308 */ 309 @Child(name = "subject", type = {Patient.class, Practitioner.class, Group.class, Device.class}, order=4, min=0, max=1, modifier=false, summary=true) 310 @Description(shortDefinition="The subject of the set of documents", formalDefinition="Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case)." ) 311 protected Reference subject; 312 313 /** 314 * When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.). 315 */ 316 @Child(name = "created", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=false) 317 @Description(shortDefinition="When this document manifest created", formalDefinition="When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.)." ) 318 protected DateTimeType created; 319 320 /** 321 * Identifies who is the author of the manifest. Manifest author is not necessarly the author of the references included. 322 */ 323 @Child(name = "author", type = {Practitioner.class, PractitionerRole.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 324 @Description(shortDefinition="Who and/or what authored the DocumentManifest", formalDefinition="Identifies who is the author of the manifest. Manifest author is not necessarly the author of the references included." ) 325 protected List<Reference> author; 326 327 /** 328 * A patient, practitioner, or organization for which this set of documents is intended. 329 */ 330 @Child(name = "recipient", type = {Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class, Organization.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 331 @Description(shortDefinition="Intended to get notified about this set of documents", formalDefinition="A patient, practitioner, or organization for which this set of documents is intended." ) 332 protected List<Reference> recipient; 333 334 /** 335 * Identifies the source system, application, or software that produced the document manifest. 336 */ 337 @Child(name = "source", type = {UriType.class}, order=8, min=0, max=1, modifier=false, summary=false) 338 @Description(shortDefinition="The source system/application/software", formalDefinition="Identifies the source system, application, or software that produced the document manifest." ) 339 protected UriType source; 340 341 /** 342 * Human-readable description of the source document. This is sometimes known as the "title". 343 */ 344 @Child(name = "description", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true) 345 @Description(shortDefinition="Human-readable description (title)", formalDefinition="Human-readable description of the source document. This is sometimes known as the \"title\"." ) 346 protected StringType description; 347 348 /** 349 * The list of Resources that consist of the parts of this manifest. 350 */ 351 @Child(name = "content", type = {Reference.class}, order=10, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 352 @Description(shortDefinition="Items in manifest", formalDefinition="The list of Resources that consist of the parts of this manifest." ) 353 protected List<Reference> content; 354 355 /** 356 * Related identifiers or resources associated with the DocumentManifest. 357 */ 358 @Child(name = "related", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 359 @Description(shortDefinition="Related things", formalDefinition="Related identifiers or resources associated with the DocumentManifest." ) 360 protected List<DocumentManifestRelatedComponent> related; 361 362 private static final long serialVersionUID = -1695559473L; 363 364 /** 365 * Constructor 366 */ 367 public DocumentManifest() { 368 super(); 369 } 370 371 /** 372 * Constructor 373 */ 374 public DocumentManifest(Enumeration<DocumentReferenceStatus> status) { 375 super(); 376 this.status = status; 377 } 378 379 /** 380 * @return {@link #masterIdentifier} (A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.) 381 */ 382 public Identifier getMasterIdentifier() { 383 if (this.masterIdentifier == null) 384 if (Configuration.errorOnAutoCreate()) 385 throw new Error("Attempt to auto-create DocumentManifest.masterIdentifier"); 386 else if (Configuration.doAutoCreate()) 387 this.masterIdentifier = new Identifier(); // cc 388 return this.masterIdentifier; 389 } 390 391 public boolean hasMasterIdentifier() { 392 return this.masterIdentifier != null && !this.masterIdentifier.isEmpty(); 393 } 394 395 /** 396 * @param value {@link #masterIdentifier} (A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.) 397 */ 398 public DocumentManifest setMasterIdentifier(Identifier value) { 399 this.masterIdentifier = value; 400 return this; 401 } 402 403 /** 404 * @return {@link #identifier} (Other identifiers associated with the document manifest, including version independent identifiers.) 405 */ 406 public List<Identifier> getIdentifier() { 407 if (this.identifier == null) 408 this.identifier = new ArrayList<Identifier>(); 409 return this.identifier; 410 } 411 412 /** 413 * @return Returns a reference to <code>this</code> for easy method chaining 414 */ 415 public DocumentManifest setIdentifier(List<Identifier> theIdentifier) { 416 this.identifier = theIdentifier; 417 return this; 418 } 419 420 public boolean hasIdentifier() { 421 if (this.identifier == null) 422 return false; 423 for (Identifier item : this.identifier) 424 if (!item.isEmpty()) 425 return true; 426 return false; 427 } 428 429 public Identifier addIdentifier() { //3 430 Identifier t = new Identifier(); 431 if (this.identifier == null) 432 this.identifier = new ArrayList<Identifier>(); 433 this.identifier.add(t); 434 return t; 435 } 436 437 public DocumentManifest addIdentifier(Identifier t) { //3 438 if (t == null) 439 return this; 440 if (this.identifier == null) 441 this.identifier = new ArrayList<Identifier>(); 442 this.identifier.add(t); 443 return this; 444 } 445 446 /** 447 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 448 */ 449 public Identifier getIdentifierFirstRep() { 450 if (getIdentifier().isEmpty()) { 451 addIdentifier(); 452 } 453 return getIdentifier().get(0); 454 } 455 456 /** 457 * @return {@link #status} (The status of this document manifest.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 458 */ 459 public Enumeration<DocumentReferenceStatus> getStatusElement() { 460 if (this.status == null) 461 if (Configuration.errorOnAutoCreate()) 462 throw new Error("Attempt to auto-create DocumentManifest.status"); 463 else if (Configuration.doAutoCreate()) 464 this.status = new Enumeration<DocumentReferenceStatus>(new DocumentReferenceStatusEnumFactory()); // bb 465 return this.status; 466 } 467 468 public boolean hasStatusElement() { 469 return this.status != null && !this.status.isEmpty(); 470 } 471 472 public boolean hasStatus() { 473 return this.status != null && !this.status.isEmpty(); 474 } 475 476 /** 477 * @param value {@link #status} (The status of this document manifest.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 478 */ 479 public DocumentManifest setStatusElement(Enumeration<DocumentReferenceStatus> value) { 480 this.status = value; 481 return this; 482 } 483 484 /** 485 * @return The status of this document manifest. 486 */ 487 public DocumentReferenceStatus getStatus() { 488 return this.status == null ? null : this.status.getValue(); 489 } 490 491 /** 492 * @param value The status of this document manifest. 493 */ 494 public DocumentManifest setStatus(DocumentReferenceStatus value) { 495 if (this.status == null) 496 this.status = new Enumeration<DocumentReferenceStatus>(new DocumentReferenceStatusEnumFactory()); 497 this.status.setValue(value); 498 return this; 499 } 500 501 /** 502 * @return {@link #type} (The code specifying the type of clinical activity that resulted in placing the associated content into the DocumentManifest.) 503 */ 504 public CodeableConcept getType() { 505 if (this.type == null) 506 if (Configuration.errorOnAutoCreate()) 507 throw new Error("Attempt to auto-create DocumentManifest.type"); 508 else if (Configuration.doAutoCreate()) 509 this.type = new CodeableConcept(); // cc 510 return this.type; 511 } 512 513 public boolean hasType() { 514 return this.type != null && !this.type.isEmpty(); 515 } 516 517 /** 518 * @param value {@link #type} (The code specifying the type of clinical activity that resulted in placing the associated content into the DocumentManifest.) 519 */ 520 public DocumentManifest setType(CodeableConcept value) { 521 this.type = value; 522 return this; 523 } 524 525 /** 526 * @return {@link #subject} (Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).) 527 */ 528 public Reference getSubject() { 529 if (this.subject == null) 530 if (Configuration.errorOnAutoCreate()) 531 throw new Error("Attempt to auto-create DocumentManifest.subject"); 532 else if (Configuration.doAutoCreate()) 533 this.subject = new Reference(); // cc 534 return this.subject; 535 } 536 537 public boolean hasSubject() { 538 return this.subject != null && !this.subject.isEmpty(); 539 } 540 541 /** 542 * @param value {@link #subject} (Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).) 543 */ 544 public DocumentManifest setSubject(Reference value) { 545 this.subject = value; 546 return this; 547 } 548 549 /** 550 * @return {@link #created} (When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 551 */ 552 public DateTimeType getCreatedElement() { 553 if (this.created == null) 554 if (Configuration.errorOnAutoCreate()) 555 throw new Error("Attempt to auto-create DocumentManifest.created"); 556 else if (Configuration.doAutoCreate()) 557 this.created = new DateTimeType(); // bb 558 return this.created; 559 } 560 561 public boolean hasCreatedElement() { 562 return this.created != null && !this.created.isEmpty(); 563 } 564 565 public boolean hasCreated() { 566 return this.created != null && !this.created.isEmpty(); 567 } 568 569 /** 570 * @param value {@link #created} (When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 571 */ 572 public DocumentManifest setCreatedElement(DateTimeType value) { 573 this.created = value; 574 return this; 575 } 576 577 /** 578 * @return When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.). 579 */ 580 public Date getCreated() { 581 return this.created == null ? null : this.created.getValue(); 582 } 583 584 /** 585 * @param value When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.). 586 */ 587 public DocumentManifest setCreated(Date value) { 588 if (value == null) 589 this.created = null; 590 else { 591 if (this.created == null) 592 this.created = new DateTimeType(); 593 this.created.setValue(value); 594 } 595 return this; 596 } 597 598 /** 599 * @return {@link #author} (Identifies who is the author of the manifest. Manifest author is not necessarly the author of the references included.) 600 */ 601 public List<Reference> getAuthor() { 602 if (this.author == null) 603 this.author = new ArrayList<Reference>(); 604 return this.author; 605 } 606 607 /** 608 * @return Returns a reference to <code>this</code> for easy method chaining 609 */ 610 public DocumentManifest setAuthor(List<Reference> theAuthor) { 611 this.author = theAuthor; 612 return this; 613 } 614 615 public boolean hasAuthor() { 616 if (this.author == null) 617 return false; 618 for (Reference item : this.author) 619 if (!item.isEmpty()) 620 return true; 621 return false; 622 } 623 624 public Reference addAuthor() { //3 625 Reference t = new Reference(); 626 if (this.author == null) 627 this.author = new ArrayList<Reference>(); 628 this.author.add(t); 629 return t; 630 } 631 632 public DocumentManifest addAuthor(Reference t) { //3 633 if (t == null) 634 return this; 635 if (this.author == null) 636 this.author = new ArrayList<Reference>(); 637 this.author.add(t); 638 return this; 639 } 640 641 /** 642 * @return The first repetition of repeating field {@link #author}, creating it if it does not already exist 643 */ 644 public Reference getAuthorFirstRep() { 645 if (getAuthor().isEmpty()) { 646 addAuthor(); 647 } 648 return getAuthor().get(0); 649 } 650 651 /** 652 * @return {@link #recipient} (A patient, practitioner, or organization for which this set of documents is intended.) 653 */ 654 public List<Reference> getRecipient() { 655 if (this.recipient == null) 656 this.recipient = new ArrayList<Reference>(); 657 return this.recipient; 658 } 659 660 /** 661 * @return Returns a reference to <code>this</code> for easy method chaining 662 */ 663 public DocumentManifest setRecipient(List<Reference> theRecipient) { 664 this.recipient = theRecipient; 665 return this; 666 } 667 668 public boolean hasRecipient() { 669 if (this.recipient == null) 670 return false; 671 for (Reference item : this.recipient) 672 if (!item.isEmpty()) 673 return true; 674 return false; 675 } 676 677 public Reference addRecipient() { //3 678 Reference t = new Reference(); 679 if (this.recipient == null) 680 this.recipient = new ArrayList<Reference>(); 681 this.recipient.add(t); 682 return t; 683 } 684 685 public DocumentManifest addRecipient(Reference t) { //3 686 if (t == null) 687 return this; 688 if (this.recipient == null) 689 this.recipient = new ArrayList<Reference>(); 690 this.recipient.add(t); 691 return this; 692 } 693 694 /** 695 * @return The first repetition of repeating field {@link #recipient}, creating it if it does not already exist 696 */ 697 public Reference getRecipientFirstRep() { 698 if (getRecipient().isEmpty()) { 699 addRecipient(); 700 } 701 return getRecipient().get(0); 702 } 703 704 /** 705 * @return {@link #source} (Identifies the source system, application, or software that produced the document manifest.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value 706 */ 707 public UriType getSourceElement() { 708 if (this.source == null) 709 if (Configuration.errorOnAutoCreate()) 710 throw new Error("Attempt to auto-create DocumentManifest.source"); 711 else if (Configuration.doAutoCreate()) 712 this.source = new UriType(); // bb 713 return this.source; 714 } 715 716 public boolean hasSourceElement() { 717 return this.source != null && !this.source.isEmpty(); 718 } 719 720 public boolean hasSource() { 721 return this.source != null && !this.source.isEmpty(); 722 } 723 724 /** 725 * @param value {@link #source} (Identifies the source system, application, or software that produced the document manifest.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value 726 */ 727 public DocumentManifest setSourceElement(UriType value) { 728 this.source = value; 729 return this; 730 } 731 732 /** 733 * @return Identifies the source system, application, or software that produced the document manifest. 734 */ 735 public String getSource() { 736 return this.source == null ? null : this.source.getValue(); 737 } 738 739 /** 740 * @param value Identifies the source system, application, or software that produced the document manifest. 741 */ 742 public DocumentManifest setSource(String value) { 743 if (Utilities.noString(value)) 744 this.source = null; 745 else { 746 if (this.source == null) 747 this.source = new UriType(); 748 this.source.setValue(value); 749 } 750 return this; 751 } 752 753 /** 754 * @return {@link #description} (Human-readable description of the source document. This is sometimes known as the "title".). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 755 */ 756 public StringType getDescriptionElement() { 757 if (this.description == null) 758 if (Configuration.errorOnAutoCreate()) 759 throw new Error("Attempt to auto-create DocumentManifest.description"); 760 else if (Configuration.doAutoCreate()) 761 this.description = new StringType(); // bb 762 return this.description; 763 } 764 765 public boolean hasDescriptionElement() { 766 return this.description != null && !this.description.isEmpty(); 767 } 768 769 public boolean hasDescription() { 770 return this.description != null && !this.description.isEmpty(); 771 } 772 773 /** 774 * @param value {@link #description} (Human-readable description of the source document. This is sometimes known as the "title".). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 775 */ 776 public DocumentManifest setDescriptionElement(StringType value) { 777 this.description = value; 778 return this; 779 } 780 781 /** 782 * @return Human-readable description of the source document. This is sometimes known as the "title". 783 */ 784 public String getDescription() { 785 return this.description == null ? null : this.description.getValue(); 786 } 787 788 /** 789 * @param value Human-readable description of the source document. This is sometimes known as the "title". 790 */ 791 public DocumentManifest setDescription(String value) { 792 if (Utilities.noString(value)) 793 this.description = null; 794 else { 795 if (this.description == null) 796 this.description = new StringType(); 797 this.description.setValue(value); 798 } 799 return this; 800 } 801 802 /** 803 * @return {@link #content} (The list of Resources that consist of the parts of this manifest.) 804 */ 805 public List<Reference> getContent() { 806 if (this.content == null) 807 this.content = new ArrayList<Reference>(); 808 return this.content; 809 } 810 811 /** 812 * @return Returns a reference to <code>this</code> for easy method chaining 813 */ 814 public DocumentManifest setContent(List<Reference> theContent) { 815 this.content = theContent; 816 return this; 817 } 818 819 public boolean hasContent() { 820 if (this.content == null) 821 return false; 822 for (Reference item : this.content) 823 if (!item.isEmpty()) 824 return true; 825 return false; 826 } 827 828 public Reference addContent() { //3 829 Reference t = new Reference(); 830 if (this.content == null) 831 this.content = new ArrayList<Reference>(); 832 this.content.add(t); 833 return t; 834 } 835 836 public DocumentManifest addContent(Reference t) { //3 837 if (t == null) 838 return this; 839 if (this.content == null) 840 this.content = new ArrayList<Reference>(); 841 this.content.add(t); 842 return this; 843 } 844 845 /** 846 * @return The first repetition of repeating field {@link #content}, creating it if it does not already exist 847 */ 848 public Reference getContentFirstRep() { 849 if (getContent().isEmpty()) { 850 addContent(); 851 } 852 return getContent().get(0); 853 } 854 855 /** 856 * @return {@link #related} (Related identifiers or resources associated with the DocumentManifest.) 857 */ 858 public List<DocumentManifestRelatedComponent> getRelated() { 859 if (this.related == null) 860 this.related = new ArrayList<DocumentManifestRelatedComponent>(); 861 return this.related; 862 } 863 864 /** 865 * @return Returns a reference to <code>this</code> for easy method chaining 866 */ 867 public DocumentManifest setRelated(List<DocumentManifestRelatedComponent> theRelated) { 868 this.related = theRelated; 869 return this; 870 } 871 872 public boolean hasRelated() { 873 if (this.related == null) 874 return false; 875 for (DocumentManifestRelatedComponent item : this.related) 876 if (!item.isEmpty()) 877 return true; 878 return false; 879 } 880 881 public DocumentManifestRelatedComponent addRelated() { //3 882 DocumentManifestRelatedComponent t = new DocumentManifestRelatedComponent(); 883 if (this.related == null) 884 this.related = new ArrayList<DocumentManifestRelatedComponent>(); 885 this.related.add(t); 886 return t; 887 } 888 889 public DocumentManifest addRelated(DocumentManifestRelatedComponent t) { //3 890 if (t == null) 891 return this; 892 if (this.related == null) 893 this.related = new ArrayList<DocumentManifestRelatedComponent>(); 894 this.related.add(t); 895 return this; 896 } 897 898 /** 899 * @return The first repetition of repeating field {@link #related}, creating it if it does not already exist 900 */ 901 public DocumentManifestRelatedComponent getRelatedFirstRep() { 902 if (getRelated().isEmpty()) { 903 addRelated(); 904 } 905 return getRelated().get(0); 906 } 907 908 protected void listChildren(List<Property> children) { 909 super.listChildren(children); 910 children.add(new Property("masterIdentifier", "Identifier", "A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.", 0, 1, masterIdentifier)); 911 children.add(new Property("identifier", "Identifier", "Other identifiers associated with the document manifest, including version independent identifiers.", 0, java.lang.Integer.MAX_VALUE, identifier)); 912 children.add(new Property("status", "code", "The status of this document manifest.", 0, 1, status)); 913 children.add(new Property("type", "CodeableConcept", "The code specifying the type of clinical activity that resulted in placing the associated content into the DocumentManifest.", 0, 1, type)); 914 children.add(new Property("subject", "Reference(Patient|Practitioner|Group|Device)", "Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).", 0, 1, subject)); 915 children.add(new Property("created", "dateTime", "When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).", 0, 1, created)); 916 children.add(new Property("author", "Reference(Practitioner|PractitionerRole|Organization|Device|Patient|RelatedPerson)", "Identifies who is the author of the manifest. Manifest author is not necessarly the author of the references included.", 0, java.lang.Integer.MAX_VALUE, author)); 917 children.add(new Property("recipient", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|Organization)", "A patient, practitioner, or organization for which this set of documents is intended.", 0, java.lang.Integer.MAX_VALUE, recipient)); 918 children.add(new Property("source", "uri", "Identifies the source system, application, or software that produced the document manifest.", 0, 1, source)); 919 children.add(new Property("description", "string", "Human-readable description of the source document. This is sometimes known as the \"title\".", 0, 1, description)); 920 children.add(new Property("content", "Reference(Any)", "The list of Resources that consist of the parts of this manifest.", 0, java.lang.Integer.MAX_VALUE, content)); 921 children.add(new Property("related", "", "Related identifiers or resources associated with the DocumentManifest.", 0, java.lang.Integer.MAX_VALUE, related)); 922 } 923 924 @Override 925 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 926 switch (_hash) { 927 case 243769515: /*masterIdentifier*/ return new Property("masterIdentifier", "Identifier", "A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.", 0, 1, masterIdentifier); 928 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Other identifiers associated with the document manifest, including version independent identifiers.", 0, java.lang.Integer.MAX_VALUE, identifier); 929 case -892481550: /*status*/ return new Property("status", "code", "The status of this document manifest.", 0, 1, status); 930 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The code specifying the type of clinical activity that resulted in placing the associated content into the DocumentManifest.", 0, 1, type); 931 case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Practitioner|Group|Device)", "Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).", 0, 1, subject); 932 case 1028554472: /*created*/ return new Property("created", "dateTime", "When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).", 0, 1, created); 933 case -1406328437: /*author*/ return new Property("author", "Reference(Practitioner|PractitionerRole|Organization|Device|Patient|RelatedPerson)", "Identifies who is the author of the manifest. Manifest author is not necessarly the author of the references included.", 0, java.lang.Integer.MAX_VALUE, author); 934 case 820081177: /*recipient*/ return new Property("recipient", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|Organization)", "A patient, practitioner, or organization for which this set of documents is intended.", 0, java.lang.Integer.MAX_VALUE, recipient); 935 case -896505829: /*source*/ return new Property("source", "uri", "Identifies the source system, application, or software that produced the document manifest.", 0, 1, source); 936 case -1724546052: /*description*/ return new Property("description", "string", "Human-readable description of the source document. This is sometimes known as the \"title\".", 0, 1, description); 937 case 951530617: /*content*/ return new Property("content", "Reference(Any)", "The list of Resources that consist of the parts of this manifest.", 0, java.lang.Integer.MAX_VALUE, content); 938 case 1090493483: /*related*/ return new Property("related", "", "Related identifiers or resources associated with the DocumentManifest.", 0, java.lang.Integer.MAX_VALUE, related); 939 default: return super.getNamedProperty(_hash, _name, _checkValid); 940 } 941 942 } 943 944 @Override 945 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 946 switch (hash) { 947 case 243769515: /*masterIdentifier*/ return this.masterIdentifier == null ? new Base[0] : new Base[] {this.masterIdentifier}; // Identifier 948 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 949 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<DocumentReferenceStatus> 950 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 951 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 952 case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType 953 case -1406328437: /*author*/ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // Reference 954 case 820081177: /*recipient*/ return this.recipient == null ? new Base[0] : this.recipient.toArray(new Base[this.recipient.size()]); // Reference 955 case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // UriType 956 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 957 case 951530617: /*content*/ return this.content == null ? new Base[0] : this.content.toArray(new Base[this.content.size()]); // Reference 958 case 1090493483: /*related*/ return this.related == null ? new Base[0] : this.related.toArray(new Base[this.related.size()]); // DocumentManifestRelatedComponent 959 default: return super.getProperty(hash, name, checkValid); 960 } 961 962 } 963 964 @Override 965 public Base setProperty(int hash, String name, Base value) throws FHIRException { 966 switch (hash) { 967 case 243769515: // masterIdentifier 968 this.masterIdentifier = castToIdentifier(value); // Identifier 969 return value; 970 case -1618432855: // identifier 971 this.getIdentifier().add(castToIdentifier(value)); // Identifier 972 return value; 973 case -892481550: // status 974 value = new DocumentReferenceStatusEnumFactory().fromType(castToCode(value)); 975 this.status = (Enumeration) value; // Enumeration<DocumentReferenceStatus> 976 return value; 977 case 3575610: // type 978 this.type = castToCodeableConcept(value); // CodeableConcept 979 return value; 980 case -1867885268: // subject 981 this.subject = castToReference(value); // Reference 982 return value; 983 case 1028554472: // created 984 this.created = castToDateTime(value); // DateTimeType 985 return value; 986 case -1406328437: // author 987 this.getAuthor().add(castToReference(value)); // Reference 988 return value; 989 case 820081177: // recipient 990 this.getRecipient().add(castToReference(value)); // Reference 991 return value; 992 case -896505829: // source 993 this.source = castToUri(value); // UriType 994 return value; 995 case -1724546052: // description 996 this.description = castToString(value); // StringType 997 return value; 998 case 951530617: // content 999 this.getContent().add(castToReference(value)); // Reference 1000 return value; 1001 case 1090493483: // related 1002 this.getRelated().add((DocumentManifestRelatedComponent) value); // DocumentManifestRelatedComponent 1003 return value; 1004 default: return super.setProperty(hash, name, value); 1005 } 1006 1007 } 1008 1009 @Override 1010 public Base setProperty(String name, Base value) throws FHIRException { 1011 if (name.equals("masterIdentifier")) { 1012 this.masterIdentifier = castToIdentifier(value); // Identifier 1013 } else if (name.equals("identifier")) { 1014 this.getIdentifier().add(castToIdentifier(value)); 1015 } else if (name.equals("status")) { 1016 value = new DocumentReferenceStatusEnumFactory().fromType(castToCode(value)); 1017 this.status = (Enumeration) value; // Enumeration<DocumentReferenceStatus> 1018 } else if (name.equals("type")) { 1019 this.type = castToCodeableConcept(value); // CodeableConcept 1020 } else if (name.equals("subject")) { 1021 this.subject = castToReference(value); // Reference 1022 } else if (name.equals("created")) { 1023 this.created = castToDateTime(value); // DateTimeType 1024 } else if (name.equals("author")) { 1025 this.getAuthor().add(castToReference(value)); 1026 } else if (name.equals("recipient")) { 1027 this.getRecipient().add(castToReference(value)); 1028 } else if (name.equals("source")) { 1029 this.source = castToUri(value); // UriType 1030 } else if (name.equals("description")) { 1031 this.description = castToString(value); // StringType 1032 } else if (name.equals("content")) { 1033 this.getContent().add(castToReference(value)); 1034 } else if (name.equals("related")) { 1035 this.getRelated().add((DocumentManifestRelatedComponent) value); 1036 } else 1037 return super.setProperty(name, value); 1038 return value; 1039 } 1040 1041 @Override 1042 public Base makeProperty(int hash, String name) throws FHIRException { 1043 switch (hash) { 1044 case 243769515: return getMasterIdentifier(); 1045 case -1618432855: return addIdentifier(); 1046 case -892481550: return getStatusElement(); 1047 case 3575610: return getType(); 1048 case -1867885268: return getSubject(); 1049 case 1028554472: return getCreatedElement(); 1050 case -1406328437: return addAuthor(); 1051 case 820081177: return addRecipient(); 1052 case -896505829: return getSourceElement(); 1053 case -1724546052: return getDescriptionElement(); 1054 case 951530617: return addContent(); 1055 case 1090493483: return addRelated(); 1056 default: return super.makeProperty(hash, name); 1057 } 1058 1059 } 1060 1061 @Override 1062 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1063 switch (hash) { 1064 case 243769515: /*masterIdentifier*/ return new String[] {"Identifier"}; 1065 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1066 case -892481550: /*status*/ return new String[] {"code"}; 1067 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1068 case -1867885268: /*subject*/ return new String[] {"Reference"}; 1069 case 1028554472: /*created*/ return new String[] {"dateTime"}; 1070 case -1406328437: /*author*/ return new String[] {"Reference"}; 1071 case 820081177: /*recipient*/ return new String[] {"Reference"}; 1072 case -896505829: /*source*/ return new String[] {"uri"}; 1073 case -1724546052: /*description*/ return new String[] {"string"}; 1074 case 951530617: /*content*/ return new String[] {"Reference"}; 1075 case 1090493483: /*related*/ return new String[] {}; 1076 default: return super.getTypesForProperty(hash, name); 1077 } 1078 1079 } 1080 1081 @Override 1082 public Base addChild(String name) throws FHIRException { 1083 if (name.equals("masterIdentifier")) { 1084 this.masterIdentifier = new Identifier(); 1085 return this.masterIdentifier; 1086 } 1087 else if (name.equals("identifier")) { 1088 return addIdentifier(); 1089 } 1090 else if (name.equals("status")) { 1091 throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.status"); 1092 } 1093 else if (name.equals("type")) { 1094 this.type = new CodeableConcept(); 1095 return this.type; 1096 } 1097 else if (name.equals("subject")) { 1098 this.subject = new Reference(); 1099 return this.subject; 1100 } 1101 else if (name.equals("created")) { 1102 throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.created"); 1103 } 1104 else if (name.equals("author")) { 1105 return addAuthor(); 1106 } 1107 else if (name.equals("recipient")) { 1108 return addRecipient(); 1109 } 1110 else if (name.equals("source")) { 1111 throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.source"); 1112 } 1113 else if (name.equals("description")) { 1114 throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.description"); 1115 } 1116 else if (name.equals("content")) { 1117 return addContent(); 1118 } 1119 else if (name.equals("related")) { 1120 return addRelated(); 1121 } 1122 else 1123 return super.addChild(name); 1124 } 1125 1126 public String fhirType() { 1127 return "DocumentManifest"; 1128 1129 } 1130 1131 public DocumentManifest copy() { 1132 DocumentManifest dst = new DocumentManifest(); 1133 copyValues(dst); 1134 return dst; 1135 } 1136 1137 public void copyValues(DocumentManifest dst) { 1138 super.copyValues(dst); 1139 dst.masterIdentifier = masterIdentifier == null ? null : masterIdentifier.copy(); 1140 if (identifier != null) { 1141 dst.identifier = new ArrayList<Identifier>(); 1142 for (Identifier i : identifier) 1143 dst.identifier.add(i.copy()); 1144 }; 1145 dst.status = status == null ? null : status.copy(); 1146 dst.type = type == null ? null : type.copy(); 1147 dst.subject = subject == null ? null : subject.copy(); 1148 dst.created = created == null ? null : created.copy(); 1149 if (author != null) { 1150 dst.author = new ArrayList<Reference>(); 1151 for (Reference i : author) 1152 dst.author.add(i.copy()); 1153 }; 1154 if (recipient != null) { 1155 dst.recipient = new ArrayList<Reference>(); 1156 for (Reference i : recipient) 1157 dst.recipient.add(i.copy()); 1158 }; 1159 dst.source = source == null ? null : source.copy(); 1160 dst.description = description == null ? null : description.copy(); 1161 if (content != null) { 1162 dst.content = new ArrayList<Reference>(); 1163 for (Reference i : content) 1164 dst.content.add(i.copy()); 1165 }; 1166 if (related != null) { 1167 dst.related = new ArrayList<DocumentManifestRelatedComponent>(); 1168 for (DocumentManifestRelatedComponent i : related) 1169 dst.related.add(i.copy()); 1170 }; 1171 } 1172 1173 protected DocumentManifest typedCopy() { 1174 return copy(); 1175 } 1176 1177 @Override 1178 public boolean equalsDeep(Base other_) { 1179 if (!super.equalsDeep(other_)) 1180 return false; 1181 if (!(other_ instanceof DocumentManifest)) 1182 return false; 1183 DocumentManifest o = (DocumentManifest) other_; 1184 return compareDeep(masterIdentifier, o.masterIdentifier, true) && compareDeep(identifier, o.identifier, true) 1185 && compareDeep(status, o.status, true) && compareDeep(type, o.type, true) && compareDeep(subject, o.subject, true) 1186 && compareDeep(created, o.created, true) && compareDeep(author, o.author, true) && compareDeep(recipient, o.recipient, true) 1187 && compareDeep(source, o.source, true) && compareDeep(description, o.description, true) && compareDeep(content, o.content, true) 1188 && compareDeep(related, o.related, true); 1189 } 1190 1191 @Override 1192 public boolean equalsShallow(Base other_) { 1193 if (!super.equalsShallow(other_)) 1194 return false; 1195 if (!(other_ instanceof DocumentManifest)) 1196 return false; 1197 DocumentManifest o = (DocumentManifest) other_; 1198 return compareValues(status, o.status, true) && compareValues(created, o.created, true) && compareValues(source, o.source, true) 1199 && compareValues(description, o.description, true); 1200 } 1201 1202 public boolean isEmpty() { 1203 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(masterIdentifier, identifier 1204 , status, type, subject, created, author, recipient, source, description, content 1205 , related); 1206 } 1207 1208 @Override 1209 public ResourceType getResourceType() { 1210 return ResourceType.DocumentManifest; 1211 } 1212 1213 /** 1214 * Search parameter: <b>identifier</b> 1215 * <p> 1216 * Description: <b>Unique Identifier for the set of documents</b><br> 1217 * Type: <b>token</b><br> 1218 * Path: <b>DocumentManifest.masterIdentifier, DocumentManifest.identifier</b><br> 1219 * </p> 1220 */ 1221 @SearchParamDefinition(name="identifier", path="DocumentManifest.masterIdentifier | DocumentManifest.identifier", description="Unique Identifier for the set of documents", type="token" ) 1222 public static final String SP_IDENTIFIER = "identifier"; 1223 /** 1224 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 1225 * <p> 1226 * Description: <b>Unique Identifier for the set of documents</b><br> 1227 * Type: <b>token</b><br> 1228 * Path: <b>DocumentManifest.masterIdentifier, DocumentManifest.identifier</b><br> 1229 * </p> 1230 */ 1231 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 1232 1233 /** 1234 * Search parameter: <b>item</b> 1235 * <p> 1236 * Description: <b>Items in manifest</b><br> 1237 * Type: <b>reference</b><br> 1238 * Path: <b>DocumentManifest.content</b><br> 1239 * </p> 1240 */ 1241 @SearchParamDefinition(name="item", path="DocumentManifest.content", description="Items in manifest", type="reference" ) 1242 public static final String SP_ITEM = "item"; 1243 /** 1244 * <b>Fluent Client</b> search parameter constant for <b>item</b> 1245 * <p> 1246 * Description: <b>Items in manifest</b><br> 1247 * Type: <b>reference</b><br> 1248 * Path: <b>DocumentManifest.content</b><br> 1249 * </p> 1250 */ 1251 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ITEM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ITEM); 1252 1253/** 1254 * Constant for fluent queries to be used to add include statements. Specifies 1255 * the path value of "<b>DocumentManifest:item</b>". 1256 */ 1257 public static final ca.uhn.fhir.model.api.Include INCLUDE_ITEM = new ca.uhn.fhir.model.api.Include("DocumentManifest:item").toLocked(); 1258 1259 /** 1260 * Search parameter: <b>related-id</b> 1261 * <p> 1262 * Description: <b>Identifiers of things that are related</b><br> 1263 * Type: <b>token</b><br> 1264 * Path: <b>DocumentManifest.related.identifier</b><br> 1265 * </p> 1266 */ 1267 @SearchParamDefinition(name="related-id", path="DocumentManifest.related.identifier", description="Identifiers of things that are related", type="token" ) 1268 public static final String SP_RELATED_ID = "related-id"; 1269 /** 1270 * <b>Fluent Client</b> search parameter constant for <b>related-id</b> 1271 * <p> 1272 * Description: <b>Identifiers of things that are related</b><br> 1273 * Type: <b>token</b><br> 1274 * Path: <b>DocumentManifest.related.identifier</b><br> 1275 * </p> 1276 */ 1277 public static final ca.uhn.fhir.rest.gclient.TokenClientParam RELATED_ID = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_RELATED_ID); 1278 1279 /** 1280 * Search parameter: <b>subject</b> 1281 * <p> 1282 * Description: <b>The subject of the set of documents</b><br> 1283 * Type: <b>reference</b><br> 1284 * Path: <b>DocumentManifest.subject</b><br> 1285 * </p> 1286 */ 1287 @SearchParamDefinition(name="subject", path="DocumentManifest.subject", description="The subject of the set of documents", 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") }, target={Device.class, Group.class, Patient.class, Practitioner.class } ) 1288 public static final String SP_SUBJECT = "subject"; 1289 /** 1290 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 1291 * <p> 1292 * Description: <b>The subject of the set of documents</b><br> 1293 * Type: <b>reference</b><br> 1294 * Path: <b>DocumentManifest.subject</b><br> 1295 * </p> 1296 */ 1297 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 1298 1299/** 1300 * Constant for fluent queries to be used to add include statements. Specifies 1301 * the path value of "<b>DocumentManifest:subject</b>". 1302 */ 1303 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("DocumentManifest:subject").toLocked(); 1304 1305 /** 1306 * Search parameter: <b>author</b> 1307 * <p> 1308 * Description: <b>Who and/or what authored the DocumentManifest</b><br> 1309 * Type: <b>reference</b><br> 1310 * Path: <b>DocumentManifest.author</b><br> 1311 * </p> 1312 */ 1313 @SearchParamDefinition(name="author", path="DocumentManifest.author", description="Who and/or what authored the DocumentManifest", 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 } ) 1314 public static final String SP_AUTHOR = "author"; 1315 /** 1316 * <b>Fluent Client</b> search parameter constant for <b>author</b> 1317 * <p> 1318 * Description: <b>Who and/or what authored the DocumentManifest</b><br> 1319 * Type: <b>reference</b><br> 1320 * Path: <b>DocumentManifest.author</b><br> 1321 * </p> 1322 */ 1323 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AUTHOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AUTHOR); 1324 1325/** 1326 * Constant for fluent queries to be used to add include statements. Specifies 1327 * the path value of "<b>DocumentManifest:author</b>". 1328 */ 1329 public static final ca.uhn.fhir.model.api.Include INCLUDE_AUTHOR = new ca.uhn.fhir.model.api.Include("DocumentManifest:author").toLocked(); 1330 1331 /** 1332 * Search parameter: <b>created</b> 1333 * <p> 1334 * Description: <b>When this document manifest created</b><br> 1335 * Type: <b>date</b><br> 1336 * Path: <b>DocumentManifest.created</b><br> 1337 * </p> 1338 */ 1339 @SearchParamDefinition(name="created", path="DocumentManifest.created", description="When this document manifest created", type="date" ) 1340 public static final String SP_CREATED = "created"; 1341 /** 1342 * <b>Fluent Client</b> search parameter constant for <b>created</b> 1343 * <p> 1344 * Description: <b>When this document manifest created</b><br> 1345 * Type: <b>date</b><br> 1346 * Path: <b>DocumentManifest.created</b><br> 1347 * </p> 1348 */ 1349 public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED); 1350 1351 /** 1352 * Search parameter: <b>description</b> 1353 * <p> 1354 * Description: <b>Human-readable description (title)</b><br> 1355 * Type: <b>string</b><br> 1356 * Path: <b>DocumentManifest.description</b><br> 1357 * </p> 1358 */ 1359 @SearchParamDefinition(name="description", path="DocumentManifest.description", description="Human-readable description (title)", type="string" ) 1360 public static final String SP_DESCRIPTION = "description"; 1361 /** 1362 * <b>Fluent Client</b> search parameter constant for <b>description</b> 1363 * <p> 1364 * Description: <b>Human-readable description (title)</b><br> 1365 * Type: <b>string</b><br> 1366 * Path: <b>DocumentManifest.description</b><br> 1367 * </p> 1368 */ 1369 public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); 1370 1371 /** 1372 * Search parameter: <b>source</b> 1373 * <p> 1374 * Description: <b>The source system/application/software</b><br> 1375 * Type: <b>uri</b><br> 1376 * Path: <b>DocumentManifest.source</b><br> 1377 * </p> 1378 */ 1379 @SearchParamDefinition(name="source", path="DocumentManifest.source", description="The source system/application/software", type="uri" ) 1380 public static final String SP_SOURCE = "source"; 1381 /** 1382 * <b>Fluent Client</b> search parameter constant for <b>source</b> 1383 * <p> 1384 * Description: <b>The source system/application/software</b><br> 1385 * Type: <b>uri</b><br> 1386 * Path: <b>DocumentManifest.source</b><br> 1387 * </p> 1388 */ 1389 public static final ca.uhn.fhir.rest.gclient.UriClientParam SOURCE = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_SOURCE); 1390 1391 /** 1392 * Search parameter: <b>type</b> 1393 * <p> 1394 * Description: <b>Kind of document set</b><br> 1395 * Type: <b>token</b><br> 1396 * Path: <b>DocumentManifest.type</b><br> 1397 * </p> 1398 */ 1399 @SearchParamDefinition(name="type", path="DocumentManifest.type", description="Kind of document set", type="token" ) 1400 public static final String SP_TYPE = "type"; 1401 /** 1402 * <b>Fluent Client</b> search parameter constant for <b>type</b> 1403 * <p> 1404 * Description: <b>Kind of document set</b><br> 1405 * Type: <b>token</b><br> 1406 * Path: <b>DocumentManifest.type</b><br> 1407 * </p> 1408 */ 1409 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); 1410 1411 /** 1412 * Search parameter: <b>related-ref</b> 1413 * <p> 1414 * Description: <b>Related Resource</b><br> 1415 * Type: <b>reference</b><br> 1416 * Path: <b>DocumentManifest.related.ref</b><br> 1417 * </p> 1418 */ 1419 @SearchParamDefinition(name="related-ref", path="DocumentManifest.related.ref", description="Related Resource", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) 1420 public static final String SP_RELATED_REF = "related-ref"; 1421 /** 1422 * <b>Fluent Client</b> search parameter constant for <b>related-ref</b> 1423 * <p> 1424 * Description: <b>Related Resource</b><br> 1425 * Type: <b>reference</b><br> 1426 * Path: <b>DocumentManifest.related.ref</b><br> 1427 * </p> 1428 */ 1429 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RELATED_REF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RELATED_REF); 1430 1431/** 1432 * Constant for fluent queries to be used to add include statements. Specifies 1433 * the path value of "<b>DocumentManifest:related-ref</b>". 1434 */ 1435 public static final ca.uhn.fhir.model.api.Include INCLUDE_RELATED_REF = new ca.uhn.fhir.model.api.Include("DocumentManifest:related-ref").toLocked(); 1436 1437 /** 1438 * Search parameter: <b>patient</b> 1439 * <p> 1440 * Description: <b>The subject of the set of documents</b><br> 1441 * Type: <b>reference</b><br> 1442 * Path: <b>DocumentManifest.subject</b><br> 1443 * </p> 1444 */ 1445 @SearchParamDefinition(name="patient", path="DocumentManifest.subject.where(resolve() is Patient)", description="The subject of the set of documents", type="reference", target={Patient.class } ) 1446 public static final String SP_PATIENT = "patient"; 1447 /** 1448 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 1449 * <p> 1450 * Description: <b>The subject of the set of documents</b><br> 1451 * Type: <b>reference</b><br> 1452 * Path: <b>DocumentManifest.subject</b><br> 1453 * </p> 1454 */ 1455 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 1456 1457/** 1458 * Constant for fluent queries to be used to add include statements. Specifies 1459 * the path value of "<b>DocumentManifest:patient</b>". 1460 */ 1461 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("DocumentManifest:patient").toLocked(); 1462 1463 /** 1464 * Search parameter: <b>recipient</b> 1465 * <p> 1466 * Description: <b>Intended to get notified about this set of documents</b><br> 1467 * Type: <b>reference</b><br> 1468 * Path: <b>DocumentManifest.recipient</b><br> 1469 * </p> 1470 */ 1471 @SearchParamDefinition(name="recipient", path="DocumentManifest.recipient", description="Intended to get notified about this set of documents", type="reference", providesMembershipIn={ @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={Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) 1472 public static final String SP_RECIPIENT = "recipient"; 1473 /** 1474 * <b>Fluent Client</b> search parameter constant for <b>recipient</b> 1475 * <p> 1476 * Description: <b>Intended to get notified about this set of documents</b><br> 1477 * Type: <b>reference</b><br> 1478 * Path: <b>DocumentManifest.recipient</b><br> 1479 * </p> 1480 */ 1481 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RECIPIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RECIPIENT); 1482 1483/** 1484 * Constant for fluent queries to be used to add include statements. Specifies 1485 * the path value of "<b>DocumentManifest:recipient</b>". 1486 */ 1487 public static final ca.uhn.fhir.model.api.Include INCLUDE_RECIPIENT = new ca.uhn.fhir.model.api.Include("DocumentManifest:recipient").toLocked(); 1488 1489 /** 1490 * Search parameter: <b>status</b> 1491 * <p> 1492 * Description: <b>current | superseded | entered-in-error</b><br> 1493 * Type: <b>token</b><br> 1494 * Path: <b>DocumentManifest.status</b><br> 1495 * </p> 1496 */ 1497 @SearchParamDefinition(name="status", path="DocumentManifest.status", description="current | superseded | entered-in-error", type="token" ) 1498 public static final String SP_STATUS = "status"; 1499 /** 1500 * <b>Fluent Client</b> search parameter constant for <b>status</b> 1501 * <p> 1502 * Description: <b>current | superseded | entered-in-error</b><br> 1503 * Type: <b>token</b><br> 1504 * Path: <b>DocumentManifest.status</b><br> 1505 * </p> 1506 */ 1507 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 1508 1509 1510} 1511