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