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