001package org.hl7.fhir.dstu3.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Mon, Apr 17, 2017 17:38-0400 for FHIR v3.0.1 033 034import java.util.*; 035 036import org.hl7.fhir.utilities.Utilities; 037import ca.uhn.fhir.model.api.annotation.ResourceDef; 038import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 039import ca.uhn.fhir.model.api.annotation.Child; 040import ca.uhn.fhir.model.api.annotation.ChildOrder; 041import ca.uhn.fhir.model.api.annotation.Description; 042import ca.uhn.fhir.model.api.annotation.Block; 043import org.hl7.fhir.instance.model.api.*; 044import org.hl7.fhir.exceptions.FHIRException; 045/** 046 * Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies. 047 */ 048@ResourceDef(name="Provenance", profile="http://hl7.org/fhir/Profile/Provenance") 049public class Provenance extends DomainResource { 050 051 public enum ProvenanceEntityRole { 052 /** 053 * A transformation of an entity into another, an update of an entity resulting in a new one, or the construction of a new entity based on a preexisting entity. 054 */ 055 DERIVATION, 056 /** 057 * A derivation for which the resulting entity is a revised version of some original. 058 */ 059 REVISION, 060 /** 061 * The repeat of (some or all of) an entity, such as text or image, by someone who may or may not be its original author. 062 */ 063 QUOTATION, 064 /** 065 * A primary source for a topic refers to something produced by some agent with direct experience and knowledge about the topic, at the time of the topic's study, without benefit from hindsight. 066 */ 067 SOURCE, 068 /** 069 * A derivation for which the entity is removed from accessibility usually through the use of the Delete operation. 070 */ 071 REMOVAL, 072 /** 073 * added to help the parsers with the generic types 074 */ 075 NULL; 076 public static ProvenanceEntityRole fromCode(String codeString) throws FHIRException { 077 if (codeString == null || "".equals(codeString)) 078 return null; 079 if ("derivation".equals(codeString)) 080 return DERIVATION; 081 if ("revision".equals(codeString)) 082 return REVISION; 083 if ("quotation".equals(codeString)) 084 return QUOTATION; 085 if ("source".equals(codeString)) 086 return SOURCE; 087 if ("removal".equals(codeString)) 088 return REMOVAL; 089 if (Configuration.isAcceptInvalidEnums()) 090 return null; 091 else 092 throw new FHIRException("Unknown ProvenanceEntityRole code '"+codeString+"'"); 093 } 094 public String toCode() { 095 switch (this) { 096 case DERIVATION: return "derivation"; 097 case REVISION: return "revision"; 098 case QUOTATION: return "quotation"; 099 case SOURCE: return "source"; 100 case REMOVAL: return "removal"; 101 default: return "?"; 102 } 103 } 104 public String getSystem() { 105 switch (this) { 106 case DERIVATION: return "http://hl7.org/fhir/provenance-entity-role"; 107 case REVISION: return "http://hl7.org/fhir/provenance-entity-role"; 108 case QUOTATION: return "http://hl7.org/fhir/provenance-entity-role"; 109 case SOURCE: return "http://hl7.org/fhir/provenance-entity-role"; 110 case REMOVAL: return "http://hl7.org/fhir/provenance-entity-role"; 111 default: return "?"; 112 } 113 } 114 public String getDefinition() { 115 switch (this) { 116 case DERIVATION: return "A transformation of an entity into another, an update of an entity resulting in a new one, or the construction of a new entity based on a preexisting entity."; 117 case REVISION: return "A derivation for which the resulting entity is a revised version of some original."; 118 case QUOTATION: return "The repeat of (some or all of) an entity, such as text or image, by someone who may or may not be its original author."; 119 case SOURCE: return "A primary source for a topic refers to something produced by some agent with direct experience and knowledge about the topic, at the time of the topic's study, without benefit from hindsight."; 120 case REMOVAL: return "A derivation for which the entity is removed from accessibility usually through the use of the Delete operation."; 121 default: return "?"; 122 } 123 } 124 public String getDisplay() { 125 switch (this) { 126 case DERIVATION: return "Derivation"; 127 case REVISION: return "Revision"; 128 case QUOTATION: return "Quotation"; 129 case SOURCE: return "Source"; 130 case REMOVAL: return "Removal"; 131 default: return "?"; 132 } 133 } 134 } 135 136 public static class ProvenanceEntityRoleEnumFactory implements EnumFactory<ProvenanceEntityRole> { 137 public ProvenanceEntityRole fromCode(String codeString) throws IllegalArgumentException { 138 if (codeString == null || "".equals(codeString)) 139 if (codeString == null || "".equals(codeString)) 140 return null; 141 if ("derivation".equals(codeString)) 142 return ProvenanceEntityRole.DERIVATION; 143 if ("revision".equals(codeString)) 144 return ProvenanceEntityRole.REVISION; 145 if ("quotation".equals(codeString)) 146 return ProvenanceEntityRole.QUOTATION; 147 if ("source".equals(codeString)) 148 return ProvenanceEntityRole.SOURCE; 149 if ("removal".equals(codeString)) 150 return ProvenanceEntityRole.REMOVAL; 151 throw new IllegalArgumentException("Unknown ProvenanceEntityRole code '"+codeString+"'"); 152 } 153 public Enumeration<ProvenanceEntityRole> fromType(Base code) throws FHIRException { 154 if (code == null) 155 return null; 156 if (code.isEmpty()) 157 return new Enumeration<ProvenanceEntityRole>(this); 158 String codeString = ((PrimitiveType) code).asStringValue(); 159 if (codeString == null || "".equals(codeString)) 160 return null; 161 if ("derivation".equals(codeString)) 162 return new Enumeration<ProvenanceEntityRole>(this, ProvenanceEntityRole.DERIVATION); 163 if ("revision".equals(codeString)) 164 return new Enumeration<ProvenanceEntityRole>(this, ProvenanceEntityRole.REVISION); 165 if ("quotation".equals(codeString)) 166 return new Enumeration<ProvenanceEntityRole>(this, ProvenanceEntityRole.QUOTATION); 167 if ("source".equals(codeString)) 168 return new Enumeration<ProvenanceEntityRole>(this, ProvenanceEntityRole.SOURCE); 169 if ("removal".equals(codeString)) 170 return new Enumeration<ProvenanceEntityRole>(this, ProvenanceEntityRole.REMOVAL); 171 throw new FHIRException("Unknown ProvenanceEntityRole code '"+codeString+"'"); 172 } 173 public String toCode(ProvenanceEntityRole code) { 174 if (code == ProvenanceEntityRole.DERIVATION) 175 return "derivation"; 176 if (code == ProvenanceEntityRole.REVISION) 177 return "revision"; 178 if (code == ProvenanceEntityRole.QUOTATION) 179 return "quotation"; 180 if (code == ProvenanceEntityRole.SOURCE) 181 return "source"; 182 if (code == ProvenanceEntityRole.REMOVAL) 183 return "removal"; 184 return "?"; 185 } 186 public String toSystem(ProvenanceEntityRole code) { 187 return code.getSystem(); 188 } 189 } 190 191 @Block() 192 public static class ProvenanceAgentComponent extends BackboneElement implements IBaseBackboneElement { 193 /** 194 * The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity. 195 */ 196 @Child(name = "role", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 197 @Description(shortDefinition="What the agents role was", formalDefinition="The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity." ) 198 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/security-role-type") 199 protected List<CodeableConcept> role; 200 201 /** 202 * The individual, device or organization that participated in the event. 203 */ 204 @Child(name = "who", type = {UriType.class, Practitioner.class, RelatedPerson.class, Patient.class, Device.class, Organization.class}, order=2, min=1, max=1, modifier=false, summary=true) 205 @Description(shortDefinition="Who participated", formalDefinition="The individual, device or organization that participated in the event." ) 206 protected Type who; 207 208 /** 209 * The individual, device, or organization for whom the change was made. 210 */ 211 @Child(name = "onBehalfOf", type = {UriType.class, Practitioner.class, RelatedPerson.class, Patient.class, Device.class, Organization.class}, order=3, min=0, max=1, modifier=false, summary=false) 212 @Description(shortDefinition="Who the agent is representing", formalDefinition="The individual, device, or organization for whom the change was made." ) 213 protected Type onBehalfOf; 214 215 /** 216 * The type of relationship between agents. 217 */ 218 @Child(name = "relatedAgentType", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) 219 @Description(shortDefinition="Type of relationship between agents", formalDefinition="The type of relationship between agents." ) 220 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v3-RoleLinkType") 221 protected CodeableConcept relatedAgentType; 222 223 private static final long serialVersionUID = -1431948744L; 224 225 /** 226 * Constructor 227 */ 228 public ProvenanceAgentComponent() { 229 super(); 230 } 231 232 /** 233 * Constructor 234 */ 235 public ProvenanceAgentComponent(Type who) { 236 super(); 237 this.who = who; 238 } 239 240 /** 241 * @return {@link #role} (The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity.) 242 */ 243 public List<CodeableConcept> getRole() { 244 if (this.role == null) 245 this.role = new ArrayList<CodeableConcept>(); 246 return this.role; 247 } 248 249 /** 250 * @return Returns a reference to <code>this</code> for easy method chaining 251 */ 252 public ProvenanceAgentComponent setRole(List<CodeableConcept> theRole) { 253 this.role = theRole; 254 return this; 255 } 256 257 public boolean hasRole() { 258 if (this.role == null) 259 return false; 260 for (CodeableConcept item : this.role) 261 if (!item.isEmpty()) 262 return true; 263 return false; 264 } 265 266 public CodeableConcept addRole() { //3 267 CodeableConcept t = new CodeableConcept(); 268 if (this.role == null) 269 this.role = new ArrayList<CodeableConcept>(); 270 this.role.add(t); 271 return t; 272 } 273 274 public ProvenanceAgentComponent addRole(CodeableConcept t) { //3 275 if (t == null) 276 return this; 277 if (this.role == null) 278 this.role = new ArrayList<CodeableConcept>(); 279 this.role.add(t); 280 return this; 281 } 282 283 /** 284 * @return The first repetition of repeating field {@link #role}, creating it if it does not already exist 285 */ 286 public CodeableConcept getRoleFirstRep() { 287 if (getRole().isEmpty()) { 288 addRole(); 289 } 290 return getRole().get(0); 291 } 292 293 /** 294 * @return {@link #who} (The individual, device or organization that participated in the event.) 295 */ 296 public Type getWho() { 297 return this.who; 298 } 299 300 /** 301 * @return {@link #who} (The individual, device or organization that participated in the event.) 302 */ 303 public UriType getWhoUriType() throws FHIRException { 304 if (!(this.who instanceof UriType)) 305 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.who.getClass().getName()+" was encountered"); 306 return (UriType) this.who; 307 } 308 309 public boolean hasWhoUriType() { 310 return this.who instanceof UriType; 311 } 312 313 /** 314 * @return {@link #who} (The individual, device or organization that participated in the event.) 315 */ 316 public Reference getWhoReference() throws FHIRException { 317 if (!(this.who instanceof Reference)) 318 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.who.getClass().getName()+" was encountered"); 319 return (Reference) this.who; 320 } 321 322 public boolean hasWhoReference() { 323 return this.who instanceof Reference; 324 } 325 326 public boolean hasWho() { 327 return this.who != null && !this.who.isEmpty(); 328 } 329 330 /** 331 * @param value {@link #who} (The individual, device or organization that participated in the event.) 332 */ 333 public ProvenanceAgentComponent setWho(Type value) { 334 this.who = value; 335 return this; 336 } 337 338 /** 339 * @return {@link #onBehalfOf} (The individual, device, or organization for whom the change was made.) 340 */ 341 public Type getOnBehalfOf() { 342 return this.onBehalfOf; 343 } 344 345 /** 346 * @return {@link #onBehalfOf} (The individual, device, or organization for whom the change was made.) 347 */ 348 public UriType getOnBehalfOfUriType() throws FHIRException { 349 if (!(this.onBehalfOf instanceof UriType)) 350 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.onBehalfOf.getClass().getName()+" was encountered"); 351 return (UriType) this.onBehalfOf; 352 } 353 354 public boolean hasOnBehalfOfUriType() { 355 return this.onBehalfOf instanceof UriType; 356 } 357 358 /** 359 * @return {@link #onBehalfOf} (The individual, device, or organization for whom the change was made.) 360 */ 361 public Reference getOnBehalfOfReference() throws FHIRException { 362 if (!(this.onBehalfOf instanceof Reference)) 363 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.onBehalfOf.getClass().getName()+" was encountered"); 364 return (Reference) this.onBehalfOf; 365 } 366 367 public boolean hasOnBehalfOfReference() { 368 return this.onBehalfOf instanceof Reference; 369 } 370 371 public boolean hasOnBehalfOf() { 372 return this.onBehalfOf != null && !this.onBehalfOf.isEmpty(); 373 } 374 375 /** 376 * @param value {@link #onBehalfOf} (The individual, device, or organization for whom the change was made.) 377 */ 378 public ProvenanceAgentComponent setOnBehalfOf(Type value) { 379 this.onBehalfOf = value; 380 return this; 381 } 382 383 /** 384 * @return {@link #relatedAgentType} (The type of relationship between agents.) 385 */ 386 public CodeableConcept getRelatedAgentType() { 387 if (this.relatedAgentType == null) 388 if (Configuration.errorOnAutoCreate()) 389 throw new Error("Attempt to auto-create ProvenanceAgentComponent.relatedAgentType"); 390 else if (Configuration.doAutoCreate()) 391 this.relatedAgentType = new CodeableConcept(); // cc 392 return this.relatedAgentType; 393 } 394 395 public boolean hasRelatedAgentType() { 396 return this.relatedAgentType != null && !this.relatedAgentType.isEmpty(); 397 } 398 399 /** 400 * @param value {@link #relatedAgentType} (The type of relationship between agents.) 401 */ 402 public ProvenanceAgentComponent setRelatedAgentType(CodeableConcept value) { 403 this.relatedAgentType = value; 404 return this; 405 } 406 407 protected void listChildren(List<Property> childrenList) { 408 super.listChildren(childrenList); 409 childrenList.add(new Property("role", "CodeableConcept", "The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity.", 0, java.lang.Integer.MAX_VALUE, role)); 410 childrenList.add(new Property("who[x]", "uri|Reference(Practitioner|RelatedPerson|Patient|Device|Organization)", "The individual, device or organization that participated in the event.", 0, java.lang.Integer.MAX_VALUE, who)); 411 childrenList.add(new Property("onBehalfOf[x]", "uri|Reference(Practitioner|RelatedPerson|Patient|Device|Organization)", "The individual, device, or organization for whom the change was made.", 0, java.lang.Integer.MAX_VALUE, onBehalfOf)); 412 childrenList.add(new Property("relatedAgentType", "CodeableConcept", "The type of relationship between agents.", 0, java.lang.Integer.MAX_VALUE, relatedAgentType)); 413 } 414 415 @Override 416 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 417 switch (hash) { 418 case 3506294: /*role*/ return this.role == null ? new Base[0] : this.role.toArray(new Base[this.role.size()]); // CodeableConcept 419 case 117694: /*who*/ return this.who == null ? new Base[0] : new Base[] {this.who}; // Type 420 case -14402964: /*onBehalfOf*/ return this.onBehalfOf == null ? new Base[0] : new Base[] {this.onBehalfOf}; // Type 421 case 1228161012: /*relatedAgentType*/ return this.relatedAgentType == null ? new Base[0] : new Base[] {this.relatedAgentType}; // CodeableConcept 422 default: return super.getProperty(hash, name, checkValid); 423 } 424 425 } 426 427 @Override 428 public Base setProperty(int hash, String name, Base value) throws FHIRException { 429 switch (hash) { 430 case 3506294: // role 431 this.getRole().add(castToCodeableConcept(value)); // CodeableConcept 432 return value; 433 case 117694: // who 434 this.who = castToType(value); // Type 435 return value; 436 case -14402964: // onBehalfOf 437 this.onBehalfOf = castToType(value); // Type 438 return value; 439 case 1228161012: // relatedAgentType 440 this.relatedAgentType = castToCodeableConcept(value); // CodeableConcept 441 return value; 442 default: return super.setProperty(hash, name, value); 443 } 444 445 } 446 447 @Override 448 public Base setProperty(String name, Base value) throws FHIRException { 449 if (name.equals("role")) { 450 this.getRole().add(castToCodeableConcept(value)); 451 } else if (name.equals("who[x]")) { 452 this.who = castToType(value); // Type 453 } else if (name.equals("onBehalfOf[x]")) { 454 this.onBehalfOf = castToType(value); // Type 455 } else if (name.equals("relatedAgentType")) { 456 this.relatedAgentType = castToCodeableConcept(value); // CodeableConcept 457 } else 458 return super.setProperty(name, value); 459 return value; 460 } 461 462 @Override 463 public Base makeProperty(int hash, String name) throws FHIRException { 464 switch (hash) { 465 case 3506294: return addRole(); 466 case -788654078: return getWho(); 467 case 117694: return getWho(); 468 case 418120340: return getOnBehalfOf(); 469 case -14402964: return getOnBehalfOf(); 470 case 1228161012: return getRelatedAgentType(); 471 default: return super.makeProperty(hash, name); 472 } 473 474 } 475 476 @Override 477 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 478 switch (hash) { 479 case 3506294: /*role*/ return new String[] {"CodeableConcept"}; 480 case 117694: /*who*/ return new String[] {"uri", "Reference"}; 481 case -14402964: /*onBehalfOf*/ return new String[] {"uri", "Reference"}; 482 case 1228161012: /*relatedAgentType*/ return new String[] {"CodeableConcept"}; 483 default: return super.getTypesForProperty(hash, name); 484 } 485 486 } 487 488 @Override 489 public Base addChild(String name) throws FHIRException { 490 if (name.equals("role")) { 491 return addRole(); 492 } 493 else if (name.equals("whoUri")) { 494 this.who = new UriType(); 495 return this.who; 496 } 497 else if (name.equals("whoReference")) { 498 this.who = new Reference(); 499 return this.who; 500 } 501 else if (name.equals("onBehalfOfUri")) { 502 this.onBehalfOf = new UriType(); 503 return this.onBehalfOf; 504 } 505 else if (name.equals("onBehalfOfReference")) { 506 this.onBehalfOf = new Reference(); 507 return this.onBehalfOf; 508 } 509 else if (name.equals("relatedAgentType")) { 510 this.relatedAgentType = new CodeableConcept(); 511 return this.relatedAgentType; 512 } 513 else 514 return super.addChild(name); 515 } 516 517 public ProvenanceAgentComponent copy() { 518 ProvenanceAgentComponent dst = new ProvenanceAgentComponent(); 519 copyValues(dst); 520 if (role != null) { 521 dst.role = new ArrayList<CodeableConcept>(); 522 for (CodeableConcept i : role) 523 dst.role.add(i.copy()); 524 }; 525 dst.who = who == null ? null : who.copy(); 526 dst.onBehalfOf = onBehalfOf == null ? null : onBehalfOf.copy(); 527 dst.relatedAgentType = relatedAgentType == null ? null : relatedAgentType.copy(); 528 return dst; 529 } 530 531 @Override 532 public boolean equalsDeep(Base other) { 533 if (!super.equalsDeep(other)) 534 return false; 535 if (!(other instanceof ProvenanceAgentComponent)) 536 return false; 537 ProvenanceAgentComponent o = (ProvenanceAgentComponent) other; 538 return compareDeep(role, o.role, true) && compareDeep(who, o.who, true) && compareDeep(onBehalfOf, o.onBehalfOf, true) 539 && compareDeep(relatedAgentType, o.relatedAgentType, true); 540 } 541 542 @Override 543 public boolean equalsShallow(Base other) { 544 if (!super.equalsShallow(other)) 545 return false; 546 if (!(other instanceof ProvenanceAgentComponent)) 547 return false; 548 ProvenanceAgentComponent o = (ProvenanceAgentComponent) other; 549 return true; 550 } 551 552 public boolean isEmpty() { 553 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(role, who, onBehalfOf, relatedAgentType 554 ); 555 } 556 557 public String fhirType() { 558 return "Provenance.agent"; 559 560 } 561 562 } 563 564 @Block() 565 public static class ProvenanceEntityComponent extends BackboneElement implements IBaseBackboneElement { 566 /** 567 * How the entity was used during the activity. 568 */ 569 @Child(name = "role", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 570 @Description(shortDefinition="derivation | revision | quotation | source | removal", formalDefinition="How the entity was used during the activity." ) 571 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/provenance-entity-role") 572 protected Enumeration<ProvenanceEntityRole> role; 573 574 /** 575 * Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative. 576 */ 577 @Child(name = "what", type = {UriType.class, Reference.class, Identifier.class}, order=2, min=1, max=1, modifier=false, summary=true) 578 @Description(shortDefinition="Identity of entity", formalDefinition="Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative." ) 579 protected Type what; 580 581 /** 582 * The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which generated the entity. 583 */ 584 @Child(name = "agent", type = {ProvenanceAgentComponent.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 585 @Description(shortDefinition="Entity is attributed to this agent", formalDefinition="The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which generated the entity." ) 586 protected List<ProvenanceAgentComponent> agent; 587 588 private static final long serialVersionUID = 1436676923L; 589 590 /** 591 * Constructor 592 */ 593 public ProvenanceEntityComponent() { 594 super(); 595 } 596 597 /** 598 * Constructor 599 */ 600 public ProvenanceEntityComponent(Enumeration<ProvenanceEntityRole> role, Type what) { 601 super(); 602 this.role = role; 603 this.what = what; 604 } 605 606 /** 607 * @return {@link #role} (How the entity was used during the activity.). This is the underlying object with id, value and extensions. The accessor "getRole" gives direct access to the value 608 */ 609 public Enumeration<ProvenanceEntityRole> getRoleElement() { 610 if (this.role == null) 611 if (Configuration.errorOnAutoCreate()) 612 throw new Error("Attempt to auto-create ProvenanceEntityComponent.role"); 613 else if (Configuration.doAutoCreate()) 614 this.role = new Enumeration<ProvenanceEntityRole>(new ProvenanceEntityRoleEnumFactory()); // bb 615 return this.role; 616 } 617 618 public boolean hasRoleElement() { 619 return this.role != null && !this.role.isEmpty(); 620 } 621 622 public boolean hasRole() { 623 return this.role != null && !this.role.isEmpty(); 624 } 625 626 /** 627 * @param value {@link #role} (How the entity was used during the activity.). This is the underlying object with id, value and extensions. The accessor "getRole" gives direct access to the value 628 */ 629 public ProvenanceEntityComponent setRoleElement(Enumeration<ProvenanceEntityRole> value) { 630 this.role = value; 631 return this; 632 } 633 634 /** 635 * @return How the entity was used during the activity. 636 */ 637 public ProvenanceEntityRole getRole() { 638 return this.role == null ? null : this.role.getValue(); 639 } 640 641 /** 642 * @param value How the entity was used during the activity. 643 */ 644 public ProvenanceEntityComponent setRole(ProvenanceEntityRole value) { 645 if (this.role == null) 646 this.role = new Enumeration<ProvenanceEntityRole>(new ProvenanceEntityRoleEnumFactory()); 647 this.role.setValue(value); 648 return this; 649 } 650 651 /** 652 * @return {@link #what} (Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.) 653 */ 654 public Type getWhat() { 655 return this.what; 656 } 657 658 /** 659 * @return {@link #what} (Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.) 660 */ 661 public UriType getWhatUriType() throws FHIRException { 662 if (!(this.what instanceof UriType)) 663 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.what.getClass().getName()+" was encountered"); 664 return (UriType) this.what; 665 } 666 667 public boolean hasWhatUriType() { 668 return this.what instanceof UriType; 669 } 670 671 /** 672 * @return {@link #what} (Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.) 673 */ 674 public Reference getWhatReference() throws FHIRException { 675 if (!(this.what instanceof Reference)) 676 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.what.getClass().getName()+" was encountered"); 677 return (Reference) this.what; 678 } 679 680 public boolean hasWhatReference() { 681 return this.what instanceof Reference; 682 } 683 684 /** 685 * @return {@link #what} (Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.) 686 */ 687 public Identifier getWhatIdentifier() throws FHIRException { 688 if (!(this.what instanceof Identifier)) 689 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.what.getClass().getName()+" was encountered"); 690 return (Identifier) this.what; 691 } 692 693 public boolean hasWhatIdentifier() { 694 return this.what instanceof Identifier; 695 } 696 697 public boolean hasWhat() { 698 return this.what != null && !this.what.isEmpty(); 699 } 700 701 /** 702 * @param value {@link #what} (Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.) 703 */ 704 public ProvenanceEntityComponent setWhat(Type value) { 705 this.what = value; 706 return this; 707 } 708 709 /** 710 * @return {@link #agent} (The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which generated the entity.) 711 */ 712 public List<ProvenanceAgentComponent> getAgent() { 713 if (this.agent == null) 714 this.agent = new ArrayList<ProvenanceAgentComponent>(); 715 return this.agent; 716 } 717 718 /** 719 * @return Returns a reference to <code>this</code> for easy method chaining 720 */ 721 public ProvenanceEntityComponent setAgent(List<ProvenanceAgentComponent> theAgent) { 722 this.agent = theAgent; 723 return this; 724 } 725 726 public boolean hasAgent() { 727 if (this.agent == null) 728 return false; 729 for (ProvenanceAgentComponent item : this.agent) 730 if (!item.isEmpty()) 731 return true; 732 return false; 733 } 734 735 public ProvenanceAgentComponent addAgent() { //3 736 ProvenanceAgentComponent t = new ProvenanceAgentComponent(); 737 if (this.agent == null) 738 this.agent = new ArrayList<ProvenanceAgentComponent>(); 739 this.agent.add(t); 740 return t; 741 } 742 743 public ProvenanceEntityComponent addAgent(ProvenanceAgentComponent t) { //3 744 if (t == null) 745 return this; 746 if (this.agent == null) 747 this.agent = new ArrayList<ProvenanceAgentComponent>(); 748 this.agent.add(t); 749 return this; 750 } 751 752 /** 753 * @return The first repetition of repeating field {@link #agent}, creating it if it does not already exist 754 */ 755 public ProvenanceAgentComponent getAgentFirstRep() { 756 if (getAgent().isEmpty()) { 757 addAgent(); 758 } 759 return getAgent().get(0); 760 } 761 762 protected void listChildren(List<Property> childrenList) { 763 super.listChildren(childrenList); 764 childrenList.add(new Property("role", "code", "How the entity was used during the activity.", 0, java.lang.Integer.MAX_VALUE, role)); 765 childrenList.add(new Property("what[x]", "uri|Reference(Any)|Identifier", "Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.", 0, java.lang.Integer.MAX_VALUE, what)); 766 childrenList.add(new Property("agent", "@Provenance.agent", "The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which generated the entity.", 0, java.lang.Integer.MAX_VALUE, agent)); 767 } 768 769 @Override 770 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 771 switch (hash) { 772 case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // Enumeration<ProvenanceEntityRole> 773 case 3648196: /*what*/ return this.what == null ? new Base[0] : new Base[] {this.what}; // Type 774 case 92750597: /*agent*/ return this.agent == null ? new Base[0] : this.agent.toArray(new Base[this.agent.size()]); // ProvenanceAgentComponent 775 default: return super.getProperty(hash, name, checkValid); 776 } 777 778 } 779 780 @Override 781 public Base setProperty(int hash, String name, Base value) throws FHIRException { 782 switch (hash) { 783 case 3506294: // role 784 value = new ProvenanceEntityRoleEnumFactory().fromType(castToCode(value)); 785 this.role = (Enumeration) value; // Enumeration<ProvenanceEntityRole> 786 return value; 787 case 3648196: // what 788 this.what = castToType(value); // Type 789 return value; 790 case 92750597: // agent 791 this.getAgent().add((ProvenanceAgentComponent) value); // ProvenanceAgentComponent 792 return value; 793 default: return super.setProperty(hash, name, value); 794 } 795 796 } 797 798 @Override 799 public Base setProperty(String name, Base value) throws FHIRException { 800 if (name.equals("role")) { 801 value = new ProvenanceEntityRoleEnumFactory().fromType(castToCode(value)); 802 this.role = (Enumeration) value; // Enumeration<ProvenanceEntityRole> 803 } else if (name.equals("what[x]")) { 804 this.what = castToType(value); // Type 805 } else if (name.equals("agent")) { 806 this.getAgent().add((ProvenanceAgentComponent) value); 807 } else 808 return super.setProperty(name, value); 809 return value; 810 } 811 812 @Override 813 public Base makeProperty(int hash, String name) throws FHIRException { 814 switch (hash) { 815 case 3506294: return getRoleElement(); 816 case 1309315900: return getWhat(); 817 case 3648196: return getWhat(); 818 case 92750597: return addAgent(); 819 default: return super.makeProperty(hash, name); 820 } 821 822 } 823 824 @Override 825 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 826 switch (hash) { 827 case 3506294: /*role*/ return new String[] {"code"}; 828 case 3648196: /*what*/ return new String[] {"uri", "Reference", "Identifier"}; 829 case 92750597: /*agent*/ return new String[] {"@Provenance.agent"}; 830 default: return super.getTypesForProperty(hash, name); 831 } 832 833 } 834 835 @Override 836 public Base addChild(String name) throws FHIRException { 837 if (name.equals("role")) { 838 throw new FHIRException("Cannot call addChild on a primitive type Provenance.role"); 839 } 840 else if (name.equals("whatUri")) { 841 this.what = new UriType(); 842 return this.what; 843 } 844 else if (name.equals("whatReference")) { 845 this.what = new Reference(); 846 return this.what; 847 } 848 else if (name.equals("whatIdentifier")) { 849 this.what = new Identifier(); 850 return this.what; 851 } 852 else if (name.equals("agent")) { 853 return addAgent(); 854 } 855 else 856 return super.addChild(name); 857 } 858 859 public ProvenanceEntityComponent copy() { 860 ProvenanceEntityComponent dst = new ProvenanceEntityComponent(); 861 copyValues(dst); 862 dst.role = role == null ? null : role.copy(); 863 dst.what = what == null ? null : what.copy(); 864 if (agent != null) { 865 dst.agent = new ArrayList<ProvenanceAgentComponent>(); 866 for (ProvenanceAgentComponent i : agent) 867 dst.agent.add(i.copy()); 868 }; 869 return dst; 870 } 871 872 @Override 873 public boolean equalsDeep(Base other) { 874 if (!super.equalsDeep(other)) 875 return false; 876 if (!(other instanceof ProvenanceEntityComponent)) 877 return false; 878 ProvenanceEntityComponent o = (ProvenanceEntityComponent) other; 879 return compareDeep(role, o.role, true) && compareDeep(what, o.what, true) && compareDeep(agent, o.agent, true) 880 ; 881 } 882 883 @Override 884 public boolean equalsShallow(Base other) { 885 if (!super.equalsShallow(other)) 886 return false; 887 if (!(other instanceof ProvenanceEntityComponent)) 888 return false; 889 ProvenanceEntityComponent o = (ProvenanceEntityComponent) other; 890 return compareValues(role, o.role, true); 891 } 892 893 public boolean isEmpty() { 894 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(role, what, agent); 895 } 896 897 public String fhirType() { 898 return "Provenance.entity"; 899 900 } 901 902 } 903 904 /** 905 * The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity. 906 */ 907 @Child(name = "target", type = {Reference.class}, order=0, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 908 @Description(shortDefinition="Target Reference(s) (usually version specific)", formalDefinition="The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity." ) 909 protected List<Reference> target; 910 /** 911 * The actual objects that are the target of the reference (The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.) 912 */ 913 protected List<Resource> targetTarget; 914 915 916 /** 917 * The period during which the activity occurred. 918 */ 919 @Child(name = "period", type = {Period.class}, order=1, min=0, max=1, modifier=false, summary=false) 920 @Description(shortDefinition="When the activity occurred", formalDefinition="The period during which the activity occurred." ) 921 protected Period period; 922 923 /** 924 * The instant of time at which the activity was recorded. 925 */ 926 @Child(name = "recorded", type = {InstantType.class}, order=2, min=1, max=1, modifier=false, summary=true) 927 @Description(shortDefinition="When the activity was recorded / updated", formalDefinition="The instant of time at which the activity was recorded." ) 928 protected InstantType recorded; 929 930 /** 931 * Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc. 932 */ 933 @Child(name = "policy", type = {UriType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 934 @Description(shortDefinition="Policy or plan the activity was defined by", formalDefinition="Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc." ) 935 protected List<UriType> policy; 936 937 /** 938 * Where the activity occurred, if relevant. 939 */ 940 @Child(name = "location", type = {Location.class}, order=4, min=0, max=1, modifier=false, summary=false) 941 @Description(shortDefinition="Where the activity occurred, if relevant", formalDefinition="Where the activity occurred, if relevant." ) 942 protected Reference location; 943 944 /** 945 * The actual object that is the target of the reference (Where the activity occurred, if relevant.) 946 */ 947 protected Location locationTarget; 948 949 /** 950 * The reason that the activity was taking place. 951 */ 952 @Child(name = "reason", type = {Coding.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 953 @Description(shortDefinition="Reason the activity is occurring", formalDefinition="The reason that the activity was taking place." ) 954 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v3-PurposeOfUse") 955 protected List<Coding> reason; 956 957 /** 958 * An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities. 959 */ 960 @Child(name = "activity", type = {Coding.class}, order=6, min=0, max=1, modifier=false, summary=false) 961 @Description(shortDefinition="Activity that occurred", formalDefinition="An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities." ) 962 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/provenance-activity-type") 963 protected Coding activity; 964 965 /** 966 * An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place. 967 */ 968 @Child(name = "agent", type = {}, order=7, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 969 @Description(shortDefinition="Actor involved", formalDefinition="An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place." ) 970 protected List<ProvenanceAgentComponent> agent; 971 972 /** 973 * An entity used in this activity. 974 */ 975 @Child(name = "entity", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 976 @Description(shortDefinition="An entity used in this activity", formalDefinition="An entity used in this activity." ) 977 protected List<ProvenanceEntityComponent> entity; 978 979 /** 980 * A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated. 981 */ 982 @Child(name = "signature", type = {Signature.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 983 @Description(shortDefinition="Signature on target", formalDefinition="A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated." ) 984 protected List<Signature> signature; 985 986 private static final long serialVersionUID = -1668640371L; 987 988 /** 989 * Constructor 990 */ 991 public Provenance() { 992 super(); 993 } 994 995 /** 996 * Constructor 997 */ 998 public Provenance(InstantType recorded) { 999 super(); 1000 this.recorded = recorded; 1001 } 1002 1003 /** 1004 * @return {@link #target} (The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.) 1005 */ 1006 public List<Reference> getTarget() { 1007 if (this.target == null) 1008 this.target = new ArrayList<Reference>(); 1009 return this.target; 1010 } 1011 1012 /** 1013 * @return Returns a reference to <code>this</code> for easy method chaining 1014 */ 1015 public Provenance setTarget(List<Reference> theTarget) { 1016 this.target = theTarget; 1017 return this; 1018 } 1019 1020 public boolean hasTarget() { 1021 if (this.target == null) 1022 return false; 1023 for (Reference item : this.target) 1024 if (!item.isEmpty()) 1025 return true; 1026 return false; 1027 } 1028 1029 public Reference addTarget() { //3 1030 Reference t = new Reference(); 1031 if (this.target == null) 1032 this.target = new ArrayList<Reference>(); 1033 this.target.add(t); 1034 return t; 1035 } 1036 1037 public Provenance addTarget(Reference t) { //3 1038 if (t == null) 1039 return this; 1040 if (this.target == null) 1041 this.target = new ArrayList<Reference>(); 1042 this.target.add(t); 1043 return this; 1044 } 1045 1046 /** 1047 * @return The first repetition of repeating field {@link #target}, creating it if it does not already exist 1048 */ 1049 public Reference getTargetFirstRep() { 1050 if (getTarget().isEmpty()) { 1051 addTarget(); 1052 } 1053 return getTarget().get(0); 1054 } 1055 1056 /** 1057 * @deprecated Use Reference#setResource(IBaseResource) instead 1058 */ 1059 @Deprecated 1060 public List<Resource> getTargetTarget() { 1061 if (this.targetTarget == null) 1062 this.targetTarget = new ArrayList<Resource>(); 1063 return this.targetTarget; 1064 } 1065 1066 /** 1067 * @return {@link #period} (The period during which the activity occurred.) 1068 */ 1069 public Period getPeriod() { 1070 if (this.period == null) 1071 if (Configuration.errorOnAutoCreate()) 1072 throw new Error("Attempt to auto-create Provenance.period"); 1073 else if (Configuration.doAutoCreate()) 1074 this.period = new Period(); // cc 1075 return this.period; 1076 } 1077 1078 public boolean hasPeriod() { 1079 return this.period != null && !this.period.isEmpty(); 1080 } 1081 1082 /** 1083 * @param value {@link #period} (The period during which the activity occurred.) 1084 */ 1085 public Provenance setPeriod(Period value) { 1086 this.period = value; 1087 return this; 1088 } 1089 1090 /** 1091 * @return {@link #recorded} (The instant of time at which the activity was recorded.). This is the underlying object with id, value and extensions. The accessor "getRecorded" gives direct access to the value 1092 */ 1093 public InstantType getRecordedElement() { 1094 if (this.recorded == null) 1095 if (Configuration.errorOnAutoCreate()) 1096 throw new Error("Attempt to auto-create Provenance.recorded"); 1097 else if (Configuration.doAutoCreate()) 1098 this.recorded = new InstantType(); // bb 1099 return this.recorded; 1100 } 1101 1102 public boolean hasRecordedElement() { 1103 return this.recorded != null && !this.recorded.isEmpty(); 1104 } 1105 1106 public boolean hasRecorded() { 1107 return this.recorded != null && !this.recorded.isEmpty(); 1108 } 1109 1110 /** 1111 * @param value {@link #recorded} (The instant of time at which the activity was recorded.). This is the underlying object with id, value and extensions. The accessor "getRecorded" gives direct access to the value 1112 */ 1113 public Provenance setRecordedElement(InstantType value) { 1114 this.recorded = value; 1115 return this; 1116 } 1117 1118 /** 1119 * @return The instant of time at which the activity was recorded. 1120 */ 1121 public Date getRecorded() { 1122 return this.recorded == null ? null : this.recorded.getValue(); 1123 } 1124 1125 /** 1126 * @param value The instant of time at which the activity was recorded. 1127 */ 1128 public Provenance setRecorded(Date value) { 1129 if (this.recorded == null) 1130 this.recorded = new InstantType(); 1131 this.recorded.setValue(value); 1132 return this; 1133 } 1134 1135 /** 1136 * @return {@link #policy} (Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.) 1137 */ 1138 public List<UriType> getPolicy() { 1139 if (this.policy == null) 1140 this.policy = new ArrayList<UriType>(); 1141 return this.policy; 1142 } 1143 1144 /** 1145 * @return Returns a reference to <code>this</code> for easy method chaining 1146 */ 1147 public Provenance setPolicy(List<UriType> thePolicy) { 1148 this.policy = thePolicy; 1149 return this; 1150 } 1151 1152 public boolean hasPolicy() { 1153 if (this.policy == null) 1154 return false; 1155 for (UriType item : this.policy) 1156 if (!item.isEmpty()) 1157 return true; 1158 return false; 1159 } 1160 1161 /** 1162 * @return {@link #policy} (Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.) 1163 */ 1164 public UriType addPolicyElement() {//2 1165 UriType t = new UriType(); 1166 if (this.policy == null) 1167 this.policy = new ArrayList<UriType>(); 1168 this.policy.add(t); 1169 return t; 1170 } 1171 1172 /** 1173 * @param value {@link #policy} (Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.) 1174 */ 1175 public Provenance addPolicy(String value) { //1 1176 UriType t = new UriType(); 1177 t.setValue(value); 1178 if (this.policy == null) 1179 this.policy = new ArrayList<UriType>(); 1180 this.policy.add(t); 1181 return this; 1182 } 1183 1184 /** 1185 * @param value {@link #policy} (Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.) 1186 */ 1187 public boolean hasPolicy(String value) { 1188 if (this.policy == null) 1189 return false; 1190 for (UriType v : this.policy) 1191 if (v.equals(value)) // uri 1192 return true; 1193 return false; 1194 } 1195 1196 /** 1197 * @return {@link #location} (Where the activity occurred, if relevant.) 1198 */ 1199 public Reference getLocation() { 1200 if (this.location == null) 1201 if (Configuration.errorOnAutoCreate()) 1202 throw new Error("Attempt to auto-create Provenance.location"); 1203 else if (Configuration.doAutoCreate()) 1204 this.location = new Reference(); // cc 1205 return this.location; 1206 } 1207 1208 public boolean hasLocation() { 1209 return this.location != null && !this.location.isEmpty(); 1210 } 1211 1212 /** 1213 * @param value {@link #location} (Where the activity occurred, if relevant.) 1214 */ 1215 public Provenance setLocation(Reference value) { 1216 this.location = value; 1217 return this; 1218 } 1219 1220 /** 1221 * @return {@link #location} 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. (Where the activity occurred, if relevant.) 1222 */ 1223 public Location getLocationTarget() { 1224 if (this.locationTarget == null) 1225 if (Configuration.errorOnAutoCreate()) 1226 throw new Error("Attempt to auto-create Provenance.location"); 1227 else if (Configuration.doAutoCreate()) 1228 this.locationTarget = new Location(); // aa 1229 return this.locationTarget; 1230 } 1231 1232 /** 1233 * @param value {@link #location} 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. (Where the activity occurred, if relevant.) 1234 */ 1235 public Provenance setLocationTarget(Location value) { 1236 this.locationTarget = value; 1237 return this; 1238 } 1239 1240 /** 1241 * @return {@link #reason} (The reason that the activity was taking place.) 1242 */ 1243 public List<Coding> getReason() { 1244 if (this.reason == null) 1245 this.reason = new ArrayList<Coding>(); 1246 return this.reason; 1247 } 1248 1249 /** 1250 * @return Returns a reference to <code>this</code> for easy method chaining 1251 */ 1252 public Provenance setReason(List<Coding> theReason) { 1253 this.reason = theReason; 1254 return this; 1255 } 1256 1257 public boolean hasReason() { 1258 if (this.reason == null) 1259 return false; 1260 for (Coding item : this.reason) 1261 if (!item.isEmpty()) 1262 return true; 1263 return false; 1264 } 1265 1266 public Coding addReason() { //3 1267 Coding t = new Coding(); 1268 if (this.reason == null) 1269 this.reason = new ArrayList<Coding>(); 1270 this.reason.add(t); 1271 return t; 1272 } 1273 1274 public Provenance addReason(Coding t) { //3 1275 if (t == null) 1276 return this; 1277 if (this.reason == null) 1278 this.reason = new ArrayList<Coding>(); 1279 this.reason.add(t); 1280 return this; 1281 } 1282 1283 /** 1284 * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist 1285 */ 1286 public Coding getReasonFirstRep() { 1287 if (getReason().isEmpty()) { 1288 addReason(); 1289 } 1290 return getReason().get(0); 1291 } 1292 1293 /** 1294 * @return {@link #activity} (An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.) 1295 */ 1296 public Coding getActivity() { 1297 if (this.activity == null) 1298 if (Configuration.errorOnAutoCreate()) 1299 throw new Error("Attempt to auto-create Provenance.activity"); 1300 else if (Configuration.doAutoCreate()) 1301 this.activity = new Coding(); // cc 1302 return this.activity; 1303 } 1304 1305 public boolean hasActivity() { 1306 return this.activity != null && !this.activity.isEmpty(); 1307 } 1308 1309 /** 1310 * @param value {@link #activity} (An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.) 1311 */ 1312 public Provenance setActivity(Coding value) { 1313 this.activity = value; 1314 return this; 1315 } 1316 1317 /** 1318 * @return {@link #agent} (An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.) 1319 */ 1320 public List<ProvenanceAgentComponent> getAgent() { 1321 if (this.agent == null) 1322 this.agent = new ArrayList<ProvenanceAgentComponent>(); 1323 return this.agent; 1324 } 1325 1326 /** 1327 * @return Returns a reference to <code>this</code> for easy method chaining 1328 */ 1329 public Provenance setAgent(List<ProvenanceAgentComponent> theAgent) { 1330 this.agent = theAgent; 1331 return this; 1332 } 1333 1334 public boolean hasAgent() { 1335 if (this.agent == null) 1336 return false; 1337 for (ProvenanceAgentComponent item : this.agent) 1338 if (!item.isEmpty()) 1339 return true; 1340 return false; 1341 } 1342 1343 public ProvenanceAgentComponent addAgent() { //3 1344 ProvenanceAgentComponent t = new ProvenanceAgentComponent(); 1345 if (this.agent == null) 1346 this.agent = new ArrayList<ProvenanceAgentComponent>(); 1347 this.agent.add(t); 1348 return t; 1349 } 1350 1351 public Provenance addAgent(ProvenanceAgentComponent t) { //3 1352 if (t == null) 1353 return this; 1354 if (this.agent == null) 1355 this.agent = new ArrayList<ProvenanceAgentComponent>(); 1356 this.agent.add(t); 1357 return this; 1358 } 1359 1360 /** 1361 * @return The first repetition of repeating field {@link #agent}, creating it if it does not already exist 1362 */ 1363 public ProvenanceAgentComponent getAgentFirstRep() { 1364 if (getAgent().isEmpty()) { 1365 addAgent(); 1366 } 1367 return getAgent().get(0); 1368 } 1369 1370 /** 1371 * @return {@link #entity} (An entity used in this activity.) 1372 */ 1373 public List<ProvenanceEntityComponent> getEntity() { 1374 if (this.entity == null) 1375 this.entity = new ArrayList<ProvenanceEntityComponent>(); 1376 return this.entity; 1377 } 1378 1379 /** 1380 * @return Returns a reference to <code>this</code> for easy method chaining 1381 */ 1382 public Provenance setEntity(List<ProvenanceEntityComponent> theEntity) { 1383 this.entity = theEntity; 1384 return this; 1385 } 1386 1387 public boolean hasEntity() { 1388 if (this.entity == null) 1389 return false; 1390 for (ProvenanceEntityComponent item : this.entity) 1391 if (!item.isEmpty()) 1392 return true; 1393 return false; 1394 } 1395 1396 public ProvenanceEntityComponent addEntity() { //3 1397 ProvenanceEntityComponent t = new ProvenanceEntityComponent(); 1398 if (this.entity == null) 1399 this.entity = new ArrayList<ProvenanceEntityComponent>(); 1400 this.entity.add(t); 1401 return t; 1402 } 1403 1404 public Provenance addEntity(ProvenanceEntityComponent t) { //3 1405 if (t == null) 1406 return this; 1407 if (this.entity == null) 1408 this.entity = new ArrayList<ProvenanceEntityComponent>(); 1409 this.entity.add(t); 1410 return this; 1411 } 1412 1413 /** 1414 * @return The first repetition of repeating field {@link #entity}, creating it if it does not already exist 1415 */ 1416 public ProvenanceEntityComponent getEntityFirstRep() { 1417 if (getEntity().isEmpty()) { 1418 addEntity(); 1419 } 1420 return getEntity().get(0); 1421 } 1422 1423 /** 1424 * @return {@link #signature} (A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.) 1425 */ 1426 public List<Signature> getSignature() { 1427 if (this.signature == null) 1428 this.signature = new ArrayList<Signature>(); 1429 return this.signature; 1430 } 1431 1432 /** 1433 * @return Returns a reference to <code>this</code> for easy method chaining 1434 */ 1435 public Provenance setSignature(List<Signature> theSignature) { 1436 this.signature = theSignature; 1437 return this; 1438 } 1439 1440 public boolean hasSignature() { 1441 if (this.signature == null) 1442 return false; 1443 for (Signature item : this.signature) 1444 if (!item.isEmpty()) 1445 return true; 1446 return false; 1447 } 1448 1449 public Signature addSignature() { //3 1450 Signature t = new Signature(); 1451 if (this.signature == null) 1452 this.signature = new ArrayList<Signature>(); 1453 this.signature.add(t); 1454 return t; 1455 } 1456 1457 public Provenance addSignature(Signature t) { //3 1458 if (t == null) 1459 return this; 1460 if (this.signature == null) 1461 this.signature = new ArrayList<Signature>(); 1462 this.signature.add(t); 1463 return this; 1464 } 1465 1466 /** 1467 * @return The first repetition of repeating field {@link #signature}, creating it if it does not already exist 1468 */ 1469 public Signature getSignatureFirstRep() { 1470 if (getSignature().isEmpty()) { 1471 addSignature(); 1472 } 1473 return getSignature().get(0); 1474 } 1475 1476 protected void listChildren(List<Property> childrenList) { 1477 super.listChildren(childrenList); 1478 childrenList.add(new Property("target", "Reference(Any)", "The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.", 0, java.lang.Integer.MAX_VALUE, target)); 1479 childrenList.add(new Property("period", "Period", "The period during which the activity occurred.", 0, java.lang.Integer.MAX_VALUE, period)); 1480 childrenList.add(new Property("recorded", "instant", "The instant of time at which the activity was recorded.", 0, java.lang.Integer.MAX_VALUE, recorded)); 1481 childrenList.add(new Property("policy", "uri", "Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.", 0, java.lang.Integer.MAX_VALUE, policy)); 1482 childrenList.add(new Property("location", "Reference(Location)", "Where the activity occurred, if relevant.", 0, java.lang.Integer.MAX_VALUE, location)); 1483 childrenList.add(new Property("reason", "Coding", "The reason that the activity was taking place.", 0, java.lang.Integer.MAX_VALUE, reason)); 1484 childrenList.add(new Property("activity", "Coding", "An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.", 0, java.lang.Integer.MAX_VALUE, activity)); 1485 childrenList.add(new Property("agent", "", "An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.", 0, java.lang.Integer.MAX_VALUE, agent)); 1486 childrenList.add(new Property("entity", "", "An entity used in this activity.", 0, java.lang.Integer.MAX_VALUE, entity)); 1487 childrenList.add(new Property("signature", "Signature", "A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.", 0, java.lang.Integer.MAX_VALUE, signature)); 1488 } 1489 1490 @Override 1491 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1492 switch (hash) { 1493 case -880905839: /*target*/ return this.target == null ? new Base[0] : this.target.toArray(new Base[this.target.size()]); // Reference 1494 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 1495 case -799233872: /*recorded*/ return this.recorded == null ? new Base[0] : new Base[] {this.recorded}; // InstantType 1496 case -982670030: /*policy*/ return this.policy == null ? new Base[0] : this.policy.toArray(new Base[this.policy.size()]); // UriType 1497 case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference 1498 case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // Coding 1499 case -1655966961: /*activity*/ return this.activity == null ? new Base[0] : new Base[] {this.activity}; // Coding 1500 case 92750597: /*agent*/ return this.agent == null ? new Base[0] : this.agent.toArray(new Base[this.agent.size()]); // ProvenanceAgentComponent 1501 case -1298275357: /*entity*/ return this.entity == null ? new Base[0] : this.entity.toArray(new Base[this.entity.size()]); // ProvenanceEntityComponent 1502 case 1073584312: /*signature*/ return this.signature == null ? new Base[0] : this.signature.toArray(new Base[this.signature.size()]); // Signature 1503 default: return super.getProperty(hash, name, checkValid); 1504 } 1505 1506 } 1507 1508 @Override 1509 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1510 switch (hash) { 1511 case -880905839: // target 1512 this.getTarget().add(castToReference(value)); // Reference 1513 return value; 1514 case -991726143: // period 1515 this.period = castToPeriod(value); // Period 1516 return value; 1517 case -799233872: // recorded 1518 this.recorded = castToInstant(value); // InstantType 1519 return value; 1520 case -982670030: // policy 1521 this.getPolicy().add(castToUri(value)); // UriType 1522 return value; 1523 case 1901043637: // location 1524 this.location = castToReference(value); // Reference 1525 return value; 1526 case -934964668: // reason 1527 this.getReason().add(castToCoding(value)); // Coding 1528 return value; 1529 case -1655966961: // activity 1530 this.activity = castToCoding(value); // Coding 1531 return value; 1532 case 92750597: // agent 1533 this.getAgent().add((ProvenanceAgentComponent) value); // ProvenanceAgentComponent 1534 return value; 1535 case -1298275357: // entity 1536 this.getEntity().add((ProvenanceEntityComponent) value); // ProvenanceEntityComponent 1537 return value; 1538 case 1073584312: // signature 1539 this.getSignature().add(castToSignature(value)); // Signature 1540 return value; 1541 default: return super.setProperty(hash, name, value); 1542 } 1543 1544 } 1545 1546 @Override 1547 public Base setProperty(String name, Base value) throws FHIRException { 1548 if (name.equals("target")) { 1549 this.getTarget().add(castToReference(value)); 1550 } else if (name.equals("period")) { 1551 this.period = castToPeriod(value); // Period 1552 } else if (name.equals("recorded")) { 1553 this.recorded = castToInstant(value); // InstantType 1554 } else if (name.equals("policy")) { 1555 this.getPolicy().add(castToUri(value)); 1556 } else if (name.equals("location")) { 1557 this.location = castToReference(value); // Reference 1558 } else if (name.equals("reason")) { 1559 this.getReason().add(castToCoding(value)); 1560 } else if (name.equals("activity")) { 1561 this.activity = castToCoding(value); // Coding 1562 } else if (name.equals("agent")) { 1563 this.getAgent().add((ProvenanceAgentComponent) value); 1564 } else if (name.equals("entity")) { 1565 this.getEntity().add((ProvenanceEntityComponent) value); 1566 } else if (name.equals("signature")) { 1567 this.getSignature().add(castToSignature(value)); 1568 } else 1569 return super.setProperty(name, value); 1570 return value; 1571 } 1572 1573 @Override 1574 public Base makeProperty(int hash, String name) throws FHIRException { 1575 switch (hash) { 1576 case -880905839: return addTarget(); 1577 case -991726143: return getPeriod(); 1578 case -799233872: return getRecordedElement(); 1579 case -982670030: return addPolicyElement(); 1580 case 1901043637: return getLocation(); 1581 case -934964668: return addReason(); 1582 case -1655966961: return getActivity(); 1583 case 92750597: return addAgent(); 1584 case -1298275357: return addEntity(); 1585 case 1073584312: return addSignature(); 1586 default: return super.makeProperty(hash, name); 1587 } 1588 1589 } 1590 1591 @Override 1592 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1593 switch (hash) { 1594 case -880905839: /*target*/ return new String[] {"Reference"}; 1595 case -991726143: /*period*/ return new String[] {"Period"}; 1596 case -799233872: /*recorded*/ return new String[] {"instant"}; 1597 case -982670030: /*policy*/ return new String[] {"uri"}; 1598 case 1901043637: /*location*/ return new String[] {"Reference"}; 1599 case -934964668: /*reason*/ return new String[] {"Coding"}; 1600 case -1655966961: /*activity*/ return new String[] {"Coding"}; 1601 case 92750597: /*agent*/ return new String[] {}; 1602 case -1298275357: /*entity*/ return new String[] {}; 1603 case 1073584312: /*signature*/ return new String[] {"Signature"}; 1604 default: return super.getTypesForProperty(hash, name); 1605 } 1606 1607 } 1608 1609 @Override 1610 public Base addChild(String name) throws FHIRException { 1611 if (name.equals("target")) { 1612 return addTarget(); 1613 } 1614 else if (name.equals("period")) { 1615 this.period = new Period(); 1616 return this.period; 1617 } 1618 else if (name.equals("recorded")) { 1619 throw new FHIRException("Cannot call addChild on a primitive type Provenance.recorded"); 1620 } 1621 else if (name.equals("policy")) { 1622 throw new FHIRException("Cannot call addChild on a primitive type Provenance.policy"); 1623 } 1624 else if (name.equals("location")) { 1625 this.location = new Reference(); 1626 return this.location; 1627 } 1628 else if (name.equals("reason")) { 1629 return addReason(); 1630 } 1631 else if (name.equals("activity")) { 1632 this.activity = new Coding(); 1633 return this.activity; 1634 } 1635 else if (name.equals("agent")) { 1636 return addAgent(); 1637 } 1638 else if (name.equals("entity")) { 1639 return addEntity(); 1640 } 1641 else if (name.equals("signature")) { 1642 return addSignature(); 1643 } 1644 else 1645 return super.addChild(name); 1646 } 1647 1648 public String fhirType() { 1649 return "Provenance"; 1650 1651 } 1652 1653 public Provenance copy() { 1654 Provenance dst = new Provenance(); 1655 copyValues(dst); 1656 if (target != null) { 1657 dst.target = new ArrayList<Reference>(); 1658 for (Reference i : target) 1659 dst.target.add(i.copy()); 1660 }; 1661 dst.period = period == null ? null : period.copy(); 1662 dst.recorded = recorded == null ? null : recorded.copy(); 1663 if (policy != null) { 1664 dst.policy = new ArrayList<UriType>(); 1665 for (UriType i : policy) 1666 dst.policy.add(i.copy()); 1667 }; 1668 dst.location = location == null ? null : location.copy(); 1669 if (reason != null) { 1670 dst.reason = new ArrayList<Coding>(); 1671 for (Coding i : reason) 1672 dst.reason.add(i.copy()); 1673 }; 1674 dst.activity = activity == null ? null : activity.copy(); 1675 if (agent != null) { 1676 dst.agent = new ArrayList<ProvenanceAgentComponent>(); 1677 for (ProvenanceAgentComponent i : agent) 1678 dst.agent.add(i.copy()); 1679 }; 1680 if (entity != null) { 1681 dst.entity = new ArrayList<ProvenanceEntityComponent>(); 1682 for (ProvenanceEntityComponent i : entity) 1683 dst.entity.add(i.copy()); 1684 }; 1685 if (signature != null) { 1686 dst.signature = new ArrayList<Signature>(); 1687 for (Signature i : signature) 1688 dst.signature.add(i.copy()); 1689 }; 1690 return dst; 1691 } 1692 1693 protected Provenance typedCopy() { 1694 return copy(); 1695 } 1696 1697 @Override 1698 public boolean equalsDeep(Base other) { 1699 if (!super.equalsDeep(other)) 1700 return false; 1701 if (!(other instanceof Provenance)) 1702 return false; 1703 Provenance o = (Provenance) other; 1704 return compareDeep(target, o.target, true) && compareDeep(period, o.period, true) && compareDeep(recorded, o.recorded, true) 1705 && compareDeep(policy, o.policy, true) && compareDeep(location, o.location, true) && compareDeep(reason, o.reason, true) 1706 && compareDeep(activity, o.activity, true) && compareDeep(agent, o.agent, true) && compareDeep(entity, o.entity, true) 1707 && compareDeep(signature, o.signature, true); 1708 } 1709 1710 @Override 1711 public boolean equalsShallow(Base other) { 1712 if (!super.equalsShallow(other)) 1713 return false; 1714 if (!(other instanceof Provenance)) 1715 return false; 1716 Provenance o = (Provenance) other; 1717 return compareValues(recorded, o.recorded, true) && compareValues(policy, o.policy, true); 1718 } 1719 1720 public boolean isEmpty() { 1721 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(target, period, recorded 1722 , policy, location, reason, activity, agent, entity, signature); 1723 } 1724 1725 @Override 1726 public ResourceType getResourceType() { 1727 return ResourceType.Provenance; 1728 } 1729 1730 /** 1731 * Search parameter: <b>entity-ref</b> 1732 * <p> 1733 * Description: <b>Identity of entity</b><br> 1734 * Type: <b>reference</b><br> 1735 * Path: <b>Provenance.entity.whatReference</b><br> 1736 * </p> 1737 */ 1738 @SearchParamDefinition(name="entity-ref", path="Provenance.entity.what.as(Reference)", description="Identity of entity", type="reference" ) 1739 public static final String SP_ENTITY_REF = "entity-ref"; 1740 /** 1741 * <b>Fluent Client</b> search parameter constant for <b>entity-ref</b> 1742 * <p> 1743 * Description: <b>Identity of entity</b><br> 1744 * Type: <b>reference</b><br> 1745 * Path: <b>Provenance.entity.whatReference</b><br> 1746 * </p> 1747 */ 1748 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENTITY_REF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENTITY_REF); 1749 1750/** 1751 * Constant for fluent queries to be used to add include statements. Specifies 1752 * the path value of "<b>Provenance:entity-ref</b>". 1753 */ 1754 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENTITY_REF = new ca.uhn.fhir.model.api.Include("Provenance:entity-ref").toLocked(); 1755 1756 /** 1757 * Search parameter: <b>agent</b> 1758 * <p> 1759 * Description: <b>Who participated</b><br> 1760 * Type: <b>reference</b><br> 1761 * Path: <b>Provenance.agent.who[x]</b><br> 1762 * </p> 1763 */ 1764 @SearchParamDefinition(name="agent", path="Provenance.agent.who", description="Who participated", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @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 } ) 1765 public static final String SP_AGENT = "agent"; 1766 /** 1767 * <b>Fluent Client</b> search parameter constant for <b>agent</b> 1768 * <p> 1769 * Description: <b>Who participated</b><br> 1770 * Type: <b>reference</b><br> 1771 * Path: <b>Provenance.agent.who[x]</b><br> 1772 * </p> 1773 */ 1774 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AGENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AGENT); 1775 1776/** 1777 * Constant for fluent queries to be used to add include statements. Specifies 1778 * the path value of "<b>Provenance:agent</b>". 1779 */ 1780 public static final ca.uhn.fhir.model.api.Include INCLUDE_AGENT = new ca.uhn.fhir.model.api.Include("Provenance:agent").toLocked(); 1781 1782 /** 1783 * Search parameter: <b>signature-type</b> 1784 * <p> 1785 * Description: <b>Indication of the reason the entity signed the object(s)</b><br> 1786 * Type: <b>token</b><br> 1787 * Path: <b>Provenance.signature.type</b><br> 1788 * </p> 1789 */ 1790 @SearchParamDefinition(name="signature-type", path="Provenance.signature.type", description="Indication of the reason the entity signed the object(s)", type="token" ) 1791 public static final String SP_SIGNATURE_TYPE = "signature-type"; 1792 /** 1793 * <b>Fluent Client</b> search parameter constant for <b>signature-type</b> 1794 * <p> 1795 * Description: <b>Indication of the reason the entity signed the object(s)</b><br> 1796 * Type: <b>token</b><br> 1797 * Path: <b>Provenance.signature.type</b><br> 1798 * </p> 1799 */ 1800 public static final ca.uhn.fhir.rest.gclient.TokenClientParam SIGNATURE_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SIGNATURE_TYPE); 1801 1802 /** 1803 * Search parameter: <b>patient</b> 1804 * <p> 1805 * Description: <b>Target Reference(s) (usually version specific)</b><br> 1806 * Type: <b>reference</b><br> 1807 * Path: <b>Provenance.target</b><br> 1808 * </p> 1809 */ 1810 @SearchParamDefinition(name="patient", path="Provenance.target", description="Target Reference(s) (usually version specific)", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class } ) 1811 public static final String SP_PATIENT = "patient"; 1812 /** 1813 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 1814 * <p> 1815 * Description: <b>Target Reference(s) (usually version specific)</b><br> 1816 * Type: <b>reference</b><br> 1817 * Path: <b>Provenance.target</b><br> 1818 * </p> 1819 */ 1820 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 1821 1822/** 1823 * Constant for fluent queries to be used to add include statements. Specifies 1824 * the path value of "<b>Provenance:patient</b>". 1825 */ 1826 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Provenance:patient").toLocked(); 1827 1828 /** 1829 * Search parameter: <b>start</b> 1830 * <p> 1831 * Description: <b>Starting time with inclusive boundary</b><br> 1832 * Type: <b>date</b><br> 1833 * Path: <b>Provenance.period.start</b><br> 1834 * </p> 1835 */ 1836 @SearchParamDefinition(name="start", path="Provenance.period.start", description="Starting time with inclusive boundary", type="date" ) 1837 public static final String SP_START = "start"; 1838 /** 1839 * <b>Fluent Client</b> search parameter constant for <b>start</b> 1840 * <p> 1841 * Description: <b>Starting time with inclusive boundary</b><br> 1842 * Type: <b>date</b><br> 1843 * Path: <b>Provenance.period.start</b><br> 1844 * </p> 1845 */ 1846 public static final ca.uhn.fhir.rest.gclient.DateClientParam START = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_START); 1847 1848 /** 1849 * Search parameter: <b>end</b> 1850 * <p> 1851 * Description: <b>End time with inclusive boundary, if not ongoing</b><br> 1852 * Type: <b>date</b><br> 1853 * Path: <b>Provenance.period.end</b><br> 1854 * </p> 1855 */ 1856 @SearchParamDefinition(name="end", path="Provenance.period.end", description="End time with inclusive boundary, if not ongoing", type="date" ) 1857 public static final String SP_END = "end"; 1858 /** 1859 * <b>Fluent Client</b> search parameter constant for <b>end</b> 1860 * <p> 1861 * Description: <b>End time with inclusive boundary, if not ongoing</b><br> 1862 * Type: <b>date</b><br> 1863 * Path: <b>Provenance.period.end</b><br> 1864 * </p> 1865 */ 1866 public static final ca.uhn.fhir.rest.gclient.DateClientParam END = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_END); 1867 1868 /** 1869 * Search parameter: <b>location</b> 1870 * <p> 1871 * Description: <b>Where the activity occurred, if relevant</b><br> 1872 * Type: <b>reference</b><br> 1873 * Path: <b>Provenance.location</b><br> 1874 * </p> 1875 */ 1876 @SearchParamDefinition(name="location", path="Provenance.location", description="Where the activity occurred, if relevant", type="reference", target={Location.class } ) 1877 public static final String SP_LOCATION = "location"; 1878 /** 1879 * <b>Fluent Client</b> search parameter constant for <b>location</b> 1880 * <p> 1881 * Description: <b>Where the activity occurred, if relevant</b><br> 1882 * Type: <b>reference</b><br> 1883 * Path: <b>Provenance.location</b><br> 1884 * </p> 1885 */ 1886 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam LOCATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_LOCATION); 1887 1888/** 1889 * Constant for fluent queries to be used to add include statements. Specifies 1890 * the path value of "<b>Provenance:location</b>". 1891 */ 1892 public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION = new ca.uhn.fhir.model.api.Include("Provenance:location").toLocked(); 1893 1894 /** 1895 * Search parameter: <b>recorded</b> 1896 * <p> 1897 * Description: <b>When the activity was recorded / updated</b><br> 1898 * Type: <b>date</b><br> 1899 * Path: <b>Provenance.recorded</b><br> 1900 * </p> 1901 */ 1902 @SearchParamDefinition(name="recorded", path="Provenance.recorded", description="When the activity was recorded / updated", type="date" ) 1903 public static final String SP_RECORDED = "recorded"; 1904 /** 1905 * <b>Fluent Client</b> search parameter constant for <b>recorded</b> 1906 * <p> 1907 * Description: <b>When the activity was recorded / updated</b><br> 1908 * Type: <b>date</b><br> 1909 * Path: <b>Provenance.recorded</b><br> 1910 * </p> 1911 */ 1912 public static final ca.uhn.fhir.rest.gclient.DateClientParam RECORDED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_RECORDED); 1913 1914 /** 1915 * Search parameter: <b>agent-role</b> 1916 * <p> 1917 * Description: <b>What the agents role was</b><br> 1918 * Type: <b>token</b><br> 1919 * Path: <b>Provenance.agent.role</b><br> 1920 * </p> 1921 */ 1922 @SearchParamDefinition(name="agent-role", path="Provenance.agent.role", description="What the agents role was", type="token" ) 1923 public static final String SP_AGENT_ROLE = "agent-role"; 1924 /** 1925 * <b>Fluent Client</b> search parameter constant for <b>agent-role</b> 1926 * <p> 1927 * Description: <b>What the agents role was</b><br> 1928 * Type: <b>token</b><br> 1929 * Path: <b>Provenance.agent.role</b><br> 1930 * </p> 1931 */ 1932 public static final ca.uhn.fhir.rest.gclient.TokenClientParam AGENT_ROLE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_AGENT_ROLE); 1933 1934 /** 1935 * Search parameter: <b>entity-id</b> 1936 * <p> 1937 * Description: <b>Identity of entity</b><br> 1938 * Type: <b>token</b><br> 1939 * Path: <b>Provenance.entity.whatIdentifier</b><br> 1940 * </p> 1941 */ 1942 @SearchParamDefinition(name="entity-id", path="Provenance.entity.what.as(Identifier)", description="Identity of entity", type="token" ) 1943 public static final String SP_ENTITY_ID = "entity-id"; 1944 /** 1945 * <b>Fluent Client</b> search parameter constant for <b>entity-id</b> 1946 * <p> 1947 * Description: <b>Identity of entity</b><br> 1948 * Type: <b>token</b><br> 1949 * Path: <b>Provenance.entity.whatIdentifier</b><br> 1950 * </p> 1951 */ 1952 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ENTITY_ID = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ENTITY_ID); 1953 1954 /** 1955 * Search parameter: <b>target</b> 1956 * <p> 1957 * Description: <b>Target Reference(s) (usually version specific)</b><br> 1958 * Type: <b>reference</b><br> 1959 * Path: <b>Provenance.target</b><br> 1960 * </p> 1961 */ 1962 @SearchParamDefinition(name="target", path="Provenance.target", description="Target Reference(s) (usually version specific)", type="reference" ) 1963 public static final String SP_TARGET = "target"; 1964 /** 1965 * <b>Fluent Client</b> search parameter constant for <b>target</b> 1966 * <p> 1967 * Description: <b>Target Reference(s) (usually version specific)</b><br> 1968 * Type: <b>reference</b><br> 1969 * Path: <b>Provenance.target</b><br> 1970 * </p> 1971 */ 1972 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam TARGET = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_TARGET); 1973 1974/** 1975 * Constant for fluent queries to be used to add include statements. Specifies 1976 * the path value of "<b>Provenance:target</b>". 1977 */ 1978 public static final ca.uhn.fhir.model.api.Include INCLUDE_TARGET = new ca.uhn.fhir.model.api.Include("Provenance:target").toLocked(); 1979 1980 1981} 1982