001package org.hl7.fhir.r5.model; 002 003 004/* 005 * #%L 006 * org.hl7.fhir.r5 007 * %% 008 * Copyright (C) 2014 - 2019 Health Level 7 009 * %% 010 * Licensed under the Apache License, Version 2.0 (the \"License\"); 011 * you may not use this file except in compliance with the License. 012 * You may obtain a copy of the License at 013 * 014 * http://www.apache.org/licenses/LICENSE-2.0 015 * 016 * Unless required by applicable law or agreed to in writing, software 017 * distributed under the License is distributed on an \"AS IS\" BASIS, 018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 019 * See the License for the specific language governing permissions and 020 * limitations under the License. 021 * #L% 022 */ 023 024/* 025 Copyright (c) 2011+, HL7, Inc. 026 All rights reserved. 027 028 Redistribution and use in source and binary forms, with or without modification, \ 029 are permitted provided that the following conditions are met: 030 031 * Redistributions of source code must retain the above copyright notice, this \ 032 list of conditions and the following disclaimer. 033 * Redistributions in binary form must reproduce the above copyright notice, \ 034 this list of conditions and the following disclaimer in the documentation \ 035 and/or other materials provided with the distribution. 036 * Neither the name of HL7 nor the names of its contributors may be used to 037 endorse or promote products derived from this software without specific 038 prior written permission. 039 040 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 041 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 042 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 043 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 044 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 045 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 046 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 047 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 048 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 049 POSSIBILITY OF SUCH DAMAGE. 050 */ 051 052// Generated on Tue, Dec 31, 2019 12:12+1100 for FHIR vcurrent 053 054import java.util.ArrayList; 055import java.util.Date; 056import java.util.List; 057import org.hl7.fhir.utilities.Utilities; 058import org.hl7.fhir.r5.model.Enumerations.*; 059import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 060import org.hl7.fhir.exceptions.FHIRException; 061import org.hl7.fhir.instance.model.api.ICompositeType; 062import ca.uhn.fhir.model.api.annotation.ResourceDef; 063import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 064import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 065import ca.uhn.fhir.model.api.annotation.Child; 066import ca.uhn.fhir.model.api.annotation.ChildOrder; 067import ca.uhn.fhir.model.api.annotation.Description; 068import ca.uhn.fhir.model.api.annotation.Block; 069 070/** 071 * A record of a healthcare consumer’s choices or choices made on their behalf by a third party, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time. 072 */ 073@ResourceDef(name="Consent", profile="http://hl7.org/fhir/StructureDefinition/Consent") 074public class Consent extends DomainResource { 075 076 public enum ConsentDataMeaning { 077 /** 078 * The consent applies directly to the instance of the resource. 079 */ 080 INSTANCE, 081 /** 082 * The consent applies directly to the instance of the resource and instances it refers to. 083 */ 084 RELATED, 085 /** 086 * The consent applies directly to the instance of the resource and instances that refer to it. 087 */ 088 DEPENDENTS, 089 /** 090 * The consent applies to instances of resources that are authored by. 091 */ 092 AUTHOREDBY, 093 /** 094 * added to help the parsers with the generic types 095 */ 096 NULL; 097 public static ConsentDataMeaning fromCode(String codeString) throws FHIRException { 098 if (codeString == null || "".equals(codeString)) 099 return null; 100 if ("instance".equals(codeString)) 101 return INSTANCE; 102 if ("related".equals(codeString)) 103 return RELATED; 104 if ("dependents".equals(codeString)) 105 return DEPENDENTS; 106 if ("authoredby".equals(codeString)) 107 return AUTHOREDBY; 108 if (Configuration.isAcceptInvalidEnums()) 109 return null; 110 else 111 throw new FHIRException("Unknown ConsentDataMeaning code '"+codeString+"'"); 112 } 113 public String toCode() { 114 switch (this) { 115 case INSTANCE: return "instance"; 116 case RELATED: return "related"; 117 case DEPENDENTS: return "dependents"; 118 case AUTHOREDBY: return "authoredby"; 119 default: return "?"; 120 } 121 } 122 public String getSystem() { 123 switch (this) { 124 case INSTANCE: return "http://hl7.org/fhir/consent-data-meaning"; 125 case RELATED: return "http://hl7.org/fhir/consent-data-meaning"; 126 case DEPENDENTS: return "http://hl7.org/fhir/consent-data-meaning"; 127 case AUTHOREDBY: return "http://hl7.org/fhir/consent-data-meaning"; 128 default: return "?"; 129 } 130 } 131 public String getDefinition() { 132 switch (this) { 133 case INSTANCE: return "The consent applies directly to the instance of the resource."; 134 case RELATED: return "The consent applies directly to the instance of the resource and instances it refers to."; 135 case DEPENDENTS: return "The consent applies directly to the instance of the resource and instances that refer to it."; 136 case AUTHOREDBY: return "The consent applies to instances of resources that are authored by."; 137 default: return "?"; 138 } 139 } 140 public String getDisplay() { 141 switch (this) { 142 case INSTANCE: return "Instance"; 143 case RELATED: return "Related"; 144 case DEPENDENTS: return "Dependents"; 145 case AUTHOREDBY: return "AuthoredBy"; 146 default: return "?"; 147 } 148 } 149 } 150 151 public static class ConsentDataMeaningEnumFactory implements EnumFactory<ConsentDataMeaning> { 152 public ConsentDataMeaning fromCode(String codeString) throws IllegalArgumentException { 153 if (codeString == null || "".equals(codeString)) 154 if (codeString == null || "".equals(codeString)) 155 return null; 156 if ("instance".equals(codeString)) 157 return ConsentDataMeaning.INSTANCE; 158 if ("related".equals(codeString)) 159 return ConsentDataMeaning.RELATED; 160 if ("dependents".equals(codeString)) 161 return ConsentDataMeaning.DEPENDENTS; 162 if ("authoredby".equals(codeString)) 163 return ConsentDataMeaning.AUTHOREDBY; 164 throw new IllegalArgumentException("Unknown ConsentDataMeaning code '"+codeString+"'"); 165 } 166 public Enumeration<ConsentDataMeaning> fromType(Base code) throws FHIRException { 167 if (code == null) 168 return null; 169 if (code.isEmpty()) 170 return new Enumeration<ConsentDataMeaning>(this); 171 String codeString = ((PrimitiveType) code).asStringValue(); 172 if (codeString == null || "".equals(codeString)) 173 return null; 174 if ("instance".equals(codeString)) 175 return new Enumeration<ConsentDataMeaning>(this, ConsentDataMeaning.INSTANCE); 176 if ("related".equals(codeString)) 177 return new Enumeration<ConsentDataMeaning>(this, ConsentDataMeaning.RELATED); 178 if ("dependents".equals(codeString)) 179 return new Enumeration<ConsentDataMeaning>(this, ConsentDataMeaning.DEPENDENTS); 180 if ("authoredby".equals(codeString)) 181 return new Enumeration<ConsentDataMeaning>(this, ConsentDataMeaning.AUTHOREDBY); 182 throw new FHIRException("Unknown ConsentDataMeaning code '"+codeString+"'"); 183 } 184 public String toCode(ConsentDataMeaning code) { 185 if (code == ConsentDataMeaning.INSTANCE) 186 return "instance"; 187 if (code == ConsentDataMeaning.RELATED) 188 return "related"; 189 if (code == ConsentDataMeaning.DEPENDENTS) 190 return "dependents"; 191 if (code == ConsentDataMeaning.AUTHOREDBY) 192 return "authoredby"; 193 return "?"; 194 } 195 public String toSystem(ConsentDataMeaning code) { 196 return code.getSystem(); 197 } 198 } 199 200 public enum ConsentProvisionType { 201 /** 202 * Consent is denied for actions meeting these rules. 203 */ 204 DENY, 205 /** 206 * Consent is provided for actions meeting these rules. 207 */ 208 PERMIT, 209 /** 210 * added to help the parsers with the generic types 211 */ 212 NULL; 213 public static ConsentProvisionType fromCode(String codeString) throws FHIRException { 214 if (codeString == null || "".equals(codeString)) 215 return null; 216 if ("deny".equals(codeString)) 217 return DENY; 218 if ("permit".equals(codeString)) 219 return PERMIT; 220 if (Configuration.isAcceptInvalidEnums()) 221 return null; 222 else 223 throw new FHIRException("Unknown ConsentProvisionType code '"+codeString+"'"); 224 } 225 public String toCode() { 226 switch (this) { 227 case DENY: return "deny"; 228 case PERMIT: return "permit"; 229 default: return "?"; 230 } 231 } 232 public String getSystem() { 233 switch (this) { 234 case DENY: return "http://hl7.org/fhir/consent-provision-type"; 235 case PERMIT: return "http://hl7.org/fhir/consent-provision-type"; 236 default: return "?"; 237 } 238 } 239 public String getDefinition() { 240 switch (this) { 241 case DENY: return "Consent is denied for actions meeting these rules."; 242 case PERMIT: return "Consent is provided for actions meeting these rules."; 243 default: return "?"; 244 } 245 } 246 public String getDisplay() { 247 switch (this) { 248 case DENY: return "Opt Out"; 249 case PERMIT: return "Opt In"; 250 default: return "?"; 251 } 252 } 253 } 254 255 public static class ConsentProvisionTypeEnumFactory implements EnumFactory<ConsentProvisionType> { 256 public ConsentProvisionType fromCode(String codeString) throws IllegalArgumentException { 257 if (codeString == null || "".equals(codeString)) 258 if (codeString == null || "".equals(codeString)) 259 return null; 260 if ("deny".equals(codeString)) 261 return ConsentProvisionType.DENY; 262 if ("permit".equals(codeString)) 263 return ConsentProvisionType.PERMIT; 264 throw new IllegalArgumentException("Unknown ConsentProvisionType code '"+codeString+"'"); 265 } 266 public Enumeration<ConsentProvisionType> fromType(Base code) throws FHIRException { 267 if (code == null) 268 return null; 269 if (code.isEmpty()) 270 return new Enumeration<ConsentProvisionType>(this); 271 String codeString = ((PrimitiveType) code).asStringValue(); 272 if (codeString == null || "".equals(codeString)) 273 return null; 274 if ("deny".equals(codeString)) 275 return new Enumeration<ConsentProvisionType>(this, ConsentProvisionType.DENY); 276 if ("permit".equals(codeString)) 277 return new Enumeration<ConsentProvisionType>(this, ConsentProvisionType.PERMIT); 278 throw new FHIRException("Unknown ConsentProvisionType code '"+codeString+"'"); 279 } 280 public String toCode(ConsentProvisionType code) { 281 if (code == ConsentProvisionType.DENY) 282 return "deny"; 283 if (code == ConsentProvisionType.PERMIT) 284 return "permit"; 285 return "?"; 286 } 287 public String toSystem(ConsentProvisionType code) { 288 return code.getSystem(); 289 } 290 } 291 292 public enum ConsentState { 293 /** 294 * The consent is in development or awaiting use but is not yet intended to be acted upon. 295 */ 296 DRAFT, 297 /** 298 * The consent is to be followed and enforced. 299 */ 300 ACTIVE, 301 /** 302 * The consent is terminated or replaced. 303 */ 304 INACTIVE, 305 /** 306 * The consent was created wrongly (e.g. wrong patient) and should be ignored. 307 */ 308 ENTEREDINERROR, 309 /** 310 * The resource is in an indeterminate state. 311 */ 312 UNKNOWN, 313 /** 314 * added to help the parsers with the generic types 315 */ 316 NULL; 317 public static ConsentState fromCode(String codeString) throws FHIRException { 318 if (codeString == null || "".equals(codeString)) 319 return null; 320 if ("draft".equals(codeString)) 321 return DRAFT; 322 if ("active".equals(codeString)) 323 return ACTIVE; 324 if ("inactive".equals(codeString)) 325 return INACTIVE; 326 if ("entered-in-error".equals(codeString)) 327 return ENTEREDINERROR; 328 if ("unknown".equals(codeString)) 329 return UNKNOWN; 330 if (Configuration.isAcceptInvalidEnums()) 331 return null; 332 else 333 throw new FHIRException("Unknown ConsentState code '"+codeString+"'"); 334 } 335 public String toCode() { 336 switch (this) { 337 case DRAFT: return "draft"; 338 case ACTIVE: return "active"; 339 case INACTIVE: return "inactive"; 340 case ENTEREDINERROR: return "entered-in-error"; 341 case UNKNOWN: return "unknown"; 342 default: return "?"; 343 } 344 } 345 public String getSystem() { 346 switch (this) { 347 case DRAFT: return "http://hl7.org/fhir/consent-state-codes"; 348 case ACTIVE: return "http://hl7.org/fhir/consent-state-codes"; 349 case INACTIVE: return "http://hl7.org/fhir/consent-state-codes"; 350 case ENTEREDINERROR: return "http://hl7.org/fhir/consent-state-codes"; 351 case UNKNOWN: return "http://hl7.org/fhir/consent-state-codes"; 352 default: return "?"; 353 } 354 } 355 public String getDefinition() { 356 switch (this) { 357 case DRAFT: return "The consent is in development or awaiting use but is not yet intended to be acted upon."; 358 case ACTIVE: return "The consent is to be followed and enforced."; 359 case INACTIVE: return "The consent is terminated or replaced."; 360 case ENTEREDINERROR: return "The consent was created wrongly (e.g. wrong patient) and should be ignored."; 361 case UNKNOWN: return "The resource is in an indeterminate state."; 362 default: return "?"; 363 } 364 } 365 public String getDisplay() { 366 switch (this) { 367 case DRAFT: return "Pending"; 368 case ACTIVE: return "Active"; 369 case INACTIVE: return "Inactive"; 370 case ENTEREDINERROR: return "Entered in Error"; 371 case UNKNOWN: return "Unknown"; 372 default: return "?"; 373 } 374 } 375 } 376 377 public static class ConsentStateEnumFactory implements EnumFactory<ConsentState> { 378 public ConsentState fromCode(String codeString) throws IllegalArgumentException { 379 if (codeString == null || "".equals(codeString)) 380 if (codeString == null || "".equals(codeString)) 381 return null; 382 if ("draft".equals(codeString)) 383 return ConsentState.DRAFT; 384 if ("active".equals(codeString)) 385 return ConsentState.ACTIVE; 386 if ("inactive".equals(codeString)) 387 return ConsentState.INACTIVE; 388 if ("entered-in-error".equals(codeString)) 389 return ConsentState.ENTEREDINERROR; 390 if ("unknown".equals(codeString)) 391 return ConsentState.UNKNOWN; 392 throw new IllegalArgumentException("Unknown ConsentState code '"+codeString+"'"); 393 } 394 public Enumeration<ConsentState> fromType(Base code) throws FHIRException { 395 if (code == null) 396 return null; 397 if (code.isEmpty()) 398 return new Enumeration<ConsentState>(this); 399 String codeString = ((PrimitiveType) code).asStringValue(); 400 if (codeString == null || "".equals(codeString)) 401 return null; 402 if ("draft".equals(codeString)) 403 return new Enumeration<ConsentState>(this, ConsentState.DRAFT); 404 if ("active".equals(codeString)) 405 return new Enumeration<ConsentState>(this, ConsentState.ACTIVE); 406 if ("inactive".equals(codeString)) 407 return new Enumeration<ConsentState>(this, ConsentState.INACTIVE); 408 if ("entered-in-error".equals(codeString)) 409 return new Enumeration<ConsentState>(this, ConsentState.ENTEREDINERROR); 410 if ("unknown".equals(codeString)) 411 return new Enumeration<ConsentState>(this, ConsentState.UNKNOWN); 412 throw new FHIRException("Unknown ConsentState code '"+codeString+"'"); 413 } 414 public String toCode(ConsentState code) { 415 if (code == ConsentState.DRAFT) 416 return "draft"; 417 if (code == ConsentState.ACTIVE) 418 return "active"; 419 if (code == ConsentState.INACTIVE) 420 return "inactive"; 421 if (code == ConsentState.ENTEREDINERROR) 422 return "entered-in-error"; 423 if (code == ConsentState.UNKNOWN) 424 return "unknown"; 425 return "?"; 426 } 427 public String toSystem(ConsentState code) { 428 return code.getSystem(); 429 } 430 } 431 432 @Block() 433 public static class ConsentPolicyComponent extends BackboneElement implements IBaseBackboneElement { 434 /** 435 * Entity or Organization having regulatory jurisdiction or accountability for enforcing policies pertaining to Consent Directives. 436 */ 437 @Child(name = "authority", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=false) 438 @Description(shortDefinition="Enforcement source for policy", formalDefinition="Entity or Organization having regulatory jurisdiction or accountability for enforcing policies pertaining to Consent Directives." ) 439 protected UriType authority; 440 441 /** 442 * The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law. 443 */ 444 @Child(name = "uri", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=false) 445 @Description(shortDefinition="Specific policy covered by this consent", formalDefinition="The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law." ) 446 protected UriType uri; 447 448 private static final long serialVersionUID = 672275705L; 449 450 /** 451 * Constructor 452 */ 453 public ConsentPolicyComponent() { 454 super(); 455 } 456 457 /** 458 * @return {@link #authority} (Entity or Organization having regulatory jurisdiction or accountability for enforcing policies pertaining to Consent Directives.). This is the underlying object with id, value and extensions. The accessor "getAuthority" gives direct access to the value 459 */ 460 public UriType getAuthorityElement() { 461 if (this.authority == null) 462 if (Configuration.errorOnAutoCreate()) 463 throw new Error("Attempt to auto-create ConsentPolicyComponent.authority"); 464 else if (Configuration.doAutoCreate()) 465 this.authority = new UriType(); // bb 466 return this.authority; 467 } 468 469 public boolean hasAuthorityElement() { 470 return this.authority != null && !this.authority.isEmpty(); 471 } 472 473 public boolean hasAuthority() { 474 return this.authority != null && !this.authority.isEmpty(); 475 } 476 477 /** 478 * @param value {@link #authority} (Entity or Organization having regulatory jurisdiction or accountability for enforcing policies pertaining to Consent Directives.). This is the underlying object with id, value and extensions. The accessor "getAuthority" gives direct access to the value 479 */ 480 public ConsentPolicyComponent setAuthorityElement(UriType value) { 481 this.authority = value; 482 return this; 483 } 484 485 /** 486 * @return Entity or Organization having regulatory jurisdiction or accountability for enforcing policies pertaining to Consent Directives. 487 */ 488 public String getAuthority() { 489 return this.authority == null ? null : this.authority.getValue(); 490 } 491 492 /** 493 * @param value Entity or Organization having regulatory jurisdiction or accountability for enforcing policies pertaining to Consent Directives. 494 */ 495 public ConsentPolicyComponent setAuthority(String value) { 496 if (Utilities.noString(value)) 497 this.authority = null; 498 else { 499 if (this.authority == null) 500 this.authority = new UriType(); 501 this.authority.setValue(value); 502 } 503 return this; 504 } 505 506 /** 507 * @return {@link #uri} (The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value 508 */ 509 public UriType getUriElement() { 510 if (this.uri == null) 511 if (Configuration.errorOnAutoCreate()) 512 throw new Error("Attempt to auto-create ConsentPolicyComponent.uri"); 513 else if (Configuration.doAutoCreate()) 514 this.uri = new UriType(); // bb 515 return this.uri; 516 } 517 518 public boolean hasUriElement() { 519 return this.uri != null && !this.uri.isEmpty(); 520 } 521 522 public boolean hasUri() { 523 return this.uri != null && !this.uri.isEmpty(); 524 } 525 526 /** 527 * @param value {@link #uri} (The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value 528 */ 529 public ConsentPolicyComponent setUriElement(UriType value) { 530 this.uri = value; 531 return this; 532 } 533 534 /** 535 * @return The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law. 536 */ 537 public String getUri() { 538 return this.uri == null ? null : this.uri.getValue(); 539 } 540 541 /** 542 * @param value The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law. 543 */ 544 public ConsentPolicyComponent setUri(String value) { 545 if (Utilities.noString(value)) 546 this.uri = null; 547 else { 548 if (this.uri == null) 549 this.uri = new UriType(); 550 this.uri.setValue(value); 551 } 552 return this; 553 } 554 555 protected void listChildren(List<Property> children) { 556 super.listChildren(children); 557 children.add(new Property("authority", "uri", "Entity or Organization having regulatory jurisdiction or accountability for enforcing policies pertaining to Consent Directives.", 0, 1, authority)); 558 children.add(new Property("uri", "uri", "The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.", 0, 1, uri)); 559 } 560 561 @Override 562 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 563 switch (_hash) { 564 case 1475610435: /*authority*/ return new Property("authority", "uri", "Entity or Organization having regulatory jurisdiction or accountability for enforcing policies pertaining to Consent Directives.", 0, 1, authority); 565 case 116076: /*uri*/ return new Property("uri", "uri", "The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.", 0, 1, uri); 566 default: return super.getNamedProperty(_hash, _name, _checkValid); 567 } 568 569 } 570 571 @Override 572 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 573 switch (hash) { 574 case 1475610435: /*authority*/ return this.authority == null ? new Base[0] : new Base[] {this.authority}; // UriType 575 case 116076: /*uri*/ return this.uri == null ? new Base[0] : new Base[] {this.uri}; // UriType 576 default: return super.getProperty(hash, name, checkValid); 577 } 578 579 } 580 581 @Override 582 public Base setProperty(int hash, String name, Base value) throws FHIRException { 583 switch (hash) { 584 case 1475610435: // authority 585 this.authority = TypeConvertor.castToUri(value); // UriType 586 return value; 587 case 116076: // uri 588 this.uri = TypeConvertor.castToUri(value); // UriType 589 return value; 590 default: return super.setProperty(hash, name, value); 591 } 592 593 } 594 595 @Override 596 public Base setProperty(String name, Base value) throws FHIRException { 597 if (name.equals("authority")) { 598 this.authority = TypeConvertor.castToUri(value); // UriType 599 } else if (name.equals("uri")) { 600 this.uri = TypeConvertor.castToUri(value); // UriType 601 } else 602 return super.setProperty(name, value); 603 return value; 604 } 605 606 @Override 607 public Base makeProperty(int hash, String name) throws FHIRException { 608 switch (hash) { 609 case 1475610435: return getAuthorityElement(); 610 case 116076: return getUriElement(); 611 default: return super.makeProperty(hash, name); 612 } 613 614 } 615 616 @Override 617 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 618 switch (hash) { 619 case 1475610435: /*authority*/ return new String[] {"uri"}; 620 case 116076: /*uri*/ return new String[] {"uri"}; 621 default: return super.getTypesForProperty(hash, name); 622 } 623 624 } 625 626 @Override 627 public Base addChild(String name) throws FHIRException { 628 if (name.equals("authority")) { 629 throw new FHIRException("Cannot call addChild on a primitive type Consent.policy.authority"); 630 } 631 else if (name.equals("uri")) { 632 throw new FHIRException("Cannot call addChild on a primitive type Consent.policy.uri"); 633 } 634 else 635 return super.addChild(name); 636 } 637 638 public ConsentPolicyComponent copy() { 639 ConsentPolicyComponent dst = new ConsentPolicyComponent(); 640 copyValues(dst); 641 return dst; 642 } 643 644 public void copyValues(ConsentPolicyComponent dst) { 645 super.copyValues(dst); 646 dst.authority = authority == null ? null : authority.copy(); 647 dst.uri = uri == null ? null : uri.copy(); 648 } 649 650 @Override 651 public boolean equalsDeep(Base other_) { 652 if (!super.equalsDeep(other_)) 653 return false; 654 if (!(other_ instanceof ConsentPolicyComponent)) 655 return false; 656 ConsentPolicyComponent o = (ConsentPolicyComponent) other_; 657 return compareDeep(authority, o.authority, true) && compareDeep(uri, o.uri, true); 658 } 659 660 @Override 661 public boolean equalsShallow(Base other_) { 662 if (!super.equalsShallow(other_)) 663 return false; 664 if (!(other_ instanceof ConsentPolicyComponent)) 665 return false; 666 ConsentPolicyComponent o = (ConsentPolicyComponent) other_; 667 return compareValues(authority, o.authority, true) && compareValues(uri, o.uri, true); 668 } 669 670 public boolean isEmpty() { 671 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(authority, uri); 672 } 673 674 public String fhirType() { 675 return "Consent.policy"; 676 677 } 678 679 } 680 681 @Block() 682 public static class ConsentVerificationComponent extends BackboneElement implements IBaseBackboneElement { 683 /** 684 * Has the instruction been verified. 685 */ 686 @Child(name = "verified", type = {BooleanType.class}, order=1, min=1, max=1, modifier=false, summary=true) 687 @Description(shortDefinition="Has been verified", formalDefinition="Has the instruction been verified." ) 688 protected BooleanType verified; 689 690 /** 691 * Extensible list of verification type starting with verification and re-validation. 692 */ 693 @Child(name = "verificationType", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 694 @Description(shortDefinition="Business case of verification", formalDefinition="Extensible list of verification type starting with verification and re-validation." ) 695 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/consent-verification") 696 protected CodeableConcept verificationType; 697 698 /** 699 * The person who conducted the verification/validation of the Grantee decision. 700 */ 701 @Child(name = "verifiedBy", type = {Organization.class, Practitioner.class, PractitionerRole.class}, order=3, min=0, max=1, modifier=false, summary=false) 702 @Description(shortDefinition="Person conducting verification", formalDefinition="The person who conducted the verification/validation of the Grantee decision." ) 703 protected Reference verifiedBy; 704 705 /** 706 * Who verified the instruction (Patient, Relative or other Authorized Person). 707 */ 708 @Child(name = "verifiedWith", type = {Patient.class, RelatedPerson.class}, order=4, min=0, max=1, modifier=false, summary=false) 709 @Description(shortDefinition="Person who verified", formalDefinition="Who verified the instruction (Patient, Relative or other Authorized Person)." ) 710 protected Reference verifiedWith; 711 712 /** 713 * Date(s) verification was collected. 714 */ 715 @Child(name = "verificationDate", type = {DateTimeType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 716 @Description(shortDefinition="When consent verified", formalDefinition="Date(s) verification was collected." ) 717 protected List<DateTimeType> verificationDate; 718 719 private static final long serialVersionUID = -1266157329L; 720 721 /** 722 * Constructor 723 */ 724 public ConsentVerificationComponent() { 725 super(); 726 } 727 728 /** 729 * Constructor 730 */ 731 public ConsentVerificationComponent(boolean verified) { 732 super(); 733 this.setVerified(verified); 734 } 735 736 /** 737 * @return {@link #verified} (Has the instruction been verified.). This is the underlying object with id, value and extensions. The accessor "getVerified" gives direct access to the value 738 */ 739 public BooleanType getVerifiedElement() { 740 if (this.verified == null) 741 if (Configuration.errorOnAutoCreate()) 742 throw new Error("Attempt to auto-create ConsentVerificationComponent.verified"); 743 else if (Configuration.doAutoCreate()) 744 this.verified = new BooleanType(); // bb 745 return this.verified; 746 } 747 748 public boolean hasVerifiedElement() { 749 return this.verified != null && !this.verified.isEmpty(); 750 } 751 752 public boolean hasVerified() { 753 return this.verified != null && !this.verified.isEmpty(); 754 } 755 756 /** 757 * @param value {@link #verified} (Has the instruction been verified.). This is the underlying object with id, value and extensions. The accessor "getVerified" gives direct access to the value 758 */ 759 public ConsentVerificationComponent setVerifiedElement(BooleanType value) { 760 this.verified = value; 761 return this; 762 } 763 764 /** 765 * @return Has the instruction been verified. 766 */ 767 public boolean getVerified() { 768 return this.verified == null || this.verified.isEmpty() ? false : this.verified.getValue(); 769 } 770 771 /** 772 * @param value Has the instruction been verified. 773 */ 774 public ConsentVerificationComponent setVerified(boolean value) { 775 if (this.verified == null) 776 this.verified = new BooleanType(); 777 this.verified.setValue(value); 778 return this; 779 } 780 781 /** 782 * @return {@link #verificationType} (Extensible list of verification type starting with verification and re-validation.) 783 */ 784 public CodeableConcept getVerificationType() { 785 if (this.verificationType == null) 786 if (Configuration.errorOnAutoCreate()) 787 throw new Error("Attempt to auto-create ConsentVerificationComponent.verificationType"); 788 else if (Configuration.doAutoCreate()) 789 this.verificationType = new CodeableConcept(); // cc 790 return this.verificationType; 791 } 792 793 public boolean hasVerificationType() { 794 return this.verificationType != null && !this.verificationType.isEmpty(); 795 } 796 797 /** 798 * @param value {@link #verificationType} (Extensible list of verification type starting with verification and re-validation.) 799 */ 800 public ConsentVerificationComponent setVerificationType(CodeableConcept value) { 801 this.verificationType = value; 802 return this; 803 } 804 805 /** 806 * @return {@link #verifiedBy} (The person who conducted the verification/validation of the Grantee decision.) 807 */ 808 public Reference getVerifiedBy() { 809 if (this.verifiedBy == null) 810 if (Configuration.errorOnAutoCreate()) 811 throw new Error("Attempt to auto-create ConsentVerificationComponent.verifiedBy"); 812 else if (Configuration.doAutoCreate()) 813 this.verifiedBy = new Reference(); // cc 814 return this.verifiedBy; 815 } 816 817 public boolean hasVerifiedBy() { 818 return this.verifiedBy != null && !this.verifiedBy.isEmpty(); 819 } 820 821 /** 822 * @param value {@link #verifiedBy} (The person who conducted the verification/validation of the Grantee decision.) 823 */ 824 public ConsentVerificationComponent setVerifiedBy(Reference value) { 825 this.verifiedBy = value; 826 return this; 827 } 828 829 /** 830 * @return {@link #verifiedWith} (Who verified the instruction (Patient, Relative or other Authorized Person).) 831 */ 832 public Reference getVerifiedWith() { 833 if (this.verifiedWith == null) 834 if (Configuration.errorOnAutoCreate()) 835 throw new Error("Attempt to auto-create ConsentVerificationComponent.verifiedWith"); 836 else if (Configuration.doAutoCreate()) 837 this.verifiedWith = new Reference(); // cc 838 return this.verifiedWith; 839 } 840 841 public boolean hasVerifiedWith() { 842 return this.verifiedWith != null && !this.verifiedWith.isEmpty(); 843 } 844 845 /** 846 * @param value {@link #verifiedWith} (Who verified the instruction (Patient, Relative or other Authorized Person).) 847 */ 848 public ConsentVerificationComponent setVerifiedWith(Reference value) { 849 this.verifiedWith = value; 850 return this; 851 } 852 853 /** 854 * @return {@link #verificationDate} (Date(s) verification was collected.) 855 */ 856 public List<DateTimeType> getVerificationDate() { 857 if (this.verificationDate == null) 858 this.verificationDate = new ArrayList<DateTimeType>(); 859 return this.verificationDate; 860 } 861 862 /** 863 * @return Returns a reference to <code>this</code> for easy method chaining 864 */ 865 public ConsentVerificationComponent setVerificationDate(List<DateTimeType> theVerificationDate) { 866 this.verificationDate = theVerificationDate; 867 return this; 868 } 869 870 public boolean hasVerificationDate() { 871 if (this.verificationDate == null) 872 return false; 873 for (DateTimeType item : this.verificationDate) 874 if (!item.isEmpty()) 875 return true; 876 return false; 877 } 878 879 /** 880 * @return {@link #verificationDate} (Date(s) verification was collected.) 881 */ 882 public DateTimeType addVerificationDateElement() {//2 883 DateTimeType t = new DateTimeType(); 884 if (this.verificationDate == null) 885 this.verificationDate = new ArrayList<DateTimeType>(); 886 this.verificationDate.add(t); 887 return t; 888 } 889 890 /** 891 * @param value {@link #verificationDate} (Date(s) verification was collected.) 892 */ 893 public ConsentVerificationComponent addVerificationDate(Date value) { //1 894 DateTimeType t = new DateTimeType(); 895 t.setValue(value); 896 if (this.verificationDate == null) 897 this.verificationDate = new ArrayList<DateTimeType>(); 898 this.verificationDate.add(t); 899 return this; 900 } 901 902 /** 903 * @param value {@link #verificationDate} (Date(s) verification was collected.) 904 */ 905 public boolean hasVerificationDate(Date value) { 906 if (this.verificationDate == null) 907 return false; 908 for (DateTimeType v : this.verificationDate) 909 if (v.getValue().equals(value)) // dateTime 910 return true; 911 return false; 912 } 913 914 protected void listChildren(List<Property> children) { 915 super.listChildren(children); 916 children.add(new Property("verified", "boolean", "Has the instruction been verified.", 0, 1, verified)); 917 children.add(new Property("verificationType", "CodeableConcept", "Extensible list of verification type starting with verification and re-validation.", 0, 1, verificationType)); 918 children.add(new Property("verifiedBy", "Reference(Organization|Practitioner|PractitionerRole)", "The person who conducted the verification/validation of the Grantee decision.", 0, 1, verifiedBy)); 919 children.add(new Property("verifiedWith", "Reference(Patient|RelatedPerson)", "Who verified the instruction (Patient, Relative or other Authorized Person).", 0, 1, verifiedWith)); 920 children.add(new Property("verificationDate", "dateTime", "Date(s) verification was collected.", 0, java.lang.Integer.MAX_VALUE, verificationDate)); 921 } 922 923 @Override 924 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 925 switch (_hash) { 926 case -1994383672: /*verified*/ return new Property("verified", "boolean", "Has the instruction been verified.", 0, 1, verified); 927 case 642733045: /*verificationType*/ return new Property("verificationType", "CodeableConcept", "Extensible list of verification type starting with verification and re-validation.", 0, 1, verificationType); 928 case -1047292609: /*verifiedBy*/ return new Property("verifiedBy", "Reference(Organization|Practitioner|PractitionerRole)", "The person who conducted the verification/validation of the Grantee decision.", 0, 1, verifiedBy); 929 case -1425236050: /*verifiedWith*/ return new Property("verifiedWith", "Reference(Patient|RelatedPerson)", "Who verified the instruction (Patient, Relative or other Authorized Person).", 0, 1, verifiedWith); 930 case 642233449: /*verificationDate*/ return new Property("verificationDate", "dateTime", "Date(s) verification was collected.", 0, java.lang.Integer.MAX_VALUE, verificationDate); 931 default: return super.getNamedProperty(_hash, _name, _checkValid); 932 } 933 934 } 935 936 @Override 937 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 938 switch (hash) { 939 case -1994383672: /*verified*/ return this.verified == null ? new Base[0] : new Base[] {this.verified}; // BooleanType 940 case 642733045: /*verificationType*/ return this.verificationType == null ? new Base[0] : new Base[] {this.verificationType}; // CodeableConcept 941 case -1047292609: /*verifiedBy*/ return this.verifiedBy == null ? new Base[0] : new Base[] {this.verifiedBy}; // Reference 942 case -1425236050: /*verifiedWith*/ return this.verifiedWith == null ? new Base[0] : new Base[] {this.verifiedWith}; // Reference 943 case 642233449: /*verificationDate*/ return this.verificationDate == null ? new Base[0] : this.verificationDate.toArray(new Base[this.verificationDate.size()]); // DateTimeType 944 default: return super.getProperty(hash, name, checkValid); 945 } 946 947 } 948 949 @Override 950 public Base setProperty(int hash, String name, Base value) throws FHIRException { 951 switch (hash) { 952 case -1994383672: // verified 953 this.verified = TypeConvertor.castToBoolean(value); // BooleanType 954 return value; 955 case 642733045: // verificationType 956 this.verificationType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 957 return value; 958 case -1047292609: // verifiedBy 959 this.verifiedBy = TypeConvertor.castToReference(value); // Reference 960 return value; 961 case -1425236050: // verifiedWith 962 this.verifiedWith = TypeConvertor.castToReference(value); // Reference 963 return value; 964 case 642233449: // verificationDate 965 this.getVerificationDate().add(TypeConvertor.castToDateTime(value)); // DateTimeType 966 return value; 967 default: return super.setProperty(hash, name, value); 968 } 969 970 } 971 972 @Override 973 public Base setProperty(String name, Base value) throws FHIRException { 974 if (name.equals("verified")) { 975 this.verified = TypeConvertor.castToBoolean(value); // BooleanType 976 } else if (name.equals("verificationType")) { 977 this.verificationType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 978 } else if (name.equals("verifiedBy")) { 979 this.verifiedBy = TypeConvertor.castToReference(value); // Reference 980 } else if (name.equals("verifiedWith")) { 981 this.verifiedWith = TypeConvertor.castToReference(value); // Reference 982 } else if (name.equals("verificationDate")) { 983 this.getVerificationDate().add(TypeConvertor.castToDateTime(value)); 984 } else 985 return super.setProperty(name, value); 986 return value; 987 } 988 989 @Override 990 public Base makeProperty(int hash, String name) throws FHIRException { 991 switch (hash) { 992 case -1994383672: return getVerifiedElement(); 993 case 642733045: return getVerificationType(); 994 case -1047292609: return getVerifiedBy(); 995 case -1425236050: return getVerifiedWith(); 996 case 642233449: return addVerificationDateElement(); 997 default: return super.makeProperty(hash, name); 998 } 999 1000 } 1001 1002 @Override 1003 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1004 switch (hash) { 1005 case -1994383672: /*verified*/ return new String[] {"boolean"}; 1006 case 642733045: /*verificationType*/ return new String[] {"CodeableConcept"}; 1007 case -1047292609: /*verifiedBy*/ return new String[] {"Reference"}; 1008 case -1425236050: /*verifiedWith*/ return new String[] {"Reference"}; 1009 case 642233449: /*verificationDate*/ return new String[] {"dateTime"}; 1010 default: return super.getTypesForProperty(hash, name); 1011 } 1012 1013 } 1014 1015 @Override 1016 public Base addChild(String name) throws FHIRException { 1017 if (name.equals("verified")) { 1018 throw new FHIRException("Cannot call addChild on a primitive type Consent.verification.verified"); 1019 } 1020 else if (name.equals("verificationType")) { 1021 this.verificationType = new CodeableConcept(); 1022 return this.verificationType; 1023 } 1024 else if (name.equals("verifiedBy")) { 1025 this.verifiedBy = new Reference(); 1026 return this.verifiedBy; 1027 } 1028 else if (name.equals("verifiedWith")) { 1029 this.verifiedWith = new Reference(); 1030 return this.verifiedWith; 1031 } 1032 else if (name.equals("verificationDate")) { 1033 throw new FHIRException("Cannot call addChild on a primitive type Consent.verification.verificationDate"); 1034 } 1035 else 1036 return super.addChild(name); 1037 } 1038 1039 public ConsentVerificationComponent copy() { 1040 ConsentVerificationComponent dst = new ConsentVerificationComponent(); 1041 copyValues(dst); 1042 return dst; 1043 } 1044 1045 public void copyValues(ConsentVerificationComponent dst) { 1046 super.copyValues(dst); 1047 dst.verified = verified == null ? null : verified.copy(); 1048 dst.verificationType = verificationType == null ? null : verificationType.copy(); 1049 dst.verifiedBy = verifiedBy == null ? null : verifiedBy.copy(); 1050 dst.verifiedWith = verifiedWith == null ? null : verifiedWith.copy(); 1051 if (verificationDate != null) { 1052 dst.verificationDate = new ArrayList<DateTimeType>(); 1053 for (DateTimeType i : verificationDate) 1054 dst.verificationDate.add(i.copy()); 1055 }; 1056 } 1057 1058 @Override 1059 public boolean equalsDeep(Base other_) { 1060 if (!super.equalsDeep(other_)) 1061 return false; 1062 if (!(other_ instanceof ConsentVerificationComponent)) 1063 return false; 1064 ConsentVerificationComponent o = (ConsentVerificationComponent) other_; 1065 return compareDeep(verified, o.verified, true) && compareDeep(verificationType, o.verificationType, true) 1066 && compareDeep(verifiedBy, o.verifiedBy, true) && compareDeep(verifiedWith, o.verifiedWith, true) 1067 && compareDeep(verificationDate, o.verificationDate, true); 1068 } 1069 1070 @Override 1071 public boolean equalsShallow(Base other_) { 1072 if (!super.equalsShallow(other_)) 1073 return false; 1074 if (!(other_ instanceof ConsentVerificationComponent)) 1075 return false; 1076 ConsentVerificationComponent o = (ConsentVerificationComponent) other_; 1077 return compareValues(verified, o.verified, true) && compareValues(verificationDate, o.verificationDate, true) 1078 ; 1079 } 1080 1081 public boolean isEmpty() { 1082 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(verified, verificationType 1083 , verifiedBy, verifiedWith, verificationDate); 1084 } 1085 1086 public String fhirType() { 1087 return "Consent.verification"; 1088 1089 } 1090 1091 } 1092 1093 @Block() 1094 public static class ProvisionComponent extends BackboneElement implements IBaseBackboneElement { 1095 /** 1096 * Action to take - permit or deny - when the rule conditions are met. Not permitted in root rule, required in all nested rules. 1097 */ 1098 @Child(name = "type", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=true) 1099 @Description(shortDefinition="deny | permit", formalDefinition="Action to take - permit or deny - when the rule conditions are met. Not permitted in root rule, required in all nested rules." ) 1100 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/consent-provision-type") 1101 protected Enumeration<ConsentProvisionType> type; 1102 1103 /** 1104 * The timeframe in this rule is valid. 1105 */ 1106 @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=true) 1107 @Description(shortDefinition="Timeframe for this rule", formalDefinition="The timeframe in this rule is valid." ) 1108 protected Period period; 1109 1110 /** 1111 * Who or what is controlled by this rule. Use group to identify a set of actors by some property they share (e.g. 'admitting officers'). 1112 */ 1113 @Child(name = "actor", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1114 @Description(shortDefinition="Who|what controlled by this rule (or group, by role)", formalDefinition="Who or what is controlled by this rule. Use group to identify a set of actors by some property they share (e.g. 'admitting officers')." ) 1115 protected List<ProvisionActorComponent> actor; 1116 1117 /** 1118 * Actions controlled by this Rule. 1119 */ 1120 @Child(name = "action", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1121 @Description(shortDefinition="Actions controlled by this rule", formalDefinition="Actions controlled by this Rule." ) 1122 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/consent-action") 1123 protected List<CodeableConcept> action; 1124 1125 /** 1126 * A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception. 1127 */ 1128 @Child(name = "securityLabel", type = {Coding.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1129 @Description(shortDefinition="Security Labels that define affected resources", formalDefinition="A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception." ) 1130 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/security-labels") 1131 protected List<Coding> securityLabel; 1132 1133 /** 1134 * The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule. 1135 */ 1136 @Child(name = "purpose", type = {Coding.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1137 @Description(shortDefinition="Context of activities covered by this rule", formalDefinition="The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule." ) 1138 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-PurposeOfUse") 1139 protected List<Coding> purpose; 1140 1141 /** 1142 * The class of information covered by this rule. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to. 1143 */ 1144 @Child(name = "class", type = {Coding.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1145 @Description(shortDefinition="e.g. Resource Type, Profile, CDA, etc.", formalDefinition="The class of information covered by this rule. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to." ) 1146 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/consent-content-class") 1147 protected List<Coding> class_; 1148 1149 /** 1150 * If this code is found in an instance, then the rule applies. 1151 */ 1152 @Child(name = "code", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1153 @Description(shortDefinition="e.g. LOINC or SNOMED CT code, etc. in the content", formalDefinition="If this code is found in an instance, then the rule applies." ) 1154 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/consent-content-code") 1155 protected List<CodeableConcept> code; 1156 1157 /** 1158 * Clinical or Operational Relevant period of time that bounds the data controlled by this rule. 1159 */ 1160 @Child(name = "dataPeriod", type = {Period.class}, order=9, min=0, max=1, modifier=false, summary=true) 1161 @Description(shortDefinition="Timeframe for data controlled by this rule", formalDefinition="Clinical or Operational Relevant period of time that bounds the data controlled by this rule." ) 1162 protected Period dataPeriod; 1163 1164 /** 1165 * The resources controlled by this rule if specific resources are referenced. 1166 */ 1167 @Child(name = "data", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1168 @Description(shortDefinition="Data controlled by this rule", formalDefinition="The resources controlled by this rule if specific resources are referenced." ) 1169 protected List<ProvisionDataComponent> data; 1170 1171 /** 1172 * Rules which provide exceptions to the base rule or subrules. 1173 */ 1174 @Child(name = "provision", type = {ProvisionComponent.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1175 @Description(shortDefinition="Nested Exception Rules", formalDefinition="Rules which provide exceptions to the base rule or subrules." ) 1176 protected List<ProvisionComponent> provision; 1177 1178 private static final long serialVersionUID = 924910269L; 1179 1180 /** 1181 * Constructor 1182 */ 1183 public ProvisionComponent() { 1184 super(); 1185 } 1186 1187 /** 1188 * @return {@link #type} (Action to take - permit or deny - when the rule conditions are met. Not permitted in root rule, required in all nested rules.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1189 */ 1190 public Enumeration<ConsentProvisionType> getTypeElement() { 1191 if (this.type == null) 1192 if (Configuration.errorOnAutoCreate()) 1193 throw new Error("Attempt to auto-create ProvisionComponent.type"); 1194 else if (Configuration.doAutoCreate()) 1195 this.type = new Enumeration<ConsentProvisionType>(new ConsentProvisionTypeEnumFactory()); // bb 1196 return this.type; 1197 } 1198 1199 public boolean hasTypeElement() { 1200 return this.type != null && !this.type.isEmpty(); 1201 } 1202 1203 public boolean hasType() { 1204 return this.type != null && !this.type.isEmpty(); 1205 } 1206 1207 /** 1208 * @param value {@link #type} (Action to take - permit or deny - when the rule conditions are met. Not permitted in root rule, required in all nested rules.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1209 */ 1210 public ProvisionComponent setTypeElement(Enumeration<ConsentProvisionType> value) { 1211 this.type = value; 1212 return this; 1213 } 1214 1215 /** 1216 * @return Action to take - permit or deny - when the rule conditions are met. Not permitted in root rule, required in all nested rules. 1217 */ 1218 public ConsentProvisionType getType() { 1219 return this.type == null ? null : this.type.getValue(); 1220 } 1221 1222 /** 1223 * @param value Action to take - permit or deny - when the rule conditions are met. Not permitted in root rule, required in all nested rules. 1224 */ 1225 public ProvisionComponent setType(ConsentProvisionType value) { 1226 if (value == null) 1227 this.type = null; 1228 else { 1229 if (this.type == null) 1230 this.type = new Enumeration<ConsentProvisionType>(new ConsentProvisionTypeEnumFactory()); 1231 this.type.setValue(value); 1232 } 1233 return this; 1234 } 1235 1236 /** 1237 * @return {@link #period} (The timeframe in this rule is valid.) 1238 */ 1239 public Period getPeriod() { 1240 if (this.period == null) 1241 if (Configuration.errorOnAutoCreate()) 1242 throw new Error("Attempt to auto-create ProvisionComponent.period"); 1243 else if (Configuration.doAutoCreate()) 1244 this.period = new Period(); // cc 1245 return this.period; 1246 } 1247 1248 public boolean hasPeriod() { 1249 return this.period != null && !this.period.isEmpty(); 1250 } 1251 1252 /** 1253 * @param value {@link #period} (The timeframe in this rule is valid.) 1254 */ 1255 public ProvisionComponent setPeriod(Period value) { 1256 this.period = value; 1257 return this; 1258 } 1259 1260 /** 1261 * @return {@link #actor} (Who or what is controlled by this rule. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').) 1262 */ 1263 public List<ProvisionActorComponent> getActor() { 1264 if (this.actor == null) 1265 this.actor = new ArrayList<ProvisionActorComponent>(); 1266 return this.actor; 1267 } 1268 1269 /** 1270 * @return Returns a reference to <code>this</code> for easy method chaining 1271 */ 1272 public ProvisionComponent setActor(List<ProvisionActorComponent> theActor) { 1273 this.actor = theActor; 1274 return this; 1275 } 1276 1277 public boolean hasActor() { 1278 if (this.actor == null) 1279 return false; 1280 for (ProvisionActorComponent item : this.actor) 1281 if (!item.isEmpty()) 1282 return true; 1283 return false; 1284 } 1285 1286 public ProvisionActorComponent addActor() { //3 1287 ProvisionActorComponent t = new ProvisionActorComponent(); 1288 if (this.actor == null) 1289 this.actor = new ArrayList<ProvisionActorComponent>(); 1290 this.actor.add(t); 1291 return t; 1292 } 1293 1294 public ProvisionComponent addActor(ProvisionActorComponent t) { //3 1295 if (t == null) 1296 return this; 1297 if (this.actor == null) 1298 this.actor = new ArrayList<ProvisionActorComponent>(); 1299 this.actor.add(t); 1300 return this; 1301 } 1302 1303 /** 1304 * @return The first repetition of repeating field {@link #actor}, creating it if it does not already exist {3} 1305 */ 1306 public ProvisionActorComponent getActorFirstRep() { 1307 if (getActor().isEmpty()) { 1308 addActor(); 1309 } 1310 return getActor().get(0); 1311 } 1312 1313 /** 1314 * @return {@link #action} (Actions controlled by this Rule.) 1315 */ 1316 public List<CodeableConcept> getAction() { 1317 if (this.action == null) 1318 this.action = new ArrayList<CodeableConcept>(); 1319 return this.action; 1320 } 1321 1322 /** 1323 * @return Returns a reference to <code>this</code> for easy method chaining 1324 */ 1325 public ProvisionComponent setAction(List<CodeableConcept> theAction) { 1326 this.action = theAction; 1327 return this; 1328 } 1329 1330 public boolean hasAction() { 1331 if (this.action == null) 1332 return false; 1333 for (CodeableConcept item : this.action) 1334 if (!item.isEmpty()) 1335 return true; 1336 return false; 1337 } 1338 1339 public CodeableConcept addAction() { //3 1340 CodeableConcept t = new CodeableConcept(); 1341 if (this.action == null) 1342 this.action = new ArrayList<CodeableConcept>(); 1343 this.action.add(t); 1344 return t; 1345 } 1346 1347 public ProvisionComponent addAction(CodeableConcept t) { //3 1348 if (t == null) 1349 return this; 1350 if (this.action == null) 1351 this.action = new ArrayList<CodeableConcept>(); 1352 this.action.add(t); 1353 return this; 1354 } 1355 1356 /** 1357 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist {3} 1358 */ 1359 public CodeableConcept getActionFirstRep() { 1360 if (getAction().isEmpty()) { 1361 addAction(); 1362 } 1363 return getAction().get(0); 1364 } 1365 1366 /** 1367 * @return {@link #securityLabel} (A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception.) 1368 */ 1369 public List<Coding> getSecurityLabel() { 1370 if (this.securityLabel == null) 1371 this.securityLabel = new ArrayList<Coding>(); 1372 return this.securityLabel; 1373 } 1374 1375 /** 1376 * @return Returns a reference to <code>this</code> for easy method chaining 1377 */ 1378 public ProvisionComponent setSecurityLabel(List<Coding> theSecurityLabel) { 1379 this.securityLabel = theSecurityLabel; 1380 return this; 1381 } 1382 1383 public boolean hasSecurityLabel() { 1384 if (this.securityLabel == null) 1385 return false; 1386 for (Coding item : this.securityLabel) 1387 if (!item.isEmpty()) 1388 return true; 1389 return false; 1390 } 1391 1392 public Coding addSecurityLabel() { //3 1393 Coding t = new Coding(); 1394 if (this.securityLabel == null) 1395 this.securityLabel = new ArrayList<Coding>(); 1396 this.securityLabel.add(t); 1397 return t; 1398 } 1399 1400 public ProvisionComponent addSecurityLabel(Coding t) { //3 1401 if (t == null) 1402 return this; 1403 if (this.securityLabel == null) 1404 this.securityLabel = new ArrayList<Coding>(); 1405 this.securityLabel.add(t); 1406 return this; 1407 } 1408 1409 /** 1410 * @return The first repetition of repeating field {@link #securityLabel}, creating it if it does not already exist {3} 1411 */ 1412 public Coding getSecurityLabelFirstRep() { 1413 if (getSecurityLabel().isEmpty()) { 1414 addSecurityLabel(); 1415 } 1416 return getSecurityLabel().get(0); 1417 } 1418 1419 /** 1420 * @return {@link #purpose} (The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule.) 1421 */ 1422 public List<Coding> getPurpose() { 1423 if (this.purpose == null) 1424 this.purpose = new ArrayList<Coding>(); 1425 return this.purpose; 1426 } 1427 1428 /** 1429 * @return Returns a reference to <code>this</code> for easy method chaining 1430 */ 1431 public ProvisionComponent setPurpose(List<Coding> thePurpose) { 1432 this.purpose = thePurpose; 1433 return this; 1434 } 1435 1436 public boolean hasPurpose() { 1437 if (this.purpose == null) 1438 return false; 1439 for (Coding item : this.purpose) 1440 if (!item.isEmpty()) 1441 return true; 1442 return false; 1443 } 1444 1445 public Coding addPurpose() { //3 1446 Coding t = new Coding(); 1447 if (this.purpose == null) 1448 this.purpose = new ArrayList<Coding>(); 1449 this.purpose.add(t); 1450 return t; 1451 } 1452 1453 public ProvisionComponent addPurpose(Coding t) { //3 1454 if (t == null) 1455 return this; 1456 if (this.purpose == null) 1457 this.purpose = new ArrayList<Coding>(); 1458 this.purpose.add(t); 1459 return this; 1460 } 1461 1462 /** 1463 * @return The first repetition of repeating field {@link #purpose}, creating it if it does not already exist {3} 1464 */ 1465 public Coding getPurposeFirstRep() { 1466 if (getPurpose().isEmpty()) { 1467 addPurpose(); 1468 } 1469 return getPurpose().get(0); 1470 } 1471 1472 /** 1473 * @return {@link #class_} (The class of information covered by this rule. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.) 1474 */ 1475 public List<Coding> getClass_() { 1476 if (this.class_ == null) 1477 this.class_ = new ArrayList<Coding>(); 1478 return this.class_; 1479 } 1480 1481 /** 1482 * @return Returns a reference to <code>this</code> for easy method chaining 1483 */ 1484 public ProvisionComponent setClass_(List<Coding> theClass_) { 1485 this.class_ = theClass_; 1486 return this; 1487 } 1488 1489 public boolean hasClass_() { 1490 if (this.class_ == null) 1491 return false; 1492 for (Coding item : this.class_) 1493 if (!item.isEmpty()) 1494 return true; 1495 return false; 1496 } 1497 1498 public Coding addClass_() { //3 1499 Coding t = new Coding(); 1500 if (this.class_ == null) 1501 this.class_ = new ArrayList<Coding>(); 1502 this.class_.add(t); 1503 return t; 1504 } 1505 1506 public ProvisionComponent addClass_(Coding t) { //3 1507 if (t == null) 1508 return this; 1509 if (this.class_ == null) 1510 this.class_ = new ArrayList<Coding>(); 1511 this.class_.add(t); 1512 return this; 1513 } 1514 1515 /** 1516 * @return The first repetition of repeating field {@link #class_}, creating it if it does not already exist {3} 1517 */ 1518 public Coding getClass_FirstRep() { 1519 if (getClass_().isEmpty()) { 1520 addClass_(); 1521 } 1522 return getClass_().get(0); 1523 } 1524 1525 /** 1526 * @return {@link #code} (If this code is found in an instance, then the rule applies.) 1527 */ 1528 public List<CodeableConcept> getCode() { 1529 if (this.code == null) 1530 this.code = new ArrayList<CodeableConcept>(); 1531 return this.code; 1532 } 1533 1534 /** 1535 * @return Returns a reference to <code>this</code> for easy method chaining 1536 */ 1537 public ProvisionComponent setCode(List<CodeableConcept> theCode) { 1538 this.code = theCode; 1539 return this; 1540 } 1541 1542 public boolean hasCode() { 1543 if (this.code == null) 1544 return false; 1545 for (CodeableConcept item : this.code) 1546 if (!item.isEmpty()) 1547 return true; 1548 return false; 1549 } 1550 1551 public CodeableConcept addCode() { //3 1552 CodeableConcept t = new CodeableConcept(); 1553 if (this.code == null) 1554 this.code = new ArrayList<CodeableConcept>(); 1555 this.code.add(t); 1556 return t; 1557 } 1558 1559 public ProvisionComponent addCode(CodeableConcept t) { //3 1560 if (t == null) 1561 return this; 1562 if (this.code == null) 1563 this.code = new ArrayList<CodeableConcept>(); 1564 this.code.add(t); 1565 return this; 1566 } 1567 1568 /** 1569 * @return The first repetition of repeating field {@link #code}, creating it if it does not already exist {3} 1570 */ 1571 public CodeableConcept getCodeFirstRep() { 1572 if (getCode().isEmpty()) { 1573 addCode(); 1574 } 1575 return getCode().get(0); 1576 } 1577 1578 /** 1579 * @return {@link #dataPeriod} (Clinical or Operational Relevant period of time that bounds the data controlled by this rule.) 1580 */ 1581 public Period getDataPeriod() { 1582 if (this.dataPeriod == null) 1583 if (Configuration.errorOnAutoCreate()) 1584 throw new Error("Attempt to auto-create ProvisionComponent.dataPeriod"); 1585 else if (Configuration.doAutoCreate()) 1586 this.dataPeriod = new Period(); // cc 1587 return this.dataPeriod; 1588 } 1589 1590 public boolean hasDataPeriod() { 1591 return this.dataPeriod != null && !this.dataPeriod.isEmpty(); 1592 } 1593 1594 /** 1595 * @param value {@link #dataPeriod} (Clinical or Operational Relevant period of time that bounds the data controlled by this rule.) 1596 */ 1597 public ProvisionComponent setDataPeriod(Period value) { 1598 this.dataPeriod = value; 1599 return this; 1600 } 1601 1602 /** 1603 * @return {@link #data} (The resources controlled by this rule if specific resources are referenced.) 1604 */ 1605 public List<ProvisionDataComponent> getData() { 1606 if (this.data == null) 1607 this.data = new ArrayList<ProvisionDataComponent>(); 1608 return this.data; 1609 } 1610 1611 /** 1612 * @return Returns a reference to <code>this</code> for easy method chaining 1613 */ 1614 public ProvisionComponent setData(List<ProvisionDataComponent> theData) { 1615 this.data = theData; 1616 return this; 1617 } 1618 1619 public boolean hasData() { 1620 if (this.data == null) 1621 return false; 1622 for (ProvisionDataComponent item : this.data) 1623 if (!item.isEmpty()) 1624 return true; 1625 return false; 1626 } 1627 1628 public ProvisionDataComponent addData() { //3 1629 ProvisionDataComponent t = new ProvisionDataComponent(); 1630 if (this.data == null) 1631 this.data = new ArrayList<ProvisionDataComponent>(); 1632 this.data.add(t); 1633 return t; 1634 } 1635 1636 public ProvisionComponent addData(ProvisionDataComponent t) { //3 1637 if (t == null) 1638 return this; 1639 if (this.data == null) 1640 this.data = new ArrayList<ProvisionDataComponent>(); 1641 this.data.add(t); 1642 return this; 1643 } 1644 1645 /** 1646 * @return The first repetition of repeating field {@link #data}, creating it if it does not already exist {3} 1647 */ 1648 public ProvisionDataComponent getDataFirstRep() { 1649 if (getData().isEmpty()) { 1650 addData(); 1651 } 1652 return getData().get(0); 1653 } 1654 1655 /** 1656 * @return {@link #provision} (Rules which provide exceptions to the base rule or subrules.) 1657 */ 1658 public List<ProvisionComponent> getProvision() { 1659 if (this.provision == null) 1660 this.provision = new ArrayList<ProvisionComponent>(); 1661 return this.provision; 1662 } 1663 1664 /** 1665 * @return Returns a reference to <code>this</code> for easy method chaining 1666 */ 1667 public ProvisionComponent setProvision(List<ProvisionComponent> theProvision) { 1668 this.provision = theProvision; 1669 return this; 1670 } 1671 1672 public boolean hasProvision() { 1673 if (this.provision == null) 1674 return false; 1675 for (ProvisionComponent item : this.provision) 1676 if (!item.isEmpty()) 1677 return true; 1678 return false; 1679 } 1680 1681 public ProvisionComponent addProvision() { //3 1682 ProvisionComponent t = new ProvisionComponent(); 1683 if (this.provision == null) 1684 this.provision = new ArrayList<ProvisionComponent>(); 1685 this.provision.add(t); 1686 return t; 1687 } 1688 1689 public ProvisionComponent addProvision(ProvisionComponent t) { //3 1690 if (t == null) 1691 return this; 1692 if (this.provision == null) 1693 this.provision = new ArrayList<ProvisionComponent>(); 1694 this.provision.add(t); 1695 return this; 1696 } 1697 1698 /** 1699 * @return The first repetition of repeating field {@link #provision}, creating it if it does not already exist {3} 1700 */ 1701 public ProvisionComponent getProvisionFirstRep() { 1702 if (getProvision().isEmpty()) { 1703 addProvision(); 1704 } 1705 return getProvision().get(0); 1706 } 1707 1708 protected void listChildren(List<Property> children) { 1709 super.listChildren(children); 1710 children.add(new Property("type", "code", "Action to take - permit or deny - when the rule conditions are met. Not permitted in root rule, required in all nested rules.", 0, 1, type)); 1711 children.add(new Property("period", "Period", "The timeframe in this rule is valid.", 0, 1, period)); 1712 children.add(new Property("actor", "", "Who or what is controlled by this rule. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", 0, java.lang.Integer.MAX_VALUE, actor)); 1713 children.add(new Property("action", "CodeableConcept", "Actions controlled by this Rule.", 0, java.lang.Integer.MAX_VALUE, action)); 1714 children.add(new Property("securityLabel", "Coding", "A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception.", 0, java.lang.Integer.MAX_VALUE, securityLabel)); 1715 children.add(new Property("purpose", "Coding", "The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule.", 0, java.lang.Integer.MAX_VALUE, purpose)); 1716 children.add(new Property("class", "Coding", "The class of information covered by this rule. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.", 0, java.lang.Integer.MAX_VALUE, class_)); 1717 children.add(new Property("code", "CodeableConcept", "If this code is found in an instance, then the rule applies.", 0, java.lang.Integer.MAX_VALUE, code)); 1718 children.add(new Property("dataPeriod", "Period", "Clinical or Operational Relevant period of time that bounds the data controlled by this rule.", 0, 1, dataPeriod)); 1719 children.add(new Property("data", "", "The resources controlled by this rule if specific resources are referenced.", 0, java.lang.Integer.MAX_VALUE, data)); 1720 children.add(new Property("provision", "@Consent.provision", "Rules which provide exceptions to the base rule or subrules.", 0, java.lang.Integer.MAX_VALUE, provision)); 1721 } 1722 1723 @Override 1724 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1725 switch (_hash) { 1726 case 3575610: /*type*/ return new Property("type", "code", "Action to take - permit or deny - when the rule conditions are met. Not permitted in root rule, required in all nested rules.", 0, 1, type); 1727 case -991726143: /*period*/ return new Property("period", "Period", "The timeframe in this rule is valid.", 0, 1, period); 1728 case 92645877: /*actor*/ return new Property("actor", "", "Who or what is controlled by this rule. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", 0, java.lang.Integer.MAX_VALUE, actor); 1729 case -1422950858: /*action*/ return new Property("action", "CodeableConcept", "Actions controlled by this Rule.", 0, java.lang.Integer.MAX_VALUE, action); 1730 case -722296940: /*securityLabel*/ return new Property("securityLabel", "Coding", "A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception.", 0, java.lang.Integer.MAX_VALUE, securityLabel); 1731 case -220463842: /*purpose*/ return new Property("purpose", "Coding", "The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule.", 0, java.lang.Integer.MAX_VALUE, purpose); 1732 case 94742904: /*class*/ return new Property("class", "Coding", "The class of information covered by this rule. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.", 0, java.lang.Integer.MAX_VALUE, class_); 1733 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "If this code is found in an instance, then the rule applies.", 0, java.lang.Integer.MAX_VALUE, code); 1734 case 1177250315: /*dataPeriod*/ return new Property("dataPeriod", "Period", "Clinical or Operational Relevant period of time that bounds the data controlled by this rule.", 0, 1, dataPeriod); 1735 case 3076010: /*data*/ return new Property("data", "", "The resources controlled by this rule if specific resources are referenced.", 0, java.lang.Integer.MAX_VALUE, data); 1736 case -547120939: /*provision*/ return new Property("provision", "@Consent.provision", "Rules which provide exceptions to the base rule or subrules.", 0, java.lang.Integer.MAX_VALUE, provision); 1737 default: return super.getNamedProperty(_hash, _name, _checkValid); 1738 } 1739 1740 } 1741 1742 @Override 1743 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1744 switch (hash) { 1745 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<ConsentProvisionType> 1746 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 1747 case 92645877: /*actor*/ return this.actor == null ? new Base[0] : this.actor.toArray(new Base[this.actor.size()]); // ProvisionActorComponent 1748 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // CodeableConcept 1749 case -722296940: /*securityLabel*/ return this.securityLabel == null ? new Base[0] : this.securityLabel.toArray(new Base[this.securityLabel.size()]); // Coding 1750 case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : this.purpose.toArray(new Base[this.purpose.size()]); // Coding 1751 case 94742904: /*class*/ return this.class_ == null ? new Base[0] : this.class_.toArray(new Base[this.class_.size()]); // Coding 1752 case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // CodeableConcept 1753 case 1177250315: /*dataPeriod*/ return this.dataPeriod == null ? new Base[0] : new Base[] {this.dataPeriod}; // Period 1754 case 3076010: /*data*/ return this.data == null ? new Base[0] : this.data.toArray(new Base[this.data.size()]); // ProvisionDataComponent 1755 case -547120939: /*provision*/ return this.provision == null ? new Base[0] : this.provision.toArray(new Base[this.provision.size()]); // ProvisionComponent 1756 default: return super.getProperty(hash, name, checkValid); 1757 } 1758 1759 } 1760 1761 @Override 1762 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1763 switch (hash) { 1764 case 3575610: // type 1765 value = new ConsentProvisionTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 1766 this.type = (Enumeration) value; // Enumeration<ConsentProvisionType> 1767 return value; 1768 case -991726143: // period 1769 this.period = TypeConvertor.castToPeriod(value); // Period 1770 return value; 1771 case 92645877: // actor 1772 this.getActor().add((ProvisionActorComponent) value); // ProvisionActorComponent 1773 return value; 1774 case -1422950858: // action 1775 this.getAction().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 1776 return value; 1777 case -722296940: // securityLabel 1778 this.getSecurityLabel().add(TypeConvertor.castToCoding(value)); // Coding 1779 return value; 1780 case -220463842: // purpose 1781 this.getPurpose().add(TypeConvertor.castToCoding(value)); // Coding 1782 return value; 1783 case 94742904: // class 1784 this.getClass_().add(TypeConvertor.castToCoding(value)); // Coding 1785 return value; 1786 case 3059181: // code 1787 this.getCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 1788 return value; 1789 case 1177250315: // dataPeriod 1790 this.dataPeriod = TypeConvertor.castToPeriod(value); // Period 1791 return value; 1792 case 3076010: // data 1793 this.getData().add((ProvisionDataComponent) value); // ProvisionDataComponent 1794 return value; 1795 case -547120939: // provision 1796 this.getProvision().add((ProvisionComponent) value); // ProvisionComponent 1797 return value; 1798 default: return super.setProperty(hash, name, value); 1799 } 1800 1801 } 1802 1803 @Override 1804 public Base setProperty(String name, Base value) throws FHIRException { 1805 if (name.equals("type")) { 1806 value = new ConsentProvisionTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 1807 this.type = (Enumeration) value; // Enumeration<ConsentProvisionType> 1808 } else if (name.equals("period")) { 1809 this.period = TypeConvertor.castToPeriod(value); // Period 1810 } else if (name.equals("actor")) { 1811 this.getActor().add((ProvisionActorComponent) value); 1812 } else if (name.equals("action")) { 1813 this.getAction().add(TypeConvertor.castToCodeableConcept(value)); 1814 } else if (name.equals("securityLabel")) { 1815 this.getSecurityLabel().add(TypeConvertor.castToCoding(value)); 1816 } else if (name.equals("purpose")) { 1817 this.getPurpose().add(TypeConvertor.castToCoding(value)); 1818 } else if (name.equals("class")) { 1819 this.getClass_().add(TypeConvertor.castToCoding(value)); 1820 } else if (name.equals("code")) { 1821 this.getCode().add(TypeConvertor.castToCodeableConcept(value)); 1822 } else if (name.equals("dataPeriod")) { 1823 this.dataPeriod = TypeConvertor.castToPeriod(value); // Period 1824 } else if (name.equals("data")) { 1825 this.getData().add((ProvisionDataComponent) value); 1826 } else if (name.equals("provision")) { 1827 this.getProvision().add((ProvisionComponent) value); 1828 } else 1829 return super.setProperty(name, value); 1830 return value; 1831 } 1832 1833 @Override 1834 public Base makeProperty(int hash, String name) throws FHIRException { 1835 switch (hash) { 1836 case 3575610: return getTypeElement(); 1837 case -991726143: return getPeriod(); 1838 case 92645877: return addActor(); 1839 case -1422950858: return addAction(); 1840 case -722296940: return addSecurityLabel(); 1841 case -220463842: return addPurpose(); 1842 case 94742904: return addClass_(); 1843 case 3059181: return addCode(); 1844 case 1177250315: return getDataPeriod(); 1845 case 3076010: return addData(); 1846 case -547120939: return addProvision(); 1847 default: return super.makeProperty(hash, name); 1848 } 1849 1850 } 1851 1852 @Override 1853 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1854 switch (hash) { 1855 case 3575610: /*type*/ return new String[] {"code"}; 1856 case -991726143: /*period*/ return new String[] {"Period"}; 1857 case 92645877: /*actor*/ return new String[] {}; 1858 case -1422950858: /*action*/ return new String[] {"CodeableConcept"}; 1859 case -722296940: /*securityLabel*/ return new String[] {"Coding"}; 1860 case -220463842: /*purpose*/ return new String[] {"Coding"}; 1861 case 94742904: /*class*/ return new String[] {"Coding"}; 1862 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 1863 case 1177250315: /*dataPeriod*/ return new String[] {"Period"}; 1864 case 3076010: /*data*/ return new String[] {}; 1865 case -547120939: /*provision*/ return new String[] {"@Consent.provision"}; 1866 default: return super.getTypesForProperty(hash, name); 1867 } 1868 1869 } 1870 1871 @Override 1872 public Base addChild(String name) throws FHIRException { 1873 if (name.equals("type")) { 1874 throw new FHIRException("Cannot call addChild on a primitive type Consent.provision.type"); 1875 } 1876 else if (name.equals("period")) { 1877 this.period = new Period(); 1878 return this.period; 1879 } 1880 else if (name.equals("actor")) { 1881 return addActor(); 1882 } 1883 else if (name.equals("action")) { 1884 return addAction(); 1885 } 1886 else if (name.equals("securityLabel")) { 1887 return addSecurityLabel(); 1888 } 1889 else if (name.equals("purpose")) { 1890 return addPurpose(); 1891 } 1892 else if (name.equals("class")) { 1893 return addClass_(); 1894 } 1895 else if (name.equals("code")) { 1896 return addCode(); 1897 } 1898 else if (name.equals("dataPeriod")) { 1899 this.dataPeriod = new Period(); 1900 return this.dataPeriod; 1901 } 1902 else if (name.equals("data")) { 1903 return addData(); 1904 } 1905 else if (name.equals("provision")) { 1906 return addProvision(); 1907 } 1908 else 1909 return super.addChild(name); 1910 } 1911 1912 public ProvisionComponent copy() { 1913 ProvisionComponent dst = new ProvisionComponent(); 1914 copyValues(dst); 1915 return dst; 1916 } 1917 1918 public void copyValues(ProvisionComponent dst) { 1919 super.copyValues(dst); 1920 dst.type = type == null ? null : type.copy(); 1921 dst.period = period == null ? null : period.copy(); 1922 if (actor != null) { 1923 dst.actor = new ArrayList<ProvisionActorComponent>(); 1924 for (ProvisionActorComponent i : actor) 1925 dst.actor.add(i.copy()); 1926 }; 1927 if (action != null) { 1928 dst.action = new ArrayList<CodeableConcept>(); 1929 for (CodeableConcept i : action) 1930 dst.action.add(i.copy()); 1931 }; 1932 if (securityLabel != null) { 1933 dst.securityLabel = new ArrayList<Coding>(); 1934 for (Coding i : securityLabel) 1935 dst.securityLabel.add(i.copy()); 1936 }; 1937 if (purpose != null) { 1938 dst.purpose = new ArrayList<Coding>(); 1939 for (Coding i : purpose) 1940 dst.purpose.add(i.copy()); 1941 }; 1942 if (class_ != null) { 1943 dst.class_ = new ArrayList<Coding>(); 1944 for (Coding i : class_) 1945 dst.class_.add(i.copy()); 1946 }; 1947 if (code != null) { 1948 dst.code = new ArrayList<CodeableConcept>(); 1949 for (CodeableConcept i : code) 1950 dst.code.add(i.copy()); 1951 }; 1952 dst.dataPeriod = dataPeriod == null ? null : dataPeriod.copy(); 1953 if (data != null) { 1954 dst.data = new ArrayList<ProvisionDataComponent>(); 1955 for (ProvisionDataComponent i : data) 1956 dst.data.add(i.copy()); 1957 }; 1958 if (provision != null) { 1959 dst.provision = new ArrayList<ProvisionComponent>(); 1960 for (ProvisionComponent i : provision) 1961 dst.provision.add(i.copy()); 1962 }; 1963 } 1964 1965 @Override 1966 public boolean equalsDeep(Base other_) { 1967 if (!super.equalsDeep(other_)) 1968 return false; 1969 if (!(other_ instanceof ProvisionComponent)) 1970 return false; 1971 ProvisionComponent o = (ProvisionComponent) other_; 1972 return compareDeep(type, o.type, true) && compareDeep(period, o.period, true) && compareDeep(actor, o.actor, true) 1973 && compareDeep(action, o.action, true) && compareDeep(securityLabel, o.securityLabel, true) && compareDeep(purpose, o.purpose, true) 1974 && compareDeep(class_, o.class_, true) && compareDeep(code, o.code, true) && compareDeep(dataPeriod, o.dataPeriod, true) 1975 && compareDeep(data, o.data, true) && compareDeep(provision, o.provision, true); 1976 } 1977 1978 @Override 1979 public boolean equalsShallow(Base other_) { 1980 if (!super.equalsShallow(other_)) 1981 return false; 1982 if (!(other_ instanceof ProvisionComponent)) 1983 return false; 1984 ProvisionComponent o = (ProvisionComponent) other_; 1985 return compareValues(type, o.type, true); 1986 } 1987 1988 public boolean isEmpty() { 1989 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, period, actor, action 1990 , securityLabel, purpose, class_, code, dataPeriod, data, provision); 1991 } 1992 1993 public String fhirType() { 1994 return "Consent.provision"; 1995 1996 } 1997 1998 } 1999 2000 @Block() 2001 public static class ProvisionActorComponent extends BackboneElement implements IBaseBackboneElement { 2002 /** 2003 * How the individual is involved in the resources content that is described in the exception. 2004 */ 2005 @Child(name = "role", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 2006 @Description(shortDefinition="How the actor is involved", formalDefinition="How the individual is involved in the resources content that is described in the exception." ) 2007 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/security-role-type") 2008 protected CodeableConcept role; 2009 2010 /** 2011 * The resource that identifies the actor. To identify actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers'). 2012 */ 2013 @Child(name = "reference", type = {Device.class, Group.class, CareTeam.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class, PractitionerRole.class}, order=2, min=1, max=1, modifier=false, summary=false) 2014 @Description(shortDefinition="Resource for the actor (or group, by role)", formalDefinition="The resource that identifies the actor. To identify actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers')." ) 2015 protected Reference reference; 2016 2017 private static final long serialVersionUID = -1992921787L; 2018 2019 /** 2020 * Constructor 2021 */ 2022 public ProvisionActorComponent() { 2023 super(); 2024 } 2025 2026 /** 2027 * Constructor 2028 */ 2029 public ProvisionActorComponent(CodeableConcept role, Reference reference) { 2030 super(); 2031 this.setRole(role); 2032 this.setReference(reference); 2033 } 2034 2035 /** 2036 * @return {@link #role} (How the individual is involved in the resources content that is described in the exception.) 2037 */ 2038 public CodeableConcept getRole() { 2039 if (this.role == null) 2040 if (Configuration.errorOnAutoCreate()) 2041 throw new Error("Attempt to auto-create ProvisionActorComponent.role"); 2042 else if (Configuration.doAutoCreate()) 2043 this.role = new CodeableConcept(); // cc 2044 return this.role; 2045 } 2046 2047 public boolean hasRole() { 2048 return this.role != null && !this.role.isEmpty(); 2049 } 2050 2051 /** 2052 * @param value {@link #role} (How the individual is involved in the resources content that is described in the exception.) 2053 */ 2054 public ProvisionActorComponent setRole(CodeableConcept value) { 2055 this.role = value; 2056 return this; 2057 } 2058 2059 /** 2060 * @return {@link #reference} (The resource that identifies the actor. To identify actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').) 2061 */ 2062 public Reference getReference() { 2063 if (this.reference == null) 2064 if (Configuration.errorOnAutoCreate()) 2065 throw new Error("Attempt to auto-create ProvisionActorComponent.reference"); 2066 else if (Configuration.doAutoCreate()) 2067 this.reference = new Reference(); // cc 2068 return this.reference; 2069 } 2070 2071 public boolean hasReference() { 2072 return this.reference != null && !this.reference.isEmpty(); 2073 } 2074 2075 /** 2076 * @param value {@link #reference} (The resource that identifies the actor. To identify actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').) 2077 */ 2078 public ProvisionActorComponent setReference(Reference value) { 2079 this.reference = value; 2080 return this; 2081 } 2082 2083 protected void listChildren(List<Property> children) { 2084 super.listChildren(children); 2085 children.add(new Property("role", "CodeableConcept", "How the individual is involved in the resources content that is described in the exception.", 0, 1, role)); 2086 children.add(new Property("reference", "Reference(Device|Group|CareTeam|Organization|Patient|Practitioner|RelatedPerson|PractitionerRole)", "The resource that identifies the actor. To identify actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').", 0, 1, reference)); 2087 } 2088 2089 @Override 2090 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2091 switch (_hash) { 2092 case 3506294: /*role*/ return new Property("role", "CodeableConcept", "How the individual is involved in the resources content that is described in the exception.", 0, 1, role); 2093 case -925155509: /*reference*/ return new Property("reference", "Reference(Device|Group|CareTeam|Organization|Patient|Practitioner|RelatedPerson|PractitionerRole)", "The resource that identifies the actor. To identify actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').", 0, 1, reference); 2094 default: return super.getNamedProperty(_hash, _name, _checkValid); 2095 } 2096 2097 } 2098 2099 @Override 2100 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2101 switch (hash) { 2102 case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept 2103 case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // Reference 2104 default: return super.getProperty(hash, name, checkValid); 2105 } 2106 2107 } 2108 2109 @Override 2110 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2111 switch (hash) { 2112 case 3506294: // role 2113 this.role = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2114 return value; 2115 case -925155509: // reference 2116 this.reference = TypeConvertor.castToReference(value); // Reference 2117 return value; 2118 default: return super.setProperty(hash, name, value); 2119 } 2120 2121 } 2122 2123 @Override 2124 public Base setProperty(String name, Base value) throws FHIRException { 2125 if (name.equals("role")) { 2126 this.role = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2127 } else if (name.equals("reference")) { 2128 this.reference = TypeConvertor.castToReference(value); // Reference 2129 } else 2130 return super.setProperty(name, value); 2131 return value; 2132 } 2133 2134 @Override 2135 public Base makeProperty(int hash, String name) throws FHIRException { 2136 switch (hash) { 2137 case 3506294: return getRole(); 2138 case -925155509: return getReference(); 2139 default: return super.makeProperty(hash, name); 2140 } 2141 2142 } 2143 2144 @Override 2145 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2146 switch (hash) { 2147 case 3506294: /*role*/ return new String[] {"CodeableConcept"}; 2148 case -925155509: /*reference*/ return new String[] {"Reference"}; 2149 default: return super.getTypesForProperty(hash, name); 2150 } 2151 2152 } 2153 2154 @Override 2155 public Base addChild(String name) throws FHIRException { 2156 if (name.equals("role")) { 2157 this.role = new CodeableConcept(); 2158 return this.role; 2159 } 2160 else if (name.equals("reference")) { 2161 this.reference = new Reference(); 2162 return this.reference; 2163 } 2164 else 2165 return super.addChild(name); 2166 } 2167 2168 public ProvisionActorComponent copy() { 2169 ProvisionActorComponent dst = new ProvisionActorComponent(); 2170 copyValues(dst); 2171 return dst; 2172 } 2173 2174 public void copyValues(ProvisionActorComponent dst) { 2175 super.copyValues(dst); 2176 dst.role = role == null ? null : role.copy(); 2177 dst.reference = reference == null ? null : reference.copy(); 2178 } 2179 2180 @Override 2181 public boolean equalsDeep(Base other_) { 2182 if (!super.equalsDeep(other_)) 2183 return false; 2184 if (!(other_ instanceof ProvisionActorComponent)) 2185 return false; 2186 ProvisionActorComponent o = (ProvisionActorComponent) other_; 2187 return compareDeep(role, o.role, true) && compareDeep(reference, o.reference, true); 2188 } 2189 2190 @Override 2191 public boolean equalsShallow(Base other_) { 2192 if (!super.equalsShallow(other_)) 2193 return false; 2194 if (!(other_ instanceof ProvisionActorComponent)) 2195 return false; 2196 ProvisionActorComponent o = (ProvisionActorComponent) other_; 2197 return true; 2198 } 2199 2200 public boolean isEmpty() { 2201 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(role, reference); 2202 } 2203 2204 public String fhirType() { 2205 return "Consent.provision.actor"; 2206 2207 } 2208 2209 } 2210 2211 @Block() 2212 public static class ProvisionDataComponent extends BackboneElement implements IBaseBackboneElement { 2213 /** 2214 * How the resource reference is interpreted when testing consent restrictions. 2215 */ 2216 @Child(name = "meaning", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 2217 @Description(shortDefinition="instance | related | dependents | authoredby", formalDefinition="How the resource reference is interpreted when testing consent restrictions." ) 2218 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/consent-data-meaning") 2219 protected Enumeration<ConsentDataMeaning> meaning; 2220 2221 /** 2222 * A reference to a specific resource that defines which resources are covered by this consent. 2223 */ 2224 @Child(name = "reference", type = {Reference.class}, order=2, min=1, max=1, modifier=false, summary=true) 2225 @Description(shortDefinition="The actual data reference", formalDefinition="A reference to a specific resource that defines which resources are covered by this consent." ) 2226 protected Reference reference; 2227 2228 private static final long serialVersionUID = 1735979153L; 2229 2230 /** 2231 * Constructor 2232 */ 2233 public ProvisionDataComponent() { 2234 super(); 2235 } 2236 2237 /** 2238 * Constructor 2239 */ 2240 public ProvisionDataComponent(ConsentDataMeaning meaning, Reference reference) { 2241 super(); 2242 this.setMeaning(meaning); 2243 this.setReference(reference); 2244 } 2245 2246 /** 2247 * @return {@link #meaning} (How the resource reference is interpreted when testing consent restrictions.). This is the underlying object with id, value and extensions. The accessor "getMeaning" gives direct access to the value 2248 */ 2249 public Enumeration<ConsentDataMeaning> getMeaningElement() { 2250 if (this.meaning == null) 2251 if (Configuration.errorOnAutoCreate()) 2252 throw new Error("Attempt to auto-create ProvisionDataComponent.meaning"); 2253 else if (Configuration.doAutoCreate()) 2254 this.meaning = new Enumeration<ConsentDataMeaning>(new ConsentDataMeaningEnumFactory()); // bb 2255 return this.meaning; 2256 } 2257 2258 public boolean hasMeaningElement() { 2259 return this.meaning != null && !this.meaning.isEmpty(); 2260 } 2261 2262 public boolean hasMeaning() { 2263 return this.meaning != null && !this.meaning.isEmpty(); 2264 } 2265 2266 /** 2267 * @param value {@link #meaning} (How the resource reference is interpreted when testing consent restrictions.). This is the underlying object with id, value and extensions. The accessor "getMeaning" gives direct access to the value 2268 */ 2269 public ProvisionDataComponent setMeaningElement(Enumeration<ConsentDataMeaning> value) { 2270 this.meaning = value; 2271 return this; 2272 } 2273 2274 /** 2275 * @return How the resource reference is interpreted when testing consent restrictions. 2276 */ 2277 public ConsentDataMeaning getMeaning() { 2278 return this.meaning == null ? null : this.meaning.getValue(); 2279 } 2280 2281 /** 2282 * @param value How the resource reference is interpreted when testing consent restrictions. 2283 */ 2284 public ProvisionDataComponent setMeaning(ConsentDataMeaning value) { 2285 if (this.meaning == null) 2286 this.meaning = new Enumeration<ConsentDataMeaning>(new ConsentDataMeaningEnumFactory()); 2287 this.meaning.setValue(value); 2288 return this; 2289 } 2290 2291 /** 2292 * @return {@link #reference} (A reference to a specific resource that defines which resources are covered by this consent.) 2293 */ 2294 public Reference getReference() { 2295 if (this.reference == null) 2296 if (Configuration.errorOnAutoCreate()) 2297 throw new Error("Attempt to auto-create ProvisionDataComponent.reference"); 2298 else if (Configuration.doAutoCreate()) 2299 this.reference = new Reference(); // cc 2300 return this.reference; 2301 } 2302 2303 public boolean hasReference() { 2304 return this.reference != null && !this.reference.isEmpty(); 2305 } 2306 2307 /** 2308 * @param value {@link #reference} (A reference to a specific resource that defines which resources are covered by this consent.) 2309 */ 2310 public ProvisionDataComponent setReference(Reference value) { 2311 this.reference = value; 2312 return this; 2313 } 2314 2315 protected void listChildren(List<Property> children) { 2316 super.listChildren(children); 2317 children.add(new Property("meaning", "code", "How the resource reference is interpreted when testing consent restrictions.", 0, 1, meaning)); 2318 children.add(new Property("reference", "Reference(Any)", "A reference to a specific resource that defines which resources are covered by this consent.", 0, 1, reference)); 2319 } 2320 2321 @Override 2322 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2323 switch (_hash) { 2324 case 938160637: /*meaning*/ return new Property("meaning", "code", "How the resource reference is interpreted when testing consent restrictions.", 0, 1, meaning); 2325 case -925155509: /*reference*/ return new Property("reference", "Reference(Any)", "A reference to a specific resource that defines which resources are covered by this consent.", 0, 1, reference); 2326 default: return super.getNamedProperty(_hash, _name, _checkValid); 2327 } 2328 2329 } 2330 2331 @Override 2332 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2333 switch (hash) { 2334 case 938160637: /*meaning*/ return this.meaning == null ? new Base[0] : new Base[] {this.meaning}; // Enumeration<ConsentDataMeaning> 2335 case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // Reference 2336 default: return super.getProperty(hash, name, checkValid); 2337 } 2338 2339 } 2340 2341 @Override 2342 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2343 switch (hash) { 2344 case 938160637: // meaning 2345 value = new ConsentDataMeaningEnumFactory().fromType(TypeConvertor.castToCode(value)); 2346 this.meaning = (Enumeration) value; // Enumeration<ConsentDataMeaning> 2347 return value; 2348 case -925155509: // reference 2349 this.reference = TypeConvertor.castToReference(value); // Reference 2350 return value; 2351 default: return super.setProperty(hash, name, value); 2352 } 2353 2354 } 2355 2356 @Override 2357 public Base setProperty(String name, Base value) throws FHIRException { 2358 if (name.equals("meaning")) { 2359 value = new ConsentDataMeaningEnumFactory().fromType(TypeConvertor.castToCode(value)); 2360 this.meaning = (Enumeration) value; // Enumeration<ConsentDataMeaning> 2361 } else if (name.equals("reference")) { 2362 this.reference = TypeConvertor.castToReference(value); // Reference 2363 } else 2364 return super.setProperty(name, value); 2365 return value; 2366 } 2367 2368 @Override 2369 public Base makeProperty(int hash, String name) throws FHIRException { 2370 switch (hash) { 2371 case 938160637: return getMeaningElement(); 2372 case -925155509: return getReference(); 2373 default: return super.makeProperty(hash, name); 2374 } 2375 2376 } 2377 2378 @Override 2379 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2380 switch (hash) { 2381 case 938160637: /*meaning*/ return new String[] {"code"}; 2382 case -925155509: /*reference*/ return new String[] {"Reference"}; 2383 default: return super.getTypesForProperty(hash, name); 2384 } 2385 2386 } 2387 2388 @Override 2389 public Base addChild(String name) throws FHIRException { 2390 if (name.equals("meaning")) { 2391 throw new FHIRException("Cannot call addChild on a primitive type Consent.provision.data.meaning"); 2392 } 2393 else if (name.equals("reference")) { 2394 this.reference = new Reference(); 2395 return this.reference; 2396 } 2397 else 2398 return super.addChild(name); 2399 } 2400 2401 public ProvisionDataComponent copy() { 2402 ProvisionDataComponent dst = new ProvisionDataComponent(); 2403 copyValues(dst); 2404 return dst; 2405 } 2406 2407 public void copyValues(ProvisionDataComponent dst) { 2408 super.copyValues(dst); 2409 dst.meaning = meaning == null ? null : meaning.copy(); 2410 dst.reference = reference == null ? null : reference.copy(); 2411 } 2412 2413 @Override 2414 public boolean equalsDeep(Base other_) { 2415 if (!super.equalsDeep(other_)) 2416 return false; 2417 if (!(other_ instanceof ProvisionDataComponent)) 2418 return false; 2419 ProvisionDataComponent o = (ProvisionDataComponent) other_; 2420 return compareDeep(meaning, o.meaning, true) && compareDeep(reference, o.reference, true); 2421 } 2422 2423 @Override 2424 public boolean equalsShallow(Base other_) { 2425 if (!super.equalsShallow(other_)) 2426 return false; 2427 if (!(other_ instanceof ProvisionDataComponent)) 2428 return false; 2429 ProvisionDataComponent o = (ProvisionDataComponent) other_; 2430 return compareValues(meaning, o.meaning, true); 2431 } 2432 2433 public boolean isEmpty() { 2434 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(meaning, reference); 2435 } 2436 2437 public String fhirType() { 2438 return "Consent.provision.data"; 2439 2440 } 2441 2442 } 2443 2444 /** 2445 * Unique identifier for this copy of the Consent Statement. 2446 */ 2447 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2448 @Description(shortDefinition="Identifier for this record (external references)", formalDefinition="Unique identifier for this copy of the Consent Statement." ) 2449 protected List<Identifier> identifier; 2450 2451 /** 2452 * Indicates the current state of this Consent resource. 2453 */ 2454 @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) 2455 @Description(shortDefinition="draft | active | inactive | entered-in-error | unknown", formalDefinition="Indicates the current state of this Consent resource." ) 2456 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/consent-state-codes") 2457 protected Enumeration<ConsentState> status; 2458 2459 /** 2460 * A selector of the type of consent being presented: Privacy, Treatment, or Research. This list is now extensible. 2461 */ 2462 @Child(name = "scope", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=true, summary=true) 2463 @Description(shortDefinition="Which of the four areas this resource covers (extensible)", formalDefinition="A selector of the type of consent being presented: Privacy, Treatment, or Research. This list is now extensible." ) 2464 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/consent-scope") 2465 protected CodeableConcept scope; 2466 2467 /** 2468 * A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements. 2469 */ 2470 @Child(name = "category", type = {CodeableConcept.class}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2471 @Description(shortDefinition="Classification of the consent statement - for indexing/retrieval", formalDefinition="A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements." ) 2472 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/consent-category") 2473 protected List<CodeableConcept> category; 2474 2475 /** 2476 * The patient/healthcare consumer to whom this consent applies. 2477 */ 2478 @Child(name = "patient", type = {Patient.class}, order=4, min=0, max=1, modifier=false, summary=true) 2479 @Description(shortDefinition="Who the consent applies to", formalDefinition="The patient/healthcare consumer to whom this consent applies." ) 2480 protected Reference patient; 2481 2482 /** 2483 * Date and time the consent instance was agreed to. 2484 */ 2485 @Child(name = "dateTime", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=true) 2486 @Description(shortDefinition="When consent was agreed to", formalDefinition="Date and time the consent instance was agreed to." ) 2487 protected DateTimeType dateTime; 2488 2489 /** 2490 * Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions. 2491 */ 2492 @Child(name = "performer", type = {CareTeam.class, HealthcareService.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class, PractitionerRole.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2493 @Description(shortDefinition="Who is agreeing to the policy and rules", formalDefinition="Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions." ) 2494 protected List<Reference> performer; 2495 2496 /** 2497 * The organization that manages the consent, and the framework within which it is executed. 2498 */ 2499 @Child(name = "organization", type = {Organization.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2500 @Description(shortDefinition="Custodian of the consent", formalDefinition="The organization that manages the consent, and the framework within which it is executed." ) 2501 protected List<Reference> organization; 2502 2503 /** 2504 * The source on which this consent statement is based. The source might be a scanned original paper form. 2505 */ 2506 @Child(name = "sourceAttachment", type = {Attachment.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2507 @Description(shortDefinition="Source from which this consent is taken", formalDefinition="The source on which this consent statement is based. The source might be a scanned original paper form." ) 2508 protected List<Attachment> sourceAttachment; 2509 2510 /** 2511 * A reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document. 2512 */ 2513 @Child(name = "sourceReference", type = {Consent.class, DocumentReference.class, Contract.class, QuestionnaireResponse.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2514 @Description(shortDefinition="Source from which this consent is taken", formalDefinition="A reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document." ) 2515 protected List<Reference> sourceReference; 2516 2517 /** 2518 * The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law. 2519 */ 2520 @Child(name = "policy", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2521 @Description(shortDefinition="Policies covered by this consent", formalDefinition="The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law." ) 2522 protected List<ConsentPolicyComponent> policy; 2523 2524 /** 2525 * A reference to the specific base computable regulation or policy. 2526 */ 2527 @Child(name = "policyRule", type = {CodeableConcept.class}, order=11, min=0, max=1, modifier=false, summary=true) 2528 @Description(shortDefinition="Regulation that this consents to", formalDefinition="A reference to the specific base computable regulation or policy." ) 2529 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/consent-policy") 2530 protected CodeableConcept policyRule; 2531 2532 /** 2533 * Whether a treatment instruction (e.g. artificial respiration yes or no) was verified with the patient, his/her family or another authorized person. 2534 */ 2535 @Child(name = "verification", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2536 @Description(shortDefinition="Consent Verified by patient or family", formalDefinition="Whether a treatment instruction (e.g. artificial respiration yes or no) was verified with the patient, his/her family or another authorized person." ) 2537 protected List<ConsentVerificationComponent> verification; 2538 2539 /** 2540 * An exception to the base policy of this consent. An exception can be an addition or removal of access permissions. 2541 */ 2542 @Child(name = "provision", type = {}, order=13, min=0, max=1, modifier=false, summary=true) 2543 @Description(shortDefinition="Constraints to the base Consent.policyRule/Consent.policy", formalDefinition="An exception to the base policy of this consent. An exception can be an addition or removal of access permissions." ) 2544 protected ProvisionComponent provision; 2545 2546 private static final long serialVersionUID = 1958612573L; 2547 2548 /** 2549 * Constructor 2550 */ 2551 public Consent() { 2552 super(); 2553 } 2554 2555 /** 2556 * Constructor 2557 */ 2558 public Consent(ConsentState status, CodeableConcept scope, CodeableConcept category) { 2559 super(); 2560 this.setStatus(status); 2561 this.setScope(scope); 2562 this.addCategory(category); 2563 } 2564 2565 /** 2566 * @return {@link #identifier} (Unique identifier for this copy of the Consent Statement.) 2567 */ 2568 public List<Identifier> getIdentifier() { 2569 if (this.identifier == null) 2570 this.identifier = new ArrayList<Identifier>(); 2571 return this.identifier; 2572 } 2573 2574 /** 2575 * @return Returns a reference to <code>this</code> for easy method chaining 2576 */ 2577 public Consent setIdentifier(List<Identifier> theIdentifier) { 2578 this.identifier = theIdentifier; 2579 return this; 2580 } 2581 2582 public boolean hasIdentifier() { 2583 if (this.identifier == null) 2584 return false; 2585 for (Identifier item : this.identifier) 2586 if (!item.isEmpty()) 2587 return true; 2588 return false; 2589 } 2590 2591 public Identifier addIdentifier() { //3 2592 Identifier t = new Identifier(); 2593 if (this.identifier == null) 2594 this.identifier = new ArrayList<Identifier>(); 2595 this.identifier.add(t); 2596 return t; 2597 } 2598 2599 public Consent addIdentifier(Identifier t) { //3 2600 if (t == null) 2601 return this; 2602 if (this.identifier == null) 2603 this.identifier = new ArrayList<Identifier>(); 2604 this.identifier.add(t); 2605 return this; 2606 } 2607 2608 /** 2609 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 2610 */ 2611 public Identifier getIdentifierFirstRep() { 2612 if (getIdentifier().isEmpty()) { 2613 addIdentifier(); 2614 } 2615 return getIdentifier().get(0); 2616 } 2617 2618 /** 2619 * @return {@link #status} (Indicates the current state of this Consent resource.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2620 */ 2621 public Enumeration<ConsentState> getStatusElement() { 2622 if (this.status == null) 2623 if (Configuration.errorOnAutoCreate()) 2624 throw new Error("Attempt to auto-create Consent.status"); 2625 else if (Configuration.doAutoCreate()) 2626 this.status = new Enumeration<ConsentState>(new ConsentStateEnumFactory()); // bb 2627 return this.status; 2628 } 2629 2630 public boolean hasStatusElement() { 2631 return this.status != null && !this.status.isEmpty(); 2632 } 2633 2634 public boolean hasStatus() { 2635 return this.status != null && !this.status.isEmpty(); 2636 } 2637 2638 /** 2639 * @param value {@link #status} (Indicates the current state of this Consent resource.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2640 */ 2641 public Consent setStatusElement(Enumeration<ConsentState> value) { 2642 this.status = value; 2643 return this; 2644 } 2645 2646 /** 2647 * @return Indicates the current state of this Consent resource. 2648 */ 2649 public ConsentState getStatus() { 2650 return this.status == null ? null : this.status.getValue(); 2651 } 2652 2653 /** 2654 * @param value Indicates the current state of this Consent resource. 2655 */ 2656 public Consent setStatus(ConsentState value) { 2657 if (this.status == null) 2658 this.status = new Enumeration<ConsentState>(new ConsentStateEnumFactory()); 2659 this.status.setValue(value); 2660 return this; 2661 } 2662 2663 /** 2664 * @return {@link #scope} (A selector of the type of consent being presented: Privacy, Treatment, or Research. This list is now extensible.) 2665 */ 2666 public CodeableConcept getScope() { 2667 if (this.scope == null) 2668 if (Configuration.errorOnAutoCreate()) 2669 throw new Error("Attempt to auto-create Consent.scope"); 2670 else if (Configuration.doAutoCreate()) 2671 this.scope = new CodeableConcept(); // cc 2672 return this.scope; 2673 } 2674 2675 public boolean hasScope() { 2676 return this.scope != null && !this.scope.isEmpty(); 2677 } 2678 2679 /** 2680 * @param value {@link #scope} (A selector of the type of consent being presented: Privacy, Treatment, or Research. This list is now extensible.) 2681 */ 2682 public Consent setScope(CodeableConcept value) { 2683 this.scope = value; 2684 return this; 2685 } 2686 2687 /** 2688 * @return {@link #category} (A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.) 2689 */ 2690 public List<CodeableConcept> getCategory() { 2691 if (this.category == null) 2692 this.category = new ArrayList<CodeableConcept>(); 2693 return this.category; 2694 } 2695 2696 /** 2697 * @return Returns a reference to <code>this</code> for easy method chaining 2698 */ 2699 public Consent setCategory(List<CodeableConcept> theCategory) { 2700 this.category = theCategory; 2701 return this; 2702 } 2703 2704 public boolean hasCategory() { 2705 if (this.category == null) 2706 return false; 2707 for (CodeableConcept item : this.category) 2708 if (!item.isEmpty()) 2709 return true; 2710 return false; 2711 } 2712 2713 public CodeableConcept addCategory() { //3 2714 CodeableConcept t = new CodeableConcept(); 2715 if (this.category == null) 2716 this.category = new ArrayList<CodeableConcept>(); 2717 this.category.add(t); 2718 return t; 2719 } 2720 2721 public Consent addCategory(CodeableConcept t) { //3 2722 if (t == null) 2723 return this; 2724 if (this.category == null) 2725 this.category = new ArrayList<CodeableConcept>(); 2726 this.category.add(t); 2727 return this; 2728 } 2729 2730 /** 2731 * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist {3} 2732 */ 2733 public CodeableConcept getCategoryFirstRep() { 2734 if (getCategory().isEmpty()) { 2735 addCategory(); 2736 } 2737 return getCategory().get(0); 2738 } 2739 2740 /** 2741 * @return {@link #patient} (The patient/healthcare consumer to whom this consent applies.) 2742 */ 2743 public Reference getPatient() { 2744 if (this.patient == null) 2745 if (Configuration.errorOnAutoCreate()) 2746 throw new Error("Attempt to auto-create Consent.patient"); 2747 else if (Configuration.doAutoCreate()) 2748 this.patient = new Reference(); // cc 2749 return this.patient; 2750 } 2751 2752 public boolean hasPatient() { 2753 return this.patient != null && !this.patient.isEmpty(); 2754 } 2755 2756 /** 2757 * @param value {@link #patient} (The patient/healthcare consumer to whom this consent applies.) 2758 */ 2759 public Consent setPatient(Reference value) { 2760 this.patient = value; 2761 return this; 2762 } 2763 2764 /** 2765 * @return {@link #dateTime} (Date and time the consent instance was agreed to.). This is the underlying object with id, value and extensions. The accessor "getDateTime" gives direct access to the value 2766 */ 2767 public DateTimeType getDateTimeElement() { 2768 if (this.dateTime == null) 2769 if (Configuration.errorOnAutoCreate()) 2770 throw new Error("Attempt to auto-create Consent.dateTime"); 2771 else if (Configuration.doAutoCreate()) 2772 this.dateTime = new DateTimeType(); // bb 2773 return this.dateTime; 2774 } 2775 2776 public boolean hasDateTimeElement() { 2777 return this.dateTime != null && !this.dateTime.isEmpty(); 2778 } 2779 2780 public boolean hasDateTime() { 2781 return this.dateTime != null && !this.dateTime.isEmpty(); 2782 } 2783 2784 /** 2785 * @param value {@link #dateTime} (Date and time the consent instance was agreed to.). This is the underlying object with id, value and extensions. The accessor "getDateTime" gives direct access to the value 2786 */ 2787 public Consent setDateTimeElement(DateTimeType value) { 2788 this.dateTime = value; 2789 return this; 2790 } 2791 2792 /** 2793 * @return Date and time the consent instance was agreed to. 2794 */ 2795 public Date getDateTime() { 2796 return this.dateTime == null ? null : this.dateTime.getValue(); 2797 } 2798 2799 /** 2800 * @param value Date and time the consent instance was agreed to. 2801 */ 2802 public Consent setDateTime(Date value) { 2803 if (value == null) 2804 this.dateTime = null; 2805 else { 2806 if (this.dateTime == null) 2807 this.dateTime = new DateTimeType(); 2808 this.dateTime.setValue(value); 2809 } 2810 return this; 2811 } 2812 2813 /** 2814 * @return {@link #performer} (Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions.) 2815 */ 2816 public List<Reference> getPerformer() { 2817 if (this.performer == null) 2818 this.performer = new ArrayList<Reference>(); 2819 return this.performer; 2820 } 2821 2822 /** 2823 * @return Returns a reference to <code>this</code> for easy method chaining 2824 */ 2825 public Consent setPerformer(List<Reference> thePerformer) { 2826 this.performer = thePerformer; 2827 return this; 2828 } 2829 2830 public boolean hasPerformer() { 2831 if (this.performer == null) 2832 return false; 2833 for (Reference item : this.performer) 2834 if (!item.isEmpty()) 2835 return true; 2836 return false; 2837 } 2838 2839 public Reference addPerformer() { //3 2840 Reference t = new Reference(); 2841 if (this.performer == null) 2842 this.performer = new ArrayList<Reference>(); 2843 this.performer.add(t); 2844 return t; 2845 } 2846 2847 public Consent addPerformer(Reference t) { //3 2848 if (t == null) 2849 return this; 2850 if (this.performer == null) 2851 this.performer = new ArrayList<Reference>(); 2852 this.performer.add(t); 2853 return this; 2854 } 2855 2856 /** 2857 * @return The first repetition of repeating field {@link #performer}, creating it if it does not already exist {3} 2858 */ 2859 public Reference getPerformerFirstRep() { 2860 if (getPerformer().isEmpty()) { 2861 addPerformer(); 2862 } 2863 return getPerformer().get(0); 2864 } 2865 2866 /** 2867 * @return {@link #organization} (The organization that manages the consent, and the framework within which it is executed.) 2868 */ 2869 public List<Reference> getOrganization() { 2870 if (this.organization == null) 2871 this.organization = new ArrayList<Reference>(); 2872 return this.organization; 2873 } 2874 2875 /** 2876 * @return Returns a reference to <code>this</code> for easy method chaining 2877 */ 2878 public Consent setOrganization(List<Reference> theOrganization) { 2879 this.organization = theOrganization; 2880 return this; 2881 } 2882 2883 public boolean hasOrganization() { 2884 if (this.organization == null) 2885 return false; 2886 for (Reference item : this.organization) 2887 if (!item.isEmpty()) 2888 return true; 2889 return false; 2890 } 2891 2892 public Reference addOrganization() { //3 2893 Reference t = new Reference(); 2894 if (this.organization == null) 2895 this.organization = new ArrayList<Reference>(); 2896 this.organization.add(t); 2897 return t; 2898 } 2899 2900 public Consent addOrganization(Reference t) { //3 2901 if (t == null) 2902 return this; 2903 if (this.organization == null) 2904 this.organization = new ArrayList<Reference>(); 2905 this.organization.add(t); 2906 return this; 2907 } 2908 2909 /** 2910 * @return The first repetition of repeating field {@link #organization}, creating it if it does not already exist {3} 2911 */ 2912 public Reference getOrganizationFirstRep() { 2913 if (getOrganization().isEmpty()) { 2914 addOrganization(); 2915 } 2916 return getOrganization().get(0); 2917 } 2918 2919 /** 2920 * @return {@link #sourceAttachment} (The source on which this consent statement is based. The source might be a scanned original paper form.) 2921 */ 2922 public List<Attachment> getSourceAttachment() { 2923 if (this.sourceAttachment == null) 2924 this.sourceAttachment = new ArrayList<Attachment>(); 2925 return this.sourceAttachment; 2926 } 2927 2928 /** 2929 * @return Returns a reference to <code>this</code> for easy method chaining 2930 */ 2931 public Consent setSourceAttachment(List<Attachment> theSourceAttachment) { 2932 this.sourceAttachment = theSourceAttachment; 2933 return this; 2934 } 2935 2936 public boolean hasSourceAttachment() { 2937 if (this.sourceAttachment == null) 2938 return false; 2939 for (Attachment item : this.sourceAttachment) 2940 if (!item.isEmpty()) 2941 return true; 2942 return false; 2943 } 2944 2945 public Attachment addSourceAttachment() { //3 2946 Attachment t = new Attachment(); 2947 if (this.sourceAttachment == null) 2948 this.sourceAttachment = new ArrayList<Attachment>(); 2949 this.sourceAttachment.add(t); 2950 return t; 2951 } 2952 2953 public Consent addSourceAttachment(Attachment t) { //3 2954 if (t == null) 2955 return this; 2956 if (this.sourceAttachment == null) 2957 this.sourceAttachment = new ArrayList<Attachment>(); 2958 this.sourceAttachment.add(t); 2959 return this; 2960 } 2961 2962 /** 2963 * @return The first repetition of repeating field {@link #sourceAttachment}, creating it if it does not already exist {3} 2964 */ 2965 public Attachment getSourceAttachmentFirstRep() { 2966 if (getSourceAttachment().isEmpty()) { 2967 addSourceAttachment(); 2968 } 2969 return getSourceAttachment().get(0); 2970 } 2971 2972 /** 2973 * @return {@link #sourceReference} (A reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.) 2974 */ 2975 public List<Reference> getSourceReference() { 2976 if (this.sourceReference == null) 2977 this.sourceReference = new ArrayList<Reference>(); 2978 return this.sourceReference; 2979 } 2980 2981 /** 2982 * @return Returns a reference to <code>this</code> for easy method chaining 2983 */ 2984 public Consent setSourceReference(List<Reference> theSourceReference) { 2985 this.sourceReference = theSourceReference; 2986 return this; 2987 } 2988 2989 public boolean hasSourceReference() { 2990 if (this.sourceReference == null) 2991 return false; 2992 for (Reference item : this.sourceReference) 2993 if (!item.isEmpty()) 2994 return true; 2995 return false; 2996 } 2997 2998 public Reference addSourceReference() { //3 2999 Reference t = new Reference(); 3000 if (this.sourceReference == null) 3001 this.sourceReference = new ArrayList<Reference>(); 3002 this.sourceReference.add(t); 3003 return t; 3004 } 3005 3006 public Consent addSourceReference(Reference t) { //3 3007 if (t == null) 3008 return this; 3009 if (this.sourceReference == null) 3010 this.sourceReference = new ArrayList<Reference>(); 3011 this.sourceReference.add(t); 3012 return this; 3013 } 3014 3015 /** 3016 * @return The first repetition of repeating field {@link #sourceReference}, creating it if it does not already exist {3} 3017 */ 3018 public Reference getSourceReferenceFirstRep() { 3019 if (getSourceReference().isEmpty()) { 3020 addSourceReference(); 3021 } 3022 return getSourceReference().get(0); 3023 } 3024 3025 /** 3026 * @return {@link #policy} (The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.) 3027 */ 3028 public List<ConsentPolicyComponent> getPolicy() { 3029 if (this.policy == null) 3030 this.policy = new ArrayList<ConsentPolicyComponent>(); 3031 return this.policy; 3032 } 3033 3034 /** 3035 * @return Returns a reference to <code>this</code> for easy method chaining 3036 */ 3037 public Consent setPolicy(List<ConsentPolicyComponent> thePolicy) { 3038 this.policy = thePolicy; 3039 return this; 3040 } 3041 3042 public boolean hasPolicy() { 3043 if (this.policy == null) 3044 return false; 3045 for (ConsentPolicyComponent item : this.policy) 3046 if (!item.isEmpty()) 3047 return true; 3048 return false; 3049 } 3050 3051 public ConsentPolicyComponent addPolicy() { //3 3052 ConsentPolicyComponent t = new ConsentPolicyComponent(); 3053 if (this.policy == null) 3054 this.policy = new ArrayList<ConsentPolicyComponent>(); 3055 this.policy.add(t); 3056 return t; 3057 } 3058 3059 public Consent addPolicy(ConsentPolicyComponent t) { //3 3060 if (t == null) 3061 return this; 3062 if (this.policy == null) 3063 this.policy = new ArrayList<ConsentPolicyComponent>(); 3064 this.policy.add(t); 3065 return this; 3066 } 3067 3068 /** 3069 * @return The first repetition of repeating field {@link #policy}, creating it if it does not already exist {3} 3070 */ 3071 public ConsentPolicyComponent getPolicyFirstRep() { 3072 if (getPolicy().isEmpty()) { 3073 addPolicy(); 3074 } 3075 return getPolicy().get(0); 3076 } 3077 3078 /** 3079 * @return {@link #policyRule} (A reference to the specific base computable regulation or policy.) 3080 */ 3081 public CodeableConcept getPolicyRule() { 3082 if (this.policyRule == null) 3083 if (Configuration.errorOnAutoCreate()) 3084 throw new Error("Attempt to auto-create Consent.policyRule"); 3085 else if (Configuration.doAutoCreate()) 3086 this.policyRule = new CodeableConcept(); // cc 3087 return this.policyRule; 3088 } 3089 3090 public boolean hasPolicyRule() { 3091 return this.policyRule != null && !this.policyRule.isEmpty(); 3092 } 3093 3094 /** 3095 * @param value {@link #policyRule} (A reference to the specific base computable regulation or policy.) 3096 */ 3097 public Consent setPolicyRule(CodeableConcept value) { 3098 this.policyRule = value; 3099 return this; 3100 } 3101 3102 /** 3103 * @return {@link #verification} (Whether a treatment instruction (e.g. artificial respiration yes or no) was verified with the patient, his/her family or another authorized person.) 3104 */ 3105 public List<ConsentVerificationComponent> getVerification() { 3106 if (this.verification == null) 3107 this.verification = new ArrayList<ConsentVerificationComponent>(); 3108 return this.verification; 3109 } 3110 3111 /** 3112 * @return Returns a reference to <code>this</code> for easy method chaining 3113 */ 3114 public Consent setVerification(List<ConsentVerificationComponent> theVerification) { 3115 this.verification = theVerification; 3116 return this; 3117 } 3118 3119 public boolean hasVerification() { 3120 if (this.verification == null) 3121 return false; 3122 for (ConsentVerificationComponent item : this.verification) 3123 if (!item.isEmpty()) 3124 return true; 3125 return false; 3126 } 3127 3128 public ConsentVerificationComponent addVerification() { //3 3129 ConsentVerificationComponent t = new ConsentVerificationComponent(); 3130 if (this.verification == null) 3131 this.verification = new ArrayList<ConsentVerificationComponent>(); 3132 this.verification.add(t); 3133 return t; 3134 } 3135 3136 public Consent addVerification(ConsentVerificationComponent t) { //3 3137 if (t == null) 3138 return this; 3139 if (this.verification == null) 3140 this.verification = new ArrayList<ConsentVerificationComponent>(); 3141 this.verification.add(t); 3142 return this; 3143 } 3144 3145 /** 3146 * @return The first repetition of repeating field {@link #verification}, creating it if it does not already exist {3} 3147 */ 3148 public ConsentVerificationComponent getVerificationFirstRep() { 3149 if (getVerification().isEmpty()) { 3150 addVerification(); 3151 } 3152 return getVerification().get(0); 3153 } 3154 3155 /** 3156 * @return {@link #provision} (An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.) 3157 */ 3158 public ProvisionComponent getProvision() { 3159 if (this.provision == null) 3160 if (Configuration.errorOnAutoCreate()) 3161 throw new Error("Attempt to auto-create Consent.provision"); 3162 else if (Configuration.doAutoCreate()) 3163 this.provision = new ProvisionComponent(); // cc 3164 return this.provision; 3165 } 3166 3167 public boolean hasProvision() { 3168 return this.provision != null && !this.provision.isEmpty(); 3169 } 3170 3171 /** 3172 * @param value {@link #provision} (An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.) 3173 */ 3174 public Consent setProvision(ProvisionComponent value) { 3175 this.provision = value; 3176 return this; 3177 } 3178 3179 protected void listChildren(List<Property> children) { 3180 super.listChildren(children); 3181 children.add(new Property("identifier", "Identifier", "Unique identifier for this copy of the Consent Statement.", 0, java.lang.Integer.MAX_VALUE, identifier)); 3182 children.add(new Property("status", "code", "Indicates the current state of this Consent resource.", 0, 1, status)); 3183 children.add(new Property("scope", "CodeableConcept", "A selector of the type of consent being presented: Privacy, Treatment, or Research. This list is now extensible.", 0, 1, scope)); 3184 children.add(new Property("category", "CodeableConcept", "A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.", 0, java.lang.Integer.MAX_VALUE, category)); 3185 children.add(new Property("patient", "Reference(Patient)", "The patient/healthcare consumer to whom this consent applies.", 0, 1, patient)); 3186 children.add(new Property("dateTime", "dateTime", "Date and time the consent instance was agreed to.", 0, 1, dateTime)); 3187 children.add(new Property("performer", "Reference(CareTeam|HealthcareService|Organization|Patient|Practitioner|RelatedPerson|PractitionerRole)", "Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions.", 0, java.lang.Integer.MAX_VALUE, performer)); 3188 children.add(new Property("organization", "Reference(Organization)", "The organization that manages the consent, and the framework within which it is executed.", 0, java.lang.Integer.MAX_VALUE, organization)); 3189 children.add(new Property("sourceAttachment", "Attachment", "The source on which this consent statement is based. The source might be a scanned original paper form.", 0, java.lang.Integer.MAX_VALUE, sourceAttachment)); 3190 children.add(new Property("sourceReference", "Reference(Consent|DocumentReference|Contract|QuestionnaireResponse)", "A reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.", 0, java.lang.Integer.MAX_VALUE, sourceReference)); 3191 children.add(new Property("policy", "", "The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.", 0, java.lang.Integer.MAX_VALUE, policy)); 3192 children.add(new Property("policyRule", "CodeableConcept", "A reference to the specific base computable regulation or policy.", 0, 1, policyRule)); 3193 children.add(new Property("verification", "", "Whether a treatment instruction (e.g. artificial respiration yes or no) was verified with the patient, his/her family or another authorized person.", 0, java.lang.Integer.MAX_VALUE, verification)); 3194 children.add(new Property("provision", "", "An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.", 0, 1, provision)); 3195 } 3196 3197 @Override 3198 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3199 switch (_hash) { 3200 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Unique identifier for this copy of the Consent Statement.", 0, java.lang.Integer.MAX_VALUE, identifier); 3201 case -892481550: /*status*/ return new Property("status", "code", "Indicates the current state of this Consent resource.", 0, 1, status); 3202 case 109264468: /*scope*/ return new Property("scope", "CodeableConcept", "A selector of the type of consent being presented: Privacy, Treatment, or Research. This list is now extensible.", 0, 1, scope); 3203 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.", 0, java.lang.Integer.MAX_VALUE, category); 3204 case -791418107: /*patient*/ return new Property("patient", "Reference(Patient)", "The patient/healthcare consumer to whom this consent applies.", 0, 1, patient); 3205 case 1792749467: /*dateTime*/ return new Property("dateTime", "dateTime", "Date and time the consent instance was agreed to.", 0, 1, dateTime); 3206 case 481140686: /*performer*/ return new Property("performer", "Reference(CareTeam|HealthcareService|Organization|Patient|Practitioner|RelatedPerson|PractitionerRole)", "Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions.", 0, java.lang.Integer.MAX_VALUE, performer); 3207 case 1178922291: /*organization*/ return new Property("organization", "Reference(Organization)", "The organization that manages the consent, and the framework within which it is executed.", 0, java.lang.Integer.MAX_VALUE, organization); 3208 case 1964406686: /*sourceAttachment*/ return new Property("sourceAttachment", "Attachment", "The source on which this consent statement is based. The source might be a scanned original paper form.", 0, java.lang.Integer.MAX_VALUE, sourceAttachment); 3209 case -244259472: /*sourceReference*/ return new Property("sourceReference", "Reference(Consent|DocumentReference|Contract|QuestionnaireResponse)", "A reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.", 0, java.lang.Integer.MAX_VALUE, sourceReference); 3210 case -982670030: /*policy*/ return new Property("policy", "", "The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.", 0, java.lang.Integer.MAX_VALUE, policy); 3211 case 1593493326: /*policyRule*/ return new Property("policyRule", "CodeableConcept", "A reference to the specific base computable regulation or policy.", 0, 1, policyRule); 3212 case -1484401125: /*verification*/ return new Property("verification", "", "Whether a treatment instruction (e.g. artificial respiration yes or no) was verified with the patient, his/her family or another authorized person.", 0, java.lang.Integer.MAX_VALUE, verification); 3213 case -547120939: /*provision*/ return new Property("provision", "", "An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.", 0, 1, provision); 3214 default: return super.getNamedProperty(_hash, _name, _checkValid); 3215 } 3216 3217 } 3218 3219 @Override 3220 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3221 switch (hash) { 3222 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 3223 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ConsentState> 3224 case 109264468: /*scope*/ return this.scope == null ? new Base[0] : new Base[] {this.scope}; // CodeableConcept 3225 case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept 3226 case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference 3227 case 1792749467: /*dateTime*/ return this.dateTime == null ? new Base[0] : new Base[] {this.dateTime}; // DateTimeType 3228 case 481140686: /*performer*/ return this.performer == null ? new Base[0] : this.performer.toArray(new Base[this.performer.size()]); // Reference 3229 case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : this.organization.toArray(new Base[this.organization.size()]); // Reference 3230 case 1964406686: /*sourceAttachment*/ return this.sourceAttachment == null ? new Base[0] : this.sourceAttachment.toArray(new Base[this.sourceAttachment.size()]); // Attachment 3231 case -244259472: /*sourceReference*/ return this.sourceReference == null ? new Base[0] : this.sourceReference.toArray(new Base[this.sourceReference.size()]); // Reference 3232 case -982670030: /*policy*/ return this.policy == null ? new Base[0] : this.policy.toArray(new Base[this.policy.size()]); // ConsentPolicyComponent 3233 case 1593493326: /*policyRule*/ return this.policyRule == null ? new Base[0] : new Base[] {this.policyRule}; // CodeableConcept 3234 case -1484401125: /*verification*/ return this.verification == null ? new Base[0] : this.verification.toArray(new Base[this.verification.size()]); // ConsentVerificationComponent 3235 case -547120939: /*provision*/ return this.provision == null ? new Base[0] : new Base[] {this.provision}; // ProvisionComponent 3236 default: return super.getProperty(hash, name, checkValid); 3237 } 3238 3239 } 3240 3241 @Override 3242 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3243 switch (hash) { 3244 case -1618432855: // identifier 3245 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 3246 return value; 3247 case -892481550: // status 3248 value = new ConsentStateEnumFactory().fromType(TypeConvertor.castToCode(value)); 3249 this.status = (Enumeration) value; // Enumeration<ConsentState> 3250 return value; 3251 case 109264468: // scope 3252 this.scope = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3253 return value; 3254 case 50511102: // category 3255 this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 3256 return value; 3257 case -791418107: // patient 3258 this.patient = TypeConvertor.castToReference(value); // Reference 3259 return value; 3260 case 1792749467: // dateTime 3261 this.dateTime = TypeConvertor.castToDateTime(value); // DateTimeType 3262 return value; 3263 case 481140686: // performer 3264 this.getPerformer().add(TypeConvertor.castToReference(value)); // Reference 3265 return value; 3266 case 1178922291: // organization 3267 this.getOrganization().add(TypeConvertor.castToReference(value)); // Reference 3268 return value; 3269 case 1964406686: // sourceAttachment 3270 this.getSourceAttachment().add(TypeConvertor.castToAttachment(value)); // Attachment 3271 return value; 3272 case -244259472: // sourceReference 3273 this.getSourceReference().add(TypeConvertor.castToReference(value)); // Reference 3274 return value; 3275 case -982670030: // policy 3276 this.getPolicy().add((ConsentPolicyComponent) value); // ConsentPolicyComponent 3277 return value; 3278 case 1593493326: // policyRule 3279 this.policyRule = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3280 return value; 3281 case -1484401125: // verification 3282 this.getVerification().add((ConsentVerificationComponent) value); // ConsentVerificationComponent 3283 return value; 3284 case -547120939: // provision 3285 this.provision = (ProvisionComponent) value; // ProvisionComponent 3286 return value; 3287 default: return super.setProperty(hash, name, value); 3288 } 3289 3290 } 3291 3292 @Override 3293 public Base setProperty(String name, Base value) throws FHIRException { 3294 if (name.equals("identifier")) { 3295 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 3296 } else if (name.equals("status")) { 3297 value = new ConsentStateEnumFactory().fromType(TypeConvertor.castToCode(value)); 3298 this.status = (Enumeration) value; // Enumeration<ConsentState> 3299 } else if (name.equals("scope")) { 3300 this.scope = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3301 } else if (name.equals("category")) { 3302 this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); 3303 } else if (name.equals("patient")) { 3304 this.patient = TypeConvertor.castToReference(value); // Reference 3305 } else if (name.equals("dateTime")) { 3306 this.dateTime = TypeConvertor.castToDateTime(value); // DateTimeType 3307 } else if (name.equals("performer")) { 3308 this.getPerformer().add(TypeConvertor.castToReference(value)); 3309 } else if (name.equals("organization")) { 3310 this.getOrganization().add(TypeConvertor.castToReference(value)); 3311 } else if (name.equals("sourceAttachment")) { 3312 this.getSourceAttachment().add(TypeConvertor.castToAttachment(value)); 3313 } else if (name.equals("sourceReference")) { 3314 this.getSourceReference().add(TypeConvertor.castToReference(value)); 3315 } else if (name.equals("policy")) { 3316 this.getPolicy().add((ConsentPolicyComponent) value); 3317 } else if (name.equals("policyRule")) { 3318 this.policyRule = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3319 } else if (name.equals("verification")) { 3320 this.getVerification().add((ConsentVerificationComponent) value); 3321 } else if (name.equals("provision")) { 3322 this.provision = (ProvisionComponent) value; // ProvisionComponent 3323 } else 3324 return super.setProperty(name, value); 3325 return value; 3326 } 3327 3328 @Override 3329 public Base makeProperty(int hash, String name) throws FHIRException { 3330 switch (hash) { 3331 case -1618432855: return addIdentifier(); 3332 case -892481550: return getStatusElement(); 3333 case 109264468: return getScope(); 3334 case 50511102: return addCategory(); 3335 case -791418107: return getPatient(); 3336 case 1792749467: return getDateTimeElement(); 3337 case 481140686: return addPerformer(); 3338 case 1178922291: return addOrganization(); 3339 case 1964406686: return addSourceAttachment(); 3340 case -244259472: return addSourceReference(); 3341 case -982670030: return addPolicy(); 3342 case 1593493326: return getPolicyRule(); 3343 case -1484401125: return addVerification(); 3344 case -547120939: return getProvision(); 3345 default: return super.makeProperty(hash, name); 3346 } 3347 3348 } 3349 3350 @Override 3351 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3352 switch (hash) { 3353 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 3354 case -892481550: /*status*/ return new String[] {"code"}; 3355 case 109264468: /*scope*/ return new String[] {"CodeableConcept"}; 3356 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 3357 case -791418107: /*patient*/ return new String[] {"Reference"}; 3358 case 1792749467: /*dateTime*/ return new String[] {"dateTime"}; 3359 case 481140686: /*performer*/ return new String[] {"Reference"}; 3360 case 1178922291: /*organization*/ return new String[] {"Reference"}; 3361 case 1964406686: /*sourceAttachment*/ return new String[] {"Attachment"}; 3362 case -244259472: /*sourceReference*/ return new String[] {"Reference"}; 3363 case -982670030: /*policy*/ return new String[] {}; 3364 case 1593493326: /*policyRule*/ return new String[] {"CodeableConcept"}; 3365 case -1484401125: /*verification*/ return new String[] {}; 3366 case -547120939: /*provision*/ return new String[] {}; 3367 default: return super.getTypesForProperty(hash, name); 3368 } 3369 3370 } 3371 3372 @Override 3373 public Base addChild(String name) throws FHIRException { 3374 if (name.equals("identifier")) { 3375 return addIdentifier(); 3376 } 3377 else if (name.equals("status")) { 3378 throw new FHIRException("Cannot call addChild on a primitive type Consent.status"); 3379 } 3380 else if (name.equals("scope")) { 3381 this.scope = new CodeableConcept(); 3382 return this.scope; 3383 } 3384 else if (name.equals("category")) { 3385 return addCategory(); 3386 } 3387 else if (name.equals("patient")) { 3388 this.patient = new Reference(); 3389 return this.patient; 3390 } 3391 else if (name.equals("dateTime")) { 3392 throw new FHIRException("Cannot call addChild on a primitive type Consent.dateTime"); 3393 } 3394 else if (name.equals("performer")) { 3395 return addPerformer(); 3396 } 3397 else if (name.equals("organization")) { 3398 return addOrganization(); 3399 } 3400 else if (name.equals("sourceAttachment")) { 3401 return addSourceAttachment(); 3402 } 3403 else if (name.equals("sourceReference")) { 3404 return addSourceReference(); 3405 } 3406 else if (name.equals("policy")) { 3407 return addPolicy(); 3408 } 3409 else if (name.equals("policyRule")) { 3410 this.policyRule = new CodeableConcept(); 3411 return this.policyRule; 3412 } 3413 else if (name.equals("verification")) { 3414 return addVerification(); 3415 } 3416 else if (name.equals("provision")) { 3417 this.provision = new ProvisionComponent(); 3418 return this.provision; 3419 } 3420 else 3421 return super.addChild(name); 3422 } 3423 3424 public String fhirType() { 3425 return "Consent"; 3426 3427 } 3428 3429 public Consent copy() { 3430 Consent dst = new Consent(); 3431 copyValues(dst); 3432 return dst; 3433 } 3434 3435 public void copyValues(Consent dst) { 3436 super.copyValues(dst); 3437 if (identifier != null) { 3438 dst.identifier = new ArrayList<Identifier>(); 3439 for (Identifier i : identifier) 3440 dst.identifier.add(i.copy()); 3441 }; 3442 dst.status = status == null ? null : status.copy(); 3443 dst.scope = scope == null ? null : scope.copy(); 3444 if (category != null) { 3445 dst.category = new ArrayList<CodeableConcept>(); 3446 for (CodeableConcept i : category) 3447 dst.category.add(i.copy()); 3448 }; 3449 dst.patient = patient == null ? null : patient.copy(); 3450 dst.dateTime = dateTime == null ? null : dateTime.copy(); 3451 if (performer != null) { 3452 dst.performer = new ArrayList<Reference>(); 3453 for (Reference i : performer) 3454 dst.performer.add(i.copy()); 3455 }; 3456 if (organization != null) { 3457 dst.organization = new ArrayList<Reference>(); 3458 for (Reference i : organization) 3459 dst.organization.add(i.copy()); 3460 }; 3461 if (sourceAttachment != null) { 3462 dst.sourceAttachment = new ArrayList<Attachment>(); 3463 for (Attachment i : sourceAttachment) 3464 dst.sourceAttachment.add(i.copy()); 3465 }; 3466 if (sourceReference != null) { 3467 dst.sourceReference = new ArrayList<Reference>(); 3468 for (Reference i : sourceReference) 3469 dst.sourceReference.add(i.copy()); 3470 }; 3471 if (policy != null) { 3472 dst.policy = new ArrayList<ConsentPolicyComponent>(); 3473 for (ConsentPolicyComponent i : policy) 3474 dst.policy.add(i.copy()); 3475 }; 3476 dst.policyRule = policyRule == null ? null : policyRule.copy(); 3477 if (verification != null) { 3478 dst.verification = new ArrayList<ConsentVerificationComponent>(); 3479 for (ConsentVerificationComponent i : verification) 3480 dst.verification.add(i.copy()); 3481 }; 3482 dst.provision = provision == null ? null : provision.copy(); 3483 } 3484 3485 protected Consent typedCopy() { 3486 return copy(); 3487 } 3488 3489 @Override 3490 public boolean equalsDeep(Base other_) { 3491 if (!super.equalsDeep(other_)) 3492 return false; 3493 if (!(other_ instanceof Consent)) 3494 return false; 3495 Consent o = (Consent) other_; 3496 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(scope, o.scope, true) 3497 && compareDeep(category, o.category, true) && compareDeep(patient, o.patient, true) && compareDeep(dateTime, o.dateTime, true) 3498 && compareDeep(performer, o.performer, true) && compareDeep(organization, o.organization, true) 3499 && compareDeep(sourceAttachment, o.sourceAttachment, true) && compareDeep(sourceReference, o.sourceReference, true) 3500 && compareDeep(policy, o.policy, true) && compareDeep(policyRule, o.policyRule, true) && compareDeep(verification, o.verification, true) 3501 && compareDeep(provision, o.provision, true); 3502 } 3503 3504 @Override 3505 public boolean equalsShallow(Base other_) { 3506 if (!super.equalsShallow(other_)) 3507 return false; 3508 if (!(other_ instanceof Consent)) 3509 return false; 3510 Consent o = (Consent) other_; 3511 return compareValues(status, o.status, true) && compareValues(dateTime, o.dateTime, true); 3512 } 3513 3514 public boolean isEmpty() { 3515 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, scope 3516 , category, patient, dateTime, performer, organization, sourceAttachment, sourceReference 3517 , policy, policyRule, verification, provision); 3518 } 3519 3520 @Override 3521 public ResourceType getResourceType() { 3522 return ResourceType.Consent; 3523 } 3524 3525 /** 3526 * Search parameter: <b>action</b> 3527 * <p> 3528 * Description: <b>Actions controlled by this rule</b><br> 3529 * Type: <b>token</b><br> 3530 * Path: <b>Consent.provision.action</b><br> 3531 * </p> 3532 */ 3533 @SearchParamDefinition(name="action", path="Consent.provision.action", description="Actions controlled by this rule", type="token" ) 3534 public static final String SP_ACTION = "action"; 3535 /** 3536 * <b>Fluent Client</b> search parameter constant for <b>action</b> 3537 * <p> 3538 * Description: <b>Actions controlled by this rule</b><br> 3539 * Type: <b>token</b><br> 3540 * Path: <b>Consent.provision.action</b><br> 3541 * </p> 3542 */ 3543 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACTION); 3544 3545 /** 3546 * Search parameter: <b>actor</b> 3547 * <p> 3548 * Description: <b>Resource for the actor (or group, by role)</b><br> 3549 * Type: <b>reference</b><br> 3550 * Path: <b>Consent.provision.actor.reference</b><br> 3551 * </p> 3552 */ 3553 @SearchParamDefinition(name="actor", path="Consent.provision.actor.reference", description="Resource for the actor (or group, by role)", type="reference", target={CareTeam.class, Device.class, Group.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) 3554 public static final String SP_ACTOR = "actor"; 3555 /** 3556 * <b>Fluent Client</b> search parameter constant for <b>actor</b> 3557 * <p> 3558 * Description: <b>Resource for the actor (or group, by role)</b><br> 3559 * Type: <b>reference</b><br> 3560 * Path: <b>Consent.provision.actor.reference</b><br> 3561 * </p> 3562 */ 3563 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ACTOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ACTOR); 3564 3565/** 3566 * Constant for fluent queries to be used to add include statements. Specifies 3567 * the path value of "<b>Consent:actor</b>". 3568 */ 3569 public static final ca.uhn.fhir.model.api.Include INCLUDE_ACTOR = new ca.uhn.fhir.model.api.Include("Consent:actor").toLocked(); 3570 3571 /** 3572 * Search parameter: <b>category</b> 3573 * <p> 3574 * Description: <b>Classification of the consent statement - for indexing/retrieval</b><br> 3575 * Type: <b>token</b><br> 3576 * Path: <b>Consent.category</b><br> 3577 * </p> 3578 */ 3579 @SearchParamDefinition(name="category", path="Consent.category", description="Classification of the consent statement - for indexing/retrieval", type="token" ) 3580 public static final String SP_CATEGORY = "category"; 3581 /** 3582 * <b>Fluent Client</b> search parameter constant for <b>category</b> 3583 * <p> 3584 * Description: <b>Classification of the consent statement - for indexing/retrieval</b><br> 3585 * Type: <b>token</b><br> 3586 * Path: <b>Consent.category</b><br> 3587 * </p> 3588 */ 3589 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY); 3590 3591 /** 3592 * Search parameter: <b>consentor</b> 3593 * <p> 3594 * Description: <b>Who is agreeing to the policy and rules</b><br> 3595 * Type: <b>reference</b><br> 3596 * Path: <b>Consent.performer</b><br> 3597 * </p> 3598 */ 3599 @SearchParamDefinition(name="consentor", path="Consent.performer", description="Who is agreeing to the policy and rules", type="reference", target={CareTeam.class, HealthcareService.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) 3600 public static final String SP_CONSENTOR = "consentor"; 3601 /** 3602 * <b>Fluent Client</b> search parameter constant for <b>consentor</b> 3603 * <p> 3604 * Description: <b>Who is agreeing to the policy and rules</b><br> 3605 * Type: <b>reference</b><br> 3606 * Path: <b>Consent.performer</b><br> 3607 * </p> 3608 */ 3609 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONSENTOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CONSENTOR); 3610 3611/** 3612 * Constant for fluent queries to be used to add include statements. Specifies 3613 * the path value of "<b>Consent:consentor</b>". 3614 */ 3615 public static final ca.uhn.fhir.model.api.Include INCLUDE_CONSENTOR = new ca.uhn.fhir.model.api.Include("Consent:consentor").toLocked(); 3616 3617 /** 3618 * Search parameter: <b>data</b> 3619 * <p> 3620 * Description: <b>The actual data reference</b><br> 3621 * Type: <b>reference</b><br> 3622 * Path: <b>Consent.provision.data.reference</b><br> 3623 * </p> 3624 */ 3625 @SearchParamDefinition(name="data", path="Consent.provision.data.reference", description="The actual data reference", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CapabilityStatement2.class, CarePlan.class, CareTeam.class, CatalogEntry.class, ChargeItem.class, ChargeItemDefinition.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseIssue.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceMetric.class, DeviceRequest.class, DeviceUseStatement.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationUsage.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, Topic.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } ) 3626 public static final String SP_DATA = "data"; 3627 /** 3628 * <b>Fluent Client</b> search parameter constant for <b>data</b> 3629 * <p> 3630 * Description: <b>The actual data reference</b><br> 3631 * Type: <b>reference</b><br> 3632 * Path: <b>Consent.provision.data.reference</b><br> 3633 * </p> 3634 */ 3635 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DATA = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DATA); 3636 3637/** 3638 * Constant for fluent queries to be used to add include statements. Specifies 3639 * the path value of "<b>Consent:data</b>". 3640 */ 3641 public static final ca.uhn.fhir.model.api.Include INCLUDE_DATA = new ca.uhn.fhir.model.api.Include("Consent:data").toLocked(); 3642 3643 /** 3644 * Search parameter: <b>organization</b> 3645 * <p> 3646 * Description: <b>Custodian of the consent</b><br> 3647 * Type: <b>reference</b><br> 3648 * Path: <b>Consent.organization</b><br> 3649 * </p> 3650 */ 3651 @SearchParamDefinition(name="organization", path="Consent.organization", description="Custodian of the consent", type="reference", target={Organization.class } ) 3652 public static final String SP_ORGANIZATION = "organization"; 3653 /** 3654 * <b>Fluent Client</b> search parameter constant for <b>organization</b> 3655 * <p> 3656 * Description: <b>Custodian of the consent</b><br> 3657 * Type: <b>reference</b><br> 3658 * Path: <b>Consent.organization</b><br> 3659 * </p> 3660 */ 3661 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); 3662 3663/** 3664 * Constant for fluent queries to be used to add include statements. Specifies 3665 * the path value of "<b>Consent:organization</b>". 3666 */ 3667 public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("Consent:organization").toLocked(); 3668 3669 /** 3670 * Search parameter: <b>period</b> 3671 * <p> 3672 * Description: <b>Timeframe for this rule</b><br> 3673 * Type: <b>date</b><br> 3674 * Path: <b>Consent.provision.period</b><br> 3675 * </p> 3676 */ 3677 @SearchParamDefinition(name="period", path="Consent.provision.period", description="Timeframe for this rule", type="date" ) 3678 public static final String SP_PERIOD = "period"; 3679 /** 3680 * <b>Fluent Client</b> search parameter constant for <b>period</b> 3681 * <p> 3682 * Description: <b>Timeframe for this rule</b><br> 3683 * Type: <b>date</b><br> 3684 * Path: <b>Consent.provision.period</b><br> 3685 * </p> 3686 */ 3687 public static final ca.uhn.fhir.rest.gclient.DateClientParam PERIOD = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_PERIOD); 3688 3689 /** 3690 * Search parameter: <b>policy-uri</b> 3691 * <p> 3692 * Description: <b>Search for Consents aligned with a specific policy or policy date/version. URIs should be complete with date/version and not assume the Resource will maintain versioning information</b><br> 3693 * Type: <b>uri</b><br> 3694 * Path: <b>Consent.policy.uri</b><br> 3695 * </p> 3696 */ 3697 @SearchParamDefinition(name="policy-uri", path="Consent.policy.uri", description="Search for Consents aligned with a specific policy or policy date/version. URIs should be complete with date/version and not assume the Resource will maintain versioning information", type="uri" ) 3698 public static final String SP_POLICY_URI = "policy-uri"; 3699 /** 3700 * <b>Fluent Client</b> search parameter constant for <b>policy-uri</b> 3701 * <p> 3702 * Description: <b>Search for Consents aligned with a specific policy or policy date/version. URIs should be complete with date/version and not assume the Resource will maintain versioning information</b><br> 3703 * Type: <b>uri</b><br> 3704 * Path: <b>Consent.policy.uri</b><br> 3705 * </p> 3706 */ 3707 public static final ca.uhn.fhir.rest.gclient.UriClientParam POLICY_URI = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_POLICY_URI); 3708 3709 /** 3710 * Search parameter: <b>purpose</b> 3711 * <p> 3712 * Description: <b>Context of activities covered by this rule</b><br> 3713 * Type: <b>token</b><br> 3714 * Path: <b>Consent.provision.purpose</b><br> 3715 * </p> 3716 */ 3717 @SearchParamDefinition(name="purpose", path="Consent.provision.purpose", description="Context of activities covered by this rule", type="token" ) 3718 public static final String SP_PURPOSE = "purpose"; 3719 /** 3720 * <b>Fluent Client</b> search parameter constant for <b>purpose</b> 3721 * <p> 3722 * Description: <b>Context of activities covered by this rule</b><br> 3723 * Type: <b>token</b><br> 3724 * Path: <b>Consent.provision.purpose</b><br> 3725 * </p> 3726 */ 3727 public static final ca.uhn.fhir.rest.gclient.TokenClientParam PURPOSE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PURPOSE); 3728 3729 /** 3730 * Search parameter: <b>scope</b> 3731 * <p> 3732 * Description: <b>Which of the four areas this resource covers (extensible)</b><br> 3733 * Type: <b>token</b><br> 3734 * Path: <b>Consent.scope</b><br> 3735 * </p> 3736 */ 3737 @SearchParamDefinition(name="scope", path="Consent.scope", description="Which of the four areas this resource covers (extensible)", type="token" ) 3738 public static final String SP_SCOPE = "scope"; 3739 /** 3740 * <b>Fluent Client</b> search parameter constant for <b>scope</b> 3741 * <p> 3742 * Description: <b>Which of the four areas this resource covers (extensible)</b><br> 3743 * Type: <b>token</b><br> 3744 * Path: <b>Consent.scope</b><br> 3745 * </p> 3746 */ 3747 public static final ca.uhn.fhir.rest.gclient.TokenClientParam SCOPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SCOPE); 3748 3749 /** 3750 * Search parameter: <b>security-label</b> 3751 * <p> 3752 * Description: <b>Security Labels that define affected resources</b><br> 3753 * Type: <b>token</b><br> 3754 * Path: <b>Consent.provision.securityLabel</b><br> 3755 * </p> 3756 */ 3757 @SearchParamDefinition(name="security-label", path="Consent.provision.securityLabel", description="Security Labels that define affected resources", type="token" ) 3758 public static final String SP_SECURITY_LABEL = "security-label"; 3759 /** 3760 * <b>Fluent Client</b> search parameter constant for <b>security-label</b> 3761 * <p> 3762 * Description: <b>Security Labels that define affected resources</b><br> 3763 * Type: <b>token</b><br> 3764 * Path: <b>Consent.provision.securityLabel</b><br> 3765 * </p> 3766 */ 3767 public static final ca.uhn.fhir.rest.gclient.TokenClientParam SECURITY_LABEL = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SECURITY_LABEL); 3768 3769 /** 3770 * Search parameter: <b>source-reference</b> 3771 * <p> 3772 * Description: <b>Search by reference to a Consent, DocumentReference, Contract or QuestionnaireResponse</b><br> 3773 * Type: <b>reference</b><br> 3774 * Path: <b>Consent.sourceReference</b><br> 3775 * </p> 3776 */ 3777 @SearchParamDefinition(name="source-reference", path="Consent.sourceReference", description="Search by reference to a Consent, DocumentReference, Contract or QuestionnaireResponse", type="reference", target={Consent.class, Contract.class, DocumentReference.class, QuestionnaireResponse.class } ) 3778 public static final String SP_SOURCE_REFERENCE = "source-reference"; 3779 /** 3780 * <b>Fluent Client</b> search parameter constant for <b>source-reference</b> 3781 * <p> 3782 * Description: <b>Search by reference to a Consent, DocumentReference, Contract or QuestionnaireResponse</b><br> 3783 * Type: <b>reference</b><br> 3784 * Path: <b>Consent.sourceReference</b><br> 3785 * </p> 3786 */ 3787 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SOURCE_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SOURCE_REFERENCE); 3788 3789/** 3790 * Constant for fluent queries to be used to add include statements. Specifies 3791 * the path value of "<b>Consent:source-reference</b>". 3792 */ 3793 public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCE_REFERENCE = new ca.uhn.fhir.model.api.Include("Consent:source-reference").toLocked(); 3794 3795 /** 3796 * Search parameter: <b>status</b> 3797 * <p> 3798 * Description: <b>draft | active | inactive | entered-in-error | unknown</b><br> 3799 * Type: <b>token</b><br> 3800 * Path: <b>Consent.status</b><br> 3801 * </p> 3802 */ 3803 @SearchParamDefinition(name="status", path="Consent.status", description="draft | active | inactive | entered-in-error | unknown", type="token" ) 3804 public static final String SP_STATUS = "status"; 3805 /** 3806 * <b>Fluent Client</b> search parameter constant for <b>status</b> 3807 * <p> 3808 * Description: <b>draft | active | inactive | entered-in-error | unknown</b><br> 3809 * Type: <b>token</b><br> 3810 * Path: <b>Consent.status</b><br> 3811 * </p> 3812 */ 3813 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 3814 3815 /** 3816 * Search parameter: <b>verified-date</b> 3817 * <p> 3818 * Description: <b>When consent verified</b><br> 3819 * Type: <b>date</b><br> 3820 * Path: <b>Consent.verification.verificationDate</b><br> 3821 * </p> 3822 */ 3823 @SearchParamDefinition(name="verified-date", path="Consent.verification.verificationDate", description="When consent verified", type="date" ) 3824 public static final String SP_VERIFIED_DATE = "verified-date"; 3825 /** 3826 * <b>Fluent Client</b> search parameter constant for <b>verified-date</b> 3827 * <p> 3828 * Description: <b>When consent verified</b><br> 3829 * Type: <b>date</b><br> 3830 * Path: <b>Consent.verification.verificationDate</b><br> 3831 * </p> 3832 */ 3833 public static final ca.uhn.fhir.rest.gclient.DateClientParam VERIFIED_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_VERIFIED_DATE); 3834 3835 /** 3836 * Search parameter: <b>verified</b> 3837 * <p> 3838 * Description: <b>Has been verified</b><br> 3839 * Type: <b>token</b><br> 3840 * Path: <b>Consent.verification.verified</b><br> 3841 * </p> 3842 */ 3843 @SearchParamDefinition(name="verified", path="Consent.verification.verified", description="Has been verified", type="token" ) 3844 public static final String SP_VERIFIED = "verified"; 3845 /** 3846 * <b>Fluent Client</b> search parameter constant for <b>verified</b> 3847 * <p> 3848 * Description: <b>Has been verified</b><br> 3849 * Type: <b>token</b><br> 3850 * Path: <b>Consent.verification.verified</b><br> 3851 * </p> 3852 */ 3853 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERIFIED = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERIFIED); 3854 3855 /** 3856 * Search parameter: <b>date</b> 3857 * <p> 3858 * Description: <b>Multiple Resources: 3859 3860* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded 3861* [CarePlan](careplan.html): Time period plan covers 3862* [CareTeam](careteam.html): A date within the coverage time period. 3863* [ClinicalImpression](clinicalimpression.html): When the assessment was documented 3864* [Composition](composition.html): Composition editing time 3865* [Consent](consent.html): When consent was agreed to 3866* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report 3867* [Encounter](encounter.html): A date within the period the Encounter lasted 3868* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period 3869* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated 3870* [Flag](flag.html): Time period when flag is active 3871* [Immunization](immunization.html): Vaccination (non)-Administration Date 3872* [List](list.html): When the list was prepared 3873* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period 3874* [Procedure](procedure.html): When the procedure occurred or is occurring 3875* [RiskAssessment](riskassessment.html): When was assessment made? 3876* [SupplyRequest](supplyrequest.html): When the request was made 3877</b><br> 3878 * Type: <b>date</b><br> 3879 * Path: <b>AllergyIntolerance.recordedDate | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.occurrence | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn</b><br> 3880 * </p> 3881 */ 3882 @SearchParamDefinition(name="date", path="AllergyIntolerance.recordedDate | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.occurrence | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): A date within the coverage time period.\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When consent was agreed to\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [Encounter](encounter.html): A date within the period the Encounter lasted\r\n* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period\r\n* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated\r\n* [Flag](flag.html): Time period when flag is active\r\n* [Immunization](immunization.html): Vaccination (non)-Administration Date\r\n* [List](list.html): When the list was prepared\r\n* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period\r\n* [Procedure](procedure.html): When the procedure occurred or is occurring\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", type="date" ) 3883 public static final String SP_DATE = "date"; 3884 /** 3885 * <b>Fluent Client</b> search parameter constant for <b>date</b> 3886 * <p> 3887 * Description: <b>Multiple Resources: 3888 3889* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded 3890* [CarePlan](careplan.html): Time period plan covers 3891* [CareTeam](careteam.html): A date within the coverage time period. 3892* [ClinicalImpression](clinicalimpression.html): When the assessment was documented 3893* [Composition](composition.html): Composition editing time 3894* [Consent](consent.html): When consent was agreed to 3895* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report 3896* [Encounter](encounter.html): A date within the period the Encounter lasted 3897* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period 3898* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated 3899* [Flag](flag.html): Time period when flag is active 3900* [Immunization](immunization.html): Vaccination (non)-Administration Date 3901* [List](list.html): When the list was prepared 3902* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period 3903* [Procedure](procedure.html): When the procedure occurred or is occurring 3904* [RiskAssessment](riskassessment.html): When was assessment made? 3905* [SupplyRequest](supplyrequest.html): When the request was made 3906</b><br> 3907 * Type: <b>date</b><br> 3908 * Path: <b>AllergyIntolerance.recordedDate | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.occurrence | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn</b><br> 3909 * </p> 3910 */ 3911 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 3912 3913 /** 3914 * Search parameter: <b>identifier</b> 3915 * <p> 3916 * Description: <b>Multiple Resources: 3917 3918* [AllergyIntolerance](allergyintolerance.html): External ids for this item 3919* [CarePlan](careplan.html): External Ids for this plan 3920* [CareTeam](careteam.html): External Ids for this team 3921* [Composition](composition.html): Version-independent identifier for the Composition 3922* [Condition](condition.html): A unique identifier of the condition record 3923* [Consent](consent.html): Identifier for this record (external references) 3924* [DetectedIssue](detectedissue.html): Unique id for the detected issue 3925* [DeviceRequest](devicerequest.html): Business identifier for request/order 3926* [DiagnosticReport](diagnosticreport.html): An identifier for the report 3927* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents 3928* [DocumentReference](documentreference.html): Master Version Specific Identifier 3929* [Encounter](encounter.html): Identifier(s) by which this encounter is known 3930* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare 3931* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier 3932* [Goal](goal.html): External Ids for this goal 3933* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number 3934* [Immunization](immunization.html): Business identifier 3935* [List](list.html): Business identifier 3936* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier 3937* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier 3938* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier 3939* [MedicationUsage](medicationusage.html): Return statements with this external identifier 3940* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier 3941* [Observation](observation.html): The unique id for a particular observation 3942* [Procedure](procedure.html): A unique identifier for a procedure 3943* [RiskAssessment](riskassessment.html): Unique identifier for the assessment 3944* [ServiceRequest](servicerequest.html): Identifiers assigned to this order 3945* [SupplyDelivery](supplydelivery.html): External identifier 3946* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest 3947* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier 3948</b><br> 3949 * Type: <b>token</b><br> 3950 * Path: <b>AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier</b><br> 3951 * </p> 3952 */ 3953 @SearchParamDefinition(name="identifier", path="AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents\r\n* [DocumentReference](documentreference.html): Master Version Specific Identifier\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number\r\n* [Immunization](immunization.html): Business identifier\r\n* [List](list.html): Business identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationUsage](medicationusage.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" ) 3954 public static final String SP_IDENTIFIER = "identifier"; 3955 /** 3956 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 3957 * <p> 3958 * Description: <b>Multiple Resources: 3959 3960* [AllergyIntolerance](allergyintolerance.html): External ids for this item 3961* [CarePlan](careplan.html): External Ids for this plan 3962* [CareTeam](careteam.html): External Ids for this team 3963* [Composition](composition.html): Version-independent identifier for the Composition 3964* [Condition](condition.html): A unique identifier of the condition record 3965* [Consent](consent.html): Identifier for this record (external references) 3966* [DetectedIssue](detectedissue.html): Unique id for the detected issue 3967* [DeviceRequest](devicerequest.html): Business identifier for request/order 3968* [DiagnosticReport](diagnosticreport.html): An identifier for the report 3969* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents 3970* [DocumentReference](documentreference.html): Master Version Specific Identifier 3971* [Encounter](encounter.html): Identifier(s) by which this encounter is known 3972* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare 3973* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier 3974* [Goal](goal.html): External Ids for this goal 3975* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number 3976* [Immunization](immunization.html): Business identifier 3977* [List](list.html): Business identifier 3978* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier 3979* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier 3980* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier 3981* [MedicationUsage](medicationusage.html): Return statements with this external identifier 3982* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier 3983* [Observation](observation.html): The unique id for a particular observation 3984* [Procedure](procedure.html): A unique identifier for a procedure 3985* [RiskAssessment](riskassessment.html): Unique identifier for the assessment 3986* [ServiceRequest](servicerequest.html): Identifiers assigned to this order 3987* [SupplyDelivery](supplydelivery.html): External identifier 3988* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest 3989* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier 3990</b><br> 3991 * Type: <b>token</b><br> 3992 * Path: <b>AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier</b><br> 3993 * </p> 3994 */ 3995 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 3996 3997 /** 3998 * Search parameter: <b>patient</b> 3999 * <p> 4000 * Description: <b>Multiple Resources: 4001 4002* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for 4003* [CarePlan](careplan.html): Who the care plan is for 4004* [CareTeam](careteam.html): Who care team is for 4005* [ClinicalImpression](clinicalimpression.html): Patient or group assessed 4006* [Composition](composition.html): Who and/or what the composition is about 4007* [Condition](condition.html): Who has the condition? 4008* [Consent](consent.html): Who the consent applies to 4009* [DetectedIssue](detectedissue.html): Associated patient 4010* [DeviceRequest](devicerequest.html): Individual the service is ordered for 4011* [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient 4012* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient 4013* [DocumentManifest](documentmanifest.html): The subject of the set of documents 4014* [DocumentReference](documentreference.html): Who/what is the subject of the document 4015* [Encounter](encounter.html): The patient or group present at the encounter 4016* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care 4017* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for 4018* [Flag](flag.html): The identity of a subject to list flags for 4019* [Goal](goal.html): Who this goal is intended for 4020* [ImagingStudy](imagingstudy.html): Who the study is about 4021* [Immunization](immunization.html): The patient for the vaccination record 4022* [List](list.html): If all resources have the same subject 4023* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for 4024* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for 4025* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient 4026* [MedicationUsage](medicationusage.html): Returns statements for a specific patient. 4027* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement 4028* [Observation](observation.html): The subject that the observation is about (if patient) 4029* [Procedure](procedure.html): Search by subject - a patient 4030* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? 4031* [ServiceRequest](servicerequest.html): Search by subject - a patient 4032* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied 4033* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for 4034</b><br> 4035 * Type: <b>reference</b><br> 4036 * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient</b><br> 4037 * </p> 4038 */ 4039 @SearchParamDefinition(name="patient", path="AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ClinicalImpression](clinicalimpression.html): Patient or group assessed\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentManifest](documentmanifest.html): The subject of the set of documents\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient or group present at the encounter\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [List](list.html): If all resources have the same subject\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationUsage](medicationusage.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Group.class, Patient.class } ) 4040 public static final String SP_PATIENT = "patient"; 4041 /** 4042 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 4043 * <p> 4044 * Description: <b>Multiple Resources: 4045 4046* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for 4047* [CarePlan](careplan.html): Who the care plan is for 4048* [CareTeam](careteam.html): Who care team is for 4049* [ClinicalImpression](clinicalimpression.html): Patient or group assessed 4050* [Composition](composition.html): Who and/or what the composition is about 4051* [Condition](condition.html): Who has the condition? 4052* [Consent](consent.html): Who the consent applies to 4053* [DetectedIssue](detectedissue.html): Associated patient 4054* [DeviceRequest](devicerequest.html): Individual the service is ordered for 4055* [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient 4056* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient 4057* [DocumentManifest](documentmanifest.html): The subject of the set of documents 4058* [DocumentReference](documentreference.html): Who/what is the subject of the document 4059* [Encounter](encounter.html): The patient or group present at the encounter 4060* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care 4061* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for 4062* [Flag](flag.html): The identity of a subject to list flags for 4063* [Goal](goal.html): Who this goal is intended for 4064* [ImagingStudy](imagingstudy.html): Who the study is about 4065* [Immunization](immunization.html): The patient for the vaccination record 4066* [List](list.html): If all resources have the same subject 4067* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for 4068* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for 4069* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient 4070* [MedicationUsage](medicationusage.html): Returns statements for a specific patient. 4071* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement 4072* [Observation](observation.html): The subject that the observation is about (if patient) 4073* [Procedure](procedure.html): Search by subject - a patient 4074* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? 4075* [ServiceRequest](servicerequest.html): Search by subject - a patient 4076* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied 4077* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for 4078</b><br> 4079 * Type: <b>reference</b><br> 4080 * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient</b><br> 4081 * </p> 4082 */ 4083 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 4084 4085/** 4086 * Constant for fluent queries to be used to add include statements. Specifies 4087 * the path value of "<b>Consent:patient</b>". 4088 */ 4089 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Consent:patient").toLocked(); 4090 4091 4092} 4093