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