001package org.hl7.fhir.r4.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0 033 034import java.util.*; 035 036import org.hl7.fhir.utilities.Utilities; 037import org.hl7.fhir.r4.model.Enumerations.*; 038import ca.uhn.fhir.model.api.annotation.ResourceDef; 039import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 040import ca.uhn.fhir.model.api.annotation.Child; 041import ca.uhn.fhir.model.api.annotation.ChildOrder; 042import ca.uhn.fhir.model.api.annotation.Description; 043import ca.uhn.fhir.model.api.annotation.Block; 044import org.hl7.fhir.instance.model.api.*; 045import org.hl7.fhir.exceptions.FHIRException; 046/** 047 * A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage. 048 */ 049@ResourceDef(name="AuditEvent", profile="http://hl7.org/fhir/Profile/AuditEvent") 050public class AuditEvent extends DomainResource { 051 052 public enum AuditEventAction { 053 /** 054 * Create a new database object, such as placing an order. 055 */ 056 C, 057 /** 058 * Display or print data, such as a doctor census. 059 */ 060 R, 061 /** 062 * Update data, such as revise patient information. 063 */ 064 U, 065 /** 066 * Delete items, such as a doctor master file record. 067 */ 068 D, 069 /** 070 * Perform a system or application function such as log-on, program execution or use of an object's method, or perform a query/search operation. 071 */ 072 E, 073 /** 074 * added to help the parsers with the generic types 075 */ 076 NULL; 077 public static AuditEventAction fromCode(String codeString) throws FHIRException { 078 if (codeString == null || "".equals(codeString)) 079 return null; 080 if ("C".equals(codeString)) 081 return C; 082 if ("R".equals(codeString)) 083 return R; 084 if ("U".equals(codeString)) 085 return U; 086 if ("D".equals(codeString)) 087 return D; 088 if ("E".equals(codeString)) 089 return E; 090 if (Configuration.isAcceptInvalidEnums()) 091 return null; 092 else 093 throw new FHIRException("Unknown AuditEventAction code '"+codeString+"'"); 094 } 095 public String toCode() { 096 switch (this) { 097 case C: return "C"; 098 case R: return "R"; 099 case U: return "U"; 100 case D: return "D"; 101 case E: return "E"; 102 default: return "?"; 103 } 104 } 105 public String getSystem() { 106 switch (this) { 107 case C: return "http://hl7.org/fhir/audit-event-action"; 108 case R: return "http://hl7.org/fhir/audit-event-action"; 109 case U: return "http://hl7.org/fhir/audit-event-action"; 110 case D: return "http://hl7.org/fhir/audit-event-action"; 111 case E: return "http://hl7.org/fhir/audit-event-action"; 112 default: return "?"; 113 } 114 } 115 public String getDefinition() { 116 switch (this) { 117 case C: return "Create a new database object, such as placing an order."; 118 case R: return "Display or print data, such as a doctor census."; 119 case U: return "Update data, such as revise patient information."; 120 case D: return "Delete items, such as a doctor master file record."; 121 case E: return "Perform a system or application function such as log-on, program execution or use of an object's method, or perform a query/search operation."; 122 default: return "?"; 123 } 124 } 125 public String getDisplay() { 126 switch (this) { 127 case C: return "Create"; 128 case R: return "Read/View/Print"; 129 case U: return "Update"; 130 case D: return "Delete"; 131 case E: return "Execute"; 132 default: return "?"; 133 } 134 } 135 } 136 137 public static class AuditEventActionEnumFactory implements EnumFactory<AuditEventAction> { 138 public AuditEventAction fromCode(String codeString) throws IllegalArgumentException { 139 if (codeString == null || "".equals(codeString)) 140 if (codeString == null || "".equals(codeString)) 141 return null; 142 if ("C".equals(codeString)) 143 return AuditEventAction.C; 144 if ("R".equals(codeString)) 145 return AuditEventAction.R; 146 if ("U".equals(codeString)) 147 return AuditEventAction.U; 148 if ("D".equals(codeString)) 149 return AuditEventAction.D; 150 if ("E".equals(codeString)) 151 return AuditEventAction.E; 152 throw new IllegalArgumentException("Unknown AuditEventAction code '"+codeString+"'"); 153 } 154 public Enumeration<AuditEventAction> fromType(Base code) throws FHIRException { 155 if (code == null) 156 return null; 157 if (code.isEmpty()) 158 return new Enumeration<AuditEventAction>(this); 159 String codeString = ((PrimitiveType) code).asStringValue(); 160 if (codeString == null || "".equals(codeString)) 161 return null; 162 if ("C".equals(codeString)) 163 return new Enumeration<AuditEventAction>(this, AuditEventAction.C); 164 if ("R".equals(codeString)) 165 return new Enumeration<AuditEventAction>(this, AuditEventAction.R); 166 if ("U".equals(codeString)) 167 return new Enumeration<AuditEventAction>(this, AuditEventAction.U); 168 if ("D".equals(codeString)) 169 return new Enumeration<AuditEventAction>(this, AuditEventAction.D); 170 if ("E".equals(codeString)) 171 return new Enumeration<AuditEventAction>(this, AuditEventAction.E); 172 throw new FHIRException("Unknown AuditEventAction code '"+codeString+"'"); 173 } 174 public String toCode(AuditEventAction code) { 175 if (code == AuditEventAction.C) 176 return "C"; 177 if (code == AuditEventAction.R) 178 return "R"; 179 if (code == AuditEventAction.U) 180 return "U"; 181 if (code == AuditEventAction.D) 182 return "D"; 183 if (code == AuditEventAction.E) 184 return "E"; 185 return "?"; 186 } 187 public String toSystem(AuditEventAction code) { 188 return code.getSystem(); 189 } 190 } 191 192 public enum AuditEventOutcome { 193 /** 194 * The operation completed successfully (whether with warnings or not). 195 */ 196 _0, 197 /** 198 * The action was not successful due to some kind of minor failure (often equivalent to an HTTP 400 response). 199 */ 200 _4, 201 /** 202 * The action was not successful due to some kind of unexpected error (often equivalent to an HTTP 500 response). 203 */ 204 _8, 205 /** 206 * An error of such magnitude occurred that the system is no longer available for use (i.e. the system died). 207 */ 208 _12, 209 /** 210 * added to help the parsers with the generic types 211 */ 212 NULL; 213 public static AuditEventOutcome fromCode(String codeString) throws FHIRException { 214 if (codeString == null || "".equals(codeString)) 215 return null; 216 if ("0".equals(codeString)) 217 return _0; 218 if ("4".equals(codeString)) 219 return _4; 220 if ("8".equals(codeString)) 221 return _8; 222 if ("12".equals(codeString)) 223 return _12; 224 if (Configuration.isAcceptInvalidEnums()) 225 return null; 226 else 227 throw new FHIRException("Unknown AuditEventOutcome code '"+codeString+"'"); 228 } 229 public String toCode() { 230 switch (this) { 231 case _0: return "0"; 232 case _4: return "4"; 233 case _8: return "8"; 234 case _12: return "12"; 235 default: return "?"; 236 } 237 } 238 public String getSystem() { 239 switch (this) { 240 case _0: return "http://hl7.org/fhir/audit-event-outcome"; 241 case _4: return "http://hl7.org/fhir/audit-event-outcome"; 242 case _8: return "http://hl7.org/fhir/audit-event-outcome"; 243 case _12: return "http://hl7.org/fhir/audit-event-outcome"; 244 default: return "?"; 245 } 246 } 247 public String getDefinition() { 248 switch (this) { 249 case _0: return "The operation completed successfully (whether with warnings or not)."; 250 case _4: return "The action was not successful due to some kind of minor failure (often equivalent to an HTTP 400 response)."; 251 case _8: return "The action was not successful due to some kind of unexpected error (often equivalent to an HTTP 500 response)."; 252 case _12: return "An error of such magnitude occurred that the system is no longer available for use (i.e. the system died)."; 253 default: return "?"; 254 } 255 } 256 public String getDisplay() { 257 switch (this) { 258 case _0: return "Success"; 259 case _4: return "Minor failure"; 260 case _8: return "Serious failure"; 261 case _12: return "Major failure"; 262 default: return "?"; 263 } 264 } 265 } 266 267 public static class AuditEventOutcomeEnumFactory implements EnumFactory<AuditEventOutcome> { 268 public AuditEventOutcome fromCode(String codeString) throws IllegalArgumentException { 269 if (codeString == null || "".equals(codeString)) 270 if (codeString == null || "".equals(codeString)) 271 return null; 272 if ("0".equals(codeString)) 273 return AuditEventOutcome._0; 274 if ("4".equals(codeString)) 275 return AuditEventOutcome._4; 276 if ("8".equals(codeString)) 277 return AuditEventOutcome._8; 278 if ("12".equals(codeString)) 279 return AuditEventOutcome._12; 280 throw new IllegalArgumentException("Unknown AuditEventOutcome code '"+codeString+"'"); 281 } 282 public Enumeration<AuditEventOutcome> fromType(Base code) throws FHIRException { 283 if (code == null) 284 return null; 285 if (code.isEmpty()) 286 return new Enumeration<AuditEventOutcome>(this); 287 String codeString = ((PrimitiveType) code).asStringValue(); 288 if (codeString == null || "".equals(codeString)) 289 return null; 290 if ("0".equals(codeString)) 291 return new Enumeration<AuditEventOutcome>(this, AuditEventOutcome._0); 292 if ("4".equals(codeString)) 293 return new Enumeration<AuditEventOutcome>(this, AuditEventOutcome._4); 294 if ("8".equals(codeString)) 295 return new Enumeration<AuditEventOutcome>(this, AuditEventOutcome._8); 296 if ("12".equals(codeString)) 297 return new Enumeration<AuditEventOutcome>(this, AuditEventOutcome._12); 298 throw new FHIRException("Unknown AuditEventOutcome code '"+codeString+"'"); 299 } 300 public String toCode(AuditEventOutcome code) { 301 if (code == AuditEventOutcome._0) 302 return "0"; 303 if (code == AuditEventOutcome._4) 304 return "4"; 305 if (code == AuditEventOutcome._8) 306 return "8"; 307 if (code == AuditEventOutcome._12) 308 return "12"; 309 return "?"; 310 } 311 public String toSystem(AuditEventOutcome code) { 312 return code.getSystem(); 313 } 314 } 315 316 public enum AuditEventAgentNetworkType { 317 /** 318 * The machine name, including DNS name. 319 */ 320 _1, 321 /** 322 * The assigned Internet Protocol (IP) address. 323 */ 324 _2, 325 /** 326 * The assigned telephone number. 327 */ 328 _3, 329 /** 330 * The assigned email address. 331 */ 332 _4, 333 /** 334 * URI (User directory, HTTP-PUT, ftp, etc.). 335 */ 336 _5, 337 /** 338 * added to help the parsers with the generic types 339 */ 340 NULL; 341 public static AuditEventAgentNetworkType fromCode(String codeString) throws FHIRException { 342 if (codeString == null || "".equals(codeString)) 343 return null; 344 if ("1".equals(codeString)) 345 return _1; 346 if ("2".equals(codeString)) 347 return _2; 348 if ("3".equals(codeString)) 349 return _3; 350 if ("4".equals(codeString)) 351 return _4; 352 if ("5".equals(codeString)) 353 return _5; 354 if (Configuration.isAcceptInvalidEnums()) 355 return null; 356 else 357 throw new FHIRException("Unknown AuditEventAgentNetworkType code '"+codeString+"'"); 358 } 359 public String toCode() { 360 switch (this) { 361 case _1: return "1"; 362 case _2: return "2"; 363 case _3: return "3"; 364 case _4: return "4"; 365 case _5: return "5"; 366 default: return "?"; 367 } 368 } 369 public String getSystem() { 370 switch (this) { 371 case _1: return "http://hl7.org/fhir/network-type"; 372 case _2: return "http://hl7.org/fhir/network-type"; 373 case _3: return "http://hl7.org/fhir/network-type"; 374 case _4: return "http://hl7.org/fhir/network-type"; 375 case _5: return "http://hl7.org/fhir/network-type"; 376 default: return "?"; 377 } 378 } 379 public String getDefinition() { 380 switch (this) { 381 case _1: return "The machine name, including DNS name."; 382 case _2: return "The assigned Internet Protocol (IP) address."; 383 case _3: return "The assigned telephone number."; 384 case _4: return "The assigned email address."; 385 case _5: return "URI (User directory, HTTP-PUT, ftp, etc.)."; 386 default: return "?"; 387 } 388 } 389 public String getDisplay() { 390 switch (this) { 391 case _1: return "Machine Name"; 392 case _2: return "IP Address"; 393 case _3: return "Telephone Number"; 394 case _4: return "Email address"; 395 case _5: return "URI"; 396 default: return "?"; 397 } 398 } 399 } 400 401 public static class AuditEventAgentNetworkTypeEnumFactory implements EnumFactory<AuditEventAgentNetworkType> { 402 public AuditEventAgentNetworkType fromCode(String codeString) throws IllegalArgumentException { 403 if (codeString == null || "".equals(codeString)) 404 if (codeString == null || "".equals(codeString)) 405 return null; 406 if ("1".equals(codeString)) 407 return AuditEventAgentNetworkType._1; 408 if ("2".equals(codeString)) 409 return AuditEventAgentNetworkType._2; 410 if ("3".equals(codeString)) 411 return AuditEventAgentNetworkType._3; 412 if ("4".equals(codeString)) 413 return AuditEventAgentNetworkType._4; 414 if ("5".equals(codeString)) 415 return AuditEventAgentNetworkType._5; 416 throw new IllegalArgumentException("Unknown AuditEventAgentNetworkType code '"+codeString+"'"); 417 } 418 public Enumeration<AuditEventAgentNetworkType> fromType(Base code) throws FHIRException { 419 if (code == null) 420 return null; 421 if (code.isEmpty()) 422 return new Enumeration<AuditEventAgentNetworkType>(this); 423 String codeString = ((PrimitiveType) code).asStringValue(); 424 if (codeString == null || "".equals(codeString)) 425 return null; 426 if ("1".equals(codeString)) 427 return new Enumeration<AuditEventAgentNetworkType>(this, AuditEventAgentNetworkType._1); 428 if ("2".equals(codeString)) 429 return new Enumeration<AuditEventAgentNetworkType>(this, AuditEventAgentNetworkType._2); 430 if ("3".equals(codeString)) 431 return new Enumeration<AuditEventAgentNetworkType>(this, AuditEventAgentNetworkType._3); 432 if ("4".equals(codeString)) 433 return new Enumeration<AuditEventAgentNetworkType>(this, AuditEventAgentNetworkType._4); 434 if ("5".equals(codeString)) 435 return new Enumeration<AuditEventAgentNetworkType>(this, AuditEventAgentNetworkType._5); 436 throw new FHIRException("Unknown AuditEventAgentNetworkType code '"+codeString+"'"); 437 } 438 public String toCode(AuditEventAgentNetworkType code) { 439 if (code == AuditEventAgentNetworkType._1) 440 return "1"; 441 if (code == AuditEventAgentNetworkType._2) 442 return "2"; 443 if (code == AuditEventAgentNetworkType._3) 444 return "3"; 445 if (code == AuditEventAgentNetworkType._4) 446 return "4"; 447 if (code == AuditEventAgentNetworkType._5) 448 return "5"; 449 return "?"; 450 } 451 public String toSystem(AuditEventAgentNetworkType code) { 452 return code.getSystem(); 453 } 454 } 455 456 @Block() 457 public static class AuditEventAgentComponent extends BackboneElement implements IBaseBackboneElement { 458 /** 459 * Specification of the participation type the user plays when performing the event. 460 */ 461 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 462 @Description(shortDefinition="How agent participated", formalDefinition="Specification of the participation type the user plays when performing the event." ) 463 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/participation-role-type") 464 protected CodeableConcept type; 465 466 /** 467 * The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context. 468 */ 469 @Child(name = "role", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 470 @Description(shortDefinition="Agent role in the event", formalDefinition="The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context." ) 471 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/security-role-type") 472 protected List<CodeableConcept> role; 473 474 /** 475 * Direct reference to a resource that identifies the agent. 476 */ 477 @Child(name = "reference", type = {PractitionerRole.class, Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=3, min=0, max=1, modifier=false, summary=true) 478 @Description(shortDefinition="Direct reference to resource", formalDefinition="Direct reference to a resource that identifies the agent." ) 479 protected Reference reference; 480 481 /** 482 * The actual object that is the target of the reference (Direct reference to a resource that identifies the agent.) 483 */ 484 protected Resource referenceTarget; 485 486 /** 487 * Unique identifier for the user actively participating in the event. 488 */ 489 @Child(name = "userId", type = {Identifier.class}, order=4, min=0, max=1, modifier=false, summary=true) 490 @Description(shortDefinition="Unique identifier for the user", formalDefinition="Unique identifier for the user actively participating in the event." ) 491 protected Identifier userId; 492 493 /** 494 * Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available. 495 */ 496 @Child(name = "altId", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) 497 @Description(shortDefinition="Alternative User id e.g. authentication", formalDefinition="Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available." ) 498 protected StringType altId; 499 500 /** 501 * Human-meaningful name for the agent. 502 */ 503 @Child(name = "name", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) 504 @Description(shortDefinition="Human-meaningful name for the agent", formalDefinition="Human-meaningful name for the agent." ) 505 protected StringType name; 506 507 /** 508 * Indicator that the user is or is not the requestor, or initiator, for the event being audited. 509 */ 510 @Child(name = "requestor", type = {BooleanType.class}, order=7, min=1, max=1, modifier=false, summary=true) 511 @Description(shortDefinition="Whether user is initiator", formalDefinition="Indicator that the user is or is not the requestor, or initiator, for the event being audited." ) 512 protected BooleanType requestor; 513 514 /** 515 * Where the event occurred. 516 */ 517 @Child(name = "location", type = {Location.class}, order=8, min=0, max=1, modifier=false, summary=false) 518 @Description(shortDefinition="Where", formalDefinition="Where the event occurred." ) 519 protected Reference location; 520 521 /** 522 * The actual object that is the target of the reference (Where the event occurred.) 523 */ 524 protected Location locationTarget; 525 526 /** 527 * The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used. 528 */ 529 @Child(name = "policy", type = {UriType.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 530 @Description(shortDefinition="Policy that authorized event", formalDefinition="The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used." ) 531 protected List<UriType> policy; 532 533 /** 534 * Type of media involved. Used when the event is about exporting/importing onto media. 535 */ 536 @Child(name = "media", type = {Coding.class}, order=10, min=0, max=1, modifier=false, summary=false) 537 @Description(shortDefinition="Type of media", formalDefinition="Type of media involved. Used when the event is about exporting/importing onto media." ) 538 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/dicm-405-mediatype") 539 protected Coding media; 540 541 /** 542 * Logical network location for application activity, if the activity has a network location. 543 */ 544 @Child(name = "network", type = {}, order=11, min=0, max=1, modifier=false, summary=false) 545 @Description(shortDefinition="Logical network location for application activity", formalDefinition="Logical network location for application activity, if the activity has a network location." ) 546 protected AuditEventAgentNetworkComponent network; 547 548 /** 549 * The reason (purpose of use), specific to this agent, that was used during the event being recorded. 550 */ 551 @Child(name = "purposeOfUse", type = {CodeableConcept.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 552 @Description(shortDefinition="Reason given for this user", formalDefinition="The reason (purpose of use), specific to this agent, that was used during the event being recorded." ) 553 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v3-PurposeOfUse") 554 protected List<CodeableConcept> purposeOfUse; 555 556 private static final long serialVersionUID = 1434862021L; 557 558 /** 559 * Constructor 560 */ 561 public AuditEventAgentComponent() { 562 super(); 563 } 564 565 /** 566 * Constructor 567 */ 568 public AuditEventAgentComponent(BooleanType requestor) { 569 super(); 570 this.requestor = requestor; 571 } 572 573 /** 574 * @return {@link #type} (Specification of the participation type the user plays when performing the event.) 575 */ 576 public CodeableConcept getType() { 577 if (this.type == null) 578 if (Configuration.errorOnAutoCreate()) 579 throw new Error("Attempt to auto-create AuditEventAgentComponent.type"); 580 else if (Configuration.doAutoCreate()) 581 this.type = new CodeableConcept(); // cc 582 return this.type; 583 } 584 585 public boolean hasType() { 586 return this.type != null && !this.type.isEmpty(); 587 } 588 589 /** 590 * @param value {@link #type} (Specification of the participation type the user plays when performing the event.) 591 */ 592 public AuditEventAgentComponent setType(CodeableConcept value) { 593 this.type = value; 594 return this; 595 } 596 597 /** 598 * @return {@link #role} (The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context.) 599 */ 600 public List<CodeableConcept> getRole() { 601 if (this.role == null) 602 this.role = new ArrayList<CodeableConcept>(); 603 return this.role; 604 } 605 606 /** 607 * @return Returns a reference to <code>this</code> for easy method chaining 608 */ 609 public AuditEventAgentComponent setRole(List<CodeableConcept> theRole) { 610 this.role = theRole; 611 return this; 612 } 613 614 public boolean hasRole() { 615 if (this.role == null) 616 return false; 617 for (CodeableConcept item : this.role) 618 if (!item.isEmpty()) 619 return true; 620 return false; 621 } 622 623 public CodeableConcept addRole() { //3 624 CodeableConcept t = new CodeableConcept(); 625 if (this.role == null) 626 this.role = new ArrayList<CodeableConcept>(); 627 this.role.add(t); 628 return t; 629 } 630 631 public AuditEventAgentComponent addRole(CodeableConcept t) { //3 632 if (t == null) 633 return this; 634 if (this.role == null) 635 this.role = new ArrayList<CodeableConcept>(); 636 this.role.add(t); 637 return this; 638 } 639 640 /** 641 * @return The first repetition of repeating field {@link #role}, creating it if it does not already exist 642 */ 643 public CodeableConcept getRoleFirstRep() { 644 if (getRole().isEmpty()) { 645 addRole(); 646 } 647 return getRole().get(0); 648 } 649 650 /** 651 * @return {@link #reference} (Direct reference to a resource that identifies the agent.) 652 */ 653 public Reference getReference() { 654 if (this.reference == null) 655 if (Configuration.errorOnAutoCreate()) 656 throw new Error("Attempt to auto-create AuditEventAgentComponent.reference"); 657 else if (Configuration.doAutoCreate()) 658 this.reference = new Reference(); // cc 659 return this.reference; 660 } 661 662 public boolean hasReference() { 663 return this.reference != null && !this.reference.isEmpty(); 664 } 665 666 /** 667 * @param value {@link #reference} (Direct reference to a resource that identifies the agent.) 668 */ 669 public AuditEventAgentComponent setReference(Reference value) { 670 this.reference = value; 671 return this; 672 } 673 674 /** 675 * @return {@link #reference} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Direct reference to a resource that identifies the agent.) 676 */ 677 public Resource getReferenceTarget() { 678 return this.referenceTarget; 679 } 680 681 /** 682 * @param value {@link #reference} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Direct reference to a resource that identifies the agent.) 683 */ 684 public AuditEventAgentComponent setReferenceTarget(Resource value) { 685 this.referenceTarget = value; 686 return this; 687 } 688 689 /** 690 * @return {@link #userId} (Unique identifier for the user actively participating in the event.) 691 */ 692 public Identifier getUserId() { 693 if (this.userId == null) 694 if (Configuration.errorOnAutoCreate()) 695 throw new Error("Attempt to auto-create AuditEventAgentComponent.userId"); 696 else if (Configuration.doAutoCreate()) 697 this.userId = new Identifier(); // cc 698 return this.userId; 699 } 700 701 public boolean hasUserId() { 702 return this.userId != null && !this.userId.isEmpty(); 703 } 704 705 /** 706 * @param value {@link #userId} (Unique identifier for the user actively participating in the event.) 707 */ 708 public AuditEventAgentComponent setUserId(Identifier value) { 709 this.userId = value; 710 return this; 711 } 712 713 /** 714 * @return {@link #altId} (Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.). This is the underlying object with id, value and extensions. The accessor "getAltId" gives direct access to the value 715 */ 716 public StringType getAltIdElement() { 717 if (this.altId == null) 718 if (Configuration.errorOnAutoCreate()) 719 throw new Error("Attempt to auto-create AuditEventAgentComponent.altId"); 720 else if (Configuration.doAutoCreate()) 721 this.altId = new StringType(); // bb 722 return this.altId; 723 } 724 725 public boolean hasAltIdElement() { 726 return this.altId != null && !this.altId.isEmpty(); 727 } 728 729 public boolean hasAltId() { 730 return this.altId != null && !this.altId.isEmpty(); 731 } 732 733 /** 734 * @param value {@link #altId} (Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.). This is the underlying object with id, value and extensions. The accessor "getAltId" gives direct access to the value 735 */ 736 public AuditEventAgentComponent setAltIdElement(StringType value) { 737 this.altId = value; 738 return this; 739 } 740 741 /** 742 * @return Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available. 743 */ 744 public String getAltId() { 745 return this.altId == null ? null : this.altId.getValue(); 746 } 747 748 /** 749 * @param value Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available. 750 */ 751 public AuditEventAgentComponent setAltId(String value) { 752 if (Utilities.noString(value)) 753 this.altId = null; 754 else { 755 if (this.altId == null) 756 this.altId = new StringType(); 757 this.altId.setValue(value); 758 } 759 return this; 760 } 761 762 /** 763 * @return {@link #name} (Human-meaningful name for the agent.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 764 */ 765 public StringType getNameElement() { 766 if (this.name == null) 767 if (Configuration.errorOnAutoCreate()) 768 throw new Error("Attempt to auto-create AuditEventAgentComponent.name"); 769 else if (Configuration.doAutoCreate()) 770 this.name = new StringType(); // bb 771 return this.name; 772 } 773 774 public boolean hasNameElement() { 775 return this.name != null && !this.name.isEmpty(); 776 } 777 778 public boolean hasName() { 779 return this.name != null && !this.name.isEmpty(); 780 } 781 782 /** 783 * @param value {@link #name} (Human-meaningful name for the agent.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 784 */ 785 public AuditEventAgentComponent setNameElement(StringType value) { 786 this.name = value; 787 return this; 788 } 789 790 /** 791 * @return Human-meaningful name for the agent. 792 */ 793 public String getName() { 794 return this.name == null ? null : this.name.getValue(); 795 } 796 797 /** 798 * @param value Human-meaningful name for the agent. 799 */ 800 public AuditEventAgentComponent setName(String value) { 801 if (Utilities.noString(value)) 802 this.name = null; 803 else { 804 if (this.name == null) 805 this.name = new StringType(); 806 this.name.setValue(value); 807 } 808 return this; 809 } 810 811 /** 812 * @return {@link #requestor} (Indicator that the user is or is not the requestor, or initiator, for the event being audited.). This is the underlying object with id, value and extensions. The accessor "getRequestor" gives direct access to the value 813 */ 814 public BooleanType getRequestorElement() { 815 if (this.requestor == null) 816 if (Configuration.errorOnAutoCreate()) 817 throw new Error("Attempt to auto-create AuditEventAgentComponent.requestor"); 818 else if (Configuration.doAutoCreate()) 819 this.requestor = new BooleanType(); // bb 820 return this.requestor; 821 } 822 823 public boolean hasRequestorElement() { 824 return this.requestor != null && !this.requestor.isEmpty(); 825 } 826 827 public boolean hasRequestor() { 828 return this.requestor != null && !this.requestor.isEmpty(); 829 } 830 831 /** 832 * @param value {@link #requestor} (Indicator that the user is or is not the requestor, or initiator, for the event being audited.). This is the underlying object with id, value and extensions. The accessor "getRequestor" gives direct access to the value 833 */ 834 public AuditEventAgentComponent setRequestorElement(BooleanType value) { 835 this.requestor = value; 836 return this; 837 } 838 839 /** 840 * @return Indicator that the user is or is not the requestor, or initiator, for the event being audited. 841 */ 842 public boolean getRequestor() { 843 return this.requestor == null || this.requestor.isEmpty() ? false : this.requestor.getValue(); 844 } 845 846 /** 847 * @param value Indicator that the user is or is not the requestor, or initiator, for the event being audited. 848 */ 849 public AuditEventAgentComponent setRequestor(boolean value) { 850 if (this.requestor == null) 851 this.requestor = new BooleanType(); 852 this.requestor.setValue(value); 853 return this; 854 } 855 856 /** 857 * @return {@link #location} (Where the event occurred.) 858 */ 859 public Reference getLocation() { 860 if (this.location == null) 861 if (Configuration.errorOnAutoCreate()) 862 throw new Error("Attempt to auto-create AuditEventAgentComponent.location"); 863 else if (Configuration.doAutoCreate()) 864 this.location = new Reference(); // cc 865 return this.location; 866 } 867 868 public boolean hasLocation() { 869 return this.location != null && !this.location.isEmpty(); 870 } 871 872 /** 873 * @param value {@link #location} (Where the event occurred.) 874 */ 875 public AuditEventAgentComponent setLocation(Reference value) { 876 this.location = value; 877 return this; 878 } 879 880 /** 881 * @return {@link #location} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Where the event occurred.) 882 */ 883 public Location getLocationTarget() { 884 if (this.locationTarget == null) 885 if (Configuration.errorOnAutoCreate()) 886 throw new Error("Attempt to auto-create AuditEventAgentComponent.location"); 887 else if (Configuration.doAutoCreate()) 888 this.locationTarget = new Location(); // aa 889 return this.locationTarget; 890 } 891 892 /** 893 * @param value {@link #location} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Where the event occurred.) 894 */ 895 public AuditEventAgentComponent setLocationTarget(Location value) { 896 this.locationTarget = value; 897 return this; 898 } 899 900 /** 901 * @return {@link #policy} (The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.) 902 */ 903 public List<UriType> getPolicy() { 904 if (this.policy == null) 905 this.policy = new ArrayList<UriType>(); 906 return this.policy; 907 } 908 909 /** 910 * @return Returns a reference to <code>this</code> for easy method chaining 911 */ 912 public AuditEventAgentComponent setPolicy(List<UriType> thePolicy) { 913 this.policy = thePolicy; 914 return this; 915 } 916 917 public boolean hasPolicy() { 918 if (this.policy == null) 919 return false; 920 for (UriType item : this.policy) 921 if (!item.isEmpty()) 922 return true; 923 return false; 924 } 925 926 /** 927 * @return {@link #policy} (The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.) 928 */ 929 public UriType addPolicyElement() {//2 930 UriType t = new UriType(); 931 if (this.policy == null) 932 this.policy = new ArrayList<UriType>(); 933 this.policy.add(t); 934 return t; 935 } 936 937 /** 938 * @param value {@link #policy} (The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.) 939 */ 940 public AuditEventAgentComponent addPolicy(String value) { //1 941 UriType t = new UriType(); 942 t.setValue(value); 943 if (this.policy == null) 944 this.policy = new ArrayList<UriType>(); 945 this.policy.add(t); 946 return this; 947 } 948 949 /** 950 * @param value {@link #policy} (The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.) 951 */ 952 public boolean hasPolicy(String value) { 953 if (this.policy == null) 954 return false; 955 for (UriType v : this.policy) 956 if (v.getValue().equals(value)) // uri 957 return true; 958 return false; 959 } 960 961 /** 962 * @return {@link #media} (Type of media involved. Used when the event is about exporting/importing onto media.) 963 */ 964 public Coding getMedia() { 965 if (this.media == null) 966 if (Configuration.errorOnAutoCreate()) 967 throw new Error("Attempt to auto-create AuditEventAgentComponent.media"); 968 else if (Configuration.doAutoCreate()) 969 this.media = new Coding(); // cc 970 return this.media; 971 } 972 973 public boolean hasMedia() { 974 return this.media != null && !this.media.isEmpty(); 975 } 976 977 /** 978 * @param value {@link #media} (Type of media involved. Used when the event is about exporting/importing onto media.) 979 */ 980 public AuditEventAgentComponent setMedia(Coding value) { 981 this.media = value; 982 return this; 983 } 984 985 /** 986 * @return {@link #network} (Logical network location for application activity, if the activity has a network location.) 987 */ 988 public AuditEventAgentNetworkComponent getNetwork() { 989 if (this.network == null) 990 if (Configuration.errorOnAutoCreate()) 991 throw new Error("Attempt to auto-create AuditEventAgentComponent.network"); 992 else if (Configuration.doAutoCreate()) 993 this.network = new AuditEventAgentNetworkComponent(); // cc 994 return this.network; 995 } 996 997 public boolean hasNetwork() { 998 return this.network != null && !this.network.isEmpty(); 999 } 1000 1001 /** 1002 * @param value {@link #network} (Logical network location for application activity, if the activity has a network location.) 1003 */ 1004 public AuditEventAgentComponent setNetwork(AuditEventAgentNetworkComponent value) { 1005 this.network = value; 1006 return this; 1007 } 1008 1009 /** 1010 * @return {@link #purposeOfUse} (The reason (purpose of use), specific to this agent, that was used during the event being recorded.) 1011 */ 1012 public List<CodeableConcept> getPurposeOfUse() { 1013 if (this.purposeOfUse == null) 1014 this.purposeOfUse = new ArrayList<CodeableConcept>(); 1015 return this.purposeOfUse; 1016 } 1017 1018 /** 1019 * @return Returns a reference to <code>this</code> for easy method chaining 1020 */ 1021 public AuditEventAgentComponent setPurposeOfUse(List<CodeableConcept> thePurposeOfUse) { 1022 this.purposeOfUse = thePurposeOfUse; 1023 return this; 1024 } 1025 1026 public boolean hasPurposeOfUse() { 1027 if (this.purposeOfUse == null) 1028 return false; 1029 for (CodeableConcept item : this.purposeOfUse) 1030 if (!item.isEmpty()) 1031 return true; 1032 return false; 1033 } 1034 1035 public CodeableConcept addPurposeOfUse() { //3 1036 CodeableConcept t = new CodeableConcept(); 1037 if (this.purposeOfUse == null) 1038 this.purposeOfUse = new ArrayList<CodeableConcept>(); 1039 this.purposeOfUse.add(t); 1040 return t; 1041 } 1042 1043 public AuditEventAgentComponent addPurposeOfUse(CodeableConcept t) { //3 1044 if (t == null) 1045 return this; 1046 if (this.purposeOfUse == null) 1047 this.purposeOfUse = new ArrayList<CodeableConcept>(); 1048 this.purposeOfUse.add(t); 1049 return this; 1050 } 1051 1052 /** 1053 * @return The first repetition of repeating field {@link #purposeOfUse}, creating it if it does not already exist 1054 */ 1055 public CodeableConcept getPurposeOfUseFirstRep() { 1056 if (getPurposeOfUse().isEmpty()) { 1057 addPurposeOfUse(); 1058 } 1059 return getPurposeOfUse().get(0); 1060 } 1061 1062 protected void listChildren(List<Property> children) { 1063 super.listChildren(children); 1064 children.add(new Property("type", "CodeableConcept", "Specification of the participation type the user plays when performing the event.", 0, 1, type)); 1065 children.add(new Property("role", "CodeableConcept", "The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context.", 0, java.lang.Integer.MAX_VALUE, role)); 1066 children.add(new Property("reference", "Reference(PractitionerRole|Practitioner|Organization|Device|Patient|RelatedPerson)", "Direct reference to a resource that identifies the agent.", 0, 1, reference)); 1067 children.add(new Property("userId", "Identifier", "Unique identifier for the user actively participating in the event.", 0, 1, userId)); 1068 children.add(new Property("altId", "string", "Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.", 0, 1, altId)); 1069 children.add(new Property("name", "string", "Human-meaningful name for the agent.", 0, 1, name)); 1070 children.add(new Property("requestor", "boolean", "Indicator that the user is or is not the requestor, or initiator, for the event being audited.", 0, 1, requestor)); 1071 children.add(new Property("location", "Reference(Location)", "Where the event occurred.", 0, 1, location)); 1072 children.add(new Property("policy", "uri", "The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.", 0, java.lang.Integer.MAX_VALUE, policy)); 1073 children.add(new Property("media", "Coding", "Type of media involved. Used when the event is about exporting/importing onto media.", 0, 1, media)); 1074 children.add(new Property("network", "", "Logical network location for application activity, if the activity has a network location.", 0, 1, network)); 1075 children.add(new Property("purposeOfUse", "CodeableConcept", "The reason (purpose of use), specific to this agent, that was used during the event being recorded.", 0, java.lang.Integer.MAX_VALUE, purposeOfUse)); 1076 } 1077 1078 @Override 1079 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1080 switch (_hash) { 1081 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Specification of the participation type the user plays when performing the event.", 0, 1, type); 1082 case 3506294: /*role*/ return new Property("role", "CodeableConcept", "The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context.", 0, java.lang.Integer.MAX_VALUE, role); 1083 case -925155509: /*reference*/ return new Property("reference", "Reference(PractitionerRole|Practitioner|Organization|Device|Patient|RelatedPerson)", "Direct reference to a resource that identifies the agent.", 0, 1, reference); 1084 case -836030906: /*userId*/ return new Property("userId", "Identifier", "Unique identifier for the user actively participating in the event.", 0, 1, userId); 1085 case 92912804: /*altId*/ return new Property("altId", "string", "Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.", 0, 1, altId); 1086 case 3373707: /*name*/ return new Property("name", "string", "Human-meaningful name for the agent.", 0, 1, name); 1087 case 693934258: /*requestor*/ return new Property("requestor", "boolean", "Indicator that the user is or is not the requestor, or initiator, for the event being audited.", 0, 1, requestor); 1088 case 1901043637: /*location*/ return new Property("location", "Reference(Location)", "Where the event occurred.", 0, 1, location); 1089 case -982670030: /*policy*/ return new Property("policy", "uri", "The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.", 0, java.lang.Integer.MAX_VALUE, policy); 1090 case 103772132: /*media*/ return new Property("media", "Coding", "Type of media involved. Used when the event is about exporting/importing onto media.", 0, 1, media); 1091 case 1843485230: /*network*/ return new Property("network", "", "Logical network location for application activity, if the activity has a network location.", 0, 1, network); 1092 case -1881902670: /*purposeOfUse*/ return new Property("purposeOfUse", "CodeableConcept", "The reason (purpose of use), specific to this agent, that was used during the event being recorded.", 0, java.lang.Integer.MAX_VALUE, purposeOfUse); 1093 default: return super.getNamedProperty(_hash, _name, _checkValid); 1094 } 1095 1096 } 1097 1098 @Override 1099 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1100 switch (hash) { 1101 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1102 case 3506294: /*role*/ return this.role == null ? new Base[0] : this.role.toArray(new Base[this.role.size()]); // CodeableConcept 1103 case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // Reference 1104 case -836030906: /*userId*/ return this.userId == null ? new Base[0] : new Base[] {this.userId}; // Identifier 1105 case 92912804: /*altId*/ return this.altId == null ? new Base[0] : new Base[] {this.altId}; // StringType 1106 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 1107 case 693934258: /*requestor*/ return this.requestor == null ? new Base[0] : new Base[] {this.requestor}; // BooleanType 1108 case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference 1109 case -982670030: /*policy*/ return this.policy == null ? new Base[0] : this.policy.toArray(new Base[this.policy.size()]); // UriType 1110 case 103772132: /*media*/ return this.media == null ? new Base[0] : new Base[] {this.media}; // Coding 1111 case 1843485230: /*network*/ return this.network == null ? new Base[0] : new Base[] {this.network}; // AuditEventAgentNetworkComponent 1112 case -1881902670: /*purposeOfUse*/ return this.purposeOfUse == null ? new Base[0] : this.purposeOfUse.toArray(new Base[this.purposeOfUse.size()]); // CodeableConcept 1113 default: return super.getProperty(hash, name, checkValid); 1114 } 1115 1116 } 1117 1118 @Override 1119 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1120 switch (hash) { 1121 case 3575610: // type 1122 this.type = castToCodeableConcept(value); // CodeableConcept 1123 return value; 1124 case 3506294: // role 1125 this.getRole().add(castToCodeableConcept(value)); // CodeableConcept 1126 return value; 1127 case -925155509: // reference 1128 this.reference = castToReference(value); // Reference 1129 return value; 1130 case -836030906: // userId 1131 this.userId = castToIdentifier(value); // Identifier 1132 return value; 1133 case 92912804: // altId 1134 this.altId = castToString(value); // StringType 1135 return value; 1136 case 3373707: // name 1137 this.name = castToString(value); // StringType 1138 return value; 1139 case 693934258: // requestor 1140 this.requestor = castToBoolean(value); // BooleanType 1141 return value; 1142 case 1901043637: // location 1143 this.location = castToReference(value); // Reference 1144 return value; 1145 case -982670030: // policy 1146 this.getPolicy().add(castToUri(value)); // UriType 1147 return value; 1148 case 103772132: // media 1149 this.media = castToCoding(value); // Coding 1150 return value; 1151 case 1843485230: // network 1152 this.network = (AuditEventAgentNetworkComponent) value; // AuditEventAgentNetworkComponent 1153 return value; 1154 case -1881902670: // purposeOfUse 1155 this.getPurposeOfUse().add(castToCodeableConcept(value)); // CodeableConcept 1156 return value; 1157 default: return super.setProperty(hash, name, value); 1158 } 1159 1160 } 1161 1162 @Override 1163 public Base setProperty(String name, Base value) throws FHIRException { 1164 if (name.equals("type")) { 1165 this.type = castToCodeableConcept(value); // CodeableConcept 1166 } else if (name.equals("role")) { 1167 this.getRole().add(castToCodeableConcept(value)); 1168 } else if (name.equals("reference")) { 1169 this.reference = castToReference(value); // Reference 1170 } else if (name.equals("userId")) { 1171 this.userId = castToIdentifier(value); // Identifier 1172 } else if (name.equals("altId")) { 1173 this.altId = castToString(value); // StringType 1174 } else if (name.equals("name")) { 1175 this.name = castToString(value); // StringType 1176 } else if (name.equals("requestor")) { 1177 this.requestor = castToBoolean(value); // BooleanType 1178 } else if (name.equals("location")) { 1179 this.location = castToReference(value); // Reference 1180 } else if (name.equals("policy")) { 1181 this.getPolicy().add(castToUri(value)); 1182 } else if (name.equals("media")) { 1183 this.media = castToCoding(value); // Coding 1184 } else if (name.equals("network")) { 1185 this.network = (AuditEventAgentNetworkComponent) value; // AuditEventAgentNetworkComponent 1186 } else if (name.equals("purposeOfUse")) { 1187 this.getPurposeOfUse().add(castToCodeableConcept(value)); 1188 } else 1189 return super.setProperty(name, value); 1190 return value; 1191 } 1192 1193 @Override 1194 public Base makeProperty(int hash, String name) throws FHIRException { 1195 switch (hash) { 1196 case 3575610: return getType(); 1197 case 3506294: return addRole(); 1198 case -925155509: return getReference(); 1199 case -836030906: return getUserId(); 1200 case 92912804: return getAltIdElement(); 1201 case 3373707: return getNameElement(); 1202 case 693934258: return getRequestorElement(); 1203 case 1901043637: return getLocation(); 1204 case -982670030: return addPolicyElement(); 1205 case 103772132: return getMedia(); 1206 case 1843485230: return getNetwork(); 1207 case -1881902670: return addPurposeOfUse(); 1208 default: return super.makeProperty(hash, name); 1209 } 1210 1211 } 1212 1213 @Override 1214 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1215 switch (hash) { 1216 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1217 case 3506294: /*role*/ return new String[] {"CodeableConcept"}; 1218 case -925155509: /*reference*/ return new String[] {"Reference"}; 1219 case -836030906: /*userId*/ return new String[] {"Identifier"}; 1220 case 92912804: /*altId*/ return new String[] {"string"}; 1221 case 3373707: /*name*/ return new String[] {"string"}; 1222 case 693934258: /*requestor*/ return new String[] {"boolean"}; 1223 case 1901043637: /*location*/ return new String[] {"Reference"}; 1224 case -982670030: /*policy*/ return new String[] {"uri"}; 1225 case 103772132: /*media*/ return new String[] {"Coding"}; 1226 case 1843485230: /*network*/ return new String[] {}; 1227 case -1881902670: /*purposeOfUse*/ return new String[] {"CodeableConcept"}; 1228 default: return super.getTypesForProperty(hash, name); 1229 } 1230 1231 } 1232 1233 @Override 1234 public Base addChild(String name) throws FHIRException { 1235 if (name.equals("type")) { 1236 this.type = new CodeableConcept(); 1237 return this.type; 1238 } 1239 else if (name.equals("role")) { 1240 return addRole(); 1241 } 1242 else if (name.equals("reference")) { 1243 this.reference = new Reference(); 1244 return this.reference; 1245 } 1246 else if (name.equals("userId")) { 1247 this.userId = new Identifier(); 1248 return this.userId; 1249 } 1250 else if (name.equals("altId")) { 1251 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.altId"); 1252 } 1253 else if (name.equals("name")) { 1254 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.name"); 1255 } 1256 else if (name.equals("requestor")) { 1257 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.requestor"); 1258 } 1259 else if (name.equals("location")) { 1260 this.location = new Reference(); 1261 return this.location; 1262 } 1263 else if (name.equals("policy")) { 1264 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.policy"); 1265 } 1266 else if (name.equals("media")) { 1267 this.media = new Coding(); 1268 return this.media; 1269 } 1270 else if (name.equals("network")) { 1271 this.network = new AuditEventAgentNetworkComponent(); 1272 return this.network; 1273 } 1274 else if (name.equals("purposeOfUse")) { 1275 return addPurposeOfUse(); 1276 } 1277 else 1278 return super.addChild(name); 1279 } 1280 1281 public AuditEventAgentComponent copy() { 1282 AuditEventAgentComponent dst = new AuditEventAgentComponent(); 1283 copyValues(dst); 1284 dst.type = type == null ? null : type.copy(); 1285 if (role != null) { 1286 dst.role = new ArrayList<CodeableConcept>(); 1287 for (CodeableConcept i : role) 1288 dst.role.add(i.copy()); 1289 }; 1290 dst.reference = reference == null ? null : reference.copy(); 1291 dst.userId = userId == null ? null : userId.copy(); 1292 dst.altId = altId == null ? null : altId.copy(); 1293 dst.name = name == null ? null : name.copy(); 1294 dst.requestor = requestor == null ? null : requestor.copy(); 1295 dst.location = location == null ? null : location.copy(); 1296 if (policy != null) { 1297 dst.policy = new ArrayList<UriType>(); 1298 for (UriType i : policy) 1299 dst.policy.add(i.copy()); 1300 }; 1301 dst.media = media == null ? null : media.copy(); 1302 dst.network = network == null ? null : network.copy(); 1303 if (purposeOfUse != null) { 1304 dst.purposeOfUse = new ArrayList<CodeableConcept>(); 1305 for (CodeableConcept i : purposeOfUse) 1306 dst.purposeOfUse.add(i.copy()); 1307 }; 1308 return dst; 1309 } 1310 1311 @Override 1312 public boolean equalsDeep(Base other_) { 1313 if (!super.equalsDeep(other_)) 1314 return false; 1315 if (!(other_ instanceof AuditEventAgentComponent)) 1316 return false; 1317 AuditEventAgentComponent o = (AuditEventAgentComponent) other_; 1318 return compareDeep(type, o.type, true) && compareDeep(role, o.role, true) && compareDeep(reference, o.reference, true) 1319 && compareDeep(userId, o.userId, true) && compareDeep(altId, o.altId, true) && compareDeep(name, o.name, true) 1320 && compareDeep(requestor, o.requestor, true) && compareDeep(location, o.location, true) && compareDeep(policy, o.policy, true) 1321 && compareDeep(media, o.media, true) && compareDeep(network, o.network, true) && compareDeep(purposeOfUse, o.purposeOfUse, true) 1322 ; 1323 } 1324 1325 @Override 1326 public boolean equalsShallow(Base other_) { 1327 if (!super.equalsShallow(other_)) 1328 return false; 1329 if (!(other_ instanceof AuditEventAgentComponent)) 1330 return false; 1331 AuditEventAgentComponent o = (AuditEventAgentComponent) other_; 1332 return compareValues(altId, o.altId, true) && compareValues(name, o.name, true) && compareValues(requestor, o.requestor, true) 1333 && compareValues(policy, o.policy, true); 1334 } 1335 1336 public boolean isEmpty() { 1337 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, role, reference, userId 1338 , altId, name, requestor, location, policy, media, network, purposeOfUse); 1339 } 1340 1341 public String fhirType() { 1342 return "AuditEvent.agent"; 1343 1344 } 1345 1346 } 1347 1348 @Block() 1349 public static class AuditEventAgentNetworkComponent extends BackboneElement implements IBaseBackboneElement { 1350 /** 1351 * An identifier for the network access point of the user device for the audit event. 1352 */ 1353 @Child(name = "address", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1354 @Description(shortDefinition="Identifier for the network access point of the user device", formalDefinition="An identifier for the network access point of the user device for the audit event." ) 1355 protected StringType address; 1356 1357 /** 1358 * An identifier for the type of network access point that originated the audit event. 1359 */ 1360 @Child(name = "type", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1361 @Description(shortDefinition="The type of network access point", formalDefinition="An identifier for the type of network access point that originated the audit event." ) 1362 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/network-type") 1363 protected Enumeration<AuditEventAgentNetworkType> type; 1364 1365 private static final long serialVersionUID = -160715924L; 1366 1367 /** 1368 * Constructor 1369 */ 1370 public AuditEventAgentNetworkComponent() { 1371 super(); 1372 } 1373 1374 /** 1375 * @return {@link #address} (An identifier for the network access point of the user device for the audit event.). This is the underlying object with id, value and extensions. The accessor "getAddress" gives direct access to the value 1376 */ 1377 public StringType getAddressElement() { 1378 if (this.address == null) 1379 if (Configuration.errorOnAutoCreate()) 1380 throw new Error("Attempt to auto-create AuditEventAgentNetworkComponent.address"); 1381 else if (Configuration.doAutoCreate()) 1382 this.address = new StringType(); // bb 1383 return this.address; 1384 } 1385 1386 public boolean hasAddressElement() { 1387 return this.address != null && !this.address.isEmpty(); 1388 } 1389 1390 public boolean hasAddress() { 1391 return this.address != null && !this.address.isEmpty(); 1392 } 1393 1394 /** 1395 * @param value {@link #address} (An identifier for the network access point of the user device for the audit event.). This is the underlying object with id, value and extensions. The accessor "getAddress" gives direct access to the value 1396 */ 1397 public AuditEventAgentNetworkComponent setAddressElement(StringType value) { 1398 this.address = value; 1399 return this; 1400 } 1401 1402 /** 1403 * @return An identifier for the network access point of the user device for the audit event. 1404 */ 1405 public String getAddress() { 1406 return this.address == null ? null : this.address.getValue(); 1407 } 1408 1409 /** 1410 * @param value An identifier for the network access point of the user device for the audit event. 1411 */ 1412 public AuditEventAgentNetworkComponent setAddress(String value) { 1413 if (Utilities.noString(value)) 1414 this.address = null; 1415 else { 1416 if (this.address == null) 1417 this.address = new StringType(); 1418 this.address.setValue(value); 1419 } 1420 return this; 1421 } 1422 1423 /** 1424 * @return {@link #type} (An identifier for the type of network access point that originated the audit event.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1425 */ 1426 public Enumeration<AuditEventAgentNetworkType> getTypeElement() { 1427 if (this.type == null) 1428 if (Configuration.errorOnAutoCreate()) 1429 throw new Error("Attempt to auto-create AuditEventAgentNetworkComponent.type"); 1430 else if (Configuration.doAutoCreate()) 1431 this.type = new Enumeration<AuditEventAgentNetworkType>(new AuditEventAgentNetworkTypeEnumFactory()); // bb 1432 return this.type; 1433 } 1434 1435 public boolean hasTypeElement() { 1436 return this.type != null && !this.type.isEmpty(); 1437 } 1438 1439 public boolean hasType() { 1440 return this.type != null && !this.type.isEmpty(); 1441 } 1442 1443 /** 1444 * @param value {@link #type} (An identifier for the type of network access point that originated the audit event.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1445 */ 1446 public AuditEventAgentNetworkComponent setTypeElement(Enumeration<AuditEventAgentNetworkType> value) { 1447 this.type = value; 1448 return this; 1449 } 1450 1451 /** 1452 * @return An identifier for the type of network access point that originated the audit event. 1453 */ 1454 public AuditEventAgentNetworkType getType() { 1455 return this.type == null ? null : this.type.getValue(); 1456 } 1457 1458 /** 1459 * @param value An identifier for the type of network access point that originated the audit event. 1460 */ 1461 public AuditEventAgentNetworkComponent setType(AuditEventAgentNetworkType value) { 1462 if (value == null) 1463 this.type = null; 1464 else { 1465 if (this.type == null) 1466 this.type = new Enumeration<AuditEventAgentNetworkType>(new AuditEventAgentNetworkTypeEnumFactory()); 1467 this.type.setValue(value); 1468 } 1469 return this; 1470 } 1471 1472 protected void listChildren(List<Property> children) { 1473 super.listChildren(children); 1474 children.add(new Property("address", "string", "An identifier for the network access point of the user device for the audit event.", 0, 1, address)); 1475 children.add(new Property("type", "code", "An identifier for the type of network access point that originated the audit event.", 0, 1, type)); 1476 } 1477 1478 @Override 1479 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1480 switch (_hash) { 1481 case -1147692044: /*address*/ return new Property("address", "string", "An identifier for the network access point of the user device for the audit event.", 0, 1, address); 1482 case 3575610: /*type*/ return new Property("type", "code", "An identifier for the type of network access point that originated the audit event.", 0, 1, type); 1483 default: return super.getNamedProperty(_hash, _name, _checkValid); 1484 } 1485 1486 } 1487 1488 @Override 1489 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1490 switch (hash) { 1491 case -1147692044: /*address*/ return this.address == null ? new Base[0] : new Base[] {this.address}; // StringType 1492 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<AuditEventAgentNetworkType> 1493 default: return super.getProperty(hash, name, checkValid); 1494 } 1495 1496 } 1497 1498 @Override 1499 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1500 switch (hash) { 1501 case -1147692044: // address 1502 this.address = castToString(value); // StringType 1503 return value; 1504 case 3575610: // type 1505 value = new AuditEventAgentNetworkTypeEnumFactory().fromType(castToCode(value)); 1506 this.type = (Enumeration) value; // Enumeration<AuditEventAgentNetworkType> 1507 return value; 1508 default: return super.setProperty(hash, name, value); 1509 } 1510 1511 } 1512 1513 @Override 1514 public Base setProperty(String name, Base value) throws FHIRException { 1515 if (name.equals("address")) { 1516 this.address = castToString(value); // StringType 1517 } else if (name.equals("type")) { 1518 value = new AuditEventAgentNetworkTypeEnumFactory().fromType(castToCode(value)); 1519 this.type = (Enumeration) value; // Enumeration<AuditEventAgentNetworkType> 1520 } else 1521 return super.setProperty(name, value); 1522 return value; 1523 } 1524 1525 @Override 1526 public Base makeProperty(int hash, String name) throws FHIRException { 1527 switch (hash) { 1528 case -1147692044: return getAddressElement(); 1529 case 3575610: return getTypeElement(); 1530 default: return super.makeProperty(hash, name); 1531 } 1532 1533 } 1534 1535 @Override 1536 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1537 switch (hash) { 1538 case -1147692044: /*address*/ return new String[] {"string"}; 1539 case 3575610: /*type*/ return new String[] {"code"}; 1540 default: return super.getTypesForProperty(hash, name); 1541 } 1542 1543 } 1544 1545 @Override 1546 public Base addChild(String name) throws FHIRException { 1547 if (name.equals("address")) { 1548 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.address"); 1549 } 1550 else if (name.equals("type")) { 1551 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.type"); 1552 } 1553 else 1554 return super.addChild(name); 1555 } 1556 1557 public AuditEventAgentNetworkComponent copy() { 1558 AuditEventAgentNetworkComponent dst = new AuditEventAgentNetworkComponent(); 1559 copyValues(dst); 1560 dst.address = address == null ? null : address.copy(); 1561 dst.type = type == null ? null : type.copy(); 1562 return dst; 1563 } 1564 1565 @Override 1566 public boolean equalsDeep(Base other_) { 1567 if (!super.equalsDeep(other_)) 1568 return false; 1569 if (!(other_ instanceof AuditEventAgentNetworkComponent)) 1570 return false; 1571 AuditEventAgentNetworkComponent o = (AuditEventAgentNetworkComponent) other_; 1572 return compareDeep(address, o.address, true) && compareDeep(type, o.type, true); 1573 } 1574 1575 @Override 1576 public boolean equalsShallow(Base other_) { 1577 if (!super.equalsShallow(other_)) 1578 return false; 1579 if (!(other_ instanceof AuditEventAgentNetworkComponent)) 1580 return false; 1581 AuditEventAgentNetworkComponent o = (AuditEventAgentNetworkComponent) other_; 1582 return compareValues(address, o.address, true) && compareValues(type, o.type, true); 1583 } 1584 1585 public boolean isEmpty() { 1586 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(address, type); 1587 } 1588 1589 public String fhirType() { 1590 return "AuditEvent.agent.network"; 1591 1592 } 1593 1594 } 1595 1596 @Block() 1597 public static class AuditEventSourceComponent extends BackboneElement implements IBaseBackboneElement { 1598 /** 1599 * Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group. 1600 */ 1601 @Child(name = "site", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1602 @Description(shortDefinition="Logical source location within the enterprise", formalDefinition="Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group." ) 1603 protected StringType site; 1604 1605 /** 1606 * Identifier of the source where the event was detected. 1607 */ 1608 @Child(name = "identifier", type = {Identifier.class}, order=2, min=1, max=1, modifier=false, summary=true) 1609 @Description(shortDefinition="The identity of source detecting the event", formalDefinition="Identifier of the source where the event was detected." ) 1610 protected Identifier identifier; 1611 1612 /** 1613 * Code specifying the type of source where event originated. 1614 */ 1615 @Child(name = "type", type = {Coding.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1616 @Description(shortDefinition="The type of source where event originated", formalDefinition="Code specifying the type of source where event originated." ) 1617 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/audit-source-type") 1618 protected List<Coding> type; 1619 1620 private static final long serialVersionUID = -1562673890L; 1621 1622 /** 1623 * Constructor 1624 */ 1625 public AuditEventSourceComponent() { 1626 super(); 1627 } 1628 1629 /** 1630 * Constructor 1631 */ 1632 public AuditEventSourceComponent(Identifier identifier) { 1633 super(); 1634 this.identifier = identifier; 1635 } 1636 1637 /** 1638 * @return {@link #site} (Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.). This is the underlying object with id, value and extensions. The accessor "getSite" gives direct access to the value 1639 */ 1640 public StringType getSiteElement() { 1641 if (this.site == null) 1642 if (Configuration.errorOnAutoCreate()) 1643 throw new Error("Attempt to auto-create AuditEventSourceComponent.site"); 1644 else if (Configuration.doAutoCreate()) 1645 this.site = new StringType(); // bb 1646 return this.site; 1647 } 1648 1649 public boolean hasSiteElement() { 1650 return this.site != null && !this.site.isEmpty(); 1651 } 1652 1653 public boolean hasSite() { 1654 return this.site != null && !this.site.isEmpty(); 1655 } 1656 1657 /** 1658 * @param value {@link #site} (Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.). This is the underlying object with id, value and extensions. The accessor "getSite" gives direct access to the value 1659 */ 1660 public AuditEventSourceComponent setSiteElement(StringType value) { 1661 this.site = value; 1662 return this; 1663 } 1664 1665 /** 1666 * @return Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group. 1667 */ 1668 public String getSite() { 1669 return this.site == null ? null : this.site.getValue(); 1670 } 1671 1672 /** 1673 * @param value Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group. 1674 */ 1675 public AuditEventSourceComponent setSite(String value) { 1676 if (Utilities.noString(value)) 1677 this.site = null; 1678 else { 1679 if (this.site == null) 1680 this.site = new StringType(); 1681 this.site.setValue(value); 1682 } 1683 return this; 1684 } 1685 1686 /** 1687 * @return {@link #identifier} (Identifier of the source where the event was detected.) 1688 */ 1689 public Identifier getIdentifier() { 1690 if (this.identifier == null) 1691 if (Configuration.errorOnAutoCreate()) 1692 throw new Error("Attempt to auto-create AuditEventSourceComponent.identifier"); 1693 else if (Configuration.doAutoCreate()) 1694 this.identifier = new Identifier(); // cc 1695 return this.identifier; 1696 } 1697 1698 public boolean hasIdentifier() { 1699 return this.identifier != null && !this.identifier.isEmpty(); 1700 } 1701 1702 /** 1703 * @param value {@link #identifier} (Identifier of the source where the event was detected.) 1704 */ 1705 public AuditEventSourceComponent setIdentifier(Identifier value) { 1706 this.identifier = value; 1707 return this; 1708 } 1709 1710 /** 1711 * @return {@link #type} (Code specifying the type of source where event originated.) 1712 */ 1713 public List<Coding> getType() { 1714 if (this.type == null) 1715 this.type = new ArrayList<Coding>(); 1716 return this.type; 1717 } 1718 1719 /** 1720 * @return Returns a reference to <code>this</code> for easy method chaining 1721 */ 1722 public AuditEventSourceComponent setType(List<Coding> theType) { 1723 this.type = theType; 1724 return this; 1725 } 1726 1727 public boolean hasType() { 1728 if (this.type == null) 1729 return false; 1730 for (Coding item : this.type) 1731 if (!item.isEmpty()) 1732 return true; 1733 return false; 1734 } 1735 1736 public Coding addType() { //3 1737 Coding t = new Coding(); 1738 if (this.type == null) 1739 this.type = new ArrayList<Coding>(); 1740 this.type.add(t); 1741 return t; 1742 } 1743 1744 public AuditEventSourceComponent addType(Coding t) { //3 1745 if (t == null) 1746 return this; 1747 if (this.type == null) 1748 this.type = new ArrayList<Coding>(); 1749 this.type.add(t); 1750 return this; 1751 } 1752 1753 /** 1754 * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist 1755 */ 1756 public Coding getTypeFirstRep() { 1757 if (getType().isEmpty()) { 1758 addType(); 1759 } 1760 return getType().get(0); 1761 } 1762 1763 protected void listChildren(List<Property> children) { 1764 super.listChildren(children); 1765 children.add(new Property("site", "string", "Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.", 0, 1, site)); 1766 children.add(new Property("identifier", "Identifier", "Identifier of the source where the event was detected.", 0, 1, identifier)); 1767 children.add(new Property("type", "Coding", "Code specifying the type of source where event originated.", 0, java.lang.Integer.MAX_VALUE, type)); 1768 } 1769 1770 @Override 1771 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1772 switch (_hash) { 1773 case 3530567: /*site*/ return new Property("site", "string", "Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.", 0, 1, site); 1774 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Identifier of the source where the event was detected.", 0, 1, identifier); 1775 case 3575610: /*type*/ return new Property("type", "Coding", "Code specifying the type of source where event originated.", 0, java.lang.Integer.MAX_VALUE, type); 1776 default: return super.getNamedProperty(_hash, _name, _checkValid); 1777 } 1778 1779 } 1780 1781 @Override 1782 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1783 switch (hash) { 1784 case 3530567: /*site*/ return this.site == null ? new Base[0] : new Base[] {this.site}; // StringType 1785 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 1786 case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // Coding 1787 default: return super.getProperty(hash, name, checkValid); 1788 } 1789 1790 } 1791 1792 @Override 1793 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1794 switch (hash) { 1795 case 3530567: // site 1796 this.site = castToString(value); // StringType 1797 return value; 1798 case -1618432855: // identifier 1799 this.identifier = castToIdentifier(value); // Identifier 1800 return value; 1801 case 3575610: // type 1802 this.getType().add(castToCoding(value)); // Coding 1803 return value; 1804 default: return super.setProperty(hash, name, value); 1805 } 1806 1807 } 1808 1809 @Override 1810 public Base setProperty(String name, Base value) throws FHIRException { 1811 if (name.equals("site")) { 1812 this.site = castToString(value); // StringType 1813 } else if (name.equals("identifier")) { 1814 this.identifier = castToIdentifier(value); // Identifier 1815 } else if (name.equals("type")) { 1816 this.getType().add(castToCoding(value)); 1817 } else 1818 return super.setProperty(name, value); 1819 return value; 1820 } 1821 1822 @Override 1823 public Base makeProperty(int hash, String name) throws FHIRException { 1824 switch (hash) { 1825 case 3530567: return getSiteElement(); 1826 case -1618432855: return getIdentifier(); 1827 case 3575610: return addType(); 1828 default: return super.makeProperty(hash, name); 1829 } 1830 1831 } 1832 1833 @Override 1834 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1835 switch (hash) { 1836 case 3530567: /*site*/ return new String[] {"string"}; 1837 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1838 case 3575610: /*type*/ return new String[] {"Coding"}; 1839 default: return super.getTypesForProperty(hash, name); 1840 } 1841 1842 } 1843 1844 @Override 1845 public Base addChild(String name) throws FHIRException { 1846 if (name.equals("site")) { 1847 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.site"); 1848 } 1849 else if (name.equals("identifier")) { 1850 this.identifier = new Identifier(); 1851 return this.identifier; 1852 } 1853 else if (name.equals("type")) { 1854 return addType(); 1855 } 1856 else 1857 return super.addChild(name); 1858 } 1859 1860 public AuditEventSourceComponent copy() { 1861 AuditEventSourceComponent dst = new AuditEventSourceComponent(); 1862 copyValues(dst); 1863 dst.site = site == null ? null : site.copy(); 1864 dst.identifier = identifier == null ? null : identifier.copy(); 1865 if (type != null) { 1866 dst.type = new ArrayList<Coding>(); 1867 for (Coding i : type) 1868 dst.type.add(i.copy()); 1869 }; 1870 return dst; 1871 } 1872 1873 @Override 1874 public boolean equalsDeep(Base other_) { 1875 if (!super.equalsDeep(other_)) 1876 return false; 1877 if (!(other_ instanceof AuditEventSourceComponent)) 1878 return false; 1879 AuditEventSourceComponent o = (AuditEventSourceComponent) other_; 1880 return compareDeep(site, o.site, true) && compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) 1881 ; 1882 } 1883 1884 @Override 1885 public boolean equalsShallow(Base other_) { 1886 if (!super.equalsShallow(other_)) 1887 return false; 1888 if (!(other_ instanceof AuditEventSourceComponent)) 1889 return false; 1890 AuditEventSourceComponent o = (AuditEventSourceComponent) other_; 1891 return compareValues(site, o.site, true); 1892 } 1893 1894 public boolean isEmpty() { 1895 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(site, identifier, type); 1896 } 1897 1898 public String fhirType() { 1899 return "AuditEvent.source"; 1900 1901 } 1902 1903 } 1904 1905 @Block() 1906 public static class AuditEventEntityComponent extends BackboneElement implements IBaseBackboneElement { 1907 /** 1908 * Identifies a specific instance of the entity. The reference should always be version specific. 1909 */ 1910 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) 1911 @Description(shortDefinition="Specific instance of object", formalDefinition="Identifies a specific instance of the entity. The reference should always be version specific." ) 1912 protected Identifier identifier; 1913 1914 /** 1915 * Identifies a specific instance of the entity. The reference should be version specific. 1916 */ 1917 @Child(name = "reference", type = {Reference.class}, order=2, min=0, max=1, modifier=false, summary=true) 1918 @Description(shortDefinition="Specific instance of resource", formalDefinition="Identifies a specific instance of the entity. The reference should be version specific." ) 1919 protected Reference reference; 1920 1921 /** 1922 * The actual object that is the target of the reference (Identifies a specific instance of the entity. The reference should be version specific.) 1923 */ 1924 protected Resource referenceTarget; 1925 1926 /** 1927 * The type of the object that was involved in this audit event. 1928 */ 1929 @Child(name = "type", type = {Coding.class}, order=3, min=0, max=1, modifier=false, summary=false) 1930 @Description(shortDefinition="Type of entity involved", formalDefinition="The type of the object that was involved in this audit event." ) 1931 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/audit-entity-type") 1932 protected Coding type; 1933 1934 /** 1935 * Code representing the role the entity played in the event being audited. 1936 */ 1937 @Child(name = "role", type = {Coding.class}, order=4, min=0, max=1, modifier=false, summary=false) 1938 @Description(shortDefinition="What role the entity played", formalDefinition="Code representing the role the entity played in the event being audited." ) 1939 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/object-role") 1940 protected Coding role; 1941 1942 /** 1943 * Identifier for the data life-cycle stage for the entity. 1944 */ 1945 @Child(name = "lifecycle", type = {Coding.class}, order=5, min=0, max=1, modifier=false, summary=false) 1946 @Description(shortDefinition="Life-cycle stage for the entity", formalDefinition="Identifier for the data life-cycle stage for the entity." ) 1947 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/object-lifecycle-events") 1948 protected Coding lifecycle; 1949 1950 /** 1951 * Security labels for the identified entity. 1952 */ 1953 @Child(name = "securityLabel", type = {Coding.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1954 @Description(shortDefinition="Security labels on the entity", formalDefinition="Security labels for the identified entity." ) 1955 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/security-labels") 1956 protected List<Coding> securityLabel; 1957 1958 /** 1959 * A name of the entity in the audit event. 1960 */ 1961 @Child(name = "name", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true) 1962 @Description(shortDefinition="Descriptor for entity", formalDefinition="A name of the entity in the audit event." ) 1963 protected StringType name; 1964 1965 /** 1966 * Text that describes the entity in more detail. 1967 */ 1968 @Child(name = "description", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) 1969 @Description(shortDefinition="Descriptive text", formalDefinition="Text that describes the entity in more detail." ) 1970 protected StringType description; 1971 1972 /** 1973 * The query parameters for a query-type entities. 1974 */ 1975 @Child(name = "query", type = {Base64BinaryType.class}, order=9, min=0, max=1, modifier=false, summary=true) 1976 @Description(shortDefinition="Query parameters", formalDefinition="The query parameters for a query-type entities." ) 1977 protected Base64BinaryType query; 1978 1979 /** 1980 * Tagged value pairs for conveying additional information about the entity. 1981 */ 1982 @Child(name = "detail", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1983 @Description(shortDefinition="Additional Information about the entity", formalDefinition="Tagged value pairs for conveying additional information about the entity." ) 1984 protected List<AuditEventEntityDetailComponent> detail; 1985 1986 private static final long serialVersionUID = -1393424632L; 1987 1988 /** 1989 * Constructor 1990 */ 1991 public AuditEventEntityComponent() { 1992 super(); 1993 } 1994 1995 /** 1996 * @return {@link #identifier} (Identifies a specific instance of the entity. The reference should always be version specific.) 1997 */ 1998 public Identifier getIdentifier() { 1999 if (this.identifier == null) 2000 if (Configuration.errorOnAutoCreate()) 2001 throw new Error("Attempt to auto-create AuditEventEntityComponent.identifier"); 2002 else if (Configuration.doAutoCreate()) 2003 this.identifier = new Identifier(); // cc 2004 return this.identifier; 2005 } 2006 2007 public boolean hasIdentifier() { 2008 return this.identifier != null && !this.identifier.isEmpty(); 2009 } 2010 2011 /** 2012 * @param value {@link #identifier} (Identifies a specific instance of the entity. The reference should always be version specific.) 2013 */ 2014 public AuditEventEntityComponent setIdentifier(Identifier value) { 2015 this.identifier = value; 2016 return this; 2017 } 2018 2019 /** 2020 * @return {@link #reference} (Identifies a specific instance of the entity. The reference should be version specific.) 2021 */ 2022 public Reference getReference() { 2023 if (this.reference == null) 2024 if (Configuration.errorOnAutoCreate()) 2025 throw new Error("Attempt to auto-create AuditEventEntityComponent.reference"); 2026 else if (Configuration.doAutoCreate()) 2027 this.reference = new Reference(); // cc 2028 return this.reference; 2029 } 2030 2031 public boolean hasReference() { 2032 return this.reference != null && !this.reference.isEmpty(); 2033 } 2034 2035 /** 2036 * @param value {@link #reference} (Identifies a specific instance of the entity. The reference should be version specific.) 2037 */ 2038 public AuditEventEntityComponent setReference(Reference value) { 2039 this.reference = value; 2040 return this; 2041 } 2042 2043 /** 2044 * @return {@link #reference} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies a specific instance of the entity. The reference should be version specific.) 2045 */ 2046 public Resource getReferenceTarget() { 2047 return this.referenceTarget; 2048 } 2049 2050 /** 2051 * @param value {@link #reference} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies a specific instance of the entity. The reference should be version specific.) 2052 */ 2053 public AuditEventEntityComponent setReferenceTarget(Resource value) { 2054 this.referenceTarget = value; 2055 return this; 2056 } 2057 2058 /** 2059 * @return {@link #type} (The type of the object that was involved in this audit event.) 2060 */ 2061 public Coding getType() { 2062 if (this.type == null) 2063 if (Configuration.errorOnAutoCreate()) 2064 throw new Error("Attempt to auto-create AuditEventEntityComponent.type"); 2065 else if (Configuration.doAutoCreate()) 2066 this.type = new Coding(); // cc 2067 return this.type; 2068 } 2069 2070 public boolean hasType() { 2071 return this.type != null && !this.type.isEmpty(); 2072 } 2073 2074 /** 2075 * @param value {@link #type} (The type of the object that was involved in this audit event.) 2076 */ 2077 public AuditEventEntityComponent setType(Coding value) { 2078 this.type = value; 2079 return this; 2080 } 2081 2082 /** 2083 * @return {@link #role} (Code representing the role the entity played in the event being audited.) 2084 */ 2085 public Coding getRole() { 2086 if (this.role == null) 2087 if (Configuration.errorOnAutoCreate()) 2088 throw new Error("Attempt to auto-create AuditEventEntityComponent.role"); 2089 else if (Configuration.doAutoCreate()) 2090 this.role = new Coding(); // cc 2091 return this.role; 2092 } 2093 2094 public boolean hasRole() { 2095 return this.role != null && !this.role.isEmpty(); 2096 } 2097 2098 /** 2099 * @param value {@link #role} (Code representing the role the entity played in the event being audited.) 2100 */ 2101 public AuditEventEntityComponent setRole(Coding value) { 2102 this.role = value; 2103 return this; 2104 } 2105 2106 /** 2107 * @return {@link #lifecycle} (Identifier for the data life-cycle stage for the entity.) 2108 */ 2109 public Coding getLifecycle() { 2110 if (this.lifecycle == null) 2111 if (Configuration.errorOnAutoCreate()) 2112 throw new Error("Attempt to auto-create AuditEventEntityComponent.lifecycle"); 2113 else if (Configuration.doAutoCreate()) 2114 this.lifecycle = new Coding(); // cc 2115 return this.lifecycle; 2116 } 2117 2118 public boolean hasLifecycle() { 2119 return this.lifecycle != null && !this.lifecycle.isEmpty(); 2120 } 2121 2122 /** 2123 * @param value {@link #lifecycle} (Identifier for the data life-cycle stage for the entity.) 2124 */ 2125 public AuditEventEntityComponent setLifecycle(Coding value) { 2126 this.lifecycle = value; 2127 return this; 2128 } 2129 2130 /** 2131 * @return {@link #securityLabel} (Security labels for the identified entity.) 2132 */ 2133 public List<Coding> getSecurityLabel() { 2134 if (this.securityLabel == null) 2135 this.securityLabel = new ArrayList<Coding>(); 2136 return this.securityLabel; 2137 } 2138 2139 /** 2140 * @return Returns a reference to <code>this</code> for easy method chaining 2141 */ 2142 public AuditEventEntityComponent setSecurityLabel(List<Coding> theSecurityLabel) { 2143 this.securityLabel = theSecurityLabel; 2144 return this; 2145 } 2146 2147 public boolean hasSecurityLabel() { 2148 if (this.securityLabel == null) 2149 return false; 2150 for (Coding item : this.securityLabel) 2151 if (!item.isEmpty()) 2152 return true; 2153 return false; 2154 } 2155 2156 public Coding addSecurityLabel() { //3 2157 Coding t = new Coding(); 2158 if (this.securityLabel == null) 2159 this.securityLabel = new ArrayList<Coding>(); 2160 this.securityLabel.add(t); 2161 return t; 2162 } 2163 2164 public AuditEventEntityComponent addSecurityLabel(Coding t) { //3 2165 if (t == null) 2166 return this; 2167 if (this.securityLabel == null) 2168 this.securityLabel = new ArrayList<Coding>(); 2169 this.securityLabel.add(t); 2170 return this; 2171 } 2172 2173 /** 2174 * @return The first repetition of repeating field {@link #securityLabel}, creating it if it does not already exist 2175 */ 2176 public Coding getSecurityLabelFirstRep() { 2177 if (getSecurityLabel().isEmpty()) { 2178 addSecurityLabel(); 2179 } 2180 return getSecurityLabel().get(0); 2181 } 2182 2183 /** 2184 * @return {@link #name} (A name of the entity in the audit event.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 2185 */ 2186 public StringType getNameElement() { 2187 if (this.name == null) 2188 if (Configuration.errorOnAutoCreate()) 2189 throw new Error("Attempt to auto-create AuditEventEntityComponent.name"); 2190 else if (Configuration.doAutoCreate()) 2191 this.name = new StringType(); // bb 2192 return this.name; 2193 } 2194 2195 public boolean hasNameElement() { 2196 return this.name != null && !this.name.isEmpty(); 2197 } 2198 2199 public boolean hasName() { 2200 return this.name != null && !this.name.isEmpty(); 2201 } 2202 2203 /** 2204 * @param value {@link #name} (A name of the entity in the audit event.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 2205 */ 2206 public AuditEventEntityComponent setNameElement(StringType value) { 2207 this.name = value; 2208 return this; 2209 } 2210 2211 /** 2212 * @return A name of the entity in the audit event. 2213 */ 2214 public String getName() { 2215 return this.name == null ? null : this.name.getValue(); 2216 } 2217 2218 /** 2219 * @param value A name of the entity in the audit event. 2220 */ 2221 public AuditEventEntityComponent setName(String value) { 2222 if (Utilities.noString(value)) 2223 this.name = null; 2224 else { 2225 if (this.name == null) 2226 this.name = new StringType(); 2227 this.name.setValue(value); 2228 } 2229 return this; 2230 } 2231 2232 /** 2233 * @return {@link #description} (Text that describes the entity in more detail.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2234 */ 2235 public StringType getDescriptionElement() { 2236 if (this.description == null) 2237 if (Configuration.errorOnAutoCreate()) 2238 throw new Error("Attempt to auto-create AuditEventEntityComponent.description"); 2239 else if (Configuration.doAutoCreate()) 2240 this.description = new StringType(); // bb 2241 return this.description; 2242 } 2243 2244 public boolean hasDescriptionElement() { 2245 return this.description != null && !this.description.isEmpty(); 2246 } 2247 2248 public boolean hasDescription() { 2249 return this.description != null && !this.description.isEmpty(); 2250 } 2251 2252 /** 2253 * @param value {@link #description} (Text that describes the entity in more detail.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2254 */ 2255 public AuditEventEntityComponent setDescriptionElement(StringType value) { 2256 this.description = value; 2257 return this; 2258 } 2259 2260 /** 2261 * @return Text that describes the entity in more detail. 2262 */ 2263 public String getDescription() { 2264 return this.description == null ? null : this.description.getValue(); 2265 } 2266 2267 /** 2268 * @param value Text that describes the entity in more detail. 2269 */ 2270 public AuditEventEntityComponent setDescription(String value) { 2271 if (Utilities.noString(value)) 2272 this.description = null; 2273 else { 2274 if (this.description == null) 2275 this.description = new StringType(); 2276 this.description.setValue(value); 2277 } 2278 return this; 2279 } 2280 2281 /** 2282 * @return {@link #query} (The query parameters for a query-type entities.). This is the underlying object with id, value and extensions. The accessor "getQuery" gives direct access to the value 2283 */ 2284 public Base64BinaryType getQueryElement() { 2285 if (this.query == null) 2286 if (Configuration.errorOnAutoCreate()) 2287 throw new Error("Attempt to auto-create AuditEventEntityComponent.query"); 2288 else if (Configuration.doAutoCreate()) 2289 this.query = new Base64BinaryType(); // bb 2290 return this.query; 2291 } 2292 2293 public boolean hasQueryElement() { 2294 return this.query != null && !this.query.isEmpty(); 2295 } 2296 2297 public boolean hasQuery() { 2298 return this.query != null && !this.query.isEmpty(); 2299 } 2300 2301 /** 2302 * @param value {@link #query} (The query parameters for a query-type entities.). This is the underlying object with id, value and extensions. The accessor "getQuery" gives direct access to the value 2303 */ 2304 public AuditEventEntityComponent setQueryElement(Base64BinaryType value) { 2305 this.query = value; 2306 return this; 2307 } 2308 2309 /** 2310 * @return The query parameters for a query-type entities. 2311 */ 2312 public byte[] getQuery() { 2313 return this.query == null ? null : this.query.getValue(); 2314 } 2315 2316 /** 2317 * @param value The query parameters for a query-type entities. 2318 */ 2319 public AuditEventEntityComponent setQuery(byte[] value) { 2320 if (value == null) 2321 this.query = null; 2322 else { 2323 if (this.query == null) 2324 this.query = new Base64BinaryType(); 2325 this.query.setValue(value); 2326 } 2327 return this; 2328 } 2329 2330 /** 2331 * @return {@link #detail} (Tagged value pairs for conveying additional information about the entity.) 2332 */ 2333 public List<AuditEventEntityDetailComponent> getDetail() { 2334 if (this.detail == null) 2335 this.detail = new ArrayList<AuditEventEntityDetailComponent>(); 2336 return this.detail; 2337 } 2338 2339 /** 2340 * @return Returns a reference to <code>this</code> for easy method chaining 2341 */ 2342 public AuditEventEntityComponent setDetail(List<AuditEventEntityDetailComponent> theDetail) { 2343 this.detail = theDetail; 2344 return this; 2345 } 2346 2347 public boolean hasDetail() { 2348 if (this.detail == null) 2349 return false; 2350 for (AuditEventEntityDetailComponent item : this.detail) 2351 if (!item.isEmpty()) 2352 return true; 2353 return false; 2354 } 2355 2356 public AuditEventEntityDetailComponent addDetail() { //3 2357 AuditEventEntityDetailComponent t = new AuditEventEntityDetailComponent(); 2358 if (this.detail == null) 2359 this.detail = new ArrayList<AuditEventEntityDetailComponent>(); 2360 this.detail.add(t); 2361 return t; 2362 } 2363 2364 public AuditEventEntityComponent addDetail(AuditEventEntityDetailComponent t) { //3 2365 if (t == null) 2366 return this; 2367 if (this.detail == null) 2368 this.detail = new ArrayList<AuditEventEntityDetailComponent>(); 2369 this.detail.add(t); 2370 return this; 2371 } 2372 2373 /** 2374 * @return The first repetition of repeating field {@link #detail}, creating it if it does not already exist 2375 */ 2376 public AuditEventEntityDetailComponent getDetailFirstRep() { 2377 if (getDetail().isEmpty()) { 2378 addDetail(); 2379 } 2380 return getDetail().get(0); 2381 } 2382 2383 protected void listChildren(List<Property> children) { 2384 super.listChildren(children); 2385 children.add(new Property("identifier", "Identifier", "Identifies a specific instance of the entity. The reference should always be version specific.", 0, 1, identifier)); 2386 children.add(new Property("reference", "Reference(Any)", "Identifies a specific instance of the entity. The reference should be version specific.", 0, 1, reference)); 2387 children.add(new Property("type", "Coding", "The type of the object that was involved in this audit event.", 0, 1, type)); 2388 children.add(new Property("role", "Coding", "Code representing the role the entity played in the event being audited.", 0, 1, role)); 2389 children.add(new Property("lifecycle", "Coding", "Identifier for the data life-cycle stage for the entity.", 0, 1, lifecycle)); 2390 children.add(new Property("securityLabel", "Coding", "Security labels for the identified entity.", 0, java.lang.Integer.MAX_VALUE, securityLabel)); 2391 children.add(new Property("name", "string", "A name of the entity in the audit event.", 0, 1, name)); 2392 children.add(new Property("description", "string", "Text that describes the entity in more detail.", 0, 1, description)); 2393 children.add(new Property("query", "base64Binary", "The query parameters for a query-type entities.", 0, 1, query)); 2394 children.add(new Property("detail", "", "Tagged value pairs for conveying additional information about the entity.", 0, java.lang.Integer.MAX_VALUE, detail)); 2395 } 2396 2397 @Override 2398 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2399 switch (_hash) { 2400 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Identifies a specific instance of the entity. The reference should always be version specific.", 0, 1, identifier); 2401 case -925155509: /*reference*/ return new Property("reference", "Reference(Any)", "Identifies a specific instance of the entity. The reference should be version specific.", 0, 1, reference); 2402 case 3575610: /*type*/ return new Property("type", "Coding", "The type of the object that was involved in this audit event.", 0, 1, type); 2403 case 3506294: /*role*/ return new Property("role", "Coding", "Code representing the role the entity played in the event being audited.", 0, 1, role); 2404 case -302323862: /*lifecycle*/ return new Property("lifecycle", "Coding", "Identifier for the data life-cycle stage for the entity.", 0, 1, lifecycle); 2405 case -722296940: /*securityLabel*/ return new Property("securityLabel", "Coding", "Security labels for the identified entity.", 0, java.lang.Integer.MAX_VALUE, securityLabel); 2406 case 3373707: /*name*/ return new Property("name", "string", "A name of the entity in the audit event.", 0, 1, name); 2407 case -1724546052: /*description*/ return new Property("description", "string", "Text that describes the entity in more detail.", 0, 1, description); 2408 case 107944136: /*query*/ return new Property("query", "base64Binary", "The query parameters for a query-type entities.", 0, 1, query); 2409 case -1335224239: /*detail*/ return new Property("detail", "", "Tagged value pairs for conveying additional information about the entity.", 0, java.lang.Integer.MAX_VALUE, detail); 2410 default: return super.getNamedProperty(_hash, _name, _checkValid); 2411 } 2412 2413 } 2414 2415 @Override 2416 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2417 switch (hash) { 2418 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 2419 case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // Reference 2420 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding 2421 case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // Coding 2422 case -302323862: /*lifecycle*/ return this.lifecycle == null ? new Base[0] : new Base[] {this.lifecycle}; // Coding 2423 case -722296940: /*securityLabel*/ return this.securityLabel == null ? new Base[0] : this.securityLabel.toArray(new Base[this.securityLabel.size()]); // Coding 2424 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 2425 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 2426 case 107944136: /*query*/ return this.query == null ? new Base[0] : new Base[] {this.query}; // Base64BinaryType 2427 case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : this.detail.toArray(new Base[this.detail.size()]); // AuditEventEntityDetailComponent 2428 default: return super.getProperty(hash, name, checkValid); 2429 } 2430 2431 } 2432 2433 @Override 2434 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2435 switch (hash) { 2436 case -1618432855: // identifier 2437 this.identifier = castToIdentifier(value); // Identifier 2438 return value; 2439 case -925155509: // reference 2440 this.reference = castToReference(value); // Reference 2441 return value; 2442 case 3575610: // type 2443 this.type = castToCoding(value); // Coding 2444 return value; 2445 case 3506294: // role 2446 this.role = castToCoding(value); // Coding 2447 return value; 2448 case -302323862: // lifecycle 2449 this.lifecycle = castToCoding(value); // Coding 2450 return value; 2451 case -722296940: // securityLabel 2452 this.getSecurityLabel().add(castToCoding(value)); // Coding 2453 return value; 2454 case 3373707: // name 2455 this.name = castToString(value); // StringType 2456 return value; 2457 case -1724546052: // description 2458 this.description = castToString(value); // StringType 2459 return value; 2460 case 107944136: // query 2461 this.query = castToBase64Binary(value); // Base64BinaryType 2462 return value; 2463 case -1335224239: // detail 2464 this.getDetail().add((AuditEventEntityDetailComponent) value); // AuditEventEntityDetailComponent 2465 return value; 2466 default: return super.setProperty(hash, name, value); 2467 } 2468 2469 } 2470 2471 @Override 2472 public Base setProperty(String name, Base value) throws FHIRException { 2473 if (name.equals("identifier")) { 2474 this.identifier = castToIdentifier(value); // Identifier 2475 } else if (name.equals("reference")) { 2476 this.reference = castToReference(value); // Reference 2477 } else if (name.equals("type")) { 2478 this.type = castToCoding(value); // Coding 2479 } else if (name.equals("role")) { 2480 this.role = castToCoding(value); // Coding 2481 } else if (name.equals("lifecycle")) { 2482 this.lifecycle = castToCoding(value); // Coding 2483 } else if (name.equals("securityLabel")) { 2484 this.getSecurityLabel().add(castToCoding(value)); 2485 } else if (name.equals("name")) { 2486 this.name = castToString(value); // StringType 2487 } else if (name.equals("description")) { 2488 this.description = castToString(value); // StringType 2489 } else if (name.equals("query")) { 2490 this.query = castToBase64Binary(value); // Base64BinaryType 2491 } else if (name.equals("detail")) { 2492 this.getDetail().add((AuditEventEntityDetailComponent) value); 2493 } else 2494 return super.setProperty(name, value); 2495 return value; 2496 } 2497 2498 @Override 2499 public Base makeProperty(int hash, String name) throws FHIRException { 2500 switch (hash) { 2501 case -1618432855: return getIdentifier(); 2502 case -925155509: return getReference(); 2503 case 3575610: return getType(); 2504 case 3506294: return getRole(); 2505 case -302323862: return getLifecycle(); 2506 case -722296940: return addSecurityLabel(); 2507 case 3373707: return getNameElement(); 2508 case -1724546052: return getDescriptionElement(); 2509 case 107944136: return getQueryElement(); 2510 case -1335224239: return addDetail(); 2511 default: return super.makeProperty(hash, name); 2512 } 2513 2514 } 2515 2516 @Override 2517 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2518 switch (hash) { 2519 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 2520 case -925155509: /*reference*/ return new String[] {"Reference"}; 2521 case 3575610: /*type*/ return new String[] {"Coding"}; 2522 case 3506294: /*role*/ return new String[] {"Coding"}; 2523 case -302323862: /*lifecycle*/ return new String[] {"Coding"}; 2524 case -722296940: /*securityLabel*/ return new String[] {"Coding"}; 2525 case 3373707: /*name*/ return new String[] {"string"}; 2526 case -1724546052: /*description*/ return new String[] {"string"}; 2527 case 107944136: /*query*/ return new String[] {"base64Binary"}; 2528 case -1335224239: /*detail*/ return new String[] {}; 2529 default: return super.getTypesForProperty(hash, name); 2530 } 2531 2532 } 2533 2534 @Override 2535 public Base addChild(String name) throws FHIRException { 2536 if (name.equals("identifier")) { 2537 this.identifier = new Identifier(); 2538 return this.identifier; 2539 } 2540 else if (name.equals("reference")) { 2541 this.reference = new Reference(); 2542 return this.reference; 2543 } 2544 else if (name.equals("type")) { 2545 this.type = new Coding(); 2546 return this.type; 2547 } 2548 else if (name.equals("role")) { 2549 this.role = new Coding(); 2550 return this.role; 2551 } 2552 else if (name.equals("lifecycle")) { 2553 this.lifecycle = new Coding(); 2554 return this.lifecycle; 2555 } 2556 else if (name.equals("securityLabel")) { 2557 return addSecurityLabel(); 2558 } 2559 else if (name.equals("name")) { 2560 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.name"); 2561 } 2562 else if (name.equals("description")) { 2563 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.description"); 2564 } 2565 else if (name.equals("query")) { 2566 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.query"); 2567 } 2568 else if (name.equals("detail")) { 2569 return addDetail(); 2570 } 2571 else 2572 return super.addChild(name); 2573 } 2574 2575 public AuditEventEntityComponent copy() { 2576 AuditEventEntityComponent dst = new AuditEventEntityComponent(); 2577 copyValues(dst); 2578 dst.identifier = identifier == null ? null : identifier.copy(); 2579 dst.reference = reference == null ? null : reference.copy(); 2580 dst.type = type == null ? null : type.copy(); 2581 dst.role = role == null ? null : role.copy(); 2582 dst.lifecycle = lifecycle == null ? null : lifecycle.copy(); 2583 if (securityLabel != null) { 2584 dst.securityLabel = new ArrayList<Coding>(); 2585 for (Coding i : securityLabel) 2586 dst.securityLabel.add(i.copy()); 2587 }; 2588 dst.name = name == null ? null : name.copy(); 2589 dst.description = description == null ? null : description.copy(); 2590 dst.query = query == null ? null : query.copy(); 2591 if (detail != null) { 2592 dst.detail = new ArrayList<AuditEventEntityDetailComponent>(); 2593 for (AuditEventEntityDetailComponent i : detail) 2594 dst.detail.add(i.copy()); 2595 }; 2596 return dst; 2597 } 2598 2599 @Override 2600 public boolean equalsDeep(Base other_) { 2601 if (!super.equalsDeep(other_)) 2602 return false; 2603 if (!(other_ instanceof AuditEventEntityComponent)) 2604 return false; 2605 AuditEventEntityComponent o = (AuditEventEntityComponent) other_; 2606 return compareDeep(identifier, o.identifier, true) && compareDeep(reference, o.reference, true) 2607 && compareDeep(type, o.type, true) && compareDeep(role, o.role, true) && compareDeep(lifecycle, o.lifecycle, true) 2608 && compareDeep(securityLabel, o.securityLabel, true) && compareDeep(name, o.name, true) && compareDeep(description, o.description, true) 2609 && compareDeep(query, o.query, true) && compareDeep(detail, o.detail, true); 2610 } 2611 2612 @Override 2613 public boolean equalsShallow(Base other_) { 2614 if (!super.equalsShallow(other_)) 2615 return false; 2616 if (!(other_ instanceof AuditEventEntityComponent)) 2617 return false; 2618 AuditEventEntityComponent o = (AuditEventEntityComponent) other_; 2619 return compareValues(name, o.name, true) && compareValues(description, o.description, true) && compareValues(query, o.query, true) 2620 ; 2621 } 2622 2623 public boolean isEmpty() { 2624 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, reference, type 2625 , role, lifecycle, securityLabel, name, description, query, detail); 2626 } 2627 2628 public String fhirType() { 2629 return "AuditEvent.entity"; 2630 2631 } 2632 2633 } 2634 2635 @Block() 2636 public static class AuditEventEntityDetailComponent extends BackboneElement implements IBaseBackboneElement { 2637 /** 2638 * The type of extra detail provided in the value. 2639 */ 2640 @Child(name = "type", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 2641 @Description(shortDefinition="Name of the property", formalDefinition="The type of extra detail provided in the value." ) 2642 protected StringType type; 2643 2644 /** 2645 * The value of the extra detail. 2646 */ 2647 @Child(name = "value", type = {StringType.class, Base64BinaryType.class}, order=2, min=1, max=1, modifier=false, summary=false) 2648 @Description(shortDefinition="Property value", formalDefinition="The value of the extra detail." ) 2649 protected Type value; 2650 2651 private static final long serialVersionUID = -1035059584L; 2652 2653 /** 2654 * Constructor 2655 */ 2656 public AuditEventEntityDetailComponent() { 2657 super(); 2658 } 2659 2660 /** 2661 * Constructor 2662 */ 2663 public AuditEventEntityDetailComponent(StringType type, Type value) { 2664 super(); 2665 this.type = type; 2666 this.value = value; 2667 } 2668 2669 /** 2670 * @return {@link #type} (The type of extra detail provided in the value.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 2671 */ 2672 public StringType getTypeElement() { 2673 if (this.type == null) 2674 if (Configuration.errorOnAutoCreate()) 2675 throw new Error("Attempt to auto-create AuditEventEntityDetailComponent.type"); 2676 else if (Configuration.doAutoCreate()) 2677 this.type = new StringType(); // bb 2678 return this.type; 2679 } 2680 2681 public boolean hasTypeElement() { 2682 return this.type != null && !this.type.isEmpty(); 2683 } 2684 2685 public boolean hasType() { 2686 return this.type != null && !this.type.isEmpty(); 2687 } 2688 2689 /** 2690 * @param value {@link #type} (The type of extra detail provided in the value.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 2691 */ 2692 public AuditEventEntityDetailComponent setTypeElement(StringType value) { 2693 this.type = value; 2694 return this; 2695 } 2696 2697 /** 2698 * @return The type of extra detail provided in the value. 2699 */ 2700 public String getType() { 2701 return this.type == null ? null : this.type.getValue(); 2702 } 2703 2704 /** 2705 * @param value The type of extra detail provided in the value. 2706 */ 2707 public AuditEventEntityDetailComponent setType(String value) { 2708 if (this.type == null) 2709 this.type = new StringType(); 2710 this.type.setValue(value); 2711 return this; 2712 } 2713 2714 /** 2715 * @return {@link #value} (The value of the extra detail.) 2716 */ 2717 public Type getValue() { 2718 return this.value; 2719 } 2720 2721 /** 2722 * @return {@link #value} (The value of the extra detail.) 2723 */ 2724 public StringType getValueStringType() throws FHIRException { 2725 if (this.value == null) 2726 return null; 2727 if (!(this.value instanceof StringType)) 2728 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); 2729 return (StringType) this.value; 2730 } 2731 2732 public boolean hasValueStringType() { 2733 return this != null && this.value instanceof StringType; 2734 } 2735 2736 /** 2737 * @return {@link #value} (The value of the extra detail.) 2738 */ 2739 public Base64BinaryType getValueBase64BinaryType() throws FHIRException { 2740 if (this.value == null) 2741 return null; 2742 if (!(this.value instanceof Base64BinaryType)) 2743 throw new FHIRException("Type mismatch: the type Base64BinaryType was expected, but "+this.value.getClass().getName()+" was encountered"); 2744 return (Base64BinaryType) this.value; 2745 } 2746 2747 public boolean hasValueBase64BinaryType() { 2748 return this != null && this.value instanceof Base64BinaryType; 2749 } 2750 2751 public boolean hasValue() { 2752 return this.value != null && !this.value.isEmpty(); 2753 } 2754 2755 /** 2756 * @param value {@link #value} (The value of the extra detail.) 2757 */ 2758 public AuditEventEntityDetailComponent setValue(Type value) { 2759 if (value != null && !(value instanceof StringType || value instanceof Base64BinaryType)) 2760 throw new Error("Not the right type for AuditEvent.entity.detail.value[x]: "+value.fhirType()); 2761 this.value = value; 2762 return this; 2763 } 2764 2765 protected void listChildren(List<Property> children) { 2766 super.listChildren(children); 2767 children.add(new Property("type", "string", "The type of extra detail provided in the value.", 0, 1, type)); 2768 children.add(new Property("value[x]", "string|base64Binary", "The value of the extra detail.", 0, 1, value)); 2769 } 2770 2771 @Override 2772 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2773 switch (_hash) { 2774 case 3575610: /*type*/ return new Property("type", "string", "The type of extra detail provided in the value.", 0, 1, type); 2775 case -1410166417: /*value[x]*/ return new Property("value[x]", "string|base64Binary", "The value of the extra detail.", 0, 1, value); 2776 case 111972721: /*value*/ return new Property("value[x]", "string|base64Binary", "The value of the extra detail.", 0, 1, value); 2777 case -1424603934: /*valueString*/ return new Property("value[x]", "string|base64Binary", "The value of the extra detail.", 0, 1, value); 2778 case -1535024575: /*valueBase64Binary*/ return new Property("value[x]", "string|base64Binary", "The value of the extra detail.", 0, 1, value); 2779 default: return super.getNamedProperty(_hash, _name, _checkValid); 2780 } 2781 2782 } 2783 2784 @Override 2785 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2786 switch (hash) { 2787 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // StringType 2788 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Type 2789 default: return super.getProperty(hash, name, checkValid); 2790 } 2791 2792 } 2793 2794 @Override 2795 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2796 switch (hash) { 2797 case 3575610: // type 2798 this.type = castToString(value); // StringType 2799 return value; 2800 case 111972721: // value 2801 this.value = castToType(value); // Type 2802 return value; 2803 default: return super.setProperty(hash, name, value); 2804 } 2805 2806 } 2807 2808 @Override 2809 public Base setProperty(String name, Base value) throws FHIRException { 2810 if (name.equals("type")) { 2811 this.type = castToString(value); // StringType 2812 } else if (name.equals("value[x]")) { 2813 this.value = castToType(value); // Type 2814 } else 2815 return super.setProperty(name, value); 2816 return value; 2817 } 2818 2819 @Override 2820 public Base makeProperty(int hash, String name) throws FHIRException { 2821 switch (hash) { 2822 case 3575610: return getTypeElement(); 2823 case -1410166417: return getValue(); 2824 case 111972721: return getValue(); 2825 default: return super.makeProperty(hash, name); 2826 } 2827 2828 } 2829 2830 @Override 2831 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2832 switch (hash) { 2833 case 3575610: /*type*/ return new String[] {"string"}; 2834 case 111972721: /*value*/ return new String[] {"string", "base64Binary"}; 2835 default: return super.getTypesForProperty(hash, name); 2836 } 2837 2838 } 2839 2840 @Override 2841 public Base addChild(String name) throws FHIRException { 2842 if (name.equals("type")) { 2843 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.type"); 2844 } 2845 else if (name.equals("valueString")) { 2846 this.value = new StringType(); 2847 return this.value; 2848 } 2849 else if (name.equals("valueBase64Binary")) { 2850 this.value = new Base64BinaryType(); 2851 return this.value; 2852 } 2853 else 2854 return super.addChild(name); 2855 } 2856 2857 public AuditEventEntityDetailComponent copy() { 2858 AuditEventEntityDetailComponent dst = new AuditEventEntityDetailComponent(); 2859 copyValues(dst); 2860 dst.type = type == null ? null : type.copy(); 2861 dst.value = value == null ? null : value.copy(); 2862 return dst; 2863 } 2864 2865 @Override 2866 public boolean equalsDeep(Base other_) { 2867 if (!super.equalsDeep(other_)) 2868 return false; 2869 if (!(other_ instanceof AuditEventEntityDetailComponent)) 2870 return false; 2871 AuditEventEntityDetailComponent o = (AuditEventEntityDetailComponent) other_; 2872 return compareDeep(type, o.type, true) && compareDeep(value, o.value, true); 2873 } 2874 2875 @Override 2876 public boolean equalsShallow(Base other_) { 2877 if (!super.equalsShallow(other_)) 2878 return false; 2879 if (!(other_ instanceof AuditEventEntityDetailComponent)) 2880 return false; 2881 AuditEventEntityDetailComponent o = (AuditEventEntityDetailComponent) other_; 2882 return compareValues(type, o.type, true); 2883 } 2884 2885 public boolean isEmpty() { 2886 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value); 2887 } 2888 2889 public String fhirType() { 2890 return "AuditEvent.entity.detail"; 2891 2892 } 2893 2894 } 2895 2896 /** 2897 * Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function. 2898 */ 2899 @Child(name = "type", type = {Coding.class}, order=0, min=1, max=1, modifier=false, summary=true) 2900 @Description(shortDefinition="Type/identifier of event", formalDefinition="Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function." ) 2901 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/audit-event-type") 2902 protected Coding type; 2903 2904 /** 2905 * Identifier for the category of event. 2906 */ 2907 @Child(name = "subtype", type = {Coding.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2908 @Description(shortDefinition="More specific type/id for the event", formalDefinition="Identifier for the category of event." ) 2909 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/audit-event-sub-type") 2910 protected List<Coding> subtype; 2911 2912 /** 2913 * Indicator for type of action performed during the event that generated the audit. 2914 */ 2915 @Child(name = "action", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true) 2916 @Description(shortDefinition="Type of action performed during the event", formalDefinition="Indicator for type of action performed during the event that generated the audit." ) 2917 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/audit-event-action") 2918 protected Enumeration<AuditEventAction> action; 2919 2920 /** 2921 * The period during which the activity occurred. 2922 */ 2923 @Child(name = "period", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=false) 2924 @Description(shortDefinition="When the activity occurred", formalDefinition="The period during which the activity occurred." ) 2925 protected Period period; 2926 2927 /** 2928 * The time when the event was recorded. 2929 */ 2930 @Child(name = "recorded", type = {InstantType.class}, order=4, min=1, max=1, modifier=false, summary=true) 2931 @Description(shortDefinition="Time when the event was recorded", formalDefinition="The time when the event was recorded." ) 2932 protected InstantType recorded; 2933 2934 /** 2935 * Indicates whether the event succeeded or failed. 2936 */ 2937 @Child(name = "outcome", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=true) 2938 @Description(shortDefinition="Whether the event succeeded or failed", formalDefinition="Indicates whether the event succeeded or failed." ) 2939 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/audit-event-outcome") 2940 protected Enumeration<AuditEventOutcome> outcome; 2941 2942 /** 2943 * A free text description of the outcome of the event. 2944 */ 2945 @Child(name = "outcomeDesc", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) 2946 @Description(shortDefinition="Description of the event outcome", formalDefinition="A free text description of the outcome of the event." ) 2947 protected StringType outcomeDesc; 2948 2949 /** 2950 * The purposeOfUse (reason) that was used during the event being recorded. 2951 */ 2952 @Child(name = "purposeOfEvent", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2953 @Description(shortDefinition="The purposeOfUse of the event", formalDefinition="The purposeOfUse (reason) that was used during the event being recorded." ) 2954 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v3-PurposeOfUse") 2955 protected List<CodeableConcept> purposeOfEvent; 2956 2957 /** 2958 * An actor taking an active role in the event or activity that is logged. 2959 */ 2960 @Child(name = "agent", type = {}, order=8, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2961 @Description(shortDefinition="Actor involved in the event", formalDefinition="An actor taking an active role in the event or activity that is logged." ) 2962 protected List<AuditEventAgentComponent> agent; 2963 2964 /** 2965 * The system that is reporting the event. 2966 */ 2967 @Child(name = "source", type = {}, order=9, min=1, max=1, modifier=false, summary=false) 2968 @Description(shortDefinition="Audit Event Reporter", formalDefinition="The system that is reporting the event." ) 2969 protected AuditEventSourceComponent source; 2970 2971 /** 2972 * Specific instances of data or objects that have been accessed. 2973 */ 2974 @Child(name = "entity", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2975 @Description(shortDefinition="Data or objects used", formalDefinition="Specific instances of data or objects that have been accessed." ) 2976 protected List<AuditEventEntityComponent> entity; 2977 2978 private static final long serialVersionUID = 106433685L; 2979 2980 /** 2981 * Constructor 2982 */ 2983 public AuditEvent() { 2984 super(); 2985 } 2986 2987 /** 2988 * Constructor 2989 */ 2990 public AuditEvent(Coding type, InstantType recorded, AuditEventSourceComponent source) { 2991 super(); 2992 this.type = type; 2993 this.recorded = recorded; 2994 this.source = source; 2995 } 2996 2997 /** 2998 * @return {@link #type} (Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.) 2999 */ 3000 public Coding getType() { 3001 if (this.type == null) 3002 if (Configuration.errorOnAutoCreate()) 3003 throw new Error("Attempt to auto-create AuditEvent.type"); 3004 else if (Configuration.doAutoCreate()) 3005 this.type = new Coding(); // cc 3006 return this.type; 3007 } 3008 3009 public boolean hasType() { 3010 return this.type != null && !this.type.isEmpty(); 3011 } 3012 3013 /** 3014 * @param value {@link #type} (Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.) 3015 */ 3016 public AuditEvent setType(Coding value) { 3017 this.type = value; 3018 return this; 3019 } 3020 3021 /** 3022 * @return {@link #subtype} (Identifier for the category of event.) 3023 */ 3024 public List<Coding> getSubtype() { 3025 if (this.subtype == null) 3026 this.subtype = new ArrayList<Coding>(); 3027 return this.subtype; 3028 } 3029 3030 /** 3031 * @return Returns a reference to <code>this</code> for easy method chaining 3032 */ 3033 public AuditEvent setSubtype(List<Coding> theSubtype) { 3034 this.subtype = theSubtype; 3035 return this; 3036 } 3037 3038 public boolean hasSubtype() { 3039 if (this.subtype == null) 3040 return false; 3041 for (Coding item : this.subtype) 3042 if (!item.isEmpty()) 3043 return true; 3044 return false; 3045 } 3046 3047 public Coding addSubtype() { //3 3048 Coding t = new Coding(); 3049 if (this.subtype == null) 3050 this.subtype = new ArrayList<Coding>(); 3051 this.subtype.add(t); 3052 return t; 3053 } 3054 3055 public AuditEvent addSubtype(Coding t) { //3 3056 if (t == null) 3057 return this; 3058 if (this.subtype == null) 3059 this.subtype = new ArrayList<Coding>(); 3060 this.subtype.add(t); 3061 return this; 3062 } 3063 3064 /** 3065 * @return The first repetition of repeating field {@link #subtype}, creating it if it does not already exist 3066 */ 3067 public Coding getSubtypeFirstRep() { 3068 if (getSubtype().isEmpty()) { 3069 addSubtype(); 3070 } 3071 return getSubtype().get(0); 3072 } 3073 3074 /** 3075 * @return {@link #action} (Indicator for type of action performed during the event that generated the audit.). This is the underlying object with id, value and extensions. The accessor "getAction" gives direct access to the value 3076 */ 3077 public Enumeration<AuditEventAction> getActionElement() { 3078 if (this.action == null) 3079 if (Configuration.errorOnAutoCreate()) 3080 throw new Error("Attempt to auto-create AuditEvent.action"); 3081 else if (Configuration.doAutoCreate()) 3082 this.action = new Enumeration<AuditEventAction>(new AuditEventActionEnumFactory()); // bb 3083 return this.action; 3084 } 3085 3086 public boolean hasActionElement() { 3087 return this.action != null && !this.action.isEmpty(); 3088 } 3089 3090 public boolean hasAction() { 3091 return this.action != null && !this.action.isEmpty(); 3092 } 3093 3094 /** 3095 * @param value {@link #action} (Indicator for type of action performed during the event that generated the audit.). This is the underlying object with id, value and extensions. The accessor "getAction" gives direct access to the value 3096 */ 3097 public AuditEvent setActionElement(Enumeration<AuditEventAction> value) { 3098 this.action = value; 3099 return this; 3100 } 3101 3102 /** 3103 * @return Indicator for type of action performed during the event that generated the audit. 3104 */ 3105 public AuditEventAction getAction() { 3106 return this.action == null ? null : this.action.getValue(); 3107 } 3108 3109 /** 3110 * @param value Indicator for type of action performed during the event that generated the audit. 3111 */ 3112 public AuditEvent setAction(AuditEventAction value) { 3113 if (value == null) 3114 this.action = null; 3115 else { 3116 if (this.action == null) 3117 this.action = new Enumeration<AuditEventAction>(new AuditEventActionEnumFactory()); 3118 this.action.setValue(value); 3119 } 3120 return this; 3121 } 3122 3123 /** 3124 * @return {@link #period} (The period during which the activity occurred.) 3125 */ 3126 public Period getPeriod() { 3127 if (this.period == null) 3128 if (Configuration.errorOnAutoCreate()) 3129 throw new Error("Attempt to auto-create AuditEvent.period"); 3130 else if (Configuration.doAutoCreate()) 3131 this.period = new Period(); // cc 3132 return this.period; 3133 } 3134 3135 public boolean hasPeriod() { 3136 return this.period != null && !this.period.isEmpty(); 3137 } 3138 3139 /** 3140 * @param value {@link #period} (The period during which the activity occurred.) 3141 */ 3142 public AuditEvent setPeriod(Period value) { 3143 this.period = value; 3144 return this; 3145 } 3146 3147 /** 3148 * @return {@link #recorded} (The time when the event was recorded.). This is the underlying object with id, value and extensions. The accessor "getRecorded" gives direct access to the value 3149 */ 3150 public InstantType getRecordedElement() { 3151 if (this.recorded == null) 3152 if (Configuration.errorOnAutoCreate()) 3153 throw new Error("Attempt to auto-create AuditEvent.recorded"); 3154 else if (Configuration.doAutoCreate()) 3155 this.recorded = new InstantType(); // bb 3156 return this.recorded; 3157 } 3158 3159 public boolean hasRecordedElement() { 3160 return this.recorded != null && !this.recorded.isEmpty(); 3161 } 3162 3163 public boolean hasRecorded() { 3164 return this.recorded != null && !this.recorded.isEmpty(); 3165 } 3166 3167 /** 3168 * @param value {@link #recorded} (The time when the event was recorded.). This is the underlying object with id, value and extensions. The accessor "getRecorded" gives direct access to the value 3169 */ 3170 public AuditEvent setRecordedElement(InstantType value) { 3171 this.recorded = value; 3172 return this; 3173 } 3174 3175 /** 3176 * @return The time when the event was recorded. 3177 */ 3178 public Date getRecorded() { 3179 return this.recorded == null ? null : this.recorded.getValue(); 3180 } 3181 3182 /** 3183 * @param value The time when the event was recorded. 3184 */ 3185 public AuditEvent setRecorded(Date value) { 3186 if (this.recorded == null) 3187 this.recorded = new InstantType(); 3188 this.recorded.setValue(value); 3189 return this; 3190 } 3191 3192 /** 3193 * @return {@link #outcome} (Indicates whether the event succeeded or failed.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value 3194 */ 3195 public Enumeration<AuditEventOutcome> getOutcomeElement() { 3196 if (this.outcome == null) 3197 if (Configuration.errorOnAutoCreate()) 3198 throw new Error("Attempt to auto-create AuditEvent.outcome"); 3199 else if (Configuration.doAutoCreate()) 3200 this.outcome = new Enumeration<AuditEventOutcome>(new AuditEventOutcomeEnumFactory()); // bb 3201 return this.outcome; 3202 } 3203 3204 public boolean hasOutcomeElement() { 3205 return this.outcome != null && !this.outcome.isEmpty(); 3206 } 3207 3208 public boolean hasOutcome() { 3209 return this.outcome != null && !this.outcome.isEmpty(); 3210 } 3211 3212 /** 3213 * @param value {@link #outcome} (Indicates whether the event succeeded or failed.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value 3214 */ 3215 public AuditEvent setOutcomeElement(Enumeration<AuditEventOutcome> value) { 3216 this.outcome = value; 3217 return this; 3218 } 3219 3220 /** 3221 * @return Indicates whether the event succeeded or failed. 3222 */ 3223 public AuditEventOutcome getOutcome() { 3224 return this.outcome == null ? null : this.outcome.getValue(); 3225 } 3226 3227 /** 3228 * @param value Indicates whether the event succeeded or failed. 3229 */ 3230 public AuditEvent setOutcome(AuditEventOutcome value) { 3231 if (value == null) 3232 this.outcome = null; 3233 else { 3234 if (this.outcome == null) 3235 this.outcome = new Enumeration<AuditEventOutcome>(new AuditEventOutcomeEnumFactory()); 3236 this.outcome.setValue(value); 3237 } 3238 return this; 3239 } 3240 3241 /** 3242 * @return {@link #outcomeDesc} (A free text description of the outcome of the event.). This is the underlying object with id, value and extensions. The accessor "getOutcomeDesc" gives direct access to the value 3243 */ 3244 public StringType getOutcomeDescElement() { 3245 if (this.outcomeDesc == null) 3246 if (Configuration.errorOnAutoCreate()) 3247 throw new Error("Attempt to auto-create AuditEvent.outcomeDesc"); 3248 else if (Configuration.doAutoCreate()) 3249 this.outcomeDesc = new StringType(); // bb 3250 return this.outcomeDesc; 3251 } 3252 3253 public boolean hasOutcomeDescElement() { 3254 return this.outcomeDesc != null && !this.outcomeDesc.isEmpty(); 3255 } 3256 3257 public boolean hasOutcomeDesc() { 3258 return this.outcomeDesc != null && !this.outcomeDesc.isEmpty(); 3259 } 3260 3261 /** 3262 * @param value {@link #outcomeDesc} (A free text description of the outcome of the event.). This is the underlying object with id, value and extensions. The accessor "getOutcomeDesc" gives direct access to the value 3263 */ 3264 public AuditEvent setOutcomeDescElement(StringType value) { 3265 this.outcomeDesc = value; 3266 return this; 3267 } 3268 3269 /** 3270 * @return A free text description of the outcome of the event. 3271 */ 3272 public String getOutcomeDesc() { 3273 return this.outcomeDesc == null ? null : this.outcomeDesc.getValue(); 3274 } 3275 3276 /** 3277 * @param value A free text description of the outcome of the event. 3278 */ 3279 public AuditEvent setOutcomeDesc(String value) { 3280 if (Utilities.noString(value)) 3281 this.outcomeDesc = null; 3282 else { 3283 if (this.outcomeDesc == null) 3284 this.outcomeDesc = new StringType(); 3285 this.outcomeDesc.setValue(value); 3286 } 3287 return this; 3288 } 3289 3290 /** 3291 * @return {@link #purposeOfEvent} (The purposeOfUse (reason) that was used during the event being recorded.) 3292 */ 3293 public List<CodeableConcept> getPurposeOfEvent() { 3294 if (this.purposeOfEvent == null) 3295 this.purposeOfEvent = new ArrayList<CodeableConcept>(); 3296 return this.purposeOfEvent; 3297 } 3298 3299 /** 3300 * @return Returns a reference to <code>this</code> for easy method chaining 3301 */ 3302 public AuditEvent setPurposeOfEvent(List<CodeableConcept> thePurposeOfEvent) { 3303 this.purposeOfEvent = thePurposeOfEvent; 3304 return this; 3305 } 3306 3307 public boolean hasPurposeOfEvent() { 3308 if (this.purposeOfEvent == null) 3309 return false; 3310 for (CodeableConcept item : this.purposeOfEvent) 3311 if (!item.isEmpty()) 3312 return true; 3313 return false; 3314 } 3315 3316 public CodeableConcept addPurposeOfEvent() { //3 3317 CodeableConcept t = new CodeableConcept(); 3318 if (this.purposeOfEvent == null) 3319 this.purposeOfEvent = new ArrayList<CodeableConcept>(); 3320 this.purposeOfEvent.add(t); 3321 return t; 3322 } 3323 3324 public AuditEvent addPurposeOfEvent(CodeableConcept t) { //3 3325 if (t == null) 3326 return this; 3327 if (this.purposeOfEvent == null) 3328 this.purposeOfEvent = new ArrayList<CodeableConcept>(); 3329 this.purposeOfEvent.add(t); 3330 return this; 3331 } 3332 3333 /** 3334 * @return The first repetition of repeating field {@link #purposeOfEvent}, creating it if it does not already exist 3335 */ 3336 public CodeableConcept getPurposeOfEventFirstRep() { 3337 if (getPurposeOfEvent().isEmpty()) { 3338 addPurposeOfEvent(); 3339 } 3340 return getPurposeOfEvent().get(0); 3341 } 3342 3343 /** 3344 * @return {@link #agent} (An actor taking an active role in the event or activity that is logged.) 3345 */ 3346 public List<AuditEventAgentComponent> getAgent() { 3347 if (this.agent == null) 3348 this.agent = new ArrayList<AuditEventAgentComponent>(); 3349 return this.agent; 3350 } 3351 3352 /** 3353 * @return Returns a reference to <code>this</code> for easy method chaining 3354 */ 3355 public AuditEvent setAgent(List<AuditEventAgentComponent> theAgent) { 3356 this.agent = theAgent; 3357 return this; 3358 } 3359 3360 public boolean hasAgent() { 3361 if (this.agent == null) 3362 return false; 3363 for (AuditEventAgentComponent item : this.agent) 3364 if (!item.isEmpty()) 3365 return true; 3366 return false; 3367 } 3368 3369 public AuditEventAgentComponent addAgent() { //3 3370 AuditEventAgentComponent t = new AuditEventAgentComponent(); 3371 if (this.agent == null) 3372 this.agent = new ArrayList<AuditEventAgentComponent>(); 3373 this.agent.add(t); 3374 return t; 3375 } 3376 3377 public AuditEvent addAgent(AuditEventAgentComponent t) { //3 3378 if (t == null) 3379 return this; 3380 if (this.agent == null) 3381 this.agent = new ArrayList<AuditEventAgentComponent>(); 3382 this.agent.add(t); 3383 return this; 3384 } 3385 3386 /** 3387 * @return The first repetition of repeating field {@link #agent}, creating it if it does not already exist 3388 */ 3389 public AuditEventAgentComponent getAgentFirstRep() { 3390 if (getAgent().isEmpty()) { 3391 addAgent(); 3392 } 3393 return getAgent().get(0); 3394 } 3395 3396 /** 3397 * @return {@link #source} (The system that is reporting the event.) 3398 */ 3399 public AuditEventSourceComponent getSource() { 3400 if (this.source == null) 3401 if (Configuration.errorOnAutoCreate()) 3402 throw new Error("Attempt to auto-create AuditEvent.source"); 3403 else if (Configuration.doAutoCreate()) 3404 this.source = new AuditEventSourceComponent(); // cc 3405 return this.source; 3406 } 3407 3408 public boolean hasSource() { 3409 return this.source != null && !this.source.isEmpty(); 3410 } 3411 3412 /** 3413 * @param value {@link #source} (The system that is reporting the event.) 3414 */ 3415 public AuditEvent setSource(AuditEventSourceComponent value) { 3416 this.source = value; 3417 return this; 3418 } 3419 3420 /** 3421 * @return {@link #entity} (Specific instances of data or objects that have been accessed.) 3422 */ 3423 public List<AuditEventEntityComponent> getEntity() { 3424 if (this.entity == null) 3425 this.entity = new ArrayList<AuditEventEntityComponent>(); 3426 return this.entity; 3427 } 3428 3429 /** 3430 * @return Returns a reference to <code>this</code> for easy method chaining 3431 */ 3432 public AuditEvent setEntity(List<AuditEventEntityComponent> theEntity) { 3433 this.entity = theEntity; 3434 return this; 3435 } 3436 3437 public boolean hasEntity() { 3438 if (this.entity == null) 3439 return false; 3440 for (AuditEventEntityComponent item : this.entity) 3441 if (!item.isEmpty()) 3442 return true; 3443 return false; 3444 } 3445 3446 public AuditEventEntityComponent addEntity() { //3 3447 AuditEventEntityComponent t = new AuditEventEntityComponent(); 3448 if (this.entity == null) 3449 this.entity = new ArrayList<AuditEventEntityComponent>(); 3450 this.entity.add(t); 3451 return t; 3452 } 3453 3454 public AuditEvent addEntity(AuditEventEntityComponent t) { //3 3455 if (t == null) 3456 return this; 3457 if (this.entity == null) 3458 this.entity = new ArrayList<AuditEventEntityComponent>(); 3459 this.entity.add(t); 3460 return this; 3461 } 3462 3463 /** 3464 * @return The first repetition of repeating field {@link #entity}, creating it if it does not already exist 3465 */ 3466 public AuditEventEntityComponent getEntityFirstRep() { 3467 if (getEntity().isEmpty()) { 3468 addEntity(); 3469 } 3470 return getEntity().get(0); 3471 } 3472 3473 protected void listChildren(List<Property> children) { 3474 super.listChildren(children); 3475 children.add(new Property("type", "Coding", "Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.", 0, 1, type)); 3476 children.add(new Property("subtype", "Coding", "Identifier for the category of event.", 0, java.lang.Integer.MAX_VALUE, subtype)); 3477 children.add(new Property("action", "code", "Indicator for type of action performed during the event that generated the audit.", 0, 1, action)); 3478 children.add(new Property("period", "Period", "The period during which the activity occurred.", 0, 1, period)); 3479 children.add(new Property("recorded", "instant", "The time when the event was recorded.", 0, 1, recorded)); 3480 children.add(new Property("outcome", "code", "Indicates whether the event succeeded or failed.", 0, 1, outcome)); 3481 children.add(new Property("outcomeDesc", "string", "A free text description of the outcome of the event.", 0, 1, outcomeDesc)); 3482 children.add(new Property("purposeOfEvent", "CodeableConcept", "The purposeOfUse (reason) that was used during the event being recorded.", 0, java.lang.Integer.MAX_VALUE, purposeOfEvent)); 3483 children.add(new Property("agent", "", "An actor taking an active role in the event or activity that is logged.", 0, java.lang.Integer.MAX_VALUE, agent)); 3484 children.add(new Property("source", "", "The system that is reporting the event.", 0, 1, source)); 3485 children.add(new Property("entity", "", "Specific instances of data or objects that have been accessed.", 0, java.lang.Integer.MAX_VALUE, entity)); 3486 } 3487 3488 @Override 3489 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3490 switch (_hash) { 3491 case 3575610: /*type*/ return new Property("type", "Coding", "Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.", 0, 1, type); 3492 case -1867567750: /*subtype*/ return new Property("subtype", "Coding", "Identifier for the category of event.", 0, java.lang.Integer.MAX_VALUE, subtype); 3493 case -1422950858: /*action*/ return new Property("action", "code", "Indicator for type of action performed during the event that generated the audit.", 0, 1, action); 3494 case -991726143: /*period*/ return new Property("period", "Period", "The period during which the activity occurred.", 0, 1, period); 3495 case -799233872: /*recorded*/ return new Property("recorded", "instant", "The time when the event was recorded.", 0, 1, recorded); 3496 case -1106507950: /*outcome*/ return new Property("outcome", "code", "Indicates whether the event succeeded or failed.", 0, 1, outcome); 3497 case 1062502659: /*outcomeDesc*/ return new Property("outcomeDesc", "string", "A free text description of the outcome of the event.", 0, 1, outcomeDesc); 3498 case -341917691: /*purposeOfEvent*/ return new Property("purposeOfEvent", "CodeableConcept", "The purposeOfUse (reason) that was used during the event being recorded.", 0, java.lang.Integer.MAX_VALUE, purposeOfEvent); 3499 case 92750597: /*agent*/ return new Property("agent", "", "An actor taking an active role in the event or activity that is logged.", 0, java.lang.Integer.MAX_VALUE, agent); 3500 case -896505829: /*source*/ return new Property("source", "", "The system that is reporting the event.", 0, 1, source); 3501 case -1298275357: /*entity*/ return new Property("entity", "", "Specific instances of data or objects that have been accessed.", 0, java.lang.Integer.MAX_VALUE, entity); 3502 default: return super.getNamedProperty(_hash, _name, _checkValid); 3503 } 3504 3505 } 3506 3507 @Override 3508 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3509 switch (hash) { 3510 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding 3511 case -1867567750: /*subtype*/ return this.subtype == null ? new Base[0] : this.subtype.toArray(new Base[this.subtype.size()]); // Coding 3512 case -1422950858: /*action*/ return this.action == null ? new Base[0] : new Base[] {this.action}; // Enumeration<AuditEventAction> 3513 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 3514 case -799233872: /*recorded*/ return this.recorded == null ? new Base[0] : new Base[] {this.recorded}; // InstantType 3515 case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Enumeration<AuditEventOutcome> 3516 case 1062502659: /*outcomeDesc*/ return this.outcomeDesc == null ? new Base[0] : new Base[] {this.outcomeDesc}; // StringType 3517 case -341917691: /*purposeOfEvent*/ return this.purposeOfEvent == null ? new Base[0] : this.purposeOfEvent.toArray(new Base[this.purposeOfEvent.size()]); // CodeableConcept 3518 case 92750597: /*agent*/ return this.agent == null ? new Base[0] : this.agent.toArray(new Base[this.agent.size()]); // AuditEventAgentComponent 3519 case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // AuditEventSourceComponent 3520 case -1298275357: /*entity*/ return this.entity == null ? new Base[0] : this.entity.toArray(new Base[this.entity.size()]); // AuditEventEntityComponent 3521 default: return super.getProperty(hash, name, checkValid); 3522 } 3523 3524 } 3525 3526 @Override 3527 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3528 switch (hash) { 3529 case 3575610: // type 3530 this.type = castToCoding(value); // Coding 3531 return value; 3532 case -1867567750: // subtype 3533 this.getSubtype().add(castToCoding(value)); // Coding 3534 return value; 3535 case -1422950858: // action 3536 value = new AuditEventActionEnumFactory().fromType(castToCode(value)); 3537 this.action = (Enumeration) value; // Enumeration<AuditEventAction> 3538 return value; 3539 case -991726143: // period 3540 this.period = castToPeriod(value); // Period 3541 return value; 3542 case -799233872: // recorded 3543 this.recorded = castToInstant(value); // InstantType 3544 return value; 3545 case -1106507950: // outcome 3546 value = new AuditEventOutcomeEnumFactory().fromType(castToCode(value)); 3547 this.outcome = (Enumeration) value; // Enumeration<AuditEventOutcome> 3548 return value; 3549 case 1062502659: // outcomeDesc 3550 this.outcomeDesc = castToString(value); // StringType 3551 return value; 3552 case -341917691: // purposeOfEvent 3553 this.getPurposeOfEvent().add(castToCodeableConcept(value)); // CodeableConcept 3554 return value; 3555 case 92750597: // agent 3556 this.getAgent().add((AuditEventAgentComponent) value); // AuditEventAgentComponent 3557 return value; 3558 case -896505829: // source 3559 this.source = (AuditEventSourceComponent) value; // AuditEventSourceComponent 3560 return value; 3561 case -1298275357: // entity 3562 this.getEntity().add((AuditEventEntityComponent) value); // AuditEventEntityComponent 3563 return value; 3564 default: return super.setProperty(hash, name, value); 3565 } 3566 3567 } 3568 3569 @Override 3570 public Base setProperty(String name, Base value) throws FHIRException { 3571 if (name.equals("type")) { 3572 this.type = castToCoding(value); // Coding 3573 } else if (name.equals("subtype")) { 3574 this.getSubtype().add(castToCoding(value)); 3575 } else if (name.equals("action")) { 3576 value = new AuditEventActionEnumFactory().fromType(castToCode(value)); 3577 this.action = (Enumeration) value; // Enumeration<AuditEventAction> 3578 } else if (name.equals("period")) { 3579 this.period = castToPeriod(value); // Period 3580 } else if (name.equals("recorded")) { 3581 this.recorded = castToInstant(value); // InstantType 3582 } else if (name.equals("outcome")) { 3583 value = new AuditEventOutcomeEnumFactory().fromType(castToCode(value)); 3584 this.outcome = (Enumeration) value; // Enumeration<AuditEventOutcome> 3585 } else if (name.equals("outcomeDesc")) { 3586 this.outcomeDesc = castToString(value); // StringType 3587 } else if (name.equals("purposeOfEvent")) { 3588 this.getPurposeOfEvent().add(castToCodeableConcept(value)); 3589 } else if (name.equals("agent")) { 3590 this.getAgent().add((AuditEventAgentComponent) value); 3591 } else if (name.equals("source")) { 3592 this.source = (AuditEventSourceComponent) value; // AuditEventSourceComponent 3593 } else if (name.equals("entity")) { 3594 this.getEntity().add((AuditEventEntityComponent) value); 3595 } else 3596 return super.setProperty(name, value); 3597 return value; 3598 } 3599 3600 @Override 3601 public Base makeProperty(int hash, String name) throws FHIRException { 3602 switch (hash) { 3603 case 3575610: return getType(); 3604 case -1867567750: return addSubtype(); 3605 case -1422950858: return getActionElement(); 3606 case -991726143: return getPeriod(); 3607 case -799233872: return getRecordedElement(); 3608 case -1106507950: return getOutcomeElement(); 3609 case 1062502659: return getOutcomeDescElement(); 3610 case -341917691: return addPurposeOfEvent(); 3611 case 92750597: return addAgent(); 3612 case -896505829: return getSource(); 3613 case -1298275357: return addEntity(); 3614 default: return super.makeProperty(hash, name); 3615 } 3616 3617 } 3618 3619 @Override 3620 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3621 switch (hash) { 3622 case 3575610: /*type*/ return new String[] {"Coding"}; 3623 case -1867567750: /*subtype*/ return new String[] {"Coding"}; 3624 case -1422950858: /*action*/ return new String[] {"code"}; 3625 case -991726143: /*period*/ return new String[] {"Period"}; 3626 case -799233872: /*recorded*/ return new String[] {"instant"}; 3627 case -1106507950: /*outcome*/ return new String[] {"code"}; 3628 case 1062502659: /*outcomeDesc*/ return new String[] {"string"}; 3629 case -341917691: /*purposeOfEvent*/ return new String[] {"CodeableConcept"}; 3630 case 92750597: /*agent*/ return new String[] {}; 3631 case -896505829: /*source*/ return new String[] {}; 3632 case -1298275357: /*entity*/ return new String[] {}; 3633 default: return super.getTypesForProperty(hash, name); 3634 } 3635 3636 } 3637 3638 @Override 3639 public Base addChild(String name) throws FHIRException { 3640 if (name.equals("type")) { 3641 this.type = new Coding(); 3642 return this.type; 3643 } 3644 else if (name.equals("subtype")) { 3645 return addSubtype(); 3646 } 3647 else if (name.equals("action")) { 3648 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.action"); 3649 } 3650 else if (name.equals("period")) { 3651 this.period = new Period(); 3652 return this.period; 3653 } 3654 else if (name.equals("recorded")) { 3655 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.recorded"); 3656 } 3657 else if (name.equals("outcome")) { 3658 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.outcome"); 3659 } 3660 else if (name.equals("outcomeDesc")) { 3661 throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.outcomeDesc"); 3662 } 3663 else if (name.equals("purposeOfEvent")) { 3664 return addPurposeOfEvent(); 3665 } 3666 else if (name.equals("agent")) { 3667 return addAgent(); 3668 } 3669 else if (name.equals("source")) { 3670 this.source = new AuditEventSourceComponent(); 3671 return this.source; 3672 } 3673 else if (name.equals("entity")) { 3674 return addEntity(); 3675 } 3676 else 3677 return super.addChild(name); 3678 } 3679 3680 public String fhirType() { 3681 return "AuditEvent"; 3682 3683 } 3684 3685 public AuditEvent copy() { 3686 AuditEvent dst = new AuditEvent(); 3687 copyValues(dst); 3688 dst.type = type == null ? null : type.copy(); 3689 if (subtype != null) { 3690 dst.subtype = new ArrayList<Coding>(); 3691 for (Coding i : subtype) 3692 dst.subtype.add(i.copy()); 3693 }; 3694 dst.action = action == null ? null : action.copy(); 3695 dst.period = period == null ? null : period.copy(); 3696 dst.recorded = recorded == null ? null : recorded.copy(); 3697 dst.outcome = outcome == null ? null : outcome.copy(); 3698 dst.outcomeDesc = outcomeDesc == null ? null : outcomeDesc.copy(); 3699 if (purposeOfEvent != null) { 3700 dst.purposeOfEvent = new ArrayList<CodeableConcept>(); 3701 for (CodeableConcept i : purposeOfEvent) 3702 dst.purposeOfEvent.add(i.copy()); 3703 }; 3704 if (agent != null) { 3705 dst.agent = new ArrayList<AuditEventAgentComponent>(); 3706 for (AuditEventAgentComponent i : agent) 3707 dst.agent.add(i.copy()); 3708 }; 3709 dst.source = source == null ? null : source.copy(); 3710 if (entity != null) { 3711 dst.entity = new ArrayList<AuditEventEntityComponent>(); 3712 for (AuditEventEntityComponent i : entity) 3713 dst.entity.add(i.copy()); 3714 }; 3715 return dst; 3716 } 3717 3718 protected AuditEvent typedCopy() { 3719 return copy(); 3720 } 3721 3722 @Override 3723 public boolean equalsDeep(Base other_) { 3724 if (!super.equalsDeep(other_)) 3725 return false; 3726 if (!(other_ instanceof AuditEvent)) 3727 return false; 3728 AuditEvent o = (AuditEvent) other_; 3729 return compareDeep(type, o.type, true) && compareDeep(subtype, o.subtype, true) && compareDeep(action, o.action, true) 3730 && compareDeep(period, o.period, true) && compareDeep(recorded, o.recorded, true) && compareDeep(outcome, o.outcome, true) 3731 && compareDeep(outcomeDesc, o.outcomeDesc, true) && compareDeep(purposeOfEvent, o.purposeOfEvent, true) 3732 && compareDeep(agent, o.agent, true) && compareDeep(source, o.source, true) && compareDeep(entity, o.entity, true) 3733 ; 3734 } 3735 3736 @Override 3737 public boolean equalsShallow(Base other_) { 3738 if (!super.equalsShallow(other_)) 3739 return false; 3740 if (!(other_ instanceof AuditEvent)) 3741 return false; 3742 AuditEvent o = (AuditEvent) other_; 3743 return compareValues(action, o.action, true) && compareValues(recorded, o.recorded, true) && compareValues(outcome, o.outcome, true) 3744 && compareValues(outcomeDesc, o.outcomeDesc, true); 3745 } 3746 3747 public boolean isEmpty() { 3748 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, subtype, action, period 3749 , recorded, outcome, outcomeDesc, purposeOfEvent, agent, source, entity); 3750 } 3751 3752 @Override 3753 public ResourceType getResourceType() { 3754 return ResourceType.AuditEvent; 3755 } 3756 3757 /** 3758 * Search parameter: <b>date</b> 3759 * <p> 3760 * Description: <b>Time when the event was recorded</b><br> 3761 * Type: <b>date</b><br> 3762 * Path: <b>AuditEvent.recorded</b><br> 3763 * </p> 3764 */ 3765 @SearchParamDefinition(name="date", path="AuditEvent.recorded", description="Time when the event was recorded", type="date" ) 3766 public static final String SP_DATE = "date"; 3767 /** 3768 * <b>Fluent Client</b> search parameter constant for <b>date</b> 3769 * <p> 3770 * Description: <b>Time when the event was recorded</b><br> 3771 * Type: <b>date</b><br> 3772 * Path: <b>AuditEvent.recorded</b><br> 3773 * </p> 3774 */ 3775 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 3776 3777 /** 3778 * Search parameter: <b>entity-type</b> 3779 * <p> 3780 * Description: <b>Type of entity involved</b><br> 3781 * Type: <b>token</b><br> 3782 * Path: <b>AuditEvent.entity.type</b><br> 3783 * </p> 3784 */ 3785 @SearchParamDefinition(name="entity-type", path="AuditEvent.entity.type", description="Type of entity involved", type="token" ) 3786 public static final String SP_ENTITY_TYPE = "entity-type"; 3787 /** 3788 * <b>Fluent Client</b> search parameter constant for <b>entity-type</b> 3789 * <p> 3790 * Description: <b>Type of entity involved</b><br> 3791 * Type: <b>token</b><br> 3792 * Path: <b>AuditEvent.entity.type</b><br> 3793 * </p> 3794 */ 3795 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ENTITY_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ENTITY_TYPE); 3796 3797 /** 3798 * Search parameter: <b>agent</b> 3799 * <p> 3800 * Description: <b>Direct reference to resource</b><br> 3801 * Type: <b>reference</b><br> 3802 * Path: <b>AuditEvent.agent.reference</b><br> 3803 * </p> 3804 */ 3805 @SearchParamDefinition(name="agent", path="AuditEvent.agent.reference", description="Direct reference to resource", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) 3806 public static final String SP_AGENT = "agent"; 3807 /** 3808 * <b>Fluent Client</b> search parameter constant for <b>agent</b> 3809 * <p> 3810 * Description: <b>Direct reference to resource</b><br> 3811 * Type: <b>reference</b><br> 3812 * Path: <b>AuditEvent.agent.reference</b><br> 3813 * </p> 3814 */ 3815 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AGENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AGENT); 3816 3817/** 3818 * Constant for fluent queries to be used to add include statements. Specifies 3819 * the path value of "<b>AuditEvent:agent</b>". 3820 */ 3821 public static final ca.uhn.fhir.model.api.Include INCLUDE_AGENT = new ca.uhn.fhir.model.api.Include("AuditEvent:agent").toLocked(); 3822 3823 /** 3824 * Search parameter: <b>address</b> 3825 * <p> 3826 * Description: <b>Identifier for the network access point of the user device</b><br> 3827 * Type: <b>string</b><br> 3828 * Path: <b>AuditEvent.agent.network.address</b><br> 3829 * </p> 3830 */ 3831 @SearchParamDefinition(name="address", path="AuditEvent.agent.network.address", description="Identifier for the network access point of the user device", type="string" ) 3832 public static final String SP_ADDRESS = "address"; 3833 /** 3834 * <b>Fluent Client</b> search parameter constant for <b>address</b> 3835 * <p> 3836 * Description: <b>Identifier for the network access point of the user device</b><br> 3837 * Type: <b>string</b><br> 3838 * Path: <b>AuditEvent.agent.network.address</b><br> 3839 * </p> 3840 */ 3841 public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS); 3842 3843 /** 3844 * Search parameter: <b>entity-role</b> 3845 * <p> 3846 * Description: <b>What role the entity played</b><br> 3847 * Type: <b>token</b><br> 3848 * Path: <b>AuditEvent.entity.role</b><br> 3849 * </p> 3850 */ 3851 @SearchParamDefinition(name="entity-role", path="AuditEvent.entity.role", description="What role the entity played", type="token" ) 3852 public static final String SP_ENTITY_ROLE = "entity-role"; 3853 /** 3854 * <b>Fluent Client</b> search parameter constant for <b>entity-role</b> 3855 * <p> 3856 * Description: <b>What role the entity played</b><br> 3857 * Type: <b>token</b><br> 3858 * Path: <b>AuditEvent.entity.role</b><br> 3859 * </p> 3860 */ 3861 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ENTITY_ROLE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ENTITY_ROLE); 3862 3863 /** 3864 * Search parameter: <b>source</b> 3865 * <p> 3866 * Description: <b>The identity of source detecting the event</b><br> 3867 * Type: <b>token</b><br> 3868 * Path: <b>AuditEvent.source.identifier</b><br> 3869 * </p> 3870 */ 3871 @SearchParamDefinition(name="source", path="AuditEvent.source.identifier", description="The identity of source detecting the event", type="token" ) 3872 public static final String SP_SOURCE = "source"; 3873 /** 3874 * <b>Fluent Client</b> search parameter constant for <b>source</b> 3875 * <p> 3876 * Description: <b>The identity of source detecting the event</b><br> 3877 * Type: <b>token</b><br> 3878 * Path: <b>AuditEvent.source.identifier</b><br> 3879 * </p> 3880 */ 3881 public static final ca.uhn.fhir.rest.gclient.TokenClientParam SOURCE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SOURCE); 3882 3883 /** 3884 * Search parameter: <b>type</b> 3885 * <p> 3886 * Description: <b>Type/identifier of event</b><br> 3887 * Type: <b>token</b><br> 3888 * Path: <b>AuditEvent.type</b><br> 3889 * </p> 3890 */ 3891 @SearchParamDefinition(name="type", path="AuditEvent.type", description="Type/identifier of event", type="token" ) 3892 public static final String SP_TYPE = "type"; 3893 /** 3894 * <b>Fluent Client</b> search parameter constant for <b>type</b> 3895 * <p> 3896 * Description: <b>Type/identifier of event</b><br> 3897 * Type: <b>token</b><br> 3898 * Path: <b>AuditEvent.type</b><br> 3899 * </p> 3900 */ 3901 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); 3902 3903 /** 3904 * Search parameter: <b>altid</b> 3905 * <p> 3906 * Description: <b>Alternative User id e.g. authentication</b><br> 3907 * Type: <b>token</b><br> 3908 * Path: <b>AuditEvent.agent.altId</b><br> 3909 * </p> 3910 */ 3911 @SearchParamDefinition(name="altid", path="AuditEvent.agent.altId", description="Alternative User id e.g. authentication", type="token" ) 3912 public static final String SP_ALTID = "altid"; 3913 /** 3914 * <b>Fluent Client</b> search parameter constant for <b>altid</b> 3915 * <p> 3916 * Description: <b>Alternative User id e.g. authentication</b><br> 3917 * Type: <b>token</b><br> 3918 * Path: <b>AuditEvent.agent.altId</b><br> 3919 * </p> 3920 */ 3921 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ALTID = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ALTID); 3922 3923 /** 3924 * Search parameter: <b>site</b> 3925 * <p> 3926 * Description: <b>Logical source location within the enterprise</b><br> 3927 * Type: <b>token</b><br> 3928 * Path: <b>AuditEvent.source.site</b><br> 3929 * </p> 3930 */ 3931 @SearchParamDefinition(name="site", path="AuditEvent.source.site", description="Logical source location within the enterprise", type="token" ) 3932 public static final String SP_SITE = "site"; 3933 /** 3934 * <b>Fluent Client</b> search parameter constant for <b>site</b> 3935 * <p> 3936 * Description: <b>Logical source location within the enterprise</b><br> 3937 * Type: <b>token</b><br> 3938 * Path: <b>AuditEvent.source.site</b><br> 3939 * </p> 3940 */ 3941 public static final ca.uhn.fhir.rest.gclient.TokenClientParam SITE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SITE); 3942 3943 /** 3944 * Search parameter: <b>agent-name</b> 3945 * <p> 3946 * Description: <b>Human-meaningful name for the agent</b><br> 3947 * Type: <b>string</b><br> 3948 * Path: <b>AuditEvent.agent.name</b><br> 3949 * </p> 3950 */ 3951 @SearchParamDefinition(name="agent-name", path="AuditEvent.agent.name", description="Human-meaningful name for the agent", type="string" ) 3952 public static final String SP_AGENT_NAME = "agent-name"; 3953 /** 3954 * <b>Fluent Client</b> search parameter constant for <b>agent-name</b> 3955 * <p> 3956 * Description: <b>Human-meaningful name for the agent</b><br> 3957 * Type: <b>string</b><br> 3958 * Path: <b>AuditEvent.agent.name</b><br> 3959 * </p> 3960 */ 3961 public static final ca.uhn.fhir.rest.gclient.StringClientParam AGENT_NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_AGENT_NAME); 3962 3963 /** 3964 * Search parameter: <b>entity-name</b> 3965 * <p> 3966 * Description: <b>Descriptor for entity</b><br> 3967 * Type: <b>string</b><br> 3968 * Path: <b>AuditEvent.entity.name</b><br> 3969 * </p> 3970 */ 3971 @SearchParamDefinition(name="entity-name", path="AuditEvent.entity.name", description="Descriptor for entity", type="string" ) 3972 public static final String SP_ENTITY_NAME = "entity-name"; 3973 /** 3974 * <b>Fluent Client</b> search parameter constant for <b>entity-name</b> 3975 * <p> 3976 * Description: <b>Descriptor for entity</b><br> 3977 * Type: <b>string</b><br> 3978 * Path: <b>AuditEvent.entity.name</b><br> 3979 * </p> 3980 */ 3981 public static final ca.uhn.fhir.rest.gclient.StringClientParam ENTITY_NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ENTITY_NAME); 3982 3983 /** 3984 * Search parameter: <b>subtype</b> 3985 * <p> 3986 * Description: <b>More specific type/id for the event</b><br> 3987 * Type: <b>token</b><br> 3988 * Path: <b>AuditEvent.subtype</b><br> 3989 * </p> 3990 */ 3991 @SearchParamDefinition(name="subtype", path="AuditEvent.subtype", description="More specific type/id for the event", type="token" ) 3992 public static final String SP_SUBTYPE = "subtype"; 3993 /** 3994 * <b>Fluent Client</b> search parameter constant for <b>subtype</b> 3995 * <p> 3996 * Description: <b>More specific type/id for the event</b><br> 3997 * Type: <b>token</b><br> 3998 * Path: <b>AuditEvent.subtype</b><br> 3999 * </p> 4000 */ 4001 public static final ca.uhn.fhir.rest.gclient.TokenClientParam SUBTYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SUBTYPE); 4002 4003 /** 4004 * Search parameter: <b>patient</b> 4005 * <p> 4006 * Description: <b>Direct reference to resource</b><br> 4007 * Type: <b>reference</b><br> 4008 * Path: <b>AuditEvent.agent.reference, AuditEvent.entity.reference</b><br> 4009 * </p> 4010 */ 4011 @SearchParamDefinition(name="patient", path="AuditEvent.agent.reference | AuditEvent.entity.reference", description="Direct reference to resource", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class } ) 4012 public static final String SP_PATIENT = "patient"; 4013 /** 4014 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 4015 * <p> 4016 * Description: <b>Direct reference to resource</b><br> 4017 * Type: <b>reference</b><br> 4018 * Path: <b>AuditEvent.agent.reference, AuditEvent.entity.reference</b><br> 4019 * </p> 4020 */ 4021 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 4022 4023/** 4024 * Constant for fluent queries to be used to add include statements. Specifies 4025 * the path value of "<b>AuditEvent:patient</b>". 4026 */ 4027 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("AuditEvent:patient").toLocked(); 4028 4029 /** 4030 * Search parameter: <b>action</b> 4031 * <p> 4032 * Description: <b>Type of action performed during the event</b><br> 4033 * Type: <b>token</b><br> 4034 * Path: <b>AuditEvent.action</b><br> 4035 * </p> 4036 */ 4037 @SearchParamDefinition(name="action", path="AuditEvent.action", description="Type of action performed during the event", type="token" ) 4038 public static final String SP_ACTION = "action"; 4039 /** 4040 * <b>Fluent Client</b> search parameter constant for <b>action</b> 4041 * <p> 4042 * Description: <b>Type of action performed during the event</b><br> 4043 * Type: <b>token</b><br> 4044 * Path: <b>AuditEvent.action</b><br> 4045 * </p> 4046 */ 4047 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACTION); 4048 4049 /** 4050 * Search parameter: <b>agent-role</b> 4051 * <p> 4052 * Description: <b>Agent role in the event</b><br> 4053 * Type: <b>token</b><br> 4054 * Path: <b>AuditEvent.agent.role</b><br> 4055 * </p> 4056 */ 4057 @SearchParamDefinition(name="agent-role", path="AuditEvent.agent.role", description="Agent role in the event", type="token" ) 4058 public static final String SP_AGENT_ROLE = "agent-role"; 4059 /** 4060 * <b>Fluent Client</b> search parameter constant for <b>agent-role</b> 4061 * <p> 4062 * Description: <b>Agent role in the event</b><br> 4063 * Type: <b>token</b><br> 4064 * Path: <b>AuditEvent.agent.role</b><br> 4065 * </p> 4066 */ 4067 public static final ca.uhn.fhir.rest.gclient.TokenClientParam AGENT_ROLE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_AGENT_ROLE); 4068 4069 /** 4070 * Search parameter: <b>user</b> 4071 * <p> 4072 * Description: <b>Unique identifier for the user</b><br> 4073 * Type: <b>token</b><br> 4074 * Path: <b>AuditEvent.agent.userId</b><br> 4075 * </p> 4076 */ 4077 @SearchParamDefinition(name="user", path="AuditEvent.agent.userId", description="Unique identifier for the user", type="token" ) 4078 public static final String SP_USER = "user"; 4079 /** 4080 * <b>Fluent Client</b> search parameter constant for <b>user</b> 4081 * <p> 4082 * Description: <b>Unique identifier for the user</b><br> 4083 * Type: <b>token</b><br> 4084 * Path: <b>AuditEvent.agent.userId</b><br> 4085 * </p> 4086 */ 4087 public static final ca.uhn.fhir.rest.gclient.TokenClientParam USER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_USER); 4088 4089 /** 4090 * Search parameter: <b>entity</b> 4091 * <p> 4092 * Description: <b>Specific instance of resource</b><br> 4093 * Type: <b>reference</b><br> 4094 * Path: <b>AuditEvent.entity.reference</b><br> 4095 * </p> 4096 */ 4097 @SearchParamDefinition(name="entity", path="AuditEvent.entity.reference", description="Specific instance of resource", type="reference" ) 4098 public static final String SP_ENTITY = "entity"; 4099 /** 4100 * <b>Fluent Client</b> search parameter constant for <b>entity</b> 4101 * <p> 4102 * Description: <b>Specific instance of resource</b><br> 4103 * Type: <b>reference</b><br> 4104 * Path: <b>AuditEvent.entity.reference</b><br> 4105 * </p> 4106 */ 4107 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENTITY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENTITY); 4108 4109/** 4110 * Constant for fluent queries to be used to add include statements. Specifies 4111 * the path value of "<b>AuditEvent:entity</b>". 4112 */ 4113 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENTITY = new ca.uhn.fhir.model.api.Include("AuditEvent:entity").toLocked(); 4114 4115 /** 4116 * Search parameter: <b>entity-id</b> 4117 * <p> 4118 * Description: <b>Specific instance of object</b><br> 4119 * Type: <b>token</b><br> 4120 * Path: <b>AuditEvent.entity.identifier</b><br> 4121 * </p> 4122 */ 4123 @SearchParamDefinition(name="entity-id", path="AuditEvent.entity.identifier", description="Specific instance of object", type="token" ) 4124 public static final String SP_ENTITY_ID = "entity-id"; 4125 /** 4126 * <b>Fluent Client</b> search parameter constant for <b>entity-id</b> 4127 * <p> 4128 * Description: <b>Specific instance of object</b><br> 4129 * Type: <b>token</b><br> 4130 * Path: <b>AuditEvent.entity.identifier</b><br> 4131 * </p> 4132 */ 4133 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ENTITY_ID = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ENTITY_ID); 4134 4135 /** 4136 * Search parameter: <b>outcome</b> 4137 * <p> 4138 * Description: <b>Whether the event succeeded or failed</b><br> 4139 * Type: <b>token</b><br> 4140 * Path: <b>AuditEvent.outcome</b><br> 4141 * </p> 4142 */ 4143 @SearchParamDefinition(name="outcome", path="AuditEvent.outcome", description="Whether the event succeeded or failed", type="token" ) 4144 public static final String SP_OUTCOME = "outcome"; 4145 /** 4146 * <b>Fluent Client</b> search parameter constant for <b>outcome</b> 4147 * <p> 4148 * Description: <b>Whether the event succeeded or failed</b><br> 4149 * Type: <b>token</b><br> 4150 * Path: <b>AuditEvent.outcome</b><br> 4151 * </p> 4152 */ 4153 public static final ca.uhn.fhir.rest.gclient.TokenClientParam OUTCOME = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_OUTCOME); 4154 4155 /** 4156 * Search parameter: <b>policy</b> 4157 * <p> 4158 * Description: <b>Policy that authorized event</b><br> 4159 * Type: <b>uri</b><br> 4160 * Path: <b>AuditEvent.agent.policy</b><br> 4161 * </p> 4162 */ 4163 @SearchParamDefinition(name="policy", path="AuditEvent.agent.policy", description="Policy that authorized event", type="uri" ) 4164 public static final String SP_POLICY = "policy"; 4165 /** 4166 * <b>Fluent Client</b> search parameter constant for <b>policy</b> 4167 * <p> 4168 * Description: <b>Policy that authorized event</b><br> 4169 * Type: <b>uri</b><br> 4170 * Path: <b>AuditEvent.agent.policy</b><br> 4171 * </p> 4172 */ 4173 public static final ca.uhn.fhir.rest.gclient.UriClientParam POLICY = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_POLICY); 4174 4175 4176} 4177